WebKit-https.git
7 years agoRemove some iOS #ifdefs by adding SQLiteDatabaseTracker to all the builds
weinig@apple.com [Sun, 26 Jan 2014 00:36:23 +0000 (00:36 +0000)]
Remove some iOS #ifdefs by adding SQLiteDatabaseTracker to all the builds
https://bugs.webkit.org/show_bug.cgi?id=127632

Reviewed by Darin Adler.

Move the SQLiteDatabaseTracker and client from platform/sql/ios to platform/sql,
as there is nothing iOS specific about it. Then, un-#ifdef all its uses. For
ports that don't setup a client, this has no change in behavior.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/webdatabase/DatabaseBackendBase.cpp:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* loader/appcache/ApplicationCacheStorage.cpp:
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::sendWillRevealEdgeEventsIfNeeded):
* platform/sql/SQLiteDatabaseTracker.cpp: Copied from Source/WebCore/platform/sql/ios/SQLiteDatabaseTracker.cpp.
* platform/sql/SQLiteDatabaseTracker.h: Copied from Source/WebCore/platform/sql/ios/SQLiteDatabaseTracker.h.
* platform/sql/SQLiteDatabaseTrackerClient.h: Copied from Source/WebCore/platform/sql/ios/SQLiteDatabaseTrackerClient.h.
* platform/sql/ios: Removed.
* platform/sql/ios/SQLiteDatabaseTracker.cpp: Removed.
* platform/sql/ios/SQLiteDatabaseTracker.h: Removed.
* platform/sql/ios/SQLiteDatabaseTrackerClient.h: Removed.
* storage/StorageAreaSync.cpp:
(WebCore::StorageAreaSync::openDatabase):
(WebCore::StorageAreaSync::sync):
* storage/StorageTracker.cpp:

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

7 years agoRemove an unused FrameLoaderClient function
andersca@apple.com [Sat, 25 Jan 2014 23:04:54 +0000 (23:04 +0000)]
Remove an unused FrameLoaderClient function
https://bugs.webkit.org/show_bug.cgi?id=127628

Reviewed by Andreas Kling.

Source/WebCore:

All implementations of FrameLoaderClient::shouldStopLoadingForHistoryItem return true and this function
was only used by Chromium so we can get rid of it.

* loader/EmptyClients.h:
* loader/FrameLoaderClient.h:
* loader/HistoryController.cpp:
(WebCore::HistoryController::shouldStopLoadingForHistoryItem):

Source/WebKit/efl:

* WebCoreSupport/FrameLoaderClientEfl.cpp:
* WebCoreSupport/FrameLoaderClientEfl.h:

Source/WebKit/gtk:

* WebCoreSupport/FrameLoaderClientGtk.cpp:
* WebCoreSupport/FrameLoaderClientGtk.h:

Source/WebKit/mac:

* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:

Source/WebKit/win:

* WebCoreSupport/WebFrameLoaderClient.cpp:
* WebCoreSupport/WebFrameLoaderClient.h:

Source/WebKit/wince:

* WebCoreSupport/FrameLoaderClientWinCE.cpp:
* WebCoreSupport/FrameLoaderClientWinCE.h:

Source/WebKit2:

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

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

7 years agoTry to fix Mac build.
darin@apple.com [Sat, 25 Jan 2014 22:58:43 +0000 (22:58 +0000)]
Try to fix Mac build.

* runtime/DatePrototype.cpp: Put the include of <unicode/udat.h> inside
a conditional since we don't have that header in our Mac build configuration.

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

7 years agoCall deprecatedCharacters instead of characters at more call sites
darin@apple.com [Sat, 25 Jan 2014 22:47:20 +0000 (22:47 +0000)]
Call deprecatedCharacters instead of characters at more call sites
https://bugs.webkit.org/show_bug.cgi?id=127631

Reviewed by Sam Weinig.

Source/JavaScriptCore:

* API/JSValueRef.cpp:
(JSValueMakeFromJSONString):
* API/OpaqueJSString.cpp:
(OpaqueJSString::~OpaqueJSString):
* bindings/ScriptValue.cpp:
(Deprecated::jsToInspectorValue):
* inspector/ContentSearchUtilities.cpp:
(Inspector::ContentSearchUtilities::createSearchRegexSource):
* inspector/InspectorValues.cpp:
* runtime/Identifier.h:
(JSC::Identifier::deprecatedCharacters):
* runtime/JSStringBuilder.h:
(JSC::JSStringBuilder::append):
Use the new name.

Source/WebCore:

* bindings/objc/WebScriptObject.mm:
(+[WebScriptObject _convertValueToObjcValue:JSC::originRootObject:rootObject:]):
* editing/CompositeEditCommand.cpp:
(WebCore::containsOnlyWhitespace):
* editing/TypingCommand.cpp:
(WebCore::TypingCommand::insertText):
* editing/VisibleUnits.cpp:
(WebCore::startOfParagraph):
(WebCore::endOfParagraph):
* html/parser/HTMLParserIdioms.cpp:
(WebCore::stripLeadingAndTrailingHTMLSpaces):
(WebCore::parseHTMLNonNegativeInteger):
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyle::newLineAndWhitespaceDelimiters):
* inspector/InspectorStyleTextEditor.cpp:
(WebCore::InspectorStyleTextEditor::insertProperty):
(WebCore::InspectorStyleTextEditor::internalReplaceProperty):
* platform/Length.cpp:
(WebCore::newCoordsArray):
* platform/LinkHash.cpp:
(WebCore::visitedLinkHash):
* platform/graphics/Color.cpp:
(WebCore::Color::parseHexColor):
(WebCore::Color::Color):
* platform/graphics/TextRun.h:
(WebCore::TextRun::TextRun):
* platform/text/TextEncodingRegistry.cpp:
(WebCore::atomicCanonicalTextEncodingName):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::constructTextRun):
* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::width):
* svg/SVGFontElement.cpp:
(WebCore::SVGFontElement::registerLigaturesInGlyphCache):
* xml/XPathFunctions.cpp:
(WebCore::XPath::FunId::evaluate):
Use the new name.

Source/WTF:

* wtf/text/StringImpl.cpp:
(WTF::StringImpl::replace):
* wtf/text/WTFString.h:
(WTF::String::isAllSpecialCharacters):
Use the new name.

Tools:

* TestWebKitAPI/Tests/WTF/StringBuilder.cpp:
(TestWebKitAPI::expectBuilderContent):
(TestWebKitAPI::expectEmpty):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/StringImpl.cpp:
(TestWebKitAPI::TEST):
Use the new name.

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

7 years agoAdd a new separate LChar.h header file, to be used after we remove Unicode.h
darin@apple.com [Sat, 25 Jan 2014 22:46:42 +0000 (22:46 +0000)]
Add a new separate LChar.h header file, to be used after we remove Unicode.h
https://bugs.webkit.org/show_bug.cgi?id=127630

Reviewed by Sam Weinig.

* GNUmakefile.list.am: Added the new file
* WTF.vcxproj/WTF.vcxproj: Ditto.
* WTF.vcxproj/WTF.vcxproj.filters: Ditto.
* WTF.xcodeproj/project.pbxproj: Ditto.
* wtf/CMakeLists.txt: Ditto.
* wtf/text/LChar.h: Added.

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

7 years agoGet rid of ICU_UNICODE and WCHAR_UNICODE remnants
darin@apple.com [Sat, 25 Jan 2014 21:36:37 +0000 (21:36 +0000)]
Get rid of ICU_UNICODE and WCHAR_UNICODE remnants
https://bugs.webkit.org/show_bug.cgi?id=127623

Reviewed by Anders Carlsson.

.:

* Source/cmake/OptionsEfl.cmake: Removed ICU_UNICODE and WCHAR_UNICODE flags.
* Source/cmake/OptionsGTK.cmake: Ditto.
* Source/cmake/OptionsWinCE.cmake: Ditto.

Source/JavaScriptCore:

* runtime/DatePrototype.cpp: Removed USE(ICU_UNICODE) checks, since that's always true now.

Source/WebCore:

* CMakeLists.txt: Removed SmartReplaceICU.cpp.
* GNUmakefile.list.am: Ditto.
* PlatformEfl.cmake: Ditto.
* PlatformGTK.cmake: Ditto.

* editing/FrameSelection.cpp:
(WebCore::FrameSelection::modifyMovingRight): Ditto.
(WebCore::FrameSelection::modifyMovingLeft): Ditto.

* editing/SmartReplace.cpp: Moved code here from SmartReplaceICU,
since we always support ICU now. Added some FIXME comments about
bugs and mistakes I spotted in the code as I was moving it.
* editing/SmartReplaceICU.cpp: Removed.

* editing/TextIterator.cpp: Removed unneeded checks.
* platform/ThreadGlobalData.cpp:
(WebCore::ThreadGlobalData::ThreadGlobalData): Ditto.
(WebCore::ThreadGlobalData::destroy): Ditto.
* platform/ThreadGlobalData.h: Ditto.
* platform/URL.cpp:
(WebCore::appendEncodedHostname): Ditto.
* platform/graphics/SurrogatePairAwareTextIterator.cpp: Ditto.
Also removed unneeded "using namespace".
* platform/text/TextCodecICU.cpp: Ditto.
* platform/text/TextEncoding.cpp:
(WebCore::TextEncoding::encode): Ditto.
* platform/text/TextEncodingRegistry.cpp:
(WebCore::extendTextCodecMaps): Ditto.

Source/WTF:

* wtf/CMakeLists.txt: Removed WTF_USE_ICU_UNICODE and
WTF_USE_WCHAR_UNICODE since they are true and false respectively.

* wtf/Platform.h: Removed code to set WTF_USE_ICU_UNICODE.

* wtf/unicode/Collator.h: Removed ifdefs.
* wtf/unicode/CollatorDefault.cpp: Ditto.
* wtf/unicode/Unicode.h: Ditto.
* wtf/unicode/icu/CollatorICU.cpp: Ditto.

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

7 years ago[Mac] Rewrite locale-specific date formatting code to remove strange string creation
darin@apple.com [Sat, 25 Jan 2014 21:31:51 +0000 (21:31 +0000)]
[Mac] Rewrite locale-specific date formatting code to remove strange string creation
https://bugs.webkit.org/show_bug.cgi?id=127624

Reviewed by Anders Carlsson.

* runtime/DatePrototype.cpp:
(JSC::formatLocaleDate): Use some smart pointers and conversion operators we already
have to do the formatting in a more straightforward way.

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

7 years agoGet rid of UnicodeRange.h/cpp, using ICU instead
darin@apple.com [Sat, 25 Jan 2014 21:31:00 +0000 (21:31 +0000)]
Get rid of UnicodeRange.h/cpp, using ICU instead
https://bugs.webkit.org/show_bug.cgi?id=127622

Reviewed by Anders Carlsson.

* CMakeLists.txt: Remove UnicodeRange.h/cpp.
* GNUmakefile.list.am: Ditto.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.

* platform/graphics/win/FontCacheWin.cpp:
(WebCore::FontCache::systemFallbackForCharacters): To check if a character has
multiple code pages, use UCHAR_UNIFIED_IDEOGRAPH instead of cRangeSetCJK.
* platform/graphics/wince/FontCacheWinCE.cpp:
(WebCore::FontCache::systemFallbackForCharacters): Ditto. Also, to check if a
character is in the Thai block, use UBLOCK_THAI.

* platform/graphics/wince/FontPlatformData.cpp: Removed include of UnicodeRange.h.

* platform/text/UnicodeRange.cpp: Removed.
* platform/text/UnicodeRange.h: Removed.

* rendering/svg/SVGTextLayoutEngineBaseline.cpp:
(WebCore::SVGTextLayoutEngineBaseline::calculateGlyphOrientationAngle): To figure
out if a character is full width, use UCHAR_EAST_ASIAN_WIDTH, instead of hard-coding
"not Latin or Arabic" as the rule.

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

7 years agoRemove an unnecessary platform #if in BitmapImage(CG)::checkForSolidColor()
timothy_horton@apple.com [Sat, 25 Jan 2014 21:25:58 +0000 (21:25 +0000)]
Remove an unnecessary platform #if in BitmapImage(CG)::checkForSolidColor()
https://bugs.webkit.org/show_bug.cgi?id=127610

Reviewed by Simon Fraser.

* platform/graphics/cg/BitmapImageCG.cpp:
(WebCore::BitmapImage::checkForSolidColor):
Over time, the two sides of this #if !PLATFORM(IOS) converged. Remove the #if
and merge the code. We explicitly use kCGBitmapByteOrder32Big to be correct everywhere.

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

7 years ago[cg] Look in the PNG dictionary for image duration information
timothy_horton@apple.com [Sat, 25 Jan 2014 21:24:10 +0000 (21:24 +0000)]
[cg] Look in the PNG dictionary for image duration information
https://bugs.webkit.org/show_bug.cgi?id=127611
<rdar://problem/15408643>

Reviewed by Simon Fraser.

We should look in the PNG properties dictionary for frame duration and loop count data.

* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::repetitionCount):
Mush repetitionCount a bit more to make it easier to read (early returns, etc.)
Also, look in the PNG properties dictionary for a loop count.

(WebCore::ImageSource::frameDurationAtIndex):
Look in the PNG properties dictionary for delay time.
Get rid of WebCoreCGImagePropertyGIFUnclampedDelayTime; it hasn't
been needed since Snow Leopard.

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

7 years agoRemove atomicIncrement/atomicDecrement
andersca@apple.com [Sat, 25 Jan 2014 21:16:42 +0000 (21:16 +0000)]
Remove atomicIncrement/atomicDecrement
https://bugs.webkit.org/show_bug.cgi?id=127625

Reviewed by Andreas Kling.

Replace atomicIncrement/atomicDecrement with std::atomic.

Source/JavaScriptCore:

* bytecode/Watchpoint.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::lower):
* profiler/ProfilerDatabase.cpp:
(JSC::Profiler::Database::Database):
(JSC::Profiler::Database::addDatabaseToAtExit):

Source/WebCore:

* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::incrementActiveSourceCount):
(WebCore::AudioContext::decrementActiveSourceCount):
* Modules/webaudio/AudioContext.h:
* Modules/webaudio/AudioNode.cpp:
(WebCore::AudioNode::~AudioNode):
(WebCore::AudioNode::ref):
(WebCore::AudioNode::finishDeref):
* Modules/webaudio/AudioNode.h:
* Modules/webdatabase/OriginLock.h:

Source/WebKit2:

* Platform/IPC/Connection.cpp:
(IPC::Connection::createSyncMessageEncoder):
* Shared/mac/SecItemShim.cpp:
(WebKit::generateSecItemRequestID):
* UIProcess/StatisticsRequest.cpp:
(WebKit::StatisticsRequest::addOutstandingRequest):

Source/WTF:

* wtf/Atomics.h:
* wtf/RefCountedLeakCounter.cpp:
(WTF::RefCountedLeakCounter::~RefCountedLeakCounter):
(WTF::RefCountedLeakCounter::increment):
(WTF::RefCountedLeakCounter::decrement):
* wtf/RefCountedLeakCounter.h:
* wtf/ThreadSafeRefCounted.h:
(WTF::ThreadSafeRefCountedBase::ref):
(WTF::ThreadSafeRefCountedBase::refCount):
(WTF::ThreadSafeRefCountedBase::derefBase):

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

7 years agoSource/WebCore: Unreviewed build fix for WinCairo.
alex.christensen@flexsim.com [Sat, 25 Jan 2014 20:49:23 +0000 (20:49 +0000)]
Source/WebCore: Unreviewed build fix for WinCairo.

* platform/network/curl/CurlDownload.h:
Included wtf/Threading.h for ThreadIdentifier definition.

Source/WebKit: Unreviewed build fix for Win64.

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
Corrected 64-bit linker symbol.

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

7 years agoBuild fix.
andersca@apple.com [Sat, 25 Jan 2014 20:10:46 +0000 (20:10 +0000)]
Build fix.

* WebView/WebViewData.h:

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

7 years agoModernize HashTable threading code
andersca@apple.com [Sat, 25 Jan 2014 19:24:14 +0000 (19:24 +0000)]
Modernize HashTable threading code
https://bugs.webkit.org/show_bug.cgi?id=127621

Reviewed by Darin Adler.

Source/WebCore:

Explicitly include headers that used to be brought in by HashTable.h

* platform/DragData.h:
Change a Windows-specific typedef to avoid having to include WindDef.h from a header.

* platform/audio/AudioSession.h:
* platform/network/cf/SocketStreamHandle.h:

Source/WebKit/win:

Explicitly include headers that used to be brought in by HashTable.h

* WebLocalizableStrings.cpp:

Source/WebKit2:

Explicitly include headers that used to be brought in by HashTable.h

* Shared/BlockingResponseMap.h:

Source/WTF:

Use std::mutex and std::atomic instead of WTF threading primitives.

* wtf/DynamicAnnotations.h:
Include Platform.h here since this file relies on USE macros.

* wtf/HashTable.cpp:
(WTF::HashTableStats::recordCollisionAtCount):
Change this to take an unsigned.

(WTF::HashTableStats::dumpStats):
* wtf/HashTable.h:
(WTF::KeyTraits>::HashTable):
(WTF::KeyTraits>::remove):
(WTF::KeyTraits>::invalidateIterators):
Use a single probe counter.

(WTF::addIterator):
(WTF::removeIterator):

Tools:

Explicitly include headers that used to be brought in by HashTable.h

* DumpRenderTree/JavaScriptThreading.cpp:

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

7 years agoMove CSSGroupingRule, CSSStyleSheet, ElementRuleCollector to std::unique_ptr
zandobersek@gmail.com [Sat, 25 Jan 2014 18:55:51 +0000 (18:55 +0000)]
Move CSSGroupingRule, CSSStyleSheet, ElementRuleCollector to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=127575

Reviewed by Andreas Kling.

Use std::unique_ptr and std::make_unique in place of OwnPtr and adoptPtr
in the CSSGroupingRule, CSSStyleSheet and ElementRuleCollector classes.

* css/CSSFunctionValue.cpp: Remove the unnecessary PassOwnPtr header inclusion.
* css/CSSGroupingRule.cpp:
(WebCore::CSSGroupingRule::cssRules):
* css/CSSGroupingRule.h:
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::cssRules):
* css/CSSStyleSheet.h:
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::addMatchedRule):
* css/ElementRuleCollector.h:

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

7 years agoMove MediaQueryMatcher, SelectorFilter to std::unique_ptr
zandobersek@gmail.com [Sat, 25 Jan 2014 18:54:02 +0000 (18:54 +0000)]
Move MediaQueryMatcher, SelectorFilter to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=127574

Reviewed by Andreas Kling.

Replace the use of OwnPtr and adoptPtr with std::unique_ptr and std::make_unique
in the MediaQueryMatcher and SelectorFilter classes.

* css/MediaQueryMatcher.cpp:
(WebCore::MediaQueryMatcher::prepareEvaluator):
(WebCore::MediaQueryMatcher::evaluate):
(WebCore::MediaQueryMatcher::addListener):
(WebCore::MediaQueryMatcher::styleResolverChanged):
* css/MediaQueryMatcher.h:
* css/SelectorFilter.cpp:
(WebCore::SelectorFilter::popParentStackFrame):
(WebCore::SelectorFilter::setupParentStack):
* css/SelectorFilter.h:

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

7 years agoMove PropertySetCSSStyleDeclaration, WebKitCSSKeyframesRule to std::unique_ptr
zandobersek@gmail.com [Sat, 25 Jan 2014 18:52:42 +0000 (18:52 +0000)]
Move PropertySetCSSStyleDeclaration, WebKitCSSKeyframesRule to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=127572

Reviewed by Andreas Kling.

Switch the PropertySetCSSStyleDeclaration and WebKitCSSKeyframesRule classes from using
OwnPtr and adoptPtr to using std::unique_ptr and std::make_unique.

* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::PropertySetCSSStyleDeclaration::cloneAndCacheForCSSOM):
(WebCore::StyleRuleCSSStyleDeclaration::didMutate):
(WebCore::InlineCSSStyleDeclaration::didMutate):
* css/PropertySetCSSStyleDeclaration.h:
* css/WebKitCSSKeyframesRule.cpp:
(WebCore::WebKitCSSKeyframesRule::cssRules):
* css/WebKitCSSKeyframesRule.h:

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

7 years agoMove StyleProperties, StyleResolver to std::unique_ptr
zandobersek@gmail.com [Sat, 25 Jan 2014 18:51:20 +0000 (18:51 +0000)]
Move StyleProperties, StyleResolver to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=127570

Reviewed by Andreas Kling.

Move the StyleProperties and StyleResolver classes from using OwnPtr and adoptPtr
to using std::unique_ptr and std::make_unique.

* css/StyleInvalidationAnalysis.h: Remove the PassOwnPtr.h header inclusion.
* css/StyleProperties.cpp:
(WebCore::MutableStyleProperties::ensureCSSStyleDeclaration):
(WebCore::MutableStyleProperties::ensureInlineCSSStyleDeclaration):
* css/StyleProperties.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::StyleResolver):
(WebCore::StyleResolver::addViewportDependentMediaQueryResult):
* css/StyleResolver.h:
* css/StyleScopeResolver.h:

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

7 years agoMove CSSFontFace, CSSFontSelector to std::unique_ptr
zandobersek@gmail.com [Sat, 25 Jan 2014 18:49:50 +0000 (18:49 +0000)]
Move CSSFontFace, CSSFontSelector to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=127569

Reviewed by Andreas Kling.

Move the CSSFontFace and CSSFontSelector classes from using OwnPtr, PassOwnPtr and adoptPtr
to using std::unique_ptr, move semantics and std::make_unique.

* css/CSSFontFace.cpp:
(WebCore::CSSFontFace::addSource):
* css/CSSFontFace.h:
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule):
(WebCore::CSSFontSelector::getFontFace):
* css/CSSFontSelector.h:

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

7 years ago[GTK] Remove null check for WebPopupMenuProxy::Client in WebPopupMenuProxyGtk::showPo...
zandobersek@gmail.com [Sat, 25 Jan 2014 18:48:02 +0000 (18:48 +0000)]
[GTK] Remove null check for WebPopupMenuProxy::Client in WebPopupMenuProxyGtk::showPopupMenu
https://bugs.webkit.org/show_bug.cgi?id=107036

Reviewed by Andreas Kling.

* UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
(WebKit::WebPopupMenuProxyGtk::showPopupMenu): Don't perform an early return
if the client is not available - it always should be. The client is set to null
only when the proxy is invalidated. This happens immediately after this function
returns, either with the popup being forced to close or being closed by the user
with possibly an item being chosen. Rather than the early return, use an ASSERT.

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

7 years agoWeb Inspector: Move InspectorRuntimeAgent into JavaScriptCore
joepeck@webkit.org [Sat, 25 Jan 2014 17:48:16 +0000 (17:48 +0000)]
Web Inspector: Move InspectorRuntimeAgent into JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=127605

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
Add new files to the build.

* inspector/agents/InspectorRuntimeAgent.h: Renamed from Source/WebCore/inspector/InspectorRuntimeAgent.h.
* inspector/agents/InspectorRuntimeAgent.cpp: Renamed from Source/WebCore/inspector/InspectorRuntimeAgent.cpp.
(Inspector::InspectorRuntimeAgent::InspectorRuntimeAgent):
(Inspector::InspectorRuntimeAgent::parse):
(Inspector::InspectorRuntimeAgent::evaluate):
(Inspector::InspectorRuntimeAgent::callFunctionOn):
(Inspector::InspectorRuntimeAgent::getProperties):
- Move the agent into JavaScriptCore.
- Modernize and cleanup.
- Make globalVM a pure virtual function for subclasses to implement.

* inspector/agents/JSGlobalObjectRuntimeAgent.h: Added.
* inspector/agents/JSGlobalObjectRuntimeAgent.cpp: Added.
(Inspector::JSGlobalObjectRuntimeAgent::JSGlobalObjectRuntimeAgent):
(Inspector::JSGlobalObjectRuntimeAgent::didCreateFrontendAndBackend):
(Inspector::JSGlobalObjectRuntimeAgent::willDestroyFrontendAndBackend):
(Inspector::JSGlobalObjectRuntimeAgent::globalVM):
(Inspector::JSGlobalObjectRuntimeAgent::injectedScriptForEval):
Straightforward JSGlobalObject implementation.

* inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
Add a runtime agent when inspecting a JSContext!

Source/WebCore:

Covered by existing tests. No change in functionality.

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorAllInOne.cpp:
Remove WebCore InspectorRuntimeAgent.

* ForwardingHeaders/inspector/agents/InspectorRuntimeAgent.h: Added.
Add JavaScriptCore InspectorRuntimeAgent.

* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
* inspector/WorkerInspectorController.h:
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::WorkerInspectorController):
New constructors for the runtime agent.

* inspector/PageRuntimeAgent.h:
* inspector/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::PageRuntimeAgent):
(WebCore::PageRuntimeAgent::enable):
(WebCore::PageRuntimeAgent::disable):
(WebCore::PageRuntimeAgent::didCreateMainWorldContext):
(WebCore::PageRuntimeAgent::didCreateIsolatedContext):
(WebCore::PageRuntimeAgent::globalVM):
Modernize and implement globalVM.

* inspector/WorkerRuntimeAgent.h:
* inspector/WorkerRuntimeAgent.cpp:
(WebCore::WorkerRuntimeAgent::WorkerRuntimeAgent):
(WebCore::WorkerRuntimeAgent::injectedScriptForEval):
(WebCore::WorkerRuntimeAgent::globalVM):
Modernize and implement globalVM.

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

7 years ago[GTK] Add parameters from 'DOM Object Model Core' spec and 'DOM CSS' spec that can...
commit-queue@webkit.org [Sat, 25 Jan 2014 17:25:03 +0000 (17:25 +0000)]
[GTK] Add parameters from 'DOM Object Model Core' spec and 'DOM CSS' spec that can be NULL

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

Patch by Diego Pino Garcia <dpino@igalia.com> on 2014-01-25
Reviewed by Xan Lopez.

* bindings/scripts/CodeGeneratorGObject.pm:
(ParamCanBeNull): Add new pairs (function, parameter) that can be NULL

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

7 years agoRestore alphabetical order in Compiler.h
darin@apple.com [Sat, 25 Jan 2014 17:18:37 +0000 (17:18 +0000)]
Restore alphabetical order in Compiler.h
https://bugs.webkit.org/show_bug.cgi?id=127620

Reviewed by Sam Weinig.

* wtf/Compiler.h: Resorted some things into alphabetical order

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

7 years agoGet rid of BackForwardController::isActive()
andersca@apple.com [Sat, 25 Jan 2014 17:16:49 +0000 (17:16 +0000)]
Get rid of BackForwardController::isActive()
https://bugs.webkit.org/show_bug.cgi?id=127604

Reviewed by Sam Weinig.

Source/WebCore:

BackForwardController::isActive() used to mean "my page maintains a back forward
list that has zero capacity". Move that logic into WebKit instead, namely the
WebFrameLoaderClient::canCachePage function so we can simplify WebCore.

* history/BackForwardClient.h:
* history/BackForwardController.cpp:
* history/BackForwardController.h:
* history/BackForwardList.h:
* history/PageCache.cpp:
(WebCore::logCanCachePageDecision):
(WebCore::PageCache::canCache):

Source/WebKit/mac:

* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::canCachePage):
Move isActive logic here.

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

7 years agoREGRESSION(r162744): wsj.com paints white
antti@apple.com [Sat, 25 Jan 2014 17:15:51 +0000 (17:15 +0000)]
REGRESSION(r162744): wsj.com paints white
https://bugs.webkit.org/show_bug.cgi?id=127619

Reviewed by Sam Weinig.

Source/WebCore:

Test: fast/css/stylesheet-layout-with-pending-paint.html

* dom/Document.cpp:
(WebCore::Document::styleResolverChanged):

    Ensure we switch out from IgnoreLayoutWithPendingSheets state after stylesheet loads complete.

LayoutTests:

* fast/css/stylesheet-layout-with-pending-paint-expected.html: Added.
* fast/css/stylesheet-layout-with-pending-paint.html: Added.

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

7 years ago[EFL][WK1] Fix broken rendering while navigating history in EWebLauncher
ryuan.choi@samsung.com [Sat, 25 Jan 2014 14:19:50 +0000 (14:19 +0000)]
[EFL][WK1] Fix broken rendering while navigating history in EWebLauncher
https://bugs.webkit.org/show_bug.cgi?id=127601

Reviewed by Anders Carlsson.

When scrolled after requested repaints, rendering was broken because scrollDelta
changed repaints area.

* ewk/ewk_view.cpp:
(ewk_view_scroll):

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

7 years agoReverted r162760. It broke more things.
mitz@apple.com [Sat, 25 Jan 2014 07:44:27 +0000 (07:44 +0000)]
Reverted r162760. It broke more things.

* WebCore.exp.in:

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

7 years agoTry to fix some 32-bit builds.
mitz@apple.com [Sat, 25 Jan 2014 07:10:31 +0000 (07:10 +0000)]
Try to fix some 32-bit builds.

* WebCore.exp.in:

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

7 years ago[EFL] Replace usage of DEFINE_STATIC_LOCAL with NeverDestroyed in WebCore/platform/efl
jinwoo7.song@samsung.com [Sat, 25 Jan 2014 06:40:43 +0000 (06:40 +0000)]
[EFL] Replace usage of DEFINE_STATIC_LOCAL with NeverDestroyed in WebCore/platform/efl
https://bugs.webkit.org/show_bug.cgi?id=127607

Reviewed by Anders Carlsson.

* platform/efl/EflKeyboardUtilities.cpp:
(WebCore::keyMap): Use NeverDestroyed instead of DEFINE_STATIC_LOCAL.
(WebCore::windowsKeyMap): Ditto.
(WebCore::keyDownCommandsMap): Ditto.
(WebCore::keyPressCommandsMap): Ditto.
* platform/efl/GamepadsEfl.cpp:
(WebCore::sampleGamepads): Ditto.
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::systemFont): Do not use unnecessary DEFINE_STATIC_LOCAL.

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

7 years agoWebKit2 View Gestures (Smart Zoom): Can't double-tap zoom-out on the body
timothy_horton@apple.com [Sat, 25 Jan 2014 06:01:29 +0000 (06:01 +0000)]
WebKit2 View Gestures (Smart Zoom): Can't double-tap zoom-out on the body
https://bugs.webkit.org/show_bug.cgi?id=127602

Reviewed by Anders Carlsson.

* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureController.mm:
(WebKit::ViewGestureController::ViewGestureController):
(WebKit::ViewGestureController::didCollectGeometryForSmartMagnificationGesture):
Use an explicit boolean instead of the emptiness of the renderRect() to determine
whether or not the user has already smart-zoomed. renderRect() can be 0x0
if our hit-test hits the body element.

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

7 years agoMove JavaScriptCallFrame and ScriptDebugServer into JavaScriptCore for inspector
joepeck@webkit.org [Sat, 25 Jan 2014 04:42:25 +0000 (04:42 +0000)]
Move JavaScriptCallFrame and ScriptDebugServer into JavaScriptCore for inspector
https://bugs.webkit.org/show_bug.cgi?id=127543

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
Add new files.

* inspector/ScriptDebugListener.h:
Extract WebCore knowledge from ScriptDebugServer. This will
eventually be made to work outside of WebCore.

* inspector/ScriptDebugServer.h: Renamed from Source/WebCore/bindings/js/ScriptDebugServer.h.
* inspector/ScriptDebugServer.cpp: Renamed from Source/WebCore/bindings/js/ScriptDebugServer.cpp.
(Inspector::ScriptDebugServer::evaluateBreakpointAction):
(Inspector::ScriptDebugServer::dispatchDidPause):
(Inspector::ScriptDebugServer::dispatchBreakpointActionLog):
(Inspector::ScriptDebugServer::dispatchBreakpointActionSound):
(Inspector::ScriptDebugServer::sourceParsed):
(Inspector::ScriptDebugServer::dispatchFunctionToListeners):
(Inspector::ScriptDebugServer::handlePause):
Modernize code, and call the new ScriptDebugListener callbacks where appropriate.

* inspector/JSJavaScriptCallFrame.cpp: Renamed from Source/WebCore/bindings/js/JSJavaScriptCallFrameCustom.cpp.
(Inspector::JSJavaScriptCallFrame::JSJavaScriptCallFrame):
(Inspector::JSJavaScriptCallFrame::finishCreation):
(Inspector::JSJavaScriptCallFrame::createPrototype):
(Inspector::JSJavaScriptCallFrame::destroy):
(Inspector::JSJavaScriptCallFrame::releaseImpl):
(Inspector::JSJavaScriptCallFrame::~JSJavaScriptCallFrame):
(Inspector::JSJavaScriptCallFrame::evaluate):
(Inspector::JSJavaScriptCallFrame::scopeType):
(Inspector::JSJavaScriptCallFrame::caller):
(Inspector::JSJavaScriptCallFrame::sourceID):
(Inspector::JSJavaScriptCallFrame::line):
(Inspector::JSJavaScriptCallFrame::column):
(Inspector::JSJavaScriptCallFrame::functionName):
(Inspector::JSJavaScriptCallFrame::scopeChain):
(Inspector::JSJavaScriptCallFrame::thisObject):
(Inspector::JSJavaScriptCallFrame::type):
(Inspector::toJS):
(Inspector::toJSJavaScriptCallFrame):
* inspector/JSJavaScriptCallFrame.h: Added.
(Inspector::JSJavaScriptCallFrame::createStructure):
(Inspector::JSJavaScriptCallFrame::create):
(Inspector::JSJavaScriptCallFrame::impl):
* inspector/JSJavaScriptCallFramePrototype.cpp: Added.
(Inspector::JSJavaScriptCallFramePrototype::finishCreation):
(Inspector::jsJavaScriptCallFramePrototypeFunctionEvaluate):
(Inspector::jsJavaScriptCallFramePrototypeFunctionScopeType):
(Inspector::jsJavaScriptCallFrameAttributeCaller):
(Inspector::jsJavaScriptCallFrameAttributeSourceID):
(Inspector::jsJavaScriptCallFrameAttributeLine):
(Inspector::jsJavaScriptCallFrameAttributeColumn):
(Inspector::jsJavaScriptCallFrameAttributeFunctionName):
(Inspector::jsJavaScriptCallFrameAttributeScopeChain):
(Inspector::jsJavaScriptCallFrameAttributeThisObject):
(Inspector::jsJavaScriptCallFrameAttributeType):
(Inspector::jsJavaScriptCallFrameConstantGLOBAL_SCOPE):
(Inspector::jsJavaScriptCallFrameConstantLOCAL_SCOPE):
(Inspector::jsJavaScriptCallFrameConstantWITH_SCOPE):
(Inspector::jsJavaScriptCallFrameConstantCLOSURE_SCOPE):
(Inspector::jsJavaScriptCallFrameConstantCATCH_SCOPE):
* inspector/JSJavaScriptCallFramePrototype.h: Added.
(Inspector::JSJavaScriptCallFramePrototype::create):
(Inspector::JSJavaScriptCallFramePrototype::createStructure):
(Inspector::JSJavaScriptCallFramePrototype::JSJavaScriptCallFramePrototype):
* inspector/JavaScriptCallFrame.cpp: Renamed from Source/WebCore/bindings/js/JavaScriptCallFrame.cpp.
(Inspector::JavaScriptCallFrame::caller):
* inspector/JavaScriptCallFrame.h: Renamed from Source/WebCore/bindings/js/JavaScriptCallFrame.h.
Port of JavaScriptCallFrame.idl to a set of native JS classes.

Source/WebCore:

Covered by existing tests.

* ForwardingHeaders/inspector/ScriptDebugServer.h: Added.
* GNUmakefile.list.am:
* UseJSC.cmake:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
* inspector/JavaScriptCallFrame.idl: Removed.
Update builds now that ScriptDebugServer moved to JavaScriptCore.

* bindings/js/PageScriptDebugServer.h:
* bindings/js/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::runEventLoopWhilePaused):
(WebCore::PageScriptDebugServer::isContentScript):
(WebCore::PageScriptDebugServer::reportException):
* bindings/js/WorkerScriptDebugServer.h:
* bindings/js/WorkerScriptDebugServer.cpp:
(WebCore::WorkerScriptDebugServer::runEventLoopWhilePaused):
(WebCore::WorkerScriptDebugServer::reportException):
Handle ScriptDebugServer functionality depending on WebCore knowledge.

* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::breakpointActionSound):
Handle ScriptDebugServer functionality that depended on WebCore knowledge.
This will eventually be written in a non-WebCore specific way.

* inspector/InspectorRuntimeAgent.cpp:
* inspector/InspectorRuntimeAgent.h:
Update ScriptDebugServer type now that it is in namespace Inspector.

* workers/WorkerGlobalScope.h:
Make addConsoleMessage public again so the inspector can call it.

* inspector/PageDebuggerAgent.cpp:
(WebCore::PageDebuggerAgent::breakpointActionLog):
* inspector/PageDebuggerAgent.h:
* inspector/WorkerDebuggerAgent.cpp:
(WebCore::WorkerDebuggerAgent::breakpointActionLog):
* inspector/WorkerDebuggerAgent.h:
Let each of these handle console logs in their own way. Both of these
eventually go through the PageConsole and log through the InspectorConsoleAgent
and ChromeClient.

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

7 years agoFix EFL WebKit2 build.
jinwoo7.song@samsung.com [Sat, 25 Jan 2014 04:42:00 +0000 (04:42 +0000)]
Fix EFL WebKit2 build.

* WebProcess/WebPage/efl/WebPageEfl.cpp:
(WebKit::WebPage::performDefaultBehaviorForKeyEvent):

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

7 years agoImprove latching behavior for wheel events
bfulgham@apple.com [Sat, 25 Jan 2014 04:33:48 +0000 (04:33 +0000)]
Improve latching behavior for wheel events
https://bugs.webkit.org/show_bug.cgi?id=127386
<rdar://problem/12176858>

Reviewed by Simon Fraser.

* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::ScrollingTree): Initialize new values used for tracking
scroll latching state.
(WebCore::ScrollingTree::shouldHandleWheelEventSynchronously): Check for an existing
latched node and stay in fast scrolling mode if possible.
(WebCore::ScrollingTree::removeDestroyedNodes): Clear latched node if it's being removed.
(WebCore::ScrollingTree::latchedNode): Added
(WebCore::ScrollingTree::setLatchedNode): Added
(WebCore::ScrollingTree::clearLatchedNode): Added
* page/scrolling/ScrollingTree.h:
(WebCore::ScrollingTree::hasLatchedNode): Added
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::shouldConsiderLatching): Added
(WebCore::ScrollingTreeScrollingNodeMac::handleWheelEvent): Determine latching state
based on wheel event state and position of mouse pointer in the document.

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

7 years agoFix GTK+ WebKit2 build.
andersca@apple.com [Sat, 25 Jan 2014 03:38:35 +0000 (03:38 +0000)]
Fix GTK+ WebKit2 build.

* WebProcess/WebPage/gtk/WebPageGtk.cpp:
(WebKit::WebPage::performDefaultBehaviorForKeyEvent):

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

7 years agoASSERT(time.isFinite()) in SVGSMILElement::createInstanceTimesFromSyncbase
commit-queue@webkit.org [Sat, 25 Jan 2014 03:25:28 +0000 (03:25 +0000)]
ASSERT(time.isFinite()) in SVGSMILElement::createInstanceTimesFromSyncbase
<https://webkit.org/b/108184>

Patch by Tamas Gergely <tgergely.u-szeged@partner.samsung.com> on 2014-01-24
Reviewed by Philip Rogers.

Additional test to detect the crash in debug mode. It is merged back
from blink commit https://src.chromium.org/viewvc/blink?revision=165498&view=revision

* svg/animations/self-dependency-crash-expected.txt: Added.
* svg/animations/self-dependency-crash.html: Added.

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

7 years agoDebuggerCallFrame::evaluateWithCallFrame() should not execute a null executable.
mark.lam@apple.com [Sat, 25 Jan 2014 03:15:13 +0000 (03:15 +0000)]
DebuggerCallFrame::evaluateWithCallFrame() should not execute a null executable.
<https://webkit.org/b/127600>

Reviewed by Oliver Hunt.

In DebuggerCallFrame::evaluateWithCallFrame(), if the script string that
is passed in is bad, it will fail to create an Executable i.e.
EvalExecutable::create() returns a null pointer. However,
DebuggerCallFrame::evaluateWithCallFrame() was just clearing the
exception and proceeded to execute the null pointer as an Executable.
A crash ensues.

Now, if an exception is detected while creating the Executable, we
abort instead.

* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::evaluateWithCallFrame):

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

7 years agoGTK+ build fix.
andersca@apple.com [Sat, 25 Jan 2014 03:00:54 +0000 (03:00 +0000)]
GTK+ build fix.

* webkit/webkitwebview.cpp:
(webkit_web_view_can_go_back):

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

7 years agoAnother attempted build fix.
andersca@apple.com [Sat, 25 Jan 2014 02:58:58 +0000 (02:58 +0000)]
Another attempted build fix.

Use wildcards in the the std::duration symbol.

* WebCore.exp.in:

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

7 years agoUnreviewed Apple Windows port gardering.
zalan@apple.com [Sat, 25 Jan 2014 02:58:08 +0000 (02:58 +0000)]
Unreviewed Apple Windows port gardering.

* platform/win/fast/forms/file/file-input-disabled-expected.txt:
* platform/win/tables/mozilla/marvin/body_col-expected.txt: Added.

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

7 years agoStart using the RemoteScrollingCoordinatorProxy on iOS
simon.fraser@apple.com [Sat, 25 Jan 2014 02:32:26 +0000 (02:32 +0000)]
Start using the RemoteScrollingCoordinatorProxy on iOS
https://bugs.webkit.org/show_bug.cgi?id=127598

Reviewed by Tim Horton.

Source/WebCore:

Add a scrollPositionChangedViaDelegatedScrolling() function to
ScrollingTree, allowing the ScrollingTree to be informed about
external sources of scrolling.

Also add a convenience getter for nodes, nodeForID().

* WebCore.exp.in:
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::scrollPositionChangedViaDelegatedScrolling):
(WebCore::ScrollingTree::nodeForID):
* page/scrolling/ScrollingTree.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers):
To avoid assertions on iOS, bail from iOS WK1 fixed position code if
we have a ScrollingCoordinator.
(WebCore::RenderLayerCompositor::unregisterAllViewportConstrainedLayers):
Ditto.

Source/WebKit2:

Add a scrollPositionChangedViaDelegatedScrolling() function to
ScrollingTree, allowing the ScrollingTree to be informed about
external sources of scrolling.

Call it from -[WKContentView didScrollTo:] for the root node.

* UIProcess/API/ios/WKContentView.mm:
(-[WKContentView didScrollTo:]):
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::rootScrollingNodeID):
(WebKit::RemoteScrollingCoordinatorProxy::scrollPositionChangedViaDelegatedScrolling):
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:

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

7 years agoAdd typesafe casts for ScrollingTreeNode classes
simon.fraser@apple.com [Sat, 25 Jan 2014 02:32:23 +0000 (02:32 +0000)]
Add typesafe casts for ScrollingTreeNode classes
https://bugs.webkit.org/show_bug.cgi?id=127597

Reviewed by Tim Horton.

Add a ScrollingNodeType member to ScrollingTreeNodes and
use it for type-safe casting.

* page/scrolling/ScrollingTreeNode.cpp:
(WebCore::ScrollingTreeNode::ScrollingTreeNode):
* page/scrolling/ScrollingTreeNode.h:
(WebCore::ScrollingTreeNode::nodeType):
(WebCore::ScrollingTreeNode::scrollingNodeID):
* page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::ScrollingTreeScrollingNode):
* page/scrolling/ScrollingTreeScrollingNode.h:
* page/scrolling/mac/ScrollingTreeFixedNode.h:
* page/scrolling/mac/ScrollingTreeFixedNode.mm:
(WebCore::ScrollingTreeFixedNode::ScrollingTreeFixedNode):
* page/scrolling/mac/ScrollingTreeStickyNode.h:
* page/scrolling/mac/ScrollingTreeStickyNode.mm:
(WebCore::ScrollingTreeStickyNode::ScrollingTreeStickyNode):

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

7 years agoTry to fix the GTK+ build.
andersca@apple.com [Sat, 25 Jan 2014 02:11:39 +0000 (02:11 +0000)]
Try to fix the GTK+ build.

* GNUmakefile.list.am:

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

7 years agoRemove back/forward list related functions from Page
andersca@apple.com [Sat, 25 Jan 2014 02:08:56 +0000 (02:08 +0000)]
Remove back/forward list related functions from Page
https://bugs.webkit.org/show_bug.cgi?id=127596

Reviewed by Andreas Kling.

Source/WebCore:

* WebCore.exp.in:
* history/BackForwardController.cpp:
(WebCore::BackForwardController::canGoBackOrForward):
(WebCore::BackForwardController::goBackOrForward):
(WebCore::BackForwardController::goBack):
(WebCore::BackForwardController::goForward):
(WebCore::BackForwardController::count):
* page/EventHandler.cpp:
(WebCore::EventHandler::defaultBackspaceEventHandler):
* page/Page.cpp:
* page/Page.h:

Source/WebKit/efl:

* ewk/ewk_frame.cpp:
(ewk_frame_navigate):
(ewk_frame_navigate_possible):

Source/WebKit/gtk:

* webkit/webkitwebview.cpp:
(webkit_web_view_set_maintains_back_forward_list):
(webkit_web_view_get_back_forward_list):
(webkit_web_view_go_back):
(webkit_web_view_go_back_or_forward):
(webkit_web_view_go_forward):
(webkit_web_view_can_go_back_or_forward):
(webkit_web_view_can_go_forward):

Source/WebKit/mac:

* WebView/WebFrameView.mm:
(-[WebFrameView keyDown:keyDown:]):
* WebView/WebView.mm:
(-[WebView _loadBackForwardListFromOtherView:]):
(-[WebView initWithCoder:]):
(-[WebView encodeWithCoder:]):
(-[WebView backForwardList]):
(-[WebView setMaintainsBackForwardList:]):
(-[WebView goBack]):
(-[WebView goForward]):
(-[WebView canGoBack]):
(-[WebView canGoForward]):

Source/WebKit/win:

* WebView.cpp:
(WebView::keyDown):
(WebView::goBack):
(WebView::goForward):

Source/WebKit2:

* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performNonEditingBehaviorForSelector):

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

7 years agoUpdate style asynchronously after style sheet load
antti@apple.com [Sat, 25 Jan 2014 02:04:38 +0000 (02:04 +0000)]
Update style asynchronously after style sheet load
https://bugs.webkit.org/show_bug.cgi?id=127563

Reviewed by Andreas Kling.

Since we don't attach synchronously we don't need to recalc style synchronously either.

* dom/Document.cpp:
(WebCore::Document::didRemoveAllPendingStylesheet):

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

7 years agoUnreviewed build fix attemp on the EFL after r162728.
jinwoo7.song@samsung.com [Sat, 25 Jan 2014 02:02:23 +0000 (02:02 +0000)]
Unreviewed build fix attemp on the EFL after r162728.

* CMakeLists.txt: Removed WebLoaderClient.cpp

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

7 years agoSubpixel layout: Default style of input type=checkbox/radio (0.5ex) adds 1px extra...
zalan@apple.com [Sat, 25 Jan 2014 01:34:09 +0000 (01:34 +0000)]
Subpixel layout: Default style of input type=checkbox/radio (0.5ex) adds 1px extra margin on both left and right.
https://bugs.webkit.org/show_bug.cgi?id=125728

Reviewed by Simon Fraser.

Using the 0.5ex value to set checkbox/radio left and right margins is a long-standing
(khtml) behavior. While it indicates dynamic behavior, in order to get the margins changed,
the widget's font size needs to be set, which is rather rare for such input types.
It also results in odd layout, where the checkbox's indentation may seem to change randomly.

'<input style="font-size: 30px;" type="checkbox">foo' changes neither the checkbox
nor the text size, but it indents the line by about 15px.

Other browsers (FF, Opera with Presto) disagree and they set static margins values.
2px is the current default computed value.

Source/WebCore:

* css/html.css:
(input[type="radio"], input[type="checkbox"]):

LayoutTests:

* platform/mac-mountainlion/fast/block/margin-collapse/103-expected.txt:
* platform/mac-mountainlion/fast/forms/basic-inputs-expected.txt:
* platform/mac-mountainlion/fast/forms/box-shadow-override-expected.txt:
* platform/mac-mountainlion/fast/forms/form-element-geometry-expected.txt:
* platform/mac-mountainlion/fast/forms/input-appearance-height-expected.txt:
* platform/mac-mountainlion/fast/forms/input-value-expected.txt:
* platform/mac-mountainlion/fast/replaced/replaced-breaking-expected.txt:
* platform/mac-mountainlion/fast/text/textIteratorNilRenderer-expected.txt:
* platform/mac-mountainlion/http/tests/navigation/javascriptlink-frames-expected.txt:
* platform/mac-mountainlion/tables/mozilla/bugs/bug4527-expected.txt:
* platform/mac/compositing/overflow/theme-affects-visual-overflow-expected.txt:
* platform/mac/css1/box_properties/acid_test-expected.txt:
* platform/mac/css2.1/t09-c5526c-display-00-e-expected.txt:
* platform/mac/css3/selectors3/html/css3-modsel-25-expected.txt:
* platform/mac/css3/selectors3/html/css3-modsel-70-expected.txt:
* platform/mac/css3/selectors3/xhtml/css3-modsel-25-expected.txt:
* platform/mac/css3/selectors3/xhtml/css3-modsel-70-expected.txt:
* platform/mac/css3/selectors3/xml/css3-modsel-25-expected.txt:
* platform/mac/css3/selectors3/xml/css3-modsel-70-expected.txt:
* platform/mac/fast/block/basic/011-expected.txt:
* platform/mac/fast/block/margin-collapse/103-expected.txt:
* platform/mac/fast/css/non-standard-checkbox-size-expected.txt:
* platform/mac/fast/forms/001-expected.txt:
* platform/mac/fast/forms/basic-inputs-expected.txt:
* platform/mac/fast/forms/box-shadow-override-expected.txt:
* platform/mac/fast/forms/file/file-input-disabled-expected.txt:
* platform/mac/fast/forms/form-element-geometry-expected.txt:
* platform/mac/fast/forms/formmove-expected.txt:
* platform/mac/fast/forms/formmove2-expected.txt:
* platform/mac/fast/forms/indeterminate-expected.txt:
* platform/mac/fast/forms/input-appearance-height-expected.txt:
* platform/mac/fast/forms/input-value-expected.txt:
* platform/mac/fast/inline/positionedLifetime-expected.txt:
* platform/mac/fast/parser/bad-xml-slash-expected.txt:
* platform/mac/fast/replaced/replaced-breaking-expected.txt:
* platform/mac/fast/replaced/width100percent-checkbox-expected.txt:
* platform/mac/fast/replaced/width100percent-radio-expected.txt:
* platform/mac/fast/text/textIteratorNilRenderer-expected.txt:
* platform/mac/fast/text/whitespace/normal-after-nowrap-breaking-expected.txt:
* platform/mac/http/tests/navigation/javascriptlink-frames-expected.txt:
* platform/mac/tables/mozilla/bugs/bug1318-expected.txt:
* platform/mac/tables/mozilla/bugs/bug4527-expected.txt:
* platform/mac/tables/mozilla_expected_failures/core/captions1-expected.txt:
* platform/mac/tables/mozilla_expected_failures/core/captions2-expected.txt:

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

7 years agoPut functions need to take a base object and a this value, and perform type checks...
oliver@apple.com [Sat, 25 Jan 2014 01:26:49 +0000 (01:26 +0000)]
Put functions need to take a base object and a this value, and perform type checks on |this|
https://bugs.webkit.org/show_bug.cgi?id=127594

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Change the signature for static setter functions, and update uses

* create_hash_table:
* runtime/Lookup.h:
(JSC::putEntry):
* runtime/PutPropertySlot.h:
* runtime/RegExpConstructor.cpp:
(JSC::setRegExpConstructorInput):
(JSC::setRegExpConstructorMultiline):

Source/WebCore:

Update bindings generator to emit setters with correct type, and perform
type checks on |this|, instead of the baseObject.

Test: js/dom/dom-as-prototype-assignment-exception.html

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
(GenerateHashTable):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestException.cpp:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::setJSTestInterfaceConstructorImplementsStaticAttr):
(WebCore::setJSTestInterfaceImplementsStr2):
(WebCore::setJSTestInterfaceImplementsStr3):
(WebCore::setJSTestInterfaceImplementsNode):
(WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
(WebCore::setJSTestInterfaceSupplementalStr2):
(WebCore::setJSTestInterfaceSupplementalStr3):
(WebCore::setJSTestInterfaceSupplementalNode):
* bindings/scripts/test/JS/JSTestInterface.h:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
* bindings/scripts/test/JS/JSTestNode.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::setJSTestObjConstructorStaticStringAttr):
(WebCore::setJSTestObjTestSubObjEnabledBySettingConstructor):
(WebCore::setJSTestObjEnumAttr):
(WebCore::setJSTestObjByteAttr):
(WebCore::setJSTestObjOctetAttr):
(WebCore::setJSTestObjShortAttr):
(WebCore::setJSTestObjUnsignedShortAttr):
(WebCore::setJSTestObjLongAttr):
(WebCore::setJSTestObjLongLongAttr):
(WebCore::setJSTestObjUnsignedLongLongAttr):
(WebCore::setJSTestObjStringAttr):
(WebCore::setJSTestObjTestObjAttr):
(WebCore::setJSTestObjXMLObjAttr):
(WebCore::setJSTestObjCreate):
(WebCore::setJSTestObjReflectedStringAttr):
(WebCore::setJSTestObjReflectedIntegralAttr):
(WebCore::setJSTestObjReflectedUnsignedIntegralAttr):
(WebCore::setJSTestObjReflectedBooleanAttr):
(WebCore::setJSTestObjReflectedURLAttr):
(WebCore::setJSTestObjReflectedCustomIntegralAttr):
(WebCore::setJSTestObjReflectedCustomBooleanAttr):
(WebCore::setJSTestObjReflectedCustomURLAttr):
(WebCore::setJSTestObjTypedArrayAttr):
(WebCore::setJSTestObjAttrWithGetterException):
(WebCore::setJSTestObjAttrWithSetterException):
(WebCore::setJSTestObjStringAttrWithGetterException):
(WebCore::setJSTestObjStringAttrWithSetterException):
(WebCore::setJSTestObjCustomAttr):
(WebCore::setJSTestObjWithScriptStateAttribute):
(WebCore::setJSTestObjWithScriptExecutionContextAttribute):
(WebCore::setJSTestObjWithScriptStateAttributeRaises):
(WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
(WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
(WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
(WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
(WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
(WebCore::setJSTestObjConditionalAttr1):
(WebCore::setJSTestObjConditionalAttr2):
(WebCore::setJSTestObjConditionalAttr3):
(WebCore::setJSTestObjConditionalAttr4Constructor):
(WebCore::setJSTestObjConditionalAttr5Constructor):
(WebCore::setJSTestObjConditionalAttr6Constructor):
(WebCore::setJSTestObjAnyAttribute):
(WebCore::setJSTestObjMutablePoint):
(WebCore::setJSTestObjImmutablePoint):
(WebCore::setJSTestObjStrawberry):
(WebCore::setJSTestObjStrictFloat):
(WebCore::setJSTestObjId):
(WebCore::setJSTestObjReplaceableAttribute):
(WebCore::setJSTestObjNullableLongSettableAttribute):
(WebCore::setJSTestObjNullableStringValue):
(WebCore::setJSTestObjAttributeWithReservedEnumType):
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::setJSTestSerializedScriptValueInterfaceValue):
(WebCore::setJSTestSerializedScriptValueInterfaceCachedValue):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::setJSTestTypedefsUnsignedLongLongAttr):
(WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
(WebCore::setJSTestTypedefsAttrWithGetterException):
(WebCore::setJSTestTypedefsAttrWithSetterException):
(WebCore::setJSTestTypedefsStringAttrWithGetterException):
(WebCore::setJSTestTypedefsStringAttrWithSetterException):
* bindings/scripts/test/JS/JSTestTypedefs.h:
* bindings/scripts/test/JS/JSattribute.cpp:
* bindings/scripts/test/JS/JSreadonly.cpp:

LayoutTests:

Add tests, and update expectation for previously failing test.

* js/dom/dom-as-prototype-assignment-exception-expected.txt: Added.
* js/dom/dom-as-prototype-assignment-exception.html: Added.
* js/dom/script-tests/dom-as-prototype-assignment-exception.js: Added.
* media/network-no-source-const-shadow-expected.txt:

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

7 years agoGeneric JSObject::put should handle static properties in the classinfo hierarchy
oliver@apple.com [Sat, 25 Jan 2014 01:03:40 +0000 (01:03 +0000)]
Generic JSObject::put should handle static properties in the classinfo hierarchy
https://bugs.webkit.org/show_bug.cgi?id=127523

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

This patch makes JSObject::put correctly call static setters
defined by the ClassInfo.

To make this not clobber performance, the ClassInfo HashTable
now includes a flag to indicate that it contains setters. This
required updating the lut generator so that it tracked (and emitted)
this.

The rest of the change was making a number of the methods take
a VM rather than an ExecState*, so that Structure could set the
getter/setter flags during construction (if necessary).

This also means most objects do not need to perform a lookupPut
manually anymore, so most custom ::put's are no longer needed.
DOMWindow is the only exception as it has interesting security
related semantics.

* create_hash_table:
* interpreter/CallFrame.h:
(JSC::ExecState::arrayConstructorTable):
(JSC::ExecState::arrayPrototypeTable):
(JSC::ExecState::booleanPrototypeTable):
(JSC::ExecState::dataViewTable):
(JSC::ExecState::dateTable):
(JSC::ExecState::dateConstructorTable):
(JSC::ExecState::errorPrototypeTable):
(JSC::ExecState::globalObjectTable):
(JSC::ExecState::jsonTable):
(JSC::ExecState::numberConstructorTable):
(JSC::ExecState::numberPrototypeTable):
(JSC::ExecState::objectConstructorTable):
(JSC::ExecState::privateNamePrototypeTable):
(JSC::ExecState::regExpTable):
(JSC::ExecState::regExpConstructorTable):
(JSC::ExecState::regExpPrototypeTable):
(JSC::ExecState::stringConstructorTable):
(JSC::ExecState::promisePrototypeTable):
(JSC::ExecState::promiseConstructorTable):
* runtime/ArrayConstructor.cpp:
(JSC::ArrayConstructor::getOwnPropertySlot):
* runtime/ArrayPrototype.cpp:
(JSC::ArrayPrototype::getOwnPropertySlot):
* runtime/BooleanPrototype.cpp:
(JSC::BooleanPrototype::getOwnPropertySlot):
* runtime/ClassInfo.h:
(JSC::ClassInfo::propHashTable):
* runtime/DateConstructor.cpp:
(JSC::DateConstructor::getOwnPropertySlot):
* runtime/DatePrototype.cpp:
(JSC::DatePrototype::getOwnPropertySlot):
* runtime/ErrorPrototype.cpp:
(JSC::ErrorPrototype::getOwnPropertySlot):
* runtime/JSDataViewPrototype.cpp:
(JSC::JSDataViewPrototype::getOwnPropertySlot):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::getOwnPropertySlot):
* runtime/JSONObject.cpp:
(JSC::JSONObject::getOwnPropertySlot):
* runtime/JSObject.cpp:
(JSC::JSObject::put):
(JSC::JSObject::deleteProperty):
* runtime/JSPromiseConstructor.cpp:
(JSC::JSPromiseConstructor::getOwnPropertySlot):
* runtime/JSPromisePrototype.cpp:
(JSC::JSPromisePrototype::getOwnPropertySlot):
* runtime/Lookup.h:
(JSC::HashTable::copy):
(JSC::putEntry):
(JSC::lookupPut):
* runtime/NamePrototype.cpp:
(JSC::NamePrototype::getOwnPropertySlot):
* runtime/NumberConstructor.cpp:
(JSC::NumberConstructor::getOwnPropertySlot):
* runtime/NumberConstructor.h:
* runtime/NumberPrototype.cpp:
(JSC::NumberPrototype::getOwnPropertySlot):
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::getOwnPropertySlot):
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::getOwnPropertySlot):
* runtime/RegExpConstructor.h:
* runtime/RegExpObject.cpp:
(JSC::RegExpObject::getOwnPropertySlot):
(JSC::RegExpObject::put):
* runtime/RegExpPrototype.cpp:
(JSC::RegExpPrototype::getOwnPropertySlot):
* runtime/StringConstructor.cpp:
(JSC::StringConstructor::getOwnPropertySlot):
* runtime/Structure.cpp:
(JSC::Structure::Structure):
(JSC::Structure::freezeTransition):
(JSC::ClassInfo::hasStaticSetterOrReadonlyProperties):

Source/WebCore:

Update the bindings generator to emit the flag indicating the presence
of setters, and remove the many (now unnecessary) put overrides.
Tested with run-jsc-benchmarks and shows neutral performance. A few of the
micro benchmarks actually get a significant performance increase which
is nice.

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::put):
    We still need a custom call to lookupPut here in order
    to get the magic security semantics of the window object.
* bindings/scripts/CodeGeneratorJS.pm:
(hashTableAccessor):
(prototypeHashTableAccessor):
(constructorHashTableAccessor):
(GenerateImplementation):
(GenerateHashTable):
(GenerateConstructorHelperMethods):

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::put):
* bindings/scripts/CodeGeneratorJS.pm:
(hashTableAccessor):
(prototypeHashTableAccessor):
(constructorHashTableAccessor):
(InstanceOverridesPutImplementation):
(InstanceOverridesPutDeclaration):
(GenerateHeader):
(GenerateImplementation):
(GenerateHashTable):
(GenerateConstructorHelperMethods):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestException.cpp:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterface::put):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
* bindings/scripts/test/JS/JSTestNode.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.h:
* bindings/scripts/test/JS/JSattribute.cpp:
* bindings/scripts/test/JS/JSreadonly.cpp:
* html/canvas/WebGLRenderingContext.idl:
  Remove bogus attribute, as it has never been in the spec and should not
  have been added.

LayoutTests:

Yay tests!

* fast/canvas/webgl/constants.html:
  Remove incorrect constant
* js/script-tests/static-put-in-prototype-chain.js: Added.
* js/static-put-in-prototype-chain-expected.txt: Added.
* js/static-put-in-prototype-chain.html: Added.

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

7 years agoUnreviewed, rolling out r162713.
commit-queue@webkit.org [Sat, 25 Jan 2014 00:52:21 +0000 (00:52 +0000)]
Unreviewed, rolling out r162713.
http://trac.webkit.org/changeset/162713
https://bugs.webkit.org/show_bug.cgi?id=127593

broke media/network-no-source-const-shadow (Requested by
thorton on #webkit).

Source/JavaScriptCore:

* create_hash_table:
* interpreter/CallFrame.h:
(JSC::ExecState::arrayConstructorTable):
(JSC::ExecState::arrayPrototypeTable):
(JSC::ExecState::booleanPrototypeTable):
(JSC::ExecState::dataViewTable):
(JSC::ExecState::dateTable):
(JSC::ExecState::dateConstructorTable):
(JSC::ExecState::errorPrototypeTable):
(JSC::ExecState::globalObjectTable):
(JSC::ExecState::jsonTable):
(JSC::ExecState::numberConstructorTable):
(JSC::ExecState::numberPrototypeTable):
(JSC::ExecState::objectConstructorTable):
(JSC::ExecState::privateNamePrototypeTable):
(JSC::ExecState::regExpTable):
(JSC::ExecState::regExpConstructorTable):
(JSC::ExecState::regExpPrototypeTable):
(JSC::ExecState::stringConstructorTable):
(JSC::ExecState::promisePrototypeTable):
(JSC::ExecState::promiseConstructorTable):
* runtime/ArrayConstructor.cpp:
(JSC::ArrayConstructor::getOwnPropertySlot):
* runtime/ArrayPrototype.cpp:
(JSC::ArrayPrototype::getOwnPropertySlot):
* runtime/BooleanPrototype.cpp:
(JSC::BooleanPrototype::getOwnPropertySlot):
* runtime/ClassInfo.h:
(JSC::ClassInfo::propHashTable):
* runtime/DateConstructor.cpp:
(JSC::DateConstructor::getOwnPropertySlot):
* runtime/DatePrototype.cpp:
(JSC::DatePrototype::getOwnPropertySlot):
* runtime/ErrorPrototype.cpp:
(JSC::ErrorPrototype::getOwnPropertySlot):
* runtime/JSDataViewPrototype.cpp:
(JSC::JSDataViewPrototype::getOwnPropertySlot):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::getOwnPropertySlot):
* runtime/JSONObject.cpp:
(JSC::JSONObject::getOwnPropertySlot):
* runtime/JSObject.cpp:
(JSC::JSObject::put):
(JSC::JSObject::deleteProperty):
* runtime/JSPromiseConstructor.cpp:
(JSC::JSPromiseConstructor::getOwnPropertySlot):
* runtime/JSPromisePrototype.cpp:
(JSC::JSPromisePrototype::getOwnPropertySlot):
* runtime/Lookup.h:
(JSC::HashTable::copy):
(JSC::putEntry):
(JSC::lookupPut):
* runtime/NamePrototype.cpp:
(JSC::NamePrototype::getOwnPropertySlot):
* runtime/NumberConstructor.cpp:
(JSC::NumberConstructor::getOwnPropertySlot):
(JSC::NumberConstructor::put):
* runtime/NumberConstructor.h:
* runtime/NumberPrototype.cpp:
(JSC::NumberPrototype::getOwnPropertySlot):
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::getOwnPropertySlot):
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::getOwnPropertySlot):
(JSC::RegExpConstructor::put):
* runtime/RegExpConstructor.h:
* runtime/RegExpObject.cpp:
(JSC::RegExpObject::getOwnPropertySlot):
(JSC::RegExpObject::put):
* runtime/RegExpPrototype.cpp:
(JSC::RegExpPrototype::getOwnPropertySlot):
* runtime/StringConstructor.cpp:
(JSC::StringConstructor::getOwnPropertySlot):
* runtime/Structure.cpp:
(JSC::Structure::Structure):
(JSC::Structure::freezeTransition):

Source/WebCore:

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::put):
* bindings/scripts/CodeGeneratorJS.pm:
(hashTableAccessor):
(prototypeHashTableAccessor):
(constructorHashTableAccessor):
(GenerateHeader):
(GenerateImplementation):
(GenerateHashTable):
(GenerateConstructorHelperMethods):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestException.cpp:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterface::put):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
* bindings/scripts/test/JS/JSTestNode.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObj::put):
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterface::put):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::JSTestTypedefs::put):
* bindings/scripts/test/JS/JSTestTypedefs.h:
* bindings/scripts/test/JS/JSattribute.cpp:
* bindings/scripts/test/JS/JSreadonly.cpp:
* html/canvas/WebGLRenderingContext.idl:

LayoutTests:

* fast/canvas/webgl/constants.html:
* js/script-tests/static-put-in-prototype-chain.js: Removed.
* js/static-put-in-prototype-chain-expected.txt: Removed.
* js/static-put-in-prototype-chain.html: Removed.

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

7 years agoReplace LayoutUnit() calls to a more descriptive LayoutUnit::fromPixel(int).
zalan@apple.com [Sat, 25 Jan 2014 00:21:59 +0000 (00:21 +0000)]
Replace LayoutUnit() calls to a more descriptive LayoutUnit::fromPixel(int).
https://bugs.webkit.org/show_bug.cgi?id=127580

Reviewed by Simon Fraser.

LayoutUnit(1) statement is ambiguous. While it is intended to set one (CSS) pixel, it
could be interpreted as 1 layout unit (1/64th of a CSS pixel atm).

No change in behavior.

* inspector/InspectorOverlay.cpp:
(WebCore::buildObjectForRegionHighlight):
* rendering/FloatingObjects.cpp:
(WebCore::ComputeFloatOffsetForFloatLayoutAdapter<FloatTypeValue>::heightRemaining):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutShapeInsideInfo):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::collapseMargins):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::mainAxisContentExtent):
(WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
(WebCore::RenderFlexibleBox::alignChildren):
* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::addForcedRegionBreak):
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::heightAdjustedForSetOffset):
(WebCore::RenderMultiColumnSet::calculateBalancedHeight):

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

7 years agoPrepare scrolling tree to handle > 1 scrolling node
simon.fraser@apple.com [Sat, 25 Jan 2014 00:04:18 +0000 (00:04 +0000)]
Prepare scrolling tree to handle > 1 scrolling node
https://bugs.webkit.org/show_bug.cgi?id=127590

Source/WebCore:

Reviewed by Tim Horton.

Clean up the code path called after the ScrollingTree has scrolled a node,
to prepare for multiple scrolling nodes.

Change "updateMainFrameScrollPosition" terminology to "updateScrollPositionAfterAsyncScroll",
and pass along the ScrollingNodeID that scrolled.

Move updateMainFrameScrollPosition-related code from ScrollingCoordinator to
AsyncScrollingCoordinator, since this sync-up is only necessary when doing
async scrolling.

* WebCore.exp.in:
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::AsyncScrollingCoordinator):
(WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
(WebCore::AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll):
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScrollTimerFired):
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
* page/scrolling/AsyncScrollingCoordinator.h:
(WebCore::AsyncScrollingCoordinator::ScheduledScrollUpdate::ScheduledScrollUpdate):
(WebCore::AsyncScrollingCoordinator::ScheduledScrollUpdate::matchesUpdateType):
Package up the data related to a scheduled scroll into a ScheduledScrollUpdate struct,
for easier comparison and cleaner code.
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::ScrollingCoordinator):
* page/scrolling/ScrollingCoordinator.h:
* page/scrolling/ScrollingTree.h:
* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):
* page/scrolling/ThreadedScrollingTree.h:
* page/scrolling/ios/ScrollingTreeIOS.cpp:
(WebCore::ScrollingTreeIOS::scrollingTreeNodeDidScroll):
* page/scrolling/ios/ScrollingTreeIOS.h:
* page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm:
(WebCore::ScrollingTreeScrollingNodeIOS::setScrollPositionWithoutContentEdgeConstraints):
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::setScrollPositionWithoutContentEdgeConstraints):

Source/WebKit2:

Reviewed by Tim Horton.

Clean up the code path called after the ScrollingTree has scrolled a node,
to prepare for multiple scrolling nodes.

Change "updateMainFrameScrollPosition" terminology to "updateScrollPositionAfterAsyncScroll",
and pass along the ScrollingNodeID that scrolled.

* UIProcess/Scrolling/RemoteScrollingTree.cpp:
(WebKit::RemoteScrollingTree::scrollingTreeNodeDidScroll):
* UIProcess/Scrolling/RemoteScrollingTree.h:
* WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
(WebKit::RemoteScrollingCoordinator::scrollPositionChangedForNode):

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

7 years agoASSERT(!m_markedSpace.m_currentDelayedReleaseScope) reloading page in inspector.
mark.lam@apple.com [Fri, 24 Jan 2014 23:44:50 +0000 (23:44 +0000)]
ASSERT(!m_markedSpace.m_currentDelayedReleaseScope) reloading page in inspector.
<https://webkit.org/b/127582>

Reviewed by Mark Hahnenberg.

Source/JavaScriptCore:

1. We should not enter a HeapIterationScope when we iterate the CodeBlocks.
   Apparently, iterating the CodeBlocks does not count as heap iteration.

2. If we're detaching the debugger due to the JSGlobalObject destructing,
   then we don't need to clear the debugger requests in the associated
   CodeBlocks. The JSGlobalObject destructing would mean that those
   CodeBlocks would be destructing too, and it may not be safe to access
   them anyway at this point.

The assertion failure is because we had entered a HeapIterationScope
while the JSGlobalObject is destructing, which in turn means that GC
sweeping is in progress. It's not legal to iterate the heap while the GC
is sweeping. Once we fixed the above 2 issues, we will no longer have
the conditions that manifests this assertion failure.

* debugger/Debugger.cpp:
(JSC::Debugger::detach):
(JSC::Debugger::setSteppingMode):
(JSC::Debugger::toggleBreakpoint):
(JSC::Debugger::clearBreakpoints):
(JSC::Debugger::clearDebuggerRequests):
* debugger/Debugger.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::~JSGlobalObject):

Source/WebCore:

No new tests.

* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::attachDebugger):
* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::detachDebugger):
- Adding reasons for detaching a globalObject from the debugger.

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

7 years agoUnreviewed. Add Philip Jägenstedt to watch and contributor lists.
eric.carlson@apple.com [Fri, 24 Jan 2014 23:38:27 +0000 (23:38 +0000)]
Unreviewed. Add Philip Jägenstedt to watch and contributor lists.

* Scripts/webkitpy/common/config/contributors.json:
* Scripts/webkitpy/common/config/watchlist:

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

7 years agoSubpixel rendering: Make PaintInfo layout unit aware.
zalan@apple.com [Fri, 24 Jan 2014 23:35:07 +0000 (23:35 +0000)]
Subpixel rendering: Make PaintInfo layout unit aware.
https://bugs.webkit.org/show_bug.cgi?id=127562

Reviewed by Simon Fraser.

Replace PaintInfo's IntRect with LayoutRect to be able to render to
subpixel positions.

No functional changes.

* platform/graphics/LayoutRect.h:
* rendering/PaintInfo.h:
(WebCore::PaintInfo::PaintInfo):
(WebCore::PaintInfo::applyTransform):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paint):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* rendering/RenderLayer.cpp:
(WebCore::cornerRect):
(WebCore::RenderLayer::scrollCornerRect):
(WebCore::resizerCornerRect):
(WebCore::RenderLayer::scrollCornerAndResizerRect):
(WebCore::RenderLayer::horizontalScrollbarStart):
(WebCore::RenderLayer::drawPlatformResizerImage):
(WebCore::RenderLayer::paintResizer):
(WebCore::RenderLayer::hitTestOverflowControls):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::paintContents):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::paintScrollbar):
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::paintContents):
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::fillWithExtensionGlyph):
* rendering/svg/SVGRenderingContext.h:

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

7 years agohttps://bugs.webkit.org/show_bug.cgi?id=127583
simon.fraser@apple.com [Fri, 24 Jan 2014 23:29:29 +0000 (23:29 +0000)]
https://bugs.webkit.org/show_bug.cgi?id=127583

Reviewed by Tim Horton.

handleWheelEventPhase() doesn't make any sense for iOS, which
has no wheel events.

Source/WebCore:

* page/scrolling/ScrollingTree.h:
* page/scrolling/ThreadedScrollingTree.cpp:
* page/scrolling/ThreadedScrollingTree.h:
* page/scrolling/ios/ScrollingTreeIOS.h:

Source/WebKit2:

* UIProcess/Scrolling/RemoteScrollingTree.cpp:
* UIProcess/Scrolling/RemoteScrollingTree.h:

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

7 years agoPush a custom fixed position rect down to the WebProcess in iOS WK2
simon.fraser@apple.com [Fri, 24 Jan 2014 23:29:26 +0000 (23:29 +0000)]
Push a custom fixed position rect down to the WebProcess in iOS WK2
https://bugs.webkit.org/show_bug.cgi?id=127573

Reviewed by Tim Horton.

Make it possible for WKContentView to specify a custom rect
used to layout fixed position elements on iOS.

This is computed in WKContentView, and pushed down
through the RemoteLayerTreeDrawingArea, and eventually
pushed onto FrameView.

* UIProcess/API/ios/WKContentView.mm:
(-[WKContentView fixedPositionRectFromExposedRect:scale:]):
(-[WKContentView _updateFixedPositionRect]):
(-[WKContentView didFinishScrollTo:]):
(-[WKContentView didZoomToScale:]):
* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::setCustomFixedPositionRect):
* UIProcess/DrawingAreaProxy.h:
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/DrawingArea.messages.in:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::setCustomFixedPositionRect):

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

7 years agoMake WebKitTestRunner work with iOS
dfarler@apple.com [Fri, 24 Jan 2014 23:20:08 +0000 (23:20 +0000)]
Make WebKitTestRunner work with iOS
https://bugs.webkit.org/show_bug.cgi?id=127448

Reviewed by Simon Fraser.

Combined patch from Simon below with some additional xcconfig cleanups,
rebasing and stubbing out a couple of new functions that popped up
since then.

2013-12-03  Simon Fraser  <simon.fraser@apple.com>

        <rdar://problem/15515469> Get WebKitTestRunner working on iOS

        Get WebKitTestRunner limping on iOS. Main parts:
        - Stub out lots of accessibility-related functions.
        - Stub out EventSender
        - Create target to make a bundled app that runs in the simulator,
          and copy the injected bundle library into it.
        - Make a UIWindow and WKView to load tests in

        It runs, load tests, and dumps results to output. More work will be
        required once we can execute it via the webkitpy scripts.

* WebKitTestRunner/Configurations/Base.xcconfig:
* WebKitTestRunner/Configurations/InjectedBundle.xcconfig:
* WebKitTestRunner/Configurations/WebKitTestRunner.xcconfig:
* WebKitTestRunner/InjectedBundle/EventSendingController.cpp:
* WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm: Added.
(WTR::AccessibilityController::addNotificationListener):
(WTR::AccessibilityController::removeNotificationListener):
(WTR::AccessibilityController::platformName):
(WTR::AccessibilityController::logAccessibilityEvents):
(WTR::AccessibilityController::resetToConsistentState):
(WTR::findAccessibleObjectById):
(WTR::AccessibilityController::accessibleElementById):
* WebKitTestRunner/InjectedBundle/ios/AccessibilityNotificationHandler.h: Added.
* WebKitTestRunner/InjectedBundle/ios/AccessibilityTextMarkerIOS.mm: Copied from Tools/WebKitTestRunner/WebKitTestRunnerPrefix.h.
(WTR::AccessibilityTextMarker::isEqual):
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: Added.
(WTR::AccessibilityUIElement::AccessibilityUIElement):
(WTR::AccessibilityUIElement::~AccessibilityUIElement):
(WTR::AccessibilityUIElement::isEqual):
(WTR::AccessibilityUIElement::getLinkedUIElements):
(WTR::AccessibilityUIElement::getDocumentLinks):
(WTR::AccessibilityUIElement::getChildren):
(WTR::AccessibilityUIElement::getChildrenWithRange):
(WTR::AccessibilityUIElement::childrenCount):
(WTR::AccessibilityUIElement::elementAtPoint):
(WTR::AccessibilityUIElement::indexOfChild):
(WTR::AccessibilityUIElement::childAtIndex):
(WTR::AccessibilityUIElement::linkedUIElementAtIndex):
(WTR::AccessibilityUIElement::ariaOwnsElementAtIndex):
(WTR::AccessibilityUIElement::ariaFlowToElementAtIndex):
(WTR::AccessibilityUIElement::disclosedRowAtIndex):
(WTR::AccessibilityUIElement::rowAtIndex):
(WTR::AccessibilityUIElement::selectedChildAtIndex):
(WTR::AccessibilityUIElement::selectedChildrenCount):
(WTR::AccessibilityUIElement::selectedRowAtIndex):
(WTR::AccessibilityUIElement::titleUIElement):
(WTR::AccessibilityUIElement::parentElement):
(WTR::AccessibilityUIElement::disclosedByRow):
(WTR::AccessibilityUIElement::attributesOfLinkedUIElements):
(WTR::AccessibilityUIElement::attributesOfDocumentLinks):
(WTR::AccessibilityUIElement::attributesOfChildren):
(WTR::AccessibilityUIElement::allAttributes):
(WTR::AccessibilityUIElement::stringAttributeValue):
(WTR::AccessibilityUIElement::numberAttributeValue):
(WTR::AccessibilityUIElement::uiElementArrayAttributeValue):
(WTR::AccessibilityUIElement::uiElementAttributeValue):
(WTR::AccessibilityUIElement::boolAttributeValue):
(WTR::AccessibilityUIElement::isAttributeSettable):
(WTR::AccessibilityUIElement::isAttributeSupported):
(WTR::AccessibilityUIElement::parameterizedAttributeNames):
(WTR::AccessibilityUIElement::role):
(WTR::AccessibilityUIElement::subrole):
(WTR::AccessibilityUIElement::roleDescription):
(WTR::AccessibilityUIElement::title):
(WTR::AccessibilityUIElement::description):
(WTR::AccessibilityUIElement::orientation):
(WTR::AccessibilityUIElement::stringValue):
(WTR::AccessibilityUIElement::language):
(WTR::AccessibilityUIElement::helpText):
(WTR::AccessibilityUIElement::x):
(WTR::AccessibilityUIElement::y):
(WTR::AccessibilityUIElement::width):
(WTR::AccessibilityUIElement::height):
(WTR::AccessibilityUIElement::clickPointX):
(WTR::AccessibilityUIElement::clickPointY):
(WTR::AccessibilityUIElement::intValue):
(WTR::AccessibilityUIElement::minValue):
(WTR::AccessibilityUIElement::maxValue):
(WTR::AccessibilityUIElement::valueDescription):
(WTR::AccessibilityUIElement::insertionPointLineNumber):
(WTR::AccessibilityUIElement::isPressActionSupported):
(WTR::AccessibilityUIElement::isIncrementActionSupported):
(WTR::AccessibilityUIElement::isDecrementActionSupported):
(WTR::AccessibilityUIElement::isEnabled):
(WTR::AccessibilityUIElement::isRequired):
(WTR::AccessibilityUIElement::isFocused):
(WTR::AccessibilityUIElement::isSelected):
(WTR::AccessibilityUIElement::isSelectedOptionActive):
(WTR::AccessibilityUIElement::isIndeterminate):
(WTR::AccessibilityUIElement::isExpanded):
(WTR::AccessibilityUIElement::isChecked):
(WTR::AccessibilityUIElement::hierarchicalLevel):
(WTR::AccessibilityUIElement::classList):
(WTR::AccessibilityUIElement::speak):
(WTR::AccessibilityUIElement::ariaIsGrabbed):
(WTR::AccessibilityUIElement::ariaDropEffects):
(WTR::AccessibilityUIElement::lineForIndex):
(WTR::AccessibilityUIElement::rangeForLine):
(WTR::AccessibilityUIElement::rangeForPosition):
(WTR::AccessibilityUIElement::boundsForRange):
(WTR::AccessibilityUIElement::stringForRange):
(WTR::AccessibilityUIElement::attributedStringForRange):
(WTR::AccessibilityUIElement::attributedStringRangeIsMisspelled):
(WTR::uiElementCountForSearchPredicate):
(WTR::AccessibilityUIElement::uiElementCountForSearchPredicate):
(WTR::AccessibilityUIElement::uiElementForSearchPredicate):
(WTR::AccessibilityUIElement::attributesOfColumnHeaders):
(WTR::AccessibilityUIElement::attributesOfRowHeaders):
(WTR::AccessibilityUIElement::attributesOfColumns):
(WTR::AccessibilityUIElement::attributesOfRows):
(WTR::AccessibilityUIElement::attributesOfVisibleCells):
(WTR::AccessibilityUIElement::attributesOfHeader):
(WTR::AccessibilityUIElement::rowCount):
(WTR::AccessibilityUIElement::columnCount):
(WTR::AccessibilityUIElement::indexInTable):
(WTR::AccessibilityUIElement::rowIndexRange):
(WTR::AccessibilityUIElement::columnIndexRange):
(WTR::AccessibilityUIElement::cellForColumnAndRow):
(WTR::AccessibilityUIElement::horizontalScrollbar):
(WTR::AccessibilityUIElement::verticalScrollbar):
(WTR::AccessibilityUIElement::scrollToMakeVisible):
(WTR::AccessibilityUIElement::selectedTextRange):
(WTR::AccessibilityUIElement::setSelectedTextRange):
(WTR::AccessibilityUIElement::increment):
(WTR::AccessibilityUIElement::decrement):
(WTR::AccessibilityUIElement::showMenu):
(WTR::AccessibilityUIElement::press):
(WTR::AccessibilityUIElement::setSelectedChild):
(WTR::AccessibilityUIElement::accessibilityValue):
(WTR::AccessibilityUIElement::documentEncoding):
(WTR::AccessibilityUIElement::documentURI):
(WTR::AccessibilityUIElement::url):
(WTR::AccessibilityUIElement::addNotificationListener):
(WTR::AccessibilityUIElement::removeNotificationListener):
(WTR::AccessibilityUIElement::isFocusable):
(WTR::AccessibilityUIElement::isSelectable):
(WTR::AccessibilityUIElement::isMultiSelectable):
(WTR::AccessibilityUIElement::isVisible):
(WTR::AccessibilityUIElement::isOffScreen):
(WTR::AccessibilityUIElement::isCollapsed):
(WTR::AccessibilityUIElement::isIgnored):
(WTR::AccessibilityUIElement::hasPopup):
(WTR::AccessibilityUIElement::takeFocus):
(WTR::AccessibilityUIElement::takeSelection):
(WTR::AccessibilityUIElement::addSelection):
(WTR::AccessibilityUIElement::removeSelection):
(WTR::AccessibilityUIElement::textMarkerRangeForElement):
(WTR::AccessibilityUIElement::textMarkerRangeLength):
(WTR::AccessibilityUIElement::previousTextMarker):
(WTR::AccessibilityUIElement::nextTextMarker):
(WTR::AccessibilityUIElement::stringForTextMarkerRange):
(WTR::AccessibilityUIElement::textMarkerRangeForMarkers):
(WTR::AccessibilityUIElement::startTextMarkerForTextMarkerRange):
(WTR::AccessibilityUIElement::endTextMarkerForTextMarkerRange):
(WTR::AccessibilityUIElement::endTextMarkerForBounds):
(WTR::AccessibilityUIElement::startTextMarkerForBounds):
(WTR::AccessibilityUIElement::textMarkerForPoint):
(WTR::AccessibilityUIElement::accessibilityElementForTextMarker):
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeContainsAttribute):
(WTR::AccessibilityUIElement::indexForTextMarker):
(WTR::AccessibilityUIElement::isTextMarkerValid):
(WTR::AccessibilityUIElement::textMarkerForIndex):
(WTR::AccessibilityUIElement::startTextMarker):
(WTR::AccessibilityUIElement::endTextMarker):
(WTR::AccessibilityUIElement::mathPostscriptsDescription):
(WTR::AccessibilityUIElement::mathPrescriptsDescription):
(WTR::AccessibilityUIElement::pathDescription):
(WTR::AccessibilityUIElement::supportedActions):
* WebKitTestRunner/InjectedBundle/ios/ActivateFontsIOS.mm: Copied from Tools/WebKitTestRunner/WebKitTestRunnerPrefix.h.
(WTR::activateFonts):
* WebKitTestRunner/InjectedBundle/ios/EventSenderProxyIOS.mm: Added.
(WTR::EventSenderProxy::EventSenderProxy):
(WTR::EventSenderProxy::~EventSenderProxy):
(WTR::EventSenderProxy::updateClickCountForButton):
(WTR::EventSenderProxy::mouseDown):
(WTR::EventSenderProxy::mouseUp):
(WTR::EventSenderProxy::mouseMoveTo):
(WTR::EventSenderProxy::leapForward):
(WTR::EventSenderProxy::keyDown):
(WTR::EventSenderProxy::mouseScrollBy):
(WTR::EventSenderProxy::continuousMouseScrollBy):
(WTR::EventSenderProxy::addTouchPoint):
(WTR::EventSenderProxy::updateTouchPoint):
(WTR::EventSenderProxy::setTouchModifier):
(WTR::EventSenderProxy::setTouchPointRadius):
(WTR::EventSenderProxy::touchStart):
(WTR::EventSenderProxy::touchMove):
(WTR::EventSenderProxy::touchEnd):
(WTR::EventSenderProxy::touchCancel):
(WTR::EventSenderProxy::clearTouchPoints):
(WTR::EventSenderProxy::releaseTouchPoint):
(WTR::EventSenderProxy::cancelTouchPoint):
* WebKitTestRunner/InjectedBundle/ios/InjectedBundleIOS.mm: Copied from Tools/WebKitTestRunner/WebKitTestRunnerPrefix.h.
(WTR::InjectedBundle::platformInitialize):
* WebKitTestRunner/InjectedBundle/ios/InjectedBundlePageIOS.mm: Copied from Tools/WebKitTestRunner/WebKitTestRunnerPrefix.h.
(WTR::InjectedBundlePage::platformDidStartProvisionalLoadForFrame):
* WebKitTestRunner/Makefile:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::initialize):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::invoke):
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
* WebKitTestRunner/WebKitTestRunnerApp/AppDelegate.h: Added.
* WebKitTestRunner/WebKitTestRunnerApp/AppDelegate.m: Added.
(-[AppDelegate application:didFinishLaunchingWithOptions:]):
(-[AppDelegate applicationWillResignActive:]):
(-[AppDelegate applicationDidEnterBackground:]):
(-[AppDelegate applicationWillEnterForeground:]):
(-[AppDelegate applicationDidBecomeActive:]):
(-[AppDelegate applicationWillTerminate:]):
* WebKitTestRunner/WebKitTestRunnerApp/Images.xcassets/AppIcon.appiconset/Contents.json: Added.
* WebKitTestRunner/WebKitTestRunnerApp/Images.xcassets/LaunchImage.launchimage/Contents.json: Added.
* WebKitTestRunner/WebKitTestRunnerApp/WebKitTestRunnerApp-Info.plist: Added.
* WebKitTestRunner/WebKitTestRunnerApp/WebKitTestRunnerApp-Prefix.pch: Added.
* WebKitTestRunner/WebKitTestRunnerApp/en.lproj/InfoPlist.strings: Added.
* WebKitTestRunner/WebKitTestRunnerApp/main.m: Added.
(main):
* WebKitTestRunner/WebKitTestRunnerAppTests-Info.plist: Added.
* WebKitTestRunner/WebKitTestRunnerAppTests/WebKitTestRunnerAppTests-Info.plist: Added.
* WebKitTestRunner/WebKitTestRunnerAppTests/WebKitTestRunnerAppTests.m: Added.
(-[WebKitTestRunnerAppTests setUp]):
(-[WebKitTestRunnerAppTests tearDown]):
(-[WebKitTestRunnerAppTests testExample]):
* WebKitTestRunner/WebKitTestRunnerAppTests/en.lproj/InfoPlist.strings: Added.
* WebKitTestRunner/WebKitTestRunnerPrefix.h:
* WebKitTestRunner/cg/TestInvocationCG.cpp:
* WebKitTestRunner/iOS.xcconfig: Added.
* WebKitTestRunner/ios/PlatformWebViewIOS.mm: Added.
(-[TestRunnerWKView initWithFrame:contextRef:pageGroupRef:relatedToPage:useTiledDrawing:]):
(-[TestRunnerWKView _shouldUseTiledDrawingArea]):
(-[WebKitTestRunnerWindow isKeyWindow]):
(-[WebKitTestRunnerWindow setFrameOrigin:]):
(-[WebKitTestRunnerWindow setFrame:]):
(-[WebKitTestRunnerWindow frameRespectingFakeOrigin]):
(-[WebKitTestRunnerWindow backingScaleFactor]):
(WTR::PlatformWebView::PlatformWebView):
(WTR::PlatformWebView::resizeTo):
(WTR::PlatformWebView::~PlatformWebView):
(WTR::PlatformWebView::page):
(WTR::PlatformWebView::focus):
(WTR::PlatformWebView::windowFrame):
(WTR::PlatformWebView::setWindowFrame):
(WTR::PlatformWebView::didInitializeClients):
(WTR::PlatformWebView::addChromeInputField):
(WTR::PlatformWebView::removeChromeInputField):
(WTR::PlatformWebView::makeWebViewFirstResponder):
(WTR::PlatformWebView::windowSnapshotImage):
(WTR::PlatformWebView::viewSupportsOptions):
* WebKitTestRunner/ios/TestControllerIOS.mm: Added.
(WTR::TestController::notifyDone):
(WTR::TestController::platformInitialize):
(WTR::TestController::platformDestroy):
(WTR::TestController::initializeInjectedBundlePath):
(WTR::TestController::initializeTestPluginDirectory):
(WTR::TestController::platformRunUntil):
(WTR::TestController::platformInitializeContext):
(WTR::TestController::runModal):
(WTR::TestController::platformLibraryPathForTesting):
* WebKitTestRunner/ios/WebArchiveDumpSupportIOS.mm: Copied from Tools/WebKitTestRunner/WebKitTestRunnerPrefix.h.
(createCFURLResponseFromResponseData):
(supportedNonImageMIMETypes):
* WebKitTestRunner/ios/mainIOS.mm: Copied from Tools/WebKitTestRunner/WebKitTestRunnerPrefix.h.
(-[WebKitTestRunnerApp _runTestController]):
(-[WebKitTestRunnerApp applicationDidFinishLaunching:]):
(main):

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

7 years agoGet rid of WebLoaderClient
andersca@apple.com [Fri, 24 Jan 2014 23:14:10 +0000 (23:14 +0000)]
Get rid of WebLoaderClient
https://bugs.webkit.org/show_bug.cgi?id=127587

Reviewed by Andreas Kling.

Move WebLoaderClient into WKPage.cpp.

* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(-[WKBrowsingContextController setLoadDelegate:]):
* UIProcess/WebLoaderClient.cpp: Removed.
* UIProcess/WebLoaderClient.h: Removed.
* UIProcess/WebPageProxy.h:
* WebKit2.xcodeproj/project.pbxproj:

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

7 years agoIDB: Support createIndex/deleteIndex
beidson@apple.com [Fri, 24 Jan 2014 23:05:51 +0000 (23:05 +0000)]
IDB: Support createIndex/deleteIndex
<rdar://problem/15779642> and https://bugs.webkit.org/show_bug.cgi?id=127585

Reviewed by Tim Horton.

* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::createIndex):
(WebKit::UniqueIDBDatabase::deleteIndex):
(WebKit::UniqueIDBDatabase::createIndexInBackingStore):
(WebKit::UniqueIDBDatabase::deleteIndexInBackingStore):

* DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteObjectStore): Also drop all associated indexes.
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::createIndex):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteIndex):
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:

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

7 years ago[New Multicolumn] Don't destroy all the renderers when a multi-column block stops...
hyatt@apple.com [Fri, 24 Jan 2014 22:52:41 +0000 (22:52 +0000)]
[New Multicolumn] Don't destroy all the renderers when a multi-column block stops being multi-column (and vice versa)
https://bugs.webkit.org/show_bug.cgi?id=127584

Make the logic for when you need columns and when you don't shared between the
old multi-column code and the new multi-column code. Make sure that the flow thread
and sets get created lazily and destroyed on-demand when whether or not we should
have multiple columns changes.

Reviewed by Beth Dakin.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateLogicalWidthAndColumnWidth):
No longer virtual. The new column code now uses this function too.

(WebCore::RenderBlock::availableLogicalWidth):
Renamed desiredColumnWidth() to computedColumnWidth().

(WebCore::RenderBlock::computeColumnCountAndWidth):
Renamed calcColumnWidth to computeColumnCountAndWidth.

(WebCore::RenderBlock::setComputedColumnCountAndWidth):
Rename setDesiredColumnCountAndWidth to computed.

(WebCore::RenderBlock::computedColumnWidth):
(WebCore::RenderBlock::computedColumnCount):
Renamed desiredColumnWidth/Count to computedColumnWidth/Count and made them virtual.

(WebCore::RenderBlock::updateFirstLetterStyle):
desired -> computed rename.

* rendering/RenderBlock.h:
Renames and made a few functions virtual so that RenderBlockFlow can override.

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::RenderBlockFlow):
Don't create the flow thread at construction time any longer.

(WebCore::RenderBlockFlow::createMultiColumnFlowThread):
(WebCore::RenderBlockFlow::destroyMultiColumnFlowThread):
The methods to create and destroy flow threads. These work at any time now and will
fix up the render tree accordingly.

(WebCore::RenderBlockFlow::setComputedColumnCountAndWidth):
Virtual override that creates/destroys the new multi-column information as needed.

(WebCore::RenderBlockFlow::computedColumnWidth):
(WebCore::RenderBlockFlow::computedColumnCount):
Overrides to return the cached column width and count from the flow thread.

* rendering/RenderBlockFlow.h:
Has overrides of the virtual functions needed to turn multi-column state on/off and
to hand back computed count/width information.

* rendering/RenderMultiColumnFlowThread.cpp:
* rendering/RenderMultiColumnFlowThread.h:
Removed the algorithm to compute column count and width, since this has been combined
with the old multi-column layout code.

* rendering/RenderView.cpp:
(WebCore::RenderView::computeColumnCountAndWidth):
Renamed desired -> computed.

* rendering/RenderView.h:
Renamed desired -> computed.

* style/StyleResolveTree.cpp:
(WebCore::Style::determineChange):
(WebCore::Style::resolveLocal):
(WebCore::Style::resolveTree):
* style/StyleResolveTree.h:
The Settings argument is no longer needed now that we don't destroy and re-create
the renderer for a block flow if it stops being (or becomes) multi-column.

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

7 years agoFix 32-bit build.
andersca@apple.com [Fri, 24 Jan 2014 22:29:03 +0000 (22:29 +0000)]
Fix 32-bit build.

* WebCore.exp.in:

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

7 years ago[GTK] youtube HTML5 videos in fullscreen, after <Esc>, can't go fullscreen again
vjaquez@igalia.com [Fri, 24 Jan 2014 22:05:22 +0000 (22:05 +0000)]
[GTK] youtube HTML5 videos in fullscreen, after <Esc>, can't go fullscreen again
https://bugs.webkit.org/show_bug.cgi?id=127064

When pressing <Esc> or <f> at full screen, the WebView shall emit the
event webkitfullscreenchange, but wk2gtk does not emit it. This is
because the WebView manages directly the exit of the full screen.

With this patch the WebView calls requestExitFullScreen to the full
screen manager, instead of managing directly the exit of the full
screen, and the event webkitfullscreenchange will be dispatched
correctly.

Reviewed by Martin Robinson.

No tests are included because there is a bug in WKTR that prevents the
execution of a test for this patch. See
https://bugs.webkit.org/show_bug.cgi?id=127348

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseKeyPressEvent): Call
webkitWebViewBaseRequestExitFullScreen.
(webkitWebViewBaseRequestExitFullScreen): Added.
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h: Ditto.

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

7 years ago[Win] Convert some NMake files to MSBuild project files
bfulgham@apple.com [Fri, 24 Jan 2014 22:01:10 +0000 (22:01 +0000)]
[Win] Convert some NMake files to MSBuild project files
https://bugs.webkit.org/show_bug.cgi?id=127579

Reviewed by Tim Horton.

../JavaScriptCore:

* JavaScriptCore.vcxproj/JavaScriptCore.make: Removed.
* JavaScriptCore.vcxproj/JavaScriptCore.proj: Added.

../WebCore:

* WebCore.vcxproj/WebCore.make: Removed.
* WebCore.vcxproj/WebCore.proj: Added.

../WTF:

* WTF.vcxproj/WTF.make: Removed.
* WTF.vcxproj/WTF.proj: Added.

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

7 years agoFixed a bad assertion in CodeBlock::removeBreakpoint().
mark.lam@apple.com [Fri, 24 Jan 2014 21:46:25 +0000 (21:46 +0000)]
Fixed a bad assertion in CodeBlock::removeBreakpoint().
<https://webkit.org/b/127581>

Reviewed by Joseph Pecoraro.

* bytecode/CodeBlock.h:
(JSC::CodeBlock::removeBreakpoint):

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

7 years agoiOS build fix after r162710.
timothy_horton@apple.com [Fri, 24 Jan 2014 21:28:25 +0000 (21:28 +0000)]
iOS build fix after r162710.

This is why these sorts of comments are bad.

* UIProcess/WebPageProxy.cpp:

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

7 years agofast/profiler tests ASSERTing after moving recompileAllJSFunctions off a timer
joepeck@webkit.org [Fri, 24 Jan 2014 21:27:42 +0000 (21:27 +0000)]
fast/profiler tests ASSERTing after moving recompileAllJSFunctions off a timer
https://bugs.webkit.org/show_bug.cgi?id=127566

Reviewed by Oliver Hunt.

Source/JavaScriptCore:

Make the VM handle recompilation as soon as possible after it is requested.

* debugger/Debugger.cpp:
(JSC::Debugger::recompileAllJSFunctions):
When in a JavaScript stack, mark for recompilation when possible.

* runtime/VMEntryScope.h:
(JSC::VMEntryScope::setRecompilationNeeded):
* runtime/VMEntryScope.cpp:
(JSC::VMEntryScope::VMEntryScope):
(JSC::VMEntryScope::~VMEntryScope):
Handle recompilation when the top VMEntryScope is popped.
Pass the needs recompilation flag up the stack if needed.

Source/WebCore:

Covered by existing tests.

* testing/Internals.cpp:
(WebCore::Internals::closeDummyInspectorFrontend):
Now that we don't have to fake that this is a page being destroyed to
avoid recompilation. Use the InspectorDestroyed reason.

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

7 years agoUse a side table to map WebPageProxy objects to WKBrowsingContextController objects
andersca@apple.com [Fri, 24 Jan 2014 21:25:23 +0000 (21:25 +0000)]
Use a side table to map WebPageProxy objects to WKBrowsingContextController objects
https://bugs.webkit.org/show_bug.cgi?id=127577

Reviewed by Tim Horton.

* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(browsingContextControllerMap):
(-[WKBrowsingContextController dealloc]):
(-[WKBrowsingContextController _initWithPageRef:]):
(+[WKBrowsingContextController _browsingContextControllerForPageRef:]):
* UIProcess/API/Cocoa/WKBrowsingContextControllerInternal.h:
* UIProcess/WebPageProxy.h:

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

7 years agoGeneric JSObject::put should handle static properties in the classinfo hierarchy
mark.lam@apple.com [Fri, 24 Jan 2014 21:23:17 +0000 (21:23 +0000)]
Generic JSObject::put should handle static properties in the classinfo hierarchy
https://bugs.webkit.org/show_bug.cgi?id=127523

Patch by Oliver Hunt <oliver@apple.com> on 2014-01-24
Reviewed by Geoffrey Garen.

This patch makes JSObject::put correctly call static setters
defined by the ClassInfo.

To make this not clobber performance, the ClassInfo HashTable
now includes a flag to indicate that it contains setters. This
required updating the lut generator so that it tracked (and emitted)
this.

The rest of the change was making a number of the methods take
a VM rather than an ExecState*, so that Structure could set the
getter/setter flags during construction (if necessary).

This also means most objects do not need to perform a lookupPut
manually anymore, so most custom ::put's are no longer needed.
DOMWindow is the only exception as it has interesting security
related semantics.

* create_hash_table:
* interpreter/CallFrame.h:
(JSC::ExecState::arrayConstructorTable):
(JSC::ExecState::arrayPrototypeTable):
(JSC::ExecState::booleanPrototypeTable):
(JSC::ExecState::dataViewTable):
(JSC::ExecState::dateTable):
(JSC::ExecState::dateConstructorTable):
(JSC::ExecState::errorPrototypeTable):
(JSC::ExecState::globalObjectTable):
(JSC::ExecState::jsonTable):
(JSC::ExecState::numberConstructorTable):
(JSC::ExecState::numberPrototypeTable):
(JSC::ExecState::objectConstructorTable):
(JSC::ExecState::privateNamePrototypeTable):
(JSC::ExecState::regExpTable):
(JSC::ExecState::regExpConstructorTable):
(JSC::ExecState::regExpPrototypeTable):
(JSC::ExecState::stringConstructorTable):
(JSC::ExecState::promisePrototypeTable):
(JSC::ExecState::promiseConstructorTable):
* runtime/ArrayConstructor.cpp:
(JSC::ArrayConstructor::getOwnPropertySlot):
* runtime/ArrayPrototype.cpp:
(JSC::ArrayPrototype::getOwnPropertySlot):
* runtime/BooleanPrototype.cpp:
(JSC::BooleanPrototype::getOwnPropertySlot):
* runtime/ClassInfo.h:
(JSC::ClassInfo::propHashTable):
* runtime/DateConstructor.cpp:
(JSC::DateConstructor::getOwnPropertySlot):
* runtime/DatePrototype.cpp:
(JSC::DatePrototype::getOwnPropertySlot):
* runtime/ErrorPrototype.cpp:
(JSC::ErrorPrototype::getOwnPropertySlot):
* runtime/JSDataViewPrototype.cpp:
(JSC::JSDataViewPrototype::getOwnPropertySlot):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::getOwnPropertySlot):
* runtime/JSONObject.cpp:
(JSC::JSONObject::getOwnPropertySlot):
* runtime/JSObject.cpp:
(JSC::JSObject::put):
(JSC::JSObject::deleteProperty):
* runtime/JSPromiseConstructor.cpp:
(JSC::JSPromiseConstructor::getOwnPropertySlot):
* runtime/JSPromisePrototype.cpp:
(JSC::JSPromisePrototype::getOwnPropertySlot):
* runtime/Lookup.h:
(JSC::HashTable::copy):
(JSC::putEntry):
(JSC::lookupPut):
* runtime/NamePrototype.cpp:
(JSC::NamePrototype::getOwnPropertySlot):
* runtime/NumberConstructor.cpp:
(JSC::NumberConstructor::getOwnPropertySlot):
* runtime/NumberConstructor.h:
* runtime/NumberPrototype.cpp:
(JSC::NumberPrototype::getOwnPropertySlot):
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::getOwnPropertySlot):
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::getOwnPropertySlot):
* runtime/RegExpConstructor.h:
* runtime/RegExpObject.cpp:
(JSC::RegExpObject::getOwnPropertySlot):
(JSC::RegExpObject::put):
* runtime/RegExpPrototype.cpp:
(JSC::RegExpPrototype::getOwnPropertySlot):
* runtime/StringConstructor.cpp:
(JSC::StringConstructor::getOwnPropertySlot):
* runtime/Structure.cpp:
(JSC::Structure::Structure):
(JSC::Structure::freezeTransition):
(JSC::ClassInfo::hasStaticSetterOrReadonlyProperties):

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

7 years agoGet rid of monotonicallyIncreasingTimeMS and start using std::chrono instead
andersca@apple.com [Fri, 24 Jan 2014 20:41:50 +0000 (20:41 +0000)]
Get rid of monotonicallyIncreasingTimeMS and start using std::chrono instead
https://bugs.webkit.org/show_bug.cgi?id=127571

Reviewed by Antti Koivisto.

Source/WebCore:

WebCore.exp.in:
Update symbols.

* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::implicitClose):
(WebCore::Document::setParsing):
(WebCore::Document::isLayoutTimerActive):
(WebCore::Document::minimumLayoutDelay):
(WebCore::Document::elapsedTime):
(WebCore::Document::write):
(WebCore::Document::styleResolverChanged):
* dom/Document.h:
Use std::chrono instead of doubles for the times and durations.

* fileapi/FileReader.cpp:
(WebCore::FileReader::FileReader):
(WebCore::FileReader::didReceiveData):
* fileapi/FileReader.h:
Switch over to std::chrono.

* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::layoutTimerFired):
(WebCore::FrameView::scheduleRelayout):
(WebCore::FrameView::scheduleRelayoutOfSubtree):
Update for Document::elapsedTime() changes.

* page/Settings.cpp:
(WebCore::Settings::setLayoutInterval):
* page/Settings.h:
(WebCore::Settings::layoutInterval):
Change layoutInterval to be std::chrono::milliseconds instead of int.

* platform/Timer.h:
(WebCore::TimerBase::startOneShot):
Add an overload that takes std::chrono::milliseconds.

Source/WebKit/mac:

* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):
Convert the layout interval to std::chrono::milliseconds.

Source/WTF:

* wtf/Compiler.h:
Add a CONSTEXPR define so we can still use constexpr on compilers that don't support them (MSVC).

* wtf/CurrentTime.h:
Remove monotonicallyIncreasingTimeMS().

* wtf/StdLibExtras.h:
(std::literals::chrono_literals::operator _s):
(std::literals::chrono_literals::operator _ms):
Add _s and _ms literals. Once we switch over to C++14, we can drop them and just use the built-in ones.

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

7 years agoiOS build fix after r162710.
timothy_horton@apple.com [Fri, 24 Jan 2014 20:27:47 +0000 (20:27 +0000)]
iOS build fix after r162710.

* UIProcess/API/ios/PageClientImplIOS.h:
* UIProcess/API/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::takeViewSnapshot):

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

7 years ago[GTK] Put cache files in XDG_CACHE_HOME
commit-queue@webkit.org [Fri, 24 Jan 2014 20:06:19 +0000 (20:06 +0000)]
[GTK] Put cache files in XDG_CACHE_HOME
https://bugs.webkit.org/show_bug.cgi?id=123458

Patch by Enrique Ocaña González <eocanha@igalia.com> on 2014-01-24
Reviewed by Martin Robinson.

Source/WebKit/gtk:

* webkit/webkitglobals.cpp:
(webkitInit):
* webkit/webkiticondatabase.cpp:

Source/WebKit2:

* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::WebContext::platformDefaultIconDatabasePath):

Tools:

* GtkLauncher/main.c:
(createBrowser):

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

7 years agoGeneric JSObject::put should handle static properties in the classinfo hierarchy
oliver@apple.com [Fri, 24 Jan 2014 20:03:34 +0000 (20:03 +0000)]
Generic JSObject::put should handle static properties in the classinfo hierarchy
https://bugs.webkit.org/show_bug.cgi?id=127523

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

This patch makes JSObject::put correctly call static setters
defined by the ClassInfo.

To make this not clobber performance, the ClassInfo HashTable
now includes a flag to indicate that it contains setters. This
required updating the lut generator so that it tracked (and emitted)
this.

The rest of the change was making a number of the methods take
a VM rather than an ExecState*, so that Structure could set the
getter/setter flags during construction (if necessary).

This also means most objects do not need to perform a lookupPut
manually anymore, so most custom ::put's are no longer needed.
DOMWindow is the only exception as it has interesting security
related semantics.

* create_hash_table:
* interpreter/CallFrame.h:
(JSC::ExecState::arrayConstructorTable):
(JSC::ExecState::arrayPrototypeTable):
(JSC::ExecState::booleanPrototypeTable):
(JSC::ExecState::dataViewTable):
(JSC::ExecState::dateTable):
(JSC::ExecState::dateConstructorTable):
(JSC::ExecState::errorPrototypeTable):
(JSC::ExecState::globalObjectTable):
(JSC::ExecState::jsonTable):
(JSC::ExecState::numberConstructorTable):
(JSC::ExecState::numberPrototypeTable):
(JSC::ExecState::objectConstructorTable):
(JSC::ExecState::privateNamePrototypeTable):
(JSC::ExecState::regExpTable):
(JSC::ExecState::regExpConstructorTable):
(JSC::ExecState::regExpPrototypeTable):
(JSC::ExecState::stringConstructorTable):
(JSC::ExecState::promisePrototypeTable):
(JSC::ExecState::promiseConstructorTable):
* runtime/ArrayConstructor.cpp:
(JSC::ArrayConstructor::getOwnPropertySlot):
* runtime/ArrayPrototype.cpp:
(JSC::ArrayPrototype::getOwnPropertySlot):
* runtime/BooleanPrototype.cpp:
(JSC::BooleanPrototype::getOwnPropertySlot):
* runtime/ClassInfo.h:
(JSC::ClassInfo::propHashTable):
* runtime/DateConstructor.cpp:
(JSC::DateConstructor::getOwnPropertySlot):
* runtime/DatePrototype.cpp:
(JSC::DatePrototype::getOwnPropertySlot):
* runtime/ErrorPrototype.cpp:
(JSC::ErrorPrototype::getOwnPropertySlot):
* runtime/JSDataViewPrototype.cpp:
(JSC::JSDataViewPrototype::getOwnPropertySlot):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::getOwnPropertySlot):
* runtime/JSONObject.cpp:
(JSC::JSONObject::getOwnPropertySlot):
* runtime/JSObject.cpp:
(JSC::JSObject::put):
(JSC::JSObject::deleteProperty):
* runtime/JSPromiseConstructor.cpp:
(JSC::JSPromiseConstructor::getOwnPropertySlot):
* runtime/JSPromisePrototype.cpp:
(JSC::JSPromisePrototype::getOwnPropertySlot):
* runtime/Lookup.h:
(JSC::HashTable::copy):
(JSC::putEntry):
(JSC::lookupPut):
* runtime/NamePrototype.cpp:
(JSC::NamePrototype::getOwnPropertySlot):
* runtime/NumberConstructor.cpp:
(JSC::NumberConstructor::getOwnPropertySlot):
* runtime/NumberConstructor.h:
* runtime/NumberPrototype.cpp:
(JSC::NumberPrototype::getOwnPropertySlot):
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::getOwnPropertySlot):
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::getOwnPropertySlot):
* runtime/RegExpConstructor.h:
* runtime/RegExpObject.cpp:
(JSC::RegExpObject::getOwnPropertySlot):
(JSC::RegExpObject::put):
* runtime/RegExpPrototype.cpp:
(JSC::RegExpPrototype::getOwnPropertySlot):
* runtime/StringConstructor.cpp:
(JSC::StringConstructor::getOwnPropertySlot):
* runtime/Structure.cpp:
(JSC::Structure::Structure):
(JSC::Structure::freezeTransition):
(JSC::ClassInfo::hasStaticSetterOrReadonlyProperties):

Source/WebCore:

Update the bindings generator to emit the flag indicating the presence
of setters, and remove the many (now unnecessary) put overrides.
Tested with run-jsc-benchmarks and shows neutral performance. A few of the
micro benchmarks actually get a significant performance increase which
is nice.

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::put):
    We still need a custom call to lookupPut here in order
    to get the magic security semantics of the window object.
* bindings/scripts/CodeGeneratorJS.pm:
(hashTableAccessor):
(prototypeHashTableAccessor):
(constructorHashTableAccessor):
(GenerateImplementation):
(GenerateHashTable):
(GenerateConstructorHelperMethods):

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::put):
* bindings/scripts/CodeGeneratorJS.pm:
(hashTableAccessor):
(prototypeHashTableAccessor):
(constructorHashTableAccessor):
(InstanceOverridesPutImplementation):
(InstanceOverridesPutDeclaration):
(GenerateHeader):
(GenerateImplementation):
(GenerateHashTable):
(GenerateConstructorHelperMethods):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestException.cpp:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterface::put):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
* bindings/scripts/test/JS/JSTestNode.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.h:
* bindings/scripts/test/JS/JSattribute.cpp:
* bindings/scripts/test/JS/JSreadonly.cpp:
* html/canvas/WebGLRenderingContext.idl:
  Remove bogus attribute, as it has never been in the spec and should not
  have been added.

LayoutTests:

Yay tests!

* fast/canvas/webgl/constants.html:
  Remove incorrect constant
* js/script-tests/static-put-in-prototype-chain.js: Added.
* js/static-put-in-prototype-chain-expected.txt: Added.
* js/static-put-in-prototype-chain.html: Added.

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

7 years ago[New Multicolumn] Eliminate RenderMultiColumnBlock
hyatt@apple.com [Fri, 24 Jan 2014 19:55:33 +0000 (19:55 +0000)]
[New Multicolumn] Eliminate RenderMultiColumnBlock
https://bugs.webkit.org/show_bug.cgi?id=127565

Reviewed by Antti Koivisto.

This patch eliminates RenderMultiColumnBlock and folds all of its remaining code
back into RenderBlockFlow. This allows all block flows to support multi-column
layout, including table cells, list items, and the RenderView itself.

* CMakeLists.txt:
* WebCore.order:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
Remove RenderMultiColumnBlock from the makefiles.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::adjustIntrinsicLogicalWidthsForColumns):
Tweak the comment, since it was no longer accurate.

* rendering/RenderBlock.h:
Move some functions down into RenderBlockFlow.

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::RenderBlockFlow):
(WebCore::RenderBlockFlow::createMultiColumnFlowThreadIfNeeded):
(WebCore::RenderBlockFlow::styleDidChange):
(WebCore::RenderBlockFlow::relayoutForPagination):
(WebCore::RenderBlockFlow::layoutSpecialExcludedChild):
(WebCore::RenderBlockFlow::updateLogicalWidthAndColumnWidth):
(WebCore::RenderBlockFlow::addChild):
(WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
 * rendering/RenderBlockFlow.h:
 Move a bunch of functions from RenderMultiColumnBlock up into RenderBlockFlow.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::isUnsplittableForPagination):
Calls isMultiColumnBlockFlow() now instead of testing for a specific renderer type.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::createFor):
Remove the multicolumn block creation code, since we always make a block flow now.

* rendering/RenderMultiColumnBlock.cpp: Removed.
* rendering/RenderMultiColumnBlock.h: Removed.
Nuke the files.

* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::initialLogicalWidth):
(WebCore::RenderMultiColumnFlowThread::autoGenerateRegionsToBlockOffset):
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::heightAdjustedForSetOffset):
(WebCore::RenderMultiColumnSet::addForcedBreak):
(WebCore::RenderMultiColumnSet::recalculateBalancedHeight):
(WebCore::RenderMultiColumnSet::updateLogicalWidth):
(WebCore::RenderMultiColumnSet::prepareForLayout):
(WebCore::RenderMultiColumnSet::columnGap):
(WebCore::RenderMultiColumnSet::paintColumnRules):
Change all of the functions in the multicolumnset and multicolumnflowthread classes
to cast the parent to a RenderBlockFlow now instead of a RenderMultiColumnBlock.
Change the code to call through to multiColumnFlowThread() for column-specific information
for that parent block.

* rendering/RenderObject.h:
(WebCore::RenderObject::isMultiColumnBlockFlow):
Remove isRenderMultiColumnBlock() and replace with isMultiColumnBlockFlow().

* rendering/RenderingAllInOne.cpp:
Remove RenderMultiColumnBlock include.

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

7 years agoRemoving the need for Debugger* and m_shouldPause op_debug check.
mark.lam@apple.com [Fri, 24 Jan 2014 19:07:31 +0000 (19:07 +0000)]
Removing the need for Debugger* and m_shouldPause op_debug check.
<https://webkit.org/b/127532>

Reviewed by Geoffrey Garen.

This patch replaces the checking of the Debugger::m_shouldPause flag
with a procedure to set a SteppingMode flag on all CodeBlocks under
the management of the debugger. This simplifies the op_debug checking
logic in all the execution engines.

* bytecode/CodeBlock.cpp:
* bytecode/CodeBlock.h:
(JSC::CodeBlock::hasDebuggerRequests):
(JSC::CodeBlock::debuggerRequestsAddress):
(JSC::CodeBlock::setSteppingMode):
(JSC::CodeBlock::clearDebuggerRequests):
- CodeBlock::m_debuggerRequests is a union of m_numBreakpoints and the
  new m_steppingMode. The debugger can add/remove breakpoints to the
  CodeBlock as well as set the stepping mode. By having
  m_debuggerRequests as a union of the 2 bit fields, the op_debug code
  can now check if any of the 2 requests made on the CodeBlock is still
  in effect just by testing a single int.

* debugger/Debugger.cpp:
(JSC::Debugger::Debugger):
(JSC::Debugger::detach):
- This was bug from before where I forgot to clear the CodeBlock
  breakpoints before detaching. We now take care of it by clearing all
  debugger requests made to the CodeBlock.

(JSC::Debugger::SetSteppingModeFunctor::SetSteppingModeFunctor):
(JSC::Debugger::SetSteppingModeFunctor::operator()):
(JSC::Debugger::setSteppingMode):
(JSC::Debugger::ClearCodeBlockDebuggerRequestsFunctor::ClearCodeBlockDebuggerRequestsFunctor):
(JSC::Debugger::ClearCodeBlockDebuggerRequestsFunctor::operator()):
(JSC::Debugger::clearBreakpoints):

(JSC::Debugger::ClearDebuggerRequestsFunctor::ClearDebuggerRequestsFunctor):
(JSC::Debugger::ClearDebuggerRequestsFunctor::operator()):
(JSC::Debugger::clearDebuggerRequests):
- We need a distinct clearDebuggerRequests() from clearBreakpoints()
  because:
  1. When we detach a globalObject, we only want to clear the debugger
     requests in CodeBlocks from that global.
  2. Clearing the debugger requests in the CodeBlocks is not the same
     as clearing the breakpoints. The breakpoints are still in effect
     for the next time a globalObject is attached, or for other
     globalObjects that are still attached.

(JSC::Debugger::setPauseOnNextStatement):
(JSC::Debugger::breakProgram):
(JSC::Debugger::stepIntoStatement):
(JSC::Debugger::updateCallFrameAndPauseIfNeeded):
(JSC::Debugger::pauseIfNeeded):
(JSC::Debugger::exception):
(JSC::Debugger::willExecuteProgram):
(JSC::Debugger::didReachBreakpoint):
* debugger/Debugger.h:
- We're always going to support the debugger. So, there's no longer
  a need to check ENABLE(JAVASCRIPT_DEBUGGER). Removed the unneeded code.

* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::debug):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_debug):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_debug):
* llint/LowLevelInterpreter.asm:
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::setDebugger):

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

7 years agoWebKit2 View Gestures (Swipe): Add a simple cache of view snapshots
timothy_horton@apple.com [Fri, 24 Jan 2014 18:56:23 +0000 (18:56 +0000)]
WebKit2 View Gestures (Swipe): Add a simple cache of view snapshots
https://bugs.webkit.org/show_bug.cgi?id=127438

Reviewed by Sam Weinig.

Add a cache of bitmap snapshots of the WKView, taken via OS X's window server
snapshotting mechanism. For now, we store all snapshots; refinements to the
caching strategy (or really having one at all) will come in future patches.

Snapshots are stored in a side map, with a UUID that allows references
to be stored inside WebBackForwardListItem (and serialized along with
the back-forward list when it is copied).

* Shared/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::setSnapshotUUID):
(WebKit::WebBackForwardListItem::snapshotUUID):
* UIProcess/cf/WebBackForwardListCF.cpp:
(WebKit::WebBackForwardList::createCFDictionaryRepresentation):
(WebKit::extractBackForwardListEntriesFromArray):
Store and serialize a UUID along with each back-forward list item which
identifies that item's view snapshot in the ViewSnapshotStore.

* UIProcess/cf/WebPageProxyCF.cpp:
Bump the session state data version, as we changed the WebBackForwardList format.

* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::takeViewSnapshot):

* UIProcess/API/mac/WKView.mm:
(-[WKView _takeViewSnapshot]):
Add _takeViewSnapshot IPI, which is used by ViewSnapshotStore via the PageClient
to take a snapshot of the view.

(-[WKView saveBackForwardSnapshotForCurrentItem]):
Add saveBackForwardSnapshotForCurrentItem SPI, which clients could potentially
use when they know they're about to manipulate the view hierarchy in such a way
that they want the current back-forward item's snapshot to be up to date.

* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::recordNavigationSnapshot):
(WebKit::WebPageProxy::goForward):
(WebKit::WebPageProxy::goBack):
(WebKit::WebPageProxy::goToBackForwardItem):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
Update the current back-forward item's snapshot immediately before navigating.

* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::shouldRecordNavigationSnapshots):
(WebKit::WebPageProxy::setShouldRecordNavigationSnapshots):
Expose the ability to enable taking view snapshots on every navigation.
This is off by default, so we won't be taking any snapshots yet.

* UIProcess/mac/ViewSnapshotStore.h: Added.
(WebKit::ViewSnapshotStore::disableSnapshotting):
(WebKit::ViewSnapshotStore::enableSnapshotting):
* UIProcess/mac/ViewSnapshotStore.mm: Added.
(WebKit::ViewSnapshotStore::ViewSnapshotStore):
(WebKit::ViewSnapshotStore::~ViewSnapshotStore):
(WebKit::ViewSnapshotStore::shared):
(WebKit::ViewSnapshotStore::recordSnapshot):
(WebKit::ViewSnapshotStore::snapshotAndRenderTreeSize):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::takeViewSnapshot):
* WebKit2.xcodeproj/project.pbxproj:

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

7 years agoIDB: support createIndex/deleteIndex messaging
beidson@apple.com [Fri, 24 Jan 2014 18:46:39 +0000 (18:46 +0000)]
IDB: support createIndex/deleteIndex messaging
https://bugs.webkit.org/show_bug.cgi?id=127546

Reviewed by Tim Horton.

Source/WebCore:

* WebCore.exp.in: Export a needed CrossThreadCopier

Source/WebKit2:

Message create/delete requests over to the DatabaseProcess, and listen to its replies:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::createIndex):
(WebKit::WebIDBServerConnection::didCreateIndex):
(WebKit::WebIDBServerConnection::deleteIndex):
(WebKit::WebIDBServerConnection::didDeleteIndex):
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:

Pass create/delete requests to the appropriate unique IDB database:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
(WebKit::DatabaseProcessIDBConnection::createIndex):
(WebKit::DatabaseProcessIDBConnection::deleteIndex):
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:

Message the create/delete request to the database thread for the backing store to handle:
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::didCreateIndex):
(WebKit::UniqueIDBDatabase::didDeleteIndex):
(WebKit::UniqueIDBDatabase::createIndex):
(WebKit::UniqueIDBDatabase::deleteIndex):
(WebKit::UniqueIDBDatabase::createIndexInBackingStore):
(WebKit::UniqueIDBDatabase::deleteIndexInBackingStore):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:

* Scripts/webkit2/messages.py:
(struct_or_class):

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

7 years agoThe CXX_EXPLICIT_CONVERSIONS COMPILER_SUPPORTS macro has been removed, and all
andersca@apple.com [Fri, 24 Jan 2014 18:30:50 +0000 (18:30 +0000)]
The CXX_EXPLICIT_CONVERSIONS COMPILER_SUPPORTS macro has been removed, and all
compilers support explicit conversions now so simply remove the #ifdef.

* wtf/RetainPtr.h:

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

7 years agoSimplify Compiler.h
andersca@apple.com [Fri, 24 Jan 2014 18:20:06 +0000 (18:20 +0000)]
Simplify Compiler.h
https://bugs.webkit.org/show_bug.cgi?id=127491

Patch by Darin Adler <darin@apple.com> on 2014-01-24
Reviewed by Anders Carlsson.

* wtf/Assertions.h: Remove COMPILER_SUPPORTS(CXX_STATIC_ASSERT), since
we now have that for all compilers that can build WebKit.

* wtf/Compiler.h: Removed always true feature flags, including:
COMPILER_SUPPORTS(CXX_VARIADIC_TEMPLATES), COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES),
COMPILER_SUPPORTS(CXX_DELETED_FUNCTIONS), COMPILER_SUPPORTS(CXX_NULLPTR),
COMPILER_SUPPORTS(CXX_EXPLICIT_CONVERSIONS), COMPILER_SUPPORTS(CXX_STATIC_ASSERT),
COMPILER_SUPPORTS(CXX_OVERRIDE_CONTROL), COMPILER_SUPPORTS(CXX_STRONG_ENUMS), and
COMPILER_SUPPORTS(CXX_AUTO_TYPE). Sorted sections alphabetically. Separated out
nested #if and #else into separate checks for greater readability. Removed obsolete
check for COMPILER(RVCT). Removed unused COMPILER(GCCE) detection.

* wtf/RefPtr.h: Remove COMPILER_SUPPORTS(CXX_NULLPTR), since we now have
that for all compilers that can build WebKit.
* wtf/RetainPtr.h: Ditto.

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

7 years agoFix the Windows build after <http://trac.webkit.org/changeset/162704>
dbates@webkit.org [Fri, 24 Jan 2014 18:09:18 +0000 (18:09 +0000)]
Fix the Windows build after <trac.webkit.org/changeset/162704>
(https://bugs.webkit.org/show_bug.cgi?id=127293)

Only include TargetConditionals.h when building on a Darwin-based OS.
Also, check that TARGET_OS_IPHONE is defined before referencing its value
since it will be undefined when building on Windows.

* bindings/objc/PublicDOMInterfaces.h:

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

7 years agoBindings generation tests hit an error trying to include wtf/Platform.h after r161638
dbates@webkit.org [Fri, 24 Jan 2014 17:49:54 +0000 (17:49 +0000)]
Bindings generation tests hit an error trying to include wtf/Platform.h after r161638
https://bugs.webkit.org/show_bug.cgi?id=127293

Reviewed by Alexey Proskuryakov.

Include TargetConditionals.h instead of wtf/Platform.h as the latter isn't available
in the public SDK.

As a side effect of this change, replace usage of PLATFORM(IOS) with TARGET_OS_IPHONE.

* bindings/objc/PublicDOMInterfaces.h:

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

7 years ago[New Multicolumn] Table cells and list items need to work as multicolumn blocks.
hyatt@apple.com [Fri, 24 Jan 2014 17:14:22 +0000 (17:14 +0000)]
[New Multicolumn] Table cells and list items need to work as multicolumn blocks.
https://bugs.webkit.org/show_bug.cgi?id=127365

This patch is a first step towards eliminating RenderMultiColumnBlock and moving
all its functionality into RenderBlockFlow. Doing so will allow table cells, list
items and the RenderView to use the new multi-column layout.

Reviewed by Simon Fraser.

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::setMultiColumnFlowThread):
* rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::RenderBlockFlowRareData::RenderBlockFlowRareData):
(WebCore::RenderBlockFlow::multiColumnFlowThread):
Add the flow thread pointer to the multi-column flow thread to RenderBlockFlow's
rare data. This lets us use only one pointer in the rare data to point to an object
that can hold all of the rest of the multi-column info.

* rendering/RenderMultiColumnBlock.cpp:
(WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
Move the construction of the flow thread to the constructor. This ensures we
never have a null flow thread and lets us avoid having to null check it for
empty multi-column blocks.

(WebCore::RenderMultiColumnBlock::columnHeightAvailable):
(WebCore::RenderMultiColumnBlock::columnWidth):
(WebCore::RenderMultiColumnBlock::columnCount):
(WebCore::RenderMultiColumnBlock::updateLogicalWidthAndColumnWidth):
The above functions now call through to the multi-column flow thread for results.

(WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange):
 Set the column height available on the flow thread.

(WebCore::RenderMultiColumnBlock::relayoutForPagination):
The balancing pass and guard is in the multi-column flow thread now.

(WebCore::RenderMultiColumnBlock::addChild):
Don't have to create the flow thread here any longer, since we do it up front
in the constructor of RenderMultiColumnBlock.

(WebCore::RenderMultiColumnBlock::layoutSpecialExcludedChild):
Don't need the null check of the flow thread any more.

* rendering/RenderMultiColumnBlock.h:
Change the inlined functions to not be inlined, since they need to call
RenderMultiColumnFlowThread functions now.

* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::RenderMultiColumnFlowThread):
Init the new member variables we moved here from RenderMultiColumnBlock.

(WebCore::RenderMultiColumnFlowThread::computeColumnCountAndWidth):
Moved from RenderMultiColumnBlock.

* rendering/RenderMultiColumnFlowThread.h:
Add public getters/setters to the member variables so that RenderMultiColumnBlock can
still see them. Move the member variables here from RenderMultiColumnBlock.

* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::calculateBalancedHeight):
(WebCore::RenderMultiColumnSet::prepareForLayout):
(WebCore::RenderMultiColumnSet::columnCount):
Call through to the flow thread instead.

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

7 years agoARM Offline assembler temporary register allocator has duplicate register when buildi...
msaboff@apple.com [Fri, 24 Jan 2014 16:34:24 +0000 (16:34 +0000)]
ARM Offline assembler temporary register allocator has duplicate register when building fat binaries
https://bugs.webkit.org/show_bug.cgi?id=127545

Reviewed by Mark Lam.

Eliminate the conditional addition of r11/r7 from getModifiedListARMCommon as the
.concat will add the new register to ARM_EXTRA_GPRS.  If getModifiedListARMCommon is
invoked a second time, there will be a second r11 or r7, which messes things up.
Instead, r6 was added to ARM_EXTRA_GPRS.  r6 is currently an unused register.

* offlineasm/arm.rb:

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

7 years ago[EFL] Add expectations for two flaky media layout tests
commit-queue@webkit.org [Fri, 24 Jan 2014 16:19:45 +0000 (16:19 +0000)]
[EFL] Add expectations for two flaky media layout tests
https://bugs.webkit.org/show_bug.cgi?id=127557

Unreviewed EFL gardening.

Patch by Andrzej Badowski <a.badowski@samsung.com> on 2014-01-24

* platform/efl/TestExpectations:

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

7 years ago[EFL][WK2] Debug buildfix
ossy@webkit.org [Fri, 24 Jan 2014 12:02:52 +0000 (12:02 +0000)]
[EFL][WK2] Debug buildfix
https://bugs.webkit.org/show_bug.cgi?id=127496

Reviewed by Gyuyoung Kim.

* Shared/SessionTracker.cpp:

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

7 years agoUnreviewed EFL gardening
m.pakula@samsung.com [Fri, 24 Jan 2014 11:44:50 +0000 (11:44 +0000)]
Unreviewed EFL gardening

Skip crashing http tests.

* platform/efl-wk2/TestExpectations:

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

7 years agoUnreviewed GTK build fix after r162663.
zandobersek@gmail.com [Fri, 24 Jan 2014 09:59:05 +0000 (09:59 +0000)]
Unreviewed GTK build fix after r162663.

* platform/gtk/ScrollViewGtk.cpp:
(WebCore::ScrollView::visibleContentRectInternal): Renamed from visibleContentRect.

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

7 years agoMove HistoryItem to std::unique_ptr
zandobersek@gmail.com [Fri, 24 Jan 2014 09:25:21 +0000 (09:25 +0000)]
Move HistoryItem to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=127275

Reviewed by Darin Adler.

Source/WebCore:

Replace the uses of OwnPtr and PassOwnPtr in the HistoryItem class with std::unique_ptr.

* history/HistoryItem.cpp:
(WebCore::HistoryItem::HistoryItem):
(WebCore::HistoryItem::reset):
(WebCore::HistoryItem::addRedirectURL):
(WebCore::HistoryItem::setRedirectURLs):
* history/HistoryItem.h:
* history/mac/HistoryItemMac.mm:
(WebCore::HistoryItem::setTransientProperty):
WebCore.exp.in: Update the symbol.

Source/WebKit/mac:

* History/WebHistoryItem.mm: The Vector object that's passed to HistoryItem::setRedirectURLs
should now be handled by std::unique_ptr and passed on through move semantics.
(-[WebHistoryItem initFromDictionaryRepresentation:]):

Source/WebKit/win:

* WebHistoryItem.cpp: The Vector object that's passed to HistoryItem::setRedirectURLs
should now be handled by std::unique_ptr and passed on through move semantics.
(WebHistoryItem::initFromDictionaryRepresentation):

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

7 years agoUnreviewed EFL gardening. Remove failure expectations which are passing now.
jinwoo7.song@samsung.com [Fri, 24 Jan 2014 08:33:35 +0000 (08:33 +0000)]
Unreviewed EFL gardening. Remove failure expectations which are passing now.

* platform/efl/TestExpectations: fast/css3-text/css3-text-decoration/

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

7 years agoRegion based multicol: unresolvable percent height results in 1px tall multicol
commit-queue@webkit.org [Fri, 24 Jan 2014 08:00:47 +0000 (08:00 +0000)]
Region based multicol: unresolvable percent height results in 1px tall multicol
https://bugs.webkit.org/show_bug.cgi?id=122826

Patch by Morten Stenshorne <mstensho@opera.com> on 2014-01-23
Reviewed by David Hyatt.

Source/WebCore:

If a box has a percentage height, but the computed height of its
containing block is auto, the computed height of the box also becomes
auto. computeContentLogicalHeight() returns -1 if the height isn't
resolvable, and we need to make sure that such a value doesn't
constrain the height of the multicol container.

Tests: fast/multicol/newmulticol/unresolvable-percent-height-2.html
       fast/multicol/newmulticol/unresolvable-percent-height.html
       fast/multicol/newmulticol/unresolvable-percent-max-height-2.html
       fast/multicol/newmulticol/unresolvable-percent-max-height.html

* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
(WebCore::RenderMultiColumnSet::calculateBalancedHeight):
(WebCore::RenderMultiColumnSet::recalculateBalancedHeight):
(WebCore::RenderMultiColumnSet::prepareForLayout):

LayoutTests:

* fast/multicol/newmulticol/unresolvable-percent-height-2-expected.html: Added.
* fast/multicol/newmulticol/unresolvable-percent-height-2.html: Added.
* fast/multicol/newmulticol/unresolvable-percent-height-expected.html: Added.
* fast/multicol/newmulticol/unresolvable-percent-height.html: Added.
* fast/multicol/newmulticol/unresolvable-percent-max-height-2-expected.html: Added.
* fast/multicol/newmulticol/unresolvable-percent-max-height-2.html: Added.
* fast/multicol/newmulticol/unresolvable-percent-max-height-expected.html: Added.
* fast/multicol/newmulticol/unresolvable-percent-max-height.html: Added.

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

7 years agoUpstream changes to json-shared.php from the perf dashboard
rniwa@webkit.org [Fri, 24 Jan 2014 06:12:57 +0000 (06:12 +0000)]
Upstream changes to json-shared.php from the perf dashboard
https://bugs.webkit.org/show_bug.cgi?id=127544

Reviewed by Joseph Pecoraro.

json-shared.php originated from the perf dashboard.
Upstream changes made to the version in the perf. dashboard so that two apps could share the same code.

* public/include/json-shared.php:
(exit_with_error):
(echo_success):
(exit_with_success):
(set_exit_detail):
(merge_additional_details):

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

7 years agoMove ContentSearchUtils, ScriptBreakpoint, and ScriptDebugListener into JavaScriptCor...
joepeck@webkit.org [Fri, 24 Jan 2014 06:07:31 +0000 (06:07 +0000)]
Move ContentSearchUtils, ScriptBreakpoint, and ScriptDebugListener into JavaScriptCore for inspector
https://bugs.webkit.org/show_bug.cgi?id=127537

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* inspector/ContentSearchUtilities.cpp: Renamed from Source/WebCore/inspector/ContentSearchUtils.cpp.
(Inspector::ContentSearchUtilities::createSearchRegexSource):
(Inspector::ContentSearchUtilities::sizetExtractor):
(Inspector::ContentSearchUtilities::textPositionFromOffset):
(Inspector::ContentSearchUtilities::getRegularExpressionMatchesByLines):
(Inspector::ContentSearchUtilities::lineEndings):
(Inspector::ContentSearchUtilities::buildObjectForSearchMatch):
(Inspector::ContentSearchUtilities::createSearchRegex):
(Inspector::ContentSearchUtilities::countRegularExpressionMatches):
(Inspector::ContentSearchUtilities::searchInTextByLines):
(Inspector::ContentSearchUtilities::scriptCommentPattern):
(Inspector::ContentSearchUtilities::stylesheetCommentPattern):
(Inspector::ContentSearchUtilities::findMagicComment):
(Inspector::ContentSearchUtilities::findScriptSourceURL):
(Inspector::ContentSearchUtilities::findScriptSourceMapURL):
(Inspector::ContentSearchUtilities::findStylesheetSourceMapURL):
* inspector/ContentSearchUtilities.h: Renamed from Source/WebCore/inspector/ContentSearchUtils.h.
* inspector/ScriptBreakpoint.h: Renamed from Source/WebCore/inspector/ScriptBreakpoint.h.
(Inspector::ScriptBreakpointAction::ScriptBreakpointAction):
(Inspector::ScriptBreakpoint::ScriptBreakpoint):
* inspector/ScriptDebugListener.h: Renamed from Source/WebCore/inspector/ScriptDebugListener.h.
(Inspector::ScriptDebugListener::Script::Script):
(Inspector::ScriptDebugListener::~ScriptDebugListener):
* runtime/RegExp.cpp:
(JSC::RegExp::match):

Source/WebCore:

  - Rename ContentSearchUtils => ContentSearchUtilities and move to JavaScriptCore.
  - Move ScriptBreakpoint and ScriptDebugListener to JavaScriptCore.
  - Move them all to namespace Inspector.
  - Update build files and users to the new names.

No change in functionality, just moving code.

* CMakeLists.txt:
* ForwardingHeaders/inspector/ContentSearchUtilities.h: Added.
* ForwardingHeaders/inspector/ScriptBreakpoint.h: Added.
* ForwardingHeaders/inspector/ScriptDebugListener.h: Added.
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/PageScriptDebugServer.cpp:
* bindings/js/PageScriptDebugServer.h:
* bindings/js/ScriptDebugServer.cpp:
* bindings/js/ScriptDebugServer.h:
* bindings/js/WorkerScriptDebugServer.cpp:
* bindings/js/WorkerScriptDebugServer.h:
* inspector/InspectorAllInOne.cpp:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::searchInContent):
(WebCore::InspectorDebuggerAgent::sourceMapURLForScript):
(WebCore::InspectorDebuggerAgent::didParseSource):
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::sourceMapURLForResource):
(WebCore::InspectorPageAgent::searchInResource):
(WebCore::InspectorPageAgent::searchInResources):
* inspector/InspectorStyleSheet.cpp:
(WebCore::buildSourceRangeObject):
(WebCore::InspectorStyleSheet::lineEndings):
(WebCore::InspectorStyleSheetForInlineStyle::lineEndings):

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

7 years agoMove RegularExpression into JavaScriptCore for inspector
joepeck@webkit.org [Fri, 24 Jan 2014 06:07:24 +0000 (06:07 +0000)]
Move RegularExpression into JavaScriptCore for inspector
https://bugs.webkit.org/show_bug.cgi?id=127526

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Move RegularExpression into JavaScriptCore/yarr so it can
be used later on by JavaScriptCore/inspector. Convert to
the JSC::Yarr namespace.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* yarr/RegularExpression.cpp: Renamed from Source/WebCore/platform/text/RegularExpression.cpp.
(JSC::Yarr::RegularExpression::Private::create):
(JSC::Yarr::RegularExpression::Private::Private):
(JSC::Yarr::RegularExpression::Private::compile):
(JSC::Yarr::RegularExpression::RegularExpression):
(JSC::Yarr::RegularExpression::~RegularExpression):
(JSC::Yarr::RegularExpression::operator=):
(JSC::Yarr::RegularExpression::match):
(JSC::Yarr::RegularExpression::searchRev):
(JSC::Yarr::RegularExpression::matchedLength):
(JSC::Yarr::replace):
(JSC::Yarr::RegularExpression::isValid):
* yarr/RegularExpression.h: Renamed from Source/WebCore/platform/text/RegularExpression.h.

Source/WebCore:

Update as appropriate for the moved file and namespace
change for class RegularExpression.

* CMakeLists.txt:
* ForwardingHeaders/yarr/RegularExpression.h: Added.
* GNUmakefile.list.am:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* dom/DOMImplementation.h:
* html/BaseCheckableInputType.cpp:
* html/BaseTextInputType.cpp:
(WebCore::BaseTextInputType::patternMismatch):
* html/EmailInputType.cpp:
(WebCore::isValidEmailAddress):
* html/InputType.cpp:
* inspector/ContentSearchUtils.cpp:
(WebCore::ContentSearchUtils::getRegularExpressionMatchesByLines):
(WebCore::ContentSearchUtils::createSearchRegex):
(WebCore::ContentSearchUtils::countRegularExpressionMatches):
(WebCore::ContentSearchUtils::searchInTextByLines):
* inspector/ContentSearchUtils.h:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::matches):
(WebCore::InspectorDebuggerAgent::breakpointActionLog):
(WebCore::InspectorDebuggerAgent::breakpointActionSound):
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::searchInResources):
* inspector/InspectorPageAgent.h:
* inspector/InspectorRuntimeAgent.cpp:
* inspector/InspectorRuntimeAgent.h:
* inspector/InspectorStyleSheet.cpp:
(WebCore::selectorsFromSource):
* inspector/WorkerDebuggerAgent.cpp:
* page/Frame.cpp:
(WebCore::createRegExpForLabels):
(WebCore::Frame::searchForLabelsAboveCell):
(WebCore::Frame::searchForLabelsBeforeElement):
(WebCore::matchLabelsAgainstString):
* page/Frame.h:
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::getUnmangledInfoLog):

Source/WebKit/mac:

* WebView/WebHTMLRepresentation.mm:

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

7 years agoSource/WebCore: IDB: Support IDBObjectStore.clear()
beidson@apple.com [Fri, 24 Jan 2014 05:45:09 +0000 (05:45 +0000)]
Source/WebCore: IDB: Support IDBObjectStore.clear()
https://bugs.webkit.org/show_bug.cgi?id=127541

Reviewed by Anders Carlsson.

The backing store should never be performing callbacks directly:
* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
(WebCore::IDBServerConnectionLevelDB::clearObjectStore):

Instead, the transaction operations should do that themselves:
* Modules/indexeddb/IDBTransactionBackendOperations.cpp:
(WebCore::ClearObjectStoreOperation::perform):
* Modules/indexeddb/IDBTransactionBackendOperations.h:
(WebCore::ClearObjectStoreOperation::transaction):

Source/WebKit2: IDB: Support IDBObjectStore.clear()
https://bugs.webkit.org/show_bug.cgi?id=127541

Reviewed by Anders Carlsson.

Make the WebProcess call out to the DatabaseProcess with a clear request, and handle the
response from the DatabaseProcess:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::clearObjectStore):
(WebKit::WebIDBServerConnection::didClearObjectStore):
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:

Pass the clear request to the appropriate UniqueIDBDatabase:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
(WebKit::DatabaseProcessIDBConnection::clearObjectStore):
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:

Pass the clear request to the backing store:
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::didClearObjectStore):
(WebKit::UniqueIDBDatabase::clearObjectStore):
(WebKit::UniqueIDBDatabase::clearObjectStoreInBackingStore):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:

Actually drop the records in the database:
* DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::clearObjectStore):
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:

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

7 years agoFix crash when opening the inspector
andersca@apple.com [Fri, 24 Jan 2014 05:43:09 +0000 (05:43 +0000)]
Fix crash when opening the inspector
https://bugs.webkit.org/show_bug.cgi?id=127542
<rdar://problem/15899544>

Reviewed by Joseph Pecoraro.

Create default clients so we won't crash if they're never set.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):

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

7 years agoUnreviewed build fix attemp on the EFL and GTK build after r162678
ryuan.choi@samsung.com [Fri, 24 Jan 2014 05:29:32 +0000 (05:29 +0000)]
Unreviewed build fix attemp on the EFL and GTK build after r162678

* CMakeLists.txt: Removed WebPolicyClient.cpp
* GNUmakefile.list.am: Removed WebPolicyClient.cpp and WebPolicyClient.h

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

7 years ago<rdar://problem/15875326> REGRESSION (r162257): Assertion failure (should not be...
mitz@apple.com [Fri, 24 Jan 2014 05:21:21 +0000 (05:21 +0000)]
<rdar://problem/15875326> REGRESSION (r162257): Assertion failure (should not be reached) in CSSPreloadScanner::tokenize()
https://bugs.webkit.org/show_bug.cgi?id=127540

Reviewed by Anders Carlsson.

No new tests, because I could not reproduce the bug reliably and I don’t know how to trigger
it.

* html/parser/CSSPreloadScanner.cpp:
(WebCore::CSSPreloadScanner::scan): Check for the DoneParsingImportRules before tokenizing
a character, not after. This restores the logic from before r162257.

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

7 years ago[iOS] Protect against possbile deadlock by delaying video layer creation
jer.noble@apple.com [Fri, 24 Jan 2014 05:15:38 +0000 (05:15 +0000)]
[iOS] Protect against possbile deadlock by delaying video layer creation
https://bugs.webkit.org/show_bug.cgi?id=127505

Reviewed by Eric Carlson.

Work around a possible deadlock on iOS when creating a media element
backed by AVFoundation by delaying creation of the AVPlayerLayer.
The deadlock can occur when the web thread is doing CALayer layout
while taking the web thread lock, while CoreMedia is doing property
access on an async thread while taking the CM lock, and each is waiting
for the other's lock to be released.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):

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

7 years ago[MSE][Mac] Crash when reloading a page during playback
jer.noble@apple.com [Fri, 24 Jan 2014 04:59:15 +0000 (04:59 +0000)]
[MSE][Mac] Crash when reloading a page during playback
https://bugs.webkit.org/show_bug.cgi?id=126903

Reviewed by Eric Carlson.

Periodic time observers added to AVSampleBufferRenderSynchronizer will execute their
callback block even after being removed with -removeTimeObserver:, which is tracked by
<rdar://problem/15798050>. Work around this problem by passing a WeakPtr into the block
and bail early if the owning media player has been destroyed.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::createWeakPtr):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):

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

7 years agoSupport NSInteger argument type for encoding/decoding invocations.
commit-queue@webkit.org [Fri, 24 Jan 2014 04:51:06 +0000 (04:51 +0000)]
Support NSInteger argument type for encoding/decoding invocations.
https://bugs.webkit.org/show_bug.cgi?id=127522

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2014-01-23
Reviewed by Dan Bernstein.

Add support for NSInteger argument type ('q') for remote invocations.

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(encodeInvocation):
(decodeInvocationArguments):

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

7 years agoDragging from inner side of video to outside causes a crash
changseok.oh@collabora.com [Fri, 24 Jan 2014 04:12:23 +0000 (04:12 +0000)]
Dragging from inner side of video to outside causes a crash
https://bugs.webkit.org/show_bug.cgi?id=126338

Reviewed by Jer Noble.

Source/WebCore:

The crash happens while dragging mouse cursor through timeline control to outside
of video region. This is beacause media controls are selected with the drag.
The media controls disappear when mouse cursor goes outside of video though
the dragging/selection proceeds. If once media controls are hidden, related element
lose their renderers. However the drag is still under going. it requires shadowPseudoId
of the selected controls. Untorntunately, SliderThumbElement/SliderContainerElement
don't return a static value for the shadowPseudoId unlike other media controls,
but they need a renderer to determine it. This is the reason of crash.

Test: media/media-controller-drag-crash.html

* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::shadowPseudoId):
(WebCore::SliderContainerElement::shadowPseudoId):

LayoutTests:

This tests that dragging through timeslider control to outside of video causes a crash.
The crash happened on both gtk+ and efl ports not using MEDIA_CONTROL_SCRIPT.

* media/media-controller-drag-crash-expected.txt: Added.
* media/media-controller-drag-crash.html: Added.

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