Unreviewed. Correct my previous patch to disable external SVG
[WebKit-https.git] / Source / WTF / ChangeLog
1 2012-10-29  Adam Barth  <abarth@webkit.org>
2
3         Unreviewed. Correct my previous patch to disable external SVG
4         references only on PLATFORM(CHROMIUM).
5
6         * wtf/Platform.h:
7
8 2012-10-29  Adam Barth  <abarth@webkit.org>
9
10         Block SVG external references pending a security review
11         https://bugs.webkit.org/show_bug.cgi?id=100635
12
13         Reviewed by Eric Seidel.
14
15         We need to do a security review of loading external SVG references
16         before we're sure that it is safe.
17
18         * wtf/Platform.h:
19
20 2012-10-29  Michael Saboff  <msaboff@apple.com>
21
22         String::split(UChar, Vector<String>&) shouldn't create a temporary String
23         https://bugs.webkit.org/show_bug.cgi?id=100578
24
25         Reviewed by Anders Carlsson.
26
27         Changed split(UChar, Vector<String>&) to call split(UChar, bool, Vector<String>&) instead of creating a
28         string and calling the split(String,...) version and moved it to WTFString.h.  Also moved
29         split(const String& separator, Vector<String>& result) to WTFString.h.
30
31         * wtf/text/WTFString.cpp:
32         (WTF::String::split):
33         * wtf/text/WTFString.h:
34         (WTF::String::split):
35
36 2012-10-29  Sheriff Bot  <webkit.review.bot@gmail.com>
37
38         Unreviewed, rolling out r132736.
39         http://trac.webkit.org/changeset/132736
40         https://bugs.webkit.org/show_bug.cgi?id=100652
41
42         It broke all plugin related tests on GTK and on Qt (Requested
43         by Ossy on #webkit).
44
45         * wtf/text/WTFString.cpp:
46         (WTF::String::fromUTF8):
47
48 2012-10-27  Michael Saboff  <msaboff@apple.com>
49
50         Try to create AtomicString as 8 bit where possible
51         https://bugs.webkit.org/show_bug.cgi?id=100575
52
53         Reviewed by Oliver Hunt.
54
55         Added StringImpl::create8BitIfPossible() that first tries to create an 8 bit string.  If it finds a 16 bit character
56         during processing, it calls the standard create() method.  The assumption is that this will be used on mostly 8 bit
57         strings and ones that are shorter (in the tens of characters).  Changed AtomicString to use the new creation method
58         for UChar based construction.
59
60         * wtf/text/AtomicString.cpp:
61         (WTF::UCharBufferTranslator::translate):
62         * wtf/text/StringImpl.cpp:
63         (WTF::StringImpl::create8BitIfPossible):
64         * wtf/text/StringImpl.h:
65         (WTF::StringImpl::create8BitIfPossible):
66
67 2012-10-27  Michael Saboff  <msaboff@apple.com>
68
69         String::fromUTF8() should take advantage of the ASCII check in convertUTF8ToUTF16()
70         https://bugs.webkit.org/show_bug.cgi?id=100577
71
72         Reviewed by Oliver Hunt.
73
74         Passed is ASCII flag to convertUTF8ToUTF16() and if try, create an 8 bit string from the original arguments.
75
76         * wtf/text/WTFString.cpp:
77         (WTF::String::fromUTF8):
78
79 2012-10-27  Dan Bernstein  <mitz@apple.com>
80
81         REAL_PLATFORM_NAME build setting is no longer needed
82         https://bugs.webkit.org/show_bug.cgi?id=100587
83
84         Reviewed by Mark Rowe.
85
86         Removed the definition of REAL_PLATFORM_NAME and replaced references to it with references
87         to PLATFORM_NAME.
88
89         * Configurations/Base.xcconfig:
90         * Configurations/CompilerVersion.xcconfig:
91         * Configurations/DebugRelease.xcconfig:
92
93 2012-10-26  Sheriff Bot  <webkit.review.bot@gmail.com>
94
95         Unreviewed, rolling out r132689.
96         http://trac.webkit.org/changeset/132689
97         https://bugs.webkit.org/show_bug.cgi?id=100574
98
99         Broke HashMaps containing RetainPtrs (Requested by andersca on
100         #webkit).
101
102         * wtf/RetainPtr.h:
103
104 2012-10-26  Anders Carlsson  <andersca@apple.com>
105
106         Add an operator& to RetainPtr
107         https://bugs.webkit.org/show_bug.cgi?id=100549
108
109         Reviewed by Dan Bernstein.
110
111         This is useful for APIs that return references using out parameters.
112
113         * wtf/RetainPtr.h:
114         (WTF::RetainPtr::operator&):
115
116 2012-10-26  Gabor Ballabas  <gaborb@inf.u-szeged.hu>
117
118         [Qt] Enable JSC's disassembler on x86, x86_64 Linux
119         https://bugs.webkit.org/show_bug.cgi?id=100386
120
121         Reviewed by Simon Hausmann.
122
123         It works fine on Linux x86, x86_64 just needs to be enabled in the
124         QtWebKit build system.
125
126         * wtf/Platform.h:
127
128 2012-10-25  Michael Saboff  <msaboff@apple.com>
129
130         REGRESSION (r131836): failures in list styles tests on EFL, GTK
131         https://bugs.webkit.org/show_bug.cgi?id=99824
132
133         Reviewed by Oliver Hunt.
134
135         Fixed ASCII check.
136         Added placeholder argument for new argument added to convertUTF8ToUTF16() in http://trac.webkit.org/changeset/131836.
137
138         * wtf/unicode/UTF8.cpp:
139         (WTF::Unicode::convertUTF8ToUTF16):
140         * wtf/unicode/glib/UnicodeGLib.cpp:
141         (WTF::Unicode::convertCase):
142
143 2012-10-25  Christophe Dumez  <christophe.dumez@intel.com>
144
145         [EFL][WK2] Remove some C'ism from EwkView
146         https://bugs.webkit.org/show_bug.cgi?id=100370
147
148         Reviewed by Kenneth Rohde Christiansen.
149
150         Make OwnPtr useable for Ecore_IMF_Context to avoid
151         using raw pointers in EFL port.
152
153         * wtf/OwnPtrCommon.h:
154         (WTF):
155         * wtf/PlatformEfl.cmake:
156         * wtf/efl/OwnPtrEfl.cpp:
157         (WTF::deleteOwnedPtr):
158         (WTF):
159
160 2012-09-27  Yury Semikhatsky  <yurys@chromium.org>
161
162         Web Inspector: provide memory instrumentation for ListHashSet
163         https://bugs.webkit.org/show_bug.cgi?id=97786
164
165         Reviewed by Vsevolod Vlasov.
166
167         Added memory instrumentation for ListHashSet.
168
169         * GNUmakefile.list.am:
170         * WTF.gypi:
171         * WTF.pro:
172         * WTF.vcproj/WTF.vcproj:
173         * WTF.xcodeproj/project.pbxproj:
174         * wtf/HashSet.h:
175         (WTF):
176         * wtf/ListHashSet.h:
177         (ListHashSet):
178         (ListHashSetNodeAllocator): changed visibility of inPool method to public
179         (WTF::ListHashSetNodeAllocator::pool):
180         (WTF::ListHashSetNodeAllocator::pastPool):
181         (WTF::::sizeInBytes): added a method that returns size of the set in bytes including
182         all its internals but not the content elements.
183         (WTF):
184         * wtf/MemoryInstrumentation.h: removed onsolete method. All clients were updated to
185         use generic addMember instead.
186         (MemoryInstrumentation):
187         (WTF::MemoryClassInfo::addPrivateBuffer):
188         * wtf/MemoryInstrumentationHashSet.h:
189         * wtf/MemoryInstrumentationListHashSet.h: Copied from Source/WTF/wtf/MemoryInstrumentationHashSet.h.
190         (WTF):
191         (WTF::reportMemoryUsage):
192
193 2012-10-23  Benjamin Poulain  <benjamin@webkit.org>
194
195         WTFURL: Implement KURL::setPort()
196         https://bugs.webkit.org/show_bug.cgi?id=99898
197
198         Reviewed by Adam Barth.
199
200         Add an efficient implementation for remplacing the port component
201         in an URL. This will be the base for replacing other components
202         efficiently.
203
204         The testing is covered by fast/dom/HTMLAnchorElement/set-href-attribute-port.html
205
206         * wtf/url/api/ParsedURL.cpp:
207         (WTF::generateNewSpecWithPort):
208         (WTF::replacePortWithString):
209         (WTF::ParsedURL::replacePort):
210         * wtf/url/api/ParsedURL.h:
211         (ParsedURL):
212
213 2012-10-22  Michael Saboff  <msaboff@apple.com>
214
215         Regression(r131655): Crash in StringImpl::findIgnoringCase
216         https://bugs.webkit.org/show_bug.cgi?id=99753
217
218         Reviewed by Geoffrey Garen.
219
220         Fixed to use the searchLength to take into account the start index.
221
222         Added LayoutTests/fast/js/find-ignoring-case-regress-99753.html
223
224         * wtf/text/StringImpl.cpp:
225         (WTF::StringImpl::findIgnoringCase):
226
227 2012-10-22  Simon Hausmann  <simon.hausmann@digia.com>
228
229         Unreviewed: Re-enable LLINT on Qt/Linux after r131932.
230
231         * wtf/Platform.h:
232
233 2012-10-22  Yury Semikhatsky  <yurys@chromium.org>
234
235         Web Inspector: do not double count memory of objects with multiple ancestors
236         https://bugs.webkit.org/show_bug.cgi?id=99958
237
238         Reviewed by Alexander Pavlov.
239
240         Make sure memory occupied by objects of classes with multiple inheritance is
241         not double counted.
242
243         * wtf/MemoryInstrumentation.h:
244         (WTF::MemoryObjectInfo::MemoryObjectInfo):
245         (WTF::MemoryObjectInfo::reportedPointer):
246         (WTF::MemoryObjectInfo::reportObjectInfo): 1) Store actual pointer to the instrumented
247         object as it may differ from the original pointer by which it was reported. 2) Make
248         the method non-template and calculate object size on the caller side.
249         (MemoryObjectInfo):
250         (WTF::MemoryInstrumentation::reportObjectMemoryUsage):
251         (WTF::MemoryClassInfo::MemoryClassInfo):
252         (WTF::MemoryInstrumentation::InstrumentedPointer::process): use adjusted pointer
253         returned by reportMemoryUsage to check if the object has already been visited when
254         the pointer differs from the orinal one(it may happen if the object was reported
255         by a pointer to one of its base classes).
256
257 2012-10-20  Martin Robinson  <mrobinson@igalia.com>
258
259         Fix 'make dist' for the GTK+ port
260
261         * GNUmakefile.list.am: Add missing files to the source list.
262
263 2012-10-19  Mark Lam  <mark.lam@apple.com>
264
265         Added WTF::StackStats mechanism.
266         https://bugs.webkit.org/show_bug.cgi?id=99805.
267
268         Reviewed by Geoffrey Garen.
269
270         Disabled by default. Should have no performance and memory cost when
271         disabled. To enable, #define ENABLE_STACK_STATS 1 in StackStats.h.
272         The output is currently hardcoded to be dumped in /tmp/stack-stats.log,
273         and is in the form of stack sample events. By default, it only logs
274         a sample event when a new high watermark value is encountered.
275
276         Also renamed StackBounds::recursiveCheck() to isSafeToRecurse().
277
278         * WTF.xcodeproj/project.pbxproj:
279         * wtf/StackBounds.h:
280         (StackBounds):
281         (WTF::StackBounds::size):
282         (WTF::StackBounds::isSafeToRecurse):
283         * wtf/StackStats.cpp: Added.
284         (WTF):
285         (WTF::StackStats::initialize):
286         (WTF::StackStats::PerThreadStats::PerThreadStats):
287         (WTF::StackStats::CheckPoint::CheckPoint):
288         (WTF::StackStats::CheckPoint::~CheckPoint):
289         (WTF::StackStats::probe):
290         (WTF::StackStats::LayoutCheckPoint::LayoutCheckPoint):
291         (WTF::StackStats::LayoutCheckPoint::~LayoutCheckPoint):
292         * wtf/StackStats.h: Added.
293         (WTF):
294         (StackStats):
295         (CheckPoint):
296         (WTF::StackStats::CheckPoint::CheckPoint):
297         (PerThreadStats):
298         (WTF::StackStats::PerThreadStats::PerThreadStats):
299         (LayoutCheckPoint):
300         (WTF::StackStats::LayoutCheckPoint::LayoutCheckPoint):
301         (WTF::StackStats::initialize):
302         (WTF::StackStats::probe):
303         * wtf/ThreadingPthreads.cpp:
304         (WTF::initializeThreading):
305         * wtf/WTFThreadData.cpp:
306         (WTF::WTFThreadData::WTFThreadData):
307         * wtf/WTFThreadData.h:
308         (WTFThreadData):
309         (WTF::WTFThreadData::stackStats):
310
311 2012-10-19  Anders Carlsson  <andersca@apple.com>
312
313         Deque can use std::reverse_iterator for its reverse iterators
314         https://bugs.webkit.org/show_bug.cgi?id=99789
315
316         Reviewed by Andreas Kling.
317
318         Remove DequeReverseIterator and DequeConstReverseIterator and just use std::reverse_iterator directly.
319         Also, remove the DequeIteratorBase<T, inlineCapacity> to Base typedef - We can already use DequeIteratorBase since it's
320         equivalent to the full class template type.
321
322         * wtf/Deque.h:
323         (WTF::Deque::rbegin):
324         (WTF::Deque::rend):
325         (DequeIteratorBase):
326         (WTF::DequeIteratorBase::assign):
327         (DequeIterator):
328         (DequeConstIterator):
329         (WTF::::checkValidity):
330         (WTF::::DequeIteratorBase):
331         (WTF::=):
332         (WTF::::isEqual):
333
334 2012-10-19  Csaba Osztrogonác  <ossy@webkit.org>
335
336         Unreviewed buildfix, use C-style comment instead of C++
337
338         * wtf/Platform.h:
339
340 2012-10-19  Csaba Osztrogonác  <ossy@webkit.org>
341
342         REGRESSION(r131822): It made 500+ tests crash on 32 bit platforms
343         https://bugs.webkit.org/show_bug.cgi?id=99814
344
345         Reviewed by Simon Hausmann.
346
347         * wtf/Platform.h: Disable LLINT on (PLATFORM(QT) && CPU(X86)) temporarily until proper fix.
348
349 2012-10-17  Ilya Tikhonovsky  <loislo@chromium.org>
350
351         Web Inspector: NMI provide data for mixing with tcmalloc heap dumps.
352         https://bugs.webkit.org/show_bug.cgi?id=99457
353
354         Reviewed by Yury Semikhatsky.
355
356         countObjectSize now accepts ptr as the first argument and saves it into HashMap if the binary was ran with HEAPPROFILE env variable.
357         getProcessMemoryDistribution does snapshot and calls the downstream code with the map of counted objects.
358
359         * wtf/MemoryInstrumentation.h:
360         (MemoryInstrumentationClient):
361         (WTF::MemoryInstrumentation::countObjectSize):
362         (WTF::MemoryInstrumentation::addRawBuffer):
363         (WTF::MemoryClassInfo::addPrivateBuffer):
364         (WTF::MemoryInstrumentation::addObjectImpl):
365         (WTF::MemoryInstrumentation::addListHashSet):
366         (WTF::::process):
367
368 2012-10-18  Michael Saboff  <msaboff@apple.com>
369
370         convertUTF8ToUTF16() Should Check for ASCII Input
371         ihttps://bugs.webkit.org/show_bug.cgi?id=99739
372
373         Reviewed by Geoffrey Garen.
374
375         Added code to accumulate the "or" of all characters seen during the UTF8 to UTF16 conversion.  This is
376         used to check to see if all characters are ASCII and is returned via a bool*.
377
378         * wtf/unicode/UTF8.cpp:
379         (WTF::Unicode::convertUTF8ToUTF16):
380         * wtf/unicode/UTF8.h:
381
382 2012-10-18  Michael Saboff  <msaboff@apple.com>
383
384         Mac WTF build checks dependencies before copying header files
385         https://bugs.webkit.org/show_bug.cgi?id=99770
386
387         Reviewed by Mark Rowe.
388
389         Fixed up build rules per Mark Rowe. Made new target an Aggregate and removed "WTF copy".
390
391         * Configurations/CopyWTFHeaders.xcconfig: Added.
392         * Configurations/WTF.xcconfig:
393         * WTF.xcodeproj/project.pbxproj:
394
395 2012-10-18  Michael Saboff  <msaboff@apple.com>
396
397         Mac WTF build checks dependencies before copying header files
398         https://bugs.webkit.org/show_bug.cgi?id=99770
399
400         Reviewed by Geoffrey Garen.
401
402         Added a new build target "Copy WTF HEaders" to copy the header files and made that new target a dependency
403         for the main WTF build target.  Moved the "Copy WTF Headers" phase from WTF target to the new target.
404
405         * WTF.xcodeproj/project.pbxproj:
406
407 2012-10-17  Anders Carlsson  <andersca@apple.com>
408
409         Clean up Vector.h
410         https://bugs.webkit.org/show_bug.cgi?id=99622
411
412         Reviewed by Benjamin Poulain.
413
414         Remove unused member functions from Vector and get rid of the std::max and std::min using declarations
415         (as per the WebKit coding style guidelines).
416
417         * WTF.xcodeproj/project.pbxproj:
418         Turns out StreamBuffer.h was never added to the Xcode project; add it. Also go ahead and sort the project file.
419
420         * wtf/Deque.h:
421         (WTF::::expandCapacity):
422         * wtf/StreamBuffer.h:
423         (WTF::StreamBuffer::append):
424         Add std:: prefixes to max and min.
425
426         * wtf/Vector.h:
427         Remove VectorBase::bufferSlot(), VectorReverseProxy and add std:: prefixes where needed.
428
429 2012-10-17  Michael Saboff  <msaboff@apple.com>
430
431         Creating a String from an NSString should check for all 8 bit strings
432         https://bugs.webkit.org/show_bug.cgi?id=99392
433
434         Reviewed by Geoffrey Garen.
435
436         Exported the LChar* version of create().
437
438         * wtf/text/StringImpl.cpp:
439         (WTF::StringImpl::create):
440
441 2012-10-17  Michael Saboff  <msaboff@apple.com>
442
443         StringImpl::findIgnoringCase() and reverseFindIgnoringCase() don't optimally handle a mix of 8 and 16 bit strings
444         https://bugs.webkit.org/show_bug.cgi?id=99224
445
446         Reviewed by Geoffrey Garen.
447
448         Added helper templated functions and all four combinations similar to find() and reverseFind().
449
450         (WTF::findIgnoringCaseInner):
451         (WTF::StringImpl::findIgnoringCase):
452         (WTF::reverseFindIgnoringCaseInner):
453         (WTF::StringImpl::reverseFindIgnoringCase):
454
455 2012-10-17  Michael Saboff  <msaboff@apple.com>
456
457         AtomicString::HashAndUTF8CharactersTranslator::equal() doesn't optimally handle 8 bit strings
458         https://bugs.webkit.org/show_bug.cgi?id=99223
459
460         Reviewed by Geoffrey Garen.
461
462         Added an 8 bit path.
463
464         * wtf/text/AtomicString.cpp:
465         (WTF::HashAndUTF8CharactersTranslator::equal):
466
467 2012-10-17  Anders Carlsson  <andersca@apple.com>
468
469         Always use fastRealloc when growing or shrinking the Vector buffer
470         https://bugs.webkit.org/show_bug.cgi?id=99616
471
472         Reviewed by Andreas Kling.
473
474         Remove the pointless #if PLATFORM(BLACKBERRY) and always try to use fastRealloc to grow or shrink the
475         vector buffer when possible; realloc should always be at least as fast as free+malloc.
476
477         * wtf/Vector.h:
478         (WTF::VectorBufferBase::shouldReallocateBuffer):
479
480 2012-10-16  Michael Saboff  <msaboff@apple.com>
481
482         Change WTF_USE_8BIT_TEXTRUN to ENABLE_8BIT_TEXTRUN
483         https://bugs.webkit.org/show_bug.cgi?id=99484
484
485         Reviewed by Eric Seidel.
486
487         Changed macro name to align with it's purpose.
488
489         * wtf/Platform.h:
490
491 2012-10-16  Michael Saboff  <msaboff@apple.com>
492
493         StringImpl::reverseFind() with a single match character isn't optimal for mixed 8/16 bit cases
494         https://bugs.webkit.org/show_bug.cgi?id=99363
495
496         Reviewed by Benjamin Poulain.
497
498         Factored out the 8/16 bitness check of the match character from the subject character bitness
499         check.  Did this for both find() and reverseFind().  Added all UChar/LChar combinations to the
500         inline reverseFind().
501
502         * wtf/text/StringImpl.cpp:
503         (WTF::StringImpl::find):
504         (WTF::StringImpl::reverseFind):
505         * wtf/text/StringImpl.h:
506         (WTF::reverseFind):
507
508 2012-10-16  Dima Gorbik  <dgorbik@apple.com>
509
510         Remove Platform.h include from the header files.
511         https://bugs.webkit.org/show_bug.cgi?id=98665
512
513         Reviewed by Eric Seidel.
514
515         We don't want other clients that include WebKit headers to know about Platform.h.
516
517         * wtf/Assertions.h:
518         * wtf/MainThread.h:
519
520 2012-10-16  Adrienne Walker  <enne@google.com>
521
522         Remove unused WTF_NEW_HASHMAP_ITERATORS_INTERFACE #define
523         https://bugs.webkit.org/show_bug.cgi?id=99367
524
525         Reviewed by James Robinson.
526
527         Does what it says on the tin.
528
529         * wtf/HashTraits.h:
530
531 2012-10-15  Andreas Kling  <kling@webkit.org>
532
533         Remove WTF::fastDeleteAllValues().
534         <http://webkit.org/b/99345>
535
536         Reviewed by Eric Seidel.
537
538         It was only used to fastDelete() a class that was already overriding operator delete
539         by way of WTF_MAKE_FAST_ALLOCATED anyway.
540
541         * wtf/HashSet.h:
542         (WTF):
543         (HashSet):
544
545 2012-10-15  Mark Hahnenberg  <mhahnenberg@apple.com>
546
547         Parallel GC should not be disabled for all platforms
548
549         * wtf/Platform.h: D'oh!
550
551 2012-10-15  George Staikos  <staikos@webkit.org>
552
553         [BlackBerry] Adapt to Platform API changes in string handling
554         https://bugs.webkit.org/show_bug.cgi?id=99248
555
556         Reviewed by Yong Li.
557
558         Convert usage of WebString, char* and std::string to BlackBerry::Platform::String.
559
560         * wtf/Assertions.cpp: Use proper log function.
561         * wtf/text/AtomicString.h: Add BlackBerry support
562         (AtomicString):
563         (WTF::AtomicString::AtomicString): Add BlackBerry Support
564         (WTF::AtomicString::operator BlackBerry::Platform::String):
565         * wtf/text/StringImpl.h: Conversion support.
566         * wtf/text/WTFString.h: Conversion support.
567         (Platform):
568         (String):
569
570 2012-10-15  Michael Saboff  <msaboff@apple.com>
571
572         Update RenderText to use String instead of UChar* for text
573         https://bugs.webkit.org/show_bug.cgi?id=96979
574
575         Reviewed by Dan Bernstein.
576
577         Added WTF_USE_8BIT_TEXTRUN to encase code that creates 8 bit TextRun's.  Enabled WTF_USE_8BIT_TEXTRUN
578         for PLATFORM(MAC).  Other platform can update this setting in Platform.h when their platform specific use of
579         TextRun handle 8 bit data.  Added a new Vector::appendVector to allow appending the contents of a vector
580         containing one type to the end of vector containing another.  This is used to append a Vector<LChar> to
581         the end of a Vector<UChar>.
582
583         * wtf/Platform.h:
584         * wtf/Vector.h:
585         (Vector):
586         (WTF::Vector::appendVector):
587
588 2012-10-15  Ilya Tikhonovsky  <loislo@chromium.org>
589
590         Web Inspector: convert manual size calculation of different WebKit things into MemoryInstrumentation.
591         https://bugs.webkit.org/show_bug.cgi?id=99309
592
593         Reviewed by Yury Semikhatsky.
594
595         JSHeap, DOMStorage and HeapProfiler data were counted manually.
596         Now we count the sizes more generic way.
597
598         * wtf/MemoryInstrumentation.h: calculateContainerSize were removed.
599         * wtf/MemoryInstrumentationSequence.h: empty instrumentations were added for 'const char*' and 'const void*' sequences.
600
601 2012-10-12  Anders Carlsson  <andersca@apple.com>
602
603         Move QDataStream functions into HistoryItemQt.cpp
604         https://bugs.webkit.org/show_bug.cgi?id=99203
605
606         Reviewed by Andreas Kling.
607
608         It seems like the QDataStream stream operators are only used from HistoryItemQt.cpp
609         inside WebCore, so move them there. If in the future they are required elsewhere, they should
610         be moved into a separate header instead of polluting headers unnecessarily.
611
612         * wtf/Vector.h:
613         * wtf/qt/StringQt.cpp:
614         * wtf/text/WTFString.h:
615
616 2012-10-12  Michael Saboff  <msaboff@apple.com>
617
618         StringBuilder::append(StringBuilder&) doesn't take into account the bit size of the argument string
619         https://bugs.webkit.org/show_bug.cgi?id=99225
620
621         Reviewed by Benjamin Poulain.
622
623         Added 8 bit path.
624
625         * wtf/text/StringBuilder.h:
626         (WTF::StringBuilder::append):
627
628 2012-10-12  Sheriff Bot  <webkit.review.bot@gmail.com>
629
630         Unreviewed, rolling out r131224.
631         http://trac.webkit.org/changeset/131224
632         https://bugs.webkit.org/show_bug.cgi?id=99210
633
634         It broke the build (Requested by andersca on #webkit).
635
636         * wtf/Vector.h:
637         (WTF):
638         (WTF::operator<<):
639         (WTF::operator>>):
640         * wtf/qt/StringQt.cpp:
641         (WTF::operator<<):
642         (WTF):
643         (WTF::operator>>):
644         * wtf/text/WTFString.h:
645         (WTF):
646
647 2012-10-12  Anders Carlsson  <andersca@apple.com>
648
649         Move QDataStream functions into HistoryItemQt.cpp
650         https://bugs.webkit.org/show_bug.cgi?id=99203
651
652         Reviewed by Andreas Kling.
653
654         It seems like the QDataStream stream operators are only used from HistoryItemQt.cpp
655         inside WebCore, so move them there. If in the future they are required elsewhere, they should
656         be moved into a separate header instead of polluting headers unnecessarily.
657
658         * wtf/Vector.h:
659         * wtf/qt/StringQt.cpp:
660         * wtf/text/WTFString.h:
661
662 2012-10-11  Mark Toller  <mark.toller@samsung.com>
663
664         Removed incorrect pthread_mutex_trylock code in an ASSERT in TCMalloc_PageHeap::signalScavenger. This 
665         branch is used by the Webkit GTK code.
666
667         https://bugs.webkit.org/show_bug.cgi?id=97539
668
669         Reviewed by Geoffrey Garen.
670
671         The code was never compiled in, and was functionally broken. There is no need for locking around the 
672         m_scavengeThreadActive flag, however, we should lock pageheap_lock before calling 'shouldScavenge()', as we
673         only want to scavenge when really required, so it's better to wait for any current memory operation to 
674         complete before checking. 
675
676         * wtf/FastMalloc.cpp:
677         (WTF::TCMalloc_PageHeap::signalScavenger):
678
679 2012-10-10  Yong Li  <yoli@rim.com>
680
681         [BlackBerry] Define WTF_USE_EXTRA_MACROS in cmake rather than Platform.h
682         https://bugs.webkit.org/show_bug.cgi?id=98819
683
684         Reviewed by Rob Buis.
685
686         And make it depend on SHARED_CORE
687         RIM PR# 221339.
688
689         * wtf/Platform.h:
690
691 2012-10-09  Filip Pizlo  <fpizlo@apple.com>
692
693         JSC should infer when indexed storage is contiguous, and optimize for it
694         https://bugs.webkit.org/show_bug.cgi?id=97288
695
696         Reviewed by Mark Hahnenberg.
697
698         Moved out this helpful math utility to MathExtras, since we now use it in
699         multiple places.
700
701         * wtf/MathExtras.h:
702         (timesThreePlusOneDividedByTwo):
703
704 2012-10-08  Benjamin Poulain  <benjamin@webkit.org>
705
706         Generalize moving URLComponent's begin position
707         https://bugs.webkit.org/show_bug.cgi?id=98626
708
709         Reviewed by Adam Barth.
710
711         The patch r130609 introduced moving URLComponents's position.
712         It turns out this concept is really useful in the parser so
713         this patch generalize the idea.
714
715         * wtf/url/api/ParsedURL.cpp:
716         (WTF::ParsedURL::removePort):
717         * wtf/url/src/URLCanonEtc.cpp:
718         * wtf/url/src/URLComponent.h:
719         (WTF::URLComponent::moveBy):
720         Rename URLComponent::move() to URLComponent::moveBy() for consistency
721         with some of WebCore types.
722
723         * wtf/url/src/URLParse.cpp:
724         * wtf/url/src/URLParseFile.cpp:
725
726         * wtf/url/src/URLSegments.cpp:
727         (WTF::URLSegments::moveFromComponentBy):
728         Change the semantic to everything from a certain component. This is
729         useful to move everything, including the scheme.
730
731         * wtf/url/src/URLSegments.h:
732         (URLSegments):
733
734 2012-10-08  Andreas Kling  <kling@webkit.org>
735
736         Lower minimum table size of WTF::HashTable to reduce memory usage.
737         <http://webkit.org/b/98406>
738         <rdar://problem/12432140>
739
740         Reviewed by Anders Carlsson.
741
742         Lower the default minimumTableSize for WTF hash tables from 64 to 8 entries.
743         This reduces WebProcess memory consumption by ~16MB on Membuster3 (a 6% progression!)
744
745         No significant movement on PLT or JSC benchmarks on my machine. If there's a perf regression somewhere
746         from this, we can tweak individual tables to have a larger minimumTableSize.
747
748         * wtf/HashTraits.h:
749
750 2012-10-08  Andreas Kling  <kling@webkit.org>
751
752         Using float/double as WTF hash table key is unreliable.
753         <http://webkit.org/b/98627>
754
755         Reviewed by Geoffrey Garen.
756
757         Change FloatHash::equal() to do a bitwise compare instead of a logical compare.
758         This fixes a problem where the keys with different binary representation but the
759         same logical value (e.g 0 and -0) could block each other from being found if they
760         ended up in the same hash bucket.
761
762         * wtf/HashFunctions.h:
763         (FloatHash):
764         (WTF::FloatHash::hash):
765         (WTF::FloatHash::equal):
766
767 2012-10-08  Sheriff Bot  <webkit.review.bot@gmail.com>
768
769         Unreviewed, rolling out r130619.
770         http://trac.webkit.org/changeset/130619
771         https://bugs.webkit.org/show_bug.cgi?id=98634
772
773         Causes many crashes on the EFL bots. (Requested by rakuco on
774         #webkit).
775
776         * wtf/efl/MainThreadEfl.cpp:
777         (WTF::pipeObject):
778         (WTF):
779         (WTF::monitorDispatchFunctions):
780         (WTF::initializeMainThreadPlatform):
781         (WTF::scheduleDispatchFunctionsOnMainThread):
782
783 2012-10-08  Byungwoo Lee  <bw80.lee@samsung.com>
784
785         [EFL] Use ecore_main_loop_thread_safe_call_async() to wakeup main loop.
786         https://bugs.webkit.org/show_bug.cgi?id=98505
787
788         Reviewed by Kenneth Rohde Christiansen.
789
790         Instead of ecore_pipe_write(),
791         use ecore_main_loop_thread_safe_call_async() to wakeup ecore main loop.
792
793         According to the EFL API document, this function is designed to dispatch
794         a function on ecore main loop by avoiding dead lock or race condition. 
795         With this function, webkit doesn't need to maintain ecore pipe also.
796
797         * wtf/efl/MainThreadEfl.cpp:
798         (WTF::monitorDispatchFunctions):
799         (WTF::initializeMainThreadPlatform):
800         (WTF::scheduleDispatchFunctionsOnMainThread):
801
802 2012-10-07  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
803
804         Rename first/second to key/value in HashMap iterators
805         https://bugs.webkit.org/show_bug.cgi?id=82784
806
807         Reviewed by Eric Seidel.
808
809         Currently HashMap iterators follow the same interface in std::map: given an
810         iterator it, we use it->first to access the key and it->second to access the
811         value. This patch changes these accesses to it->key and it->value, improving the
812         readability at call sites.
813
814         One potential downside of this change would be the confusion between std::map and
815         HashMap interfaces. However, they are already different in other aspects and the
816         usage of std::map is more an exception than a rule in WebKit code, so we consider
817         the confusion will be less likely to happen.
818
819         * wtf/HashCountedSet.h:
820         (WTF::::add):
821         (WTF::::remove):
822         (WTF::copyToVector):
823         * wtf/HashIterators.h:
824         (WTF::HashTableConstKeysIterator::get):
825         (WTF::HashTableConstValuesIterator::get):
826         (WTF::HashTableKeysIterator::get):
827         (WTF::HashTableValuesIterator::get):
828         * wtf/HashMap.h:
829         (WTF::KeyValuePairKeyExtractor::extract):
830         (WTF::HashMapValueTraits::isEmptyValue):
831         (WTF::HashMapTranslator::translate):
832         (WTF::HashMapTranslatorAdapter::translate):
833         (WTF::::set):
834         (WTF::::get):
835         (WTF::::take):
836         (WTF::operator==):
837         (WTF::deleteAllValues):
838         (WTF::deleteAllKeys):
839         Removed deleteAllPairFirsts() and deleteAllPairSeconds() since they are now unused.
840
841         * wtf/HashTable.h:
842         (WTF::hashTableSwap):
843         (WTF::::checkTableConsistencyExceptSize):
844         * wtf/HashTraits.h:
845         (WTF):
846         (WTF::KeyValuePair::KeyValuePair):
847         (KeyValuePair):
848         (WTF::KeyValuePairHashTraits::constructDeletedValue):
849         (WTF::KeyValuePairHashTraits::isDeletedValue):
850         * wtf/MetaAllocator.cpp:
851         (WTF::MetaAllocator::addFreeSpace):
852         (WTF::MetaAllocator::incrementPageOccupancy):
853         (WTF::MetaAllocator::decrementPageOccupancy):
854         * wtf/RefCountedLeakCounter.cpp:
855         (WTF::RefCountedLeakCounter::~RefCountedLeakCounter):
856         * wtf/RefPtrHashMap.h:
857         (WTF::::set):
858         (WTF::::get):
859         (WTF::::inlineGet):
860         (WTF::::take):
861         * wtf/Spectrum.h:
862         (WTF::Spectrum::add):
863         (WTF::Spectrum::get):
864         (WTF::Spectrum::buildList):
865         * wtf/ThreadingPthreads.cpp:
866         (WTF::identifierByPthreadHandle):
867
868 2012-10-07  Benjamin Poulain  <benjamin@webkit.org>
869
870         WTFURL: implement URL port removal for HTMLAnchorElement
871         https://bugs.webkit.org/show_bug.cgi?id=98604
872
873         Reviewed by Adam Barth.
874
875         Add hasStandardScheme() (similar to isStandard from Google URL),
876         hasPort() and removePort() to implement the port removal of KURL.
877
878         * wtf/url/api/ParsedURL.cpp:
879         (WTF::ParsedURL::hasStandardScheme):
880         (WTF::ParsedURL::hasPort):
881         (WTF::ParsedURL::removePort):
882         * wtf/url/api/ParsedURL.h:
883         (ParsedURL):
884         * wtf/url/src/URLComponent.h:
885         (WTF::URLComponent::move):
886         * wtf/url/src/URLSegments.cpp:
887         (WTF::URLSegments::moveComponentsAfter):
888         * wtf/url/src/URLSegments.h:
889         (URLSegments):
890         * wtf/url/src/URLUtil.cpp:
891         (URLUtilities):
892         (WTF::URLUtilities::isStandard):
893         * wtf/url/src/URLUtil.h:
894         (URLUtilities):
895         Remove LowerCaseEqualsASCII() from the interface, make it an internal template.
896
897         (WTF::URLUtilities::isStandard):
898         Since in WebKit, LChar is a superset of char, expose LChar and cast char* to LChar*.
899
900 2012-10-06  Ilya Tikhonovsky  <loislo@chromium.org>
901
902         Web Inspector: NMI fix String instrumentation the way it was discussed in WK97964
903         https://bugs.webkit.org/show_bug.cgi?id=98500
904
905         Reviewed by Benjamin Poulain.
906
907         Current instrumentation incorrectly covers the case when StringImpl object has been created via StringImpl::createWithTerminatingNullCharacter().
908         Looks like the only way to detect the strings that has been created from literals is to compare the addresses of buffer and stringImpl + 1.
909
910         * wtf/MemoryInstrumentationString.h:
911         (WTF::reportMemoryUsage):
912         * wtf/text/StringImpl.h:
913         (WTF::StringImpl::hasInternalBuffer):
914
915 2012-10-06  Benjamin Poulain  <benjamin@webkit.org>
916
917         Fix build of WTFURL after r130187
918         https://bugs.webkit.org/show_bug.cgi?id=98588
919
920         Reviewed by Kentaro Hara.
921
922         * wtf/MemoryInstrumentationParsedURL.h:
923         (WTF::reportMemoryUsage):
924         * wtf/url/api/ParsedURL.h:
925         (WTF::ParsedURL::spec):
926
927 2012-10-05  Simon Pena  <spena@igalia.com>
928
929         [GTK] Add support for GBytes in GRefPtr
930         https://bugs.webkit.org/show_bug.cgi?id=98489
931
932         Reviewed by Carlos Garcia Campos.
933
934         Adding support for GBytes in GRefPtr makes it easier
935         for them to be used when adding GResources support,
936         and is more consistent with the rest of the port.
937
938         This calls g_bytes_ref and g_bytes_unref in the implementation
939         of the refPtr and derefPtr template functions, in case the GLib
940         version is met. Otherwise, it does nothing.
941
942         * wtf/gobject/GRefPtr.cpp: Implement templates for ref and deref.
943         (WTF::refGPtr):
944         (WTF):
945         (WTF::derefGPtr):
946         * wtf/gobject/GRefPtr.h:
947         (WTF):
948         * wtf/gobject/GTypedefs.h: Define the GBytes datatype.
949
950 2012-10-05  Sheriff Bot  <webkit.review.bot@gmail.com>
951
952         Unreviewed, rolling out r130478.
953         http://trac.webkit.org/changeset/130478
954         https://bugs.webkit.org/show_bug.cgi?id=98494
955
956         It broke the Qt build (Requested by Ossy on #webkit).
957
958         * wtf/gobject/GRefPtr.cpp:
959         * wtf/gobject/GRefPtr.h:
960         (WTF):
961         * wtf/gobject/GTypedefs.h:
962
963 2012-10-05  Simon Pena  <spena@igalia.com>
964
965         [GTK] Add support for GBytes in GRefPtr
966         https://bugs.webkit.org/show_bug.cgi?id=98489
967
968         Reviewed by Carlos Garcia Campos.
969
970         Adding support for GBytes in GRefPtr makes it easier
971         for them to be used when adding GResources support,
972         and is more consistent with the rest of the port.
973
974         This calls g_bytes_ref and g_bytes_unref in the implementation
975         of the refPtr and derefPtr template functions.
976
977         * wtf/gobject/GRefPtr.cpp: Implement templates for ref and deref.
978         (WTF::refGPtr):
979         (WTF):
980         (WTF::derefGPtr):
981         * wtf/gobject/GRefPtr.h:
982         (WTF):
983         * wtf/gobject/GTypedefs.h: Define the GBytes datatype.
984
985 2012-10-04  Dirk Pranke  <dpranke@chromium.org>
986
987         Unreviewed, rolling out r130419.
988         http://trac.webkit.org/changeset/130419
989         https://bugs.webkit.org/show_bug.cgi?id=98406
990
991         broke editing/pasteboard/data-transfer-items.html on chromium
992
993         * wtf/HashTraits.h:
994
995 2012-10-04  Andreas Kling  <kling@webkit.org>
996
997         Lower minimum table size of WTF::HashTable to reduce memory usage.
998         <http://webkit.org/b/98406>
999         <rdar://problem/12432140>
1000
1001         Reviewed by Anders Carlsson.
1002
1003         Lower the default minimumTableSize for WTF hash tables from 64 to 8 entries.
1004         This reduces WebProcess memory consumption by ~16MB on Membuster3 (a 6% progression!)
1005
1006         No significant movement on PLT or JSC benchmarks on my machine. If there's a perf regression somewhere
1007         from this, we can tweak individual tables to have a larger minimumTableSize.
1008
1009         * wtf/HashTraits.h:
1010
1011 2012-10-04  Michael Saboff  <msaboff@apple.com>
1012
1013         String::remove will convert an 8 bit string to a 16 bit string
1014         https://bugs.webkit.org/show_bug.cgi?id=98299
1015
1016         Reviewed by Benjamin Poulain.
1017
1018         Added an 8 bit path to remove().  Added a private templated helper removeInternal.
1019
1020         * wtf/text/WTFString.cpp:
1021         (WTF::String::removeInternal):
1022         (WTF::String::remove):
1023         * wtf/text/WTFString.h:
1024         (String):
1025
1026 2012-10-03  Kangil Han  <kangil.han@samsung.com>
1027
1028         [Refactoring] Tidy NDEBUG optioning in RefCountedBase.
1029         https://bugs.webkit.org/show_bug.cgi?id=98252
1030
1031         Reviewed by Benjamin Poulain.
1032
1033         Fixed incomplete implementation for NDEBUG option.
1034         Additionally, adopted CHECK_REF_COUNTED_LIFECYCLE definition to suppress abusing NDEBUG option.
1035
1036         * wtf/RefCounted.h:
1037         (WTF):
1038         (WTF::RefCountedBase::ref):
1039         (WTF::RefCountedBase::hasOneRef):
1040         (WTF::RefCountedBase::refCount):
1041         (WTF::RefCountedBase::turnOffVerifier):
1042         (WTF::RefCountedBase::relaxAdoptionRequirement):
1043         (WTF::RefCountedBase::RefCountedBase):
1044         (WTF::RefCountedBase::~RefCountedBase):
1045         (WTF::RefCountedBase::derefBase):
1046         (RefCountedBase):
1047         (WTF::adopted):
1048         (WTF::RefCountedBase::setMutexForVerifier):
1049         (WTF::RefCountedBase::setDispatchQueueForVerifier):
1050
1051 2012-10-03  Yury Semikhatsky  <yurys@chromium.org>
1052
1053         Remove MemoryInstrumentation::addCollectionElements
1054         https://bugs.webkit.org/show_bug.cgi?id=98245
1055
1056         Reviewed by Vsevolod Vlasov.
1057
1058         Removed MemoryInstrumentation::addCollectionElements and switched all call sites
1059         to reportSequenceMemoryUsage.
1060
1061         Drive-by fix: removed some unused methods on MemoryInstrumentation.
1062
1063         * wtf/MemoryInstrumentation.h:
1064         * wtf/MemoryInstrumentationHashSet.h:
1065         (WTF::reportMemoryUsage):
1066         * wtf/MemoryInstrumentationSequence.h:
1067         (WTF::SequenceMemoryInstrumentationTraits::reportMemoryUsage):
1068         * wtf/MemoryInstrumentationVector.h:
1069         (WTF::reportMemoryUsage):
1070
1071 2012-10-02  Yury Semikhatsky  <yurys@chromium.org>
1072
1073         Provide memory instrumentation for HashCountedSet
1074         https://bugs.webkit.org/show_bug.cgi?id=98138
1075
1076         Reviewed by Pavel Feldman.
1077
1078         Added memory instrumentation for HashCountedSet.
1079
1080         Extracted common routines for collecting memory info for an iterable sequence.
1081
1082         * GNUmakefile.list.am:
1083         * WTF.gypi:
1084         * WTF.pro:
1085         * WTF.vcproj/WTF.vcproj:
1086         * WTF.xcodeproj/project.pbxproj:
1087         * wtf/MemoryInstrumentation.h:
1088         (WTF):
1089         * wtf/MemoryInstrumentationHashCountedSet.h: Copied from Source/WTF/wtf/MemoryInstrumentationHashSet.h.
1090         (WTF):
1091         (WTF::reportMemoryUsage):
1092         * wtf/MemoryInstrumentationHashMap.h:
1093         (WTF::reportMemoryUsage):
1094         * wtf/MemoryInstrumentationHashSet.h:
1095         * wtf/MemoryInstrumentationSequence.h: Copied from Source/WTF/wtf/MemoryInstrumentationHashMap.h.
1096         (WTF):
1097         (WTF::SequenceMemoryInstrumentationTraits::reportMemoryUsage):
1098         (WTF::reportSequenceMemoryUsage):
1099
1100 2012-10-02  Joshua Bell  <jsbell@chromium.org>
1101
1102         Add htons/htonl definitions and implementations
1103         https://bugs.webkit.org/show_bug.cgi?id=98054
1104
1105         Reviewed by Darin Adler.
1106
1107         For parsing or serializing binary data, byte order matters. The canonical htons/htonl/
1108         ntohs/ntohl functions are not present everywhere, so implementations are proliferating in
1109         parsers. Expose a new WTF header (wtf/ByteOrder.h) that includes the standard
1110         implementations on UNIX-like OSs and provides basic inlined implementations on Windows.
1111
1112         * GNUmakefile.list.am:
1113         * WTF.gypi:
1114         * WTF.pro:
1115         * WTF.vcproj/WTF.vcproj:
1116         * WTF.xcodeproj/project.pbxproj:
1117         * wtf/ByteOrder.h: Added.
1118         (WTF::wswap32): Inline functions so arguments are only evaluated once.
1119         (WTF::bswap32):
1120         (WTF::bswap16):
1121         (ntohs): Inline functions on OS(WINDOWS) to match macros on OS(UNIX)
1122         (htons):
1123         (ntohl):
1124         (htonl):
1125         * wtf/CMakeLists.txt:
1126
1127 2012-10-02  Michael Saboff  <msaboff@apple.com>
1128
1129         HTMLConstructionSite::insertTextNode isn't optimized for 8 bit strings
1130         https://bugs.webkit.org/show_bug.cgi?id=97740
1131
1132         Reviewed by Darin Adler.
1133
1134         Added an append method that takes an LChar source.  Made both the UChar and LChar versions optimally handle
1135         the appendee and appendend string bitness.
1136
1137         * wtf/text/WTFString.cpp:
1138         (WTF::String::append):
1139         * wtf/text/WTFString.h:
1140         (String):
1141
1142 2012-10-02  Ilya Tikhonovsky  <loislo@chromium.org>
1143
1144         Web Inspector: NMI: switch to non intrusive instrumentation of ParsedURL.
1145         https://bugs.webkit.org/show_bug.cgi?id=98150
1146
1147         Reviewed by Yury Semikhatsky.
1148
1149         Memory instrumentation for ParsedURL was extracted into separate header MemoryInstrumentationParsedURL.h
1150
1151         Drive by fix: unnecessary include was removed from String*.cpp files.
1152
1153         * GNUmakefile.list.am:
1154         * WTF.gypi:
1155         * WTF.pro:
1156         * WTF.xcodeproj/project.pbxproj:
1157         * wtf/MemoryInstrumentation.h:
1158         (WTF):
1159         * wtf/MemoryInstrumentationParsedURL.h: Added.
1160         (WTF):
1161         (WTF::reportMemoryUsage):
1162         * wtf/text/AtomicString.cpp:
1163         * wtf/text/StringImpl.cpp:
1164         * wtf/text/WTFString.cpp:
1165         * wtf/url/api/ParsedURL.cpp:
1166         * wtf/url/api/ParsedURL.h:
1167         * wtf/url/api/URLString.cpp:
1168         * wtf/url/api/URLString.h:
1169
1170 2012-09-29  Ilya Tikhonovsky  <loislo@chromium.org>
1171
1172         Web Inspector: NMI make String* instrumentation non intrusive
1173         https://bugs.webkit.org/show_bug.cgi?id=97964
1174
1175         Reviewed by Yury Semikhatsky.
1176
1177         MemoryInstrumentationString.h was added.
1178         Intrusive instrumentation was removed.
1179
1180         * GNUmakefile.list.am:
1181         * WTF.gypi:
1182         * WTF.pro:
1183         * WTF.vcproj/WTF.vcproj:
1184         * WTF.xcodeproj/project.pbxproj:
1185         * wtf/MemoryInstrumentation.h:
1186         (WTF):
1187         * wtf/MemoryInstrumentationString.h: Added.
1188         (WTF):
1189         (WTF::reportMemoryUsage):
1190         * wtf/text/AtomicString.cpp:
1191         (WTF):
1192         * wtf/text/AtomicString.h:
1193         (AtomicString):
1194         * wtf/text/CString.h:
1195         (WTF::CStringBuffer::length):
1196         * wtf/text/StringImpl.cpp:
1197         * wtf/text/StringImpl.h:
1198         (WTF::StringImpl::usesInternalBuffer):
1199         (WTF::StringImpl::baseString):
1200         (StringImpl):
1201
1202 2012-10-02  Sheriff Bot  <webkit.review.bot@gmail.com>
1203
1204         Unreviewed, rolling out r130129.
1205         http://trac.webkit.org/changeset/130129
1206         https://bugs.webkit.org/show_bug.cgi?id=98125
1207
1208         broke 4 webkit_unit_tests
1209         (MemoryInstrumentationTest.hashMapWith*) (Requested by caseq
1210         on #webkit).
1211
1212         * GNUmakefile.list.am:
1213         * WTF.gypi:
1214         * WTF.pro:
1215         * WTF.vcproj/WTF.vcproj:
1216         * WTF.xcodeproj/project.pbxproj:
1217         * wtf/MemoryInstrumentation.h:
1218         (WTF):
1219         * wtf/MemoryInstrumentationString.h: Removed.
1220         * wtf/text/AtomicString.cpp:
1221         (WTF::AtomicString::reportMemoryUsage):
1222         (WTF):
1223         * wtf/text/AtomicString.h:
1224         (AtomicString):
1225         * wtf/text/CString.h:
1226         (WTF::CStringBuffer::length):
1227         (CStringBuffer):
1228         (WTF::CStringBuffer::reportMemoryUsage):
1229         (CString):
1230         (WTF::CString::reportMemoryUsage):
1231         * wtf/text/StringImpl.cpp:
1232         (WTF::StringImpl::reportMemoryUsage):
1233         (WTF):
1234         * wtf/text/StringImpl.h:
1235         (StringImpl):
1236         * wtf/text/WTFString.cpp:
1237         (WTF::String::reportMemoryUsage):
1238         (WTF):
1239         * wtf/text/WTFString.h:
1240         (String):
1241
1242 2012-09-29  Ilya Tikhonovsky  <loislo@chromium.org>
1243
1244         Web Inspector: NMI make String* instrumentation non intrusive
1245         https://bugs.webkit.org/show_bug.cgi?id=97964
1246
1247         Reviewed by Yury Semikhatsky.
1248
1249         MemoryInstrumentationString.h was added.
1250         Intrusive instrumentation was removed.
1251
1252         * GNUmakefile.list.am:
1253         * WTF.gypi:
1254         * WTF.pro:
1255         * WTF.vcproj/WTF.vcproj:
1256         * WTF.xcodeproj/project.pbxproj:
1257         * wtf/MemoryInstrumentation.h:
1258         (WTF):
1259         * wtf/MemoryInstrumentationString.h: Added.
1260         (WTF):
1261         (WTF::reportMemoryUsage):
1262         * wtf/text/AtomicString.cpp:
1263         (WTF):
1264         * wtf/text/AtomicString.h:
1265         (AtomicString):
1266         * wtf/text/CString.h:
1267         (WTF::CStringBuffer::length):
1268         * wtf/text/StringImpl.cpp:
1269         * wtf/text/StringImpl.h:
1270         (WTF::StringImpl::usesInternalBuffer):
1271         (WTF::StringImpl::baseString):
1272         (StringImpl):
1273
1274 2012-10-01  Daniel Drake  <dsd@laptop.org>
1275
1276         Another SIGILL in JavaScriptCore on a Geode processor
1277         https://bugs.webkit.org/show_bug.cgi?id=96286
1278
1279         Reviewed by Filip Pizlo.
1280
1281         Disable LLint for the GTK build where the build target does not
1282         support SSE2 instructions. Restores support for non-SSE2 processors
1283         such as the AMD Geode.
1284
1285         * wtf/Platform.h:
1286
1287 2012-10-01  Yury Semikhatsky  <yurys@chromium.org>
1288
1289         Web Inspector: provide memory instrumentation for HashMap
1290         https://bugs.webkit.org/show_bug.cgi?id=98005
1291
1292         Reviewed by Pavel Feldman.
1293
1294         Extracted HashMap memory instrumentation into its own file. The map's content
1295         elements will be automatically traversed if their types are supported
1296         by the memory instrumentation. No need to call special method for hash map
1297         fields any more.
1298
1299         * GNUmakefile.list.am:
1300         * WTF.gypi:
1301         * WTF.pro:
1302         * WTF.vcproj/WTF.vcproj:
1303         * wtf/MemoryInstrumentation.h:
1304         (MemoryInstrumentation):
1305         (WTF):
1306         * wtf/MemoryInstrumentationHashMap.h: Added.
1307         (WTF):
1308         (WTF::SequenceMemoryInstrumentationTraits::reportMemoryUsage):
1309         (WTF::reportMemoryUsage):
1310
1311 2012-10-01  Alberto Garcia  <agarcia@igalia.com>
1312
1313         Check that __cplusplus is defined before comparing its value
1314         https://bugs.webkit.org/show_bug.cgi?id=98015
1315
1316         Reviewed by Xan Lopez.
1317
1318         If __cplusplus is not defined is interpreted as having the value
1319         0, but it produces a compilation warning with -Wundef.
1320
1321         This is the case with some API tests that are written in C
1322         (JSNode.c, JSNodeList.c, minidom.c).
1323
1324         * wtf/Compiler.h:
1325
1326 2012-10-01  Carlos Garcia Campos  <cgarcia@igalia.com>
1327
1328         Unreviewed. Fix make distcheck.
1329
1330         * GNUmakefile.list.am: Add missing header files to compilation.
1331
1332 2012-09-30  Mark Hahnenberg  <mhahnenberg@apple.com>
1333
1334         Clean up HasTrivialConstructor/Destructor
1335         https://bugs.webkit.org/show_bug.cgi?id=97754
1336
1337         Reviewed by Sam Weinig.
1338
1339         Mixed up the HasTrivialDestructor/Constructor case for VS2010 and later in the previous patch.
1340
1341         * wtf/TypeTraits.h:
1342
1343 2012-09-29  Sheriff Bot  <webkit.review.bot@gmail.com>
1344
1345         Unreviewed, rolling out r129982.
1346         http://trac.webkit.org/changeset/129982
1347         https://bugs.webkit.org/show_bug.cgi?id=97971
1348
1349         hit assert in fast/overflow/overflow-height-float-not-removed-
1350         crash3.html (Requested by eae on #webkit).
1351
1352         * wtf/Platform.h:
1353
1354 2012-09-29  Emil A Eklund  <eae@chromium.org>
1355
1356         Enable SATURATED_LAYOUT_ARITHMETIC for chromium
1357         https://bugs.webkit.org/show_bug.cgi?id=95053
1358
1359         Reviewed by Abhishek Arya.
1360
1361         Enable the SATURATED_LAYOUT_ARITHMETIC flag for the chromium port.
1362         This changes the behavior of FractionalLayoutUnit to clamp to the
1363         max or min value instead of overflowing.
1364
1365         This may very well impact performance so the current plan is to enable
1366         it for a couple of hours to a day to collect performance data and then
1367         disable it again until we've had a chance to review the perf data.
1368
1369         * wtf/Platform.h:
1370
1371 2012-09-28  Anders Carlsson  <andersca@apple.com>
1372
1373         Remove Java bridge
1374         https://bugs.webkit.org/show_bug.cgi?id=97954
1375
1376         Reviewed by Sam Weinig.
1377
1378         The Java bridge is not used by any port; Mac now has a NPAPI Java plug-in.
1379
1380         * wtf/Platform.h:
1381
1382 2012-09-28  Kai Koehne  <kai.koehne@digia.com>
1383
1384         Disable YARR_JIT for Windows 64 bit
1385         https://bugs.webkit.org/show_bug.cgi?id=97772
1386
1387         Reviewed by Simon Hausmann.
1388
1389         Using YARR_JIT requires ASSEMBLER, which in turn enables the
1390         executable fixed allocator, which is mmap based (not available on
1391         Windows).
1392
1393         * wtf/Platform.h:
1394
1395 2012-09-28  Yury Semikhatsky  <yurys@chromium.org>
1396
1397         Web Inspector: make HashSet memory instrumentation non-intrusive
1398         https://bugs.webkit.org/show_bug.cgi?id=97879
1399
1400         Reviewed by Vsevolod Vlasov.
1401
1402         Removed reportMemoryUsage declarations as a friend of HashSet and HashTable. Also
1403         removed MemoryInstrumentationHashTable which is not needed if we don't have
1404         access to HashSet's guts.
1405
1406         * GNUmakefile.list.am:
1407         * WTF.gypi:
1408         * WTF.pro:
1409         * WTF.vcproj/WTF.vcproj:
1410         * WTF.xcodeproj/project.pbxproj:
1411         * wtf/HashSet.h:
1412         (WTF):
1413         (HashSet):
1414         * wtf/HashTable.h:
1415         (HashTable):
1416         * wtf/MemoryInstrumentation.h:
1417         (WTF::MemoryClassInfo::addPrivateBuffer):
1418         * wtf/MemoryInstrumentationHashSet.h:
1419         (WTF::reportMemoryUsage):
1420         * wtf/MemoryInstrumentationHashTable.h: Removed.
1421
1422 2012-09-27  Anders Carlsson  <andersca@apple.com>
1423
1424         Remove the clang pragmas to disable warnings in Noncopyable.h
1425         https://bugs.webkit.org/show_bug.cgi?id=97826
1426
1427         Reviewed by Beth Dakin.
1428
1429         Warnings about C++11 extensions are already disabled project-wide now so there's no need
1430         to keep these pragmas.
1431
1432         * wtf/Noncopyable.h:
1433
1434 2012-09-26  Mark Hahnenberg  <mhahnenberg@apple.com>
1435
1436         Clean up HasTrivialConstructor/Destructor
1437         https://bugs.webkit.org/show_bug.cgi?id=97754
1438
1439         Reviewed by Darin Adler.
1440
1441         Cleaned up HasTrivialConstructor and HasTrivialDestructor by defining them in terms of 
1442         other type traits we have. Also moved some ifdefs and comments to make things more clear.
1443
1444         * wtf/TypeTraits.h:
1445
1446 2012-09-27  Ilya Tikhonovsky  <loislo@chromium.org>
1447
1448         Web Inspector: NMI: move visited and countObjectSize methods implementation into separate class.
1449         https://bugs.webkit.org/show_bug.cgi?id=97461
1450
1451         Reviewed by Yury Semikhatsky.
1452
1453         These methods and the data collected by them need to be used in the instrumentation code for other components.
1454         As example when we are visiting bitmaps we need to visit platform specific objects.
1455         These objects will be instrumented with help of component's own instrumentation code
1456         but we have to keep the single set of visited objects and the map of counters.
1457
1458         * wtf/MemoryInstrumentation.h:
1459         (MemoryInstrumentationClient):
1460         (WTF::MemoryInstrumentationClient::~MemoryInstrumentationClient):
1461         (WTF):
1462         (WTF::MemoryInstrumentation::MemoryInstrumentation):
1463         (MemoryInstrumentation):
1464         (WTF::MemoryInstrumentation::countObjectSize):
1465         (WTF::MemoryInstrumentation::visited):
1466
1467 2012-09-27  Csaba Osztrogonác  <ossy@webkit.org>, Tor Arne Vestbø  <vestbo@webkit.org>
1468
1469         [Qt] Enable the LLInt on Linux
1470         https://bugs.webkit.org/show_bug.cgi?id=95749
1471
1472         Reviewed by Simon Hausmann.
1473
1474         * wtf/Platform.h:
1475
1476 2012-09-26  Cosmin Truta  <ctruta@rim.com>
1477
1478         [BlackBerry] Allow denormal floats in ARM VFP
1479         https://bugs.webkit.org/show_bug.cgi?id=97008
1480
1481         Reviewed by Filip Pizlo.
1482         Reviewed internally by Yong Li.
1483
1484         Cleared the Flush-to-Zero flag in the ARM FPSCR register on QNX.
1485
1486         * wtf/ThreadingPthreads.cpp:
1487         (WTF::enableIEEE754Denormal): Added.
1488         (WTF::initializeThreading):
1489         (WTF::initializeCurrentThreadInternal):
1490
1491 2012-09-26  Michael Saboff  <msaboff@apple.com>
1492
1493         Update ComplexTextController for 8 bit TextRun changes
1494         https://bugs.webkit.org/show_bug.cgi?id=97378
1495
1496         Reviewed by Geoffrey Garen.
1497
1498         Add a new create method to make a 16 bit string from 8 bit source data.  This is used in 
1499         ComplexTextController when we have LChar* + length text data, but we really want 16 bit
1500         data for the complex text rendering code.
1501
1502         * wtf/text/WTFString.cpp:
1503         (WTF::String::make16BitFrom8BitSource):
1504         (WTF):
1505         * wtf/text/WTFString.h:
1506         (String):
1507
1508 2012-09-26  Ilya Tikhonovsky  <loislo@chromium.org>
1509
1510         Web Inspector: NMI: replace manual JS external resources counting with MemoryInstrumentation
1511         https://bugs.webkit.org/show_bug.cgi?id=97662
1512
1513         Reviewed by Yury Semikhatsky.
1514
1515         Old schema uses sizeInBytes method on StringImpl. This method works incorrect for substrings.
1516         Also we'd like to know exact pointers to strings and buffers for verification purposes.
1517
1518         * GNUmakefile.list.am:
1519         * WTF.gypi:
1520         * WTF.pro:
1521         * WTF.vcproj/WTF.vcproj:
1522         * WTF.xcodeproj/project.pbxproj:
1523         * wtf/MemoryInstrumentationArrayBufferView.h:
1524         (WTF):
1525         (WTF::reportMemoryUsage):
1526
1527 2012-09-25  Ilya Tikhonovsky  <loislo@chromium.org>
1528
1529         Web Inspector: extract HashSet instrumentation from core NMI code and put it into MemoryInstrumentationHashSet.h
1530         https://bugs.webkit.org/show_bug.cgi?id=97198
1531
1532         Reviewed by Yury Semikhatsky.
1533
1534         Current implementation has overloads for HashSet.
1535         This prevents us from instrumenting complex cases like Vector<HashSet<...> >.
1536
1537         * GNUmakefile.list.am:
1538         * WTF.gypi:
1539         * WTF.pro:
1540         * WTF.vcproj/WTF.vcproj:
1541         * WTF.xcodeproj/project.pbxproj:
1542         * wtf/HashSet.h:
1543         (WTF):
1544         (HashSet):
1545         * wtf/HashTable.h:
1546         (WTF):
1547         (HashTable):
1548         * wtf/MemoryInstrumentation.h:
1549         (WTF::MemoryClassInfo::addCollectionElements):
1550         (WTF::MemoryClassInfo::addHashCountedSet):
1551         * wtf/MemoryInstrumentationHashSet.h: Added.
1552         (WTF):
1553         (WTF::reportMemoryUsage):
1554         * wtf/MemoryInstrumentationHashTable.h: Added.
1555         (WTF):
1556         (WTF::reportMemoryUsage):
1557
1558 2012-09-26  Yury Semikhatsky  <yurys@chromium.org>
1559
1560         Web Inspector: compare objects counted by the memory instrumentation with those allocated in the heap
1561         https://bugs.webkit.org/show_bug.cgi?id=97641
1562
1563         Reviewed by Pavel Feldman.
1564
1565         Added a method for checking if reported object was actually allocated in the heap.
1566
1567         * wtf/MemoryInstrumentation.h:
1568         (MemoryInstrumentation):
1569         (WTF::MemoryInstrumentation::addObjectImpl):
1570
1571 2012-09-26  Gavin Barraclough  <barraclough@apple.com>
1572
1573         String.localeCompare should normalize input
1574         https://bugs.webkit.org/show_bug.cgi?id=97639
1575
1576         Reviewed by Filip Pizlo.
1577
1578         From the spec: "It is strongly recommended that this function treat Strings that are
1579         canonically equivalent according to the Unicode standard as identical (in other words,
1580         compare the Strings as if they had both been converted to Normalised Form C or D first).
1581         It is also recommended that this function not honour Unicode compatibility equivalences
1582         or decompositions."
1583
1584         * wtf/unicode/icu/CollatorICU.cpp:
1585         (WTF::Collator::createCollator):
1586             - Enable normalization.
1587
1588 2012-09-25  Cosmin Truta  <ctruta@rim.com>
1589
1590         [BlackBerry] Enable LLInt
1591         https://bugs.webkit.org/show_bug.cgi?id=97604
1592
1593         Reviewed by Yong Li.
1594
1595         Set the prefix of LOCAL_LABEL_STRING to ".L" on QNX.
1596
1597         * wtf/InlineASM.h:
1598
1599 2012-09-25  Patrick Gansterer  <paroga@webkit.org>
1600
1601         Do not enable DFG JIT for COMPILER(MSVC).
1602
1603         The current code does not support MSVC inline assembler, so disable it for now.
1604
1605         * wtf/Platform.h:
1606
1607 2012-09-25  Pratik Solanki  <psolanki@apple.com>
1608
1609         Remove HAVE_SBRK since we never set use_sbrk to true
1610         https://bugs.webkit.org/show_bug.cgi?id=97525
1611         <rdar://problem/12363601>
1612
1613         Reviewed by Geoffrey Garen.
1614
1615         The code under HAVE(SBRK) has not been used since 2005. We use mmap not sbrk for FastMalloc
1616         not sbrk. We can just remove the define and move all of this code inside #ifndef
1617         WTF_CHANGES.
1618
1619         * wtf/Platform.h:
1620         * wtf/TCSystemAlloc.cpp:
1621         (TCMalloc_SystemAlloc):
1622
1623 2012-09-25  Mark Lam  <mark.lam@apple.com>
1624
1625         #undef some symbols before redefining them.
1626         https://bugs.webkit.org/show_bug.cgi?id=97568.
1627
1628         Reviewed by Michael Saboff.
1629
1630         * wtf/Platform.h:
1631
1632 2012-09-21  Ilya Tikhonovsky  <loislo@chromium.org>
1633
1634         Web Inspector: extract Vector instrumentation from core NMI code into MemoryInstrumentationVector.h header.
1635         https://bugs.webkit.org/show_bug.cgi?id=96650
1636
1637         Reviewed by Vsevolod Vlasov.
1638
1639         Added reportMemoryUsage free template function with default body to core NMI code
1640         and add custom version of reportMemoryUsage function for Vectors.
1641
1642         * GNUmakefile.list.am:
1643         * WTF.gypi:
1644         * WTF.pro:
1645         * WTF.vcproj/WTF.vcproj:
1646         * WTF.xcodeproj/project.pbxproj:
1647         * wtf/MemoryInstrumentation.h:
1648         (WTF):
1649         (MemoryInstrumentation):
1650         (WTF::MemoryInstrumentation::addObjectImpl):
1651         * wtf/MemoryInstrumentationVector.h: Added.
1652         (WTF):
1653         (WTF::instrumentVectorValues):
1654         (WTF::reportMemoryUsage):
1655
1656 2012-09-24  Mark Lam  <mark.lam@apple.com>
1657
1658         Deleting the classic interpreter and cleaning up some build options.
1659         https://bugs.webkit.org/show_bug.cgi?id=96969.
1660
1661         Reviewed by Geoffrey Garen.
1662
1663         * wtf/OSAllocatorPosix.cpp:
1664         (WTF::OSAllocator::reserveAndCommit):
1665         * wtf/Platform.h:
1666
1667 2012-09-24  Patrick Gansterer  <paroga@webkit.org>
1668
1669         Remove String::operator+=()
1670         https://bugs.webkit.org/show_bug.cgi?id=96172
1671
1672         Reviewed by Benjamin Poulain.
1673
1674         * wtf/Platform.h:
1675         * wtf/text/WTFString.h:
1676
1677 2012-09-24  Benjamin Poulain  <benjamin@webkit.org>
1678
1679         Add support for query encoding to WTFURL
1680         https://bugs.webkit.org/show_bug.cgi?id=97422
1681
1682         Reviewed by Adam Barth.
1683
1684         Expose character conversion through the new abstract class URLQueryCharsetConverter.
1685         URLQueryCharsetConverter is implemented by WebCore to expose the TextEncoding classes.
1686
1687         Unfortunatelly that forces us to bring over URLBuffer in the public API. We may be able
1688         to mitigate that later when moving WTFURL to more templates.
1689
1690         The change fixes 2 of the URL layout tests.
1691
1692         * WTF.xcodeproj/project.pbxproj:
1693         * wtf/url/api/ParsedURL.cpp:
1694         (WTF::ParsedURL::ParsedURL):
1695         * wtf/url/api/ParsedURL.h:
1696         (ParsedURL):
1697         ParsedURL was using the same constructor for ParsedURLString, and URL without a base.
1698         That was a mistake on my part, I did not intend that, fixed it now :)
1699
1700         * wtf/url/api/URLBuffer.h: Renamed from Source/WTF/wtf/url/src/URLBuffer.h.
1701         (URLBuffer):
1702         (WTF::URLBuffer::URLBuffer):
1703         (WTF::URLBuffer::~URLBuffer):
1704         (WTF::URLBuffer::at):
1705         (WTF::URLBuffer::set):
1706         (WTF::URLBuffer::capacity):
1707         (WTF::URLBuffer::length):
1708         (WTF::URLBuffer::data):
1709         (WTF::URLBuffer::setLength):
1710         (WTF::URLBuffer::append):
1711         (WTF::URLBuffer::grow):
1712         * wtf/url/api/URLQueryCharsetConverter.h: Added.
1713         (URLQueryCharsetConverter):
1714         (WTF::URLQueryCharsetConverter::URLQueryCharsetConverter):
1715         (WTF::URLQueryCharsetConverter::~URLQueryCharsetConverter):
1716         * wtf/url/src/URLCanon.h:
1717         (URLCanonicalizer):
1718         * wtf/url/src/URLCanonFilesystemurl.cpp:
1719         (WTF::URLCanonicalizer::canonicalizeFileSystemURL):
1720         (WTF::URLCanonicalizer::ReplaceFileSystemURL):
1721         * wtf/url/src/URLCanonFileurl.cpp:
1722         (WTF::URLCanonicalizer::CanonicalizeFileURL):
1723         (WTF::URLCanonicalizer::ReplaceFileURL):
1724         * wtf/url/src/URLCanonInternal.h:
1725         (URLCanonicalizer):
1726         * wtf/url/src/URLCanonQuery.cpp:
1727         (WTF::URLCanonicalizer::CanonicalizeQuery):
1728         (WTF::URLCanonicalizer::ConvertUTF16ToQueryEncoding):
1729         * wtf/url/src/URLCanonRelative.cpp:
1730         (WTF::URLCanonicalizer::resolveRelativeURL):
1731         * wtf/url/src/URLCanonStdURL.cpp:
1732         (WTF::URLCanonicalizer::CanonicalizeStandardURL):
1733         (WTF::URLCanonicalizer::ReplaceStandardURL):
1734         * wtf/url/src/URLUtil.cpp:
1735         (URLUtilities):
1736         (WTF::URLUtilities::canonicalize):
1737         (WTF::URLUtilities::resolveRelative):
1738         (WTF::URLUtilities::ReplaceComponents):
1739         * wtf/url/src/URLUtil.h:
1740         (URLUtilities):
1741
1742 2012-09-24  Benjamin Poulain  <benjamin@webkit.org>
1743
1744         Integrate most of GoogleURL in WTFURL
1745         https://bugs.webkit.org/show_bug.cgi?id=97405
1746
1747         Reviewed by Adam Barth.
1748
1749         This patch brings almost all of the implementatation of Google-URL in WTFURL
1750         with only minor changes.
1751
1752         The changes from the original code are mostly:
1753         -Code cleaning.
1754         -Replace url_parse::Parsed by URLSegments.
1755         -Replace url_parse::Component by URLComponent
1756         -More code cleaning.
1757         -Adopt URLBuffer and RawURLBuffer instead of the CanonOutputT and RawCanonOutputT.
1758         -Use URLCharacterTypes instead of the litany of characters functions.
1759         -Some more code cleaning.
1760         -Fix the style to match WebKit as much as possible.
1761         -Rename the files to match WebKit style.
1762
1763         * WTF.xcodeproj/project.pbxproj:
1764         * wtf/url/api/ParsedURL.cpp:
1765         (WTF::ParsedURL::ParsedURL):
1766         (WTF::ParsedURL::segment):
1767         * wtf/url/api/ParsedURL.h:
1768         (WTF::ParsedURL::isValid):
1769         * wtf/url/src/RawURLBuffer.h:
1770         * wtf/url/src/URLCanon.h: Added.
1771         (URLCanonicalizer):
1772         (CharsetConverter):
1773         (WTF::URLCanonicalizer::CharsetConverter::CharsetConverter):
1774         (WTF::URLCanonicalizer::CharsetConverter::~CharsetConverter):
1775         (CanonHostInfo):
1776         (WTF::URLCanonicalizer::CanonHostInfo::CanonHostInfo):
1777         (WTF::URLCanonicalizer::CanonHostInfo::IsIPAddress):
1778         (WTF::URLCanonicalizer::CanonHostInfo::AddressLength):
1779         (URLComponentSource):
1780         (WTF::URLCanonicalizer::URLComponentSource::URLComponentSource):
1781         (Replacements):
1782         (WTF::URLCanonicalizer::Replacements::Replacements):
1783         (WTF::URLCanonicalizer::Replacements::SetScheme):
1784         (WTF::URLCanonicalizer::Replacements::IsSchemeOverridden):
1785         (WTF::URLCanonicalizer::Replacements::SetUsername):
1786         (WTF::URLCanonicalizer::Replacements::ClearUsername):
1787         (WTF::URLCanonicalizer::Replacements::IsUsernameOverridden):
1788         (WTF::URLCanonicalizer::Replacements::SetPassword):
1789         (WTF::URLCanonicalizer::Replacements::ClearPassword):
1790         (WTF::URLCanonicalizer::Replacements::IsPasswordOverridden):
1791         (WTF::URLCanonicalizer::Replacements::SetHost):
1792         (WTF::URLCanonicalizer::Replacements::ClearHost):
1793         (WTF::URLCanonicalizer::Replacements::IsHostOverridden):
1794         (WTF::URLCanonicalizer::Replacements::SetPort):
1795         (WTF::URLCanonicalizer::Replacements::ClearPort):
1796         (WTF::URLCanonicalizer::Replacements::IsPortOverridden):
1797         (WTF::URLCanonicalizer::Replacements::SetPath):
1798         (WTF::URLCanonicalizer::Replacements::ClearPath):
1799         (WTF::URLCanonicalizer::Replacements::IsPathOverridden):
1800         (WTF::URLCanonicalizer::Replacements::SetQuery):
1801         (WTF::URLCanonicalizer::Replacements::ClearQuery):
1802         (WTF::URLCanonicalizer::Replacements::IsQueryOverridden):
1803         (WTF::URLCanonicalizer::Replacements::SetRef):
1804         (WTF::URLCanonicalizer::Replacements::ClearRef):
1805         (WTF::URLCanonicalizer::Replacements::IsRefOverridden):
1806         (WTF::URLCanonicalizer::Replacements::sources):
1807         (WTF::URLCanonicalizer::Replacements::components):
1808         (WTF::URLCanonicalizer::Replacements::Placeholder):
1809         * wtf/url/src/URLCanonEtc.cpp: Added.
1810         (WTF::URLCanonicalizer::removeURLWhitespace):
1811         (URLCanonicalizer):
1812         (WTF::URLCanonicalizer::canonicalSchemeChar):
1813         (WTF::URLCanonicalizer::CanonicalizeScheme):
1814         (WTF::URLCanonicalizer::CanonicalizeUserInfo):
1815         (WTF::URLCanonicalizer::CanonicalizePort):
1816         (WTF::URLCanonicalizer::CanonicalizeRef):
1817         * wtf/url/src/URLCanonFilesystemurl.cpp: Added.
1818         (WTF::URLCanonicalizer::CanonicalizeFileSystemURL):
1819         (URLCanonicalizer):
1820         (WTF::URLCanonicalizer::ReplaceFileSystemURL):
1821         * wtf/url/src/URLCanonFileurl.cpp: Added.
1822         (WTF::URLCanonicalizer::CanonicalizeFileURL):
1823         (URLCanonicalizer):
1824         (WTF::URLCanonicalizer::FileCanonicalizePath):
1825         (WTF::URLCanonicalizer::ReplaceFileURL):
1826         * wtf/url/src/URLCanonHost.cpp: Added.
1827         (WTF::URLCanonicalizer::CanonicalizeHost):
1828         (URLCanonicalizer):
1829         (WTF::URLCanonicalizer::CanonicalizeHostVerbose):
1830         * wtf/url/src/URLCanonICU.cpp: Added.
1831         (WTF::URLCanonicalizer::IDNToASCII):
1832         (URLCanonicalizer):
1833         (WTF::URLCanonicalizer::readUTFChar):
1834         * wtf/url/src/URLCanonIP.cpp: Added.
1835         (WTF::URLCanonicalizer::CanonicalizeIPAddress):
1836         (URLCanonicalizer):
1837         * wtf/url/src/URLCanonInternal.cpp: Added.
1838         (URLCanonicalizer):
1839         (WTF::URLCanonicalizer::AppendInvalidNarrowString):
1840         (WTF::URLCanonicalizer::ConvertUTF16ToUTF8):
1841         (WTF::URLCanonicalizer::ConvertUTF8ToUTF16):
1842         (WTF::URLCanonicalizer::SetupOverrideComponents):
1843         (WTF::URLCanonicalizer::SetupUTF16OverrideComponents):
1844         (WTF::URLCanonicalizer::_itoa_s):
1845         (WTF::URLCanonicalizer::_itow_s):
1846         * wtf/url/src/URLCanonInternal.h: Added.
1847         (URLCanonicalizer):
1848         (WTF::URLCanonicalizer::hexCharToValue):
1849         (WTF::URLCanonicalizer::isDot):
1850         (WTF::URLCanonicalizer::appendURLEscapedCharacter):
1851         (WTF::URLCanonicalizer::doAppendUTF8):
1852         (WTF::URLCanonicalizer::AppendCharToOutput):
1853         (WTF::URLCanonicalizer::AppendUTF8Value):
1854         (WTF::URLCanonicalizer::AppendUTF8EscapedValue):
1855         (WTF::URLCanonicalizer::AppendUTF16Value):
1856         (WTF::URLCanonicalizer::AppendUTF8EscapedChar):
1857         (WTF::URLCanonicalizer::Is8BitChar):
1858         (WTF::URLCanonicalizer::DecodeEscaped):
1859         (WTF::URLCanonicalizer::_itoa_s):
1860         (WTF::URLCanonicalizer::_itow_s):
1861         (WTF::URLCanonicalizer::_strtoui64):
1862         * wtf/url/src/URLCanonMailto.cpp: Added.
1863         (WTF::URLCanonicalizer::CanonicalizeMailtoURL):
1864         (URLCanonicalizer):
1865         (WTF::URLCanonicalizer::ReplaceMailtoURL):
1866         * wtf/url/src/URLCanonPath.cpp: Added.
1867         (WTF::URLCanonicalizer::CanonicalizePath):
1868         (URLCanonicalizer):
1869         (WTF::URLCanonicalizer::CanonicalizePartialPath):
1870         * wtf/url/src/URLCanonPathurl.cpp: Added.
1871         (WTF::URLCanonicalizer::canonicalizePathURL):
1872         (URLCanonicalizer):
1873         (WTF::URLCanonicalizer::ReplacePathURL):
1874         * wtf/url/src/URLCanonQuery.cpp: Added.
1875         (WTF::URLCanonicalizer::CanonicalizeQuery):
1876         (URLCanonicalizer):
1877         (WTF::URLCanonicalizer::ConvertUTF16ToQueryEncoding):
1878         * wtf/url/src/URLCanonRelative.cpp: Added.
1879         (WTF::URLCanonicalizer::isRelativeURL):
1880         (URLCanonicalizer):
1881         (WTF::URLCanonicalizer::resolveRelativeURL):
1882         * wtf/url/src/URLCanonStdURL.cpp: Added.
1883         (WTF::URLCanonicalizer::DefaultPortForScheme):
1884         (URLCanonicalizer):
1885         (WTF::URLCanonicalizer::CanonicalizeStandardURL):
1886         (WTF::URLCanonicalizer::ReplaceStandardURL):
1887         * wtf/url/src/URLCharacterTypes.cpp:
1888         * wtf/url/src/URLCharacterTypes.h:
1889         (WTF::URLCharacterTypes::isComponentChar):
1890         (WTF::URLCharacterTypes::isHexChar):
1891         (WTF::URLCharacterTypes::isIPv4Char):
1892         (WTF::URLCharacterTypes::isQueryChar):
1893         (WTF::URLCharacterTypes::isCharacterOfType):
1894         (URLCharacterTypes):
1895         * wtf/url/src/URLEscape.cpp: Removed.
1896         * wtf/url/src/URLFile.h: Added.
1897         (URLParser):
1898         (WTF::URLParser::isWindowsDriveSeparator):
1899         (WTF::URLParser::isWindowsDriveLetter):
1900         (WTF::URLParser::findNextSlash):
1901         (WTF::URLParser::doesBeginWindowsDriveSpec):
1902         (WTF::URLParser::doesBeginUNCPath):
1903         * wtf/url/src/URLParse.cpp: Added.
1904         (WTF::URLParser::ExtractScheme):
1905         (URLParser):
1906         (WTF::URLParser::IsAuthorityTerminator):
1907         (WTF::URLParser::ExtractFileName):
1908         (WTF::URLParser::ExtractQueryKeyValue):
1909         (WTF::URLParser::ParseAuthority):
1910         (WTF::URLParser::ParsePort):
1911         (WTF::URLParser::ParseStandardURL):
1912         (WTF::URLParser::ParsePathURL):
1913         (WTF::URLParser::ParseFileSystemURL):
1914         (WTF::URLParser::ParseMailtoURL):
1915         (WTF::URLParser::parsePathInternal):
1916         (WTF::URLParser::ParseAfterScheme):
1917         * wtf/url/src/URLParse.h: Added.
1918         (URLParser):
1919         * wtf/url/src/URLParseFile.cpp: Added.
1920         (WTF):
1921         (WTF::URLParser::ParseFileURL):
1922         (URLParser):
1923         * wtf/url/src/URLParseInternal.h: Added.
1924         (URLParser):
1925         (WTF::URLParser::isURLSlash):
1926         (WTF::URLParser::shouldTrimFromURL):
1927         (WTF::URLParser::trimURL):
1928         (WTF::URLParser::countConsecutiveSlashes):
1929         * wtf/url/src/URLParser.h: Removed.
1930         * wtf/url/src/URLQueryCanonicalizer.h: Removed.
1931         * wtf/url/src/URLSegments.cpp:
1932         * wtf/url/src/URLSegments.h:
1933         (WTF::URLSegments::URLSegments):
1934         (URLSegments):
1935         (WTF::URLSegments::operator=):
1936         (WTF::URLSegments::innerURLSegments):
1937         (WTF::URLSegments::setInnerURLSegments):
1938         (WTF::URLSegments::clearInnerURLSegments):
1939         * wtf/url/src/URLUtil.cpp: Added.
1940         (URLUtilities):
1941         (WTF::URLUtilities::IsStandard):
1942         (WTF::URLUtilities::FindAndCompareScheme):
1943         (WTF::URLUtilities::Canonicalize):
1944         (WTF::URLUtilities::resolveRelative):
1945         (WTF::URLUtilities::ReplaceComponents):
1946         (WTF::URLUtilities::LowerCaseEqualsASCII):
1947         (WTF::URLUtilities::DecodeURLEscapeSequences):
1948         (WTF::URLUtilities::EncodeURIComponent):
1949         (WTF::URLUtilities::CompareSchemeComponent):
1950         * wtf/url/src/URLUtil.h: Added.
1951         (URLUtilities):
1952         * wtf/url/src/URLUtilInternal.h: Renamed from Source/WTF/wtf/url/src/URLEscape.h.
1953         (URLUtilities):
1954
1955 2012-09-24  Joone Hur  <joone.hur@intel.com>
1956
1957         [GTK] Implement GraphicsLayer using Clutter
1958         https://bugs.webkit.org/show_bug.cgi?id=73767
1959
1960         Reviewed by Martin Robinson.
1961
1962         Add ClutterActor and GraphicsLayerActor to GTypedefs.h.
1963
1964         * wtf/gobject/GTypedefs.h:
1965
1966 2012-09-23  Byungwoo Lee  <bw80.lee@gmail.com>
1967
1968         Fix build warnings : -Wunused-parameter, -Wparentheses, -Wuninitialized.
1969         https://bugs.webkit.org/show_bug.cgi?id=97306
1970
1971         Reviewed by Benjamin Poulain.
1972
1973         Fix build warning about -Wunused-parameter on FastMalloc.cpp,
1974         OSAllocatorPosix.cpp by using UNUSED_PARAM() macro.
1975         Fix header including order of FastMalloc.cpp.
1976
1977         * wtf/FastMalloc.cpp:
1978         (WTF::fastMallocSize):
1979         * wtf/OSAllocatorPosix.cpp:
1980         (WTF::OSAllocator::reserveAndCommit):
1981
1982 2012-09-22  Sam Weinig  <sam@webkit.org>
1983
1984         Add explicit conversion operator to RetainPtr for easier use in C++11 environments
1985         https://bugs.webkit.org/show_bug.cgi?id=97403
1986
1987         Reviewed by Dan Bernstein.
1988
1989         * wtf/Compiler.h:
1990         Add support for COMPILER_SUPPORTS(CXX_EXPLICIT_CONVERSIONS)
1991
1992         * wtf/RetainPtr.h:
1993         (RetainPtr):
1994         (WTF::RetainPtr::get):
1995         (WTF::RetainPtr::operator PtrType):
1996         Add the explicit conversion operator and group all the underlying
1997         pointer accessors together.
1998
1999 2012-09-21  Simon Hausmann  <simon.hausmann@digia.com>
2000
2001         [Qt] Error out early if we don't have ICU available
2002
2003         Reviewed by Tor Arne Vestbø.
2004
2005         * WTF.pri:
2006
2007 2012-09-20  Patrick Gansterer  <paroga@webkit.org>
2008
2009         Add String::numberToStringFixedWidth()
2010         https://bugs.webkit.org/show_bug.cgi?id=96330
2011
2012         Reviewed by Benjamin Poulain.
2013
2014         Add this new function as replacement for the ShouldRoundDecimalPlaces flag of String::number()
2015         and remove the now unnecessary branch in String::number() for the old flags.
2016
2017         * wtf/text/WTFString.cpp:
2018         (WTF::String::number):
2019         (WTF::String::numberToStringFixedWidth):
2020         * wtf/text/WTFString.h:
2021
2022 2012-09-19  Geoffrey Garen  <ggaren@apple.com>
2023
2024         OSR exit sometimes neglects to create the arguments object
2025         https://bugs.webkit.org/show_bug.cgi?id=97162
2026
2027         Reviewed by Filip Pizlo.
2028
2029         * wtf/HashTraits.h:
2030         (NullableHashTraits):
2031         (WTF::NullableHashTraits::emptyValue):
2032         (WTF):
2033
2034 2012-09-18  Glenn Adams  <glenn@skynav.com>
2035
2036         WTFString::show doesn't dump non-ASCII characters in a readable manner
2037         https://bugs.webkit.org/show_bug.cgi?id=96749
2038
2039         Reviewed by Benjamin Poulain.
2040
2041         Dump non-ASCII characters in a useful form for debugging.
2042
2043         * wtf/text/WTFString.cpp:
2044         (asciiDebug):
2045         Dump non-ASCII characters (i.e., UTF-16 code elements) as well as non-printable ASCII characters
2046         using \uXXXX format. Also escape \ as \\ in order to remove ambiguity.
2047
2048 2012-09-18  Mark Hahnenberg  <mhahnenberg@apple.com>
2049
2050         Use WTF::HasTrivialDestructor instead of compiler-specific versions in JSC::NeedsDestructor
2051         https://bugs.webkit.org/show_bug.cgi?id=96980
2052
2053         Reviewed by Benjamin Poulain.
2054
2055         * wtf/TypeTraits.h:
2056         (WTF):
2057
2058 2012-09-17  Glenn Adams  <glenn@skynav.com>
2059
2060         Including HexNumber.h fails build if hexDigitsForMode is not referenced
2061         https://bugs.webkit.org/show_bug.cgi?id=96873
2062
2063         Reviewed by Benjamin Poulain.
2064
2065         Ensure release build is possible when hexDigitsForMode is not referenced by
2066         template expansion.
2067
2068         * wtf/HexNumber.h:
2069         (WTF::Internal::hexDigitsForMode):
2070         Change hexDigitsForMode to inline (rather than static). Make string literals
2071         {lower,upper}HexDigits non-local and non-static, but const, to which the linker
2072         should merge references in the RO data segment.
2073
2074 2012-09-17  Filip Pizlo  <fpizlo@apple.com>
2075
2076         The ThreadRescrictionVerifier should be more forcibly disabled on systems that use threads
2077         https://bugs.webkit.org/show_bug.cgi?id=96957
2078
2079         Reviewed by Oliver Hunt.
2080
2081         * wtf/ThreadRestrictionVerifier.h:
2082         (WTF):
2083         (WTF::ThreadRestrictionVerifier::ThreadRestrictionVerifier):
2084         (ThreadRestrictionVerifier):
2085         (WTF::ThreadRestrictionVerifier::setMutexMode):
2086         (WTF::ThreadRestrictionVerifier::setDispatchQueueMode):
2087         (WTF::ThreadRestrictionVerifier::turnOffVerification):
2088         (WTF::ThreadRestrictionVerifier::setShared):
2089         (WTF::ThreadRestrictionVerifier::isSafeToUse):
2090
2091 2012-09-17  Sheriff Bot  <webkit.review.bot@gmail.com>
2092
2093         Unreviewed, rolling out r128796.
2094         http://trac.webkit.org/changeset/128796
2095         https://bugs.webkit.org/show_bug.cgi?id=96966
2096
2097         It broke everything (Requested by Ossy_NIGHT on #webkit).
2098
2099         * wtf/OSAllocatorPosix.cpp:
2100         (WTF::OSAllocator::reserveUncommitted):
2101         (WTF::OSAllocator::reserveAndCommit):
2102         (WTF::OSAllocator::commit):
2103         (WTF::OSAllocator::decommit):
2104
2105 2012-09-17  Uli Schlachter  <psychon@znc.in>
2106
2107         Implement uncommitted memory for Linux.
2108         https://bugs.webkit.org/show_bug.cgi?id=65766
2109
2110         Reviewed by Gavin Barraclough.
2111
2112         The old approach used MAP_NORESERVE to allocate address space without
2113         committing it. However, that flag gets ignored if
2114         /proc/sys/vm/overcommit_memory is set to 2. The new approach uses a
2115         mapping with PROT_NONE. This works because mappings which aren't even
2116         readable don't get accounted as committed on Linux.
2117
2118         * wtf/OSAllocatorPosix.cpp:
2119         (WTF::OSAllocator::reserveUncommitted):
2120         (WTF::OSAllocator::reserveAndCommit):
2121         (WTF::OSAllocator::commit):
2122         (WTF::OSAllocator::decommit):
2123
2124 2012-09-17  Filip Pizlo  <fpizlo@apple.com>
2125
2126         Array profiling has convergence issues
2127         https://bugs.webkit.org/show_bug.cgi?id=96891
2128
2129         Reviewed by Gavin Barraclough.
2130
2131         Added functions for testing if something is a power of 2.
2132
2133         * wtf/MathExtras.h:
2134         (hasZeroOrOneBitsSet):
2135         (hasTwoOrMoreBitsSet):
2136
2137 2012-09-17  Ilya Tikhonovsky  <loislo@chromium.org>
2138
2139         Web Inspector: NMI: now when we can detect instrumented classes we can
2140         remove addInstrumentedMember and use addMember for everything.
2141         https://bugs.webkit.org/show_bug.cgi?id=96913
2142
2143         Reviewed by Yury Semikhatsky.
2144
2145         * wtf/MemoryInstrumentation.h:
2146         (WTF::MemoryInstrumentation::addRootObject):
2147         (WTF::MemoryInstrumentation::addObject):
2148         (WTF::MemoryInstrumentation::addObjectImpl):
2149         (WTF):
2150         (WTF::MemoryInstrumentation::addInstrumentedCollection):
2151         (WTF::MemoryInstrumentation::addInstrumentedMapEntries):
2152         (WTF::MemoryInstrumentation::addInstrumentedMapValues):
2153         * wtf/text/AtomicString.cpp:
2154         (WTF::AtomicString::reportMemoryUsage):
2155         * wtf/text/CString.h:
2156         (WTF::CString::reportMemoryUsage):
2157         * wtf/text/StringImpl.cpp:
2158         (WTF::StringImpl::reportMemoryUsage):
2159         * wtf/text/WTFString.cpp:
2160         (WTF::String::reportMemoryUsage):
2161         * wtf/url/api/ParsedURL.cpp:
2162         (WTF::ParsedURL::reportMemoryUsage):
2163         * wtf/url/api/URLString.cpp:
2164         (WTF::URLString::reportMemoryUsage):
2165
2166 2012-09-17  Ilya Tikhonovsky  <loislo@chromium.org>
2167
2168         Unreviewed compilation fix.
2169
2170         * wtf/MemoryInstrumentation.h:
2171         (WTF::MemoryInstrumentation::reportObjectMemoryUsage):
2172
2173 2012-09-15  Yury Semikhatsky  <yurys@chromium.org>
2174
2175         Web Inspector: automatically detect if class has reportMemoryUsage method
2176         https://bugs.webkit.org/show_bug.cgi?id=96756
2177
2178         Reviewed by Alexander Pavlov.
2179
2180         Implemeted automatic selector of the memory reporting method. If
2181         an object has reportMemoryUsage method then call it. Otherwise
2182         count only object's self size. As the next step we will delete
2183         addInstrumentedMember and addInstrumentedObjectImpl and will
2184         have only addMember and addObjectImpl that would automatically
2185         call reportMemoryUsage if it is present.
2186
2187         * wtf/MemoryInstrumentation.h:
2188         (WTF::MemoryInstrumentation::selectInstrumentationMethod):
2189         (MemoryInstrumentation):
2190         (WTF::MemoryInstrumentation::reportObjectMemoryUsage):
2191         (WTF::MemoryInstrumentation::addInstrumentedObjectImpl):
2192         (WTF::MemoryInstrumentation::addObjectImpl):
2193         (WTF::::process):
2194
2195 2012-09-14  Yury Semikhatsky  <yurys@chromium.org>
2196
2197         Web Inspector: OwnPtr and RefPtr reported by pointer can be double counted by the memory instrumentation
2198         https://bugs.webkit.org/show_bug.cgi?id=96791
2199
2200         Reviewed by Alexander Pavlov.
2201
2202         * wtf/MemoryInstrumentation.h:
2203         (WTF::MemoryInstrumentation::addObjectImpl): check if the smart pointer has already
2204         been visited before counting its size.
2205
2206 2012-09-15  Benjamin Poulain  <benjamin@webkit.org>
2207
2208         Fix the build with WTF URL
2209         https://bugs.webkit.org/show_bug.cgi?id=96875
2210
2211         Reviewed by Adam Barth.
2212
2213         Add support for MemoryInstrumentation to WTF's URL classes.
2214
2215         * wtf/url/api/ParsedURL.cpp:
2216         (WTF::ParsedURL::reportMemoryUsage):
2217         * wtf/url/api/ParsedURL.h:
2218         (ParsedURL):
2219         * wtf/url/api/URLString.cpp:
2220         (WTF::URLString::reportMemoryUsage):
2221         * wtf/url/api/URLString.h:
2222         (URLString):
2223
2224 2012-09-15  Raphael Kubo da Costa  <rakuco@FreeBSD.org>
2225
2226         llint: Implement LOCAL_LABEL_STRING for the BSD platforms.
2227         https://bugs.webkit.org/show_bug.cgi?id=96870
2228
2229         Reviewed by Filip Pizlo.
2230
2231         * wtf/InlineASM.h: Extend the definition of LOCAL_LABEL_STRING
2232         currently used for OS(LINUX) to the BSDs, since they also normally
2233         use GNU as, and clang/llvm seems to parse that syntax just fine as
2234         well.
2235
2236 2012-09-14  Alexey Proskuryakov  <ap@apple.com>
2237
2238         Minimize collisions when hashing pairs
2239         https://bugs.webkit.org/show_bug.cgi?id=96022
2240
2241         Build fix (with newer clang?)
2242
2243         * wtf/HashFunctions.h: (WTF::pairIntHash): Be explicit about casting from
2244         64 bit to 32 bit.
2245
2246 2012-09-14  Dana Jansens  <danakj@chromium.org>
2247
2248         Minimize collisions when hashing pairs
2249         https://bugs.webkit.org/show_bug.cgi?id=96022
2250
2251         Reviewed by Adrienne Walker.
2252
2253         The current hash function for pairs has poor performance as it does a
2254         nice hash function on 64 bits, but then just drops the top 32 bits. The
2255         hash method for pairs tries to use Thomas Wang's 64 bit Mix Function,
2256         but this requires not dropping any bits in order to retain the
2257         characteristics mentioned by Thomas.
2258
2259         A better method of hashing sets of 32-bit integers is to use
2260         multiplication in 64 bits with random integers. This method is a
2261         provably almost-universal hash function. Testing shows that this
2262         method decreases the time required, when compared with the current
2263         method, by more than 20% due to better hashing characteristics.
2264
2265         * wtf/HashFunctions.h:
2266         (WTF):
2267         (WTF::pairIntHash):
2268         Implments the hashing method for a pair of unsigned integers.
2269
2270         (WTF::PairHash::hash):
2271         Use pairIntHash() on the hash results of each object in the pair.
2272
2273         (WTF::IntPairHash::hash):
2274         Implement an integer-specific PairHash class that does not need to
2275         hash each object in the pair. It uses pairIntHash on the two
2276         integers in the pair directly.
2277
2278         (WTF::IntPairHash::equal):
2279         (IntPairHash):
2280
2281 2012-09-14  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
2282
2283         [Qt] Make force_static_libs_as_shared work on Mac OS
2284
2285         We had to move a few LIBS += around that were in the wrong place,
2286         and not caught when everything was just linked into the final
2287         QtWebKit library.
2288
2289         Reviewed by Simon Hausmann.
2290
2291         * WTF.pri:
2292
2293 2012-09-14  Ilya Tikhonovsky  <loislo@chromium.org>
2294
2295         Web Inspector: NMI: convert template versions of String*::reportMemoryUsage functions to normal functions.
2296         https://bugs.webkit.org/show_bug.cgi?id=96759
2297
2298         Reviewed by Yury Semikhatsky.
2299
2300         Now when MemoryInstrumentation.h is a part of WTF we can move reportMemoryUsage functions to cpp file.
2301
2302         * wtf/text/AtomicString.cpp:
2303         (WTF::AtomicString::reportMemoryUsage):
2304         (WTF):
2305         * wtf/text/AtomicString.h:
2306         (WTF):
2307         (AtomicString):
2308         * wtf/text/StringImpl.cpp:
2309         (WTF::StringImpl::reportMemoryUsage):
2310         (WTF):
2311         * wtf/text/StringImpl.h:
2312         (WTF):
2313         (StringImpl):
2314         * wtf/text/WTFString.cpp:
2315         (WTF::String::reportMemoryUsage):
2316         (WTF):
2317         * wtf/text/WTFString.h:
2318         (WTF):
2319         (String):
2320
2321 2012-09-14  Ilya Tikhonovsky  <loislo@chromium.org>
2322
2323         Web Inspector: NMI: remove current traits helper class because it is customizing the instrumentation at a wrong place and is not necessary at the moment.
2324         https://bugs.webkit.org/show_bug.cgi?id=96737
2325
2326         Reviewed by Yury Semikhatsky.
2327
2328         * wtf/MemoryInstrumentation.h:
2329         (MemoryInstrumentation):
2330         WTF::MemoryInstrumentationTraits): removed
2331         (WTF::MemoryInstrumentation::OwningTraits::addInstrumentedObject): direct call inserted
2332         (WTF::MemoryInstrumentation::OwningTraits::addObject):direct call inserted
2333
2334 2012-09-13  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2335
2336         Evas_Object* is a ref'ed structure, so tread it as such
2337         https://bugs.webkit.org/show_bug.cgi?id=96659
2338
2339         Reviewed by Gyuyoung Kim.
2340
2341         Remove OwnPtr support for Evas_Object* and add support for it
2342         with RefPtr instead (the latter moved from WebCore).
2343
2344         * wtf/PlatformEfl.cmake:
2345         * wtf/efl/OwnPtrEfl.cpp:
2346         * wtf/efl/RefPtrEfl.cpp: Renamed from Source/WebCore/platform/efl/RefPtrEfl.cpp.
2347         (WTF):
2348         (WTF::refIfNotNull):
2349         (WTF::derefIfNotNull):
2350         * wtf/efl/RefPtrEfl.h: Renamed from Source/WebCore/platform/efl/RefPtrEfl.h.
2351         (WTF):
2352
2353 2012-09-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2354
2355         Unreviewed, rolling out r128507.
2356         http://trac.webkit.org/changeset/128507
2357         https://bugs.webkit.org/show_bug.cgi?id=96659
2358
2359         Revert. r128507 makes too many crash in EFL layout test bots.
2360
2361         * wtf/PlatformEfl.cmake:
2362         * wtf/efl/OwnPtrEfl.cpp:
2363         (WTF::deleteOwnedPtr):
2364         (WTF):
2365
2366 2012-09-13  Kevin Funk  <kevin.funk@kdab.com>
2367
2368         Make compile with both OS(WINCE) and PLATFORM(QT) support
2369         https://bugs.webkit.org/show_bug.cgi?id=95536
2370
2371         Reviewed by Simon Hausmann.
2372
2373         Fixes for Windows CE.
2374
2375         * WTF.pri:
2376         Also include path for mt19937ar.c
2377         * wtf/unicode/icu/CollatorICU.cpp:
2378         Fix undeclared strdup() on CE7
2379         * wtf/Platform.h:
2380
2381 2012-09-13  Byungseon Shin  <xingri@gmail.com>
2382
2383         Fix for WTF fails to compile in thumb mode when llint is enabled.
2384         https://bugs.webkit.org/show_bug.cgi?id=96400
2385
2386         Reviewed by Filip Pizlo.
2387
2388         When using "+m" with Armv7 cross compiler assume offset range between +/- 4095
2389         (the largest possible offset range).
2390         However, ldrex/strex can only use offset range of 0~1020, so "+m" needed to be changed to "+Q".
2391         Ref. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54480
2392
2393         * wtf/Atomics.h:
2394         (WTF::weakCompareAndSwap):
2395
2396 2012-09-13  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2397
2398         Evas_Object* is a ref'ed structure, so tread it as such
2399         https://bugs.webkit.org/show_bug.cgi?id=96659
2400
2401         Reviewed by Adam Barth.
2402
2403         Remove OwnPtr support for Evas_Object* and add support for it
2404         with RefPtr instead (the latter moved from WebCore).
2405
2406         * wtf/PlatformEfl.cmake:
2407         * wtf/efl/OwnPtrEfl.cpp:
2408         * wtf/efl/RefPtrEfl.cpp: Renamed from Source/WebCore/platform/efl/RefPtrEfl.cpp.
2409         (WTF):
2410         (WTF::refIfNotNull):
2411         (WTF::derefIfNotNull):
2412         * wtf/efl/RefPtrEfl.h: Renamed from Source/WebCore/platform/efl/RefPtrEfl.h.
2413         (WTF):
2414
2415 2012-09-13  Michael Saboff  <msaboff@apple.com>
2416
2417         Added 8 bit path to WidthIterator::advance()
2418         https://bugs.webkit.org/show_bug.cgi?id=96590
2419
2420         Reviewed by Geoffrey Garen.
2421
2422         Added new character constant for Hiragana Letter Small A.
2423
2424         * wtf/unicode/CharacterNames.h:
2425         (Unicode):
2426
2427 2012-09-13  Ilya Tikhonovsky  <loislo@chromium.org>
2428
2429         Web Inspector: NMI: instrument KURL directly.
2430         https://bugs.webkit.org/show_bug.cgi?id=96624
2431
2432         Reviewed by Yury Semikhatsky.
2433
2434         I replaced traits based instrumentation of KURL with reportMemoryUsage functions.
2435         CString* were also instrumented.
2436
2437         Drive by fix: Instrumentation code in QualifiedName was moved to cpp.
2438
2439         * wtf/text/CString.h:
2440         (CStringBuffer):
2441         (WTF::CStringBuffer::reportMemoryUsage):
2442         (CString):
2443         (WTF::CString::reportMemoryUsage):
2444
2445 2012-09-12  Ilya Tikhonovsky  <loislo@chromium.org>
2446
2447         Web Inspector: NMI: migrate core instrumentation code to WTF namespace
2448         https://bugs.webkit.org/show_bug.cgi?id=96511
2449
2450         Reviewed by Yury Semikhatsky.
2451
2452         After moving core NMI code to WTF namespace I removed forward declarations
2453         of MemoryObjectInfo and MemoryInstrumentation from WebCore headers and add
2454         forward declaration into wtf/Forward.h
2455
2456         * wtf/Forward.h:
2457         (WTF):
2458         * wtf/MemoryInstrumentation.h:
2459
2460 2012-09-12  Dan Bernstein  <mitz@apple.com>
2461
2462         Removed a reference to a file that doesn’t participate in any target.
2463
2464         * WTF.xcodeproj/project.pbxproj: Removed the reference to
2465         CONTRIBUTORS.pthreads-win32.
2466
2467 2012-09-11  Michael Saboff  <msaboff@apple.com>
2468
2469         Element::classAttributeChanged should use characters8/16 to find first non-whitespace
2470         https://bugs.webkit.org/show_bug.cgi?id=96446
2471
2472         Reviewed by Benjamin Poulain.
2473
2474         Added bit size related string accessors to AtomicString to support change.
2475
2476         * wtf/text/AtomicString.h:
2477         (AtomicString):
2478         (WTF::AtomicString::is8Bit):
2479         (WTF::AtomicString::characters8):
2480         (WTF::AtomicString::characters16):
2481
2482 2012-09-12  Michael Saboff  <msaboff@apple.com>
2483
2484         Build fixed for http://trac.webkit.org/changeset/128243
2485
2486         Unreviewed build fix.
2487
2488         Removed temporarily added function signature.
2489
2490         * icu/unicode/unistr.h:
2491         (UnicodeString::extract):
2492
2493 2012-09-12  Michael Saboff  <msaboff@apple.com>
2494
2495         Build fixed for http://trac.webkit.org/changeset/128243
2496
2497         Unreviewed build fix.
2498
2499         Change UnicodeString::extract for gcc based on ICU fix described in
2500         http://bugs.icu-project.org/trac/ticket/8197.
2501
2502         * icu/unicode/unistr.h:
2503         (UnicodeString::extract):
2504
2505 2012-09-12  Ilya Tikhonovsky  <loislo@chromium.org>
2506
2507         Web Inspector: NMI move String* instrumentation to wtf.
2508         https://bugs.webkit.org/show_bug.cgi?id=96405
2509
2510         Reviewed by Yury Semikhatsky.
2511
2512         This instrumentation is solving the problem with substrings and removes traits based code which is hard to upstream.
2513
2514         Tested by webkit_unit_tests.
2515
2516         * wtf/text/AtomicString.h:
2517         (AtomicString):
2518         (WTF::AtomicString::reportMemoryUsage):
2519         * wtf/text/StringImpl.h:
2520         (StringImpl):
2521         (WTF::StringImpl::reportMemoryUsage):
2522         * wtf/text/WTFString.h:
2523         (String):
2524         (WTF::String::reportMemoryUsage):
2525
2526 2012-09-12  Sheriff Bot  <webkit.review.bot@gmail.com>
2527
2528         Unreviewed, rolling out r128279.
2529         http://trac.webkit.org/changeset/128279
2530         https://bugs.webkit.org/show_bug.cgi?id=96487
2531
2532         "Snow Leopard compilation broken" (Requested by yurys on
2533         #webkit).
2534
2535         * wtf/MemoryInstrumentation.h:
2536         (GenericMemoryTypes):
2537         (WebCore):
2538         (WebCore::MemoryInstrumentation::addRootObject):
2539         (WebCore::MemoryObjectInfo::reportObjectInfo):
2540         (WebCore::MemoryClassInfo::MemoryClassInfo):
2541         * wtf/text/AtomicString.h:
2542         (AtomicString):
2543         * wtf/text/StringImpl.h:
2544         * wtf/text/WTFString.h:
2545
2546 2012-09-12  Yury Semikhatsky  <yurys@chromium.org>
2547
2548         Web Inspector: Persistent handle referenced from ScriptWrappable is double counted
2549         https://bugs.webkit.org/show_bug.cgi?id=96483
2550
2551         Reviewed by Alexander Pavlov.
2552
2553         * wtf/MemoryInstrumentation.h:
2554         (WebCore::MemoryClassInfo::addWeakPointer): this method is expected to be
2555         used on fields that are pointers to objects which are parts of bigger memory
2556         blocks (field of another object, element in an array, object allocated in a
2557         memory arena etc.). We don't want to count such objects' memory separately
2558         from their owners but in order to be able to validates the memory instrumentation
2559         with clang plugin we need to make sure all fields in instrumented objects
2560         are reported.
2561         (MemoryClassInfo):
2562
2563 2012-09-12  Ilya Tikhonovsky  <loislo@chromium.org>
2564
2565         Web Inspector: NMI move String* instrumentation to wtf.
2566         https://bugs.webkit.org/show_bug.cgi?id=96405
2567
2568         Reviewed by Yury Semikhatsky.
2569
2570         This instrumentation is solving the problem with substrings and removes traits based code which is hard to upstream.
2571
2572         Tested by webkit_unit_tests.
2573
2574         * wtf/MemoryInstrumentation.h:
2575         (WebCore):
2576         (WebCore::MemoryInstrumentation::addRootObject):
2577         (WebCore::MemoryObjectInfo::reportObjectInfo):
2578         (WebCore::MemoryClassInfo::MemoryClassInfo):
2579         * wtf/text/AtomicString.h:
2580         (AtomicString):
2581         (WTF::AtomicString::reportMemoryUsage):
2582         * wtf/text/StringImpl.h:
2583         (StringImpl):
2584         (WTF::StringImpl::reportMemoryUsage):
2585         * wtf/text/WTFString.h:
2586         (String):
2587         (WTF::String::reportMemoryUsage):
2588
2589 2012-09-11  Michael Saboff  <msaboff@apple.com>
2590
2591         Build fixed for http://trac.webkit.org/changeset/128243
2592
2593         Unreviewed build fix.
2594
2595         Added missing include file needed by 96422 for C++ ICU APIs.
2596
2597         * icu/unicode/bytestream.h: Added.
2598         * icu/unicode/rep.h: Added.
2599         * icu/unicode/std_string.h: Added.
2600         * icu/unicode/strenum.h: Added.
2601         * icu/unicode/stringpiece.h: Added.
2602         * icu/unicode/unistr.h: Added.
2603         * icu/unicode/uobject.h: Added.
2604
2605 2012-09-11  Michael Saboff  <msaboff@apple.com>
2606
2607         Build fixed for http://trac.webkit.org/changeset/128243
2608
2609         Rubber stamped by Stephanie Lewis.
2610
2611         Added missing include file needed by 96422.
2612
2613         * icu/unicode/unorm2.h: Added.
2614
2615 2012-09-11  Michael Saboff  <msaboff@apple.com>
2616
2617         Build fixed for http://trac.webkit.org/changeset/128243
2618
2619         Rubber stamped by Stephanie Lewis.
2620
2621         Added missing include file needed by 96422.
2622
2623         * icu/unicode/ptypes.h: Added.
2624
2625 2012-09-11  Michael Saboff  <msaboff@apple.com>
2626
2627         Update ICU header files to more recent version
2628         https://bugs.webkit.org/show_bug.cgi?id=96422
2629
2630         Reviewed by Geoff Garen.
2631
2632         Updated ICU header files to 4.6.1.  Modifications made as part of the merge are:
2633         platform.h - Changed ifndef / define / endif for U_HAVE_UINT8_T, U_HAVE_UINT16_T, U_HAVE_UINT32_T,
2634             U_HAVE_UINT64_T, U_IS_BIG_ENDIAN and U_ENABLE_TRACING to match the existing platform.h
2635         putil.h (line 132) - Changes defined(U_WINDOWS) to defined(WIN32) || defined(OS2) to match existing putil.h
2636         ustring.h (line 945) - Wrapped macro argument cs with { (const UChar *)cs } to match existing ustring.h
2637         utypes.h (line 545) - Changed defined(U_WINDOWS) to defined(WIN32) to match existing utypes.h
2638
2639         * icu/unicode/localpointer.h: Added.
2640         * icu/unicode/parseerr.h:
2641         * icu/unicode/platform.h:
2642         * icu/unicode/putil.h:
2643         * icu/unicode/uchar.h:
2644         * icu/unicode/ucnv.h:
2645         * icu/unicode/ucnv_err.h:
2646         * icu/unicode/ucol.h:
2647         * icu/unicode/uconfig.h:
2648         * icu/unicode/uenum.h:
2649         * icu/unicode/uiter.h:
2650         * icu/unicode/uloc.h:
2651         * icu/unicode/umachine.h:
2652         * icu/unicode/unorm.h:
2653         * icu/unicode/urename.h:
2654         * icu/unicode/uscript.h:
2655         * icu/unicode/uset.h:
2656         * icu/unicode/ustring.h:
2657         * icu/unicode/utf.h:
2658         * icu/unicode/utf16.h:
2659         * icu/unicode/utf8.h:
2660         * icu/unicode/utypes.h:
2661         * icu/unicode/uvernum.h: Added.
2662         * icu/unicode/uversion.h:
2663
2664 2012-09-11  Pratik Solanki  <psolanki@apple.com>
2665
2666         Add ObjcRuntimeExtras.h to the Xcode project file
2667         https://bugs.webkit.org/show_bug.cgi?id=96419
2668
2669         Reviewed by Alexey Proskuryakov.
2670
2671         * WTF.xcodeproj/project.pbxproj:
2672
2673 2012-09-11  Adrienne Walker  <enne@google.com>
2674
2675         Clang doesn't optimize away undefined OwnPtr copy constructor
2676         https://bugs.webkit.org/show_bug.cgi?id=74625
2677
2678         Reviewed by Anders Carlsson.
2679
2680         Original patch by Anders Carlsson, with a minor edit.
2681
2682         The publicly declared-but-not-defined copy constructor is a compiler
2683         optimization-dependent landmine. Clang often fails to optimize the use
2684         of this function out, leading to internal linkage errors for the missing
2685         definition. gcc doesn't have this problem and optimizes that function
2686         out, leading to code that inconsistently fails to link across platforms.
2687
2688         As a partial fix for this problem, on any compiler that supports C++11
2689         move semantics, replace the bogus copy constructor with the move
2690         constructors.  In the future, if all compilers support this, then the
2691         copy constructor can be removed.
2692
2693         This still leaves other compilers that don't support move semantics
2694         like Visual Studio vulnerable to linking inconsistencies.
2695
2696         * wtf/OwnPtr.h:
2697         (OwnPtr):
2698         (WTF):
2699         (WTF::::OwnPtr):
2700         (WTF::=):
2701
2702 2012-09-11  Raphael Kubo da Costa  <rakuco@webkit.org>
2703
2704         [EFL] Rewrite the EFL-related Find modules
2705         https://bugs.webkit.org/show_bug.cgi?id=95237
2706
2707         Reviewed by Kenneth Rohde Christiansen.
2708
2709         * CMakeLists.txt: Stop setting the LINK_FLAGS property.
2710         * PlatformEfl.cmake: Add libraries and include directories for
2711         each Enlightenment Foundation Library used by the port.
2712
2713 2012-09-11  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
2714
2715         [Qt] Add a configure step to the Qt build system
2716
2717         This allows building the Qt port using just 'qmake WebKit.pro'. Using
2718         the build-webkit script is still supported, and will add slightly more
2719         logic to the build, such as detecting the need for clean or incremental
2720         builds.
2721
2722         Internally, the build system now uses a new variable, WEBKIT_CONFIG, for
2723         all things related to configuring the build, such as use/have/enable flags,
2724         and these are translated to defines in default_post. Project files should
2725         no longer check contains(DEFINES,...) to detect features, but use the new
2726         enable?(), use?(), and have?() functions. The no_webkit1 and no_webkit2
2727         options have been translated into WEBKIT_CONFIG options as well, and can
2728         be checked using build?().
2729
2730         Reviewed by Simon Hausmann.
2731
2732         * WTF.pri:
2733         * wtf/Platform.h:
2734
2735 2012-09-10  Ilya Tikhonovsky  <loislo@chromium.org>
2736
2737         Web Inspector: NMI: move MemoryInstrumentation.h to wtf
2738         https://bugs.webkit.org/show_bug.cgi?id=96356
2739
2740         Reviewed by Yury Semikhatsky.
2741
2742         It is necessary step because it helps us to remove dependency between platform and WebCore.
2743
2744         * GNUmakefile.list.am:
2745         * WTF.gypi:
2746         * WTF.pro:
2747         * WTF.vcproj/WTF.vcproj:
2748         * WTF.xcodeproj/project.pbxproj:
2749         * wtf/MemoryInstrumentation.h: Renamed from Source/WebCore/dom/MemoryInstrumentation.h.
2750         (WebCore):
2751         (GenericMemoryTypes):
2752         (MemoryInstrumentationTraits):
2753         (MemoryInstrumentation):
2754         (WebCore::MemoryInstrumentation::~MemoryInstrumentation):
2755         (WebCore::MemoryInstrumentation::addRootObject):
2756         (InstrumentedPointerBase):
2757         (WebCore::MemoryInstrumentation::InstrumentedPointerBase::~InstrumentedPointerBase):
2758         (InstrumentedPointer):
2759         (WebCore::MemoryInstrumentation::InstrumentedPointer::InstrumentedPointer):
2760         (WebCore::MemoryInstrumentation::addObject):
2761         (WebCore::MemoryInstrumentation::addInstrumentedObject):
2762         (WebCore::MemoryInstrumentation::addRawBuffer):
2763         (WebCore::MemoryInstrumentation::OwningTraits::addInstrumentedObject):
2764         (WebCore::MemoryInstrumentation::OwningTraits::addObject):
2765         (WebCore::MemoryInstrumentationTraits::addInstrumentedObject):
2766         (WebCore::MemoryInstrumentationTraits::addObject):
2767         (MemoryObjectInfo):
2768         (WebCore::MemoryObjectInfo::MemoryObjectInfo):
2769         (WebCore::MemoryObjectInfo::objectType):
2770         (WebCore::MemoryObjectInfo::objectSize):
2771         (WebCore::MemoryObjectInfo::memoryInstrumentation):
2772         (WebCore::MemoryObjectInfo::reportObjectInfo):
2773         (MemoryClassInfo):
2774         (WebCore::MemoryClassInfo::MemoryClassInfo):
2775         (WebCore::MemoryClassInfo::addInstrumentedMember):
2776         (WebCore::MemoryClassInfo::addMember):
2777         (WebCore::MemoryClassInfo::addHashMap):
2778         (WebCore::MemoryClassInfo::addHashSet):
2779         (WebCore::MemoryClassInfo::addHashCountedSet):
2780         (WebCore::MemoryClassInfo::addInstrumentedHashSet):
2781         (WebCore::MemoryClassInfo::addInstrumentedVector):
2782         (WebCore::MemoryClassInfo::addInstrumentedVectorPtr):
2783         (WebCore::MemoryClassInfo::addInstrumentedMapEntries):
2784         (WebCore::MemoryClassInfo::addInstrumentedMapValues):
2785         (WebCore::MemoryClassInfo::addListHashSet):
2786         (WebCore::MemoryClassInfo::addVector):
2787         (WebCore::MemoryClassInfo::addVectorPtr):
2788         (WebCore::MemoryClassInfo::addRawBuffer):
2789         (WebCore::MemoryInstrumentation::addInstrumentedObjectImpl):
2790         (WebCore::MemoryInstrumentation::addObjectImpl):
2791         (WebCore::MemoryInstrumentation::addHashMap):
2792         (WebCore::MemoryInstrumentation::addHashSet):
2793         (WebCore::MemoryInstrumentation::addInstrumentedCollection):
2794         (WebCore::MemoryInstrumentation::addInstrumentedMapEntries):
2795         (WebCore::MemoryInstrumentation::addInstrumentedMapValues):
2796         (WebCore::MemoryInstrumentation::addListHashSet):
2797         (WebCore::MemoryInstrumentation::addVector):
2798         (WebCore::MemoryInstrumentation::calculateContainerSize):
2799         (WebCore::::process):
2800
2801 2012-09-09  Mark Lam  <mark.lam@apple.com>
2802
2803         Fixed ASSERT() and ASSERT_AT() macros so that they can be used in
2804         comma expressions. Also, added UNUSED_LABEL().
2805         https://bugs.webkit.org/show_bug.cgi?id=96127.
2806
2807         Reviewed by Geoffrey Garen.
2808
2809         * wtf/Assertions.h:
2810         * wtf/UnusedParam.h: Added UNUSED_LABEL(). Removed an obsolete comment.
2811
2812 2012-09-09  Patrick Gansterer  <paroga@webkit.org>
2813
2814         Add StringBuilder::appendNumber() and use it
2815         https://bugs.webkit.org/show_bug.cgi?id=96030
2816
2817         Reviewed by Eric Seidel.
2818
2819         Also fix a bunch of append() vs. appendLiteral() issues in the surrounding code.
2820
2821         * wtf/DateMath.cpp:
2822         (WTF::makeRFC2822DateString):
2823         * wtf/text/StringBuilder.cpp:
2824         (WTF::StringBuilder::appendNumber):
2825         * wtf/text/StringBuilder.h:
2826         (StringBuilder):
2827
2828 2012-09-09  Patrick Gansterer  <paroga@webkit.org>
2829
2830         Make the String initialization on the function side of String::number()
2831         https://bugs.webkit.org/show_bug.cgi?id=95940
2832
2833         Reviewed by Benjamin Poulain.
2834
2835         Un-Inline String::number() to make the String initialization done on the function side
2836         instead of being on the caller side.
2837
2838         * GNUmakefile.list.am:
2839         * WTF.gypi:
2840         * WTF.pro:
2841         * WTF.vcproj/WTF.vcproj:
2842         * WTF.xcodeproj/project.pbxproj:
2843         * wtf/CMakeLists.txt:
2844         * wtf/text/IntegerToStringConversion.cpp: Removed.
2845         * wtf/text/IntegerToStringConversion.h:
2846         (WTF::numberToStringImpl):
2847         (WTF::numberToStringSigned):
2848         (WTF::numberToStringUnsigned):
2849         * wtf/text/WTFString.cpp:
2850         (WTF::String::number):
2851         * wtf/text/WTFString.h:
2852
2853 2012-09-08  Andreas Kling  <kling@webkit.org>
2854
2855         Give AtomicString SimpleClassVectorTraits.
2856         <http://webkit.org/b/96186>
2857
2858         Reviewed by Karl Anders Carlsson.
2859
2860         AtomicString can be initialized/moved/compared with memset/memcpy/memcmp,
2861         so add a VectorTraits<AtomicString> to make Vector<AtomicString> a little
2862         more efficient.
2863
2864         * wtf/VectorTraits.h:
2865
2866 2012-09-07  Sheriff Bot  <webkit.review.bot@gmail.com>
2867
2868         Unreviewed, rolling out r127938.
2869         http://trac.webkit.org/changeset/127938
2870         https://bugs.webkit.org/show_bug.cgi?id=96166
2871
2872         It broke the build (Requested by smfr on #webkit).
2873
2874         * wtf/Assertions.h:
2875
2876 2012-09-07  Mark Lam  <mark.lam@apple.com>
2877
2878         Fixed ASSERT() and ASSERT_AT() macros so that they can be used in
2879         comma expressions.
2880         https://bugs.webkit.org/show_bug.cgi?id=96127.
2881
2882         Reviewed by Filip Pizlo.
2883
2884         * wtf/Assertions.h:
2885         (wtfAssert):
2886
2887 2012-09-07  Michael Saboff  <msaboff@apple.com>
2888
2889         StringImpl::find(StringImpl*) doesn't handle cases where search and match strings are different bitness
2890         https://bugs.webkit.org/show_bug.cgi?id=96125
2891
2892         Reviewed by Benjamin Poulain.
2893
2894         Changed findInner and reverseFindInner to be templated on both search and match character types.
2895         Changed both find's and reverseFind to use all four bitness combinations of findInner and
2896         reverseFindInner.
2897
2898         * wtf/text/StringImpl.cpp:
2899         (WTF::findInner):
2900         (WTF::StringImpl::find):
2901         (WTF::reverseFindInner):
2902         (WTF::StringImpl::reverseFind):
2903
2904 2012-09-07  Michael Saboff  <msaboff@apple.com>
2905
2906         equalIgnoringCase of two StringImpls doesn't handle 8 bit strings
2907         https://bugs.webkit.org/show_bug.cgi?id=96028
2908
2909         Reviewed by Benjamin Poulain.
2910
2911         Added 8 bit checks and paths to CaseFoldingHash::equal.  Also cleaned up StringHash::equal(), removing
2912         obvious and in one case wrong comments.  Moved equalIgnoringCase(UChar*, UChar*) from StringImpl.cpp
2913         to StringImpl.h.
2914
2915         * wtf/text/StringHash.h:
2916         (WTF::StringHash::equal):
2917         (WTF::CaseFoldingHash::equal):
2918         * wtf/text/StringImpl.cpp:
2919         * wtf/text/StringImpl.h:
2920         (WTF::equalIgnoringCase):
2921
2922 2012-09-07  Patrick Gansterer  <paroga@webkit.org>
2923
2924         [WIN] Deprecate String += operator
2925         https://bugs.webkit.org/show_bug.cgi?id=96083
2926
2927         Reviewed by Adam Barth.
2928
2929         * wtf/Platform.h:
2930
2931 2012-09-06  Michael Saboff  <msaboff@apple.com>
2932
2933         StringBuilder::toAtomicString() can create an 16 bit string with 8 bit contents
2934         https://bugs.webkit.org/show_bug.cgi?id=96029
2935
2936         Reviewed by Benjamin Poulain.
2937
2938         Added 8 bit path when creating an AtomicString from a partial 8 bit buffer.
2939
2940         * wtf/text/StringBuilder.h:
2941         (WTF::StringBuilder::toAtomicString):
2942
2943 2012-09-06  Michael Saboff  <msaboff@apple.com>
2944
2945         16 bit JSRopeString up converts an 8 bit fibers to 16 bits during resolution
2946         https://bugs.webkit.org/show_bug.cgi?id=95810
2947
2948         Reviewed by Benjamin Poulain.
2949
2950         New copy routine that takes an 8 bit source and a 16 bit destination.  Used when copying
2951         the contents of an 8 bit fiber to the 16 bit buffer when resolving a 16 bit rope.
2952
2953         * wtf/text/StringImpl.h:
2954         (WTF::StringImpl::copyChars):
2955         (StringImpl):
2956
2957 2012-09-06  Michael Saboff  <msaboff@apple.com>
2958
2959         Unreviewed fix to r127799.
2960         https://bugs.webkit.org/show_bug.cgi?id=95807
2961
2962         Unreviewed fix.
2963
2964         Removed extraneous "static".  This code is hidden behind STRING_STATS define and 
2965         therefore is not enabled by default.
2966
2967         * wtf/text/StringImpl.cpp:
2968
2969 2012-09-06  Lauro Neto  <lauro.neto@openbossa.org>
2970
2971         [Qt] Deprecate String += operator
2972         https://bugs.webkit.org/show_bug.cgi?id=95895
2973
2974         Reviewed by Benjamin Poulain.
2975
2976         Remove Qt from WTF_DEPRECATED_STRING_OPERATORS guard.
2977
2978         * wtf/Platform.h:
2979
2980 2012-09-06  Michael Saboff  <msaboff@apple.com>
2981
2982         ENH: Add Logging to StringImpl to track String Types
2983         https://bugs.webkit.org/show_bug.cgi?id=95807
2984
2985         Reviewed by Benjamin Poulain.
2986
2987         Added StringsStats class that keeps track of the number of strings, number of 8 and 16 bit
2988         strings as well as the number of 8 bit strings up converted to 16 bits. The number of characrters
2989         for each type is also accumulated. These statistics are output via DataLog every 5000
2990         calls to StringImpl destructor. The 5000 can be adjusted via s_printStringStatsFrequency.
2991         This StringStats code is disabled by default and enabled by defining STRING_STATS in
2992         wtf/text/StringImpl.h.
2993
2994         * wtf/text/StringImpl.cpp:
2995         (WTF::StringStats::removeString):
2996         (WTF::StringStats::printStats):
2997         (WTF::StringImpl::~StringImpl):
2998         (WTF::StringImpl::getData16SlowCase):
2999         * wtf/text/StringImpl.h:
3000         (WTF::StringStats::add8BitString):
3001         (StringStats):
3002         (WTF::StringStats::add16BitString):
3003         (WTF::StringStats::addUpconvertedString):
3004         (WTF::StringImpl::StringImpl):
3005         (StringImpl):
3006         (WTF::StringImpl::isSubString):
3007         (WTF::StringImpl::stringStats):
3008
3009 2012-09-06  Patrick Gansterer  <paroga@webkit.org>
3010
3011         Fix export macros in IntegerToStringConversion.h
3012         https://bugs.webkit.org/show_bug.cgi?id=95900
3013
3014         Reviewed by Benjamin Poulain.
3015
3016         The WTF_EXPORT_STRING_API must be used only for symbols which are compiled
3017         on windows in "non-WTF" binaries too. Since this isn't valid for the
3018         IntegerToStringConversion function replace it with WTF_EXPORT_PRIVATE.
3019
3020         * wtf/text/IntegerToStringConversion.h:
3021
3022 2012-09-06  Simon Hausmann  <simon.hausmann@nokia.com>
3023
3024         [Qt] Various small Windows / MSVC build fixes
3025         https://bugs.webkit.org/show_bug.cgi?id=95934
3026
3027         Reviewed by Kenneth Rohde Christiansen.
3028
3029         For the Qt build on Windows, do not enable WTF_USE_UNIX_DOMAIN_SOCKETS for
3030         WebKit2 IPC.
3031
3032         * wtf/Platform.h:
3033
3034 2012-09-06  Adam Barth  <abarth@chromium.org>
3035
3036         Remove WTF::String::operator+=
3037         https://bugs.webkit.org/show_bug.cgi?id=95797
3038
3039         Reviewed by Sam Weinig.
3040
3041         This patch encloses WTF::String::operator+= in an ifdef so that we can
3042         gradually remove it from the various port-specific files. The ifdef
3043         lets us whitelist use of operator+= in individual files during the
3044         transition.
3045
3046         * wtf/Platform.h
3047         * wtf/text/WTFString.h:
3048
3049 2012-09-05  Gabor Rapcsanyi  <rgabor@webkit.org>
3050
3051         DFG JIT doesn't work properly on ARM hardfp
3052         https://bugs.webkit.org/show_bug.cgi?id=95684
3053
3054         Reviewed by Filip Pizlo.
3055
3056         Add hardfp support to DFG JIT. The patch is created with the
3057         help of Zoltan Herczeg.
3058
3059         * wtf/Platform.h:
3060
3061 2012-09-04  Zoltan Horvath  <zoltan@webkit.org>
3062
3063         Extend the coverage of the Custom Allocation Framework in WTF and in JavaScriptCore
3064         https://bugs.webkit.org/show_bug.cgi?id=95737
3065
3066         Reviewed by Eric Seidel.
3067
3068         Add WTF_MAKE_FAST_ALLOCATED macro to the following class declarations because these are instantiated by operator new.
3069
3070         * wtf/CryptographicallyRandomNumber.cpp: CryptographicallyRandomNumber is instantiated at wtf/CryptographicallyRandomNumber.cpp:162.
3071         * wtf/MediaTime.h: MediaTime is instantiated at wtf/MediaTime.cpp:288.
3072         * wtf/MetaAllocator.h:
3073         (MetaAllocatorTracker): MetaAllocatorTracker is instantiated at JavaScriptCore/tools/CodeProfiling.cpp:120.
3074         * wtf/ThreadingPthreads.cpp:
3075         (PthreadState): PthreadState is instantiated at wtf/ThreadingPthreads.cpp:165.
3076         * wtf/text/AtomicString.cpp:
3077         (AtomicStringTable): AtomicStringTable is instantiated at wtf/text/AtomicString.cpp:43.
3078
3079 2012-09-01  Mark Lam  <mark.lam@apple.com>
3080
3081         LLInt C loop backend.
3082         https://bugs.webkit.org/show_bug.cgi?id=91052.
3083
3084         Reviewed by Filip Pizlo.
3085
3086         Added configs for the llint C loop backend.
3087
3088         * wtf/Platform.h:
3089
3090 2012-08-31  Pratik Solanki  <psolanki@apple.com>
3091
3092         objc_msgSend and IMP should be cast appropriately before using
3093         https://bugs.webkit.org/show_bug.cgi?id=95242
3094
3095         Reviewed by Benjamin Poulain.
3096
3097         Fix for older compilers. Pass id as the return type to the template
3098         instead of relying on default type.
3099
3100         * wtf/Functional.h:
3101         (WTF::R):
3102         * wtf/ObjcRuntimeExtras.h:
3103
3104 2012-08-31  Michael Saboff  <msaboff@apple.com>
3105
3106         CSS Parser should directly parse 8 bit source strings
3107         https://bugs.webkit.org/show_bug.cgi?id=95207
3108
3109         Reviewed by Geoffrey Garen.
3110
3111         * wtf/text/StringImpl.h:
3112         (WTF::equalIgnoringCase): Added (const char*, const LChar*, unsigned) flavor to support
3113         8 bit CSS parser work.
3114
3115 2012-08-30  Benjamin Poulain  <bpoulain@apple.com>
3116
3117         AtomicString(ASCIILiteral) should not compile
3118         https://bugs.webkit.org/show_bug.cgi?id=95413
3119
3120         Reviewed by Adam Barth.
3121
3122         * wtf/text/AtomicString.h:
3123         (AtomicString): Declare the constructor from ASCIILiteral private to ensure it is
3124         not used by accident.
3125
3126 2012-08-30  Benjamin Poulain  <bpoulain@apple.com>
3127
3128         Ambiguous operator[]  after r127191 on some compiler
3129         https://bugs.webkit.org/show_bug.cgi?id=95509
3130
3131         Reviewed by Simon Fraser.
3132
3133         * wtf/text/WTFString.h:
3134         (WTF::String::characterAt): At this as a synonym to operator[] to attempt a build fix.
3135
3136 2012-08-30  Mark Lam  <mark.lam@apple.com>
3137
3138         Render unto #ifdef's that which belong to them.
3139         https://bugs.webkit.org/show_bug.cgi?id=95482.
3140
3141         Reviewed by Filip Pizlo.
3142
3143         * wtf/Platform.h: Added ENABLE(COMPUTED_GOTO_OPCODES).
3144
3145 2012-08-30  Pratik Solanki  <psolanki@apple.com>
3146
3147         objc_msgSend and IMP should be cast appropriately before using
3148         https://bugs.webkit.org/show_bug.cgi?id=95242
3149
3150         Reviewed by Benjamin Poulain.
3151
3152         Add new templates wtfObjcMsgSend and wtfCallIMP that do the appropriate
3153         casts to correctly typed function pointers before calling objc_msgSend
3154         and IMP methods directly.
3155
3156         * wtf/Functional.h:
3157         (WTF::R): Use wtfObjcMsgSend.
3158         * wtf/ObjcRuntimeExtras.h: Added.
3159         (wtfObjcMsgSend):
3160         (wtfCallIMP):
3161
3162 2012-08-30  Benjamin Poulain  <bpoulain@apple.com>
3163
3164         Replace JSC::UString by WTF::String
3165         https://bugs.webkit.org/show_bug.cgi?id=95271
3166
3167         Reviewed by Geoffrey Garen.
3168
3169         * wtf/Platform.h: Useless edit to force a full build. This is needed for some bots for some reason.
3170         * wtf/text/WTFString.h: Export a symbol that was exported on UString and needed in WebCore.
3171
3172         Add String::getCharactersWithUpconvert<>(), which is similar to String::getCharacters<>() but with the same
3173         behaviors as UString::getCharacters<>().
3174
3175         String::getCharactersWithUpconvert<>() is useful when manipulating multiple strings, it allow writting code
3176         using 16bits characters if any of the input String is not 8bit.
3177
3178 2012-08-30  Yong Li  <yoli@rim.com>
3179
3180         Vector::shrinkToFit should use realloc when suitable.
3181         https://bugs.webkit.org/show_bug.cgi?id=94810
3182
3183         Reviewed by Benjamin Poulain.
3184
3185         Only tested on BlackBerry. So it is wrapped with PLATFORM(BLACKBERRY) in the mean time.
3186         Use realloc to shrink buffer when inline buffer isn't involved and and canMoveWithMemcpy is true.
3187
3188         When running the test code attached to the bug, it gives 30-45% performance boost for the large blocks
3189         (Every test cycle includes an extra pair of malloc/free, so the boost on shrinkToFit() is even bigger)
3190         Performance impact on small blocks is not noticeable. (Tested on BlackBerry)
3191
3192         * wtf/Vector.h:
3193         (WTF::VectorBufferBase::shouldReallocateBuffer):
3194         (VectorBufferBase):
3195         (WTF::VectorBufferBase::reallocateBuffer):
3196         (VectorBuffer):
3197         (WTF::VectorBuffer::shouldReallocateBuffer):
3198         (WTF::VectorBuffer::reallocateBuffer):
3199         (WTF::VectorBuffer::inlineBuffer):
3200         (WTF::::shrinkCapacity):
3201
3202 2012-08-30  Patrick Gansterer  <paroga@webkit.org>
3203
3204         Build fix for COMPILER(MSVC) && !CPU(X86) after r127001.
3205
3206         * wtf/MathExtras.h:
3207         (lrint): Added additional parentheses to silence compiler warning.
3208
3209 2012-08-29  Benjamin Poulain  <bpoulain@apple.com>
3210
3211         REGRESSION(r126780): Crash using StringImpl::is8Bit before checking if there is an impl
3212         https://bugs.webkit.org/show_bug.cgi?id=95380
3213
3214         Reviewed by Michael Saboff.
3215
3216         Blindly copying code from UString in r126780 was stupid. I just brought over a bug.
3217         This patch adds the zero length branch back so that null strings are handled correctly.
3218
3219         * wtf/text/WTFString.cpp:
3220         (WTF::String::ascii): Return a empty CString if the String is null or empty.
3221
3222 2012-08-29  Dominik Röttsches  <dominik.rottsches@intel.com>
3223
3224         The 2d.imageData.object.round canvas test is failing
3225         https://bugs.webkit.org/show_bug.cgi?id=40272
3226
3227         Reviewed by Benjamin Poulain.
3228
3229         Updating previous patch to address Benjamin's comments.
3230         #ifdef in Uint8ClampedArray removed, fallback implementation for MSVC on non-X86 added.
3231
3232         * wtf/MathExtras.h:
3233         (lrint): Fallback implementation for non-X86 & MSVC case.
3234         * wtf/Uint8ClampedArray.h: Removed #ifdef.
3235
3236 2012-08-28  Sheriff Bot  <webkit.review.bot@gmail.com>
3237
3238         Unreviewed, rolling out r126914.
3239         http://trac.webkit.org/changeset/126914
3240         https://bugs.webkit.org/show_bug.cgi?id=95239
3241
3242         it breaks everything and fixes nothing (Requested by pizlo on
3243         #webkit).
3244
3245         * wtf/HashCountedSet.h:
3246         (WTF::::add):
3247         (WTF::::remove):
3248         (WTF::copyToVector):
3249         * wtf/HashIterators.h:
3250         (WTF::HashTableConstKeysIterator::get):
3251         (WTF::HashTableConstValuesIterator::get):
3252         (WTF::HashTableKeysIterator::get):
3253         (WTF::HashTableValuesIterator::get):
3254         * wtf/HashMap.h:
3255         (WTF::KeyValuePairKeyExtractor::extract):
3256         (WTF::HashMapValueTraits::isEmptyValue):
3257         (WTF::HashMapTranslator::translate):
3258         (WTF::HashMapTranslatorAdapter::translate):
3259         (WTF::::set):
3260         (WTF::::get):
3261         (WTF::::take):
3262         (WTF::operator==):
3263         (WTF):
3264         (WTF::deleteAllPairSeconds):
3265         (WTF::deleteAllValues):
3266         (WTF::deleteAllPairFirsts):
3267         (WTF::deleteAllKeys):
3268         * wtf/HashTable.h:
3269         (WTF::hashTableSwap):
3270         (WTF::::checkTableConsistencyExceptSize):
3271         * wtf/HashTraits.h:
3272         (WTF::KeyValuePair::KeyValuePair):
3273         (KeyValuePair):
3274         (WTF::KeyValuePairHashTraits::constructDeletedValue):
3275         (WTF::KeyValuePairHashTraits::isDeletedValue):
3276         * wtf/MetaAllocator.cpp:
3277         (WTF::MetaAllocator::addFreeSpace):
3278         (WTF::MetaAllocator::incrementPageOccupancy):
3279         (WTF::MetaAllocator::decrementPageOccupancy):
3280         * wtf/RefCountedLeakCounter.cpp:
3281         (WTF::RefCountedLeakCounter::~RefCountedLeakCounter):
3282         * wtf/RefPtrHashMap.h:
3283         (WTF::::set):
3284         (WTF::::get):
3285         (WTF::::inlineGet):
3286         (WTF::::take):
3287         * wtf/Spectrum.h:
3288         (WTF::Spectrum::add):
3289         (WTF::Spectrum::get):
3290         (WTF::Spectrum::buildList):
3291         * wtf/ThreadingPthreads.cpp:
3292         (WTF::identifierByPthreadHandle):
3293
3294 2012-08-28  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
3295
3296         Rename first/second to key/value in HashMap iterators
3297         https://bugs.webkit.org/show_bug.cgi?id=82784
3298
3299         Reviewed by Eric Seidel.
3300
3301         * wtf/HashCountedSet.h:
3302         (WTF::::add):
3303         (WTF::::remove):
3304         (WTF::copyToVector):
3305         * wtf/HashIterators.h:
3306         (WTF::HashTableConstKeysIterator::get):
3307         (WTF::HashTableConstValuesIterator::get):
3308         (WTF::HashTableKeysIterator::get):
3309         (WTF::HashTableValuesIterator::get):
3310         * wtf/HashMap.h:
3311         (WTF::KeyValuePairKeyExtractor::extract):
3312         (WTF::HashMapValueTraits::isEmptyValue):
3313         (WTF::HashMapTranslator::translate):
3314         (WTF::HashMapTranslatorAdapter::translate):
3315         (WTF::::set):
3316         (WTF::::get):
3317         (WTF::::take):
3318         (WTF::operator==):
3319         (WTF::deleteAllValues):
3320         (WTF::deleteAllKeys):
3321         Remove deleteAllPairFirsts/Seconds.
3322
3323         * wtf/HashTable.h:
3324         (WTF::hashTableSwap):
3325         (WTF::::checkTableConsistencyExceptSize):
3326         * wtf/HashTraits.h:
3327         (WTF::KeyValuePair::KeyValuePair):
3328         (KeyValuePair):
3329         (WTF::KeyValuePairHashTraits::constructDeletedValue):
3330         (WTF::KeyValuePairHashTraits::isDeletedValue):
3331         * wtf/MetaAllocator.cpp:
3332         (WTF::MetaAllocator::addFreeSpace):
3333         (WTF::MetaAllocator::incrementPageOccupancy):
3334         (WTF::MetaAllocator::decrementPageOccupancy):
3335         * wtf/RefCountedLeakCounter.cpp:
3336         (WTF::RefCountedLeakCounter::~RefCountedLeakCounter):
3337         * wtf/RefPtrHashMap.h:
3338         (WTF::::set):
3339         (WTF::::get):
3340         (WTF::::inlineGet):
3341         (WTF::::take):
3342         * wtf/Spectrum.h:
3343         (WTF::Spectrum::add):
3344         (WTF::Spectrum::get):
3345         (WTF::Spectrum::buildList):
3346         * wtf/ThreadingPthreads.cpp:
3347         (WTF::identifierByPthreadHandle):
3348
3349 2012-08-27  Sheriff Bot  <webkit.review.bot@gmail.com>
3350
3351         Unreviewed, rolling out r126836.
3352         http://trac.webkit.org/changeset/126836
3353         https://bugs.webkit.org/show_bug.cgi?id=95163
3354
3355         Broke all Apple ports, EFL, and Qt. (Requested by tkent on
3356         #webkit).
3357
3358         * wtf/HashCountedSet.h:
3359         (WTF::::add):
3360         (WTF::::remove):
3361         (WTF::copyToVector):
3362         * wtf/HashIterators.h:
3363         (WTF::HashTableConstKeysIterator::get):
3364         (WTF::HashTableConstValuesIterator::get):
3365         (WTF::HashTableValuesIterator::get):
3366         * wtf/HashMap.h:
3367         (WTF::KeyValuePairKeyExtractor::extract):
3368         (WTF::HashMapValueTraits::isEmptyValue):
3369         (WTF::HashMapTranslator::translate):
3370         (WTF::HashMapTranslatorAdapter::translate):
3371         (WTF::::set):
3372         (WTF::::get):
3373         (WTF::::take):
3374         (WTF::operator==):
3375         (WTF):
3376         (WTF::deleteAllPairSeconds):
3377         (WTF::deleteAllValues):
3378         (WTF::deleteAllPairFirsts):
3379         (WTF::deleteAllKeys):
3380         * wtf/HashTable.h:
3381         (WTF::hashTableSwap):
3382         (WTF::::checkTableConsistencyExceptSize):
3383         * wtf/HashTraits.h:
3384         (WTF::KeyValuePair::KeyValuePair):
3385         (KeyValuePair):
3386         (WTF::KeyValuePairHashTraits::constructDeletedValue):
3387         (WTF::KeyValuePairHashTraits::isDeletedValue):
3388         * wtf/MetaAllocator.cpp:
3389         (WTF::MetaAllocator::addFreeSpace):
3390         (WTF::MetaAllocator::incrementPageOccupancy):
3391         (WTF::MetaAllocator::decrementPageOccupancy):
3392         * wtf/RefCountedLeakCounter.cpp:
3393         (WTF::RefCountedLeakCounter::~RefCountedLeakCounter):
3394         * wtf/RefPtrHashMap.h:
3395         (WTF::::set):
3396         (WTF::::get):
3397         (WTF::::inlineGet):
3398         (WTF::::take):
3399         * wtf/Spectrum.h:
3400         (WTF::Spectrum::add):
3401         (WTF::Spectrum::get):
3402         (WTF::Spectrum::buildList):
3403         * wtf/ThreadingPthreads.cpp:
3404         (WTF::identifierByPthreadHandle):
3405
3406 2012-08-27  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
3407
3408         Rename first/second to key/value in HashMap iterators
3409         https://bugs.webkit.org/show_bug.cgi?id=82784
3410
3411         Reviewed by Eric Seidel.
3412
3413         * wtf/HashCountedSet.h:
3414         (WTF::::add):
3415         (WTF::::remove):
3416         (WTF::copyToVector):
3417         * wtf/HashIterators.h:
3418         (WTF::HashTableConstKeysIterator::get):
3419         (WTF::HashTableConstValuesIterator::get):
3420         (WTF::HashTableValuesIterator::get):
3421         * wtf/HashMap.h:
3422         (WTF::KeyValuePairKeyExtractor::extract):
3423         (WTF::HashMapValueTraits::isEmptyValue):
3424         (WTF::HashMapTranslator::translate):
3425         (WTF::HashMapTranslatorAdapter::translate):
3426         (WTF::::set):
3427         (WTF::::get):
3428         (WTF::::take):
3429         (WTF::operator==):
3430         (WTF::deleteAllValues):
3431         (WTF::deleteAllKeys):
3432         Remove deleteAllPairFirsts/Seconds.
3433
3434         * wtf/HashTable.h:
3435         (WTF::hashTableSwap):
3436         (WTF::::checkTableConsistencyExceptSize):
3437         * wtf/HashTraits.h:
3438         (WTF::KeyValuePair::KeyValuePair):
3439         (KeyValuePair):
3440         (WTF::KeyValuePairHashTraits::constructDeletedValue):
3441         (WTF::KeyValuePairHashTraits::isDeletedValue):
3442         * wtf/MetaAllocator.cpp:
3443         (WTF::MetaAllocator::addFreeSpace):
3444         (WTF::MetaAllocator::incrementPageOccupancy):
3445         (WTF::MetaAllocator::decrementPageOccupancy):
3446         * wtf/RefCountedLeakCounter.cpp:
3447         (WTF::RefCountedLeakCounter::~RefCountedLeakCounter):
3448         * wtf/RefPtrHashMap.h:
3449         (WTF::::set):
3450         (WTF::::get):
3451         (WTF::::inlineGet):
3452         (WTF::::take):
3453         * wtf/Spectrum.h:
3454         (WTF::Spectrum::add):
3455         (WTF::Spectrum::get):
3456         (WTF::Spectrum::buildList):
3457         * wtf/ThreadingPthreads.cpp:
3458         (WTF::identifierByPthreadHandle):
3459
3460 2012-08-27  Benjamin Poulain  <benjamin@webkit.org>
3461
3462         Add ECMAScript Number to String conversion to WTF::String
3463         https://bugs.webkit.org/show_bug.cgi?id=95016
3464
3465         Reviewed by Geoffrey Garen.
3466
3467         * wtf/text/WTFString.cpp:
3468         (WTF::String::numberToStringECMAScript):
3469         * wtf/text/WTFString.h:
3470         Add the implementation of numberToStringECMAScript(double) from UString to String.
3471         This will make it easier to replace UString in the future.
3472
3473 2012-08-27  Benjamin Poulain  <benjamin@webkit.org>
3474
3475         Even up WTF::String to CString functions
3476         https://bugs.webkit.org/show_bug.cgi?id=95008
3477
3478         Reviewed by Sam Weinig.
3479
3480         Apply advantages from UString to WTF::String.
3481
3482         * wtf/text/WTFString.cpp:
3483         (WTF::String::ascii): There is no need to special case the null length, both
3484         following branches use CString::newUninitialized(), which create empty string
3485         for null length.
3486         (WTF::String::latin1): Use characters16() instead of characters() to avoid
3487         testing is8Bit() a second time.
3488
3489 2012-08-24  Benjamin Poulain  <benjamin@webkit.org>
3490
3491         Touch Platform.h to solve a build dependency issue
3492
3493         Unreviewed.
3494
3495         * wtf/Platform.h:
3496
3497 2012-08-24  Benjamin Poulain  <bpoulain@apple.com>
3498
3499         Unify Number to StringImpl conversion
3500         https://bugs.webkit.org/show_bug.cgi?id=94879
3501
3502         Reviewed by Geoffrey Garen.
3503
3504         Previously, UString::number() and String::number() used different implementations.
3505
3506         WTF::String::number() was simply forwarding to String::format().
3507         UString::number() had an optimized version of the conversion.
3508
3509         This patch replace both implementation by a new version, faster than the two previous versions.
3510
3511         The new functions numberToStringImpl improvements are:
3512         -about 3 times faster than String::number().
3513         -14% faster than UString::number() on signed numbers.
3514         -9% faster than UString::number() on unsigned numbers.
3515
3516         * GNUmakefile.list.am:
3517         * WTF.gypi:
3518         * WTF.pro:
3519         * WTF.vcproj/WTF.vcproj:
3520         * WTF.xcodeproj/project.pbxproj:
3521         * wtf/CMakeLists.txt:
3522         * wtf/text/IntegerToStringConversion.cpp: Added.
3523         (WTF::numberToStringImplSigned):
3524         (WTF::numberToStringImpl):
3525         (WTF::numberToStringImplUnsigned):
3526         * wtf/text/IntegerToStringConversion.h: Added.
3527         * wtf/text/WTFString.cpp:
3528         (WTF::String::format):
3529         * wtf/text/WTFString.h:
3530         (WTF::String::number):
3531
3532 2012-08-24  Andras Becsi  <andras.becsi@nokia.com>
3533
3534         [Qt] Be more explicit about the ICU dependency in the error message
3535
3536         Rubber-stamped by Simon Hausmann.
3537
3538         When building QtWebKit with a Qt5 which was not configured with libICU support
3539         the error message is somewhat ambiguous about the indirect dependency.
3540
3541         * WTF.pri:
3542
3543 2012-08-23  Julien Chaffraix  <jchaffraix@webkit.org>
3544
3545         [Chromium] Enable AtomicString && CString && WTFString && StringImpl unit tests
3546         https://bugs.webkit.org/show_bug.cgi?id=94871
3547
3548         Reviewed by Benjamin Poulain.
3549
3550         * wtf/PassRefPtr.h:
3551         We need to include Assertions.h due to the COMPILE_ASSERT added in r89283.
3552         This matches other files in WTF though I am not sure why Chromium is the only
3553         platform complaining about that.
3554
3555 2012-08-23  Mark Rowe  <mrowe@apple.com>
3556
3557         Build fix for old, old versions of Clang.
3558
3559         * wtf/FastMalloc.cpp:
3560         (WTF): Rejigger things so that they parse correctly if __has_warning isn't defined.
3561
3562 2012-08-23  Emil A Eklund  <eae@chromium.org>
3563
3564         Add saturation arithmetic support to FractionalLayoutUnit
3565         https://bugs.webkit.org/show_bug.cgi?id=94364
3566
3567         Reviewed by Benjamin Poulain.
3568
3569         Add support functions for saturated addition and subtraction.
3570
3571         Test: TestWebKitAPI/Tests/WTF/SaturatedArithmeticOperations.cpp
3572
3573         * GNUmakefile.list.am:
3574         * WTF.gypi:
3575         * WTF.pro:
3576         * WTF.vcproj/WTF.vcproj:
3577         * WTF.xcodeproj/project.pbxproj:
3578         * WTF/wtf/CMakeLists.txt:
3579         Add SaturatedArithmetic.h to build files.
3580
3581         * wtf/SaturatedArithmetic.h: Added.
3582         (saturatedAddition):
3583         (saturatedSubtraction):
3584         Support functions for saturated addition/subtraction. Compares the signed
3585         bit of the values instead of using range checks to reduce branching.
3586
3587         * wtf/Platform.h:
3588         Add ENABLE_SATURATED_LAYOUT_ARITHMETIC flag.
3589
3590 2012-08-23  Mark Rowe  <mrowe@apple.com>
3591
3592         Roll back in the part of r126475 that I had rolled out.
3593
3594         * wtf/FastMalloc.cpp:
3595         (WTF): Disable the -Wunused-private-field warning around the declaration of
3596         TCMalloc_Central_FreeListPadded since the padding is intentionally unused.
3597         Only disable the warning if we detect it is enabled, since the warning may not
3598         be supported by the version of Clang that is being used.
3599
3600 2012-08-23  Mark Rowe  <mrowe@apple.com>
3601
3602         Roll out part of r126475 that breaks the build with older versions of Clang.
3603
3604         * wtf/FastMalloc.cpp:
3605
3606 2012-08-23  Mark Rowe  <mrowe@apple.com>
3607
3608         Make WTF build with the latest version of clang.
3609
3610         Reviewed by Dan Bernstein.
3611
3612         * wtf/FastMalloc.cpp:
3613         (WTF): Disable the -Wunused-private-field warning around the declaration of
3614         TCMalloc_Central_FreeListPadded since the padding is intentionally unused.
3615         (WTF::AdminRegionRecorder): Remove the unused m_reader member.
3616         (WTF::FastMallocZone::enumerate): Don't pass in the RemoteMemoryReader since
3617         it is no longer needed.
3618
3619 2012-08-22  Geoffrey Garen  <ggaren@apple.com>
3620
3621         Fixed a fastMallocForbid/Allow compile error for some compilers
3622         https://bugs.webkit.org/show_bug.cgi?id=94775
3623
3624         Reviewed by Gavin Barraclough.
3625
3626         * wtf/FastMalloc.h:
3627         (WTF::fastMallocForbid()):
3628         (WTF::fastMallocAllow()): Export, since these are called by JavaScriptCore.
3629
3630 2012-08-22  Geoffrey Garen  <ggaren@apple.com>
3631
3632         ThreadRestrictionVerifier should be opt-in, not opt-out
3633         https://bugs.webkit.org/show_bug.cgi?id=94761
3634
3635         Reviewed by Mark Hahnenberg.
3636
3637         WebKit's JavaScript engine supports use on multiple threads, so default-on
3638         is not appropriate for most of our objects, and it causes lots of suprious
3639         assertions.
3640
3641         * wtf/MetaAllocator.cpp:
3642         (WTF::MetaAllocatorHandle::MetaAllocatorHandle): No need to turn off
3643         explicitly, since it's off by default now.
3644
3645         * wtf/ThreadRestrictionVerifier.h:
3646         (WTF::ThreadRestrictionVerifier::ThreadRestrictionVerifier): Turn off by default.
3647
3648         (WTF::ThreadRestrictionVerifier::setMutexMode):
3649         (WTF::ThreadRestrictionVerifier::setDispatchQueueMode):
3650         (WTF::ThreadRestrictionVerifier::turnOffVerification): These assertions