[EFL][WK2][AC] No need to export GL properties from EwkViewImpl class
https://bugs.webkit.org/show_bug.cgi?id=103505

Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-11-28
Reviewed by Kenneth Rohde Christiansen.

No need to export GL data members from EwkViewImpl class,
those are internal implementation objects not used by anyone outside the class.

* UIProcess/API/efl/EwkViewImpl.cpp:
(EwkViewImpl::displayTimerFired):
(EwkViewImpl::createGLSurface):
* UIProcess/API/efl/EwkViewImpl.h:
(EwkViewImpl):
(EwkViewImpl::evasGLContext):
(EwkViewImpl::evasGLSurface):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135999 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] MiniBrowser rendering should not get blurry when scrolled down with different scale values
https://bugs.webkit.org/show_bug.cgi?id=103079

Reviewed by Simon Hausmann.

The problem was caused because we moved the page inside our viewport
in non-discrete units.

Now instead of changing the content visible in our viewport by
applying scale, and then transforming the CSS offset, we now first
discretely position the page in UI coordinates.

This patch also removes some dead code.

* UIProcess/API/efl/EwkViewImpl.cpp:
(EwkViewImpl::transformFromScene):
(EwkViewImpl::displayTimerFired):

   Transform according to the page position.

* UIProcess/API/efl/EwkViewImpl.h:
(EwkViewImpl::setPagePosition): Now stores a float.
(EwkViewImpl::discretePagePosition): Returns the discrete page position.
(EwkViewImpl):
* UIProcess/efl/PageClientLegacyImpl.cpp:
(WebKit::PageClientLegacyImpl::updateViewportSize):
(WebKit::PageClientLegacyImpl::pageDidRequestScroll):
* UIProcess/efl/PageViewportControllerClientEfl.cpp:
(WebKit::PageViewportControllerClientEfl::PageViewportControllerClientEfl):
(WebKit::PageViewportControllerClientEfl::setViewportPosition): Convert to page position.
(WebKit::PageViewportControllerClientEfl::setContentsScale):
(WebKit::PageViewportControllerClientEfl::didResumeContent):
* UIProcess/efl/PageViewportControllerClientEfl.h:
(WebKit::PageViewportControllerClientEfl::scaleFactor): Use the value
from the view directly.
(WebKit::PageViewportControllerClientEfl::contentPosition):
(PageViewportControllerClientEfl):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136000 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move childrenAffectedBy bits from RenderStyle to Element
https://bugs.webkit.org/show_bug.cgi?id=101448
https://bugs.webkit.org/show_bug.cgi?id=98021

Source/WebCore:

Reviewed by Antti Koivisto.

Moves facts observed about restyling dependencies out of RenderStyle and
into RareData for Node and Element. This also enables further cleanup
in related code that tried to deal with problems caused with the placement
of the data.

Test: fast/css/nth-child-not-in-rightmost.html

* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkSelector):
(WebCore::SelectorChecker::checkOneSelector):
* css/SiblingTraversalStrategies.h:
(WebCore::DOMSiblingTraversalStrategy::countElementsBefore):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::sortAndTransferMatchedRules):
(WebCore::StyleResolver::canShareStyleWithElement):
(WebCore::parentElementPreventsSharing):
(WebCore::StyleResolver::locateSharedStyle):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::setActive):
(WebCore::ContainerNode::setHovered):
* dom/Element.cpp:
(WebCore::Element::detach):
(WebCore::Element::recalcStyle):
(WebCore::checkForEmptyStyleChange):
(WebCore::checkForSiblingStyleChanges):
(WebCore::Element::setChildrenAffectedByHover):
(WebCore::Element::setChildrenAffectedByActive):
(WebCore::Element::setChildrenAffectedByDrag):
(WebCore::Element::setChildrenAffectedByFirstChildRules):
(WebCore::Element::setChildrenAffectedByLastChildRules):
(WebCore::Element::setChildrenAffectedByDirectAdjacentRules):
(WebCore::Element::setChildrenAffectedByForwardPositionalRules):
(WebCore::Element::setChildrenAffectedByBackwardPositionalRules):
(WebCore::Element::setChildIndex):
(WebCore::Element::rareDataStyleAffectedByEmpty):
(WebCore::Element::rareDataChildrenAffectedByHover):
(WebCore::Element::rareDataChildrenAffectedByActive):
(WebCore::Element::rareDataChildrenAffectedByDrag):
(WebCore::Element::rareDataChildrenAffectedByFirstChildRules):
(WebCore::Element::rareDataChildrenAffectedByLastChildRules):
(WebCore::Element::rareDataChildrenAffectedByDirectAdjacentRules):
(WebCore::Element::rareDataChildrenAffectedByForwardPositionalRules):
(WebCore::Element::rareDataChildrenAffectedByBackwardPositionalRules):
(WebCore::Element::rareDataChildIndex):
* dom/Element.h:
(Element):
(WebCore::Element::styleAffectedByEmpty):
(WebCore::Element::childrenAffectedByHover):
(WebCore::Element::childrenAffectedByActive):
(WebCore::Element::childrenAffectedByDrag):
(WebCore::Element::childrenAffectedByPositionalRules):
(WebCore::Element::childrenAffectedByFirstChildRules):
(WebCore::Element::childrenAffectedByLastChildRules):
(WebCore::Element::childrenAffectedByDirectAdjacentRules):
(WebCore::Element::childrenAffectedByForwardPositionalRules):
(WebCore::Element::childrenAffectedByBackwardPositionalRules):
(WebCore::Element::childIndex):
* dom/ElementRareData.h:
(ElementRareData):
(WebCore::ElementRareData::resetComputedStyle):
(WebCore::ElementRareData::resetDynamicRestyleObservations):
* dom/Node.cpp:
(WebCore::Node::diff):
* dom/NodeRareData.h:
(WebCore::NodeRareData::NodeRareData):
(WebCore::NodeRareData::childrenAffectedByHover):
(WebCore::NodeRareData::setChildrenAffectedByHover):
(WebCore::NodeRareData::childrenAffectedByActive):
(WebCore::NodeRareData::setChildrenAffectedByActive):
(WebCore::NodeRareData::childrenAffectedByDrag):
(WebCore::NodeRareData::setChildrenAffectedByDrag):
(NodeRareData):
(WebCore::NodeRareData::childrenAffectedByFirstChildRules):
(WebCore::NodeRareData::setChildrenAffectedByFirstChildRules):
(WebCore::NodeRareData::childrenAffectedByLastChildRules):
(WebCore::NodeRareData::setChildrenAffectedByLastChildRules):
(WebCore::NodeRareData::childrenAffectedByDirectAdjacentRules):
(WebCore::NodeRareData::setChildrenAffectedByDirectAdjacentRules):
(WebCore::NodeRareData::childrenAffectedByForwardPositionalRules):
(WebCore::NodeRareData::setChildrenAffectedByForwardPositionalRules):
(WebCore::NodeRareData::childrenAffectedByBackwardPositionalRules):
(WebCore::NodeRareData::setChildrenAffectedByBackwardPositionalRules):
(WebCore::NodeRareData::childIndex):
(WebCore::NodeRareData::setChildIndex):
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::createRendererForElementIfNeeded):
* page/TouchAdjustment.cpp:
(WebCore::TouchAdjustment::nodeRespondsToTapGesture):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::updateDragState):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::copyNonInheritedFrom):
* rendering/style/RenderStyle.h:

LayoutTests:

Reviewed by Antti Koivisto.
New test-case by Takashi Sakamoto

* fast/css/nth-child-not-in-rightmost-expected.html: Added.
* fast/css/nth-child-not-in-rightmost.html: Added.
* touchadjustment/event-triggered-widgets.html: Fix bug exposed by patch.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136001 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move childrenAffectedBy bits from RenderStyle to Element
https://bugs.webkit.org/show_bug.cgi?id=101448

Unreviewed buildfix.

To use renderStyle() on some Macs we need to include NodeRenderStyle.h.

* dom/ContainerNode.cpp:

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

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

* DEPS:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136003 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Minor cleanup in TestInvocation
https://bugs.webkit.org/show_bug.cgi?id=103512

Patch by Yael Aharon <yael.aharon@intel.com> on 2012-11-28
Reviewed by Kenneth Rohde Christiansen.

Remove a function declaration that is not defined and not used.
Fix spelling error in m_webProcessIsUnresponsive.

* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::TestInvocation):
(WTR::TestInvocation::invoke):
* WebKitTestRunner/TestInvocation.h:
(TestInvocation):
* WebKitTestRunner/cairo/TestInvocationCairo.cpp:
(WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
* WebKitTestRunner/qt/TestInvocationQt.cpp:
(WTR::TestInvocation::dumpPixelsAndCompareWithExpected):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136004 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Refactor theme to choose whether to support foreground color of selection
https://bugs.webkit.org/show_bug.cgi?id=102037

Patch by Ryuan Choi <ryuan.choi@gmail.com> on 2012-11-28
Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

If foreground selection color is supported, selected text is painted to
SelectionForegroundColor instead of text color. If not, text can be painted
to text color.

However, EFL port does not have a way to disable support of foreground
selection color. So this patch refactors color classes of theme from
active and inactive to foreground and background in order to disable support
of foreground selection color when foreground color class is not specified.

* platform/efl/RenderThemeEfl.cpp:
(WebCore::fillColorsFromEdjeClass):
Returned false without error message when colorClass is not specified.
(WebCore::RenderThemeEfl::setColorFromThemeClass):
(WebCore::RenderThemeEfl::loadTheme):
(WebCore::RenderThemeEfl::RenderThemeEfl):
(WebCore::RenderThemeEfl::supportsSelectionForegroundColors):
(WebCore):
* platform/efl/RenderThemeEfl.h:
(RenderThemeEfl):

Source/WebKit/efl:

* DefaultTheme/default.edc:
Refactored color classes from active/inactive to foreground/background.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136005 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Use mutex locker in wakeUp() to ensure thread-safety.
https://bugs.webkit.org/show_bug.cgi?id=101132

Patch by Byungwoo Lee <bw80.lee@samsung.com> on 2012-11-28
Reviewed by Gyuyoung Kim.

Add mutex locker for the ecore pipe to ensure thread-safety of
RunLoop::wakeUp().

RunLoop::wakeUp() can be called by multiple thread. It uses
ecore_pipe_write() function but the function is not thread-safe.

* platform/RunLoop.h:
(RunLoop):
* platform/efl/RunLoopEfl.cpp:
(WebCore::RunLoop::wakeUp):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] add flaky results after r135935
https://bugs.webkit.org/show_bug.cgi?id=103514

Unreviewed gardening: add flaky results after r135935 enabled
loads of reftests. Also move the existing flaky results from efl
to efl-wk2 since this does not concern WK1.

Patch by Jussi Kukkonen <jussi.kukkonen@intel.com> on 2012-11-28

* platform/efl-wk2/TestExpectations:
* platform/efl/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136007 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Remove setVersion from WK API
https://bugs.webkit.org/show_bug.cgi?id=103456

Reviewed by Darin Fisher.

These are the last vestiges of this ancient API. The bulk of the
removal was done in bug 94972.

* public/WebIDBCallbacks.h:
* public/WebIDBDatabase.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136008 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Regression(r135962): ASSERTION FAILED: !m_pedningSyncBackingStores.contains(layer)
https://bugs.webkit.org/show_bug.cgi?id=103498

Reviewed by Kenneth Rohde Christiansen.

We hit the !m_pedningSyncBackingStores.contains(layer) assertion
in LayerTreeRenderer when 2 asynchronous backing store operations
are pending. The current code checks if the layer already has a
backing store in its guard but this is insufficient as it is not
checking the m_pendingSyncBackingStores hash for pending backing
store changes.

In this patch, we improve the guards in createBackingStoreIfNeeded()
and removeBackingStoreIfNeeded() to check not only if the layer has
already a backing store but also check m_pendingSyncBackingStores
for pending changes. This is safer and it allows for optimizations
in the cases where we have both a removal and a creation pending.
In those cases, we can simply cancel the pending operation instead
of queueing a new one.

* UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
(WebKit::LayerTreeRenderer::getBackingStore):
(WebKit::LayerTreeRenderer::createBackingStoreIfNeeded):
(WebKit::LayerTreeRenderer::removeBackingStoreIfNeeded):
(WebKit::LayerTreeRenderer::commitPendingBackingStoreOperations):
* UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136009 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix .libs/libwebkitgtk-3.0.so: undefined reference to `WebCore::validationMessageBadInputForNumberText().
https://bugs.webkit.org/show_bug.cgi?id=103509

Patch by Anton Obzhirov <a.obzhirov@samsung.com> on 2012-11-28
Reviewed by Philippe Normand.

GTK build fix after r136001.

* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::validationMessageBadInputForNumberText):
(WebCore):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136010 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Add support for PlatformWebView::simulateSpacebarKeyPress() in TestWebKitAPI
https://bugs.webkit.org/show_bug.cgi?id=103123

Patch by Sudarsana Nagineni <sudarsana.nagineni@intel.com> on 2012-11-28
Reviewed by Laszlo Gombos.

Add support for PlatformWebView::simulateSpacebarKeyPress().
This functionality is needed by WebKit2 API test MouseMoveAfterCrash
which is going to be unskipped in bug #103252.

* TestWebKitAPI/efl/PlatformUtilities.cpp:
(TestWebKitAPI::Util::sleep):
* TestWebKitAPI/efl/PlatformWebView.cpp: Use usleep() instead of
sleep().
(TestWebKitAPI::PlatformWebView::simulateSpacebarKeyPress):
(TestWebKitAPI):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136011 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix gesture scrolling when the target-element of scroll-begin is removed
https://bugs.webkit.org/show_bug.cgi?id=103355

Patch by Sadrul Habib Chowdhury <sadrul@chromium.org> on 2012-11-28
Reviewed by Antonio Gomes.

Source/WebCore:

When a touch-scroll starts, the node under the touch-point gets latched, and
subsequent scroll-update events are dispatched to that node. But if the node is
removed while the gesture event is in progress (e.g. in a dynamically updated
list), then the scrolling stops, although there are enough elements to still
enable scrolling. So instead of latching on to the node immediately under the
touch point, latch on to the scrollable node under the touch point.

Test: fast/events/touch/gesture/touch-gesture-scroll-remove-node.html

* page/EventHandler.cpp:
(WebCore::getClosestScrollableNodeInDocumentIfPossible):
(WebCore):
(WebCore::EventHandler::handleWheelEvent):

LayoutTests:

Added a test that starts a touch-scroll, removes the initial element under the
touch-point, and scrolls some more, to test that the scrolling happens correctly
after the element is removed.

* fast/events/touch/gesture/touch-gesture-scroll-remove-node-expected.txt: Added.
* fast/events/touch/gesture/touch-gesture-scroll-remove-node.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136012 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Allow plugins to opt-in to receive synthetic mouse events out of touch events.
https://bugs.webkit.org/show_bug.cgi?id=103092

Patch by Sadrul Habib Chowdhury <sadrul@chromium.org> on 2012-11-28
Reviewed by Tony Chang.

Source/WebKit/chromium:

A plugin can now request to receive raw touch events, or to receive mouse events synthesized
from the touch events, or to not receive any touch events at all.

* public/WebPluginContainer.h:
(WebPluginContainer):
* src/WebInputEventConversion.cpp:
(WebKit::updateWebMouseEventFromWebCoreMouseEvent):
(WebKit::WebMouseEventBuilder::WebMouseEventBuilder):
(WebKit):
* src/WebInputEventConversion.h:
(WebMouseEventBuilder):
* src/WebPluginContainerImpl.cpp:
(WebKit::WebPluginContainerImpl::setIsAcceptingTouchEvents):
(WebKit):
(WebKit::WebPluginContainerImpl::requestTouchEventType):
(WebKit::WebPluginContainerImpl::WebPluginContainerImpl):
(WebKit::WebPluginContainerImpl::~WebPluginContainerImpl):
* src/WebPluginContainerImpl.h:
(WebPluginContainerImpl):

Tools:

Update the test web-plugin to be able to opt-in to receive synthesized mouse events created
from touch events.

* DumpRenderTree/chromium/TestWebPlugin.cpp:
(parseTouchEventRequestType):
(TestWebPlugin::TestWebPlugin):
(TestWebPlugin::initialize):
* DumpRenderTree/chromium/TestWebPlugin.h:
(TestWebPlugin):

LayoutTests:

Add test for synthesized mouse events from touch (and update existing tests).

* platform/chromium/plugins/touch-events-details.html:
* platform/chromium/plugins/touch-events-synthesized-expected.txt: Added.
* platform/chromium/plugins/touch-events-synthesized.html: Copied from LayoutTests/platform/chromium/plugins/touch-events.html.
* platform/chromium/plugins/touch-events.html:
* platform/chromium/plugins/transformed-events.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136013 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Removed extra definition of GLXContext.
https://bugs.webkit.org/show_bug.cgi?id=103500

Patch by Denis Nomiyama <d.nomiyama@samsung.com> on 2012-11-28
Reviewed by Martin Robinson.

A minor cleanup to remove a spare definition of GLXContext in GLContextGLX.h.

No new tests. This doesn't change any behavior.

* platform/graphics/glx/GLContextGLX.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136014 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[v8] 4% regression in dom_traverse tests
https://bugs.webkit.org/show_bug.cgi?id=102858

Unreviewed.

This patch is a manual rollout of
http://trac.webkit.org/changeset/134729. We can't do a mechanical
rollout because V8DOMWrapper::getCachedWrapper no longer exists.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateHeader):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136015 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Regression(r135962): m_pendingSyncBackingStores needs to be cleared in LayerTreeRenderer::purgeGLResources()
https://bugs.webkit.org/show_bug.cgi?id=103527

Reviewed by Jocelyn Turcotte.

Make sure m_pendingSyncBackingStores is cleared in
LayerTreeRenderer::purgeGLResources() to avoid trying to assign
backing store to layers after everything has been invalidated.

* UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
(WebKit::LayerTreeRenderer::purgeGLResources):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136016 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][Win] Enable usage of QTWEBKIT_PLUGIN_PATH.
https://bugs.webkit.org/show_bug.cgi?id=103529

This patch enables the same behavior for Windows
as it is currently implemented for all other operating
systems supported by Qt.
Directories listed in the environment variable
QTWEBKIT_PLUGIN_PATH are being searched for additional
plugins.
The only difference is that directories on Windows
need to be separated by a semicolon instead of a colon.

Reviewed by Kenneth Rohde Christiansen.

* plugins/win/PluginDatabaseWin.cpp:
(WebCore):
(WebCore::addQtWebKitPluginPath):
(WebCore::PluginDatabase::defaultPluginDirectories):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136017 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Layout Test svg/animations/mpath-remove-from-dependents-on-delete-crash.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=103375

Unreviewed test update.

According to the original bug, at least 4 iterations were required to
crash (without the fix). To make the test faster, I've reduced the max
iteration count to 5, rather than 10. This may not fix the timeoout
issue because it might be a real timeout, not just a slow test.

* svg/animations/mpath-remove-from-dependents-on-delete-crash.html:


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