<rdar://problem/6883872> REGRESSION (r43243): computed style for font-family is returning
only the generic font, if any generic font is in the family list

Test: fast/css/getComputedStyle/computed-style-font-family.html

css/CSSComputedStyleDeclaration.cpp:
Sorted computedProperties alphabetically. Added CSSPropertyClip and CSSPropertyWordBreak.
(WebCore::identifierForFamily): Added. Maps internal font family names to identifiers.
(WebCore::valueForFamily): Added. Creates either an identifier or a string as appropriate.
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Implemented the font-family
property as specified in the CSS standard. Fixed clip to return "auto" when there is no
clip set instead of nothing at all. Gave inheritableProperties and numInheritableProperties
internal linkage since there was no reason for them to have external linkage.

fast/css/getComputedStyle/computed-style.html: Updated array of properties to dump
that are not visible when iterating the computed style object. Removed pointless
unused array of unimplemented properties.

fix <rdar://problem/6888244> REGRESSION: Using the Up or Down keyboard
arrows, I can't navigate caret between To Do items in a Note message

Test: editing/selection/move-by-line-004.html

editing/visible_units.cpp:
(WebCore::enclosingNodeWithNonInlineRenderer): Added this helper
function.
(WebCore::previousLinePosition): When advancing to the next candidate
node, stop when leaving the closest ancestor of the original node that
is not an inline. The code, incorrectly, was trying to exit the closest
ancestor of that type which was editable, and therefore missing other
blocks in the same editable root.
(WebCore::nextLinePosition): Ditto.

LayoutTests:

Reviewed by Sam Weinig.

test for <rdar://problem/6888244> REGRESSION: Using the Up or Down
keyboard arrows, I can't navigate caret between To Do items in a Note
message

Plugins/Hosted/NetscapePluginHostManager.mm:
(WebKit::NetscapePluginHostManager::instantiatePlugin):
If we failed to instantiate the plug-in, call cleanup() so that any streams created by the plug-in from its
NPP_New callback are destroyed.

Add FP support to the MacroAssembler, port JITArithmetic over to make use of this. Also add
API to determine whether FP support is available 'MacroAssembler::supportsFloatingPoint()',
FP is presently only supported on SSE2 platforms, not x87. On platforms where a suitable
hardware FPU is not available 'supportsFloatingPoint()' may simply return false, and all
other methods ASSERT_NOT_REACHED().

Rename GraphicsLayer::graphicsContextsFlipped() to
GraphicsLayer::compositingCoordinatesOrientation() in order to clarify the usage.

Clean up code around the GraphicsLayer "contents" layer that makes use of this
flag, by removing the setHasContentsLayer() method, and just using setContentsLayer(),
which can then always do the flipping if necessary.

Plugins/Hosted/ProxyInstance.mm:
(WebKit::ProxyInstance::methodsNamed): Move add call after the waitForReply call.
Anders says that by the time we return someone else might have done the same add
for us.
(WebKit::ProxyInstance::fieldNamed): Ditto.

xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::makeSimpleCrossOriginAccessRequest):
Bail out quickly if the URL is non-HTTP. Cross-origin requests require specific HTTP
headers to be received, so they cannot work with other protocols.

[Qt] In the image decoder, remove the raw image data represented as QImage
once the image is converted to QPixmap and inserted in the pixmap cache.
This effectively reduces the heap usage when running on graphics system
other than raster (i.e the case where QImage != QPixmap).

Improve the font fallback for characters belonging to 'common' scripts
in ChromiumWin port. Make characters like Danda, Double Danda (punctuation
marks in North Indian scripts) and currency signs (e.g. Thai Baht)
rendered correctly in Chromium on Win.

<rdar://problem/6739671> Movie controller’s play button does not change into a pause
button

Fix a controls repaint issue when the playing state of a video changes by
educating the MediaControlInputElements about the state they are currently
displaying, and making them repaint when that state changes. This applies
to the play/pause and mute/unmute buttons, which both have two states.

rendering/MediaControlElements.h:
Renamed the MediaControlElements enum to MediaControlElementType.
(WebCore::MediaControlInputElement::updateDisplayType):
Add a MediaControlElementType member variable with a setter to allow
the element to know what type it is displaying.

Fixed a failure in fast/js/math-transforms.html caused by failing to
preserve -0 in multiplication.

assembler/X86Assembler.h:
(JSC::X86Assembler::jz):

jit/JITArithmetic.cpp:
(JSC::JIT::emit_op_mul):
(JSC::JIT::emitSlow_op_mul):
(JSC::JIT::emitMul32Constant):
(JSC::JIT::emitMul32InPlace): Check both for overflow and for zero when
doing multiplication. Use a slow case to get these right.

Fixed problems when using 'arguments' due to a half-initialized register.

interpreter/CallFrame.h:
(JSC::ExecState::setCalleeArguments):
(JSC::ExecState::init): Require a full JSValue when setting up the
'arguments' virtual register, since this register is accessible from JIT
code and bytecode, and needs to be a true JSValue.

<rdar://problem/6510362> In some situations message content is messed up
when indentation is decreased

editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::splitTreeToNode): Calling recursively
here served to do nothing because this function will return if the
second argument is the parent of the first. Not only does this now work
as intended, but is necessary for the rest of this fix.

editing/IndentOutdentCommand.cpp:
(WebCore::IndentOutdentCommand::outdentParagraph): To determine if we
are the last node in a <blockquote>, and can therefore remove the
<blockquote> we need the endOfEnclosingBlock to extend to the end of
the <blockquote> not just the next block, which could be a <div>, for
example.

Also If a <blockquote> is removed, but it's the child of another
<blockquote> then its children are now children of the top <blockquote>.
In this case we want to split the parent <blockquote> because the next
paragraph assumes that it is the first node in its <blockquote> and if
that is not true, various bugs arise.

Technically this is a bug in Adium. It appears that Adium has subclassed the WebView and implemented
viewDidMoveToWindow in its subclass improperly. It doesn't call up to the base class WebView like it
should and so our boundsChanged notification never gets added.

Reduce the dependence on viewDidMoveToWindow by moving the registration of observers into
viewWillMoveToWindow instead.

platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::setDefaultMIMEType): Modify the previous response so it maintains all of its data.
(WebCore::didReceiveResponse): Call setDefaultMIMEType() when needed.
(WebCore::WebCoreSynchronousLoader::load): Ditto.

Fix Mac Chromium popup menu placement by taking into
account any scrolling in the current window. This mirrors
the positioning done in PopupContainer::show(), which is
used on Chromium Windows and linux.

Support the recently added HTMLMediaElement 'startTime' attribute. This is a read-only
value that only the media engine can know, so we just need to add the attribute
to HTMLMediaElement and add methods to MediaPlayer and MediaPlayerPrivateInterface so
the engine can make it available.

Only create a QWidget wrapper for the plugin in the case it is not
in the Qt window mapper, and thus receiving events from the Qt
event system. Native Qt based plugins running in process, will
already be in the window mapper, and thus creating a wrapper,
stops them from getting events from Qt, as they are redirected
to the wrapper.

r43648 modified jsc.vcproj's post-build event not to try to copy files
that aren't present. Then r43661 mistakenly un-did that modification.
This patch restores the modification from r43648, but puts the code in
jscCommon.vsprops (where it should have been added in r43648).

<rdar://problem/6681868> When building with Xcode 3.1.3 should be using gcc 4.2

Rubber-stamped by Darin Adler.

The meaning of XCODE_VERSION_ACTUAL is more sensible in newer versions of Xcode.
Update our logic to select the compiler version to use the more appropriate XCODE_VERSION_MINOR
if the version of Xcode supports it, and fall back to XCODE_VERSION_ACTUAL if not.

Implemented op_strict_eq. Original patch by Snowy, by way of Sam and Gavin.

assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::set8): Added set8, since it's slightly
faster than set32, and the new value representation usually doesn't
need set32.

jit/JIT.cpp:

jit/JIT.h:

jit/JITInlineMethods.h:
(JSC::JIT::emitLoadTag):
(JSC::JIT::emitLoadPayload): Added helper functions for dealing with
constants. Eventually, we should write special cases for all constants,
but these are helpful in the short term.

jit/JIT.cpp: Changed some registers around to avoid overwriting edx:eax,
which is how JSValues are now returned. Also changed the code that
passes thisValue to pass the full 64bits of the value. Also added
an #error compiler directive to other platform builds, since the JSValue
return signature probably won't return in edx:eax on those platforms,
and we'll have to investigate a solution.

Change a bunch of http tests to dumpAsText(). They are currently
failing on the Windown Build Bot because of textarea metrics
changes, and we have decided that these tests are most valuable as
text test anyway.

fix <rdar://problem/5483015> Replies in Mail are drawn first without
the user style sheet and then redrawn with the style sheet

Test: platform/mac/fast/loader/user-stylesheet-fast-path.html

page/mac/FrameMac.mm:
(WebCore::Frame::setUserStyleSheetLocation): For data URLs with
base64-encoded UTF-8 data, just decode the style sheet here an apply
it synchronously instead of invoking an asynchronous loader.

LayoutTests:

Reviewed by Anders Carlsson.

test for <rdar://problem/5483015> Replies in Mail are drawn first
without the user style sheet and then redrawn with the style sheet

Fix for <rdar://problem/6872894> REGRESSION (r41896-42143): First letter cut off in styled select menus

Make sure to do rounded clipping for overflow and controls relative to the border box and not to the overflow/control clip rect
(which is typically clipped to the padding or content box). Doing so was causing rounded clips to be incorrectly applied to padding and
content.

jit/JITInlineMethods.h:
(JSC::JIT::emitPutJITStubArgFromVirtualRegister):
(JSC::JIT::emitLoad): Restored some legacy "*CTIArg*" functions,
since I wanted to avoid the complexity of revamping the API here while
trying to bring it up. Eventually, we should re-remove all of these functions.

(JSC::JIT::recordJumpTarget): Removed unnecessary macro cruft. You will
not silence me, Sam Weinig! The world will know that you are a crufty,
crufty, crufty programmer!!!

jit/JITOpcodes.cpp:

jit/JITStubs.cpp:
(JSC::):

jit/JITStubs.h: Changed up some offsets in the JITStackFrame class, since
and off-by-one error was causing stack misalignment.

page/FrameView.cpp:
(WebCore::FrameView::reset): Reset m_contentIsOpaque to false.
(WebCore::FrameView::useSlowRepaints): Use slow repaints if the content
is not known to be opaque.
(WebCore::FrameView::setContentIsOpaque): Added. Sets m_contentIsOpaque
and enables or disables fast repaints accordingly.

page/FrameView.h:

rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended): Removed the
document()->haveStylesheetsLoaded() condition in determining whether the
root is opaque. This is what was causing the bug, as iframes were
considered to be opaque, and thus painted an opaque white background,
whenever they were pending a style sheet load.
Changed to call FrameView::setContentIsOpaqe() instead of
setUseSlowRepaints(), which allows the frame to go back to fast repaints
if the content becomes opaque.
Corrected the check for background color opacity: any alpha value other
than 255--not just zero--is not opaque.

jit/JITStubs.cpp:
(JSC::JITStubs::cti_vm_lazyLinkCall): Call isHostFunction on the body
rather than on the function object, since we can't easily have inlined
access to the FunctionBodyNode in JSFunction.h since WebCore needs
access to that header.
(JSC::JITStubs::cti_op_construct_JSConstruct): Ditto.

profiler/Profiler.cpp:
(JSC::Profiler::createCallIdentifier): Ditto.

parser/Grammar.y: Use JSGlobalData* to pass the global data pointer
around whenever possible instead of using void*. Changed
SET_EXCEPTION_LOCATION from a macro to an inline function. Marked
the structure-creating functions inline. Changed the VarStack to use
identifier pointers instead of actual identifiers. This takes
advantage of the fact that all identifier pointers come from the
arena and avoids referenc count churn. Changed Identifier* to
const Identifier* to make sure we don't modify any by accident.
Used identifiers for regular expression strings too, using the new
scanRegExp that has out parameters instead of the old one that relied
on side effects in the Lexer. Move the creation of numeric identifiers
out of this file and into the PropertyNode constructor.

parser/Lexer.cpp:
(JSC::Lexer::setCode): Pass in ParserArena, used for identifiers.
(JSC::Lexer::makeIdentifier): Changed return type to const Identifier*
and changed to call ParserArena.
(JSC::Lexer::scanRegExp): Added out arguments that are const Identifier*
as well as a prefix character argument so we can handle the /= case
without a string append.
(JSC::Lexer::skipRegExp): Added. Skips a regular expression without
allocating Identifier objects.
(JSC::Lexer::clear): Removed the code to manage m_identifiers, m_pattern,
and m_flags, and added code to set m_arena to 0.

parser/Lexer.h: Updated for changes above.

parser/NodeConstructors.h:
(JSC::ParserArenaFreeable::operator new): Added. Calls allocateFreeable
on the arena.
(JSC::ParserArenaDeletable::operator new): Changed to call the
allocateDeletable function on the arena instead of deleteWithArena.
(JSC::RegExpNode::RegExpNode): Changed arguments to Identifier instead
of UString since these come from the parser which makes identifiers.
(JSC::PropertyNode::PropertyNode): Added new constructor that makes
numeric identifiers. Some day we might want to optimize this for
integers so it doesn't create a string for each one.
(JSC::ContinueNode::ContinueNode): Initialize m_ident to nullIdentifier
since it's now a const Identifier& so it can't be left uninitialized.
(JSC::BreakNode::BreakNode): Ditto.
(JSC::CaseClauseNode::CaseClauseNode): Updated to use SourceElements*
to keep track of the statements rather than a separate statement vector.
(JSC::BlockNode::BlockNode): Ditto.
(JSC::ForInNode::ForInNode): Initialize m_ident to nullIdentifier.

parser/Nodes.cpp: Moved the comment explaining emitBytecode in here.
It seemed strangely out of place in the header.
(JSC::ThrowableExpressionData::emitThrowError): Added an overload for
UString as well as Identifier.
(JSC::SourceElements::singleStatement): Added.
(JSC::SourceElements::lastStatement): Added.
(JSC::RegExpNode::emitBytecode): Updated since the pattern and flags
are now Identifier instead of UString. Also changed the throwError code
to use the substitution mechanism instead of doing a string append.
(JSC::SourceElements::emitBytecode): Added. Replaces the old
statementListEmitCode function, since we now keep the SourceElements
objects around.
(JSC::BlockNode::lastStatement): Added.
(JSC::BlockNode::emitBytecode): Changed to use emitBytecode instead of
statementListEmitCode.
(JSC::CaseClauseNode::emitBytecode): Added.
(JSC::CaseBlockNode::emitBytecodeForBlock): Changed to use emitBytecode
instead of statementListEmitCode.
(JSC::ScopeNodeData::ScopeNodeData): Changed to store the
SourceElements* instead of using releaseContentsIntoVector.
(JSC::ScopeNode::emitStatementsBytecode): Added.
(JSC::ScopeNode::singleStatement): Added.
(JSC::ProgramNode::emitBytecode): Call emitStatementsBytecode instead
of statementListEmitCode.
(JSC::EvalNode::emitBytecode): Ditto.
(JSC::EvalNode::generateBytecode): Removed code to clear the children
vector. This optimization is no longer possible since everything is in
a single arena.
(JSC::FunctionBodyNode::emitBytecode): Call emitStatementsBytecode
insetad of statementListEmitCode and check for the return node using
the new functions.

parser/Nodes.h: Changed VarStack to store const Identifier* instead
of Identifier and rely on the arena to control lifetime. Added a new
ParserArenaFreeable class. Made ParserArenaDeletable inherit from
FastAllocBase instead of having its own operator new. Base the Node
class on ParserArenaFreeable. Changed the various Node classes
to use const Identifier& instead of Identifier to avoid the need to
call their destructors and allow them to function as "freeable" in the
arena. Removed extraneous JSC_FAST_CALL on definitions of inline functions.
Changed ElementNode, PropertyNode, ArgumentsNode, ParameterNode,
CaseClauseNode, ClauseListNode, and CaseBlockNode to use ParserArenaFreeable
as a base class since they do not descend from Node. Eliminated the
StatementVector type and instead have various classes use SourceElements*
instead of StatementVector. This prevents those classes from having th
use ParserArenaDeletable to make sure the vector destructor is called.

parser/Parser.cpp:
(JSC::Parser::parse): Pass the arena to the lexer.

parser/Parser.h: Added an include of ParserArena.h, which is no longer
included by Nodes.h.

parser/ParserArena.cpp:
(JSC::ParserArena::ParserArena): Added. Initializes the new members,
m_freeableMemory, m_freeablePoolEnd, and m_identifiers.
(JSC::ParserArena::freeablePool): Added. Computes the pool pointer,
since we store only the current pointer and the end of pool pointer.
(JSC::ParserArena::deallocateObjects): Added. Contains the common
memory-deallocation logic used by both the destructor and the
reset function.
(JSC::ParserArena::~ParserArena): Changed to call deallocateObjects.
(JSC::ParserArena::reset): Ditto. Also added code to zero out the
new structures, and switched to use clear() instead of shrink(0) since
we don't really reuse arenas.
(JSC::ParserArena::makeNumericIdentifier): Added.
(JSC::ParserArena::allocateFreeablePool): Added. Used when the pool
is empty.
(JSC::ParserArena::isEmpty): Added. No longer inline, which is fine
since this is used only for assertions at the moment.

parser/ParserArena.h: Added an actual arena of "freeable" objects,
ones that don't need destructors to be called. Also added the segmented
vector of identifiers that used to be in the Lexer.

runtime/FunctionConstructor.cpp:
(JSC::extractFunctionBody): Use singleStatement function rather than
getting at a StatementVector.

runtime/FunctionPrototype.cpp:
(JSC::functionProtoFuncToString): Call isHostFunction on the body
rather than the function object.

runtime/JSFunction.cpp:
(JSC::JSFunction::JSFunction): Moved the structure version of this in
here from the header. It's not hot enough that it needs to be inlined.
(JSC::JSFunction::isHostFunction): Moved this in here from the header.
It's now a helper to be used only within the class.
(JSC::JSFunction::setBody): Moved this in here. It's not hot enough that
it needs to be inlined, and we want to be able to compile the header
without the definition of FunctionBodyNode.

runtime/JSFunction.h: Eliminated the include of "Nodes.h". This was
exposing too much JavaScriptCore dependency to WebCore. Because of this
change and some changes made to WebCore, we could now export a lot fewer
headers from JavaScriptCore, but I have not done that yet in this check-in.
Made a couple functions non-inline. Removes some isHostFunction() assertions.

wtf/FastAllocBase.h: Added the conventional using statements we use in
WTF so we can use identifiers from the WTF namespace without explicit
namespace qualification or namespace directive. This is the usual WTF style,
although it's unconventional in the C++ world. We use the namespace primarily
for link-time disambiguation, not compile-time.

bindings/js/JSDOMBinding.h: Removed include of JSFunction.h.
We don't want the entire DOM binding to depend on that file.

bindings/js/JSAudioConstructor.cpp: Added include of Error.h.
Before we inherited this automatically because JDDOMBinding.h
included JSFunction.h, but that was excessive.

bindings/js/JSDOMWindowCustom.cpp: Ditto.

bindings/js/JSHTMLInputElementCustom.cpp: Ditto.

bindings/js/JSImageConstructor.cpp: Ditto.

bindings/js/JSLazyEventListener.cpp: Ditto, but for JSFunction.h.

bindings/js/JSMessageChannelConstructor.cpp: Ditto.

bindings/js/JSOptionConstructor.cpp: Ditto.

bindings/js/JSWorkerConstructor.cpp: Ditto.

bindings/js/JSXMLHttpRequestConstructor.cpp: Ditto.

bridge/jni/jni_jsobject.mm: Ditto, but for SourceCode.h.

inspector/InspectorController.cpp: Ditto.

inspector/JavaScriptDebugServer.cpp:
(WebCore::JavaScriptDebugServer::recompileAllJSFunctions):
Moved mose of this function into the base class in JavaScriptCore,
so the details of compilation don't have to be exposed.

Including the CoreFoundation header here and X11 headers
later will result in different definitions for Boolean. The
CoreFoundation include does not seem to be necessary here
and my mac build was successfull without it. I will remove
it for now. If the build bots disagree this will be replaced
by a #if PLATFORM(CF).

The kit wants to paste from at least two different
clipboards. By introducing getCurrentTarget to the
PasteboardHelper interface we can make this decision
in the kit.
Use the new method in PasteboardGtk to get the right
GdkClipboard for the paste operation.

platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivate::createQTMovie): Only request QTMoviePreferredTransformAttribute
when !BUILDING_ON_TIGER and !BUILDING_ON_LEOPARD.
(WebCore::MediaPlayerPrivate::cacheMovieScale): Only ask for QTMovieOpenForPlaybackAttribute
when !BUILDING_ON_TIGER and !BUILDING_ON_LEOPARD,

Add SamplingCounter tool to provide a simple mechanism for counting events in JSC
(enabled using ENABLE(SAMPLING_COUNTERS)). To count events within a single function
use the class 'SamplingCounter', where the counter may be incremented from multiple
functions 'GlobalSamplingCounter' may be convenient; all other counters (stack or
heap allocated, rather than statically declared) should use the DeletableSamplingCounter.
Further description of these classes is provided alongside their definition in
SamplingTool.h.

Counters may be incremented from c++ by calling the 'count()' method on the counter,
or may be incremented by JIT code by using the 'emitCount()' method within the JIT.

This patch also fixes CODEBLOCK_SAMPLING, which was missing a null pointer check.

Following on from the lazy arguments creation patch, it's now
possible for an activation to to have a null register in the callframe
so we can't just blindly mark the local registers in an activation,
and must null check first instead.

This change sets the window size for popups on Mac to include all items
in the menu. This is required for hit testing on Mac, where we use native
controls to manage the popups and don't want to artificially limit the
valid hit testing region to a limited scroll window.

Fixes to build with latest skia: SkTypeface::Create() is now
SkTypeface::CreateFromName(); computeBounds() has been reworked
as getBounds(). The changes are placed behind an #ifdef for now,
so that we can roll back the skia version in Chromium if necessary
without having to roll back this change.

This code included some placeswhere we deliberately create negative offsets
from unsigned values, on 32bit this is "safe", but in 64bit builds much
badness occurs. Solution is to use signed types as nature intended.

Make creation of the Arguments object occur lazily, so it
is not necessarily created for every function that references
it. Then add logic to Function.apply to allow it to avoid
allocating the Arguments object at all. Helps a lot with
the function forwarding/binding logic in jQuery, Prototype,
and numerous other JS libraries.

Rearranged code to more clearly indicate what's conditionally compiled
and why. Now, all shared code is at the top of our JIT files, and all
#if'd code is at the bottom. #if'd code is delineated by large comments.

Moved functions that relate to the JIT but don't explicitly do codegen
into JIT.cpp. Refactored SSE2 check to store its result as a data member
in the JIT.

First off, copy fast/images/favicon-as-image.html over to http/tests/misc so it covers the original test case on all Mac platforms.
Second, add Leopard-specific results for the original test.
Then, remove it from the Leopard skipped list.
Finally, add it to the SnowLeopard skipped list (<rdar://problem/6877633> covers re-enabling it when we're no longer blocked).

More re-factoring of JIT code generation to move opcode generation
to helper functions outside the main switch-statement and gave those
helper functions standardized names. This patch covers the remaining
slow cases.

Start re-factoring JIT code generation to move op_code generation
to helper functions outside the main switch-statement and gave those
helper functions standardized names. This patch only covers the main
pass and all the arithmetic opcodes in the slow path.

<rdar://problem/5972751> Local image files (BMP, ico) can be misidentified as HTML.

First part of the fix - Disable content sniffing for file resources which never should've been happening anyways.
Second part of the fix - If the networking layer doesn't give us back a MIME type default to "application/octet-stream".

platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::createCFURLResponseWithDefaultMIMEType): Create a copy of the CFURLRequest with the default MIME type instead
of null.
(WebCore::didReceiveResponse): If the MIME type for the response is null, create a copy with the default MIME type.
(WebCore::WebCoreSynchronousLoader::load): Use shouldContentSniffRequest() to make synchronous loads have the same
sniffing policy as asynchronous loads. Also, correct a null MIME type by creating a copy with the default type.

platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::loadResourceSynchronously): Use shouldContentSniffRequest() to make synchronous loads have the
same sniffing policy as asynchronous loads.
(-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]): Set up the [NSURLResponse MIMEType] swizzling if
it hasn't been set up yet.
(_web_NSURLResponse_MIMEType): Either return the actual MIME type of the response, or the default MIME type if it's nil.

xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::loadRequestAsynchronously): Remove the workaround added in r29370 as it will now be covered by
the new mechanism.

wtf/Threading.h:
(WTF::ThreadIdentifier::ThreadIdentifier):
(WTF::ThreadIdentifier::isValid):
(WTF::ThreadIdentifier::invalidate):
(WTF::ThreadIdentifier::platformId):
ThreadIdentifier is now a class, containing a PlatformThreadIdentifier and
methods that are used across the code on thread ids: construction, comparisons,
check for 'valid' state etc. '0' is used as invalid id, which happens to just work
with all platform-specific thread id implementations.

All the following files repeatedly reflect the new ThreadIdentifier for each platform.
We remove ThreadMap and threadMapMutex from all of them, remove the functions that
populated/searched/cleared the map and add platform-specific comparison operators
for ThreadIdentifier.

There are specific temporary workarounds for Safari 4 beta on OSX and Win32 since the
public build uses WTF threading functions with old type of ThreadingIdentifier.
The next time Safari 4 is rebuilt, it will 'automatically' pick up the new type and new
functions so the deprecated ones can be removed.

wtf/ThreadingPthreads.cpp:
(WTF::ThreadIdentifier::operator==):
(WTF::ThreadIdentifier::operator!=):
(WTF::initializeThreading):
(WTF::createThreadInternal):
(WTF::waitForThreadCompletion):
(WTF::detachThread):
(WTF::currentThread):
(WTF::waitForThreadCompletion): This is a workaround for Safari 4 beta on Mac.
Safari 4 is linked against old definition of ThreadIdentifier so it treats it as uint32_t.
This 'old' variant of waitForThreadCompletion takes uint32_t and has the old decorated name, so Safari can
load it from JavaScriptCore library. The other functions (CurrentThread() etc) happen to match their previous
decorated names and, while they return pthread_t now, it is a pointer which round-trips through a uint32_t.
This function will be removed as soon as Safari 4 will release next public build.

wtf/ThreadingWin.cpp:
(WTF::ThreadIdentifier::operator==):
(WTF::ThreadIdentifier::operator!=):
(WTF::initializeThreading):
(WTF::createThreadInternal): All the platforms (except Windows) used a sequential
counter as a thread ID and mapped it into platform ID. Windows was using native thread
id and mapped it into thread handle. Since we can always obtain a thread handle
by thread id, createThread now closes the handle.
(WTF::waitForThreadCompletion): obtains another one using OpenThread(id) API. If can not obtain a handle,
it means the thread already exited.
(WTF::detachThread):
(WTF::currentThread):
(WTF::detachThreadDeprecated): old function, renamed (for Win Safari 4 beta which uses it for now).
(WTF::waitForThreadCompletionDeprecated): same.
(WTF::currentThreadDeprecated): same.
(WTF::createThreadDeprecated): same.

bytecode/SamplingTool.h:

bytecode/SamplingTool.cpp: Use DEFINE_STATIC_LOCAL for a static ThreadIdentifier variable, to avoid static constructor.

JavaScriptCore.exp: export lists - updated decorated names of the WTF threading functions
since they now take a different type as a parameter.

JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: ditto for Windows, plus added "deprecated" functions
that take old parameter type - turns out public beta of Safari 4 uses those, so they need to be kept along for a while.

Most of the change is in WTF.
Unless noted, all the following files changed to use the new ThreadIdentifier::isValid()
method instead of just doing 'if(m_threadID)' kind of checks, since ThreadIdentifier
is now a class rather then an integer.
Also, there is no need to initialize threadID in constructors to 0 now.

dom/XMLTokenizerLibxml2.cpp:
(WebCore::libxmlLoaderThread): use DEFINE_STATIC_LOCAL and accessor function for static thread id,
since now ThreadIdentifier needs construction and we avoid having global initializers.
(WebCore::matchFunc): use the new accessor function.
(WebCore::openFunc): ditto.
(WebCore::createStringParser): ditto.
(WebCore::createMemoryParser): ditto.

WebKit.vcproj/WebKit.def: replaced decorated names of WTF threading functions with new ones.
Also, aliased the old implementations so the public Safari 4 beta can load the old WTF functions
which it uses. Next time Safari 4 builds, it will pick up new functions and the deprecated ones
can be removed.

fast/forms/text-control-intrinsic-widths-expected.txt: Rolled back to the
version before Hyatt's recent intrinsic margin check-in. According to Dan,
that should not have had any effect on this test, so these results reflect
some other sort of difference on Hyatt's computer.