Unreviewed, rolling out r135743.
http://trac.webkit.org/changeset/135743
https://bugs.webkit.org/show_bug.cgi?id=103280

Caused compile failure 'SK_DISABLE_DITHER_32BIT_GRADIENT'
macro redefined (Requested by rjkroege on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-11-26

* skia_webkit.gyp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135754 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add ResourceBuffer::append(CFDataRef) to get code to compile with USE(NETWORK_CFDATA_ARRAY_CALLBACK)
https://bugs.webkit.org/show_bug.cgi?id=102706

Reviewed by Brent Fulgham.

No new tests because the flag isn't enabled. Also the functionality should be covered by
existing tests.

* loader/ResourceBuffer.cpp:
(WebCore):
(WebCore::ResourceBuffer::append):
* loader/ResourceBuffer.h:
(ResourceBuffer):
* loader/mac/ResourceLoaderMac.mm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135755 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSObject::copyButterfly doesn't handle undecided indexing types correctly
https://bugs.webkit.org/show_bug.cgi?id=102573

Reviewed by Filip Pizlo.

We don't do any copying into the newly allocated vector and we don't zero-initialize CopiedBlocks
during the copying phase, so we end up with uninitialized memory in arrays which have undecided indexing
types. We should just do the actual memcpy from the old block to the new one.

* runtime/JSObject.cpp:
(JSC::JSObject::copyButterfly): Just do the same thing that we do for other contiguous indexing types.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135756 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Don't blind all the things.
https://bugs.webkit.org/show_bug.cgi?id=102572

Reviewed by Gavin Barraclough.

No longer blind all the constants in the instruction stream.  We use a
simple non-deterministic filter to avoid blinding everything.  Also modified
the basic integer blinding logic to avoid blinding small negative values.

* assembler/MacroAssembler.h:
(MacroAssembler):
(JSC::MacroAssembler::shouldConsiderBlinding):
(JSC::MacroAssembler::shouldBlind):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135757 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Null check calls associated with retrieving the caret rect.
https://bugs.webkit.org/show_bug.cgi?id=103281

Patch by Nima Ghanavatian <nghanavatian@rim.com> on 2012-11-26
Reviewed by Rob Buis.

Some of these calls can return null, which could lead to a crash.

Internally reviewed by Gen Mak.

* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::requestSpellingCheckingOptions):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
32-bit build fix.  Move the method decalration outside of the X86_64 only section.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135759 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make StyleResolver::applyProperty use isInherit in CSSPropertyWebkitMarquee instead of calculating equivalent in-place.
https://bugs.webkit.org/show_bug.cgi?id=102446

Reviewed by Tony Chang.

!m_parentNode || !value->isInheritedValue() is equivalent to !isInherit (by De Morgan's law).

No new tests / code is provably equivalent.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135760 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Explicitly link against librt
https://bugs.webkit.org/show_bug.cgi?id=103194

Patch by Kalev Lember <kalevlember@gmail.com> on 2012-11-26
Reviewed by Martin Robinson.

Fixes broken build with undefined references to shm_open / shm_unlink
symbols. SharedMemoryUnix.cpp uses these so we need to link with -lrt.

.:

* configure.ac:

Source/WebKit2:

* GNUmakefile.am:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] GtkSocket is leaked until webview is destroyed.
https://bugs.webkit.org/show_bug.cgi?id=102564

Patch by Arnaud Renevier <a.renevier@sisa.samsung.com> on 2012-11-26
Reviewed by Martin Robinson.

Remove GtkSocket from its parent when pluginview is destroyed. Then,
the GtkSocket and it's possible child widgets are realeased when it is
no more needed.

No new tests, already covered by existing tests.

* plugins/gtk/PluginViewGtk.cpp:
(WebCore::PluginView::platformDestroy):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135762 268f45cc-cd09-0410-ab3c-d52691b4dbfc
clipboardwin compile error for win64
https://bugs.webkit.org/show_bug.cgi?id=94124

Patch by Alex Christensen <alex.christensen@flexsim.com> on 2012-11-26
Reviewed by Brent Fulgham.

The clipboard utilities code uses std::min with one unsigned int parameter and one size_t parameter.
This causes a problem when compiling for 64-bit Windows because the two types are not the same size.
To resolve this issue, we specify the template type as the type the return value is being cast into

Fixed a few compile errors for Windows x64 by specifying template parameters.

* platform/win/ClipboardUtilitiesWin.cpp:
(WebCore::setFileDescriptorData): Specify the types for the std::min macro to avoid compiler errors
under 64-bit builds.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135763 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Refactor V8 bindings to allow content scripts to access subframes
https://bugs.webkit.org/show_bug.cgi?id=93646

Patch by Dan Carney <dcarney@google.com> on 2012-11-26
Reviewed by Adam Barth.

Source/WebCore:

Isolated window shells are now initialized on the fly
as needed.

No new tests. Existing test modified.

* bindings/v8/DOMWrapperWorld.cpp:
(WebCore::DOMWrapperWorld::ensureIsolatedWorld):
* bindings/v8/DOMWrapperWorld.h:
(WebCore::DOMWrapperWorld::createdFromUnitializedWorld):
(DOMWrapperWorld):
* bindings/v8/ScriptController.cpp:
(WebCore::ScriptController::currentWorldContext):

LayoutTests:

Test modified to check isolated world access across frames.

* http/tests/security/isolatedWorld/world-reuse-expected.txt:
* http/tests/security/isolatedWorld/world-reuse.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135765 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. ENABLE_ACCELERATED_OVERFLOW_SCROLLING not enabled on Windows.
Add a feature flag and skip some failing tests.
https://bugs.webkit.org/show_bug.cgi?id=103294

Tests skipped:
compositing/overflow/scrolling-without-painting.html
compositing/overflow/updating-scrolling-content.html

* win/tools/vsprops/FeatureDefines.vsprops:
* platform/win/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Pass clicks through to the restarted plugin
https://bugs.webkit.org/show_bug.cgi?id=102150
<rdar://problem/12695575>

Reviewed by Simon Fraser.

Source/WebCore:

Add a new state to the machine for plugin snapshotting, called PlayingWithPendingMouseClick.
This represents the state where the plugin is playing, but before the pending mouse click
has been fired. Once the click is sent, the plugin state transitions to Playing. For
situations where the plugin just runs normally without a simulated click, the plugin state
jumps from DisplayingSnapshot straight to Playing, as before.

* html/HTMLPlugInElement.h: Add new display state to represent when the plugin is running,
but a pending mouse click is about to be sent to the plugin.
(WebCore::HTMLPlugInElement::dispatchPendingMouseClick): Called by the plugin when it is
ok for the element to send the pending mouse click.
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::defaultEventHandler): Update the handler to pass the event
to the renderer to handle if the state is before PlayingWithPendingMouseClick.

* html/HTMLPlugInImageElement.h:
* html/HTMLPlugInImageElement.cpp: Add a click timer to delay the mouse click so that the
plugin has some time to initialize.
(WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): Initialize the mouse timer.
(WebCore::HTMLPlugInImageElement::setPendingClickEvent): Keep track of the click event
the user made to restart the plugin.
(WebCore::HTMLPlugInImageElement::dispatchPendingMouseClick): Start the timer.
(WebCore::HTMLPlugInImageElement::simulatedMouseClickTimerFired): When the timer fires,
dispatch the simulated click, with mouse over, mouse down, and mouse up events. Transition
to the Playing state, and we no longer need the click event.

* rendering/RenderSnapshottedPlugIn.cpp: Change the threshold state to PlayingWithPendingMouseClick
instead of Playing, since that is the earliest state where the plugin is playing.
(WebCore::RenderSnapshottedPlugIn::paint):
(WebCore::RenderSnapshottedPlugIn::paintReplaced):
(WebCore::RenderSnapshottedPlugIn::getCursor):
(WebCore::RenderSnapshottedPlugIn::handleEvent): If the user clicked on the button, jump to
Playing, and don't send a simulated click. Otherwise, transition to PlayingWithPendingMouseClick,
and keep track of that mouse event.

* WebCore.exp.in: Export MouseRelatedEvent::offsetX() and offsetY().

Source/WebKit2:

Expose convertToRootView() as a public function for all plugins. It converts the click point
from local plugin coordinates to root view coordinates. When the events are sent to the
plugin, the coordinate gets converted back to the local reference frame.
* WebProcess/Plugins/Plugin.cpp:
(WebKit::Plugin::convertToRootView): Default implementation should not be reached.
* WebProcess/Plugins/Plugin.h: Promote convertToRootView() from NetscapePlugin.h.
* WebProcess/Plugins/Netscape/NetscapePlugin.h: An implementation already existed. Make the
method virtual.
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::convertToRootView): Apply the transform to the provided point to return
a point in root view coordinates.

Change the threshold state to PlayingWithPendingMouseClick instead of Playing, since that is
the earliest state where the plugin is playing.
* WebProcess/Plugins/PluginView.cpp: Give the snapshot a little more time to generate.
(WebKit::PluginView::didInitializePlugin): When the plugin has initialized, tell the plugin
element to dispatch the pending mouse click.
(WebKit::PluginView::paint):
(WebKit::PluginView::createWebEvent): Helper function to convert a WebCore mouse event to a
WebMouseEvent.
(WebKit::PluginView::handleEvent): If the event is simulated, there is no source event from
the UI process. So we fabricate one based on the simulated event.
(WebKit::PluginView::invalidateRect):
(WebKit::PluginView::isAcceleratedCompositingEnabled):
* WebProcess/Plugins/PluginView.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135767 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed.  Rolled DEPS.

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-11-26

* DEPS:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Fix the LLInt build on Mac
https://bugs.webkit.org/show_bug.cgi?id=97587

Reviewed by Simon Hausmann.

Source/JavaScriptCore:

* DerivedSources.pri:
* JavaScriptCore.pro:

Source/WTF:

* wtf/InlineASM.h:
    Use OS(DARWIN) instead of PLATFORM(MAC),
    in order to allow Qt to use the same code.
* wtf/Platform.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135770 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Skip fast/dom/Window/open-window-min-size.html on Windows.
DRT doesn't support showModalDialog https://bugs.webkit.org/show_bug.cgi?id=53675

* platform/win/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135771 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening: updated TextExpecations for failing
fast/dom/shadow/shadow-dom-event-dispatching.html
https://bugs.webkit.org/show_bug.cgi?id=103299

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135772 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Form controls don't show pressed state.
https://bugs.webkit.org/show_bug.cgi?id=103292

Patch by Genevieve Mak <gmak@rim.com> on 2012-11-26
Reviewed by Rob Buis.

Reviewed internally by Eli Fidler and Mike Lattanzio.
We weren't sending touch events to webpages unless they
had JS touch event listeners which form controls don't have.
Now send them always and do a little cleanup.
PR #249791

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
(BlackBerry::WebKit::WebPage::touchEvent):
* Api/WebPageClient.h:
* Api/WebPage_p.h:
(WebPagePrivate):
* WebCoreSupport/ChromeClientBlackBerry.cpp:
(WebCore::ChromeClientBlackBerry::needTouchEvents):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135775 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening: failure in http/tests/media/pdf-served-as-pdf.html
https://bugs.webkit.org/show_bug.cgi?id=103093

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135778 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Removing unnecessary friend classes in RenderObject: LayoutRepainter, RenderSVGContainer
https://bugs.webkit.org/show_bug.cgi?id=103164

Patch by Adenilson Cavalcanti <cavalcantii@gmail.com> on 2012-11-26
Reviewed by Simon Fraser.

Removing some of classes marked as friend of RenderObject. This patch solves this issue
for 2 classes: RenderSVGContainer (that is derived from RenderObject) and LayoutRepainter
(that accesses one const member function in RenderObject that is now made public).

No new tests, no changes in functionality.

* rendering/RenderObject.h:
(RenderObject):
(WebCore::RenderObject::outlineBoundsForRepaint):

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