[SOUP] SoupNetworkSession::setAcceptLanguages should receive a const reference
https://bugs.webkit.org/show_bug.cgi?id=126966

Reviewed by Gustavo Noronha Silva.

Source/WebCore:

We don't really need to modify the Vector just to ignore the C
locale.

* platform/network/soup/SoupNetworkSession.cpp:
(WebCore::buildAcceptLanguages): Rework it to not modify the
passed vector to ignore the C locale when it's present.
(WebCore::SoupNetworkSession::setAcceptLanguages): Use const Vector<String>&.
* platform/network/soup/SoupNetworkSession.h:

Source/WebKit2:

* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::setSoupSessionAcceptLanguage): Use const Vector<String>&.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161974 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Test /webkit2/WebKitWebContext/languages crashes with network process enabled
https://bugs.webkit.org/show_bug.cgi?id=126130

Reviewed by Anders Carlsson.

We need to notify the network process when the user preferred
languages have changed to update the SoupSession accordingly.

* NetworkProcess/NetworkProcess.h: Add
userPreferredLanguagesChanged when using soup network backend.
* NetworkProcess/NetworkProcess.messages.in: Add
UserPreferredLanguagesChanged message when using soup network
backend.
* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::NetworkProcess::userPreferredLanguagesChanged): Update
the SoupSession to use the given languages.
(WebKit::NetworkProcess::platformInitializeNetworkProcess): Call
userPreferredLanguagesChanged() when initialization parameters
contain languages.
(WebKit::NetworkProcess::allowSpecificHTTPSCertificateForHost):
Remove unnedded WebCore prefix.
(WebKit::NetworkProcess::clearCacheForAllOrigins): Simplify using
a single line.
* Shared/Network/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode): Encode the
languages vector.
(WebKit::NetworkProcessCreationParameters::decode): Decode the
languages vector.
* Shared/Network/NetworkProcessCreationParameters.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::languageChanged): Send a message also to the
network process.
* UIProcess/soup/WebContextSoup.cpp:
(WebKit::WebContext::platformInitializeNetworkProcess): Set
languages initial parameter.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161976 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed Mac TestExpectations update.

<https://webkit.org/b/126890> is duplicate of <https://webkit.org/b/126889>

* platform/mac/TestExpectations: Mark it as such.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161977 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: [WebGL] Invalid range checking in WebGLRenderingContext::validateTexFuncLevel
https://bugs.webkit.org/show_bug.cgi?id=126925

Reviewed by Dean Jackson.

Added fast/canvas/webgl/webgl-compressed-texture-size-limit.html.

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::validateTexFuncLevel): Avoid off-by-one error

LayoutTests: [WebGL] Invalid range checking in WebGLRenderContext::validateTexFunctionLevel
https://bugs.webkit.org/show_bug.cgi?id=126925

Reviewed by Dean Jackson.

* fast/canvas/webgl/resources/webgl-test-utils.js:
(WebGLTestUtils): Add missing 'waitForComposite' implementatino.
* fast/canvas/webgl/webgl-compressed-texture-size-limit-expected.txt: Added.
* fast/canvas/webgl/webgl-compressed-texture-size-limit.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161978 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: Modernize AccessibilityChildrenVector loops
https://bugs.webkit.org/show_bug.cgi?id=126915

Reviewed by Anders Carlsson.

Change appropriate for loops to use the new style.
Use auto where appropriate.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::focusedImageMapUIElement):
* accessibility/AccessibilityARIAGrid.cpp:
(WebCore::AccessibilityARIAGrid::addRowDescendant):
* accessibility/AccessibilityARIAGridCell.cpp:
(WebCore::AccessibilityARIAGridCell::rowIndexRange):
* accessibility/AccessibilityARIAGridRow.cpp:
(WebCore::AccessibilityARIAGridRow::disclosedRows):
(WebCore::AccessibilityARIAGridRow::disclosedByRow):
(WebCore::AccessibilityARIAGridRow::parentTable):
(WebCore::AccessibilityARIAGridRow::headerObject):
* accessibility/AccessibilityListBox.cpp:
(WebCore::AccessibilityListBox::addChildren):
(WebCore::AccessibilityListBox::setSelectedChildren):
(WebCore::AccessibilityListBox::selectedChildren):
* accessibility/AccessibilityListBoxOption.cpp:
(WebCore::AccessibilityListBoxOption::listBoxOptionIndex):
* accessibility/AccessibilityMenuList.cpp:
(WebCore::AccessibilityMenuList::didUpdateActiveOption):
* accessibility/AccessibilityMenuListPopup.cpp:
(WebCore::AccessibilityMenuListPopup::addChildren):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::insertChild):
(WebCore::AccessibilityNodeObject::selectedRadioButton):
(WebCore::AccessibilityNodeObject::selectedTabItem):
(WebCore::AccessibilityNodeObject::ariaLabeledByText):
* accessibility/AccessibilityObject.cpp:
(WebCore::appendChildrenToArray):
(WebCore::AccessibilityObject::clearChildren):
(WebCore::AccessibilityObject::ariaTreeRows):
(WebCore::AccessibilityObject::ariaTreeItemContent):
(WebCore::AccessibilityObject::ariaTreeItemDisclosedRows):
(WebCore::AccessibilityObject::elementAccessibilityHitTest):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
(WebCore::AccessibilityRenderObject::ariaFlowToElements):
(WebCore::AccessibilityRenderObject::isTabItemSelected):
(WebCore::AccessibilityRenderObject::setSelectedRows):
(WebCore::AccessibilityRenderObject::ariaOwnsElements):
(WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest):
(WebCore::AccessibilityRenderObject::addRemoteSVGChildren):
(WebCore::AccessibilityRenderObject::updateAttachmentViewParents):
(WebCore::AccessibilityRenderObject::addHiddenChildren):
(WebCore::AccessibilityRenderObject::ariaSelectedRows):
(WebCore::AccessibilityRenderObject::ariaListboxSelectedChildren):
(WebCore::AccessibilityRenderObject::ariaListboxVisibleChildren):
(WebCore::AccessibilityRenderObject::tabChildren):
(WebCore::AccessibilityRenderObject::mathRadicandObject):
(WebCore::AccessibilityRenderObject::mathRootIndexObject):
(WebCore::AccessibilityRenderObject::mathNumeratorObject):
(WebCore::AccessibilityRenderObject::mathDenominatorObject):
(WebCore::AccessibilityRenderObject::mathUnderObject):
(WebCore::AccessibilityRenderObject::mathOverObject):
(WebCore::AccessibilityRenderObject::mathBaseObject):
(WebCore::AccessibilityRenderObject::mathSubscriptObject):
(WebCore::AccessibilityRenderObject::mathSuperscriptObject):
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::columnHeaders):
(WebCore::AccessibilityTable::rowHeaders):
(WebCore::AccessibilityTable::visibleRows):
(WebCore::AccessibilityTable::cells):
(WebCore::AccessibilityTable::cellForColumnAndRow):
* accessibility/AccessibilityTableColumn.cpp:
(WebCore::AccessibilityTableColumn::headerObject):
* accessibility/AccessibilityTableHeaderContainer.cpp:
(WebCore::AccessibilityTableHeaderContainer::addChildren):
* accessibility/AccessibilityTableRow.cpp:
(WebCore::AccessibilityTableRow::headerObject):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]):
(-[WebAccessibilityObjectWrapper indexOfAccessibilityElement:]):
(-[WebAccessibilityObjectWrapper containsUnnaturallySegmentedChildren]):
* accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
(convertMathPairsToNSArray):
(-[WebAccessibilityObjectWrapperBase accessibilityTitle]):
(-[WebAccessibilityObjectWrapperBase accessibilityDescription]):
(-[WebAccessibilityObjectWrapperBase accessibilityHelpText]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(convertToNSArray):
(convertStringsToNSArray):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
(-[WebAccessibilityObjectWrapper accessibilityIndexOfChild:]):
(-[WebAccessibilityObjectWrapper accessibilityArrayAttributeCount:]):
(-[WebAccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161979 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes] Shape images are now <image> types, not just URIs
https://bugs.webkit.org/show_bug.cgi?id=125224

Reviewed by Andreas Kling.

Source/WebCore:

Added support for image-set valued shapes. Added an optional ResourceLoaderOptions
parameter to CSSImageSetValue::cachedImageSet() to enable CORS-enabled fetch of
image-set images. This change is based on a similar patch for ordinary shape image values:
https://bugs.webkit.org/show_bug.cgi?id=123114.

Tests: fast/shapes/shape-inside/shape-inside-image-set.html
       fast/shapes/shape-outside-floats/shape-outside-image-set.html

* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::cachedImageSet):
* css/CSSImageSetValue.h:
* css/CSSParser.cpp:
(WebCore::CSSParser::parseShapeProperty):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyShape::applyValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::loadPendingImage):
(WebCore::StyleResolver::loadPendingShapeImage):
* css/StyleResolver.h:
* rendering/shapes/Shape.cpp:
(WebCore::Shape::createShape):

LayoutTests:

* fast/shapes/shape-inside/shape-inside-image-set-expected.html: Added.
* fast/shapes/shape-inside/shape-inside-image-set.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-image-set-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-image-set.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161980 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r161964 and r161965.
http://trac.webkit.org/changeset/161964
http://trac.webkit.org/changeset/161965
https://bugs.webkit.org/show_bug.cgi?id=126988

Tests do not pass on the bots because of slight color
differences. The tests should be redone with squared results
and blending that leads to stable colors. (Requested by krit_
on #webkit).

Source/WebCore:

* platform/graphics/CrossfadeGeneratedImage.cpp:
(WebCore::CrossfadeGeneratedImage::draw):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::drawPatternForContainer):
* svg/graphics/SVGImage.h:
* svg/graphics/SVGImageForContainer.cpp:
(WebCore::SVGImageForContainer::drawPattern):

LayoutTests:

* css3/compositing/background-blend-mode-crossfade-image-expected.html: Removed.
* css3/compositing/background-blend-mode-crossfade-image.html: Removed.
* css3/compositing/background-blend-mode-data-uri-svg-image-expected.html: Removed.
* css3/compositing/background-blend-mode-data-uri-svg-image.html: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161981 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r161978.
http://trac.webkit.org/changeset/161978
https://bugs.webkit.org/show_bug.cgi?id=126992

Test case causes crash on some hardware (Requested by bfulgham
on #webkit).

Source/WebCore:

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::validateTexFuncLevel):

LayoutTests:

* fast/canvas/webgl/resources/webgl-test-utils.js:
(WebGLTestUtils):
* fast/canvas/webgl/webgl-compressed-texture-size-limit-expected.txt: Removed.
* fast/canvas/webgl/webgl-compressed-texture-size-limit.html: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161982 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Win] Application name in user agent string is truncated.
https://bugs.webkit.org/show_bug.cgi?id=126810

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-01-14
Reviewed by Anders Carlsson.

* wtf/text/StringConcatenate.h:
(WTF::tryMakeString): Add missing 8 bit check for last argument.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161983 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GStreamer] Playback rate is not set when pipeline is not ready.
https://bugs.webkit.org/show_bug.cgi?id=126692

Patch by Piotr Grad <p.grad@samsung.com> on 2014-01-14
Reviewed by Philippe Normand.

No new tests. Covered by existing tests.

Added new method updatePlaybackRate which is called when playback rate change is possible.
Added m_lastPlaybackRate in order to retrieve last correct playback rate and notify upper
layers about that setting playback rate failed.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::updatePlaybackRate):
(WebCore::MediaPlayerPrivateGStreamer::setRate):
(WebCore::MediaPlayerPrivateGStreamer::updateStates):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161984 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move WKView.mm to WKViewIOS.mm as 161950 was supposed to do.

* UIProcess/API/ios/WKView.mm: Removed.
* UIProcess/API/ios/WKViewIOS.mm: Copied from UIProcess/API/ios/WKView.mm.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r160085): check-webkit-style: utf8' codec can't decode byte 0x89 in position 0: invalid start byte.
https://bugs.webkit.org/show_bug.cgi?id=126702

Patch by László Langó <llango.u-szeged@partner.samsung.com> on 2014-01-14
Reviewed by Alexey Proskuryakov.

Resolve regression and remove a FIXME comment that is already fixed.

* Scripts/webkitpy/common/system/filesystem.py:
(FileSystem.open_text_file_for_reading):
* Scripts/webkitpy/common/system/filesystem_unittest.py:
(RealFileSystemTest.test_read_and_write_file):
* Scripts/webkitpy/style/filereader.py:
(TextFileReader._read_lines):
* Scripts/webkitpy/style/filereader_unittest.py:
(TextFileReaderTest.test_count_delete_only_file):
(TextFileReaderTest):
(TextFileReaderTest.test_process_malformed_file):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161986 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash in WebCore::MediaSourcePrivateAVFObjC::hasAudio const + 13
https://bugs.webkit.org/show_bug.cgi?id=126768

Reviewed by Eric Carlson.

Null-check m_mediaSourcePrivate before calling.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::hasVideo):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::hasAudio):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161987 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add ENABLE(WEB_REPLAY) feature flag to the build system
https://bugs.webkit.org/show_bug.cgi?id=126949

Patch by Brian J. Burg <burg@cs.washington.edu> on 2014-01-14
Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

* wtf/FeatureDefines.h: for now, disable the flag by default.

Tools:

* Scripts/webkitperl/FeatureList.pm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161988 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Skip FontConfig initialization in WebKitTestRunner if requested
https://bugs.webkit.org/show_bug.cgi?id=120110

Reviewed by Martin Robinson.

Skip the FontConfig settings initialization in WebKitTestRunner if the
WEBKIT_SKIP_WEBKITTESTRUNNER_FONTCONFIG_INITIALIZATION environment variable is set.
This is useful when profiling the WebKitTestRunner execution, where at the startup
this step takes considerable amount of time and disturbs the profiling output.

* WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp:
(WTR::initializeFontConfigSetting):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161990 268f45cc-cd09-0410-ab3c-d52691b4dbfc
iOS WebKit2 build fixes, part 2

* WebKit2.xcodeproj/project.pbxproj:
Add some missing files.

* WebCore.exp.in:
Export some more symbols.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161991 268f45cc-cd09-0410-ab3c-d52691b4dbfc
iOS WebKit2 build fixes, part 3

* WebKit2.xcodeproj/project.pbxproj:
Remove some files from the 'All' target that should never have been a part of it.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161992 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Enable the experimental selector code generator by default
https://bugs.webkit.org/show_bug.cgi?id=126953

Reviewed by Gavin Barraclough.

* wtf/Platform.h:
Enable CSS_SELECTOR_JIT on OS X x86_64 by default.
The feature is not ready to ship but it is stable enough to enable
for the bots and nightly.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161993 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: For Remote Inspection link WebProcess's to their parent UIProcess
https://bugs.webkit.org/show_bug.cgi?id=126995

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-01-14
Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/remote/RemoteInspector.mm:
(Inspector::RemoteInspector::listingForDebuggable):
For each WebView, list the parent process. Listing the parent per WebView
is already supported back when we supported processes that could host WebViews
for multiple applications.

* inspector/remote/RemoteInspectorConstants.h:
Add a separate key for the bundle identifier, separate from application identifier.

* inspector/remote/RemoteInspectorDebuggable.cpp:
(Inspector::RemoteInspectorDebuggable::info):
* inspector/remote/RemoteInspectorDebuggable.h:
(Inspector::RemoteInspectorDebuggableInfo::RemoteInspectorDebuggableInfo):
(Inspector::RemoteInspectorDebuggableInfo::hasParentProcess):
If a RemoteInspectorDebuggable has a non-zero parent process identifier
it is a proxy for the parent process.

Source/WebCore:

* inspector/InspectorClient.h:
(WebCore::InspectorClient::parentProcessIdentifier):
Client method intended for WebKit2 so a WebProcess can link to its UIProcess.

* page/PageDebuggable.h:
* page/PageDebuggable.cpp:
(WebCore::PageDebuggable::parentProcessIdentifier):
Provide parent process identifier if there is one.

Source/WebKit2:

* WebProcess/WebCoreSupport/WebInspectorClient.h:
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::parentProcessIdentifier):
WebProcesses are proxies for a parent UIProcess.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161994 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore icon database appears to leak sudden termination assertions
<https://webkit.org/b/126971> / <rdar://problem/15808797>

Introduce an RAII wrapper around disableSuddenTermination / enableSuddenTermination
and adopt it in IconDatabase to address the incorrect management of sudden termination.

IconDatabase now owns up to two SuddenTerminationDisabler objects. One ensures that
sudden termination is disabled while we're waiting on the sync timer to fire. The second
ensures that sudden termination is disabled while we're waiting on the sync thread to
process any pending work.

Reviewed by Alexey Proskuryakov.

* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::IconDatabase):
(WebCore::IconDatabase::wakeSyncThread): Disable sudden termination until the sync thread
has finished this unit of work.
(WebCore::IconDatabase::scheduleOrDeferSyncTimer): Disable sudden termination until the
sync timer has fired.
(WebCore::IconDatabase::syncTimerFired): Clear the member variable to reenable sudden termination.
(WebCore::IconDatabase::syncThreadMainLoop): Taken ownership of the SuddenTerminationDisabler
instance when we start processing a unit of work. Discard the object when our work is complete.
* loader/icon/IconDatabase.h:
* platform/SuddenTermination.h:
(WebCore::SuddenTerminationDisabler::SuddenTerminationDisabler): Disable sudden termination when created.
(WebCore::SuddenTerminationDisabler::~SuddenTerminationDisabler): Enable it when destroyed.


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