WebKit-https.git
9 years agofourthTier: Updated LLVM drops to include MCJIT fixes and newly exposed API.
oliver@apple.com [Thu, 25 Jul 2013 03:59:15 +0000 (03:59 +0000)]
fourthTier: Updated LLVM drops to include MCJIT fixes and newly exposed API.

Rubber stamped by Mark Hahnenberg.

* LLVMIncludesMountainLion.tar.bz2:
* LLVMLibrariesMountainLion.tar.bz2:

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

9 years agofourthTier: String::utf8() should also be available as StringImpl::utf8() so that...
oliver@apple.com [Thu, 25 Jul 2013 03:59:12 +0000 (03:59 +0000)]
fourthTier: String::utf8() should also be available as StringImpl::utf8() so that you don't have to ref() a StringImpl just to get its utf8()
https://bugs.webkit.org/show_bug.cgi?id=115393

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

* runtime/JSGlobalObjectFunctions.cpp:
(JSC::encode):

Source/WebCore:

No new tests because no new behavior.

* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::close):
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::send):
* html/MediaFragmentURIParser.cpp:
(WebCore::MediaFragmentURIParser::parseFragments):

Source/WTF:

* WTF.xcodeproj/project.pbxproj:
* wtf/text/ConversionMode.h: Added.
(WTF):
* wtf/text/StringImpl.cpp:
(WTF):
(WTF::putUTF8Triple):
(WTF::StringImpl::utf8):
* wtf/text/StringImpl.h:
(StringImpl):
* wtf/text/WTFString.cpp:
(WTF):
(WTF::String::utf8):
* wtf/text/WTFString.h:
(String):

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

9 years agofourthTier: ASSERT that commonly used not-thread-safe methods in the runtime are...
oliver@apple.com [Thu, 25 Jul 2013 03:59:09 +0000 (03:59 +0000)]
fourthTier: ASSERT that commonly used not-thread-safe methods in the runtime are not being called during compilation
https://bugs.webkit.org/show_bug.cgi?id=115297

Source/JavaScriptCore:

Reviewed by Geoffrey Garen.

Put in assertions that we're not doing bad things in compilation threads. Also
factored compilation into compile+link so that even though we don't yet have
concurrent compilation, we can be explicit about which parts of DFG work are
meant to be concurrent, and which aren't.

Also fix a handful of bugs found by these assertions.

* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/ResolveGlobalStatus.cpp:
(JSC::computeForStructure):
* bytecode/Watchpoint.cpp:
(JSC::WatchpointSet::add):
(JSC::InlineWatchpointSet::inflateSlow):
* dfg/DFGDriver.cpp:
(JSC::DFG::compile):
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::~JITCompiler):
(DFG):
(JSC::DFG::JITCompiler::compileBody):
(JSC::DFG::JITCompiler::compile):
(JSC::DFG::JITCompiler::link):
(JSC::DFG::JITCompiler::compileFunction):
(JSC::DFG::JITCompiler::linkFunction):
* dfg/DFGJITCompiler.h:
(JITCompiler):
* ftl/FTLCompile.cpp:
(JSC::FTL::compile):
* ftl/FTLCompile.h:
(FTL):
* ftl/FTLLink.cpp: Added.
(FTL):
(JSC::FTL::compileEntry):
(JSC::FTL::link):
* ftl/FTLLink.h: Added.
(FTL):
* ftl/FTLState.cpp:
(JSC::FTL::State::State):
* ftl/FTLState.h:
(FTL):
(State):
* runtime/Structure.cpp:
(JSC::Structure::get):
(JSC::Structure::prototypeChainMayInterceptStoreTo):
* runtime/Structure.h:
(JSC::Structure::materializePropertyMapIfNecessary):
* runtime/StructureInlines.h:
(JSC::Structure::get):

Source/WTF:

Reviewed by Geoffrey Garen.

Taught WTF the notion of compilation threads. This allows all parts of our stack
to assert that we're not being called from a JSC compilation thread. This is in
WTF because it will probably end up being used in StringImpl and WTFString.

* WTF.xcodeproj/project.pbxproj:
* wtf/CompilationThread.cpp: Added.
(WTF):
(WTF::initializeCompilationThreadsOnce):
(WTF::initializeCompilationThreads):
(WTF::isCompilationThread):
(WTF::exchangeIsCompilationThread):
* wtf/CompilationThread.h: Added.
(WTF):
(CompilationScope):
(WTF::CompilationScope::CompilationScope):
(WTF::CompilationScope::~CompilationScope):
(WTF::CompilationScope::leaveEarly):

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

9 years agofourthTier: FTL should support double variables
oliver@apple.com [Thu, 25 Jul 2013 03:59:06 +0000 (03:59 +0000)]
fourthTier: FTL should support double variables
https://bugs.webkit.org/show_bug.cgi?id=113624

Reviewed by Geoffrey Garen.

Made all of the operations that the FTL already supports, also support doubles.
OSR exit already basically had everything it needed, so no changes there. This
mostly just glues together bits of DFG IR to LLVM IR, in a straight-forward way.

* ftl/FTLAbbreviations.h:
(FTL):
(JSC::FTL::doubleType):
(JSC::FTL::constReal):
(JSC::FTL::buildPhi):
(JSC::FTL::addIncoming):
(JSC::FTL::buildFAdd):
(JSC::FTL::buildFSub):
(JSC::FTL::buildFMul):
(JSC::FTL::buildFNeg):
(JSC::FTL::buildSIToFP):
(JSC::FTL::buildUIToFP):
(JSC::FTL::buildBitCast):
(JSC::FTL::buildFCmp):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLCommonValues.cpp:
(JSC::FTL::CommonValues::CommonValues):
* ftl/FTLCommonValues.h:
(CommonValues):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::LowerDFGToLLVM):
(JSC::FTL::LowerDFGToLLVM::lower):
(JSC::FTL::LowerDFGToLLVM::compileGetLocal):
(JSC::FTL::LowerDFGToLLVM::compileSetLocal):
(JSC::FTL::LowerDFGToLLVM::compileAdd):
(JSC::FTL::LowerDFGToLLVM::compileArithSub):
(JSC::FTL::LowerDFGToLLVM::compileArithMul):
(JSC::FTL::LowerDFGToLLVM::compileArithNegate):
(JSC::FTL::LowerDFGToLLVM::compileUInt32ToNumber):
(JSC::FTL::LowerDFGToLLVM::compileGetByVal):
(JSC::FTL::LowerDFGToLLVM::compileCompareEq):
(JSC::FTL::LowerDFGToLLVM::compileCompareLess):
(JSC::FTL::LowerDFGToLLVM::lowDouble):
(LowerDFGToLLVM):
(JSC::FTL::LowerDFGToLLVM::lowJSValue):
(JSC::FTL::LowerDFGToLLVM::isCellOrMisc):
(JSC::FTL::LowerDFGToLLVM::unboxDouble):
(JSC::FTL::LowerDFGToLLVM::boxDouble):
(JSC::FTL::LowerDFGToLLVM::speculate):
(JSC::FTL::LowerDFGToLLVM::speculateNumber):
(JSC::FTL::LowerDFGToLLVM::speculateRealNumber):
(JSC::FTL::LowerDFGToLLVM::appendOSRExit):
(JSC::FTL::LowerDFGToLLVM::addExitArgumentForNode):
* ftl/FTLOutput.h:
(JSC::FTL::Output::constDouble):
(Output):
(JSC::FTL::Output::phi):
(JSC::FTL::Output::doubleAdd):
(JSC::FTL::Output::doubleSub):
(JSC::FTL::Output::doubleMul):
(JSC::FTL::Output::doubleNeg):
(JSC::FTL::Output::intToFP):
(JSC::FTL::Output::intToDouble):
(JSC::FTL::Output::unsignedToFP):
(JSC::FTL::Output::unsignedToDouble):
(JSC::FTL::Output::bitCast):
(JSC::FTL::Output::loadDouble):
(JSC::FTL::Output::storeDouble):
(JSC::FTL::Output::doubleEqual):
(JSC::FTL::Output::doubleNotEqualOrUnordered):
(JSC::FTL::Output::doubleLessThan):
(JSC::FTL::Output::doubleLessThanOrEqual):
(JSC::FTL::Output::doubleGreaterThan):
(JSC::FTL::Output::doubleGreaterThanOrEqual):
(JSC::FTL::Output::doubleEqualOrUnordered):
(JSC::FTL::Output::doubleNotEqual):
(JSC::FTL::Output::doubleLessThanOrUnordered):
(JSC::FTL::Output::doubleLessThanOrEqualOrUnordered):
(JSC::FTL::Output::doubleGreaterThanOrUnordered):
(JSC::FTL::Output::doubleGreaterThanOrEqualOrUnordered):
(JSC::FTL::Output::testIsZero64):

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

9 years agofourthTier: SymbolTable should be thread-safe
oliver@apple.com [Thu, 25 Jul 2013 03:59:04 +0000 (03:59 +0000)]
fourthTier: SymbolTable should be thread-safe
https://bugs.webkit.org/show_bug.cgi?id=115301

Reviewed by Geoffrey Garen.

Makes SymbolTable thread-safe. Relies on SymbolTableEntry already being immutable,
other than the WatchpointSet; but the WatchpointSet already has a righteous
concurrency protocol. So, this patch just protects the SymbolTable's HashMap.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::nameForRegister):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::addVar):
* runtime/Executable.cpp:
(JSC::ProgramExecutable::addGlobalVar):
* runtime/JSActivation.cpp:
(JSC::JSActivation::getOwnNonIndexPropertyNames):
(JSC::JSActivation::symbolTablePutWithAttributes):
* runtime/JSSymbolTableObject.cpp:
(JSC::JSSymbolTableObject::getOwnNonIndexPropertyNames):
* runtime/JSSymbolTableObject.h:
(JSC::symbolTableGet):
(JSC::symbolTablePut):
(JSC::symbolTablePutWithAttributes):
* runtime/SymbolTable.cpp:
(JSC::SymbolTable::SymbolTable):
(JSC::SymbolTable::~SymbolTable):
* runtime/SymbolTable.h:
(JSC::SymbolTable::find):
(JSC::SymbolTable::get):
(JSC::SymbolTable::inlineGet):
(JSC::SymbolTable::begin):
(JSC::SymbolTable::end):
(JSC::SymbolTable::size):
(JSC::SymbolTable::add):
(JSC::SymbolTable::set):
(JSC::SymbolTable::contains):

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

9 years agofourthTier: WatchpointSet should make racy uses easier to reason about
oliver@apple.com [Thu, 25 Jul 2013 03:59:02 +0000 (03:59 +0000)]
fourthTier: WatchpointSet should make racy uses easier to reason about
https://bugs.webkit.org/show_bug.cgi?id=115299

Reviewed by Anders Carlsson.

The compiler often does things like:

1c) Observe something that would imply that a WatchpointSet ought to be invalid

2c) Check that it is invalid

The main thread often does things like:

1m) Fire the watchpoint set

2m) Do some other thing that would cause the compiler to assume that the WatchpointSet
ought to be invalid

An example is structure transitions, where (1c) is the compiler noticing that a
put_by_id inline cache is in a transition state, with the source structure being S;
(2c) is the compiler asserting that S's watchpoint set is invalid; (1m) is the main
thread firing S's watchpoint set before it does the first transition away from S; and
(2m) is the main thread caching the put_by_id transition away from S.

This is totally fine, except that (1c) and (2c), and (1m) and (2m) could be reordered.
Probably, in most cases, this ought to do enough things that the main thread probably
already has some fencing. But the compiler thread definitely doesn't have fencing. In
any case, we should play it safe and just have additional fencing in all of the
relevant places.

We already have some idioms to put load-load and store-store fences in the right
places. But this change just makes WatchpointSet take care of this for us, thus
reducing the chances of us getting this wrong.

* bytecode/Watchpoint.cpp:
(JSC::WatchpointSet::notifyWriteSlow):
* bytecode/Watchpoint.h:
(WatchpointSet):
(JSC::WatchpointSet::isStillValid):
(JSC::WatchpointSet::hasBeenInvalidated):
(JSC::InlineWatchpointSet::hasBeenInvalidated):
(JSC::InlineWatchpointSet::notifyWrite):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGDesiredWatchpoints.h:
(JSC::DFG::GenericDesiredWatchpoints::shouldAssumeMixedState):

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

9 years agofourthTier: CFA should defend against results seeming inconsistent due to a watchpoin...
oliver@apple.com [Thu, 25 Jul 2013 03:59:00 +0000 (03:59 +0000)]
fourthTier: CFA should defend against results seeming inconsistent due to a watchpoint firing during compilation
https://bugs.webkit.org/show_bug.cgi?id=115083

Reviewed by Geoffrey Garen.

This ruggedizes our racyness with respect to watchpoints. We want to be able to assert,
in some places, that a watchpoint-based optimization has only occurred if the
watchpoint set was still valid. But currently we *can* soundly do watchpoint-based
optimizations even for invalid watchpoints, so long as we recorded in the IR that we
had done so; this will then lead to the code being insta-jettisoned after compilation
completes. Obviously, we don't want this to happen often - but we do want to allow it
precisely in the case of watchpoint races.

This adds the ability to assert that we hadn't over-watchpointed ourselves, with and
exemption for races.

* dfg/DFGAbstractState.cpp:
(JSC::DFG::AbstractState::executeEffects):
* dfg/DFGAbstractValue.cpp:
(JSC::DFG::AbstractValue::setFuturePossibleStructure):
(JSC::DFG::AbstractValue::filterFuturePossibleStructure):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::addStructureTransitionCheck):
(JSC::DFG::ByteCodeParser::parseResolveOperations):
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::addStructureTransitionCheck):
* dfg/DFGDesiredWatchpoints.h:
(GenericDesiredWatchpoints):
(JSC::DFG::GenericDesiredWatchpoints::isStillValid):
(JSC::DFG::GenericDesiredWatchpoints::shouldAssumeMixedState):
(JSC::DFG::GenericDesiredWatchpoints::isValidOrMixed):
(JSC::DFG::DesiredWatchpoints::isStillValid):
(JSC::DFG::DesiredWatchpoints::shouldAssumeMixedState):
(JSC::DFG::DesiredWatchpoints::isValidOrMixed):
(DesiredWatchpoints):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::canOptimizeStringObjectAccess):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::masqueradesAsUndefinedWatchpointIsStillValid):
(Graph):
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::link):
(JSC::DFG::JITCompiler::compile):
(JSC::DFG::JITCompiler::compileFunction):
* dfg/DFGJITCompiler.h:
(JSC::DFG::JITCompiler::addLazily):
(JITCompiler):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectEquality):
* dfg/DFGSpeculativeJIT.h:
(SpeculativeJIT):
(JSC::DFG::SpeculativeJIT::masqueradesAsUndefinedWatchpointIsStillValid):
(JSC::DFG::SpeculativeJIT::speculationWatchpointForMasqueradesAsUndefined):
(JSC::DFG::SpeculativeJIT::speculateStringObjectForStructure):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
(JSC::DFG::SpeculativeJIT::compileObjectEquality):
(JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
(JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
(JSC::DFG::SpeculativeJIT::compileObjectEquality):
(JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
(JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLCompile.cpp:
(JSC::FTL::compile):
* ftl/FTLState.h:
(State):

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

9 years agofourthTier: AbstractValue methods that deal with watchpoints should have access to...
oliver@apple.com [Thu, 25 Jul 2013 03:58:58 +0000 (03:58 +0000)]
fourthTier: AbstractValue methods that deal with watchpoints should have access to Graph, so that in debug mode, Graph can track the history of watchpoint states and detect races
https://bugs.webkit.org/show_bug.cgi?id=115084

Reviewed by Geoffrey Garen.

The idea is that as part of https://bugs.webkit.org/show_bug.cgi?id=115083, I'll have
Graph record the initial state of a watchpoint at the time that we decide to take
advantage of it; then I will use this to disable any watchpoint-related assertions
in debug mode. Note that this "watchpoint cache" will only be maintained in debug
mode, so there will be no release performance implications. But to do this, I need to
ensure that all of the places that reason about watchpoints have access to Graph.
For example, I'll want AbstractValue::setFuturePossibleStructure to record the state
of the watchpoint in Graph so that subsequent assertions can check if the watchpoint's
state had changed since that decision was made.

* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGAbstractState.cpp:
(JSC::DFG::AbstractState::initialize):
(JSC::DFG::AbstractState::executeEffects):
(JSC::DFG::AbstractState::mergeStateAtTail):
* dfg/DFGAbstractState.h:
(JSC::DFG::AbstractState::trySetConstant):
* dfg/DFGAbstractValue.cpp: Added.
(DFG):
(JSC::DFG::AbstractValue::setMostSpecific):
(JSC::DFG::AbstractValue::set):
(JSC::DFG::AbstractValue::filter):
(JSC::DFG::AbstractValue::setFuturePossibleStructure):
(JSC::DFG::AbstractValue::filterFuturePossibleStructure):
(JSC::DFG::AbstractValue::dump):
* dfg/DFGAbstractValue.h:
(DFG):
(AbstractValue):
(JSC::DFG::AbstractValue::setType):
(JSC::DFG::AbstractValue::filterByValue):

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

9 years agofourthTier: Create an equivalent of Structure::get() that can work from a compilation...
oliver@apple.com [Thu, 25 Jul 2013 03:58:56 +0000 (03:58 +0000)]
fourthTier: Create an equivalent of Structure::get() that can work from a compilation thread
https://bugs.webkit.org/show_bug.cgi?id=114987

Reviewed by Geoffrey Garen.

This completes the work started by r148570. That patch made it possible to do
Structure::get() without modifying Structure. This patch takes this further, and
makes this thread-safe (for non-uncacheable-dictionaries) via
Structure::getConcurrently(). This method not only doesn't modify Structure, but
also ensures that any concurrent attempts to add to, remove from, or steal the
table from that structure doesn't mess up the result of the call. The call may
return invalidOffset even if a property is *just* about to be added, but it will
never do the reverse: if it returns a property then you can be sure that the
structure really does have that property and always will have it.

* bytecode/GetByIdStatus.cpp:
(JSC::GetByIdStatus::computeFromLLInt):
(JSC::GetByIdStatus::computeForChain):
(JSC::GetByIdStatus::computeFor):
* bytecode/PutByIdStatus.cpp:
(JSC::PutByIdStatus::computeFromLLInt):
(JSC::PutByIdStatus::computeFor):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::isStringPrototypeMethodSane):
* runtime/PropertyMapHashTable.h:
(PropertyTable):
(JSC::PropertyTable::findConcurrently):
(JSC):
(JSC::PropertyTable::add):
(JSC::PropertyTable::remove):
(JSC::PropertyTable::reinsert):
(JSC::PropertyTable::rehash):
* runtime/PropertyTable.cpp:
(JSC::PropertyTable::PropertyTable):
* runtime/Structure.cpp:
(JSC::Structure::findStructuresAndMapForMaterialization):
(JSC::Structure::getConcurrently):
* runtime/Structure.h:
(Structure):
* runtime/StructureInlines.h:
(JSC::Structure::getConcurrently):

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

9 years agofourthTier: tandem WebKit and LLVM builds should ./configure LLVM if needed
oliver@apple.com [Thu, 25 Jul 2013 03:58:55 +0000 (03:58 +0000)]
fourthTier: tandem WebKit and LLVM builds should ./configure LLVM if needed
https://bugs.webkit.org/show_bug.cgi?id=114933

Reviewed by Andy Estes.

This makes it easy to get set up for tandem LLVM builds.

* Scripts/copy-webkitlibraries-to-product-directory:

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

9 years agofourthTier: WebKit's build system should relink JavaScriptCore if LLVM's libraries...
oliver@apple.com [Thu, 25 Jul 2013 03:58:53 +0000 (03:58 +0000)]
fourthTier: WebKit's build system should relink JavaScriptCore if LLVM's libraries changed but its headers didn't
https://bugs.webkit.org/show_bug.cgi?id=114926

Source/JavaScriptCore:

Reviewed by Geoffrey Garen.

Use a phony file that includes a phony header to force JavaScriptCore to be relinked
if necessary. The external LLVM-importing scripts will touch the header if the libraries
are known to have changed.

* JavaScriptCore.xcodeproj/project.pbxproj:
* ftl/WebKitLLVMLibraryAnchor.cpp: Added.

Tools:

Reviewed by Geoffrey Garen.

If the LLVM libraries change, then touch a phony header, which will force relink
of JavaScriptCore.

* Scripts/copy-webkitlibraries-to-product-directory:
(unpackIfNecessary):

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

9 years agofourthTier: developing LLVM in tandem with WebKit should be fun and easy
oliver@apple.com [Thu, 25 Jul 2013 03:58:51 +0000 (03:58 +0000)]
fourthTier: developing LLVM in tandem with WebKit should be fun and easy
https://bugs.webkit.org/show_bug.cgi?id=114925

Reviewed by Geoffrey Garen.

This enables building LLVM along with WebKit, so that build-jsc and build-webkit
will also optionally build LLVM and quickly symlink LLVM's built products into
the right places.

Most WebKit and JSC hackers will want to rely on the checked-in already-built
versions of LLVM in WebKitLibraries. But developing both systems in tandem is an
increasingly common use-case for me, and it may become a common use case for a
handful of others. Currently, this is really painful: you first have to build
LLVM, then you have to export-llvm-build (which takes a while), and then you
have to make sure that your LLVM_LIBRARY_PACKAGE and LLVM_INCLUDE_PACKAGE
variables are set to point to the thing you exported. The whole process loses
track of dependencies very quickly: making a tiny change in LLVM requires
packaging, and then unpackaging, a large number of potentially large headers and
static libraries. Not only is this slow but it then causes the WebKit build
system to rebuild anything that transitively includes any LLVM header, which is
now quite a few files. While this sort of use pattern is still worthwhile if
you're trying to package a binary drop and test it, it's not great if you're
just trying to do experimental development that involves making small changes
in both trees.

This change fixes this use case while keeping the old use cases intact. You can
do tandem development using one of two modes:

Your own LLVM directory: just set LLVM_SOURCE_PATH to the *absolute* path of
the LLVM directory you're using. Once this is done, any invocation of a WebKit
build via build-jsc or build-webkit will also build LLVM, and then quickly
symlink things into place without perturbing dependency tracking.

Internal LLVM directory: if you check out llvm into a directory called 'llvm'
right off of the WebKit source tree, then the build system will automatically
use this.

Here's how this takes care of dependencies:

Headers: the include/llvm and include/llvm-c directories are symlinked into
$productsDir/usr/local/include. And then everything just works.

Libraries: the build system detects, by reading LLVM's Makefile.config, which
mode LLVM is built in (like Release+Asserts or Debug+Asserts) and symlinks
the .a files into $productsDir/<thingy>. It will ranlib those libraries only
if they have changed, by checking both the modification time and also whether
the last time we had a symlink, that symlink was from the same directory.
This helps if you switch to an *older* LLVM build (using LLVM_SOURCE_PATH)
but that build wasn't yet ranlib'd.

One problem that this does not yet solve is that xcodebuild will not relink
JavaScriptCore if the only thing that changed was the libraries. I will work
on this problem separately: https://bugs.webkit.org/show_bug.cgi?id=114926.

* Scripts/copy-webkitlibraries-to-product-directory:
(unpackIfNecessary):
(fileContains):
(fileContentsEquals):

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

9 years agofourthTier: It should be possible to query WatchpointSets, and add Watchpoints, even...
oliver@apple.com [Thu, 25 Jul 2013 03:58:49 +0000 (03:58 +0000)]
fourthTier: It should be possible to query WatchpointSets, and add Watchpoints, even if the compiler is running in another thread
https://bugs.webkit.org/show_bug.cgi?id=114909

Source/JavaScriptCore:

Reviewed by Oliver Hunt.

The idea here is that a concurrent compiler will use watchpoint sets as follows:

During concurrent compilation: It will create Watchpoints, and query WatchpointSets only
for the purpose of profiling. That is, it will use decide whether it is profitable to
compile the code "as if" the watchpoint sets are valid.

During synchronous linking: By "linking" I don't necessarily mean the LinkBuffer stuff,
but just the very bitter end of compilation where we make the JIT code callable. This
can happen after LinkBuffer stuff. Anyway, this will have to happen synchronously, and
at that point we can (a) check that all WatchpointSets that we assumed were valid are
still valid and (b) if they are then we add the watchpoints to those sets. If any of the
sets are invalid, we give up on this compilation and try again later.

The querying of WatchpointSets is engineered to say that the set is still valid if it
is so *right now*, but this is done in a racy way and so it may say so spuriously: we
may, with hopefully low probability, have a set that says it is valid even though it was
just invalidated. The goal is only to ensure that (i) a set never claims to be invalid
if it is actually valid, (ii) a set doesn't claim to be valid if it was invalidated
before compilation even began, and (iii) querying the validity of a set doesn't cause us
to crash.

* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/Watchpoint.cpp:
(JSC::InlineWatchpointSet::inflateSlow):
* bytecode/Watchpoint.h:
(WatchpointSet):
(InlineWatchpointSet):
(JSC::InlineWatchpointSet::hasBeenInvalidated):
(JSC::InlineWatchpointSet::isThin):
(JSC::InlineWatchpointSet::isFat):
(JSC::InlineWatchpointSet::fat):
* dfg/DFGDesiredWatchpoints.cpp: Added.
(DFG):
(JSC::DFG::DesiredWatchpoints::DesiredWatchpoints):
(JSC::DFG::DesiredWatchpoints::~DesiredWatchpoints):
(JSC::DFG::DesiredWatchpoints::addLazily):
(JSC::DFG::DesiredWatchpoints::reallyAdd):
(JSC::DFG::DesiredWatchpoints::areStillValid):
* dfg/DFGDesiredWatchpoints.h: Added.
(DFG):
(JSC::DFG::WatchpointForGenericWatchpointSet::WatchpointForGenericWatchpointSet):
(WatchpointForGenericWatchpointSet):
(GenericDesiredWatchpoints):
(JSC::DFG::GenericDesiredWatchpoints::GenericDesiredWatchpoints):
(JSC::DFG::GenericDesiredWatchpoints::addLazily):
(JSC::DFG::GenericDesiredWatchpoints::reallyAdd):
(JSC::DFG::GenericDesiredWatchpoints::areStillValid):
(DesiredWatchpoints):
* dfg/DFGDriver.cpp:
(JSC::DFG::compile):
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::link):
(JSC::DFG::JITCompiler::compile):
(JSC::DFG::JITCompiler::compileFunction):
* dfg/DFGJITCompiler.h:
(JSC::DFG::JITCompiler::addLazily):
(JITCompiler):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectEquality):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
(JSC::DFG::SpeculativeJIT::compileObjectEquality):
(JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
(JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
(JSC::DFG::SpeculativeJIT::compileObjectEquality):
(JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
(JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLCompile.cpp:
(JSC::FTL::compile):
* ftl/FTLCompile.h:
(FTL):
* ftl/FTLState.h:
(State):
* runtime/JSFunction.h:
(JSFunction):
(JSC::JSFunction::allocationProfileWatchpointSet):
* runtime/Structure.h:
(Structure):
(JSC::Structure::transitionWatchpointSet):

Source/WTF:

Reviewed by Oliver Hunt.

Harden our notions of memory fences, now that we're doing racy algorithms.

* wtf/Atomics.h:
(WTF):
(WTF::compilerFence):
(WTF::armV7_dmb):
(WTF::armV7_dmb_st):
(WTF::loadLoadFence):
(WTF::loadStoreFence):
(WTF::storeLoadFence):
(WTF::storeStoreFence):
(WTF::memoryBarrierAfterLock):
(WTF::memoryBarrierBeforeUnlock):
(WTF::x86_mfence):

Conflicts:
Source/WTF/wtf/Atomics.h

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

9 years agofourthTier: value profiles and array profiles should be thread-safe enough to be...
oliver@apple.com [Thu, 25 Jul 2013 03:58:47 +0000 (03:58 +0000)]
fourthTier: value profiles and array profiles should be thread-safe enough to be accessible in a concurrent compilation thread
https://bugs.webkit.org/show_bug.cgi?id=114906

Source/JavaScriptCore:

Reviewed by Oliver Hunt.

This introduces thread safety to value profiles, array profiles, and
array allocation profiles.

We already have three separate operations that happen on profiles:
(1) writing, which the JIT, LLInt, and OSR exit do; (2) updating,
which happens during GC, from OSR entry slow-paths, and in the DFG;
and (3) reading, which happens in the DFG. For example, the JIT/LLInt
and OSR exit write to ValueProfile::m_buckets, which gets synthesized
into ValueProfile::m_prediction (and other fields) during update, and
the latter gets read by the DFG. Note that (2) must also happen in
the DFG since only the DFG knows which code blocks it will inline,
and those blocks' profiles may not have otherwise been updated via
any other mechanism.

I refer to these three operations as writing, updating, and reading.

Consequently, both profile updating and profile reading may happen
asynchronously, if the JIT is asynchronous.

The locking protocol for profiles works as follows:

- Writing does not require locking, but is only allowed on the main
  thread. We require that these fields can be stored atomically by
  the profiling code, even without locks. For value profiles, this
  only works on 64-bit platforms, currently. For array profiles,
  which consist of multiple separate fields, this means that an
  asynchronous update of the profile may see slight inconsistencies
  (like a structure that doesn't quite match the array modes bits),
  but these should be harmless: at worst, the DFG will specialize
  too much and we'll have OSR exits.

- Updating a value profile requires holding a lock, but must assume
  that the fields written by the profiling code in JIT/LLInt may
  be written to without locking.

- Reading a value profile requires holding a lock.

The one major exception to these rules is the ArrayAllocationProfile,
which requires no locking. We do this because it's used so often and
in places where we don't necessarily have access to the owning
CodeBlock, so if we did want it to be locked it would have to have
its own lock. Also, I believe that it is sound to just make this
profile racy and not worry about locking at all. All that was needed
were some changes to ensure that we explicitly read some raced-over
fields only once.

Two additional interesting things in this change:

- To make it easy to see which profile methods require locking, they
  take a const CodeBlockLocker& as an argument. I saw this idiom for
  identifying which methods require which locks to be held being used
  in LLVM, and I quite like it.

- Lazy operand value profiles, which are created lazily and at any
  time, require the CodeBlockLock to be held when they are being
  created. Writes to them are lockless and main-thread-only, but as
  with other profiles, updates and reads require locking.

* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/ArrayAllocationProfile.cpp:
(JSC::ArrayAllocationProfile::updateIndexingType):
* bytecode/ArrayAllocationProfile.h:
(JSC::ArrayAllocationProfile::selectIndexingType):
* bytecode/ArrayProfile.cpp:
(JSC::ArrayProfile::computeUpdatedPrediction):
(JSC::ArrayProfile::briefDescription):
* bytecode/ArrayProfile.h:
(ArrayProfile):
(JSC::ArrayProfile::expectedStructure):
(JSC::ArrayProfile::structureIsPolymorphic):
(JSC::ArrayProfile::hasDefiniteStructure):
(JSC::ArrayProfile::observedArrayModes):
(JSC::ArrayProfile::mayInterceptIndexedAccesses):
(JSC::ArrayProfile::mayStoreToHole):
(JSC::ArrayProfile::outOfBounds):
(JSC::ArrayProfile::usesOriginalArrayStructures):
* bytecode/CallLinkStatus.cpp:
(JSC::CallLinkStatus::computeFor):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpValueProfiling):
(JSC::CodeBlock::dumpArrayProfiling):
(JSC::CodeBlock::updateAllPredictionsAndCountLiveness):
(JSC::CodeBlock::updateAllArrayPredictions):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::valueProfilePredictionForBytecodeOffset):
(JSC::CodeBlock::updateAllPredictionsAndCheckIfShouldOptimizeNow):
(CodeBlock):
* bytecode/CodeBlockLock.h: Added.
(JSC):
* bytecode/GetByIdStatus.cpp:
(JSC::GetByIdStatus::computeFor):
* bytecode/LazyOperandValueProfile.cpp:
(JSC::CompressedLazyOperandValueProfileHolder::computeUpdatedPredictions):
(JSC::CompressedLazyOperandValueProfileHolder::add):
(JSC::LazyOperandValueProfileParser::LazyOperandValueProfileParser):
(JSC::LazyOperandValueProfileParser::~LazyOperandValueProfileParser):
(JSC):
(JSC::LazyOperandValueProfileParser::initialize):
(JSC::LazyOperandValueProfileParser::prediction):
* bytecode/LazyOperandValueProfile.h:
(CompressedLazyOperandValueProfileHolder):
(LazyOperandValueProfileParser):
* bytecode/MethodOfGettingAValueProfile.cpp:
(JSC::MethodOfGettingAValueProfile::getSpecFailBucket):
* bytecode/PutByIdStatus.cpp:
(JSC::PutByIdStatus::computeFor):
* bytecode/ResolveGlobalStatus.cpp:
(JSC::ResolveGlobalStatus::computeFor):
* bytecode/ValueProfile.h:
(JSC::ValueProfileBase::briefDescription):
(ValueProfileBase):
(JSC::ValueProfileBase::computeUpdatedPrediction):
* dfg/DFGArrayMode.cpp:
(JSC::DFG::ArrayMode::fromObserved):
* dfg/DFGArrayMode.h:
(ArrayMode):
(JSC::DFG::ArrayMode::withProfile):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::injectLazyOperandSpeculation):
(JSC::DFG::ByteCodeParser::getPredictionWithoutOSRExit):
(JSC::DFG::ByteCodeParser::getArrayMode):
(JSC::DFG::ByteCodeParser::getArrayModeAndEmitChecks):
(JSC::DFG::ByteCodeParser::parseResolveOperations):
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGOSRExitPreparation.cpp:
(JSC::DFG::prepareCodeOriginForOSRExit):
* dfg/DFGPredictionInjectionPhase.cpp:
(JSC::DFG::PredictionInjectionPhase::run):
* jit/JITInlines.h:
(JSC::JIT::chooseArrayMode):
* jit/JITStubs.cpp:
(JSC::tryCachePutByID):
(JSC::tryCacheGetByID):
(JSC::DEFINE_STUB_FUNCTION):
(JSC::lazyLinkFor):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
(JSC::LLInt::setUpCall):
* profiler/ProfilerBytecodeSequence.cpp:
(JSC::Profiler::BytecodeSequence::BytecodeSequence):
* runtime/JSScope.cpp:
(JSC::JSScope::resolveContainingScopeInternal):
(JSC::JSScope::resolvePut):

Source/WTF:

Reviewed by Oliver Hunt.

Add ability to abstract whether or not the CodeBlock requires locking at all,
since some platforms may not support the byte spin-locking and/or may not want
to, if they turn off concurrent JIT.

* WTF.xcodeproj/project.pbxproj:
* wtf/ByteSpinLock.h:
* wtf/NoLock.h: Added.
(WTF):
(NoLock):
(WTF::NoLock::lock):
(WTF::NoLock::unlock):
(WTF::NoLock::isHeld):
* wtf/Platform.h:

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

9 years agofourthTier: all inline caches should thread-safe enough to allow a concurrent compila...
oliver@apple.com [Thu, 25 Jul 2013 03:58:43 +0000 (03:58 +0000)]
fourthTier: all inline caches should thread-safe enough to allow a concurrent compilation thread to read them safely
https://bugs.webkit.org/show_bug.cgi?id=114762

Source/JavaScriptCore:

Reviewed by Mark Hahnenberg.

For most inline caches this is easy: the inline cache has a clean temporal
separation between doing the requested action (which may take an unbounded
amount of time, may recurse, and may do arbitrary things) and recording the
relevant information in the cache. So, we just put locks around the
recording bit. That part is always O(1) and does not recurse. The lock we
use is per-CodeBlock to achieve a good balance between locking granularity
and low space overhead. So a concurrent compilation thread will only block
if an inline cache ping-pongs in the code block being compiled (or inlined)
and never when other inline caches do things.

For resolve operations, it's a bit tricky. The global resolve bit works
like any other IC in that it has the clean temporal separation. But the
operations vector itself doesn't have this separation, since we will be
filling it in tandem with actions that may take a long time. This patch
gets around this by having a m_ready bit in the ResolveOperations and
PutToBaseOperation. This is set while holding the CodeBlock's lock. If the
DFG observes the m_ready bit not set (while holding the lock) then it
conservatively assumes that the resolve hasn't happened yet and just
plants a ForceOSRExit.

* bytecode/CallLinkStatus.cpp:
(JSC::CallLinkStatus::computeFor):
* bytecode/CodeBlock.h:
(CodeBlock):
* bytecode/GetByIdStatus.cpp:
(JSC::GetByIdStatus::computeFor):
* bytecode/PutByIdStatus.cpp:
(JSC::PutByIdStatus::computeFor):
* bytecode/ResolveGlobalStatus.cpp:
(JSC::ResolveGlobalStatus::computeFor):
* bytecode/ResolveOperation.h:
(JSC::ResolveOperations::ResolveOperations):
(ResolveOperations):
(JSC::PutToBaseOperation::PutToBaseOperation):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseResolveOperations):
(JSC::DFG::ByteCodeParser::parseBlock):
* jit/JITStubs.cpp:
(JSC::tryCachePutByID):
(JSC::tryCacheGetByID):
(JSC::DEFINE_STUB_FUNCTION):
(JSC::lazyLinkFor):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
(JSC::LLInt::setUpCall):
* runtime/JSScope.cpp:
(JSC::JSScope::resolveContainingScopeInternal):
(JSC::JSScope::resolveContainingScope):
(JSC::JSScope::resolvePut):

Source/WTF:

Reviewed by Mark Hahnenberg.

Implemented a new spinlock that is optimized for compactness, by using just a byte.
This will be useful as we start using fine-grained locking on a bunch of places.

At some point I'll make these byte-sized spinlocks into adaptive mutexes, but for
now I think it's fine to do the evil thing and use spinning particularly since we
only use them for short critical sections.

* WTF.xcodeproj/project.pbxproj:
* wtf/Atomics.h:
(WTF):
(WTF::weakCompareAndSwap):
* wtf/ByteSpinLock.h: Added.
(WTF):
(ByteSpinLock):
(WTF::ByteSpinLock::ByteSpinLock):
(WTF::ByteSpinLock::lock):
(WTF::ByteSpinLock::unlock):
(WTF::ByteSpinLock::isHeld):
* wtf/ThreadingPrimitives.h:
(WTF::pauseBriefly):
(WTF):

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

9 years agofourthTier: Landing the initial FTL logic in a single commit to avoid spurious
oliver@apple.com [Thu, 25 Jul 2013 03:58:38 +0000 (03:58 +0000)]
fourthTier: Landing the initial FTL logic in a single commit to avoid spurious
broken builds.

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

9 years agofourthTier: DFG should be able to query Structure without modifying it
oliver@apple.com [Thu, 25 Jul 2013 03:58:27 +0000 (03:58 +0000)]
fourthTier: DFG should be able to query Structure without modifying it
https://bugs.webkit.org/show_bug.cgi?id=114708

Reviewed by Oliver Hunt.

This is work towards allowing the DFG, and FTL, to run on a separate thread.
The idea is that the most evil thing that the DFG does that has thread-safety
issues is fiddling with Structures by calling Structure::get(). This can lead
to rematerialization of property tables, which is definitely not thread-safe
due to how StringImpl works. So, this patch completely side-steps the problem
by creating a new version of Structure::get, called
Structure::getWithoutMaterializing, which may choose to do an O(n) search if
necessary to avoid materialization. I believe this should be fine - the DFG
does't call into these code path often enough for this to matter, and most of
the time, the Structure that we call this on will already have a property
table because some inline cache would have already called ::get() on that
Structure.

Also cleaned up the materialization logic: we can stop the search as soon as
we find any Structure with a property table rather than searching all the way
for a pinned one.

* bytecode/GetByIdStatus.cpp:
(JSC::GetByIdStatus::computeFor):
* bytecode/PutByIdStatus.cpp:
(JSC::PutByIdStatus::computeFromLLInt):
(JSC::PutByIdStatus::computeFor):
* runtime/Structure.cpp:
(JSC::Structure::findStructuresAndMapForMaterialization):
(JSC::Structure::materializePropertyMap):
(JSC::Structure::getWithoutMaterializing):
(JSC):
* runtime/Structure.h:
(Structure):
* runtime/StructureInlines.h:
(JSC::Structure::getWithoutMaterializing):
(JSC):

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

9 years agofourthTier: DFG should provide utilities for common OSR exit tasks
oliver@apple.com [Thu, 25 Jul 2013 03:58:26 +0000 (03:58 +0000)]
fourthTier: DFG should provide utilities for common OSR exit tasks
https://bugs.webkit.org/show_bug.cgi?id=114306

Reviewed by Mark Hahnenberg.

Just abstract out some things that the FTL will want to use as well.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
* dfg/DFGDriver.cpp:
(JSC::DFG::compile):
* dfg/DFGOSRExitCompiler.cpp:
* dfg/DFGOSRExitCompiler.h:
(OSRExitCompiler):
* dfg/DFGOSRExitCompiler32_64.cpp:
(JSC::DFG::OSRExitCompiler::compileExit):
* dfg/DFGOSRExitCompiler64.cpp:
(JSC::DFG::OSRExitCompiler::compileExit):
* dfg/DFGOSRExitCompilerCommon.cpp: Added.
(DFG):
(JSC::DFG::handleExitCounts):
(JSC::DFG::reifyInlinedCallFrames):
(JSC::DFG::adjustAndJumpToTarget):
* dfg/DFGOSRExitCompilerCommon.h: Added.
(DFG):

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

9 years agofourthTier: DFG should better abstract floating point arguments
oliver@apple.com [Thu, 25 Jul 2013 03:58:23 +0000 (03:58 +0000)]
fourthTier: DFG should better abstract floating point arguments
https://bugs.webkit.org/show_bug.cgi?id=114300

Reviewed by Mark Hahnenberg.

* dfg/DFGFPRInfo.h:
(FPRInfo):
(JSC::DFG::FPRInfo::toArgumentRegister):

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

9 years agofourthTier: DFG should better abstract arguments
oliver@apple.com [Thu, 25 Jul 2013 03:58:22 +0000 (03:58 +0000)]
fourthTier: DFG should better abstract arguments
https://bugs.webkit.org/show_bug.cgi?id=114073

Reviewed by Mark Hahnenberg.

* dfg/DFGGPRInfo.h:
(GPRInfo):
(JSC::DFG::GPRInfo::toArgumentRegister):

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

9 years agofourthTier: put DFG data into a DFG::JITCode, and put common DFG and FTL data into...
oliver@apple.com [Thu, 25 Jul 2013 03:58:20 +0000 (03:58 +0000)]
fourthTier: put DFG data into a DFG::JITCode, and put common DFG and FTL data into something accessible from both DFG::JITCode and FTL::JITCode
https://bugs.webkit.org/show_bug.cgi?id=113905

Reviewed by Geoffrey Garen.

This removes one pointer from CodeBlock.

It also gives us a framework for having JITType-specific data in CodeBlock, by
putting it into the appropriate JITCode class (either DFG::JITCode or
FTL::JITCode). And it allows us to have DFG and FTL share some common data,
via DFG::CommonData, which is stored in both DFG::JITCode and FTL::JITCode and
always accessible via JITCode::dfgCommon().

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
* bytecode/CodeBlock.cpp:
(JSC):
(JSC::CodeBlock::dumpBytecode):
(JSC::CodeBlock::visitAggregate):
(JSC::CodeBlock::performTracingFixpointIteration):
(JSC::CodeBlock::finalizeUnconditionally):
(JSC::CodeBlock::stronglyVisitWeakReferences):
(JSC::CodeBlock::shrinkToFit):
(JSC::CodeBlock::tallyFrequentExitSites):
* bytecode/CodeBlock.h:
(CodeBlock):
(JSC::CodeBlock::setJITCode):
(JSC::CodeBlock::shouldImmediatelyAssumeLivenessDuringScan):
(JSC::DFGCodeBlocks::mark):
* dfg/DFGAssemblyHelpers.h:
* dfg/DFGCommonData.cpp: Added.
(DFG):
(JSC::DFG::CommonData::notifyCompilingStructureTransition):
(JSC::DFG::CommonData::shrinkToFit):
* dfg/DFGCommonData.h: Added.
(JSC):
(DFG):
(JSC::DFG::WeakReferenceTransition::WeakReferenceTransition):
(WeakReferenceTransition):
(CommonData):
(JSC::DFG::CommonData::CommonData):
* dfg/DFGDriver.cpp:
(JSC::DFG::compile):
(JSC::DFG::tryCompile):
(JSC::DFG::tryCompileFunction):
* dfg/DFGDriver.h:
(DFG):
(JSC::DFG::tryCompile):
(JSC::DFG::tryCompileFunction):
* dfg/DFGGraph.h:
(Graph):
* dfg/DFGJITCode.cpp: Added.
(DFG):
(JSC::DFG::JITCode::JITCode):
(JSC::DFG::JITCode::~JITCode):
(JSC::DFG::JITCode::dfgCommon):
(JSC::DFG::JITCode::dfg):
(JSC::DFG::JITCode::shrinkToFit):
* dfg/DFGJITCode.h: Added.
(DFG):
(JITCode):
(JSC::DFG::JITCode::appendOSREntryData):
(JSC::DFG::JITCode::osrEntryDataForBytecodeIndex):
(JSC::DFG::JITCode::appendOSRExit):
(JSC::DFG::JITCode::lastOSRExit):
(JSC::DFG::JITCode::appendSpeculationRecovery):
(JSC::DFG::JITCode::appendWatchpoint):
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::JITCompiler):
(JSC::DFG::JITCompiler::linkOSRExits):
(JSC::DFG::JITCompiler::link):
(JSC::DFG::JITCompiler::compile):
(JSC::DFG::JITCompiler::compileFunction):
* dfg/DFGJITCompiler.h:
(JITCompiler):
(JSC::DFG::JITCompiler::addWeakReference):
(JSC::DFG::JITCompiler::noticeOSREntry):
(JSC::DFG::JITCompiler::jitCode):
* dfg/DFGOSREntry.cpp:
(JSC::DFG::prepareOSREntry):
* dfg/DFGOSRExit.h:
(OSRExit):
* dfg/DFGOSRExitCompiler.cpp:
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::SpeculativeJIT):
(JSC::DFG::SpeculativeJIT::backwardSpeculationCheck):
(JSC::DFG::SpeculativeJIT::speculationWatchpoint):
(JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGVariableEventStream.cpp:
* ftl/FTLCompile.cpp:
(JSC::FTL::compile):
* ftl/FTLJITCode.cpp:
(JSC::FTL::JITCode::JITCode):
(JSC::FTL::JITCode::~JITCode):
(FTL):
(JSC::FTL::JITCode::initializeCode):
(JSC::FTL::JITCode::addressForCall):
(JSC::FTL::JITCode::executableAddressAtOffset):
(JSC::FTL::JITCode::dataAddressAtOffset):
(JSC::FTL::JITCode::offsetOf):
(JSC::FTL::JITCode::size):
(JSC::FTL::JITCode::contains):
(JSC::FTL::JITCode::ftl):
(JSC::FTL::JITCode::dfgCommon):
* ftl/FTLJITCode.h:
(JITCode):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileStructureTransitionWatchpoint):
(JSC::FTL::LowerDFGToLLVM::compilePutStructure):
(JSC::FTL::LowerDFGToLLVM::compilePhantomPutStructure):
(JSC::FTL::LowerDFGToLLVM::addWeakReference):
(LowerDFGToLLVM):
(JSC::FTL::LowerDFGToLLVM::weakPointer):
* ftl/FTLState.cpp:
(FTL):
(JSC::FTL::State::State):
(JSC::FTL::State::dumpState):
* ftl/FTLState.h:
(State):
* heap/DFGCodeBlocks.cpp:
(JSC::DFGCodeBlocks::~DFGCodeBlocks):
(JSC::DFGCodeBlocks::jettison):
(JSC::DFGCodeBlocks::clearMarks):
(JSC::DFGCodeBlocks::deleteUnmarkedJettisonedCodeBlocks):
(JSC::DFGCodeBlocks::traceMarkedCodeBlocks):
* jit/JITCode.cpp:
(JSC::JITCode::dfgCommon):
(JSC):
(JSC::JITCode::dfg):
(JSC::JITCode::ftl):
(JSC::DirectJITCode::DirectJITCode):
(JSC::DirectJITCode::initializeCodeRef):
(JSC::DirectJITCode::addressForCall):
(JSC::DirectJITCode::executableAddressAtOffset):
(JSC::DirectJITCode::dataAddressAtOffset):
(JSC::DirectJITCode::offsetOf):
(JSC::DirectJITCode::size):
(JSC::DirectJITCode::contains):
* jit/JITCode.h:
(DFG):
(FTL):
(JSC):
(JITCode):
(DirectJITCode):

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

9 years agofourthTier: Everyone should know about the FTL
oliver@apple.com [Thu, 25 Jul 2013 03:58:16 +0000 (03:58 +0000)]
fourthTier: Everyone should know about the FTL
https://bugs.webkit.org/show_bug.cgi?id=113897

Reviewed by Mark Hahnenberg.

In order to get OSR exit to work right, we need the distinction between DFG and
FTL to be clear even after compilation finishes, since they will have subtly
different OSR stories and likely use different data structures.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::resetStubInternal):
(JSC::ProgramCodeBlock::compileOptimized):
(JSC::EvalCodeBlock::compileOptimized):
(JSC::FunctionCodeBlock::compileOptimized):
(JSC::CodeBlock::adjustedExitCountThreshold):
(JSC::CodeBlock::tallyFrequentExitSites):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::setJITCode):
(JSC::CodeBlock::hasOptimizedReplacement):
(JSC::ExecState::isInlineCallFrame):
* ftl/FTLCompile.cpp:
(JSC::FTL::compile):
* ftl/FTLJITCode.cpp:
(JSC::FTL::JITCode::JITCode):
* ftl/FTLState.cpp:
(JSC::FTL::State::dumpState):
* heap/DFGCodeBlocks.cpp:
(JSC::DFGCodeBlocks::jettison):
* interpreter/Interpreter.cpp:
(JSC::getLineNumberForCallFrame):
(JSC::getCallerInfo):
* jit/JITCode.cpp:
(WTF::printInternal):
* jit/JITCode.h:
(JSC::JITCode::topTierJIT):
(JSC::JITCode::nextTierJIT):
(JITCode):
(JSC::JITCode::isJIT):
(JSC::JITCode::isLowerTier):
(JSC::JITCode::isHigherTier):
(JSC::JITCode::isLowerOrSameTier):
(JSC::JITCode::isHigherOrSameTier):
(JSC::JITCode::isOptimizingJIT):
* jit/JITDriver.h:
(JSC::jitCompileIfAppropriate):
(JSC::jitCompileFunctionIfAppropriate):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* runtime/Executable.cpp:
(JSC::EvalExecutable::compileOptimized):
(JSC::samplingDescription):
(JSC::ProgramExecutable::compileOptimized):
(JSC::FunctionExecutable::compileOptimizedForCall):
(JSC::FunctionExecutable::compileOptimizedForConstruct):

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

9 years agofourthTier: DFG should abstract out how it does forward exits, and that code should...
oliver@apple.com [Thu, 25 Jul 2013 03:58:14 +0000 (03:58 +0000)]
fourthTier: DFG should abstract out how it does forward exits, and that code should be simplified
https://bugs.webkit.org/show_bug.cgi?id=113894

Reviewed by Mark Hahnenberg.

1) We previously had two different ways of convertingToForward, one path for
   where we had a ValueRecovery for the current node and one where we didn't.
   But the paths were doing exactly the same thing except that if you have a
   ValueRecovery, you also find the last applicable mov hint and do some
   extra things. This patch combines the two paths and bases both of them on
   the previous no-ValueRecovery path, which was simpler to begin with.

2) This moves the logic into DFG::OSRExit, which further simplifies the code
   and makes the logic available to the FTL.

* dfg/DFGOSRExit.cpp:
(JSC::DFG::OSRExit::convertToForward):
(DFG):
* dfg/DFGOSRExit.h:
(DFG):
(OSRExit):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward):

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

9 years agofourthTier: JITCode should abstract exactly how the JIT code is structured and where...
oliver@apple.com [Thu, 25 Jul 2013 03:58:12 +0000 (03:58 +0000)]
fourthTier: JITCode should abstract exactly how the JIT code is structured and where it was allocated
https://bugs.webkit.org/show_bug.cgi?id=113437

Reviewed by Mark Hahnenberg.

JITCode is now a virtual base class, which will allow different JITs to have radically
different memory allocation and management conventions in the future. It will also
make it easier to store JIT-specific meta-data in CodeBlock just by putting it into
an appropriate JITCode subclass.

For now there is one subclass, DirectJITCode, which just behaves like JITCode used to
behave.

* assembler/RepatchBuffer.h:
(JSC::RepatchBuffer::RepatchBuffer):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::resetStubInternal):
(JSC::CodeBlock::bytecodeOffset):
(JSC::CodeBlock::codeOriginForReturn):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::setJITCode):
(JSC::CodeBlock::getJITCode):
(JSC::CodeBlock::getJITType):
(CodeBlock):
* dfg/DFGDriver.cpp:
(JSC::DFG::compile):
(JSC::DFG::tryCompile):
(JSC::DFG::tryCompileFunction):
* dfg/DFGDriver.h:
(DFG):
(JSC::DFG::tryCompile):
(JSC::DFG::tryCompileFunction):
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::compile):
(JSC::DFG::JITCompiler::compileFunction):
* dfg/DFGJITCompiler.h:
(JITCompiler):
* dfg/DFGOSREntry.cpp:
(JSC::DFG::prepareOSREntry):
* dfg/DFGOSRExit.cpp:
(JSC::DFG::OSRExit::codeLocationForRepatch):
* dfg/DFGOSRExitCompiler32_64.cpp:
(JSC::DFG::OSRExitCompiler::compileExit):
* dfg/DFGOSRExitCompiler64.cpp:
(JSC::DFG::OSRExitCompiler::compileExit):
* dfg/DFGOperations.cpp:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
* jit/JIT.cpp:
(JSC::JIT::privateCompile):
* jit/JIT.h:
(JSC::JIT::compile):
(JIT):
* jit/JITCode.cpp:
(JSC):
(JSC::JITCode::JITCode):
(JSC::JITCode::~JITCode):
(JSC::JITCode::execute):
(JSC::JITCode::hostFunction):
(JSC::DirectJITCode::DirectJITCode):
(JSC::DirectJITCode::~DirectJITCode):
(JSC::DirectJITCode::addressForCall):
(JSC::DirectJITCode::executableAddressAtOffset):
(JSC::DirectJITCode::dataAddressAtOffset):
(JSC::DirectJITCode::offsetOf):
(JSC::DirectJITCode::size):
(JSC::DirectJITCode::contains):
* jit/JITCode.h:
(JSC):
(JITCode):
(JSC::JITCode::bottomTierJIT):
(JSC::JITCode::topTierJIT):
(JSC::JITCode::nextTierJIT):
(JSC::JITCode::isOptimizingJIT):
(JSC::JITCode::isBaselineCode):
(JSC::JITCode::jitType):
(JSC::JITCode::jitTypeFor):
(JSC::JITCode::executableAddress):
(JSC::JITCode::start):
(JSC::JITCode::end):
(DirectJITCode):
* jit/JITDriver.h:
(JSC::jitCompileIfAppropriate):
(JSC::jitCompileFunctionIfAppropriate):
* jit/JITStubs.cpp:
(JSC::lazyLinkFor):
(JSC::DEFINE_STUB_FUNCTION):
* jit/ThunkGenerators.cpp:
(JSC::virtualForGenerator):
* llint/LLIntEntrypoints.cpp:
(JSC::LLInt::getFunctionEntrypoint):
(JSC::LLInt::getEvalEntrypoint):
(JSC::LLInt::getProgramEntrypoint):
* llint/LLIntEntrypoints.h:
(JSC):
(LLInt):
(JSC::LLInt::getEntrypoint):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::jitCompileAndSetHeuristics):
(JSC::LLInt::entryOSR):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* runtime/Executable.cpp:
(JSC::EvalExecutable::compileInternal):
(JSC::ProgramExecutable::compileInternal):
(JSC::FunctionExecutable::compileForCallInternal):
(JSC::FunctionExecutable::compileForConstructInternal):
* runtime/Executable.h:
(JSC::ExecutableBase::generatedJITCodeForCall):
(JSC::ExecutableBase::generatedJITCodeForConstruct):
(JSC::ExecutableBase::generatedJITCodeFor):
(ExecutableBase):
(JSC::ExecutableBase::hostCodeEntryFor):
(JSC::ExecutableBase::jsCodeEntryFor):
(JSC::ExecutableBase::jsCodeWithArityCheckEntryFor):
(JSC::NativeExecutable::create):
(JSC::NativeExecutable::finishCreation):
(JSC::EvalExecutable::generatedJITCode):
(JSC::ProgramExecutable::generatedJITCode):
* runtime/ExecutionHarness.h:
(JSC::prepareForExecution):
(JSC::prepareFunctionForExecution):

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

9 years ago[iOS] Captions are clipped in documents using pagination
simon.fraser@apple.com [Thu, 25 Jul 2013 03:16:00 +0000 (03:16 +0000)]
[iOS] Captions are clipped in documents using pagination
https://bugs.webkit.org/show_bug.cgi?id=119072

Reviewed by Beth Dakin.

MediaControlTextTrackContainerElement::createTextTrackRepresentationImage() is called
to paint captions into a layer used for fullscreen video. It did the painting using
a subtree paint, but starting at the root RenderView's layer. This is problematic,
because the caption painting is subject to clipping for columns, and any enclosing
overflow:hidden container.

Fix this by starting the paint at the MediaControlTextTrackContainerElement's
renderer's layer. By doing this we don't have to worry about an offset, so no
translation is required.

Also make sure we update layer before grabbing the renderer (in case layout
destroys it).

* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):

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

9 years agoAdd DRT test to ensure don't override z-index for overflow: scroll, -webkit-overflow...
dbates@webkit.org [Thu, 25 Jul 2013 02:32:37 +0000 (02:32 +0000)]
Add DRT test to ensure don't override z-index for overflow: scroll, -webkit-overflow-scrolling: touch
https://bugs.webkit.org/show_bug.cgi?id=119071

Reviewed by Simon Fraser.

Add a DRT test to ensure we don't regress the fix for <https://bugs.webkit.org/show_bug.cgi?id=119066>.

* compositing/overflow/should-not-override-z-index-for-element-with-non-auto-z-index-and-overflow-scroll-and-touch-expected.txt: Added.
* compositing/overflow/should-not-override-z-index-for-element-with-non-auto-z-index-and-overflow-scroll-and-touch.html: Added.

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

9 years agoRename WebColorChooserProxy
ruth_fong@apple.com [Thu, 25 Jul 2013 01:08:30 +0000 (01:08 +0000)]
Rename WebColorChooserProxy
<rdar://problem/14528039> and https://bugs.webkit.org/show_bug.cgi?id=119025

Reviewed by Brady Eidson.

Renamed WebColorChooserProxy to WebColorPicker since the name WebColorChoooserProxy
implies that it represents the same object as WebColorChooser, which is not true.
Also, renamed createColorChooserProxy to createColorPicker in WebPageProxy and
platform-equivalent versions of it.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::createColorPicker):
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::createColorPicker):
* UIProcess/API/qt/raw/qrawwebview.cpp:
(QRawWebViewPrivate::createColorPicker):
* UIProcess/API/qt/raw/qrawwebview_p_p.h:
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::createColorPicker):
* UIProcess/CoordinatedGraphics/WebView.h:
* UIProcess/PageClient.h:
* UIProcess/WebColorChooserProxy.cpp: Removed.
* UIProcess/WebColorChooserProxy.h: Removed.
* UIProcess/WebColorPicker.cpp: Copied from Source/WebKit2/UIProcess/WebColorChooserProxy.cpp.
(WebKit::WebColorPicker::WebColorPicker):
(WebKit::WebColorPicker::~WebColorPicker):
(WebKit::WebColorPicker::endChooser):
(WebKit::WebColorPicker::setSelectedColor):
* UIProcess/WebColorPicker.h: Copied from Source/WebKit2/UIProcess/WebColorChooserProxy.h.
(WebKit::WebColorPicker::create):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::showColorChooser):
(WebKit::WebPageProxy::setColorChooserColor):
(WebKit::WebPageProxy::endColorChooser):
(WebKit::WebPageProxy::didEndColorChooser):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
* UIProcess/WebPageProxy.h: Renamed m_colorChooser to m_colorPicker.
* UIProcess/qt/QtPageClient.cpp:
(WebKit::QtPageClient::createColorPicker):
* UIProcess/qt/QtPageClient.h:
* UIProcess/qt/WebColorChooserProxyQt.cpp: Removed.
* UIProcess/qt/WebColorChooserProxyQt.h: Removed.
* UIProcess/qt/WebColorPickerQt.cpp: Added.
(WebKit::ColorChooserContextObject::ColorChooserContextObject):
(WebKit::ColorChooserContextObject::currentColor):
(WebKit::ColorChooserContextObject::elementRect):
(WebKit::ColorChooserContextObject::accept):
(WebKit::ColorChooserContextObject::reject):
(WebKit::WebColorPickerQt::WebColorPickerQt):
(WebKit::WebColorPickerQt::~WebColorPickerQt):
(WebKit::WebColorPickerQt::createItem):
(WebKit::WebColorPickerQt::createContext):
(WebKit::WebColorPickerQt::setSelectedColor):
(WebKit::WebColorPickerQt::notifyColorSelected):
(WebKit::WebColorPickerQt::endChooser):
* UIProcess/qt/WebColorPickerQt.h: Added.
(WebKit::WebColorPickerQt::create):
* WebKit2.xcodeproj/project.pbxproj:

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

9 years agoCrash when calling WKPageGetProcessIdentifier after aborted process launch
andersca@apple.com [Thu, 25 Jul 2013 00:57:19 +0000 (00:57 +0000)]
Crash when calling WKPageGetProcessIdentifier after aborted process launch
https://bugs.webkit.org/show_bug.cgi?id=119069
<rdar://problem/14494064>

Reviewed by Andreas Kling.

Source/WebKit2:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::processIdentifier):
Check if the page is closed instead of checking whether we have a process - We'll always have a process.

(WebKit::WebPageProxy::isValid):
Make this const.

* UIProcess/WebPageProxy.h:

Tools:

Add a test.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/mac/GetPIDAfterAbortedProcessLaunch.cpp: Added.
(TestWebKitAPI::didFinishLoadForFrame):
(TestWebKitAPI::TEST):

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

9 years ago[WK2][Soup] Add entry point for network process
kseo@webkit.org [Wed, 24 Jul 2013 22:46:46 +0000 (22:46 +0000)]
[WK2][Soup] Add entry point for network process
https://bugs.webkit.org/show_bug.cgi?id=110136

Reviewed by Gustavo Noronha Silva.

Original patch by Balazs Kelemen <kbalazs@webkit.org>.

Added a common entry point for non-Mac Unix ports.

* NetworkProcess/unix/NetworkProcessMainUnix.cpp: Added.
(WebKit::NetworkProcessMain):
* NetworkProcess/unix/NetworkProcessMainUnix.h: Added.
* unix/NetworkMainUnix.cpp: Added.
(main):

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

9 years agoREGRESSION (r152335): Mac Pro title occluded in MobileSafari; can't scroll page
simon.fraser@apple.com [Wed, 24 Jul 2013 22:45:19 +0000 (22:45 +0000)]
REGRESSION (r152335): Mac Pro title occluded in MobileSafari; can't scroll page
https://bugs.webkit.org/show_bug.cgi?id=119066
<rdar://problem/14499184>

Reviewed by Daniel Bates.

Following <http://trac.webkit.org/changeset/152335> (bug #118337) we set
the z-index to 0 on every element with CSS "overflow: scroll" and
"-webkit-overflow-scrolling: touch" regardless of whether the element has
non-auto z-index. Instead we should only set the z-index to 0 for such elements
that have an auto z-index.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):

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

9 years agoIt should be possible to hijack IndexingHeader for things other than lengths
fpizlo@apple.com [Wed, 24 Jul 2013 21:58:36 +0000 (21:58 +0000)]
It should be possible to hijack IndexingHeader for things other than lengths
https://bugs.webkit.org/show_bug.cgi?id=119065

Reviewed by Mark Hahnenberg.

Made the body of IndexingHeader be a union.

Modified the offlineasm so that you can say IndexingHeader::u.lengths.publicLength.
Previously those dots would cause parse errors. Now an identifier in offlineasm can
have a dot anywhere except the first character.

* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* offlineasm/parser.rb:
* runtime/IndexingHeader.h:
(JSC::IndexingHeader::offsetOfPublicLength):
(JSC::IndexingHeader::offsetOfVectorLength):
(JSC::IndexingHeader::IndexingHeader):
(JSC::IndexingHeader::vectorLength):
(JSC::IndexingHeader::setVectorLength):
(JSC::IndexingHeader::publicLength):
(JSC::IndexingHeader::setPublicLength):

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

9 years agoUse-after-free in ApplyStyleCommand::removeInlineStyle
rniwa@webkit.org [Wed, 24 Jul 2013 21:24:49 +0000 (21:24 +0000)]
Use-after-free in ApplyStyleCommand::removeInlineStyle
https://bugs.webkit.org/show_bug.cgi?id=118627

Reviewed by Oliver Hunt.

Merge https://chromium.googlesource.com/chromium/blink/+/b6471d077e012b05ccba14d0ce8e6d616106c8e6

Unfortunately, there is no test case for this bug.

* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::removeInlineStyle):

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

9 years agoGenerate derived files in ANGLE at build time rather than when updating from upstream.
achristensen@apple.com [Wed, 24 Jul 2013 21:21:09 +0000 (21:21 +0000)]
Generate derived files in ANGLE at build time rather than when updating from upstream.
https://bugs.webkit.org/show_bug.cgi?id=118872

Reviewed by Mark Rowe.

* ANGLE.xcodeproj/project.pbxproj: Made Derived Sources target which calls DerivedSources.make,
moved generated files into Derived Sources group.
* DerivedSources.make: Added.

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

9 years agoJIT::updateTopCallFrame doesn't update the CallFrame's bytecodeOffset if bytecodeOffs...
mhahnenberg@apple.com [Wed, 24 Jul 2013 19:56:57 +0000 (19:56 +0000)]
JIT::updateTopCallFrame doesn't update the CallFrame's bytecodeOffset if bytecodeOffset == 0
https://bugs.webkit.org/show_bug.cgi?id=118923

Reviewed by Filip Pizlo.

This bug causes the CallFrame's bytecodeOffset to not be properly set when we
enter, e.g., cti_optimize from an op_enter.

* jit/JITInlines.h:
(JSC::JIT::updateTopCallFrame):

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

9 years agoRemove WKPageGetPlugInInformation - it is not used anymore
jberlin@webkit.org [Wed, 24 Jul 2013 19:31:50 +0000 (19:31 +0000)]
Remove WKPageGetPlugInInformation - it is not used anymore
https://bugs.webkit.org/show_bug.cgi?id=119047

Reviewed by Alexey Proskuryakov.

Revert r151172, which fixed a crash introduced in r151043, r151054, which fixed some naming
and ref-churn issues introduced in r151043, and r151043, which added
WKPageGetPlugInInformation.

* UIProcess/API/C/mac/WKPagePrivateMac.cpp:
(WKPageIsURLKnownHSTSHost):
* UIProcess/API/C/mac/WKPagePrivateMac.h:
* UIProcess/Plugins/PluginProcessManager.h:
* UIProcess/Plugins/mac/PluginProcessManagerMac.mm:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::close):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/WebPageProxyMac.mm:
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/PDF/SimplePDFPlugin.h:
* WebProcess/Plugins/Plugin.h:
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginView.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:

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

9 years agoRemove CheckedInt, use Checked<T, RecordOverflow> instead
zandobersek@gmail.com [Wed, 24 Jul 2013 19:23:12 +0000 (19:23 +0000)]
Remove CheckedInt, use Checked<T, RecordOverflow> instead
https://bugs.webkit.org/show_bug.cgi?id=119022

Reviewed by Oliver Hunt.

Following the cleanup in r153062, the CheckedInt uses are replaced with
using the Checked<T, RecordOverflow> class. The CheckedInt header is not
used anywhere anymore and is thus removed.

* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:
* html/canvas/CheckedInt.h: Removed.
* html/canvas/DataView.cpp:
(WebCore::DataView::create):
* html/canvas/WebGLBuffer.cpp:
(WebCore::WebGLBuffer::associateBufferSubDataImpl):
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::drawArrays):

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

9 years agoRenderMenuList computes the width of its longest option twice.
akling@apple.com [Wed, 24 Jul 2013 19:11:44 +0000 (19:11 +0000)]
RenderMenuList computes the width of its longest option twice.
<http://webkit.org/b/119046>
<rdar://problem/14534679>

Reviewed by Darin Adler.

Rename the RenderMenuList::m_optionsChanged flag to m_needsOptionsWidthUpdate,
and make sure it gets cleared after we do a width computation in response to font changes.

* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::styleDidChange):

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

9 years agoMake KURL::hasPath private
zandobersek@gmail.com [Wed, 24 Jul 2013 19:03:30 +0000 (19:03 +0000)]
Make KURL::hasPath private
https://bugs.webkit.org/show_bug.cgi?id=118279

Reviewed by Darin Adler.

Source/WebCore:

* platform/KURL.h: The KURL::hasPath method is not used outside of the KURL class, so it is made private.

Tools:

* TestWebKitAPI/Tests/WebCore/KURL.cpp:
(TestWebKitAPI::TEST_F): Remove references to KURL::hasPath the method is now private and thus not accessible for testing.

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

9 years agoRemove WKPageGetPlugInInformation - it is not used anymore
jberlin@webkit.org [Wed, 24 Jul 2013 18:33:16 +0000 (18:33 +0000)]
Remove WKPageGetPlugInInformation - it is not used anymore
https://bugs.webkit.org/show_bug.cgi?id=119047

Rubber-stamped by Alexey Proskuryakov.

Revert r152328, which added a key used only in the callback info for
WKPageGetPlugInInformation.

Source/WebCore:

* WebCore.exp.in:

Source/WebKit2:

* Shared/API/c/WKPluginInformation.cpp:
* Shared/API/c/WKPluginInformation.h:
* Shared/Plugins/Netscape/PluginInformation.cpp:
* Shared/Plugins/Netscape/PluginInformation.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::containsPlugInCallback):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::containsPluginViewsWithPluginProcessToken):

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

9 years agoWeb Inspector: control+clicking on a numeric token should not show the context menu
graouts@apple.com [Wed, 24 Jul 2013 18:28:40 +0000 (18:28 +0000)]
Web Inspector: control+clicking on a numeric token should not show the context menu
https://bugs.webkit.org/show_bug.cgi?id=119048

Reviewed by Timothy Hatcher.

Track "contextmenu" events when we're hovering a token containing a numeric value
and call preventDefault() in the event handler to ensure that the context menu does
not appear.

* UserInterface/CodeMirrorDragToAlterNumberController.js:
(WebInspector.CodeMirrorDragToAlterNumberController.prototype.handleEvent):
(WebInspector.CodeMirrorDragToAlterNumberController.prototype._setTracksMouseClickAndDrag):

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

9 years agoBorder drawing incorrect when using both border-collapse: collapse and overflow:...
robert@webkit.org [Wed, 24 Jul 2013 18:02:13 +0000 (18:02 +0000)]
Border drawing incorrect when using both border-collapse: collapse and overflow: hidden on a table
https://bugs.webkit.org/show_bug.cgi?id=18305

Reviewed by David Hyatt.

Source/WebCore:

overflowClipRect() clips out the table's half of a collapsed border when there is an overflow clip
on the table. This prevents the table's half of the border ever getting painted.

To fix this, clip to the border box of tables when we're in the paint phase that gets the sections to draw the collapsed borders
or when we're self painting. This will allow the table's half of the border to get painted. In the case where the table is self
painting we ensure that content gets clipped to cell's side of the collapsed border by ensuring the clip passed to child layers
from the table clips to the inside of the collapsed border.

It's worth noting that a table's collapsed borders are painted by the table's layer using functions in
RenderTableSection and RenderTableCell. So if a table section has a self-painting layer this patch still works, because
the borders aren't painted by the section's layer.

Tests: fast/table/overflow-table-collapsed-borders-cell-painting-table-self-painting-layer.html
       fast/table/overflow-table-collapsed-borders-cell-painting.html
       fast/table/overflow-table-collapsed-borders-section-layer-painting.html
       fast/table/overflow-table-collapsed-borders-section-layer-table-self-painting-layer.html
       fast/table/overflow-table-collapsed-borders-section-self-painting-layer-painting.html
       fast/table/overflow-table-collapsed-borders-section-self-painting-layer-table-self-painting-layer.html
       fast/table/table-overflow.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::pushContentsClip):
(WebCore::RenderBox::overflowClipRect):
* rendering/RenderBox.h:
(WebCore::RenderBox::overflowClipRectForChildLayers):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::overflowClipRect):
* rendering/RenderTable.h:
(WebCore::RenderTable::overflowClipRectForChildLayers):

LayoutTests:

* fast/table/overflow-table-collapsed-borders-cell-painting-expected.png: Added.
* fast/table/overflow-table-collapsed-borders-cell-painting-expected.txt: Added.
* fast/table/overflow-table-collapsed-borders-cell-painting-table-self-painting-layer-expected.png: Added.
* fast/table/overflow-table-collapsed-borders-cell-painting-table-self-painting-layer-expected.txt: Added.
* fast/table/overflow-table-collapsed-borders-cell-painting-table-self-painting-layer.html: Added.
* fast/table/overflow-table-collapsed-borders-cell-painting.html: Added.
* fast/table/overflow-table-collapsed-borders-section-layer-painting-expected.png: Added.
* fast/table/overflow-table-collapsed-borders-section-layer-painting-expected.txt: Added.
* fast/table/overflow-table-collapsed-borders-section-layer-painting.html: Added.
* fast/table/overflow-table-collapsed-borders-section-layer-table-self-painting-layer-expected.png: Added.
* fast/table/overflow-table-collapsed-borders-section-layer-table-self-painting-layer-expected.txt: Added.
* fast/table/overflow-table-collapsed-borders-section-layer-table-self-painting-layer.html: Added.
* fast/table/overflow-table-collapsed-borders-section-self-painting-layer-painting-expected.png: Added.
* fast/table/overflow-table-collapsed-borders-section-self-painting-layer-painting-expected.txt: Added.
* fast/table/overflow-table-collapsed-borders-section-self-painting-layer-painting.html: Added.
* fast/table/overflow-table-collapsed-borders-section-self-painting-layer-table-self-painting-layer-expected.png: Added.
* fast/table/overflow-table-collapsed-borders-section-self-painting-layer-table-self-painting-layer-expected.txt: Added.
* fast/table/overflow-table-collapsed-borders-section-self-painting-layer-table-self-painting-layer.html: Added.
* fast/table/table-overflow-expected.html: Added.
* fast/table/table-overflow.html: Added.
* platform/qt/fast/table/overflowHidden-expected.txt:

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

9 years agoGraphical elements inside mphantom should not be visible.
commit-queue@webkit.org [Wed, 24 Jul 2013 17:12:15 +0000 (17:12 +0000)]
Graphical elements inside mphantom should not be visible.
https://bugs.webkit.org/show_bug.cgi?id=116600.

Patch by Frédéric Wang <fred.wang@free.fr> on 2013-07-24
Reviewed by Chris Fleizach.

Source/WebCore:

Test: mathml/presentation/phantom.html

* rendering/mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::paint): don't paint the fraction bar when the visibility is not "visible"
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::paint): don't paint the radical symbol when the visibility is not "visible"

LayoutTests:

* mathml/presentation/phantom-expected.html: Added.
* mathml/presentation/phantom.html: Added.

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

9 years agoWeb Inspector: support click-and-drag editing of CSS numeric values
graouts@apple.com [Wed, 24 Jul 2013 16:07:42 +0000 (16:07 +0000)]
Web Inspector: support click-and-drag editing of CSS numeric values
https://bugs.webkit.org/show_bug.cgi?id=118896

Reviewed by Timothy Hatcher.

Add support for adjustment of numeric values in the various CodeMirror editors
by holding the option key and dragging the mouse. By default, dragging one pixel
changes the value by 1, but key modifiers allow to customize that behavior by using
the control key to change the value to 0.1 and the shift key to change the value to 10.

* UserInterface/CodeMirrorAdditions.js:
Split adjustNumber() into two methods such that we may use its logic from the
CodeMirrorDragToAlterNumberController. The new method, CodeMirror.prototype.alterNumberInRange()
allow to set begin and end CodeMirror positions such that the existing alterNumber()
can use information based on the current cursor position, and CodeMirrorDragToAlterNumberController
can use information based on the hovered token.

* UserInterface/CodeMirrorDragToAlterNumberController.css: Added.
(.CodeMirror.drag-to-adjust .CodeMirror-lines):
Set the cursor to "col-resize" when a number token is hovered and the option key
modifier is pressed.

* UserInterface/CodeMirrorDragToAlterNumberController.js: Added.
(WebInspector.CodeMirrorDragToAlterNumberController):
We define the new "dragToAdjustNumbers" CodeMirror option.

(WebInspector.CodeMirrorDragToAlterNumberController.prototype.set enabled):
The "enabled" property controls whether the associated CodeMirror instance
may act upon hovering numeric values to adjust them via a drag interaction.

(WebInspector.CodeMirrorDragToAlterNumberController.prototype.handleEvent):
Proxy for various event-specific methods to deal with mouse events. We also bind
the value of the "active" property to the "mouseenter" and "mouseleave" events
if we're not currently dragging-to-adjust.

(WebInspector.CodeMirrorDragToAlterNumberController.prototype._setActive):
The "active" property is set when the mouse is over the associated CodeMirror
editor and when it's on we track all "mousemove" events such that we may
identify tokens containing numeric values. We also start tracking changes to the
option modifier key press state such that we may change the cursor accordingly.
We ensure that the CodeMirror instance is not read-only such that we don't
allow adjustment of numeric values in places where they couldn't be committed.

(WebInspector.CodeMirrorDragToAlterNumberController.prototype._setDragging):
The "dragging" property reflects whether a dragging-to-adjust interaction
is underway. We call into WebInspector.elementDragStart() and WebInspector.elementDragEnd()
to set the cursor to "col-resize" for the whole document while tracking mousemove
and mouseup events at the window level such that we can drag-to-adjust even outside
of the inspector window.

(WebInspector.CodeMirrorDragToAlterNumberController.prototype._setTracksMouseClickAndDrag):
The "tracksMouseClickAndDrag" property is set to true whenever the controller
has detected that a token containing a numeric value is being hovered and the
option modifier key is pressed. This property controls the cursor value for the
hovered token to reflect that a drag-to-adjust interaction is allowed and tracks
"mousedown" events for when a dragging interaction may be initiated.

(WebInspector.CodeMirrorDragToAlterNumberController.prototype._modifiersDidChange):
Sets the "tracksMouseClickAndDrag" property depending on the availability of a hovered
token containing a numeric value and the pressed state of the option modified key.

(WebInspector.CodeMirrorDragToAlterNumberController.prototype._mouseMoved):
Handles "mousemove" events when we're not in the "dragging" state such that we
check the currently hovered token, if any, to see if it contains a number that
we may drag-to-adjust. Subsequently, we may enter the "tracksMouseClickAndDrag"
state.

(WebInspector.CodeMirrorDragToAlterNumberController.prototype._mouseWasPressed):
Handles "mousedown" events during a drag-to-adjust interaction. We simply track
the current mouse position in the x-axis and enter the "dragging" state.

(WebInspector.CodeMirrorDragToAlterNumberController.prototype._mouseWasDragged):
Handles "mousemove" events when we are in the "dragging" state. We compare the
current mouse position in the x-axis with the last recoreded value and determine
the amount by which we should adjust the value, taking into account the shift and
control modifier keys. We then call into WebInspector.alterNumberInRange() to
apply the change amount to the associated CodeMirror editor.

(WebInspector.CodeMirrorDragToAlterNumberController.prototype._mouseWasReleased):
Handles "mouseup" events, simply exiting the "dragging" state and resetting other
parameters we would have customized as a result of the drag-to-adjust interaction.

(WebInspector.CodeMirrorDragToAlterNumberController.prototype._reset):
Resetting some parameters we would have customized as a result of the drag-to-adjust
interaction.

* UserInterface/Main.html:
Include the new CodeMirrorDragToAlterNumberController.{js|css} files.

* UserInterface/Main.js:
(WebInspector.elementDragStart):
(WebInspector.elementDragEnd):
Add an extra parameter to elementDragStart() such that the caller may specify the event
target for the "mousemove" and "mouseup" events.

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

9 years agoWebVTTParser's identifier buffering can ignore subsequent lines
commit-queue@webkit.org [Wed, 24 Jul 2013 15:44:51 +0000 (15:44 +0000)]
WebVTTParser's identifier buffering can ignore subsequent lines
https://bugs.webkit.org/show_bug.cgi?id=118483

Patch by Brendan Long <b.long@cablelabs.com> on 2013-07-24
Reviewed by Eric Carlson.

No new tests since this bug can't be reproduced in layout tests.

* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::parseBytes): Only buffer the identifier if we haven't read an entire line.

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

9 years ago[GTK] TestInspectorServer unit test is timing out
commit-queue@webkit.org [Wed, 24 Jul 2013 15:27:25 +0000 (15:27 +0000)]
[GTK] TestInspectorServer unit test is timing out
https://bugs.webkit.org/show_bug.cgi?id=105866

Patch by Anton Obzhirov <a.obzhirov@samsung.com> on 2013-07-24
Reviewed by Gustavo Noronha Silva.

Source/WebKit2:

The test failed because it couldn't find inspector resources in default folder
(make install step was missing). It uses now resources available in
WebKitBuild folder. WebInspectorServerGtk was refactored as well to make
easier to use WEBKIT_INSPECTOR_SERVER_PATH variable.

* UIProcess/API/gtk/tests/GNUmakefile.am:
* UIProcess/API/gtk/tests/InspectorTestServer.cpp:
(main):
* UIProcess/API/gtk/tests/TestInspectorServer.cpp:
(testInspectorServerPageList):
* UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
(WebKit::WebInspectorServer::platformResourceForPath):
(WebKit::WebInspectorServer::buildPageList):
(WebKit::WebInspectorServer::inspectorServerFilesPath):

Tools:

* Scripts/run-gtk-tests:
(TestRunner):

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

9 years ago[GTK] [WK2] Handle wheel event with delta zero
commit-queue@webkit.org [Wed, 24 Jul 2013 14:53:31 +0000 (14:53 +0000)]
[GTK] [WK2] Handle wheel event with delta zero
https://bugs.webkit.org/show_bug.cgi?id=118973

Patch by Anton Obzhirov <a.obzhirov@samsung.com> on 2013-07-24
Reviewed by Gustavo Noronha Silva.

Added handling of zero mouse scroll deltas in EventSenderProxy similar
to WK1 and Qt/EFL ports.

fast/events/platform-wheelevent-with-delta-zero-crash.html is no longer
failing on WK2.

* WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:
(WTR::EventSenderProxy::mouseScrollBy):

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

9 years ago[GTK] Unreviewed gardening. Add expectations for flaky test.
simon.pena@samsung.com [Wed, 24 Jul 2013 12:52:48 +0000 (12:52 +0000)]
[GTK] Unreviewed gardening. Add expectations for flaky test.

* platform/gtk/TestExpectations: Mark svg/stroke/non-scaling-stroke-pattern.svg
as flaky.

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

9 years agoUnreviewed. Setting the svn:eol-style=native property on the ANGLE.sln file.
zandobersek@gmail.com [Wed, 24 Jul 2013 11:34:46 +0000 (11:34 +0000)]
Unreviewed. Setting the svn:eol-style=native property on the ANGLE.sln file.

* src/ANGLE.sln: Added property svn:eol-style.

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

9 years ago[Qt] Buildfix after r153064. Add Uniform files to the Target.pri.
ossy@webkit.org [Wed, 24 Jul 2013 10:35:35 +0000 (10:35 +0000)]
[Qt] Buildfix after r153064. Add Uniform files to the Target.pri.

Patch by Gabor Abraham <abrhm@inf.u-szeged.hu> on 2013-07-24
Reviewed by Csaba Osztrogonác.

* Target.pri:

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

9 years ago[EFL][CMAKE] Fix wrong syntax about option commands
ryuan.choi@samsung.com [Wed, 24 Jul 2013 09:57:57 +0000 (09:57 +0000)]
[EFL][CMAKE] Fix wrong syntax about option commands
https://bugs.webkit.org/show_bug.cgi?id=119035

Reviewed by Christophe Dumez.

second argument of cmake option command should be description.

* Source/cmake/OptionsEfl.cmake: Added description instead of wrong initial value.

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

9 years ago[EFL] Unreviewed gardening
commit-queue@webkit.org [Wed, 24 Jul 2013 09:36:21 +0000 (09:36 +0000)]
[EFL] Unreviewed gardening
https://bugs.webkit.org/show_bug.cgi?id=118826

Unreviewed EFL gardening.

Patch by Seokju Kwon <seokju.kwon@gmail.com> on 2013-07-24

* platform/efl-wk2/TestExpectations: Update test expectations after r134890 and r139491.

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

9 years ago[GTK] Unreviewed gardening. Added expectations for flaky tests.
simon.pena@samsung.com [Wed, 24 Jul 2013 08:58:23 +0000 (08:58 +0000)]
[GTK] Unreviewed gardening. Added expectations for flaky tests.

* platform/gtk/TestExpectations: Marked animations/resume-after-page-cache.html,
css3/calc/img-size.html and perf/nested-combined-selectors.html as flaky.

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

9 years agoDFG string concatenation optimizations might emit speculative nodes after emitting...
fpizlo@apple.com [Wed, 24 Jul 2013 04:51:57 +0000 (04:51 +0000)]
DFG string concatenation optimizations might emit speculative nodes after emitting nodes that kill the original inputs
https://bugs.webkit.org/show_bug.cgi?id=119032

Reviewed by Oliver Hunt.

Source/JavaScriptCore:

It just needs some Phantom action.

* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::attemptToMakeFastStringAdd):

LayoutTests:

* fast/js/dfg-strcat-over-objects-then-exit-on-it-expected.txt: Added.
* fast/js/dfg-strcat-over-objects-then-exit-on-it.html: Added.
* fast/js/script-tests/dfg-strcat-over-objects-then-exit-on-it.js: Added.
(foo):
(bar):
(x):

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

9 years agoNeed ExpressionRangeInfo before ResolveForPuts in strict mode.
mark.lam@apple.com [Wed, 24 Jul 2013 01:10:02 +0000 (01:10 +0000)]
Need ExpressionRangeInfo before ResolveForPuts in strict mode.
https://bugs.webkit.org/show_bug.cgi?id=118997.

Reviewed by Oliver Hunt.

If we add an assertion in UnlinkedCodeBlock::expressionRangeForBytecodeOffset()
to ensure that we are able to find an ExpressionRangeInfo for any given bytecode
offset, the following tests will fails:
    fast/js/basic-strict-mode.html
    fast/js/mozilla/strict/8.7.2.html
With this fix, those tests will no longer fail.

* bytecompiler/NodesCodegen.cpp:
(JSC::AssignResolveNode::emitBytecode):
(JSC::ForInNode::emitBytecode):
- Emit expression info before calls to emitResolveBaseForPut() when in strict mode.

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

9 years agoAdded ExpressionRangeInfo for BinaryOpNodes that can throw exceptions
mark.lam@apple.com [Wed, 24 Jul 2013 00:56:52 +0000 (00:56 +0000)]
Added ExpressionRangeInfo for BinaryOpNodes that can throw exceptions
due to type coersion.
https://bugs.webkit.org/show_bug.cgi?id=116853.

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

* bytecompiler/NodesCodegen.cpp:
(JSC::BinaryOpNode::emitBytecode):
- Added expression info for the strcat and the general binary op cases.
  I did not add expression info for the "compare with null" case because
  that comparison cannot trigger type coersion, and hence it won't throw
  any exceptions and doesn't need the expression info.

LayoutTests:

Added the test case from bugzilla which exercises the general binary op
type coersion case, plus another for exercising the strcat case.

* fast/js/line-column-numbers-expected.txt:
* fast/js/line-column-numbers.html:
* fast/js/script-tests/line-column-numbers.js:

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

9 years agoREGRESSION(r150867): FrameView auto-sizing + delegate denied image load may cause...
akling@apple.com [Wed, 24 Jul 2013 00:53:57 +0000 (00:53 +0000)]
REGRESSION(r150867): FrameView auto-sizing + delegate denied image load may cause StyleResolver to re-enter itself.
<rdar://problem/14324895>
<http://webkit.org/b/119023>

Reviewed by Simon Fraser.

Source/WebCore:

The bug happened when FrameView::autoSizeIfEnabled() was getting called below FrameLoader::checkCompleted()
triggered by an incorrect loadDone() callback originating in SubresourceLoader::didCancel().

* css/StyleResolver.cpp:
(WebCore::StyleResolver::loadPendingResources):

    Add an assertion that this function is not getting re-entered. If a similar bug occurs
    in the future, this will help the lucky person debugging.

* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didCancel):

    Don't notifyDone() if the SubresourceLoader is in Uninitialized state.

Tools:

Add a test for this rather specific problem.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2ObjC/PreventImageLoadWithAutoResizing.mm: Added.
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit2ObjC/PreventImageLoadWithAutoResizing_Bundle.cpp: Added.
(TestWebKitAPI::DenyWillSendRequestTest::DenyWillSendRequestTest):
(TestWebKitAPI::DenyWillSendRequestTest::willSendRequestForFrame):
(TestWebKitAPI::DenyWillSendRequestTest::didCreatePage):

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

9 years agoRemoved unused sourceOffset from JSTokenLocation.
mark.lam@apple.com [Wed, 24 Jul 2013 00:41:46 +0000 (00:41 +0000)]
Removed unused sourceOffset from JSTokenLocation.
https://bugs.webkit.org/show_bug.cgi?id=118996.

Reviewed by Geoffrey Garen.

This also removes the assertion reported in the bug because it is now
moot, thereby resolving the assertion failure issue on Windows.

* bytecompiler/NodesCodegen.cpp:
(JSC::ArrayNode::toArgumentList):
(JSC::ApplyFunctionCallDotNode::emitBytecode):
* parser/Lexer.cpp:
(JSC::::lex):
* parser/Lexer.h:
(JSC::::lexExpectIdentifier):
* parser/Nodes.h:
* parser/Parser.cpp:
(JSC::::Parser):
(JSC::::parseFunctionInfo):
(JSC::::parseExpressionOrLabelStatement):
(JSC::::parseMemberExpression):
* parser/Parser.h:
(JSC::::parse):
* parser/ParserTokens.h:
(JSC::JSTokenLocation::JSTokenLocation):

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

9 years ago10.7: Java applets do not work due to sandbox violation/exception
commit-queue@webkit.org [Wed, 24 Jul 2013 00:35:36 +0000 (00:35 +0000)]
10.7: Java applets do not work due to sandbox violation/exception
https://bugs.webkit.org/show_bug.cgi?id=118920
<rdar://problem/14471541&12910934&14223830&14260729&14267679>

Patch by Simon Cooper <scooper@apple.com> on 2013-07-23
Reviewed by Alexey Proskuryakov.

Introduce versioning into the common profile and use it to fix
a number of issues with Java on 10.7 and 10.8. Allow writing the
com.apple.java.util.prefs preference file. This change also
introduces a "/Library/Application Support/Java/PublicFiles"
area which Java can read without any restrictions. Files written
to this location will need to be created and written to by
a privileged process.

* Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
* Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:

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

9 years agoPixel-snap the unavailable plugin indicator arrow for maximum sharpness
timothy_horton@apple.com [Tue, 23 Jul 2013 23:46:33 +0000 (23:46 +0000)]
Pixel-snap the unavailable plugin indicator arrow for maximum sharpness
https://bugs.webkit.org/show_bug.cgi?id=119024
<rdar://problem/14523331>

Reviewed by Anders Carlsson.

* rendering/RenderEmbeddedObject.cpp:
(WebCore::addReplacementArrowPath):
(WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
Pixel-snap the unavailable plugin indicator arrow. Snapping directions
were chosen by eye/symmetry to look best on 1x and 2x devices at
1x and 2x page scale.

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

9 years agoThe computed values of fix length padding should be subpixel precision like margin
rniwa@webkit.org [Tue, 23 Jul 2013 23:42:16 +0000 (23:42 +0000)]
The computed values of fix length padding should be subpixel precision like margin
https://bugs.webkit.org/show_bug.cgi?id=118936

Reviewed by Simon Fraser.

Source/WebCore:

The bug was caused by ComputedStyleExtractor::propertyValue always returning the used value
for padding. Fixed the bug by returning the computed value when they're of fixed length.

This aligns the behaviors of getComputedStyle(~).padding~ with getComputedStyle(~).margin~,
which had been fixed in r102149. While the current CSSOM specification says getComputedStyle
should return the used values for margins when display property is set to anything but none,
new behavior matches that of Chrome, Firefox, and Internet Explorer.

Also extracted zoomAdjustedPaddingOrMarginPixelValue to reduce the code duplication.

Test: fast/css/getComputedStyle/getComputedStyle-padding-margin-subpixel-length.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::zoomAdjustedPaddingOrMarginPixelValue): Extracted.
(WebCore::ComputedStyleExtractor::propertyValue):

LayoutTests:

Add a regression test for obtaining the computed values of floating point padding and margin.
They shouldn't be rounded to whole pixels.

* fast/css/getComputedStyle/getComputedStyle-padding-margin-subpixel-length-expected.txt: Added.
* fast/css/getComputedStyle/getComputedStyle-padding-margin-subpixel-length.html: Added.
* fast/shapes/shape-inside/shape-inside-shape-logical-top-expected.html: Use a different technique to detect
the subpixel layout since paddings

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

9 years agoSource/ThirdParty/ANGLE: Updated ANGLE to latest git commit (047373aa3eb408be62be52ad...
achristensen@apple.com [Tue, 23 Jul 2013 22:35:34 +0000 (22:35 +0000)]
Source/ThirdParty/ANGLE: Updated ANGLE to latest git commit (047373aa3eb408be62be52ade840fa5f11e72337).
Added missing ANGLE files except unused tests, extensions, samples, build, and .git directories.
Ran Bison after making some changes to fix compile errors (see below).

https://bugs.webkit.org/show_bug.cgi?id=118550

Reviewed by Dean Jackson.

* ANGLE.plist: Updated from svn to git.
* ANGLE.xcodeproj/project.pbxproj: Renamed DetectRecursion to DetectCallDepth.
* AUTHORS: Added.
* CONTRIBUTORS: Added.
* DEPS: Added.
* GNUmakefile.am: Renamed DetectRecursion to DetectCallDepth and added Uniform.cpp.
* LICENSE: Added.
* README.chromium: Added.
* Target.pri: Renamed DetectRecursion to DetectCallDepth.
* codereview.settings: Added.
* include/EGL/eglext.h:
* include/GLES2/gl2ext.h:
* include/GLSLANG/ShaderLang.h:
* src/ANGLE.sln: Added.
* src/build_angle.gyp: Added.
* src/build_angle.gypi: Added.
* src/common/RefCountObject.cpp:
* src/common/angleutils.h:
(ArraySize):
(SafeRelease):
* src/common/debug.cpp:
* src/common/debug.h:
* src/common/system.h:
* src/common/version.h:
* src/compiler/64bit-lexer-safety.patch: Added.
* src/compiler/BaseTypes.h:
(getQualifierString):
* src/compiler/CodeGenHLSL.cpp:
(ConstructCompiler):
* src/compiler/Common.h:
* src/compiler/Compiler.cpp:
(TCompiler::TCompiler):
(TCompiler::Init):
(TCompiler::compile):
(TCompiler::InitBuiltInSymbolTable):
(TCompiler::detectCallDepth):
(TCompiler::limitExpressionComplexity):
(TCompiler::getResources):
* src/compiler/ConstantUnion.h:
(ConstantUnion::ConstantUnion):
* src/compiler/DetectCallDepth.cpp: Added.
(DetectCallDepth::FunctionNode::FunctionNode):
(DetectCallDepth::FunctionNode::getName):
(DetectCallDepth::FunctionNode::addCallee):
(DetectCallDepth::FunctionNode::detectCallDepth):
(DetectCallDepth::FunctionNode::reset):
(DetectCallDepth::DetectCallDepth):
(DetectCallDepth::~DetectCallDepth):
(DetectCallDepth::visitAggregate):
(DetectCallDepth::checkExceedsMaxDepth):
(DetectCallDepth::resetFunctionNodes):
(DetectCallDepth::detectCallDepthForFunction):
(DetectCallDepth::detectCallDepth):
(DetectCallDepth::findFunctionByName):
* src/compiler/DetectCallDepth.h: Added.
(DetectCallDepth::getInfoSink):
* src/compiler/DetectRecursion.cpp: Removed.
* src/compiler/DetectRecursion.h: Removed.
* src/compiler/Diagnostics.cpp:
(TDiagnostics::writeInfo):
* src/compiler/ForLoopUnroll.cpp:
(ForLoopUnroll::evaluateIntConstant):
* src/compiler/InfoSink.cpp:
(TInfoSinkBase::prefix):
(TInfoSinkBase::location):
(TInfoSinkBase::message):
* src/compiler/InfoSink.h:
* src/compiler/Initialize.cpp:
(InsertBuiltInFunctions):
(IdentifyBuiltIns):
(InitExtensionBehavior):
* src/compiler/Initialize.h:
* src/compiler/Intermediate.cpp:
(TIntermediate::addSymbol):
(TIntermediate::addBinaryMath):
(TIntermediate::addAssign):
(TIntermediate::addIndex):
(TIntermediate::addUnaryMath):
(TIntermediate::setAggregateOperator):
(TIntermediate::addConversion):
(TIntermediate::growAggregate):
(TIntermediate::makeAggregate):
(TIntermediate::addSelection):
(TIntermediate::addComma):
(TIntermediate::addConstantUnion):
(TIntermediate::addSwizzle):
(TIntermediate::addLoop):
(TIntermediate::addBranch):
(TIntermUnary::promote):
(TIntermBinary::promote):
(CompareStruct):
(CompareStructure):
(TIntermConstantUnion::fold): Added implied static_casts to fix compiling errors on Mac.
(TIntermediate::promoteConstantUnion):
* src/compiler/OutputGLSL.cpp:
(TOutputGLSL::visitSymbol):
* src/compiler/OutputGLSL.h:
* src/compiler/OutputGLSLBase.cpp:
(TOutputGLSLBase::writeVariableType):
(TOutputGLSLBase::writeConstantUnion):
(TOutputGLSLBase::visitBinary):
(TOutputGLSLBase::visitAggregate):
(TOutputGLSLBase::getTypeName):
(TOutputGLSLBase::structDeclared):
(TOutputGLSLBase::declareStruct):
* src/compiler/OutputGLSLBase.h:
* src/compiler/OutputHLSL.cpp:
(sh::OutputHLSL::OutputHLSL):
(sh::OutputHLSL::getUniforms):
(sh::OutputHLSL::header):
(sh::OutputHLSL::visitSymbol):
(sh::OutputHLSL::visitBinary):
(sh::OutputHLSL::visitAggregate):
(sh::OutputHLSL::visitSelection):
(sh::OutputHLSL::visitLoop):
(sh::OutputHLSL::handleExcessiveLoop):
(sh::OutputHLSL::argumentString):
(sh::OutputHLSL::typeString):
(sh::OutputHLSL::textureString):
(sh::OutputHLSL::initializer):
(sh::OutputHLSL::addConstructor):
(sh::OutputHLSL::writeConstantUnion):
(sh::OutputHLSL::decorateUniform):
(sh::OutputHLSL::decorateField):
(sh::OutputHLSL::registerString):
(sh::OutputHLSL::samplerRegister):
(sh::OutputHLSL::uniformRegister):
(sh::OutputHLSL::declareUniform):
(sh::OutputHLSL::glVariableType):
(sh::OutputHLSL::glVariablePrecision):
* src/compiler/OutputHLSL.h:
* src/compiler/ParseHelper.cpp:
(TParseContext::parseVectorFields):
(TParseContext::parseMatrixFields):
(TParseContext::error):
(TParseContext::warning):
(TParseContext::assignError):
(TParseContext::unaryOpError):
(TParseContext::binaryOpError):
(TParseContext::precisionErrorCheck):
(TParseContext::lValueErrorCheck):
(TParseContext::globalErrorCheck):
(TParseContext::reservedErrorCheck):
(TParseContext::constructorErrorCheck):
(TParseContext::voidErrorCheck):
(TParseContext::boolErrorCheck):
(TParseContext::samplerErrorCheck):
(TParseContext::structQualifierErrorCheck):
(TParseContext::parameterSamplerErrorCheck):
(TParseContext::containsSampler):
(TParseContext::arraySizeErrorCheck):
(TParseContext::arrayQualifierErrorCheck):
(TParseContext::arrayTypeErrorCheck):
(TParseContext::arrayErrorCheck):
(TParseContext::nonInitConstErrorCheck):
(TParseContext::nonInitErrorCheck):
(TParseContext::paramErrorCheck):
(TParseContext::extensionErrorCheck):
(TParseContext::isExtensionEnabled):
Replaced auto with std::map<std::string, TBehavior>::const_iterator to fix Qt and EFL compiling errors.
(TParseContext::findFunction):
(TParseContext::executeInitializer):
(TParseContext::addConstructor):
(TParseContext::constructBuiltIn):
(TParseContext::constructStruct):
(TParseContext::addConstVectorNode):
(TParseContext::addConstMatrixNode):
(TParseContext::addConstArrayNode):
(TParseContext::addConstStruct):
(TParseContext::enterStructDeclaration):
(TParseContext::structNestingErrorCheck):
(TParseContext::addIndexExpression):
* src/compiler/ParseHelper.h:
(TParseContext::TParseContext):
(TParseContext::pragma):
* src/compiler/PoolAlloc.cpp:
(TPoolAllocator::allocate):
* src/compiler/ShHandle.h:
(TShHandleBase::getAsTranslatorHLSL):
* src/compiler/ShaderLang.cpp:
(ShInitBuiltInResources):
(ShGetInfoPointer):
* src/compiler/SymbolTable.cpp:
(TType::TType):
(TType::buildMangledName):
(TType::getObjectSize):
(TStructure::containsArrays):
(TStructure::buildMangledName):
(TStructure::calculateObjectSize):
(TStructure::calculateDeepestNesting):
(TSymbolTableLevel::relateToExtension):
* src/compiler/SymbolTable.h:
(TSymbol::relateToExtension):
(TSymbol::getExtension):
(TVariable::TVariable):
(TVariable::setQualifier):
(TVariable::shareConstPointer):
(TSymbolTableLevel::insert):
(TSymbolTable::insertConstInt):
(TSymbolTable::insertBuiltIn):
* src/compiler/TranslatorHLSL.cpp:
(TranslatorHLSL::TranslatorHLSL):
(TranslatorHLSL::translate):
* src/compiler/TranslatorHLSL.h:
(TranslatorHLSL::getAsTranslatorHLSL):
(TranslatorHLSL::getUniforms):
* src/compiler/Types.h: Removed enum bit fields to fix gcc compiler errors.
(TField::TField):
(TField::type):
(TField::name):
(NewPoolTFieldList):
(TStructure::TStructure):
(TStructure::name):
(TStructure::fields):
(TStructure::mangledName):
(TStructure::objectSize):
(TStructure::deepestNesting):
(TType::TType):
(TType::elementRegisterCount):
(TType::totalRegisterCount):
(TType::clearArrayness):
(TType::getStruct):
(TType::setStruct):
(TType::getMangledName):
(TType::getDeepestStructNesting):
(TType::isStructureContainingArrays):
(TPublicType::setBasic):
* src/compiler/Uniform.cpp: Added.
(sh::Uniform::Uniform):
* src/compiler/Uniform.h: Added.
* src/compiler/VariableInfo.cpp:
(getUserDefinedVariableInfo):
* src/compiler/glslang.l:
* src/compiler/glslang.y: Moved YYLTYPE definition into %union to work with Bison 2.3.
* src/compiler/glslang_lex.cpp:
(yy_get_previous_state):
(yy_try_NUL_trans):
(yyget_lloc):
(yyset_lloc):
(string_input):
(check_type):
(reserved_word):
(glslang_scan):
* src/compiler/glslang_tab.cpp:
(yyerror):
* src/compiler/glslang_tab.h:
* src/compiler/intermOut.cpp:
(TOutputTraverser::visitUnary):
(TOutputTraverser::visitAggregate):
(TOutputTraverser::visitConstantUnion):
* src/compiler/intermediate.h:
(TIntermNode::TIntermNode):
(TIntermNode::~TIntermNode):
(TIntermNode::getLine):
(TIntermNode::setLine):
(TIntermNode::getAsLoopNode):
(TIntermTyped::totalRegisterCount):
(TIntermTyped::elementRegisterCount):
(TIntermTyped::getArraySize):
(TIntermConstantUnion::getIConst):
(TIntermConstantUnion::getFConst):
(TIntermConstantUnion::getBConst):
(TIntermAggregate::TIntermAggregate):
(TIntermTraverser::TIntermTraverser):
(TIntermTraverser::getMaxDepth):
(TIntermTraverser::incrementDepth):
* src/compiler/localintermediate.h:
* src/compiler/parseConst.cpp:
(TConstTraverser::visitSymbol):
(TConstTraverser::visitBinary):
(TConstTraverser::visitUnary):
(TConstTraverser::visitAggregate):
(TConstTraverser::visitSelection):
(TConstTraverser::visitConstantUnion):
(TConstTraverser::visitLoop):
(TConstTraverser::visitBranch):
(TIntermediate::parseConstTree):
* src/compiler/preprocessor/64bit-tokenizer-safety.patch: Added.
* src/compiler/preprocessor/Tokenizer.cpp:
(yy_get_previous_state):
(yy_try_NUL_trans):
* src/compiler/preprocessor/Tokenizer.l:
* src/compiler/preprocessor/preprocessor.vcxproj: Added.
* src/compiler/preprocessor/preprocessor.vcxproj.filters: Added.
* src/compiler/timing/RestrictVertexShaderTiming.cpp:
(RestrictVertexShaderTiming::visitSymbol):
* src/compiler/translator_common.vcxproj: Added.
* src/compiler/translator_common.vcxproj.filters: Added.
* src/compiler/translator_hlsl.vcxproj: Added.
* src/compiler/translator_hlsl.vcxproj.filters: Added.
* src/libEGL/Config.cpp: Added.
(egl::Config::Config):
(egl::Config::getHandle):
(egl::SortConfig::SortConfig):
(egl::SortConfig::scanForWantedComponents):
(egl::SortConfig::wantedComponentsSize):
(egl::SortConfig::operator()):
(egl::ConfigSet::ConfigSet):
(egl::ConfigSet::add):
(egl::ConfigSet::size):
(egl::ConfigSet::getConfigs):
(egl::ConfigSet::get):
* src/libEGL/Config.h: Added.
* src/libEGL/Display.cpp: Added.
(egl::Display::getDisplay):
(egl::Display::Display):
(egl::Display::~Display):
(egl::Display::initialize):
(egl::Display::terminate):
(egl::Display::getConfigs):
(egl::Display::getConfigAttrib):
(egl::Display::createWindowSurface):
(egl::Display::createOffscreenSurface):
(egl::Display::createContext):
(egl::Display::restoreLostDevice):
(egl::Display::destroySurface):
(egl::Display::destroyContext):
(egl::Display::notifyDeviceLost):
(egl::Display::recreateSwapChains):
(egl::Display::isInitialized):
(egl::Display::isValidConfig):
(egl::Display::isValidContext):
(egl::Display::isValidSurface):
(egl::Display::hasExistingWindowSurface):
(egl::Display::initExtensionString):
(egl::Display::getExtensionString):
(egl::Display::initVendorString):
(egl::Display::getVendorString):
* src/libEGL/Display.h: Added.
(egl::Display::getRenderer):
* src/libEGL/Surface.cpp: Added.
(egl::Surface::Surface):
(egl::Surface::~Surface):
(egl::Surface::initialize):
(egl::Surface::release):
(egl::Surface::resetSwapChain):
(egl::Surface::resizeSwapChain):
(egl::Surface::swapRect):
(egl::Surface::getWindowHandle):
(egl::SurfaceWindowProc):
(egl::Surface::subclassWindow):
(egl::Surface::unsubclassWindow):
(egl::Surface::checkForOutOfDateSwapChain):
(egl::Surface::swap):
(egl::Surface::postSubBuffer):
(egl::Surface::getWidth):
(egl::Surface::getHeight):
(egl::Surface::isPostSubBufferSupported):
(egl::Surface::getSwapChain):
(egl::Surface::setSwapInterval):
(egl::Surface::getTextureFormat):
(egl::Surface::getTextureTarget):
(egl::Surface::setBoundTexture):
(egl::Surface::getBoundTexture):
(egl::Surface::getFormat):
* src/libEGL/Surface.h: Added.
* src/libEGL/libEGL.cpp: Added.
(validateDisplay):
(validateConfig):
(validateContext):
(validateSurface):
* src/libEGL/libEGL.def: Added.
* src/libEGL/libEGL.rc: Added.
* src/libEGL/libEGL.vcxproj: Added.
* src/libEGL/libEGL.vcxproj.filters: Added.
* src/libEGL/main.cpp: Added.
(DllMain):
(egl::setCurrentError):
(egl::getCurrentError):
(egl::setCurrentAPI):
(egl::getCurrentAPI):
(egl::setCurrentDisplay):
(egl::getCurrentDisplay):
(egl::setCurrentDrawSurface):
(egl::getCurrentDrawSurface):
(egl::setCurrentReadSurface):
(egl::getCurrentReadSurface):
(egl::error):
* src/libEGL/main.h: Added.
(egl::error):
(egl::success):
* src/libEGL/resource.h: Added.
* src/libGLESv2/BinaryStream.h: Added.
(gl::BinaryInputStream::BinaryInputStream):
(gl::BinaryInputStream::read):
(gl::BinaryInputStream::skip):
(gl::BinaryInputStream::offset):
(gl::BinaryInputStream::error):
(gl::BinaryInputStream::endOfStream):
(gl::BinaryOutputStream::BinaryOutputStream):
(gl::BinaryOutputStream::write):
(gl::BinaryOutputStream::length):
(gl::BinaryOutputStream::data):
* src/libGLESv2/Buffer.cpp: Added.
(gl::Buffer::Buffer):
(gl::Buffer::~Buffer):
(gl::Buffer::bufferData):
(gl::Buffer::bufferSubData):
(gl::Buffer::getStorage):
(gl::Buffer::size):
(gl::Buffer::usage):
(gl::Buffer::getStaticVertexBuffer):
(gl::Buffer::getStaticIndexBuffer):
(gl::Buffer::invalidateStaticData):
(gl::Buffer::promoteStaticUsage):
* src/libGLESv2/Buffer.h: Added.
* src/libGLESv2/Context.cpp: Added.
(gl::makeStaticString):
(gl::Context::Context):
(gl::Context::~Context):
(gl::Context::makeCurrent):
(gl::Context::markContextLost):
(gl::Context::isContextLost):
(gl::Context::setClearColor):
(gl::Context::setClearDepth):
(gl::Context::setClearStencil):
(gl::Context::setCullFace):
(gl::Context::isCullFaceEnabled):
(gl::Context::setCullMode):
(gl::Context::setFrontFace):
(gl::Context::setDepthTest):
(gl::Context::isDepthTestEnabled):
(gl::Context::setDepthFunc):
(gl::Context::setDepthRange):
(gl::Context::setBlend):
(gl::Context::isBlendEnabled):
(gl::Context::setBlendFactors):
(gl::Context::setBlendColor):
(gl::Context::setBlendEquation):
(gl::Context::setStencilTest):
(gl::Context::isStencilTestEnabled):
(gl::Context::setStencilParams):
(gl::Context::setStencilBackParams):
(gl::Context::setStencilWritemask):
(gl::Context::setStencilBackWritemask):
(gl::Context::setStencilOperations):
(gl::Context::setStencilBackOperations):
(gl::Context::setPolygonOffsetFill):
(gl::Context::isPolygonOffsetFillEnabled):
(gl::Context::setPolygonOffsetParams):
(gl::Context::setSampleAlphaToCoverage):
(gl::Context::isSampleAlphaToCoverageEnabled):
(gl::Context::setSampleCoverage):
(gl::Context::isSampleCoverageEnabled):
(gl::Context::setSampleCoverageParams):
(gl::Context::setScissorTest):
(gl::Context::isScissorTestEnabled):
(gl::Context::setDither):
(gl::Context::isDitherEnabled):
(gl::Context::setLineWidth):
(gl::Context::setGenerateMipmapHint):
(gl::Context::setFragmentShaderDerivativeHint):
(gl::Context::setViewportParams):
(gl::Context::setScissorParams):
(gl::Context::setColorMask):
(gl::Context::setDepthMask):
(gl::Context::setActiveSampler):
(gl::Context::getReadFramebufferHandle):
(gl::Context::getDrawFramebufferHandle):
(gl::Context::getRenderbufferHandle):
(gl::Context::getArrayBufferHandle):
(gl::Context::getActiveQuery):
(gl::Context::setEnableVertexAttribArray):
(gl::Context::getVertexAttribState):
(gl::Context::setVertexAttribState):
(gl::Context::getVertexAttribPointer):
(gl::Context::setPackAlignment):
(gl::Context::getPackAlignment):
(gl::Context::setUnpackAlignment):
(gl::Context::getUnpackAlignment):
(gl::Context::setPackReverseRowOrder):
(gl::Context::getPackReverseRowOrder):
(gl::Context::createBuffer):
(gl::Context::createProgram):
(gl::Context::createShader):
(gl::Context::createTexture):
(gl::Context::createRenderbuffer):
(gl::Context::createFramebuffer):
(gl::Context::createFence):
(gl::Context::createQuery):
(gl::Context::deleteBuffer):
(gl::Context::deleteShader):
(gl::Context::deleteProgram):
(gl::Context::deleteTexture):
(gl::Context::deleteRenderbuffer):
(gl::Context::deleteFramebuffer):
(gl::Context::deleteFence):
(gl::Context::deleteQuery):
(gl::Context::getBuffer):
(gl::Context::getShader):
(gl::Context::getProgram):
(gl::Context::getTexture):
(gl::Context::getRenderbuffer):
(gl::Context::getReadFramebuffer):
(gl::Context::getDrawFramebuffer):
(gl::Context::bindArrayBuffer):
(gl::Context::bindElementArrayBuffer):
(gl::Context::bindTexture2D):
(gl::Context::bindTextureCubeMap):
(gl::Context::bindReadFramebuffer):
(gl::Context::bindDrawFramebuffer):
(gl::Context::bindRenderbuffer):
(gl::Context::useProgram):
(gl::Context::linkProgram):
(gl::Context::setProgramBinary):
(gl::Context::beginQuery):
(gl::Context::endQuery):
(gl::Context::setFramebufferZero):
(gl::Context::setRenderbufferStorage):
(gl::Context::getFramebuffer):
(gl::Context::getFence):
(gl::Context::getQuery):
(gl::Context::getArrayBuffer):
(gl::Context::getElementArrayBuffer):
(gl::Context::getCurrentProgramBinary):
(gl::Context::getTexture2D):
(gl::Context::getTextureCubeMap):
(gl::Context::getSamplerTexture):
(gl::Context::getBooleanv):
(gl::Context::getFloatv):
(gl::Context::getIntegerv):
(gl::Context::getQueryParameterInfo):
(gl::Context::applyRenderTarget):
(gl::Context::applyState):
(gl::Context::applyShaders):
(gl::Context::applyTextures):
(gl::Context::readPixels):
(gl::Context::clear):
(gl::Context::drawArrays):
(gl::Context::drawElements):
(gl::Context::sync):
(gl::Context::recordInvalidEnum):
(gl::Context::recordInvalidValue):
(gl::Context::recordInvalidOperation):
(gl::Context::recordOutOfMemory):
(gl::Context::recordInvalidFramebufferOperation):
(gl::Context::getError):
(gl::Context::getResetStatus):
(gl::Context::isResetNotificationEnabled):
(gl::Context::getMajorShaderModel):
(gl::Context::getMaximumPointSize):
(gl::Context::getMaximumCombinedTextureImageUnits):
(gl::Context::getMaxSupportedSamples):
(gl::Context::getMaximumRenderTargets):
(gl::Context::supportsEventQueries):
(gl::Context::supportsOcclusionQueries):
(gl::Context::supportsBGRATextures):
(gl::Context::supportsDXT1Textures):
(gl::Context::supportsDXT3Textures):
(gl::Context::supportsDXT5Textures):
(gl::Context::supportsFloat32Textures):
(gl::Context::supportsFloat32LinearFilter):
(gl::Context::supportsFloat32RenderableTextures):
(gl::Context::supportsFloat16Textures):
(gl::Context::supportsFloat16LinearFilter):
(gl::Context::supportsFloat16RenderableTextures):
(gl::Context::getMaximumRenderbufferDimension):
(gl::Context::getMaximumTextureDimension):
(gl::Context::getMaximumCubeTextureDimension):
(gl::Context::getMaximumTextureLevel):
(gl::Context::supportsLuminanceTextures):
(gl::Context::supportsLuminanceAlphaTextures):
(gl::Context::supportsDepthTextures):
(gl::Context::supports32bitIndices):
(gl::Context::supportsNonPower2Texture):
(gl::Context::supportsInstancing):
(gl::Context::supportsTextureFilterAnisotropy):
(gl::Context::getTextureMaxAnisotropy):
(gl::Context::getCurrentReadFormatType):
(gl::Context::detachBuffer):
(gl::Context::detachTexture):
(gl::Context::detachFramebuffer):
(gl::Context::detachRenderbuffer):
(gl::Context::getIncompleteTexture):
(gl::Context::skipDraw):
(gl::Context::setVertexAttrib):
(gl::Context::setVertexAttribDivisor):
(gl::Context::initExtensionString):
(gl::Context::getExtensionString):
(gl::Context::initRendererString):
(gl::Context::getRendererString):
(gl::Context::blitFramebuffer):
* src/libGLESv2/Context.h: Added.
(gl::VertexAttribute::VertexAttribute):
(gl::VertexAttribute::typeSize):
(gl::VertexAttribute::stride):
* src/libGLESv2/Fence.cpp: Added.
(gl::Fence::Fence):
(gl::Fence::~Fence):
(gl::Fence::isFence):
(gl::Fence::setFence):
(gl::Fence::testFence):
(gl::Fence::finishFence):
(gl::Fence::getFenceiv):
* src/libGLESv2/Fence.h: Added.
* src/libGLESv2/Float16ToFloat32.cpp: Added.
(gl::float16ToFloat32):
* src/libGLESv2/Float16ToFloat32.py: Added.
(convertMantissa):
(convertExponent):
(convertOffset):
* src/libGLESv2/Framebuffer.cpp: Added.
(gl::Framebuffer::Framebuffer):
(gl::Framebuffer::~Framebuffer):
(gl::Framebuffer::lookupRenderbuffer):
(gl::Framebuffer::setColorbuffer):
(gl::Framebuffer::setDepthbuffer):
(gl::Framebuffer::setStencilbuffer):
(gl::Framebuffer::detachTexture):
(gl::Framebuffer::detachRenderbuffer):
(gl::Framebuffer::getRenderTargetSerial):
(gl::Framebuffer::getDepthbufferSerial):
(gl::Framebuffer::getStencilbufferSerial):
(gl::Framebuffer::getColorbuffer):
(gl::Framebuffer::getDepthbuffer):
(gl::Framebuffer::getStencilbuffer):
(gl::Framebuffer::getDepthOrStencilbuffer):
(gl::Framebuffer::getReadColorbuffer):
(gl::Framebuffer::getReadColorbufferType):
(gl::Framebuffer::getFirstColorbuffer):
(gl::Framebuffer::getColorbufferType):
(gl::Framebuffer::getDepthbufferType):
(gl::Framebuffer::getStencilbufferType):
(gl::Framebuffer::getColorbufferHandle):
(gl::Framebuffer::getDepthbufferHandle):
(gl::Framebuffer::getStencilbufferHandle):
(gl::Framebuffer::getDrawBufferState):
(gl::Framebuffer::setDrawBufferState):
(gl::Framebuffer::isEnabledColorAttachment):
(gl::Framebuffer::hasEnabledColorAttachment):
(gl::Framebuffer::hasStencil):
(gl::Framebuffer::usingExtendedDrawBuffers):
(gl::Framebuffer::completeness):
(gl::DefaultFramebuffer::DefaultFramebuffer):
(gl::Framebuffer::getSamples):
(gl::DefaultFramebuffer::completeness):
* src/libGLESv2/Framebuffer.h: Added.
* src/libGLESv2/HandleAllocator.cpp: Added.
(gl::HandleAllocator::HandleAllocator):
(gl::HandleAllocator::~HandleAllocator):
(gl::HandleAllocator::setBaseHandle):
(gl::HandleAllocator::allocate):
(gl::HandleAllocator::release):
* src/libGLESv2/HandleAllocator.h: Added.
* src/libGLESv2/Program.cpp: Added.
(gl::AttributeBindings::AttributeBindings):
(gl::AttributeBindings::~AttributeBindings):
(gl::InfoLog::InfoLog):
(gl::InfoLog::~InfoLog):
(gl::InfoLog::getLength):
(gl::InfoLog::getLog):
(gl::InfoLog::appendSanitized):
(gl::InfoLog::append):
(gl::InfoLog::reset):
(gl::Program::Program):
(gl::Program::~Program):
(gl::Program::attachShader):
(gl::Program::detachShader):
(gl::Program::getAttachedShadersCount):
(gl::AttributeBindings::bindAttributeLocation):
(gl::Program::bindAttributeLocation):
(gl::Program::link):
(gl::AttributeBindings::getAttributeBinding):
(gl::Program::unlink):
(gl::Program::isLinked):
(gl::Program::getProgramBinary):
(gl::Program::setProgramBinary):
(gl::Program::release):
(gl::Program::addRef):
(gl::Program::getRefCount):
(gl::Program::getProgramBinaryLength):
(gl::Program::getInfoLogLength):
(gl::Program::getInfoLog):
(gl::Program::getAttachedShaders):
(gl::Program::getActiveAttribute):
(gl::Program::getActiveAttributeCount):
(gl::Program::getActiveAttributeMaxLength):
(gl::Program::getActiveUniform):
(gl::Program::getActiveUniformCount):
(gl::Program::getActiveUniformMaxLength):
(gl::Program::flagForDeletion):
(gl::Program::isFlaggedForDeletion):
(gl::Program::validate):
(gl::Program::isValidated):
* src/libGLESv2/Program.h: Added.
* src/libGLESv2/ProgramBinary.cpp: Added.
(gl::str):
(gl::UniformLocation::UniformLocation):
(gl::ProgramBinary::ProgramBinary):
(gl::ProgramBinary::~ProgramBinary):
(gl::ProgramBinary::getSerial):
(gl::ProgramBinary::issueSerial):
(gl::ProgramBinary::getPixelExecutable):
(gl::ProgramBinary::getVertexExecutable):
(gl::ProgramBinary::getGeometryExecutable):
(gl::ProgramBinary::getAttributeLocation):
(gl::ProgramBinary::getSemanticIndex):
(gl::ProgramBinary::getUsedSamplerRange):
(gl::ProgramBinary::usesPointSize):
(gl::ProgramBinary::usesPointSpriteEmulation):
(gl::ProgramBinary::usesGeometryShader):
(gl::ProgramBinary::getSamplerMapping):
(gl::ProgramBinary::getSamplerTextureType):
(gl::ProgramBinary::getUniformLocation):
(gl::ProgramBinary::setUniform1fv):
(gl::ProgramBinary::setUniform2fv):
(gl::ProgramBinary::setUniform3fv):
(gl::ProgramBinary::setUniform4fv):
(gl::transposeMatrix):
(gl::ProgramBinary::setUniformMatrix2fv):
(gl::ProgramBinary::setUniformMatrix3fv):
(gl::ProgramBinary::setUniformMatrix4fv):
(gl::ProgramBinary::setUniform1iv):
(gl::ProgramBinary::setUniform2iv):
(gl::ProgramBinary::setUniform3iv):
(gl::ProgramBinary::setUniform4iv):
(gl::ProgramBinary::getUniformfv):
(gl::ProgramBinary::getUniformiv):
(gl::ProgramBinary::dirtyAllUniforms):
(gl::ProgramBinary::applyUniforms):
(gl::ProgramBinary::packVaryings):
(gl::ProgramBinary::linkVaryings):
(gl::ProgramBinary::load):
(gl::ProgramBinary::save):
(gl::ProgramBinary::getLength):
(gl::ProgramBinary::link):
(gl::ProgramBinary::linkAttributes):
(gl::ProgramBinary::linkUniforms):
(gl::ProgramBinary::defineUniform):
(gl::ProgramBinary::generateGeometryShaderHLSL):
(gl::ProgramBinary::generatePointSpriteHLSL):
(gl::ProgramBinary::decorateAttribute):
(gl::ProgramBinary::isValidated):
(gl::ProgramBinary::getActiveAttribute):
(gl::ProgramBinary::getActiveAttributeCount):
(gl::ProgramBinary::getActiveAttributeMaxLength):
(gl::ProgramBinary::getActiveUniform):
(gl::ProgramBinary::getActiveUniformCount):
(gl::ProgramBinary::getActiveUniformMaxLength):
(gl::ProgramBinary::validate):
(gl::ProgramBinary::validateSamplers):
(gl::ProgramBinary::Sampler::Sampler):
(gl::AttributeSorter::AttributeSorter):
(gl::AttributeSorter::operator()):
(gl::ProgramBinary::sortAttributesByLayout):
* src/libGLESv2/ProgramBinary.h: Added.
(gl::UniformLocation::UniformLocation):
* src/libGLESv2/Query.cpp: Added.
(gl::Query::Query):
(gl::Query::~Query):
(gl::Query::begin):
(gl::Query::end):
(gl::Query::getResult):
(gl::Query::isResultAvailable):
(gl::Query::getType):
* src/libGLESv2/Query.h: Added.
* src/libGLESv2/Renderbuffer.cpp: Added.
(gl::RenderbufferInterface::RenderbufferInterface):
(gl::RenderbufferInterface::addProxyRef):
(gl::RenderbufferInterface::releaseProxy):
(gl::RenderbufferInterface::getRedSize):
(gl::RenderbufferInterface::getGreenSize):
(gl::RenderbufferInterface::getBlueSize):
(gl::RenderbufferInterface::getAlphaSize):
(gl::RenderbufferInterface::getDepthSize):
(gl::RenderbufferInterface::getStencilSize):
(gl::RenderbufferTexture2D::RenderbufferTexture2D):
(gl::RenderbufferTexture2D::~RenderbufferTexture2D):
(gl::RenderbufferTexture2D::addProxyRef):
(gl::RenderbufferTexture2D::releaseProxy):
(gl::RenderbufferTexture2D::getRenderTarget):
(gl::RenderbufferTexture2D::getDepthStencil):
(gl::RenderbufferTexture2D::getWidth):
(gl::RenderbufferTexture2D::getHeight):
(gl::RenderbufferTexture2D::getInternalFormat):
(gl::RenderbufferTexture2D::getActualFormat):
(gl::RenderbufferTexture2D::getSamples):
(gl::RenderbufferTexture2D::getSerial):
(gl::RenderbufferTextureCubeMap::RenderbufferTextureCubeMap):
(gl::RenderbufferTextureCubeMap::~RenderbufferTextureCubeMap):
(gl::RenderbufferTextureCubeMap::addProxyRef):
(gl::RenderbufferTextureCubeMap::releaseProxy):
(gl::RenderbufferTextureCubeMap::getRenderTarget):
(gl::RenderbufferTextureCubeMap::getDepthStencil):
(gl::RenderbufferTextureCubeMap::getWidth):
(gl::RenderbufferTextureCubeMap::getHeight):
(gl::RenderbufferTextureCubeMap::getInternalFormat):
(gl::RenderbufferTextureCubeMap::getActualFormat):
(gl::RenderbufferTextureCubeMap::getSamples):
(gl::RenderbufferTextureCubeMap::getSerial):
(gl::Renderbuffer::Renderbuffer):
(gl::Renderbuffer::~Renderbuffer):
(gl::Renderbuffer::addRef):
(gl::Renderbuffer::release):
(gl::Renderbuffer::getRenderTarget):
(gl::Renderbuffer::getDepthStencil):
(gl::Renderbuffer::getWidth):
(gl::Renderbuffer::getHeight):
(gl::Renderbuffer::getInternalFormat):
(gl::Renderbuffer::getActualFormat):
(gl::Renderbuffer::getRedSize):
(gl::Renderbuffer::getGreenSize):
(gl::Renderbuffer::getBlueSize):
(gl::Renderbuffer::getAlphaSize):
(gl::Renderbuffer::getDepthSize):
(gl::Renderbuffer::getStencilSize):
(gl::Renderbuffer::getSamples):
(gl::Renderbuffer::getSerial):
(gl::Renderbuffer::setStorage):
(gl::RenderbufferStorage::RenderbufferStorage):
(gl::RenderbufferStorage::~RenderbufferStorage):
(gl::RenderbufferStorage::getRenderTarget):
(gl::RenderbufferStorage::getDepthStencil):
(gl::RenderbufferStorage::getWidth):
(gl::RenderbufferStorage::getHeight):
(gl::RenderbufferStorage::getInternalFormat):
(gl::RenderbufferStorage::getActualFormat):
(gl::RenderbufferStorage::getSamples):
(gl::RenderbufferStorage::getSerial):
(gl::RenderbufferStorage::issueSerial):
(gl::RenderbufferStorage::issueCubeSerials):
(gl::Colorbuffer::Colorbuffer):
(gl::Colorbuffer::~Colorbuffer):
(gl::Colorbuffer::getRenderTarget):
(gl::DepthStencilbuffer::DepthStencilbuffer):
(gl::DepthStencilbuffer::~DepthStencilbuffer):
(gl::DepthStencilbuffer::getDepthStencil):
(gl::Depthbuffer::Depthbuffer):
(gl::Depthbuffer::~Depthbuffer):
(gl::Stencilbuffer::Stencilbuffer):
(gl::Stencilbuffer::~Stencilbuffer):
* src/libGLESv2/Renderbuffer.h: Added.
(gl::RenderbufferInterface::~RenderbufferInterface):
* src/libGLESv2/ResourceManager.cpp: Added.
(gl::ResourceManager::ResourceManager):
(gl::ResourceManager::~ResourceManager):
(gl::ResourceManager::addRef):
(gl::ResourceManager::release):
(gl::ResourceManager::createBuffer):
(gl::ResourceManager::createShader):
(gl::ResourceManager::createProgram):
(gl::ResourceManager::createTexture):
(gl::ResourceManager::createRenderbuffer):
(gl::ResourceManager::deleteBuffer):
(gl::ResourceManager::deleteShader):
(gl::ResourceManager::deleteProgram):
(gl::ResourceManager::deleteTexture):
(gl::ResourceManager::deleteRenderbuffer):
(gl::ResourceManager::getBuffer):
(gl::ResourceManager::getShader):
(gl::ResourceManager::getTexture):
(gl::ResourceManager::getProgram):
(gl::ResourceManager::getRenderbuffer):
(gl::ResourceManager::setRenderbuffer):
(gl::ResourceManager::checkBufferAllocation):
(gl::ResourceManager::checkTextureAllocation):
(gl::ResourceManager::checkRenderbufferAllocation):
* src/libGLESv2/ResourceManager.h: Added.
* src/libGLESv2/Shader.cpp: Added.
(gl::Shader::Shader):
(gl::Shader::~Shader):
(gl::Shader::getHandle):
(gl::Shader::setSource):
(gl::Shader::getInfoLogLength):
(gl::Shader::getInfoLog):
(gl::Shader::getSourceLength):
(gl::Shader::getTranslatedSourceLength):
(gl::Shader::getSourceImpl):
(gl::Shader::getSource):
(gl::Shader::getTranslatedSource):
(gl::Shader::getUniforms):
(gl::Shader::isCompiled):
(gl::Shader::getHLSL):
(gl::Shader::addRef):
(gl::Shader::release):
(gl::Shader::getRefCount):
(gl::Shader::isFlaggedForDeletion):
(gl::Shader::flagForDeletion):
(gl::Shader::initializeCompiler):
(gl::Shader::releaseCompiler):
(gl::Shader::parseVaryings):
(gl::Shader::resetVaryingsRegisterAssignment):
(gl::Shader::uncompile):
(gl::Shader::compileToHLSL):
(gl::Shader::parseType):
(gl::Shader::compareVarying):
(gl::VertexShader::VertexShader):
(gl::VertexShader::~VertexShader):
(gl::VertexShader::getType):
(gl::VertexShader::uncompile):
(gl::VertexShader::compile):
(gl::VertexShader::getSemanticIndex):
(gl::VertexShader::parseAttributes):
(gl::FragmentShader::FragmentShader):
(gl::FragmentShader::~FragmentShader):
(gl::FragmentShader::getType):
(gl::FragmentShader::compile):
* src/libGLESv2/Shader.h: Added.
(gl::Varying::Varying):
(gl::Attribute::Attribute):
* src/libGLESv2/Texture.cpp: Added.
(gl::Texture::Texture):
(gl::Texture::~Texture):
(gl::Texture::setMinFilter):
(gl::Texture::setMagFilter):
(gl::Texture::setWrapS):
(gl::Texture::setWrapT):
(gl::Texture::setMaxAnisotropy):
(gl::Texture::setUsage):
(gl::Texture::getMinFilter):
(gl::Texture::getMagFilter):
(gl::Texture::getWrapS):
(gl::Texture::getWrapT):
(gl::Texture::getMaxAnisotropy):
(gl::Texture::getLodOffset):
(gl::Texture::getSamplerState):
(gl::Texture::getUsage):
(gl::Texture::isMipmapFiltered):
(gl::Texture::setImage):
(gl::Texture::setCompressedImage):
(gl::Texture::subImage):
(gl::Texture::subImageCompressed):
(gl::Texture::getNativeTexture):
(gl::Texture::hasDirtyImages):
(gl::Texture::resetDirty):
(gl::Texture::getTextureSerial):
(gl::Texture::getRenderTargetSerial):
(gl::Texture::isImmutable):
(gl::Texture::creationLevels):
(gl::Texture2D::Texture2D):
(gl::Texture2D::~Texture2D):
(gl::Texture2D::addProxyRef):
(gl::Texture2D::releaseProxy):
(gl::Texture2D::getTarget):
(gl::Texture2D::getWidth):
(gl::Texture2D::getHeight):
(gl::Texture2D::getInternalFormat):
(gl::Texture2D::getActualFormat):
(gl::Texture2D::redefineImage):
(gl::Texture2D::setImage):
(gl::Texture2D::bindTexImage):
(gl::Texture2D::releaseTexImage):
(gl::Texture2D::setCompressedImage):
(gl::Texture2D::commitRect):
(gl::Texture2D::subImage):
(gl::Texture2D::subImageCompressed):
(gl::Texture2D::copyImage):
(gl::Texture2D::copySubImage):
(gl::Texture2D::storage):
(gl::Texture2D::isSamplerComplete):
(gl::Texture2D::isMipmapComplete):
(gl::Texture2D::isCompressed):
(gl::Texture2D::isDepth):
(gl::Texture2D::createTexture):
(gl::Texture2D::updateTexture):
(gl::Texture2D::convertToRenderTarget):
(gl::Texture2D::generateMipmaps):
(gl::Texture2D::getRenderbuffer):
(gl::Texture2D::getRenderTarget):
(gl::Texture2D::getDepthStencil):
(gl::Texture2D::levelCount):
(gl::Texture2D::getStorage):
(gl::TextureCubeMap::TextureCubeMap):
(gl::TextureCubeMap::~TextureCubeMap):
(gl::TextureCubeMap::addProxyRef):
(gl::TextureCubeMap::releaseProxy):
(gl::TextureCubeMap::getTarget):
(gl::TextureCubeMap::getWidth):
(gl::TextureCubeMap::getHeight):
(gl::TextureCubeMap::getInternalFormat):
(gl::TextureCubeMap::getActualFormat):
(gl::TextureCubeMap::setImagePosX):
(gl::TextureCubeMap::setImageNegX):
(gl::TextureCubeMap::setImagePosY):
(gl::TextureCubeMap::setImageNegY):
(gl::TextureCubeMap::setImagePosZ):
(gl::TextureCubeMap::setImageNegZ):
(gl::TextureCubeMap::setCompressedImage):
(gl::TextureCubeMap::commitRect):
(gl::TextureCubeMap::subImage):
(gl::TextureCubeMap::subImageCompressed):
(gl::TextureCubeMap::isSamplerComplete):
(gl::TextureCubeMap::isCubeComplete):
(gl::TextureCubeMap::isMipmapCubeComplete):
(gl::TextureCubeMap::isCompressed):
(gl::TextureCubeMap::createTexture):
(gl::TextureCubeMap::updateTexture):
(gl::TextureCubeMap::convertToRenderTarget):
(gl::TextureCubeMap::setImage):
(gl::TextureCubeMap::faceIndex):
(gl::TextureCubeMap::redefineImage):
(gl::TextureCubeMap::copyImage):
(gl::TextureCubeMap::copySubImage):
(gl::TextureCubeMap::storage):
(gl::TextureCubeMap::generateMipmaps):
(gl::TextureCubeMap::getRenderbuffer):
(gl::TextureCubeMap::getRenderTarget):
(gl::TextureCubeMap::levelCount):
(gl::TextureCubeMap::getStorage):
* src/libGLESv2/Texture.h: Added.
* src/libGLESv2/Uniform.cpp: Added.
(gl::Uniform::Uniform):
(gl::Uniform::~Uniform):
(gl::Uniform::isArray):
(gl::Uniform::elementCount):
* src/libGLESv2/Uniform.h: Added.
* src/libGLESv2/angletypes.h: Added.
* src/libGLESv2/constants.h: Added.
* src/libGLESv2/libGLESv2.cpp: Added.
(validImageSize):
(checkTextureFormatType):
(validateSubImageParams2D):
(validateSubImageParamsCube):
(validReadFormatType):
* src/libGLESv2/libGLESv2.def: Added.
* src/libGLESv2/libGLESv2.rc: Added.
* src/libGLESv2/libGLESv2.vcxproj: Added.
* src/libGLESv2/libGLESv2.vcxproj.filters: Added.
* src/libGLESv2/main.cpp: Added.
(DllMain):
(gl::makeCurrent):
(gl::getContext):
(gl::getNonLostContext):
(gl::getDisplay):
(gl::error):
* src/libGLESv2/main.h: Added.
(gl::error):
* src/libGLESv2/mathutil.h: Added.
(gl::Vector4::Vector4):
(gl::isPow2):
(gl::log2):
(gl::ceilPow2):
(gl::clamp):
(gl::clamp01):
(gl::unorm):
(gl::supportsSSE2):
(gl::float32ToFloat16):
(rx::Range::Range):
* src/libGLESv2/precompiled.cpp: Added.
* src/libGLESv2/precompiled.h: Added.
* src/libGLESv2/renderer: Added.
* src/libGLESv2/renderer/Blit.cpp: Added.
(rx::Blit::Blit):
(rx::Blit::~Blit):
(rx::Blit::initGeometry):
(rx::Blit::setShader):
(rx::Blit::setVertexShader):
(rx::Blit::setPixelShader):
(rx::Blit::getSurfaceRect):
(rx::Blit::boxFilter):
(rx::Blit::copy):
(rx::Blit::formatConvert):
(rx::Blit::setFormatConvertShaders):
(rx::Blit::copySurfaceToTexture):
(rx::Blit::setViewport):
(rx::Blit::setCommonBlitState):
(rx::Blit::render):
(rx::Blit::saveState):
(rx::Blit::restoreState):
* src/libGLESv2/renderer/Blit.h: Added.
* src/libGLESv2/renderer/BufferStorage.cpp: Added.
(rx::BufferStorage::BufferStorage):
(rx::BufferStorage::~BufferStorage):
(rx::BufferStorage::getSerial):
(rx::BufferStorage::updateSerial):
(rx::BufferStorage::markBufferUsage):
* src/libGLESv2/renderer/BufferStorage.h: Added.
* src/libGLESv2/renderer/BufferStorage11.cpp: Added.
(rx::BufferStorage11::BufferStorage11):
(rx::BufferStorage11::~BufferStorage11):
(rx::BufferStorage11::makeBufferStorage11):
(rx::BufferStorage11::getData):
(rx::BufferStorage11::setData):
(rx::BufferStorage11::clear):
(rx::BufferStorage11::getSize):
(rx::BufferStorage11::supportsDirectBinding):
(rx::BufferStorage11::markBufferUsage):
(rx::BufferStorage11::getBuffer):
* src/libGLESv2/renderer/BufferStorage11.h: Added.
* src/libGLESv2/renderer/BufferStorage9.cpp: Added.
(rx::BufferStorage9::BufferStorage9):
(rx::BufferStorage9::~BufferStorage9):
(rx::BufferStorage9::makeBufferStorage9):
(rx::BufferStorage9::getData):
(rx::BufferStorage9::setData):
(rx::BufferStorage9::clear):
(rx::BufferStorage9::getSize):
(rx::BufferStorage9::supportsDirectBinding):
* src/libGLESv2/renderer/BufferStorage9.h: Added.
* src/libGLESv2/renderer/Fence11.cpp: Added.
(rx::Fence11::Fence11):
(rx::Fence11::~Fence11):
(rx::Fence11::isFence):
(rx::Fence11::setFence):
(rx::Fence11::testFence):
(rx::Fence11::finishFence):
(rx::Fence11::getFenceiv):
* src/libGLESv2/renderer/Fence11.h: Added.
* src/libGLESv2/renderer/Fence9.cpp: Added.
(rx::Fence9::Fence9):
(rx::Fence9::~Fence9):
(rx::Fence9::isFence):
(rx::Fence9::setFence):
(rx::Fence9::testFence):
(rx::Fence9::finishFence):
(rx::Fence9::getFenceiv):
* src/libGLESv2/renderer/Fence9.h: Added.
* src/libGLESv2/renderer/FenceImpl.h: Added.
(rx::FenceImpl::FenceImpl):
(rx::FenceImpl::~FenceImpl):
(rx::FenceImpl::setStatus):
(rx::FenceImpl::getStatus):
(rx::FenceImpl::setCondition):
(rx::FenceImpl::getCondition):
* src/libGLESv2/renderer/Image.cpp: Added.
(rx::Image::Image):
(rx::Image::loadAlphaDataToBGRA):
(rx::Image::loadAlphaDataToNative):
(rx::Image::loadAlphaFloatDataToRGBA):
(rx::Image::loadAlphaHalfFloatDataToRGBA):
(rx::Image::loadLuminanceDataToNativeOrBGRA):
(rx::Image::loadLuminanceFloatDataToRGBA):
(rx::Image::loadLuminanceFloatDataToRGB):
(rx::Image::loadLuminanceHalfFloatDataToRGBA):
(rx::Image::loadLuminanceAlphaDataToNativeOrBGRA):
(rx::Image::loadLuminanceAlphaFloatDataToRGBA):
(rx::Image::loadLuminanceAlphaHalfFloatDataToRGBA):
(rx::Image::loadRGBUByteDataToBGRX):
(rx::Image::loadRGBUByteDataToRGBA):
(rx::Image::loadRGB565DataToBGRA):
(rx::Image::loadRGB565DataToRGBA):
(rx::Image::loadRGBFloatDataToRGBA):
(rx::Image::loadRGBFloatDataToNative):
(rx::Image::loadRGBHalfFloatDataToRGBA):
(rx::Image::loadRGBAUByteDataToBGRA):
(rx::Image::loadRGBAUByteDataToNative):
(rx::Image::loadRGBA4444DataToBGRA):
(rx::Image::loadRGBA4444DataToRGBA):
(rx::Image::loadRGBA5551DataToBGRA):
(rx::Image::loadRGBA5551DataToRGBA):
(rx::Image::loadRGBAFloatDataToRGBA):
(rx::Image::loadRGBAHalfFloatDataToRGBA):
(rx::Image::loadBGRADataToBGRA):
* src/libGLESv2/renderer/Image.h: Added.
(rx::Image::~Image):
(rx::Image::getWidth):
(rx::Image::getHeight):
(rx::Image::getInternalFormat):
(rx::Image::getActualFormat):
(rx::Image::markDirty):
(rx::Image::markClean):
(rx::Image::setManagedSurface):
* src/libGLESv2/renderer/Image11.cpp: Added.
(rx::Image11::Image11):
(rx::Image11::~Image11):
(rx::Image11::makeImage11):
(rx::Image11::generateMipmap):
(rx::Image11::isDirty):
(rx::Image11::updateSurface):
(rx::Image11::redefine):
(rx::Image11::isRenderableFormat):
(rx::Image11::getDXGIFormat):
(rx::Image11::loadData):
(rx::Image11::loadCompressedData):
(rx::Image11::copy):
(rx::Image11::getStagingTexture):
(rx::Image11::getStagingSubresource):
(rx::Image11::createStagingTexture):
(rx::Image11::map):
(rx::Image11::unmap):
* src/libGLESv2/renderer/Image11.h: Added.
* src/libGLESv2/renderer/Image9.cpp: Added.
(rx::Image9::Image9):
(rx::Image9::~Image9):
(rx::Image9::generateMip):
(rx::Image9::makeImage9):
(rx::Image9::generateMipmap):
(rx::Image9::copyLockableSurfaces):
(rx::Image9::redefine):
(rx::Image9::createSurface):
(rx::Image9::lock):
(rx::Image9::unlock):
(rx::Image9::isRenderableFormat):
(rx::Image9::getD3DFormat):
(rx::Image9::getSurface):
(rx::Image9::setManagedSurface):
(rx::Image9::updateSurface):
(rx::Image9::loadData):
(rx::Image9::loadCompressedData):
(rx::Image9::copy):
* src/libGLESv2/renderer/Image9.h: Added.
(rx::Image9::isDirty):
* src/libGLESv2/renderer/ImageSSE2.cpp: Added.
(rx::Image::loadRGBAUByteDataToBGRASSE2):
(rx::Image::loadAlphaDataToBGRASSE2):
* src/libGLESv2/renderer/IndexBuffer.cpp: Added.
(rx::IndexBuffer::IndexBuffer):
(rx::IndexBuffer::~IndexBuffer):
(rx::IndexBuffer::getSerial):
(rx::IndexBuffer::updateSerial):
(rx::IndexBufferInterface::IndexBufferInterface):
(rx::IndexBufferInterface::~IndexBufferInterface):
(rx::IndexBufferInterface::getIndexType):
(rx::IndexBufferInterface::getBufferSize):
(rx::IndexBufferInterface::getSerial):
(rx::IndexBufferInterface::mapBuffer):
(rx::IndexBufferInterface::unmapBuffer):
(rx::IndexBufferInterface::getIndexBuffer):
(rx::IndexBufferInterface::getWritePosition):
(rx::IndexBufferInterface::setWritePosition):
(rx::IndexBufferInterface::discard):
(rx::IndexBufferInterface::setBufferSize):
(rx::StreamingIndexBufferInterface::StreamingIndexBufferInterface):
(rx::StreamingIndexBufferInterface::~StreamingIndexBufferInterface):
(rx::StreamingIndexBufferInterface::reserveBufferSpace):
(rx::StaticIndexBufferInterface::StaticIndexBufferInterface):
(rx::StaticIndexBufferInterface::~StaticIndexBufferInterface):
(rx::StaticIndexBufferInterface::reserveBufferSpace):
(rx::StaticIndexBufferInterface::lookupRange):
(rx::StaticIndexBufferInterface::addRange):
* src/libGLESv2/renderer/IndexBuffer.h: Added.
(rx::StaticIndexBufferInterface::IndexRange::operator<):
* src/libGLESv2/renderer/IndexBuffer11.cpp: Added.
(rx::IndexBuffer11::IndexBuffer11):
(rx::IndexBuffer11::~IndexBuffer11):
(rx::IndexBuffer11::initialize):
(rx::IndexBuffer11::makeIndexBuffer11):
(rx::IndexBuffer11::mapBuffer):
(rx::IndexBuffer11::unmapBuffer):
(rx::IndexBuffer11::getIndexType):
(rx::IndexBuffer11::getBufferSize):
(rx::IndexBuffer11::setSize):
(rx::IndexBuffer11::discard):
(rx::IndexBuffer11::getIndexFormat):
(rx::IndexBuffer11::getBuffer):
* src/libGLESv2/renderer/IndexBuffer11.h: Added.
* src/libGLESv2/renderer/IndexBuffer9.cpp: Added.
(rx::IndexBuffer9::IndexBuffer9):
(rx::IndexBuffer9::~IndexBuffer9):
(rx::IndexBuffer9::initialize):
(rx::IndexBuffer9::makeIndexBuffer9):
(rx::IndexBuffer9::mapBuffer):
(rx::IndexBuffer9::unmapBuffer):
(rx::IndexBuffer9::getIndexType):
(rx::IndexBuffer9::getBufferSize):
(rx::IndexBuffer9::setSize):
(rx::IndexBuffer9::discard):
(rx::IndexBuffer9::getIndexFormat):
(rx::IndexBuffer9::getBuffer):
* src/libGLESv2/renderer/IndexBuffer9.h: Added.
* src/libGLESv2/renderer/IndexDataManager.cpp: Added.
(rx::IndexDataManager::IndexDataManager):
(rx::IndexDataManager::~IndexDataManager):
(rx::indexTypeSize):
(rx::convertIndices):
(rx::computeRange):
(rx::IndexDataManager::prepareIndexData):
(rx::IndexDataManager::getCountingIndices):
* src/libGLESv2/renderer/IndexDataManager.h: Added.
* src/libGLESv2/renderer/InputLayoutCache.cpp: Added.
(rx::InputLayoutCache::InputLayoutCache):
(rx::InputLayoutCache::~InputLayoutCache):
(rx::InputLayoutCache::initialize):
(rx::InputLayoutCache::clear):
(rx::InputLayoutCache::applyVertexBuffers):
(rx::InputLayoutCache::hashInputLayout):
(rx::InputLayoutCache::compareInputLayouts):
* src/libGLESv2/renderer/InputLayoutCache.h: Added.
* src/libGLESv2/renderer/Query11.cpp: Added.
(rx::Query11::Query11):
(rx::Query11::~Query11):
(rx::Query11::begin):
(rx::Query11::end):
(rx::Query11::getResult):
(rx::Query11::isResultAvailable):
(rx::Query11::testQuery):
* src/libGLESv2/renderer/Query11.h: Added.
* src/libGLESv2/renderer/Query9.cpp: Added.
(rx::Query9::Query9):
(rx::Query9::~Query9):
(rx::Query9::begin):
(rx::Query9::end):
(rx::Query9::getResult):
(rx::Query9::isResultAvailable):
(rx::Query9::testQuery):
* src/libGLESv2/renderer/Query9.h: Added.
* src/libGLESv2/renderer/QueryImpl.h: Added.
(rx::QueryImpl::QueryImpl):
(rx::QueryImpl::~QueryImpl):
(rx::QueryImpl::getType):
* src/libGLESv2/renderer/RenderStateCache.cpp: Added.
(rx::RenderStateCache::RenderStateCache):
(rx::RenderStateCache::~RenderStateCache):
(rx::RenderStateCache::initialize):
(rx::RenderStateCache::clear):
(rx::RenderStateCache::hashBlendState):
(rx::RenderStateCache::compareBlendStates):
(rx::RenderStateCache::getBlendState):
(rx::RenderStateCache::hashRasterizerState):
(rx::RenderStateCache::compareRasterizerStates):
(rx::RenderStateCache::getRasterizerState):
(rx::RenderStateCache::hashDepthStencilState):
(rx::RenderStateCache::compareDepthStencilStates):
(rx::RenderStateCache::getDepthStencilState):
(rx::RenderStateCache::hashSamplerState):
(rx::RenderStateCache::compareSamplerStates):
(rx::RenderStateCache::getSamplerState):
* src/libGLESv2/renderer/RenderStateCache.h: Added.
* src/libGLESv2/renderer/RenderTarget.h: Added.
(rx::RenderTarget::RenderTarget):
(rx::RenderTarget::~RenderTarget):
(rx::RenderTarget::getWidth):
(rx::RenderTarget::getHeight):
(rx::RenderTarget::getInternalFormat):
(rx::RenderTarget::getActualFormat):
(rx::RenderTarget::getSamples):
* src/libGLESv2/renderer/RenderTarget11.cpp: Added.
(rx::getRTVSubresourceIndex):
(rx::getDSVSubresourceIndex):
(rx::RenderTarget11::RenderTarget11):
(rx::RenderTarget11::~RenderTarget11):
(rx::RenderTarget11::makeRenderTarget11):
(rx::RenderTarget11::getTexture):
(rx::RenderTarget11::getRenderTargetView):
(rx::RenderTarget11::getDepthStencilView):
(rx::RenderTarget11::getShaderResourceView):
(rx::RenderTarget11::getSubresourceIndex):
* src/libGLESv2/renderer/RenderTarget11.h: Added.
* src/libGLESv2/renderer/RenderTarget9.cpp: Added.
(rx::RenderTarget9::RenderTarget9):
(rx::RenderTarget9::~RenderTarget9):
(rx::RenderTarget9::makeRenderTarget9):
(rx::RenderTarget9::getSurface):
* src/libGLESv2/renderer/RenderTarget9.h: Added.
* src/libGLESv2/renderer/Renderer.cpp: Added.
(rx::Renderer::Renderer):
(rx::Renderer::~Renderer):
(rx::Renderer::initializeCompiler):
(rx::Renderer::compileToBinary):
* src/libGLESv2/renderer/Renderer.h: Added.
(getComparableOSVersion):
(rx::Renderer::getVertexTextureSupport):
* src/libGLESv2/renderer/Renderer11.cpp: Added.
(rx::Renderer11::Renderer11):
(rx::Renderer11::~Renderer11):
(rx::Renderer11::makeRenderer11):
(rx::Renderer11::initialize):
(rx::Renderer11::initializeDevice):
(rx::Renderer11::generateConfigs):
(rx::Renderer11::deleteConfigs):
(rx::Renderer11::sync):
(rx::Renderer11::createSwapChain):
(rx::Renderer11::setSamplerState):
(rx::Renderer11::setTexture):
(rx::Renderer11::setRasterizerState):
(rx::Renderer11::setBlendState):
(rx::Renderer11::setDepthStencilState):
(rx::Renderer11::setScissorRectangle):
(rx::Renderer11::setViewport):
(rx::Renderer11::applyPrimitiveType):
(rx::Renderer11::applyRenderTarget):
(rx::Renderer11::applyVertexBuffer):
(rx::Renderer11::applyIndexBuffer):
(rx::Renderer11::drawArrays):
(rx::Renderer11::drawElements):
(rx::Renderer11::drawLineLoop):
(rx::Renderer11::drawTriangleFan):
(rx::Renderer11::applyShaders):
(rx::Renderer11::applyUniforms):
(rx::Renderer11::clear):
(rx::Renderer11::maskedClear):
(rx::Renderer11::markAllStateDirty):
(rx::Renderer11::releaseDeviceResources):
(rx::Renderer11::notifyDeviceLost):
(rx::Renderer11::isDeviceLost):
(rx::Renderer11::testDeviceLost):
(rx::Renderer11::testDeviceResettable):
(rx::Renderer11::release):
(rx::Renderer11::resetDevice):
(rx::Renderer11::getAdapterVendor):
(rx::Renderer11::getRendererDescription):
(rx::Renderer11::getAdapterIdentifier):
(rx::Renderer11::getBGRATextureSupport):
(rx::Renderer11::getDXT1TextureSupport):
(rx::Renderer11::getDXT3TextureSupport):
(rx::Renderer11::getDXT5TextureSupport):
(rx::Renderer11::getDepthTextureSupport):
(rx::Renderer11::getFloat32TextureSupport):
(rx::Renderer11::getFloat16TextureSupport):
(rx::Renderer11::getLuminanceTextureSupport):
(rx::Renderer11::getLuminanceAlphaTextureSupport):
(rx::Renderer11::getTextureFilterAnisotropySupport):
(rx::Renderer11::getTextureMaxAnisotropy):
(rx::Renderer11::getEventQuerySupport):
(rx::Renderer11::getViewportBounds):
(rx::Renderer11::getMaxVertexTextureImageUnits):
(rx::Renderer11::getMaxCombinedTextureImageUnits):
(rx::Renderer11::getReservedVertexUniformVectors):
(rx::Renderer11::getReservedFragmentUniformVectors):
(rx::Renderer11::getMaxVertexUniformVectors):
(rx::Renderer11::getMaxFragmentUniformVectors):
(rx::Renderer11::getMaxVaryingVectors):
(rx::Renderer11::getNonPower2TextureSupport):
(rx::Renderer11::getOcclusionQuerySupport):
(rx::Renderer11::getInstancingSupport):
(rx::Renderer11::getShareHandleSupport):
(rx::Renderer11::getDerivativeInstructionSupport):
(rx::Renderer11::getPostSubBufferSupport):
(rx::Renderer11::getMajorShaderModel):
(rx::Renderer11::getMinorShaderModel):
(rx::Renderer11::getMaxPointSize):
(rx::Renderer11::getMaxViewportDimension):
(rx::Renderer11::getMaxTextureWidth):
(rx::Renderer11::getMaxTextureHeight):
(rx::Renderer11::get32BitIndexSupport):
(rx::Renderer11::getMinSwapInterval):
(rx::Renderer11::getMaxSwapInterval):
(rx::Renderer11::getMaxSupportedSamples):
(rx::Renderer11::getNearestSupportedSamples):
(rx::Renderer11::getMaxRenderTargets):
(rx::Renderer11::copyToRenderTarget):
(rx::Renderer11::copyImage):
(rx::Renderer11::copyTexture):
(rx::Renderer11::unapplyRenderTargets):
(rx::Renderer11::setOneTimeRenderTarget):
(rx::Renderer11::createRenderTarget):
(rx::Renderer11::loadExecutable):
(rx::Renderer11::compileToExecutable):
(rx::Renderer11::createVertexBuffer):
(rx::Renderer11::createIndexBuffer):
(rx::Renderer11::createBufferStorage):
(rx::Renderer11::createQuery):
(rx::Renderer11::createFence):
(rx::Renderer11::getRenderTargetResource):
(rx::Renderer11::blitRect):
(rx::Renderer11::readPixels):
(rx::Renderer11::createImage):
(rx::Renderer11::generateMipmap):
(rx::Renderer11::createTextureStorage2D):
(rx::Renderer11::createTextureStorageCube):
(rx::getFastPixelCopySize):
(rx::readPixelColor):
(rx::writePixelColor):
(rx::Renderer11::readTextureData):
(rx::Renderer11::blitRenderbufferRect):
(rx::Renderer11::resolveMultisampledTexture):
(rx::Renderer11::getLUID):
* src/libGLESv2/renderer/Renderer11.h: Added.
(rx::Renderer11::getDevice):
(rx::Renderer11::getDeviceContext):
(rx::Renderer11::getDxgiFactory):
* src/libGLESv2/renderer/Renderer9.cpp: Added.
(rx::Renderer9::Renderer9):
(rx::Renderer9::~Renderer9):
(rx::Renderer9::makeRenderer9):
(rx::Renderer9::initialize):
(rx::Renderer9::initializeDevice):
(rx::Renderer9::getDefaultPresentParameters):
(rx::Renderer9::generateConfigs):
(rx::Renderer9::deleteConfigs):
(rx::Renderer9::startScene):
(rx::Renderer9::endScene):
(rx::Renderer9::sync):
(rx::Renderer9::createSwapChain):
(rx::Renderer9::allocateEventQuery):
(rx::Renderer9::freeEventQuery):
(rx::Renderer9::createVertexShader):
(rx::Renderer9::createPixelShader):
(rx::Renderer9::createVertexBuffer):
(rx::Renderer9::createIndexBuffer):
(rx::Renderer9::createBufferStorage):
(rx::Renderer9::createQuery):
(rx::Renderer9::createFence):
(rx::Renderer9::setSamplerState):
(rx::Renderer9::setTexture):
(rx::Renderer9::setRasterizerState):
(rx::Renderer9::setBlendState):
(rx::Renderer9::setDepthStencilState):
(rx::Renderer9::setScissorRectangle):
(rx::Renderer9::setViewport):
(rx::Renderer9::applyPrimitiveType):
(rx::Renderer9::getNullColorbuffer):
(rx::Renderer9::applyRenderTarget):
(rx::Renderer9::applyVertexBuffer):
(rx::Renderer9::applyIndexBuffer):
(rx::Renderer9::drawArrays):
(rx::Renderer9::drawElements):
(rx::Renderer9::drawLineLoop):
(rx::drawPoints):
(rx::Renderer9::drawIndexedPoints):
(rx::Renderer9::applyShaders):
(rx::Renderer9::applyUniforms):
(rx::Renderer9::applyUniformnfv):
(rx::Renderer9::applyUniformniv):
(rx::Renderer9::applyUniformnbv):
(rx::Renderer9::clear):
(rx::Renderer9::markAllStateDirty):
(rx::Renderer9::releaseDeviceResources):
(rx::Renderer9::notifyDeviceLost):
(rx::Renderer9::isDeviceLost):
(rx::Renderer9::testDeviceLost):
(rx::Renderer9::testDeviceResettable):
(rx::Renderer9::resetDevice):
(rx::Renderer9::getAdapterVendor):
(rx::Renderer9::getRendererDescription):
(rx::Renderer9::getAdapterIdentifier):
(rx::Renderer9::getMultiSampleSupport):
(rx::Renderer9::getBGRATextureSupport):
(rx::Renderer9::getDXT1TextureSupport):
(rx::Renderer9::getDXT3TextureSupport):
(rx::Renderer9::getDXT5TextureSupport):
(rx::Renderer9::getDepthTextureSupport):
(rx::Renderer9::getFloat32TextureSupport):
(rx::Renderer9::getFloat16TextureSupport):
(rx::Renderer9::getLuminanceTextureSupport):
(rx::Renderer9::getLuminanceAlphaTextureSupport):
(rx::Renderer9::getTextureFilterAnisotropySupport):
(rx::Renderer9::getTextureMaxAnisotropy):
(rx::Renderer9::getEventQuerySupport):
(rx::Renderer9::getMaxVertexTextureImageUnits):
(rx::Renderer9::getMaxCombinedTextureImageUnits):
(rx::Renderer9::getReservedVertexUniformVectors):
(rx::Renderer9::getReservedFragmentUniformVectors):
(rx::Renderer9::getMaxVertexUniformVectors):
(rx::Renderer9::getMaxFragmentUniformVectors):
(rx::Renderer9::getMaxVaryingVectors):
(rx::Renderer9::getNonPower2TextureSupport):
(rx::Renderer9::getOcclusionQuerySupport):
(rx::Renderer9::getInstancingSupport):
(rx::Renderer9::getShareHandleSupport):
(rx::Renderer9::getDerivativeInstructionSupport):
(rx::Renderer9::getPostSubBufferSupport):
(rx::Renderer9::getMajorShaderModel):
(rx::Renderer9::getMaxPointSize):
(rx::Renderer9::getMaxViewportDimension):
(rx::Renderer9::getMaxTextureWidth):
(rx::Renderer9::getMaxTextureHeight):
(rx::Renderer9::get32BitIndexSupport):
(rx::Renderer9::getCapsDeclTypes):
(rx::Renderer9::getMinSwapInterval):
(rx::Renderer9::getMaxSwapInterval):
(rx::Renderer9::getMaxSupportedSamples):
(rx::Renderer9::getNearestSupportedSamples):
(rx::Renderer9::getMaxRenderTargets):
(rx::Renderer9::ConvertTextureInternalFormat):
(rx::Renderer9::copyToRenderTarget):
(rx::Renderer9::getBufferPool):
(rx::Renderer9::copyImage):
(rx::Renderer9::blitRect):
(rx::Renderer9::readPixels):
(rx::Renderer9::createRenderTarget):
(rx::Renderer9::loadExecutable):
(rx::Renderer9::compileToExecutable):
(rx::Renderer9::boxFilter):
(rx::Renderer9::getTexturePool):
(rx::Renderer9::createImage):
(rx::Renderer9::generateMipmap):
(rx::Renderer9::createTextureStorage2D):
(rx::Renderer9::createTextureStorageCube):
(rx::Renderer9::getLUID):
* src/libGLESv2/renderer/Renderer9.h: Added.
(rx::Renderer9::getDevice):
* src/libGLESv2/renderer/ShaderCache.h: Added.
(rx::ShaderCache::ShaderCache):
(rx::ShaderCache::~ShaderCache):
(rx::ShaderCache::initialize):
(rx::ShaderCache::create):
(rx::ShaderCache::clear):
(rx::ShaderCache::createShader):
* src/libGLESv2/renderer/ShaderExecutable.h: Added.
(rx::ShaderExecutable::ShaderExecutable):
(rx::ShaderExecutable::~ShaderExecutable):
(rx::ShaderExecutable::getFunction):
(rx::ShaderExecutable::getLength):
* src/libGLESv2/renderer/ShaderExecutable11.cpp: Added.
(rx::ShaderExecutable11::ShaderExecutable11):
(rx::ShaderExecutable11::~ShaderExecutable11):
(rx::ShaderExecutable11::makeShaderExecutable11):
(rx::ShaderExecutable11::getVertexShader):
(rx::ShaderExecutable11::getPixelShader):
(rx::ShaderExecutable11::getGeometryShader):
(rx::ShaderExecutable11::getConstantBuffer):
* src/libGLESv2/renderer/ShaderExecutable11.h: Added.
* src/libGLESv2/renderer/ShaderExecutable9.cpp: Added.
(rx::ShaderExecutable9::ShaderExecutable9):
(rx::ShaderExecutable9::~ShaderExecutable9):
(rx::ShaderExecutable9::makeShaderExecutable9):
(rx::ShaderExecutable9::getVertexShader):
(rx::ShaderExecutable9::getPixelShader):
* src/libGLESv2/renderer/ShaderExecutable9.h: Added.
* src/libGLESv2/renderer/SwapChain.h: Added.
(rx::SwapChain::SwapChain):
(rx::SwapChain::~SwapChain):
(rx::SwapChain::getShareHandle):
* src/libGLESv2/renderer/SwapChain11.cpp: Added.
(rx::SwapChain11::SwapChain11):
(rx::SwapChain11::~SwapChain11):
(rx::SwapChain11::release):
(rx::SwapChain11::releaseOffscreenTexture):
(rx::SwapChain11::resetOffscreenTexture):
(rx::SwapChain11::resize):
(rx::SwapChain11::reset):
(rx::SwapChain11::initPassThroughResources):
(rx::SwapChain11::swapRect):
(rx::SwapChain11::getOffscreenTexture):
(rx::SwapChain11::getRenderTarget):
(rx::SwapChain11::getRenderTargetShaderResource):
(rx::SwapChain11::getDepthStencil):
(rx::SwapChain11::getDepthStencilTexture):
(rx::SwapChain11::makeSwapChain11):
(rx::SwapChain11::recreate):
* src/libGLESv2/renderer/SwapChain11.h: Added.
(rx::SwapChain11::getWidth):
(rx::SwapChain11::getHeight):
* src/libGLESv2/renderer/SwapChain9.cpp: Added.
(rx::SwapChain9::SwapChain9):
(rx::SwapChain9::~SwapChain9):
(rx::SwapChain9::release):
(rx::convertInterval):
(rx::SwapChain9::resize):
(rx::SwapChain9::reset):
(rx::SwapChain9::swapRect):
(rx::SwapChain9::getRenderTarget):
(rx::SwapChain9::getDepthStencil):
(rx::SwapChain9::getOffscreenTexture):
(rx::SwapChain9::makeSwapChain9):
(rx::SwapChain9::recreate):
* src/libGLESv2/renderer/SwapChain9.h: Added.
* src/libGLESv2/renderer/TextureStorage.cpp: Added.
(rx::TextureStorageInterface::TextureStorageInterface):
(rx::TextureStorageInterface::~TextureStorageInterface):
(rx::TextureStorageInterface::isRenderTarget):
(rx::TextureStorageInterface::isManaged):
(rx::TextureStorageInterface::getTextureSerial):
(rx::TextureStorageInterface::issueTextureSerial):
(rx::TextureStorageInterface::getLodOffset):
(rx::TextureStorageInterface::levelCount):
(rx::TextureStorageInterface2D::TextureStorageInterface2D):
(rx::TextureStorageInterface2D::~TextureStorageInterface2D):
(rx::TextureStorageInterface2D::getRenderTarget):
(rx::TextureStorageInterface2D::generateMipmap):
(rx::TextureStorageInterface2D::getRenderTargetSerial):
(rx::TextureStorageInterfaceCube::TextureStorageInterfaceCube):
(rx::TextureStorageInterfaceCube::~TextureStorageInterfaceCube):
(rx::TextureStorageInterfaceCube::getRenderTarget):
(rx::TextureStorageInterfaceCube::generateMipmap):
(rx::TextureStorageInterfaceCube::getRenderTargetSerial):
* src/libGLESv2/renderer/TextureStorage.h: Added.
(rx::TextureStorage::TextureStorage):
(rx::TextureStorage::~TextureStorage):
(rx::TextureStorageInterface::getStorageInstance):
* src/libGLESv2/renderer/TextureStorage11.cpp: Added.
(rx::TextureStorage11::TextureStorage11):
(rx::TextureStorage11::~TextureStorage11):
(rx::TextureStorage11::makeTextureStorage11):
(rx::TextureStorage11::GetTextureBindFlags):
(rx::TextureStorage11::IsTextureFormatRenderable):
(rx::TextureStorage11::getBindFlags):
(rx::TextureStorage11::getBaseTexture):
(rx::TextureStorage11::getLodOffset):
(rx::TextureStorage11::isRenderTarget):
(rx::TextureStorage11::isManaged):
(rx::TextureStorage11::levelCount):
(rx::TextureStorage11::getSubresourceIndex):
(rx::TextureStorage11::updateSubresourceLevel):
(rx::TextureStorage11::generateMipmapLayer):
(rx::TextureStorage11_2D::TextureStorage11_2D):
(rx::TextureStorage11_2D::~TextureStorage11_2D):
(rx::TextureStorage11_2D::makeTextureStorage11_2D):
(rx::TextureStorage11_2D::getRenderTarget):
(rx::TextureStorage11_2D::getSRV):
(rx::TextureStorage11_2D::generateMipmap):
(rx::TextureStorage11_Cube::TextureStorage11_Cube):
(rx::TextureStorage11_Cube::~TextureStorage11_Cube):
(rx::TextureStorage11_Cube::makeTextureStorage11_Cube):
(rx::TextureStorage11_Cube::getRenderTarget):
(rx::TextureStorage11_Cube::getSRV):
(rx::TextureStorage11_Cube::generateMipmap):
* src/libGLESv2/renderer/TextureStorage11.h: Added.
(rx::TextureStorage11::getRenderTarget):
(rx::TextureStorage11::generateMipmap):
* src/libGLESv2/renderer/TextureStorage9.cpp: Added.
(rx::TextureStorage9::TextureStorage9):
(rx::TextureStorage9::~TextureStorage9):
(rx::TextureStorage9::makeTextureStorage9):
(rx::TextureStorage9::GetTextureUsage):
(rx::TextureStorage9::IsTextureFormatRenderable):
(rx::TextureStorage9::isRenderTarget):
(rx::TextureStorage9::isManaged):
(rx::TextureStorage9::getPool):
(rx::TextureStorage9::getUsage):
(rx::TextureStorage9::getLodOffset):
(rx::TextureStorage9::levelCount):
(rx::TextureStorage9_2D::TextureStorage9_2D):
(rx::TextureStorage9_2D::~TextureStorage9_2D):
(rx::TextureStorage9_2D::makeTextureStorage9_2D):
(rx::TextureStorage9_2D::getSurfaceLevel):
(rx::TextureStorage9_2D::getRenderTarget):
(rx::TextureStorage9_2D::generateMipmap):
(rx::TextureStorage9_2D::getBaseTexture):
(rx::TextureStorage9_2D::initializeRenderTarget):
(rx::TextureStorage9_Cube::TextureStorage9_Cube):
(rx::TextureStorage9_Cube::~TextureStorage9_Cube):
(rx::TextureStorage9_Cube::makeTextureStorage9_Cube):
(rx::TextureStorage9_Cube::getCubeMapSurface):
(rx::TextureStorage9_Cube::getRenderTarget):
(rx::TextureStorage9_Cube::generateMipmap):
(rx::TextureStorage9_Cube::getBaseTexture):
(rx::TextureStorage9_Cube::initializeRenderTarget):
* src/libGLESv2/renderer/TextureStorage9.h: Added.
(rx::TextureStorage9::getRenderTarget):
(rx::TextureStorage9::generateMipmap):
* src/libGLESv2/renderer/VertexBuffer.cpp: Added.
(rx::VertexBuffer::VertexBuffer):
(rx::VertexBuffer::~VertexBuffer):
(rx::VertexBuffer::updateSerial):
(rx::VertexBuffer::getSerial):
(rx::VertexBufferInterface::VertexBufferInterface):
(rx::VertexBufferInterface::~VertexBufferInterface):
(rx::VertexBufferInterface::getSerial):
(rx::VertexBufferInterface::getBufferSize):
(rx::VertexBufferInterface::setBufferSize):
(rx::VertexBufferInterface::getWritePosition):
(rx::VertexBufferInterface::setWritePosition):
(rx::VertexBufferInterface::discard):
(rx::VertexBufferInterface::storeVertexAttributes):
(rx::VertexBufferInterface::storeRawData):
(rx::VertexBufferInterface::reserveVertexSpace):
(rx::VertexBufferInterface::reserveRawDataSpace):
(rx::VertexBufferInterface::getVertexBuffer):
(rx::StreamingVertexBufferInterface::StreamingVertexBufferInterface):
(rx::StreamingVertexBufferInterface::~StreamingVertexBufferInterface):
(rx::StreamingVertexBufferInterface::reserveSpace):
(rx::StaticVertexBufferInterface::StaticVertexBufferInterface):
(rx::StaticVertexBufferInterface::~StaticVertexBufferInterface):
(rx::StaticVertexBufferInterface::lookupAttribute):
(rx::StaticVertexBufferInterface::reserveSpace):
(rx::StaticVertexBufferInterface::storeVertexAttributes):
* src/libGLESv2/renderer/VertexBuffer.h: Added.
* src/libGLESv2/renderer/VertexBuffer11.cpp: Added.
(rx::VertexBuffer11::VertexBuffer11):
(rx::VertexBuffer11::~VertexBuffer11):
(rx::VertexBuffer11::initialize):
(rx::VertexBuffer11::makeVertexBuffer11):
(rx::VertexBuffer11::storeVertexAttributes):
(rx::VertexBuffer11::storeRawData):
(rx::VertexBuffer11::getSpaceRequired):
(rx::VertexBuffer11::requiresConversion):
(rx::VertexBuffer11::getBufferSize):
(rx::VertexBuffer11::setBufferSize):
(rx::VertexBuffer11::discard):
(rx::VertexBuffer11::getVertexSize):
(rx::VertexBuffer11::getDXGIFormat):
(rx::VertexBuffer11::getBuffer):
(rx::copyVertexData):
(rx::copyFixedVertexData):
(rx::copyToFloatVertexData):
(rx::VertexBuffer11::getVertexConversion):
* src/libGLESv2/renderer/VertexBuffer11.h: Added.
* src/libGLESv2/renderer/VertexBuffer9.cpp: Added.
(rx::VertexBuffer9::VertexBuffer9):
(rx::VertexBuffer9::~VertexBuffer9):
(rx::VertexBuffer9::initialize):
(rx::VertexBuffer9::makeVertexBuffer9):
(rx::VertexBuffer9::storeVertexAttributes):
(rx::VertexBuffer9::storeRawData):
(rx::VertexBuffer9::getSpaceRequired):
(rx::VertexBuffer9::requiresConversion):
(rx::VertexBuffer9::getVertexSize):
(rx::VertexBuffer9::getDeclType):
(rx::VertexBuffer9::getBufferSize):
(rx::VertexBuffer9::setBufferSize):
(rx::VertexBuffer9::discard):
(rx::VertexBuffer9::getBuffer):
(rx::VertexBuffer9::initializeTranslations):
(rx::VertexBuffer9::typeIndex):
(rx::VertexBuffer9::formatConverter):
(rx::VertexBuffer9::spaceRequired):
* src/libGLESv2/renderer/VertexBuffer9.h: Added.
* src/libGLESv2/renderer/VertexDataManager.cpp: Added.
(rx::elementsInBuffer):
(rx::VertexDataManager::VertexDataManager):
(rx::VertexDataManager::~VertexDataManager):
(rx::directStoragePossible):
(rx::VertexDataManager::prepareVertexData):
* src/libGLESv2/renderer/VertexDataManager.h: Added.
* src/libGLESv2/renderer/VertexDeclarationCache.cpp: Added.
(rx::VertexDeclarationCache::VertexDeclarationCache):
(rx::VertexDeclarationCache::~VertexDeclarationCache):
(rx::VertexDeclarationCache::applyDeclaration):
(rx::VertexDeclarationCache::markStateDirty):
* src/libGLESv2/renderer/VertexDeclarationCache.h: Added.
* src/libGLESv2/renderer/generatemip.h: Added.
(rx::L8::average):
(rx::A8L8::average):
(rx::A8R8G8B8::average):
(rx::A16B16G16R16F::average):
(rx::R16F::average):
(rx::R16G16F::average):
(rx::A32B32G32R32F::average):
(rx::R32F::average):
(rx::R32G32F::average):
(rx::R32G32B32F::average):
(rx::GenerateMip):
* src/libGLESv2/renderer/renderer11_utils.cpp: Added.
(gl_d3d11::ConvertBlendFunc):
(gl_d3d11::ConvertBlendOp):
(gl_d3d11::ConvertColorMask):
(gl_d3d11::ConvertCullMode):
(gl_d3d11::ConvertComparison):
(gl_d3d11::ConvertDepthMask):
(gl_d3d11::ConvertStencilMask):
(gl_d3d11::ConvertStencilOp):
(gl_d3d11::ConvertFilter):
(gl_d3d11::ConvertTextureWrap):
(gl_d3d11::ConvertMinLOD):
(gl_d3d11::ConvertMaxLOD):
(d3d11_gl::ConvertBackBufferFormat):
(d3d11_gl::ConvertDepthStencilFormat):
(d3d11_gl::ConvertRenderbufferFormat):
(d3d11_gl::ConvertTextureInternalFormat):
(gl_d3d11::ConvertRenderbufferFormat):
(gl_d3d11::ConvertTextureFormat):
(d3d11::SetPositionTexCoordVertex):
(d3d11::SetPositionDepthColorVertex):
(d3d11::ComputePixelSizeBits):
(d3d11::ComputeBlockSizeBits):
(d3d11::IsCompressed):
(d3d11::GetTextureFormatDimensionAlignment):
(d3d11::IsDepthStencilFormat):
(d3d11::GetDepthTextureFormat):
(d3d11::GetDepthShaderResourceFormat):
(d3d11::SetDebugName):
* src/libGLESv2/renderer/renderer11_utils.h: Added.
(d3d11::isDeviceLostError):
* src/libGLESv2/renderer/renderer9_utils.cpp: Added.
(gl_d3d9::ConvertComparison):
(gl_d3d9::ConvertColor):
(gl_d3d9::ConvertBlendFunc):
(gl_d3d9::ConvertBlendOp):
(gl_d3d9::ConvertStencilOp):
(gl_d3d9::ConvertTextureWrap):
(gl_d3d9::ConvertCullMode):
(gl_d3d9::ConvertCubeFace):
(gl_d3d9::ConvertColorMask):
(gl_d3d9::ConvertMagFilter):
(gl_d3d9::ConvertMinFilter):
(gl_d3d9::ConvertRenderbufferFormat):
(gl_d3d9::GetMultisampleTypeFromSamples):
(d3d9_gl::GetStencilSize):
(d3d9_gl::GetAlphaSize):
(d3d9_gl::GetSamplesFromMultisampleType):
(d3d9_gl::IsFormatChannelEquivalent):
(d3d9_gl::ConvertBackBufferFormat):
(d3d9_gl::ConvertDepthStencilFormat):
(d3d9_gl::ConvertRenderTargetFormat):
(d3d9_gl::GetEquivalentFormat):
(d3d9::IsCompressedFormat):
(d3d9::ComputeRowSize):
* src/libGLESv2/renderer/renderer9_utils.h: Added.
(d3d9::isDeviceLostError):
* src/libGLESv2/renderer/shaders: Added.
* src/libGLESv2/renderer/shaders/Blit.ps: Added.
* src/libGLESv2/renderer/shaders/Blit.vs: Added.
* src/libGLESv2/renderer/shaders/Clear11.hlsl: Added.
* src/libGLESv2/renderer/shaders/Passthrough11.hlsl: Added.
* src/libGLESv2/renderer/shaders/compiled: Added.
* src/libGLESv2/renderer/shaders/compiled/clear11vs.h: Added.
* src/libGLESv2/renderer/shaders/compiled/clearmultiple11ps.h: Added.
* src/libGLESv2/renderer/shaders/compiled/clearsingle11ps.h: Added.
* src/libGLESv2/renderer/shaders/compiled/componentmaskps.h: Added.
* src/libGLESv2/renderer/shaders/compiled/flipyvs.h: Added.
* src/libGLESv2/renderer/shaders/compiled/luminanceps.h: Added.
* src/libGLESv2/renderer/shaders/compiled/passthrough11vs.h: Added.
* src/libGLESv2/renderer/shaders/compiled/passthroughlum11ps.h: Added.
* src/libGLESv2/renderer/shaders/compiled/passthroughlumalpha11ps.h: Added.
* src/libGLESv2/renderer/shaders/compiled/passthroughps.h: Added.
* src/libGLESv2/renderer/shaders/compiled/passthroughrgb11ps.h: Added.
* src/libGLESv2/renderer/shaders/compiled/passthroughrgba11ps.h: Added.
* src/libGLESv2/renderer/shaders/compiled/standardvs.h: Added.
* src/libGLESv2/renderer/shaders/generate_shaders.bat: Added.
* src/libGLESv2/renderer/vertexconversion.h: Added.
(rx::Identity::convert):
(rx::Cast::convert):
(rx::Normalize::convert):
(rx::FixedToFloat::convert):
(rx::SimpleDefaultValues::zero):
(rx::SimpleDefaultValues::one):
(rx::NormalizedDefaultValues::zero):
(rx::NormalizedDefaultValues::one):
(rx::VertexDataConverter::convertArray):
(rx::VertexDataConverter::pointerAddBytes):
(rx::VertexDataConverter::copyComponent):
* src/libGLESv2/resource.h: Added.
* src/libGLESv2/utilities.cpp: Added.
(gl::UniformComponentCount):
(gl::UniformComponentType):
(gl::UniformComponentSize):
(gl::UniformInternalSize):
(gl::UniformExternalSize):
(gl::VariableRowCount):
(gl::VariableColumnCount):
(gl::AllocateFirstFreeBits):
(gl::ComputePitch):
(gl::ComputeCompressedPitch):
(gl::ComputeCompressedSize):
(gl::IsCompressed):
(gl::IsDepthTexture):
(gl::IsStencilTexture):
(gl::MakeValidSize):
(gl::ComputePixelSize):
(gl::IsCubemapTextureTarget):
(gl::IsInternalTextureTarget):
(gl::ConvertSizedInternalFormat):
(gl::ExtractFormat):
(gl::ExtractType):
(gl::IsColorRenderable):
(gl::IsDepthRenderable):
(gl::IsStencilRenderable):
(gl::IsFloat32Format):
(gl::IsFloat16Format):
(gl::GetAlphaSize):
(gl::GetRedSize):
(gl::GetGreenSize):
(gl::GetBlueSize):
(gl::GetDepthSize):
(gl::GetStencilSize):
(gl::IsTriangleMode):
(getTempPath):
(writeFile):
* src/libGLESv2/utilities.h: Added.
* src/third_party/murmurhash: Added.
* src/third_party/murmurhash/LICENSE: Added.
* src/third_party/murmurhash/MurmurHash3.cpp: Added, replaced tabs with spaces.
(rotl32):
(rotl64):
(getblock):
(fmix):
(MurmurHash3_x86_32):
(MurmurHash3_x86_128):
(MurmurHash3_x64_128):
* src/third_party/murmurhash/MurmurHash3.h: Added, replaced tabs with spaces.

Source/WebCore: Updated ANGLE to latest git commit (047373aa3eb408be62be52ade840fa5f11e72337).
https://bugs.webkit.org/show_bug.cgi?id=118550

Reviewed by Dean Jackson.

* CMakeLists.txt: Renamed DetectRecursion to DetectCallDepth and added Uniform.cpp.

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

9 years ago[CSS Shapes] New positioning model: support for rounded rectangle shape-outside
commit-queue@webkit.org [Tue, 23 Jul 2013 22:20:55 +0000 (22:20 +0000)]
[CSS Shapes] New positioning model: support for rounded rectangle shape-outside
https://bugs.webkit.org/show_bug.cgi?id=118081

Patch by Bem Jones-Bey <bjonesbe@adobe.com> on 2013-07-23
Reviewed by Dean Jackson.

Update the shape-outside rounded rectangle tests and import them from
the CSS WG's repository. They have been moved to the CSS WG repository
so they can be part of the spec test suite for CSS Shapes.

* TestExpectations: Remove skipping for tests that have been replaced.
* csswg/submitted/shapes/shape-outside/resources/rounded-rectangle.js: Added.
(ellipseXIntercept):
(scanConvertRoundedRectangleOutside):
(genLeftRightRoundedRectFloatShapeOutsideRefTest):
(genLeftRoundedRectFloatShapeOutsideRefTest):
(genRightRoundedRectFloatShapeOutsideRefTest):
* csswg/submitted/shapes/shape-outside/resources/subpixel-utils.js: Added.
(SubPixelLayout):
(SubPixelLayout.):
* csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-001-expected.html: Renamed from LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-simple-rounded-rectangle-001-expected.html.
* csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-001.html: Renamed from LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-simple-rounded-rectangle-001.html.
* csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-002-expected.html: Renamed from LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-simple-rounded-rectangle-002-expected.html.
* csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-002.html: Renamed from LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-simple-rounded-rectangle-002.html.
* csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-003-expected.html: Renamed from LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-simple-rounded-rectangle-003-expected.html.
* csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-003.html: Renamed from LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-simple-rounded-rectangle-003.html.
* csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-004-expected.html: Added.
* csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-004.html: Added.
* csswg/submitted/shapes/shape-outside/w3c-import.log:

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

9 years agoUse Checked<uint32_t, RecordOverflow> instead of CheckedInt in GraphicsContext3D
zandobersek@gmail.com [Tue, 23 Jul 2013 21:53:33 +0000 (21:53 +0000)]
Use Checked<uint32_t, RecordOverflow> instead of CheckedInt in GraphicsContext3D
https://bugs.webkit.org/show_bug.cgi?id=118988

Reviewed by Oliver Hunt.

Use the WTF's Checked class, with uint32_t as the numeric type and RecordOverflow as the overflow handler,
instead of the CheckedInt class. This removes a layering violation that's occurring due to including the CheckedInt
header that's currently located in the WebCore layer (alongside the HTML canvas code in Source/WebCore/html/canvas).

* platform/graphics/GraphicsContext3D.cpp:
(WebCore::GraphicsContext3D::computeImageSizeInBytes):

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

9 years agoREGRESSION(r152313): Links in certain twitter postings don't warp correctly on page
zalan@apple.com [Tue, 23 Jul 2013 19:47:34 +0000 (19:47 +0000)]
REGRESSION(r152313): Links in certain twitter postings don't warp correctly on page
https://bugs.webkit.org/show_bug.cgi?id=118435

Reviewed by David Hyatt.

When we find an empty inline in the middle of the word, prefer breaking it before
instead of after to match other browsers' rendering.

Source/WebCore:

Test: fast/text/whitespace/inline-whitespace-wrapping-12.html

* rendering/RenderBlockLineLayout.cpp:
(WebCore::canBreakAtThisPosition):

LayoutTests:

* fast/text/whitespace/inline-whitespace-wrapping-12-expected.html: Added.
* fast/text/whitespace/inline-whitespace-wrapping-12.html: Added.

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

9 years ago Dictionary hotkey does not work on vertical text
ap@apple.com [Tue, 23 Jul 2013 19:09:39 +0000 (19:09 +0000)]
    Dictionary hotkey does not work on vertical text
        https://bugs.webkit.org/show_bug.cgi?id=118993
        <rdar://problem/14478260>

        Reviewed by Enrica Casucci.

        Test: platform/mac/editing/input/firstrectforcharacterrange-vertical.html

        * editing/Editor.cpp:
        (WebCore::collapseCaretWidth): A helper function.
        (WebCore::Editor::firstRectForRange): Many changes:
        - use RenderObject::absoluteBoundingBoxRectForRange() in regular case, because
        that's more direct that getting caret rects and computing bounding rect from those.
        - handle collapsed ranges separately, because absoluteBoundingBoxRectForRange()
        doesn't provide the needed result, and because it can be done faster.
        - wherever we use carets to compute the result, account for vertical text (in a hackish
        way, as we don't have layout information at Editor level).

        * rendering/RenderBlock.cpp: (WebCore::RenderBlock::localCaretRect): Removed
        dead code.

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

9 years ago[Win] WebView didReceiveIcon delegate call doesn't have the icon in it
commit-queue@webkit.org [Tue, 23 Jul 2013 19:02:05 +0000 (19:02 +0000)]
[Win] WebView didReceiveIcon delegate call doesn't have the icon in it
https://bugs.webkit.org/show_bug.cgi?id=100379

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-07-23
Reviewed by Brent Fulgham.

Added missing icon to WebView didReceiveIcon delegate call, fixes <rdar://problem/5491010>.

* WebView.cpp:
(WebView::dispatchDidReceiveIconFromWebFrame):

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

9 years ago[CSS Shapes] New positioning model: Borders
commit-queue@webkit.org [Tue, 23 Jul 2013 18:49:19 +0000 (18:49 +0000)]
[CSS Shapes] New positioning model: Borders
https://bugs.webkit.org/show_bug.cgi?id=118822

Patch by Bem Jones-Bey <bjonesbe@adobe.com> on 2013-07-23
Reviewed by Dean Jackson.

Source/WebCore:

Converting to the shape coordinate system was not properly accounting
for borders and padding. This has been fixed and a new convienence
method added because of the added complexity of the conversion.

Test: csswg/submitted/shapes/shape-outside/shape-outside-floats-square-border-000.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::logicalLeftFloatOffsetForLine): Update to use
    computeSegmentsForContainingBlockLine to do the coordinate
    conversion.
(WebCore::RenderBlock::logicalRightFloatOffsetForLine): Ditto.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): Ditto.
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::computeSegmentsForContainingBlockLine):
    Add new method to do the coordinate conversion from the containing
    block coordinate system to the coordinate system of the shape so
    that the segments can be correctly calculated.

LayoutTests:

Test that the shape is properly respected when the float has a border.

* csswg/submitted/shapes/shape-outside/shape-outside-floats-square-border-000-expected.html: Added.
* csswg/submitted/shapes/shape-outside/shape-outside-floats-square-border-000.html: Added.
* csswg/submitted/shapes/shape-outside/w3c-import.log: Updated with new
    import information.

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

9 years ago[CSS Regions] Convert percentage-margins-* tests to ref-tests
abucur@adobe.com [Tue, 23 Jul 2013 17:36:42 +0000 (17:36 +0000)]
[CSS Regions] Convert percentage-margins-* tests to ref-tests
https://bugs.webkit.org/show_bug.cgi?id=118723

Reviewed by Andreas Kling.

The patch converts the percentage margins tests for regions in ref tests.

* fast/regions/percentage-margins-mixed-ltr-dominant-regions-expected.html: Added.
* fast/regions/percentage-margins-mixed-ltr-dominant-regions.html:
* fast/regions/percentage-margins-mixed-rtl-dominant-regions-expected.html: Added.
* fast/regions/percentage-margins-mixed-rtl-dominant-regions.html:
* fast/regions/percentage-margins-rtl-variable-width-regions-expected.html: Added.
* fast/regions/percentage-margins-rtl-variable-width-regions.html:
* fast/regions/percentage-margins-variable-width-regions-expected.html: Added.
* fast/regions/percentage-margins-variable-width-regions.html:
* platform/efl/fast/regions/percentage-margins-mixed-ltr-dominant-regions-expected.png: Removed.
* platform/efl/fast/regions/percentage-margins-mixed-ltr-dominant-regions-expected.txt: Removed.
* platform/efl/fast/regions/percentage-margins-mixed-rtl-dominant-regions-expected.png: Removed.
* platform/efl/fast/regions/percentage-margins-mixed-rtl-dominant-regions-expected.txt: Removed.
* platform/efl/fast/regions/percentage-margins-rtl-variable-width-regions-expected.png: Removed.
* platform/efl/fast/regions/percentage-margins-rtl-variable-width-regions-expected.txt: Removed.
* platform/efl/fast/regions/percentage-margins-variable-width-regions-expected.png: Removed.
* platform/efl/fast/regions/percentage-margins-variable-width-regions-expected.txt: Removed.
* platform/gtk/fast/regions/percentage-margins-mixed-ltr-dominant-regions-expected.png: Removed.
* platform/gtk/fast/regions/percentage-margins-mixed-ltr-dominant-regions-expected.txt: Removed.
* platform/gtk/fast/regions/percentage-margins-mixed-rtl-dominant-regions-expected.png: Removed.
* platform/gtk/fast/regions/percentage-margins-mixed-rtl-dominant-regions-expected.txt: Removed.
* platform/gtk/fast/regions/percentage-margins-rtl-variable-width-regions-expected.png: Removed.
* platform/gtk/fast/regions/percentage-margins-rtl-variable-width-regions-expected.txt: Removed.
* platform/gtk/fast/regions/percentage-margins-variable-width-regions-expected.png: Removed.
* platform/gtk/fast/regions/percentage-margins-variable-width-regions-expected.txt: Removed.
* platform/mac/fast/regions/percentage-margins-mixed-ltr-dominant-regions-expected.png: Removed.
* platform/mac/fast/regions/percentage-margins-mixed-ltr-dominant-regions-expected.txt: Removed.
* platform/mac/fast/regions/percentage-margins-mixed-rtl-dominant-regions-expected.png: Removed.
* platform/mac/fast/regions/percentage-margins-mixed-rtl-dominant-regions-expected.txt: Removed.
* platform/mac/fast/regions/percentage-margins-rtl-variable-width-regions-expected.png: Removed.
* platform/mac/fast/regions/percentage-margins-rtl-variable-width-regions-expected.txt: Removed.
* platform/mac/fast/regions/percentage-margins-variable-width-regions-expected.png: Removed.
* platform/mac/fast/regions/percentage-margins-variable-width-regions-expected.txt: Removed.
* platform/qt/fast/regions/percentage-margins-mixed-ltr-dominant-regions-expected.png: Removed.
* platform/qt/fast/regions/percentage-margins-mixed-ltr-dominant-regions-expected.txt: Removed.
* platform/qt/fast/regions/percentage-margins-mixed-rtl-dominant-regions-expected.png: Removed.
* platform/qt/fast/regions/percentage-margins-mixed-rtl-dominant-regions-expected.txt: Removed.
* platform/qt/fast/regions/percentage-margins-rtl-variable-width-regions-expected.png: Removed.
* platform/qt/fast/regions/percentage-margins-rtl-variable-width-regions-expected.txt: Removed.
* platform/qt/fast/regions/percentage-margins-variable-width-regions-expected.png: Removed.
* platform/qt/fast/regions/percentage-margins-variable-width-regions-expected.txt: Removed.

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

9 years agoUnreviewed build fix after r153054.
timothy_horton@apple.com [Tue, 23 Jul 2013 17:36:03 +0000 (17:36 +0000)]
Unreviewed build fix after r153054.

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

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

9 years agoRemove deprecated and unused compositing settings
allan.jensen@digia.com [Tue, 23 Jul 2013 17:16:25 +0000 (17:16 +0000)]
Remove deprecated and unused compositing settings
https://bugs.webkit.org/show_bug.cgi?id=119014

Reviewed by Andreas Kling.

Source/WebCore:

* page/Settings.in:

Source/WebKit/qt:

Remove A set of settings to control accelerated compositing that have long been
replaced with triggers returned by ChromeClient, but haven't been fully removed.

They are only set by the Qt port but not read anywhere.

* Api/qwebsettings.cpp:
(QWebSettingsPrivate::apply):

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

9 years agoAdd a test for plug-in unavailability indicator obscurity detection
timothy_horton@apple.com [Tue, 23 Jul 2013 17:14:52 +0000 (17:14 +0000)]
Add a test for plug-in unavailability indicator obscurity detection
https://bugs.webkit.org/show_bug.cgi?id=119007

Reviewed by Anders Carlsson.

Test: plugins/unavailable-plugin-indicator-obscurity.html

Expose the ability to test whether the unavailable plugin indicator
is obscured via the internals object.

* testing/Internals.cpp:
(WebCore::Internals::isPluginUnavailabilityIndicatorObscured):
* testing/Internals.h:
* testing/Internals.idl:
Expose RenderEmbeddedObject::isReplacementObscured as
internals.isPluginUnavailabilityIndicatorObscured for testing purposes.

Expose the ability to block plug-ins via pluginLoadPolicy to testRunner.

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setBlockAllPlugins):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
Add testRunner.setBlockAllPlugins function (and corresponding message to
forward it through to TestController).

* WebKitTestRunner/TestController.cpp:
Initialize m_shouldBlockAllPlugins to false (and drive-by initialize m_handlesAuthenticationChallenges).

(WTR::TestController::createWebViewWithOptions):
Register our pluginLoadPolicy callback.

(WTR::TestController::resetStateToConsistentValues):
Reset m_shouldBlockAllPlugins to false.

(WTR::TestController::pluginLoadPolicy):
Return the existing plugin load policy, unless setBlockAllPlugins(true)
was called, in which case we reject all plugins with kWKPluginLoadPolicyBlocked.

* WebKitTestRunner/TestController.h:
(WTR::TestController::setBlockAllPlugins):

Add a test that ensures that RenderEmbeddedObject accurately detects the
various different ways the unavailable plugin dialog can be obscured.

* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:
* plugins/unavailable-plugin-indicator-obscurity-expected.txt: Added.
* plugins/unavailable-plugin-indicator-obscurity.html: Added.

* Source/autotools/symbols.filter:
Expose RenderEmbeddedObject::isReplacementObscured to internals.

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

9 years ago[Qt] REGRESSION(r152906) Modified fast/shapes/shape-inside/shape-inside-overflow...
zoltan@webkit.org [Tue, 23 Jul 2013 16:43:10 +0000 (16:43 +0000)]
[Qt] REGRESSION(r152906) Modified fast/shapes/shape-inside/shape-inside-overflow.html ref test fails.
https://bugs.webkit.org/show_bug.cgi?id=118964

Reviewed by Andreas Kling.

I modified the test to use Ahem font. Now it's working well on Qt as well.

* fast/shapes/shape-inside/shape-inside-overflow-expected.html:
* fast/shapes/shape-inside/shape-inside-overflow.html:

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

9 years ago[GTK] GtkAdjustmentWatcher idle source not correctly handled
carlosgc@webkit.org [Tue, 23 Jul 2013 15:36:05 +0000 (15:36 +0000)]
[GTK] GtkAdjustmentWatcher idle source not correctly handled
https://bugs.webkit.org/show_bug.cgi?id=119003

Reviewed by Martin Robinson.

GtkAdjustmentWatcher::updateAdjustmentsFromScrollbarsLater()
creates a new idle source and initializes
m_updateAdjustmentCallbackId, which is used everywhere and
specially in the destructor to cancel the source when the
GtkAdjustmentWatcher is deleted. However,
m_updateAdjustmentCallbackId is reset to 0 in
GtkAdjustmentWatcher::updateAdjustmentsFromScrollbars() only when
not returning early. This method is public and not only called by
the updateAdjustmentCallback, which means that a call to
updateAdjustmentsFromScrollbars could reset the
m_updateAdjustmentCallbackId without actually destroying the source.

* WebCoreSupport/GtkAdjustmentWatcher.cpp:
(WebKit::GtkAdjustmentWatcher::updateAdjustmentsFromScrollbars):
Cancel the adjustment later idle if it has been scheduled.
(WebKit::GtkAdjustmentWatcher::updateAdjustmentCallback): Reset
m_updateAdjustmentCallbackId.
* WebCoreSupport/GtkAdjustmentWatcher.h:

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

9 years ago[GTK] Unreviewed gardening. Added expectations for flaky tests.
mario@webkit.org [Tue, 23 Jul 2013 13:34:39 +0000 (13:34 +0000)]
[GTK] Unreviewed gardening. Added expectations for flaky tests.

* platform/gtk/TestExpectations: Added new expectations.

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

9 years ago[GTK] Unreviewed gardening. Unskip passing tests.
commit-queue@webkit.org [Tue, 23 Jul 2013 13:32:34 +0000 (13:32 +0000)]
[GTK] Unreviewed gardening. Unskip passing tests.
https://bugs.webkit.org/show_bug.cgi?id=119008

Unreviewed GTK gardening.

Patch by Simon Pena <simon.pena@samsung.com> on 2013-07-23

* platform/gtk/TestExpectations: unskip editing/selection/mixed-editability-10.html,
editing/selection/5825350-1.html and editing/selection/5825350-2.html since they have new
baselines, unskip http/tests/security/mixedContent/insecure-audio-video-in-main-frame.html
after r152778, unskip fast/images/webgl-teximage2d.html after r152531 and
svg/custom/xlink-prefix-in-attributes.html after r152785

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

9 years ago[GTK] Unreviewed gardening. Baseline and rebaseline needed after r152612 and r152911.
mario@webkit.org [Tue, 23 Jul 2013 13:20:41 +0000 (13:20 +0000)]
[GTK] Unreviewed gardening. Baseline and rebaseline needed after r152612 and r152911.

* platform/gtk/editing/caret/caret-color-expected.txt: Added.
* platform/gtk/fast/multicol/shrink-to-column-height-for-pagination-expected.txt: Updated.

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

9 years ago[EFL][WK2] Add doneWithTouchEvent callback to the WKViewClient.
commit-queue@webkit.org [Tue, 23 Jul 2013 12:35:48 +0000 (12:35 +0000)]
[EFL][WK2] Add doneWithTouchEvent callback to the WKViewClient.
https://bugs.webkit.org/show_bug.cgi?id=110085

Patch by Eunmi Lee <eunmi15.lee@samsung.com> on 2013-07-23
Reviewed by Kenneth Rohde Christiansen.

Add doneWithTouchEvent callback to the WKViewClient in order to get the
result of touch events in the EwkView. The result will be used to
recognize gestures in the Bug 102643.

APIs to get values from WKTouchEventRef and WKTouchPointRef are added
because WKTypeRef is opaque to the applications.

* UIProcess/API/C/CoordinatedGraphics/WKView.h:
* UIProcess/API/C/efl/WKAPICastEfl.h:
(WebKit::toAPI):
* UIProcess/API/C/efl/WKEventEfl.cpp:
(WKTouchEventGetType):
(WKTouchEventGetTouchPoints):
(WKTouchEventGetModifiers):
(WKTouchEventGetTimestamp):
(WKTouchPointGetID):
(WKTouchPointGetState):
(WKTouchPointGetScreenPosition):
(WKTouchPointGetPosition):
(WKTouchPointGetRadius):
(WKTouchPointGetRotationAngle):
(WKTouchPointGetForceFactor):
* UIProcess/API/C/efl/WKEventEfl.h:
* UIProcess/API/efl/EwkView.cpp:
(EwkView::doneWithTouchEvent):
* UIProcess/API/efl/EwkView.h:
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::doneWithTouchEvent):
* UIProcess/CoordinatedGraphics/WebViewClient.cpp:
(WebKit::WebViewClient::doneWithTouchEvent):
* UIProcess/CoordinatedGraphics/WebViewClient.h:
* UIProcess/efl/ViewClientEfl.cpp:
(WebKit::ViewClientEfl::doneWithTouchEvent):
(WebKit::ViewClientEfl::ViewClientEfl):
* UIProcess/efl/ViewClientEfl.h:

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

9 years ago[GTK] Unreviewed gardening. Added needed baselines after r104133.
mario@webkit.org [Tue, 23 Jul 2013 12:24:40 +0000 (12:24 +0000)]
[GTK] Unreviewed gardening. Added needed baselines after r104133.

* platform/gtk/perf/nested-combined-selectors-expected.txt: Added.

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

9 years ago[Soup] Clean up header inclusions in ResourceRequest(Soup), SocketStreamHandle
zandobersek@gmail.com [Tue, 23 Jul 2013 11:51:04 +0000 (11:51 +0000)]
[Soup] Clean up header inclusions in ResourceRequest(Soup), SocketStreamHandle
https://bugs.webkit.org/show_bug.cgi?id=118984

Reviewed by Darin Adler.

Execute a minor cleanup of the header inclusions in Soup-specific ResourceRequestSoup.cpp, ResourceRequest.h
and SocketStreamHandle.h source files. The inclusions are sorted into proper order, with blank lines and unnecessary
reinclusions removed.

* platform/network/soup/ResourceRequest.h:
* platform/network/soup/ResourceRequestSoup.cpp:
* platform/network/soup/SocketStreamHandle.h:

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

9 years ago[Soup] Remove unnecessary header inclusions in ResourceHandleSoup.cpp
zandobersek@gmail.com [Tue, 23 Jul 2013 11:38:39 +0000 (11:38 +0000)]
[Soup] Remove unnecessary header inclusions in ResourceHandleSoup.cpp
https://bugs.webkit.org/show_bug.cgi?id=118983

Reviewed by Martin Robinson.

Remove inclusions of the CachedResourceLoader, ChromeClient, Frame and Page headers. These are not
necessary (anymore) and only prevent the source file to be built independently of WebCore, as it should be.

* platform/network/soup/ResourceHandleSoup.cpp:

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

9 years agoWebSocket initialization to use remote inspector
commit-queue@webkit.org [Tue, 23 Jul 2013 11:30:47 +0000 (11:30 +0000)]
WebSocket initialization to use remote inspector
https://bugs.webkit.org/show_bug.cgi?id=118678

Patch by Roland Takacs <rtakacs@inf.u-szeged.hu> on 2013-07-23
Reviewed by Timothy Hatcher.

Add WebSocket initialization and define a 'connect-src' directive in the
Content-Security-Policy HTTP header to enable the connection.

* UserInterface/InspectorFrontendHostStub.js:
(.WebInspector.InspectorFrontendHostStub.prototype.sendMessageToBackend):
* UserInterface/Main.html:
* UserInterface/Main.js:
(WebInspector.loaded):
(WebInspector._initializeWebSocketIfNeeded.createSocket.WebInspector):
(WebInspector._initializeWebSocketIfNeeded.createSocket):
(WebInspector._initializeWebSocketIfNeeded):

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

9 years agoRemove unnecessary header inclusions in GraphicsContext3D.cpp, GraphicsContext3DOpenG...
zandobersek@gmail.com [Tue, 23 Jul 2013 11:25:20 +0000 (11:25 +0000)]
Remove unnecessary header inclusions in GraphicsContext3D.cpp, GraphicsContext3DOpenGLCommon.cpp
https://bugs.webkit.org/show_bug.cgi?id=118989

Reviewed by Darin Adler.

* platform/graphics/GraphicsContext3D.cpp: Remove the unnecessary DrawingBuffer header inclusion.
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: Remove the unnecessary
CanvasRenderingContext and WebGLObject header inclusions.

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

9 years agoRemove the topDocumentURL member of the GraphicsContext3D::Attributes struct
zandobersek@gmail.com [Tue, 23 Jul 2013 11:24:10 +0000 (11:24 +0000)]
Remove the topDocumentURL member of the GraphicsContext3D::Attributes struct
https://bugs.webkit.org/show_bug.cgi?id=118987

Reviewed by Darin Adler.

Remove the topDocumentURL member that currently resides in the GraphicsContext3D::Attributes struct.
It's not used anywhere and only has one place where it is set, in WebGLRenderingContext::create.

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::create):
* platform/graphics/GraphicsContext3D.h:

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

9 years agoRemove unused DrawingBuffer::paintRenderingResultsToImageData
zandobersek@gmail.com [Tue, 23 Jul 2013 11:21:59 +0000 (11:21 +0000)]
Remove unused DrawingBuffer::paintRenderingResultsToImageData
https://bugs.webkit.org/show_bug.cgi?id=118986

Reviewed by Darin Adler.

Remove the paintRenderingResultsToImageData method of the DrawingBuffer class. It is not used anywhere
and also introduces a nasty layering violation by including and operating with the ImageData class.

* platform/graphics/gpu/DrawingBuffer.cpp:
* platform/graphics/gpu/DrawingBuffer.h:

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

9 years agoRemove unnecessary includes in FormDataBuilder.cpp
zandobersek@gmail.com [Tue, 23 Jul 2013 11:20:01 +0000 (11:20 +0000)]
Remove unnecessary includes in FormDataBuilder.cpp
https://bugs.webkit.org/show_bug.cgi?id=118991

Reviewed by Darin Adler.

* platform/network/FormDataBuilder.cpp: Remove the Frame and FrameLoader header inclusions,
nothing these two headers provide is used in this source file.

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

9 years agoFix the style of the ContentDispositionType enum definition
zandobersek@gmail.com [Tue, 23 Jul 2013 11:17:48 +0000 (11:17 +0000)]
Fix the style of the ContentDispositionType enum definition
https://bugs.webkit.org/show_bug.cgi?id=118990

Reviewed by Darin Adler.

* platform/network/HTTPParsers.h: Align the style of the ContentDispositionType enumeration
definition with the other enumeration definitions in the HTTPParsers header, using the
'enum Name { ... }' style instead of a typedef.

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

9 years ago[GTK] Unreviewed gardening. New baselines after r152941.
commit-queue@webkit.org [Tue, 23 Jul 2013 10:35:44 +0000 (10:35 +0000)]
[GTK] Unreviewed gardening. New baselines after r152941.
https://bugs.webkit.org/show_bug.cgi?id=119005

Unreviewed GTK gardening.

GTK's DumpRenderTree prints CONFIRM instead of CONFIRM NAVIGATION, so we need
platform-specific expectations.

Patch by Simon Pena <simon.pena@samsung.com> on 2013-07-23

* platform/gtk/fast/loader/show-only-one-beforeunload-dialog-expected.txt: Added.
* platform/gtk/http/tests/misc/iframe-beforeunload-dialog-matching-ancestor-securityorigin-expected.txt: Added.

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

9 years ago[GTK] Unreviewed gardening. Skip failing test.
commit-queue@webkit.org [Tue, 23 Jul 2013 10:08:41 +0000 (10:08 +0000)]
[GTK] Unreviewed gardening. Skip failing test.
https://bugs.webkit.org/show_bug.cgi?id=119006

Unreviewed GTK gardening.

Patch by Simon Pena <simon.pena@samsung.com> on 2013-07-23

* platform/gtk/TestExpectations: mathml/presentation/fenced-mi.html fails
after being converted to ref test.

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

9 years ago[GTK] Unreviewed gardening. Added needed baselines for GTK+.
mario@webkit.org [Tue, 23 Jul 2013 10:03:05 +0000 (10:03 +0000)]
[GTK] Unreviewed gardening. Added needed baselines for GTK+.

* platform/gtk/fast/block/lineboxcontain/block-with-ideographs-expected.txt: Added.
* platform/gtk/fast/css-generated-content/details-summary-before-after-expected.txt: Added.
* platform/gtk/fast/css3-text/css3-text-decoration/text-decoration-line-scaled-expected.txt: Added.
* platform/gtk/fast/regions/region-dynamic-after-before-expected.txt: Added.
* platform/gtk/fast/regions/region-generated-content-before-after-expected.txt: Added.
* platform/gtk/fast/text/text-combine-different-fonts-expected.txt: Added.
* platform/gtk/svg/text/text-overflow-ellipsis-svgfont-kerning-ligatures-expected.txt: Added.

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

9 years ago[GTK] Mock GDK_IS_X11_DISPLAY macro can be redefined unnecessarily
zandobersek@gmail.com [Tue, 23 Jul 2013 09:49:31 +0000 (09:49 +0000)]
[GTK] Mock GDK_IS_X11_DISPLAY macro can be redefined unnecessarily
https://bugs.webkit.org/show_bug.cgi?id=118980

Reviewed by Martin Robinson.

* platform/gtk/GtkVersioning.h: Only define the GDK_IS_X11_DISPLAY macro when using the GTK+ 2 API version
as that's the only supported configuration where the macro is not defined. Definining it only if it's not
yet defined at the time of inclusion of this header can cause redefinitions in GTK+ headers that are normally
included later.

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

9 years agoEnable some MathML reftests on Windows and EFL ports.
commit-queue@webkit.org [Tue, 23 Jul 2013 08:24:58 +0000 (08:24 +0000)]
Enable some MathML reftests on Windows and EFL ports.
https://bugs.webkit.org/show_bug.cgi?id=118916

Patch by Frédéric Wang <fred.wang@free.fr> on 2013-07-23
Reviewed by Chris Fleizach.

* platform/efl/TestExpectations: do not skip over.html
* platform/win/TestExpectations: enable most of the non-pixel tests

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

9 years agoStickyPositionConstraints should store the constrainingRectAtLastLayout
bdakin@apple.com [Tue, 23 Jul 2013 04:52:27 +0000 (04:52 +0000)]
StickyPositionConstraints should store the constrainingRectAtLastLayout
https://bugs.webkit.org/show_bug.cgi?id=118999

Reviewed by Simon Fraser.

Much like how FixedPositionConstraints store a viewportRectAtLastLayout,
StickyConstraints should store a constrainingRectAtLastLayout. We'll need this to
get sticky right in overflow areas once overflow areas scroll on the scrolling
thread.

* page/scrolling/ScrollingConstraints.h:
(WebCore::StickyPositionViewportConstraints::StickyPositionViewportConstraints):
(WebCore::StickyPositionViewportConstraints::constrainingRectAtLastLayout):
(WebCore::StickyPositionViewportConstraints::setConstrainingRectAtLastLayout):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::computeStickyPositionConstraints):

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

9 years agoDateInputType constructor initiate incorrect base class
commit-queue@webkit.org [Tue, 23 Jul 2013 01:43:21 +0000 (01:43 +0000)]
DateInputType constructor initiate incorrect base class
https://bugs.webkit.org/show_bug.cgi?id=118962

Patch by Santosh Mahto <santosh.ma@samsung.com> on 2013-07-22
Reviewed by Gyuyoung Kim.

No new test required since solving code error

* html/DateInputType.cpp:
(WebCore::DateInputType::DateInputType):
Corrected the base class instantiation in constructor.

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

9 years agoPlug-in unavailability indicator should not be displayed if a blocked plugin's indica...
timothy_horton@apple.com [Tue, 23 Jul 2013 01:02:59 +0000 (01:02 +0000)]
Plug-in unavailability indicator should not be displayed if a blocked plugin's indicator is clipped
https://bugs.webkit.org/show_bug.cgi?id=118998
<rdar://problem/14511268>

Reviewed by Anders Carlsson.

* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::updateWidget):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::updateWidget):
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::defaultEventHandler):
(WebCore::HTMLPlugInElement::supportsFocus):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::updateWidgetIfNecessary):
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::createJavaAppletWidget):
(WebCore::SubframeLoader::loadPlugin):
* page/FrameView.cpp:
(WebCore::FrameView::updateWidget):
Rename showsUnavailablePluginIndicator to isPluginUnavailable, since being unavailable
and actually showing the indicator are two totally different things.

* WebCore.exp.in: Expose setUnavailablePluginIndicatorIsHidden.

* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::RenderEmbeddedObject):
Rename m_showsUnavailablePluginIndicator to m_isPluginUnavailable.
Add m_isUnavailablePluginIndicatorHidden, defaulting to false.

(WebCore::RenderEmbeddedObject::setPluginUnavailabilityReasonWithDescription):
Set m_isPluginUnavailable when we get an unavailability reason.

(WebCore::RenderEmbeddedObject::paint):
(WebCore::RenderEmbeddedObject::setUnavailablePluginIndicatorIsHidden): Added.

* rendering/RenderEmbeddedObject.h:
(WebCore::RenderEmbeddedObject::isPluginUnavailable): Added.

(WebCore::RenderEmbeddedObject::showsUnavailablePluginIndicator):
Repurpose "showsUnavailablePluginIndicator" to actually represent whether
the indicator is displayed (i.e. the plugin is unavailable, and the
indicator is not hidden).

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

9 years agoRenderEmbeddedObject::isReplacementObscured should include the arrow in its area...
timothy_horton@apple.com [Tue, 23 Jul 2013 00:14:59 +0000 (00:14 +0000)]
RenderEmbeddedObject::isReplacementObscured should include the arrow in its area-of-interest
https://bugs.webkit.org/show_bug.cgi?id=118995
<rdar://problem/14516421>

Reviewed by Anders Carlsson.

* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::unavailablePluginIndicatorBounds):
Rename method from replacementTextRect to unavailablePluginIndicatorBounds for accuracy.
Use the bounding box of the indicator's path, which includes the rounded rect behind
the text as well as the arrow button.

(WebCore::RenderEmbeddedObject::isReplacementObscured):
* rendering/RenderEmbeddedObject.h:

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

9 years ago<applet> plugins are instantiated post-attach (instead of post-layout like for object...
timothy_horton@apple.com [Tue, 23 Jul 2013 00:05:46 +0000 (00:05 +0000)]
<applet> plugins are instantiated post-attach (instead of post-layout like for object and embed)
https://bugs.webkit.org/show_bug.cgi?id=118994
<rdar://problem/14511232>

Reviewed by Anders Carlsson.

Make <applet> consistent with <object> and <embed>, deferring plugin
instantiation to post-layout, so that layout is up-to-date if anything
needs it (like RenderEmbeddedObject::isReplacementObscured) during creation.

* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::updateWidget):
Copy code from HTMLObjectElement/HTMLEmbedElement that defers plugin
creation until post-layout tasks. Java is always an NPAPI plugin, so
we should always defer if requested.

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

9 years agoString::lower() - Skip to slow path on the first failure
benjamin@webkit.org [Mon, 22 Jul 2013 22:29:03 +0000 (22:29 +0000)]
String::lower() - Skip to slow path on the first failure
https://bugs.webkit.org/show_bug.cgi?id=118885

Reviewed by Andreas Kling.

In the 8 bits case, we don't need to know the state of the full string before changing characters
to their lowercase variant.
Just fail immediately and start transforming characters from the point of failure.

This avoid reading the string twice when the uppercase character is not at the end of the string.

* wtf/text/StringImpl.cpp:
(WTF::StringImpl::lower):

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

9 years agoDo not allocate 2 AtomicString just to do a comparison in HTMLAnchorElement::setRel()
benjamin@webkit.org [Mon, 22 Jul 2013 22:23:14 +0000 (22:23 +0000)]
Do not allocate 2 AtomicString just to do a comparison in HTMLAnchorElement::setRel()
https://bugs.webkit.org/show_bug.cgi?id=118941

Reviewed by Gavin Barraclough.

Currently, the only type of link relation supported by HTMLAnchorElement is RelationNoReferrer.

To find the value, we create a SpaceSplitString with the input value of the attribute (which
create one or more AtomicString depending on the input). Then we create a new AtomicString for
the literal "noreferrer". Finally, we compare the pointers and throw away all the AtomicStrings.

This causes a lot of memory operations for something really simple.

This patch adds a little helper method to SpaceSplitString to find a literal in the input. The only
allocation happens if we need to foldCase(). The following operations are done without allocating
new buffer and without hashing the input.

* dom/SpaceSplitString.cpp:
(WebCore::tokenizeSpaceSplitString):
(WebCore::AppendTokenToVectorTokenProcessor::AppendTokenToVectorTokenProcessor):
(WebCore::AppendTokenToVectorTokenProcessor::processToken):
(WebCore::SpaceSplitStringData::createVector):
(WebCore::TokenIsEqualToCStringTokenProcessor::TokenIsEqualToCStringTokenProcessor):
(WebCore::TokenIsEqualToCStringTokenProcessor::processToken):
(WebCore::TokenIsEqualToCStringTokenProcessor::referenceStringWasFound):
(WebCore::SpaceSplitString::spaceSplitStringContainsValue):
* dom/SpaceSplitString.h:
(WebCore::SpaceSplitString::spaceSplitStringContainsValue):
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::setRel):

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

9 years agosegfault in RenderLayerCompositor when the iframe's position attribute is changed...
commit-queue@webkit.org [Mon, 22 Jul 2013 22:10:07 +0000 (22:10 +0000)]
segfault in RenderLayerCompositor when the iframe's position attribute is changed and it embeds <object>.
https://bugs.webkit.org/show_bug.cgi?id=118965

Patch by Zalan Bujtas <zalan@apple.com> on 2013-07-22
Reviewed by Simon Fraser.

Do not change the composition state unless we can reliably figure out the iframe's size.
If the renderer is not yet attached, its size is not computable.

Source/WebCore:

Test: compositing/iframes/iframe-position-absolute-with-padding-percentage-crash.html

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

LayoutTests:

* compositing/iframes/iframe-position-absolute-with-padding-percentage-crash-expected.txt: Added.
* compositing/iframes/iframe-position-absolute-with-padding-percentage-crash.html: Added.
* compositing/iframes/resources/embed-tag-with-composition.html: Added.
* platform/efl/TestExpectations: skip
* platform/efl-wk2/TestExpectations: skip
* platform/qt-5.0-wk1/TestExpectations: skip
* platform/qt-5.0-wk2/TestExpectations: skip

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

9 years agoAX: VoiceOver only read the first column in a safari table
cfleizach@apple.com [Mon, 22 Jul 2013 22:04:23 +0000 (22:04 +0000)]
AX: VoiceOver only read the first column in a safari table
https://bugs.webkit.org/show_bug.cgi?id=118992

Reviewed by Tim Horton.

Source/WebCore:

In case the first section has fewer columns than the rest of the table, the AXTable was only reporting the number of
columns for the first section. We need to take the max number of columns out of all sections.

Test: accessibility/table-with-mismatch-column-count-in-initial-section.html

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

LayoutTests:

* accessibility/table-with-mismatch-column-count-in-initial-section-expected.txt: Added.
* accessibility/table-with-mismatch-column-count-in-initial-section.html: Added.

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