Web Inspector: "Emulate Touch Events" breaks selecting elements with "touchstart" event listeners for inspection.
https://bugs.webkit.org/show_bug.cgi?id=89861

Reviewed by Vsevolod Vlasov.

Upon a mousepress, Inspector should be queried for the "Inspect element" mode up-front,
before dispatching a synthetic "touchstart" event.

* page/EventHandler.cpp:
(WebCore::EventHandler::handleMousePressEvent):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121154 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Require text editable element to be enabled for VKB
https://bugs.webkit.org/show_bug.cgi?id=89876

Reviewed by Yong Li.

After bug 58837 got in, children of <fieldset> now can inherit the disabled
state of the fieldset. When trying for instance fast/forms/fieldset/fieldset-disabled.html,
it can be seen that when they are visually disabled, the input handling can still be triggered. So
add an extra check to isTextBasedContentEditableElement that the element is enabled.

Reviewed internally by Mike Fenton.

* WebKitSupport/DOMSupport.cpp:
(BlackBerry::WebKit::DOMSupport::isTextBasedContentEditableElement):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121155 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: toggling style should not start property edit first.
https://bugs.webkit.org/show_bug.cgi?id=89834

Reviewed by Yury Semikhatsky.

Source/WebCore:

Otherwise property flickers upon toggling.

* inspector/front-end/StylesSidebarPane.js:
(WebInspector.StylePropertyTreeElement.prototype):

LayoutTests:

* http/tests/inspector/elements-test.js:
(initialize_ElementTest.InspectorTest.dumpSelectedElementStyles):
(initialize_ElementTest.InspectorTest.toggleStylePropertyEnabled):
* inspector/styles/styles-disable-inherited.html:
* inspector/styles/styles-disable-then-change.html:
* inspector/styles/styles-disable-then-delete.html:
* inspector/styles/styles-disable-then-enable.html:
* inspector/styles/undo-property-toggle.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121156 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unskip 3D transform tests.
https://bugs.webkit.org/show_bug.cgi?id=89878

Patch by Allan Sandfeld Jensen <allan.jensen@nokia.com> on 2012-06-25
Reviewed by Csaba Osztrogonác.

* platform/qt-5.0-wk2/Skipped:
* platform/qt/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121157 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Use AIR controls if client doesn't support HTML control
https://bugs.webkit.org/show_bug.cgi?id=89777

Patch by Crystal Zhang <haizhang@rim.com> on 2012-06-25
Reviewed by Yong Li.

Currently HTML controls depend on client implementing CreateWindow event, for those clients
that don't implement CreateWindow event, use old AIR controls so we don't break them.

PR 163818.

Internal reviewed by Mike Fenton.

* Api/WebPageClient.h:
* WebCoreSupport/ChromeClientBlackBerry.cpp:
(WebCore::ChromeClientBlackBerry::openPagePopup):
* WebCoreSupport/PagePopupBlackBerry.cpp:
(WebCore::PagePopupBlackBerry::sendCreatePopupWebViewRequest):
* WebCoreSupport/PagePopupBlackBerry.h:
(PagePopupBlackBerry):
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::openSelectPopup):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121158 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add static qualifier to GraphicsContext3D::extractImageData.
https://bugs.webkit.org/show_bug.cgi?id=89866

GraphicsContext3D::extractImageData does not use member variables.
Each platform Accelerated-compositing implementation can use this method in
order to get pixel data of an Image or ImageBuffer object.

Patch by Huang Dongsung <luxtella@company100.net> on 2012-06-25
Reviewed by Noam Rosenthal.

No new tests since there's no change on code behavior.

* platform/graphics/GraphicsContext3D.h:
(GraphicsContext3D):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121159 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Heap-use-after-free in WebKit::MainThreadFileSystemCallbacks
https://bugs.webkit.org/show_bug.cgi?id=87019

Reviewed by David Levin.

Should not access the CallbacksBridge's member field after it's freed.

* src/WorkerFileSystemCallbacksBridge.cpp:
(WebKit::WorkerFileSystemCallbacksBridge::cleanUpAfterCallback):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121160 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove responseBlob field from XMLHttpResponse.idl
https://bugs.webkit.org/show_bug.cgi?id=89859

Reviewed by Eric Seidel.

Remove XMLHttpResponse.responseBlob from XMLHttpResponse.idl, which
has only been exposed for a very limited time (since r120574) but
probably should not have been done so since XHR2 spec no longer has
the field.  A quick search also showed that no one seems to be using the field.

(More context: the field was added long time ago with a runtime guard
which had never been enabled until the guard was removed in r120574
to remove XHR_RESPONSE_BLOB on all platforms.)

No new tests as no tests use this field.

* xml/XMLHttpRequest.idl: Removed responseBlob field.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121161 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Shadow] Executing Italic and InsertUnorderedList in Shadow DOM causes a crash
https://bugs.webkit.org/show_bug.cgi?id=88495

Reviewed by Ryosuke Niwa.

Source/WebCore:

InsertionPoint::removedFrom(insertionPoint) tries to find its owner ElementShadow from
parentNode or insertionPoint. If the parent node exsits but we cannot reach ElementShadow from
the parent node, InsertionPoint::removedFrom does not try to find ElementShadow anymore.

It's OK if the ElementShadow is being destructed, but there is a case ElementShadow is not being
destructed in editing. In this case, we should try to find ElementShadow from insertionPoint.
Otherwise it will bring inconsistency to Shadow DOM, and causes a crash.

Actually checking the existence of parentNode() does not make any sense. We should get
shadowRoot() directly.

Test: editing/shadow/insertorderedlist-crash.html

* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::removedFrom):

LayoutTests:

* editing/shadow/insertorderedlist-crash-expected.txt: Added.
* editing/shadow/insertorderedlist-crash.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121162 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Support screenDepth() functionality.
https://bugs.webkit.org/show_bug.cgi?id=89423

Reviewed by Kenneth Rohde Christiansen.

Support screenDepth() based on ecore_x_window_depth_get(). This functionality may be used by
both WebKit1 and WebKit2. So, concrete function is placed into EflScreenUtilities.cpp.

This patch can't support existing test cases. Because, EFL DumpRenderTree works without X11 window
by default.

* platform/efl/EflScreenUtilities.cpp:
(WebCore::getPixelDepth):
(WebCore):
* platform/efl/EflScreenUtilities.h:
(WebCore):
* platform/efl/PlatformScreenEfl.cpp:
(WebCore::screenDepth):
(WebCore::screenDepthPerComponent):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121163 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Split map* functions out of StyleResolver into a helper object
https://bugs.webkit.org/show_bug.cgi?id=89881

Reviewed by Daniel Bates.

These map* functions are completely independent of the rest of StyleResolver
and only exist to serve StyleBuilder.
CSSToStyleMap doesn't even want to have a StyleResolver pointer, but
currently needs one to access the resolve-lifetime caches for the
current resolve.  Once we split out that per-resolve state into
some sort of ResolveState/ResolveInfo object (akin to PaintInfo/LayoutState)
then this object will be even simpler.

No behavioral change, thus no tests.

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSToStyleMap.cpp: Added.
(WebCore):
(WebCore::CSSToStyleMap::style):
(WebCore::CSSToStyleMap::rootElementStyle):
(WebCore::CSSToStyleMap::useSVGZoomRules):
(WebCore::CSSToStyleMap::styleImage):
(WebCore::CSSToStyleMap::mapFillAttachment):
(WebCore::CSSToStyleMap::mapFillClip):
(WebCore::CSSToStyleMap::mapFillComposite):
(WebCore::CSSToStyleMap::mapFillOrigin):
(WebCore::CSSToStyleMap::mapFillImage):
(WebCore::CSSToStyleMap::mapFillRepeatX):
(WebCore::CSSToStyleMap::mapFillRepeatY):
(WebCore::CSSToStyleMap::mapFillSize):
(WebCore::CSSToStyleMap::mapFillXPosition):
(WebCore::CSSToStyleMap::mapFillYPosition):
(WebCore::CSSToStyleMap::mapAnimationDelay):
(WebCore::CSSToStyleMap::mapAnimationDirection):
(WebCore::CSSToStyleMap::mapAnimationDuration):
(WebCore::CSSToStyleMap::mapAnimationFillMode):
(WebCore::CSSToStyleMap::mapAnimationIterationCount):
(WebCore::CSSToStyleMap::mapAnimationName):
(WebCore::CSSToStyleMap::mapAnimationPlayState):
(WebCore::CSSToStyleMap::mapAnimationProperty):
(WebCore::CSSToStyleMap::mapAnimationTimingFunction):
(WebCore::CSSToStyleMap::mapNinePieceImage):
(WebCore::CSSToStyleMap::mapNinePieceImageSlice):
(WebCore::CSSToStyleMap::mapNinePieceImageQuad):
(WebCore::CSSToStyleMap::mapNinePieceImageRepeat):
* css/CSSToStyleMap.h: Added.
(WebCore):
(CSSToStyleMap):
(WebCore::CSSToStyleMap::CSSToStyleMap):
* css/StyleBuilder.cpp:
(WebCore::ApplyPropertyFillLayer::applyValue):
(WebCore::ApplyPropertyBorderImage::applyValue):
(WebCore::ApplyPropertyBorderImageModifier::applyValue):
(WebCore):
(WebCore::ApplyPropertyAnimation::map):
(WebCore::StyleBuilder::StyleBuilder):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::StyleResolver):
(WebCore::StyleResolver::collectMatchingRulesForList):
* css/StyleResolver.h:
(WebCore::StyleResolver::styleMap):
(StyleResolver):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121164 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ASSERT(m_wheelEventHandlerCount > 0) can fire
https://bugs.webkit.org/show_bug.cgi?id=89856

Reviewed by Eric Seidel.

Source/WebCore:

When a node with a wheel or a touch event is moved from one document to
another, the didAddMumble/didRemoveMumble calls do not balance because
they're called on different documents. This patch twiddles the counts
appropriately in that case.

Test: fast/events/move-element-with-wheel-and-touch-event-listeners.html

* dom/EventNames.h:
(WebCore::EventNames::isTouchEventType):
(EventNames):
(WebCore::EventNames::touchEventNames):
* dom/Node.cpp:
(WebCore::Node::didMoveToNewDocument):

LayoutTests:

Test what happens when we move a node with wheel and/or touch events
from one document to another. Prior to this patch, this test triggers
ASSERT(m_wheelEventHandlerCount > 0) in Document.cpp.

* fast/events/move-element-with-wheel-and-touch-event-listeners-expected.txt: Added.
* fast/events/move-element-with-wheel-and-touch-event-listeners.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121166 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Add graphviz debug output for the gstreamer video pipeline.
https://bugs.webkit.org/show_bug.cgi?id=89660

Patch by Allan Xavier <allan.xavier@undefinedltd.co.uk> on 2012-06-25
Reviewed by Martin Robinson.

Dump the current video pipeline as a graphviz DOT file when the
pipeline state changes or when an error occours.

No new tests as the change is only useful for debugging.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121169 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Implement Network Information API
https://bugs.webkit.org/show_bug.cgi?id=87067

Reviewed by Kenneth Rohde Christiansen.

.:

* Source/cmake/FindEFL.cmake: Find eeze library in build system.

Source/WebKit:

* PlatformEfl.cmake: Add dependency of eeze library.

Source/WebKit/efl:

Implement NetworkInfoClientEfl.cpp using eeze library. However, this patch only
supports this feature on ethernet interface.

* WebCoreSupport/NetworkInfoClientEfl.cpp:
(WebCore):
(WebCore::NetworkInfoClientEfl::NetworkInfoClientEfl):
(WebCore::NetworkInfoClientEfl::startUpdating):
(WebCore::NetworkInfoClientEfl::stopUpdating):
(WebCore::NetworkInfoClientEfl::bandwidth):
(WebCore::NetworkInfoClientEfl::metered):
* WebCoreSupport/NetworkInfoClientEfl.h:
(NetworkInfoClientEfl):

Tools:

* efl/jhbuild.modules: Add eeze library dependency.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121170 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Missing implementation of textInputController.setComposition() causes bot redness
https://bugs.webkit.org/show_bug.cgi?id=89845

* platform/mac/Skipped: Skip fast/forms/input-set-composition-scroll.html

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121171 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] RenderPass textures are evicted at the end of every frame
https://bugs.webkit.org/show_bug.cgi?id=89786

Patch by Zeev Lieber <zlieber@chromium.org> on 2012-06-25
Reviewed by Adrienne Walker.

Source/WebCore:

Removed calls to TextureManager::reduceMemoryToLimit inside
finishDrawingFrame() method.

Added unit tests to verify new behavior.

* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::finishDrawingFrame):

Source/WebKit/chromium:

Added unit tests to verify large textures are staying in memory
and available for render pass optimization.

* tests/CCLayerTreeHostImplTest.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121172 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unused constant timeWithoutMouseMovementBeforeHidingControls
https://bugs.webkit.org/show_bug.cgi?id=89823

Patch by Kwang Yul Seo <skyul@company100.net> on 2012-06-25
Reviewed by Daniel Bates.

After r87692, timeWithoutMouseMovementBeforeHidingControls is not used anymore.

* html/HTMLMediaElement.cpp:
(WebCore):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121173 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unused static function shadowFor
https://bugs.webkit.org/show_bug.cgi?id=89824

Patch by Kwang Yul Seo <skyul@company100.net> on 2012-06-25
Reviewed by Daniel Bates.

shadowFor is not used anymore after r117796. No behaviour changes.

* dom/TreeScopeAdopter.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121174 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fast path for simple transform parsing
https://bugs.webkit.org/show_bug.cgi?id=89898

Reviewed by Anders Carlsson.

When manipulating transforms using script, the transform value parsing can show up in profiles pretty heavily 
(up 4% in some cases). We can optimize it easily by implementing a fast path that does not spin up the full CSS
parser, like we already do for several other common value types.
        
The patch implements a fast path for transform(), transformX/Y/Z() and transform3D(). It speeds up parsing by >5x.

* css/CSSParser.cpp:
(WebCore):
(WebCore::parseTransformArguments):
(WebCore::parseTransformValue):
(WebCore::CSSParser::parseValue):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121175 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/Platform: Plumb Scrollbar button dimensions through WebThemeEngine
https://bugs.webkit.org/show_bug.cgi?id=89264

Patch by Scott Graham <scottmg@chromium.org> on 2012-06-25
Reviewed by James Robinson.

Rather than making the height of the scrollbar buttons the same as the
width of the scrollbar, delegate to the WebThemeEngine. This allows
matching the Aura theme rather than the standard Windows theme.

* chromium/public/win/WebThemeEngine.h:
(WebKit):
(WebThemeEngine):

Source/WebCore: Plumb Scrollbar button dimensions down to WebThemeEngine
https://bugs.webkit.org/show_bug.cgi?id=89264

Patch by Scott Graham <scottmg@chromium.org> on 2012-06-25
Reviewed by James Robinson.

Rather than making the height of the scrollbar buttons the same as the
width of the scrollbar, delegate to the WebThemeEngine. This allows
matching the Aura theme rather than the standard Windows theme.

No new tests, as bounds are overridden for DRT.

* platform/chromium/PlatformSupport.h:
(PlatformSupport):
* platform/chromium/ScrollbarThemeChromiumWin.cpp:
(WebCore::ScrollbarThemeChromiumWin::buttonSize):

Source/WebKit/chromium: Plumb Scrollbar button dimensions down to WebThemeEngine
https://bugs.webkit.org/show_bug.cgi?id=89264

Patch by Scott Graham <scottmg@chromium.org> on 2012-06-25
Reviewed by James Robinson.

Rather than making the height of the scrollbar buttons the same as the
width of the scrollbar, delegate to the WebThemeEngine. This allows
matching the Aura theme rather than the standard Windows theme.

* src/PlatformSupport.cpp:
(WebCore::PlatformSupport::getThemePartSize):
(WebCore):

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