Generate casting helpers for scrolling tree classes.
<https://webkit.org/b/124286>

Added SCROLLING_STATE_NODE_TYPE_CASTS and used it to replace the
hand-written toFoo() casts for ScrollingStateNode subclasses.

Reviewed by Anders Carlsson.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159207 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add support for HTMLMediaElement.fastSeek()
https://bugs.webkit.org/show_bug.cgi?id=124262

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/video-fast-seek.html

Add the fastSeek() method to HTMLMediaElement, and use fastSeek() in
the JavaScript media controls.

Add the new fastSeek() method:
* html/HTMLMediaElement.cpp:
(HTMLMediaElement::fastSeek): Call seekWithTolerance.
(HTMLMediaElement::seek): Call seekWithTolerance with 0 tolerance.
(HTMLMediaElement::seekWithTolerance): Renamed from seek().
* html/HTMLMediaElement.h:
* html/HTMLMediaElement.idl:

Add seekWithTolerance() to MediaPlayer:
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::seekWithTolerance): Pass to MediaPlayerPrivate.
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::seekWithTolerance): Default implementation which
    calls seek().
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::seek): Call seekWithTolerance with 0 tolerance.
(WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance): Renamed from seek().
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): Take tolerance parameters.

Use the new fastSeek() method while actively scrubbing.
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.createControls): Add mouse up and down handlers.
(Controller.prototype.handleTimeUpdate): Only update the timeline when not scrubbing.
(Controller.prototype.handleTimelineChange): Use fastSeek().
(Controller.prototype.handleTimelineMouseDown): Start scrubbing.
(Controller.prototype.handleTimelineMouseUp): Stop scrubbing.

LayoutTests:

* media/video-fast-seek-expected.txt: Added.
* media/video-fast-seek.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159208 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move provisional load state handling to FrameLoadState
https://bugs.webkit.org/show_bug.cgi?id=124291

Reviewed by Dan Bernstein.

* UIProcess/FrameLoadState.cpp:
(WebKit::FrameLoadState::didStartProvisionalLoad):
(WebKit::FrameLoadState::didReceiveServerRedirectForProvisionalLoad):
(WebKit::FrameLoadState::didFailProvisionalLoad):
* UIProcess/FrameLoadState.h:
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::didStartProvisionalLoad):
(WebKit::WebFrameProxy::didReceiveServerRedirectForProvisionalLoad):
(WebKit::WebFrameProxy::didFailProvisionalLoad):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159209 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r158014): Many webpages throw stack overflow exceptions on iOS (because Parser::parseMemberExpression uses ~130K more stack)
https://bugs.webkit.org/show_bug.cgi?id=124177

Reviewed by Michael Saboff.

This patch pushes error handling into NEVER_INLINE functions to perform
the actual error message construction.  This dramatically reduces the
stack usage of the Parser.  For the large functions (such as parseMemberExpression)
the improvement is on the order of 2.5x reduction in stack usage.  For
smaller functions the reduction is in the order of 5-6x.

* parser/Parser.cpp:
(JSC::::logError):
* parser/Parser.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159210 268f45cc-cd09-0410-ab3c-d52691b4dbfc
crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html is failing on Maverics release bot
https://bugs.webkit.org/show_bug.cgi?id=124280

Reviewed by Anders Carlsson.

Source/WebCore:

* crypto/mac/CryptoKeyRSAMac.cpp: (WebCore::CryptoKeyRSA::buildAlgorithmDescription):
Don't be a muppet, initialize your variables.

LayoutTests:

* TestExpectations: Unskip.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159211 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed EFL gardening

Remove failure tests expectations after r159116.

* platform/efl/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159212 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Check WebCrypto parameter types when casting
https://bugs.webkit.org/show_bug.cgi?id=124297

Reviewed by Sam Weinig.

Also changed existing toCryptoXXX functions to use TYPE_CASTS_BASE mechanism.

* bindings/js/JSCryptoAlgorithmDictionary.cpp:
(WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
And sure enough, there was a bug caught by the added checks.

* bindings/js/JSCryptoKeySerializationJWK.cpp:
(WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm):
* crypto/CryptoAlgorithmParameters.h:
(WebCore::CryptoAlgorithmParameters::ENUM_CLASS):
(WebCore::CryptoAlgorithmParameters::parametersClass):
* crypto/CryptoKey.h:
* crypto/CryptoKeyData.h:
* crypto/CryptoKeySerialization.h:
* crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
(WebCore::CryptoAlgorithmAES_CBC::generateKey):
* crypto/algorithms/CryptoAlgorithmHMAC.cpp:
(WebCore::CryptoAlgorithmHMAC::generateKey):
(WebCore::CryptoAlgorithmHMAC::importKey):
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey):
* crypto/keys/CryptoKeyAES.h:
* crypto/keys/CryptoKeyDataOctetSequence.h:
(WebCore::isCryptoKeyDataOctetSequence):
* crypto/keys/CryptoKeyDataRSAComponents.h:
(WebCore::isCryptoKeyDataRSAComponents):
* crypto/keys/CryptoKeyHMAC.h:
* crypto/keys/CryptoKeyRSA.h:
* crypto/keys/CryptoKeySerializationRaw.h:
* crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
(WebCore::CryptoAlgorithmAES_CBC::encrypt):
(WebCore::CryptoAlgorithmAES_CBC::decrypt):
* crypto/mac/CryptoAlgorithmHMACMac.cpp:
(WebCore::CryptoAlgorithmHMAC::sign):
(WebCore::CryptoAlgorithmHMAC::verify):
* crypto/parameters/CryptoAlgorithmAesCbcParams.h:
* crypto/parameters/CryptoAlgorithmAesKeyGenParams.h:
* crypto/parameters/CryptoAlgorithmHmacKeyParams.h:
* crypto/parameters/CryptoAlgorithmHmacParams.h:
* crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h:
* crypto/parameters/CryptoAlgorithmRsaSsaKeyParams.h:
* crypto/parameters/CryptoAlgorithmRsaSsaParams.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159213 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Delete unused TextPainter function
https://bugs.webkit.org/show_bug.cgi?id=124292

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2013-11-13
Reviewed by Tim Horton.

New tests are unnecessary since there is no behavior change

* rendering/TextPainter.cpp:
(WebCore::TextPainter::paintText):
* rendering/TextPainter.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159214 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Unreviewed gardening of some canvas tests.

* platform/win/fast/canvas/canvas-draw-canvas-on-canvas-shadow-expected.txt:
* platform/win/fast/canvas/canvas-fillRect-gradient-shadow-expected.txt:
* platform/win/fast/canvas/canvas-render-layer-expected.txt:
* platform/win/fast/canvas/canvas-scale-shadowBlur-expected.txt:
* platform/win/fast/canvas/canvas-scale-strokePath-shadow-expected.txt:
* platform/win/fast/canvas/canvas-strokePath-gradient-shadow-expected.txt:
* platform/win/fast/canvas/canvas-strokeRect-alpha-shadow-expected.txt:
* platform/win/fast/canvas/canvas-strokeRect-gradient-shadow-expected.txt:
* platform/win/fast/forms/range/slider-mouse-events-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159215 268f45cc-cd09-0410-ab3c-d52691b4dbfc
r159210 added a period where there previously wasn't one, breaking >100 tests

Rubber-stamped by Oliver Hunt.

* parser/Parser.cpp:
(JSC::::logError):
Remove the extra period.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159216 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WKArrayIsMutable should not be mangled
https://bugs.webkit.org/show_bug.cgi?id=124299

Reviewed by Andreas Kling.

* Shared/API/c/WKDeprecatedFunctions.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159217 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ASSERTION FAILED: m_repaintRect == renderer().clippedOverflowRectForRepaint(renderer().containerForRepaint()) after r135816
https://bugs.webkit.org/show_bug.cgi?id=103432

Reviewed by Dave Hyatt.

RenderLayer caches repaint rects in m_repaintRect, and on updating layer
positions after scrolling, asserts that the cached rect is correct. However,
this assertion would sometimes fail if we were scrolling as a result of
doing adjustViewSize() in the middle of layout, because we haven't updated
layer positions post-layout yet.

Fix by having the poorly named FrameView::repaintFixedElementsAfterScrolling()
skip the layer updating if this FrameView is inside of adjusetViewSize() in
layout.

In order to know if we're inside view size adjusting, add a LayoutPhase
member to FrameView, replacing two existing bools that track laying out state.

Investigative work showed that there are many, many ways to re-enter FrameView::layout(),
which makes it hard (but desirable) to more assertions about state changes, but
indicated that saving and restoring the state (via TemporaryChange<LayoutPhase>)
was a good idea.

* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::reset):
(WebCore::FrameView::updateCompositingLayersAfterStyleChange):
(WebCore::FrameView::layout):
(WebCore::FrameView::repaintFixedElementsAfterScrolling):
* page/FrameView.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159218 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[MathML] The double bar vertical delimiter does not stretch properly
https://bugs.webkit.org/show_bug.cgi?id=123543

Reviewed by Chris Fleizach.

Source/WebCore:

* rendering/mathml/RenderMathMLOperator.cpp: Add stretching support for U+2225, which
is another version of the vertical bar.

LayoutTests:

* mathml/presentation/mo-stretch.html: Add &DoubleVerticalBar; to this test,
which covers the other version of the vertical bar.
* platform/gtk/mathml/presentation/mo-stretch-expected.png:
* platform/gtk/mathml/presentation/mo-stretch-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove WebGraphicsContext
https://bugs.webkit.org/show_bug.cgi?id=124302

Reviewed by Dan Bernstein.

WebGraphicsContext and its API "object", WKGraphicsContextRef was only used
for the overhang paint callback which has been removed.

* Shared/API/c/WKDeprecatedFunctions.cpp:
(WKGraphicsContextGetCGContext):
* Shared/API/c/WKGraphicsContext.cpp: Removed.
* Shared/API/c/WKGraphicsContext.h: Removed.
* Shared/API/c/cg/WKGraphicsContextCG.cpp: Removed.
* Shared/API/c/cg/WKGraphicsContextCG.h: Removed.
* Shared/APIObject.h:
* Shared/WebGraphicsContext.cpp: Removed.
* Shared/WebGraphicsContext.h: Removed.
* UIProcess/API/C/WebKit2_C.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159222 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove ChromeClient::paintCustomOverhangArea
https://bugs.webkit.org/show_bug.cgi?id=124304

Reviewed by Beth Dakin.

This function always returns false now; get rid of it.

* page/Chrome.cpp:
* page/ChromeClient.h:
* page/FrameView.cpp:
(WebCore::FrameView::paintOverhangAreas):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159224 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix debug build.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159225 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix release build after r159224.

* WebCore.exp.in:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159226 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed EFL build fix after r159222.

* CMakeLists.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159227 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove redundant return after r159173
https://bugs.webkit.org/show_bug.cgi?id=124303

Reviewed by Geoff Garen.

* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::loadResourceSynchronously):
Remove redundant return.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159228 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Fix build after r159222
https://bugs.webkit.org/show_bug.cgi?id=124305

Patch by Nick Diego Yamane <nick.yamane@openbossa.org> on 2013-11-13
Reviewed by Tim Horton.

WebGraphicsContext and its API has been removed.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Shared/API/c/gtk/WKGraphicsContextGtk.cpp: Removed.
* Shared/API/c/gtk/WKGraphicsContextGtk.h: Removed.

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