Force Mac editing mode on new test so other platforms will pass it.
https://bugs.webkit.org/show_bug.cgi?id=92662

Reviewed by Ryosuke Niwa.

* fast/writing-mode/flipped-blocks-hit-test-line-edges.html:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124084 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Unreviewed gardening.  Add new baselines for tests 
affected by r124042.

* platform/chromium-linux/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.png:
* platform/chromium-linux/fast/borders/border-image-rotate-transform-expected.png:
* platform/chromium-win-xp/fast/backgrounds/repeat: Removed.
* platform/chromium-win/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.png:
* platform/chromium-win/fast/borders/border-image-rotate-transform-expected.png:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124085 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Unreviewed gardening.

Fix r124028 by adding the missing expectations to the added lines.

* platform/efl/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124086 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] critical warning: gdk_window_get_cursor() called on a NULL window
https://bugs.webkit.org/show_bug.cgi?id=92651

Patch by Claudio Saavedra <csaavedra@igalia.com> on 2012-07-30
Reviewed by Martin Robinson.

PageClientImpl::setCursor() might get called before the
window is realized, so safeguard against it.

* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::setCursor): early return if the window is
not realized.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124087 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Baselines on additional platforms for fast/table/table-row-focus-ring-paint.
https://bugs.webkit.org/show_bug.cgi?id=85348

Unreviewed gardening.

* platform/chromium-linux/fast/table/table-row-focus-ring-paint-expected.png: Removed.
* platform/chromium-mac/fast/table/table-row-focus-ring-paint-expected.png: Added.
* platform/chromium-win/fast/table/table-row-focus-ring-paint-expected.png: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124088 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r123636): Heap-use-after-free in StyleResolver::collectMatchingRules.
<http://webkit.org/b/92430>

Reviewed by Antti Koivisto.

Don't hold on to a reference to StyledElement::classNames() as that may become
invalid after mutating the element's attribute data.

In this case it was happening below Element::hasAttributes() which is unfortunately
naive enough to always serialize lazy attributes. That is a minor inefficiency that
can be addressed in a separate patch.

Covered by valgrind on existing tests.

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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124089 268f45cc-cd09-0410-ab3c-d52691b4dbfc
nrwt: --verbose logging does not work right on windows
https://bugs.webkit.org/show_bug.cgi?id=92673

Unreviewed, build fix.

The --verbose log level is not being propagated to the worker
processes on windows properly; this has been broken ever since I
refactored logging into the message pool directly :(.

Also, fixing this revealed that outputcapture wasn't saving and
restoring log levels correctly, so I had to fix that as well.

* Scripts/webkitpy/common/message_pool.py:
(_MessagePool._start_workers):
(_MessagePool._worker_log_level):
(_Worker.__init__):
(_Worker._set_up_logging):
(_WorkerLogHandler.__init__):
* Scripts/webkitpy/common/system/outputcapture.py:
(OutputCapture.capture_output):
(OutputCapture.restore_output):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124090 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Remove dependency on ScrollbarTheme from the compositor
https://bugs.webkit.org/show_bug.cgi?id=90528

Reviewed by James Robinson.

Source/Platform:

Flesh out WebScrollbar functions enough to be able to implement
the parts of ScrollbarThemeClient that Chromium uses.

Wrap ScrollbarThemeComposite in the Platform API via two different
classes: WebScrollbarThemePainter is the non-threadsafe version that
is used to paint parts of a scrollbar into a context. This is intended
to only be used on the main thread. WebScrollbarThemeGeometry is the
threadsafe version, used to get the location and sizes of scrollbar
parts on both threads, so they can be painted on the main thread and
composited on the compositor thread.

Unfortunately, there is no way to enforce these thread safety issues,
as other ports use the ScrollbarTheme hierarchy differently than
Chromium does. On the bright side, other than painting, the
ScrollbarTheme code is largely functional and we can enforce this
internally for the Chromium port.

* Platform.gypi:
* chromium/public/WebScrollbar.h:
(WebCore):
(WebKit):
(WebScrollbar):
* chromium/public/WebScrollbarThemeGeometry.h: Added.
(WebCore):
(WebKit):
(WebScrollbarThemeGeometry):
(WebKit::WebScrollbarThemeGeometry::WebScrollbarThemeGeometry):
(WebKit::WebScrollbarThemeGeometry::~WebScrollbarThemeGeometry):
(WebKit::WebScrollbarThemeGeometry::operator=):
(WebKit::WebScrollbarThemeGeometry::isNull):
* chromium/public/WebScrollbarThemePainter.h: Added.
(WebCore):
(WebKit):
(WebScrollbarThemePainter):
(WebKit::WebScrollbarThemePainter::WebScrollbarThemePainter):
(WebKit::WebScrollbarThemePainter::~WebScrollbarThemePainter):
(WebKit::WebScrollbarThemePainter::operator=):
(WebKit::WebScrollbarThemePainter::isNull):

Source/WebCore:

Tested by existing layout tests.

ScrollbarLayerChromium is modified to use the Platform API for
WebScrollbar, WebScrollbarThemePainter, and WebScrollbarThemeGeometry.
This prevents API dependencies from the compositor code into WebCore
scrollbar and theme code.

CCScrollbarLayerImpl::CCScrollbar now implements the WebScrollbar API
instead of the ScrollbarThemeClient API.

Also, CCScrollbarLayerImpl now no longer gets the theme from a static
accessor. It now gets a "copy" of the theme from the main thread via
WebScrollbarThemeGeometry, which is more correct for render theme
scrollbars which were previously using the native theme to get part
geometry. Using the correct theme unfortunately causes crashes due to
bad casts in RenderScrollbarTheme, so this patch turns back off the
use of ScrollbarLayerChromium for themed scrollbars until that can be
resolved.

* page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
(WebCore::createScrollbarLayer):
* platform/ScrollbarThemeClient.h:
(ScrollbarThemeClient):
* platform/graphics/chromium/ScrollbarLayerChromium.cpp:
(WebCore::ScrollbarLayerChromium::create):
(WebCore::ScrollbarLayerChromium::ScrollbarLayerChromium):
(WebCore::ScrollbarLayerChromium::pushPropertiesTo):
(WebCore::ScrollbarBackgroundPainter::create):
(WebCore::ScrollbarBackgroundPainter::ScrollbarBackgroundPainter):
(ScrollbarBackgroundPainter):
(WebCore::ScrollbarThumbPainter::create):
(WebCore::ScrollbarThumbPainter::ScrollbarThumbPainter):
(ScrollbarThumbPainter):
(WebCore::ScrollbarLayerChromium::createTextureUpdaterIfNeeded):
(WebCore::ScrollbarLayerChromium::setTexturePriorities):
(WebCore::ScrollbarLayerChromium::update):
* platform/graphics/chromium/ScrollbarLayerChromium.h:
(ScrollbarLayerChromium):
* platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
(WebCore::CCScrollbarLayerImpl::CCScrollbarLayerImpl):
(WebCore::CCScrollbarLayerImpl::setScrollbarData):
(WebCore::toUVRect):
(WebCore::CCScrollbarLayerImpl::appendQuads):
(WebCore::CCScrollbarLayerImpl::CCScrollbar::isOverlay):
(WebCore::CCScrollbarLayerImpl::CCScrollbar::value):
(WebCore::CCScrollbarLayerImpl::CCScrollbar::location):
(WebCore::CCScrollbarLayerImpl::CCScrollbar::size):
(WebCore::CCScrollbarLayerImpl::CCScrollbar::enabled):
(WebCore::CCScrollbarLayerImpl::CCScrollbar::maximum):
(WebCore::CCScrollbarLayerImpl::CCScrollbar::totalSize):
(WebCore::CCScrollbarLayerImpl::CCScrollbar::isScrollViewScrollbar):
(WebCore::CCScrollbarLayerImpl::CCScrollbar::isScrollableAreaActive):
(WebCore::CCScrollbarLayerImpl::CCScrollbar::getTickmarks):
(WebCore::CCScrollbarLayerImpl::CCScrollbar::controlSize):
(WebCore::CCScrollbarLayerImpl::CCScrollbar::pressedPart):
(WebCore::CCScrollbarLayerImpl::CCScrollbar::hoveredPart):
(WebCore::CCScrollbarLayerImpl::CCScrollbar::scrollbarOverlayStyle):
(WebCore::CCScrollbarLayerImpl::CCScrollbar::orientation):
(WebCore::CCScrollbarLayerImpl::CCScrollbar::isCustomScrollbar):
* platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
(CCScrollbarLayerImpl):
(CCScrollbar):

Source/WebKit/chromium:

Add implementations for WebScrollbarThemeGeometry and
WebScrollbarThemePainter. Fill out additional API calls for
WebPluginScrollbarImpl since it derives from WebScrollbar.

Add WebScrollbarImpl to the client API to wrap and own an existing
WebCore Scrollbar object and provide the WebScrollbar interface.

By keeping WebScrollbar separate from WebScrollbarThemeGeometry, the
compositor thread can create its own thread-safe data bag version of a
WebScrollbar (CCScrollbarLayerImpl::CCScrollbar), but this requires
WebScrollbarThemeClientImpl.

WebScrollbarThemeClientImpl does the reverse of WebScrollbarImpl; it
wraps a WebScrollbar and provides the ScrollbarThemeClient interface.
This is so that a WebScrollbar can be passed to the geometry and
painter functions. Then, internally the WebScrollbarThemeClientImpl
can be used to adapt the WebScrollbar to the ScrollbarThemeClient
interface so the geometry and painter functions can call direct
functions on ScrollbarThemeComposite.

* WebKit.gyp:
* src/AssertMatchingEnums.cpp:
* src/ExternalPopupMenu.h:
(WebKit):
* src/WebPluginScrollbarImpl.cpp:
(WebKit::WebPluginScrollbarImpl::WebPluginScrollbarImpl):
(WebKit::WebPluginScrollbarImpl::location):
(WebKit):
(WebKit::WebPluginScrollbarImpl::size):
(WebKit::WebPluginScrollbarImpl::enabled):
(WebKit::WebPluginScrollbarImpl::maximum):
(WebKit::WebPluginScrollbarImpl::totalSize):
(WebKit::WebPluginScrollbarImpl::isScrollViewScrollbar):
(WebKit::WebPluginScrollbarImpl::isScrollableAreaActive):
(WebKit::WebPluginScrollbarImpl::getTickmarks):
(WebKit::WebPluginScrollbarImpl::controlSize):
(WebKit::WebPluginScrollbarImpl::pressedPart):
(WebKit::WebPluginScrollbarImpl::hoveredPart):
(WebKit::WebPluginScrollbarImpl::scrollbarOverlayStyle):
(WebKit::WebPluginScrollbarImpl::orientation):
(WebKit::WebPluginScrollbarImpl::isCustomScrollbar):
(WebKit::WebPluginScrollbarImpl::onMouseUp):
(WebKit::WebPluginScrollbarImpl::onMouseMove):
(WebKit::WebPluginScrollbarImpl::onMouseLeave):
* src/WebPluginScrollbarImpl.h:
(WebPluginScrollbarImpl):
* src/WebScrollbarImpl.cpp: Added.
(WebKit):
(WebKit::WebScrollbar::create):
(WebKit::WebScrollbarImpl::WebScrollbarImpl):
(WebKit::WebScrollbarImpl::isOverlay):
(WebKit::WebScrollbarImpl::value):
(WebKit::WebScrollbarImpl::location):
(WebKit::WebScrollbarImpl::size):
(WebKit::WebScrollbarImpl::enabled):
(WebKit::WebScrollbarImpl::maximum):
(WebKit::WebScrollbarImpl::totalSize):
(WebKit::WebScrollbarImpl::isScrollViewScrollbar):
(WebKit::WebScrollbarImpl::isScrollableAreaActive):
(WebKit::WebScrollbarImpl::getTickmarks):
(WebKit::WebScrollbarImpl::controlSize):
(WebKit::WebScrollbarImpl::pressedPart):
(WebKit::WebScrollbarImpl::hoveredPart):
(WebKit::WebScrollbarImpl::scrollbarOverlayStyle):
(WebKit::WebScrollbarImpl::orientation):
(WebKit::WebScrollbarImpl::isCustomScrollbar):
* src/WebScrollbarImpl.h: Copied from Source/Platform/chromium/public/WebScrollbar.h.
(WebCore):
(WebKit):
(WebScrollbarImpl):
* src/WebScrollbarThemeClientImpl.cpp: Added.
(WebKit):
(WebKit::WebScrollbarThemeClientImpl::WebScrollbarThemeClientImpl):
(WebKit::WebScrollbarThemeClientImpl::x):
(WebKit::WebScrollbarThemeClientImpl::y):
(WebKit::WebScrollbarThemeClientImpl::width):
(WebKit::WebScrollbarThemeClientImpl::height):
(WebKit::WebScrollbarThemeClientImpl::size):
(WebKit::WebScrollbarThemeClientImpl::location):
(WebKit::WebScrollbarThemeClientImpl::parent):
(WebKit::WebScrollbarThemeClientImpl::root):
(WebKit::WebScrollbarThemeClientImpl::setFrameRect):
(WebKit::WebScrollbarThemeClientImpl::frameRect):
(WebKit::WebScrollbarThemeClientImpl::invalidate):
(WebKit::WebScrollbarThemeClientImpl::invalidateRect):
(WebKit::WebScrollbarThemeClientImpl::scrollbarOverlayStyle):
(WebKit::WebScrollbarThemeClientImpl::getTickmarks):
(WebKit::WebScrollbarThemeClientImpl::isScrollableAreaActive):
(WebKit::WebScrollbarThemeClientImpl::isScrollViewScrollbar):
(WebKit::WebScrollbarThemeClientImpl::convertFromContainingWindow):
(WebKit::WebScrollbarThemeClientImpl::isCustomScrollbar):
(WebKit::WebScrollbarThemeClientImpl::orientation):
(WebKit::WebScrollbarThemeClientImpl::value):
(WebKit::WebScrollbarThemeClientImpl::currentPos):
(WebKit::WebScrollbarThemeClientImpl::visibleSize):
(WebKit::WebScrollbarThemeClientImpl::totalSize):
(WebKit::WebScrollbarThemeClientImpl::maximum):
(WebKit::WebScrollbarThemeClientImpl::controlSize):
(WebKit::WebScrollbarThemeClientImpl::lineStep):
(WebKit::WebScrollbarThemeClientImpl::pageStep):
(WebKit::WebScrollbarThemeClientImpl::pressedPart):
(WebKit::WebScrollbarThemeClientImpl::hoveredPart):
(WebKit::WebScrollbarThemeClientImpl::styleChanged):
(WebKit::WebScrollbarThemeClientImpl::enabled):
(WebKit::WebScrollbarThemeClientImpl::setEnabled):
(WebKit::WebScrollbarThemeClientImpl::isOverlayScrollbar):
* src/WebScrollbarThemeClientImpl.h: Added.
(WebCore):
(WebKit):
(WebScrollbarThemeClientImpl):
* src/WebScrollbarThemeGeometry.cpp: Added.
(WebKit):
(WebKit::WebScrollbarThemeGeometry::assign):
(WebKit::WebScrollbarThemeGeometry::thumbPosition):
(WebKit::WebScrollbarThemeGeometry::thumbLength):
(WebKit::WebScrollbarThemeGeometry::trackPosition):
(WebKit::WebScrollbarThemeGeometry::trackLength):
(WebKit::WebScrollbarThemeGeometry::hasButtons):
(WebKit::WebScrollbarThemeGeometry::hasThumb):
(WebKit::WebScrollbarThemeGeometry::trackRect):
(WebKit::WebScrollbarThemeGeometry::thumbRect):
(WebKit::WebScrollbarThemeGeometry::minimumThumbLength):
(WebKit::WebScrollbarThemeGeometry::scrollbarThickness):
(WebKit::WebScrollbarThemeGeometry::backButtonStartRect):
(WebKit::WebScrollbarThemeGeometry::backButtonEndRect):
(WebKit::WebScrollbarThemeGeometry::forwardButtonStartRect):
(WebKit::WebScrollbarThemeGeometry::forwardButtonEndRect):
(WebKit::WebScrollbarThemeGeometry::constrainTrackRectToTrackPieces):
(WebKit::WebScrollbarThemeGeometry::splitTrack):
(WebKit::WebScrollbarThemeGeometry::WebScrollbarThemeGeometry):
* src/WebScrollbarThemePainter.cpp: Added.
(WebKit):
(WebKit::WebScrollbarThemePainter::assign):
(WebKit::WebScrollbarThemePainter::paintScrollbarBackground):
(WebKit::WebScrollbarThemePainter::paintTrackBackground):
(WebKit::WebScrollbarThemePainter::paintBackTrackPart):
(WebKit::WebScrollbarThemePainter::paintForwardTrackPart):
(WebKit::WebScrollbarThemePainter::paintBackButtonStart):
(WebKit::WebScrollbarThemePainter::paintBackButtonEnd):
(WebKit::WebScrollbarThemePainter::paintForwardButtonStart):
(WebKit::WebScrollbarThemePainter::paintForwardButtonEnd):
(WebKit::WebScrollbarThemePainter::paintTickmarks):
(WebKit::WebScrollbarThemePainter::paintThumb):
(WebKit::WebScrollbarThemePainter::WebScrollbarThemePainter):
* tests/ScrollbarLayerChromiumTest.cpp:
(WebCore::MockScrollbar::convertFromContainingWindow):
(WebCore::MockScrollbar::isOverlayScrollbar):
(MockScrollbar):
(WebCore::TEST):

LayoutTests:

Mark custom-composited-different-track-parts.html as failing because
custom scrollbars no longer create ScrollbarLayerChromiums. This is
due to the unsafe casts in RenderThemeScrollbar.

* platform/chromium/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124091 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        [WK2] Kill the concept of secondary shared process
        https://bugs.webkit.org/show_bug.cgi?id=92676

        Reviewed by Sam Weinig.

        * UIProcess/API/C/WKContext.cpp:
        * UIProcess/API/C/WKContext.h:
        * UIProcess/WebContext.cpp:
        * UIProcess/WebContext.h:
        Deleted shared process related code. We don't need to build the singleton into
        the cross-platform C API, platform-specific API wrappers are perfectly capable
        of doing that.

        * UIProcess/API/efl/ewk_context.cpp: (createDefaultEwkContext):
        * UIProcess/API/gtk/WebKitWebContext.cpp: (createDefaultWebContext):
        Use WKContextCreate() when creating default context.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124092 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Add miscellaneous missing includes and OVERRIDE declarations in compositor code
https://bugs.webkit.org/show_bug.cgi?id=92680

Reviewed by Adrienne Walker.

* platform/graphics/chromium/TextureCopier.h:
(AcceleratedTextureCopier):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
(CCLayerTreeHostImpl):
* platform/graphics/chromium/cc/CCPrioritizedTextureManager.h:
* platform/graphics/chromium/cc/CCRenderPassDrawQuad.h:
* platform/graphics/chromium/cc/CCResourceProvider.h:
(WebCore):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124093 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[jhbuild] gnutls 2.12.14 does not build with glibc 2.16.0
https://bugs.webkit.org/show_bug.cgi?id=90643

Reviewed by Gustavo Noronha Silva.

The 2.x series of gnutls has a version of Gnulib that is
incompatible with glibc 2.16.0, which now does not define gets()
by default.

After talking to kov, mrobinson and philn, it looks like it makes
sense to simply remove gnutls from jhbuild.modules and rely on the
version installed on the system being recent enough.

This means at least version 2.12.8 for PKCS11 support, or at the
very least 2.11.0 (these are the minimum versions enforced by
glib-networking's configure.ac).

* efl/jhbuild.modules: Do not build gnutls anymore, make
glib-networking depend on glib instead, and move the libgcrypt
dependency to eet, which is what currently needs it.
* gtk/jhbuild.modules: Do not build gnutls anymore.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124094 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add function to calculate the day in year from a date
https://bugs.webkit.org/show_bug.cgi?id=92671

Reviewed by Ryosuke Niwa.

Replace monthToDayInYear() with dayInYear() which takes a whole
date for calculation and will be used for bug 92286 later.

* wtf/DateMath.cpp:
(WTF::dayInYear):
(WTF::dateToDaysFrom1970):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124095 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Plumb vsync-enabled flag up to compositor thread and support disable-vsync
https://bugs.webkit.org/show_bug.cgi?id=92323

Patch by John Bates <jbates@google.com> on 2012-07-30
Reviewed by James Robinson.

Source/Platform:

* chromium/public/WebLayerTreeView.h:
(WebKit::WebLayerTreeView::Settings::Settings):
(Settings):

Source/WebCore:

* platform/graphics/chromium/cc/CCFrameRateController.cpp:
(WebCore::CCFrameRateController::CCFrameRateController):
(WebCore::CCFrameRateController::disableTimeSourceThrottling):
(WebCore):
(WebCore::CCFrameRateController::setActive):
(WebCore::CCFrameRateController::postManualTick):
(WebCore::CCFrameRateController::onTimerFired):
(WebCore::CCFrameRateController::didBeginFrame):
(WebCore::CCFrameRateController::didFinishFrame):
* platform/graphics/chromium/cc/CCFrameRateController.h:
(WebCore):
(CCFrameRateController):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(WebCore::CCLayerTreeSettings::CCLayerTreeSettings):
(CCLayerTreeSettings):
* platform/graphics/chromium/cc/CCThreadProxy.cpp:
(WebCore::CCThreadProxy::CCThreadProxy):
(WebCore::CCThreadProxy::initializeImplOnImplThread):
* platform/graphics/chromium/cc/CCThreadProxy.h:
(CCThreadProxy):

Source/WebKit/chromium:

* public/WebSettings.h:
* tests/CCFrameRateControllerTest.cpp:
* src/WebLayerTreeView.cpp:
(WebKit::WebLayerTreeView::Settings::operator CCLayerTreeSettings):
* src/WebSettingsImpl.cpp:
(WebKit::WebSettingsImpl::WebSettingsImpl):
(WebKit::WebSettingsImpl::setRenderVSyncEnabled):
(WebKit):
* src/WebSettingsImpl.h:
(WebSettingsImpl):
(WebKit::WebSettingsImpl::renderVSyncEnabled):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::setIsAcceleratedCompositingActive):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124097 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Propagate gesture events to plugins.
https://bugs.webkit.org/show_bug.cgi?id=92281

Patch by Sadrul Habib Chowdhury <sadrul@chromium.org> on 2012-07-30
Reviewed by Adam Barth.

Source/WebCore:

Propagate gesture events to plugins. This change does not expose the gesture events
to JavaScript, since there is no spec for that at the moment. Exposing gesture events
to JavaScript will be done separately, once there is a spec for it.

Test: platform/chromium/plugins/gesture-events.html

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* dom/EventNames.h:
(WebCore):
(WebCore::EventNames::isGestureEventType):
(EventNames):
* dom/GestureEvent.cpp: Added.
(WebCore):
(WebCore::GestureEvent::create):
(WebCore::GestureEvent::initGestureEvent):
(WebCore::GestureEvent::interfaceName):
(WebCore::GestureEvent::GestureEvent):
(WebCore::GestureEventDispatchMediator::GestureEventDispatchMediator):
(WebCore::GestureEventDispatchMediator::event):
(WebCore::GestureEventDispatchMediator::dispatchEvent):
* dom/GestureEvent.h: Added.
(WebCore):
(GestureEvent):
(WebCore::GestureEvent::~GestureEvent):
(WebCore::GestureEvent::deltaX):
(WebCore::GestureEvent::deltaY):
(WebCore::GestureEvent::GestureEvent):
(GestureEventDispatchMediator):
(WebCore::GestureEventDispatchMediator::create):
* dom/Node.cpp:
(WebCore):
(WebCore::Node::dispatchGestureEvent):
* dom/Node.h:
(WebCore):
(Node):
* page/EventHandler.cpp:
(WebCore::EventHandler::clear):
(WebCore::EventHandler::handleGestureEvent):
* page/EventHandler.h:

Source/WebKit/chromium:

Propagate gesture events to plugins.

* src/WebInputEventConversion.cpp:
(WebKit):
(WebKit::WebGestureEventBuilder::WebGestureEventBuilder):
* src/WebInputEventConversion.h:
(WebCore):
(WebKit):
(WebGestureEventBuilder):
* src/WebPluginContainerImpl.cpp:
(WebKit::WebPluginContainerImpl::handleEvent):
* src/WebPluginContainerImpl.h:
(WebCore):
(WebPluginContainerImpl):

Tools:

Update TestWebPlugin to receive events, and output logs for the events.

* DumpRenderTree/chromium/TestWebPlugin.cpp:
(TestWebPlugin::handleInputEvent):
* DumpRenderTree/chromium/TestWebPlugin.h:
(TestWebPlugin::acceptsInputEvents):
(TestWebPlugin):

LayoutTests:

Added a layout test to show that the plugins receive the gesture events correctly.

* platform/chromium/plugins/gesture-events-expected.txt: Added.
* platform/chromium/plugins/gesture-events.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fix with newer bison 2.6.
https://bugs.webkit.org/show_bug.cgi?id=92264

Reviewed by Adam Barth.

As stated in http://www.gnu.org/software/bison/manual/html_node/Table-of-Symbols.html
YYLEX_PARAM and YYPARSE_PARAM are depecreated since version 1.875. So far all Mac OS
version I had access to as well as recent Linux runs at least version 2.3 so it's safe
to use the replacement of these deprecated macros in favor of %lex-param and %parse-param.
As announced http://lists.gnu.org/archive/html/info-gnu/2012-07/msg00011.html with the release
of version 2.6 YYLEX_PARAM and YYPARSE_PARAM are not supported anymore.

No new tests : build fix and the patch should not trigger any regressions

* css/CSSGrammar.y:
* css/CSSParser.cpp:
* xml/XPathGrammar.y: Refactored a bit to not use an intermediate PARSER define.
* xml/XPathParser.cpp: bison 2.6 declare xpathyyparse in the .h file now, i.e. XPathGrammar.h
therefore including this file within the namespace {} declarations leads to xpathyyparse being
defined part of WebCore::XPath namespaces but the actual implementation of xpathyyparse is in XPathGrammar.cpp
(generated) and not implemented within the WebCore::XPath so it lead to linking issues. Last, XPathGrammar.h needs
to be included after the other includes as it uses some XPath types. It breaks the style but CSSParser.cpp is doing the same.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124099 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash in logging code if MIME type is null
https://bugs.webkit.org/show_bug.cgi?id=92683
<rdar://problem/11985295>

Reviewed by Dan Bernstein.

If the MIME type is null, try to figure it out from the URL extension. If this fails, return early instead of crashing
trying to insert the null string into a hash set.

* loader/SubframeLoader.cpp:
(WebCore::logPluginRequest):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124102 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Remove WebTransformationMatrix::mapPoint overrides
https://bugs.webkit.org/show_bug.cgi?id=90329

Reviewed by Adrienne Walker.

Source/Platform:

Remove clipping-unaware mapPoint functions from the WebTransformationMatrix interface.

* chromium/public/WebTransformationMatrix.h:
(WebTransformationMatrix):

Source/WebCore:

Add more functionality for mapping points to CCMathUtil and use it in CCLayerSorter / drawTileQuad. These
mappings should never clip.

* platform/chromium/support/WebTransformationMatrix.cpp:
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::drawTileQuad):
* platform/graphics/chromium/cc/CCLayerSorter.cpp:
(WebCore::CCLayerSorter::LayerShape::LayerShape):
* platform/graphics/chromium/cc/CCMathUtil.cpp:
(WebCore::mapHomogeneousPoint):
(WebCore::CCMathUtil::mapPoint):
(WebCore):
* platform/graphics/chromium/cc/CCMathUtil.h:
(WebCore::HomogeneousCoordinate::cartesianPoint3d):
(HomogeneousCoordinate):
(CCMathUtil):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Avoid Assertion Failure in HarfBuzzRun::characterIndexForXPosition
https://bugs.webkit.org/show_bug.cgi?id=92376

Patch by Dominik Röttsches <dominik.rottsches@intel.com> on 2012-07-30
Reviewed by Tony Chang.

.:

Added manual test to reliably reproduce assertion failure which is solved by this patch.

* ManualTests/harfbuzz-mouse-selection-crash.html: Added.

Source/WebCore:

Previously, the if condition in offsetForPosition gating the call to
characterIndexForXPosition was comparing a different value than what was actually used
as the argument to calling it. In some cases, this can lead to a minuscule difference
when comparing the two floats - enough to trigger the assertion. To resolve this,
the accuracy of the index calculation is improved by changing the types from int
to floats and rephrasing the if condition to be exactly the same as what is checked
for in the assertion.

Manual test ManualTests/harfbuzz-mouse-selection-crash.html added
which reliably reproduces the assertion failure before this change.

* platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::HarfBuzzRun::characterIndexForXPosition): Types changed to float.
(WebCore::HarfBuzzShaper::offsetForPosition): Types changed to float, if condition rephrased.
* platform/graphics/harfbuzz/ng/HarfBuzzShaper.h:
(HarfBuzzRun):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124111 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] Kill the concept of secondary shared process
https://bugs.webkit.org/show_bug.cgi?id=92676

Reviewed by Alexey Proskuryakov.

Build fix after r124092.

* UIProcess/qt/QtWebContext.cpp: Build fix for Qt. In exchange of the
method removed, I've used WebContext::create(String()).

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124114 268f45cc-cd09-0410-ab3c-d52691b4dbfc
atomicDecrement() never reach 0 on Android so no deref() will be called
https://bugs.webkit.org/show_bug.cgi?id=92635

Patch by Wei James <james.wei@intel.com> on 2012-07-30
Reviewed by Adam Barth.

With Android NDK 7b and later, __atomic_dec()  is implemented by
__sync_fetch_and_sub(), which will result in that atomicDecrement()
returns the old value instead of new one.

* wtf/Atomics.h:
(WTF):
(WTF::atomicIncrement):
(WTF::atomicDecrement):

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