Dashboard metrics page wastes a lot of time sorting iterations
https://bugs.webkit.org/show_bug.cgi?id=136559

Reviewed by Tim Horton.

Also fixes comments here and there, and adds a missing "var".

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
(BuildbotIteration.prototype._parseData):
(BuildbotIteration.prototype._updateWithData):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js:
(BuildbotQueue.prototype.loadAll):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsAnalyzer.js:
(Analyzer.prototype._countTimes):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173322 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Increase number of maximum active WebGL contexts.
https://bugs.webkit.org/show_bug.cgi?id=136551.
<rdar://problem/18236425>

Reviewed by Brent Fulgham.

Test covered by Khronos conformance test:
webgl/1.0.2/conformance/context/context-creation-and-destruction.html

* platform/graphics/mac/GraphicsContext3DMac.mm:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173323 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IDB version changed events should have a valid eventType()
https://bugs.webkit.org/show_bug.cgi?id=136583

Reviewed by Brady Eidson.

IDBDatabase::dispatchEvent() asserts that the event type is versionchangeEvent,
but the version changed event created with an empty event type. Correct this.

* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::onVersionChange):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173324 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CTTE: SVGResourcesCache should only allow RenderElements.
<https://webkit.org/b/136578>

Only RenderElement subclasses can use SVG resources.
Codify this by making SVGResourcesCache::m_cache keyed on RenderElement.

Reviewed by Antti Koivisto.

* rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::selfWillPaint):
* rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::imageChanged):
* rendering/svg/RenderSVGResource.cpp:
(WebCore::requestPaintingResource):
(WebCore::removeFromCacheAndInvalidateDependencies):
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::applyClippingToContext):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::paintReplaced):
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::shouldGenerateMarkerPositions):
(WebCore::RenderSVGShape::markerRect):
(WebCore::RenderSVGShape::drawMarkers):
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::invalidateResourcesOfChildren):
(WebCore::SVGRenderSupport::intersectRepaintRectWithResources):
(WebCore::SVGRenderSupport::filtersForceContainerLayout):
(WebCore::SVGRenderSupport::pointInClippingArea):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::prepareToRenderSVGContent):
* rendering/svg/SVGResourcesCache.cpp:
(WebCore::resourcesCacheFromRenderer):
(WebCore::SVGResourcesCache::cachedResourcesForRenderer):
(WebCore::SVGResourcesCache::clientLayoutChanged):
(WebCore::SVGResourcesCache::clientDestroyed):
(WebCore::SVGResourcesCache::resourceDestroyed):
(WebCore::SVGResourcesCache::cachedResourcesForRenderObject): Deleted.
* rendering/svg/SVGResourcesCache.h:
* rendering/svg/SVGResourcesCycleSolver.cpp:
(WebCore::SVGResourcesCycleSolver::resourceContainsCycles):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173325 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore should build with newer clang
<http://webkit.org/b/136002>
<rdar://problem/18020616>

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Other than the JSC::SourceProvider::asID() change (which simply
removes code that the optimizing compiler would have discarded
in Release builds), we move the |this| checks in OpaqueJSString
to NULL checks in to JSBase, JSObjectRef, JSScriptRef,
JSStringRef{CF} and JSValueRef.

Note that the following function arguments are _not_ NULL-checked
since doing so would just cover up bugs (and were not needed to
prevent any tests from failing):
- |script| in JSEvaluateScript(), JSCheckScriptSyntax();
- |body| in JSObjectMakeFunction();
- |source| in JSScriptCreateReferencingImmortalASCIIText()
  (which is a const char* anyway);
- |source| in JSScriptCreateFromString().

* API/JSBase.cpp:
(JSEvaluateScript): Add NULL check for |sourceURL|.
(JSCheckScriptSyntax): Ditto.
* API/JSObjectRef.cpp:
(JSObjectMakeFunction): Ditto.
* API/JSScriptRef.cpp:
(JSScriptCreateReferencingImmortalASCIIText): Ditto.
(JSScriptCreateFromString): Add NULL check for |url|.
* API/JSStringRef.cpp:
(JSStringGetLength): Return early if NULL pointer is passed in.
(JSStringGetCharactersPtr): Ditto.
(JSStringGetUTF8CString): Ditto.  Also check |buffer| parameter.
* API/JSStringRefCF.cpp:
(JSStringCopyCFString): Ditto.
* API/JSValueRef.cpp:
(JSValueMakeString): Add NULL check for |string|.

* API/OpaqueJSString.cpp:
(OpaqueJSString::string): Remove code that checks |this|.
(OpaqueJSString::identifier): Ditto.
(OpaqueJSString::characters): Ditto.
* API/OpaqueJSString.h:
(OpaqueJSString::is8Bit): Remove code that checks |this|.
(OpaqueJSString::characters8): Ditto.
(OpaqueJSString::characters16): Ditto.
(OpaqueJSString::length): Ditto.

* parser/SourceProvider.h:
(JSC::SourceProvider::asID): Remove code that checks |this|.

Source/WebKit2:

* Shared/API/c/WKString.cpp:
(WKStringCreateWithJSString): Add NULL check to prevent
WebKitTestRunner crashes that relied on the previous |this|
behavior where NULL values were allowed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173326 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WinCairo] jsc.exe won't run.
https://bugs.webkit.org/show_bug.cgi?id=136481

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-09-05
Reviewed by Alex Christensen.

We need to define WIN_CAIRO to avoid looking for the AAS folder.

* JavaScriptCore.vcxproj/jsc/DLLLauncherWinCairo.props: Added.
* JavaScriptCore.vcxproj/jsc/jscLauncher.vcxproj:
* JavaScriptCore.vcxproj/testRegExp/testRegExpLauncher.vcxproj:
* JavaScriptCore.vcxproj/testapi/testapiCommonCFLite.props:
* JavaScriptCore.vcxproj/testapi/testapiLauncher.vcxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173327 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update the current matching of :read-only and :read-write to the latest spec
https://bugs.webkit.org/show_bug.cgi?id=136566

Reviewed by Antti Koivisto.

Source/WebCore:

WebKit's implementation of :read-only and :read-write dated from 2008 and
it was based on the web form spec (http://www.w3.org/TR/web-forms-2/).
That spec is very dead now.

There are new definitions of :read-only and :read-write in three specs:
-the HTML living spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting.html#selector-read-only
-Selectors level 4: http://dev.w3.org/csswg/selectors4/#rw-pseudos
-CSS 3 UI: http://www.w3.org/TR/css3-ui/

All the definitions say about the same thing. The definitions of Selector Level 4 and
CSS 3 UI are very vague and poorly worded. I used the HTML when something was ambiguous.

In the new definitions, :read-only and :read-write are opposite. It is no longer possible to
match both selector simultaneously for the same element.
Consequently, I got rid of Element:matchesReadOnlyPseudoClass(). Matching :read-only is now equivalent
to :not(:read-write).

The existing definition of :read-write was matching the spec so I could reuse that.

There is one more part to the new spec that is not addressed here: the pseudo class :read-write should
now also match arbitrary editable HTMLElement (e.g. an element with contenteditable). This will be fixed
in a follow up.

Tests: fast/css/read-only-read-write-input-basics.html
       fast/css/read-only-read-write-textarea-basics.html
       fast/selectors/read-only-read-write-input-basics.html
       fast/selectors/read-only-read-write-input-in-fieldset.html
       fast/selectors/read-only-read-write-textarea-basics.html
       fast/selectors/read-only-read-write-textarea-in-fieldset.html

* css/SelectorCheckerTestFunctions.h:
(WebCore::matchesReadOnlyPseudoClass):
* dom/Element.cpp:
(WebCore::Element::matchesReadOnlyPseudoClass): Deleted.
* dom/Element.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::matchesReadOnlyPseudoClass): Deleted.
* html/HTMLInputElement.h:
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::matchesReadOnlyPseudoClass): Deleted.
* html/HTMLTextAreaElement.h:
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::matchesReadOnlyPseudoClass): Deleted.
* html/shadow/SliderThumbElement.h:
* html/shadow/SpinButtonElement.cpp:
(WebCore::SpinButtonElement::matchesReadOnlyPseudoClass): Deleted.
* html/shadow/SpinButtonElement.h:
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::isReadOnlyControl):

LayoutTests:

* fast/css/readonly-pseudoclass-opera-005.html:
This was one of the original test.
With the new definition, input[type=radio] is always :read-only.

* fast/forms/input-live-pseudo-selectors-expected.txt:
* fast/forms/resources/input-live-pseudo-selectors.js:
* fast/forms/resources/live-pseudo-selectors.css:
(:read-only): Deleted.
* fast/forms/resources/select-live-pseudo-selectors.js:
* fast/forms/resources/textarea-live-pseudo-selectors.js:
* fast/forms/textarea-live-pseudo-selectors-expected.txt:
Those various tests were mostly testing form validation. The selectors
for :read-only and :read-write were in the way of testing.

They were only 3 cases tested and they are covered by the new tests.

* fast/css/read-only-read-write-input-basics-expected.html: Added.
* fast/css/read-only-read-write-input-basics.html: Added.
* fast/css/read-only-read-write-textarea-basics-expected.html: Added.
* fast/css/read-only-read-write-textarea-basics.html: Added.
* fast/selectors/read-only-read-write-input-basics-expected.txt: Added.
* fast/selectors/read-only-read-write-input-basics.html: Added.
* fast/selectors/read-only-read-write-input-in-fieldset-expected.txt: Added.
* fast/selectors/read-only-read-write-input-in-fieldset.html: Added.
* fast/selectors/read-only-read-write-textarea-basics-expected.txt: Added.
* fast/selectors/read-only-read-write-textarea-basics.html: Added.
* fast/selectors/read-only-read-write-textarea-in-fieldset-expected.txt: Added.
* fast/selectors/read-only-read-write-textarea-in-fieldset.html: Added.
New tests covering basic features for <input> and <textarea>. The definition for
other editable content is ignored for now.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173328 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Curl] Compile error.
https://bugs.webkit.org/show_bug.cgi?id=136574

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-09-05
Reviewed by Alex Christensen.

The ResourceResponse::setSuggestedFilename method is no longer available.

* platform/network/curl/CurlCacheEntry.cpp:
(WebCore::CurlCacheEntry::setResponseFromCachedHeaders):
* platform/network/curl/CurlDownload.cpp:
(WebCore::CurlDownload::didReceiveHeader):
* platform/network/curl/MultipartHandle.cpp:
(WebCore::MultipartHandle::didReceiveResponse):
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::headerCallback):
* platform/network/curl/ResourceResponse.h:
(WebCore::ResourceResponse::platformSuggestedFilename):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173329 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ARM32 iOS: JSC Test math.js fails
https://bugs.webkit.org/show_bug.cgi?id=136261

Reviewed by Geoffrey Garen.

Split out the failing tests to a new test script math-denorm.js.  Added check
at the top of the new file to skip the tests when running on ARM for iOS.

* js/math-denorm-expected.txt: Added.
* js/math-expected.txt:
* js/script-tests/math-denorm.js: Added.
* js/script-tests/math.js:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173330 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[SOUP] Implement ResourceResponse::platformSuggestedFilename() when USE(SOUP) is enabled.
https://bugs.webkit.org/show_bug.cgi?id=136562

Reviewed by Martin Robinson.

Source/WebCore:

No new tests, this makes existing tests pass.

* platform/network/soup/ResourceResponseSoup.cpp:
(WebCore::ResourceResponse::platformSuggestedFilename):
Implement ResourceResponse::platformSuggestedFilename() for SOUP after r173272, r173301 and r173305.

Tools:

* Scripts/run-gtk-tests:
(TestRunner): Remove failure expectations for tests that now pass.

LayoutTests:

* platform/gtk/TestExpectations: Remove failure expectations for tests that now pass.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173331 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Buildbot metrics page gives wrong results after a new bot gets added
https://bugs.webkit.org/show_bug.cgi?id=136516

Reviewed by Tim Horton.

Part 2: Fix elapsed times.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsAnalyzer.js:
(Analyzer.prototype._countTimes): Made lastTestedRevisionByQueue contain undefined values
until the first build in a queue. This happens to work as needed with _fullyTestedRevisionNumber().



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