iOS build fix.

* UIProcess/ios/RemoteLayerTreeHostIOS.mm:
(WebKit::RemoteLayerTreeHost::createLayer):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175811 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] wireless playback placeholder UI doesn't always draw
https://bugs.webkit.org/show_bug.cgi?id=138548

While it is important to only listen for the 'webkitplaybacktargetavailabilitychanged' event
when we are displaying inline controls because listening for it increases power consumption,
we should always listen for the 'webkitcurrentplaybacktargetiswirelesschanged' event because
it controls whether or not we draw the placeholder UI which is always visible during wireless
playback.

Reviewed by Brent Fulgham.

* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.addVideoListeners): Always listen for the
    'webkitcurrentplaybacktargetiswirelesschanged' event.
(ControllerIOS.prototype.removeVideoListeners): Always stop listening for the
    'webkitcurrentplaybacktargetiswirelesschanged' event.
(ControllerIOS.prototype.handleStartPlaybackButtonTouchEnd): Call updateControls so we update
    the type of controls rendered and start listening for wireless target changes immediately.
(ControllerIOS.prototype.setShouldListenForPlaybackTargetAvailabilityEvent): Don't start and stop
    listening for 'webkitcurrentplaybacktargetiswirelesschanged', we should always listen for it.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175812 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[OSX] Some words are placed on top of each other in complex text layout
https://bugs.webkit.org/show_bug.cgi?id=138348

Reviewed by Simon Fraser.

Source/WebCore:

Some complex text layouts have lots of diacritics being placed all over the place.
CoreText sometimes compensates for this by adjusting the advances of the glyphs
throughout the string to make glyphs appear in the correct place. This means that
we can't naively cache the width of a space character; instead, we must obey
CoreText when it gives us an advance for a space.

Test: fast/text/large-space-width-complex.html

* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::adjustGlyphsAndAdvances):

LayoutTests:

Updating tests to not use cached space width.

* fast/text/large-space-width-complex-expected.html: Added.
* fast/text/large-space-width-complex.html: Added.
* fast/text/resources/NotoNastaliqUrduDraft.ttf: Added.
* platform/mac-mavericks/fast/text/emphasis-expected.png:
* platform/mac-mavericks/fast/text/emphasis-expected.txt: This test is orthogonal to space widths.
* platform/mac-mountainlion/fast/text/emphasis-expected.png:
* platform/mac-mountainlion/fast/text/emphasis-expected.txt:
* platform/mac/fast/text/emphasis-expected.png:
* platform/mac/fast/text/emphasis-expected.txt:
* platform/mac/fast/text/sticky-typesetting-features-expected.png:
* platform/mac/fast/text/sticky-typesetting-features-expected.txt: Ditto.
* platform/mac/fast/writing-mode/text-orientation-basic-expected.png:
* platform/mac/fast/writing-mode/text-orientation-basic-expected.txt: This test actually is improved with
this patch. Instead of a weirdly wide space width, the two words are spaced appropriately now.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175813 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WK1: Support default actions for read-only text
https://bugs.webkit.org/show_bug.cgi?id=138552
-and corresponding-
rdar://problem/18877483

Reviewed by Tim Horton.

Source/WebCore:

WK1 now needs to do a lot of dictionary lookup operations that it did not 
previously have to handle. So this patch takes a lot of that functionality, which 
was implemented as static functions in WebPageMac for WK2 and moves it into 
WebCore.

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* editing/DictionaryLookup.h: Added.
* editing/DictionaryLookup.mm: Added.
(WebCore::isPositionInRange):
(WebCore::shouldUseSelection):
(WebCore::rangeExpandedAroundPositionByCharacters):
(WebCore::rangeForDictionaryLookupForSelection):
(WebCore::rangeForDictionaryLookupAtHitTestResult):
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:

Source/WebKit/mac:

New WKSystemInterface functions that WebCore needs to use.
* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface):

WebActionMenuController now keeps an ivar for the WebCore::HitTestResult. This 
makes a lot of things easier.
* WebView/WebActionMenuController.h:
* WebView/WebActionMenuController.mm:

Perform the hit test ourselves instead of calling into WebView so that we can more 
easily save the WebCore::HitTestResult for ourselves.
(-[WebActionMenuController performHitTestAtPoint:]):

Clear selection for non-text menus.
(-[WebActionMenuController prepareForMenu:withEvent:]):

Re-set the _type here just to be safe.
(-[WebActionMenuController didCloseMenu:withEvent:]):

Moving this method to be next to the link actions so they can be within a pragma 
mark.
(-[WebActionMenuController _defaultMenuItemsForLink:]):

New method for default text actions — lookup and copy.
(-[WebActionMenuController _defaultMenuItemsForText:]):
(-[WebActionMenuController _copySelection:]):
(-[WebActionMenuController _lookupText:]):

If there is not already a selection, invoking the action menu on text should 
select the lookup text.
(-[WebActionMenuController _selectLookupText]):
(performDictionaryLookupForSelection):
(performDictionaryLookupForRange):

Handle text now.
(-[WebActionMenuController _createActionMenuItemForTag:withHitTestResult:]):
(-[WebActionMenuController _defaultMenuItemsForHitTestResult:]):

New enum values.
* WebView/WebUIDelegatePrivate.h:

Pass didCloseMenu on to the controller.
* WebView/WebView.mm:
(-[WebView didCloseMenu:withEvent:]):

Source/WebKit2:

WK1 now needs to do a lot of dictionary lookup operations that it did not 
previously have to handle. So this patch takes a lot of that functionality, which 
was implemented as static functions in WebPageMac for WK2 and moves it into 
WebCore.

* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performDictionaryLookupForRange):
(WebKit::isPositionInRange): Deleted.
(WebKit::shouldUseSelection): Deleted.
(WebKit::rangeExpandedAroundPositionByCharacters): Deleted.
(WebKit::rangeForDictionaryLookupForSelection): Deleted.
(WebKit::rangeForDictionaryLookupAtHitTestResult): Deleted.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175814 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move 'text-indent' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138547

Reviewed by Andreas Kling.

Move 'text-indent' CSS property from DeprecatedStyleBuilder to the new
StyleBuilder, by using custom code.

No new tests, no behavior change.

* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyTextIndent::applyInheritValue): Deleted.
(WebCore::ApplyPropertyTextIndent::applyInitialValue): Deleted.
(WebCore::ApplyPropertyTextIndent::applyValue): Deleted.
(WebCore::ApplyPropertyTextIndent::createHandler): Deleted.
* css/StyleBuilderConverter.h:
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::applyInheritTextIndent):
(WebCore::StyleBuilderFunctions::applyInitialTextIndent):
(WebCore::StyleBuilderFunctions::applyValueTextIndent):


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

* editing/DictionaryLookup.h:
* editing/DictionaryLookup.mm:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175816 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move 'resize' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138550

Reviewed by Andreas Kling.

No new tests, no behavior change.

Move 'resize' CSS property from DeprecatedStyleBuilder to the new
StyleBuilder by adding a new 'Resize' Converter function.

* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyResize::applyValue): Deleted.
(WebCore::ApplyPropertyResize::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertResize):


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