Change mousedown events to keydown events, since eventSender.mouseDown
wasn't firing onmousedown events on Mac.
https://bugs.webkit.org/show_bug.cgi?id=67960

Patch by Jeremy Apthorp <jeremya@chromium.org> on 2011-09-14
Reviewed by Adam Barth.

* fullscreen/full-screen-remove-ancestor-during-transition.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95126 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DFG should not speculate that the child of LogicalNot is a boolean if
predictions tell us otherwise
https://bugs.webkit.org/show_bug.cgi?id=68118

Reviewed by Geoffrey Garen.

* dfg/DFGJITCodeGenerator.cpp:
(JSC::DFG::JITCodeGenerator::nonSpeculativeLogicalNot):
* dfg/DFGJITCodeGenerator.h:
* dfg/DFGNonSpeculativeJIT.cpp:
(JSC::DFG::NonSpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compile):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95127 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove DocTypeStrings.gperf
https://bugs.webkit.org/show_bug.cgi?id=68119

Reviewed by Sam Weinig.

* CMakeLists.txt:
* CodeGenerators.pri:
* DerivedSources.make:
* GNUmakefile.am:
* WebCore.gyp/WebCore.gyp:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* html/DocTypeStrings.gperf: Removed.
* make-hash-tools.pl:
* platform/HashTools.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95128 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=52736

Tiles were not being properly centered within border image sides for the "repeat"
keyword. This patch fixes the buggy math behind the pattern tiling to actually get
the initial phases correct.

Source/WebCore: 

Reviewed by Sam Weinig.
        
Added new tests in fast/borders and updated broken existing tests.

* platform/graphics/Image.cpp:
(WebCore::Image::drawTiled):

LayoutTests: 

Reviewed by Sam Weinig.

* fast/borders/border-image-massive-scale.html: Added.
* fast/borders/border-image-scaled-gradient.html: Added.
* platform/mac/fast/borders/border-image-massive-scale-expected.png: Added.
* platform/mac/fast/borders/border-image-massive-scale-expected.txt: Added.
* platform/mac/fast/borders/border-image-outset-expected.png:
* platform/mac/fast/borders/border-image-outset-in-shorthand-expected.png:
* platform/mac/fast/borders/border-image-outset-split-inline-expected.png:
* platform/mac/fast/borders/border-image-outset-split-inline-vertical-lr-expected.png:
* platform/mac/fast/borders/border-image-scaled-gradient-expected.png: Added.
* platform/mac/fast/borders/border-image-scaled-gradient-expected.txt: Added.
* platform/mac/fast/borders/border-image-side-reduction-expected.png:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95129 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Get rid of WebCoreViewFactory and its WebViewFactory subclass
https://bugs.webkit.org/show_bug.cgi?id=68124

Reviewed by Sam Weinig.

../WebCore: 

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* editing/mac/FrameSelectionMac.mm:
* page/mac/FrameMac.mm:
* page/mac/WebCoreViewFactory.h: Removed.
* page/mac/WebCoreViewFactory.m: Removed.

../WebKit: 

* WebKit.xcodeproj/project.pbxproj:

../WebKit/mac: 

* WebCoreSupport/WebContextMenuClient.mm:
* WebCoreSupport/WebViewFactory.h: Removed.
* WebCoreSupport/WebViewFactory.mm: Removed.
* WebView/WebFrameView.mm:
(-[WebFrameView initWithFrame:]):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95130 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Update baselines due to r95070 and r95099.

* platform/chromium-cg-mac-leopard/fast/writing-mode/broken-ideographic-font-expected.png: Added.
* platform/chromium-cg-mac/fast/writing-mode/broken-ideographic-font-expected.png: Added.
* platform/chromium-cg-mac/fast/writing-mode/japanese-rl-text-with-broken-font-expected.png: Added.
* platform/chromium-cg-mac/fast/writing-mode/japanese-rl-text-with-broken-font-expected.txt: Added.
* platform/chromium-linux-x86/fast/borders/border-image-scrambled-expected.png: Added.
* platform/chromium-linux-x86/fast/borders/border-image-scrambled-expected.txt: Added.
* platform/chromium-linux/fast/borders/border-image-scrambled-expected.png: Added.
* platform/chromium-linux/fast/borders/border-image-scrambled-expected.txt: Added.
* platform/chromium-win-vista/fast/borders/border-image-scrambled-expected.png: Added.
* platform/chromium-win-vista/fast/borders/border-image-scrambled-expected.txt: Added.
* platform/chromium-win-xp/fast/borders/border-image-scrambled-expected.png: Added.
* platform/chromium-win-xp/fast/borders/border-image-scrambled-expected.txt: Added.
* platform/chromium/test_expectations.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95131 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Changed WebKit.gyp to use the new grit version of the scripts that handle
.pak files.
https://bugs.webkit.org/show_bug.cgi?id=68013

Patch by Nebojsa Ciric <cira@chromium.org> on 2011-09-14
Reviewed by Tony Chang.

* DEPS:
* WebKit.gyp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95132 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Media element tests should look up controller element locations
https://bugs.webkit.org/show_bug.cgi?id=68038

Get the position of controller elements from the shadow DOM.

Reviewed by Darin Adler.

* media/audio-delete-while-slider-thumb-clicked.html:
* media/audio-delete-while-step-button-clicked.html:
* media/controls-drag-timebar.html:
* media/controls-right-click-on-timebar.html:
* media/video-controls-transformed.html:
* media/video-controls-visible-audio-only.html:
* media/video-controls-zoomed.html:
* media/video-volume-slider.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95133 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tiered compilation heuristics do not account for value profile fullness
https://bugs.webkit.org/show_bug.cgi?id=68116

Reviewed by Oliver Hunt.
        
Tiered compilation avoids invoking the DFG JIT if it finds that value
profiles contain insufficient information. Instead, it produces a
prediction from the current value profile, and then clears the value
profile. This allows the value profile to heat up from scratch for
some number of additional executions. The new profiles will then be
merged with the previous prediction. Once the amount of information
in predictions is enough according to heuristics in CodeBlock.cpp,
DFG optimization is allowed to proceed.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::~CodeBlock):
(JSC::CodeBlock::visitAggregate):
(JSC::CodeBlock::visitWeakReferences):
(JSC::CodeBlock::shouldOptimizeNow):
(JSC::CodeBlock::dumpValueProfiles):
* bytecode/CodeBlock.h:
* bytecode/PredictedType.cpp:
(JSC::predictionToString):
* bytecode/PredictedType.h:
* bytecode/ValueProfile.cpp: Added.
(JSC::ValueProfile::computeStatistics):
(JSC::ValueProfile::computeUpdatedPrediction):
* bytecode/ValueProfile.h:
(JSC::ValueProfile::ValueProfile):
(JSC::ValueProfile::classInfo):
(JSC::ValueProfile::numberOfSamples):
(JSC::ValueProfile::totalNumberOfSamples):
(JSC::ValueProfile::isLive):
(JSC::ValueProfile::numberOfInt32s):
(JSC::ValueProfile::numberOfDoubles):
(JSC::ValueProfile::numberOfBooleans):
(JSC::ValueProfile::dump):
(JSC::getValueProfileBytecodeOffset):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::stronglyPredict):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::predictArgumentTypes):
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::exitSpeculativeWithOSR):
(JSC::DFG::JITCompiler::jumpFromSpeculativeToNonSpeculative):
* jit/JIT.cpp:
(JSC::JIT::emitOptimizationCheck):
* jit/JITInlineMethods.h:
(JSC::JIT::emitValueProfilingSite):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95134 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] LayerRendererChromium shouldn't be RefCounted
https://bugs.webkit.org/show_bug.cgi?id=68121

Reviewed by Kenneth Russell.

LayerRendererChromium is owned exclusively by CCLayerTreeHostImpl, so there's no reason to have it be
refcounted. Making it an OwnPtr<> makes the lifecycle for these objects much cleaner and reduces the chance of
introducing accidental reference cycles.  This also removes the LayerRendererChromium pointers from CCLayerImpls
since it only needed at draw time.

Covered by compositing/ tests.

* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::create):
(WebCore::LayerRendererChromium::drawLayers):
(WebCore::LayerRendererChromium::copyOffscreenTextureToDisplay):
(WebCore::LayerRendererChromium::useRenderSurface):
(WebCore::LayerRendererChromium::drawLayer):
* platform/graphics/chromium/LayerRendererChromium.h:
* platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp:
(WebCore::CCCanvasLayerImpl::draw):
* platform/graphics/chromium/cc/CCCanvasLayerImpl.h:
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::CCLayerImpl::CCLayerImpl):
(WebCore::CCLayerImpl::draw):
(WebCore::CCLayerImpl::bindContentsTexture):
(WebCore::CCLayerImpl::drawDebugBorder):
* platform/graphics/chromium/cc/CCLayerImpl.h:
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::initializeLayerRenderer):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
* platform/graphics/chromium/cc/CCPluginLayerImpl.cpp:
(WebCore::CCPluginLayerImpl::draw):
* platform/graphics/chromium/cc/CCPluginLayerImpl.h:
* platform/graphics/chromium/cc/CCRenderSurface.cpp:
(WebCore::CCRenderSurface::cleanupResources):
(WebCore::CCRenderSurface::prepareContentsTexture):
(WebCore::CCRenderSurface::draw):
(WebCore::CCRenderSurface::drawLayer):
(WebCore::CCRenderSurface::drawSurface):
* platform/graphics/chromium/cc/CCRenderSurface.h:
* platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
(WebCore::CCTiledLayerImpl::bindContentsTexture):
(WebCore::CCTiledLayerImpl::draw):
* platform/graphics/chromium/cc/CCTiledLayerImpl.h:
* platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
(WebCore::CCVideoLayerImpl::draw):
(WebCore::CCVideoLayerImpl::drawYUV):
(WebCore::CCVideoLayerImpl::drawRGBA):
* platform/graphics/chromium/cc/CCVideoLayerImpl.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95135 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DFG JIT should not speculate integer if the value is always going to be
used as a double anyway
https://bugs.webkit.org/show_bug.cgi?id=68127

Reviewed by Oliver Hunt.
        
Added a ValueToDouble node, which is a variant of ValueToNumber that
hints that it will only be used as a double and never as an integer.
Thus, it turns off integer speculation even if the value profiler
told us that the value source is an int. The logic for converting a
ValueToNumber into a ValueToDouble is found in Propagator.
        
This appears to be a 22% speed-up in imaging-darkroom.

* dfg/DFGNode.h:
* dfg/DFGNonSpeculativeJIT.cpp:
(JSC::DFG::NonSpeculativeJIT::compile):
* dfg/DFGPropagator.cpp:
(JSC::DFG::Propagator::fixpoint):
(JSC::DFG::Propagator::toDouble):
(JSC::DFG::Propagator::fixupNode):
(JSC::DFG::Propagator::fixup):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compile):
(JSC::DFG::SpeculativeJIT::computeValueRecoveryFor):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95136 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add wtf/threads and wtf/threads/win, so we can be sure that the EWS
bots can correctly build the patch in https://bugs.webkit.org/show_bug.cgi?id=68132

Rubber-stamped by Sam Weinig.

* wtf/threads: Added.
* wtf/threads/win: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95137 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Try to fix GTK+ build.
        
* GNUmakefile.list.am:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95138 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix for Interpreter.

* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95139 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add BinarySemaphore class from WebKit2 to WTF
https://bugs.webkit.org/show_bug.cgi?id=68132

Reviewed by Sam Weinig.

* GNUmakefile.list.am:
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
Update build systems.

* wtf/threads: Added.
* wtf/threads/BinarySemaphore.cpp: Copied from Source/WebKit2/Platform/CoreIPC/BinarySemaphore.cpp.
* wtf/threads/BinarySemaphore.h: Copied from Source/WebKit2/Platform/CoreIPC/BinarySemaphore.h.
* wtf/threads/win: Added.
* wtf/threads/win/BinarySemaphoreWin.cpp: Copied from Source/WebKit2/Platform/CoreIPC/win/BinarySemaphoreWin.cpp.



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

* JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
How I &quot;love&quot; Visual Studio...

Try to fix build again.

* JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95142 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Yet another build fix attempt.

* JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95143 268f45cc-cd09-0410-ab3c-d52691b4dbfc
This is getting old. Yet another build fix attempt.

* JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95144 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Stop building BinarySemaphore to see if that's what's breaking the GTK+ build.

* GNUmakefile.list.am:



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