flexitem-stretch-image.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=95366

Remove the failing test expectations in platform/mac, since this is showing up as passing on
all the mac bots.

* platform/mac/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127184 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Implement IncrementalSweeper for PLATFORM(BLACKBERRY)
https://bugs.webkit.org/show_bug.cgi?id=95469

Reviewed by Rob Buis.

RIM PR# 200595.
Share most code with USE(CF) and implement timer-related methods
for PLATFORM(BLACKBERRY).

* heap/IncrementalSweeper.cpp:
(JSC):
(JSC::IncrementalSweeper::IncrementalSweeper):
(JSC::IncrementalSweeper::create):
(JSC::IncrementalSweeper::scheduleTimer):
(JSC::IncrementalSweeper::cancelTimer):
(JSC::IncrementalSweeper::doSweep):
* heap/IncrementalSweeper.h:
(IncrementalSweeper):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127185 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Vector::shrinkToFit should use realloc when suitable.
https://bugs.webkit.org/show_bug.cgi?id=94810

Reviewed by Benjamin Poulain.

Only tested on BlackBerry. So it is wrapped with PLATFORM(BLACKBERRY) in the mean time.
Use realloc to shrink buffer when inline buffer isn't involved and and canMoveWithMemcpy is true.

When running the test code attached to the bug, it gives 30-45% performance boost for the large blocks
(Every test cycle includes an extra pair of malloc/free, so the boost on shrinkToFit() is even bigger)
Performance impact on small blocks is not noticeable. (Tested on BlackBerry)

* wtf/Vector.h:
(WTF::VectorBufferBase::shouldReallocateBuffer):
(VectorBufferBase):
(WTF::VectorBufferBase::reallocateBuffer):
(VectorBuffer):
(WTF::VectorBuffer::shouldReallocateBuffer):
(WTF::VectorBuffer::reallocateBuffer):
(WTF::VectorBuffer::inlineBuffer):
(WTF::::shrinkCapacity):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127186 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add TestExpectations stubs for apple wk2 ports

Unreviewed, build fix.

This adds empty placeholder files so new-run-webkit-tests
doesn't get upset if they're missing.

* platform/mac-wk2/TestExpectations: Added.
* platform/win-wk2/TestExpectations: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127187 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed rebaseline after r127163.

These tests need an image rebaseline for win to match the linux results.

* platform/chromium-win-xp/fast/block/margin-collapse: Removed.
* platform/chromium-win/fast/block/float/024-expected.png:
* platform/chromium-win/fast/block/margin-collapse/empty-clear-blocks-expected.png:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127188 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove uses of ClassInfo in StrictEq and CompareEq in the DFG
https://bugs.webkit.org/show_bug.cgi?id=93401

Reviewed by Filip Pizlo.

Source/JavaScriptCore: 

Another incremental step in removing the dependence on ClassInfo pointers in object headers.

* bytecode/SpeculatedType.h:
(JSC::isCellOrOtherSpeculation):
(JSC):
* dfg/DFGAbstractState.cpp: Updated the CFA to reflect the changes to the backend.
(JSC::DFG::AbstractState::execute):
* dfg/DFGNode.h:
(Node):
(JSC::DFG::Node::shouldSpeculateString): Added this new function since it was conspicuously absent.
(JSC::DFG::Node::shouldSpeculateNonStringCellOrOther): Also add this function for use in the CFA.
* dfg/DFGSpeculativeJIT.cpp: Refactored how we handle CompareEq and CompareStrictEq in the DFG. We now just 
check for Strings by comparing the object's Structure to the global Structure for strings. We only 
check for MasqueradesAsUndefined if the watchpoint has fired. These changes allow us to remove our 
uses of the ClassInfo pointer for compiling these nodes.
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectEquality):
(JSC::DFG::SpeculativeJIT::compilePeepHoleBranch):
(JSC::DFG::SpeculativeJIT::compare):
(JSC::DFG::SpeculativeJIT::compileStrictEq):
* dfg/DFGSpeculativeJIT.h:
(SpeculativeJIT):
* dfg/DFGSpeculativeJIT32_64.cpp: Same changes for 32 bit as for 64 bit.
(JSC::DFG::SpeculativeJIT::compileObjectEquality):
(JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compileObjectEquality):
(JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):

LayoutTests: 

New test to make sure the DFG watchpoint works correctly for these cases.

* fast/js/document-all-triggers-masquerades-watchpoint-expected.txt: Added.
* fast/js/document-all-triggers-masquerades-watchpoint.html: Added.
* fast/js/script-tests/document-all-triggers-masquerades-watchpoint.js: Added.
(f):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127189 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools: nrwt should have TestExpectations everywhere we have Skipped files for apple ports
https://bugs.webkit.org/show_bug.cgi?id=95495

Reviewed by Ojan Vafai.

This is a follow-on to bug 95370 that adds in support for
platform/wk2/TestExpectations and
platform/{mac,win}-$version/TestExpectations.

* Scripts/webkitpy/layout_tests/port/apple.py:
(ApplePort.expectations_files):
* Scripts/webkitpy/layout_tests/port/base.py:
(Port._skipped_file_search_paths):
* Scripts/webkitpy/layout_tests/port/mac_unittest.py:
(MacTest.test_expectations_files):
* Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py:
(MockDRTPortTest.make_port):
* Scripts/webkitpy/layout_tests/port/win_unittest.py:
(WinPortTest.test_expectations_files):

LayoutTests: Remove uses of ClassInfo in StrictEq and CompareEq in the DFG
https://bugs.webkit.org/show_bug.cgi?id=93401

Patch by Mark Hahnenberg <mhahnenberg@apple.com> on 2012-08-24
Reviewed by Filip Pizlo.

New test to make sure the DFG watchpoint works correctly for these cases.

* fast/js/document-all-triggers-masquerades-watchpoint-expected.txt: Added.
* fast/js/document-all-triggers-masquerades-watchpoint.html: Added.
* fast/js/script-tests/document-all-triggers-masquerades-watchpoint.js: Added.
(f):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127190 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Replace JSC::UString by WTF::String
https://bugs.webkit.org/show_bug.cgi?id=95271

Patch by Benjamin Poulain <bpoulain@apple.com> on 2012-08-30
Reviewed by Geoffrey Garen.

Source/JavaScriptCore: 

Having JSC::UString and WTF::String increase the complexity of working on WebKit, and
add useless conversions in the bindings. It also cause some code bloat.

The performance advantages of UString have been ported over in previous patches. This patch
is the last step: getting rid of UString.

In addition to the simplified code, this also reduce the binary size by 15kb on x86_64.

* API/OpaqueJSString.cpp:
(OpaqueJSString::ustring):
* runtime/Identifier.h:
(JSC::Identifier::ustring):
To avoid changing everything at once, the function named ustring() were kept as is. They
will be renamed in a follow up patch.

* runtime/JSString.h:
(JSC::JSString::string):
(JSC::JSValue::toWTFString):
(JSC::inlineJSValueNotStringtoString):
(JSC::JSValue::toWTFStringInline):
Since JSValue::toString() already exist (and return the JSString), the direct accessor is renamed
to ::toWTFString(). We may change ::string() to ::jsString() and ::toWTFString() to ::toString()
in the future.

* runtime/StringPrototype.cpp:
(JSC::substituteBackreferencesSlow): Replace the use of UString::getCharacters<>() by String::getCharactersWithUpconvert<>().

Source/WebCore: 

Update the code to use String instead of UString.

On x86_64, this reduces the binary size by 22kb.

Since it is no longer possible to differenciate JSC::jsString() and WebCore::jsString() by the input
types, WebCore::jsString() is renated to WebCore::jsStringWithCache().

Since the cache is using a PtrHash, JSC::jsString() is used in place of the old WebCore::jsString() when
the string is generated locally. This is because the cache can never match in those cases.

Source/WebKit/blackberry: 

Replace UString by String.

* WebCoreSupport/ClientExtension.cpp:
* WebCoreSupport/PagePopupBlackBerry.cpp:
(WebCore::PagePopupBlackBerry::installDomFunction):

Source/WebKit/efl: 

Replace UString by String.

* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
(DumpRenderTreeSupportEfl::sendWebIntentResponse):
* ewk/ewk_frame.cpp:
(ewk_frame_script_execute):

Source/WebKit/gtk: 

Replace UString by String.

* gdom/ConvertToGCharPrivate.h:
(copyAsGchar):

Source/WebKit/mac: 

Get rid of UString, replace it by String, and simplify the code when possible.

On x86_64, this reduces the binary size by 7kb.

* Plugins/Hosted/NetscapePluginHostProxy.mm:
(identifierFromIdentifierRep):
* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::addValueToArray):
(WebKit::NetscapePluginInstanceProxy::moveGlobalExceptionToExecState):
* Plugins/Hosted/ProxyInstance.mm:
(WebKit::ProxyRuntimeMethod::create):
(WebKit::ProxyRuntimeMethod::finishCreation):
(WebKit::ProxyInstance::getPropertyNames):
(WebKit::ProxyInstance::methodsNamed):
(WebKit::ProxyInstance::fieldNamed):
* WebView/WebFrame.mm:
(-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
(-[WebFrame _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]):
* WebView/WebScriptDebugDelegate.mm:
(-[WebScriptCallFrame functionName]):
(-[WebScriptCallFrame evaluateWebScript:]):
* WebView/WebScriptDebugger.h:
(WTF):
(JSC):
(WebScriptDebugger):
* WebView/WebScriptDebugger.mm:
(toNSURL):
(WebScriptDebugger::sourceParsed):
* WebView/WebView.mm:
(aeDescFromJSValue):

Source/WebKit/qt: 

Replace UString by String.

* Api/qwebelement.cpp:
(QWebElement::evaluateJavaScript):

Source/WebKit/win: 

Replace UString by String.

* WebFrame.cpp:
(WebFrame::stringByEvaluatingJavaScriptInScriptWorld):
* WebView.cpp:
(WebView::stringByEvaluatingJavaScriptFromString):

Source/WebKit/wx: 

Update the #includes to use the correct types.

* WebFrame.cpp:
* WebView.cpp:

Source/WebKit2: 

Update to code to switch from UString to String.

* WebProcess/Plugins/Netscape/JSNPMethod.cpp:
(WebKit::JSNPMethod::finishCreation):
* WebProcess/Plugins/Netscape/JSNPMethod.h:
(WebKit::JSNPMethod::create):
(JSNPMethod):
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::npIdentifierFromIdentifier):
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::evaluate):
(WebKit::NPRuntimeObjectMap::moveGlobalExceptionToExecState):

Source/WTF: 

* wtf/Platform.h: Useless edit to force a full build. This is needed for some bots for some reason.
* wtf/text/WTFString.h: Export a symbol that was exported on UString and needed in WebCore.

Add String::getCharactersWithUpconvert<>(), which is similar to String::getCharacters<>() but with the same
behaviors as UString::getCharacters<>().

String::getCharactersWithUpconvert<>() is useful when manipulating multiple strings, it allow writting code
using 16bits characters if any of the input String is not 8bit.

Tools: 

Get rid of UString.

* DumpRenderTree/efl/WorkQueueItemEfl.cpp:
* gdb/webkit.py:
(WTFStringPrinter.to_string):
(JSCIdentifierPrinter.to_string):
(JSCJSStringPrinter.to_string):
(add_pretty_printers):

Websites/webkit.org: 

Update the coding style to avoid mentioning a class that no longer exist.

* coding/coding-style.html:


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