[Soup] WebTiming information not shown in the inspector
https://bugs.webkit.org/show_bug.cgi?id=118395

Reviewed by Martin Robinson.

Source/WebCore:

WebTiming information was not correctly provided to WebCore
because the gotHeadersCallback was incorrectly resetting the
original ResourceResponse (which had the ResourceLoadTiming
object) instead of simply updating their contents using the
SoupMessage.

No new test required as this feature is already covered by the
existing webtiming tests. In any case this change includes a fix
for the http/tests/misc/webtiming-ssl.php test which was not
failing even if it should because it was not correct.

* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::gotHeadersCallback):
(WebCore::restartedCallback): restartedCallback should be
available only if WEB_TIMING is defined.
(WebCore::createSoupMessageForHandleAndRequest): Ditto.

LayoutTests:

Fixed the webiming-ssl.php test that was incorrectly considering a
FAIL as the expected result. It was probably just a legacy
decision which came from the times where DRT was responsible of
reporting WebTiming information.

Also added a new test that fails due to wkb.ug/103927. It was not
detected before because there were no timing information in the
response.

* http/tests/misc/resources/webtiming-ssl.html:
* http/tests/misc/webtiming-ssl-expected.txt:
* platform/gtk/TestExpectations: added
http/tests/w3c/webperf/submission/Google/resource-timing/html/test_resource_attribute_order.html.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154727 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][WK2] Disable accelerated compositing under Wayland
https://bugs.webkit.org/show_bug.cgi?id=120347

Reviewed by Martin Robinson.

Accelerated compositing is not yet supported under the Wayland display protocol,
so it should be disabled. Since it is enabled by default and the GTK WK2 API does
not provide any way to change that, it's enough to disable it when attaching the
WebKitSettings object to the WebPageGroup if running under Wayland.

* UIProcess/API/gtk/WebKitWebViewGroup.cpp:
(webkitWebViewGroupAttachSettingsToPageGroup):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154728 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][WK2] Only set up a RedirectedXCompositeWindow if running under an X11 display
https://bugs.webkit.org/show_bug.cgi?id=120321

Reviewed by Gustavo Noronha Silva.

Only set up the RedirectedXCompositeWindow member of the WebKitWebViewBasePrivate struct
if we're running under an X11 display. This is now done in the webkitWebViewBaseConstructed
function rather than the constructor, which is removed.

This allows for the UIProcess to run in a Wayland environment even when built with accelerated
compositing enabled. Of course, at the moment there's no support yet for accelerated compositing
under Wayland, so we fall back to rendering the backing store. No changes are introduced to
the behavior under X11 - accelerated compositing will be used where possible, if supported.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseConstructed):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154729 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Grid Layout] infinity should be defined as a negative value
https://bugs.webkit.org/show_bug.cgi?id=107053

Reviewed by Andreas Kling.

From Blink r154805 by <jchaffraix@chromium.org>

Source/WebCore:

Reject negative values for track-breadth at parse time as
mentioned in the latest versions of the spec.

Added some extra checks to the existing tests.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseGridBreadth):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeUsedBreadthOfMaxLength):

LayoutTests:

Added some new test cases to check that track-breadth cannot be a
negative value, either it's a length, a percentage...

* fast/css-grid-layout/grid-columns-rows-get-set-expected.txt:
* fast/css-grid-layout/grid-columns-rows-get-set-multiple-expected.txt:
* fast/css-grid-layout/resources/grid-columns-rows-get-set-multiple.js:
* fast/css-grid-layout/resources/grid-columns-rows-get-set.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154730 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Grid Layout] Fix grid position resolution
https://bugs.webkit.org/show_bug.cgi?id=119801

Reviewed by Andreas Kling.

From Blink r148833, r148878, r150403 by <jchaffraix@chromium.org>

Source/WebCore:

Both grid-{column|row}-end and negative positions were not
properly handled in our grid position resolution code. We were
using the same code to resolve all the grid positions without
considering the edges of the grid.

Also refactored the grid size estimation in
resolveGridPositionsFromStyle() so we can use it for the grid size
estimation. The code no longer requires the grid to be filled at
that moment as the specs changed to use the "explicit grid" which
is independent of grid items (only depends on style).

Test: fast/css-grid-layout/grid-item-negative-position-resolution.html

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::maximumIndexInDirection):
(WebCore::RenderGrid::resolveGridPositionsFromStyle):
(WebCore::adjustGridPositionForSide):
(WebCore::RenderGrid::resolveGridPositionFromStyle):
* rendering/RenderGrid.h:

LayoutTests:

Added a new test to check negative position resolution. Also added
several new test cases to check that we properly resolve grid
positions in the grid edges.

* fast/css-grid-layout/grid-item-negative-position-resolution-expected.txt: Added.
* fast/css-grid-layout/grid-item-negative-position-resolution.html: Added.
* fast/css-grid-layout/grid-item-spanning-resolution-expected.txt:
* fast/css-grid-layout/grid-item-spanning-resolution.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154731 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WorkerGlobalScopeWebDatabase requires ENABLE(WORKERS)
https://bugs.webkit.org/show_bug.cgi?id=120395

Reviewed by Christophe Dumez.

WorkerGlobalScopeDatabase uses the WorkerGlobalScope object which is
defined only when WORKERS are enabled. We should guard that code.

* Modules/webdatabase/WorkerGlobalScopeWebDatabase.cpp:
* Modules/webdatabase/WorkerGlobalScopeWebDatabase.h:
* Modules/webdatabase/WorkerGlobalScopeWebDatabase.idl:

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