Ref-ify ClientRectList.
<https://webkit.org/b/139780>

Reviewed by Anders Carlsson.

Make the ClientRectList::create() helpers return Ref, along with a bunch
of other functions that always return non-null ClientRectLists.

Also make ClientRectList store a Vector<Ref<ClientRect>> internally since
entries in the Vector are never null.

* dom/ClientRectList.cpp:
(WebCore::ClientRectList::item):
* dom/ClientRectList.h:
(WebCore::ClientRectList::create):
* dom/Element.cpp:
(WebCore::Element::getClientRects):
* dom/Element.h:
* dom/Range.cpp:
(WebCore::Range::getClientRects):
* dom/Range.h:
* page/Page.cpp:
(WebCore::Page::nonFastScrollableRects):
* page/Page.h:
* testing/Internals.cpp:
(WebCore::Internals::inspectorHighlightRects):
(WebCore::Internals::nonFastScrollableRects):
* testing/Internals.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@177513 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Ref-ify DOMSettableTokenList.
<https://webkit.org/b/139785>

Reviewed by Chris Dumez.

Make DOMSettableTokenList::create() return a Ref, and have its two client
elements store it in a Ref instead of a RefPtr (and fix their getter API
to return references.)

* html/DOMSettableTokenList.cpp:
(WebCore::DOMSettableTokenList::create): Deleted.
* html/DOMSettableTokenList.h:
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::sizes): Deleted.
* html/HTMLLinkElement.h:
* html/HTMLOutputElement.cpp:
(WebCore::HTMLOutputElement::htmlFor): Deleted.
* html/HTMLOutputElement.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@177514 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Win] Unreviewed gardening. Reorder file contents to match Mac version.

Reorder the contents of the TestRunnerWin so that it matches TestRunnerMac. This makes
it easier to see what steps are missing when running under Windows.

* DumpRenderTree/win/TestRunnerWin.cpp:
(TestRunner::callShouldCloseOnWebView):
(TestRunner::clearAllApplicationCaches):
(TestRunner::applicationCacheDiskUsageForOrigin):
(TestRunner::syncLocalStorage):
(TestRunner::localStorageDiskUsageForOrigin):
(TestRunner::observeStorageTrackerNotifications):
(TestRunner::clearApplicationCacheForOrigin):
(TestRunner::originsWithApplicationCache):
(TestRunner::clearAllDatabases):
(TestRunner::deleteAllLocalStorage):
(TestRunner::setStorageDatabaseIdleInterval):
(TestRunner::closeIdleLocalStorageDatabases):
(TestRunner::originsWithLocalStorage):
(TestRunner::deleteLocalStorageForOrigin):
(TestRunner::numberOfPendingGeolocationPermissionRequests):
(jsStringRefToWString):
(TestRunner::setAppCacheMaximumSize):
(TestRunner::setDatabaseQuota):
(TestRunner::goBack):
(TestRunner::setDefersLoading):
(TestRunner::setDomainRelaxationForbiddenForURLScheme):
(TestRunner::setAutomaticLinkDetectionEnabled):
(TestRunner::dispatchPendingLoadRequests):
(TestRunner::overridePreference):
(TestRunner::removeAllVisitedLinks):
(TestRunner::waitForPolicyDelegate):
(TestRunner::resetPageVisibility):
(TestRunner::setPageVisibility):
(TestRunner::grantWebNotificationPermission):
(TestRunner::denyWebNotificationPermission):
(TestRunner::removeAllWebNotificationPermissions):
(TestRunner::simulateWebNotificationClick):
(TestRunner::simulateLegacyWebNotificationClick):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@177515 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a MachSendRight class to WebCore and use it in IOSurface
https://bugs.webkit.org/show_bug.cgi?id=139787

Reviewed by Tim Horton.

Source/WebCore:

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* platform/cocoa/MachSendRight.cpp: Added.
(WebCore::retainSendRight):
(WebCore::releaseSendRight):
(WebCore::MachSendRight::adopt):
(WebCore::MachSendRight::create):
(WebCore::MachSendRight::MachSendRight):
(WebCore::MachSendRight::~MachSendRight):
(WebCore::MachSendRight::operator=):
(WebCore::MachSendRight::leakSendRight):
* platform/cocoa/MachSendRight.h: Added.
* platform/graphics/cocoa/IOSurface.h:
* platform/graphics/cocoa/IOSurface.mm:
(IOSurface::createSendRight):
(IOSurface::createMachPort): Deleted.

Source/WebKit2:

* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::encode):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@177516 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update flaky media test expectations to what bots see now - mostly updating for
better detection of timeouts.

* platform/mac/TestExpectations:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@177517 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: ASSERT seen closing/opening multiple inspectors
https://bugs.webkit.org/show_bug.cgi?id=139783

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

* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::nodeForObjectId):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@177518 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Updated expected results for LayoutTests/editing

* platform/ios-simulator-wk2/TestExpectations:
[...]

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@177519 268f45cc-cd09-0410-ab3c-d52691b4dbfc
media/media-controls-timeline-updates.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=139789

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



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@177520 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Clean up MachSendRight and add a copySendRight member function
https://bugs.webkit.org/show_bug.cgi?id=139788

Reviewed by Tim Horton.

Source/WebCore:

* platform/cocoa/MachSendRight.cpp:
(WebCore::retainSendRight):
(WebCore::releaseSendRight):
Use mach_error_string.

(WebCore::MachSendRight::copySendRight):
Create a new send right with the given mach port.

(WebCore::MachSendRight::leakSendRight):
Use std::exchange.

* platform/cocoa/MachSendRight.h:

Source/WTF:

* wtf/StdLibExtras.h:
(std::exchange):
Add an implementation of std::exchange.

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