[Qt][WK1] Permission request callbacks for non-legacy notifications
https://bugs.webkit.org/show_bug.cgi?id=107438

Reviewed by Jocelyn Turcotte.

Tracks the new callbacks the same way legacy callbacks are tracked.

No test affected yet as we are still lacking support for testing
feature permission callbacks.

* WebCoreSupport/NotificationPresenterClientQt.cpp:
(WebCore::NotificationPresenterClientQt::requestPermission):
(WebCore::NotificationPresenterClientQt::allowNotificationForFrame):
* WebCoreSupport/NotificationPresenterClientQt.h:
(NotificationPresenterClientQt):
(CallbacksInfo):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140330 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [REGRESSION] Forced :visited pseudoclass has no effect on A elements
https://bugs.webkit.org/show_bug.cgi?id=107448

Reviewed by Antti Koivisto.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::sortAndTransferMatchedRules): Remove totally bad code.
(WebCore::StyleResolver::styleForElement):
  Use InsideVisitedLink if PseudoVisited has been forced by Inspector.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140331 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: do not serialize native heap graph when collecting information about memory distribution
https://bugs.webkit.org/show_bug.cgi?id=107450

Reviewed by Pavel Feldman.

Native heap graph is not reported when we need to show only high-level memory distribution.

* inspector/front-end/NativeMemorySnapshotView.js:
(WebInspector.NativeMemorySnapshotView):
(WebInspector.NativeMemoryProfileType.prototype.buttonClicked.didReceiveMemorySnapshot):
(WebInspector.NativeMemoryProfileType.prototype.buttonClicked):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140332 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Inspector] Layout Elements panel in a single column when docked right.
https://bugs.webkit.org/show_bug.cgi?id=107129

Patch by Vladislav Kaznacheev <kaznacheev@chromium.org> on 2013-01-21
Reviewed by Pavel Feldman.

If the Inspector is docked right, the style panes in the Elements panel
are put below the DOM tree pane, not to the right. This behavior
is experimental (hidden behind a new flag "elementsPanelSingleColumn").

No new tests.

* inspector/front-end/DockController.js:
(WebInspector.DockController.prototype.dockSide):
(WebInspector.DockController.prototype._updateUI):
(WebInspector.DockController.prototype._toggleDockState):
* inspector/front-end/ElementsPanel.js:
(WebInspector.ElementsPanel.prototype.onResize):
(WebInspector.ElementsPanel.prototype._onDockStateChanged):
(WebInspector.ElementsPanel.prototype._sidebarPosition):
* inspector/front-end/Panel.js:
(WebInspector.Panel.prototype.createSidebarView):
* inspector/front-end/Settings.js:
(WebInspector.ExperimentsSettings):
* inspector/front-end/SidebarView.js:
(WebInspector.SidebarView):
(WebInspector.SidebarView.prototype.get mainElement):
(WebInspector.SidebarView.prototype.get sidebarElement):
(WebInspector.SidebarView.prototype._setSidebarElementStyle):
(WebInspector.SidebarView.prototype.setSidebarPosition):
(WebInspector.SidebarView.prototype._innerSetSidebarPosition):
(WebInspector.SidebarView.prototype.setMinimumSidebarHeight):
(WebInspector.SidebarView.prototype.setMinimumMainHeightPercent):
(WebInspector.SidebarView.prototype.applyConstraints):
(WebInspector.SidebarView.prototype.hideMainElement):
(WebInspector.SidebarView.prototype.hideSidebarElement):
* inspector/front-end/SplitView.js:
(WebInspector.SplitView):
* inspector/front-end/splitView.css:
(.split-view-sidebar-top):
(.split-view-sidebar-top.maximized):
(.split-view-sidebar-bottom):
(.split-view-sidebar-bottom.maximized):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140333 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardening. Skip failing test.
https://bugs.webkit.org/show_bug.cgi?id=105574.

* platform/qt/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140334 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: data grid resize is slow
https://bugs.webkit.org/show_bug.cgi?id=107291

Reviewed by Pavel Feldman.

- avoid (most of) unnecessary relayouts and style recalculation when dragging data grid resizer.

* inspector/front-end/DataGrid.js:
(WebInspector.DataGrid.prototype._positionResizers):
(WebInspector.DataGrid.prototype._resizerDragging):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140335 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Gtk] Dispatching event list into input element.
https://bugs.webkit.org/show_bug.cgi?id=107259

Patch by Oleg Smirnov <oleg.smirnov@lge.com> on 2013-01-21
Reviewed by Martin Robinson.

Clear pending command list after dispatching events.

* WebCoreSupport/EditorClientGtk.cpp:
(WebKit::EditorClient::handleKeyboardEvent):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140336 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r140285): GTK uses WKPageResourceLoadClient which was removed
https://bugs.webkit.org/show_bug.cgi?id=107421

Source/WebKit2:

Unreviewed buildfix.

* GNUmakefile.list.am:
* UIProcess/API/gtk/WebKitResourceLoadClient.cpp: Removed.
* UIProcess/API/gtk/WebKitResourceLoadClient.h: Removed.
* UIProcess/API/gtk/WebKitWebView.cpp: No longer attach unexisting ResourceLoadClient.
(webkitWebViewConstructed):

Tools:

Unreviewed build fix.

* Scripts/run-gtk-tests:
(TestRunner): skip Resource tests.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140337 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Soup] Work around a glib bug
https://bugs.webkit.org/show_bug.cgi?id=106789

Reviewed by Martin Robinson.

In glib <= 2.35.4, g_input_stream_skip_async() applied to a
libsoup response stream will do a synchronous skip() in another
thread, which libsoup isn't expecting and doesn't have proper
locking for. Work around this until the next time we bump the glib
requirement by using read_async() (and throwing away the result)
instead of skip_async().

No new tests; fixes a race condition in existing tests with older
glib

* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::redirectSkipCallback):
(WebCore::sendRequestCallback):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140338 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Volume button should not be shown for videos without audio
https://bugs.webkit.org/show_bug.cgi?id=106436

Patch by Halton Huo <halton.huo@intel.com> on 2013-01-21
Reviewed by Philippe Normand.

The volume control is no longer shown for videos with no audio.

No new tests, tested by media/video-no-audio.html.

* platform/gtk/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::hasOwnDisabledStateHandlingFor):
(WebCore):
* platform/gtk/RenderThemeGtk.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140339 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash in AccessibilityTableCell::parentTable()
https://bugs.webkit.org/show_bug.cgi?id=107261

Patch by Joanmarie Diggs <jdiggs@igalia.com> on 2013-01-21
Reviewed by Chris Fleizach.

Source/WebCore:

Test: accessibility/table-destroyed-crash.html

Getting the parent table in order to get the role value should not be
done when objects are being destroyed. Also, it does not seem safe to
assume we have an AXObjectCache.

Moving the logic from roleValue() to determineAccessibilityRole() has
the side effect of not being able to verify the cell is in an AXTable
when that AXTable has not yet been created. Therefore isTableCell()
should look to see if it is the descendant of an AXRow.

* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::parentTable):
(WebCore::AccessibilityTableCell::isTableCell):
(WebCore::AccessibilityTableCell::determineAccessibilityRole):
* accessibility/AccessibilityTableCell.h:
(AccessibilityTableCell):

LayoutTests:

Getting the parent table in order to get the role value should not be
done when objects are being destroyed. Also, it does not seem safe to
assume we have an AXObjectCache.

* accessibility/table-destroyed-crash-expected.txt: Added.
* accessibility/table-destroyed-crash.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140340 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Implement the HTML <main> element.
https://bugs.webkit.org/show_bug.cgi?id=103172

Patch by Michael[tm] Smith <mike@w3.org> on 2013-01-21
Reviewed by Chris Fleizach.

Source/WebCore:

Authored by Steve Faulkner <faulkner.steve@gmail.com>

<main> should behave the same as <nav>, <section>, and <article>, and <aside>.
<main> should expose AXLandmarkMain correctly on each platform.

Tests: fast/html/main-element.html
       platform/chromium/accessibility/main-element.html
       platform/mac/accessibility/main-element.html

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* css/html.css:
(article, aside, footer, header, hgroup, main, nav, section):
* editing/FormatBlockCommand.cpp:
(WebCore::isElementForFormatBlock):
* html/HTMLTagNames.in:
* html/parser/HTMLStackItem.h:
(WebCore::HTMLStackItem::isSpecialNode):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processStartTagForInBody):
(WebCore::HTMLTreeBuilder::processEndTagForInBody):

LayoutTests:

<main> should behave the same as <nav>, <section>, <article>, and <aside>.
<main> has no specific parsing rules.
<main> should expose AXLandmarkMain correctly for each platform.

* editing/execCommand/query-format-block-expected.txt:
* editing/execCommand/remove-format-elements-expected.txt:
* editing/execCommand/remove-format-elements.html:
* editing/execCommand/script-tests/query-format-block.js:
* fast/block/child-not-removed-from-parent-lineboxes-crash.html:
* fast/dom/click-method-on-html-element-expected.txt:
* fast/dom/click-method-on-html-element.html:
* fast/dom/wrapper-classes-expected.txt:
* fast/dom/wrapper-classes.html:
* fast/forms/access-key-for-all-elements-expected.txt:
* fast/forms/access-key-for-all-elements.html:
* fast/html/main-element-expected.txt: Added.
* fast/html/main-element.html: Added.
* fast/html/script-tests/main-element.js: Added.
(getWeight):
* platform/chromium/accessibility/main-element-expected.txt: Added.
* platform/chromium/accessibility/main-element.html: Added.
* platform/chromium/fast/dom/wrapper-classes-expected.txt:
* platform/mac/accessibility/main-element-expected.txt: Added.
* platform/mac/accessibility/main-element.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140341 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][Qt][WebGl] Random crash in GraphicsContext3D::drawArrays
https://bugs.webkit.org/show_bug.cgi?id=107178

Patch by Viatcheslav Ostapenko <sl.ostapenko@samsung.com> on 2013-01-21
Reviewed by Noam Rosenthal.

Workaround for the problem in mesa when internal llvm pipe object is deleted
later than the screen object. Screen object is deleted because the corresponding
X server display connection closed.
Keep X server display connection open until program shutdown.
OffScreenRootWindow::display is now static, so there is no need to create
OffScreenRootWindow object on client side.

Fixes crash that appears during run of fast/canavs/webgl tests.

* platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
(OffScreenRootWindow):
(WebCore::OffScreenRootWindow::DisplayConnection::DisplayConnection):
(DisplayConnection):
(WebCore::OffScreenRootWindow::DisplayConnection::~DisplayConnection):
(WebCore::OffScreenRootWindow::DisplayConnection::display):
(WebCore::OffScreenRootWindow::display):
(WebCore::OffScreenRootWindow::~OffScreenRootWindow):
(WebCore):
(WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
(WebCore::GraphicsSurfacePrivate::createSurface):
(WebCore::GraphicsSurfacePrivate::createPixmap):
(WebCore::GraphicsSurfacePrivate::makeCurrent):
(WebCore::GraphicsSurfacePrivate::doneCurrent):
(WebCore::GraphicsSurfacePrivate::swapBuffers):
(WebCore::GraphicsSurfacePrivate::display):
(WebCore::GraphicsSurfacePrivate::size):
(WebCore::GraphicsSurfacePrivate::findFBConfigWithAlpha):
(WebCore::GraphicsSurfacePrivate::clear):
(GraphicsSurfacePrivate):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140342 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Consolidate and run ARIA-list-and-listitem accessibility test
https://bugs.webkit.org/show_bug.cgi?id=107283

Patch by Brian Holt <brian.holt@samsung.com> on 2013-01-21
Reviewed by Chris Fleizach.

After revision r131674 for bug 99640, the output from
AccessibilityUIElement::role() is consistent across most platforms,
therefore platform specific expections can be consolidated into a
generic expectation with a Mac exception and enabled.

* accessibility/aria-list-and-listitem-expected.txt: Renamed from LayoutTests/platform/chromium/accessibility/aria-list-and-listitem-expected.txt.
* platform/gtk/TestExpectations: Removed passing test.
* platform/gtk/accessibility/aria-list-and-listitem-expected.txt: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140343 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Regression(r140262): Causes a lot of flakiness
https://bugs.webkit.org/show_bug.cgi?id=107454

Reviewed by Alexey Proskuryakov.

r140262 introduced a lot of flakiness due to fixed layout mode
not getting disabled on the view after being enabled for
specific test cases. This patch makes sure fixed layout mode
properly gets reset in WebKitTestRunner to avoid flakiness.

* WebKitTestRunner/TestInvocation.cpp:
(WTR::updateLayoutType):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140344 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a test to ensure that content written into a seamless IFrame inherits style.
https://bugs.webkit.org/show_bug.cgi?id=99289

Reviewed by Eric Seidel.

This patch adds a single test to ensure that content written into a
seamless IFrame via 'contentDocument.write()' properly inherits style.
The root of the issue was fixed in wkbug.com/103539, so no code changes
are necesary, but that patch didn't test this particular edge case.

* fast/frames/seamless/seamless-document-write-expected.txt: Added.
* fast/frames/seamless/seamless-document-write.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140346 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Texmap][GTK] The poster-circle doesn't appear.
https://bugs.webkit.org/show_bug.cgi?id=106672

Patch by ChangSeok Oh <shivamidow@gmail.com> on 2013-01-21
Reviewed by Noam Rosenthal.

Source/WebCore:

We need to call setNeedsDisplay to redraw GraphicsLayer after we set drawsContent
a new value for the layer. Otherwise we can't get a chance for first drawing the layer.

Test: compositing/visibility/visibility-composited-animation.html

* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::flushCompositingStateForThisLayerOnly):

LayoutTests:

A new pixel test is added. It tests if animated layer is drawn for the first scene.

* compositing/visibility/visibility-composited-animation-expected.png: Added.
* compositing/visibility/visibility-composited-animation-expected.txt: Added.
* compositing/visibility/visibility-composited-animation.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140347 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] API unit tests are running extremely slow on the bots
https://bugs.webkit.org/show_bug.cgi?id=104665

Reviewed by Gyuyoung Kim.

Clear HTTP cache files before running the unit tests, which prevents
performance degradation due to so many cache files.

* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
(EWK2UnitTest::EWK2UnitTestBase::SetUp):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140348 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Skip spell checking on single character strings
https://bugs.webkit.org/show_bug.cgi?id=107463

Reviewed by Yong Li.

Check for a minimum string length when firing off spellcheck since we don't
want to mark single letter words.

Internally reviewed by Mike Fenton.

* WebKitSupport/InputHandler.cpp:
* WebKitSupport/SpellingHandler.cpp:
(BlackBerry::WebKit::SpellingHandler::createSpellCheckRequest):
(BlackBerry::WebKit::SpellingHandler::parseBlockForSpellChecking):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140349 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][AC] setOpacity doesn't work for GraphicsLayerClutter
https://bugs.webkit.org/show_bug.cgi?id=105436

Patch by ChangSeok Oh <shivamidow@gmail.com> on 2013-01-21
Reviewed by Gustavo Noronha Silva.

Implement GraphicsLayerClutter::setOpacity based on Mac's GraphicsLayer implementation.

No new tests since this patch can be covered by already existing gtk ac tests.

* platform/graphics/clutter/GraphicsLayerClutter.cpp:
(WebCore::GraphicsLayerClutter::setOpacity):
(WebCore):
(WebCore::GraphicsLayerClutter::updateOpacityOnLayer):
(WebCore::GraphicsLayerClutter::commitLayerChangesBeforeSublayers):
* platform/graphics/clutter/GraphicsLayerClutter.h:

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