[GTK] Test TestWebKitAPI/WebKit2Gtk/TestInspectorServer fails
https://bugs.webkit.org/show_bug.cgi?id=132044

Reviewed by Brian Burg.

Source/WebInspectorUI:

Make sure Protocol/InspectorFrontendHostStub.js is loaded before
Base/Platform.js, because Platform uses the InspectorFrontendHost
object.

* UserInterface/Main.html:

Tools:

* TestWebKitAPI/Tests/WebKit2Gtk/TestInspectorServer.cpp:
(openRemoteDebuggingSession): Remove trailing slash when
concatenating base inspector URL with the page, because the
inspector returns the relative paths with a leading slash.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174926 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[SOUP] Disable SSLv3
https://bugs.webkit.org/show_bug.cgi?id=137859

Patch by Michael Catanzaro <mcatanzaro@igalia.com> on 2014-10-21
Reviewed by Carlos Garcia Campos.

Set G_TLS_GNUTLS_PRIORITY if unset.

* NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp:
(main):
* WebProcess/EntryPoint/unix/WebProcessMain.cpp:
(main):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174927 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Unskip inspector server unit tests.

They should pass now.

* Scripts/run-gtk-tests:
(TestRunner):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174928 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Several labels are white instead of black
https://bugs.webkit.org/show_bug.cgi?id=137803

Reviewed by Martin Robinson.

Recent GTK+ versions require to explicitly set the state before
getting a color.

* rendering/RenderThemeGtk.cpp:
(WebCore::styleColor): Helper function to get a color from a
GtkStylecontext that explicitly sets the state before getting the color.
(WebCore::RenderThemeGtk::platformActiveSelectionBackgroundColor): Use styleColor().
(WebCore::RenderThemeGtk::platformInactiveSelectionBackgroundColor): Ditto.
(WebCore::RenderThemeGtk::platformActiveSelectionForegroundColor): Ditto.
(WebCore::RenderThemeGtk::platformInactiveSelectionForegroundColor): Ditto.
(WebCore::RenderThemeGtk::platformActiveListBoxSelectionBackgroundColor): Ditto.
(WebCore::RenderThemeGtk::platformInactiveListBoxSelectionBackgroundColor): Ditto.
(WebCore::RenderThemeGtk::platformActiveListBoxSelectionForegroundColor): Ditto.
(WebCore::RenderThemeGtk::platformInactiveListBoxSelectionForegroundColor): Ditto.
(WebCore::RenderThemeGtk::systemColor): Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174929 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change the default TLS errors policy to WEBKIT_TLS_ERRORS_POLICY_FAIL
https://bugs.webkit.org/show_bug.cgi?id=137832

Patch by Michael Catanzaro <mcatanzaro@igalia.com> on 2014-10-20
Reviewed by Carlos Garcia Campos.

Source/WebKit2:

Too many general-purpose browsers that really need this policy
are not selecting it, so let's do so for them.

* UIProcess/API/gtk/WebKitWebContext.cpp:
(createDefaultWebContext):

Tools:

Ensure each test sets the TLS errors policy that it really needs.
Have each test except testTLSErrorsPolicy stash and restore the original
TLS errors policy. Update testTLSErrorsPolicy to account for the new
default policy.

* TestWebKitAPI/Tests/WebKit2Gtk/TestSSL.cpp:
(testSSL):
(testInsecureContent):
(testTLSErrorsPolicy):
(testTLSErrorsRedirect):
(testTLSErrorsHTTPAuth):
(testLoadFailedWithTLSErrors):
(beforeAll):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174930 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Cairo] Make dashPattern, dotPattern in GraphicsContext::setPlatformStrokeStyle() const
https://bugs.webkit.org/show_bug.cgi?id=137912

Reviewed by Carlos Garcia Campos.

* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::setPlatformStrokeStyle): Make the two static variables
constants since their value doesn't change after initialization.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174931 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move JSC::MacroAssemblerX86Common::s_sse2CheckState definition to MacroAssemblerX86Common.cpp.
<https://webkit.org/b/137807>

Patch by Milan Crha <mcrha@redhat.com> on 2014-10-21
Reviewed by Csaba Osztrogonác.

* assembler/MacroAssemblerX86Common.cpp:
* jit/JIT.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174933 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix FTL Native Inlining for EFL
https://bugs.webkit.org/show_bug.cgi?id=137774

Reviewed by Michael Saboff.

.:

Updated CMake for FTL Native Inlining.

* CMakeLists.txt:
* Source/cmake/FindClang.cmake: Added.
* Source/cmake/OptionsEfl.cmake:
* Source/cmakeconfig.h.cmake:

Source/JavaScriptCore:

Added required functionality for Native Inlining to EFL, and fixed a bug/typo in the original code,
which caused incorrect memory allocation.

* CMakeLists.txt:
* create-llvm-ir-from-source-file.py: Added.
* create-symbol-table-index.py: Added.
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::lower):
(JSC::FTL::LowerDFGToLLVM::getModuleByPathForSymbol):
(JSC::FTL::LowerDFGToLLVM::exitValueForAvailability):
(JSC::FTL::LowerDFGToLLVM::exitValueForNode):
* runtime/BundlePath.cpp: Added.
(JSC::bundlePath):
* runtime/JSDataViewPrototype.cpp:
(JSC::getData):
(JSC::setData):
* runtime/MathObject.cpp:

Source/WTF:

Updated guard definition for Native Inlining, and added an attribute define for marking functions
that should not be left out of the symbol table.

* wtf/Platform.h:

Tools:

Added Clang as an optional module to jhbuild.

* efl/jhbuild.modules:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174940 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ASSERTION FAILED: !gridWasPopulated() in WebCore::RenderGrid::placeItemsOnGrid
https://bugs.webkit.org/show_bug.cgi?id=136939

Reviewed by Darin Adler.

Source/WebCore:

In some particular situations computeIntrinsicLogicalWidths() is called
in the middle of layoutGridItems(). In these cases we do not need to
populate the grid again, so we should avoid calling placeItemsOnGrid().
In addition, we do not need to clean the grid either, as that will be
done later by layoutGridItems().

Test: fast/css-grid-layout/grid-was-populated-assert.html

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeIntrinsicLogicalWidths): Avoid calls to
placeItemsOnGrid() and clearGrid() if the grid was already populated.
* rendering/RenderGrid.h: Move gridWasPopulated() header out of the
debug ifdefs.

LayoutTests:

Added a test case to reproduce the crash in debug mode.

* fast/css-grid-layout/grid-was-populated-assert-expected.txt: Added.
* fast/css-grid-layout/grid-was-populated-assert.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174946 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r170808): Volume slider in built-in media controls only changes volume when thumb is released, not while dragging
https://bugs.webkit.org/show_bug.cgi?id=137805

Reviewed by Dan Bernstein.

Source/WebCore:

Test: media/video-volume-slider-drag.html

Respond to the 'input' event rather than the 'change' event for the volume slider, so that
volume changes are continuous during drag operations.

Also listen for both 'input' and 'change' events for the timeline slider, doing fastSeek()
during 'input' and setting an explicit currentTime during 'change'. This is the same behavior
as current, but using 'change' instead of 'mouseup' to do the final currentTime change.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.createControls):
(Controller.prototype.handleTimelineInput):
(Controller.prototype.handleTimelineChange):
(Controller.prototype.handleTimelineMouseUp):
(Controller.prototype.handleVolumeSliderInput):
(Controller.prototype.handlePlayButtonClicked): Deleted.
(Controller.prototype.handleMaxButtonClicked): Deleted.

LayoutTests:

* media/video-volume-slider-drag-expected.txt: Added.
* media/video-volume-slider-drag.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174972 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r174676): It broke the !ENABLE(VIDEO) build
https://bugs.webkit.org/show_bug.cgi?id=137916

Unreviewed build fix. Add missing header include.

* rendering/RenderLayerBacking.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174978 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add missing ENABLE(FTL_NATIVE_CALL_INLINING) guard to BundlePath.cpp after r174940
https://bugs.webkit.org/show_bug.cgi?id=137924

Patch by Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com> on 2014-10-21
Reviewed by Csaba Osztrogonác.

* runtime/BundlePath.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174979 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Don't create cached functions for HTMLDocument.write*()
https://bugs.webkit.org/show_bug.cgi?id=137906

Reviewed by Darin Adler.

Made it so that JSHTMLDocument::write() and ::writeln() are always created for every prototype.
This is similar to the change in r174847.

* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::getOwnPropertySlot):
* html/HTMLDocument.idl:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION: Google Search (mobile) video thumbnails are too large.
https://bugs.webkit.org/show_bug.cgi?id=137895

Reviewed by Simon Fraser.

This patch fixes layer clipping when an ancestor layer has border-radius clipping.

In cases, where the current layer has non-radius cliprect, while an ancestor layer
has border-radius clipping, we only use the border-radius rect to clip.

Source/WebCore:

Test: fast/clip/overflow-hidden-with-border-radius-overflow-clipping-parent.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::clipToRect):
(WebCore::RenderLayer::restoreClip):
(WebCore::RenderLayer::collectFragments):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:
(WebCore::ClipRect::ClipRect):
(WebCore::ClipRect::effectedByRadius):
(WebCore::ClipRect::setEffectedByRadius):
(WebCore::ClipRect::operator==):
(WebCore::ClipRect::operator!=):
(WebCore::ClipRect::intersect):
(WebCore::ClipRect::hasRadius): Deleted.
(WebCore::ClipRect::setHasRadius): Deleted.

LayoutTests:

* fast/clip/overflow-hidden-with-border-radius-overflow-clipping-parent-expected.html: Added.
* fast/clip/overflow-hidden-with-border-radius-overflow-clipping-parent.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174986 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WKContext needs to provide an API to resume a download
https://bugs.webkit.org/show_bug.cgi?id=137507

Reviewed by Darin Adler.

This patch adds WKContextResumeDownload(), which is only supported on the Mac, and requires the
resume data from WKDownloadGetResumeData().

We have to create a sandbox extension for the partially downloaded file in the UI process so the
network or web process can resume writing to it.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::resumeDownload):
Added, calls through to DownloadManager::resumeDownload().

* NetworkProcess/NetworkProcess.h:
Added resumeDownload().

* NetworkProcess/NetworkProcess.messages.in:
Added ResumeDownload message.

* Shared/Downloads/Download.h:
Added resume().

* Shared/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::resumeDownload):
Added. The URL being downloaded is part of the opaque resumeData, so we can't specify it when the
Download is constructed.

* Shared/Downloads/DownloadManager.h:
Added resumeDownload().

* Shared/Downloads/ios/DownloadIOS.mm:
(WebKit::Download::resume):
Added, not implemented on this platform.

* Shared/Downloads/mac/DownloadMac.mm:
(WebKit::Download::resume):
Added. Consumes the sandbox extension, resumes the download, and sets m_request after the
NSURLDownload has been created. Note that we already have code to revoke the sandbox extension when
the download is finished, canceled, or fails.

* Shared/Downloads/soup/DownloadSoup.cpp:
(WebKit::Download::resume):
Added, not implemented on this platform.

* UIProcess/API/C/WKContext.cpp:
(WKContextResumeDownload):
Added.

* UIProcess/API/C/WKContext.h:
Added WKContextResumeDownload().

* UIProcess/WebContext.cpp:
(WebKit::WebContext::resumeDownload):
Added. Creates a sandbox extension for the existing file and includes it in the message to the
network or web process.

* UIProcess/WebContext.h:
Added resumeDownload().

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::resumeDownload):
Added, calls through to DownloadManager::resumeDownload().

* WebProcess/WebProcess.h:
Added resumeDownload().

* WebProcess/WebProcess.messages.in:
Added ResumeDownload message.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174987 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WKRemoteObjectCoder should handle floats
https://bugs.webkit.org/show_bug.cgi?id=137926
<rdar://problem/18695126>

Reviewed by Beth Dakin.

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(encodeInvocation):
(-[WKRemoteObjectEncoder encodeFloat:forKey:]):
(decodeInvocationArguments):
(-[WKRemoteObjectDecoder decodeFloatForKey:]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174988 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r174676): It broke the !ENABLE(VIDEO) build
https://bugs.webkit.org/show_bug.cgi?id=137916

Reviewed by Csaba Osztrogonác.

Fix the !ENABLE(VIDEO) build by adding an #if ENABLE(VIDEO) where
needed.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::isDirectlyCompositedImage):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174989 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Updated ChangeLog entry to include tests that cover r174985

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174991 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: [ATK] CSS-generated text content not exposed to assistive technologies
https://bugs.webkit.org/show_bug.cgi?id=137669

Reviewed by Chris Fleizach.

Source/WebCore:

Do not use a text iterator to get the text for elements which include
pseudo elements.

Test: accessibility/css-content-attribute.html

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement):

LayoutTests:

Moved the Mac platform test and modified it to dump the accessible tree
and string values rather than a platform-specific hierarchy so that it
could be shared across platforms.

* accessibility/css-content-attribute.html: Added.
* platform/gtk/accessibility/css-content-attribute-expected.txt: Added.
* platform/mac/accessibility/css-content-attribute-expected.txt: Modified to reflect new output.
* platform/mac/accessibility/css-content-attribute.html: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174992 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Curl] Optimization; avoid string reallocation.
https://bugs.webkit.org/show_bug.cgi?id=137920

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-10-21
Reviewed by Brent Fulgham.

Profiling reveals that the cookiesForDOM function is spending time on removing a character from a string.

* platform/network/curl/CookieJarCurl.cpp:
(WebCore::domainMatch):
(WebCore::addMatchingCurlCookie):

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