Make slowPathAllocsBetweenGCs a runtime option.
<https://webkit.org/b/132137>

Reviewed by Mark Hahnenberg.

This will make it easier to more casually run tests with this configuration
as well as to reproduce issues (instead of requiring a code mod and rebuild).
We will now take --slowPathAllocsBetweenGCs=N where N is the number of
slow path allocations before we trigger a collection.

The option defaults to 0, which is reserved to mean that we will not trigger
any collections there.

* heap/Heap.h:
* heap/MarkedAllocator.cpp:
(JSC::MarkedAllocator::doTestCollectionsIfNeeded):
(JSC::MarkedAllocator::allocateSlowCase):
* heap/MarkedAllocator.h:
* runtime/Options.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167772 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unify platformWidthForGlyph across OS X and iOS
https://bugs.webkit.org/show_bug.cgi?id=132036

Reviewed by Darin Adler.

This patch creates on shared SimpleFontData::platformWidthForGlyph() function for both OS X and iOS.

No new tests are necessary because there should be no behavior changes.

* platform/graphics/SimpleFontData.h: Signatures for two helper functions
* platform/graphics/ios/SimpleFontDataIOS.mm: Replace iOS implementation of platformWidthForGlyph() with
implementations of only the two helper functions
(WebCore::SimpleFontData::getRenderingStyle): Compute style argument to CGFontGetGlyphAdvancesForStyle()
(WebCore::SimpleFontData::advanceForColorBitmapFont): iOS doesn't have color bitmap fonts
(WebCore::SimpleFontData::platformWidthForGlyph): Deleted.
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::getRenderingStyle): Compute style argument to CGFontGetGlyphAdvancesForStyle()
(WebCore::SimpleFontData::advanceForColorBitmapFont): Use [NSFont advancementForGlyph] to compute the advance
(WebCore::hasCustomTracking): Removed #if
(WebCore::isEmoji): Only relevant on iOS
(WebCore::SimpleFontData::platformWidthForGlyph): Shared implementation. Calls helper functions.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167773 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS WebKit2] Should properly handle focus redirect (keyboard state changes when focus changes).
https://bugs.webkit.org/show_bug.cgi?id=132136
<rdar://problem/16238336>

Reviewed by Benjamin Poulain.

Focusing a field from JavaScript should not make the keyboard or the select picker
appear unless the user has already started interacting with one of the fields in the page.
Adding a parameter to StartAssistingNode to indicate whether the focus change is a result
of a user action.

* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::startAssistingNode):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _startAssistingNode:userIsInteracting:userObject:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::startAssistingNode):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::dispatchTouchEvent):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::handleTap):
(WebKit::WebPage::elementDidFocus):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167774 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit2 View Gestures: Use a single struct for the snapshot, and pass it around
https://bugs.webkit.org/show_bug.cgi?id=132114

Reviewed by Simon Fraser.

Have only a single map in ViewSnapshotStore, from back-forward item
to ViewSnapshotStore::Snapshot, and return the Snapshot struct when looking
up snapshots (via getSnapshot()), so that future patches can persist additional
information along with the snapshot.

* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::endSwipeGesture):
* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::retrieveSnapshotForItem):
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::endSwipeGesture):
Adopt getSnapshot() instead of snapshotAndRenderTreeSize().
Move retrieveSnapshotForItem out into a separate function (for future use).

* UIProcess/mac/ViewSnapshotStore.h:
(WebKit::ViewSnapshotStore::disableSnapshotting):
(WebKit::ViewSnapshotStore::enableSnapshotting):
* UIProcess/mac/ViewSnapshotStore.mm:
(WebKit::ViewSnapshotStore::pruneSnapshots):
(WebKit::ViewSnapshotStore::recordSnapshot):
(WebKit::ViewSnapshotStore::getSnapshot):
(WebKit::ViewSnapshotStore::snapshotAndRenderTreeSize): Deleted.
Make Snapshot struct public.
Get rid of the separate map of back-forward items to render tree sizes.
When evicting, instead of removing the entry, clear out its snapshot image;
this way, we can keep other snapshot metadata around.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167775 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] don't ask for AVAssetTrack properties before they are available
https://bugs.webkit.org/show_bug.cgi?id=131902
<rdar://problem/16505076>

Reviewed by Brent Fulgham.

No new tests, the behavior this changes can not be tested with a layout test.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Initialize
    m_cachedTotalBytes.
(WebCore::MediaPlayerPrivateAVFoundationObjC::beginLoadingMetadata): Don't report that
    metadata has been loaded until the track properties we need have been loaded too.
(WebCore::MediaPlayerPrivateAVFoundationObjC::totalBytes): Cache totalBytes instead
    of recalculating it every time.
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange): Invalidate cached
    total bytes.
(WebCore::assetTrackMetadataKeyNames): Array of AVAssetTrack properties we use.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167776 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unused class forward declarations in Page
https://bugs.webkit.org/show_bug.cgi?id=132141

Reviewed by Benjamin Poulain.

No new tests, no change on behavior.

* page/Page.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167777 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: CSS autofill suggests properties instead of values when values are needed
https://bugs.webkit.org/show_bug.cgi?id=132090

Patch by Jonathan Wells <jonowells@apple.com> on 2014-04-24
Reviewed by Joseph Pecoraro.

Updates are required to the CodeMirror helpers to be compatible with
CodeMirror 4. Some of those changes have been made to fix an issue
with CSS autofill, CSS code coloring, and also
https://bugs.webkit.org/show_bug.cgi?id=131859. The main issue is that
CodeMirror 4's CSS mode (css.js) stores its parsing modes in a different
data structure. All references to state.stack are obscelete. Many
are fixed here and more will be in an upcoming patch.

* Tools/PrettyPrinting/CodeMirrorFormatters.js: Removed exception for checking state.stack properties.
* UserInterface/Controllers/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._generateCSSCompletions): Corrected "block" state detection.
* UserInterface/External/CodeMirror/less.js: Removed.
* UserInterface/Views/CodeMirrorAdditions.js: Sets default state of "block" correctly.
* UserInterface/Views/CodeMirrorFormatters.js: Removed exception for checking state.stack properties.
* UserInterface/Views/SyntaxHighlightingDefaultTheme.css: Fix styles to match CSS mode changes.

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

Caused full screen regressions on vimeo, youtube, and others.
(Requested by jernoble on #webkit).

Reverted changeset:

"Fullscreen media controls are unusable in pagination mode"
https://bugs.webkit.org/show_bug.cgi?id=131705
http://trac.webkit.org/changeset/167441

Patch by Commit Queue <commit-queue@webkit.org> on 2014-04-24

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