REGRESSION(r126189): Reftest mismatches are (again) run through ImageDiff with 0.1 tolerance
https://bugs.webkit.org/show_bug.cgi?id=94704

Reviewed by Dirk Pranke.

Use tolerance=0 when acquiring diff image of reftest output.

* Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:
(SingleTestRunner._compare_output_with_reference):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126353 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Separate MarkStackThreadSharedData from MarkStack
https://bugs.webkit.org/show_bug.cgi?id=94294

Reviewed by Filip Pizlo.

MarkStackThreadSharedData is soon going to have data to allow for a parallel copying
mode too, so to separate our concerns we should split it out into its own set of files
and rename it to GCThreadSharedData. For now this is purely a cosmetic refactoring.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
* heap/GCThreadSharedData.cpp: Added.
(JSC):
(JSC::GCThreadSharedData::resetChildren):
(JSC::GCThreadSharedData::childVisitCount):
(JSC::GCThreadSharedData::markingThreadMain):
(JSC::GCThreadSharedData::markingThreadStartFunc):
(JSC::GCThreadSharedData::GCThreadSharedData):
(JSC::GCThreadSharedData::~GCThreadSharedData):
(JSC::GCThreadSharedData::reset):
* heap/GCThreadSharedData.h: Added.
(JSC):
(GCThreadSharedData):
* heap/Heap.h:
(Heap):
* heap/ListableHandler.h:
(ListableHandler):
* heap/MarkStack.cpp:
(JSC::MarkStack::MarkStack):
(JSC::MarkStack::~MarkStack):
* heap/MarkStack.h:
(JSC):
(MarkStack):
(JSC::MarkStack::sharedData):
* heap/MarkStackInlineMethods.h: Added.
(JSC):
(JSC::MarkStack::append):
(JSC::MarkStack::appendUnbarrieredPointer):
(JSC::MarkStack::appendUnbarrieredValue):
(JSC::MarkStack::internalAppend):
(JSC::MarkStack::addWeakReferenceHarvester):
(JSC::MarkStack::addUnconditionalFinalizer):
(JSC::MarkStack::addOpaqueRoot):
(JSC::MarkStack::containsOpaqueRoot):
(JSC::MarkStack::opaqueRootCount):
* heap/SlotVisitor.h:
(JSC):
(SlotVisitor):
(JSC::SlotVisitor::SlotVisitor):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126354 268f45cc-cd09-0410-ab3c-d52691b4dbfc
HTMLTreeBuilder::furthestBlockForFormattingElement should belong to HTMLElementStack
https://bugs.webkit.org/show_bug.cgi?id=93857

Patch by Kwang Yul Seo <skyul@company100.net> on 2012-08-22
Reviewed by Eric Seidel.

HTMLTreeBuilder::furthestBlockForFormattingElement should belong to
HTMLElementStack because it traverses the element stack and finds the
furthest block for the given formatting element.

Currently, it belongs to HTMLTreeBuilder just because
isSpecialNode(const HTMLStackItem*) function used by
furthestBlockForFormattingElement is internal to HTMLTreeBuilder.

Moved isSpecialNode to HTMLStackItem and changed
furthestBlockForFormattingElement to be a method of HTMLElementStack.

No behavior change. Just a refactoring.

* html/parser/HTMLElementStack.cpp:
(WebCore):
(WebCore::HTMLElementStack::popUntilNumberedHeaderElementPopped):
(WebCore::HTMLElementStack::hasNumberedHeaderElementInScope):
(WebCore::HTMLElementStack::furthestBlockForFormattingElement):
* html/parser/HTMLElementStack.h:
(HTMLElementStack):
* html/parser/HTMLStackItem.h:
(WebCore::HTMLStackItem::isInHTMLNamespace):
(HTMLStackItem):
(WebCore::HTMLStackItem::isNumberedHeaderElement):
(WebCore::HTMLStackItem::isTableBodyContextElement):
(WebCore::HTMLStackItem::isSpecialNode):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::constructTreeFromAtomicToken):
(WebCore::HTMLTreeBuilder::processCloseWhenNestedTag):
(WebCore::HTMLTreeBuilder::processStartTagForInBody):
(WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody):
(WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
(WebCore::HTMLTreeBuilder::shouldProcessTokenInForeignContent):
(WebCore::HTMLTreeBuilder::processTokenInForeignContent):
* html/parser/HTMLTreeBuilder.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126355 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Don't unconditionally define NOMINMAX on Windows
https://bugs.webkit.org/show_bug.cgi?id=94742

Patch by Scott Graham <scottmg@chromium.org> on 2012-08-22
Reviewed by Adrienne Walker.

Avoids a warning when building on Windows when NOMINMAX is defined
elsewhere or on the command line.

* TestWebKitAPI/config.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126356 268f45cc-cd09-0410-ab3c-d52691b4dbfc
win64 compile error fix for BinaryPropertyList.cpp
https://bugs.webkit.org/show_bug.cgi?id=94122

Patch by Alex Christensen <alex.christensen@flexsim.com> on 2012-08-22
Reviewed by Eric Seidel.

Fixed compile errors for MSVC x64 without changing performance

* platform/cf/BinaryPropertyList.cpp:
(WebCore::BinaryPropertyListSerializer::appendStringObject):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126357 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Test cases under fast/filesystem/workers are flaky when using JSC
https://bugs.webkit.org/show_bug.cgi?id=94747

Patch by Leo Yang <leoyang@rim.com> on 2012-08-22
Reviewed by Yong Li.

These test cases sometimes can't complete because the worker object
created by startWorker() has been gc'ed before the worker thread complete.
We should reference the object to avoid it being gc'ed.

* fast/filesystem/workers/async-operations.html:
* fast/filesystem/workers/file-entry-to-uri-sync.html:
* fast/filesystem/workers/file-from-file-entry-sync.html:
* fast/filesystem/workers/file-from-file-entry.html:
* fast/filesystem/workers/file-writer-empty-blob.html:
* fast/filesystem/workers/file-writer-events.html:
* fast/filesystem/workers/file-writer-gc-blob.html:
* fast/filesystem/workers/file-writer-sync-truncate-extend.html:
* fast/filesystem/workers/file-writer-sync-write-overlapped.html:
* fast/filesystem/workers/file-writer-truncate-extend.html:
* fast/filesystem/workers/file-writer-write-overlapped.html:
* fast/filesystem/workers/simple-persistent-sync.html:
* fast/filesystem/workers/simple-persistent.html:
* fast/filesystem/workers/simple-temporary-sync.html:
* fast/filesystem/workers/simple-temporary.html:
* fast/filesystem/workers/sync-operations.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126358 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reduce Font.h includes across project -- improves RenderObject.h compile time
https://bugs.webkit.org/show_bug.cgi?id=93629

Patch by Nikhil Bhargava <nbhargava@google.com> on 2012-08-22
Reviewed by Eric Seidel.

Source/WebCore:

RenderStyle.h no longer depends on Font.h. The files that transitively
need to be updated with proper includes are fixed.

No new tests. Functionality should remain the same.

* accessibility/gtk/WebKitAccessibleInterfaceText.cpp:
* accessibility/mac/WebAccessibilityObjectWrapper.mm:
* bindings/objc/DOM.mm:
* css/CSSComputedStyleDeclaration.cpp:
* css/CSSPrimitiveValue.cpp:
* css/StyleResolver.h:
* dom/CharacterData.cpp:
* dom/ElementRareData.h:
* dom/NodeRenderingContext.cpp:
* dom/Text.cpp:
* editing/TextIterator.cpp:
* editing/mac/EditorMac.mm:
* html/HTMLTitleElement.cpp:
* html/shadow/TextControlInnerElements.cpp:
* inspector/InspectorOverlay.cpp:
* page/ContextMenuController.cpp:
* page/PrintContext.cpp:
* platform/efl/RenderThemeEfl.cpp:
* platform/graphics/FontMetrics.h:
* platform/gtk/RenderThemeGtk.cpp:
* platform/gtk/RenderThemeGtk2.cpp:
* platform/mac/HTMLConverter.mm:
* rendering/EllipsisBox.cpp:
* rendering/FlowThreadController.cpp:
* rendering/InlineBox.cpp:
* rendering/InlineFlowBox.cpp:
* rendering/InlineFlowBox.h:
(WebCore):
* rendering/RenderButton.cpp:
* rendering/RenderCombineText.cpp:
* rendering/RenderCombineText.h:
* rendering/RenderDeprecatedFlexibleBox.cpp:
* rendering/RenderEmbeddedObject.h:
(WebCore):
* rendering/RenderFileUploadControl.cpp:
* rendering/RenderFullScreen.h:
* rendering/RenderImage.cpp:
* rendering/RenderInline.cpp:
* rendering/RenderListItem.cpp:
* rendering/RenderListMarker.cpp:
* rendering/RenderMultiColumnBlock.cpp:
* rendering/RenderRegion.h:
* rendering/RenderRuby.cpp:
* rendering/RenderRubyRun.cpp:
* rendering/RenderScrollbar.cpp:
* rendering/RenderTable.cpp:
* rendering/RenderTableCell.cpp:
* rendering/RenderTableRow.cpp:
* rendering/RenderTableSection.cpp:
* rendering/RenderTextControl.cpp:
* rendering/RenderTextControlMultiLine.cpp:
* rendering/RenderThemeChromiumSkia.cpp:
* rendering/RenderView.cpp:
* rendering/TextAutosizer.cpp:
* rendering/mathml/RenderMathMLBlock.h:
* rendering/style/KeyframeList.h:
* rendering/style/RenderStyle.cpp:
* rendering/style/RenderStyle.h:
(WebCore):
* rendering/style/StyleInheritedData.cpp:
* rendering/svg/RenderSVGBlock.cpp:
* rendering/svg/RenderSVGInlineText.h:
* svg/SVGLengthContext.cpp:
* svg/SVGTRefElement.cpp:

Source/WebKit/chromium:

Adds includes due to change in RenderStyle.h

* src/WebFrameImpl.cpp:
* src/mac/WebSubstringUtil.mm:

Source/WebKit/win:

Adds includes due to change in RenderStyle.h

* DOMCoreClasses.cpp:

Source/WebKit2:

Adds includes due to change in RenderStyle.h

* WebProcess/WebPage/mac/WebPageMac.mm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126359 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Move precompileScript() from V8Proxy to ScriptSourceCode
https://bugs.webkit.org/show_bug.cgi?id=94701

Reviewed by Adam Barth.

To kill V8Proxy, we can move precompileScript() from V8Proxy
to ScriptSourceCode.

No tests. No change in behavior.

* bindings/v8/ScriptSourceCode.cpp:
(WebCore::ScriptSourceCode::precompileScript):
(WebCore):
* bindings/v8/ScriptSourceCode.h:
(ScriptSourceCode):
* bindings/v8/V8Proxy.cpp:
(WebCore::V8Proxy::evaluate):
* bindings/v8/V8Proxy.h:
(V8Proxy):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126360 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: IDBRequest can be destructed during abort
https://bugs.webkit.org/show_bug.cgi?id=94618

Reviewed by Tony Chang.

If there are no script references, an IDBRequest could be kept alive
only by enqueued events. On document destruction, the parent transaction
is aborted, which aborts the request. During the abort, the enqueued events
are deleted, releasing the last reference to the IDBRequest which then
destructs in mid-method call and an "unfinished" state, hitting an assert.

This patch keeps the IDBRequest alive through the completion of the abort()
method, which will enqueue another event. In the document destruction case,
this will end up with the IDBRequest having stop() called on it which will
send the IDBRequest into EarlyDeath state, satisfying the destructor assert.

Addresses existing layout tests that behave flakily in Chromium port.

* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::abort):


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