+2014-08-12 Tim Horton <timothy_horton@apple.com>
+
+ Add a fade transition to services highlights
+ https://bugs.webkit.org/show_bug.cgi?id=135829
+ <rdar://problem/17935736>
+
+ Reviewed by Enrica Casucci.
+
+ Add a smooth fade to highlight installation and uninstallation.
+ To do so, we make each highlight paint into its own small layer.
+
+ * WebProcess/WebPage/PageOverlay.cpp:
+ (WebKit::PageOverlay::layer):
+ * WebProcess/WebPage/PageOverlay.h:
+ * WebProcess/WebPage/PageOverlayController.cpp:
+ (WebKit::PageOverlayController::layerForOverlay):
+ * WebProcess/WebPage/PageOverlayController.h:
+ Expose the GraphicsLayer on PageOverlay.
+
+ * WebProcess/WebPage/ServicesOverlayController.h:
+ (WebKit::ServicesOverlayController::Highlight::layer):
+ (WebKit::ServicesOverlayController::activeHighlight):
+ (WebKit::ServicesOverlayController::webPage):
+ (WebKit::ServicesOverlayController::Highlight::Highlight): Deleted.
+
+ * WebProcess/WebPage/mac/ServicesOverlayController.mm:
+ (WebKit::ServicesOverlayController::Highlight::createForSelection):
+ (WebKit::ServicesOverlayController::Highlight::createForTelephoneNumber):
+ (WebKit::ServicesOverlayController::Highlight::Highlight):
+ Highlights now own a GraphicsLayer, which are later installed
+ as sublayers of the ServicesOverlayController's PageOverlay layer.
+ These layers are sized and positioned according to the DDHighlight's bounds.
+
+ (WebKit::ServicesOverlayController::Highlight::~Highlight):
+ (WebKit::ServicesOverlayController::Highlight::invalidate):
+ ServicesOverlayController will invalidate any remaining highlights
+ when it is torn down, so they can clear their backpointers.
+
+ (WebKit::ServicesOverlayController::Highlight::notifyFlushRequired):
+ Forward flush notifications to the DrawingArea.
+
+ (WebKit::ServicesOverlayController::Highlight::paintContents):
+ Paint the DDHighlight into the layer. Translation is done by the layer position,
+ so we zero the bounds origin when painting.
+
+ (WebKit::ServicesOverlayController::Highlight::deviceScaleFactor):
+ Forward the deviceScaleFactor so that things are painted at the right scale.
+
+ (WebKit::ServicesOverlayController::Highlight::fadeIn):
+ (WebKit::ServicesOverlayController::Highlight::fadeOut):
+ Apply a fade animation to the layer.
+
+ (WebKit::ServicesOverlayController::Highlight::didFinishFadeOutAnimation):
+ When the fade completes, unparent the layer, unless it has become active again.
+
+ (WebKit::ServicesOverlayController::ServicesOverlayController):
+ (WebKit::ServicesOverlayController::~ServicesOverlayController):
+ Invalidate all highlights, so they can clear their backpointers.
+
+ (WebKit::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
+ Make remainingTimeUntilHighlightShouldBeShown act upon a particular highlight
+ instead of always the active highlight.
+
+ (WebKit::ServicesOverlayController::determineActiveHighlightTimerFired): Rename.
+
+ (WebKit::ServicesOverlayController::drawRect):
+ drawRect is no longer called and will no longer do anything; all of the
+ painting is done in sublayers.
+
+ (WebKit::ServicesOverlayController::buildPhoneNumberHighlights):
+ Ensure that phone number Highlights stay stable even while the selection
+ changes, by comparing the underlying Ranges and keeping around old Highlights
+ that match the new ones. This enables us to e.g. fade in while changing
+ the selection within a phone number.
+
+ (WebKit::ServicesOverlayController::buildSelectionHighlight):
+ (WebKit::ServicesOverlayController::didRebuildPotentialHighlights):
+ (WebKit::ServicesOverlayController::createOverlayIfNeeded):
+ Don't call setNeedsDisplay; the overlay doesn't have backing store.
+ Instead, call determineActiveHighlight, which will install/uninstall
+ highlights as necessary.
+
+ (WebKit::ServicesOverlayController::determineActiveHighlight):
+ Apply fade in/fade out to the overlays.
+ Keep track of which highlight we're going to activate, until the hysteresis
+ delay is up, then actually make it active/parent it/fade it in.
+ We now will have no active highlight between the fade out of the previous one
+ and the fade in of the new one (during the hysteresis delay).
+
+ (WebKit::ServicesOverlayController::mouseEvent):
+ The overlay now will not become active until the delay is up, so we don't
+ need to check it again here.
+
+ (WebKit::ServicesOverlayController::handleClick):
+ (WebKit::ServicesOverlayController::didCreateHighlight):
+ (WebKit::ServicesOverlayController::willDestroyHighlight):
+ (WebKit::ServicesOverlayController::repaintHighlightTimerFired): Deleted.
+ (WebKit::ServicesOverlayController::drawHighlight): Deleted.
+
2014-08-11 Andy Estes <aestes@apple.com>
[iOS] Get rid of iOS.xcconfig