Regression(r175947): Caused assertions in debug builds
https://bugs.webkit.org/show_bug.cgi?id=138620

Reviewed by Benjamin Poulain.

In HTMLCollection::traverseForward(), traversedCount was incremented 1
time too many when hitting the end of the collection (i.e. element
becomes null). Doing a partial revert.

No new tests, already covered by existing tests.

* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::traverseForward):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175968 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a respondsToSelector check to dismissActionMenuPopovers
​https://bugs.webkit.org/show_bug.cgi?id=138600
<rdar://problem/18932770>

Reviewed by Beth Dakin.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController dismissActionMenuPopovers]):
Avoid calling this wherever it doesn't exist.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175969 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r175852.
https://bugs.webkit.org/show_bug.cgi?id=138626

Broke PLT by introducing a crash. (Requested by rniwa on
#webkit).

Reverted changeset:

"Lazily create HTMLInputElement's inputType and shadow
subtree"
https://bugs.webkit.org/show_bug.cgi?id=138524
http://trac.webkit.org/changeset/175852

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175970 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed Mountain Lion build fix

* platform/spi/cocoa/CoreTextSPI.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175971 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Finish moving CTFontGetVerticalGlyphsForCharacters and CTLineCreateWithUniCharProvider out from WKSI
https://bugs.webkit.org/show_bug.cgi?id=138623

Reviewed by Geoff Garen.

Source/WebCore:

No new tests because there is no behavior change.

* WebCore.exp.in:
* WebCore.order:
* platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
(WebCore::GlyphPage::fill):
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::canRenderCombiningCharacterSequence):
* platform/ios/WebCoreSystemInterfaceIOS.mm:
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
* platform/spi/cocoa/CoreTextSPI.h:

Source/WebKit/mac:

* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
* WebKit.order:

Source/WebKit2:

* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
* mac/WebKit2.order:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175972 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Occasional assertion failure under recommendedScrollbarStyleDidChange()
https://bugs.webkit.org/show_bug.cgi?id=138604
<rdar://problem/18855914>

Reviewed by Beth Dakin.

It is possible for AppKit to install tracking areas into our view
behind our back, but we have code that depends on knowing exactly
the set of tracking areas installed on WKView.

Make this more robust by keeping a reference to the tracking area we
use for many things and manipulating that instead of making assumptions
about the total set of tracking areas on WKView.

* UIProcess/API/mac/WKView.mm:
(-[WKView _primaryTrackingArea]):
(-[WKView _replacePrimaryTrackingArea:]):
Provide a 'primary' tracking area setter/getter.

(-[WKView initWithFrame:context:configuration:webView:]):
Keep a reference to the original tracking area installed at initialization time.

* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):
Instead of walking the set of tracking areas, make use of the fact that
we know exactly which tracking area we installed, and uninstall just that
one, and replace it with our newly-built one.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175973 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Protect Document in ProcessingInstruction::setXSLStyleSheet()
<http://webkit.org/b/138621>

Reviewed by Andreas Kling.

The patch is inspired by the following Blink revision by
<tasak@google.com>:
<https://src.chromium.org/viewvc/blink?view=rev&revision=182309>

* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::setXSLStyleSheet):

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

* platform/spi/cocoa/CoreTextSPI.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175975 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] cleanup wireless route monitoring
https://bugs.webkit.org/show_bug.cgi?id=138614

Reviewed by Jer Noble.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::clearMediaPlayer): Add logging.
(WebCore::HTMLMediaElement::removeEventListener): Ditto.
(WebCore::HTMLMediaElement::createMediaPlayer): Ditto.

* platform/audio/ios/MediaSessionManagerIOS.mm:
(WebCore::MediaSessionManageriOS::resetRestrictions): Add logging.
(WebCore::MediaSessionManageriOS::configureWireLessTargetMonitoring): Ditto.
(WebCore::MediaSessionManageriOS::updateNowPlayingInfo): Ditto.
(-[WebMediaSessionHelper initWithCallback:]): Ditto.
(-[WebMediaSessionHelper dealloc]): Always deallocate volume view and routing controller
    on the main thread.
(-[WebMediaSessionHelper clearCallback]): Add logging.
(-[WebMediaSessionHelper hasWirelessTargetsAvailable]): Ditto.
(-[WebMediaSessionHelper startMonitoringAirPlayRoutes]): Always call routing controller on
    the main thread.
(-[WebMediaSessionHelper stopMonitoringAirPlayRoutes]): Ditto.
(-[WebMediaSessionHelper interruption:]): Add logging.
(-[WebMediaSessionHelper applicationWillEnterForeground:]): Ditto.
(-[WebMediaSessionHelper applicationDidBecomeActive:]): Ditto.
(-[WebMediaSessionHelper applicationWillResignActive:]): Ditto.
(-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]): Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175976 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Main.js missing many trailing semicolons
https://bugs.webkit.org/show_bug.cgi?id=138624

Add semicolons to function variable assignments.

Reviewed by Timothy Hatcher.

* UserInterface/Base/Main.js: Added semicolons.


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