Fixed ASSERTION FAILED: callFrame == vm->topCallFrame in JSC::Interpreter::addStackTraceIfNecessary
https://bugs.webkit.org/show_bug.cgi?id=118498

Patch by Chris Curtis <chris_curtis@apple.com> on 2013-07-18
Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

* jit/JITStubs.cpp:
(throwExceptionFromOpCall):
Created new throwExceptionFromOpCall that takes in a functor that contains
a function pointer (to create the errorObject) instead of a JSValue. Inside
of throwExceptionFromOpCall the topCallFrame is being rolled back in order
to handle the error throw. By passing the function pointer in, we can defer
the creation of the error object until after topCallFrame has been rolled
back. This allows the error object to be created with the appropriate top
frame.

DEFINE_STUB_FUNCTION(void*, stack_check):
DEFINE_STUB_FUNCTION(void*, op_call_arityCheck):
DEFINE_STUB_FUNCTION(void*, op_construct_arityCheck):
DEFINE_STUB_FUNCTION(EncodedJSValue, op_call_NotJSFunction):
DEFINE_STUB_FUNCTION(EncodedJSValue, op_construct_NotJSConstruct):

(JSC::ErrorFunctor::~ErrorFunctor):
(JSC::ErrorWithExecFunctor::ErrorWithExecFunctor):
(JSC::ErrorWithExecFunctor::operator()):
(JSC::ErrorWithExecAndCalleeFunctor::ErrorWithExecAndCalleeFunctor):
(JSC::ErrorWithExecAndCalleeFunctor::operator()):
(JSC::ErrorWithExceptionFunctor::ErrorWithExceptionFunctor):
(JSC::ErrorWithExceptionFunctor::operator()):
(JSC::throwExceptionFromOpCall):

In order to eliminate the need to duplicate code, an error functor was
created for the 3 different throwExceptionFromOpCall handles.
1. The exception needs to be created, and the function pointer takes 1
    parameter(callFrame->callerFrame()).
2. The exception needs to be created, and the function pointer takes 2
    parameters (callFrame->callerFrame(), callFrame.calleeAsValue()).
3. The exception is already created. In this case, At the time when
    the error functor is called, vm.exception is returned.

* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* runtime/ExceptionHelpers.cpp:
(JSC::errorDescriptionForValue):
(JSC::createError):
(JSC::createInvalidParameterError):
(JSC::createNotAConstructorError):
(JSC::createNotAFunctionError):
(JSC::createNotAnObjectError):
* runtime/ExceptionHelpers.h:

The function toString() was being used to stringify an object for an exception
message. If the user wrote a toString() for that object, then the system would
continue to evaluate that code. A new helper function was created to prevent
the system to continue execution and exception creation from that execution.

LayoutTests:

New Tests to see if JSC evaluates user code after exception creation

* fast/js/not-a-constructor-to-string-expected.txt: Added.
* fast/js/not-a-constructor-to-string.html: Added.
* fast/js/not-a-function-to-string-expected.txt: Added.
* fast/js/not-a-function-to-string.html: Added.

Modified test output of the object that was being evaluated at the time of the
error. Only the error message has changed.

* fast/dom/MutationObserver/mutation-record-constructor-expected.txt:
* fast/dom/NodeList/nodelist-item-call-as-function-expected.txt:
* fast/dom/Range/getClientRects-expected.txt:
* fast/dom/SelectorAPI/dumpNodeList-almost-strict-expected.txt:
* fast/dom/SelectorAPI/dumpNodeList-expected.txt:
* fast/dom/call-a-constructor-as-a-function-expected.txt:
* fast/dom/setPrimitiveValue-exceptions-expected.txt:
* fast/events/window-onerror-exception-in-attr-expected.txt:
* fast/forms/select-namedItem-expected.txt:
* fast/js/arguments-expected.txt:
* fast/js/array-prototype-properties-expected.txt:
* fast/js/basic-strict-mode-expected.txt:
* fast/js/date-toisostring-expected.txt:
* fast/js/delete-getters-setters-expected.txt:
* fast/js/dfg-check-structure-elimination-for-non-cell-expected.txt:
* fast/js/dfg-compare-final-object-to-final-object-or-other-when-both-proven-final-object-expected.txt:
* fast/js/dfg-compare-final-object-to-final-object-or-other-when-proven-final-object-expected.txt:
* fast/js/dfg-inline-arguments-use-from-all-the-places-broken-expected.txt:
* fast/js/dfg-peephole-compare-final-object-to-final-object-or-other-when-both-proven-final-object-expected.txt:
* fast/js/dfg-peephole-compare-final-object-to-final-object-or-other-when-proven-final-object-expected.txt:
* fast/js/exception-expression-offset-expected.txt:
* fast/js/exception-for-nonobject-expected.txt:
* fast/js/exception-thrown-from-new-expected.txt:
* fast/js/function-bind-expected.txt:
* fast/js/instance-of-immediates-expected.txt:
* fast/js/object-prototype-properties-expected.txt:
* fast/regex/cross-frame-callable-expected.txt:
* fast/xsl/transform-xhr-doc-expected.txt:
* http/tests/security/aboutBlank/xss-DENIED-navigate-opener-document-write-expected.txt:
* http/tests/security/aboutBlank/xss-DENIED-navigate-opener-javascript-url-expected.txt:
* http/tests/security/aboutBlank/xss-DENIED-set-opener-expected.txt:
* http/tests/security/document-all-expected.txt:
* http/tests/security/srcdoc-in-sandbox-cannot-access-parent-expected.txt:
* http/tests/security/window-named-proto-expected.txt:
* inspector/console/console-exception-stack-traces-expected.txt:
* platform/efl/css3/selectors3/xhtml/css3-modsel-15c-expected.txt:
* platform/efl/css3/selectors3/xml/css3-modsel-15c-expected.txt:
* platform/efl/fast/events/updateLayoutForHitTest-expected.txt:
* platform/efl/tables/mozilla_expected_failures/bugs/bug92868_1-expected.txt:
* platform/gtk/css3/selectors3/xhtml/css3-modsel-15c-expected.txt:
* platform/gtk/css3/selectors3/xml/css3-modsel-15c-expected.txt:
* platform/gtk/fast/events/updateLayoutForHitTest-expected.txt:
* platform/gtk/svg/custom/createelement-expected.txt:
* platform/gtk/tables/mozilla_expected_failures/bugs/bug92868_1-expected.txt:
* platform/mac-wk2/editing/spelling/markers-expected.txt:
* platform/mac-wk2/plugins/npruntime/object-from-destroyed-plugin-expected.txt: Added.
* platform/mac-wk2/plugins/npruntime/object-from-destroyed-plugin-in-subframe-expected.txt: Added.
* platform/mac/css3/selectors3/xhtml/css3-modsel-15c-expected.txt:
* platform/mac/css3/selectors3/xml/css3-modsel-15c-expected.txt:
* platform/mac/fast/events/updateLayoutForHitTest-expected.txt:
* platform/mac/tables/mozilla_expected_failures/bugs/bug92868_1-expected.txt:
* platform/qt/css3/selectors3/xhtml/css3-modsel-15c-expected.txt:
* platform/qt/css3/selectors3/xml/css3-modsel-15c-expected.txt:
* platform/qt/svg/custom/createelement-expected.txt:
* platform/qt/tables/mozilla_expected_failures/bugs/bug92868_1-expected.txt:
* platform/win/fast/dom/call-a-constructor-as-a-function-expected.txt:
* plugins/npruntime/object-from-destroyed-plugin-expected.txt:
* plugins/npruntime/object-from-destroyed-plugin-in-subframe-expected.txt:
* plugins/npruntime/plugin-scriptable-object-invoke-default-expected.txt:
* sputnik/Conformance/08_Types/8.6_The_Object_Type/8.6.2_Internal_Properties_and_Methods/S8.6.2_A7-expected.txt:
* sputnik/Conformance/13_Function_Definition/S13_A17_T2-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.1_The_Global_Object/S15.1_A1_T1-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.1_The_Global_Object/S15.1_A1_T2-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.1_The_Global_Object/S15.1_A2_T1-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.2_Object/15.2.4/15.2.4.2_Object.prototype.toString/S15.2.4.2_A7-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.2_Object/15.2.4/15.2.4.3_Object.prototype.toLocaleString/S15.2.4.3_A7-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.2_Object/15.2.4/15.2.4.4_Object.prototype.valueOf/S15.2.4.4_A7-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.2_Object/15.2.4/15.2.4.5_Object.prototype.hasOwnProperty/S15.2.4.5_A7-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.2_Object/15.2.4/15.2.4.6_Object.prototype.isPrototypeOf/S15.2.4.6_A7-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.2_Object/15.2.4/15.2.4.7_Object.prototype.propertyIsEnumerable/S15.2.4.7_A7-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.2_Object/15.2.4/S15.2.4_A3-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.2_Object/15.2.4/S15.2.4_A4-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.3_Function/15.3.4/15.3.4.2_Function.prototype.toString/S15.3.4.2_A7-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.3_Function/15.3.4/S15.3.4_A5-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.12_String.prototype.search/S15.5.4.12_A7-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.13_String.prototype.slice/S15.5.4.13_A7-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.15_String.prototype.substring/S15.5.4.15_A7-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.17_String.prototype.toLocaleLowerCase/S15.5.4.17_A7-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.7_String.prototype.indexOf/S15.5.4.7_A7-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.8_String.prototype.lastIndexOf/S15.5.4.8_A7-expected.txt:
* svg/custom/createelement-expected.txt:
* svg/custom/use-nested-missing-target-removed-expected.txt:
* svg/dom/svgpath-out-of-bounds-getPathSeg-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152871 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Compositing pattern tests fail on Lion WK1 Debug.
https://bugs.webkit.org/show_bug.cgi?id=118870

Unreviewed.

Update Lion expectations after http://trac.webkit.org/changeset/152470

* platform/mac-lion/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152873 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make sure to link against _debug binaries when appropriate.
<rdar://problem/14473010>.

* win/tools/vsprops/debugsuffix.props:
* gtest/msvc/gtest-md.vcxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152874 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r152801.
http://trac.webkit.org/changeset/152801
https://bugs.webkit.org/show_bug.cgi?id=118876

Un-rebaseline some plugin tests since r152789 was rolled out
(Requested by rfong on #webkit).

* platform/win/editing/pasteboard/paste-noplugin-expected.txt: Removed.
* platform/win/platform/win/plugins/draws-gradient-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152875 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Media] Share more code between Mac and Windows implementation files.
https://bugs.webkit.org/show_bug.cgi?id=118801

Reviewed by Eric Carlson.

* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::clearTextTracks): Move
implementation from ObjC file to parent file.
(WebCore::MediaPlayerPrivateAVFoundation::processNewAndRemovedTextTracks):
Ditto.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
Remove duplicate implementation.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
Ditto.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
Ditto.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
Ditto.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152876 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Flash Player: deny file-read-data /Library/Application Support/Macromedia/FlashAuthor.cfg
https://bugs.webkit.org/show_bug.cgi?id=118874
<rdar://problem/14271327>

Patch by Simon Cooper <scooper@apple.com> on 2013-07-18
Reviewed by Alexey Proskuryakov.

Silently deny access to FlashAuthor.cfg. This location contains
files containing lists of paths that Flash Player will
"allow" access to (without asking the user). Since the plugin
sandbox won't permit the access to the listed paths it is better
to silently block attempts to read this "whitelist".

* Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152877 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] Share Qt port's codes to find zoomable area with CoordinatedGraphics.
https://bugs.webkit.org/show_bug.cgi?id=118585

Patch by Eunmi Lee <eunmi15.lee@samsung.com> on 2013-07-18
Reviewed by Anders Carlsson.

The function to find zoomable area is needed in order to implement the
feature to scale for double-tap gesture. The WK2 EFL and NIX port want
to use that function, so extract the code from the Qt port, make it
usable in the CoordinatedGraphics and add API and callback.

* CMakeLists.txt:
* Target.pri:
* UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
(WKViewFindZoomableAreaForRect):
* UIProcess/API/C/CoordinatedGraphics/WKView.h:
* UIProcess/API/efl/EwkView.cpp:
(EwkView::didFindZoomableArea):
* UIProcess/API/efl/EwkView.h:
* UIProcess/CoordinatedGraphics/WebPageProxyCoordinatedGraphics.cpp: Added.
(WebKit::WebPageProxy::findZoomableAreaForPoint):
(WebKit::WebPageProxy::didFindZoomableArea):
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::didFindZoomableArea):
(WebKit::WebView::findZoomableAreaForPoint):
* UIProcess/CoordinatedGraphics/WebView.h:
* UIProcess/CoordinatedGraphics/WebViewClient.cpp:
(WebKit::WebViewClient::didFindZoomableArea):
* UIProcess/CoordinatedGraphics/WebViewClient.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/efl/ViewClientEfl.cpp:
(WebKit::ViewClientEfl::didFindZoomableArea):
(WebKit::ViewClientEfl::ViewClientEfl):
* UIProcess/efl/ViewClientEfl.h:
* UIProcess/qt/WebPageProxyQt.cpp:
* WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp: Added.
(WebKit::WebPage::findZoomableAreaForPoint):
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152878 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Little cleaning of StringImpl::lower() and StringImpl::upper() for ARM
https://bugs.webkit.org/show_bug.cgi?id=118831

Reviewed by Gavin Barraclough.

Clean lower() and upper() before trying some optimizations:
-Prefix the code with the empty() case. Otherwise, each descending loop starts with
 a check for length == 0.
-Change ored to a 32 bits registers. ARM only has 32 bits registers and access to full word.
 To keep the value a UChar, the compiler is adding a bunch of useless value & 0xffff in the loops.
-Change the pointer based loops for index based loops. The compiler does a mighty job at optimizing
 those for each architecture. No need to make the code more complex.
-Don't perform the check for int32 unless we need to. The only code limited to int is Unicode::toLower.

* wtf/text/StringImpl.cpp:
(WTF::StringImpl::lower):
(WTF::StringImpl::upper):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152881 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CodeBlock DFG entry list isn't getting shrunk-to-fit after linking.
<http://webkit.org/b/118875>
<rdar://problem/14488577>

Reviewed by Geoffrey Garen.

Move the CodeBlock::shrinkToFit() call out of JITCompiler::link() and to the call sites
so SpeculativeJIT::linkOSREntries() can fill in CodeBlock::m_dfgData->osrEntry first.

886 kB progression on <http://twitter.com/awesomekling>

* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::link):
(JSC::DFG::JITCompiler::compile):
(JSC::DFG::JITCompiler::compileFunction):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152882 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the build after r152881

* wtf/text/StringImpl.cpp:
(WTF::StringImpl::lower):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152883 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fix after r152876.

* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::processNewAndRemovedTextTracks):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152884 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WorkerGlobalScope should support onoffline/ononline event handlers
https://bugs.webkit.org/show_bug.cgi?id=118832

Reviewed by Alexey Proskuryakov.

HTML5 spec says that WorkerGlobalScope should support
onoffline/ononline event handlers as stated in
http://www.whatwg.org/specs/web-apps/current-work/multipage/offline.html#event-offline

Modified NetworkStateNotifier to support multiple callbacks and added a
callback to dispatch offline and online events to WorkerGlobalScope
when network state is changed.

No new test because the current test infrastructure does not provide a
mock network state notifier.

* page/Page.cpp:
(WebCore::networkStateChanged):
Change the function to take an additional argument, isOnLine so that we
can remove a call to NetworkStateNotifier::onLine().
(WebCore::Page::Page):
Use NetworkStateNotifier::addNetworkStateChangeListener which
allows us to add multiple callbacks.

* platform/network/NetworkStateNotifier.cpp:
(WebCore::NetworkStateNotifier::addNetworkStateChangeListener):
Replace NetworkStateNotifier::setNetworkStateChangedFunction with
NetworkStateNotifier::addNetworkStateChangeListener.
(WebCore::NetworkStateNotifier::notifyNetworkStateChange):
A helper method to notify all registered network state change
callbacks.
* platform/network/NetworkStateNotifier.h:
(WebCore::NetworkStateNotifier::NetworkStateNotifier):
* platform/network/blackberry/NetworkStateNotifierBlackBerry.cpp:
(WebCore::NetworkStateNotifier::NetworkStateNotifier):
(WebCore::NetworkStateNotifier::networkStateChange):
* platform/network/efl/NetworkStateNotifierEfl.cpp:
(WebCore::NetworkStateNotifier::networkInterfaceChanged):
(WebCore::NetworkStateNotifier::NetworkStateNotifier):
* platform/network/mac/NetworkStateNotifierMac.cpp:
(WebCore::NetworkStateNotifier::networkStateChangeTimerFired):
(WebCore::NetworkStateNotifier::NetworkStateNotifier):
* platform/network/qt/NetworkStateNotifierQt.cpp:
(WebCore::NetworkStateNotifier::updateState):
(WebCore::NetworkStateNotifier::NetworkStateNotifier):
* platform/network/win/NetworkStateNotifierWin.cpp:
(WebCore::NetworkStateNotifier::addressChanged):
(WebCore::NetworkStateNotifier::NetworkStateNotifier):
Replace m_networkStateChangedFunction() with notifyNetworkStateChange().

* workers/Worker.cpp:
(WebCore::networkStateChanged):
Notify network state change by iterating all Workers.
(WebCore::Worker::Worker):
Initialize allWorkers and add networkStateChanged to
NetworkStateNotifier in first invocation. Add this Worker to
allWorkers.
(WebCore::Worker::~Worker):
Remove this Worker from allWorkers.
(WebCore::Worker::notifyNetworkStateChange):
* workers/Worker.h:
* workers/WorkerGlobalScope.h:
Add onoffline and ononline event handlers.
* workers/WorkerGlobalScope.idl:
Add onoffline and ononline event handlers
* workers/WorkerGlobalScopeProxy.h:

* workers/WorkerMessagingProxy.cpp:
(WebCore::NotifyNetworkStateChangeTask::create):
(WebCore::NotifyNetworkStateChangeTask::NotifyNetworkStateChangeTask):
(WebCore::NotifyNetworkStateChangeTask::performTask):
A subclass of ScriptExecutionContext::Task to dispatch offline and
online events to WorkerGlobalScope.
(WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
Notify network state change using ScriptExecutionContext::postTask to
dispatch events across threads.
* workers/WorkerMessagingProxy.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152885 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Bindings generation tests are failing
https://bugs.webkit.org/show_bug.cgi?id=118877

Reviewed by Kentaro Hara.

I inadvertently removed the wrong part of the if statement
in r152845, causing hasAttribute() to be used unconditionally
for reflected boolean attributes instead of fastHasAttribute().
This patch fixes the issue.

No new tests, covered by bindings tests.

* bindings/scripts/CodeGenerator.pm:
(GetterExpression):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152886 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardening. Rebase failing tests.

Patch by Gabor Abraham <abrhm@inf.u-szeged.hu> on 2013-07-19

* platform/qt-5.0-wk2/tables/mozilla/marvin/backgr_index-expected.png:
* platform/qt-5.0-wk2/tables/mozilla/marvin/backgr_index-expected.txt: Copied from LayoutTests/platform/qt/tables/mozilla/marvin/backgr_index-expected.txt.
* platform/qt/fast/lists/inlineBoxWrapperNullCheck-expected.txt:
* platform/qt/http/tests/security/contentSecurityPolicy/object-src-none-blocked-expected.txt:
* platform/qt/tables/mozilla/marvin/backgr_index-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152887 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use explicit HTMLFrameElementBase cast and introduce toHTMLFrameElementBase
https://bugs.webkit.org/show_bug.cgi?id=118873

Reviewed by Ryosuke Niwa.

It should be HTMLFrameElementBase that embraces both HTMLFrameElement and HTMLIFrameElement.
This also makes correct toFooElement possible.
Next, to avoid direct use of static_cast, this patch introduces toHTMLFrameElementBase for code cleanup.

* editing/FrameSelection.cpp:
(WebCore::scanForForm):
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::didNotifySubtreeInsertions):
* html/HTMLFrameElementBase.h:
(WebCore::toHTMLFrameElementBase):
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::loadSubframe):
* page/EventHandler.cpp:
(WebCore::targetIsFrame):
* page/FrameView.cpp:
(WebCore::FrameView::init):
* rendering/RenderFrameBase.cpp:
(WebCore::RenderFrameBase::layoutWithFlattening):
* rendering/RenderLayer.cpp:
(WebCore::frameElementAndViewPermitScroll):
(WebCore::RenderLayer::scrollRectToVisible):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152889 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] media/video-seek-multiple.html is failing
https://bugs.webkit.org/show_bug.cgi?id=117580

Patch by Miguel Gomez <magomez@igalia.com> on 2013-07-19
Reviewed by Philippe Normand.

Source/WebCore:

When receiving several seek calls in a row, ensure that the final position
is the one requested in the last call received.

Already covered in test media/video-seek-multiple.html

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::seek):

LayoutTests:

Change expectation for media/video-seek-multiple.html test

* platform/gtk/TestExpectations:

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

Fix an assertion failure which causes debug bots to fail.

* platform/network/NetworkStateNotifier.cpp:
(WebCore::NetworkStateNotifier::addNetworkStateChangeListener):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152894 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Fix regression in DumpRenderTree introduced in r152782 by checking if uri is valid
https://bugs.webkit.org/show_bug.cgi?id=118895

Patch by Simon Pena <simon.pena@samsung.com> on 2013-07-19
Reviewed by Philippe Normand.

In r152782 an uri is used to create an string representation without checking first if it
is valid. That fails later when the string is used to check for existing redirections. This
patch ensures that the uri is valid before using it.

* DumpRenderTree/gtk/DumpRenderTree.cpp:
(willSendRequestCallback): Ensure an uri is valid before using it.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152897 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Merge decamelizations fix ups in the GObject DOM bindings code generator
https://bugs.webkit.org/show_bug.cgi?id=117543

Patch by Diego Pino Garcia <dpino@igalia.com> on 2013-07-19
Reviewed by Carlos Garcia Campos.

Ensure that all the code that calls to decamelize() applies the same fix ups

Now all functions that need to decamelize a string should simply call
to decamelize(). This function calls to FixUpDecamelize to apply some
fix ups.

* bindings/scripts/CodeGeneratorGObject.pm:
(decamelize): decamelizes a string and applies fix ups
(FixUpDecamelize): applies a series of fix ups to a decamelized string
(GetParentGObjType): moved fix ups to FixUpDecamelize()
(GenerateProperties): simply call to decamelize
(GenerateHeader): simply call to decamelize
(GetGReturnMacro): simply call to decamelize
(GenerateFunction): simply call to decamelize
(GenerateCFile): simply call to decamelize
(GenerateEventTargetIface): simply call to decamelize

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152898 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][WK2] Unreviewed cleanup for pixel tester bot.

* platform/qt-5.0-wk2/TestExpectations:

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