REGRESSION(r168603): [GTK] Build broken.
https://bugs.webkit.org/show_bug.cgi?id=132810

Patch by Seongjun Kim <isAir@company100.com> on 2014-05-11
Reviewed by Carlos Garcia Campos.

* UIProcess/API/gtk/WebKitWebContext.cpp:
(createDefaultWebContext):
Construct a WebContextConfiguration object and pass it to WebContext::create.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168608 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Expose a function to copy favicon data without image conversion.
https://bugs.webkit.org/show_bug.cgi?id=132805

Patch by Gordon Sheridan <gordon_sheridan@apple.com> on 2014-05-11
Reviewed by Darin Adler.

* UIProcess/API/C/WKIconDatabase.cpp:
(WKIconDatabaseCopyIconDataForPageURL):
Add a function to copy the data from the image of a favicon for an associated page url.

* UIProcess/API/C/WKIconDatabase.h:
Declare WKIconDatabaseCopyIconDataForPageURL.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Simplify FileThread::Task usage
https://bugs.webkit.org/show_bug.cgi?id=132798

Reviewed by Darin Adler.

Remove the createFileThreadTask functions and the related FileThreadTask helper classes.

Instead, the FileThread::Task class now has a templated constructor that takes in a pointer
to the object instance, a method, and a variadic pack of parameters. The pointer and the
cross-thread copies of all the parameters are then bound to the given method through std::bind().

Instead of createFileThreadTask, std::make_unique<>() should be used to construct unique pointers
that wrap FileThread::Task objects.

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* fileapi/AsyncFileStream.cpp:
(WebCore::AsyncFileStream::create):
(WebCore::AsyncFileStream::stop):
(WebCore::AsyncFileStream::getSize):
(WebCore::AsyncFileStream::openForRead):
(WebCore::AsyncFileStream::openForWrite):
(WebCore::AsyncFileStream::close):
(WebCore::AsyncFileStream::read):
(WebCore::AsyncFileStream::write):
(WebCore::AsyncFileStream::truncate):
* fileapi/FileThread.h:
(WebCore::FileThread::Task::Task):
(WebCore::FileThread::Task::performTask):
(WebCore::FileThread::Task::~Task): Deleted.
* fileapi/FileThreadTask.h: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168610 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Clean up MainThreadTask
https://bugs.webkit.org/show_bug.cgi?id=132799

Reviewed by Darin Adler.

Only have one simple MainThreadTask class that derives from std::function<void ()>.
Its templated constructor takes in the method and a variadic pack of parameters.
The cross-thread copies of the parameter are then bound to the given method through
std::bind(), with the resulting bind expression used to initialize the base
std::function<void ()> class.

The WebCore::callOnMainThread() functions and the helper classes are removed in favor
of passing MainThreadTask rvalues directly to WTF::callOnMainThread().

* fileapi/AsyncFileStream.cpp:
(WebCore::AsyncFileStream::startOnFileThread):
(WebCore::AsyncFileStream::stopOnFileThread):
(WebCore::AsyncFileStream::getSizeOnFileThread):
(WebCore::AsyncFileStream::openForReadOnFileThread):
(WebCore::AsyncFileStream::openForWriteOnFileThread):
(WebCore::AsyncFileStream::readOnFileThread):
(WebCore::AsyncFileStream::writeOnFileThread):
(WebCore::AsyncFileStream::truncateOnFileThread):
* platform/MainThreadTask.h:
(WebCore::MainThreadTask::MainThreadTask):
(WebCore::MainThreadTaskBase::MainThreadTaskBase): Deleted.
(WebCore::MainThreadTaskBase::~MainThreadTaskBase): Deleted.
(WebCore::MainThreadTask1::create): Deleted.
(WebCore::MainThreadTask1::MainThreadTask1): Deleted.
(WebCore::MainThreadTask2::create): Deleted.
(WebCore::MainThreadTask2::MainThreadTask2): Deleted.
(WebCore::MainThreadTask3::create): Deleted.
(WebCore::MainThreadTask3::MainThreadTask3): Deleted.
(WebCore::MainThreadTask4::create): Deleted.
(WebCore::MainThreadTask4::MainThreadTask4): Deleted.
(WebCore::MainThreadTask5::create): Deleted.
(WebCore::MainThreadTask5::MainThreadTask5): Deleted.
(WebCore::MainThreadTask6::create): Deleted.
(WebCore::MainThreadTask6::MainThreadTask6): Deleted.
(WebCore::MainThreadTask7::create): Deleted.
(WebCore::MainThreadTask7::MainThreadTask7): Deleted.
(WebCore::MainThreadTask8::create): Deleted.
(WebCore::MainThreadTask8::MainThreadTask8): Deleted.
(WebCore::executeMainThreadTask): Deleted.
(WebCore::callOnMainThread): Deleted.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168611 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add potential illustrations for a potential future blog post about the viewport meta tag

* blog-files/simple-viewport-configuration: Added.
* blog-files/simple-viewport-configuration/860_viewport.html: Added.
* blog-files/simple-viewport-configuration/blog_with_viewport.png: Added.
* blog-files/simple-viewport-configuration/blog_without_viewport.png: Added.
* blog-files/simple-viewport-configuration/default_viewport.html: Added.
* blog-files/simple-viewport-configuration/horizontal_design.html: Added.
* blog-files/simple-viewport-configuration/inspector.png: Added.
* blog-files/simple-viewport-configuration/report_size.js: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168612 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(CMAKE): [GTK] JavaScriptCore API tests are not built anymore
https://bugs.webkit.org/show_bug.cgi?id=132739

Reviewed Anders Carlsson.

* TestWebKitAPI/CMakeLists.txt: Add missing includes required by
the JSC unit tests.
* TestWebKitAPI/PlatformGTK.cmake: Bring back JavaScriptCore unit tests.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168615 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Blending] Adjust blending pixel test expectations
https://bugs.webkit.org/show_bug.cgi?id=132737

Patch by Ion Rosca <rosca@adobe.com> on 2014-05-12
Reviewed by Mihnea Ovidenie.

Changing failing gif file with with one pixel base64 data and make them different for the two tests,
otherwise they might get cached and the gif animation is shared among multiple tests.
Changing the incorrect expectations for *gif-color-2* and adjusting test expectation for *gif-color-1*
* css3/blending/background-blend-mode-gif-color-2.html:
* css3/blending/background-blend-mode-gif-color.html:
* css3/blending/resources/squares.gif: Removed.
* platform/mac/css3/blending/background-blend-mode-gif-color-2-expected.png:
* platform/mac/css3/blending/background-blend-mode-gif-color-expected.png:

* platform/mac-wk1/TestExpectations:
The background-blend-mode-gif-color-2 does not pass on WK1: the git animation doesn't get started.

* platform/mac/TestExpectations: Adding bugs to the excepted blending tests.

Adjusting this test to avoid scrollbars. Adjusting test expectations.
* css3/blending/blend-mode-overflow-expected.txt: Removed.
* css3/blending/blend-mode-overflow.html:
* platform/mac/css3/blending/blend-mode-overflow-expected.png:
* platform/mac/css3/blending/blend-mode-overflow-expected.txt:

Adding pixel expectations for newly added tests:
* platform/mac/css3/blending/blend-mode-isolation-flags-append-non-stacking-context-blending-expected.png: Added.
* platform/mac/css3/blending/blend-mode-isolation-flags-append-stacking-context-blending-expected.png: Added.
* platform/mac/css3/blending/blend-mode-isolation-flags-remove-non-stacking-context-blending-expected.png: Added.
* platform/mac/css3/blending/blend-mode-isolation-flags-remove-stacking-context-blending-expected.png: Added.
* platform/mac/css3/blending/blend-mode-isolation-flags-turn-off-blending-expected.png: Added.
* platform/mac/css3/blending/blend-mode-isolation-flags-turn-off-blending-no-isolation-expected.png: Added.
* platform/mac/css3/blending/blend-mode-isolation-flags-turn-off-stacking-context-expected.png: Added.
* platform/mac/css3/blending/blend-mode-isolation-flags-turn-on-blending-expected.png: Added.
* platform/mac/css3/blending/blend-mode-isolation-flags-turn-on-stacking-context-expected.png: Added.
* platform/mac/css3/blending/blend-mode-isolation-turn-off-self-painting-layer-expected.png: Added.
* platform/mac/css3/blending/blend-mode-isolation-turn-off-self-painting-layer1-expected.png: Added.
* platform/mac/css3/blending/blend-mode-isolation-turn-off-self-painting-layer2-expected.png: Added.
* platform/mac/css3/blending/blend-mode-isolation-turn-on-self-painting-layer-expected.png: Added.

Adjusting pixel tests after removing non separable blend modes.
* platform/mac/css3/blending/blend-mode-simple-composited-expected.png:
* platform/mac/css3/blending/blend-mode-simple-expected.png:
* platform/mac/css3/blending/effect-background-blend-mode-expected.png:
* platform/mac/css3/blending/effect-background-blend-mode-tiled-expected.png:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168616 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Bump version numbers.

* Source/cmake/OptionsGTK.cmake:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168617 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[cmake] Add missing FTL source files to the build system.

Patch by László Langó <llango.u-szeged@partner.samsung.com> on 2014-05-12
Reviewed by Csaba Osztrogonác.

* CMakeLists.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168618 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] TLSErrors do not cause page load to fail when not ignored
https://bugs.webkit.org/show_bug.cgi?id=131104

Reviewed by Gyuyoung Kim.

Added EFL unit test for the bug https://bugs.webkit.org/show_bug.cgi?id=121548

* UIProcess/API/efl/tests/test_ewk2_ssl.cpp: Added new test: ewk_ssl_bad_cert_redirect_https_to_http


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168619 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK1] Enable region based columns
https://bugs.webkit.org/show_bug.cgi?id=132646

Patch by Krzysztof Wolanski <k.wolanski@samsung.com> on 2014-05-12
Reviewed by Gyuyoung Kim.

Enable new multi-column mode as it was enabled in WK2 (r168046).

* ewk/ewk_view.cpp:
(_ewk_view_priv_new):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168620 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Invalid information remaining in lineToRegion map of RenderFlowThread.
https://bugs.webkit.org/show_bug.cgi?id=132690

Reviewed by Antti Koivisto.

Source/WebCore:
Test: fast/multicol/newmulticol/lines-region-map-crash.html

* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::deleteLines):
* rendering/RenderFlowThread.h:

LayoutTests:
Added test for crash caused by invalid information in the lineToRegion map.

* fast/multicol/newmulticol/lines-region-map-crash-expected.html: Added.
* fast/multicol/newmulticol/lines-region-map-crash.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Rebaseline after adding tests in r168350
https://bugs.webkit.org/show_bug.cgi?id=132824

Unreviewed gardening.

Patch by Krzysztof Wolanski <k.wolanski@samsung.com> on 2014-05-12

* platform/efl/TestExpectations:
* platform/efl/fast/multicol/client-rects-expected.txt:
* platform/efl/fast/multicol/client-rects-spanners-complex-expected.txt:
* platform/efl/fast/multicol/client-rects-spanners-expected.txt:
* platform/efl/fast/multicol/span/span-as-immediate-columns-child-expected.txt:
* platform/efl/fast/multicol/span/span-margin-collapsing-expected.txt:
* platform/efl/svg/zoom/page/zoom-foreignObject-expected.txt:
* platform/efl/svg/zoom/page/zoom-svg-as-relative-image-expected.png:
* platform/efl/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png:
* platform/efl/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.txt:
* platform/efl/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.png:
* platform/efl/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.txt:
* platform/efl/svg/zoom/page/zoom-svg-through-object-with-override-size-expected.png:
* platform/efl/svg/zoom/page/zoom-svg-through-object-with-override-size-expected.txt:
* platform/efl/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png:
* platform/efl/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.txt:
* platform/efl/svg/zoom/text/zoom-foreignObject-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168622 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Typo fix in generate-forwarding-headers
https://bugs.webkit.org/show_bug.cgi?id=132820

Patch by Martin Hodovan <mhodovan.u-szeged@partner.samsung.com> on 2014-05-12
Reviewed by Anders Carlsson.

* Scripts/generate-forwarding-headers.pl:
(collectFrameworkHeaderPaths):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168623 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r159560): Text clips on tile border if line-height < font-size
https://bugs.webkit.org/show_bug.cgi?id=132822

Reviewed by Andreas Kling.

Source/WebCore: 
        
The first line of simple line layout run range was miscomputed.

Test: fast/text/simple-lines-range-low-line-height.html

* rendering/SimpleLineLayoutResolver.h:
(WebCore::SimpleLineLayout::RunResolver::lineIndexForHeight):
        
    Lines may overlap if line-height < font-size. Apply different adjustment when searching for range begin
    so that overflowing earlier lines are taken into account.

(WebCore::SimpleLineLayout::RunResolver::rangeForRect):

LayoutTests: 

* fast/text/simple-lines-range-low-line-height-expected.html: Added.
* fast/text/simple-lines-range-low-line-height.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Replace WKContextSetLocalStorageDirectory with a context configuration getter/setter
https://bugs.webkit.org/show_bug.cgi?id=132809

Reviewed by Dan Bernstein.

Source/WebKit2:
* UIProcess/API/C/WKContext.cpp:
(WKContextSetLocalStorageDirectory): Deleted.

* UIProcess/API/C/WKContextConfigurationRef.cpp:
(WKContextConfigurationCopyLocalStorageDirectory):
(WKContextConfigurationSetLocalStorageDirectory):
* UIProcess/API/C/WKContextConfigurationRef.h:
Add getters and setters for the local storage directory.

* UIProcess/API/C/WKContextPrivate.h:
Remove WKContextSetLocalStorageDirectory.

* UIProcess/API/Cocoa/WKProcessGroup.mm:
(-[WKProcessGroup initWithInjectedBundleURL:]):
Call WebContext::applyPlatformSpecificConfigurationDefaults.

* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _initWithConfiguration:]):
Call WebContext::applyPlatformSpecificConfigurationDefaults (for now).

* UIProcess/APIContextConfiguration.cpp:
(API::ContextConfiguration::webContextConfiguration):
Set the local storage. Also, call WebContext::applyPlatformSpecificConfigurationDefaults.

* UIProcess/APIContextConfiguration.h:
(API::ContextConfiguration::injectedBundlePath):
This should be const.

(API::ContextConfiguration::localStorageDirectory):
(API::ContextConfiguration::setLocalStorageDirectory):
Add getter and setter.

* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::setLocalStorageDirectory):
ASSERT that the path isn't null.

* UIProcess/WebContext.cpp:
(WebKit::WebContext::applyPlatformSpecificConfigurationDefaults):
New helper function that will fill in platform specific defaults for empty parameters.

(WebKit::WebContext::WebContext):
Get the local storage directory from the configuration.

(WebKit::WebContext::setLocalStorageDirectory): Deleted.
(WebKit::WebContext::localStorageDirectory): Deleted.
These are no longer needed.

* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformDefaultLocalStorageDirectory):
This should be a static member function.

Tools:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::initialize):
Set the local storage directory using WKContextConfigurationSetLocalStorageDirectory.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168625 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WinCairo buildfix after r168611
https://bugs.webkit.org/show_bug.cgi?id=132825

Patch by Jozsef Berta <jberta.u-szeged@partner.samsung.com> on 2014-05-12
Reviewed by Darin Adler.

* platform/network/curl/CurlDownload.cpp:
(WebCore::CurlDownloadManager::downloadThread):
(WebCore::CurlDownload::didReceiveHeader):
(WebCore::CurlDownload::didReceiveData):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168626 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Pass local storage directory to StorageManager::create
https://bugs.webkit.org/show_bug.cgi?id=132827

Reviewed by Tim Horton.

Since we know the local storage directory at creation time and we know it never changes,
we can get rid of setLocalStorageDirectory and just pass the local storage directory at creation time.

* UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
(WebKit::LocalStorageDatabaseTracker::create):
(WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker):
(WebKit::LocalStorageDatabaseTracker::~LocalStorageDatabaseTracker):
(WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectory): Deleted.
(WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal): Deleted.
* UIProcess/Storage/LocalStorageDatabaseTracker.h:
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::create):
(WebKit::StorageManager::StorageManager):
(WebKit::StorageManager::setLocalStorageDirectory): Deleted.
* UIProcess/Storage/StorageManager.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168628 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WKWebView should default to _backgroundExtendsBeyondPage = YES
https://bugs.webkit.org/show_bug.cgi?id=132829
<rdar://problem/16886364>

Reviewed by Beth Dakin.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168629 268f45cc-cd09-0410-ab3c-d52691b4dbfc
fast/multicol/newmulticol/first-letter-create.html is very flaky
https://bugs.webkit.org/show_bug.cgi?id=132744

Reviewed by Antti Koivisto.

Modified test to not display anything as its only purpose is to ensure it doesn't crash.

* TestExpectations:
* fast/multicol/newmulticol/first-letter-create-expected.html:
* fast/multicol/newmulticol/first-letter-create.html:


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