Make topCallFrame reliable.
https://bugs.webkit.org/show_bug.cgi?id=98928.

Reviewed by Geoffrey Garen.

Source/JavaScriptCore: 

- VM entry points and the GC now uses topCallFrame.
- The callerFrame value in CallFrames are now always the previous
  frame on the stack, except for the first frame which has a
  callerFrame of 0 (not counting the HostCallFrameFlag).
  Hence, we can now traverse every frame on the stack all the way
  back to the first frame.
- GlobalExec's will no longer be used as the callerFrame values in
  call frames.
- Added fences and traps for debugging the JSStack in debug builds.

* bytecode/SamplingTool.h:
(SamplingTool):
(JSC::SamplingTool::CallRecord::CallRecord):
* dfg/DFGOperations.cpp:
- Fixed 2 DFG helper functions to flush topCallFrame as expected.
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::prepareForExternalCall):
* interpreter/CallFrame.h:
(JSC::ExecState::callerFrameNoFlags):
(ExecState):
(JSC::ExecState::argIndexForRegister):
(JSC::ExecState::getArgumentUnsafe):
* interpreter/CallFrameClosure.h:
(CallFrameClosure):
* interpreter/Interpreter.cpp:
(JSC):
(JSC::eval):
(JSC::Interpreter::Interpreter):
(JSC::Interpreter::throwException):
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::prepareForRepeatCall):
(JSC::Interpreter::endRepeatCall):
* interpreter/Interpreter.h:
(JSC):
(Interpreter):
* interpreter/JSStack.cpp:
(JSC::JSStack::JSStack):
(JSC::JSStack::gatherConservativeRoots):
(JSC::JSStack::disableErrorStackReserve):
* interpreter/JSStack.h:
(JSC):
(JSStack):
(JSC::JSStack::installFence):
(JSC::JSStack::validateFence):
(JSC::JSStack::installTrapsAfterFrame):
* interpreter/JSStackInlines.h: Added.
(JSC):
(JSC::JSStack::getTopOfFrame):
(JSC::JSStack::getTopOfStack):
(JSC::JSStack::getStartOfFrame):
(JSC::JSStack::pushFrame):
(JSC::JSStack::popFrame):
(JSC::JSStack::generateFenceValue):
(JSC::JSStack::installFence):
(JSC::JSStack::validateFence):
(JSC::JSStack::installTrapsAfterFrame):
* jit/JITStubs.cpp:
(JSC::jitCompileFor):
(JSC::lazyLinkFor):
- Set frame->codeBlock to 0 for both the above because they are called
  with partially intitialized frames (cb uninitialized), but may
  trigger a GC.
(JSC::DEFINE_STUB_FUNCTION):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):

LayoutTests: 

- Re-baseline some tests to match the new stack dump results.

* http/tests/inspector/console-resource-errors-expected.txt:
* http/tests/inspector/stacktraces/csp-injected-content-warning-contains-stacktrace-expected.txt:
* http/tests/inspector/stacktraces/csp-inline-warning-contains-stacktrace-expected.txt:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132182 268f45cc-cd09-0410-ab3c-d52691b4dbfc
When blocking localStorage, Firefox throws a security exception on access, and maybe so should we
https://bugs.webkit.org/show_bug.cgi?id=63257

Patch by Dan Carney <dcarney@google.com> on 2012-10-23
Reviewed by Jochen Eisinger.

Source/WebCore:

Throw security exception when local storage is accessed
under certain circumstances to match firefox.

No new tests. Existing tests modified.

* bindings/js/JSStorageCustom.cpp:
(WebCore::JSStorage::canGetItemsForName):
(WebCore::JSStorage::nameGetter):
(WebCore::JSStorage::deleteProperty):
(WebCore::JSStorage::getOwnPropertyNames):
* bindings/v8/custom/V8StorageCustom.cpp:
(WebCore):
(WebCore::setDOMException):
(WebCore::V8Storage::namedPropertyEnumerator):
(WebCore::storageGetter):
(WebCore::V8Storage::namedPropertyQuery):
(WebCore::storageDeleter):
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::getDOMStorageEntries):
(WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::sessionStorage):
(WebCore::DOMWindow::localStorage):
* storage/Storage.cpp:
* storage/Storage.h:
(WebCore):
(WebCore::Storage::length):
(WebCore::Storage::key):
(WebCore::Storage::getItem):
(WebCore::Storage::setItem):
(WebCore::Storage::removeItem):
(WebCore::Storage::clear):
(WebCore::Storage::contains):
* storage/Storage.idl:
* storage/StorageArea.h:
(StorageArea):
* storage/StorageAreaImpl.cpp:
(WebCore::StorageAreaImpl::canAccessStorage): Checks whether access to storage is a security violation.
(WebCore):
(WebCore::StorageAreaImpl::disabledByPrivateBrowsingInFrame):
(WebCore::StorageAreaImpl::length):
(WebCore::StorageAreaImpl::key):
(WebCore::StorageAreaImpl::getItem):
(WebCore::StorageAreaImpl::setItem):
(WebCore::StorageAreaImpl::removeItem):
(WebCore::StorageAreaImpl::clear):
(WebCore::StorageAreaImpl::contains):
* storage/StorageAreaImpl.h:
(StorageAreaImpl):

Source/WebKit/chromium:

Add security check and security check cache.

* src/StorageAreaProxy.cpp:
(WebCore::StorageAreaProxy::StorageAreaProxy):
(WebCore::StorageAreaProxy::length):
(WebCore::StorageAreaProxy::key):
(WebCore::StorageAreaProxy::getItem):
(WebCore::StorageAreaProxy::setItem):
(WebCore::StorageAreaProxy::removeItem):
(WebCore::StorageAreaProxy::clear):
(WebCore::StorageAreaProxy::contains):
(WebCore::StorageAreaProxy::canAccessStorage):
* src/StorageAreaProxy.h:
(StorageAreaProxy):
(WebCore::StorageAreaProxy::canAccessStorage):

LayoutTests:

Adjust tests to handle new exceptions.

* fast/storage/storage-detached-iframe-expected.txt:
* fast/storage/storage-detached-iframe.html:
* platform/chromium/permissionclient/storage-permission-expected.txt:
* platform/chromium/permissionclient/storage-permission.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132183 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Compilation warning in GraphicsContext3DPrivate.cpp when AC is enabled
https://bugs.webkit.org/show_bug.cgi?id=99723

Patch by Sudarsana Nagineni <sudarsana.nagineni@intel.com> on 2012-10-23
Reviewed by Kenneth Rohde Christiansen.

Fix compilation warning in GraphicsContext3DPrivate.cpp when AC is
enabled.

No new tests, no change in behavior.

* platform/graphics/efl/GraphicsContext3DPrivate.cpp:
(WebCore::GraphicsContext3DPrivate::createSurface):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132184 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Docking/undocking the Web Inspector does not work correctly in Safari.

The "docked" and "bottom" strings need quoted instead of being passed as identifiers.

https://bugs.webkit.org/show_bug.cgi?id=100080

Reviewed by Yury Semikhatsky.

* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::setAttachedWindow): Put quotes around the %s.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132185 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Viewport errors should be slightly friendlier with regard to ';'.
https://bugs.webkit.org/show_bug.cgi?id=100003

Reviewed by Adam Barth.

Source/WebCore:

This patch scans viewport values that cause errors for ';'. If found,
a quick message is appended to the error, noting that semicolons are
not valid separators in viewport contents, and that commas would be
the proper substitute.

No functional changes, just a better error message.

* dom/ViewportArguments.cpp:
(WebCore::reportViewportWarning):

LayoutTests:

* fast/viewport/viewport-128-expected.txt:
* fast/viewport/viewport-133-expected.txt:
* fast/viewport/viewport-134-expected.txt:
* fast/viewport/viewport-54-expected.txt:
* fast/viewport/viewport-65-expected.txt:
* fast/viewport/viewport-67-expected.txt:
* fast/viewport/viewport-77-expected.txt:
* fast/viewport/viewport-warnings-5-expected.txt:
    Updating tests with new expectations.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132186 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Support full month names in DateTimeEditElement, and use them in input[type=month] by default
https://bugs.webkit.org/show_bug.cgi?id=100060

Reviewed by Kentaro Hara.

Source/WebCore:

According to https://plus.google.com/104770450049736549185/posts/4zsoeHoa7SM
no one wants to show abbreviated month names for input[type=month].
This change add support for full month names in DateTimeEditELement, and
LocaleICU and LocaleMac retun month formats with full month names. Note
that LocaleWin::monthFormat returns formats for full month names.

No new tests. Covered by fast/forms/month-multiple-fields/month-multiple-fields-appearance-*.html

* html/shadow/DateTimeEditElement.cpp:
(WebCore::DateTimeEditBuilder::visitField):
If count is 4, use Localizer::monthLabels or standAloneMonthLabels.
* platform/text/LocaleICU.cpp:
(WebCore::LocaleICU::monthFormat):
Returns a format for full month names.
* platform/text/mac/LocaleMac.mm:
(WebCore::LocaleMac::monthFormat): Ditto.

Source/WebKit/chromium:

* tests/LocaleMacTest.cpp:
(TEST_F): Follow LocaleMac::monthFormat change.
* tests/LocalizedDateICUTest.cpp:
(TEST_F): Follow LocaleICU::monthFormat change.

LayoutTests:

Note: Other affected tests are already marked in TestExpectations.

* fast/forms/month-multiple-fields/month-multiple-fields-appearance-l10n.html:
 Add max attributes to show appearance in typical usage.
* platform/chromium-mac/fast/forms/month-multiple-fields/month-multiple-fields-appearance-l10n-expected.png:
Updated.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132187 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Adding myself as committer.

* Scripts/webkitpy/common/config/committers.py:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132188 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Make page load client a C++ class
https://bugs.webkit.org/show_bug.cgi?id=100081

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-10-23
Reviewed by Kenneth Rohde Christiansen.

Make page load client a C++ class and move it
up to UIProcess/efl since it is not really part
of the public API.

* PlatformEfl.cmake:
* UIProcess/API/efl/ewk_view.cpp:
(Ewk_View_Private_Data):
(_ewk_view_initialize):
* UIProcess/API/efl/ewk_view_loader_client_private.h: Removed.
* UIProcess/efl/PageLoadClientEfl.cpp: Renamed from Source/WebKit2/UIProcess/API/efl/ewk_view_loader_client.cpp.
(WebKit):
(WebKit::toPageLoadClientEfl):
(WebKit::PageLoadClientEfl::didReceiveTitleForFrame):
(WebKit::PageLoadClientEfl::didReceiveIntentForFrame):
(WebKit::PageLoadClientEfl::registerIntentServiceForFrame):
(WebKit::PageLoadClientEfl::didChangeProgress):
(WebKit::PageLoadClientEfl::didFinishLoadForFrame):
(WebKit::PageLoadClientEfl::didFailLoadWithErrorForFrame):
(WebKit::PageLoadClientEfl::didStartProvisionalLoadForFrame):
(WebKit::PageLoadClientEfl::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::PageLoadClientEfl::didFailProvisionalLoadWithErrorForFrame):
(WebKit::PageLoadClientEfl::didChangeBackForwardList):
(WebKit::PageLoadClientEfl::didSameDocumentNavigationForFrame):
(WebKit::PageLoadClientEfl::PageLoadClientEfl):
* UIProcess/efl/PageLoadClientEfl.h: Added.
(WebKit):
(PageLoadClientEfl):
(WebKit::PageLoadClientEfl::create):
(WebKit::PageLoadClientEfl::view):

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

* platform/qt/TestExpectations: Skip new tests (and sort) because ENABLE(SHADOW_DOM) is disabled.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132190 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix with newer Qt 5.

QPlastiqueStyle has been removed, but as pointed out by Jens it's also not
maintained anymore and hence safe to remove. We can do tweaks with the new
fusion style if required.

* WebCoreSupport/QStyleFacadeImp.cpp:
(WebKit::QStyleFacadeImp::paintInnerSpinButton):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132191 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Refactor Ewk_Context
https://bugs.webkit.org/show_bug.cgi?id=99594

Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-23
Reviewed by Kenneth Rohde Christiansen.

Ewk_Context is now encapsulated to a C++ class inherited from WTF::RefCounted.
Also the same instance of Ewk_Context is returned for the same instance of
WKContext, so memory leak in ewk_view is also fixed.

* UIProcess/API/efl/PageClientImpl.cpp:
(WebKit::PageClientImpl::handleDownloadRequest):
* UIProcess/API/efl/ewk_context.cpp:
(contextMap):
(Ewk_Context::Ewk_Context):
(Ewk_Context::~Ewk_Context):
(Ewk_Context::create):
(Ewk_Context::defaultContext):
(Ewk_Context::cookieManager):
(Ewk_Context::faviconDatabase):
(Ewk_Context::registerURLScheme):
(Ewk_Context::vibrationProvider):
(Ewk_Context::addVisitedLink):
(Ewk_Context::setCacheModel):
(Ewk_Context::cacheModel):
(ewk_context_ref):
(ewk_context_unref):
(ewk_context_cookie_manager_get):
(ewk_context_favicon_database_get):
(Ewk_Context::wkContext):
(Ewk_Context::addDownloadJob):
(Ewk_Context::downloadJob):
(Ewk_Context::removeDownloadJob):
(Ewk_Context::requestManager):
(Ewk_Context::urlSchemeRequestReceived):
(ewk_context_default_get):
(ewk_context_new):
(ewk_context_new_with_injected_bundle_path):
(ewk_context_url_scheme_register):
(ewk_context_vibration_client_callbacks_set):
(ewk_context_history_callbacks_set):
(ewk_context_visited_link_add):
(ewk_context_cache_model_set):
(ewk_context_cache_model_get):
* UIProcess/API/efl/ewk_context_download_client.cpp:
(decideDestinationWithSuggestedFilename):
(didReceiveResponse):
(didCreateDestination):
(didReceiveData):
(didFail):
(didCancel):
(didFinish):
(ewk_context_download_client_attach):
* UIProcess/API/efl/ewk_context_history_client.cpp:
(getEwkHistoryClient):
(didNavigateWithNavigationData):
(didPerformClientRedirect):
(didPerformServerRedirect):
(didUpdateHistoryTitle):
(populateVisitedLinks):
(ewk_context_history_client_attach):
* UIProcess/API/efl/ewk_context_private.h:
(Ewk_Context):
(Ewk_Context::historyClient):
* UIProcess/API/efl/ewk_context_request_manager_client.cpp:
(didReceiveURIRequest):
(ewk_context_request_manager_client_attach):
* UIProcess/API/efl/ewk_view.cpp:
(Ewk_View_Private_Data):
(Ewk_View_Private_Data::Ewk_View_Private_Data):
(Ewk_View_Private_Data::~Ewk_View_Private_Data):
(_ewk_view_priv_del):
(_ewk_view_initialize):
(ewk_view_base_add):
(ewk_view_add_with_context):
(ewk_view_context_get):
(ewk_view_update_icon):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unable to copy text on disabled input fields on long press gesture
https://bugs.webkit.org/show_bug.cgi?id=99698

Reviewed by NOBODY (OOPS!).

Text from disabled input/text should be allowed to select. Replaced isContentEditable()
with canStartSelection()

Source/WebCore:

Test: fast/events/touch/gesture/disabled-input-text-selection.html

* page/EventHandler.cpp:
(WebCore::EventHandler::handleGestureLongPress):

LayoutTests:

* fast/events/touch/gesture/disabled-input-text-selection-expected.txt: Added.
* fast/events/touch/gesture/disabled-input-text-selection.html: Added.
* platform/chromium/TestExpectations: Not Valid for chromium desktop.