2015-01-27 Lucas Forschler Merge r177455 2014-12-17 Chris Dumez [iOS] Make it possible to toggle FeatureCounter support at runtime https://bugs.webkit.org/show_bug.cgi?id=139688 Reviewed by Andreas Kling. Remove FeatureCounter API from WTF and move it to WebCore/platform instead so that it can log conditionally based on a WebCore setting. * WTF.vcxproj/WTF.vcxproj: * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: 2015-01-26 Lucas Forschler Merge r177328 2014-12-15 Chris Dumez [iOS] Add feature counting support https://bugs.webkit.org/show_bug.cgi?id=139652 Reviewed by Gavin Barraclough. Add a FeatureCounter API for to log / count when a feature is used. For now, this is only implementated on iOS. * WTF.vcxproj/WTF.vcxproj: * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/FeatureCounter.cpp: Added. (WTF::incrementFeatureCounterKey): (WTF::setFeatureCounterKey): * wtf/FeatureCounter.h: Added. * wtf/ios/FeatureCounter.mm: Added. (WTF::incrementFeatureCounterKey): (WTF::setFeatureCounterKey): 2015-01-21 Babak Shafiei Merge r177000. 2014-12-08 Dean Jackson [Apple] Use Accelerate framework to speed-up FEGaussianBlur https://bugs.webkit.org/show_bug.cgi?id=139310 Reviewed by Simon Fraser. Add a HAVE_ACCELERATE flag, true on Apple platforms. * wtf/Platform.h: 2015-01-21 Babak Shafiei Merge r176982. 2014-12-08 Myles C. Maxfield Fix iOS build after r176971. I had previously modified the WTF forwarding header instead of modifying the real source. * wtf/unicode/CharacterNames.h: 2014-09-02 Babak Shafiei Merge r173036. 2014-08-27 Mark Rowe JavaScriptCore is missing debug info for WTF because libWTF.a is stripped. / Reviewed by Dan Bernstein. * Configurations/WTF.xcconfig: Set STRIP_INSTALLED_PRODUCT = NO for the target that produces libWTF.a so that the debug symbols will be linked into JavaScriptCore and end up in its dSYM file. 2014-07-17 Dean Jackson Disable some features on this branch. Reviewed originally by Simon Fraser. Disable: - CSS_EXCLUSIONS - CSS_GRID_LAYOUT - INPUT_TYPE_COLOR - INPUT_TYPE_COLOR_POPUP - CANVAS_PATH - CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED - INDIE_UI - SHARED_WORKERS - NAVIGATOR_HWCONCURRENCY - GAMEPAD - PICTURE_SIZES - CSS3_CONDITIONAL_RULES - WILL_REVEAL_EDGE_EVENTS * Configurations/FeatureDefines.xcconfig: 2014-07-15 Commit Queue Unreviewed, rolling out r171107. https://bugs.webkit.org/show_bug.cgi?id=134959 This was not the problem! (Requested by kling on #webkit). Reverted changeset: "Revert: Run the FastMalloc scavenger thread on iOS as well." https://bugs.webkit.org/show_bug.cgi?id=134927 http://trac.webkit.org/changeset/171107 2014-07-15 Andreas Kling Revert: Run the FastMalloc scavenger thread on iOS as well. This appears to be the cause of some elusive crashes, and since I don't have a way to reproduce them, let's just go back to not running the scavenger thread on iOS. Reviewed by Antti Koivisto. * wtf/FastMalloc.cpp: 2014-07-13 Filip Pizlo HashMap should have removeIf() https://bugs.webkit.org/show_bug.cgi?id=134870 Reviewed by Sam Weinig. Expose a new HashMap method, called removeIf(), which allows you to do an efficient pass over the map and remove a bunch of things at once. This is used by DFG GCSE as part of https://bugs.webkit.org/show_bug.cgi?id=134677. * wtf/HashMap.h: (WTF::X>::removeIf): * wtf/HashTable.h: (WTF::KeyTraits>::removeIf): 2014-07-11 peavo@outlook.com [Win] Enable DFG JIT. https://bugs.webkit.org/show_bug.cgi?id=123615 Reviewed by Mark Lam. * wtf/Platform.h: 2014-07-11 Commit Queue Unreviewed, rolling out r170995. https://bugs.webkit.org/show_bug.cgi?id=134831 Causing odd crashes in debug builds (Requested by zdobersek on #webkit). Reverted changeset: "[WTF] Add the move constructor, move assignment operator for HashTable" https://bugs.webkit.org/show_bug.cgi?id=130772 http://trac.webkit.org/changeset/170995 2014-07-09 Zan Dobersek [WTF] Add the move constructor, move assignment operator for HashTable https://bugs.webkit.org/show_bug.cgi?id=130772 Reviewed by Darin Adler. HashTable has both copy constructor and copy assignment operator, meaning that the move constructor and move assignment operator are implicitly deleted. This patch defines both to avoid unnecessary copies when moves can be performed. * wtf/HashTable.h: (WTF::KeyTraits>::HashTable): 2014-07-10 Alex Christensen Enable same features on all Windows ports. https://bugs.webkit.org/show_bug.cgi?id=134715 Reviewed by Brent Fulgham. * wtf/Platform.h: Use REQUEST_ANIMATION_FRAME_TIMER on WinCairo. 2014-07-09 Brent Fulgham [Win] Unreviewed build fix after r170930. * WTF.vcxproj/copy-files.cmd: Include cf files in post-build copy operation. 2014-07-09 Brent Fulgham [Win] Remove uses of 'bash' in build system https://bugs.webkit.org/show_bug.cgi?id=134782 Reviewed by Dean Jackson. Remove uses of 'bash' by replacing Windows-specific bash scripts with Perl equivalents. * WTF.vcxproj/WTFGenerated.make: * WTF.vcxproj/WTFGenerated.vcxproj: * WTF.vcxproj/WTFGenerated.vcxproj.filters: * WTF.vcxproj/WTFPreBuild.cmd: * WTF.vcxproj/build-generated-files.pl: Copied from Source/WTF/WTF.vcxproj/build-generated-files.sh. * WTF.vcxproj/build-generated-files.sh: Removed. 2014-07-09 Brent Fulgham [Win] Remove use of 'grep' in build steps https://bugs.webkit.org/show_bug.cgi?id=134770 Reviewed by Tim Horton. Replace uses of the grep command in Windows builds with the equivalent Perl program. * WTF.vcxproj/WTFPreBuild.cmd: 2014-07-07 Zan Dobersek Enable ARMv7 disassembler for the GTK port https://bugs.webkit.org/show_bug.cgi?id=134676 Reviewed by Benjamin Poulain. * wtf/Platform.h: Enable the ARMv7 disassembler for the GTK port when targeting the ARMv7 architecture. 2014-07-06 Yoav Weiss Turn on img@sizes compile flag https://bugs.webkit.org/show_bug.cgi?id=134634 Reviewed by Benjamin Poulain. * wtf/FeatureDefines.h: Added compile flag definition. 2014-07-03 Gyuyoung Kim Unreivewed, fix build break on EFL and GTK since r170767. * wtf/CMakeLists.txt: Exclude Decoder.h and Encoder.h because those files were removed. 2014-07-03 Daniel Bates Add WTF::move() https://bugs.webkit.org/show_bug.cgi?id=134500 Reviewed by Darin Adler. Substitution of WTF::move() for std::move() rubber-stamped by Anders Carlsson. Implement WTF::move(), a replacement for std::move(). WTF::move() is less error prone than std::move() as it compile asserts that its argument is a non-const lvalue reference before ultimately casting it to a rvalue reference (via std::move). * wtf/Deque.h: Substitute WTF::move() for std::move(). * wtf/HashMap.h: Ditto. * wtf/HashSet.h: Ditto. * wtf/HashTable.h: Ditto. * wtf/IteratorAdaptors.h: Ditto. * wtf/IteratorRange.h: Ditto. * wtf/ListHashSet.h: Ditto. * wtf/MainThread.cpp: Ditto. [...] * wtf/StdLibExtras.h: (WTF::move): Added. [...] 2014-07-03 Anders Carlsson Get rid of Encoder.h and Decoder.h from WTF https://bugs.webkit.org/show_bug.cgi?id=134600 Reviewed by Darin Adler. * WTF.vcxproj/WTF.vcxproj: * WTF.vcxproj/WTF.vcxproj.filters: * WTF.xcodeproj/project.pbxproj: * wtf/Decoder.h: Removed. * wtf/Encoder.h: Removed. 2014-07-03 Ryuan Choi Broken build with build-webkit --no-video https://bugs.webkit.org/show_bug.cgi?id=134587 Reviewed by Darin Adler. MEDIA_CONTROLS_SCRIPT requires VIDEO enabled. * wtf/FeatureDefines.h: Added error message for dependency failure. 2014-07-02 Enrica Casucci iOS build fix after http://trac.webkit.org/changeset/170697. Unreviewed. * wtf/Deque.h: 2014-07-02 Dan Bernstein Remove some code only needed for versions of Safari that are no longer supported https://bugs.webkit.org/show_bug.cgi?id=134537 Reviewed by Anders Carlsson. * wtf/Assertions.cpp: * wtf/Assertions.h: 2014-07-01 Alex Christensen Reduce dynamic memory allocation in css jit. https://bugs.webkit.org/show_bug.cgi?id=134416 Reviewed by Benjamin Poulain. * wtf/Deque.h: Added inlineCapacity optional template parameter. 2014-06-30 Commit Queue Unreviewed, rolling out r170605. https://bugs.webkit.org/show_bug.cgi?id=134484 The changes cause crashes on ARM64 (Requested by benjaminp on #webkit). Reverted changeset: "Reduce dynamic memory allocation in css jit." https://bugs.webkit.org/show_bug.cgi?id=134416 http://trac.webkit.org/changeset/170605 2014-06-30 Daniel Bates Make TransformIterator::TransformIterator() take rvalue references https://bugs.webkit.org/show_bug.cgi?id=134468 Reviewed by Darin Adler. It's unnecessary to support TransformIterator::TransformIterator() taking const lvalue references as we only call it with rvalues. As a side benefit, we can use move semantics to initialize the members of TransformIterator. * wtf/IteratorAdaptors.h: (WTF::TransformIterator::TransformIterator): Make constructor take arguments as rvalue references. (WTF::makeTransformIterator): Substitute std::move() for std::forward(). 2014-06-30 Alex Christensen Reduce dynamic memory allocation in css jit. https://bugs.webkit.org/show_bug.cgi?id=134416 Reviewed by Benjamin Poulain. * wtf/Deque.h: Added inlineCapacity optional template parameter. 2014-06-30 Anders Carlsson Add code for encoding legacy session history entries https://bugs.webkit.org/show_bug.cgi?id=134452 Reviewed by Andreas Kling. * wtf/MallocPtr.h: (WTF::MallocPtr::malloc): (WTF::MallocPtr::realloc): 2014-06-27 Andreas Kling [ARMv7] Skip one particularly expensive fastFree() alignment check. The size class alignment check in fastFree() was crazy expensive on ARMv7 due to its use of modulo. Disabling it shaves 470ms off of PLT main thread time in the web process. Note that this was very hard to identify in profiles due to TCO. Reviewed by Gavin Barraclough. * wtf/FastMalloc.cpp: (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary): 2014-06-26 Andreas Kling Bump FastMalloc thread cache max size to 1MB on iOS. The previous limit (512kB) comes from the old days of very-low-memory devices, and we can now afford to spend another 512kB here. Note that we already have a mechanism to purge FastMalloc caches on system memory pressure. Looks like a ~400ms progression on PLT. Reviewed by Geoff Garen. * wtf/FastMalloc.cpp: 2014-06-26 Laszlo Gombos Define TARGET_OS_IPHONE to 0 for non-darwin ports https://bugs.webkit.org/show_bug.cgi?id=134347 Reviewed by Darin Adler. A follow-up to r169880 to make it easier to reason about the code. The purpose of this change to allow "#if TARGET_OS_IPHONE" in public header files. * wtf/Platform.h: 2014-06-26 Chris Fleizach Add an undo group for each dictated utterance in WebKit https://bugs.webkit.org/show_bug.cgi?id=134086 Applied review comments from Sam Weinig. Move the associated USE #define into Platform.h. * wtf/Platform.h: 2014-06-25 Geoffrey Garen Unreviewed, rolling out r166876. Caused some ECMA test262 failures Reverted changeset: "Date object needs to check for ES5 15.9.1.14 TimeClip limit." https://bugs.webkit.org/show_bug.cgi?id=131248 http://trac.webkit.org/changeset/166876 2014-06-25 peavo@outlook.com [Win64] ASM LLINT is not enabled. https://bugs.webkit.org/show_bug.cgi?id=130638 Reviewed by Mark Lam. * wtf/Platform.h: Enable LLINT and JIT for Win64. 2014-06-25 Laszlo Gombos Remove build guard for progress element https://bugs.webkit.org/show_bug.cgi?id=134292 Reviewed by Benjamin Poulain. The build flag is no longer needed as it is always on. * wtf/FeatureDefines.h: 2014-06-24 Andreas Kling Run the FastMalloc scavenger thread on iOS as well. Reviewed by Gavin Barraclough. * wtf/FastMalloc.cpp: 2014-06-24 Anders Carlsson Add PageState to HistoryItem conversion code https://bugs.webkit.org/show_bug.cgi?id=134259 Reviewed by Andreas Kling. * wtf/Optional.h: (WTF::Optional::valueOr): 2014-06-24 László Langó [JavaScriptCore] Enable concurrent JIT on EFL. https://bugs.webkit.org/show_bug.cgi?id=134242 Reviewed by Csaba Osztrogonác. * wtf/Platform.h: 2014-06-23 Ryuan Choi [EFL] Replace RefPtr with UniquePtrEfl https://bugs.webkit.org/show_bug.cgi?id=134236 Reviewed by Gyuyoung Kim. Although there are ref/unref for Evas_Object, it's bit odd so we should call evas_object_del to destroy it. So, this patch replaced RefPtr with UniquePtrEfl for the simplicity. * wtf/PlatformEfl.cmake: Removed RefPtrEfl.cpp from source list. * wtf/efl/RefPtrEfl.cpp: Removed. * wtf/efl/RefPtrEfl.h: Removed. 2014-06-21 Brady Eidson Gamepad API - Deprecate the existing implementation https://bugs.webkit.org/show_bug.cgi?id=134108 Reviewed by Timothy Hatcher. -Add new "GAMEPAD_DEPRECATED" build flag, moving the existing implementation to use it -Move some implementation files into a "deprecated" subdirectory. * wtf/FeatureDefines.h: 2014-06-21 Commit Queue Unreviewed, rolling out r170244. https://bugs.webkit.org/show_bug.cgi?id=134157 GTK/EFL bindings generator works differently, making this patch not work there. Will fix entire patch after a rollout. (Requested by bradee-oh on #webkit). Reverted changeset: "Gamepad API - Deprecate the existing implementation" https://bugs.webkit.org/show_bug.cgi?id=134108 http://trac.webkit.org/changeset/170244 2014-06-21 Brady Eidson Gamepad API - Deprecate the existing implementation https://bugs.webkit.org/show_bug.cgi?id=134108 Reviewed by Timothy Hatcher. -Add new "GAMEPAD_DEPRECATED" build flag, moving the existing implementation to use it -Add the "Deprecated" suffix to some implementation files * wtf/FeatureDefines.h: 2014-06-21 Eva Balazsfalvi Removing PAGE_VISIBILITY_API compile guard. https://bugs.webkit.org/show_bug.cgi?id=133844 Reviewed by Gavin Barraclough. * wtf/FeatureDefines.h: 2014-06-20 Anders Carlsson Add encoding and decoding support for WTF::Optional https://bugs.webkit.org/show_bug.cgi?id=134125 Reviewed by Andreas Kling. * wtf/Optional.h: (WTF::Optional::operator=): 2014-06-20 Anders Carlsson Add copy/move constructors and assignment operators to WTF::Optional https://bugs.webkit.org/show_bug.cgi?id=134119 Reviewed by Andreas Kling. * wtf/Optional.h: (WTF::Optional::Optional): (WTF::Optional::operator=): 2014-06-19 Anders Carlsson Add WTF::Optional class https://bugs.webkit.org/show_bug.cgi?id=134083 Reviewed by Andreas Kling. * WTF.xcodeproj/project.pbxproj: * wtf/Optional.h: Added. (WTF::Optional::Optional): (WTF::Optional::~Optional): (WTF::Optional::operator bool): (WTF::Optional::value): 2014-06-19 Dániel Bátyai Remove ENABLE(LLINT) and ENABLE(LLINT_C_LOOP) guards https://bugs.webkit.org/show_bug.cgi?id=130389 Reviewed by Mark Lam. Removed ENABLE(LLINT) since we always build with it, and changed ENABLE(LLINT_C_LOOP) into !ENABLE(JIT) since they are mutually exclusive. * wtf/OSAllocatorPosix.cpp: (WTF::OSAllocator::reserveAndCommit): * wtf/Platform.h: 2014-06-18 Anders Carlsson Add CF type cast function templates and use them in KeyedDecoder in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=134033 Reviewed by Sam Weinig. * WTF.xcodeproj/project.pbxproj: * wtf/cf/TypeCasts.h: Added. (WTF::dynamic_cf_cast): Returns null if the given CFTypeRef object doesn't have the right type. (WTF::checked_cf_cast): ASSERTs (with security implication) if the given CFTypeRef object is null or doesn't have the right type. 2014-06-17 Tamas Gergely Misused PLATFORM(MIDDLE_ENDIAN) and PLATFORM(BIG_ENDIAN). https://bugs.webkit.org/show_bug.cgi?id=128301 Reviewed by Daniel Bates. Endianness is a CPU attribute, not a PLATFORM. PLATFORM() macro is replaced to CPU(). * wtf/text/ASCIIFastPath.h: (WTF::copyLCharsFromUCharSource): 2014-06-17 Andreas Kling Web process main thread priority is lower than some network process threads. Bring all of our threads to the appropriate priority level by opting in to the threading QoS APIs. By marking them "user initiated", they still yield to UI interaction, but take priority over background tasks. Reviewed by Maciej Stachowiak. * wtf/Platform.h: * wtf/Threading.cpp: (WTF::setCurrentThreadIsUserInitiated): * wtf/Threading.h: * wtf/ThreadingPthreads.cpp: (WTF::createThreadInternal): 2014-06-17 Alex Christensen Enable css jit for armv7 on iOS. https://bugs.webkit.org/show_bug.cgi?id=133961 Reviewed by Andreas Kling. * wtf/Platform.h: Enable css jit for ARM thumb on iOS. 2014-06-17 Dan Bernstein String::isolatedCopy doesn’t return an isolated copy when used on an rvalue reference https://bugs.webkit.org/show_bug.cgi?id=133968 Reviewed by Anders Carlsson. Made the rvalue reference overload of isolatedCopy() non-const, so that std::move(*this) is an rvalue reference that can be moved, rather than copied, into the returned String. * wtf/text/WTFString.cpp: (WTF::String::isolatedCopy): * wtf/text/WTFString.h: 2014-06-15 Dan Bernstein iOS build fix after r169995. * wtf/RetainPtr.h: 2014-06-15 Anders Carlsson Add an autorelease() member function to RetainPtr https://bugs.webkit.org/show_bug.cgi?id=133929 Reviewed by Dan Bernstein. * wtf/RetainPtr.h: 2014-06-13 Alex Christensen Unreviewed disabling css jit on armv7. It's not quite ready yet. * wtf/Platform.h: Disable css jit on armv7. 2014-06-13 Alex Christensen Enable css jit for armv7 on iOS. https://bugs.webkit.org/show_bug.cgi?id=133890 Reviewed by Andreas Kling. * wtf/Platform.h: Enable css jit for ARM thumb on iOS. 2014-06-13 Mark Hahnenberg OSR exit should barrier the Executables for all InlineCallFrames, not just those on the stack at the time of exit https://bugs.webkit.org/show_bug.cgi?id=133880 Reviewed by Filip Pizlo. * wtf/Bag.h: (WTF::Bag::iterator::operator!=): Add != to the Bag iterator so we can use it in range-based iteration. 2014-06-12 Gavin Barraclough Add support for thread/WorkQueue QoS https://bugs.webkit.org/show_bug.cgi?id=130688 Reviewed by Anders Carlson & Simon Fraser. Add the ability to mark threads as UserInteractive. * wtf/Threading.cpp: (WTF::setCurrentThreadIsUserInteractive): - added method to set QoS of current thread to UserInteractive. * wtf/Threading.h: - added declaration. 2014-06-12 Alexey Proskuryakov Fix Mac after r169880. This revision added a C++ comment to Platform.h, which breaks sandbox profile preprocessing. Also, I do not believe that this comment was entirely accurate - we've always used this technique with GCC, so there has to be more to it. So, I just removed the comment. * wtf/Platform.h: 2014-06-11 Csaba Osztrogonác [EFL][GTK] Ultimate fix not to have build failures in the future because of "#if TARGET_OS_IPHONE" guards. Unreviewed buildfix. * wtf/Platform.h: Define TARGET_OS_IPHONE to 0 on EFL and GTK. 2014-06-11 Ryosuke Niwa Turning on DUMP_PROPERTYMAP_STATS causes a build failure https://bugs.webkit.org/show_bug.cgi?id=133673 Reviewed by Andreas Kling. Added DEFINE_GLOBAL_FOR_LOGGING to allow running a destructor in logging code that needs to be enabled in release builds (e.g. for JavaScriptCore). * wtf/StdLibExtras.h: 2014-06-09 Benjamin Poulain Improve CSSPrimitiveValue::customCSSText for ARMv7 https://bugs.webkit.org/show_bug.cgi?id=133597 Reviewed by Andreas Kling. * wtf/RefPtr.h: (WTF::RefPtr::RefPtr): * wtf/text/WTFString.h: (WTF::String::String): 2014-06-05 Yoav Weiss Align srcset parser with recent spec changes https://bugs.webkit.org/show_bug.cgi?id=133504 Reviewed by Darin Adler. I've added toInt and toFloat methods to StringView, and exposed charactersToInt so that they can be used by HTMLSrcsetParser.cpp. * wtf/text/WTFString.h: * wtf/text/StringView.h: (WTF::StringView::toInt): (WTF::StringView::toFloat): 2014-06-04 Alex Christensen Enable WebGL on Windows. https://bugs.webkit.org/show_bug.cgi?id=133503 Reviewed by Brent Fulgham. * wtf/FeatureDefines.h: Enable WebGL for AppleWin and WinCairo ports. 2014-06-01 Jer Noble [MSE] Appends of overlapping sample data do not clear existing samples properly. https://bugs.webkit.org/show_bug.cgi?id=133435 Reviewed by Darin Adler. Add a dump method to MediaTime, so that MediaTimes can be easily converted to strings (for logging purposes). * wtf/MediaTime.cpp: (WTF::MediaTime::dump): * wtf/MediaTime.h: 2014-05-31 Anders Carlsson Add a LazyNeverDestroyed class template and use it https://bugs.webkit.org/show_bug.cgi?id=133425 Reviewed by Darin Adler. LazyNeverDestroyed is similar to NeverDestroyed, except it's lazily constructed by calling construct(). This makes it useful for using inside std::call_once functions. * wtf/Forward.h: * wtf/NeverDestroyed.h: (WTF::LazyNeverDestroyed::construct): (WTF::LazyNeverDestroyed::operator T&): (WTF::LazyNeverDestroyed::get): (WTF::LazyNeverDestroyed::asPtr): (WTF::LazyNeverDestroyed::MaybeRelax::MaybeRelax): * wtf/mac/DeprecatedSymbolsUsedBySafari.mm: (WTF::atomicallyInitializedStaticMutex): * wtf/unicode/icu/CollatorICU.cpp: (WTF::cachedCollatorMutex): 2014-05-29 Alex Christensen Enable css jit by default on arm64. https://bugs.webkit.org/show_bug.cgi?id=133246 Reviewed by Benjamin Poulain. * wtf/Platform.h: Added arm64 to list of supported architectures. 2014-05-28 Filip Pizlo DFG::DCEPhase inserts into an insertion set in reverse, causing hilarious basic block corruption if you kill a lot of NewArrays https://bugs.webkit.org/show_bug.cgi?id=133368 Reviewed by Mark Lam. * wtf/Insertion.h: (WTF::executeInsertions): This algorithm is only correct if insertions are added in the right order. Assert that the order is right. 2014-05-27 Jon Lee Update ENABLE(MEDIA_SOURCE) on Mac https://bugs.webkit.org/show_bug.cgi?id=133141 Reviewed by Darin Adler. * wtf/FeatureDefines.h: #ifdef unneeded for Mac since it's covered in the .xcconfigs. 2014-05-27 Tibor Meszaros Remove BLOB guards https://bugs.webkit.org/show_bug.cgi?id=132863 Reviewed by Csaba Osztrogonác. * wtf/FeatureDefines.h: 2014-05-27 Gwang Yoon Hwang [GLIB] RunLoop::dispatch always executes the function on the main thread instead of the target thread. https://bugs.webkit.org/show_bug.cgi?id=133291 Reviewed by Carlos Garcia Campos. GMainLoopSource::schedule[AfterDelay] must be used with the appropriate GMainContext. Because current implementations in RunLoopGtk passes nullptr instead of its runLoopContext when using GMainLoopSource, all of dispatched functions are executed on the main thread regardless of which runloops is used. This patch fixes the issue by passing the m_runLoopContext instead the default parameter to the GMainLoopSource::schedule[AfterDelay]. * wtf/gtk/RunLoopGtk.cpp: (WTF::RunLoop::wakeUp): (WTF::RunLoop::TimerBase::start): 2014-05-26 Darin Adler Class name matching should use ASCII case-insensitive matching, not Unicode case folding https://bugs.webkit.org/show_bug.cgi?id=133292 Reviewed by Anders Carlsson. * wtf/text/AtomicString.cpp: (WTF::AtomicString::addSlowCase): Change to take references instead of pointers since these arguments can never be null. (WTF::AtomicString::lower): Rearranged slightly to use PassRef in a more efficient but slightly uglier way. (WTF::AtomicString::convertToASCIILowercase): Added. * wtf/text/AtomicString.h: Updated for above changes. * wtf/text/StringImpl.cpp: (WTF::StringImpl::convertToASCIILowercase): Added. * wtf/text/StringImpl.h: Updated for above. * wtf/text/WTFString.cpp: (WTF::String::convertToASCIILowercase): Added. * wtf/text/WTFString.h: Updated for above. 2014-05-22 Zan Dobersek Add the partial specialization for VectorTraits> https://bugs.webkit.org/show_bug.cgi?id=133083 Reviewed by Andreas Kling. * wtf/VectorTraits.h: Like for RefPtr

, OwnPtr

and Ref

, the partial specialization for VectorTraits> should exist and should inherit from SimpleClassVector. 2014-05-20 Geoffrey Garen Rolled out https://bugs.webkit.org/show_bug.cgi?id=133144 Reviewed by Gavin Barraclough. It caused a performance regression. * wtf/FastMalloc.cpp: (WTF::TCMalloc_PageHeap::runScavengerThread): * wtf/Threading.h: * wtf/ThreadingPthreads.cpp: (WTF::createThreadInternal): (WTF::setCurrentThreadQOSUtility): Deleted. * wtf/ThreadingWin.cpp: (WTF::setCurrentThreadQOSUtility): Deleted. 2014-05-20 Jer Noble [Mac] AVAssets are never destroyed; lack of an autorelease pool when calling callOnMainThread. https://bugs.webkit.org/show_bug.cgi?id=133130 Reviewed by Geoff Garen. Wrap the function to be called in an autorelease pool, so that autoreleased objects are cleaned up immediately after the end of the function. * wtf/mac/MainThreadMac.mm: (WTF::timerFired): 2014-05-18 Rik Cabanier support for navigator.hardwareConcurrency https://bugs.webkit.org/show_bug.cgi?id=132588 Reviewed by Filip Pizlo. * wtf/FeatureDefines.h: 2014-05-14 Tibor Meszaros Remove CSS_STICKY_POSITION guards https://bugs.webkit.org/show_bug.cgi?id=132676 Reviewed by Simon Fraser. * wtf/FeatureDefines.h: 2014-05-13 Simon Fraser [iOS WK2] background-attachment:fixed behaves very poorly https://bugs.webkit.org/show_bug.cgi?id=132881 Reviewed by Beth Dakin. Remove ENABLE_FAST_MOBILE_SCROLLING. Ports can use the fixedBackgroundsPaintRelativeToDocument setting now. * wtf/FeatureDefines.h: 2014-05-08 Alexey Proskuryakov Automatically zip document bundles used via File API https://bugs.webkit.org/show_bug.cgi?id=132713 Reviewed by Anders Carlsson. * wtf/FeatureDefines.h: Added ENABLE_FILE_REPLACEMENT for Mac. 2014-05-07 Filip Pizlo UNREACHABLE_FOR_PLATFORM() is meant to be a release crash. Rubber stamped by Mark Hahnenberg.. * wtf/Assertions.h: (UNREACHABLE_FOR_PLATFORM): 2014-05-06 Alberto Garcia There is no HW_AVAILCPU on FreeBSD, NetBSD, and OpenBSD https://bugs.webkit.org/show_bug.cgi?id=132542 Reviewed by Michael Saboff. Use sysconf() to get the number of processor cores. * wtf/NumberOfCores.cpp: (WTF::numberOfProcessorCores): 2014-05-04 Darin Adler RetainPtr: Use adoptCF function instead of AdoptCF constructor argument https://bugs.webkit.org/show_bug.cgi?id=80222 Reviewed by Alexey Proskuryakov. All the clients are gone, so we can now remove AdoptCF and AdoptNS. * wtf/RetainPtr.h: Removed the public constructors that let you specify AdoptCF and AdoptNS. Instead, made the adoptCF and adoptNS functions be friends and use a private constructor that takes an Adopt argument. (WTF::adoptCF): Moved the Objective-C class check in here. (WTF::adoptNS): Moved the code to deal with the CFRetain for garbage collection in here; it used to be spread across the constructor and adoptNSReference. 2014-05-04 Andreas Kling Optimize JSRopeString for resolving directly to AtomicString. Add AtomicString::find([LU]Char*, unsigned length) helpers for finding an existing AtomicString without a StringImpl on hand. Reviewed by Filip Pizlo. * wtf/text/AtomicString.h: * wtf/text/AtomicString.cpp: (WTF::AtomicString::find): 2014-05-01 Brent Fulgham Fix handling of attributes prior to compiling shader https://bugs.webkit.org/show_bug.cgi?id=132430 Reviewed by Dean Jackson. WebGL programs that called bindAttribLocations prior to compiling shader sources would perform the bind using the non-hashed symbol name, but would later create the attributes as hashed names. Consequently, the program would refer to attributes that were never actually part of any shader, resulting in some amazing display artifacts. This patch adds a dictionary of hashed symbol names so that we can tell the WebGL program the proper name that will be used when the shader is eventually compiled, allowing the WebGL program to link against the proper symbol after compiling and linking completes. * wtf/HexNumber.h: (WTF::appendUnsigned64AsHex): Add uint64_t-compatible hex->string converter. 2014-04-30 Geoffrey Garen Link against bmalloc in production builds https://bugs.webkit.org/show_bug.cgi?id=132413 Reviewed by Sam Weinig. Production builders have been configured to handle this, so let's build it. * Configurations/WTF.xcconfig: 2014-05-01 Ryuan Choi [EFL] There are many warnings with software backend https://bugs.webkit.org/show_bug.cgi?id=132422 Reviewed by Gyuyoung Kim. * wtf/efl/EflTypedefs.h: Added Ecore_X_Window typedef 2014-04-30 Simon Fraser Remove ENABLE_PLUGIN_PROXY_FOR_VIDEO https://bugs.webkit.org/show_bug.cgi?id=132396 Reviewed by Eric Carlson. Remove ENABLE_PLUGIN_PROXY_FOR_VIDEO and related code. * wtf/FeatureDefines.h: 2014-04-30 Víctor Manuel Jáquez Leal [GTK][GStreamer] Remove unnecessary GLIB_CHECK_VERSION #ifdefs https://bugs.webkit.org/show_bug.cgi?id=132390 Reviewed by Philippe Normand. Since EFL port use GLib 2.38 and GTK+, 2.33.2, I assume it is OK remove, in GTK+ and GST, the existing glib version guards. This code was rollback from r149879 because Qt MIPS used it. But since Qt is gone, it is safe to remove now. * wtf/gobject/GRefPtr.cpp: (WTF::refGPtr): Deleted. (WTF::derefGPtr): Deleted. 2014-04-29 Alex Christensen [WinCairo] Switch video from GStreamer to Media Foundation. https://bugs.webkit.org/show_bug.cgi?id=132358 Reviewed by Brent Fulgham. * WTF.vcxproj/WTF.vcxproj: Removed dependencies on GStreamer. * wtf/Platform.h: Use Media Foundation instead of GStreamer and GLib. 2014-04-29 Filip Pizlo Unreviewed, fix cloop build. * wtf/Platform.h: 2014-04-29 Michael Saboff For DARWIN platforms, use system temporary directory for DataLog output https://bugs.webkit.org/show_bug.cgi?id=132346 Reviewed by Geoffrey Garen. Added code to call confstr() to access the process's temporary directory to use that location instead of /tmp/. Put the code behind #ifdef DATA_LOG_TO_DARWIN_TEMP_DIR. * wtf/DataLog.cpp: (WTF::initializeLogFileOnce): 2014-04-25 Filip Pizlo Figure out how many cores are available for realsies. Rubber stamped by Andreas Kling. HW_AVAILCPU is more canonical than HW_NCPU. For example if you use hacks to tell Darwin to make it seem like there are fewer CPUs, HW_AVAILCPU will change but HW_NCPU won't. HW_NCPU doesn't reflect how much actual paralellism you'll get; it's merely reporting facts about the machine you're running on. HW_AVAILCPU is almost always what WebKit wants since it uses this information to decide how many threads to launch for various things. * wtf/NumberOfCores.cpp: (WTF::numberOfProcessorCores): 2014-04-22 Brent Fulgham [Win] Support Python 2.7 in Cygwin https://bugs.webkit.org/show_bug.cgi?id=132023 Reviewed by Michael Saboff. * WTF.vcxproj/WTFGenerated.make: Use proper path to Python. 2014-04-21 Eric Carlson [Mac] implement WebKitDataCue https://bugs.webkit.org/show_bug.cgi?id=131799 Reviewed by Dean Jackson. * wtf/FeatureDefines.h: Define ENABLE_DATACUE_VALUE. 2014-04-21 Darin Adler Add HashSet::takeAny https://bugs.webkit.org/show_bug.cgi?id=131928 Reviewed by Benjamin Poulain. * wtf/HashSet.h: Added an overload of take that takes an iterator, and used it to implement both the existing take and new takeAny functions. 2014-04-20 Andreas Kling Speed up jsStringWithCache() through WeakGCMap inlining. Add HashMap::fastAdd(), which is the same as add() except we'll tell the compiler to aggressively inline it. Reviewed by Darin Adler. * wtf/HashMap.h: * wtf/HashTable.h: 2014-04-19 Filip Pizlo Make it easier to check if an integer sum would overflow https://bugs.webkit.org/show_bug.cgi?id=131900 Reviewed by Darin Adler. * wtf/CheckedArithmetic.h: (WTF::checkedSum): (WTF::sumOverflows): 2014-04-18 Commit Queue Unreviewed, rolling out r167527. https://bugs.webkit.org/show_bug.cgi?id=131883 Broke 32-bit build (Requested by ap on #webkit). Reverted changeset: "[Mac] implement WebKitDataCue" https://bugs.webkit.org/show_bug.cgi?id=131799 http://trac.webkit.org/changeset/167527 2014-04-18 Eric Carlson [Mac] implement WebKitDataCue https://bugs.webkit.org/show_bug.cgi?id=131799 Reviewed by Dean Jackson. * wtf/FeatureDefines.h: Define ENABLE_DATACUE_VALUE. 2014-04-18 Martin Robinson Remove DynamicAnnotations.h? https://bugs.webkit.org/show_bug.cgi?id=131754 Reviewed by Simon Fraser. This file, which helped support tools like Valgrind was unused. * WTF.vcxproj/WTF.vcxproj: Remove references to the files. * WTF.vcxproj/WTF.vcxproj.filters: Remove references to the files. * WTF.xcodeproj/project.pbxproj: Remove references to the files. * wtf/CMakeLists.txt: Remove references to the files. * wtf/DynamicAnnotations.cpp: Removed. * wtf/DynamicAnnotations.h: Removed. * wtf/ThreadSafeRefCounted.h: Remove references to the files. * wtf/text/StringStatics.cpp: Remove references to the files. 2014-04-18 Philippe Normand Remove NETWORK_INFO support https://bugs.webkit.org/show_bug.cgi?id=131841 Reviewed by Gyuyoung Kim. * wtf/FeatureDefines.h: 2014-04-17 Filip Pizlo Don't include CompilationThread.h from StringImpl.h https://bugs.webkit.org/show_bug.cgi?id=131817 Reviewed by Simon Fraser. * wtf/CompilationThread.h: * wtf/StdLibExtras.h: * wtf/text/StringImpl.h: 2014-04-17 Darin Adler Use HashMap and Vector instead of deprecatedDeleteAllValues https://bugs.webkit.org/show_bug.cgi?id=73757 Reviewed by Brent Fulgham. * wtf/Vector.h: (WTF::deprecatedDeleteAllValues): Deleted. 2014-04-17 Darin Adler Add separate flag for IndexedDatabase in workers since the current implementation is not threadsafe https://bugs.webkit.org/show_bug.cgi?id=131785 rdar://problem/16003108 Reviewed by Brady Eidson. * wtf/FeatureDefines.h: Added INDEXED_DATABASE_IN_WORKERS. 2014-04-16 Simon Fraser Don't include CryptographicallyRandomNumber.h in StringImpl.h https://bugs.webkit.org/show_bug.cgi?id=131772 Reviewed by Sam Weinig. * wtf/text/StringImpl.h: 2014-04-16 Gavin Barraclough Update to pthread QoS SPI https://bugs.webkit.org/show_bug.cgi?id=131753 Rubber stamped by Benjamin Poulain * wtf/ThreadingPthreads.cpp: (WTF::setCurrentThreadQOSUtility): 2014-04-14 Geoffrey Garen WTF should have an optional mbmalloc target so we can benchmark FastMalloc https://bugs.webkit.org/show_bug.cgi?id=131662 Reviewed by Darin Adler. * WTF.xcodeproj/project.pbxproj: Added the target. * wtf/mbmalloc.cpp: Added. Implements the libmbmalloc.dylib API required by MallocBench. 2014-04-16 Darin Adler Make Vector::takeLast work with move-only types (and optimize for types where move is faster) https://bugs.webkit.org/show_bug.cgi?id=131735 Reviewed by Alexey Proskuryakov. * wtf/Vector.h: (WTF::Vector::takeLast): Added a missing std::move. All the other take functions have it. 2014-04-14 Mark Lam monotonicallyIncreasingTime() should only initialize its static timebaseInfo once. Reviewed by Filip Pizlo. The current initialization of the static field is not thread safe. * wtf/CurrentTime.cpp: (WTF::monotonicallyIncreasingTime): 2014-04-14 Benjamin Poulain [JSC] Improve the call site of string comparison in some hot path https://bugs.webkit.org/show_bug.cgi?id=131605 Reviewed by Darin Adler. * wtf/text/StringImpl.cpp: (WTF::stringImplContentEqual): Inline that function to reduce the call overhead for JSC. This is only inlined twice, it is not catastrophic for our binary. 2014-04-13 Andy Estes Relax adoption requirements of RefCounted objects that are NeverDestroyed https://bugs.webkit.org/show_bug.cgi?id=131593 Reviewed by Dan Bernstein. RefCounted objects that are created by NeverDestroyed<> won't have a RefPtr adopting them, so call relaxAdoptionRequirements(). * wtf/NeverDestroyed.h: (WTF::NeverDestroyed::NeverDestroyed): (WTF::NeverDestroyed::MaybeRelax::MaybeRelax): 2014-04-10 Brent Fulgham [Win] Clean up some 64-bit warnings from Visual Studio analyzer https://bugs.webkit.org/show_bug.cgi?id=131514 Reviewed by Tim Horton. * WTF.vcxproj/WTF.vcxproj: Use correct platform settings for 64-bit build. * config.h: Ditto. * wtf/CurrentTime.cpp: (WTF::highResUpTime): Resolve warning about deprecated API. * wtf/StackBounds.cpp: (WTF::StackBounds::initialize): Silence warning about an uninitialized variable. 2014-04-09 Geoffrey Garen Rolled back in r166972. This time, we conditionally exclude linking against bmalloc in Production builds. Production builds will not be able to link against bmalloc until the Production build system has been updated to build bmalloc. WTF should link against bmalloc https://bugs.webkit.org/show_bug.cgi?id=131403 Reviewed by Mark Rowe. * Configurations/WTF.xcconfig: * WTF.xcodeproj/project.pbxproj: 2014-04-09 Geoffrey Garen Put bmalloc headers in the right place https://bugs.webkit.org/show_bug.cgi?id=131464 Reviewed by Mark Rowe. * wtf/FastMalloc.cpp: Use "" syntax so we can find our headers in /usr/local/include/bmalloc/. 2014-04-09 Geoffrey Garen Rolled back out r166972. The production buildbots are still broken because the build-root script doesn't build bmalloc. * WTF.xcodeproj/project.pbxproj: 2014-04-09 Geoffrey Garen Rolled back in r166972. The iOS buildbot's scripts have been updated to build bmalloc, so the build should now succeed on the bot. Also renamed "Frameworks" to "Libraries" as suggested in a review comment. WTF should link against bmalloc https://bugs.webkit.org/show_bug.cgi?id=131403 Reviewed by Michael Saboff. This is required to build successfullly with bmalloc enabled. * WTF.xcodeproj/project.pbxproj: 2014-04-08 Geoffrey Garen Stop linking WTF against bmalloc. Reviewed by Enrica Casucci. This seems to have broken an iOS buildbot script. Disable it for now until we can fix the script. * WTF.xcodeproj/project.pbxproj: 2014-04-08 Geoffrey Garen WTF should link against bmalloc https://bugs.webkit.org/show_bug.cgi?id=131403 Reviewed by Michael Saboff. This is required to build successfullly with bmalloc enabled. * WTF.xcodeproj/project.pbxproj: 2014-04-08 Geoffrey Garen Added a bmalloc back-end for FastMalloc https://bugs.webkit.org/show_bug.cgi?id=131387 Reviewed by Andreas Kling. We'll need to rethink some things if we adopt this back-end. For example, fastMallocSize() and fastMallocGoodSize() are no longer real things. But, this is enough to test for now. * wtf/FastMalloc.cpp: (WTF::fastMalloc): (WTF::fastCalloc): (WTF::fastRealloc): (WTF::fastFree): (WTF::fastMallocSize): (WTF::fastMallocGoodSize): (WTF::tryFastMalloc): (WTF::tryFastRealloc): (WTF::tryFastCalloc): (WTF::releaseFastMallocFreeMemory): (WTF::fastMallocStatistics): 2014-04-08 Andres Gomez [GTK] [EFL] Build fails with GCC < 4.8.x https://bugs.webkit.org/show_bug.cgi?id=130585 Reviewed by Martin Robinson. The behavior in lower versions of GCC seem to be related to http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#2132. Provided explicit casts for the failing ambiguous overloads. * wtf/gtk/MainThreadGtk.cpp: (WTF::scheduleDispatchFunctionsOnMainThread): * wtf/gtk/RunLoopGtk.cpp: (WTF::RunLoop::wakeUp): Provided lambda with a RefPtr instead of ref and de-referring. 2014-04-04 Mark Lam Date object needs to check for ES5 15.9.1.14 TimeClip limit. Reviewed by Mark Hahnenberg. * wtf/DateMath.cpp: - Moved the definition of maxECMAScriptTime to the .h file so that we can use it in other files as well. (WTF::msToYear): - Removed a stale comment for parseDateFromNullTerminatedCharacters(). * wtf/DateMath.h: 2014-04-04 Mark Hahnenberg Enhanced GC logging https://bugs.webkit.org/show_bug.cgi?id=131246 Reviewed by Geoff Garen. Remove OBJECT_MARK_LOGGING * wtf/FeatureDefines.h: * wtf/Platform.h: 2014-04-03 Zsolt Borbely [EFL] Enable CSS JIT again, it works fine after r166666. Reviewed by Csaba Osztrogonác. * wtf/Platform.h: 2014-04-03 Javier Fernandez [GTK][Cmake] Enable CSS JIT https://bugs.webkit.org/show_bug.cgi?id=131022 Reviewed by Martin Robinson. * wtf/Platform.h: Enable CSS JIT for GTK port. 2014-04-02 Frédéric Wang Operator stretching: read the Open Type MATH table https://bugs.webkit.org/show_bug.cgi?id=130324 Reviewed by Chris Fleizach. * wtf/Platform.h: enable OPENTYPE_MATH on platforms that can read OpenType tables. 2014-04-02 Alex Christensen [WinCairo] Build fix with GMainLoopSource. https://bugs.webkit.org/show_bug.cgi?id=131089 Reviewed by Carlos Garcia Campos. * wtf/gobject/GMainLoopSource.cpp: Only compile if glib is used, which fixes compile errors with video disabled in WinCairo. * wtf/gobject/GMainLoopSource.h: Export the GMainLoopSource functions to WTF.dll to link with where they are called in the GStreamer code. Also removed spaces to appease style bot. 2014-04-01 Zsolt Borbely [EFL] REGRESSION(166569): It made DoYouEvenBench/Full.html, CSS/QuerySelector.html and Dromaeo performance tests crash https://bugs.webkit.org/show_bug.cgi?id=131039 Reviewed by Csaba Osztrogonác. * wtf/Platform.h: Disable CSS JIT on EFL until proper fix. 2014-04-01 Commit Queue Unreviewed, rolling out r166583. https://bugs.webkit.org/show_bug.cgi?id=131040 It's causing frequent crashes when running Layout Tests (Requested by svillar on #webkit). Reverted changeset: "[GTK][Cmake] Enable CSS JIT" https://bugs.webkit.org/show_bug.cgi?id=131022 http://trac.webkit.org/changeset/166583 2014-04-01 Javier Fernandez [GTK][Cmake] Enable CSS JIT https://bugs.webkit.org/show_bug.cgi?id=131022 Reviewed by Martin Robinson. * wtf/Platform.h: Enable CSS JIT for GTK port. 2014-04-01 Gyuyoung Kim [CMake][EFL] Enable CSS JIT https://bugs.webkit.org/show_bug.cgi?id=131010 Reviewed by Benjamin Poulain. * wtf/Platform.h: Enable CSS JIT for EFL port. 2014-03-31 Dean Jackson Remove WEB_ANIMATIONS https://bugs.webkit.org/show_bug.cgi?id=130989 Reviewed by Simon Fraser. Remove this feature flag until we plan to implement. * wtf/FeatureDefines.h: 2014-03-31 Alex Christensen Preparation for using Soup on Windows. https://bugs.webkit.org/show_bug.cgi?id=130615 Reviewed by Carlos Garcia Campos. * WTF.vcxproj/WTF.vcxproj: * WTF.vcxproj/WTF.vcxproj.filters: Add all gobject source files in WinCairo build. * wtf/gobject/GRefPtr.h: Export refGPtr and derefGPtr overloads in WTF.dll to fix linker errors with WebKit.dll when using soup. 2014-03-31 Zan Dobersek Use std::unique_ptr in WTF::CompressedVector, WTF::GenericCompressedData https://bugs.webkit.org/show_bug.cgi?id=130737 Switch to using std::unique_ptr instead of OwnPtr and PassOwnPtr for the CompressedVector and GenericCompressedData classes. * wtf/Compression.cpp: (WTF::GenericCompressedData::create): * wtf/Compression.h: (WTF::CompressedVector::create): (WTF::CompressibleVector::decompressIfNecessary): 2014-03-28 Alexey Proskuryakov [Mac] Enable async text input implementation https://bugs.webkit.org/show_bug.cgi?id=130856 Reviewed by Sam Weinig. * wtf/Platform.h: Added a USE macro definition. 2014-03-28 peavo@outlook.com Null pointer crash in String::append(UChar). https://bugs.webkit.org/show_bug.cgi?id=130900 Reviewed by Michael Saboff. * wtf/text/WTFString.cpp: (WTF::String::append): Check and initialize m_impl member first, to avoid null pointer crash. 2014-03-27 Commit Queue Unreviewed, rolling out r166360. https://bugs.webkit.org/show_bug.cgi?id=130869 Seems to have broken PLT (Requested by ap on #webkit). Reverted changeset: "Connection::dispatchOneMessage() can be re-entered while handling Cmd-key menu" https://bugs.webkit.org/show_bug.cgi?id=130767 http://trac.webkit.org/changeset/166360 2014-03-27 Alexey Proskuryakov Connection::dispatchOneMessage() can be re-entered while handling Cmd-key menu equivalents, ASSERT(!_data->_keyDownEventBeingResent) https://bugs.webkit.org/show_bug.cgi?id=130767 Reviewed by Darin Adler. Changed RunLoop to wake up and fire timers only in default run loop mode by default, and added an ability to add more modes (can't use AppKit symbols in WTF). In addition to this bug, the change also blocks modal alerts from appearing under menus during menu tracking. * wtf/RunLoop.h: * wtf/cf/RunLoopCF.cpp: (WTF::RunLoop::RunLoop): (WTF::RunLoop::addModeForWakeUpAndTimers): (WTF::RunLoop::TimerBase::start): 2014-03-26 Zan Dobersek Unreviewed. Removing the remaining Automake cruft. * GNUmakefile.list.am: Removed. 2014-03-25 Martin Robinson [GTK] Remove the autotools build https://bugs.webkit.org/show_bug.cgi?id=130717 Reviewed by Anders Carlsson. * GNUmakefile.am: Removed. * config.h: Removed references to the autotools configure file. 2014-03-25 Gabor Rapcsanyi [ARM64] GCC generates wrong code with -O2 flag in WTF::weakCompareAndSwap https://bugs.webkit.org/show_bug.cgi?id=130500 Reviewed by Filip Pizlo. Set the first operand to the exact register in the inline assembly with GCC. * wtf/Atomics.h: (WTF::weakCompareAndSwap): 2014-03-25 Gabor Rapcsanyi [EFL] Add ARM64 build support https://bugs.webkit.org/show_bug.cgi?id=130506 Rubber stamped by Gyuyoung Kim. * wtf/Platform.h: Set WTF_CPU_ARM64 when __aarch64__ is defined. 2014-03-24 Andy Estes Fix the iOS build. * wtf/ThreadingPthreads.cpp: (WTF::createThreadInternal): (WTF::setCurrentThreadQOSUtility): 2014-03-24 Gavin Barraclough Add support for thread QoS https://bugs.webkit.org/show_bug.cgi?id=130688 Speculative EFL build fix. * wtf/ThreadingPthreads.cpp: (WTF::setCurrentThreadQOSUtility): 2014-03-24 Gavin Barraclough Add support for thread QoS https://bugs.webkit.org/show_bug.cgi?id=130688 Reviewed by Andreas Kling. * wtf/FastMalloc.cpp: (WTF::TCMalloc_PageHeap::runScavengerThread): - block freeing is a utility activity. * wtf/Threading.h: - declaration. * wtf/ThreadingPthreads.cpp: (WTF::createThreadInternal): - default to interactive. (WTF::setCurrentThreadQOSUtility): - implementation. * wtf/ThreadingWin.cpp: (WTF::setCurrentThreadQOSUtility): - no-op implementation. 2014-03-23 Hyowon Kim Move all EFL typedefs into EflTypedefs.h. https://bugs.webkit.org/show_bug.cgi?id=130511 Reviewed by Gyuyoung Kim. * wtf/Platform.h: include EflTypedefs.h. * wtf/efl/EflTypedefs.h: Added. * wtf/efl/RefPtrEfl.h: Remove EFL typedefs. 2014-03-22 Darin Adler Remove String::deprecatedCharacters https://bugs.webkit.org/show_bug.cgi?id=126854 Reviewed by Sam Weinig. * wtf/text/StringBuilder.cpp: (WTF::StringBuilder::reifyString): Removed code to update 16-bit shadow. * wtf/text/StringBuilder.h: Removed deprecatedCharacters. (WTF::StringBuilder::StringBuilder): Removed m_valid16BitShadowLength. (WTF::StringBuilder::clear): Removed code to clear m_valid16BitShadowLength. (WTF::StringBuilder::swap): Removed code to swap m_valid16BitShadowLength. * wtf/text/StringImpl.cpp: (WTF::StringImpl::~StringImpl): Removed code to free m_copyData16. (WTF::StringImpl::upper): Use StringView::upconvertedCharacters for slow case. (WTF::StringImpl::lower): Ditto. (WTF::StringImpl::find): Use characters8/16 rather than deprecatedCharacters. Added an 8-bit code path to one of the overloads. Might want to revisit later to decide whether to use templates instead of copy/paste, or even use StringView to cut down on duplicate code paths. (WTF::StringImpl::findIgnoringCase): Ditto. (WTF::StringImpl::sizeInBytes): Remove code to handle has16BitShadow case. (WTF::equalIgnoringNullity): Added. To be called by the Vector template in the header. * wtf/text/StringImpl.h: Removed deprecatedCharacters, has16BitShadow, upconvertCharacters, getData16SlowCase, s_hashFlagHas16BitShadow, and m_copyData16. (WTF::equalIgnoringNullity): Changed the template function into an inline that calls a non-inline helper function. The non-inline function handles both 8-bit and 16-bit strings. * wtf/text/StringView.h: (WTF::StringView::StringView): Added an overload so we can make one of these directly from a StringImpl without first wrapping it in a string. Added an adapter so we can use StringView as part of string concatenation. Added an append function so we can append to a Vector. * wtf/text/WTFString.cpp: (WTF::String::append): Use StringView::getCharactersWithUpconvert. Also changed single-character append so it won't always turn an 8-bit string into a 16-bit one. (WTF::String::insert): Removed one insert overload and changed the other to use StringView::getCharactersWithUpconvert. (WTF::String::truncate): Changed to use StringImpl::substring. (WTF::String::percentage): Added characters8/16 paths instead of using deprecatedCharacters. * wtf/text/WTFString.h: Removed deprecatedCharacters, getCharactersWithUpconvert, insert(UChar*, unsigned, unsigned), and the append overload for Vector. 2014-03-20 Darin Adler Fix a header guard mistake (harmless but clearly wrong) https://bugs.webkit.org/show_bug.cgi?id=130559 Reviewed by Andreas Kling. * wtf/text/StringConcatenate.h: Correct the macro name in the header guard. 2014-03-20 Hyowon Kim Move to using std::unique_ptr for EFL objects. https://bugs.webkit.org/show_bug.cgi?id=129853 Reviewed by Gyuyoung Kim. EflUniquePtr is a template alias of std::unique_ptr with a custom deleter for each Efl Objects, which is motivated by GUniquePtr. This patch replaces uses of OwnPtr and PassOwnPtr for Efl objects with EflUniquePtr. * wtf/OwnPtrCommon.h: * wtf/PlatformEfl.cmake: * wtf/RunLoop.h: * wtf/efl/MainThreadEfl.cpp: (WTF::pipeObject): (WTF::initializeMainThreadPlatform): * wtf/efl/OwnPtrEfl.cpp: Removed. * wtf/efl/RunLoopEfl.cpp: (WTF::RunLoop::RunLoop): * wtf/efl/UniquePtrEfl.h: Added. (WTF::EflPtrDeleter::operator()): 2014-03-20 Gavin Barraclough Remove IdentifierTable typedef, isIdentifier() https://bugs.webkit.org/show_bug.cgi?id=130533 Rubber stamped by Geoff Garen. Code should use AtomicStringTable, isAtomic() directly. * wtf/WTFThreadData.h: (WTF::WTFThreadData::setCurrentAtomicStringTable): (WTF::WTFThreadData::resetCurrentAtomicStringTable): - removed IdentifierTypedef. * wtf/text/StringImpl.h: (WTF::StringImpl::flagIsAtomic): - renamed flagIsIdentfier -> flagIsAtomic. 2014-03-20 Gavin Barraclough Merge AtomicString, Identifier https://bugs.webkit.org/show_bug.cgi?id=128624 Reviewed by Geoff Garen. WTF::StringImpl currently supports two uniquing mechanism - AtomicString and Identifer - that is one too many. Remove Identifier in favour of AtomicString. Identifier had two interesting mechanisms that we preserve. (1) JSC API VMs each get their own string table, switch the string table on API entry/exit. (2) JSC caches a pointer to the string table on the VM to avoid a thread specific access. Adds a new AtomicString::add method to support this. * wtf/WTFThreadData.cpp: (WTF::WTFThreadData::WTFThreadData): - remove allocation of IdentifierTable. (WTF::WTFThreadData::~WTFThreadData): - remove deletion of IdentifierTable. * wtf/WTFThreadData.h: (WTF::WTFThreadData::atomicStringTable): - table is now switched by JSC API, return the current table. (WTF::WTFThreadData::currentIdentifierTable): - now returns the current AtomicStringTable. (WTF::WTFThreadData::setCurrentIdentifierTable): - now sets the current AtomicStringTable. (WTF::WTFThreadData::resetCurrentIdentifierTable): - now resets the AtomicStringTable. * wtf/text/AtomicString.cpp: (WTF::AtomicString::addSlowCase): - add without thread-specific access to access string table. * wtf/text/AtomicString.h: (WTF::AtomicString::addWithStringTableProvider): - add without thread-specific access (used by JSC, string table provided by VM or ExecState). * wtf/text/AtomicStringTable.cpp: (WTF::AtomicStringTable::create): - renamed m_atomicStringTable -> m_defaultAtomicStringTable. (WTF::AtomicStringTable::~AtomicStringTable): (WTF::AtomicStringTable::destroy): - clearing of table moved from AtomicStringTable::destroy to destructor. * wtf/text/AtomicStringTable.h: - added destructor. * wtf/text/StringImpl.cpp: (WTF::StringImpl::~StringImpl): - Identifers no longer exist; no need to remove them from IdentifierTable. * wtf/text/StringImpl.h: (WTF::StringImpl::StringImpl): - removed s_hashFlagIsIdentifier. (WTF::StringImpl::flagIsIdentifier): - s_hashFlagIsIdentifier -> s_hashFlagIsAtomic. (WTF::StringImpl::isIdentifier): - now synonymous to isAtomic(). * wtf/text/StringStatics.cpp: (WTF::StringImpl::hashAndFlagsForEmptyUnique): - removed s_hashFlagIsIdentifier. 2014-03-20 Zan Dobersek Unreviewed Clang build fix for the GTK port after r165952. * wtf/gobject/GMainLoopSource.h: Include the header for the std::function<> objects. 2014-03-18 Carlos Garcia Campos [GLIB] Add GMainLoopSource class to wrap idle and timeout sources https://bugs.webkit.org/show_bug.cgi?id=130027 Reviewed by Martin Robinson. GLib main loop sources like idle and timeouts are sometimes unconvenient to use and it's very common to forget canceling the source when the object is destroyed or reset the source ID in the callback when called. GMainLoopSource is a wrapper class to make it easier to handle sources and also to avoid those typical mistakes. It forces to create sources with a name and the user doesn't have to deal with the source ID anymore. The source is cancelled when the object is deleted or when a new source is scheduled. It uses std::function for callbacks so that we no longer need to use the "proxy" static callbacks either. We can use std::bind to use a function pointer or a member or even lambda functions. It also handles repeating sources automatically depending on whether the given function returns a bool or not. * GNUmakefile.list.am: * wtf/PlatformEfl.cmake: * wtf/PlatformGTK.cmake: * wtf/RunLoop.h: * wtf/gobject/GMainLoopSource.cpp: Added. (WTF::GMainLoopSource::createAndDeleteOnDestroy): (WTF::GMainLoopSource::GMainLoopSource): (WTF::GMainLoopSource::~GMainLoopSource): (WTF::GMainLoopSource::cancel): (WTF::GMainLoopSource::reset): (WTF::GMainLoopSource::scheduleIdleSource): (WTF::GMainLoopSource::schedule): (WTF::GMainLoopSource::scheduleTimeoutSource): (WTF::GMainLoopSource::scheduleAfterDelay): (WTF::GMainLoopSource::voidCallback): (WTF::GMainLoopSource::boolCallback): (WTF::GMainLoopSource::socketCallback): (WTF::GMainLoopSource::destroy): (WTF::GMainLoopSource::voidSourceCallback): (WTF::GMainLoopSource::boolSourceCallback): (WTF::GMainLoopSource::socketSourceCallback): * wtf/gobject/GMainLoopSource.h: Added. (WTF::GMainLoopSource::isScheduled): * wtf/gtk/MainThreadGtk.cpp: (WTF::scheduleDispatchFunctionsOnMainThread): * wtf/gtk/RunLoopGtk.cpp: (WTF::RunLoop::wakeUp): (WTF::RunLoop::TimerBase::TimerBase): (WTF::RunLoop::TimerBase::start): (WTF::RunLoop::TimerBase::stop): (WTF::RunLoop::TimerBase::isActive): 2014-03-19 Gavin Barraclough https://bugs.webkit.org/show_bug.cgi?id=130494 EmptyUnique strings are Identifiers/Atomic Reviewed by Geoff Garen. EmptyUnique strings should set the Identifier/Atomic flag. * wtf/text/AtomicString.h: (WTF::AtomicString::add): - Previously we assumed the only StringImpl that was validly allowed to claim to be Atomic but not be in a table was the canonical empty string. Now that EmptyUniques are also marked Atomic, all empty strings may pass this condition. * wtf/text/StringImpl.cpp: (WTF::StringImpl::~StringImpl): - EmptyUnique strings are not in the Atomic/Identfiier tabels, so don't need removing. * wtf/text/StringImpl.h: (WTF::StringImpl::StringImpl): - Change EmptyUnique constructor to call hashAndFlagsForEmptyUnique. * wtf/text/StringStatics.cpp: (WTF::StringImpl::hashAndFlagsForEmptyUnique): - Allocate a sequential hash code (this should be just as good for distribution & better for debugging than the random value) and set flags, now including Atomic & Identifier. 2014-03-19 Gavin Barraclough Small cleanup of empty string https://bugs.webkit.org/show_bug.cgi?id=130438 Reviewed by Anders Carlson. The empty string is weird becuase it is used as the impl for an AtomicString, but isAtomic() returns false. Also, we set a valid pointer for the characters pointer due to an old PCRE bug; remove this. Also, we currently only create one 'static' string, the empty string. Adding more might break assumtions, inhibit the constructor from being used to create other static strings for now. * wtf/text/AtomicString.h: (WTF::AtomicString::add): - update assert. * wtf/text/StringImpl.h: (WTF::StringImpl::StringImpl): - Merge ConstructStaticString constructors, only allow the empty static string to be constructed. * wtf/text/StringStatics.cpp: (WTF::StringImpl::empty): - ConstructStaticString -> ConstructEmptyString, remove arguments, DEPRECATED_DEFINE_STATIC_LOCAL -> NeverDestroyed. 2014-03-18 Darin Adler Reduce use of deprecatedCharacters in WebCore https://bugs.webkit.org/show_bug.cgi?id=130318 Reviewed by Andreas Kling. * wtf/text/WTFString.h: Export another overload of charactersToFloat since it's used in WebCore now. * wtf/text/cf/StringViewCF.cpp: Change so this can build on Windows. * WTF.vcxproj/WTF.vcxproj: Added StringViewCF.cpp. * WTF.vcxproj/WTF.vcxproj.filters: Added StringViewCF.cpp. 2014-03-18 Filip Pizlo More FTL enabling. Rubber stamped by Dan Bernstein and Mark Hahnenberg. * wtf/Platform.h: 2014-03-17 Darin Adler Remove most uses of deprecatedCharacter in WTF https://bugs.webkit.org/show_bug.cgi?id=130317 Reviewed by Andreas Kling. Re-landing after fixing the "80 instead of 0x80" typo in equalLatin1WithUTF8. * wtf/text/AtomicString.cpp: (WTF::HashAndUTF8CharactersTranslator::equal): Add an 8-bit code path to the non-ASCII path. (WTF::SubstringTranslator8::hash): Added. (WTF::SubstringTranslator8::equal): Added. (WTF::SubstringTranslator16::hash): Renamed class. (WTF::SubstringTranslator16::equal): Ditto. (WTF::AtomicString::add): Added an 8-bit code path to the substring case. * wtf/text/Base64.cpp: (WTF::base64Decode): Added an 8 bit code path. (WTF::base64URLDecode): Ditto. * wtf/text/StringImpl.cpp: (WTF::StringImpl::find): Fixed a case that was incorrectly using characters16 without first using is8Bit. Need to return later to remove use of deprecatedCharacters. * wtf/unicode/UTF8.cpp: (WTF::Unicode::equalUTF16WithUTF8): Added a case for when the UTF-16 characters are ASCII. Also removed the aEnd argument, since the caller only calls this when the lengths are equal. (WTF::Unicode::equalLatin1WithUTF8): Added. * wtf/unicode/UTF8.h: Updated as described above. 2014-03-17 Commit Queue Unreviewed, rolling out r165721. https://bugs.webkit.org/show_bug.cgi?id=130367 It makes the debug bots flaky (Requested by benjaminp on #webkit). Reverted changeset: "Remove most uses of deprecatedCharacter in WTF" https://bugs.webkit.org/show_bug.cgi?id=130317 http://trac.webkit.org/changeset/165721 2014-03-17 Zan Dobersek Use RunLoop objects through references instead of pointers https://bugs.webkit.org/show_bug.cgi?id=130313 Reviewed by Andreas Kling. Make RunLoop::current() and RunLoop::main() return a RunLoop reference instead of a pointer. RunLoop::Holder now uses a Ref member. Timer and TimerBase constructors take in a RunLoop reference, with TimerBase now storing a RunLoop reference member instead of a pointer. Platform-specific bits of the RunLoop class are updated accordingly. * wtf/RunLoop.cpp: (WTF::RunLoop::Holder::Holder): (WTF::RunLoop::Holder::runLoop): (WTF::RunLoop::initializeMainRunLoop): (WTF::RunLoop::current): (WTF::RunLoop::main): (WTF::RunLoop::isMain): * wtf/RunLoop.h: (WTF::RunLoop::Timer::Timer): * wtf/cf/RunLoopCF.cpp: (WTF::RunLoop::run): (WTF::RunLoop::TimerBase::TimerBase): (WTF::RunLoop::TimerBase::start): * wtf/efl/RunLoopEfl.cpp: (WTF::RunLoop::TimerBase::TimerBase): * wtf/gtk/RunLoopGtk.cpp: (WTF::RunLoop::run): (WTF::RunLoop::TimerBase::TimerBase): (WTF::RunLoop::TimerBase::start): * wtf/win/RunLoopWin.cpp: (WTF::RunLoop::TimerBase::TimerBase): (WTF::RunLoop::TimerBase::start): (WTF::RunLoop::TimerBase::stop): (WTF::RunLoop::TimerBase::isActive): 2014-03-17 Tamas Gergely One more fix after r165725. Reviewed by Csaba Osztrogonác. * wtf/WTFThreadData.h: 2014-03-17 Tamas Gergely Buildfix after r165725 for non Mac platforms. Reviewed by Csaba Osztrogonác. * wtf/WTFThreadData.h: 2014-03-17 Andreas Kling [Mac] WTFThreadData should use _pthread_getspecific_direct(). Hack WTFThreadData to use a direct key for TLS access when available. This mechanism uses a dedicated segment register and is the same way we implement the fast path in FastMalloc. Reviewed by Darin Adler. * wtf/FastMalloc.cpp: * wtf/WTFThreadData.cpp: (WTF::WTFThreadData::createAndRegisterForGetspecificDirect): * wtf/WTFThreadData.h: (WTF::wtfThreadData): 2014-03-16 Darin Adler Remove most uses of deprecatedCharacter in WTF https://bugs.webkit.org/show_bug.cgi?id=130317 Reviewed by Andreas Kling. * wtf/text/AtomicString.cpp: (WTF::HashAndUTF8CharactersTranslator::equal): Add an 8-bit code path to the non-ASCII path. (WTF::SubstringTranslator8::hash): Added. (WTF::SubstringTranslator8::equal): Added. (WTF::SubstringTranslator16::hash): Renamed class. (WTF::SubstringTranslator16::equal): Ditto. (WTF::AtomicString::add): Added an 8-bit code path to the substring case. * wtf/text/Base64.cpp: (WTF::base64Decode): Added an 8 bit code path. (WTF::base64URLDecode): Ditto. * wtf/text/StringImpl.cpp: (WTF::StringImpl::find): Fixed a case that was incorrectly using characters16 without first using is8Bit. Need to return later to remove use of deprecatedCharacters. * wtf/unicode/UTF8.cpp: (WTF::Unicode::equalUTF16WithUTF8): Added a case for when the UTF-16 characters are ASCII. Also removed the aEnd argument, since the caller only calls this when the lengths are equal. (WTF::Unicode::equalLatin1WithUTF8): Added. * wtf/unicode/UTF8.h: Updated as described above. 2014-03-16 David Kilzer Follow-up: Fix undefined behavior in WTF::equal() in StringImpl.h for i386/x86_64 Reviewed by Darin Adler. * wtf/text/StringImpl.h: (WTF::loadUnaligned): Restore behavior prior to r165681 for compilers other than clang. 2014-03-16 Darin Adler Remove all uses of deprecatedCharacters from JavaScriptCore https://bugs.webkit.org/show_bug.cgi?id=130304 Reviewed by Anders Carlsson. * wtf/dtoa.h: (WTF::parseDouble): Added an overload that takes a StringView. 2014-03-15 Darin Adler Remove all uses of deprecatedCharacters from WebKit2 https://bugs.webkit.org/show_bug.cgi?id=130197 Reviewed by Andreas Kling. * wtf/text/StringView.h: Added new getCharactersWithUpconvert and upconvertedCharacters functions. These are useful for callers that need UTF-16. 2014-03-15 Darin Adler Try to fix EFL build. * wtf/ThreadingPthreads.cpp: (WTF::changeThreadPriority): Code in this function was setting the priority of the current thread instead of the passed-in thread. That was triggering an unused variable warning in the compiler used to build for EFL. Fixed by using the thread handle instead of pthread_self. 2014-03-15 Michael Saboff It should be possible to adjust DFG and FTL compiler thread priorities https://bugs.webkit.org/show_bug.cgi?id=130288 Reviewed by Filip Pizlo. Added ability to change thread priorities relative to its current priority. Created options to adjust the priority of the DFG and FTL compilation work thread pools. For two core systems, there might be three runnable threads, the main thread, the DFG compilation thread and the FTL compilation thread. With the same priority, the scheduler is free to schedule whatever thread it wants. By lowering the compilation threads, the main thread can run. Further tests may suggest better values for the new options, priorityDeltaOfDFGCompilerThreads and priorityDeltaOfFTLCompilerThreads. For a two-core device, this change has a net positive improvement of 1-3% across SunSpider, Octane, Kraken and AsmBench. * wtf/Threading.h: * wtf/ThreadingPthreads.cpp: (WTF::changeThreadPriority): * wtf/ThreadingWin.cpp: (WTF::changeThreadPriority): 2014-03-15 David Kilzer Fix undefined behavior in WTF::equal() in StringImpl.h for i386/x86_64 Reviewed by Geoff Garen. * wtf/text/StringImpl.h: (WTF::loadUnaligned): Add template method. (WTF::equal): Switch to using loadUnaligned<>(). 2014-03-14 Mark Rowe Fix the production build. Don't rely on USE_INTERNAL_SDK being set for the Production configuration since UseInternalSDK.xcconfig won't be at the expected relative path when working from installed source. * Configurations/Base.xcconfig: 2014-03-14 Maciej Stachowiak Replace "Apple Computer, Inc." with "Apple Inc." in copyright headers https://bugs.webkit.org/show_bug.cgi?id=130276 Reviewed by Simon Fraser. * wtf/ASCIICType.h: * wtf/AVLTree.h: * wtf/Assertions.cpp: * wtf/Assertions.h: * wtf/Atomics.cpp: * wtf/Atomics.h: * wtf/AutodrainedPool.h: * wtf/AutodrainedPoolMac.mm: * wtf/BoundsCheckedPointer.h: * wtf/CryptographicUtilities.cpp: * wtf/CryptographicallyRandomNumber.h: * wtf/CurrentTime.h: * wtf/Deque.h: * wtf/DisallowCType.h: * wtf/ExportMacros.h: * wtf/FeatureDefines.h: * wtf/GetPtr.h: * wtf/HashIterators.h: * wtf/Locker.h: * wtf/MainThread.cpp: * wtf/MainThread.h: * wtf/MathExtras.h: * wtf/MediaTime.cpp: * wtf/MediaTime.h: * wtf/MessageQueue.h: * wtf/MetaAllocator.cpp: * wtf/MetaAllocator.h: * wtf/MetaAllocatorHandle.h: * wtf/OSRandomSource.cpp: * wtf/OSRandomSource.h: * wtf/Platform.h: * wtf/RandomNumber.cpp: * wtf/RandomNumber.h: * wtf/RandomNumberSeed.h: * wtf/RedBlackTree.h: * wtf/RunLoopTimer.h: * wtf/RunLoopTimerCF.cpp: * wtf/SchedulePair.h: * wtf/SchedulePairCF.cpp: * wtf/SchedulePairMac.mm: * wtf/SegmentedVector.h: * wtf/StackBounds.h: * wtf/StaticConstructors.h: * wtf/StringExtras.h: * wtf/ThreadFunctionInvocation.h: * wtf/ThreadSafeRefCounted.h: * wtf/ThreadSpecific.h: * wtf/Threading.h: * wtf/ThreadingPrimitives.h: * wtf/ThreadingPthreads.cpp: * wtf/ThreadingWin.cpp: * wtf/WTFThreadData.cpp: * wtf/WTFThreadData.h: * wtf/efl/OwnPtrEfl.cpp: * wtf/mac/MainThreadMac.mm: * wtf/text/AtomicStringHash.h: * wtf/text/AtomicStringImpl.h: * wtf/text/Base64.h: * wtf/text/CString.cpp: * wtf/text/CString.h: * wtf/text/LChar.h: * wtf/text/cf/StringCF.cpp: * wtf/text/mac/StringMac.mm: * wtf/unicode/CharacterNames.h: * wtf/unicode/Collator.h: * wtf/unicode/CollatorDefault.cpp: * wtf/unicode/UTF8.cpp: * wtf/unicode/UTF8.h: * wtf/unicode/icu/CollatorICU.cpp: * wtf/win/MainThreadWin.cpp: 2014-03-14 Byungseon Shin Incorrect Date returned between March 1, 2034 and February 28, 2100. https://bugs.webkit.org/show_bug.cgi?id=130123 Reviewed by Mark Lam. Fix logic by using predefined Date APIs. * wtf/DateMath.cpp: (WTF::ymdhmsToSeconds): 2014-03-12 Sergio Villar Senin Rename DEFINE_STATIC_LOCAL to DEPRECATED_DEFINE_STATIC_LOCAL https://bugs.webkit.org/show_bug.cgi?id=129612 Reviewed by Darin Adler. For new code use static NeverDestroyed instead. * wtf/RunLoop.cpp: (WTF::RunLoop::current): * wtf/StdLibExtras.h: * wtf/ThreadingPthreads.cpp: (WTF::threadMapMutex): (WTF::threadMap): * wtf/efl/MainThreadEfl.cpp: (WTF::pipeObject): * wtf/text/StringStatics.cpp: (WTF::StringImpl::empty): 2014-03-13 Radu Stavila Webkit not building on XCode 5.1 due to garbage collection no longer being supported https://bugs.webkit.org/show_bug.cgi?id=130087 Reviewed by Mark Rowe. Disable garbage collection on macosx when not using internal SDK. * Configurations/Base.xcconfig: 2014-03-12 Ryuan Choi [EFL] Enable Parallel GC https://bugs.webkit.org/show_bug.cgi?id=130177 Reviewed by Geoffrey Garen. * wtf/Platform.h: Turn on ENABLE_PARALLEL_GC for the EFL build. 2014-03-12 Joseph Pecoraro Web Inspector: Disable REMOTE_INSPECTOR in earlier OS X releases https://bugs.webkit.org/show_bug.cgi?id=130118 Reviewed by Timothy Hatcher. * wtf/FeatureDefines.h: 2014-03-11 Brent Fulgham [Win] Unreviewed gardening. * wtf/MathExtras.h: VS2013 provides an lrint implementation. No need to implement our own. 2014-03-10 Jer Noble Improve WeakPtr operators. https://bugs.webkit.org/show_bug.cgi?id=130053 Reviewed by Andreas Kling. Replace the "operator!()" with an explicit bool operator. Add an "operator->()". * wtf/WeakPtr.h: (WTF::WeakPtr::operator bool): (WTF::WeakPtr::operator->): 2014-03-10 Brent Fulgham [Win] Pass environment to Pre-Build, Pre-Link, and Post-Build Stages. https://bugs.webkit.org/show_bug.cgi?id=130023. Reviewed by Dean Jackson. * WTF.vcxproj/WTF.proj: Avoid putting trailing slashes in system paths to avoid escaping during later string substitution. * WTF.vcxproj/build-generated-files.sh: Accept environment values passed by VS. 2014-03-10 Mark Hahnenberg Turn on GenGC on other 64-bit platforms https://bugs.webkit.org/show_bug.cgi?id=129258 Reviewed by Oliver Hunt. * wtf/Platform.h: 2014-03-07 peavo@outlook.com [Win64] Compile error after r165128. https://bugs.webkit.org/show_bug.cgi?id=129807 Reviewed by Mark Lam. * wtf/Platform.h: MSVC does not support computed goto. Also enabled COMPUTED_GOTO_OPCODES when !ENABLE(LLINT_C_LOOP). This is needed because the ASM LLINT operates like COMPUTED_GOTO_OPCODES, and relies on the related data structures being defined to support this. On Win32, the platform does not HAVE_COMPUTED_GOTO support, but does want ENABLE_COMPUTED_GOTO_OPCODES because it uses the ASM LLINT. 2014-03-06 Michael Saboff JSC should disable the JIT when building for ARMv7k https://bugs.webkit.org/show_bug.cgi?id=129829 Reviewed by Oliver Hunt. Added WTF_CPU_APPLE_ARMV7K CPU define. Disabled the JITs when that feature define is set. * wtf/Platform.h: 2014-03-06 Filip Pizlo Use the LLVM disassembler on ARM64 if we are enabling the FTL https://bugs.webkit.org/show_bug.cgi?id=129785 Reviewed by Geoffrey Garen. * wtf/Platform.h: 2014-03-05 peavo@outlook.com [Win32][LLINT] Crash when running JSC stress tests. https://bugs.webkit.org/show_bug.cgi?id=129429 Reviewed by Geoffrey Garen. * wtf/Platform.h: Enable LLINT on Win32. 2014-03-04 Zan Dobersek [GTK] Build the Udis86 disassembler https://bugs.webkit.org/show_bug.cgi?id=129679 Reviewed by Michael Saboff. * wtf/Platform.h: Also enable the Udis86 disassembler for the GTK port on Linux. 2014-03-02 Jaehun Lim [EFL] Remove m_initEfl from RunLoop. https://bugs.webkit.org/show_bug.cgi?id=129568 Reviewed by Gyuyoung Kim. We don't use m_initEfl except RunLoop constructor. * wtf/RunLoop.h: * wtf/efl/RunLoopEfl.cpp: (WTF::RunLoop::RunLoop): 2014-03-02 Darin Adler Cut down use of OwnPtr within WTF itself https://bugs.webkit.org/show_bug.cgi?id=129567 Reviewed by Sam Weinig. * wtf/RefCounted.h: Removed OwnPtr includes. * wtf/StreamBuffer.h: Removed OwnPtr includes and switched to use std::make_unique and std::unique_ptr instead. * wtf/Threading.cpp: Removed OwnPtr includes. * wtf/ThreadingPthreads.cpp: Ditto. * wtf/Vector.h: Ditto. 2014-02-26 Gavin Barraclough FastMalloc should use vm_page_shift intead of PAGE_SHIFT. https://bugs.webkit.org/show_bug.cgi?id=129370 Reviewed by Mark Rowe. "Doesn't this lead to the page map using fewer bits than it was before? It seems like this will cause some page addresses to no longer be representable in the map when using 4K pages. Am I missing something?" * wtf/FastMalloc.cpp: - bdash raises a valid point. This should make the TCMalloc_PageMap larger than absolutely necessary, rather than potentially too small. 2014-02-25 Gavin Barraclough FastMalloc should use vm_page_shift intead of PAGE_SHIFT. https://bugs.webkit.org/show_bug.cgi?id=129370 Reviewed by Geoff Garen. Previously we used PAGE_SHIFT to initialize kPageShift. Since this was a constant, it could be used to calculate other contants used in the code. Some of these values are used in the definition of certain data structures (specifiying the length of some array members). Make kPageShift & dependent properties variables setup during initialization. Add upper bound values (K_PAGE_SHIFT_MAX, K_NUM_CLASSES_MAX) for use in cases where we need a constant. * wtf/FastMalloc.cpp: (WTF::InitSizeClasses): - initialize kPageShift, kNumClasses, kPageSize, kMaxValidPages. (WTF::pages): - added ASSERT. (WTF::AllocationSize): - added ASSERT. (WTF::TCMalloc_PageHeap::FreeBytes): - added ASSERT. (WTF::TCMalloc_PageHeap::init): - COMPILE_ASSERT -> ASSERT (WTF::TCMalloc_PageHeap::scavenge): - added ASSERT. (WTF::TCMalloc_PageHeap::Carve): - added ASSERT. (WTF::mergeDecommittedStates): - added ASSERT. (WTF::TCMalloc_PageHeap::IncrementalScavenge): - added ASSERT. (WTF::TCMalloc_PageHeap::ReturnedBytes): - added ASSERT. (WTF::PagesToMB): - added ASSERT. (WTF::TCMalloc_PageHeap::GrowHeap): - added ASSERT. (WTF::TCMalloc_PageHeap::ReleaseFreeList): - kNumClasses -> K_NUM_CLASSES_MAX (WTF::TCMalloc_ThreadCache::enumerateFreeObjects): - added ASSERT. (WTF::TCMalloc_Central_FreeList::Init): - added ASSERT. (WTF::TCMalloc_Central_FreeList::ReleaseToSpans): - added ASSERT. (WTF::TCMalloc_Central_FreeList::EvictRandomSizeClass): - added ASSERT. (WTF::TCMalloc_Central_FreeList::MakeCacheSpace): - added ASSERT. (WTF::TCMalloc_Central_FreeList::InsertRange): - added ASSERT. (WTF::TCMalloc_Central_FreeList::Populate): - added ASSERT. (WTF::TCMalloc_ThreadCache::Init): - added ASSERT. (WTF::TCMalloc_ThreadCache::Cleanup): - added ASSERT. (WTF::TCMalloc_ThreadCache::Scavenge): - added ASSERT. (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary): - added ASSERT. 2014-02-24 Alex Christensen Disabled WebGL on WinCairo. Unreviewed. * wtf/FeatureDefines.h: Removed ENABLE_WEBGL definition for WinCairo port. WebGL has not worked on WinCairo since r163079 and it was not compiling with a recent ANGLE update. 2014-02-24 Mark Hahnenberg Turn GenGC on for 32-bit systems https://bugs.webkit.org/show_bug.cgi?id=128824 Reviewed by Geoffrey Garen. * wtf/Platform.h: 2014-02-21 Benjamin Poulain jsDocumentPrototypeFunctionGetElementById should not create an AtomicString for the function argument https://bugs.webkit.org/show_bug.cgi?id=128893 Reviewed by Darin Adler. AtomicString::find() is a special case optimized for the JavaScript bindings. The method can only be called under specific conditions. The method is renamed to findStringWithHash(). The new AtomicString::find is generic and does not require any propery on the input. * wtf/text/AtomicString.cpp: (WTF::AtomicString::findStringWithHash): (WTF::AtomicString::findSlowCase): * wtf/text/AtomicString.h: (WTF::AtomicString::find): 2014-02-20 Csaba Osztrogonác Add StackStats sources to cmake and autotools build files https://bugs.webkit.org/show_bug.cgi?id=129103 Reviewed by Anders Carlsson. * GNUmakefile.list.am: * wtf/CMakeLists.txt: 2014-02-20 Csaba Osztrogonác Get rid of redundant Platform.h includes https://bugs.webkit.org/show_bug.cgi?id=128817 Reviewed by Brent Fulgham. * wtf/Assertions.h: * wtf/Atomics.h: * wtf/ByteOrder.h: * wtf/DataLog.h: * wtf/DisallowCType.h: * wtf/DynamicAnnotations.h: * wtf/ExportMacros.h: * wtf/FastMalloc.h: * wtf/FlipBytes.h: * wtf/InlineASM.h: * wtf/PrintStream.h: * wtf/ProcessID.h: * wtf/Threading.h: * wtf/ThreadingPrimitives.h: 2014-02-19 Jon Honeycutt Crash in WTF::StringBuilder::append() https://bugs.webkit.org/show_bug.cgi?id=125817 Reviewed by Oliver Hunt. * wtf/text/StringBuilder.cpp: (WTF::expandedCapacity): Ensure that we return a new capacity of at least 'requiredLength' in the case where requiredLength is large. Also, use unsigned rather than size_t for the parameters and the return value, as callers pass unsigned arguments and treat the result as an unsigned int. 2014-02-19 Anders Carlsson Add WTF_MAKE_FAST_ALLOCATED to more classes https://bugs.webkit.org/show_bug.cgi?id=129064 Reviewed by Andreas Kling. * wtf/Bitmap.h: 2014-02-19 Zan Dobersek Make PrintStream::print() a variadic template https://bugs.webkit.org/show_bug.cgi?id=126388 Reviewed by Brent Fulgham. PrintStream::print() can be converted into a variadic template, printing the value of the first parameter and recursively calling itself until the single parameter version is used for printing the last value. * wtf/DataLog.h: (WTF::dataLog): Convert the function to a variadic template as well. * wtf/PrintStream.h: (WTF::PrintStream::print): * wtf/StringPrintStream.h: (WTF::toCString): Ditto. (WTF::toString): Ditto. 2014-02-19 Zan Dobersek Use std::swap() in HashTable::swap() https://bugs.webkit.org/show_bug.cgi?id=128995 Reviewed by Brent Fulgham. Use std::swap() to swap the member variable values of two HashTable objects in HashTable::swap(). * wtf/HashTable.h: (WTF::KeyTraits>::swap): 2014-02-19 Zan Dobersek SegmentedVector::append() should take in rvalue reference, forward it to Vector::uncheckedAppend() https://bugs.webkit.org/show_bug.cgi?id=128996 Reviewed by Brent Fulgham. * wtf/SegmentedVector.h: (WTF::SegmentedVector::append): Take in an rvalue reference of the object that's to be appended and then forward it to Vector::uncheckedAppend(). This avoids unnecessary copies in the current situation where a const lvalue is accepted and passed on. 2014-02-19 Dan Bernstein Simplify PLATFORM(MAC) && !PLATFORM(IOS) and similar expressions https://bugs.webkit.org/show_bug.cgi?id=129029 Reviewed by Mark Rowe. * wtf/FeatureDefines.h: * wtf/Platform.h: * wtf/Threading.cpp: * wtf/text/cf/StringImplCF.cpp: (garbageCollectionEnabled): 2014-02-18 Dan Bernstein PLATFORM(MAC) is true when building for iOS https://bugs.webkit.org/show_bug.cgi?id=129025 Reviewed by Mark Rowe. * wtf/Platform.h: Changed to define WTF_PLATFORM_MAC only on when building for OS X (but still not when WTF_PLATFORM_GTK or WTF_PLATFORM_EFL are defined). 2014-02-18 Joseph Pecoraro [iOS] Web Inspector: JSContext inspection crashes in isMainThread, uninitialized WebCoreWebThreadIsLockedOrDisabled https://bugs.webkit.org/show_bug.cgi?id=128959 Reviewed by David Kilzer. When JavaScriptCore is used without WebCore on iOS (e.g. JSContext) the WebCoreWebThread* functions will not be initialized. Avoid calling the function pointer if it is uninitialized. This was happening with remote inspection via StringImpl::createCFString for implicit NSString / WTFString conversion which uses isMainThread. * wtf/mac/MainThreadMac.mm: (WTF::webThreadIsUninitializedOrLockedOrDisabled): (WTF::isMainThread): (WTF::canAccessThreadLocalDataForThread): 2014-02-17 Filip Pizlo More ARM FTL glue https://bugs.webkit.org/show_bug.cgi?id=128948 Reviewed by Sam Weinig. * wtf/Platform.h: 2014-02-17 Anders Carlsson Remove ENABLE_GLOBAL_FASTMALLOC_NEW https://bugs.webkit.org/show_bug.cgi?id=127067 Reviewed by Geoffrey Garen. Remove the global operator new/operator delete overrides. Having ALWAYS_INLINE operators like we do is really undefined behavior according to the C++ standard and we've been lucky enough to get away with it so far, but any code that calls operator new/operator delete inside from the C++ standard library (not from headers that are included) will be mismatched and potentially crash. libc++ calls delete in it's std::thread implementation for example. The only supported way to override operator new and operator delete globally is to not use inline functions, but that would mean that any application using WebKit would not be able to provide custom operator new/operator delete functions so we'll just reuse the already existing infrastructure consisting of the WTF_MAKE_FAST_ALLOCATED macro. * wtf/FastMalloc.cpp: (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary): * wtf/FastMalloc.h: * wtf/Platform.h: 2014-02-17 Ryan Lortie Enable DFG_JIT on FreeBSD https://bugs.webkit.org/show_bug.cgi?id=128898 Reviewed by Csaba Osztrogonác. * wtf/Platform.h: 2014-02-15 Filip Pizlo FTL should inline polymorphic heap accesses https://bugs.webkit.org/show_bug.cgi?id=128795 Reviewed by Oliver Hunt. * wtf/PrintStream.h: (WTF::PointerDumpInContext::PointerDumpInContext): (WTF::PointerDumpInContext::dump): (WTF::pointerDumpInContext): 2014-02-16 Zan Dobersek Reintroduce const qualifiers for return types of (Filter|Transform)Iterator::operator*() https://bugs.webkit.org/show_bug.cgi?id=126875 The const qualifiers for the return types of FilterIterator::operator*() and TransformIterator::operator*() were removed in r161797 and r161802 because of compilation failures when using GCC and having an Iterator type that already had the const qualifier. std::remove_const is now used to appease GCC and enforce the const qualifier on the return type, regardless of the Iterator type and its qualifiers. * wtf/IteratorAdaptors.h: (WTF::FilterIterator::operator*): (WTF::TransformIterator::operator*): 2014-02-15 Filip Pizlo Vector with inline capacity should work with non-PODs https://bugs.webkit.org/show_bug.cgi?id=128864 Reviewed by Michael Saboff. Previously, we would copy the inline storage of a vector as if it was a bag of bits. This presumed that the element type was relocatable. In general this is only true for PODs. This patch changes this by introducing a swap operation over inline storage. This swap operation requires being told about the size that is in use. Deques would have required some cleverness to make this work, because the swap operation needs to know which subset of elements are in-use and assumes that a size is sufficient for this. That's not true for deques. Instead of trying to do very clever things, I just removed the inline capacity option from Deque. I believe that this is fine since there are only two users of Deque with inline capacity, and both of them appear to be allocated rarely enough that inline capacity probably doesn't help much. * wtf/Deque.h: (WTF::DequeIterator::DequeIterator): (WTF::DequeConstIterator::DequeConstIterator): (WTF::Deque::checkValidity): (WTF::Deque::checkIndexValidity): (WTF::Deque::invalidateIterators): (WTF::Deque::Deque): (WTF::=): (WTF::Deque::destroyAll): (WTF::Deque::~Deque): (WTF::Deque::swap): (WTF::Deque::clear): (WTF::Deque::expandCapacityIfNeeded): (WTF::Deque::expandCapacity): (WTF::Deque::append): (WTF::Deque::prepend): (WTF::Deque::removeFirst): (WTF::Deque::removeLast): (WTF::Deque::remove): (WTF::DequeIteratorBase::checkValidity): (WTF::DequeIteratorBase::addToIteratorsList): (WTF::DequeIteratorBase::removeFromIteratorsList): (WTF::DequeIteratorBase::DequeIteratorBase): (WTF::DequeIteratorBase::~DequeIteratorBase): (WTF::DequeIteratorBase::isEqual): (WTF::DequeIteratorBase::increment): (WTF::DequeIteratorBase::decrement): (WTF::DequeIteratorBase::after): (WTF::DequeIteratorBase::before): * wtf/Vector.h: (WTF::VectorBuffer::swap): (WTF::VectorBuffer::swapInlineBuffer): (WTF::VectorBuffer::swapInlineBuffers): (WTF::Vector::swap): 2014-02-15 Mikhail Pozdnyakov Remove 'static' specifier from free inline functions in StringImpl.h https://bugs.webkit.org/show_bug.cgi?id=118554 Reviewed by Darin Adler. At first 'static' does not bring any use here, secondly static free inline functions in headers is a bad practice in general as each instance of function defined as inline is treated as a separate function and each instance has its own copy of static locals and string literals. * wtf/text/StringImpl.h: (WTF::codePointCompare): (WTF::codePointCompare8): (WTF::codePointCompare16): (WTF::codePointCompare8To16): (WTF::isSpaceOrNewline): 2014-02-14 Benjamin Poulain Improve the performance on mobile of FTPDirectoryDocument https://bugs.webkit.org/show_bug.cgi?id=128778 Reviewed by Antti Koivisto. * wtf/text/WTFString.h: (WTF::String::endsWith): add a missing overload. 2014-02-14 Wojciech Bielawski (try)append and insert operations don't need new operator for PODs https://bugs.webkit.org/show_bug.cgi?id=128185 Reviewed by Darin Adler. Vector's methods use VectorCopier to copy data. VectorCopier for PODs exteded to be used with different types. For different types placement new copy approach is applied. For the same types memcpy is applied. * wtf/Vector.h: (WTF::OverflowHandler>::append): use VectorCopier to copy data. (WTF::OverflowHandler>::tryAppend): use VectorCopier to copy data. (WTF::OverflowHandler>::insert): use VectorCopier to copy data. 2014-02-13 Daniel Bates Fix the iOS build after [iOS] Disable HAVE_ARM_NEON_INTRINSICS For now, disable HAVE_ARM_NEON_INTRINSICS when building for iOS. We want to audit the applicable code before we enable this define. * wtf/Platform.h: 2014-02-11 Filip Pizlo Hoist and combine array bounds checks https://bugs.webkit.org/show_bug.cgi?id=125433 Reviewed by Mark Hahnenberg. * GNUmakefile.list.am: * WTF.vcxproj/WTF.vcxproj: * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/HashMethod.h: Added. (WTF::HashMethod::operator()): 2014-02-13 Tamas Gergely Code cleanup: remove gcc<4.7 guards. https://bugs.webkit.org/show_bug.cgi?id=128729 Reviewed by Anders Carlsson. Remove GCC_VERSION_AT_LEAST guards when it checks for pre-4.7 versions, as WK does not compile with earlier gcc versions. * wtf/Assertions.cpp: * wtf/Platform.h: 2014-02-12 Mark Lam No need to save reservedZoneSize when dropping the JSLock. Reviewed by Geoffrey Garen. * wtf/WTFThreadData.cpp: (WTF::WTFThreadData::WTFThreadData): * wtf/WTFThreadData.h: - removed unnneeded m_savedReservedZoneSize. 2014-02-11 Mark Hahnenberg 32-bit LLInt writeBarrierOnGlobalObject is wrong https://bugs.webkit.org/show_bug.cgi?id=128556 Reviewed by Geoffrey Garen. * wtf/Platform.h: Removed OBJECT_MARK_LOGGING from Platform.h since it already exists in FeatureDefines.h 2014-02-11 peavo@outlook.com [WinCairo] Compile error, deleted file in WTF. https://bugs.webkit.org/show_bug.cgi?id=128601 Reviewed by Csaba Osztrogonác. * WTF.vcxproj/WTF.vcxproj: Removed reference to deleted file. * WTF.vcxproj/WTF.vcxproj.filters: Ditto. 2014-02-10 Michael Saboff Re-enable ARM Thumb2 disassembler https://bugs.webkit.org/show_bug.cgi?id=128577 Reviewed by Filip Pizlo. Added definition of WTF_USE_ARMV7_DISASSEMBLER back to Platform.h * wtf/Platform.h: 2014-02-10 Benjamin Poulain Add the basic infrastructure to compile attributes matching in selectors https://bugs.webkit.org/show_bug.cgi?id=128484 Reviewed by Gavin Barraclough. * wtf/Vector.h: (WTF::VectorBufferBase::bufferMemoryOffset): (WTF::Vector::sizeMemoryOffset): (WTF::Vector::dataMemoryOffset): Expose the memory offsets of Vector::size() and the memory buffer pointer for the JIT. 2014-02-10 Enrica Casucci copyShortASCIIString crashes on iOS after r163793. https://bugs.webkit.org/show_bug.cgi?id=128548. Reviewed by Alexey Proskuryakov. Adding null check. * wtf/unicode/icu/CollatorICU.cpp: (WTF::copyShortASCIIString): 2014-02-10 Carlos Garcia Campos [GLIB] Add GUniqueOutPtr and use it instead of GOwnPtr https://bugs.webkit.org/show_bug.cgi?id=127554 Reviewed by Gustavo Noronha Silva. GUniqueOutPtr is a simplified version of GOwnPtr for the cases where we need the address of the contained pointer. GUniqueOutPtr uses GUniquePtr to free the contained object and to release the container pointer. The API is very simple to make sure this is only used when outPtr() is needed. It can't be constructed with a pointer, and there's not method to set a new pointer. Another difference with the old GOwnPtr is that outPtr() can be used multiple times, because it frees any pointer previously set. * GNUmakefile.list.am: * wtf/PlatformEfl.cmake: * wtf/PlatformGTK.cmake: * wtf/gobject/GOwnPtr.cpp: Removed. * wtf/gobject/GOwnPtr.h: Removed. * wtf/gobject/GUniquePtr.h: (WTF::GUniqueOutPtr::GUniqueOutPtr): (WTF::GUniqueOutPtr::~GUniqueOutPtr): (WTF::GUniqueOutPtr::outPtr): (WTF::GUniqueOutPtr::reset): (WTF::GUniqueOutPtr::release): (WTF::GUniqueOutPtr::operator*): (WTF::GUniqueOutPtr::operator->): (WTF::GUniqueOutPtr::get): (WTF::GUniqueOutPtr::operator!): (WTF::GUniqueOutPtr::operator UnspecifiedBoolType): 2014-02-10 Darin Adler Stop using String::deprecatedCharacters to call WTF::Collator https://bugs.webkit.org/show_bug.cgi?id=128517 WTF passes ICU’s deprecated ULOC_REQUESTED_LOCALE to ucol_getLocaleByType() rdar://problem/15183390 Reviewed by Alexey Proskuryakov. This patch fixes both bugs above by reworking WTF::Collator. * wtf/unicode/Collator.h: Fixed formatting. Got rid of the Collator::Result type, since the collator uses the same return value scheme as strcmp and as ICU; an int will do for the return type. Simplified the support for UCONFIG_NO_COLLATION by using a separate copy of the class definition. (We should check if anyone needs UCONFIG_NO_COLLATION support, and remove it if not.) Changed the lower-first flag from a separate function to a constructor argument. Changed the arguments to the collate function to StringView. Added a collate UTF8 function. Changed the m_collate data member to no longer be mutable since we no longer allocate it lazily. * wtf/unicode/CollatorDefault.cpp: (WTF::Collator::collate): Rewrote to be simpler. (WTF::Collator::collateUTF8): Added. Converts from UTF-8 to a String and then calls the collate function above. * wtf/unicode/icu/CollatorICU.cpp: Added a FIXME about the fact that this file has the wrong name and location. Since we always use ICU, there's no need to mention it in the file name. (WTF::copyASCIIString): Added. (WTF::copyDefaultLocale): Added. (WTF::resolveDefaultLocale): Added. Maps null locale to a default on Mac and iOS, since on those platforms ICU does not use the correct default locale when passed null. (WTF::localesMatch): Added. (WTF::Collator::Collator): Moved most of the code from createCollator here. Simplified it by storing the collator configuration along with the collator in globals. (WTF::Collator::~Collator): Moved most of the code from releaseCollator here. (WTF::getIndexLatin1): Added. (WTF::moveLatin1): Added. (WTF::hasNextLatin1): Added. (WTF::hasPreviousLatin1): Added. (WTF::currentLatin1): Added. (WTF::nextLatin1): Added. (WTF::previousLatin1): Added. (WTF::getStateLatin1): Added. (WTF::setStateLatin1): Added. (WTF::createLatin1Iterator): Added. Uses the functions above to make a UCharIterator that works for a WTF::StringView-style Latin-1 string. (WTF::createIterator): Added. Uses either createLatin1Iterator or uiter_setString to make a UCharIterator that works for a WTF::StringView. (WTF::Collator::collate): Changed to use ucol_strcollIter. (WTF::createIteratorUTF8): Added. Uses uiter_setUTF8. (WTF::Collator::collateUTF8): Added. Like collate, but for null-terminated UTF-8 strings. 2014-02-10 Tamas Gergely Code cleanup: Remove BUILDING_ON / TARGETING definitions. https://bugs.webkit.org/show_bug.cgi?id=128242 Reviewed by Brent Fulgham. The BUILDING_ON_* and TARGETING_* macros have not been used for a while. According to the FIXME: they are removed. * wtf/Platform.h: 2014-02-09 Anders Carlsson Add WTF_MAKE_FAST_ALLOCATED to more classes https://bugs.webkit.org/show_bug.cgi?id=128506 Reviewed by Andreas Kling. * wtf/Bag.h: * wtf/ListHashSet.h: 2014-02-08 Anders Carlsson Stop using getCharactersWithUpconvert in JavaScriptCore https://bugs.webkit.org/show_bug.cgi?id=128457 Reviewed by Andreas Kling. * wtf/text/StringBuilder.h: (WTF::StringBuilder::append): Add a new overload that takes a StringView. * wtf/text/StringView.h: (WTF::StringView::find): Add new find member function. 2014-02-08 Darin Adler Change TextIterator to use StringView, preparing to wean it from deprecatedCharacters https://bugs.webkit.org/show_bug.cgi?id=128233 Reviewed by Anders Carlsson. * WTF.xcodeproj/project.pbxproj: Added new source files. * wtf/text/StringView.h: Added operator[], createCFStringWithoutCopying, and createNSStringWithoutCopying. * wtf/text/cf/StringViewCF.cpp: (WTF::StringView::createCFStringWithoutCopying): Added. * wtf/text/mac/StringViewObjC.mm: (WTF::StringView::createNSString): Added. (WTF::StringView::createNSStringWithoutCopying): Added. 2014-02-06 Andreas Kling Remove unused ENABLE(REPAINT_THROTTLING) flag. Reviewed by Antti Koivisto. * wtf/FeatureDefines.h: 2014-02-06 Filip Pizlo More FTL build scaffolding https://bugs.webkit.org/show_bug.cgi?id=128330 Reviewed by Geoffrey Garen. * wtf/Platform.h: 2014-02-06 Anders Carlsson Use std::chrono functions in dispatchFunctionsFromMainThread() https://bugs.webkit.org/show_bug.cgi?id=128308 Reviewed by Antti Koivisto. * wtf/MainThread.cpp: (WTF::dispatchFunctionsFromMainThread): 2014-02-05 Zan Dobersek Remove the WTF_COMPILER_SUPPORTS_CXX_GENERALIZED_INITIALIZERS macro https://bugs.webkit.org/show_bug.cgi?id=128267 Reviewed by Andreas Kling. Remove the WTF_COMPILER_SUPPORTS_CXX_GENERALIZED_INITIALIZERS macro that was manually defined for compilers that support the C++11 initializer lists. The feature is well supported in Clang, MSVC and also GCC. It was actually already used unguarded in HashSet. * wtf/Compiler.h: * wtf/HashMap.h: (WTF::HashMap::HashMap): * wtf/Vector.h: (WTF::Vector::Vector): 2014-02-05 Andreas Kling Remove ENABLE(DIRECTORY_UPLOAD). Rubber-stamped by Ryosuke Niwa. * wtf/FeatureDefines.h: 2014-02-05 Carlos Garcia Campos HashMap can't be used with std::unique_ptr as value when it has a custom deleter https://bugs.webkit.org/show_bug.cgi?id=128250 Reviewed by Darin Adler. The problem is that the HashMap is using a unique_ptr with the default deleter, so that when trying to move the unique_ptr the deleters don't match. * wtf/HashTraits.h: Add the deleter also in the template definitation of the parent class for the HashTraits> 2014-02-05 Csaba Osztrogonác Remove ENABLE(SVG) guards https://bugs.webkit.org/show_bug.cgi?id=127991 Reviewed by Sam Weinig. * wtf/FeatureDefines.h: 2014-02-04 Mark Lam The stack limit computation does not work for Windows. Reviewed by Geoffrey Garen. The current stack limit computation assumes that the stack is allocated in high memory. On Windows, the stack seems to be allocated very near address 0, and is smaller in size than our Options::maxPerThreadStackUsage(). This combination triggers a bug where StackBounds::recursionLimit() underflows and computes a limit address that is ridiculously high in memory. The net effect is that the Windows port thinks its out of stack space all the time. We now check for potential underflows in StackBounds and return an appropriate limit address. * wtf/StackBounds.h: (WTF::StackBounds::recursionLimit): 2014-02-04 Andreas Kling Remove