The document-open.html test was flaky at times. The test invokes the layout test plugin
which in its destroy stream handler opens a new document. This basically tears down the
stream and the associated plugin instance, which causes a crash when the plugin stream
dereferences an invalid m_client pointer which points to the PluginView instance which
is invalid at this time. Fix is to set the m_client pointer to NULL in the stop function
and check for the same.

The document-open.html test was flaky at times. The test invokes the layout test plugin
which in its destroy stream handler opens a new document. This basically tears down the
stream and the associated plugin instance. The pluginLog function in the layout test
plugin attempts to retrieve the window script object on a torn down plugin instance
which crashed consistently on windows in the debugger. The functions which issue
these logs already have a valid window script object. We now have variants of the pluginLog
function which take in a window script object with and without variable arguments.

transparencyClipBox() attemped to minimize the size of the transparency layer by mapping
each clip rect into painting space before taking the unions. This, however, did not work
correctly with combinations of reflections and transforms. Fixed by unioning the
clipRect and mapping through transforms along the way.

Also leave some #ifdeffed code in beginTransparencyLayers() that makes it easy to see
where the transparency layers are.

Add postTaskToMainThread to ScriptExecutionContext.
Move the code to post task to the main thread into a new method on ScriptExecutionContext,
to use as a helper implementation of the virtual ScriptExecutionContext::postTask(Task) in
contexts that live on the main thread.​https://bugs.webkit.org/show_bug.cgi?id=31427

worldIDs.
(WebCore::ScriptController::createWorld): Added. Returns a new world
suitable for use on the main thread.
(WebCore::ScriptController::executeScriptInWorld): Renamed from
executeScriptInIsolatedWorld, since this works just fine with a
"normal" world.

bindings/js/ScriptController.h: Added createWorld, removed functions

that took worldIDs, renamed executeScriptInIsolatedWorld to
executeScriptInWorld.

page/Frame.cpp:

(WebCore::Frame::injectUserScripts):
(WebCore::Frame::injectUserScriptsForWorld):
Updated for changes to UserScriptMap and ScriptController.

Changed these functions to take a DOMWrapperWorld* instead of a
worldID. Also updated for changes to UserScript and UserStyleSheet.

page/UserScript.h:

page/UserStyleSheet.h: Changed not to hold a worldID, since it was

never used.

page/UserScriptTypes.h:

page/UserStyleSheetTypes.h: Changed UserScriptMap and

UserStyleSheetMap to use a RefPtr<DOMWrapperWorld> instead of a
worldID as their key type.

WebKit:

WebKit.xcodeproj/project.pbxproj: Added WebScriptWorld to the project.

WebKit/mac:

WebScriptWorld is the new object that represents a world. The only
place worldID is still used is in -[WebFrame
_stringByEvaluatingJavaScriptInIsolatedWorld:WithGlobalObject:FromString:],
but that will change soon.

WebKit.exp: Export WebScriptWorld.

WebView/WebFrame.mm:

(-[WebFrame _stringByEvaluatingJavaScriptInIsolatedWorld:WithGlobalObject:FromString:]):
Moved the bizarre world caching/creation logic that DRT depends on
here from the findWorld function in ScriptController.cpp. Updated to
use ScriptController::executeScriptInWorld instead of
ScriptController::executeScriptInIsolatedWorld.
(-[WebFrame _contextForWorld:]): Renamed from contextForWorldID:. Now
takes a WebScriptWorld.

WebView/WebFramePrivate.h: Replaced contextForWorldID: with

_contextForWorld:.

WebView/WebScriptWorld.h: Added.

WebView/WebScriptWorld.mm: Added.

(-[WebScriptWorld initWithWorld:]): Store the passed-in world in our
_private member.
(-[WebScriptWorld init]): Create a new DOMWrapperWorld and pass it to
-initWithWorld:.
(-[WebScriptWorld dealloc]): Release _private.
(+[WebScriptWorld standardWorld]): Returns a shared instance that
represents WebCore's mainThreadNormalWorld().
(+[WebScriptWorld world]): Returns a new instance.
(core): Returns the DOMWrapperWorld for this WebScriptWorld.

Changed these functions to take a WebScriptWorld instead of a worldID.

WebKit/win:

WebScriptWorld is the new object that represents a world. The only
place worldID is still used is in
IWebFramePrivate::stringByEvaluatingJavaScriptInIsolatedWorld, but
that will change soon.

ForEachCoClass.h: Added WebScriptWorld.

Interfaces/IWebFramePrivate.idl: Replaced contextForWorldID with

contextForWorld.

Interfaces/IWebScriptWorld.idl: Added.

Interfaces/IWebViewPrivate.idl: Changed the user script/stylesheet

functions to take an IWebScriptWorld instead of a worldID.

Interfaces/WebKit.idl: Added WebScriptWorld.

WebFrame.cpp:

(WebFrame::contextForWorld): Renamed from contextForWorldID. Now takes
an IWebScriptWorld.
(WebFrame::stringByEvaluatingJavaScriptInIsolatedWorld): Moved the
bizarre world caching/creation logic that DRT depends on here from the
findWorld function in ScriptController.cpp. Updated to use
ScriptController::executeScriptInWorld instead of
ScriptController::executeScriptInIsolatedWorld.

(WebCore::configureTemplate): New function; does all the standard configuration work.
(WebCore::createCallback): De-inlined wrapper for FunctionTemplate creation.

bindings/v8/V8Binding.h:

bindings/v8/V8Proxy.cpp:

(WebCore::batchConfigureAttributes): Just wrapped the very long fn parameter list.
(WebCore::batchConfigureCallbacks): New function, used by configureTemplate.
(WebCore::batchConfigureConstants): Just wrapped the very long fn parameter list.

More closely match FrameLoaderClient.mm. Turns out we don't want to
use MIMETypeRegistry::getMIMETypeForPath because we can't distinguish
between application/octet-stream and lack of knowledge of the MIME
type.

platform/network/ResourceHandleInternal.h:
(WebCore::ResourceHandleInternal::ResourceHandleInternal):
Don't store m_currentCFChallenge, which was only used for a single assertion. Unlike the
NSURLConnection case, CF challenge doesn't carry a sender with it, so the copy in web challenge
is identical.

platform/network/cf/AuthenticationChallenge.h:
(WebCore::AuthenticationChallenge::setAuthenticationClient): Added a setter to match the new
Mac interface. Previously, one had to create a new AuthenticationChallenge to replace client.

platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Fixed assertions after removal
of m_currentCFChallenge. Also, there is no need to set client now, as it's guaranteed to
be already set.

platform/network/mac/AuthenticationChallenge.h:
(WebCore::AuthenticationChallenge::m_sender): Explained the existence of this member to the
best of my understanding.
(WebCore::AuthenticationChallenge::m_nsChallenge): Renamed from m_macChallenge to prevent
confusion with "mac" and "web" challenges in ResourceHandleInternal.

platform/network/mac/AuthenticationMac.mm:
(WebCoreAuthenticationClientAsChallengeSender): Added a Obj-C wrapper for AuthenticationClient,
making it possible to use the latter with NSURLAuthenticationChallenge.
(WebCore::AuthenticationChallenge::AuthenticationChallenge): Updated for m_macChallenge ->
m_nsChallenge renaming.
(WebCore::AuthenticationChallenge::setAuthenticationClient): Wrap the client in Obj-C and
set it as sender (or unset, if client is null).

platform/network/mac/ResourceHandleMac.mm:
(WebCoreResourceHandleAsDelegate) WebCoreResourceHandleAsDelegate no longer doubles as
authentication challenge sender.
(WebCore::ResourceHandle::~ResourceHandle): A navigation can happen underneath an
authentication sheet.
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Form m_currentWebChallenge
using the new setAuthenticationClient() method.
(WebCore::ResourceHandle::didCancelAuthenticationChallenge): Fixed an incorrect assertion.
Since didCancelAuthenticationChallenge is called by connection, the passed challenge is
the original Mac one, not the one we created for use with authentication sheet. I don't
know when a connection would cancel authentication in practice, so I haven't tested this.

It was missing the ".text" directive at the top of the file,
indicating that code would follow. Without it, the assembler created
"NOTYPE" symbols, which would result in linker errors.​https://bugs.webkit.org/show_bug.cgi?id=30863

(WebCore::createCGColorWithColorSpace): New helper to create a
color in a ColorSpace.
(WebCore::setCGFillColor): Call new helper.
(WebCore::setCGStrokeColor): Call new helper.
(WebCore::GraphicsContext::setPlatformShadow): Call new helper.

Update records for existing committers to include email addresses
used in svn.webkit.org and lists.webkit.org.
Most committers use the same email address in all 3 places, but some use
separate addresses. committers.py needs record of each of these addresses.

(PluginCounterPage::PluginCounterPage): Initialize m_pluginParent to 0.
(PluginCounterPage::~PluginCounterPage): Delete the plugin parent later
(after the page)
(PluginTracerPage::createPlugin): Assign a dummy parent to the plugin.
(PluginTracerPage::PluginTracerPage): Set up the plugin parent.
(tst_QWebPage::createViewlessPlugin): Verify that for viewless pages the
plugin parent remains unchanged.

platform/network/SocketStreamHandleClient.h: Removed willOpenStream and willSendData.
(WebCore::SocketStreamHandleClient::willOpenStream): Removed. This is currently not used by
the only client (WebSocketChannel), and it's not clear what this callback's semantics
should be.
(WebCore::SocketStreamHandleClient::willSendData): Ditto.
(WebCore::SocketStreamHandleClient::receivedCancellation): Removed, because it was misplaced.
For ResourceHandle, this method is called when the user cancels authentication sheet,
not when something happens with the stream.

websockets/WebSocketChannel.h: Some WebSocketChannel methods were virtual without any
reason. Also, added didReceiveAuthenticationChallenge/didCancelAuthenticationChallenge.

websockets/WebSocketChannel.cpp: Adjusted for the above change. Authentication-related
callbacks have no real implementation yet.

(QWebPageWidgetClient::inputMethodEnabled): Ditto for QWidget.
(QWebPagePrivate::handleSoftwareInputPanel): Don't use view() to
test for input method support. Instead query using QWebPageClient
and send the SIPR event to the ownerWidget() instead of the view().
The latter is null for QGraphicsWebView.

11/10/09:

Simplify the ownership model for worlds - rather than having a pair of weak references
between DOMWrapperWorld and ScriptController/ScriptCachedFrameData, give the latter an
ref pointer to the former. This reduces complexity & cost of the caching entries in the
back forward cache.

Removed method EventHandler::dragSourceMovedTo, since it is no longer
needed. This method fired a drag event whenever the mouse moved, but
section 7.9.4 of the HTML 5 spec. defines the drag-and-drop processing
model independent of when the mouse moves. See "Among other changes..."
in the change log for patch 1 for more details.

In fixing this bug, this patch also makes our drag processing model
conform to the HTML 5 spec.

Among the changes, this patch ensures that the drag event isn't fired outside
of the drag-and-drop processing loop, WebCore::EventHandler::updateDragAndDrop.
Currently, the drag event is fired whenever the mouse button is down and the OS
detects the mouse moved. But, as per the spec, the drag event should
fire approx. every 350ms so long as the mouse button is down.

Test: fast/events/drag-and-drop-fire-drag-dragover.html

page/EventHandler.cpp:
(WebCore::EventHandler::clear):
(WebCore::EventHandler::canHandleDragAndDropForTarget): Formerly named handleDragAndDropForTarget.
Modified to determine when we are in the correct instance of EventHandler to service the drag
and drop operation.
(WebCore::EventHandler::updateDragAndDrop): Moved code from WebCore::EventHandler::dragSourceMovedTo
into this method.
(WebCore::EventHandler::cancelDragAndDrop):
(WebCore::EventHandler::performDragAndDrop):
(WebCore::EventHandler::clearDragState):

page/EventHandler.h: Added field m_shouldOnlyFireDragOverEvent to determine whether
we should fire both drag and dragover events or only the dragover event.

The first request to an HTTPS URL results in didFailProvisionalLoadWithError being called with an error
about the validity of the self-signed certificates used in the regression tests. We would then add the
host to the ignore list for SSL certificate errors and retry the request. If this happened during a test
that had enabled frame load delegate logging this would result in extra log messages being generated,
causing the test to fail.

We address this by explicitly ignoring SSL certificate errors for localhost and 127.0.0.1 before running any
tests.

Store the global object for all worlds, not just the normal world.
Also maintain bidirectional weak references between the ScriptCachedFrameData and the DOMWrapperWorld,
so we can forget global objects if a world goes away.

These functions all call other functions which require a ColorSpace
as a parameter.
(WebCore::GraphicsContext::setStrokePattern):
(WebCore::GraphicsContext::setFillPattern):
(WebCore::GraphicsContext::setStrokeGradient):
(WebCore::GraphicsContext::setFillGradient):

All of the GraphicsContext functions that take a Color should now
also take a ColorSpace.

platform/graphics/GraphicsContext.h:

Added new member variables stokeColorSpace and fillColorSpace.

platform/graphics/GraphicsContextPrivate.h:

(WebCore::GraphicsContextState::GraphicsContextState):

Attempt to keep the Cairo port building with all of the massive
changes to GraphicsContext.

(WebCore::sRGBColorSpaceRef): New static function that returns a
CGColorSpaceRef for the sRGB color space.
(WebCore::deviceRGBColorSpaceRef): New static function that returns
a CGColorSpaceRef for the device RGB color space.

(WebCore::setCGFillColor): Now takes a ColorSpace parameter and
sets the fill color to the specified color in the given ColorSpace.
(WebCore::setCGStrokeColor): Same, but for stroke.

(WebCore::setCGFillColorSpace): New static to set the
CGFillColorSpace to the given ColorSpace
(WebCore::setCGStrokeColorSpace): Same, but for stroke.

Remove session storage from Settings. It was added temporarily so we could
disable it by default at runtime in Chromium. We now disable these things in a
different way, so it's time to remove it. Qt also depended on this setting for
a short period of time, but after talking to them we agreed that it should be
removed.

WebKit/mac: WebKit part of making full-screen video pause during scrubbing.

Reviewed by Eric Carlson and Darin Adler.

WebView/WebVideoFullscreenHUDWindowController.h: Added _isScrubbing

ivar.

WebView/WebVideoFullscreenHUDWindowController.mm:

(-[WebVideoFullscreenHUDWindowController dealloc]): Assert that
_isScrubbing is NO.
(-[WebVideoFullscreenHUDWindowController endScrubbing]): Call
HTMLMediaElement::endScrubbing().
(-[WebVideoFullscreenHUDWindowController timelinePositionChanged:]):
If scrubbing has just begun, call HTMLMediaElement::beginScrubbing()
and schedule -endScrubbing to be called when mouse tracking ends.

(JSC::DateInstance::gregorianDateTime):
(JSC::DateInstance::gregorianDateTimeUTC): Split gregorianDateTime into
a UTC and non-UTC variant, and split each variant into a fast inline
case and a slow out-of-line case.

Replace fromDictionaryTransition with flattenDictionaryObject and
flattenDictionaryStructure. This change is necessary as we need to
guarantee that our attempt to convert away from a dictionary structure
will definitely succeed, and in some cases this requires mutating the
object storage itself.

Prepended $$PWD to GENERATED_SOURCES_DIR to avoid potential ambiguities when included from WebCore.pro.
Some preprocessors consider this GENERATED_SOURCES_DIR relative to current invoking dir (e.g., ./WebCore),
and not the working dir of JavaCriptCore.pri (i.e., ../JavaScriptCore/).

Moved macro MMP_RULES (LINKEROPTION) into symbian instead of symbian-sbsv2,
since adjustment of RW-section base address will be needed for all new symbian
tool chains, specifically for arm and gcc compilation targets.
Also, change target address to 0xE00000 to be sufficient for all targets.

There are clearly use-cases for this feature, but it will require
more work to make this fully work with an enum to have fine-grained
control over the interactivity levels. For now it is easy to achieve
in user-code what the boolean property did.

XMLTokenizer::doEnd() uses an additional logic to report a parse failure in
documents that end prematurely but are not considered invalid by QXmlStream.
This is to stay compatible with the libxml2 implementation.
However, that code path would be also hit in situations when it should not,
i.e. the error would have already been caught and handled. As a result, the
same error would be reported twice.

No new tests, because the problem is already covered by
fast/parser/xml-declaration-missing-ending-mark.html.

bindings/v8/WorkerContextExecutionProxy.cpp:
(WebCore::WorkerContextExecutionProxy::initContextIfNeeded):
Now generates the right type of DOMWrapper for SharedWorkerContexts.
(WebCore::WorkerContextExecutionProxy::convertToV8Object):
Added support for SHAREDWORKERCONTEXT.
(WebCore::WorkerContextExecutionProxy::convertEventTargetToV8Object):
Added support for SharedWorker and SharedWorkerContext.

Made the full-screen video HUD appear when playback stops, such as when
the end of the video is reached.

Reviewed by Eric Carlson.

WebView/WebVideoFullscreenHUDWindowController.h: Cleaned up.

WebView/WebVideoFullscreenHUDWindowController.mm:

(-[WebVideoFullscreenHUDWindowController scheduleTimeUpdate]): Updated
for the renaming of -updateRate to -updatePlayButton.
(-[WebVideoFullscreenHUDWindowController updatePlayButton]): Renamed
-updateRate to this.
(-[WebVideoFullscreenHUDWindowController updateRate]): This method now
responds to changes to the playback rate by updating the play button
and showing or hiding the HUD as necessary.
(-[WebVideoFullscreenHUDWindowController togglePlaying:]): Now only
toggles playing. UI updates are driven by -updateRate being called.
(-[WebVideoFullscreenHUDWindowController playing]): Cleaned up.

JavaScriptGlue: Added the use jsc define for files that use
this config file and DateMath.h. This should
be able to go away when DateMath is properly
split into wtf and jsc portions which is this bug:​https://bugs.webkit.org/show_bug.cgi?id=31246

Reviewed by NOBODY (chromium build fix).

config.h:

WebCore: * platform/network/HTTPParsers.cpp:
(WebCore::parseDate): Changed this to not
use a date parser that needs ExecState passed.

Started as a compilation fix for Symbian where the compiler makes a distinction between
class and struct in function argument signatures.
Changed all forward declarations of ResourceRequest to have class in the forward
declaration instead of struct and changed the definition of ResourceRequest to be class
and added access qualifiers where missing. Additionally two references of friend
struct ResourceRequestBase changed to class instead.

Started as a compilation fix for Symbian where the compiler makes a distinction between
class and struct in function argument signatures.
Changed forward declaration of ResourceRequest to have class in the forward
declaration instead of struct.

In <​http://trac.webkit.org/changeset/19148>, setStaticY() was changed
to mark the object for layout, doing so without marking its ancestors.
However, RenderBlock::skipLeadingWhitespace and
RenderBlock::skipTrailingWhitespace() call setStaticY() on a relative-
positioned inline container, causing it to be marked for layout without
ever going back to give it layout, and thus layout could end with a
dirty object still in the tree, leading to all sorts of badness.

The fix is to revert setStaticY() to not marking the object dirty, and
instead do it in the call sites that require it, which are in
RenderBlock and RenderFlexibleBox.

By invoking a script queue'd by queueScript(), 'true' was beeing returned
always, which from WorkQueue prospective means that a load has been started
and the queue processing should stop and wait for the load to finish.
Spinning it off into a loading and a non-loading variants was the solution
adopted by Mac's DRT to work around this problem. The former keeps returning
'true' while the later executes the script synchronously and returns 'false'
making it possible to the WorkQueue to proceed right away.