REGRESSION (r172832): Poor 2-finger scrolling performance at theverge.com articles 
(all tiles repaint)
https://bugs.webkit.org/show_bug.cgi?id=136433
-and corresponding-
rdar://problem/18193942

Reviewed by Tim Horton.

Source/WebCore:

We should ensure that we are only setting scroll elasticity for layers that return 
true for scrollsOverflow(). When overflow:scroll is set on the root element, we 
wound up setting the ScrollElasticity for the root, which messed up with the 
special way that the root is meant to scroll. Even though overflow:scroll has been 
set on the root, scrollsOverflow() is still false because we knew not to set 
hasOverflowClip() since it’s the root, which is why this check works.  
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setHasHorizontalScrollbar):
(WebCore::RenderLayer::setHasVerticalScrollbar):

Really, we should have never even called RenderLayer::setHasVerticalScrollbar or 
RenderLayer::setHasHorizontalScrollbar since it’s wrong to be creating a scrollbar 
on RenderLayer for the root. We should make sure, in addition to the other 
requirements consulted, that the renderer has an overflow clip before we create 
the scrollbars.
(WebCore::RenderLayer::updateScrollbarsAfterStyleChange):

LayoutTests:

* platform/mac-wk2/tiled-drawing/scrolling/root-overflow-with-mousewheel-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/scrolling/root-overflow-with-mousewheel.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173275 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove WebCoreSystemInterface glue for otherwise unused WKSI calls
https://bugs.webkit.org/show_bug.cgi?id=136527

Reviewed by Alexey Proskuryakov.

Source/WebCore:

* WebCore.exp.in:
* WebCore.order:
* platform/ios/WebCoreSystemInterfaceIOS.mm:
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:

Source/WebKit/mac:

* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface):

Source/WebKit2:

* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173276 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Try to fix iOS build.

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



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173277 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use WTFString::find(char) in more places
https://bugs.webkit.org/show_bug.cgi?id=136541

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-09-04
Reviewed by Daniel Bates.

* Modules/plugins/YouTubePluginReplacement.cpp:
(WebCore::queryKeysAndValues):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::parseAttribute):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parametersForPlugin):
* html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::decodedSnippetForAttribute):
* page/UserContentURLPattern.cpp:
(WebCore::UserContentURLPattern::parse):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173278 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Beef up the DFG's CFG analyses to include iterated dominance frontiers and more user-friendly BlockSets
https://bugs.webkit.org/show_bug.cgi?id=136520

Reviewed by Geoffrey Garen.
        
Source/JavaScriptCore:

Add code to compute iterated dominance frontiers. This involves using BlockSet a lot, so
this patch also makes BlockSet a lot more user-friendly.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGBasicBlock.h:
* dfg/DFGBlockSet.cpp: Added.
(JSC::DFG::BlockSet::dump):
* dfg/DFGBlockSet.h:
(JSC::DFG::BlockSet::iterator::iterator):
(JSC::DFG::BlockSet::iterator::operator++):
(JSC::DFG::BlockSet::iterator::operator==):
(JSC::DFG::BlockSet::iterator::operator!=):
(JSC::DFG::BlockSet::Iterable::Iterable):
(JSC::DFG::BlockSet::Iterable::begin):
(JSC::DFG::BlockSet::Iterable::end):
(JSC::DFG::BlockSet::iterable):
(JSC::DFG::BlockAdder::BlockAdder):
(JSC::DFG::BlockAdder::operator()):
* dfg/DFGBlockSetInlines.h: Added.
(JSC::DFG::BlockSet::iterator::operator*):
* dfg/DFGDominators.cpp:
(JSC::DFG::Dominators::strictDominatorsOf):
(JSC::DFG::Dominators::dominatorsOf):
(JSC::DFG::Dominators::blocksStrictlyDominatedBy):
(JSC::DFG::Dominators::blocksDominatedBy):
(JSC::DFG::Dominators::dominanceFrontierOf):
(JSC::DFG::Dominators::iteratedDominanceFrontierOf):
* dfg/DFGDominators.h:
(JSC::DFG::Dominators::forAllStrictDominatorsOf):
(JSC::DFG::Dominators::forAllDominatorsOf):
(JSC::DFG::Dominators::forAllBlocksStrictlyDominatedBy):
(JSC::DFG::Dominators::forAllBlocksDominatedBy):
(JSC::DFG::Dominators::forAllBlocksInDominanceFrontierOf):
(JSC::DFG::Dominators::forAllBlocksInIteratedDominanceFrontierOf):
(JSC::DFG::Dominators::forAllBlocksInDominanceFrontierOfImpl):
(JSC::DFG::Dominators::forAllBlocksInIteratedDominanceFrontierOfImpl):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dumpBlockHeader):
* dfg/DFGInvalidationPointInjectionPhase.cpp:
(JSC::DFG::InvalidationPointInjectionPhase::run):

Source/WTF:

Give BitVector a way to quickly find the next set (or unset) bit. Make BitVector equality
faster. Fix a minor closure goof in Spectrum.

* wtf/BitVector.cpp:
(WTF::BitVector::equalsSlowCase):
(WTF::BitVector::equalsSlowCaseFast):
(WTF::BitVector::equalsSlowCaseSimple):
* wtf/BitVector.h:
(WTF::BitVector::findBit):
(WTF::BitVector::findBitFast):
(WTF::BitVector::findBitSimple):
(WTF::BitVector::findBitInWord):
* wtf/Spectrum.h:
(WTF::Spectrum::removeIf):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173279 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Beef up the DFG's CFG analyses to include iterated dominance frontiers and more user-friendly BlockSets
https://bugs.webkit.org/show_bug.cgi?id=136520

Fix bug found in Geoff's review but not landed in previous commit.

* wtf/BitVector.cpp:
(WTF::BitVector::equalsSlowCaseFast): return true.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173280 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Initial letters should clear one another.
https://bugs.webkit.org/show_bug.cgi?id=136514

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/css-generated-content/initial-letter-clearance.html.

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
Compute the required clearance and add it both to the block's logical height
and to the logical top offset of the float.

(WebCore::RenderBlockFlow::lowestInitialLetterLogicalBottom):
* rendering/RenderBlockFlow.h:
A new method for determining the lowest floating initial letter.

LayoutTests:

* fast/css-generated-content/initial-letter-clearance.html: Added.
* platform/mac/fast/css-generated-content/initial-letter-clearance-expected.png: Added.
* platform/mac/fast/css-generated-content/initial-letter-clearance-expected.txt: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173281 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r173031): crashes during run-layout-jsc on x86/Linux
https://bugs.webkit.org/show_bug.cgi?id=136436

Reviewed by Geoffrey Garen.

Instead of trying to calculate a stack pointer that allows for possible
stacked argument space, just use the "home" stack pointer location.
That stack pointer provides space for the worst case number of stacked
arguments on architectures that use stacked arguments.  It also provides
stack space so that the return PC and caller frame pointer that are stored
as part of making the call to operationCallEval will not override any part
of the callee frame created on the stack.

Changed compileCallEval() to use the stackPointer value of the calling
function.  That stack pointer is calculated to have enough space for
outgoing stacked arguments.  By moving the stack pointer to its "home"
position, the caller frame and return PC are not set as part of making
the call to operationCallEval().  Moved the explicit setting of the
callerFrame field of the callee CallFrame from operationCallEval() to
compileCallEval() since it has been the artifact of making a call for
most architectures.  Simplified the exception logic in compileCallEval()
as a result of the change.  To be compliant with the stack state
expected by virtualCallThunkGenerator(), moved the stack pointer to
point above the CallerFrameAndPC of the callee CallFrame.

* jit/JIT.h: Changed callOperationNoExceptionCheck(J_JITOperation_EE, ...)
to callOperation(J_JITOperation_EE, ...) as it now can do a typical exception
check.
* jit/JITCall.cpp & jit/JITCall32_64.cpp:
(JSC::JIT::compileCallEval): Use the home stack pointer when making the call
to operationCallEval.  Since the stack pointer adjustment no longer needs
to be done after making the call to operationCallEval(), the exception check
logic can be simplified.
(JSC::JIT::compileCallEvalSlowCase): Restored the stack pointer to point
to above the calleeFrame as this is what the generated thunk expects.
* jit/JITInlines.h:
(JSC::JIT::callOperation): Refactor of callOperationNoExceptionCheck
with the addition of a standard exception check.
(JSC::JIT::callOperationNoExceptionCheck): Deleted.
* jit/JITOperations.cpp:
(JSC::operationCallEval): Eliminated the explicit setting of caller frame
as that is now done in the code generated by compileCallEval().


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173282 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Cocoa] Some WebKitLegacy headers migrated from WebCore incorrectly contain WEBCORE_EXPORT
https://bugs.webkit.org/show_bug.cgi?id=136521

Reviewed by Anders Carlsson.

Source/WebCore:

* platform/ios/wak/WebCoreThread.h: Stopped defining WEBCORE_EXPORT.

Source/WebKit/mac:

Taught MigrateHeaders.make to remove WEBCORE_EXPORT from headers using this sed expression:

    s/(^ *)WEBCORE_EXPORT /\1/g

This removes WEBCORE_EXPORT and a single following space character but preserves preceeding whitespace.

* MigrateHeaders.make:

Source/WebKit2:

* config.h: Included <WebCore/PlatformExportMacros.h> instead of defining WEBCORE_EXPORT.

Tools:

* DumpRenderTree/config.h: Included <WebCore/PlatformExportMacros.h> instead of defining WEBCORE_EXPORT.
* TestWebKitAPI/config.h: Ditto.
* WebKitTestRunner/config.h: Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173283 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Speculative fix for a test failing on the bot.

* platform/mac-wk2/tiled-drawing/scrolling/root-overflow-with-mousewheel.html:



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