[Qt] Put the jsc binary in 'bin' instead of leaving it deep in the build tree

Allows us to not package up the whole Source/JavaScriptCore directory for the
buildbots.

Reviewed-by Simon Hausmann.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99428 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the Qt build on Mac OS X when using the QuickTime media backend

When QtWebKit is built on Mac OS X using the QuickTime media backend
we build both KURLCFNet.cpp and KURLMac, just like the Mac port, so
we have to guard the potentially duplicate symbol createCFURL with
more than just !PLATFORM(MAC).

Reviewed by Andreas Kling.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: TextPrompt+SuggestBox should autocomplete on "Right" keydown and with a single suggestion in place
https://bugs.webkit.org/show_bug.cgi?id=71676

Reviewed by Pavel Feldman.

* inspector/front-end/TextPrompt.js:
(WebInspector.TextPrompt.prototype.onKeyDown):
(WebInspector.TextPrompt.SuggestBox.prototype._updateItems):
* inspector/front-end/inspectorCommon.css:
(body): Revert inadvertent style change from a preceding commit.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99430 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove initPageTransitionEvent method
https://bugs.webkit.org/show_bug.cgi?id=71689

Reviewed by Ojan Vafai.

initPageTransitionEvent was removed from the HTML spec; it has
been replaced by new PageTransitionEvent(...).

Removing a method, so no new tests.

* dom/PageTransitionEvent.cpp:
* dom/PageTransitionEvent.h:
* dom/PageTransitionEvent.idl:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99431 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Suggest box should consume enter key pressed event.
https://bugs.webkit.org/show_bug.cgi?id=71700

Reviewed by Pavel Feldman.

* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleView):
* inspector/front-end/TextPrompt.js:
(WebInspector.TextPrompt.prototype._attachInternal):
(WebInspector.TextPrompt.SuggestBox.prototype.enterKeyPressed):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99432 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] fast/frames/flattening/frameset-flattening-simple.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=71655

Reviewed by Martin Robinson.

* fast/frames/flattening/frameset-flattening-simple.html: Trigger
the test only after the embedded frame has been loaded.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99433 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Refactor canvas encoding mimeType validation
https://bugs.webkit.org/show_bug.cgi?id=71651

Reviewed by Andreas Kling.

No new tests, refactoring only, covered by existing canvas tests.

* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::toEncodingMimeType): move encoder mimeType
validation logic into a helper routine.
(WebCore::HTMLCanvasElement::toDataURL):
* html/HTMLCanvasElement.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99434 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove initOverflowEvent from JavaScript bindings
https://bugs.webkit.org/show_bug.cgi?id=71687

Reviewed by Ojan Vafai.

Source/WebCore:

Now that OverflowEvent has a constructor, we don't need the
initOverflowEvent method. It has to remain in the Objective C
binding because it is part of the Objective C public API.

* dom/OverflowEvent.idl:

LayoutTests:

OverflowEvent initialization is tested in
fast/events/constructors/overflow-event-constructor.html

* fast/events/init-events-expected.txt:
* fast/events/script-tests/init-events.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99435 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Towards 8 Bit Strings: Templatize JSC::Lexer class by character type
https://bugs.webkit.org/show_bug.cgi?id=71331

Source/JavaScriptCore: 

Change the Lexer class to be a template class based on the character
type of the source.  In the process updated the parseIdentifier()
and parseString() methods to create 8 bit strings where possible.
Also added some helper methods for accumulating temporary string
data in the 8 and 16 bit vectors.

Changed the SourceProvider::data() virtual method to return a
StringImpl* instead of a UChar*.

Updated the KeywordLookup generator to create code to match keywords
for both 8 and 16 bit source strings.

Due to a compiler bug (<rdar://problem/10194295>) moved enum
definition outside of Lexer class declaration.  Remove second enum
no longer needed.

Reviewed by Darin Adler.

* KeywordLookupGenerator.py:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::callEval):
* parser/Lexer.cpp:
(JSC::::Lexer):
(JSC::::~Lexer):
(JSC::::getInvalidCharMessage):
(JSC::::currentCharacter):
(JSC::::setCode):
(JSC::::internalShift):
(JSC::::shift):
(JSC::::peek):
(JSC::::getUnicodeCharacter):
(JSC::::shiftLineTerminator):
(JSC::::lastTokenWasRestrKeyword):
(JSC::::record8):
(JSC::::append8):
(JSC::::append16):
(JSC::::record16):
(JSC::::parseIdentifier):
(JSC::::parseIdentifierSlowCase):
(JSC::::parseString):
(JSC::::parseStringSlowCase):
(JSC::::parseHex):
(JSC::::parseOctal):
(JSC::::parseDecimal):
(JSC::::parseNumberAfterDecimalPoint):
(JSC::::parseNumberAfterExponentIndicator):
(JSC::::parseMultilineComment):
(JSC::::nextTokenIsColon):
(JSC::::lex):
(JSC::::scanRegExp):
(JSC::::skipRegExp):
(JSC::::clear):
(JSC::::sourceCode):
* parser/Lexer.h:
(JSC::Lexer::append16):
(JSC::Lexer::currentOffset):
(JSC::Lexer::setOffsetFromCharOffset):
(JSC::::isWhiteSpace):
(JSC::::isLineTerminator):
(JSC::::convertHex):
(JSC::::convertUnicode):
(JSC::::makeIdentifier):
(JSC::::setCodeStart):
(JSC::::makeIdentifierLCharFromUChar):
(JSC::::lexExpectIdentifier):
* parser/Parser.cpp:
(JSC::Parser::Parser):
(JSC::Parser::parseProperty):
(JSC::Parser::parseMemberExpression):
* parser/Parser.h:
(JSC::Parser::next):
(JSC::Parser::nextExpectIdentifier):
* parser/ParserArena.h:
(JSC::IdentifierArena::makeIdentifier):
(JSC::IdentifierArena::makeIdentifierLCharFromUChar):
* parser/SourceCode.h:
(JSC::SourceCode::subExpression):
* parser/SourceProvider.h:
(JSC::UStringSourceProvider::stringData):
* parser/SourceProviderCache.h:
* parser/SyntaxChecker.h:
* runtime/FunctionPrototype.cpp:
(JSC::insertSemicolonIfNeeded):
* runtime/Identifier.cpp:
(JSC::IdentifierTable::add):
(JSC::IdentifierLCharFromUCharTranslator::hash):
(JSC::IdentifierLCharFromUCharTranslator::equal):
(JSC::IdentifierLCharFromUCharTranslator::translate):
(JSC::Identifier::add8):
* runtime/Identifier.h:
(JSC::Identifier::Identifier):
(JSC::Identifier::createLCharFromUChar):
(JSC::Identifier::canUseSingleCharacterString):
(JSC::IdentifierCharBufferTranslator::hash):
(JSC::IdentifierCharBufferTranslator::equal):
(JSC::IdentifierCharBufferTranslator::translate):
(JSC::Identifier::add):
(JSC::Identifier::equal):
(JSC::IdentifierTable::add):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::decode):
(JSC::parseIntOverflow):
(JSC::globalFuncUnescape):
* runtime/JSGlobalObjectFunctions.h:
(JSC::parseIntOverflow):
* runtime/LiteralParser.cpp:
(JSC::LiteralParser::tryJSONPParse):
(JSC::LiteralParser::Lexer::lexString):
* wtf/text/StringImpl.h:

Source/WebCore: 

Changed the SourceProvider::data() virtual method to return a
StringImpl* instead of a UChar*.
Changed Identifier() constructor to use JSGlobalData*.

Reviewed by Darin Adler.

No new tests - refactored SourceProvider class and sub-classes.

* bindings/js/CachedScriptSourceProvider.h:
(WebCore::CachedScriptSourceProvider::stringData):
* bindings/js/StringSourceProvider.h:
(WebCore::StringSourceProvider::stringData):
* bridge/qt/qt_runtime.cpp:
(JSC::Bindings::convertQVariantToValue):

Source/WebKit/qt: 

Changed Identifier() constructor to use JSGlobalData*.

Reviewed by Darin Adler.

* Api/qwebframe.cpp:
(QWebFrame::addToJavaScriptWindowObject):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99436 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Simplify NetscapePlugin::convertPoint and make it work (in theory) with transformed plug-ins
https://bugs.webkit.org/show_bug.cgi?id=71699

Reviewed by Sam Weinig.

Source/WebCore:

Export AffineTransform symbols used by WebKit2.

* WebCore.exp.in:

Source/WebKit2:

Add a getScreenTransform function which given a coordinate space returns a transform that converts a
point from that coordinate space to the screen coordinate space. We then get the source -> screen transform
and the destination -> screen transform. We invert the destination -> screen transform, multiply it with the
source -> screen transform and use mapPoint to get a complete affine transform from the source to the destination space
and use mapPoint to map the source point and return the destination point.

* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::getScreenTransform):
(WebKit::NetscapePlugin::convertPoint):

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::initializePlugin):
Call windowAndViewFramesChanged before viewGeometryDidChange so that the window and view frames will be up to date by
the time NPP_SetWindow is called in the plug-in.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99437 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove initCloseEvent method
https://bugs.webkit.org/show_bug.cgi?id=71374

Reviewed by Ojan Vafai.

Source/WebCore:

Test: fast/dom/Window/window-properties.html

* websockets/CloseEvent.h:
(WebCore::CloseEvent::initCloseEvent):
* websockets/CloseEvent.idl:

LayoutTests:

* fast/dom/Window/window-properties-expected.txt:
* platform/gtk/fast/dom/Window/window-properties-expected.txt:
* platform/mac/fast/dom/Window/window-properties-expected.txt:
* platform/qt-wk2/fast/dom/Window/window-properties-expected.txt:
* platform/qt/fast/dom/Window/window-properties-expected.txt:
* platform/win/fast/dom/Window/window-properties-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99438 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Need a way to allow a scheme access to Local Storage and Databases while Private Browsing is
enabled.
https://bugs.webkit.org/show_bug.cgi?id=71631

Reviewed by Jon Honeycutt.

Source/WebCore:

Check the SchemeRegistry before preventing read/write access to Local Storage and Databases
in Private Browsing.

* WebCore.exp.in:
Export the symbols for registering the schemes as allowing Local Storage and Database access
in Private Browsing.

* dom/Document.cpp:
(WebCore::Document::allowDatabaseAccess):
Check if the scheme allows Database access in Private Browsing.

* platform/SchemeRegistry.cpp:
(WebCore::schemesAllowingLocalStorageAccessInPrivateBrowsing):
(WebCore::schemesAllowingDatabaseAccessInPrivateBrowsing):
(WebCore::SchemeRegistry::registerURLSchemeAsAllowingLocalStorageAccessInPrivateBrowsing):
(WebCore::SchemeRegistry::allowsLocalStorageAccessInPrivateBrowsing):
(WebCore::SchemeRegistry::registerURLSchemeAsAllowingDatabaseAccessInPrivateBrowsing):
(WebCore::SchemeRegistry::allowsDatabaseAccessInPrivateBrowsing):
* platform/SchemeRegistry.h:

* storage/Storage.cpp:
(WebCore::Storage::length):
Ask the storage area if it is disabled by Private Browsing in the frame instead of just
checking if Private Browsing is enabled for that frame because the answer might depend on
what type of storage that storage area is.
(WebCore::Storage::key):
Ditto.
(WebCore::Storage::getItem):
Ditto.
(WebCore::Storage::contains):
Ditto.

* storage/StorageArea.h:
Make it possible to query a StorageArea for whether it is disabled by Private Browsing in a
Frame.
* storage/StorageAreaImpl.cpp:
(WebCore::StorageAreaImpl::disabledByPrivateBrowsingInFrame):
Renamed from privateBrowsingEnabled.
Check not only if Private Browsing is enabled for the Frame, but also if the storage type is
Local Storage and if there is an exception for the scheme of the resource currently loaded
into the Frame.
(WebCore::StorageAreaImpl::setItem):
Renamed privateBrowsingEnabled -> disabledByPrivateBrowsingInFrame.
(WebCore::StorageAreaImpl::removeItem):
Ditto.
(WebCore::StorageAreaImpl::clear):
Ditto.
* storage/StorageAreaImpl.h:

Source/WebKit/chromium:

* src/StorageAreaProxy.h:
(WebCore::StorageAreaProxy::disabledByPrivateBrowsingInFrame):
Chromium uses a different method to track its icognito mode, so always return false.

Source/WebKit/mac:

Add WebKit1 API to register a scheme as ignoring Private Browsing for Local Storage and
Databases.

* WebView/WebView.mm:
(+[WebView _registerURLSchemeAsAllowingLocalStorageAccessInPrivateBrowsing:]):
Call through to the SchemeRegistry function.
(+[WebView _registerURLSchemeAsAllowingDatabaseAccessInPrivateBrowsing:]):
Ditto.
* WebView/WebViewPrivate.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99439 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Rename WebView::scalePage to WebView::setPageScaleFactor to match WebCore
https://bugs.webkit.org/show_bug.cgi?id=71485

Reviewed by Darin Fisher.

Source/WebKit/chromium:

Created new method setPageScaleFactor to replace scalePage to match
renamed method in WebCore. This change will happen in three stages:

1. A new method is created called setPageScaleFactor with the same
   functionality as scalePage.
2. All call sites of scalePage are changed to setPageScaleFactor in the Chromium
   repository.
3. scalePage is deleted from WebView/WebViewImpl

* public/WebView.h:
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::pageScaleFactor):
(WebKit::WebViewImpl::scalePage):
(WebKit::WebViewImpl::setPageScaleFactor):
* src/WebViewImpl.h:

Tools:

* DumpRenderTree/chromium/EventSender.cpp:
(EventSender::scalePageBy):
* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::resetTestController):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99440 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add missing .in and .pl files to the Xcode project for easy access.

Reviewed by Eric Carlson.

* WebCore.xcodeproj/project.pbxproj:
Add some missing files to the Xcode project.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99441 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Support requestAnimationFrame API
https://bugs.webkit.org/show_bug.cgi?id=67112

Patch by ChangSeok Oh <shivamidow@gmail.com> on 2011-11-07
Reviewed by Andreas Kling.

.:

Add build-option for requestAnimationFrame feature.

* Source/cmake/OptionsEfl.cmake:
* Source/cmakeconfig.h.cmake:

Source/JavaScriptCore:

Let EFL port use REQUEST_ANIMATION_FRAME_TIMER.

* wtf/Platform.h:

Source/WebCore:

Add some files to build-target when enabling requestAnimationFrame option.

fast/animation/request-animation-frame-cancel.html
fast/animation/request-animation-frame-cancel2.html
fast/animation/request-animation-frame-display.html
fast/animation/request-animation-frame-during-modal.html
fast/animation/request-animation-frame-timestamps.html
fast/animation/request-animation-frame-within-callback.html
fast/animation/request-animation-frame.html

* CMakeLists.txt:
* UseJSC.cmake:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99442 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WKPage.h should be in PrivateHeaders.

Rubber-stamped by Anders Carlsson.

* WebKit2.xcodeproj/project.pbxproj:
Mark WKPage.h private.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r99409): Broke transitions/clip-transition.html
<http://webkit.org/b/71692>

Reviewed by Darin Adler.

Add missing base class initializers to CSSPrimitiveValue constructors.
This was causing some CSSPrimitiveValues to masquerade as CSS_CUSTOM values.

* css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99444 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r99432.
http://trac.webkit.org/changeset/99432
https://bugs.webkit.org/show_bug.cgi?id=71709

It made layout tests extra slow on all bots (Requested by
Ossy_night on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2011-11-07

* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleView):
* inspector/front-end/TextPrompt.js:
(WebInspector.TextPrompt.prototype._attachInternal):
(WebInspector.TextPrompt.SuggestBox.prototype.enterKeyPressed):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99447 268f45cc-cd09-0410-ab3c-d52691b4dbfc
NetscapePlugin::wantsWindowRelativeNPWindowCoordinates should return false on Mac
https://bugs.webkit.org/show_bug.cgi?id=71707

Reviewed by Sam Weinig.

This changes the way the fake Carbon plug-in window is positioned, so that it's always the same size
and location as the plug-in (relative to the screen).

* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::platformGeometryDidChange):
Call updateFakeWindowBounds.

(WebKit::NetscapePlugin::updateFakeWindowBounds):
Convert the plug-in position to screen coordinates and set the window bounds to be the location and
size of the plug-in, where the location is relative to the screen.

(WebKit::NetscapePlugin::wantsWindowRelativeNPWindowCoordinates):
Return false.

(WebKit::NetscapePlugin::windowAndViewFramesChanged):
Call updateFakeWindowBounds.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99448 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rename NetscapePlugin::wantsWindowRelativeNPWindowCoordinates to NetscapePlugin::wantsPluginRelativeNPWindowCoordinates
https://bugs.webkit.org/show_bug.cgi?id=71708

Reviewed by Sam Weinig.

The name wantsPluginRelativeNPWindowCoordinates is more clear than wantsWindowRelativeNPWindowCoordinates. Rename the functions
everywhere and, since the meaning is now inverted, invert the checks and return values.

* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::callSetWindow):
(WebKit::NetscapePlugin::geometryDidChange):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/NetscapePluginNone.cpp:
(WebKit::NetscapePlugin::wantsPluginRelativeNPWindowCoordinates):
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::wantsPluginRelativeNPWindowCoordinates):
* WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
(WebKit::NetscapePlugin::wantsPluginRelativeNPWindowCoordinates):
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::NetscapePlugin::wantsPluginRelativeNPWindowCoordinates):

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