Optimize RenderLayerCompositor's OverlapMap
https://bugs.webkit.org/show_bug.cgi?id=118764

Reviewed by Tim Horton.

Overlap stack items can have RectLists with hundreds of rectangles.
This makes the linear search in OverlapMap::overlapsLayers() very slow.

Optimize by storing the bounding rect of the list of rects, and doing an early
check on that. This reduces time spent in RenderLayer::scrollTo() by 13% in some
content with lots of layers inside an overflow:scroll.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::OverlapMap::overlapsLayers):
(WebCore::RenderLayerCompositor::OverlapMap::popCompositingContainer):
(WebCore::RenderLayerCompositor::OverlapMap::RectList::append):
(WebCore::RenderLayerCompositor::OverlapMap::RectList::intersects):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152806 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSStringCreateWithCFString should not convert the empty string into the NULL string
https://bugs.webkit.org/show_bug.cgi?id=118816

Reviewed by Sam Weinig.

* API/JSStringRef.cpp:
(JSStringCreateWithUTF8CString): Removed an extraneous comment, which
a previous version of the patch made incorrect.

* API/JSStringRefCF.cpp:
(JSStringCreateWithCFString): Don't convert the empty string into the
null string.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152807 268f45cc-cd09-0410-ab3c-d52691b4dbfc
fullscreen/full-screen-iframe-with-max-width-height.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=118820

Unreviewed.

Label a flaky test as flaky

* platform/mac/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152808 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Skip more failing WebGL tests on Mac.

* platform/mac-lion/TestExpectations:
* platform/mac/TestExpectations:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152809 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Correct webkit.org blog RSS address.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152812 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DFG assumes that NewFunction will never pass its input through
https://bugs.webkit.org/show_bug.cgi?id=118798

Source/JavaScriptCore: 

Reviewed by Sam Weinig.
        
Previously the DFG was assuming that NewFunction always returns a function. That's not
the case. It may return whatever was passed to it, if it wasn't passed SpecEmpty.
        
This fact needed to be wired through the compiler.

* dfg/DFGAbstractState.cpp:
(JSC::DFG::AbstractState::executeEffects):
* dfg/DFGAbstractValue.h:
(JSC::DFG::AbstractValue::makeTop):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):

LayoutTests: 

Reviewed by Sam Weinig.

* fast/js/dfg-use-function-as-variable-expected.txt: Added.
* fast/js/dfg-use-function-as-variable-merge-structure-expected.txt: Added.
* fast/js/dfg-use-function-as-variable-merge-structure.html: Added.
* fast/js/dfg-use-function-as-variable-not-constant-expected.txt: Added.
* fast/js/dfg-use-function-as-variable-not-constant.html: Added.
* fast/js/dfg-use-function-as-variable-with-closure-expected.txt: Added.
* fast/js/dfg-use-function-as-variable-with-closure.html: Added.
* fast/js/dfg-use-function-as-variable.html: Added.
* fast/js/jsc-test-list:
* fast/js/script-tests/dfg-use-function-as-variable-merge-structure.js: Added.
(.x):
(run_tests):
* fast/js/script-tests/dfg-use-function-as-variable-not-constant.js: Added.
(run_tests.x):
(run_tests):
* fast/js/script-tests/dfg-use-function-as-variable-with-closure.js: Added.
(run_tests.x):
(run_tests.y):
(run_tests):
* fast/js/script-tests/dfg-use-function-as-variable.js: Added.
(run_tests.x):
(run_tests):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152813 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r152701, r152703, r152739, r152754,
and r152756.
http://trac.webkit.org/changeset/152701
http://trac.webkit.org/changeset/152703
http://trac.webkit.org/changeset/152739
http://trac.webkit.org/changeset/152754
http://trac.webkit.org/changeset/152756
https://bugs.webkit.org/show_bug.cgi?id=118821

this was a buggy fix and we're going to try something
different (Requested by thorton on #webkit).

Source/WebCore:

* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.am:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSDefaultStyleSheets.cpp:
(WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
* css/unavailablePlugIns.css: Removed.
* dom/EventListener.h:
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::updateWidget):
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::defaultEventHandler):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::createJavaAppletWidget):
* page/ChromeClient.h:
(WebCore::ChromeClient::shouldUnavailablePluginMessageBeButton):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::replacementTextRoundedRectPressedColor):
(WebCore::RenderEmbeddedObject::RenderEmbeddedObject):
(WebCore::RenderEmbeddedObject::setPluginUnavailabilityReason):
(WebCore::RenderEmbeddedObject::setUnavailablePluginIndicatorIsPressed):
(WebCore::RenderEmbeddedObject::paint):
(WebCore::RenderEmbeddedObject::paintReplaced):
(WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
(WebCore::RenderEmbeddedObject::replacementTextRect):
(WebCore::RenderEmbeddedObject::isReplacementObscured):
(WebCore::RenderEmbeddedObject::layout):
(WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
(WebCore::shouldUnavailablePluginMessageBeButton):
(WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
(WebCore::RenderEmbeddedObject::getCursor):
(WebCore::RenderEmbeddedObject::canHaveChildren):
* rendering/RenderEmbeddedObject.h:
* rendering/RenderWidget.h:

Source/WebKit/mac:

* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::shouldUnavailablePluginMessageBeButton):

Source/WebKit2:

* Platform/CoreIPC/HandleMessage.h:
* Shared/APIClientTraits.cpp:
* Shared/APIClientTraits.h:
* UIProcess/API/C/WKPage.h:
* UIProcess/WebLoaderClient.cpp:
(WebKit::WebLoaderClient::pluginLoadPolicy):
* UIProcess/WebLoaderClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::findPlugin):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/Plugins/PluginProcessConnection.cpp:
(WebKit::PluginProcessConnection::didClose):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::pluginProcessCrashed):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::shouldUnavailablePluginMessageBeButton):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):
(WebKit::WebPage::canPluginHandleResponse):

Tools:

* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController awakeFromNib]):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createWebViewWithOptions):

LayoutTests:

* editing/pasteboard/paste-noplugin-expected.txt:
* http/tests/security/contentSecurityPolicy/object-src-url-blocked-expected.txt:
* platform/mac/accessibility/plugin-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152814 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Simplify AtomicString::lower()
https://bugs.webkit.org/show_bug.cgi?id=118719
<rdar://problem/14452883>

Reviewed by Gavin Barraclough.

* wtf/text/AtomicString.cpp:
(WTF::AtomicString::lower): Previously, the code was using a copy constructor for two path
and one regular construction in another path.
Just put the StringImpl where it needs to be instead.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152815 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a thread safety assertion when creating an AtomicString from a StringImpl
https://bugs.webkit.org/show_bug.cgi?id=118637

Reviewed by Sam Weinig.

The goal is to prevent this kind of use:
-Someone create a String from a StringImpl.
-At some point, the string becomes atomic.
-Later, when the string only has one ref, its ownership is 'passed' to an other thread
 without checking String::isSafeToSendToAnotherThread().
-In the thread B, an AtomicString is created from the String.
->The AtomicString's StringImpl returned is not in the current thread string table.

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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152816 268f45cc-cd09-0410-ab3c-d52691b4dbfc
API tests should test for JSStringCreateWithCFString with empty string
https://bugs.webkit.org/show_bug.cgi?id=118819

Reviewed by Mark Hahnenberg.

* API/tests/testapi.c:
(main): Test!


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152817 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, fix 32-bit after http://trac.webkit.org/changeset/152813

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileNewFunctionNoCheck):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):



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