[EFL][WK2] Simplify frame flattening support in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=98657

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-10-08
Reviewed by Kenneth Rohde Christiansen.

Simplify frame flattening support code in MiniBrowser to
avoid passing the setting around to window_create()
function().

* MiniBrowser/efl/main.c:
(on_key_down):
(on_new_window):
(window_create):
(main):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130658 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Properly strip new tests from the test results json if they are pass/nodata/skip.
https://bugs.webkit.org/show_bug.cgi?id=98669

Reviewed by Eric Seidel.

In _merge_json, we had a codepath that didn't call _normalize_results_json
for tests that aren't already in the aggregated results.
Instead, now do all the merging first and then normalize the aggregated results.

* TestResultServer/model/jsonresults.py:
(JsonResults._merge_json):
(JsonResults._merge_tests):
(JsonResults._normalize_results):
(JsonResults):
(JsonResults._should_delete_leaf):
* TestResultServer/model/jsonresults_unittest.py:
Removed test_merge_build_directory_hierarchy_old_version since there is
no longer any version 3 json to support.
(JsonResultsTest.test_merge_remove_new_test):
(JsonResultsTest.test_merge_prune_extra_results_with_new_result_of_same_type):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130659 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Add support for window.close in Minibrowser
https://bugs.webkit.org/show_bug.cgi?id=98667

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-10-08
Reviewed by Laszlo Gombos.

When calling window.close() from JavaScript, MiniBrowser
now closes the given window.

* MiniBrowser/efl/main.c:
(window_close):
(on_ecore_evas_delete):
(on_close_window):
(window_create):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Skip http/tests/multipart/multipart-html.php while we wait for kov's patch.

* platform/efl/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130661 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2][WTR] WebKitTestRunner needs testRunner.dispatchPendingLoadRequests
https://bugs.webkit.org/show_bug.cgi?id=98638

Patch by Sudarsana Nagineni <sudarsana.nagineni@intel.com> on 2012-10-08
Reviewed by Eric Seidel.

Source/WebKit2:

Add implementation for testRunner.dispatchPendingLoadRequests in
WebKitTestRunner.

* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleDispatchPendingLoadRequests):
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::dispatchPendingLoadRequests):
(WebKit):
* WebProcess/InjectedBundle/InjectedBundle.h:
(InjectedBundle):

Tools:

Add implementation for testRunner.dispatchPendingLoadRequests in
WebKitTestRunner.

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::dispatchPendingLoadRequests):
(WTR):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
(TestRunner):

LayoutTests:

Unskip http/tests/loading/deleted-host-in-resource-load-delegate-callback.html

* platform/wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Border, margin and padding of an inline's inline ancestors counted twice
https://bugs.webkit.org/show_bug.cgi?id=63074

Reviewed by David Hyatt.

Source/WebCore:

In a line such as '<span><span><img>Text' the border, padding and margin belonging
to the two spans was counted twice by RenderBlockLineLayout::nextLineBreak(): once
when adding the width of the <img> object to the line, and a second time when adding
the 'Text'. The result was that nextLineBreak() now had a length for the line that
exceeded the line's maximum length and inserted a bogus line break.

This all happened because the helper function that is used to add in the border etc.
from inline ancestors was crawling up the tree each time. It doesn't need to do that, it
should stop crawling up the tree when the current object is not the first or last sibling below a parent.

Test: fast/inline/bpm-inline-ancestors.html

* rendering/RenderBlockLineLayout.cpp:
(WebCore::shouldAddBorderPaddingMargin): Broke this check out into a helper function so that it
can help inlineLogicalWidth() return early and also treat empty RenderTexts the same as no previous/next
sibling on the line. This ensures that collapsed leading space does not interfere with the decision to
crawl up the ancestors accumulating border, padding, and margin.
(WebCore):
(WebCore::inlineLogicalWidth): Return early once the current child is no longer on the edge of its line -
this ensures the border, padding and margin of ancestors is not counted twice.

LayoutTests:

* fast/inline/bpm-inline-ancestors-expected.html: Added.
* fast/inline/bpm-inline-ancestors.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130663 268f45cc-cd09-0410-ab3c-d52691b4dbfc
After r130344, OpaqueJSString() creates an empty string which should be a null string
https://bugs.webkit.org/show_bug.cgi?id=98417

Reviewed by Sam Weinig.

Changed create() of a null string to return 0. This is the same behavior as before r130344.

* API/OpaqueJSString.cpp:
(OpaqueJSString::create):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130664 268f45cc-cd09-0410-ab3c-d52691b4dbfc
audiobuffer.html need to include audio-testing.js file.
https://bugs.webkit.org/show_bug.cgi?id=98641

Patch by Dongwoo Joshua Im <dw.im@samsung.com> on 2012-10-08
Reviewed by Eric Seidel.

As we discussed at the bug https://bugs.webkit.org/show_bug.cgi?id=88624,
WebAudio tests need to include audio-testing.js file to set WebKitWebAudioEnabled.

* webaudio/audiobuffer.html: Include audio-testing.js file.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130665 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening.

Rebaselining SVG tests after changes in r130599.

* platform/gtk/TestExpectations:
* platform/gtk/svg/W3C-SVG-1.1-SE/styling-pres-02-f-expected.txt:
* platform/gtk/svg/W3C-SVG-1.1/coords-units-01-b-expected.png:
* platform/gtk/svg/W3C-SVG-1.1/coords-units-01-b-expected.txt:
* platform/gtk/svg/W3C-SVG-1.1/pservers-grad-02-b-expected.png:
* platform/gtk/svg/W3C-SVG-1.1/pservers-grad-02-b-expected.txt:
* platform/gtk/svg/W3C-SVG-1.1/pservers-grad-04-b-expected.png:
* platform/gtk/svg/W3C-SVG-1.1/pservers-grad-04-b-expected.txt:
* platform/gtk/svg/W3C-SVG-1.1/pservers-grad-05-b-expected.png:
* platform/gtk/svg/W3C-SVG-1.1/pservers-grad-05-b-expected.txt:
* platform/gtk/svg/W3C-SVG-1.1/pservers-grad-06-b-expected.png:
* platform/gtk/svg/W3C-SVG-1.1/pservers-grad-06-b-expected.txt:
* platform/gtk/svg/W3C-SVG-1.1/pservers-grad-11-b-expected.png:
* platform/gtk/svg/W3C-SVG-1.1/pservers-grad-11-b-expected.txt:
* platform/gtk/svg/W3C-SVG-1.1/pservers-grad-12-b-expected.png:
* platform/gtk/svg/W3C-SVG-1.1/pservers-grad-12-b-expected.txt:
* platform/gtk/svg/W3C-SVG-1.1/pservers-grad-13-b-expected.png:
* platform/gtk/svg/W3C-SVG-1.1/pservers-grad-13-b-expected.txt:
* platform/gtk/svg/W3C-SVG-1.1/pservers-grad-14-b-expected.png:
* platform/gtk/svg/W3C-SVG-1.1/pservers-grad-14-b-expected.txt:
* platform/gtk/svg/W3C-SVG-1.1/pservers-grad-15-b-expected.png:
* platform/gtk/svg/W3C-SVG-1.1/pservers-grad-15-b-expected.txt:
* platform/gtk/svg/W3C-SVG-1.1/struct-use-05-b-expected.txt:
* platform/gtk/svg/W3C-SVG-1.1/styling-inherit-01-b-expected.png:
* platform/gtk/svg/W3C-SVG-1.1/styling-inherit-01-b-expected.txt:
* platform/gtk/svg/batik/paints/gradientLimit-expected.png:
* platform/gtk/svg/batik/paints/gradientLimit-expected.txt:
* platform/gtk/svg/batik/paints/patternRegions-expected.png:
* platform/gtk/svg/batik/paints/patternRegions-expected.txt:
* platform/gtk/svg/batik/paints/patternRegions-positioned-objects-expected.png:
* platform/gtk/svg/batik/paints/patternRegions-positioned-objects-expected.txt:
* platform/gtk/svg/batik/text/textEffect-expected.png:
* platform/gtk/svg/batik/text/textEffect-expected.txt: Added.
* platform/gtk/svg/batik/text/textEffect3-expected.png:
* platform/gtk/svg/batik/text/textEffect3-expected.txt: Added.
* platform/gtk/svg/custom/gradient-deep-referencing-expected.png:
* platform/gtk/svg/custom/gradient-deep-referencing-expected.txt:
* platform/gtk/svg/custom/gradient-with-1d-boundingbox-expected.png: Added.
* platform/gtk/svg/custom/gradient-with-1d-boundingbox-expected.txt:
* platform/gtk/svg/custom/radial-gradient-with-outstanding-focalPoint-expected.png:
* platform/gtk/svg/custom/radial-gradient-with-outstanding-focalPoint-expected.txt: Added.
* platform/gtk/svg/custom/radialGradient-focal-radius-expected.png: Added.
* platform/gtk/svg/custom/radialGradient-focal-radius-expected.txt: Added.
* platform/gtk/svg/custom/recursive-gradient-expected.png:
* platform/gtk/svg/custom/recursive-gradient-expected.txt:
* platform/gtk/svg/custom/relative-sized-content-with-resources-expected.png:
* platform/gtk/svg/custom/relative-sized-content-with-resources-expected.txt:
* platform/gtk/svg/custom/stroked-pattern-expected.png:
* platform/gtk/svg/custom/stroked-pattern-expected.txt:
* platform/gtk/svg/hixie/perf/006-expected.png:
* platform/gtk/svg/hixie/perf/006-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130666 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Additional fast/repaint Chromium rebaseline.

Rebaselined more tests on Chromium Mac. Same as r130654 but there
is some anti-aliasing differences on transformed lines.

* platform/chromium/TestExpectations:
Removed the rebaselined tests.

* fast/repaint/table-section-repaint-expected.txt: Added.
* platform/chromium-mac-snowleopard/fast/repaint/overflow-outline-repaint-expected.png: Added.
* platform/chromium-mac-snowleopard/fast/repaint/table-collapsed-border-expected.png: Added.
* platform/chromium-mac-snowleopard/fast/repaint/text-append-dirty-lines-expected.png: Added.
* platform/chromium-mac-snowleopard/fast/repaint/text-selection-rect-in-overflow-2-expected.png: Added.
* platform/chromium-mac-snowleopard/fast/repaint/text-selection-rect-in-overflow-expected.png: Added.
* platform/chromium-mac-snowleopard/fast/repaint/transform-relative-position-expected.png: Added.
* platform/chromium-mac-snowleopard/fast/repaint/transform-repaint-descendants-expected.png: Added.
* platform/chromium-mac/fast/repaint/overflow-outline-repaint-expected.png: Added.
* platform/chromium-mac/fast/repaint/table-col-background-expected.png: Added.
* platform/chromium-mac/fast/repaint/table-collapsed-border-expected.png: Added.
* platform/chromium-mac/fast/repaint/table-outer-border-expected.png: Added.
* platform/chromium-mac/fast/repaint/table-row-expected.png: Added.
* platform/chromium-mac/fast/repaint/table-section-overflow-expected.png: Added.
* platform/chromium-mac/fast/repaint/table-section-repaint-expected.png: Added.
* platform/chromium-mac/fast/repaint/table-two-pass-layout-overpaint-expected.png: Added.
* platform/chromium-mac/fast/repaint/text-append-dirty-lines-expected.png: Added.
* platform/chromium-mac/fast/repaint/text-selection-rect-in-overflow-2-expected.png: Added.
* platform/chromium-mac/fast/repaint/text-selection-rect-in-overflow-expected.png: Added.
* platform/chromium-mac/fast/repaint/transform-absolute-child-expected.png: Added.
* platform/chromium-mac/fast/repaint/transform-disable-layoutstate-expected.png: Added.
* platform/chromium-mac/fast/repaint/transform-relative-position-expected.png: Added.
* platform/chromium-mac/fast/repaint/transform-repaint-descendants-expected.png: Added.
* platform/chromium-win/fast/repaint/table-section-repaint-expected.txt: Removed.
* platform/chromium/fast/repaint/table-section-repaint-expected.txt: Added.
* platform/efl/fast/repaint/table-section-repaint-expected.txt: Removed.
* platform/gtk/fast/repaint/table-section-repaint-expected.txt: Removed.
* platform/qt/fast/repaint/table-section-repaint-expected.txt: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130667 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove "orphaned units" quirk
https://bugs.webkit.org/show_bug.cgi?id=98553

Patch by Tab Atkins <jackalmage@gmail.com> on 2012-10-08
Reviewed by Eric Seidel.

This patch removes our "orphaned units" quirk.
We have an "orphaned units" quirk to match IE, which allows things like "width: 20 px;".
But FF and Opera don't have it and aren't aware of bugs for it,
and it's not in Simon Pieters' Quirks Mode spec <http://dvcs.w3.org/hg/quirks-mode/raw-file/tip/Overview.html>

No new tests, because I'm killing a quirk.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSParser.h:
(CSSParser):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130668 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Perf test pesults page takes forever to load on a machine with a slow Internet connection
https://bugs.webkit.org/show_bug.cgi?id=98561

Reviewed by Ojan Vafai.

Try loading jquery both locally and remotely, and use the same method to load the remaining
jquery plugins when either one succeeds.

* resources/results-template.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130669 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix video-test.js relativeURL() bug
https://bugs.webkit.org/show_bug.cgi?id=98546

Patch by Shadi Khalek <shadi@chromium.org> on 2012-10-08
Reviewed by Eric Seidel.

Some layout tests failed due to this bug (crbug.com/154157)

* media/video-test.js:
(testArraysEqual):
(relativeURL):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130670 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Avoid useless converting to WKPage
https://bugs.webkit.org/show_bug.cgi?id=98516

Patch by Jinwoo Song <jinwoo7.song@samsung.com> on 2012-10-08
Reviewed by Eric Seidel.

Use priv->pageProxy->findString() and priv->pageProxy->hideFindUI()
to avoid useless converting to WK.

* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_text_find):
(ewk_view_text_find_highlight_clear):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130671 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Make ImageBufferQt use premultiplied converting functions in Color.h instead of its own mechanism.
https://bugs.webkit.org/show_bug.cgi?id=98582

Patch by Huang Dongsung <luxtella@company100.net> on 2012-10-08
Reviewed by Eric Seidel.

Source/WebCore:

Only Qt port failed canvas/philip/tests/2d.imageData.put.unchanged.html because
ImageBufferQt converts from or to a premultiplied color using its own code. When
we convert twice from an unmultiplied color to a premultiplied color and then to
an unmultiplied color using this code, the calculated result are pretty
different against the input color. It is why Gtk passes this test although Qt
fails. Gtk port uses them in Color.h.

In addition, Qt should use the functions in Color.h to reduce duplicated codes.

Tests: canvas/philip/tests/2d.imageData.put.unchanged.html: Fixed a test case

* platform/graphics/qt/ImageBufferQt.cpp:
(WebCore::getImageData):
(WebCore::convertBGRAToRGBA):
(WebCore::ImageBuffer::putByteArray):

LayoutTests:

Unskipping canvas/philip/tests/2d.imageData.put.unchanged.html that is passing.

* platform/qt/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130672 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][DRT] Switch default backing store to single
https://bugs.webkit.org/show_bug.cgi?id=98591

Reviewed by Eric Seidel.

There are two backing stores for WebKit/Efl, Single Backing Store(SBS) and
Tiled Backing Store(TBS), and DRT/Efl has used TBS.
But, TBS is not suitable to run pixel tests because it does not have a good way
to render mock scrollbars well.

So, this patch changes the default backing store to SBS.
In addition, this changes the environment variable from DRT_USE_SINGLE_BACKING_STORE
to DRT_USE_TILED_BACKING_STORE.

* DumpRenderTree/efl/DumpRenderTreeView.cpp:
(shouldUseTiledBackingStore):
(chooseAndInitializeAppropriateSmartClass):


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

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

* DEPS:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130674 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] new test introduced in r120354 fails on Qt
https://bugs.webkit.org/show_bug.cgi?id=91968

Patch by Tullio Lucena <tullio.lucena@openbossa.org> on 2012-10-08
Reviewed by Kenneth Rohde Christiansen.

Unskipping test.

* platform/qt/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130675 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Some GraphicsLayer cleanup to separate the concepts of using a tile cache, and being the main tile cache layer
https://bugs.webkit.org/show_bug.cgi?id=98574

Reviewed by Dean Jackson.

GraphicsLayerCA assumed that using a TileCache equated to being the main page tile
cache layer, which has some special considerations. Make these two concepts separate
to get closer to being able to use TileCaches in place of CATiledLayer.

Source/WebCore:

* platform/graphics/GraphicsLayer.h:
(GraphicsLayer): Remove m_usingTileCache member, which was not appropriate
for this class to have.
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::GraphicsLayer): Remove init of m_usingTileCache.
(WebCore::GraphicsLayer::debugBorderInfo): Can no longer use m_usingTileCache to
get the blue color, so moved code into a virtual debugBorderInfo() method.
(WebCore::GraphicsLayer::updateDebugIndicators): Call the virtual debugBorderInfo().
* platform/graphics/GraphicsLayerClient.h: Remove the usingTileCache() callback;
we now just cache this information in the GraphicsLayerCA on creation.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::GraphicsLayerCA): Init m_isPageTileCacheLayer to false,
then set to m_isPageTileCacheLayer if the client says we should create a tile cache.
(WebCore::GraphicsLayerCA::platformCALayerShowRepaintCounter): Overidden to avoid duplicate repaint
counters in the top-left tile.
(WebCore::GraphicsLayerCA::updateLayerBackgroundColor): If this layer is the page tile cache layer,
we allow setting of its background color.
(WebCore::GraphicsLayerCA::debugBorderInfo): Overidden to use a blue color for tiles.
(WebCore::GraphicsLayerCA::requiresTiledLayer): Don't make CATiledLayers for the page tile cache.
* platform/graphics/ca/GraphicsLayerCA.h:
(GraphicsLayerCA):
* platform/graphics/ca/PlatformCALayerClient.h:
(PlatformCALayerClient): Need to pass the platform layer into platformCALayerShowRepaintCounter()
so we can distinguish between calls for tiles, and calls for the tile cache layer itself.
* platform/graphics/ca/mac/TileCache.mm:
(WebCore::TileCache::shouldShowRepaintCounters): Pass 0 to platformCALayerShowRepaintCounter() to
indicate that we're asking about a tile.
* platform/graphics/mac/WebLayer.mm:
(drawLayerContents): Now we can just rely on platformCALayerShowRepaintCounter() to tell us whether
to draw the repaint counter.
(-[WebLayer setNeedsDisplayInRect:]):
* platform/graphics/mac/WebTiledLayer.mm:
(-[WebTiledLayer setNeedsDisplayInRect:]):
* rendering/RenderLayerBacking.h:
(WebCore::RenderLayerBacking::usingTileCache):
(RenderLayerBacking):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::documentBackgroundColorDidChange): We can ask the RenderLayerBacking
whether it's for the tile cache, rather than going to the GraphicsLayer.
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
(WebCore::MediaPlayerPrivateQuickTimeVisualContext::LayerClient::platformCALayerShowRepaintCounter):

Source/WebKit/win:

* FullscreenVideoController.cpp:
(FullscreenVideoController::LayerClient::platformCALayerShowRepaintCounter):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130676 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] EWK2UnitTestBase.ewk_cookie_manager_accept_policy unit test is failing
https://bugs.webkit.org/show_bug.cgi?id=98663

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-10-08
Reviewed by Laszlo Gombos.

EWK2UnitTestBase.ewk_cookie_manager_accept_policy unit test was
failing because the elements of a list were checked in a given
order but the list was not sorted beforehand.

* UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp:
(sortHostNames):
(TEST_F):

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