The GraphicsLayer tree has unparented m_fullScreenRootLayer behind our backs, replacing the
tiled layer with a normal one. Instead of holding on to a specific layer, assume that the
w_rootLayer will only have 0 or 1 children, and if a child is present, then that is our full-
screen layer.

Additionally, check to see if the animating layer's presentationLayer is nil
before calling it; asking a nil object for a CATransform3D will give back a struct full of
garbage.

In WKFullScreenWindowController, when the exit animation completes, ignore the "completed"
parameter. This eliminates the possibility that the full screen window will end up left
on top of the screen if the animation is cancelled and a enter full screen animation isn't
forthcoming.

The following tests now pass:
fast/js/mozilla/eval/exhaustive-fun-normalcaller-direct-strictcode.html
fast/js/mozilla/eval/exhaustive-fun-strictcaller-direct-normalcode.html
fast/js/mozilla/eval/exhaustive-fun-strictcaller-direct-strictcode.html

create_hash_table: Added a special case for fromCharCode, since it uses

a custom "thunk generator".

heap/Heap.cpp:

(JSC::TypeCounter::operator()): Fixed a bug where the type counter would
overcount objects that were owned through more than one mechanism because
it was getting in the way of counting the results for this patch.

Break up ResourceLoader::didCancel() into willCancel() and didCancel(), and making them pure virtual.
This change has the following benefits:

Managing ResourceLoader state can be in the base class; Subclasses no longer need to protect
themselves, check these variables as often, or ASSERT them.

ResourceLoader subclasses no longer have to call the base class ::didCancel

ResourceLoader::cancel becomes more capable of handling reentrancy with the design that the
cancellation is completed inside the last call.

No new tests - No change in behavior for previous tests, and new test would require API usage outside
the scope of DumpRenderTree.

loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::ResourceLoader):
(WebCore::ResourceLoader::cancel): Moved from ResourceLoader::didCancel, and does all of that same work
except it interposes calls to "willCancel" and "didCancel" as required to maintain the same behavior.

Split-up into willCancel() and didCancel(), based on when the "reached terminal state" flag used to be checked:

loader/NetscapePlugInStreamLoader.cpp:
(WebCore::NetscapePlugInStreamLoader::didReceiveResponse): Call the entry point cancel() instead of the old didCancel()
(WebCore::NetscapePlugInStreamLoader::willCancel):
(WebCore::NetscapePlugInStreamLoader::didCancel):

loader/NetscapePlugInStreamLoader.h:

Split-up into willCancel() and didCancel(), based on when the "reached terminal state" flag used to be checked:

This is a defensive fixe for crbug.com/82799, in which
a RenderLayer could not prepare itself because its owning layerImpl
had no associated layerRenderer. The underlying issue is that we
sometimes put renderSurfaces onto the list that won't actually render.
For now, the priority is to reduce fragility so that invisible layers
dont lead to crashers. We do this by being more agressive about
binding CCLayerImpls to the LayerRenderer, doing it all the time rather
than only when we think it will get rendered.

This patch introduces the concept of a "compact" address that
allows individual architectures to control the maximum offset
used for the inline path of get_by_id. This reduces the code
size of get_by_id by 3 bytes on x86 and x86_64 and slightly
improves performance on v8 tests.

UIProcess/API/qt/qwkcontext.cpp:
(QWKContextPrivate::QWKContextPrivate): Set up and register a WKIconDatabaseClient.
(QWKContext::QWKContext): Minor refactor to avoid code duplication in constructors.
(QWKContext::setIconDatabasePath): Exactly what it sounds like.
(QWKContext::iconForPageURL): Retrieves the favicon for a given page URL as a QIcon.

These new tests check that no POST content is sent to the new URL after receiving http
status codes 301, 302 and 303, and checks that the POST content is sent to the new URL
after receiving a 307 http status code.

The changes of r55762 uncovered the underlying issue here. The markup fragment
placed in the pasteboard does not contain the background color style.
This occurs only if the selection is limited to a single text node, whereas if the
selection spans across multiple nodes, the style is preserved correctly.
The fix consists in changing the logic that decides whether we should include the wrapping
node in the markup. That logic is based on the code in highestAncestorToWrapMarkup which relies
on isElementPresentational to choose candidates to be the wrapping node.
I've extended it to accept nodes that have non fully transparent background colors.

editing/Editor.cpp:

(WebCore::Editor::hasTransparentBackgroundColor): Now is a static method of the class.

editing/Editor.h:

editing/markup.cpp:

(WebCore::isElementPresentational): Modified to use hasTransparentBackgroundColor.

LayoutTests:

The following test checks that when we copy a text node surrounded by an element that
has non transparent background color we preserve the background color as well.

Console view in drawer looks exactly the same as console panel. Merging ConsoleView and ConsolePanel together
will allow us to reuse panel's functionality (e.g. resizable sidebar) even when console is docked.

websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::readStatusLine):
WebSocketHandshake should not print a carriage return to console. To fix this,
we first check whether the status line ends with CRLF. After that,
we can print the first (lineLength - 2) characters of the status line
which do not contain a carriage return.

create_hash_table: Added a special case for fromCharCode, since it uses
a custom "thunk generator".

heap/Heap.cpp:
(JSC::TypeCounter::operator()): Fixed a bug where the type counter would
overcount objects that were owned through more than one mechanism because
it was getting in the way of counting the results for this patch.

runtime/JSGlobalObjectFunctions.h: Changed JSGlobalObject to use a
static table for its global functions. This required uninlining some
things to avoid a circular header dependency. However, those things
probably shouldn't have been inlined in the first place.

Even more global object properties can be made lazy, but that requires
more in-depth changes.

Makes the CCLayerImpl tree self-hosting and provides an explicit step
to synchronize the LayerChromium tree to the CCLayerImpl tree.
Tested by compositing/ layout tests and by unit tests in WebKit/chromium.

If goToItem is called while loading is deferred, save the arguments
and try again later instead of doing nothing.

Test: loader/navigation-while-deferring-loads.html

loader/FrameLoader.cpp:
(WebCore::FrameLoader::setDefersLoading):
Pipe the "defersLoading" state into HistoryController.

loader/HistoryController.cpp:
(WebCore::HistoryController::HistoryController):
(WebCore::HistoryController::goToItem):
Save the HistoryItem and FrameLoadType if loading is deferred.
(WebCore::HistoryController::setDefersLoading):
If we have a saved HistoryItem after resuming, try going to it.

loader/HistoryController.h:

page/Page.cpp:
(WebCore::Page::goToItem):
No longer bail early if loading is deferred, since HistoryController
now handles this case.

This reduces the clobber build time by 4s on my machine. It helps
by making the slowest to compile V8DerivedSources faster (and thus
more parallelizable). With 8 files, the 3 slowest are 23s, 18s and
10s. With 19 files, the 3 slowest are 16s, 10s, and 10s.

WebCore.gyp/WebCore.gyp:

storage/IDBObjectStore.h: Fix a missing include that was working
because a different .cpp file before it was including the header.

Fix adjustment handling for pages that trigger the slow scrolling path.
The slow scrolling path is triggered by WebCore when it determines that
doing a simple invalidation is quicker than doing a normal scroll. This
typically happens when there are large elements with fixed positions.

WebCoreSupport/ChromeClientGtk.cpp:
(WebKit::ChromeClient::invalidateContentsForSlowScroll): Poke the adjustment
watcher to update its adjustments when a page triggers the slow scrolling path.

Instead of allocating the backing store surface directly in WebKit2,
instantiate the GtkWidgetBackingStore class which abstracts away the
platform-specific details of maintaining the backing store.

UIProcess/BackingStore.h:

UIProcess/gtk/BackingStoreGtk.cpp:
(WebKit::BackingStore::paint): Call into GtkWidgetBackingStore to get the Cairo surface now.
(WebKit::BackingStore::incorporateUpdate): Ditto.
(WebKit::BackingStore::scroll): Call into GtkWidgetBackingStore to do the actual backing store scroll.

Renamed pasteboard/5075944-2.html to pasteboard/preserve-underline-color.html and pasteboard/5075944-3.html to
deleting/deleting-line-break-preserves-underline-color.html. Also converted them to dump-as-markup tests.

Construct a WebMouseEvent to send to plugin, adjusting values to take pageScaleFactor
into account. Also adjusted bounds sent to viewGeometryDidChange to take pageScaleFactor
into account. Both are needed or the plugin will think the mouse positions are outside
its bounds.

Shared/WebEvent.h:

Shared/WebMouseEvent.cpp:Add ctor to clone a WebMouseEvent and add a scaleFactor to values
(WebKit::WebMouseEvent::WebMouseEvent):

WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::handleEvent):Adjust mouse coords to take pageScaleFactor into account
(WebKit::PluginView::viewGeometryDidChange):Adjust bounds to take pageScaleFactor into account

GNUmakefile.am: Add the files necessary to use the DrawingAreaProxyImpl
to the source list. The source list also needs the LayerContextTree stubs.

Shared/LayerTreeContext.h: This file should not be guarded by
USE(ACCELERATED_COMPOSITING) as it's needed for the DrawingAreaProxyImpl
IPC messaging.

Shared/gtk/LayerTreeContextGtk.cpp: Added this stub.

UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::createDrawingAreaProxy): Instead of creating the deprecated
chunked drawing area, create a DrawingAreaProxyImpl.
(WebKit::PageClientImpl::setViewNeedsDisplay): Here we must now queue a redraw. Previously
the chunked drawing area was doing this manually. This is the appropriate place though.
(WebKit::PageClientImpl::scrollView): Add an implementation that just calls into setViewNeedsDisplay.

UIProcess/DrawingAreaProxy.messages.in: Do not the DrawingAreaProxyImpl-specific
message with USE(ACCELERATED_COMPOSITING).

UIProcess/WebPageProxy.cpp: Removed these guards, as DrawingAreProxyImpl is used on all platforms now.
(WebKit::WebPageProxy::didReceiveMessage): Ditto.

UIProcess/WebPageProxy.h: Ditto.

UIProcess/gtk/BackingStoreGtk.cpp: Added. This implementation heavily uses Cairo,
but depends on GTK+/GDK in a few places.
(WebKit::BackingStore::paint):
(WebKit::BackingStore::incorporateUpdate):
(WebKit::BackingStore::scroll):

UIProcess/gtk/WebPageProxyGtk.cpp: Added a getting for the viewWidget, which is
required by BackingStoreGtk. A similar getter exists for Windows and Mac.
(WebKit::WebPageProxy::viewWidget): Ditto.

WebProcess/WebPage/DrawingArea.cpp: Removed these guards as DrawingAreaProxyImpl is used on all platforms now.
(WebKit::DrawingArea::create): Ditto.

WebProcess/WebPage/DrawingArea.h: Ditto.

WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState): Do not guard
this DrawingAreaProxyImpl-specific message with USE(ACCELERATED_COMPOSITING)

WebProcess/WebPage/WebPage.cpp: Removed these guards as DrawingAreaProxyImpl is used on all platforms now.
(WebKit::WebPage::didReceiveMessage): Ditto.

In setting printing, we should not validate resources already cached
for the document. If we do, web fonts used for screen are revalidated
and possiby reloaded. Then the fonts can be shown as blank on print.
This patch won't save the case where screen and print use different web
fonts. Nonetheless, this is an improvement.

No new tests because there seems to be no good way to test print images.

CFStringTokenizer’s kCFStringTokenizerUnitWord considers “Here’s” as two separate tokens.
Switching to CFStringTokenizer in r84750 was an attempt to address an issue with Japanese word
boundaries for searches with WebFindOptionsAtWordStarts, but it turned out to be insufficient,
and in r86387 the Japanese word issue was addressed independently of text boundaries, so just
revert r84750.

We need to ensure that we have called all the weak map finalizers while
the global object (and hence global context) is still in a consistent
state. The best way to achieve this is to simply use a weak handle and
finalizer on the global object.

WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::setRootCompositingLayer):
If we have a layer tree host, but haven't yet sent a EnterAcceleratedCompositingMode message (this can happen
when quickly going in and out of compositing mode), make sure to schedule a notification when the layer tree host
does it next flush. This will end up sending the EnterAcceleratedCompositingMode message.

Console view in drawer looks exactly the same as console panel. Merging ConsoleView and ConsolePanel together
will allow us to reuse panel's functionality (e.g. resizable sidebar) even when console is docked.

Emit a notification when moving a CALayer from the WebProcess's main
layer host to a new context. This allows listeners to invalidate their
layers which may not support moving between different CAContexts (as is
the case with QTMovieLayer). In order to allow listeners to determine if they
are affected, the notification will pass the root CALayer in a userInfo
dictionary.

In WebFullScreenManagerMac, move from storing a pointer to a non-refcounted
class (GraphicsLayer) to a retainable class (PlatformLayer).

WebProcess/FullScreen/mac/WebFullScreenManagerMac.h:

WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
(WebKit::WebFullScreenManagerMac::WebFullScreenManagerMac): No need to initialize

After talking this out with various folks in the CSP working group, we
decided that this syntax isn't the right way to approach this issue.
If we want to address the use case of enabling JavaScript URLs
separately from inline script, we'll probably just make

Temporarily fix Symbian build by re-enabling compilation
of Qt/Gtk common code (as was the case for Symbian before r55875).
This is a stop gap until the pure Symbian Core IPC and process launching bits land in Bug 55875
As of this revision, only the native SharedMemory implementation is in trunk.

dom/Document.cpp:
(WebCore::Document::Document): Initialize wheel event handler count
(WebCore::Document::didAddWheelEventHandler): Increment count, and tell the main frame
to recalculate the total number of wheel event handlers in all of its frames' documents
(WebCore::Document::didRemoveWheelEventHandler): Reverse of previous method

page/Frame.cpp:
(WebCore::Frame::setDocument): When the frame's document changes, calculate that
document's total wheel event handlers, and notify the UIProcess
(WebCore::Frame::notifyChromeClientWheelEventHandlerCountChanged): Performs a crawl
of the frame tree to aggregate the count

page/Frame.h:

platform/ScrollableArea.h: Virtualize didAddHorizontalScrollbar and
willRemoveHorizontalScrollbar for overriding in RenderLayer and FrameView
(WebCore::ScrollableArea::isHorizontalScrollerPinnedToMinimumPosition): Returns true if there is
no scrollbar or the scroller position is in the minimum scroll position.
(WebCore::ScrollableArea::isHorizontalScrollerPinnedToMaximumPosition): Converse of the above.
(WebCore::ScrollableArea::shouldRubberBandInDirection): Default impl

(WebCore::ScrollAnimatorMac::handleWheelEvent): New logic for determining whether
to allow rubber-banding based on the area's scroll position and the wheel event.
Could prevent accepting the wheel event. Also, fix typo of "momentum"
(WebCore::isScrollingLeftAndShouldNotRubberBand): Inline helper function for logic
(WebCore::isScrollingRightAndShouldNotRubberBand): Inline helper function for logic

Don't set the ItemClipsChildrenToShape flag for the root platform layer,
since that is now the overflow controls layer. The clip layer, which was
previously the root platform layer, already gets the flag by way of
the GraphicsLayer mask-to-bounds flag.

This test creates an object store with a few records and exercises
a variety of cursors going forward, backward, and over key ranges.
It also updates records from the cursor and checks that the update
stuck.

During plug-in instantiation, Flash makes a couple of NPRuntime calls to get the
URL of the current document as well as the URL of the toplevel document. This leads to
a bunch of IPC traffic that slows down instantiation.

Since we know what calls Flash is making and what results are expected, we can handle the
NPRuntime calls directly in the plug-in process and avoid extra IPC overhead.

(WebKit::PluginControllerProxy::initialize):
Set m_pluginCreationParameters to point to the creation parameters right before
calling Plugin::initialize and restore it back afterwards.

(WebKit::PluginControllerProxy::tryToShortCircuitInvoke):
If the plug-in calling NPN_Invoke has the CanShortCircuitSomeNPRuntimeCallsDuringInitialization
quirk, and we're being initialized, check for the flash_getWindowLocation andflash_getTopLocation function calls and return the correct values.

(WebKit::PluginControllerProxy::tryToShortCircuitEvaluate):
Check if the script string has the definitions of flash_getWindowLocation or flash_getTopLocation
and just ignore them. Note that ignoring them has the effect of not adding them to the window object,
which could in theory be a backwards compatibility problem if web pages were to assume that these
functions existed on a page with plug-ins. In practice this is probably not a problem, especially since
these functions are only used on Mac WebKit.

tryToShortCircuitInvoke needs to be able to indicate that an invoke
call failed. Add a returnValue parameter and have the real return value
indicate whether tryToShortCircuitInvoke did short-circuit the invoke or not.

Make it possible for a plug-in controller to intercept calls to NPN_Invoke, which
will be useful for avoiding sync IPC messages during instantiation.

PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::evaluate):
Call tryToShortCircuitEvaluate. If it returns true, we don't need to call back to
the web process to ask it to evaluate the script string.

inspector/InspectorDatabaseInstrumentation.h: FAST_RETURN_IF_NO_FRONTENDS macros
is used for early return in common case when inspector is not opened. In this
case inspector instrumentation costs one additional check of a static field.
(WebCore::InspectorInstrumentation::didOpenDatabase):

Use global chunks for sharing data between processes.
This is an initial implementation. An outstanding issue
is the correct way to close() the chunk in the SharedMemory d'tor
without triggering a delete by the kernel when the ref-count
temporarily goes to zero.

Platform/SharedMemory.h: platform specific handle and chunk name

Platform/qt/SharedMemorySymbian.cpp: Added. Native Symbian OS implementation
using RChunk.CreateGlobal() for named chunks. The chunk name is serialized
and sent over the IPC channel and opened by the remote process using
RChunk.OpenGlobal().

Partial revert of r86537. FullScreenVideoQt.h can't depend on OwnPtr.h
because moc_FullScreenVideoQt.cpp fails to include config.h.
Apparently, having moc_FullScreenVideoQt.cpp properly include config.h
is hard, so we're going back to manual new and delete for this class.
Bad times.

Search now works for Console panel. It shows number of matching console entries
and allows to jump to the next matching console entry. Also the matches count
is dynamically updated when new messages are added to the console.

ResourceTreeModel and DebuggerPresentationModel now listen to console events instead
of being called directly from ConsoleView.

YARR JIT currently performs a single pass of code generation over the pattern,
with special handling to allow the code generation for some backtracking code
out of line. We can simplify things by moving to a common mechanism whereby all
forwards matching code is generated in one pass, and all backtracking code is
generated in another. Backtracking code can be generated in reverse order, to
optimized the common fall-through case.

To make it easier to walk over the pattern, we can first convert to a more
byte-code like format before JIT generating. In time we should unify this with
the YARR interpreter to more closely unify the two.

HTMLFormControlElement::isFocusable() returns true when the element is
visible as a block element. However, for output, meter, and progress
elements, the function should not return true unless they have
tabindex attributes. Override supportsFocus() of these elements to
apply the result of Node::supportsFocus() because it takes care of
whether the element has tabindex or not.

Implemented reuse of BackingStore's in
DrawingAreaProxyImpl::didUpdateBackingStoreState when the size needed
matches the size of the existing BackingStore.
Also reduced the discardBackingStoreTimer from 5 to 2 seconds.
These changes reduces memory usage up to 10MB on memory tests.

Introduced ShadowContentSelector to collect and forward content
children for each ShadowContentElement. ShadowRoot collects child
nodes of its host (we call these children "content children"), and
the descendant ShadowContentElement pulls that these content
children and put it under its child during
ShadowContentElement::attach().

Content children no longer create its renderer during its normal
attach() phase (called "light" phase). And they create it during
attach() as a content children instead (called "forwarded phase").
These phases are detected by NodeRendererFactory and represented
as NodeRendererFactory::AttachPhase value AttachContentLight and
AttachContentForwarded.

Partial fix for <rdar://problem/9417875> REGRESSION: SunSpider ~17% slower
in browser than on command line

Reviewed by Maciej Stachowiak.

This patch fixes a few issues in generated code that could unreasonably
prolong object lifetimes.

heap/Heap.cpp:

(JSC::Heap::collectAllGarbage): Throw away all function code before doing
a major collection. We want to clear polymorphic caches, since they can
keep alive large object graphs that have gone "stale". For the same reason,
but to a lesser extent, we also want to clear linked functions and other
one-off caches.

This has the side-benefit of reducing memory footprint from run-once
functions, and of allowing predictions and caches that have failed to
re-specialize.

Eventually, if compilation costs rise far enough, we may want a more
limited strategy for de-specializing code without throwing it away
completely, but this works for now, and it's the simplest solution.

jit/JITStubs.cpp:

(JSC::JITThunks::hostFunctionStub):

jit/JITStubs.h:

runtime/JSFunction.cpp: Made the host function stub cache weak --

otherwise it's effectively a memory leak that can seriously fragment the
GC and JIT heaps.

(JSC::JSFunction::JSFunction):
(JSC::JSFunction::visitChildren): Cleared up some comments that confused
me when working with this code.

For some reason the platform-independent expected result has
no newline at the end of the file. The unix test plugin also
reports the event from a different line. These are harmless
differences, so create platform-specific result.

The support for this test added to the unix test plugin here
may allow other platforms to pass it (nearly everyone
skips it). On Qt it required a bit of trickiness with
the page's EventSender object to get it working fully though,
so only unskipping Qt here.

Improved the performance (1-2% in release and 20% in debug) by adding virtual member function
canContainRangeEndPoint to Node. It returns true whenever the associated node can have be a container
node for a position.

As of this revision, canContainRangeEndPoint returns true on Document, DocumentFragment, Text nodes
and any elements except:

Create a queue of elements who must be targeted with webkitfullscreenchange events. Instead of dispatching
a single event with whatever the current value of m_fullScreenElement is (which may have been cleared, or
changed since the timer was asked to fire), dispatch one event for each entry in the queue.

Test: fullscreen/video-controls-override.html

dom/Document.cpp:
(WebCore::Document::webkitDidEnterFullScreenForElement): Push current full screen element onto the

A layer-backed WebView throws an exception when moved from a layer-backed parent view
to a non-layer-backed one, so make the WebView a child of the content view, instead of
the animation view. There is an unrelated fix in beganExitFullScreen, which was calling
finishedExitFullScreenAnimation: instead of finishedEnterFullScreenAnimation: when
notifications come out of order.

The reason was two-fold:
1) Cache group state wasn't fully reset after a failed cache update (or an initial load).
2) The cache group is not deleted until after after the navigation (from autorelease pool),
so the failed and sorry old version was picked up by cache selection algorithm.

The latter is more of a surprising behavior than a problem in itself. Keeping an appcache in
memory for reload is generally a good thing for performance.

loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::stopLoading): Added a FIXME about half-baked state resetting
code that sent me looking for a wrong fix originally.
(WebCore::ApplicationCacheGroup::stopLoadingInFrame): Stopped load is an update failure like
any other, so we should call cacheUpdateFailed(), which knows how to reset state.

To support drag-and-drop to the desktop and other windows applications,
we need to support the fileDescriptor and fileContentZero clipboard formats.
This patch adds the support for serializing these types across the process boundary.
It also fixes a regression introduced by r70914, that was causing the content of the
shortcut files to be corrupted. Using ascii() to convert from String to CString was
causing '\n' and '\r' to be replaced with '?'.

platform/DragData.h:

platform/win/ClipboardUtilitiesWin.cpp:

(WebCore::fileDescriptorFormat): Moved from ClipboardWin.cpp.
(WebCore::fileContentFormatZero): Moved from ClipboardWin.cpp.
(WebCore::getFileDescriptorData): Serialize FileDescriptor type.
(WebCore::getFileContentData): Serialize FileContent type.
(WebCore::setFileDescriptorData): Deserialize FileDescriptor type.
(WebCore::setFileContentData): Deserialize FileContent type.
(WebCore::setCFData): Added missing initialization of the tymed field
that was causing the cfHDrop format not to be deserialized correctly.

To support drag-and-drop to the desktop and other windows applications,
we need to support the fileDescriptor and fileContentZero clipboard formats.
This patch adds the support for serializing these types across the process boundary.

Platform/CoreIPC/Arguments.h: Added support for messages with 10 arguments.

Changed the backing store timer to restart if it has been stopped.
The evaluation is done when the view's state is changed.
This change appears to be worth ~3MB (one backing store worth)
during memory tests.

In NetscapePluginStream::sendJavaScriptStream, we were incorrectly passing the result URL
to the stream, instead of the result. Also, store the request URL in the NetscapePluginStream object
to avoid sending it over the wire.

loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::finishedLoadingMainResource): Check that count doesn't underflow.
(WebCore::ApplicationCacheGroup::failedLoadingMainResource): Ditto.
(WebCore::ApplicationCacheGroup::stopLoading): Check that we are the handle's client before
resetting it.
(WebCore::ApplicationCacheGroup::update): Check that there isn't a stale current handle or
resource hanging around.
(WebCore::ApplicationCacheGroup::didFail): Check that the handle is either manifest or current one.

rendering/RenderBox.cpp:
(WebCore::RenderBox::removeFloatingOrPositionedChildFromBlockLists):
In r75823, I forgot to initialize parentBlock, when the original code
did and Hyatt did mention in c#5. Now, initializing parentBlock to the
first RenderBlock in the parent chain.

For some reason the platform-independent expected result has
no newline at the end of the file. The unix test plugin also
reports the event from a different line. These are harmless
differences, so create platform-specific result.

The support for this test added to the unix test plugin here
may allow other platforms to pass it (nearly everyone
skips it). On Qt it required a bit of trickiness with
the page's EventSender object to get it working fully though,
so only unskipping Qt here.

Tell ScrollView's child Widgets that their frame rects have changed when its own frame rect changes

r79167 moved some code from setFrameRect to setBoundsSize, including a call to
frameRectsChanged. This was done because positionScrollbarLayers, which is called by
frameRectsChanged, only needs to be called when the bounds change, not when the frame rect
changes. But the recursive calls inside frameRectsChanged *do* need to be called when the
frame rect changes.

This patch moves the positionScrollbarLayers call out of frameRectsChanged, since it needs
to be called at different times from frameRectsChanged. Then it restores the
frameRectsChanged call to setFrameRect, which fixes the bug.

(WebCore::ScrollView::updateScrollbars): Added a positionScrollbarLayers call here now that
frameRectsChanged doesn't call it for us. Also added a FIXME because it seems strange to
call frameRectsChanged here when our frame rect hasn't changed.
(WebCore::ScrollView::setFrameRect): Added back the frameRectsChanged call that was removed
in r79167.
(WebCore::ScrollView::setBoundsSize): Replaced a frameRectsChanged call with a call to
positionScrollbarLayers. We were only calling frameRectsChanged here in order to get
positionScrollbarLayers to be called.
(WebCore::ScrollView::frameRectsChanged): Removed the call to positionScrollbarLayers. All
callers of frameRectsChanged have been updated to call positionScrollbarLayers if needed.

(WindowRegionIsSetToClipRect::WindowRegionIsSetToClipRect): Changed to inherit from the new
WindowGeometryTest base class. Most of the code from this class was moved to the new base
class.
(WindowRegionIsSetToClipRect::performWindowGeometryTest): Renamed from checkWindowRegion.
This is called by the base class when it is safe to check the window's geometry. Note that
the m_didCheckWindowRegion logic was removed completely; it has never been needed and was
just vestigial code from an earlier version of this test.

DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj: Added new

WindowGeometryTest class.

DumpRenderTree/TestNetscapePlugIn/win/WindowGeometryTest.cpp: Added. Code came from

WindowRegionIsSetToClipRect.
(WindowGeometryTest::finishTest): This is the only change from WindowRegionIsSetToClipRect.
We now call the new virtual performWindowGeometryTest function instead of checkWindowRegion.
Subclasses can implement that function to perform their own tests.

Use the new KeyBindingTranslator class from WebCore/platform/gtk. With this utility
class we can now share the code with WebKit2.

WebCoreSupport/EditorClientGtk.cpp:
(WebKit::EditorClient::executePendingEditorCommands): Updated to reflect the fact that
the command vector now contains WTF::string.
(WebKit::EditorClient::handleKeyboardEvent): Use the new helper utility class.
(WebKit::EditorClient::EditorClient):

Use the new KeyBindingTranslator class from WebCore/platform/gtk. With this utility
class we can now share the code with WebKit2.

UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::PageClientImpl): No longer need to initialize keybinding code.
(WebKit::PageClientImpl::getEditorCommandsForKeyEvent): Use the new utility class.

If the WebProcess is killed, only one #EOF is yielded
by WebKitTestRunner. However, run-webkit-test wait for
a second #EOF, which signals the finishing of pixel dump.
Since this never happens, run-webkit-test waits forever.

SourceTokenizers for html, js, and css are declared to be stateless. However they store some state in
various ways (like using _internalJavaScriptTokenizer field in html tokenizer, or modifying "static"
initialCondition object via condition link). This all worked because of another bug in tokenizers registry
that always returned new tokenizer object.
For incremental highlighting, we need to be able to stringify tokenizers state and then restore the
state from string. That's why we need tokenizers to be truly stateless.

This restores invariant that JS wrappers residing in the same JS context should come
from the same security origin.

Absence of regressions is covered by the current tests. Different security origin of
DOMImplementation is difficult to check with layout tests as DOMImplementation
resides in the same JS context as parent document and therefore there are no security origin checks.
This is observable however in C++.

Let the IDBTransactionbackendImpl keep track of all open cursors, and
"close" them (i.e. finalizing the underlying SQLiteStatement) before
committing or rolling back the transaction. This fixes the problem
with opened cursors preventing transaction rollback.