WebKit-https.git
3 years agoMarking fast/replaced/preferred-widths.html as flaky on ios-simulator
ryanhaddad@apple.com [Mon, 1 Feb 2016 21:31:34 +0000 (21:31 +0000)]
Marking fast/replaced/preferred-widths.html as flaky on ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=153311

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

3 years agoSkip fast/shadow-dom/touch-event-ios.html on ios-simulator since touch events are...
ryanhaddad@apple.com [Mon, 1 Feb 2016 21:25:00 +0000 (21:25 +0000)]
Skip fast/shadow-dom/touch-event-ios.html on ios-simulator since touch events are not supported.
https://bugs.webkit.org/show_bug.cgi?id=149592

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

3 years agoSnapshot surfaces are forever wired after being compressed
timothy_horton@apple.com [Mon, 1 Feb 2016 20:47:10 +0000 (20:47 +0000)]
Snapshot surfaces are forever wired after being compressed
https://bugs.webkit.org/show_bug.cgi?id=153751
<rdar://problem/24354546>

Reviewed by Darin Adler.

* platform/graphics/cocoa/IOSurface.mm:
(IOSurface::convertToFormat):
Allow IOSurfaceAccelerator to unwire surfaces after they're transformed.

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

3 years ago<rdar://problem/20150072> [iOS] Remove some file upload code only needed before iOS 9
mitz@apple.com [Mon, 1 Feb 2016 20:23:41 +0000 (20:23 +0000)]
<rdar://problem/20150072> [iOS] Remove some file upload code only needed before iOS 9
https://bugs.webkit.org/show_bug.cgi?id=153754

Reviewed by Darin Adler.

Source/WebCore:

* English.lproj/Localizable.strings: Updated for removal of WebKit2 string.

Source/WebKit2:

* Platform/spi/ios/UIKitSPI.h: Removed conditional forward declaration of SPI.

* UIProcess/ios/forms/WKFileUploadPanel.mm:
(photoLibraryIcon): Removed check for HAVE_WEBKIT_DOC_PICKER_ICONS, which is always true in
  iOS 9 and later.
(cameraIcon): Ditto.
(-[WKFileUploadPanel presentWithParameters:resultListener:]): Removed branch for when
  UIDocumentMenuViewController doesn’t respond to
  -_initIgnoringApplicationEntitlementForImportOfTypes:.
(-[WKFileUploadPanel _showMediaSourceSelectionSheet]): Deleted now-unused method.

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

3 years agoCache the Path instead of creating it every time it is required
commit-queue@webkit.org [Mon, 1 Feb 2016 19:45:18 +0000 (19:45 +0000)]
Cache the Path instead of creating it every time it is required
https://bugs.webkit.org/show_bug.cgi?id=152939

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2016-02-01
Reviewed by Darin Adler.

Source/WebCore:

Instead of creating the Path object every time it is required, we should
cache it in an LRU cache. TinyLRUCache returns a reference to the cached
entry so we do not have to pay the cost of copying it either.

* platform/graphics/FloatRoundedRect.h:
(WebCore::operator!=):
Implement the inequality operator for FloatRoundedRect since it is
called by TinyLRUCache.

* rendering/ClipPathOperation.h:
Return a reference to the path in the cache since instead of creating a
new copy.

* rendering/style/BasicShapes.cpp:
(WebCore::SVGPathTranslatedByteStream::SVGPathTranslatedByteStream):
(WebCore::SVGPathTranslatedByteStream::operator==):
(WebCore::SVGPathTranslatedByteStream::operator!=):
(WebCore::SVGPathTranslatedByteStream::isEmpty):
(WebCore::SVGPathTranslatedByteStream::path):
This struct holds an offset and an SVGPathByteStream. It is the key of
the LRU cache for the the translated SVGPathByteStream.

(WebCore::EllipsePathPolicy::isKeyNull):
(WebCore::EllipsePathPolicy::createValueForKey):
(WebCore::RoundedRectPathPolicy::isKeyNull):
(WebCore::RoundedRectPathPolicy::createValueForKey):
(WebCore::PolygonPathPolicy::isKeyNull):
(WebCore::PolygonPathPolicy::createValueForKey):
(WebCore::TranslatedByteStreamPathPolicy::isKeyNull):
(WebCore::TranslatedByteStreamPathPolicy::createValueForKey):
Inherit from the LRU cache policy template, so have a specific name for
the desired path contents and pass this class explicitly to the LRU cache
template.

(WebCore::cachedEllipsePath):
(WebCore::cachedRoundedRectPath):
(WebCore::cachedPolygonPath):
(WebCore::cachedTranslatedByteStreamPath):
Return a cached path object for specific path contents.

(WebCore::BasicShapeCircle::path):
(WebCore::BasicShapeEllipse::path):
(WebCore::BasicShapePolygon::path):
(WebCore::BasicShapePath::path):
(WebCore::BasicShapeInset::path):
Get the Path object from the cache; create a new one if it does not exist.

* rendering/style/BasicShapes.h:
Change the prototype of the path() function to return a reference to the
path in the cache instead of a having to copying it.

* svg/SVGPathByteStream.h:
(WebCore::SVGPathByteStream::operator!=):
Implement the inequality operator for SVGPathByteStream because it is
called by TinyLRUCache.

Source/WTF:

If the key type of an LRU cache can't to be strongly tided to a specific
data type; e.g. FloatRect -> Path, we need to be able to pass the policy
type to the TinyLRUCache template instead of just specializing it. This
will make the code more readable and will allow different caches for the
same key type.

* wtf/TinyLRUCache.h:
(WebCore::TinyLRUCache::get):

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

3 years agoMove properties that use custom bindings to the prototype
cdumez@apple.com [Mon, 1 Feb 2016 19:42:14 +0000 (19:42 +0000)]
Move properties that use custom bindings to the prototype
https://bugs.webkit.org/show_bug.cgi?id=153735

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline several W3C tests now that more checks are passing.

* web-platform-tests/dom/interfaces-expected.txt:
* web-platform-tests/html/dom/interfaces-expected.txt:
* web-platform-tests/XMLHttpRequest/interfaces-expected.txt:

Source/WebCore:

Move properties that use custom bindings to the prototype. Whether a
property's bindings code is generated or custom-written should not
impact where the property is located.

No new tests, already covered by existing tests.

* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::getOwnPropertySlot):
Add null-check for staticPropHashTable. HTMLDocument no longer has
any property on the instance so staticPropHashTable is now null.

* bindings/scripts/CodeGeneratorJS.pm:

LayoutTests:

Rebaseline / update existing tests now that properties using custom
bindings are on the prototype, as expected.

* fast/mediastream/MediaStream-video-element-expected.txt:
* fast/xmlhttprequest/xmlhttprequest-properties-prototype-expected.txt:
* inspector/model/remote-object-get-properties-expected.txt:
* js/dom/dom-attributes-on-mismatch-type-expected.txt:
* js/dom/dom-attributes-on-mismatch-type.html:
* platform/mac/inspector/model/remote-object-expected.txt:

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

3 years ago[Win] WTFHeaderDetection.h no longer needed
achristensen@apple.com [Mon, 1 Feb 2016 19:05:43 +0000 (19:05 +0000)]
[Win] WTFHeaderDetection.h no longer needed
https://bugs.webkit.org/show_bug.cgi?id=153753
rdar://problem/24434627

Reviewed by Darin Adler.

.:

* Source/cmake/WebKitFS.cmake:

Source/WTF:

* wtf/Platform.h:
* wtf/PlatformWin.cmake:

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

3 years agoWeb Inspector: Rendering Frames timeline draws all frame bars at minimum height
mattbaker@apple.com [Mon, 1 Feb 2016 18:24:40 +0000 (18:24 +0000)]
Web Inspector: Rendering Frames timeline draws all frame bars at minimum height
https://bugs.webkit.org/show_bug.cgi?id=153736
<rdar://problem/21946301>

Reviewed by Timothy Hatcher.

* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
Update the new timeline overview's height before it's shown. Showing the
overview causes the rendering frames graph to do a layout, which requires
the height of the containing view to be a valid value.

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

3 years agoWeb Inspector: DataGridNode should support adding go-to arrow buttons to any cell
mattbaker@apple.com [Mon, 1 Feb 2016 18:22:37 +0000 (18:22 +0000)]
Web Inspector: DataGridNode should support adding go-to arrow buttons to any cell
https://bugs.webkit.org/show_bug.cgi?id=153733
<rdar://problem/24431813>

Reviewed by Brian Burg.

Provide a way to add go-to arrow buttons to any grid cell from within a
DataGridNode subclass's implementation of createCellContent.

* UserInterface/Views/DataGrid.js:
New event type, GoToArrowClicked.
(WebInspector.DataGridNode.prototype.createGoToArrowButton.buttonClicked):
(WebInspector.DataGridNode.prototype.createGoToArrowButton):
Adds a go-to arrow button to the cell's content element. Clicking the button
dispatches an event on the DataGrid, with event data containing the
DataGridNode and identifier of the cell containing the arrow button.

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

3 years agoREGRESSION(r195770): Use-after-free in ResourceLoaderOptions::cachingPolicy
jer.noble@apple.com [Mon, 1 Feb 2016 18:15:25 +0000 (18:15 +0000)]
REGRESSION(r195770): Use-after-free in ResourceLoaderOptions::cachingPolicy
https://bugs.webkit.org/show_bug.cgi?id=153727
<rdar://problem/24429886>

Reviewed by Chris Dumez.

The `this` object may be freed after calling deleteIfPossible(). Make the early-return-if-
deleted more explicit, and only check allowsCaching() after the deleteIfPossible() return
value check.

* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::removeClient):

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

3 years agoStop linking to PassKit
andersca@apple.com [Mon, 1 Feb 2016 17:56:58 +0000 (17:56 +0000)]
Stop linking to PassKit
https://bugs.webkit.org/show_bug.cgi?id=153746

Reviewed by Tim Horton.

* Configurations/WebKit.xcconfig:

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

3 years ago[Cocoa] Get rid of WK_ macros for initializers
mitz@apple.com [Mon, 1 Feb 2016 17:53:37 +0000 (17:53 +0000)]
[Cocoa] Get rid of WK_ macros for initializers
https://bugs.webkit.org/show_bug.cgi?id=153744

Reviewed by Anders Carlsson.

* Shared/API/Cocoa/WKFoundation.h: Removed definitions of WK_DESIGNATED_INITIALIZER and
  WK_UNAVAILABLE.

* mac/postprocess-framework-headers.sh: Removed rules for rewriting the above macros. Also
  removed Foundation import that became unnecessary, and definitions that were only needed
  before iOS 8.

Replaced instances of the above macros with their expansions.

* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
* UIProcess/API/Cocoa/WKSecurityOrigin.h:
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebsiteDataStore.h:

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

3 years agoImprovements to botwatcher's dashboard unit tests.
jmarcell@apple.com [Mon, 1 Feb 2016 17:02:38 +0000 (17:02 +0000)]
Improvements to botwatcher's dashboard unit tests.
https://bugs.webkit.org/show_bug.cgi?id=153621

Reviewed by Darin Adler.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/PopoverTracker.js:
(PopoverTracker): Retain a reference to the PopoverTracker so that we can make assertions about it in the unit tests.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/MockTrac.js:
(MockTrac): Changing revision 33019 to be on a different branch so that _appendPendingRevisionCount and
_popoverLinesForCommitRange have to traverse commits from different branches.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/tests.js: Changing equal to strictEqual
in unit test for _appendPendingRevisionCount. Also added assertions for Popover in test for
_revisionContentWithPopoverForIteration.

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

3 years agoRefactor to add event listeners and start periodic updates for all trac instances.
jmarcell@apple.com [Mon, 1 Feb 2016 17:01:56 +0000 (17:01 +0000)]
Refactor to add event listeners and start periodic updates for all trac instances.
https://bugs.webkit.org/show_bug.cgi?id=153609

Reviewed by Darin Adler.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:
(BuildbotQueueView): Adding event listeners for all trac instances.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Main.js: Starting periodic updates
for all trac instances.

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

3 years agoTried to fix a build after r195899.
mitz@apple.com [Mon, 1 Feb 2016 16:00:55 +0000 (16:00 +0000)]
Tried to fix a build after r195899.

* dom/EventContext.h: Enabled TouchEventContext type trait specialization on iOS.

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

3 years agoUnreviewed. Updating global-constructors-attributes expectations after introducing...
youenn.fablet@crf.canon.fr [Mon, 1 Feb 2016 12:33:22 +0000 (12:33 +0000)]
Unreviewed. Updating global-constructors-attributes expectations after introducing Request in r195954.

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

3 years agoOne more unreviewed speculative buildfix after r195755.
ossy@webkit.org [Mon, 1 Feb 2016 12:31:44 +0000 (12:31 +0000)]
One more unreviewed speculative buildfix after r195755.

* PlatformMac.cmake:

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

3 years agoUnreviewed speculative buildfix after r195755.
ossy@webkit.org [Mon, 1 Feb 2016 12:19:23 +0000 (12:19 +0000)]
Unreviewed speculative buildfix after r195755.

* PlatformMac.cmake:

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

3 years agoUnreviewed speculative buildfix.
ossy@webkit.org [Mon, 1 Feb 2016 11:26:50 +0000 (11:26 +0000)]
Unreviewed speculative buildfix.

* dfg/DFGCommon.h: FTL_USES_B3 should be false if FTL JIT is disabled.

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

3 years agoUnreviewed speculative buildfix after r195795.
ossy@webkit.org [Mon, 1 Feb 2016 11:20:19 +0000 (11:20 +0000)]
Unreviewed speculative buildfix after r195795.

* PlatformMac.cmake: Remove Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm.

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

3 years ago[Fetch API] Implement Fetch API Request
youenn.fablet@crf.canon.fr [Mon, 1 Feb 2016 11:05:39 +0000 (11:05 +0000)]
[Fetch API] Implement Fetch API Request
https://bugs.webkit.org/show_bug.cgi?id=153437

LayoutTests/imported/w3c:

Reviewed by Darin Adler.

* web-platform-tests/fetch/api/headers/headers-basic.html:
* web-platform-tests/fetch/api/request/request-clone.sub-expected.txt: Added.
* web-platform-tests/fetch/api/request/request-clone.sub.html: Added.
* web-platform-tests/fetch/api/request/request-consume-expected.txt: Added.
* web-platform-tests/fetch/api/request/request-consume.html: Added.
* web-platform-tests/fetch/api/request/request-disturbed-expected.txt: Added.
* web-platform-tests/fetch/api/request/request-disturbed.html: Added.
* web-platform-tests/fetch/api/request/request-error-expected.txt: Added.
* web-platform-tests/fetch/api/request/request-error.html: Added.
* web-platform-tests/fetch/api/request/request-headers-expected.txt: Added.
* web-platform-tests/fetch/api/request/request-headers.html: Added.
* web-platform-tests/fetch/api/request/request-idl-expected.txt: Added.
* web-platform-tests/fetch/api/request/request-idl.html: Added.
* web-platform-tests/fetch/api/request/request-init-001.sub-expected.txt: Added.
* web-platform-tests/fetch/api/request/request-init-001.sub.html: Added.
* web-platform-tests/fetch/api/request/request-init-002-expected.txt: Added.
* web-platform-tests/fetch/api/request/request-init-002.html: Added.
* web-platform-tests/fetch/api/request/request-init-003.sub-expected.txt: Added.
* web-platform-tests/fetch/api/request/request-init-003.sub.html: Added.
* web-platform-tests/fetch/api/request/request-structure-expected.txt: Added.
* web-platform-tests/fetch/api/request/request-structure.html: Added.
* web-platform-tests/fetch/api/resources/authentication.py: Added.
(main):
* web-platform-tests/fetch/api/resources/clean-stash.py: Added.
(main):
* web-platform-tests/fetch/api/resources/inspect-headers.py: Added.
(main):
* web-platform-tests/fetch/api/resources/method.py: Added.
(main):
* web-platform-tests/fetch/api/resources/preflight.py: Added.
(main):
* web-platform-tests/fetch/api/resources/redirect.py: Added.
(main):
* web-platform-tests/fetch/api/resources/top.txt: Added.
* web-platform-tests/fetch/api/resources/trickle.py: Added.
(main):
* web-platform-tests/fetch/api/resources/utils.js: Added.
(catch):
(dirname):
(checkRequest):
(readTextStream):

Source/WebCore:

Added support for Fetch Request and Body.
Body is sharing functionality between Request and Response.
Conversion between various body types are not implemented yet.

Added a FetchOptions class. Options in this class are partially redundant with ResourceLoaderOptions.

Fixing bug in Headers constructor.
Making error reporting in case of modifying headers compliant with the spec.

Reviewed by Darin Adler.

Tests: imported/w3c/web-platform-tests/fetch/api/request/request-clone.sub.html
       imported/w3c/web-platform-tests/fetch/api/request/request-consume.html
       imported/w3c/web-platform-tests/fetch/api/request/request-disturbed.html
       imported/w3c/web-platform-tests/fetch/api/request/request-error.html
       imported/w3c/web-platform-tests/fetch/api/request/request-headers.html
       imported/w3c/web-platform-tests/fetch/api/request/request-idl.html
       imported/w3c/web-platform-tests/fetch/api/request/request-init-001.sub.html
       imported/w3c/web-platform-tests/fetch/api/request/request-init-002.html
       imported/w3c/web-platform-tests/fetch/api/request/request-init-003.sub.html
       imported/w3c/web-platform-tests/fetch/api/request/request-structure.html

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* Modules/fetch/FetchBody.cpp: Added.
(WebCore::FetchBody::initBody):
(WebCore::FetchBody::clear):
(WebCore::FetchBody::processIfEmptyOrDisturbed):
(WebCore::FetchBody::arrayBuffer):
(WebCore::FetchBody::formData):
(WebCore::FetchBody::blob):
(WebCore::FetchBody::text):
(WebCore::FetchBody::json):
* Modules/fetch/FetchBody.h: Added.
(WebCore::FetchBody::~FetchBody):
(WebCore::FetchBody::isEmpty):
(WebCore::FetchBody::isDisturbed):
(WebCore::FetchBody::setDisturbed):
(WebCore::FetchBody::setMimeType):
(WebCore::FetchBody::mimeType):
* Modules/fetch/FetchBody.idl: Added.
* Modules/fetch/FetchHeaders.cpp:
(WebCore::canWriteHeader):
(WebCore::FetchHeaders::append):
(WebCore::FetchHeaders::remove):
(WebCore::FetchHeaders::set):
(WebCore::FetchHeaders::fill): Helper routine implementing https://fetch.spec.whatwg.org/#concept-headers-fill
* Modules/fetch/FetchHeaders.h: Adding header getter/setter for FetchRequest.
(WebCore::FetchHeaders::fastGet):
(WebCore::FetchHeaders::fastSet):
* Modules/fetch/FetchHeaders.js: Fixing bug in constructor (covered by modified headers-basc.html test).
(initializeFetchHeaders):
* Modules/fetch/FetchOptions.h: Added.
(WebCore::FetchOptions::FetchOptions):
(WebCore::FetchOptions::type):
(WebCore::FetchOptions::destination):
(WebCore::FetchOptions::mode):
(WebCore::FetchOptions::credentials):
(WebCore::FetchOptions::cache):
(WebCore::FetchOptions::redirect):
(WebCore::FetchOptions::referrerPolicy):
(WebCore::FetchOptions::setType):
(WebCore::FetchOptions::setDestination):
(WebCore::FetchOptions::setMode):
(WebCore::FetchOptions::setCredentials):
(WebCore::FetchOptions::setCache):
(WebCore::FetchOptions::setRedirect):
(WebCore::FetchOptions::setReferrerPolicy):
* Modules/fetch/FetchRequest.cpp: Added.
(WebCore::FetchRequest::create):
(WebCore::FetchRequest::FetchRequest):
(WebCore::FetchRequest::init):
(WebCore::FetchRequest::setReferrer):
(WebCore::FetchRequest::setReferrerPolicy):
(WebCore::FetchRequest::setMode):
(WebCore::FetchRequest::setCredentials):
(WebCore::FetchRequest::setCache):
(WebCore::FetchRequest::setRedirect):
(WebCore::FetchRequest::type):
(WebCore::FetchRequest::destination):
(WebCore::FetchRequest::referrerPolicy):
(WebCore::FetchRequest::referrer):
(WebCore::FetchRequest::mode):
(WebCore::FetchRequest::credentials):
(WebCore::FetchRequest::cache):
(WebCore::FetchRequest::redirect):
(WebCore::FetchRequest::setMethod):
(WebCore::FetchRequest::clone):
* Modules/fetch/FetchRequest.h: Added.
(WebCore::FetchRequest::method):
(WebCore::FetchRequest::url):
(WebCore::FetchRequest::integrity):
(WebCore::FetchRequest::headers):
* Modules/fetch/FetchRequest.idl: Added.
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/Dictionary.h:
(WebCore::Dictionary::execState):
* bindings/js/JSDictionary.cpp:
(WebCore::JSDictionary::convertValue):
* bindings/js/JSDictionary.h:
(WebCore::JSDictionary::get):

LayoutTests:

Reviewed by Darin Adler.

* js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
* js/dom/global-constructors-attributes-expected.txt:
* platform/efl/js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
* platform/efl/js/dom/global-constructors-attributes-expected.txt:
* platform/gtk/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
* platform/win/js/dom/global-constructors-attributes-expected.txt:

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

3 years agoAdd resize event for HTMLMediaElement
commit-queue@webkit.org [Mon, 1 Feb 2016 06:34:07 +0000 (06:34 +0000)]
Add resize event for HTMLMediaElement
https://bugs.webkit.org/show_bug.cgi?id=125715

Patch by Jeremy Jones <jeremyj@apple.com> on 2016-01-31
Reviewed by Darin Adler.
LayoutTests/imported/w3c:

Rebaselined test after moving 'resize' from DOMWindow.idl to GlobalEventHandlers.idl
per https://html.spec.whatwg.org/multipage/webappapis.html#globaleventhandlers

* web-platform-tests/html/dom/interfaces-expected.txt:

Source/WebCore:

Tests: http/tests/media/hls/hls-video-resize.html
       media/video-resize.html

Move resize javascript event from DOMWindow.idl to GlobalEventHandlers.idl
per https://html.spec.whatwg.org/multipage/webappapis.html#globaleventhandlers

Post resize event from video element when metadata loads and when content size changes.

* dom/GlobalEventHandlers.idl: Add onresize.
* html/HTMLElement.cpp:
(WebCore::HTMLElement::createEventHandlerNameMap): Add onresizeAttr.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setReadyState):
(WebCore::HTMLMediaElement::mediaPlayerSizeChanged):
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::scheduleResizeEvent):
(WebCore::HTMLMediaElement::scheduleResizeEventIfSizeChanged):
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::scheduleResizeEvent): Sechedule event.
(WebCore::HTMLVideoElement::scheduleResizeEventIfSizeChanged): Schedule event if size has changed.
* html/HTMLVideoElement.h: Add declarations.
* page/DOMWindow.idl: Remove onresize.

Source/WebInspectorUI:

Add a display name for "resize" event.

* UserInterface/Models/ScriptTimelineRecord.js:
(WebInspector.ScriptTimelineRecord.EventType.displayName):

LayoutTests:

Update test for change: move resize javascript event from DOMWindow.idl to GlobalEventHandlers.idl
per https://html.spec.whatwg.org/multipage/webappapis.html#globaleventhandlers

* fast/dom/event-handler-attributes-expected.txt: Rebaselined.
* fast/dom/event-handler-attributes.html:
    Move resize from uniqueWindowEvents to eventsInGlobalEventHandlers.
* http/tests/media/hls/hls-video-resize-expected.txt: Added.
* http/tests/media/hls/hls-video-resize.html: Added.
* js/dom/dom-static-property-for-in-iteration-expected.txt: Rebaselined.
* media/video-resize-expected.txt: Added.
* media/video-resize.html: Added.
* media/video-test.js:
(requiredEvents): Deleted global. Value is now captured by closure.
(waitForEventsAndCall): Remove dependence on global variable, and fix event observation leak.

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

3 years agoRevert accidental behavior change from previous patch.
darin@apple.com [Mon, 1 Feb 2016 05:51:48 +0000 (05:51 +0000)]
Revert accidental behavior change from previous patch.

* platform/URL.cpp:
(WebCore::mimeTypeFromDataURL): Restore behavior where an empty MIME type would
be turned into "text/plain".

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

3 years agoCut down on calls to String::lower; mostly replace with convertToASCIILowercase
darin@apple.com [Mon, 1 Feb 2016 05:46:20 +0000 (05:46 +0000)]
Cut down on calls to String::lower; mostly replace with convertToASCIILowercase
https://bugs.webkit.org/show_bug.cgi?id=153732

Reviewed by Dean Jackson.

Source/WebCore:

* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::isTypeSupported): Added comment about mysterious call
to lower(); should probably return here and remove it.

* Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
(WebCore::initProtocolHandlerWhitelist): Deleted. Moved into isProtocolWhitelisted.
(WebCore::isProtocolWhitelisted): Changed set to be ASCIICaseInsensitiveHash and
initialized it using a lambda instead of a separate function.
(WebCore::verifyProtocolHandlerScheme): Added a FIXME about some case sensitive
checking of the protocol prefix here.

* Modules/plugins/QuickTimePluginReplacement.mm:
(WebCore::QuickTimePluginReplacement::supportsMimeType): Changed set to be
ASCIICaseInsensitiveHash and initialized it using a lambda instead of using
an explict check for empty.
(WebCore::QuickTimePluginReplacement::supportsFileExtension): Ditto.

* Modules/plugins/YouTubePluginReplacement.cpp:
(WebCore::queryKeysAndValues): Use convertToASCIILowercase. The keys here are
going to be all ASCII.
(WebCore::isYouTubeURL): Use equalLettersIgnoringASCIICase instead of lowercasing
the string.
(WebCore::processAndCreateYouTubeURL): Use url.protocolIsInHTTPFamily instead of
listing "http" and then "https" explicitly. Use equalLettersIgnoringASCIICase
instead of lowercasing a string.
(WebCore::YouTubePluginReplacement::youTubeURL): Ditto.

* Modules/websockets/WebSocketHandshake.cpp:
(WebCore::hostName): Use convertToASCIILowercase on host name.
(WebCore::WebSocketHandshake::host): Ditto.

* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetAttributes): Call convertToASCIILowercase instead of lower
to lowercase an element's tag name. This is a strange way to do things; typically
would be better to use some other function on Element, since tagName goes out of
its way to be capitalized, but some ATK expert can improve this later.

* css/CSSGrammar.y.in: Use the new convertToASCIILowercaseInPlace function rather
than the old lower function. We only need to lowercase the ASCII letters, and it's
also better to have the function have a clearer name.

* css/CSSParser.cpp:
(WebCore::convertToASCIILowercaseInPlace): Renamed from makeLower and made it deal
with only ASCII lowercasing.
(WebCore::CSSParserString::convertToASCIILowercaseInPlace): Renamed from lower.
(WebCore::isUniversalKeyword): Added. Helper for the function below that uses
equalLettersIgnoringASCIICase rather than lowercasing the string.
(WebCore::parseKeywordValue): Use isUniversalKeyword. Also clarified a comment.
(WebCore::CSSParser::parseAttr): Use convertToASCIILowercaseInPlace and delay
String creation until later in the function, using CSSParserString operations more.

* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::parsePseudoElementSelector): Use
convertToASCIILowercaseInPlace by its new name, with its new behavior.

* css/CSSParserValues.h: Tweaked comment and formatting a bit. Replaced the lower
function with the convertToASCIILowercaseInPlace function.

* css/CSSSelector.cpp:
(WebCore::CSSSelector::RareData::parseNth): Rewrote this to avoid the need to
make a lowercased copy of m_argument. Use equalLettersIgnoringASCIICase, and two
calls to find. Also use String::toIntStrict so we don't have to create String
objects for substrings.

* css/MediaQuery.cpp:
(WebCore::MediaQuery::MediaQuery): Use convertToASCIILowercase for media type name.
* css/MediaQueryExp.cpp:
(WebCore::MediaQueryExp::serialize): Use convertToASCIILowercase for media feature name.

* dom/Document.cpp:
(WebCore::isSeparator): Tweaked formatting and removed non-helpful comment.
(WebCore::processArguments): Changed this from a static member function to a non-member
file internal function. Use a std::function instead of a function pointer with a void*
pointer. Rewrote algorithm to simplify it and use StringView instead of String for the
keys and values.
(WebCore::Document::processViewport): Use a lambda instead of a function pointer to
call setViewportFeature, so that function's interface is no longer dictated by
the exact type of the function pointer argument to processArguments.
(WebCore::Document::processFormatDetection): Use a lambda instead of the
setParserFeature function above; use equalLettersIgnoringASCIICase for both the
key and the value, since processArguments no longer lowercases the string.
(WebCore::Document::processArguments): Deleted.

* dom/Document.h: Removed unnecessary declaration of processArguments and
ArgumentsCallback. Both are now private to the cpp file.

* dom/Element.cpp:
(WebCore::makeIdForStyleResolution): Use convertToASCIILowercase. When in quirks mode,
we want to match IDs in an ASCII case-insensitive way not match compatibility caseless.

* dom/ScriptElement.cpp:
(WebCore::ScriptElement::isScriptTypeSupported): Remove the use of lower here since
the MIME type registry is now itself ASCII case-insensitive.

* dom/ViewportArguments.cpp:
(WebCore::numericPrefix): Changed to use StringView and take a Document&, rearranged
argument order so Document& comes first.
(WebCore::findSizeValue): Ditto.
(WebCore::findScaleValue): Ditto.
(WebCore::findBooleanValue): Ditto. Also use std::abs instead of fabs, possibly
avoiding a conversion from float to double (not sure it was happening before but it's
definitely not happening now).
(WebCore::setViewportFeature): Changed to put arguments in a more logical order, to take
the ViewportArguments as a reference, not a void*, and to use StringView to avoid forcing
the caller to allocate strings. Also changed to use equalLettersIgnoringASCIICase so we
don't rely on the caller to make the key lowercase for us.
(WebCore::reportViewportWarning): Changed argument types. Added a couple comments about
mistakes in the function.

* dom/ViewportArguments.h: Removed unnecessary declaration of reportViewportWarning,
which is now private to the cpp file. Updated for new arguments to setViewportFeature.

* editing/EditorCommand.cpp:
(WebCore::executeFormatBlock): Use convertToASCIILowercase on the argument, which is
specifying a tag name.

* fileapi/Blob.cpp:
(WebCore::Blob::isValidContentType): Removed unnecessary separate loops for
8-bit and 16-bit strings. Content types are short strings and this small optimization is
not worth the additional code complexity.
(WebCore::Blob::normalizedContentType): Use convertToASCIILowercase since valid
content types are guaranteed to be all ASCII.
(WebCore::Blob::isNormalizedContentType): Removed unnecessary separate loops for
8-bit and 16-bit strings. Content types are short strings and this small optimization is
not worth the additional code complexity.

* html/parser/HTMLParserIdioms.cpp: Added now-needed include of QualifiedName.h.

* html/parser/HTMLParserIdioms.h: Removed unneeded include of QualifiedName.h and
WTFString.h. Made sure every function is declared first, even if it's also defined
later in the header in the section for functions templates and inline functions.

* loader/archive/ArchiveFactory.cpp:
(WebCore::ArchiveFactory::registerKnownArchiveMIMETypes): Use auto& for the type of
the set of MIME types here, since it's now using ASCIICaseInsensitiveHash.

* platform/MIMETypeRegistry.cpp: Changed the MIME type sets to use
ASCIICaseInsensitiveHash since MIME type are not case sensitive.
(WebCore::initializeSupportedImageMIMETypes): Use a modern for loop.
(WebCore::initializeSupportedImageMIMETypesForEncoding): Updated for HashSet type change.
(WebCore::initializePDFMIMETypes): Use a modern for loop.
(WebCore::initializeSupportedNonImageMimeTypes): Use a modern for loop.
(WebCore::initializeSupportedMediaMIMETypes): Updated for HashSet type change.
(WebCore::initializeUnsupportedTextMIMETypes): Use a modern for loop.
(WebCore::initializeMIMETypeRegistry): Updated for HashSet type change.
(WebCore::MIMETypeRegistry::getSupportedImageMIMETypes): Ditto.
(WebCore::MIMETypeRegistry::getSupportedImageResourceMIMETypes): Ditto.
(WebCore::MIMETypeRegistry::getSupportedImageMIMETypesForEncoding): Ditto.
(WebCore::MIMETypeRegistry::getSupportedNonImageMIMETypes): Ditto.
(WebCore::MIMETypeRegistry::getSupportedMediaMIMETypes): Ditto.
(WebCore::MIMETypeRegistry::getPDFMIMETypes): Ditto.
(WebCore::MIMETypeRegistry::getPDFAndPostScriptMIMETypes): Ditto.
(WebCore::MIMETypeRegistry::getUnsupportedTextMIMETypes): Ditto.
(WebCore::mimeTypeAssociationMap): Use ASCIICaseInsensitiveHash.
(WebCore::MIMETypeRegistry::getNormalizedMIMEType): Use auto to make code tighter.

* platform/MIMETypeRegistry.h: Changed return types of the getMIMETypes functions
to use ASCIICaseInsensitiveHash.

* platform/SchemeRegistry.cpp:
(WebCore::schemesForbiddenFromDomainRelaxation): Changed type to
use ASCIICaseInsensitiveHash.

* platform/URL.cpp:
(WebCore::mimeTypeFromDataURL): Use convertToASCIILowercase instead of lower.
Also removed some dead code that tried to handle the case where the data URL
has a comma as one of the first 5 characters: That can't happen since it's a
precondition of this function that the first five characters are "data:".

* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::getSupportedTypes): Change type of argument to
a HashSet with ASCIICaseInsensitiveHash.
* platform/graphics/MediaPlayer.h: Ditto.

* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::staticMIMETypeList):
Changed type of HashSet to use ASCIICaseInsensitiveHash.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: Ditto.

* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::avfMIMETypes):
Changed type of HashSet to use ASCIICaseInsensitiveHash.
(WebCore::MediaPlayerPrivateAVFoundationCF::getSupportedTypes): Ditto.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h: Ditto.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
Changed type of HashSet to use ASCIICaseInsensitiveHash.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithImageGenerator): Removed
an unnecessary line of code to set a local variable to 0 just before it falls
out of scope.
(WebCore::avfMIMETypes): Ditto. Also tightened up the code a bit.
(WebCore::MediaPlayerPrivateAVFoundationObjC::getSupportedTypes): Ditto.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
Changed type of HashSet to use ASCIICaseInsensitiveHash.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::mimeTypeCache): Ditto.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::getSupportedTypes): Ditto.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h: Ditto.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::getSupportedTypes): Ditto.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::mimeTypeCache): Ditto.
(WebCore::MediaPlayerPrivateGStreamer::getSupportedTypes): Ditto.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Ditto.

* platform/graphics/mac/MediaPlayerPrivateQTKit.h: Ditto.
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::shouldRejectMIMEType): Made this non-case-sensitive by using startsWith
and the "false" argument. Later change this to startsWithIgnoringASCIICase or
startsWithLettersIgnoringASCIICase.
(WebCore::addFileTypesToCache): Use ASCIICaseInsensitiveHash. ALso rewrote to
tighten up the code a bit and use modern Objective-C for loops.
(WebCore::mimeCommonTypesCache): Use ASCIICaseInsensitiveHash.
(WebCore::mimeModernTypesCache): Ditto.
(WebCore::concatenateHashSets): Ditto.
(WebCore::MediaPlayerPrivateQTKit::getSupportedTypes): Ditto.
(WebCore::MediaPlayerPrivateQTKit::disableUnsupportedTracks): Initialied
track type set using lambda, but left it case sensitive.

* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::mimeTypeCache): Changed type of HashSet to use ASCIICaseInsensitiveHash.
(WebCore::MediaPlayerPrivateMediaFoundation::getSupportedTypes): Ditto.
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:

* platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
(WebCore::mimeTypeCache): Ditto.
(WebCore::MockMediaPlayerMediaSource::getSupportedTypes): Ditto.
* platform/mock/mediasource/MockMediaPlayerMediaSource.h: Ditto.

Source/WebKit/mac:

* WebView/WebHTMLRepresentation.mm:
(newArrayWithStrings): Updated to use HashSet<String, ASCIICaseInsensitiveHash>
and also to use a modern for loop.

Source/WTF:

* wtf/text/StringView.h: Added toIntStrict. Not thrilled about the name of this
function, but generally it seems likely to be useful more often than toInt.
And it's needed for one call site in WebCore that was using String::lower.

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

3 years agoAdd "WebKit built-in PDF" Plugin to set of publicly visible plugins
bfulgham@apple.com [Mon, 1 Feb 2016 04:44:07 +0000 (04:44 +0000)]
Add "WebKit built-in PDF" Plugin to set of publicly visible plugins
https://bugs.webkit.org/show_bug.cgi?id=153657
<rdar://problem/24413107>

Reviewed by Darin Adler.

Source/WebCore:

Tested by http/tests/plugins/visible_plugins.html.

A number of poorly-coded sites break when WebKit reports that it understands PDF mime types,
but does not have a list of plugins that the site can iterate through.

To avoid this compatibility problem, we should also expose the "WebKit built-in PDF" plugin
to avoid this edge case.

* plugins/PluginData.cpp:
(WebCore::shouldBePubliclyVisible): Add "WebKit built-in PDF" plugin.

LayoutTests:

* http/tests/plugins/visible_plugins-expected.txt: Added.
* http/tests/plugins/visible_plugins.html: Added.
* platform/mac-wk2/http/tests/plugins: Added.
* platform/mac-wk2/http/tests/plugins/visible_plugins-expected.txt: Added.

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

3 years agoAX: Add a boundary value to AXTextStateChangeType
commit-queue@webkit.org [Mon, 1 Feb 2016 04:09:02 +0000 (04:09 +0000)]
AX: Add a boundary value to AXTextStateChangeType
https://bugs.webkit.org/show_bug.cgi?id=153085

Patch by Doug Russell <d_russell@apple.com> on 2016-01-31
Reviewed by Darin Adler.

Post an AT notification when navigation is attempted past
an editable element's boundaries.

Source/WebCore:

Test: accessibility/mac/selection-boundary-userinfo.html

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::showIntent):
* accessibility/AXTextStateChangeIntent.h:
* accessibility/mac/AXObjectCacheMac.mm:
(platformChangeTypeForWebCoreChangeType):
(WebCore::AXObjectCache::postTextStateChangePlatformNotification):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::modifyMovingRight):
(WebCore::FrameSelection::modifyMovingForward):
(WebCore::FrameSelection::modifyMovingLeft):
(WebCore::FrameSelection::modifyMovingBackward):
(WebCore::textSelectionWithDirectionAndGranularity):
(WebCore::FrameSelection::modify):
(WebCore::FrameSelection::modifyExtendingBackward): Deleted.
(WebCore::FrameSelection::textSelectionIntent): Deleted.
* editing/FrameSelection.h:
* editing/VisiblePosition.cpp:
(WebCore::VisiblePosition::next):
(WebCore::VisiblePosition::previous):
(WebCore::VisiblePosition::left):
(WebCore::VisiblePosition::right):
(WebCore::VisiblePosition::honorEditingBoundaryAtOrBefore):
(WebCore::VisiblePosition::honorEditingBoundaryAtOrAfter):
(WebCore::VisiblePosition::leftVisuallyDistinctCandidate): Deleted.
(WebCore::VisiblePosition::rightVisuallyDistinctCandidate): Deleted.
* editing/VisiblePosition.h:
* editing/VisibleUnits.cpp:
(WebCore::startOfLine):
(WebCore::logicalStartOfLine):
(WebCore::endOfLine):
(WebCore::logicalEndOfLine):
(WebCore::leftBoundaryOfLine):
(WebCore::rightBoundaryOfLine):
(WebCore::inSameLogicalLine): Deleted.
(WebCore::endOfEditableContent): Deleted.
(WebCore::isEndOfEditableOrNonEditableContent): Deleted.
* editing/VisibleUnits.h:

LayoutTests:

* accessibility/mac/selection-boundary-userinfo-expected.txt: Added.
* accessibility/mac/selection-boundary-userinfo.html: Added.

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

3 years agoCSP: Use the served CSP header for dedicated workers
dbates@webkit.org [Mon, 1 Feb 2016 03:10:00 +0000 (03:10 +0000)]
CSP: Use the served CSP header for dedicated workers
https://bugs.webkit.org/show_bug.cgi?id=153157
<rdar://problem/24383254>
And
https://bugs.webkit.org/show_bug.cgi?id=153156
<rdar://problem/24383246>

Patch by Daniel Bates <dabates@apple.com> on 2016-01-31
Reviewed by Brent Fulgham.

Source/WebCore:

Inspired by Blink commit:
<https://src.chromium.org/viewvc/blink?revision=194143&view=revision>

Implement support for respecting Content Security Policy (CSP) HTTP headers included in the
HTTP response for a Web Worker's script as per section Workers of the CSP 2.0 spec,
<https://w3c.github.io/webappsec-csp/2/#processing-model-workers> (29 August 2015).

Currently a Web Worker always inherits the CSP of its owner document. Instead a web worker
will inherit the CSP of its owner document only if its script is incapable of defining a
content security policy (i.e. its origin is a globally unique identifier). Otherwise, the
CSP HTTP headers delivered with the script will be used to define the CSP for the worker.

Tests: fast/workers/worker-inherits-csp-blocks-eval.html
       fast/workers/worker-inherits-csp-blocks-xhr.html
       http/tests/security/contentSecurityPolicy/worker-blob-inherits-csp-blocks-eval.html

* CMakeLists.txt: Add file ContentSecurityPolicyResponseHeaders.cpp.
* WebCore.vcxproj/WebCore.vcxproj: Add files ContentSecurityPolicyResponseHeaders.{cpp, h}.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* dom/Document.cpp:
(WebCore::Document::processHttpEquiv): Update code to use enum class ContentSecurityPolicyHeaderType.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::didBeginDocument): Extract logic to collect Content Security Policy HTTP headers
into class ContentSecurityPolicyResponseHeaders and make use of it here.
* page/csp/ContentSecurityPolicy.cpp:
(WebCore::CSPDirectiveList::headerType): Modified to use enum class ContentSecurityPolicyHeaderType.
(WebCore::CSPDirectiveList::CSPDirectiveList): Ditto.
(WebCore::CSPDirectiveList::create): Ditto.
(WebCore::ContentSecurityPolicy::responseHeaders): Creates and returns a ContentSecurityPolicyResponseHeaders
object with the parsed CSP policy headers.
(WebCore::ContentSecurityPolicy::didReceiveHeaders): Processed the CSP policy headers represented by the
specified ContentSecurityPolicyResponseHeaders object.
(WebCore::ContentSecurityPolicy::deprecatedHeader): Deleted.
(WebCore::ContentSecurityPolicy::deprecatedHeaderType): Deleted.
* page/csp/ContentSecurityPolicy.h: Defines a class that represents a collection of CSP policy headers.
This class has two purposes:
    - It extracts the CSP policy headers from a HTTP response (ResourceResponse object). We make use of
    this functionality in both FrameLoader::didBeginDocument() and Worker::didReceiveResponse().
    - It serves as a memento that externalizes the internal CSP policy details of an instance of
    ContentSecurityPolicy. We make use of this memento functionality to support inheriting the
    CSP policy of the worker's owner document in a thread-safe manner. You can create and restore
    a memento using ContentSecurityPolicy::responseHeaders() and ContentSecurityPolicy::didReceiveHeaders(), respectively.
* page/csp/ContentSecurityPolicyResponseHeaders.cpp: Added.
(WebCore::ContentSecurityPolicyResponseHeaders::ContentSecurityPolicyResponseHeaders): Extracts the
CSP HTTP headers from a ResourceResponse object.
(WebCore::ContentSecurityPolicyResponseHeaders::isolatedCopy): Make a copy of this object that is
safe to pass to another thread.
* page/csp/ContentSecurityPolicyResponseHeaders.h: Added.
* workers/DedicatedWorkerGlobalScope.cpp:
(WebCore::DedicatedWorkerGlobalScope::create): Modified to use class ContentSecurityPolicyResponseHeaders.
* workers/DedicatedWorkerGlobalScope.h:
* workers/DedicatedWorkerThread.cpp:
(WebCore::DedicatedWorkerThread::create): Ditto.
(WebCore::DedicatedWorkerThread::DedicatedWorkerThread): Ditto.
(WebCore::DedicatedWorkerThread::createWorkerGlobalScope): Ditto.
* workers/DedicatedWorkerThread.h:
* workers/Worker.cpp:
(WebCore::Worker::didReceiveResponse): Create a ContentSecurityPolicyResponseHeaders if the origin of
the worker's script is capable of providing a CSP. Otherwise, we will inherit the CSP of the worker's owner
document in Worker::notifyFinished().
(WebCore::Worker::notifyFinished): Pass the appropriate CSP response headers to WorkerMessagingProxy::startWorkerGlobalScope().
* workers/Worker.h:
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::applyContentSecurityPolicyResponseHeaders): Renamed; formerly named applyContentSecurityPolicyFromString().
Modified to take a ContentSecurityPolicyResponseHeaders and apply it to the ContentSecurityPolicy object associated with the worker.
(WebCore::WorkerGlobalScope::applyContentSecurityPolicyFromString): Deleted.
* workers/WorkerGlobalScope.h:
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::startWorkerGlobalScope): Pass the worker's ContentSecurityPolicyResponseHeaders object.
* workers/WorkerThread.cpp:
(WebCore::WorkerThreadStartupData::WorkerThreadStartupData): Added field m_contentSecurityPolicyResponseHeaders to store
the CSP response headers to be applied to the worker's ContentSecurityPolicy object.
(WebCore::WorkerThread::WorkerThread): Modified to use ContentSecurityPolicyResponseHeaders.
(WebCore::WorkerThread::workerThread): Pass the ContentSecurityPolicyResponseHeaders object from the start up data struct
to DedicatedWorkerThread::createWorkerGlobalScope().
* workers/WorkerThread.h:

LayoutTests:

Add new tests to ensure we block eval() in blob-, file-URL workers and block XHR in a file-URL worker.

* TestExpectations: Remove now passing tests http/tests/security/contentSecurityPolicy/worker-{multiple-csp-headers, without-own-csp}.html
and update the associated bug # for tests that fail.
* fast/workers/resources/worker-inherits-csp-blocks-eval.js: Added.
(catch):
* fast/workers/resources/worker-inherits-csp-blocks-xhr.js: Added.
(catch):
* fast/workers/worker-inherits-csp-blocks-eval-expected.txt: Added.
* fast/workers/worker-inherits-csp-blocks-eval.html: Added.
* fast/workers/worker-inherits-csp-blocks-xhr-expected.txt: Added.
* fast/workers/worker-inherits-csp-blocks-xhr.html: Added.
* http/tests/security/contentSecurityPolicy/worker-blob-inherits-csp-blocks-eval-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/worker-blob-inherits-csp-blocks-eval.html: Added.
* http/tests/security/contentSecurityPolicy/worker-multiple-csp-headers-expected.txt: Updated expected results as
the result was incorrect.
* http/tests/security/contentSecurityPolicy/worker-without-own-csp-expected.txt: Ditto.

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

3 years agoUnreviewed. EFL gardening: rebaseline tests after r195740. (more to follow)
hs85.jeong@samsung.com [Mon, 1 Feb 2016 02:22:58 +0000 (02:22 +0000)]
Unreviewed. EFL gardening: rebaseline tests after r195740. (more to follow)

* platform/efl/css1/basic/containment-expected.txt:
* platform/efl/css1/basic/contextual_selectors-expected.txt:
* platform/efl/css1/basic/grouping-expected.txt:
* platform/efl/css1/basic/id_as_selector-expected.txt:
* platform/efl/css1/basic/inheritance-expected.txt:
* platform/efl/css1/box_properties/border-expected.txt:
* platform/efl/css1/box_properties/border_bottom-expected.txt:
* platform/efl/css1/box_properties/border_bottom_inline-expected.txt:
* platform/efl/css1/box_properties/border_bottom_width-expected.txt:
* platform/efl/css1/box_properties/border_bottom_width_inline-expected.txt:
* platform/efl/css1/box_properties/border_color-expected.txt:
* platform/efl/css1/box_properties/border_color_inline-expected.txt:
* platform/efl/css1/box_properties/border_inline-expected.txt:
* platform/efl/css1/box_properties/border_left-expected.txt:
* platform/efl/css1/box_properties/border_left_inline-expected.txt:
* platform/efl/css1/box_properties/border_left_width-expected.txt:
* platform/efl/css1/box_properties/border_left_width_inline-expected.txt:
* platform/efl/css1/box_properties/border_right-expected.txt:
* platform/efl/css1/box_properties/border_right_inline-expected.txt:
* platform/efl/css1/box_properties/border_right_width-expected.txt:
* platform/efl/css1/box_properties/border_right_width_inline-expected.txt:
* platform/efl/css1/box_properties/border_style-expected.txt:
* platform/efl/css1/box_properties/border_style_inline-expected.txt:
* platform/efl/css1/box_properties/border_top-expected.txt:
* platform/efl/css1/box_properties/border_top_inline-expected.txt:
* platform/efl/css1/box_properties/border_top_width-expected.txt:
* platform/efl/css1/box_properties/border_top_width_inline-expected.txt:
* platform/efl/css1/box_properties/clear-expected.txt:
* platform/efl/css1/box_properties/clear_float-expected.txt:
* platform/efl/css1/box_properties/float-expected.txt:
* platform/efl/css1/box_properties/float_elements_in_series-expected.txt:
* platform/efl/css1/box_properties/float_margin-expected.txt:
* platform/efl/css1/box_properties/height-expected.txt:
* platform/efl/css1/box_properties/margin-expected.txt:
* platform/efl/css1/box_properties/margin_bottom-expected.txt:
* platform/efl/css1/box_properties/margin_bottom_inline-expected.txt:
* platform/efl/css1/box_properties/margin_inline-expected.txt:
* platform/efl/css1/box_properties/margin_left-expected.txt:
* platform/efl/css1/box_properties/margin_left_inline-expected.txt:
* platform/efl/css1/box_properties/margin_right-expected.txt:
* platform/efl/css1/box_properties/margin_right_inline-expected.txt:
* platform/efl/css1/box_properties/margin_top-expected.txt:
* platform/efl/css1/box_properties/margin_top_inline-expected.txt:
* platform/efl/css1/box_properties/padding-expected.txt:
* platform/efl/css1/box_properties/padding_bottom-expected.txt:
* platform/efl/css1/box_properties/padding_bottom_inline-expected.txt:
* platform/efl/css1/box_properties/padding_inline-expected.txt:
* platform/efl/css1/box_properties/padding_left-expected.txt:
* platform/efl/css1/box_properties/padding_left_inline-expected.txt:
* platform/efl/css1/box_properties/padding_right-expected.txt:
* platform/efl/css1/box_properties/padding_right_inline-expected.txt:
* platform/efl/css1/box_properties/padding_top-expected.txt:
* platform/efl/css1/box_properties/padding_top_inline-expected.txt:
* platform/efl/css1/box_properties/width-expected.txt:
* platform/efl/css1/cascade/cascade_order-expected.txt:
* platform/efl/css1/cascade/important-expected.txt:
* platform/efl/css1/classification/display-expected.txt:
* platform/efl/css1/classification/list_style-expected.txt:
* platform/efl/css1/classification/list_style_image-expected.txt:
* platform/efl/css1/classification/list_style_position-expected.txt:
* platform/efl/css1/classification/list_style_type-expected.txt:
* platform/efl/css1/classification/white_space-expected.txt:
* platform/efl/css1/color_and_background/background-expected.txt:
* platform/efl/css1/color_and_background/background_attachment-expected.txt:
* platform/efl/css1/color_and_background/background_color-expected.txt:
* platform/efl/css1/color_and_background/background_image-expected.txt:
* platform/efl/css1/color_and_background/background_position-expected.txt:
* platform/efl/css1/color_and_background/background_repeat-expected.txt:
* platform/efl/css1/color_and_background/color-expected.txt:
* platform/efl/css1/conformance/forward_compatible_parsing-expected.txt:
* platform/efl/css1/font_properties/font-expected.txt:
* platform/efl/css1/font_properties/font_family-expected.txt:
* platform/efl/css1/font_properties/font_size-expected.txt:
* platform/efl/css1/font_properties/font_style-expected.txt:
* platform/efl/css1/font_properties/font_variant-expected.txt:
* platform/efl/css1/font_properties/font_weight-expected.txt:
* platform/efl/css1/formatting_model/canvas-expected.txt:
* platform/efl/css1/formatting_model/height_of_lines-expected.txt:
* platform/efl/css1/formatting_model/inline_elements-expected.txt:
* platform/efl/css1/formatting_model/replaced_elements-expected.txt:
* platform/efl/css1/formatting_model/vertical_formatting-expected.txt:
* platform/efl/css1/pseudo/anchor-expected.txt:
* platform/efl/css1/pseudo/firstletter-expected.txt:
* platform/efl/css1/pseudo/firstline-expected.txt:
* platform/efl/css1/pseudo/multiple_pseudo_elements-expected.txt:
* platform/efl/css1/pseudo/pseudo_elements_in_selectors-expected.txt:
* platform/efl/css1/text_properties/letter_spacing-expected.txt:
* platform/efl/css1/text_properties/line_height-expected.txt:
* platform/efl/css1/text_properties/text_align-expected.txt:
* platform/efl/css1/text_properties/text_decoration-expected.txt:
* platform/efl/css1/text_properties/text_indent-expected.txt:
* platform/efl/css1/text_properties/text_transform-expected.txt:
* platform/efl/css1/text_properties/vertical_align-expected.txt:
* platform/efl/css1/text_properties/word_spacing-expected.txt:
* platform/efl/css1/units/color_units-expected.txt:
* platform/efl/css1/units/length_units-expected.txt:
* platform/efl/css1/units/percentage_units-expected.txt:
* platform/efl/css1/units/urls-expected.txt:
* platform/efl/css2.1/20110323/border-collapse-offset-002-expected.txt:
* platform/efl/css2.1/20110323/border-conflict-style-079-expected.txt:
* platform/efl/css2.1/20110323/border-conflict-style-088-expected.txt:
* platform/efl/css2.1/20110323/dynamic-top-change-002-expected.txt:
* platform/efl/css2.1/20110323/dynamic-top-change-003-expected.txt:
* platform/efl/css2.1/20110323/inline-table-001-expected.txt:
* platform/efl/css2.1/20110323/inline-table-002a-expected.txt:
* platform/efl/css2.1/20110323/inline-table-003-expected.txt:
* platform/efl/css2.1/20110323/margin-applies-to-001-expected.txt:
* platform/efl/css2.1/20110323/margin-applies-to-002-expected.txt:
* platform/efl/css2.1/20110323/margin-applies-to-003-expected.txt:
* platform/efl/css2.1/20110323/margin-applies-to-004-expected.txt:
* platform/efl/css2.1/20110323/margin-applies-to-005-expected.txt:
* platform/efl/css2.1/20110323/margin-applies-to-006-expected.txt:
* platform/efl/css2.1/20110323/margin-applies-to-007-expected.txt:
* platform/efl/css2.1/20110323/margin-applies-to-013-expected.txt:
* platform/efl/css2.1/20110323/margin-applies-to-014-expected.txt:
* platform/efl/css2.1/20110323/margin-applies-to-015-expected.txt:
* platform/efl/css2.1/20110323/replaced-intrinsic-ratio-001-expected.txt:
* platform/efl/css2.1/20110323/table-caption-001-expected.txt:
* platform/efl/css2.1/20110323/table-caption-optional-001-expected.txt:
* platform/efl/css2.1/20110323/table-caption-optional-002-expected.txt:
* platform/efl/css2.1/t040302-c61-ex-len-00-b-a-expected.txt:
* platform/efl/css2.1/t0803-c5501-mrgn-t-00-b-a-expected.txt:
* platform/efl/css2.1/t0803-c5503-mrgn-b-00-b-a-expected.txt:
* platform/efl/css2.1/t0804-c5506-padn-t-00-b-a-expected.txt:
* platform/efl/css2.1/t0804-c5508-ipadn-b-03-b-a-expected.txt:
* platform/efl/css2.1/t090402-c42-ibx-pad-00-d-ag-expected.txt:
* platform/efl/css2.1/t0905-c5525-fltmult-00-d-g-expected.txt:
* platform/efl/css2.1/t170602-bdr-conflct-w-04-d-expected.txt:
* platform/efl/css2.1/t170602-bdr-conflct-w-06-d-expected.txt:
* platform/efl/css2.1/t170602-bdr-conflct-w-08-d-expected.txt:
* platform/efl/css2.1/t170602-bdr-conflct-w-13-d-expected.txt:
* platform/efl/css2.1/t170602-bdr-conflct-w-14-d-expected.txt:
* platform/efl/css2.1/t170602-bdr-conflct-w-16-d-expected.txt:
* platform/efl/css2.1/t170602-bdr-conflct-w-17-d-expected.txt:
* platform/efl/css2.1/t170602-bdr-conflct-w-18-d-expected.txt:
* platform/efl/css2.1/t170602-bdr-conflct-w-24-d-expected.txt:
* platform/efl/css2.1/t170602-bdr-conflct-w-25-d-expected.txt:
* platform/efl/css2.1/t170602-bdr-conflct-w-30-d-expected.txt:
* platform/efl/css2.1/t170602-bdr-conflct-w-31-d-expected.txt:
* platform/efl/css2.1/t170602-bdr-conflct-w-34-d-expected.txt:
* platform/efl/css2.1/t170602-bdr-conflct-w-44-d-expected.txt:
* platform/efl/css2.1/t170602-bdr-conflct-w-52-d-expected.txt:
* platform/efl/css2.1/t170602-bdr-conflct-w-54-d-expected.txt:
* platform/efl/css2.1/t170602-bdr-conflct-w-59-d-expected.txt:
* platform/efl/css2.1/t170602-bdr-conflct-w-64-d-expected.txt:
* platform/efl/css2.1/t170602-bdr-conflct-w-65-d-expected.txt:
* platform/efl/css2.1/t170602-bdr-conflct-w-70-d-expected.txt:
* platform/efl/css2.1/t170602-bdr-conflct-w-71-d-expected.txt:
* platform/efl/css2.1/t170602-bdr-conflct-w-74-d-expected.txt:
* platform/efl/css2.1/t170602-bdr-conflct-w-84-d-expected.txt:
* platform/efl/css2.1/t170602-bdr-conflct-w-85-d-expected.txt:
* platform/efl/css2.1/t170602-bdr-conflct-w-94-d-expected.txt:
* platform/efl/css3/selectors3/html/css3-modsel-18-expected.txt:
* platform/efl/css3/selectors3/html/css3-modsel-29-expected.txt:
* platform/efl/css3/selectors3/html/css3-modsel-29b-expected.txt:
* platform/efl/css3/selectors3/html/css3-modsel-33-expected.txt:
* platform/efl/css3/selectors3/html/css3-modsel-73-expected.txt:
* platform/efl/css3/selectors3/html/css3-modsel-73b-expected.txt:
* platform/efl/css3/selectors3/html/css3-modsel-77-expected.txt:
* platform/efl/css3/selectors3/html/css3-modsel-77b-expected.txt:
* platform/efl/css3/selectors3/xhtml/css3-modsel-18-expected.txt:
* platform/efl/css3/selectors3/xhtml/css3-modsel-29-expected.txt:
* platform/efl/css3/selectors3/xhtml/css3-modsel-29b-expected.txt:
* platform/efl/css3/selectors3/xhtml/css3-modsel-33-expected.txt:
* platform/efl/css3/selectors3/xhtml/css3-modsel-73-expected.txt:
* platform/efl/css3/selectors3/xhtml/css3-modsel-73b-expected.txt:
* platform/efl/css3/selectors3/xhtml/css3-modsel-77-expected.txt:
* platform/efl/css3/selectors3/xhtml/css3-modsel-77b-expected.txt:
* platform/efl/css3/selectors3/xml/css3-modsel-18-expected.txt:
* platform/efl/css3/selectors3/xml/css3-modsel-29-expected.txt:
* platform/efl/css3/selectors3/xml/css3-modsel-29b-expected.txt:
* platform/efl/css3/selectors3/xml/css3-modsel-33-expected.txt:
* platform/efl/css3/selectors3/xml/css3-modsel-73-expected.txt:
* platform/efl/css3/selectors3/xml/css3-modsel-73b-expected.txt:
* platform/efl/css3/selectors3/xml/css3-modsel-77-expected.txt:
* platform/efl/css3/selectors3/xml/css3-modsel-77b-expected.txt:
* platform/efl/editing/deleting/4922367-expected.txt:
* platform/efl/editing/deleting/5126166-expected.txt:
* platform/efl/editing/deleting/5206311-1-expected.txt:
* platform/efl/editing/deleting/5433862-2-expected.txt:
* platform/efl/editing/inserting/paragraph-separator-in-table-1-expected.txt:
* platform/efl/editing/selection/3690703-2-expected.txt:
* platform/efl/editing/selection/3690703-expected.txt:
* platform/efl/editing/selection/3690719-expected.txt:
* platform/efl/editing/selection/5057506-2-expected.txt:
* platform/efl/editing/selection/5057506-expected.txt:
* platform/efl/editing/selection/5131716-1-expected.txt:
* platform/efl/editing/selection/5131716-2-expected.txt:
* platform/efl/editing/selection/5131716-3-expected.txt:
* platform/efl/editing/selection/5131716-4-expected.txt:
* platform/efl/editing/selection/move-by-line-001-expected.txt:
* platform/efl/editing/selection/select-all-004-expected.txt:
* platform/efl/editing/unsupported-content/table-type-after-expected.txt:
* platform/efl/editing/unsupported-content/table-type-before-expected.txt:
* platform/efl/fast/block/basic/016-expected.txt:
* platform/efl/fast/block/basic/quirk-percent-height-table-cell-expected.txt:
* platform/efl/fast/block/float/015-expected.txt:
* platform/efl/fast/block/margin-collapse/006-expected.txt:
* platform/efl/fast/block/margin-collapse/010-expected.txt:
* platform/efl/fast/block/margin-collapse/011-expected.txt:
* platform/efl/fast/block/margin-collapse/012-expected.txt:
* platform/efl/fast/block/margin-collapse/015-expected.txt:
* platform/efl/fast/block/margin-collapse/016-expected.txt:
* platform/efl/fast/block/margin-collapse/017-expected.txt:
* platform/efl/fast/block/margin-collapse/018-expected.txt:
* platform/efl/fast/block/margin-collapse/019-expected.txt:
* platform/efl/fast/block/margin-collapse/020-expected.txt:
* platform/efl/fast/block/margin-collapse/021-expected.txt:
* platform/efl/fast/block/margin-collapse/022-expected.txt:
* platform/efl/fast/block/margin-collapse/025-expected.txt:
* platform/efl/fast/block/margin-collapse/032-expected.txt:
* platform/efl/fast/block/margin-collapse/033-expected.txt:
* platform/efl/fast/block/margin-collapse/034-expected.txt:
* platform/efl/fast/block/margin-collapse/041-expected.txt:
* platform/efl/fast/block/margin-collapse/042-expected.txt:
* platform/efl/fast/block/margin-collapse/055-expected.txt:
* platform/efl/fast/block/margin-collapse/056-expected.txt:
* platform/efl/fast/block/margin-collapse/057-expected.txt:
* platform/efl/fast/block/margin-collapse/058-expected.txt:
* platform/efl/fast/block/margin-collapse/059-expected.txt:
* platform/efl/fast/block/margin-collapse/block-inside-inline/006-expected.txt:
* platform/efl/fast/block/margin-collapse/block-inside-inline/010-expected.txt:
* platform/efl/fast/block/margin-collapse/block-inside-inline/011-expected.txt:
* platform/efl/fast/block/margin-collapse/block-inside-inline/012-expected.txt:
* platform/efl/fast/block/margin-collapse/block-inside-inline/015-expected.txt:
* platform/efl/fast/block/margin-collapse/block-inside-inline/016-expected.txt:
* platform/efl/fast/block/margin-collapse/block-inside-inline/017-expected.txt:
* platform/efl/fast/block/margin-collapse/block-inside-inline/018-expected.txt:
* platform/efl/fast/block/margin-collapse/block-inside-inline/019-expected.txt:
* platform/efl/fast/block/margin-collapse/block-inside-inline/020-expected.txt:
* platform/efl/fast/block/margin-collapse/block-inside-inline/021-expected.txt:
* platform/efl/fast/block/margin-collapse/block-inside-inline/022-expected.txt:
* platform/efl/fast/block/margin-collapse/block-inside-inline/025-expected.txt:
* platform/efl/fast/block/positioning/negative-right-pos-expected.txt:
* platform/efl/fast/block/positioning/table-cell-static-position-expected.txt:
* platform/efl/fast/borders/border-antialiasing-expected.txt:
* platform/efl/fast/borders/border-radius-different-width-001-expected.txt:
* platform/efl/fast/borders/table-borders-expected.txt:
* platform/efl/fast/css-generated-content/first-letter-in-nested-before-expected.txt:
* platform/efl/fast/css-generated-content/first-letter-in-nested-before-table-expected.txt:
* platform/efl/fast/css-generated-content/nested-tables-with-before-after-content-crash-expected.txt:
* platform/efl/fast/css-generated-content/table-cell-before-after-child-add-expected.txt:
* platform/efl/fast/css-generated-content/table-parts-before-and-after-expected.txt:
* platform/efl/fast/css-generated-content/table-row-group-with-before-expected.txt:
* platform/efl/fast/css-generated-content/table-row-with-before-expected.txt:
* platform/efl/fast/css-generated-content/table-with-before-expected.txt:
* platform/efl/fast/css/003-expected.txt:
* platform/efl/fast/css/absolute-poition-in-rtl-parent-expected.txt:
* platform/efl/fast/css/acid2-expected.txt:
* platform/efl/fast/css/acid2-pixel-expected.txt:
* platform/efl/fast/css/bidi-override-in-anonymous-block-expected.txt:
* platform/efl/fast/css/box-shadow-and-border-radius-expected.txt:
* platform/efl/fast/css/caption-width-absolute-position-expected.txt:
* platform/efl/fast/css/caption-width-absolute-position-offset-top-expected.txt:
* platform/efl/fast/css/caption-width-fixed-position-expected.txt:
* platform/efl/fast/css/caption-width-fixed-position-offset-top-expected.txt:
* platform/efl/fast/css/caption-width-relative-position-expected.txt:
* platform/efl/fast/css/caption-width-relative-position-offset-top-expected.txt:
* platform/efl/fast/css/css3-nth-child-expected.txt:
* platform/efl/fast/css/focus-ring-detached-expected.txt:
* platform/efl/fast/css/focus-ring-multiline-expected.txt:
* platform/efl/fast/css/h1-in-section-elements-expected.txt:
* platform/efl/fast/css/image-rendering-expected.txt:
* platform/efl/fast/css/min-width-with-spanned-cell-expected.txt:
* platform/efl/fast/css/percentage-non-integer-expected.txt:
* platform/efl/fast/css/table-text-align-quirk-expected.txt:
* platform/efl/fast/css/table-text-align-strict-expected.txt:
* platform/efl/fast/dom/34176-expected.txt:
* platform/efl/fast/dom/HTMLTableElement/colSpan-expected.txt:
* platform/efl/fast/dom/HTMLTableElement/createCaption-expected.txt:
* platform/efl/fast/dom/row-inner-text-expected.txt:
* platform/efl/fast/dynamic/001-expected.txt:
* platform/efl/fast/dynamic/containing-block-change-expected.txt:
* platform/efl/fast/dynamic/float-withdrawal-expected.txt:
* platform/efl/fast/dynamic/insert-before-table-part-in-continuation-expected.txt:
* platform/efl/fast/dynamic/subtree-table-cell-height-expected.txt:
* platform/efl/fast/encoding/utf-16-big-endian-expected.txt:
* platform/efl/fast/encoding/utf-16-little-endian-expected.txt:
* platform/efl/fast/forms/001-expected.txt:
* platform/efl/fast/forms/005-expected.txt:
* platform/efl/fast/forms/basic-buttons-expected.txt:
* platform/efl/fast/forms/form-element-geometry-expected.txt:
* platform/efl/fast/forms/form-hides-table-expected.txt:
* platform/efl/fast/forms/form-in-malformed-markup-expected.txt:
* platform/efl/fast/forms/formmove3-expected.txt:
* platform/efl/fast/forms/input-table-expected.txt:
* platform/efl/fast/forms/listbox-bidi-align-expected.txt:
* platform/efl/fast/forms/preserveFormDuringResidualStyle-expected.txt:
* platform/efl/fast/forms/select-dirty-parent-pref-widths-expected.txt:
* platform/efl/fast/html/details-writing-mode-expected.txt:
* platform/efl/fast/inline-block/001-expected.txt:
* platform/efl/fast/inline-block/overflow-clip-expected.txt:
* platform/efl/fast/invalid/012-expected.txt:
* platform/efl/fast/invalid/018-expected.txt:
* platform/efl/fast/lists/004-expected.txt:
* platform/efl/fast/lists/list-marker-before-content-table-expected.txt:
* platform/efl/fast/multicol/span/before-child-anonymous-column-block-expected.txt:
* platform/efl/fast/overflow/002-expected.txt:
* platform/efl/fast/overflow/overflow-rtl-expected.txt:
* platform/efl/fast/overflow/overflow-rtl-vertical-expected.txt:
* platform/efl/fast/overflow/table-overflow-float-expected.txt:
* platform/efl/fast/reflections/table-cell-expected.txt:
* platform/efl/fast/repaint/block-selection-gap-in-table-cell-expected.txt:
* platform/efl/fast/repaint/float-overflow-expected.txt:
* platform/efl/fast/repaint/float-overflow-right-expected.txt:
* platform/efl/fast/repaint/subtree-root-clip-3-expected.txt:
* platform/efl/fast/repaint/table-cell-collapsed-border-expected.txt:
* platform/efl/fast/repaint/table-cell-collapsed-border-scroll-expected.txt:
* platform/efl/fast/repaint/table-cell-move-expected.txt:
* platform/efl/fast/repaint/table-cell-overflow-expected.txt:
* platform/efl/fast/repaint/table-cell-vertical-overflow-expected.txt:
* platform/efl/fast/repaint/table-col-background-expected.txt:
* platform/efl/fast/repaint/table-collapsed-border-expected.txt:
* platform/efl/fast/repaint/table-extra-bottom-grow-expected.txt:
* platform/efl/fast/repaint/table-outer-border-expected.txt:
* platform/efl/fast/repaint/table-row-expected.txt:
* platform/efl/fast/repaint/table-section-overflow-expected.txt:
* platform/efl/fast/repaint/table-section-repaint-expected.txt:
* platform/efl/fast/repaint/table-two-pass-layout-overpaint-expected.txt:
* platform/efl/fast/repaint/table-writing-modes-h-expected.txt:
* platform/efl/fast/repaint/table-writing-modes-v-expected.txt:

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

3 years agoGet rid of most calls to String::upper; mostly replace them with convertToASCIIUppercase
darin@apple.com [Mon, 1 Feb 2016 01:50:50 +0000 (01:50 +0000)]
Get rid of most calls to String::upper; mostly replace them with convertToASCIIUppercase
https://bugs.webkit.org/show_bug.cgi?id=153715

Reviewed by Gyuyoung Kim.

Source/WebCore:

* editing/cocoa/HTMLConverter.mm:
(HTMLConverter::computedAttributesForElement): Use convertToASCIILowercase to fold
ASCII case when searching for fonts by name.

* platform/network/cf/ResourceResponseCFNet.cpp:
(WebCore::ResourceResponse::platformLazyInit): Use convertToASCIIUppercase to make
the HTTP version string canonical. Not sure why it's needed at all, but the letters
we might be uppercasing are "HTTP", so no need to handle non-ASCII.
* platform/network/cocoa/ResourceResponseCocoa.mm:
(WebCore::ResourceResponse::platformLazyInit): Ditto.

* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::operator<<): Use convertToASCIIUppercase when writing the spread
method type into a text stream. The method types are all ASCII.

Source/WebKit2:

* UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:
Use convertToASCIIUppercase on language names.

Source/WTF:

* wtf/text/AtomicString.h:
(WTF::AtomicString::upper): Deleted.

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

3 years ago[EFL] All API tests are broken on 15.10
jh718.park@samsung.com [Mon, 1 Feb 2016 01:20:55 +0000 (01:20 +0000)]
[EFL] All API tests are broken on 15.10
https://bugs.webkit.org/show_bug.cgi?id=153528

Reviewed by Gyuyoung Kim.

* CMakeLists.txt: Having include(WebKitCommon) statement follow
CMAKE_FOO_OUTPUT_DIRECTORY otherwise all the API tests gets blocked.

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

3 years ago[Cocoa] Remove unused definition of HAVE_HEADER_DETECTION_H
mitz@apple.com [Mon, 1 Feb 2016 00:26:56 +0000 (00:26 +0000)]
[Cocoa] Remove unused definition of HAVE_HEADER_DETECTION_H
https://bugs.webkit.org/show_bug.cgi?id=153729

Reviewed by Sam Weinig.

After r141700, HAVE_HEADER_DETECTION_H is no longer used.

* Configurations/Base.xcconfig:

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

3 years agoB3->Air lowering should use MoveFloat more
fpizlo@apple.com [Mon, 1 Feb 2016 00:07:06 +0000 (00:07 +0000)]
B3->Air lowering should use MoveFloat more
https://bugs.webkit.org/show_bug.cgi?id=153714

Reviewed by Sam Weinig.

This is a very minor and benign bug. It just means that we will use the more canonical
MoveFloat instruction when moving floats, rather than using MoveDouble.

* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::relaxedMoveForType):

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

3 years agoShould not predict OtherObj for ToThis with primitive types under strict mode
utatane.tea@gmail.com [Sun, 31 Jan 2016 23:05:10 +0000 (23:05 +0000)]
Should not predict OtherObj for ToThis with primitive types under strict mode
https://bugs.webkit.org/show_bug.cgi?id=153544

Reviewed by Filip Pizlo.

Currently, ToThis predicates OtherObj for primitive values.
But it's not true in strict mode.
In strict mode, ToThis does nothing on primitive values.

In this patch, we

1. fix prediction. Handles primitive types in strict mode. And we also handles StringObject.
2. convert it to Identity if the argument should be predicted as primitive types.

This optimization is important to implement Primitive.prototype.methods[1].
Otherwise, we always got BadType OSR exits.

[1]: https://bugs.webkit.org/show_bug.cgi?id=143889

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::fixupToThis):
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* tests/stress/to-this-boolean.js: Added.
(Boolean.prototype.negate):
(Boolean.prototype.negate2):
* tests/stress/to-this-double.js: Added.
(Number.prototype.negate):
* tests/stress/to-this-int32.js: Added.
(Number.prototype.negate):
* tests/stress/to-this-int52.js: Added.
(Number.prototype.negate):
* tests/stress/to-this-number.js: Added.
(Number.prototype.negate):
* tests/stress/to-this-string.js: Added.
(String.prototype.prefix):
(String.prototype.first):
(String.prototype.second):
* tests/stress/to-this-symbol.js: Added.
(Symbol.prototype.identity):
(Symbol.prototype.identity2):

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

3 years ago[Cocoa] Remove __has_include guards around use of WebKitAdditions
mitz@apple.com [Sun, 31 Jan 2016 23:00:03 +0000 (23:00 +0000)]
[Cocoa] Remove __has_include guards around use of WebKitAdditions
https://bugs.webkit.org/show_bug.cgi?id=153728

Reviewed by Andy Estes.

Guard WebKitAdditions includes with #if USE(APPLE_INTERNAL_SDK) rather than with __has_include.

Source/WebCore:

* dom/EventNames.h:
* loader/EmptyClients.cpp:
(WebCore::fillWithEmptyClients):
* page/MainFrame.cpp:
(WebCore::MainFrame::MainFrame):
* page/MainFrame.h:
* page/PageConfiguration.h:
* platform/cocoa/WebKitAdditions.mm:
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
* platform/ios/LegacyTileGridTile.mm:

Source/WebKit/mac:

* WebKitAdditions.mm:
* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):

Source/WebKit2:

* Shared/Cocoa/WebKitAdditions.mm:
* Shared/WebCoreArgumentCoders.h:
* Shared/mac/RemoteLayerBackingStore.mm:
* UIProcess/API/Cocoa/WKWebView.mm:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::reattachToWebProcess):
(WebKit::WebPageProxy::resetState):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_shouldDispatchFakeMouseMoveEvents):

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

3 years agoInclude the right WebKitAdditions files
timothy_horton@apple.com [Sun, 31 Jan 2016 20:59:21 +0000 (20:59 +0000)]
Include the right WebKitAdditions files
<rdar://problem/24429804>

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::resetState):

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

3 years agoReplace CaseFoldingHash with ASCIICaseInsensitiveHash
darin@apple.com [Sun, 31 Jan 2016 19:22:31 +0000 (19:22 +0000)]
Replace CaseFoldingHash with ASCIICaseInsensitiveHash
https://bugs.webkit.org/show_bug.cgi?id=153639

Reviewed by Filip Pizlo.

Source/WebCore:

* Modules/webdatabase/DatabaseAuthorizer.h: Use ASCIICaseInsensitiveHash
for whitelisted functions. Function names are all ASCII.

* accessibility/AccessibilityObject.cpp: Use ASCIICaseInsensitiveHash
for ARIA roles. ARIA roles are all ASCII.

* crypto/CryptoAlgorithmRegistry.h: Use ASCIICaseInsensitiveHash for
crypto algorithm names. Algorithm names are all ASCII.

* css/CSSFontSelector.cpp:
(WebCore::registerLocalFontFacesForFamily): Use ASCIICaseInsensitiveHash
for font faces. Face names should use ASCII case insensitive matching;
there is no need for non-ASCII case folding.
* css/CSSFontSelector.h: Ditto.

* dom/DOMImplementation.cpp: Use ASCIICaseInsensitiveHash for the
FeatureSet. The features are all ASCII.

* dom/Document.h: Use ASCIICaseInsensitiveHash for the access key
map. Access keys are all ASCII.

* dom/ScriptElement.cpp:
(WebCore::isLegacySupportedJavaScriptLanguage): Use ASCIICaseInsensitiveHash
for the language set. These strings are all ASCII.

* editing/EditorCommand.cpp: Use ASCIICaseInsensitiveHash for editor
command names. These names are all ASCII.

* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parametersForPlugin): Use ASCIICaseInsensitiveHash
for parameter names. These names are all ASCII.

* html/InputType.cpp: Use ASCIICaseInsensitiveHash for the input types.
The input types are all ASCII.

* loader/CrossOriginAccessControl.h: Use ASCIICaseInsensitiveHash for
HTTP header field names. These names are all ASCII.
* loader/CrossOriginPreflightResultCache.h: Ditto.

* loader/archive/ArchiveFactory.cpp: Use ASCIICaseInsensitiveHash for
MIME types. MIME types are all ASCII.
* platform/MIMETypeRegistry.cpp:
(WebCore::initializeSupportedImageMIMETypes): Ditto.

* platform/SchemeRegistry.h: Use ASCIICaseInsensitiveHas for URL schemes.
URL schemes are all ASCII.
* platform/URL.cpp: Ditto.

* platform/graphics/FontCache.cpp:
(WebCore::FontPlatformDataCacheKey::operator==): Use ASCIICaseInsensitiveHash.
(WebCore::FontPlatformDataCacheKeyHash::hash): Use ASCIICaseInsensitiveHash.

* platform/graphics/FontCascade.cpp:
(WebCore::keysMatch): Rename from operator== since this operation is not
equality. Changed to equalIgnoringASCIICase and did a little streamlining.
(WebCore::makeFontCascadeCacheKey): Use reserveInitialCapacity for slightly
better memory use.
(WebCore::computeFontCascadeCacheHash): Use IntegerHasher to make computing
a hash more efficient by eliminating the overhead of building a vector and
even possible heap allocation and deallocation.
(WebCore::retrieveOrAddCachedFonts): Use keysMatch instead of ==.

* platform/graphics/cocoa/FontCacheCoreText.cpp: Use ASCIICaseInsensitiveHash
for font family names. These names should use ASCII case insensitive matching;
there is no need for non-ASCII case folding.

* platform/network/HTTPHeaderMap.h: Use ASCIICaseInsensitiveHash for
HTTP header field names. These names are all ASCII.

* rendering/style/RenderStyle.cpp:
(WebCore::computeFontHash): Use IntegerHasher to avoid allocating memory just
to compute a hash. Use ASCIICaseInsensitiveHash.

Source/WebKit/win:

* WebCoreStatistics.cpp:
(WebCoreStatistics::memoryStatistics): Use ASCIICaseInsensitiveHash for field names.
These names are all ASCII.

* WebURLResponse.cpp:
(WebURLResponse::allHeaderFields): Use ASCIICaseInsensitiveHash for HTTP header
field names. These names are all ASCII.

Source/WebKit2:

* UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: Use ASCIICaseInsensitiveHash
for MIME types. MIME types are all ASCII.

* UIProcess/Plugins/PlugInAutoStartProvider.h: Use ASCIICaseInsensitiveHash for
origins. Origin strings should use ASCII case insensitive matching and should not
fold non-ASCII case.

* WebProcess/WebPage/WebPage.h: Use ASCIICaseInsensitiveHash for MIME types.
MIME types are all ASCII.

* WebProcess/WebProcess.cpp:
(WebKit::addCaseFoldedCharacters): Use ASCIICaseInsensitiveHash to hash plug-in
origin strings. (See rationale above.)
(WebKit::hashForPlugInOrigin): Updated comment.

Source/WTF:

* wtf/text/StringHash.h: Renamed CaseFoldingHash to ASCIICaseInsensitiveHash.
(WTF::ASCIICaseInsensitiveHash::foldCase): Use toASCIILower.
(WTF::ASCIICaseInsensitiveHash::equal): Use equalIgnoringASCIICase.
Also added some assertions.

* wtf/text/StringImpl.cpp: Made the latin1CaseFoldTable private to this file,
since it's no longer needed by CaseFoldingHash. Moved it up before its first use.
(WTF::equalCompatibilityCaseless): Fixed typo in the name of this function.
(WTF::equalCompatibiltyCaselessNonNull): Deleted.

* wtf/text/StringImpl.h: Removed declarations of latin1CaseFoldTable and
equalCompatibiltyCaselessNonNull

Tools:

* Scripts/do-webcore-rename: Use script to do this rename.

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

3 years agoReduce PassRefPtr uses in dom - 5
gyuyoung.kim@webkit.org [Sun, 31 Jan 2016 12:08:32 +0000 (12:08 +0000)]
Reduce PassRefPtr uses in dom - 5
https://bugs.webkit.org/show_bug.cgi?id=153470

Reviewed by Darin Adler.

As a step to remove PassRefPtr, this patch reduces uses of PassRefPtr in WebCore/dom.

* dom/Document.cpp:
(WebCore::Document::adoptNode):
(WebCore::Document::implicitClose):
(WebCore::Document::enqueuePopstateEvent):
(WebCore::Document::setInputCursor):
* dom/Document.h:
* dom/DocumentMarker.cpp:
(WebCore::DocumentMarkerTextMatch::instanceFor):
* dom/Event.cpp:
(WebCore::Event::setUnderlyingEvent):
* dom/Event.h:
* dom/EventDispatcher.h:
* dom/GenericEventQueue.cpp:
(WebCore::GenericEventQueue::enqueueEvent):
* dom/GenericEventQueue.h:
* dom/MouseEvent.cpp:
(WebCore::SimulatedMouseEvent::SimulatedMouseEvent):
* dom/Node.cpp:
(WebCore::Node::dispatchDOMActivateEvent):
* dom/NodeIterator.h:
* dom/PendingScript.h:
* dom/PopStateEvent.cpp:
(WebCore::PopStateEvent::create):
* dom/PopStateEvent.h:
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::setCSSStyleSheet): Deleted. Nobody calls this function.
* dom/ProcessingInstruction.h:
* dom/RangeBoundaryPoint.h:
(WebCore::RangeBoundaryPoint::RangeBoundaryPoint):
* dom/TextEvent.cpp:
(WebCore::TextEvent::createForFragmentPaste):
(WebCore::TextEvent::TextEvent):
* dom/TextEvent.h:
* editing/Editor.cpp:
(WebCore::Editor::pasteAsFragment):
* editing/Editor.h:
* editing/mac/EditorMac.mm:
(WebCore::Editor::replaceNodeFromPasteboard):

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

3 years ago[mips] don't save to a callee saved register too early
commit-queue@webkit.org [Sun, 31 Jan 2016 11:41:52 +0000 (11:41 +0000)]
[mips] don't save to a callee saved register too early
https://bugs.webkit.org/show_bug.cgi?id=153463

If we save $gp to $s4 in pichdr, then in some cases, we were
overwriting $s4 before LLInt's pushCalleeSaves() is called (as pichdr
is at the very beginning of a function). Now we save $gp to $s4 at the
end of pushCalleeSaves().

Patch by Guillaume Emont <guijemont@igalia.com> on 2016-01-31
Reviewed by Michael Saboff.

* offlineasm/mips.rb:
* llint/LowLevelInterpreter.asm:
Move the saving of $gp to $s4 from pichdr to pushCalleeSaves(). Take
the opportunity to only save $s4 as we never use the other callee
saved registers.

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

3 years agoUse std::make_unique<> when creating an unique_ptr object.
gyuyoung.kim@webkit.org [Sun, 31 Jan 2016 11:41:44 +0000 (11:41 +0000)]
Use std::make_unique<> when creating an unique_ptr object.
https://bugs.webkit.org/show_bug.cgi?id=153705

Reviewed by Darin Adler.

Source/WebCore:

Some factory functions have used std::unique_ptr<> for creating an unique_ptr object.
It is wrong. We have to use std::make_unique<>.

* Modules/mediasession/WebMediaSessionManager.cpp:
(WebCore::WebMediaSessionManager::mockPicker):
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::internalStart):
* platform/cf/RunLoopObserver.cpp:
(WebCore::RunLoopObserver::create): Deleted.
* platform/cf/RunLoopObserver.h:
(WebCore::RunLoopObserver::RunLoopObserver):
* platform/graphics/avfoundation/WebMediaSessionManagerMac.cpp:
(WebCore::WebMediaSessionManagerMac::platformPicker):
* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
(WebCore::MediaPlaybackTargetPickerMac::create): Deleted.
* platform/graphics/ca/cocoa/LayerFlushSchedulerMac.cpp:
(WebCore::LayerFlushScheduler::LayerFlushScheduler):
* platform/mock/MediaPlaybackTargetPickerMock.cpp:
(WebCore::MediaPlaybackTargetPickerMock::create): Deleted.
* platform/mock/MediaPlaybackTargetPickerMock.h:
* rendering/FloatingObjects.cpp:
(WebCore::FloatingObject::copyToNewContainer):

Source/WebKit2:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Use std::make_unique<> instead of RunLoopObserver::create().

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

3 years agoimported/w3c/web-platform-tests/streams-api/readable-streams/garbage-collection.html...
youenn.fablet@crf.canon.fr [Sun, 31 Jan 2016 09:20:05 +0000 (09:20 +0000)]
imported/w3c/web-platform-tests/streams-api/readable-streams/garbage-collection.html asserts frequently
https://bugs.webkit.org/show_bug.cgi?id=152436

Reviewed by Darin Adler.

GCController is not available in Worker environments, explaining probably why garbage-collection-2.html is not crashing at all.
Inlining half of the tests in garbage-collection-2.html (runned in window) to compare with garbage-collection-1.html.

* web-platform-tests/streams-api/readable-streams/garbage-collection-2-expected.txt:
* web-platform-tests/streams-api/readable-streams/garbage-collection-2.html:

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

3 years agoAdd the break-* properties to Web Inspector's completion set
hyatt@apple.com [Sun, 31 Jan 2016 05:57:01 +0000 (05:57 +0000)]
Add the break-* properties to Web Inspector's completion set
https://bugs.webkit.org/show_bug.cgi?id=153706

Reviewed by Darin Adler.

* UserInterface/Models/CSSKeywordCompletions.js:

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

3 years ago[Cocoa] Get rid of many WK_ macros for nullability
mitz@apple.com [Sun, 31 Jan 2016 04:11:36 +0000 (04:11 +0000)]
[Cocoa] Get rid of many WK_ macros for nullability
https://bugs.webkit.org/show_bug.cgi?id=153718

Sam Weinig reviewed an earlier version of this change, and Simon Fraser rubber-stamped this version.

* Shared/API/Cocoa/WKFoundation.h: Removed definitions of WK_ASSUME_NONNULL_{BEGIN, END},
  WK_NULLABLE, WK_NULL_UNSPECIFIED, and WK_NULLABLE_PROPERTY. Removed the
  !__has_feature(assume_nonnull) case.

* mac/postprocess-framework-headers.sh: Removed rules for rewriting the above macros. Also
  chanegd to rewrite WK_NULLABLE_SPECIFIER to the modern _Nullable instead of __nullable.

Replaced instances of the above macros with their expansions.

* UIProcess/API/Cocoa/WKBackForwardList.h:
* UIProcess/API/Cocoa/WKBackForwardListItem.h:
* UIProcess/API/Cocoa/WKError.h:
* UIProcess/API/Cocoa/WKFrameInfo.h:
* UIProcess/API/Cocoa/WKNavigationAction.h:
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/API/Cocoa/WKNavigationResponse.h:
* UIProcess/API/Cocoa/WKScriptMessage.h:
* UIProcess/API/Cocoa/WKScriptMessageHandler.h:
* UIProcess/API/Cocoa/WKSecurityOrigin.h:
* UIProcess/API/Cocoa/WKUIDelegate.h:
* UIProcess/API/Cocoa/WKUserContentController.h:
* UIProcess/API/Cocoa/WKUserScript.h:
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:
* UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
* UIProcess/API/Cocoa/WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/WKWindowFeatures.h:
* UIProcess/API/Cocoa/_WKContextMenuElementInfo.h:
* UIProcess/API/Cocoa/_WKElementInfo.h:
* UIProcess/API/Cocoa/_WKPreviewElementInfo.h:
* UIProcess/API/Cocoa/_WKUserStyleSheet.h:

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

3 years agoB3 documentation style shouldn't have hacks for h1
fpizlo@apple.com [Sun, 31 Jan 2016 03:59:07 +0000 (03:59 +0000)]
B3 documentation style shouldn't have hacks for h1
https://bugs.webkit.org/show_bug.cgi?id=153725

Reviewed by Alexey Proskuryakov.

* docs/b3/style.css:

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

3 years agoReverted r195914, because at least one of the build.webkit.org builders still uses...
mitz@apple.com [Sun, 31 Jan 2016 01:22:38 +0000 (01:22 +0000)]
Reverted r195914, because at least one of the build.webkit.org builders still uses a compiler that doesn’t understand _Nullable.

* Shared/API/Cocoa/WKFoundation.h:
* UIProcess/API/Cocoa/WKBackForwardList.h:
* UIProcess/API/Cocoa/WKBackForwardListItem.h:
* UIProcess/API/Cocoa/WKError.h:
* UIProcess/API/Cocoa/WKFrameInfo.h:
* UIProcess/API/Cocoa/WKNavigationAction.h:
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/API/Cocoa/WKNavigationResponse.h:
* UIProcess/API/Cocoa/WKScriptMessage.h:
* UIProcess/API/Cocoa/WKScriptMessageHandler.h:
* UIProcess/API/Cocoa/WKSecurityOrigin.h:
* UIProcess/API/Cocoa/WKUIDelegate.h:
* UIProcess/API/Cocoa/WKUserContentController.h:
* UIProcess/API/Cocoa/WKUserScript.h:
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:
* UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
* UIProcess/API/Cocoa/WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/WKWindowFeatures.h:
* UIProcess/API/Cocoa/_WKContextMenuElementInfo.h:
* UIProcess/API/Cocoa/_WKElementInfo.h:
* UIProcess/API/Cocoa/_WKPreviewElementInfo.h:
* UIProcess/API/Cocoa/_WKUserStyleSheet.h:
* mac/postprocess-framework-headers.sh:

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

3 years agoUnreviewed, fix GTK debug build after r195899
mcatanzaro@igalia.com [Sun, 31 Jan 2016 01:19:32 +0000 (01:19 +0000)]
Unreviewed, fix GTK debug build after r195899

* dom/EventContext.h:
(isType):

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

3 years agoAdd missing include to fix building debug configuration
commit-queue@webkit.org [Sun, 31 Jan 2016 01:15:51 +0000 (01:15 +0000)]
Add missing include to fix building debug configuration
https://bugs.webkit.org/show_bug.cgi?id=153719

Patch by Jeremy Huddleston Sequoia <jeremyhu@apple.com> on 2016-01-30
Reviewed by Darin Adler.

No new tests.

* rendering/RenderObject.cpp:

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

3 years agoUnreviewed, rolling out r195911.
commit-queue@webkit.org [Sun, 31 Jan 2016 00:53:20 +0000 (00:53 +0000)]
Unreviewed, rolling out r195911.
https://bugs.webkit.org/show_bug.cgi?id=153723

Caused frequent assertion failures on bots (Requested by ap on
#webkit).

Reverted changeset:

"Replace CaseFoldingHash with ASCIICaseInsensitiveHash"
https://bugs.webkit.org/show_bug.cgi?id=153639
http://trac.webkit.org/changeset/195911

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

3 years agoUnreviewed, rolling out r195799 and r195828.
commit-queue@webkit.org [Sun, 31 Jan 2016 00:41:57 +0000 (00:41 +0000)]
Unreviewed, rolling out r195799 and r195828.
https://bugs.webkit.org/show_bug.cgi?id=153722

Caused assertion failures, severely affecting EWS (Requested
by ap on #webkit).

Reverted changesets:

"Web Inspector: InspectorTimelineAgent doesn't need to
recompile functions because it now uses the sampling profiler"
https://bugs.webkit.org/show_bug.cgi?id=153500
http://trac.webkit.org/changeset/195799

"Attempt to fix the Windows build after r195799"
http://trac.webkit.org/changeset/195828

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

3 years agoWeb Inspector: Network panel is empty until the window is resized
mattbaker@apple.com [Sun, 31 Jan 2016 00:24:23 +0000 (00:24 +0000)]
Web Inspector: Network panel is empty until the window is resized
https://bugs.webkit.org/show_bug.cgi?id=153701
<rdar://problem/24423739>

Reviewed by Timothy Hatcher.

NetworkGridContentView shouldn't prevent a layout from being scheduled
when the network sidebar is collapsed.

* UserInterface/Views/NetworkGridContentView.js:
(WebInspector.NetworkGridContentView.prototype.needsLayout): Deleted.
Removed View.prototype.needsLayout override that was preventing
layouts from being scheduled as timeline records are added.

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

3 years ago[Cocoa] Get rid of WK_ macros for nullability
mitz@apple.com [Sat, 30 Jan 2016 23:50:25 +0000 (23:50 +0000)]
[Cocoa] Get rid of WK_ macros for nullability
https://bugs.webkit.org/show_bug.cgi?id=153718

Reviewed by Sam Weinig.

* Shared/API/Cocoa/WKFoundation.h: Removed definitions of WK_ASSUME_NONNULL_{BEGIN, END},
  WK_NULLABLE, WK_NULL_UNSPECIFIED, WK_NULLABLE_SPECIFIER, and WK_NULLABLE_PROPERTY.

* mac/postprocess-framework-headers.sh: Removed rules for rewriting those macros.

Replaced instances of those macros with their expansions, but using the modern _Nullable
instead of __nullable:

* UIProcess/API/Cocoa/WKBackForwardList.h:
* UIProcess/API/Cocoa/WKBackForwardListItem.h:
* UIProcess/API/Cocoa/WKError.h:
* UIProcess/API/Cocoa/WKFrameInfo.h:
* UIProcess/API/Cocoa/WKNavigationAction.h:
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/API/Cocoa/WKNavigationResponse.h:
* UIProcess/API/Cocoa/WKScriptMessage.h:
* UIProcess/API/Cocoa/WKScriptMessageHandler.h:
* UIProcess/API/Cocoa/WKSecurityOrigin.h:
* UIProcess/API/Cocoa/WKUIDelegate.h:
* UIProcess/API/Cocoa/WKUserContentController.h:
* UIProcess/API/Cocoa/WKUserScript.h:
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:
* UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
* UIProcess/API/Cocoa/WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/WKWindowFeatures.h:
* UIProcess/API/Cocoa/_WKContextMenuElementInfo.h:
* UIProcess/API/Cocoa/_WKElementInfo.h:
* UIProcess/API/Cocoa/_WKPreviewElementInfo.h:
* UIProcess/API/Cocoa/_WKUserStyleSheet.h:

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

3 years agoModern IDB: Some tests crash with specific odd database names.
beidson@apple.com [Sat, 30 Jan 2016 22:25:21 +0000 (22:25 +0000)]
Modern IDB: Some tests crash with specific odd database names.
https://bugs.webkit.org/show_bug.cgi?id=153688

Reviewed by Darin Adler.

Source/WebCore:

No new tests (2 existing tests now pass).

* platform/FileSystem.cpp:
(WebCore::shouldEscapeUChar): Return true for some surrogate-pair situations.
(WebCore::encodeForFileName): Pass along the previous and next characters, as well,
  and do a two byte escaping for some characters.

LayoutTests:

* platform/mac-wk1/TestExpectations:

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

3 years agoMore than one audio and/or text track sometimes selected in media controls menu
eric.carlson@apple.com [Sat, 30 Jan 2016 22:19:08 +0000 (22:19 +0000)]
More than one audio and/or text track sometimes selected in media controls menu
https://bugs.webkit.org/show_bug.cgi?id=153664

Source/WebCore:

Use an <img> element for the track menu item checkmark instead of a background image and
the ::before selector.

Reviewed by Jer Noble.

Test: media/controls/track-menu.html

* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-closed-captions-container li:hover):
(audio::-webkit-media-controls-closed-captions-container li .checkmark-container):
(audio::-webkit-media-controls-closed-captions-container li.selected .checkmark-container):
(audio::-webkit-media-controls-closed-captions-container li.selected:hover .checkmark-container):
(audio::-webkit-media-controls-closed-captions-container li.selected::before): Deleted.
(audio::-webkit-media-controls-closed-captions-container li.selected:hover::before): Deleted.
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.buildCaptionMenu):
(Controller.prototype.):
(Controller.prototype.getCurrentControlsStatus):

LayoutTests:

Reviewed by Jer Noble.

* media/controls/controls-test-helpers.js:
(ControlsTest.prototype.get currentState):
(ControlsTest.prototype.get video):
(ControlsTest.prototype.stateForControlsElement):
(ControlsTest.prototype.handleEvent):
(ControlsTest.prototype.setup):
(ControlsTest.prototype.start):
(ControlsTest.prototype.isEqualTo):
(ControlsTest.prototype.isNotEqualTo):
(ControlsTest.prototype.contains):
* media/controls/track-menu-expected.txt: Added.
* media/controls/track-menu.html: Added.

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

3 years agoReplace CaseFoldingHash with ASCIICaseInsensitiveHash
darin@apple.com [Sat, 30 Jan 2016 21:53:47 +0000 (21:53 +0000)]
Replace CaseFoldingHash with ASCIICaseInsensitiveHash
https://bugs.webkit.org/show_bug.cgi?id=153639

Reviewed by Filip Pizlo.

Source/WebCore:

* Modules/webdatabase/DatabaseAuthorizer.h: Use ASCIICaseInsensitiveHash
for whitelisted functions. Function names are all ASCII.

* accessibility/AccessibilityObject.cpp: Use ASCIICaseInsensitiveHash
for ARIA roles. ARIA roles are all ASCII.

* crypto/CryptoAlgorithmRegistry.h: Use ASCIICaseInsensitiveHash for
crypto algorithm names. Algorithm names are all ASCII.

* css/CSSFontSelector.cpp:
(WebCore::registerLocalFontFacesForFamily): Use ASCIICaseInsensitiveHash
for font faces. Face names should use ASCII case insensitive matching;
there is no need for non-ASCII case folding.
* css/CSSFontSelector.h: Ditto.

* dom/DOMImplementation.cpp: Use ASCIICaseInsensitiveHash for the
FeatureSet. The features are all ASCII.

* dom/Document.h: Use ASCIICaseInsensitiveHash for the access key
map. Access keys are all ASCII.

* dom/ScriptElement.cpp:
(WebCore::isLegacySupportedJavaScriptLanguage): Use ASCIICaseInsensitiveHash
for the language set. These strings are all ASCII.

* editing/EditorCommand.cpp: Use ASCIICaseInsensitiveHash for editor
command names. These names are all ASCII.

* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parametersForPlugin): Use ASCIICaseInsensitiveHash
for parameter names. These names are all ASCII.

* html/InputType.cpp: Use ASCIICaseInsensitiveHash for the input types.
The input types are all ASCII.

* loader/CrossOriginAccessControl.h: Use ASCIICaseInsensitiveHash for
HTTP header field names. These names are all ASCII.
* loader/CrossOriginPreflightResultCache.h: Ditto.

* loader/archive/ArchiveFactory.cpp: Use ASCIICaseInsensitiveHash for
MIME types. MIME types are all ASCII.
* platform/MIMETypeRegistry.cpp:
(WebCore::initializeSupportedImageMIMETypes): Ditto.

* platform/SchemeRegistry.h: Use ASCIICaseInsensitiveHas for URL schemes.
URL schemes are all ASCII.
* platform/URL.cpp: Ditto.

* platform/graphics/FontCache.cpp: Reworked FontPlatformDataCacheKey struct:
Made it a conventional struct with non-prefixed data members names. Removed
the "==" operator since it was appropriate for hash table lookup but wasn't
a true equality operator. Tightened the implementations of the constructors.
(WebCore::FontPlatformDataCacheKeyHash::hash): Use ASCIICaseInsensitiveHash.
(WebCore::FontPlatformDataCacheKeyHash::equal): Do the equality check here,
not using the == operator. And use equalIgnoringASCIICase.
(WebCore::FontPlatformDataCacheKeyTraits::isEmptyValue): Added this entire
traits struct so we check empty values in a more efficient way.
(WebCore::FontCache::getCachedFontPlatformData): Added comments and tweaked
style in this function.

* platform/graphics/FontCascade.cpp:
(WebCore::keysMatch): Rename from operator== since this operation is not
equality. Changed to equalIgnoringASCIICase and did a little streamlining.
(WebCore::makeFontCascadeCacheKey): Use reserveInitialCapacity for slightly
better memory use.
(WebCore::computeFontCascadeCacheHash): Use IntegerHasher to make computing
a hash more efficient by eliminating the overhead of building a vector and
even possible heap allocation and deallocation.
(WebCore::retrieveOrAddCachedFonts): Use keysMatch instead of ==.

* platform/graphics/cocoa/FontCacheCoreText.cpp: Use ASCIICaseInsensitiveHash
for font family names. These names should use ASCII case insensitive matching;
there is no need for non-ASCII case folding.

* platform/network/HTTPHeaderMap.h: Use ASCIICaseInsensitiveHash for
HTTP header field names. These names are all ASCII.

* rendering/style/RenderStyle.cpp:
(WebCore::computeFontHash): Use IntegerHasher to avoid allocating memory just
to compute a hash. Use ASCIICaseInsensitiveHash.

Source/WebKit/win:

* WebCoreStatistics.cpp:
(WebCoreStatistics::memoryStatistics): Use ASCIICaseInsensitiveHash for field names.
These names are all ASCII.

* WebURLResponse.cpp:
(WebURLResponse::allHeaderFields): Use ASCIICaseInsensitiveHash for HTTP header
field names. These names are all ASCII.

Source/WebKit2:

* UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: Use ASCIICaseInsensitiveHash
for MIME types. MIME types are all ASCII.

* UIProcess/Plugins/PlugInAutoStartProvider.h: Use ASCIICaseInsensitiveHash for
origins. Origin strings should use ASCII case insensitive matching and should not
fold non-ASCII case.

* WebProcess/WebPage/WebPage.h: Use ASCIICaseInsensitiveHash for MIME types.
MIME types are all ASCII.

* WebProcess/WebProcess.cpp:
(WebKit::addCaseFoldedCharacters): Use ASCIICaseInsensitiveHash to hash plug-in
origin strings. (See rationale above.)
(WebKit::hashForPlugInOrigin): Updated comment.

Source/WTF:

* wtf/text/StringHash.h: Renamed CaseFoldingHash to ASCIICaseInsensitiveHash.
(WTF::ASCIICaseInsensitiveHash::foldCase): Use toASCIILower.
(WTF::ASCIICaseInsensitiveHash::equal): Use equalIgnoringASCIICase.
Also added some assertions.

* wtf/text/StringImpl.cpp: Made the latin1CaseFoldTable private to this file,
since it's no longer needed by CaseFoldingHash. Moved it up before its first use.
(WTF::equalCompatibilityCaseless): Fixed typo in the name of this function.
(WTF::equalCompatibiltyCaselessNonNull): Deleted.

* wtf/text/StringImpl.h: Removed declarations of latin1CaseFoldTable and
equalCompatibiltyCaselessNonNull

Tools:

* Scripts/do-webcore-rename: Use script to do this rename.

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

3 years agoWeb Inspector: Object tree parent items are misaligned
commit-queue@webkit.org [Sat, 30 Jan 2016 21:49:31 +0000 (21:49 +0000)]
Web Inspector: Object tree parent items are misaligned
https://bugs.webkit.org/show_bug.cgi?id=153699
<rdar://problem/24423683>

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2016-01-30
Reviewed by Darin Adler.

* UserInterface/Views/ObjectTreeView.css:
(.object-tree .object-tree):
Ensure that toplevel Object preview trees are displayed properly while also
making child trees inline.

* UserInterface/Views/TreeOutline.css:
(.tree-outline:not(.hide-disclosure-buttons) .item:not(.parent) > .icon):
(.tree-outline:not(.hide-disclosure-buttons) .item:not(.parent) .icon): Deleted.
This would apply to all .icon elements contained within a non-parent item,
which is not the desired effect. Instead, this should only apply to only the
.icon element of that particular non-parent item.

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

3 years agoUnreviewed, rolling out r195871.
cdumez@apple.com [Sat, 30 Jan 2016 21:39:00 +0000 (21:39 +0000)]
Unreviewed, rolling out r195871.

Caused several layout tests to time out

Reverted changeset:

"Tab suspension code shouldn't use page cache cacheability
logic"
https://bugs.webkit.org/show_bug.cgi?id=153680
http://trac.webkit.org/changeset/195871

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

3 years agoUnreviewed, rebaseline bindings tests after r195904.
cdumez@apple.com [Sat, 30 Jan 2016 21:34:43 +0000 (21:34 +0000)]
Unreviewed, rebaseline bindings tests after r195904.

* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::JSTestCustomNamedGetter::getOwnPropertySlot):
(WebCore::jsTestCustomNamedGetterConstructor):
(WebCore::setJSTestCustomNamedGetterConstructor):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::JSTestEventTarget::getOwnPropertySlot):
(WebCore::jsTestEventTargetConstructor):
(WebCore::setJSTestEventTargetConstructor):
* bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
(WebCore::JSTestOverrideBuiltins::getOwnPropertySlot):
(WebCore::jsTestOverrideBuiltinsConstructor):
(WebCore::setJSTestOverrideBuiltinsConstructor):

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

3 years ago[JS Bindings] prototype.constructor should be writable
cdumez@apple.com [Sat, 30 Jan 2016 21:01:09 +0000 (21:01 +0000)]
[JS Bindings] prototype.constructor should be writable
https://bugs.webkit.org/show_bug.cgi?id=149412
<rdar://problem/22545096>

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline W3C tests now that more checks are passing.

* web-platform-tests/XMLHttpRequest/interfaces-expected.txt:
* web-platform-tests/dom/interfaces-expected.txt:
* web-platform-tests/fetch/api/headers/headers-idl-expected.txt:
* web-platform-tests/html/dom/interfaces-expected.txt:

Source/WebCore:

prototype.constructor should have the following properties:
{ [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }

as per the Web IDL specification:
https://heycam.github.io/webidl/#interface-prototype-object

In WebKit, it is currently not writable. It is writable in Firefox.

This patch was first landed in r190085 but was rolled out for causing
crashes: <rdar://problem/22825602>. The issue was that even though we
marked constructor as writable, we failed to generate a setter for it.
This patch addresses the issue and the crash in <rdar://problem/22825602>
no longer occurs after this change. A regression test is also added for
this crash.

Tests:
fast/dom/HTMLDocument/constructor-setter-crash.html
fast/dom/prototype-constructor-setter.html

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateAttributesHashTable):
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::setJSTestActiveDOMObjectConstructor):
* bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
(WebCore::setJSTestClassWithJSBuiltinConstructorConstructor):
* bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
(WebCore::setJSTestCustomConstructorWithNoInterfaceObjectConstructor):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::setJSTestCustomNamedGetterConstructor):
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::setJSTestEventConstructorConstructor):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::setJSTestEventTargetConstructor):
* bindings/scripts/test/JS/JSTestException.cpp:
(WebCore::setJSTestExceptionConstructor):
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
(WebCore::setJSTestGenerateIsReachableConstructor):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::setJSTestInterfaceConstructor):
* bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
(WebCore::setJSTestJSBuiltinConstructorConstructor):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::setJSTestMediaQueryListListenerConstructor):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::setJSTestNamedConstructorConstructor):
* bindings/scripts/test/JS/JSTestNode.cpp:
(WebCore::setJSTestNodeConstructor):
* bindings/scripts/test/JS/JSTestNondeterministic.cpp:
(WebCore::setJSTestNondeterministicConstructor):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::setJSTestObjConstructor):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::setJSTestOverloadedConstructorsConstructor):
* bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
(WebCore::setJSTestOverrideBuiltinsConstructor):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::setJSTestSerializedScriptValueInterfaceConstructor):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::setJSTestTypedefsConstructor):
* bindings/scripts/test/JS/JSattribute.cpp:
(WebCore::setJSattributeConstructor):
* bindings/scripts/test/JS/JSreadonly.cpp:
(WebCore::setJSreadonlyConstructor):
* page/DOMWindow.idl:

LayoutTests:

* fast/dom/HTMLDocument/constructor-setter-crash-expected.txt: Added.
* fast/dom/HTMLDocument/constructor-setter-crash.html: Added.
Add regression test for crash at <rdar://problem/22825602>.

* fast/dom/prototype-constructor-setter-expected.txt: Added.
* fast/dom/prototype-constructor-setter.html: Added.
Add new test checking that prototype.constructor is writable.

* js/dom/constructor-attributes-expected.txt:
Rebaseline existing test now that prototype.constructor is writable.

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

3 years ago[B3] JetStream/quicksort.c fails/hangs on Linux with GCC
utatane.tea@gmail.com [Sat, 30 Jan 2016 20:57:09 +0000 (20:57 +0000)]
[B3] JetStream/quicksort.c fails/hangs on Linux with GCC
https://bugs.webkit.org/show_bug.cgi?id=153647

Reviewed by Filip Pizlo.

In B3ComputeDivisionMagic, we accidentally perform sub, add operation onto signed integer. (In this case, int32_t)
But integer overflow is undefined behavior in C![1][2]
As a result, in GCC 4.9 release build, computeDivisionMagic(2) returns unexpected value.
`divisor = 2`
`d = 2`
`signedMin = INT32_MIN = -2147483647 (-0x7fffffff)`
`t = signedMin`
`anc = t - 1 - (t % ad)` Oops, we performed overflow operation!

So, `anc` value becomes undefined.
In this patch, we first cast all the operated values to unsigned one.
Reading the code, there are no operations that depends on signedness. (For example, we used aboveEqual like unsigned operations for comparison.)

[1]: http://blog.llvm.org/2011/05/what-every-c-programmer-should-know.html
[2]: http://dl.acm.org/citation.cfm?id=2522728

* b3/B3ComputeDivisionMagic.h:
(JSC::B3::computeDivisionMagic):
* b3/testb3.cpp:
(JSC::B3::testComputeDivisionMagic):
(JSC::B3::run):

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

3 years agoShrink Heap::m_executables after cleaning it.
akling@apple.com [Sat, 30 Jan 2016 20:48:11 +0000 (20:48 +0000)]
Shrink Heap::m_executables after cleaning it.
<https://webkit.org/b/153682>

Reviewed by Darin Adler.

The Heap::m_executables Vector was never shrunk down, despite sometimes
getting pretty huge (~500kB in my longest-running WebContent process.)

After GC has finished pruning unmarked Executables, shrink the Vector.

* heap/Heap.cpp:
(JSC::Heap::clearUnmarkedExecutables):

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

3 years agoMove more 'constructor' properties to the prototype
cdumez@apple.com [Sat, 30 Jan 2016 20:10:18 +0000 (20:10 +0000)]
Move more 'constructor' properties to the prototype
https://bugs.webkit.org/show_bug.cgi?id=153667

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline several W3C tests now that more checks are passing. A lot of
the 'constructor' attributes checks are still failing because the
attribute is not writable. This is being addressed via Bug 149412.

* web-platform-tests/dom/collections/HTMLCollection-supported-property-names-expected.txt:
* web-platform-tests/dom/interfaces-expected.txt:
* web-platform-tests/dom/nodes/Element-getElementsByTagName-expected.txt:
* web-platform-tests/html/dom/documents/dom-tree-accessors/document.forms-expected.txt:
* web-platform-tests/html/dom/interfaces-expected.txt:

Source/WebCore:

Move more 'constructor' properties to the prototype. In particular, we
used to keep the 'constructor' on the instance for interfaces that have
an indexed / named property getter because our getOwnPropertySlot()
implementation used to be wrong for such interfaces.

However, getOwnPropertySlot() should be correct after r188590 so we
should now be able to move the 'constructor' up to the prototype for
these interfaces, as per the specification:
http://heycam.github.io/webidl/#interface-prototype-object

No new tests, already covered by existing tests.

* bindings/js/JSPluginElementFunctions.h:
(WebCore::pluginElementCustomGetOwnPropertySlot):
Add a null check for staticPropHashTable. It is now null because this
type no longer has any property on the instance now that 'constructor'
is on the prototype.

* bindings/scripts/CodeGeneratorJS.pm:
(ConstructorShouldBeOnInstance):

LayoutTests:

Rebaseline a couple of tests now that 'constructor' is on the prototype
for more interfaces.

* fast/dom/htmlcollection-getownpropertynames-expected.txt:
* storage/domstorage/localstorage/delete-defineproperty-removal-expected.txt:

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

3 years agoImprove the style of B3 documentation
fpizlo@apple.com [Sat, 30 Jan 2016 20:06:53 +0000 (20:06 +0000)]
Improve the style of B3 documentation
https://bugs.webkit.org/show_bug.cgi?id=153674

Reviewed by Oliver Hunt.

This makes the style of the B3 documentation look like the Wiki, which I think is
appropriate for the kind of content that we're putting into it - in particular, the font
is the perfect size for dense content. The style also doesn't require much spoonfeeding
from the HTML side so you can write nice looking documentation by just using really
basic HTML constructs.

* docs/b3/assembly-intermediate-representation.html:
* docs/b3/index.html:
* docs/b3/intermediate-representation.html:
* docs/b3/style.css:

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

3 years ago[GTK] Use configured python executable when executing generate-inspector-gresource...
commit-queue@webkit.org [Sat, 30 Jan 2016 20:01:45 +0000 (20:01 +0000)]
[GTK] Use configured python executable when executing generate-inspector-gresource-manifest.py
https://bugs.webkit.org/show_bug.cgi?id=153712

Patch by Jeremy Huddleston Sequoia <jeremyhu@apple.com> on 2016-01-30
Reviewed by Michael Catanzaro.

* PlatformGTK.cmake:

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

3 years agoEnable VIDEO_PRESENTATION_MODE only in Debug and Release builds on Mac
adachan@apple.com [Sat, 30 Jan 2016 19:30:49 +0000 (19:30 +0000)]
Enable VIDEO_PRESENTATION_MODE only in Debug and Release builds on Mac
https://bugs.webkit.org/show_bug.cgi?id=153665

Reviewed by Dan Bernstein.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

* wtf/Platform.h:
Remove this as the flag is already defined in FeatureDefines.xcconfig files.

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

3 years ago[iOS] WebKit1 apps crash in ___ZN7WebCore16DiskCacheMonitorC2ERKNS_15ResourceRequestE...
ddkilzer@apple.com [Sat, 30 Jan 2016 19:22:58 +0000 (19:22 +0000)]
[iOS] WebKit1 apps crash in ___ZN7WebCore16DiskCacheMonitorC2ERKNS_15ResourceRequestENS_9SessionIDEPK20_CFCachedURLResponse_block_invoke1
<http://webkit.org/b/153710>
<rdar://problem/23116706>

Reviewed by Darin Adler.

* loader/cocoa/DiskCacheMonitorCocoa.mm:
(WebCore::DiskCacheMonitor::DiskCacheMonitor):
- Fix race condition on iOS WebKit1 clients by calling the block
  to cancel the DiskCacheMonitor on the WebThread, which is the
  same thread where the CFCachedURLResponseCallBackBlock is
  called.
- Removed whitespace to adhere to style.

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

3 years agoTouchList should be retargeted
rniwa@webkit.org [Sat, 30 Jan 2016 18:38:20 +0000 (18:38 +0000)]
TouchList should be retargeted
https://bugs.webkit.org/show_bug.cgi?id=149592

Reviewed by Antti Koivisto.

Source/WebCore:

Retarget touch target's using the same algorithm as the one used for related targets instead of
EventRelatedNodeResolver which is removed in this patch.

Also enable the retargeting on iOS.

Test: fast/shadow-dom/touch-event-ios.html

* dom/EventContext.cpp:
(WebCore::TouchEventContext::TouchEventContext):
(WebCore::TouchEventContext::handleLocalEvents):
(WebCore::TouchEventContext::checkReachability):
* dom/EventContext.h:
(WebCore::toTouchEventContext):
(WebCore::EventContext::isUnreachableNode):
* dom/EventDispatcher.cpp:
(WebCore::EventRelatedNodeResolver): Deleted.
(WebCore::EventPath::EventPath):
(WebCore::EventDispatcher::dispatchEvent):
(WebCore::addRelatedNodeResolversForTouchList): Deleted.
(WebCore::EventPath::updateTouchLists): Deleted.
(WebCore::EventPath::setRelatedTarget): Removed superfluous UNUSED_PARAM since the argument is always used.
(WebCore::EventPath::retargetTouch): Extracted from updateTouchLists/setRelatedTarget. Clones Touch object
with the new target for each event context just like related targets.
(WebCore::EventPath::retargetTouchLists): Renamed from updateTouchLists. Calls retargetTouch on each Touch
object in each TouchList.
* dom/TouchEvent.h:

Tools:

Added touchDownAtPoint and liftUpAtPoint to UIScriptController so that we can test touch events with
multiple touch targets on iOS. fast/shadow-dom/touch-event-ios.html uses this new testing feature.

* WebKitTestRunner/UIScriptContext/Bindings/UIScriptController.idl:
* WebKitTestRunner/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::touchDownAtPoint): Added.
(WTR::UIScriptController::liftUpAtPoint): Added.
* WebKitTestRunner/UIScriptContext/UIScriptController.h:
* WebKitTestRunner/ios/HIDEventGenerator.h:
* WebKitTestRunner/ios/HIDEventGenerator.mm:
(-[HIDEventGenerator touchDown:touchCount:completionBlock:]): Added. Sends touch down and waits.
(-[HIDEventGenerator liftUp:touchCount:completionBlock:]): Ditto for lift up.
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::touchDownAtPoint): Added.
(WTR::UIScriptController::liftUpAtPoint): Added.

LayoutTests:

Added a regression test for retargeting touch targets on iOS.

* fast/shadow-dom/touch-event-ios-expected.txt: Added.
* fast/shadow-dom/touch-event-ios.html: Added.
* platform/mac/TestExpectations: Added the failing expectation on Mac since touch support is not enabled.

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

3 years ago[B3] REGRESSION(r195882): Should break early after modConstant replaceWithNewValue...
utatane.tea@gmail.com [Sat, 30 Jan 2016 18:09:44 +0000 (18:09 +0000)]
[B3] REGRESSION(r195882): Should break early after modConstant replaceWithNewValue succeeds
https://bugs.webkit.org/show_bug.cgi?id=153711

Reviewed by Filip Pizlo.

Should break after modConstant replaceWithNewValue succeeds. m_value is already replaced with Identity
if modConstant succeeds. So it does not have any children. m_value->child(1) breaks testb3.

* b3/B3ReduceStrength.cpp:

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

3 years ago[GTK] Two disk cache tests are failing
mcatanzaro@igalia.com [Sat, 30 Jan 2016 17:02:53 +0000 (17:02 +0000)]
[GTK] Two disk cache tests are failing

Unreviewed gardening.

* platform/gtk/TestExpectations:

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

3 years ago[GTK] Some W3C DOM tests are failing
mcatanzaro@igalia.com [Sat, 30 Jan 2016 16:48:09 +0000 (16:48 +0000)]
[GTK] Some W3C DOM tests are failing

Unreviewed gardening.

* platform/gtk/TestExpectations:

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

3 years ago[GTK] IndexedDB expectations gardening
mcatanzaro@igalia.com [Sat, 30 Jan 2016 16:38:07 +0000 (16:38 +0000)]
[GTK] IndexedDB expectations gardening

Unreviewed gardening.

* platform/gtk/TestExpectations:

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

3 years ago[GTK] platform/gtk/scrollbars/overflow-scrollbar-horizontal-wheel-scroll.html is...
mcatanzaro@igalia.com [Sat, 30 Jan 2016 16:14:15 +0000 (16:14 +0000)]
[GTK] platform/gtk/scrollbars/overflow-scrollbar-horizontal-wheel-scroll.html is failing

Unreviewed gardening.

* platform/gtk/TestExpectations:

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

3 years ago[GTK] Some organization in the test expectations file
mcatanzaro@igalia.com [Sat, 30 Jan 2016 16:03:24 +0000 (16:03 +0000)]
[GTK] Some organization in the test expectations file

Unreviewed.

* platform/gtk/TestExpectations:

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

3 years agoSupport break-after, break-before and break-inside.
hyatt@apple.com [Sat, 30 Jan 2016 15:28:48 +0000 (15:28 +0000)]
Support break-after, break-before and break-inside.
https://bugs.webkit.org/show_bug.cgi?id=148814

Reviewed by Dean Jackson.

Source/WebCore:

New tests added in printing/, fast/multicol/, and fast/regions.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::convertToPageBreak):
(WebCore::convertToColumnBreak):
(WebCore::convertToRegionBreak):
For backwards compatibility, keep support for all the old properties in
computed style. This means we have to convert the break-* property values
into keywords that make sense for the legacy properties. This mainly
involves mapping "page", "column", "region" to "always" (similar rule for
the avoid-* versions as well).

(WebCore::ComputedStyleExtractor::propertyValue):
Add support for the three new break-* properties.

* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
(WebCore::CSSParser::parseValue):
Add support for the new break properties.

* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::operator BreakBetween):
(WebCore::CSSPrimitiveValue::operator BreakInside):
Add converters for the new BreakBetween and BreakInside enums. Remove
the EPageBreak enum, since it is no longer used.

* css/CSSPropertyNames.in:
* css/CSSValueKeywords.in:
Add the new properties and the new values supported by the properties
to the keywords lists.

* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertFontSynthesis):
(WebCore::StyleBuilderConverter::convertPageBreakBetween):
(WebCore::StyleBuilderConverter::convertPageBreakInside):
(WebCore::StyleBuilderConverter::convertColumnBreakBetween):
(WebCore::StyleBuilderConverter::convertColumnBreakInside):
(WebCore::StyleBuilderConverter::convertRegionBreakBetween):
(WebCore::StyleBuilderConverter::convertRegionBreakInside):
In order to map the legacy properties into the new break-* values
we have custom converter functions.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintChild):
(WebCore::RenderBlock::childBoxIsUnsplittableForFragmentation):
(WebCore::RenderBlock::computeRegionRangeForBoxChild):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::applyBeforeBreak):
(WebCore::RenderBlockFlow::applyAfterBreak):
Patch the block code to check the correct new break-* constants. For
avoidance, this means checking both the general avoid value and the
specific value (e.g., avoid-page). In place of "always", we check
the specific value (e.g., column) and then for page specifically, we
also treat "left", "right", "recto" and "verso" as "always break" for now.

* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout):
Make sure changes to the break properties trigger relayout.

* rendering/style/RenderStyle.h:
Add getters and setters for the break-* properties and remove all
occurrences of the legacy page, column and region values from the RenderStyle.

* rendering/style/RenderStyleConstants.cpp:
(WebCore::alwaysPageBreak):
We have a helper function here for mapping several constant values to "page".

* rendering/style/RenderStyleConstants.h:
Definitions of the new BreakBetween and BreakInside enums.

* rendering/style/StyleMultiColData.cpp:
(WebCore::StyleMultiColData::StyleMultiColData):
(WebCore::StyleMultiColData::operator==):
* rendering/style/StyleMultiColData.h:
Remove the column-specific break data.

* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:
Remove the region-specific break data and replace it with generic break
data that is now used by all three pagination models.

LayoutTests:

* TestExpectations:
* fast/multicol/standardized-break-properties-expected.txt: Added.
* fast/multicol/standardized-break-properties.html: Added.
* fast/multicol/vertical-lr/standardized-break-properties-expected.txt: Added.
* fast/multicol/vertical-lr/standardized-break-properties.html: Added.
* fast/multicol/vertical-rl/standardized-break-properties-expected.txt: Added.
* fast/multicol/vertical-rl/standardized-break-properties.html: Added.
* fast/regions/text-break-properties-expected.txt: Added.
* fast/regions/text-break-properties.html: Added.
* printing/allowed-breaks-expected.txt: Added.
* printing/allowed-breaks.html: Added.
* printing/break-after-avoid-expected.txt: Added.
* printing/break-after-avoid-page-expected.txt: Added.
* printing/break-after-avoid-page.html: Added.
* printing/break-after-avoid.html: Added.
* printing/break-always-expected.txt: Added.
* printing/break-always.html: Added.
* printing/break-avoid-expected.txt: Added.
* printing/break-avoid-page-expected.txt: Added.
* printing/break-avoid-page.html: Added.
* printing/break-avoid.html: Added.
* printing/break-display-none-expected.txt: Added.
* printing/break-display-none.html: Added.
* printing/break-inside-avoid-expected.txt: Added.
* printing/break-inside-avoid-page-expected.txt: Added.
* printing/break-inside-avoid-page.html: Added.
* printing/break-inside-avoid.html: Added.
* printing/script-tests/allowed-breaks.js: Added.
(test):
* printing/script-tests/break-after-avoid-page.js: Added.
(test):
* printing/script-tests/break-after-avoid.js: Added.
(test):
* printing/script-tests/break-always.js: Added.
(test):
* printing/script-tests/break-avoid-page.js: Added.
(test):
* printing/script-tests/break-avoid.js: Added.
(test):
* printing/script-tests/break-display-none.js: Added.
(test):
* printing/script-tests/break-inside-avoid-page.js: Added.
(test):
* printing/script-tests/break-inside-avoid.js: Added.
(test):

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

3 years agoEnable SamplingProfiler on POSIX environment
utatane.tea@gmail.com [Sat, 30 Jan 2016 12:53:59 +0000 (12:53 +0000)]
Enable SamplingProfiler on POSIX environment
https://bugs.webkit.org/show_bug.cgi?id=153584

Reviewed by Michael Saboff.

.:

Add features.h header check. It will define __GLIBC__.

* Source/cmake/OptionsCommon.cmake:

Source/JavaScriptCore:

In this patch, we implement suspend and resume mechanizm for POSIX threads.
And with GLIBC, we can retrieve registers from it.

We take the following strategy.

Suspend side.
1. install sigaction to the threads.
2. in the profiler (suspend / resume callers), emit signal with pthread_kill and wait with POSIX semaphore.
3. in the signal handler, up the POSIX semaphore. Use sem_post because it is the async-signal-safe function in POSIX.
4. in the signal handler, perform sigsuspend to stop the thread until being resumed.
5. in the profiler, we can be waken up from the semaphore because (3) ups.

Resume side.
1. in the profiler, emit signal and wait on the semaphore.
2. in the signal handler, it is waken up from the sigsuspend.
3. in the signal handler, up the semaphore.
4. in the profiler, the profiler is waken up from the semaphore. It is ensured that the given thread is resumed by the signal.

* heap/MachineStackMarker.cpp:
(pthreadSignalHandlerSuspendResume):
(JSC::MachineThreads::Thread::Thread):
(JSC::MachineThreads::Thread::~Thread):
(JSC::MachineThreads::Thread::suspend):
(JSC::MachineThreads::Thread::resume):
(JSC::MachineThreads::Thread::getRegisters):
(JSC::MachineThreads::Thread::Registers::stackPointer):
(JSC::MachineThreads::Thread::Registers::framePointer):
(JSC::MachineThreads::Thread::Registers::instructionPointer):
(JSC::MachineThreads::Thread::Registers::llintPC):
(JSC::MachineThreads::Thread::freeRegisters):
* heap/MachineStackMarker.h:
* runtime/SamplingProfiler.cpp:
(JSC::reportStats):
* tests/stress/call-varargs-from-inlined-code-with-odd-number-of-arguments.js:
* tests/stress/call-varargs-from-inlined-code.js:
* tests/stress/v8-earley-boyer-strict.js:

Source/WTF:

Use __GLIBC__ since mcontext_t layout depends on it.

* wtf/Platform.h:

Tools:

* Scripts/run-jsc-stress-tests:

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

3 years ago[GTK] Mark two CSS multicolumn tests as failing
mcatanzaro@igalia.com [Sat, 30 Jan 2016 05:59:04 +0000 (05:59 +0000)]
[GTK] Mark two CSS multicolumn tests as failing

Unreviewed test gardening.

* platform/gtk/TestExpectations:

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

3 years ago[GTK] Mark two scrollbar tests as crashing
mcatanzaro@igalia.com [Sat, 30 Jan 2016 05:57:38 +0000 (05:57 +0000)]
[GTK] Mark two scrollbar tests as crashing

Unreviewed test gardening.

* platform/gtk/TestExpectations:

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

3 years ago[GTK] Really mark imported/blink/fast/css/first-letter-float-block.html as crashing
mcatanzaro@igalia.com [Sat, 30 Jan 2016 05:56:43 +0000 (05:56 +0000)]
[GTK] Really mark imported/blink/fast/css/first-letter-float-block.html as crashing

Unreviewed test gardening. Copypaste error in the previous commit.

* platform/gtk/TestExpectations:

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

3 years ago[GTK] Mark imported/blink/fast/css/first-letter-float-block.html as crashing
mcatanzaro@igalia.com [Sat, 30 Jan 2016 05:53:51 +0000 (05:53 +0000)]
[GTK] Mark imported/blink/fast/css/first-letter-float-block.html as crashing

Unreviewed test gardening.

* platform/gtk/TestExpectations:

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

3 years ago[GTK] Mark some accessibility role tests as failing
mcatanzaro@igalia.com [Sat, 30 Jan 2016 05:49:49 +0000 (05:49 +0000)]
[GTK] Mark some accessibility role tests as failing

Unreviewed test gardening.

* platform/gtk/TestExpectations:

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

3 years ago[GTK] Mark some content security policy tests as failing
mcatanzaro@igalia.com [Sat, 30 Jan 2016 05:47:35 +0000 (05:47 +0000)]
[GTK] Mark some content security policy tests as failing

Unreviewed test gardening.

* platform/gtk/TestExpectations:

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

3 years ago[GTK] Mark Ruby expansion tests as failing
mcatanzaro@igalia.com [Sat, 30 Jan 2016 05:46:42 +0000 (05:46 +0000)]
[GTK] Mark Ruby expansion tests as failing

Unreviewed test gardening.

* platform/gtk/TestExpectations:

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

3 years ago[GTK] Add expectations for media source SourceBuffer tests
mcatanzaro@igalia.com [Sat, 30 Jan 2016 05:42:34 +0000 (05:42 +0000)]
[GTK] Add expectations for media source SourceBuffer tests

Unreviewed test gardening.

* platform/gtk/http/tests/media/media-source/SourceBuffer-abort-expected.txt: Added.
* platform/gtk/http/tests/media/media-source/SourceBuffer-abort-readyState-expected.txt: Added.
* platform/gtk/http/tests/media/media-source/SourceBuffer-abort-removed-expected.txt: Added.
* platform/gtk/http/tests/media/media-source/SourceBuffer-abort-updating-expected.txt: Added.

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

3 years agoB3 should reduce Mod(value, constant) to Div and Mul so that our Div optimizations...
fpizlo@apple.com [Sat, 30 Jan 2016 05:14:23 +0000 (05:14 +0000)]
B3 should reduce Mod(value, constant) to Div and Mul so that our Div optimizations can do things
https://bugs.webkit.org/show_bug.cgi?id=153693

Reviewed by Saam Barati.

The most efficient way to handle Mod(value, constant) is to reduce it to
Sub(value, Mul(Div(value, constant), constant)) and then let the Div optimizations do their
thing.

In the future we could add special handling of Mod(value, 1 << constant), but it's not
obvious that this would produce better code than reducing through Div, if we also make sure
that we have great optimizations for Mul and Div.

* b3/B3ReduceStrength.cpp:

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

3 years agoWeb Inspector: Add support for variable size timeline graphs
commit-queue@webkit.org [Sat, 30 Jan 2016 03:31:32 +0000 (03:31 +0000)]
Web Inspector: Add support for variable size timeline graphs
https://bugs.webkit.org/show_bug.cgi?id=153690
<rdar://problem/24421696>

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

* UserInterface/Views/LayoutTimelineDataGrid.js:
(WebInspector.LayoutTimelineDataGrid): Deleted.
Remove unnecessary constructor.

* UserInterface/Views/TimelineOverviewGraph.js:
(WebInspector.TimelineOverviewGraph.prototype.set selectedRecord):
Default graph height.

* UserInterface/Views/RenderingFrameTimelineOverview.js:
(WebInspector.RenderingFrameTimelineOverview.prototype.get height):
Custom graph height.

* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview.prototype.get height):
Provide a way to get the height of the overview which accumulates graph heights.

* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype.get timelineOverviewHeight):
(WebInspector.TimelineRecordingContentView.prototype._updateTimelineOverviewHeight):
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.prototype._updateTimelineOverviewHeight):
Switch from assuming certain graph heights to asking the overview for its height.

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

3 years agoWeb Inspector: Object previews in the Console are misaligned
commit-queue@webkit.org [Sat, 30 Jan 2016 03:19:07 +0000 (03:19 +0000)]
Web Inspector: Object previews in the Console are misaligned
https://bugs.webkit.org/show_bug.cgi?id=153676
<rdar://problem/24418796>

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2016-01-29
Reviewed by Timothy Hatcher.

* UserInterface/Views/ObjectTreeView.css:
(.object-tree .tree-outline.object.compact):
(.object-tree): Deleted.

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

3 years ago[Win] Fix compile error.
peavo@outlook.com [Sat, 30 Jan 2016 02:57:38 +0000 (02:57 +0000)]
[Win] Fix compile error.
https://bugs.webkit.org/show_bug.cgi?id=153646

Reviewed by Darin Adler.

* platform/text/win/LocaleWin.cpp:
(WebCore::LCIDFromLocaleInternal):

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

3 years agoArray.prototype native functions should use Symbol.species to construct the result
keith_miller@apple.com [Sat, 30 Jan 2016 02:45:25 +0000 (02:45 +0000)]
Array.prototype native functions should use Symbol.species to construct the result
https://bugs.webkit.org/show_bug.cgi?id=153660

Reviewed by Saam Barati.

This patch adds support for Symbol.species in the Array.prototype native functions.
We make an optimization to avoid regressions on some benchmarks by using an
adaptive watchpoint to check if Array.prototype.constructor is ever changed.

* runtime/ArrayPrototype.cpp:
(JSC::putLength):
(JSC::setLength):
(JSC::speciesConstructArray):
(JSC::arrayProtoFuncConcat):
(JSC::arrayProtoFuncSlice):
(JSC::arrayProtoFuncSplice):
(JSC::ArrayPrototype::setConstructor):
(JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::ArrayPrototypeAdaptiveInferredPropertyWatchpoint):
(JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire):
* runtime/ArrayPrototype.h:
(JSC::ArrayPrototype::didChangeConstructorProperty):
* runtime/ConstructData.cpp:
(JSC::construct):
* runtime/ConstructData.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* tests/es6.yaml:
* tests/stress/array-species-functions.js: Added.
(Symbol.species):
(funcThrows):
(test.species):
(test):

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

3 years agoCallLinkStatus should trust BadCell exit sites whenever there is no stub
fpizlo@apple.com [Sat, 30 Jan 2016 02:36:14 +0000 (02:36 +0000)]
CallLinkStatus should trust BadCell exit sites whenever there is no stub
https://bugs.webkit.org/show_bug.cgi?id=153691

Reviewed by Benjamin Poulain.

This fixes a regression in our treatment of inlining failure exit sites when deciding if we
should inline a call.

A long time ago, a BadCell exit site would ensure that a CallLinkStatus returned
takesSlowPath.

But then we added closure calls. A BadCell exit site might just mean that we should do
closure call inlining. We added a BadExecutable exit site to indicate that even closure call
inlining had failed. BadCell would no longer force CallLinkStatus to return takesSlowPath,
but BadExecutable would stuff do so.

But then we unified the IR for checking functions and executables, and the DFG stopped using
the BadExecutable exit kind. Probably this change disabled our ability to use exit site
counting for deciding when to takesSlowPath. But this isn't necessarily a disaster, since
any time you exited in this way, you'd be taken to a baseline call inline cache, and that
inline cache would record the slow path.

But then we introduced polymorphic call inlining. Polymorphic call inlining means that call
unlinking, like when one of the callees is optimized, will reset the stub. We also made it
so that the stub is like a gate for the slow path count. A clear inline cache must first
cause the creation of a stub and then cause it to overflow before the slow path is counted.

So, if the DFG or FTL exits on a cell check associated with a particular callsite being
speculatively inlined, then it's possible that nobody will know about the exit because:

- The exit kind is BadCell but CallLinkStatus needs BadExecutable to disable inlining.

- Between when we tiered up to the DFG (or FTL) and when the exit happened, one of the
  callees was tiered up, causing the baseline CallLinkInfo to be unlinked. Therefore, after
  the exit, the inline cache is in a reset state and will not count the call as taking slow
  path.

The challenge when dealing with this is that often, we will have an super early compilation
of a minimorphic call site before we have seen all of its small set of callees. For example
we may have seen only one of two possible callees. That early compilation will OSR exit, and
in trunk, will be recompiled with bimorphic speculative inlining. That's a pretty good
outcome. Basically, we are trusting that if during the time that the function has been
running prior to a given compilation, a callsite has only seen a small number of callees,
then it's safe to assume that it won't see another one anytime soon.

So, simply forcing the CallLinkStatus to set takesSlowPath any time there was a BadCell exit
would hurt our performance in some cases, because trunk prior to this change would have their
final compilation use speculative inlining, and this change would make guarded inlining
instead.

The compromise that I came up with relies on the fact that a CallLinkInfo must be reset quite
frequently for it to routinely happen in between tier-up to DFG (or FTL) and an exit. So,
most likely, such a CallLinkInfo will also show up as being clear when the CallLinkStatus
is built during DFG profiling. The CallLinkStatus will then fall back on the CallLinkInfo's
lastSeenCallee field, which is persistent across resets. This change just makes it so that
CallLinkStatus sets takesSlowPath if there is a BadCell exit and the status had to be
inferred from the lastSeenCallee.

This change reduces pointless recompilations in gbemu. It's an 11% speed-up on gbemu. It
doesn't seem to hurt any benchmarks.

* bytecode/CallLinkStatus.cpp:
(JSC::CallLinkStatus::computeFor):
(JSC::CallLinkStatus::computeExitSiteData):
(JSC::CallLinkStatus::computeFromCallLinkInfo):
* bytecode/CallLinkStatus.h:
(JSC::CallLinkStatus::CallLinkStatus):
(JSC::CallLinkStatus::at):
(JSC::CallLinkStatus::operator[]):
(JSC::CallLinkStatus::isProved):
(JSC::CallLinkStatus::isBasedOnStub):
(JSC::CallLinkStatus::canOptimize):
(JSC::CallLinkStatus::maxNumArguments):
(JSC::CallLinkStatus::ExitSiteData::ExitSiteData): Deleted.

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

3 years agoPack FunctionExecutable and UnlinkedFunctionExecutable harder
sbarati@apple.com [Sat, 30 Jan 2016 02:05:17 +0000 (02:05 +0000)]
Pack FunctionExecutable and UnlinkedFunctionExecutable harder
https://bugs.webkit.org/show_bug.cgi?id=153687

Reviewed by Andreas Kling.

This patch reduces FunctionExecutable from 120 to 104 bytes.
This patch reduces UnlinkedFunctionExecutable from 144 to 136 bytes.

* bytecode/ExecutableInfo.h:
* bytecode/UnlinkedFunctionExecutable.cpp:
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
* bytecode/UnlinkedFunctionExecutable.h:
* parser/ParserModes.h:
(JSC::functionNameScopeIsDynamic):
* runtime/Executable.cpp:
(JSC::ScriptExecutable::ScriptExecutable):
* runtime/Executable.h:
(JSC::ScriptExecutable::needsActivation):
(JSC::ScriptExecutable::isArrowFunctionContext):
(JSC::ScriptExecutable::isStrictMode):
(JSC::ScriptExecutable::derivedContextType):
(JSC::ScriptExecutable::ecmaMode):
(JSC::ScriptExecutable::finishCreation):

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

3 years agoRebaseline fast/block/basic/016.html for ios-simulator after r195740
ryanhaddad@apple.com [Sat, 30 Jan 2016 01:38:35 +0000 (01:38 +0000)]
Rebaseline fast/block/basic/016.html for ios-simulator after r195740

Unreviewed test gardening.

* platform/ios-simulator/fast/block/basic/016-expected.txt:

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

3 years agoLast commit should have marked fast/text/fallback-language-han-2.html as an ImageOnly...
ryanhaddad@apple.com [Sat, 30 Jan 2016 01:31:02 +0000 (01:31 +0000)]
Last commit should have marked fast/text/fallback-language-han-2.html as an ImageOnlyFailure. Fixing that.
https://bugs.webkit.org/show_bug.cgi?id=152438

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

3 years agoTab suspension code shouldn't use page cache cacheability logic
antti@apple.com [Sat, 30 Jan 2016 01:29:33 +0000 (01:29 +0000)]
Tab suspension code shouldn't use page cache cacheability logic
https://bugs.webkit.org/show_bug.cgi?id=153680

Reviewed by Andreas Kling.

Most of PageCache::canCache() is unnecessary for tab suspension.

Also improve robustness.

* page/Page.cpp:
(WebCore::Page::setPageActivityState):
(WebCore::Page::setIsVisible):
(WebCore::Page::setIsVisibleInternal):
(WebCore::Page::setIsPrerender):
(WebCore::Page::canTabSuspend):

    Include visibility test here.

    Instead of calling PageCache::canCache() just check for each frame that
    - that the document is loaded
    - that active DOM objects allow suspension

(WebCore::Page::setIsTabSuspended):
(WebCore::Page::setTabSuspensionEnabled):
(WebCore::Page::updateTabSuspensionState):

    Refactor for robustness.

(WebCore::Page::tabSuspensionTimerFired):

    Call canTabSuspend, the result might have changed.

(WebCore::Page::scheduleTabSuspension): Deleted.
* page/Page.h:

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

3 years agoMark fast/text/fallback-language-han-2.html as failing on ios-simulator.
ryanhaddad@apple.com [Sat, 30 Jan 2016 01:28:27 +0000 (01:28 +0000)]
Mark fast/text/fallback-language-han-2.html as failing on ios-simulator.
https://bugs.webkit.org/show_bug.cgi?id=152438

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

3 years agoMarking two WPT dom-tree-accessors/document.getElementsByName tests as failing on...
ryanhaddad@apple.com [Sat, 30 Jan 2016 01:24:55 +0000 (01:24 +0000)]
Marking two WPT dom-tree-accessors/document.getElementsByName tests as failing on ios-simulator.
https://bugs.webkit.org/show_bug.cgi?id=153370

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

3 years agoMarking webarchive/loading/object.html as flaky on ios-simulator-wk2
ryanhaddad@apple.com [Sat, 30 Jan 2016 01:20:12 +0000 (01:20 +0000)]
Marking webarchive/loading/object.html as flaky on ios-simulator-wk2
https://bugs.webkit.org/show_bug.cgi?id=153380

Unreviewed test gardening.

* platform/ios-simulator-wk2/TestExpectations:

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

3 years agoMarking all displaylists tests as flaky on ios-simulator
ryanhaddad@apple.com [Sat, 30 Jan 2016 01:13:23 +0000 (01:13 +0000)]
Marking all displaylists tests as flaky on ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=153656

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

3 years agoJSC Sampling Profiler: Come up with a (program counter => CodeOrigin) mapping
sbarati@apple.com [Sat, 30 Jan 2016 01:11:05 +0000 (01:11 +0000)]
JSC Sampling Profiler: Come up with a (program counter => CodeOrigin) mapping
https://bugs.webkit.org/show_bug.cgi?id=152629

Reviewed by Filip Pizlo.

This patch implements a mapping from PC to CodeOrigin
that lives off of JITed CodeBlocks. We build this mapping
while JITing code, and then we compress it and store
it on the CodeBlock. We only build the mapping if a debugger
has ever been attached to any global object.

CodeBlock consults this mapping when searching for a CodeOrigin
for a given PC, but it also consults other code ranges
off the main path that may own the PC. Specifically, it searches
through inline caches, OSRExits, and LazySlowPaths.

To find PC info for the LLInt, we also save the LLInt pc when
taking a stack trace where the top frame is in LLInt code.

This patch also cleans up code inside the SamplingProfier.
I realized a bug in the SamplingProfiler's implementation.
We used to walk the inline stack while gathering a stack
trace. This is wrong. It's super dangerous to do this because
we might pause the JSC process while it's modifying its
CodeOrigin table. We used to walk the inline stack while
taking a stack trace because doing so could save us from
having to verify a particular stack trace. This patch changes that.
We now have to verify all stack traces taken. This verification step
includes walking the inline stack.

Because we have a PC=>CodeOrigin map, we can now gather more
detailed information about the top-frame we pause. This allows
us to correctly observe inlining. It also allows us to observe
expression-level line/column information for the top frame.
The reason we don't consult this mapping for parent frames is
that all parent frames should set the CallSiteIndex on the call
frame header, which means we can consult that value to get inlining
and expression-level line/column information.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* assembler/AbstractMacroAssembler.h:
(JSC::AbstractMacroAssembler::Label::Label):
(JSC::AbstractMacroAssembler::Label::operator==):
(JSC::AbstractMacroAssembler::Label::isSet):
* assembler/AssemblerBuffer.h:
(JSC::AssemblerLabel::labelAtOffset):
(JSC::AssemblerLabel::operator==):
* b3/B3Generate.cpp:
* b3/B3Origin.h:
(JSC::B3::Origin::data):
(JSC::B3::Origin::operator==):
* b3/B3PCToOriginMap.h: Added.
(JSC::B3::PCToOriginMap::PCToOriginMap):
(JSC::B3::PCToOriginMap::appendItem):
(JSC::B3::PCToOriginMap::ranges):
* b3/B3Procedure.h:
(JSC::B3::Procedure::pcToOriginMap):
(JSC::B3::Procedure::releasePCToOriginMap):
* b3/air/AirGenerate.cpp:
(JSC::B3::Air::generate):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::insertBasicBlockBoundariesForControlFlowProfiler):
(JSC::CodeBlock::setPCToCodeOriginMap):
(JSC::CodeBlock::findPC):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::jitCodeMap):
(JSC::CodeBlock::bytecodeOffset):
* bytecode/CodeOrigin.h:
(JSC::CodeOrigin::operator==):
(JSC::CodeOriginHash::hash):
(JSC::CodeOriginHash::equal):
* bytecode/InlineCallFrame.h:
(JSC::baselineCodeBlockForOriginAndBaselineCodeBlock):
(JSC::CodeOrigin::walkUpInlineStack):
* bytecode/PolymorphicAccess.h:
(JSC::PolymorphicAccess::containsPC):
* bytecode/StructureStubInfo.cpp:
(JSC::StructureStubInfo::visitWeakReferences):
(JSC::StructureStubInfo::containsPC):
* bytecode/StructureStubInfo.h:
* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedCodeBlock::hasExpressionInfo):
(JSC::UnlinkedCodeBlock::expressionInfo):
(JSC::UnlinkedCodeBlock::setThisRegister):
* debugger/Debugger.cpp:
(JSC::Debugger::attach):
* dfg/DFGJITCode.cpp:
(JSC::DFG::JITCode::validateReferences):
(JSC::DFG::JITCode::findPC):
* dfg/DFGJITCode.h:
(JSC::DFG::JITCode::commonDataOffset):
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::JITCompiler):
(JSC::DFG::JITCompiler::link):
(JSC::DFG::JITCompiler::compile):
(JSC::DFG::JITCompiler::compileFunction):
(JSC::DFG::JITCompiler::recordCallSiteAndGenerateExceptionHandlingOSRExitIfNeeded):
(JSC::DFG::JITCompiler::setEndOfMainPath):
(JSC::DFG::JITCompiler::setEndOfCode):
* dfg/DFGJITCompiler.h:
(JSC::DFG::JITCompiler::setStartOfCode):
(JSC::DFG::JITCompiler::setForNode):
(JSC::DFG::JITCompiler::addCallSite):
(JSC::DFG::JITCompiler::pcToCodeOriginMapBuilder):
(JSC::DFG::JITCompiler::setEndOfMainPath): Deleted.
(JSC::DFG::JITCompiler::setEndOfCode): Deleted.
* dfg/DFGSlowPathGenerator.h:
(JSC::DFG::SlowPathGenerator::call):
(JSC::DFG::SlowPathGenerator::origin):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::addSlowPathGenerator):
(JSC::DFG::SpeculativeJIT::runSlowPathGenerators):
(JSC::DFG::SpeculativeJIT::compileCurrentBlock):
* dfg/DFGSpeculativeJIT.h:
* ftl/FTLB3Compile.cpp:
(JSC::FTL::compile):
* ftl/FTLJITCode.cpp:
(JSC::FTL::JITCode::liveRegistersToPreserveAtExceptionHandlingCallSite):
(JSC::FTL::JITCode::findPC):
* ftl/FTLJITCode.h:
(JSC::FTL::JITCode::b3Code):
* heap/MachineStackMarker.cpp:
(JSC::MachineThreads::Thread::Registers::instructionPointer):
(JSC::MachineThreads::Thread::Registers::llintPC):
(JSC::MachineThreads::Thread::freeRegisters):
* heap/MachineStackMarker.h:
* inspector/agents/InspectorScriptProfilerAgent.cpp:
(Inspector::InspectorScriptProfilerAgent::addEvent):
(Inspector::buildSamples):
(Inspector::InspectorScriptProfilerAgent::trackingComplete):
* jit/JIT.cpp:
(JSC::JIT::JIT):
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
(JSC::JIT::privateCompile):
* jit/JIT.h:
* jit/JITCode.h:
(JSC::JITCode::findPC):
* jit/PCToCodeOriginMap.cpp: Added.
(JSC::PCToCodeOriginMapBuilder::PCToCodeOriginMapBuilder):
(JSC::PCToCodeOriginMapBuilder::appendItem):
(JSC::PCToCodeOriginMap::PCToCodeOriginMap):
(JSC::PCToCodeOriginMap::~PCToCodeOriginMap):
(JSC::PCToCodeOriginMap::memorySize):
(JSC::PCToCodeOriginMap::findPC):
* jit/PCToCodeOriginMap.h: Added.
(JSC::PCToCodeOriginMapBuilder::defaultCodeOrigin):
(JSC::PCToCodeOriginMapBuilder::didBuildMapping):
* jsc.cpp:
(functionSamplingProfilerStackTraces):
* llint/LLIntPCRanges.h:
(JSC::LLInt::isLLIntPC):
* llint/LowLevelInterpreter.asm:
* runtime/Options.h:
* runtime/SamplingProfiler.cpp:
(JSC::reportStats):
(JSC::FrameWalker::FrameWalker):
(JSC::FrameWalker::walk):
(JSC::FrameWalker::resetAtMachineFrame):
(JSC::FrameWalker::isValidFramePointer):
(JSC::SamplingProfiler::SamplingProfiler):
(JSC::SamplingProfiler::~SamplingProfiler):
(JSC::tryGetBytecodeIndex):
(JSC::SamplingProfiler::processUnverifiedStackTraces):
(JSC::SamplingProfiler::visit):
(JSC::SamplingProfiler::noticeVMEntry):
(JSC::SamplingProfiler::clearData):
(JSC::SamplingProfiler::StackFrame::displayName):
(JSC::SamplingProfiler::StackFrame::displayNameForJSONTests):
(JSC::SamplingProfiler::StackFrame::functionStartLine):
(JSC::SamplingProfiler::StackFrame::functionStartColumn):
(JSC::SamplingProfiler::StackFrame::sourceID):
(JSC::SamplingProfiler::StackFrame::url):
(JSC::SamplingProfiler::releaseStackTraces):
(JSC::SamplingProfiler::stackTracesAsJSON):
(WTF::printInternal):
(JSC::SamplingProfiler::StackFrame::startLine): Deleted.
(JSC::SamplingProfiler::StackFrame::startColumn): Deleted.
(JSC::SamplingProfiler::stackTraces): Deleted.
* runtime/SamplingProfiler.h:
(JSC::SamplingProfiler::UnprocessedStackFrame::UnprocessedStackFrame):
(JSC::SamplingProfiler::StackFrame::StackFrame):
(JSC::SamplingProfiler::StackTrace::StackTrace):
(JSC::SamplingProfiler::totalTime):
(JSC::SamplingProfiler::setStopWatch):
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:
(JSC::VM::setShouldBuildPCToCodeOriginMapping):
(JSC::VM::shouldBuilderPCToCodeOriginMapping):
* tests/stress/sampling-profiler-basic.js:
(platformSupportsSamplingProfiler.top):
(platformSupportsSamplingProfiler.jaz):
(platformSupportsSamplingProfiler.kaz):

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

3 years agoMarking fast/parser/external-entities-in-xslt.xml as flaky on El Capitan
ryanhaddad@apple.com [Sat, 30 Jan 2016 00:34:47 +0000 (00:34 +0000)]
Marking fast/parser/external-entities-in-xslt.xml as flaky on El Capitan
https://bugs.webkit.org/show_bug.cgi?id=153683

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years agofast/shadow-dom/Element-interface-attachShadow.html fails on iOS
rniwa@webkit.org [Sat, 30 Jan 2016 00:06:48 +0000 (00:06 +0000)]
fast/shadow-dom/Element-interface-attachShadow.html fails on iOS
https://bugs.webkit.org/show_bug.cgi?id=153681

Reviewed by Antti Koivisto.

Source/WebCore:

The bug was caused by canHaveUserAgentShadowRoot() returning false on a meter element since it's disabled on iOS.
Override HTMLUnknownElement's canHaveUserAgentShadowRoot to return false for compatbility on iOS.

* html/HTMLUnknownElement.h:
(WebCore::HTMLUnknownElement::canHaveUserAgentShadowRoot):

LayoutTests:

Enable shadow DOM and custom elements tests on iOS; matches that's in platform/mac/TestExpectations.

* platform/ios-simulator/TestExpectations:

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

3 years agoRemove our notion of having a single activation register
sbarati@apple.com [Sat, 30 Jan 2016 00:01:48 +0000 (00:01 +0000)]
Remove our notion of having a single activation register
https://bugs.webkit.org/show_bug.cgi?id=153673

Reviewed by Filip Pizlo.

We have many functions lurking around where we think a function
might only have one activation register. This is clearly wrong
now that ES6 has block scoping. This patch removes this false notion.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
(JSC::CodeBlock::CodeBlock):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::scopeRegister):
(JSC::CodeBlock::codeType):
(JSC::CodeBlock::setActivationRegister): Deleted.
(JSC::CodeBlock::activationRegister): Deleted.
(JSC::CodeBlock::uncheckedActivationRegister): Deleted.
(JSC::CodeBlock::needsActivation): Deleted.
* bytecode/ExecutableInfo.h:
(JSC::ExecutableInfo::ExecutableInfo):
(JSC::ExecutableInfo::usesEval):
(JSC::ExecutableInfo::isStrictMode):
(JSC::ExecutableInfo::isConstructor):
(JSC::ExecutableInfo::isClassContext):
(JSC::ExecutableInfo::needsActivation): Deleted.
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedCodeBlock::isArrowFunctionContext):
(JSC::UnlinkedCodeBlock::isClassContext):
(JSC::UnlinkedCodeBlock::setThisRegister):
(JSC::UnlinkedCodeBlock::setScopeRegister):
(JSC::UnlinkedCodeBlock::usesGlobalObject):
(JSC::UnlinkedCodeBlock::setGlobalObjectRegister):
(JSC::UnlinkedCodeBlock::thisRegister):
(JSC::UnlinkedCodeBlock::scopeRegister):
(JSC::UnlinkedCodeBlock::addPropertyAccessInstruction):
(JSC::UnlinkedCodeBlock::needsFullScopeChain): Deleted.
(JSC::UnlinkedCodeBlock::setActivationRegister): Deleted.
(JSC::UnlinkedCodeBlock::activationRegister): Deleted.
(JSC::UnlinkedCodeBlock::hasActivationRegister): Deleted.
* bytecode/UnlinkedFunctionExecutable.cpp:
(JSC::generateUnlinkedFunctionCodeBlock):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::initializeVarLexicalEnvironment):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::destinationForAssignResult):
(JSC::BytecodeGenerator::leftHandSideNeedsCopy):
(JSC::BytecodeGenerator::emitNodeForLeftHandSide):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::inliningCost):
(JSC::DFG::ByteCodeParser::parseCodeBlock):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::hasExitSite):
(JSC::DFG::Graph::activationRegister): Deleted.
(JSC::DFG::Graph::uncheckedActivationRegister): Deleted.
(JSC::DFG::Graph::machineActivationRegister): Deleted.
(JSC::DFG::Graph::uncheckedMachineActivationRegister): Deleted.
* dfg/DFGStackLayoutPhase.cpp:
(JSC::DFG::StackLayoutPhase::run):
* interpreter/CallFrame.cpp:
(JSC::CallFrame::callSiteIndex):
(JSC::CallFrame::stack):
(JSC::CallFrame::callerFrame):
(JSC::CallFrame::friendlyFunctionName):
(JSC::CallFrame::hasActivation): Deleted.
(JSC::CallFrame::uncheckedActivation): Deleted.
(JSC::CallFrame::lexicalEnvironment): Deleted.
(JSC::CallFrame::lexicalEnvironmentOrNullptr): Deleted.
(JSC::CallFrame::setActivation): Deleted.
* interpreter/CallFrame.h:
(JSC::ExecState::scope):
(JSC::ExecState::setCallerFrame):
(JSC::ExecState::setScope):
(JSC::ExecState::init):
* interpreter/Register.h:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* runtime/Executable.h:
(JSC::ScriptExecutable::usesEval):
(JSC::ScriptExecutable::usesArguments):
(JSC::ScriptExecutable::isArrowFunctionContext):
(JSC::ScriptExecutable::isStrictMode):
(JSC::ScriptExecutable::derivedContextType):
(JSC::ScriptExecutable::needsActivation): Deleted.
* runtime/JSLexicalEnvironment.h:
(JSC::asActivation):
(JSC::Register::lexicalEnvironment): Deleted.

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

3 years agoMissed one rebaseline for ios-simulator after r195740 in the last patch.
ryanhaddad@apple.com [Fri, 29 Jan 2016 23:58:18 +0000 (23:58 +0000)]
Missed one rebaseline for ios-simulator after r195740 in the last patch.

Unreviewed test gardening.

* platform/ios-simulator/fast/forms/form-in-malformed-markup-expected.txt:

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