Rename getElementInShadowTreeStack to getNodeInShadowTreeStack
https://bugs.webkit.org/show_bug.cgi?id=81324

Since getElementInShadowTreeStack returns ShadowRoot as well which is not an element
it should be renamed to getNodeInShadowTreeStack.

Patch by Kaustubh Atrawalkar <kaustubh@motorola.com> on 2012-03-21
Reviewed by Hajime Morita.

* fast/dom/shadow/access-key.html:
* fast/dom/shadow/get-element-by-id-in-shadow-root-expected.txt:
* fast/dom/shadow/get-element-by-id-in-shadow-root.html:
* fast/dom/shadow/resources/shadow-dom.js:
(getNodeInShadowTreeStack):
* fast/dom/shadow/shadow-boundary-events.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111505 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Rebaseline tests after r111497.

* platform/chromium-mac-leopard/fast/css/text-transform-select-expected.png:
* platform/chromium-mac-leopard/fast/forms/select/menulist-disabled-option-expected.png: Added.
* platform/chromium-mac-snowleopard/fast/css/text-transform-select-expected.png:
* platform/chromium-mac-snowleopard/fast/css/text-transform-select-expected.txt: Added.
* platform/chromium-mac-snowleopard/fast/forms/select-max-length-expected.txt: Added.
* platform/chromium-mac-snowleopard/fast/forms/select/menulist-disabled-option-expected.png: Added.
* platform/chromium-mac/fast/css/text-transform-select-expected.png:
* platform/chromium-mac/fast/css/text-transform-select-expected.txt: Added.
* platform/chromium-mac/fast/forms/select/menulist-disabled-option-expected.png: Added.
* platform/chromium-win-xp/fast/forms/select-max-length-expected.txt: Added.
* platform/chromium-win/fast/css/text-transform-select-expected.png:
* platform/chromium-win/fast/css/text-transform-select-expected.txt:
* platform/chromium-win/fast/forms/select/menulist-disabled-option-expected.png: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111506 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Remove redundant code in SocketStreamHandler
https://bugs.webkit.org/show_bug.cgi?id=81726

Reviewed by George Staikos.

No new tests needed. Just remove redundant code.

* platform/network/blackberry/SocketStreamHandle.h:
(SocketStreamHandle):
* platform/network/blackberry/SocketStreamHandleBlackBerry.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111507 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Updated Mac expected results for this test. <http://webkit.org/b/81746> tracks the fact that
r111500 broke it.

* platform/mac/fast/css/text-transform-select-expected.png:
* platform/mac/fast/css/text-transform-select-expected.txt:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111508 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Marking lost-compositor-context-permanently.html on WIN as flaky.

* platform/chromium/test_expectations.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111509 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Add webkit_web_view_run_javascript() to WebKit2 GTK+
https://bugs.webkit.org/show_bug.cgi?id=75543

Reviewed by Martin Robinson.

Source/WebKit2:

* GNUmakefile.am: Add new files to compilation.
* UIProcess/API/gtk/WebKitError.cpp:
(webkit_javascript_error_quark): Add new error domain for
Javascript errors.
* UIProcess/API/gtk/WebKitError.h:
* UIProcess/API/gtk/WebKitJavascriptResult.cpp: Added.
(webkitJavascriptResultCreate): Create a WebKitJavascriptResult
for the given WKSerializedScriptValueRef.
(webkit_javascript_result_ref): Increment reference count of
WebKitJavascriptResult.
(webkit_javascript_result_unref): Decrement reference count of
WebKitJavascriptResult.
(webkit_javascript_result_get_global_context): Get global
javascript context of the result.
(webkit_javascript_result_get_value): Get the JSValueRef of the
result.
* UIProcess/API/gtk/WebKitJavascriptResult.h: Added.
* UIProcess/API/gtk/WebKitJavascriptResultPrivate.h: Added.
* UIProcess/API/gtk/WebKitPrivate.h:
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewFinalize): Release the global javascript context.
(webkit_web_view_get_javascript_global_context): Get or create the
global javascript context.
(webkitWebViewRunJavaScriptCallback): Callback called by C API when
javascript execution finishes.
(webkit_web_view_run_javascript): Asynchronously run a given
javascript.
(webkit_web_view_run_javascript_finish): Finish async operation
started by webkit_web_view_run_javascript().
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
* UIProcess/API/gtk/docs/webkit2gtk.types: Add
webkit_javascript_result_get_type().
* UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
(testWebViewRunJavaScript):
(beforeAll):
* UIProcess/API/gtk/tests/WebViewTest.cpp:
(WebViewTest::WebViewTest):
(WebViewTest::~WebViewTest):
(runJavaScriptReadyCallback):
(WebViewTest::runJavaScriptAndWaitUntilFinished):
(jsValueToCString):
(WebViewTest::javascriptResultToCString):
(WebViewTest::javascriptResultToNumber):
(WebViewTest::javascriptResultToBoolean):
(WebViewTest::javascriptResultIsNull):
(WebViewTest::javascriptResultIsUndefined):
* UIProcess/API/gtk/tests/WebViewTest.h:
* UIProcess/API/gtk/webkit2.h:

Tools:

* MiniBrowser/gtk/GNUmakefile.am: Add javascriptcore_cppflags to
MiniBrowser CPP flags.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111510 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Allow running javascript from location bar in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=81331

Reviewed by Martin Robinson.

* MiniBrowser/gtk/BrowserWindow.c:
(activateUriEntryCallback): Use browser_window_load_uri().
(browser_window_load_uri): Check whether uri starts with
javascript: and run the given script, or just call
webkit_web_view_load_uri() to load the given uri.
* MiniBrowser/gtk/BrowserWindow.h:
* MiniBrowser/gtk/main.c:
(createBrowserWindow): Use browser_window_load_uri().

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111511 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: HeapProfiler: support distance column in Summary View.
https://bugs.webkit.org/show_bug.cgi?id=81675

In many cases when a page leaked an object we see not only this object
but the all objects it retains. It is quite difficult to find out which
the object is the root of leak. It'd be simpler to sort the leaked
objects by Distance column and track down the first one.

Reviewed by Yury Semikhatsky.

Source/WebCore:

* inspector/front-end/DetailedHeapshotGridNodes.js:
(WebInspector.HeapSnapshotGenericObjectNode):
(WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
(WebInspector.HeapSnapshotInstanceNode.prototype.comparator):
(WebInspector.HeapSnapshotConstructorNode):
(WebInspector.HeapSnapshotConstructorNode.prototype.comparator):
(WebInspector.HeapSnapshotConstructorNode.prototype.get data):
* inspector/front-end/DetailedHeapshotView.js:
(WebInspector.HeapSnapshotConstructorsDataGrid):
(WebInspector.HeapSnapshotConstructorsDataGrid.prototype._defaultPopulateCount.100._sortFields):
* inspector/front-end/HeapSnapshot.js:
(WebInspector.HeapSnapshotNodesProvider.prototype._serialize):

LayoutTests:

* inspector/profiler/detailed-heapshots-summary-sorting.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111512 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, GTK rebaseline after r111500 and skipping 2 tests.

* platform/gtk/Skipped:
* platform/gtk/fast/css/text-transform-select-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111513 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] fast/css/resize-single-axis.html timeout
https://bugs.webkit.org/show_bug.cgi?id=80604

* platform/qt/Skipped: Unskip fast/css/resize-single-axis.html, because it works now.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111514 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update LayoutUnit usage in descendants of RenderReplaced
https://bugs.webkit.org/show_bug.cgi?id=80918

Reviewed by Eric Seidel.

Replaced elements have to flow in the new sub-pixel Render Tree, but since the rendering of these
often takes place outside of WebCore (or in cases such as foreign objects, in WebCore after
passing through platform code), care must be taken to determine the final rendered size and
location before render time. This patch brings these classes up to the latest and greatest in the
subpixellayout branch.

See https://trac.webkit.org/wiki/LayoutUnit for more information.

No new tests. No change in behavior.

* rendering/RenderFrameBase.cpp:
(WebCore::RenderFrameBase::layoutWithFlattening): Build Fix.
* rendering/RenderFullScreen.cpp:
(RenderFullScreen::createPlaceholder): Ditto.
* rendering/RenderFullScreen.h:
(RenderFullScreen): Ditto.
* rendering/RenderHTMLCanvas.cpp:
(WebCore::RenderHTMLCanvas::canvasSizeChanged): Ditto.
* rendering/RenderIFrame.cpp:
(WebCore::RenderIFrame::computeLogicalHeight): Ditto.
(WebCore::RenderIFrame::computeLogicalWidth): Ditto.
* rendering/RenderImage.cpp:
(WebCore::RenderImage::updateIntrinsicSizeIfNeeded): Intrinsic sizes are always integers, since they
originate outside of WebCore.
(WebCore::RenderImage::paintIntoRect): Use pixel snapping to paint into an arbitrary rect.
(WebCore::RenderImage::computeReplacedLogicalWidth): Intrinsic size is always integral -- rounding
values to integers.
* rendering/RenderImage.h:
(RenderImage):
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::videoBox):
(WebCore::RenderVideo::paintReplaced): Painting at integer boundaries.
* rendering/RenderWidget.cpp:
(WebCore):
(WebCore::roundedIntRect): Widgets are rendered outside of WebCore, so we always align them to
integer boundaries. This means we can actually round the size of our ultimate content box. This
function is implemented here specifically to prevent its misuse if we put it elsewhere.
(WebCore::RenderWidget::setWidgetGeometry): We simplify layout by taking a LayoutRect and rounding
it to its final location within this function.
(WebCore::RenderWidget::updateWidgetGeometry): We keep things in LayoutUnits until handing off to
setWidgetGeometry.
(WebCore::RenderWidget::paint): Rounding the paint location before handing painting off to the
widget itself.
* rendering/RenderWidget.h:
(RenderWidget):


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

* DEPS:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111516 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Remove Android build-fix when the proper fix rolled into WebKit
https://bugs.webkit.org/show_bug.cgi?id=80861

Reviewed by Tony Chang.

Source/WebKit/chromium:

No longer set the CC.target environment variable as this is no longer
required for project file generation.

* gyp_webkit:

Tools:

Remove most Android-specific logic from webkitdirs.pm in favor of
handling this during project generation time.

* Scripts/webkitdirs.pm:
(buildChromiumMakefile):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111517 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Upstreaming blackberry specific css file
https://bugs.webkit.org/show_bug.cgi?id=81650

Ustream BlackBerry specific css files, including:
css/themeBlackBerry.css
css/mediaControlsBlackBerry.css

Patch by Jonathan Dong <jonathan.dong@torchmobile.com.cn> on 2012-03-21
Reviewed by Nikolas Zimmermann.

No new tests, this is the initial upstream patch
for BlackBerry specific css files.

* css/mediaControlsBlackBerry.css: Added.
(audio):
(audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
(video:-webkit-full-page-media::-webkit-media-controls-panel):
(audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
(audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container):
(audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
(audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display):
(audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline):
(audio::-webkit-media-controls-fullscreen-button, video::-webkit-media-controls-fullscreen-button):
(audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
(audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container):
(audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
(audio::-webkit-media-controls-seek-back-button, video::-webkit-media-controls-seek-back-button):
(audio::-webkit-media-controls-seek-forward-button, video::-webkit-media-controls-seek-forward-button):
* css/themeBlackBerry.css: Added.
(textarea):
(input, textarea):
(input[type="color"]):
(select:focus):
(select[size][multiple]):
(select[size][multiple]:focus):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111518 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardening after r111477.
https://bugs.webkit.org/show_bug.cgi?id=81697
	modified:   LayoutTests/ChangeLog
	modified:   LayoutTests/platform/qt/Skipped

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111519 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=81705
REGRESSION (r111416): fast/dom/prototype-inheritance-2.html is failing.

Patch by Vineet Chaudhary <rgf748@motorola.com> on 2012-03-21
Reviewed by Csaba Osztrogonác.

Source/WebCore:

No new tests.

* bindings/js/JSDOMBinding.h: Needs passing globalObject to constructArray().
(WebCore::jsArray):

LayoutTests:

* platform/mac/fast/dom/prototype-inheritance-2-expected.txt: Reverting test as it passes now.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111520 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Remove the PostTransitionState
https://bugs.webkit.org/show_bug.cgi?id=81751

Reviewed by Simon Hausmann.

As we are handling content size change event etc from the
WebProcess, that conflicts with the PostTransitionState handling
and we therefore need to handle this slightly differently.

Remove the code and make sure that we never resize the tiled
area to something smaller than the layout viewport.

* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewFlickablePrivate::QQuickWebViewFlickablePrivate):
(QQuickWebViewFlickablePrivate::loadDidCommit):
(QQuickWebViewFlickablePrivate::didFinishFirstNonEmptyLayout):
(QQuickWebViewFlickablePrivate::didChangeViewportProperties):
(QQuickWebViewFlickablePrivate::_q_resume):
(QQuickWebViewFlickablePrivate::pageDidRequestScroll):
(QQuickWebViewFlickablePrivate::didChangeContentsSize):
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewFlickablePrivate):
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::applyConstraints):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::contentsSizeChanged):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::resizeToContentsIfNeeded):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111521 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: HeapSnapshot: make _bfs twice as fast as the old version.
https://bugs.webkit.org/show_bug.cgi?id=81756

Reviewed by Yury Semikhatsky.

* inspector/front-end/HeapSnapshot.js:
(WebInspector.HeapSnapshot.prototype._calculateObjectToWindowDistance):
(WebInspector.HeapSnapshot.prototype._bfs):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111522 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][WK2] Item cannot be selected from select list in touch webview
https://bugs.webkit.org/show_bug.cgi?id=81674

Patch by Dinu Jacob <dinu.jacob@nokia.com> on 2012-03-21
Reviewed by Simon Hausmann.

Activate flag to prevent QQuickWebView from accepting touch event when select
dialog is being displayed.

* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewPrivate::execDialogRunner):
(QQuickWebView::touchEvent):
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate::setDialogActive):
(QQuickWebViewPrivate):
* UIProcess/qt/WebPopupMenuProxyQt.cpp:
(WebKit::WebPopupMenuProxyQt::showPopupMenu):
(WebKit::WebPopupMenuProxyQt::hidePopupMenu):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111523 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][WK2][Mac] MiniBrowser asserts at HashTable.h:480
https://bugs.webkit.org/show_bug.cgi?id=81113

The GLContext is created by QWindow/QSurface using
QOpenGLContext which is implemented using NSOpenGL functions
on mac. Therefore we should use QOpenGLContext as well when
querying for the current context. AGL is not supposed
to be paired with NSOpenGL.
Altering the typedef for GLContext is fine, since
the GLContext type is only used as a key in a map.

Reviewed by Kenneth Rohde Christiansen.

* platform/graphics/texmap/TextureMapperGL.cpp:
(SharedGLData):
(WebCore::TextureMapperGLData::SharedGLData::getCurrentGLContext):

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