PassRef should deref on destruction if pointee was not moved.
<https://webkit.org/b/139309>

Reviewed by Antti Koivisto.

Source/WebCore:

Remove calls to PassRef::dropRef() since it's no longer necessary to manually
notify PassRef that you didn't move the pointee.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::createFor):
(WebCore::RenderElement::setStyle):
* style/StyleResolveTree.cpp:
(WebCore::Style::resolveTree):

Source/WTF:

Let PassRef become nullptr internally after having WTF::move()'d the pointee.
This means that PassRef is now essentially a PassRefPtr that can only be
constructed with a non-null pointee.

This should make it possible for all ::create()-style construction helpers to
return PassRef, removing a branch in each case.

* wtf/PassRef.h:
(WTF::PassRef<T>::PassRef):
(WTF::PassRef<T>::~PassRef):
(WTF::PassRef<T>::get):
(WTF::PassRef<T>::ptr):
(WTF::PassRef<T>::leakRef):
(WTF::PassRef<T>::dropRef): Deleted.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176873 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Issue repaint at setUnavailablePluginIndicatorIsHidden() only when embedded object's indicator status changes.
https://bugs.webkit.org/show_bug.cgi?id=139311

Reviewed by Tim Horton.

Not testable.

* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::setUnavailablePluginIndicatorIsHidden):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176874 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move the website data store code to a new file
https://bugs.webkit.org/show_bug.cgi?id=139312

Reviewed by Tim Horton.

It's weird to have all the website data code in the API class, so move it to a new file.

* UIProcess/API/APIWebsiteDataStore.cpp:
(API::WebsiteDataStore::WebsiteDataStore):
(API::WebsiteDataStore::isNonPersistent):
(API::generateNonPersistentSessionID): Deleted.
* UIProcess/API/APIWebsiteDataStore.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/WebsiteData/WebsiteDataStore.cpp: Copied from Source/WebKit2/UIProcess/API/APIWebsiteDataStore.cpp.
(WebKit::generateNonPersistentSessionID):
(WebKit::WebsiteDataStore::createNonPersistent):
(WebKit::WebsiteDataStore::create):
(WebKit::WebsiteDataStore::WebsiteDataStore):
(WebKit::WebsiteDataStore::~WebsiteDataStore):
* UIProcess/WebsiteData/WebsiteDataStore.h: Copied from Source/WebKit2/UIProcess/API/APIWebsiteDataStore.h.
(WebKit::WebsiteDataStore::isNonPersistent):
(WebKit::WebsiteDataStore::sessionID):
* WebKit2.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176875 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Give all web pages a website data store
https://bugs.webkit.org/show_bug.cgi?id=139317

Reviewed by Tim Horton.

Source/WebKit2:

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
Set the website data store on the window.

* UIProcess/WebContext.cpp:
(WebKit::websiteDataStoreConfiguration):
Helper function that will create the default website data store configuration for a context.

(WebKit::WebContext::WebContext):
Create a new, per-context data store.

(WebKit::WebContext::createWebPage):
If we don't have a data store filled in, use the default per-context one.

* UIProcess/WebContext.h:
* UIProcess/WebPageProxy.h:

Tools:

* MiniBrowser/mac/AppDelegate.m:
(-[BrowserAppDelegate newPrivateWindow:]):
Don't release the controller - it's implicitly retained by the window.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176876 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix build on Windows.

* page/SessionIDHash.h:

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

* UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
(API::WebsiteDataStore::defaultDataStoreConfiguration):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176878 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[MSE][Mac] Return absolute value of error code from CDMSessionMediaSourceAVFObjC::update().
https://bugs.webkit.org/show_bug.cgi?id=139316

Reviewed by Eric Carlson.

Similarly to our asynchronous error reporting, return the absolute value of the error code.

* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(WebCore::systemCodeForError):
(WebCore::CDMSessionMediaSourceAVFObjC::update):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176879 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] DumpRenderTree produces many reference test mismatches
https://bugs.webkit.org/show_bug.cgi?id=139314

Reviewed by Simon Fraser.

Fixes an issue where the scale factor used to render the snapshot taken by
DumpRenderTree may differ from the device scale factor. In particular, the
scale factor used to render a snapshot of a test may differ from the scale
factor used to render the snapshot of its expected result.

Currently DumpRenderTree uses SPI, -[UIView newSnapshotForRect], on iOS to
snapshot the UIWebBrowserView. This SPI always render using a scale factor
of one when the backing store for the LegacyTileLayer objects were out-of-
date regardless of the device scale factor. Instead we should use UIImage
and CALayer API to perform the snapshot with respect to the device scale
factor.

Additionally write iOS pixel dump support logic in terms of existing
DumpRenderTree abstractions so as to support generating and comparing
pixel dump checksums as well as make the iOS code more consistent with
the logic used by other ports.

* DumpRenderTree/PixelDumpSupport.cpp:
(dumpWebViewAsPixelsAndCompareWithExpected): Removed !PLATFORM(IOS)-guard.
* DumpRenderTree/ios/PixelDumpSupportIOS.mm:
(BitmapContext::createFromUIImage): Added.
(BitmapContext::pixelData): Added.
(BitmapContext::BitmapContext): Added.
(computeMD5HashStringForBitmapContext): Added.
(dumpBitmap): Added.
(createBitmapContextFromWebView): Moved logic from dumpWebViewAsPixelsAndCompareWithExpected() to here.
(dumpWebViewAsPixelsAndCompareWithExpected): Deleted.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176880 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Gardening: speculative build fix for GTK builds.

* CMakeLists.txt:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176881 268f45cc-cd09-0410-ab3c-d52691b4dbfc
If the action menu hit test times out, a menu with a single separator appears
https://bugs.webkit.org/show_bug.cgi?id=139320
<rdar://problem/19158331>

Reviewed by Beth Dakin.

* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController menuNeedsUpdate:]):
(-[WKActionMenuController _defaultMenuItems]):
Add a new "TimedOut" state, which we get into if the sync wait for
didPerformActionMenuHitTest times out. In this case, we'll drop the
separator item and give up on the menu. This way, the menu will never
have just a single separator item at the end of menuNeedsUpdate:.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176883 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Gardening: more speculative build fix for GTK builds.

* CMakeLists.txt:



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