Adjust max-width of cues based on text alignment when cue size is expanded.
https://bugs.webkit.org/show_bug.cgi?id=135823.

Reviewed by Brent Fulgham.

All units are in percentages.
If we are left aligned the max cue width is the 100 minus the cue position.
If we are right aligned the max cue width is the cue position.
If we are centered the max cue width is just 100.

* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
* html/track/VTTCue.cpp:
(WebCore::VTTCueBox::applyCSSProperties):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172481 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Get rid of iOS.xcconfig
https://bugs.webkit.org/show_bug.cgi?id=135809

Reviewed by Joseph Pecoraro.

All iOS.xcconfig did was include AspenFamily.xcconfig, so there's no need for the indirection.

Source/bmalloc:

* Configurations/Base.xcconfig:
* Configurations/iOS.xcconfig: Removed.
* bmalloc.xcodeproj/project.pbxproj:

Source/JavaScriptCore:

* Configurations/Base.xcconfig:
* Configurations/iOS.xcconfig: Removed.
* JavaScriptCore.xcodeproj/project.pbxproj:

Source/ThirdParty:

* gtest/xcode/Config/General.xcconfig:
* gtest/xcode/Config/iOS.xcconfig: Removed.
* gtest/xcode/gtest.xcodeproj/project.pbxproj:

Source/ThirdParty/ANGLE:

* ANGLE.xcodeproj/project.pbxproj:
* Configurations/Base.xcconfig:
* Configurations/iOS.xcconfig: Removed.

Source/WebCore:

* Configurations/Base.xcconfig:
* Configurations/iOS.xcconfig: Removed.
* WebCore.xcodeproj/project.pbxproj:

Source/WebKit:

* WebKit.xcodeproj/project.pbxproj:

Source/WebKit/mac:

* Configurations/Base.xcconfig:
* Configurations/iOS.xcconfig: Removed.

Source/WebKit2:

* Configurations/Base.xcconfig:
* Configurations/iOS.xcconfig: Removed.
* WebKit2.xcodeproj/project.pbxproj:

Source/WTF:

* Configurations/Base.xcconfig:
* Configurations/iOS.xcconfig: Removed.
* WTF.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172482 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Don't show the combined menu if there are no services available
https://bugs.webkit.org/show_bug.cgi?id=135846
<rdar://problem/17582099>

Reviewed by Enrica Casucci.

* WebProcess/WebPage/ServicesOverlayController.h:
Add a FIXME.

* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::determineActiveHighlight):
Don't allow a selection Highlight to become active if there is no
service available to handle it. Previously we showed the combined menu
with just phone numbers in it if any were detected.


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