Integrate most of GoogleURL in WTFURL
[WebKit-https.git] / Source / WTF / ChangeLog
1 2012-09-24  Benjamin Poulain  <benjamin@webkit.org>
2
3         Integrate most of GoogleURL in WTFURL
4         https://bugs.webkit.org/show_bug.cgi?id=97405
5
6         Reviewed by Adam Barth.
7
8         This patch brings almost all of the implementatation of Google-URL in WTFURL
9         with only minor changes.
10
11         The changes from the original code are mostly:
12         -Code cleaning.
13         -Replace url_parse::Parsed by URLSegments.
14         -Replace url_parse::Component by URLComponent
15         -More code cleaning.
16         -Adopt URLBuffer and RawURLBuffer instead of the CanonOutputT and RawCanonOutputT.
17         -Use URLCharacterTypes instead of the litany of characters functions.
18         -Some more code cleaning.
19         -Fix the style to match WebKit as much as possible.
20         -Rename the files to match WebKit style.
21
22         * WTF.xcodeproj/project.pbxproj:
23         * wtf/url/api/ParsedURL.cpp:
24         (WTF::ParsedURL::ParsedURL):
25         (WTF::ParsedURL::segment):
26         * wtf/url/api/ParsedURL.h:
27         (WTF::ParsedURL::isValid):
28         * wtf/url/src/RawURLBuffer.h:
29         * wtf/url/src/URLCanon.h: Added.
30         (URLCanonicalizer):
31         (CharsetConverter):
32         (WTF::URLCanonicalizer::CharsetConverter::CharsetConverter):
33         (WTF::URLCanonicalizer::CharsetConverter::~CharsetConverter):
34         (CanonHostInfo):
35         (WTF::URLCanonicalizer::CanonHostInfo::CanonHostInfo):
36         (WTF::URLCanonicalizer::CanonHostInfo::IsIPAddress):
37         (WTF::URLCanonicalizer::CanonHostInfo::AddressLength):
38         (URLComponentSource):
39         (WTF::URLCanonicalizer::URLComponentSource::URLComponentSource):
40         (Replacements):
41         (WTF::URLCanonicalizer::Replacements::Replacements):
42         (WTF::URLCanonicalizer::Replacements::SetScheme):
43         (WTF::URLCanonicalizer::Replacements::IsSchemeOverridden):
44         (WTF::URLCanonicalizer::Replacements::SetUsername):
45         (WTF::URLCanonicalizer::Replacements::ClearUsername):
46         (WTF::URLCanonicalizer::Replacements::IsUsernameOverridden):
47         (WTF::URLCanonicalizer::Replacements::SetPassword):
48         (WTF::URLCanonicalizer::Replacements::ClearPassword):
49         (WTF::URLCanonicalizer::Replacements::IsPasswordOverridden):
50         (WTF::URLCanonicalizer::Replacements::SetHost):
51         (WTF::URLCanonicalizer::Replacements::ClearHost):
52         (WTF::URLCanonicalizer::Replacements::IsHostOverridden):
53         (WTF::URLCanonicalizer::Replacements::SetPort):
54         (WTF::URLCanonicalizer::Replacements::ClearPort):
55         (WTF::URLCanonicalizer::Replacements::IsPortOverridden):
56         (WTF::URLCanonicalizer::Replacements::SetPath):
57         (WTF::URLCanonicalizer::Replacements::ClearPath):
58         (WTF::URLCanonicalizer::Replacements::IsPathOverridden):
59         (WTF::URLCanonicalizer::Replacements::SetQuery):
60         (WTF::URLCanonicalizer::Replacements::ClearQuery):
61         (WTF::URLCanonicalizer::Replacements::IsQueryOverridden):
62         (WTF::URLCanonicalizer::Replacements::SetRef):
63         (WTF::URLCanonicalizer::Replacements::ClearRef):
64         (WTF::URLCanonicalizer::Replacements::IsRefOverridden):
65         (WTF::URLCanonicalizer::Replacements::sources):
66         (WTF::URLCanonicalizer::Replacements::components):
67         (WTF::URLCanonicalizer::Replacements::Placeholder):
68         * wtf/url/src/URLCanonEtc.cpp: Added.
69         (WTF::URLCanonicalizer::removeURLWhitespace):
70         (URLCanonicalizer):
71         (WTF::URLCanonicalizer::canonicalSchemeChar):
72         (WTF::URLCanonicalizer::CanonicalizeScheme):
73         (WTF::URLCanonicalizer::CanonicalizeUserInfo):
74         (WTF::URLCanonicalizer::CanonicalizePort):
75         (WTF::URLCanonicalizer::CanonicalizeRef):
76         * wtf/url/src/URLCanonFilesystemurl.cpp: Added.
77         (WTF::URLCanonicalizer::CanonicalizeFileSystemURL):
78         (URLCanonicalizer):
79         (WTF::URLCanonicalizer::ReplaceFileSystemURL):
80         * wtf/url/src/URLCanonFileurl.cpp: Added.
81         (WTF::URLCanonicalizer::CanonicalizeFileURL):
82         (URLCanonicalizer):
83         (WTF::URLCanonicalizer::FileCanonicalizePath):
84         (WTF::URLCanonicalizer::ReplaceFileURL):
85         * wtf/url/src/URLCanonHost.cpp: Added.
86         (WTF::URLCanonicalizer::CanonicalizeHost):
87         (URLCanonicalizer):
88         (WTF::URLCanonicalizer::CanonicalizeHostVerbose):
89         * wtf/url/src/URLCanonICU.cpp: Added.
90         (WTF::URLCanonicalizer::IDNToASCII):
91         (URLCanonicalizer):
92         (WTF::URLCanonicalizer::readUTFChar):
93         * wtf/url/src/URLCanonIP.cpp: Added.
94         (WTF::URLCanonicalizer::CanonicalizeIPAddress):
95         (URLCanonicalizer):
96         * wtf/url/src/URLCanonInternal.cpp: Added.
97         (URLCanonicalizer):
98         (WTF::URLCanonicalizer::AppendInvalidNarrowString):
99         (WTF::URLCanonicalizer::ConvertUTF16ToUTF8):
100         (WTF::URLCanonicalizer::ConvertUTF8ToUTF16):
101         (WTF::URLCanonicalizer::SetupOverrideComponents):
102         (WTF::URLCanonicalizer::SetupUTF16OverrideComponents):
103         (WTF::URLCanonicalizer::_itoa_s):
104         (WTF::URLCanonicalizer::_itow_s):
105         * wtf/url/src/URLCanonInternal.h: Added.
106         (URLCanonicalizer):
107         (WTF::URLCanonicalizer::hexCharToValue):
108         (WTF::URLCanonicalizer::isDot):
109         (WTF::URLCanonicalizer::appendURLEscapedCharacter):
110         (WTF::URLCanonicalizer::doAppendUTF8):
111         (WTF::URLCanonicalizer::AppendCharToOutput):
112         (WTF::URLCanonicalizer::AppendUTF8Value):
113         (WTF::URLCanonicalizer::AppendUTF8EscapedValue):
114         (WTF::URLCanonicalizer::AppendUTF16Value):
115         (WTF::URLCanonicalizer::AppendUTF8EscapedChar):
116         (WTF::URLCanonicalizer::Is8BitChar):
117         (WTF::URLCanonicalizer::DecodeEscaped):
118         (WTF::URLCanonicalizer::_itoa_s):
119         (WTF::URLCanonicalizer::_itow_s):
120         (WTF::URLCanonicalizer::_strtoui64):
121         * wtf/url/src/URLCanonMailto.cpp: Added.
122         (WTF::URLCanonicalizer::CanonicalizeMailtoURL):
123         (URLCanonicalizer):
124         (WTF::URLCanonicalizer::ReplaceMailtoURL):
125         * wtf/url/src/URLCanonPath.cpp: Added.
126         (WTF::URLCanonicalizer::CanonicalizePath):
127         (URLCanonicalizer):
128         (WTF::URLCanonicalizer::CanonicalizePartialPath):
129         * wtf/url/src/URLCanonPathurl.cpp: Added.
130         (WTF::URLCanonicalizer::canonicalizePathURL):
131         (URLCanonicalizer):
132         (WTF::URLCanonicalizer::ReplacePathURL):
133         * wtf/url/src/URLCanonQuery.cpp: Added.
134         (WTF::URLCanonicalizer::CanonicalizeQuery):
135         (URLCanonicalizer):
136         (WTF::URLCanonicalizer::ConvertUTF16ToQueryEncoding):
137         * wtf/url/src/URLCanonRelative.cpp: Added.
138         (WTF::URLCanonicalizer::isRelativeURL):
139         (URLCanonicalizer):
140         (WTF::URLCanonicalizer::resolveRelativeURL):
141         * wtf/url/src/URLCanonStdURL.cpp: Added.
142         (WTF::URLCanonicalizer::DefaultPortForScheme):
143         (URLCanonicalizer):
144         (WTF::URLCanonicalizer::CanonicalizeStandardURL):
145         (WTF::URLCanonicalizer::ReplaceStandardURL):
146         * wtf/url/src/URLCharacterTypes.cpp:
147         * wtf/url/src/URLCharacterTypes.h:
148         (WTF::URLCharacterTypes::isComponentChar):
149         (WTF::URLCharacterTypes::isHexChar):
150         (WTF::URLCharacterTypes::isIPv4Char):
151         (WTF::URLCharacterTypes::isQueryChar):
152         (WTF::URLCharacterTypes::isCharacterOfType):
153         (URLCharacterTypes):
154         * wtf/url/src/URLEscape.cpp: Removed.
155         * wtf/url/src/URLFile.h: Added.
156         (URLParser):
157         (WTF::URLParser::isWindowsDriveSeparator):
158         (WTF::URLParser::isWindowsDriveLetter):
159         (WTF::URLParser::findNextSlash):
160         (WTF::URLParser::doesBeginWindowsDriveSpec):
161         (WTF::URLParser::doesBeginUNCPath):
162         * wtf/url/src/URLParse.cpp: Added.
163         (WTF::URLParser::ExtractScheme):
164         (URLParser):
165         (WTF::URLParser::IsAuthorityTerminator):
166         (WTF::URLParser::ExtractFileName):
167         (WTF::URLParser::ExtractQueryKeyValue):
168         (WTF::URLParser::ParseAuthority):
169         (WTF::URLParser::ParsePort):
170         (WTF::URLParser::ParseStandardURL):
171         (WTF::URLParser::ParsePathURL):
172         (WTF::URLParser::ParseFileSystemURL):
173         (WTF::URLParser::ParseMailtoURL):
174         (WTF::URLParser::parsePathInternal):
175         (WTF::URLParser::ParseAfterScheme):
176         * wtf/url/src/URLParse.h: Added.
177         (URLParser):
178         * wtf/url/src/URLParseFile.cpp: Added.
179         (WTF):
180         (WTF::URLParser::ParseFileURL):
181         (URLParser):
182         * wtf/url/src/URLParseInternal.h: Added.
183         (URLParser):
184         (WTF::URLParser::isURLSlash):
185         (WTF::URLParser::shouldTrimFromURL):
186         (WTF::URLParser::trimURL):
187         (WTF::URLParser::countConsecutiveSlashes):
188         * wtf/url/src/URLParser.h: Removed.
189         * wtf/url/src/URLQueryCanonicalizer.h: Removed.
190         * wtf/url/src/URLSegments.cpp:
191         * wtf/url/src/URLSegments.h:
192         (WTF::URLSegments::URLSegments):
193         (URLSegments):
194         (WTF::URLSegments::operator=):
195         (WTF::URLSegments::innerURLSegments):
196         (WTF::URLSegments::setInnerURLSegments):
197         (WTF::URLSegments::clearInnerURLSegments):
198         * wtf/url/src/URLUtil.cpp: Added.
199         (URLUtilities):
200         (WTF::URLUtilities::IsStandard):
201         (WTF::URLUtilities::FindAndCompareScheme):
202         (WTF::URLUtilities::Canonicalize):
203         (WTF::URLUtilities::resolveRelative):
204         (WTF::URLUtilities::ReplaceComponents):
205         (WTF::URLUtilities::LowerCaseEqualsASCII):
206         (WTF::URLUtilities::DecodeURLEscapeSequences):
207         (WTF::URLUtilities::EncodeURIComponent):
208         (WTF::URLUtilities::CompareSchemeComponent):
209         * wtf/url/src/URLUtil.h: Added.
210         (URLUtilities):
211         * wtf/url/src/URLUtilInternal.h: Renamed from Source/WTF/wtf/url/src/URLEscape.h.
212         (URLUtilities):
213
214 2012-09-24  Joone Hur  <joone.hur@intel.com>
215
216         [GTK] Implement GraphicsLayer using Clutter
217         https://bugs.webkit.org/show_bug.cgi?id=73767
218
219         Reviewed by Martin Robinson.
220
221         Add ClutterActor and GraphicsLayerActor to GTypedefs.h.
222
223         * wtf/gobject/GTypedefs.h:
224
225 2012-09-23  Byungwoo Lee  <bw80.lee@gmail.com>
226
227         Fix build warnings : -Wunused-parameter, -Wparentheses, -Wuninitialized.
228         https://bugs.webkit.org/show_bug.cgi?id=97306
229
230         Reviewed by Benjamin Poulain.
231
232         Fix build warning about -Wunused-parameter on FastMalloc.cpp,
233         OSAllocatorPosix.cpp by using UNUSED_PARAM() macro.
234         Fix header including order of FastMalloc.cpp.
235
236         * wtf/FastMalloc.cpp:
237         (WTF::fastMallocSize):
238         * wtf/OSAllocatorPosix.cpp:
239         (WTF::OSAllocator::reserveAndCommit):
240
241 2012-09-22  Sam Weinig  <sam@webkit.org>
242
243         Add explicit conversion operator to RetainPtr for easier use in C++11 environments
244         https://bugs.webkit.org/show_bug.cgi?id=97403
245
246         Reviewed by Dan Bernstein.
247
248         * wtf/Compiler.h:
249         Add support for COMPILER_SUPPORTS(CXX_EXPLICIT_CONVERSIONS)
250
251         * wtf/RetainPtr.h:
252         (RetainPtr):
253         (WTF::RetainPtr::get):
254         (WTF::RetainPtr::operator PtrType):
255         Add the explicit conversion operator and group all the underlying
256         pointer accessors together.
257
258 2012-09-21  Simon Hausmann  <simon.hausmann@digia.com>
259
260         [Qt] Error out early if we don't have ICU available
261
262         Reviewed by Tor Arne Vestbø.
263
264         * WTF.pri:
265
266 2012-09-20  Patrick Gansterer  <paroga@webkit.org>
267
268         Add String::numberToStringFixedWidth()
269         https://bugs.webkit.org/show_bug.cgi?id=96330
270
271         Reviewed by Benjamin Poulain.
272
273         Add this new function as replacement for the ShouldRoundDecimalPlaces flag of String::number()
274         and remove the now unnecessary branch in String::number() for the old flags.
275
276         * wtf/text/WTFString.cpp:
277         (WTF::String::number):
278         (WTF::String::numberToStringFixedWidth):
279         * wtf/text/WTFString.h:
280
281 2012-09-19  Geoffrey Garen  <ggaren@apple.com>
282
283         OSR exit sometimes neglects to create the arguments object
284         https://bugs.webkit.org/show_bug.cgi?id=97162
285
286         Reviewed by Filip Pizlo.
287
288         * wtf/HashTraits.h:
289         (NullableHashTraits):
290         (WTF::NullableHashTraits::emptyValue):
291         (WTF):
292
293 2012-09-18  Glenn Adams  <glenn@skynav.com>
294
295         WTFString::show doesn't dump non-ASCII characters in a readable manner
296         https://bugs.webkit.org/show_bug.cgi?id=96749
297
298         Reviewed by Benjamin Poulain.
299
300         Dump non-ASCII characters in a useful form for debugging.
301
302         * wtf/text/WTFString.cpp:
303         (asciiDebug):
304         Dump non-ASCII characters (i.e., UTF-16 code elements) as well as non-printable ASCII characters
305         using \uXXXX format. Also escape \ as \\ in order to remove ambiguity.
306
307 2012-09-18  Mark Hahnenberg  <mhahnenberg@apple.com>
308
309         Use WTF::HasTrivialDestructor instead of compiler-specific versions in JSC::NeedsDestructor
310         https://bugs.webkit.org/show_bug.cgi?id=96980
311
312         Reviewed by Benjamin Poulain.
313
314         * wtf/TypeTraits.h:
315         (WTF):
316
317 2012-09-17  Glenn Adams  <glenn@skynav.com>
318
319         Including HexNumber.h fails build if hexDigitsForMode is not referenced
320         https://bugs.webkit.org/show_bug.cgi?id=96873
321
322         Reviewed by Benjamin Poulain.
323
324         Ensure release build is possible when hexDigitsForMode is not referenced by
325         template expansion.
326
327         * wtf/HexNumber.h:
328         (WTF::Internal::hexDigitsForMode):
329         Change hexDigitsForMode to inline (rather than static). Make string literals
330         {lower,upper}HexDigits non-local and non-static, but const, to which the linker
331         should merge references in the RO data segment.
332
333 2012-09-17  Filip Pizlo  <fpizlo@apple.com>
334
335         The ThreadRescrictionVerifier should be more forcibly disabled on systems that use threads
336         https://bugs.webkit.org/show_bug.cgi?id=96957
337
338         Reviewed by Oliver Hunt.
339
340         * wtf/ThreadRestrictionVerifier.h:
341         (WTF):
342         (WTF::ThreadRestrictionVerifier::ThreadRestrictionVerifier):
343         (ThreadRestrictionVerifier):
344         (WTF::ThreadRestrictionVerifier::setMutexMode):
345         (WTF::ThreadRestrictionVerifier::setDispatchQueueMode):
346         (WTF::ThreadRestrictionVerifier::turnOffVerification):
347         (WTF::ThreadRestrictionVerifier::setShared):
348         (WTF::ThreadRestrictionVerifier::isSafeToUse):
349
350 2012-09-17  Sheriff Bot  <webkit.review.bot@gmail.com>
351
352         Unreviewed, rolling out r128796.
353         http://trac.webkit.org/changeset/128796
354         https://bugs.webkit.org/show_bug.cgi?id=96966
355
356         It broke everything (Requested by Ossy_NIGHT on #webkit).
357
358         * wtf/OSAllocatorPosix.cpp:
359         (WTF::OSAllocator::reserveUncommitted):
360         (WTF::OSAllocator::reserveAndCommit):
361         (WTF::OSAllocator::commit):
362         (WTF::OSAllocator::decommit):
363
364 2012-09-17  Uli Schlachter  <psychon@znc.in>
365
366         Implement uncommitted memory for Linux.
367         https://bugs.webkit.org/show_bug.cgi?id=65766
368
369         Reviewed by Gavin Barraclough.
370
371         The old approach used MAP_NORESERVE to allocate address space without
372         committing it. However, that flag gets ignored if
373         /proc/sys/vm/overcommit_memory is set to 2. The new approach uses a
374         mapping with PROT_NONE. This works because mappings which aren't even
375         readable don't get accounted as committed on Linux.
376
377         * wtf/OSAllocatorPosix.cpp:
378         (WTF::OSAllocator::reserveUncommitted):
379         (WTF::OSAllocator::reserveAndCommit):
380         (WTF::OSAllocator::commit):
381         (WTF::OSAllocator::decommit):
382
383 2012-09-17  Filip Pizlo  <fpizlo@apple.com>
384
385         Array profiling has convergence issues
386         https://bugs.webkit.org/show_bug.cgi?id=96891
387
388         Reviewed by Gavin Barraclough.
389
390         Added functions for testing if something is a power of 2.
391
392         * wtf/MathExtras.h:
393         (hasZeroOrOneBitsSet):
394         (hasTwoOrMoreBitsSet):
395
396 2012-09-17  Ilya Tikhonovsky  <loislo@chromium.org>
397
398         Web Inspector: NMI: now when we can detect instrumented classes we can
399         remove addInstrumentedMember and use addMember for everything.
400         https://bugs.webkit.org/show_bug.cgi?id=96913
401
402         Reviewed by Yury Semikhatsky.
403
404         * wtf/MemoryInstrumentation.h:
405         (WTF::MemoryInstrumentation::addRootObject):
406         (WTF::MemoryInstrumentation::addObject):
407         (WTF::MemoryInstrumentation::addObjectImpl):
408         (WTF):
409         (WTF::MemoryInstrumentation::addInstrumentedCollection):
410         (WTF::MemoryInstrumentation::addInstrumentedMapEntries):
411         (WTF::MemoryInstrumentation::addInstrumentedMapValues):
412         * wtf/text/AtomicString.cpp:
413         (WTF::AtomicString::reportMemoryUsage):
414         * wtf/text/CString.h:
415         (WTF::CString::reportMemoryUsage):
416         * wtf/text/StringImpl.cpp:
417         (WTF::StringImpl::reportMemoryUsage):
418         * wtf/text/WTFString.cpp:
419         (WTF::String::reportMemoryUsage):
420         * wtf/url/api/ParsedURL.cpp:
421         (WTF::ParsedURL::reportMemoryUsage):
422         * wtf/url/api/URLString.cpp:
423         (WTF::URLString::reportMemoryUsage):
424
425 2012-09-17  Ilya Tikhonovsky  <loislo@chromium.org>
426
427         Unreviewed compilation fix.
428
429         * wtf/MemoryInstrumentation.h:
430         (WTF::MemoryInstrumentation::reportObjectMemoryUsage):
431
432 2012-09-15  Yury Semikhatsky  <yurys@chromium.org>
433
434         Web Inspector: automatically detect if class has reportMemoryUsage method
435         https://bugs.webkit.org/show_bug.cgi?id=96756
436
437         Reviewed by Alexander Pavlov.
438
439         Implemeted automatic selector of the memory reporting method. If
440         an object has reportMemoryUsage method then call it. Otherwise
441         count only object's self size. As the next step we will delete
442         addInstrumentedMember and addInstrumentedObjectImpl and will
443         have only addMember and addObjectImpl that would automatically
444         call reportMemoryUsage if it is present.
445
446         * wtf/MemoryInstrumentation.h:
447         (WTF::MemoryInstrumentation::selectInstrumentationMethod):
448         (MemoryInstrumentation):
449         (WTF::MemoryInstrumentation::reportObjectMemoryUsage):
450         (WTF::MemoryInstrumentation::addInstrumentedObjectImpl):
451         (WTF::MemoryInstrumentation::addObjectImpl):
452         (WTF::::process):
453
454 2012-09-14  Yury Semikhatsky  <yurys@chromium.org>
455
456         Web Inspector: OwnPtr and RefPtr reported by pointer can be double counted by the memory instrumentation
457         https://bugs.webkit.org/show_bug.cgi?id=96791
458
459         Reviewed by Alexander Pavlov.
460
461         * wtf/MemoryInstrumentation.h:
462         (WTF::MemoryInstrumentation::addObjectImpl): check if the smart pointer has already
463         been visited before counting its size.
464
465 2012-09-15  Benjamin Poulain  <benjamin@webkit.org>
466
467         Fix the build with WTF URL
468         https://bugs.webkit.org/show_bug.cgi?id=96875
469
470         Reviewed by Adam Barth.
471
472         Add support for MemoryInstrumentation to WTF's URL classes.
473
474         * wtf/url/api/ParsedURL.cpp:
475         (WTF::ParsedURL::reportMemoryUsage):
476         * wtf/url/api/ParsedURL.h:
477         (ParsedURL):
478         * wtf/url/api/URLString.cpp:
479         (WTF::URLString::reportMemoryUsage):
480         * wtf/url/api/URLString.h:
481         (URLString):
482
483 2012-09-15  Raphael Kubo da Costa  <rakuco@FreeBSD.org>
484
485         llint: Implement LOCAL_LABEL_STRING for the BSD platforms.
486         https://bugs.webkit.org/show_bug.cgi?id=96870
487
488         Reviewed by Filip Pizlo.
489
490         * wtf/InlineASM.h: Extend the definition of LOCAL_LABEL_STRING
491         currently used for OS(LINUX) to the BSDs, since they also normally
492         use GNU as, and clang/llvm seems to parse that syntax just fine as
493         well.
494
495 2012-09-14  Alexey Proskuryakov  <ap@apple.com>
496
497         Minimize collisions when hashing pairs
498         https://bugs.webkit.org/show_bug.cgi?id=96022
499
500         Build fix (with newer clang?)
501
502         * wtf/HashFunctions.h: (WTF::pairIntHash): Be explicit about casting from
503         64 bit to 32 bit.
504
505 2012-09-14  Dana Jansens  <danakj@chromium.org>
506
507         Minimize collisions when hashing pairs
508         https://bugs.webkit.org/show_bug.cgi?id=96022
509
510         Reviewed by Adrienne Walker.
511
512         The current hash function for pairs has poor performance as it does a
513         nice hash function on 64 bits, but then just drops the top 32 bits. The
514         hash method for pairs tries to use Thomas Wang's 64 bit Mix Function,
515         but this requires not dropping any bits in order to retain the
516         characteristics mentioned by Thomas.
517
518         A better method of hashing sets of 32-bit integers is to use
519         multiplication in 64 bits with random integers. This method is a
520         provably almost-universal hash function. Testing shows that this
521         method decreases the time required, when compared with the current
522         method, by more than 20% due to better hashing characteristics.
523
524         * wtf/HashFunctions.h:
525         (WTF):
526         (WTF::pairIntHash):
527         Implments the hashing method for a pair of unsigned integers.
528
529         (WTF::PairHash::hash):
530         Use pairIntHash() on the hash results of each object in the pair.
531
532         (WTF::IntPairHash::hash):
533         Implement an integer-specific PairHash class that does not need to
534         hash each object in the pair. It uses pairIntHash on the two
535         integers in the pair directly.
536
537         (WTF::IntPairHash::equal):
538         (IntPairHash):
539
540 2012-09-14  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
541
542         [Qt] Make force_static_libs_as_shared work on Mac OS
543
544         We had to move a few LIBS += around that were in the wrong place,
545         and not caught when everything was just linked into the final
546         QtWebKit library.
547
548         Reviewed by Simon Hausmann.
549
550         * WTF.pri:
551
552 2012-09-14  Ilya Tikhonovsky  <loislo@chromium.org>
553
554         Web Inspector: NMI: convert template versions of String*::reportMemoryUsage functions to normal functions.
555         https://bugs.webkit.org/show_bug.cgi?id=96759
556
557         Reviewed by Yury Semikhatsky.
558
559         Now when MemoryInstrumentation.h is a part of WTF we can move reportMemoryUsage functions to cpp file.
560
561         * wtf/text/AtomicString.cpp:
562         (WTF::AtomicString::reportMemoryUsage):
563         (WTF):
564         * wtf/text/AtomicString.h:
565         (WTF):
566         (AtomicString):
567         * wtf/text/StringImpl.cpp:
568         (WTF::StringImpl::reportMemoryUsage):
569         (WTF):
570         * wtf/text/StringImpl.h:
571         (WTF):
572         (StringImpl):
573         * wtf/text/WTFString.cpp:
574         (WTF::String::reportMemoryUsage):
575         (WTF):
576         * wtf/text/WTFString.h:
577         (WTF):
578         (String):
579
580 2012-09-14  Ilya Tikhonovsky  <loislo@chromium.org>
581
582         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.
583         https://bugs.webkit.org/show_bug.cgi?id=96737
584
585         Reviewed by Yury Semikhatsky.
586
587         * wtf/MemoryInstrumentation.h:
588         (MemoryInstrumentation):
589         WTF::MemoryInstrumentationTraits): removed
590         (WTF::MemoryInstrumentation::OwningTraits::addInstrumentedObject): direct call inserted
591         (WTF::MemoryInstrumentation::OwningTraits::addObject):direct call inserted
592
593 2012-09-13  Kenneth Rohde Christiansen  <kenneth@webkit.org>
594
595         Evas_Object* is a ref'ed structure, so tread it as such
596         https://bugs.webkit.org/show_bug.cgi?id=96659
597
598         Reviewed by Gyuyoung Kim.
599
600         Remove OwnPtr support for Evas_Object* and add support for it
601         with RefPtr instead (the latter moved from WebCore).
602
603         * wtf/PlatformEfl.cmake:
604         * wtf/efl/OwnPtrEfl.cpp:
605         * wtf/efl/RefPtrEfl.cpp: Renamed from Source/WebCore/platform/efl/RefPtrEfl.cpp.
606         (WTF):
607         (WTF::refIfNotNull):
608         (WTF::derefIfNotNull):
609         * wtf/efl/RefPtrEfl.h: Renamed from Source/WebCore/platform/efl/RefPtrEfl.h.
610         (WTF):
611
612 2012-09-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
613
614         Unreviewed, rolling out r128507.
615         http://trac.webkit.org/changeset/128507
616         https://bugs.webkit.org/show_bug.cgi?id=96659
617
618         Revert. r128507 makes too many crash in EFL layout test bots.
619
620         * wtf/PlatformEfl.cmake:
621         * wtf/efl/OwnPtrEfl.cpp:
622         (WTF::deleteOwnedPtr):
623         (WTF):
624
625 2012-09-13  Kevin Funk  <kevin.funk@kdab.com>
626
627         Make compile with both OS(WINCE) and PLATFORM(QT) support
628         https://bugs.webkit.org/show_bug.cgi?id=95536
629
630         Reviewed by Simon Hausmann.
631
632         Fixes for Windows CE.
633
634         * WTF.pri:
635         Also include path for mt19937ar.c
636         * wtf/unicode/icu/CollatorICU.cpp:
637         Fix undeclared strdup() on CE7
638         * wtf/Platform.h:
639
640 2012-09-13  Byungseon Shin  <xingri@gmail.com>
641
642         Fix for WTF fails to compile in thumb mode when llint is enabled.
643         https://bugs.webkit.org/show_bug.cgi?id=96400
644
645         Reviewed by Filip Pizlo.
646
647         When using "+m" with Armv7 cross compiler assume offset range between +/- 4095
648         (the largest possible offset range).
649         However, ldrex/strex can only use offset range of 0~1020, so "+m" needed to be changed to "+Q".
650         Ref. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54480
651
652         * wtf/Atomics.h:
653         (WTF::weakCompareAndSwap):
654
655 2012-09-13  Kenneth Rohde Christiansen  <kenneth@webkit.org>
656
657         Evas_Object* is a ref'ed structure, so tread it as such
658         https://bugs.webkit.org/show_bug.cgi?id=96659
659
660         Reviewed by Adam Barth.
661
662         Remove OwnPtr support for Evas_Object* and add support for it
663         with RefPtr instead (the latter moved from WebCore).
664
665         * wtf/PlatformEfl.cmake:
666         * wtf/efl/OwnPtrEfl.cpp:
667         * wtf/efl/RefPtrEfl.cpp: Renamed from Source/WebCore/platform/efl/RefPtrEfl.cpp.
668         (WTF):
669         (WTF::refIfNotNull):
670         (WTF::derefIfNotNull):
671         * wtf/efl/RefPtrEfl.h: Renamed from Source/WebCore/platform/efl/RefPtrEfl.h.
672         (WTF):
673
674 2012-09-13  Michael Saboff  <msaboff@apple.com>
675
676         Added 8 bit path to WidthIterator::advance()
677         https://bugs.webkit.org/show_bug.cgi?id=96590
678
679         Reviewed by Geoffrey Garen.
680
681         Added new character constant for Hiragana Letter Small A.
682
683         * wtf/unicode/CharacterNames.h:
684         (Unicode):
685
686 2012-09-13  Ilya Tikhonovsky  <loislo@chromium.org>
687
688         Web Inspector: NMI: instrument KURL directly.
689         https://bugs.webkit.org/show_bug.cgi?id=96624
690
691         Reviewed by Yury Semikhatsky.
692
693         I replaced traits based instrumentation of KURL with reportMemoryUsage functions.
694         CString* were also instrumented.
695
696         Drive by fix: Instrumentation code in QualifiedName was moved to cpp.
697
698         * wtf/text/CString.h:
699         (CStringBuffer):
700         (WTF::CStringBuffer::reportMemoryUsage):
701         (CString):
702         (WTF::CString::reportMemoryUsage):
703
704 2012-09-12  Ilya Tikhonovsky  <loislo@chromium.org>
705
706         Web Inspector: NMI: migrate core instrumentation code to WTF namespace
707         https://bugs.webkit.org/show_bug.cgi?id=96511
708
709         Reviewed by Yury Semikhatsky.
710
711         After moving core NMI code to WTF namespace I removed forward declarations
712         of MemoryObjectInfo and MemoryInstrumentation from WebCore headers and add
713         forward declaration into wtf/Forward.h
714
715         * wtf/Forward.h:
716         (WTF):
717         * wtf/MemoryInstrumentation.h:
718
719 2012-09-12  Dan Bernstein  <mitz@apple.com>
720
721         Removed a reference to a file that doesn’t participate in any target.
722
723         * WTF.xcodeproj/project.pbxproj: Removed the reference to
724         CONTRIBUTORS.pthreads-win32.
725
726 2012-09-11  Michael Saboff  <msaboff@apple.com>
727
728         Element::classAttributeChanged should use characters8/16 to find first non-whitespace
729         https://bugs.webkit.org/show_bug.cgi?id=96446
730
731         Reviewed by Benjamin Poulain.
732
733         Added bit size related string accessors to AtomicString to support change.
734
735         * wtf/text/AtomicString.h:
736         (AtomicString):
737         (WTF::AtomicString::is8Bit):
738         (WTF::AtomicString::characters8):
739         (WTF::AtomicString::characters16):
740
741 2012-09-12  Michael Saboff  <msaboff@apple.com>
742
743         Build fixed for http://trac.webkit.org/changeset/128243
744
745         Unreviewed build fix.
746
747         Removed temporarily added function signature.
748
749         * icu/unicode/unistr.h:
750         (UnicodeString::extract):
751
752 2012-09-12  Michael Saboff  <msaboff@apple.com>
753
754         Build fixed for http://trac.webkit.org/changeset/128243
755
756         Unreviewed build fix.
757
758         Change UnicodeString::extract for gcc based on ICU fix described in
759         http://bugs.icu-project.org/trac/ticket/8197.
760
761         * icu/unicode/unistr.h:
762         (UnicodeString::extract):
763
764 2012-09-12  Ilya Tikhonovsky  <loislo@chromium.org>
765
766         Web Inspector: NMI move String* instrumentation to wtf.
767         https://bugs.webkit.org/show_bug.cgi?id=96405
768
769         Reviewed by Yury Semikhatsky.
770
771         This instrumentation is solving the problem with substrings and removes traits based code which is hard to upstream.
772
773         Tested by webkit_unit_tests.
774
775         * wtf/text/AtomicString.h:
776         (AtomicString):
777         (WTF::AtomicString::reportMemoryUsage):
778         * wtf/text/StringImpl.h:
779         (StringImpl):
780         (WTF::StringImpl::reportMemoryUsage):
781         * wtf/text/WTFString.h:
782         (String):
783         (WTF::String::reportMemoryUsage):
784
785 2012-09-12  Sheriff Bot  <webkit.review.bot@gmail.com>
786
787         Unreviewed, rolling out r128279.
788         http://trac.webkit.org/changeset/128279
789         https://bugs.webkit.org/show_bug.cgi?id=96487
790
791         "Snow Leopard compilation broken" (Requested by yurys on
792         #webkit).
793
794         * wtf/MemoryInstrumentation.h:
795         (GenericMemoryTypes):
796         (WebCore):
797         (WebCore::MemoryInstrumentation::addRootObject):
798         (WebCore::MemoryObjectInfo::reportObjectInfo):
799         (WebCore::MemoryClassInfo::MemoryClassInfo):
800         * wtf/text/AtomicString.h:
801         (AtomicString):
802         * wtf/text/StringImpl.h:
803         * wtf/text/WTFString.h:
804
805 2012-09-12  Yury Semikhatsky  <yurys@chromium.org>
806
807         Web Inspector: Persistent handle referenced from ScriptWrappable is double counted
808         https://bugs.webkit.org/show_bug.cgi?id=96483
809
810         Reviewed by Alexander Pavlov.
811
812         * wtf/MemoryInstrumentation.h:
813         (WebCore::MemoryClassInfo::addWeakPointer): this method is expected to be
814         used on fields that are pointers to objects which are parts of bigger memory
815         blocks (field of another object, element in an array, object allocated in a
816         memory arena etc.). We don't want to count such objects' memory separately
817         from their owners but in order to be able to validates the memory instrumentation
818         with clang plugin we need to make sure all fields in instrumented objects
819         are reported.
820         (MemoryClassInfo):
821
822 2012-09-12  Ilya Tikhonovsky  <loislo@chromium.org>
823
824         Web Inspector: NMI move String* instrumentation to wtf.
825         https://bugs.webkit.org/show_bug.cgi?id=96405
826
827         Reviewed by Yury Semikhatsky.
828
829         This instrumentation is solving the problem with substrings and removes traits based code which is hard to upstream.
830
831         Tested by webkit_unit_tests.
832
833         * wtf/MemoryInstrumentation.h:
834         (WebCore):
835         (WebCore::MemoryInstrumentation::addRootObject):
836         (WebCore::MemoryObjectInfo::reportObjectInfo):
837         (WebCore::MemoryClassInfo::MemoryClassInfo):
838         * wtf/text/AtomicString.h:
839         (AtomicString):
840         (WTF::AtomicString::reportMemoryUsage):
841         * wtf/text/StringImpl.h:
842         (StringImpl):
843         (WTF::StringImpl::reportMemoryUsage):
844         * wtf/text/WTFString.h:
845         (String):
846         (WTF::String::reportMemoryUsage):
847
848 2012-09-11  Michael Saboff  <msaboff@apple.com>
849
850         Build fixed for http://trac.webkit.org/changeset/128243
851
852         Unreviewed build fix.
853
854         Added missing include file needed by 96422 for C++ ICU APIs.
855
856         * icu/unicode/bytestream.h: Added.
857         * icu/unicode/rep.h: Added.
858         * icu/unicode/std_string.h: Added.
859         * icu/unicode/strenum.h: Added.
860         * icu/unicode/stringpiece.h: Added.
861         * icu/unicode/unistr.h: Added.
862         * icu/unicode/uobject.h: Added.
863
864 2012-09-11  Michael Saboff  <msaboff@apple.com>
865
866         Build fixed for http://trac.webkit.org/changeset/128243
867
868         Rubber stamped by Stephanie Lewis.
869
870         Added missing include file needed by 96422.
871
872         * icu/unicode/unorm2.h: Added.
873
874 2012-09-11  Michael Saboff  <msaboff@apple.com>
875
876         Build fixed for http://trac.webkit.org/changeset/128243
877
878         Rubber stamped by Stephanie Lewis.
879
880         Added missing include file needed by 96422.
881
882         * icu/unicode/ptypes.h: Added.
883
884 2012-09-11  Michael Saboff  <msaboff@apple.com>
885
886         Update ICU header files to more recent version
887         https://bugs.webkit.org/show_bug.cgi?id=96422
888
889         Reviewed by Geoff Garen.
890
891         Updated ICU header files to 4.6.1.  Modifications made as part of the merge are:
892         platform.h - Changed ifndef / define / endif for U_HAVE_UINT8_T, U_HAVE_UINT16_T, U_HAVE_UINT32_T,
893             U_HAVE_UINT64_T, U_IS_BIG_ENDIAN and U_ENABLE_TRACING to match the existing platform.h
894         putil.h (line 132) - Changes defined(U_WINDOWS) to defined(WIN32) || defined(OS2) to match existing putil.h
895         ustring.h (line 945) - Wrapped macro argument cs with { (const UChar *)cs } to match existing ustring.h
896         utypes.h (line 545) - Changed defined(U_WINDOWS) to defined(WIN32) to match existing utypes.h
897
898         * icu/unicode/localpointer.h: Added.
899         * icu/unicode/parseerr.h:
900         * icu/unicode/platform.h:
901         * icu/unicode/putil.h:
902         * icu/unicode/uchar.h:
903         * icu/unicode/ucnv.h:
904         * icu/unicode/ucnv_err.h:
905         * icu/unicode/ucol.h:
906         * icu/unicode/uconfig.h:
907         * icu/unicode/uenum.h:
908         * icu/unicode/uiter.h:
909         * icu/unicode/uloc.h:
910         * icu/unicode/umachine.h:
911         * icu/unicode/unorm.h:
912         * icu/unicode/urename.h:
913         * icu/unicode/uscript.h:
914         * icu/unicode/uset.h:
915         * icu/unicode/ustring.h:
916         * icu/unicode/utf.h:
917         * icu/unicode/utf16.h:
918         * icu/unicode/utf8.h:
919         * icu/unicode/utypes.h:
920         * icu/unicode/uvernum.h: Added.
921         * icu/unicode/uversion.h:
922
923 2012-09-11  Pratik Solanki  <psolanki@apple.com>
924
925         Add ObjcRuntimeExtras.h to the Xcode project file
926         https://bugs.webkit.org/show_bug.cgi?id=96419
927
928         Reviewed by Alexey Proskuryakov.
929
930         * WTF.xcodeproj/project.pbxproj:
931
932 2012-09-11  Adrienne Walker  <enne@google.com>
933
934         Clang doesn't optimize away undefined OwnPtr copy constructor
935         https://bugs.webkit.org/show_bug.cgi?id=74625
936
937         Reviewed by Anders Carlsson.
938
939         Original patch by Anders Carlsson, with a minor edit.
940
941         The publicly declared-but-not-defined copy constructor is a compiler
942         optimization-dependent landmine. Clang often fails to optimize the use
943         of this function out, leading to internal linkage errors for the missing
944         definition. gcc doesn't have this problem and optimizes that function
945         out, leading to code that inconsistently fails to link across platforms.
946
947         As a partial fix for this problem, on any compiler that supports C++11
948         move semantics, replace the bogus copy constructor with the move
949         constructors.  In the future, if all compilers support this, then the
950         copy constructor can be removed.
951
952         This still leaves other compilers that don't support move semantics
953         like Visual Studio vulnerable to linking inconsistencies.
954
955         * wtf/OwnPtr.h:
956         (OwnPtr):
957         (WTF):
958         (WTF::::OwnPtr):
959         (WTF::=):
960
961 2012-09-11  Raphael Kubo da Costa  <rakuco@webkit.org>
962
963         [EFL] Rewrite the EFL-related Find modules
964         https://bugs.webkit.org/show_bug.cgi?id=95237
965
966         Reviewed by Kenneth Rohde Christiansen.
967
968         * CMakeLists.txt: Stop setting the LINK_FLAGS property.
969         * PlatformEfl.cmake: Add libraries and include directories for
970         each Enlightenment Foundation Library used by the port.
971
972 2012-09-11  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
973
974         [Qt] Add a configure step to the Qt build system
975
976         This allows building the Qt port using just 'qmake WebKit.pro'. Using
977         the build-webkit script is still supported, and will add slightly more
978         logic to the build, such as detecting the need for clean or incremental
979         builds.
980
981         Internally, the build system now uses a new variable, WEBKIT_CONFIG, for
982         all things related to configuring the build, such as use/have/enable flags,
983         and these are translated to defines in default_post. Project files should
984         no longer check contains(DEFINES,...) to detect features, but use the new
985         enable?(), use?(), and have?() functions. The no_webkit1 and no_webkit2
986         options have been translated into WEBKIT_CONFIG options as well, and can
987         be checked using build?().
988
989         Reviewed by Simon Hausmann.
990
991         * WTF.pri:
992         * wtf/Platform.h:
993
994 2012-09-10  Ilya Tikhonovsky  <loislo@chromium.org>
995
996         Web Inspector: NMI: move MemoryInstrumentation.h to wtf
997         https://bugs.webkit.org/show_bug.cgi?id=96356
998
999         Reviewed by Yury Semikhatsky.
1000
1001         It is necessary step because it helps us to remove dependency between platform and WebCore.
1002
1003         * GNUmakefile.list.am:
1004         * WTF.gypi:
1005         * WTF.pro:
1006         * WTF.vcproj/WTF.vcproj:
1007         * WTF.xcodeproj/project.pbxproj:
1008         * wtf/MemoryInstrumentation.h: Renamed from Source/WebCore/dom/MemoryInstrumentation.h.
1009         (WebCore):
1010         (GenericMemoryTypes):
1011         (MemoryInstrumentationTraits):
1012         (MemoryInstrumentation):
1013         (WebCore::MemoryInstrumentation::~MemoryInstrumentation):
1014         (WebCore::MemoryInstrumentation::addRootObject):
1015         (InstrumentedPointerBase):
1016         (WebCore::MemoryInstrumentation::InstrumentedPointerBase::~InstrumentedPointerBase):
1017         (InstrumentedPointer):
1018         (WebCore::MemoryInstrumentation::InstrumentedPointer::InstrumentedPointer):
1019         (WebCore::MemoryInstrumentation::addObject):
1020         (WebCore::MemoryInstrumentation::addInstrumentedObject):
1021         (WebCore::MemoryInstrumentation::addRawBuffer):
1022         (WebCore::MemoryInstrumentation::OwningTraits::addInstrumentedObject):
1023         (WebCore::MemoryInstrumentation::OwningTraits::addObject):
1024         (WebCore::MemoryInstrumentationTraits::addInstrumentedObject):
1025         (WebCore::MemoryInstrumentationTraits::addObject):
1026         (MemoryObjectInfo):
1027         (WebCore::MemoryObjectInfo::MemoryObjectInfo):
1028         (WebCore::MemoryObjectInfo::objectType):
1029         (WebCore::MemoryObjectInfo::objectSize):
1030         (WebCore::MemoryObjectInfo::memoryInstrumentation):
1031         (WebCore::MemoryObjectInfo::reportObjectInfo):
1032         (MemoryClassInfo):
1033         (WebCore::MemoryClassInfo::MemoryClassInfo):
1034         (WebCore::MemoryClassInfo::addInstrumentedMember):
1035         (WebCore::MemoryClassInfo::addMember):
1036         (WebCore::MemoryClassInfo::addHashMap):
1037         (WebCore::MemoryClassInfo::addHashSet):
1038         (WebCore::MemoryClassInfo::addHashCountedSet):
1039         (WebCore::MemoryClassInfo::addInstrumentedHashSet):
1040         (WebCore::MemoryClassInfo::addInstrumentedVector):
1041         (WebCore::MemoryClassInfo::addInstrumentedVectorPtr):
1042         (WebCore::MemoryClassInfo::addInstrumentedMapEntries):
1043         (WebCore::MemoryClassInfo::addInstrumentedMapValues):
1044         (WebCore::MemoryClassInfo::addListHashSet):
1045         (WebCore::MemoryClassInfo::addVector):
1046         (WebCore::MemoryClassInfo::addVectorPtr):
1047         (WebCore::MemoryClassInfo::addRawBuffer):
1048         (WebCore::MemoryInstrumentation::addInstrumentedObjectImpl):
1049         (WebCore::MemoryInstrumentation::addObjectImpl):
1050         (WebCore::MemoryInstrumentation::addHashMap):
1051         (WebCore::MemoryInstrumentation::addHashSet):
1052         (WebCore::MemoryInstrumentation::addInstrumentedCollection):
1053         (WebCore::MemoryInstrumentation::addInstrumentedMapEntries):
1054         (WebCore::MemoryInstrumentation::addInstrumentedMapValues):
1055         (WebCore::MemoryInstrumentation::addListHashSet):
1056         (WebCore::MemoryInstrumentation::addVector):
1057         (WebCore::MemoryInstrumentation::calculateContainerSize):
1058         (WebCore::::process):
1059
1060 2012-09-09  Mark Lam  <mark.lam@apple.com>
1061
1062         Fixed ASSERT() and ASSERT_AT() macros so that they can be used in
1063         comma expressions. Also, added UNUSED_LABEL().
1064         https://bugs.webkit.org/show_bug.cgi?id=96127.
1065
1066         Reviewed by Geoffrey Garen.
1067
1068         * wtf/Assertions.h:
1069         * wtf/UnusedParam.h: Added UNUSED_LABEL(). Removed an obsolete comment.
1070
1071 2012-09-09  Patrick Gansterer  <paroga@webkit.org>
1072
1073         Add StringBuilder::appendNumber() and use it
1074         https://bugs.webkit.org/show_bug.cgi?id=96030
1075
1076         Reviewed by Eric Seidel.
1077
1078         Also fix a bunch of append() vs. appendLiteral() issues in the surrounding code.
1079
1080         * wtf/DateMath.cpp:
1081         (WTF::makeRFC2822DateString):
1082         * wtf/text/StringBuilder.cpp:
1083         (WTF::StringBuilder::appendNumber):
1084         * wtf/text/StringBuilder.h:
1085         (StringBuilder):
1086
1087 2012-09-09  Patrick Gansterer  <paroga@webkit.org>
1088
1089         Make the String initialization on the function side of String::number()
1090         https://bugs.webkit.org/show_bug.cgi?id=95940
1091
1092         Reviewed by Benjamin Poulain.
1093
1094         Un-Inline String::number() to make the String initialization done on the function side
1095         instead of being on the caller side.
1096
1097         * GNUmakefile.list.am:
1098         * WTF.gypi:
1099         * WTF.pro:
1100         * WTF.vcproj/WTF.vcproj:
1101         * WTF.xcodeproj/project.pbxproj:
1102         * wtf/CMakeLists.txt:
1103         * wtf/text/IntegerToStringConversion.cpp: Removed.
1104         * wtf/text/IntegerToStringConversion.h:
1105         (WTF::numberToStringImpl):
1106         (WTF::numberToStringSigned):
1107         (WTF::numberToStringUnsigned):
1108         * wtf/text/WTFString.cpp:
1109         (WTF::String::number):
1110         * wtf/text/WTFString.h:
1111
1112 2012-09-08  Andreas Kling  <kling@webkit.org>
1113
1114         Give AtomicString SimpleClassVectorTraits.
1115         <http://webkit.org/b/96186>
1116
1117         Reviewed by Karl Anders Carlsson.
1118
1119         AtomicString can be initialized/moved/compared with memset/memcpy/memcmp,
1120         so add a VectorTraits<AtomicString> to make Vector<AtomicString> a little
1121         more efficient.
1122
1123         * wtf/VectorTraits.h:
1124
1125 2012-09-07  Sheriff Bot  <webkit.review.bot@gmail.com>
1126
1127         Unreviewed, rolling out r127938.
1128         http://trac.webkit.org/changeset/127938
1129         https://bugs.webkit.org/show_bug.cgi?id=96166
1130
1131         It broke the build (Requested by smfr on #webkit).
1132
1133         * wtf/Assertions.h:
1134
1135 2012-09-07  Mark Lam  <mark.lam@apple.com>
1136
1137         Fixed ASSERT() and ASSERT_AT() macros so that they can be used in
1138         comma expressions.
1139         https://bugs.webkit.org/show_bug.cgi?id=96127.
1140
1141         Reviewed by Filip Pizlo.
1142
1143         * wtf/Assertions.h:
1144         (wtfAssert):
1145
1146 2012-09-07  Michael Saboff  <msaboff@apple.com>
1147
1148         StringImpl::find(StringImpl*) doesn't handle cases where search and match strings are different bitness
1149         https://bugs.webkit.org/show_bug.cgi?id=96125
1150
1151         Reviewed by Benjamin Poulain.
1152
1153         Changed findInner and reverseFindInner to be templated on both search and match character types.
1154         Changed both find's and reverseFind to use all four bitness combinations of findInner and
1155         reverseFindInner.
1156
1157         * wtf/text/StringImpl.cpp:
1158         (WTF::findInner):
1159         (WTF::StringImpl::find):
1160         (WTF::reverseFindInner):
1161         (WTF::StringImpl::reverseFind):
1162
1163 2012-09-07  Michael Saboff  <msaboff@apple.com>
1164
1165         equalIgnoringCase of two StringImpls doesn't handle 8 bit strings
1166         https://bugs.webkit.org/show_bug.cgi?id=96028
1167
1168         Reviewed by Benjamin Poulain.
1169
1170         Added 8 bit checks and paths to CaseFoldingHash::equal.  Also cleaned up StringHash::equal(), removing
1171         obvious and in one case wrong comments.  Moved equalIgnoringCase(UChar*, UChar*) from StringImpl.cpp
1172         to StringImpl.h.
1173
1174         * wtf/text/StringHash.h:
1175         (WTF::StringHash::equal):
1176         (WTF::CaseFoldingHash::equal):
1177         * wtf/text/StringImpl.cpp:
1178         * wtf/text/StringImpl.h:
1179         (WTF::equalIgnoringCase):
1180
1181 2012-09-07  Patrick Gansterer  <paroga@webkit.org>
1182
1183         [WIN] Deprecate String += operator
1184         https://bugs.webkit.org/show_bug.cgi?id=96083
1185
1186         Reviewed by Adam Barth.
1187
1188         * wtf/Platform.h:
1189
1190 2012-09-06  Michael Saboff  <msaboff@apple.com>
1191
1192         StringBuilder::toAtomicString() can create an 16 bit string with 8 bit contents
1193         https://bugs.webkit.org/show_bug.cgi?id=96029
1194
1195         Reviewed by Benjamin Poulain.
1196
1197         Added 8 bit path when creating an AtomicString from a partial 8 bit buffer.
1198
1199         * wtf/text/StringBuilder.h:
1200         (WTF::StringBuilder::toAtomicString):
1201
1202 2012-09-06  Michael Saboff  <msaboff@apple.com>
1203
1204         16 bit JSRopeString up converts an 8 bit fibers to 16 bits during resolution
1205         https://bugs.webkit.org/show_bug.cgi?id=95810
1206
1207         Reviewed by Benjamin Poulain.
1208
1209         New copy routine that takes an 8 bit source and a 16 bit destination.  Used when copying
1210         the contents of an 8 bit fiber to the 16 bit buffer when resolving a 16 bit rope.
1211
1212         * wtf/text/StringImpl.h:
1213         (WTF::StringImpl::copyChars):
1214         (StringImpl):
1215
1216 2012-09-06  Michael Saboff  <msaboff@apple.com>
1217
1218         Unreviewed fix to r127799.
1219         https://bugs.webkit.org/show_bug.cgi?id=95807
1220
1221         Unreviewed fix.
1222
1223         Removed extraneous "static".  This code is hidden behind STRING_STATS define and 
1224         therefore is not enabled by default.
1225
1226         * wtf/text/StringImpl.cpp:
1227
1228 2012-09-06  Lauro Neto  <lauro.neto@openbossa.org>
1229
1230         [Qt] Deprecate String += operator
1231         https://bugs.webkit.org/show_bug.cgi?id=95895
1232
1233         Reviewed by Benjamin Poulain.
1234
1235         Remove Qt from WTF_DEPRECATED_STRING_OPERATORS guard.
1236
1237         * wtf/Platform.h:
1238
1239 2012-09-06  Michael Saboff  <msaboff@apple.com>
1240
1241         ENH: Add Logging to StringImpl to track String Types
1242         https://bugs.webkit.org/show_bug.cgi?id=95807
1243
1244         Reviewed by Benjamin Poulain.
1245
1246         Added StringsStats class that keeps track of the number of strings, number of 8 and 16 bit
1247         strings as well as the number of 8 bit strings up converted to 16 bits. The number of characrters
1248         for each type is also accumulated. These statistics are output via DataLog every 5000
1249         calls to StringImpl destructor. The 5000 can be adjusted via s_printStringStatsFrequency.
1250         This StringStats code is disabled by default and enabled by defining STRING_STATS in
1251         wtf/text/StringImpl.h.
1252
1253         * wtf/text/StringImpl.cpp:
1254         (WTF::StringStats::removeString):
1255         (WTF::StringStats::printStats):
1256         (WTF::StringImpl::~StringImpl):
1257         (WTF::StringImpl::getData16SlowCase):
1258         * wtf/text/StringImpl.h:
1259         (WTF::StringStats::add8BitString):
1260         (StringStats):
1261         (WTF::StringStats::add16BitString):
1262         (WTF::StringStats::addUpconvertedString):
1263         (WTF::StringImpl::StringImpl):
1264         (StringImpl):
1265         (WTF::StringImpl::isSubString):
1266         (WTF::StringImpl::stringStats):
1267
1268 2012-09-06  Patrick Gansterer  <paroga@webkit.org>
1269
1270         Fix export macros in IntegerToStringConversion.h
1271         https://bugs.webkit.org/show_bug.cgi?id=95900
1272
1273         Reviewed by Benjamin Poulain.
1274
1275         The WTF_EXPORT_STRING_API must be used only for symbols which are compiled
1276         on windows in "non-WTF" binaries too. Since this isn't valid for the
1277         IntegerToStringConversion function replace it with WTF_EXPORT_PRIVATE.
1278
1279         * wtf/text/IntegerToStringConversion.h:
1280
1281 2012-09-06  Simon Hausmann  <simon.hausmann@nokia.com>
1282
1283         [Qt] Various small Windows / MSVC build fixes
1284         https://bugs.webkit.org/show_bug.cgi?id=95934
1285
1286         Reviewed by Kenneth Rohde Christiansen.
1287
1288         For the Qt build on Windows, do not enable WTF_USE_UNIX_DOMAIN_SOCKETS for
1289         WebKit2 IPC.
1290
1291         * wtf/Platform.h:
1292
1293 2012-09-06  Adam Barth  <abarth@chromium.org>
1294
1295         Remove WTF::String::operator+=
1296         https://bugs.webkit.org/show_bug.cgi?id=95797
1297
1298         Reviewed by Sam Weinig.
1299
1300         This patch encloses WTF::String::operator+= in an ifdef so that we can
1301         gradually remove it from the various port-specific files. The ifdef
1302         lets us whitelist use of operator+= in individual files during the
1303         transition.
1304
1305         * wtf/Platform.h
1306         * wtf/text/WTFString.h:
1307
1308 2012-09-05  Gabor Rapcsanyi  <rgabor@webkit.org>
1309
1310         DFG JIT doesn't work properly on ARM hardfp
1311         https://bugs.webkit.org/show_bug.cgi?id=95684
1312
1313         Reviewed by Filip Pizlo.
1314
1315         Add hardfp support to DFG JIT. The patch is created with the
1316         help of Zoltan Herczeg.
1317
1318         * wtf/Platform.h:
1319
1320 2012-09-04  Zoltan Horvath  <zoltan@webkit.org>
1321
1322         Extend the coverage of the Custom Allocation Framework in WTF and in JavaScriptCore
1323         https://bugs.webkit.org/show_bug.cgi?id=95737
1324
1325         Reviewed by Eric Seidel.
1326
1327         Add WTF_MAKE_FAST_ALLOCATED macro to the following class declarations because these are instantiated by operator new.
1328
1329         * wtf/CryptographicallyRandomNumber.cpp: CryptographicallyRandomNumber is instantiated at wtf/CryptographicallyRandomNumber.cpp:162.
1330         * wtf/MediaTime.h: MediaTime is instantiated at wtf/MediaTime.cpp:288.
1331         * wtf/MetaAllocator.h:
1332         (MetaAllocatorTracker): MetaAllocatorTracker is instantiated at JavaScriptCore/tools/CodeProfiling.cpp:120.
1333         * wtf/ThreadingPthreads.cpp:
1334         (PthreadState): PthreadState is instantiated at wtf/ThreadingPthreads.cpp:165.
1335         * wtf/text/AtomicString.cpp:
1336         (AtomicStringTable): AtomicStringTable is instantiated at wtf/text/AtomicString.cpp:43.
1337
1338 2012-09-01  Mark Lam  <mark.lam@apple.com>
1339
1340         LLInt C loop backend.
1341         https://bugs.webkit.org/show_bug.cgi?id=91052.
1342
1343         Reviewed by Filip Pizlo.
1344
1345         Added configs for the llint C loop backend.
1346
1347         * wtf/Platform.h:
1348
1349 2012-08-31  Pratik Solanki  <psolanki@apple.com>
1350
1351         objc_msgSend and IMP should be cast appropriately before using
1352         https://bugs.webkit.org/show_bug.cgi?id=95242
1353
1354         Reviewed by Benjamin Poulain.
1355
1356         Fix for older compilers. Pass id as the return type to the template
1357         instead of relying on default type.
1358
1359         * wtf/Functional.h:
1360         (WTF::R):
1361         * wtf/ObjcRuntimeExtras.h:
1362
1363 2012-08-31  Michael Saboff  <msaboff@apple.com>
1364
1365         CSS Parser should directly parse 8 bit source strings
1366         https://bugs.webkit.org/show_bug.cgi?id=95207
1367
1368         Reviewed by Geoffrey Garen.
1369
1370         * wtf/text/StringImpl.h:
1371         (WTF::equalIgnoringCase): Added (const char*, const LChar*, unsigned) flavor to support
1372         8 bit CSS parser work.
1373
1374 2012-08-30  Benjamin Poulain  <bpoulain@apple.com>
1375
1376         AtomicString(ASCIILiteral) should not compile
1377         https://bugs.webkit.org/show_bug.cgi?id=95413
1378
1379         Reviewed by Adam Barth.
1380
1381         * wtf/text/AtomicString.h:
1382         (AtomicString): Declare the constructor from ASCIILiteral private to ensure it is
1383         not used by accident.
1384
1385 2012-08-30  Benjamin Poulain  <bpoulain@apple.com>
1386
1387         Ambiguous operator[]  after r127191 on some compiler
1388         https://bugs.webkit.org/show_bug.cgi?id=95509
1389
1390         Reviewed by Simon Fraser.
1391
1392         * wtf/text/WTFString.h:
1393         (WTF::String::characterAt): At this as a synonym to operator[] to attempt a build fix.
1394
1395 2012-08-30  Mark Lam  <mark.lam@apple.com>
1396
1397         Render unto #ifdef's that which belong to them.
1398         https://bugs.webkit.org/show_bug.cgi?id=95482.
1399
1400         Reviewed by Filip Pizlo.
1401
1402         * wtf/Platform.h: Added ENABLE(COMPUTED_GOTO_OPCODES).
1403
1404 2012-08-30  Pratik Solanki  <psolanki@apple.com>
1405
1406         objc_msgSend and IMP should be cast appropriately before using
1407         https://bugs.webkit.org/show_bug.cgi?id=95242
1408
1409         Reviewed by Benjamin Poulain.
1410
1411         Add new templates wtfObjcMsgSend and wtfCallIMP that do the appropriate
1412         casts to correctly typed function pointers before calling objc_msgSend
1413         and IMP methods directly.
1414
1415         * wtf/Functional.h:
1416         (WTF::R): Use wtfObjcMsgSend.
1417         * wtf/ObjcRuntimeExtras.h: Added.
1418         (wtfObjcMsgSend):
1419         (wtfCallIMP):
1420
1421 2012-08-30  Benjamin Poulain  <bpoulain@apple.com>
1422
1423         Replace JSC::UString by WTF::String
1424         https://bugs.webkit.org/show_bug.cgi?id=95271
1425
1426         Reviewed by Geoffrey Garen.
1427
1428         * wtf/Platform.h: Useless edit to force a full build. This is needed for some bots for some reason.
1429         * wtf/text/WTFString.h: Export a symbol that was exported on UString and needed in WebCore.
1430
1431         Add String::getCharactersWithUpconvert<>(), which is similar to String::getCharacters<>() but with the same
1432         behaviors as UString::getCharacters<>().
1433
1434         String::getCharactersWithUpconvert<>() is useful when manipulating multiple strings, it allow writting code
1435         using 16bits characters if any of the input String is not 8bit.
1436
1437 2012-08-30  Yong Li  <yoli@rim.com>
1438
1439         Vector::shrinkToFit should use realloc when suitable.
1440         https://bugs.webkit.org/show_bug.cgi?id=94810
1441
1442         Reviewed by Benjamin Poulain.
1443
1444         Only tested on BlackBerry. So it is wrapped with PLATFORM(BLACKBERRY) in the mean time.
1445         Use realloc to shrink buffer when inline buffer isn't involved and and canMoveWithMemcpy is true.
1446
1447         When running the test code attached to the bug, it gives 30-45% performance boost for the large blocks
1448         (Every test cycle includes an extra pair of malloc/free, so the boost on shrinkToFit() is even bigger)
1449         Performance impact on small blocks is not noticeable. (Tested on BlackBerry)
1450
1451         * wtf/Vector.h:
1452         (WTF::VectorBufferBase::shouldReallocateBuffer):
1453         (VectorBufferBase):
1454         (WTF::VectorBufferBase::reallocateBuffer):
1455         (VectorBuffer):
1456         (WTF::VectorBuffer::shouldReallocateBuffer):
1457         (WTF::VectorBuffer::reallocateBuffer):
1458         (WTF::VectorBuffer::inlineBuffer):
1459         (WTF::::shrinkCapacity):
1460
1461 2012-08-30  Patrick Gansterer  <paroga@webkit.org>
1462
1463         Build fix for COMPILER(MSVC) && !CPU(X86) after r127001.
1464
1465         * wtf/MathExtras.h:
1466         (lrint): Added additional parentheses to silence compiler warning.
1467
1468 2012-08-29  Benjamin Poulain  <bpoulain@apple.com>
1469
1470         REGRESSION(r126780): Crash using StringImpl::is8Bit before checking if there is an impl
1471         https://bugs.webkit.org/show_bug.cgi?id=95380
1472
1473         Reviewed by Michael Saboff.
1474
1475         Blindly copying code from UString in r126780 was stupid. I just brought over a bug.
1476         This patch adds the zero length branch back so that null strings are handled correctly.
1477
1478         * wtf/text/WTFString.cpp:
1479         (WTF::String::ascii): Return a empty CString if the String is null or empty.
1480
1481 2012-08-29  Dominik Röttsches  <dominik.rottsches@intel.com>
1482
1483         The 2d.imageData.object.round canvas test is failing
1484         https://bugs.webkit.org/show_bug.cgi?id=40272
1485
1486         Reviewed by Benjamin Poulain.
1487
1488         Updating previous patch to address Benjamin's comments.
1489         #ifdef in Uint8ClampedArray removed, fallback implementation for MSVC on non-X86 added.
1490
1491         * wtf/MathExtras.h:
1492         (lrint): Fallback implementation for non-X86 & MSVC case.
1493         * wtf/Uint8ClampedArray.h: Removed #ifdef.
1494
1495 2012-08-28  Sheriff Bot  <webkit.review.bot@gmail.com>
1496
1497         Unreviewed, rolling out r126914.
1498         http://trac.webkit.org/changeset/126914
1499         https://bugs.webkit.org/show_bug.cgi?id=95239
1500
1501         it breaks everything and fixes nothing (Requested by pizlo on
1502         #webkit).
1503
1504         * wtf/HashCountedSet.h:
1505         (WTF::::add):
1506         (WTF::::remove):
1507         (WTF::copyToVector):
1508         * wtf/HashIterators.h:
1509         (WTF::HashTableConstKeysIterator::get):
1510         (WTF::HashTableConstValuesIterator::get):
1511         (WTF::HashTableKeysIterator::get):
1512         (WTF::HashTableValuesIterator::get):
1513         * wtf/HashMap.h:
1514         (WTF::KeyValuePairKeyExtractor::extract):
1515         (WTF::HashMapValueTraits::isEmptyValue):
1516         (WTF::HashMapTranslator::translate):
1517         (WTF::HashMapTranslatorAdapter::translate):
1518         (WTF::::set):
1519         (WTF::::get):
1520         (WTF::::take):
1521         (WTF::operator==):
1522         (WTF):
1523         (WTF::deleteAllPairSeconds):
1524         (WTF::deleteAllValues):
1525         (WTF::deleteAllPairFirsts):
1526         (WTF::deleteAllKeys):
1527         * wtf/HashTable.h:
1528         (WTF::hashTableSwap):
1529         (WTF::::checkTableConsistencyExceptSize):
1530         * wtf/HashTraits.h:
1531         (WTF::KeyValuePair::KeyValuePair):
1532         (KeyValuePair):
1533         (WTF::KeyValuePairHashTraits::constructDeletedValue):
1534         (WTF::KeyValuePairHashTraits::isDeletedValue):
1535         * wtf/MetaAllocator.cpp:
1536         (WTF::MetaAllocator::addFreeSpace):
1537         (WTF::MetaAllocator::incrementPageOccupancy):
1538         (WTF::MetaAllocator::decrementPageOccupancy):
1539         * wtf/RefCountedLeakCounter.cpp:
1540         (WTF::RefCountedLeakCounter::~RefCountedLeakCounter):
1541         * wtf/RefPtrHashMap.h:
1542         (WTF::::set):
1543         (WTF::::get):
1544         (WTF::::inlineGet):
1545         (WTF::::take):
1546         * wtf/Spectrum.h:
1547         (WTF::Spectrum::add):
1548         (WTF::Spectrum::get):
1549         (WTF::Spectrum::buildList):
1550         * wtf/ThreadingPthreads.cpp:
1551         (WTF::identifierByPthreadHandle):
1552
1553 2012-08-28  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1554
1555         Rename first/second to key/value in HashMap iterators
1556         https://bugs.webkit.org/show_bug.cgi?id=82784
1557
1558         Reviewed by Eric Seidel.
1559
1560         * wtf/HashCountedSet.h:
1561         (WTF::::add):
1562         (WTF::::remove):
1563         (WTF::copyToVector):
1564         * wtf/HashIterators.h:
1565         (WTF::HashTableConstKeysIterator::get):
1566         (WTF::HashTableConstValuesIterator::get):
1567         (WTF::HashTableKeysIterator::get):
1568         (WTF::HashTableValuesIterator::get):
1569         * wtf/HashMap.h:
1570         (WTF::KeyValuePairKeyExtractor::extract):
1571         (WTF::HashMapValueTraits::isEmptyValue):
1572         (WTF::HashMapTranslator::translate):
1573         (WTF::HashMapTranslatorAdapter::translate):
1574         (WTF::::set):
1575         (WTF::::get):
1576         (WTF::::take):
1577         (WTF::operator==):
1578         (WTF::deleteAllValues):
1579         (WTF::deleteAllKeys):
1580         Remove deleteAllPairFirsts/Seconds.
1581
1582         * wtf/HashTable.h:
1583         (WTF::hashTableSwap):
1584         (WTF::::checkTableConsistencyExceptSize):
1585         * wtf/HashTraits.h:
1586         (WTF::KeyValuePair::KeyValuePair):
1587         (KeyValuePair):
1588         (WTF::KeyValuePairHashTraits::constructDeletedValue):
1589         (WTF::KeyValuePairHashTraits::isDeletedValue):
1590         * wtf/MetaAllocator.cpp:
1591         (WTF::MetaAllocator::addFreeSpace):
1592         (WTF::MetaAllocator::incrementPageOccupancy):
1593         (WTF::MetaAllocator::decrementPageOccupancy):
1594         * wtf/RefCountedLeakCounter.cpp:
1595         (WTF::RefCountedLeakCounter::~RefCountedLeakCounter):
1596         * wtf/RefPtrHashMap.h:
1597         (WTF::::set):
1598         (WTF::::get):
1599         (WTF::::inlineGet):
1600         (WTF::::take):
1601         * wtf/Spectrum.h:
1602         (WTF::Spectrum::add):
1603         (WTF::Spectrum::get):
1604         (WTF::Spectrum::buildList):
1605         * wtf/ThreadingPthreads.cpp:
1606         (WTF::identifierByPthreadHandle):
1607
1608 2012-08-27  Sheriff Bot  <webkit.review.bot@gmail.com>
1609
1610         Unreviewed, rolling out r126836.
1611         http://trac.webkit.org/changeset/126836
1612         https://bugs.webkit.org/show_bug.cgi?id=95163
1613
1614         Broke all Apple ports, EFL, and Qt. (Requested by tkent on
1615         #webkit).
1616
1617         * wtf/HashCountedSet.h:
1618         (WTF::::add):
1619         (WTF::::remove):
1620         (WTF::copyToVector):
1621         * wtf/HashIterators.h:
1622         (WTF::HashTableConstKeysIterator::get):
1623         (WTF::HashTableConstValuesIterator::get):
1624         (WTF::HashTableValuesIterator::get):
1625         * wtf/HashMap.h:
1626         (WTF::KeyValuePairKeyExtractor::extract):
1627         (WTF::HashMapValueTraits::isEmptyValue):
1628         (WTF::HashMapTranslator::translate):
1629         (WTF::HashMapTranslatorAdapter::translate):
1630         (WTF::::set):
1631         (WTF::::get):
1632         (WTF::::take):
1633         (WTF::operator==):
1634         (WTF):
1635         (WTF::deleteAllPairSeconds):
1636         (WTF::deleteAllValues):
1637         (WTF::deleteAllPairFirsts):
1638         (WTF::deleteAllKeys):
1639         * wtf/HashTable.h:
1640         (WTF::hashTableSwap):
1641         (WTF::::checkTableConsistencyExceptSize):
1642         * wtf/HashTraits.h:
1643         (WTF::KeyValuePair::KeyValuePair):
1644         (KeyValuePair):
1645         (WTF::KeyValuePairHashTraits::constructDeletedValue):
1646         (WTF::KeyValuePairHashTraits::isDeletedValue):
1647         * wtf/MetaAllocator.cpp:
1648         (WTF::MetaAllocator::addFreeSpace):
1649         (WTF::MetaAllocator::incrementPageOccupancy):
1650         (WTF::MetaAllocator::decrementPageOccupancy):
1651         * wtf/RefCountedLeakCounter.cpp:
1652         (WTF::RefCountedLeakCounter::~RefCountedLeakCounter):
1653         * wtf/RefPtrHashMap.h:
1654         (WTF::::set):
1655         (WTF::::get):
1656         (WTF::::inlineGet):
1657         (WTF::::take):
1658         * wtf/Spectrum.h:
1659         (WTF::Spectrum::add):
1660         (WTF::Spectrum::get):
1661         (WTF::Spectrum::buildList):
1662         * wtf/ThreadingPthreads.cpp:
1663         (WTF::identifierByPthreadHandle):
1664
1665 2012-08-27  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1666
1667         Rename first/second to key/value in HashMap iterators
1668         https://bugs.webkit.org/show_bug.cgi?id=82784
1669
1670         Reviewed by Eric Seidel.
1671
1672         * wtf/HashCountedSet.h:
1673         (WTF::::add):
1674         (WTF::::remove):
1675         (WTF::copyToVector):
1676         * wtf/HashIterators.h:
1677         (WTF::HashTableConstKeysIterator::get):
1678         (WTF::HashTableConstValuesIterator::get):
1679         (WTF::HashTableValuesIterator::get):
1680         * wtf/HashMap.h:
1681         (WTF::KeyValuePairKeyExtractor::extract):
1682         (WTF::HashMapValueTraits::isEmptyValue):
1683         (WTF::HashMapTranslator::translate):
1684         (WTF::HashMapTranslatorAdapter::translate):
1685         (WTF::::set):
1686         (WTF::::get):
1687         (WTF::::take):
1688         (WTF::operator==):
1689         (WTF::deleteAllValues):
1690         (WTF::deleteAllKeys):
1691         Remove deleteAllPairFirsts/Seconds.
1692
1693         * wtf/HashTable.h:
1694         (WTF::hashTableSwap):
1695         (WTF::::checkTableConsistencyExceptSize):
1696         * wtf/HashTraits.h:
1697         (WTF::KeyValuePair::KeyValuePair):
1698         (KeyValuePair):
1699         (WTF::KeyValuePairHashTraits::constructDeletedValue):
1700         (WTF::KeyValuePairHashTraits::isDeletedValue):
1701         * wtf/MetaAllocator.cpp:
1702         (WTF::MetaAllocator::addFreeSpace):
1703         (WTF::MetaAllocator::incrementPageOccupancy):
1704         (WTF::MetaAllocator::decrementPageOccupancy):
1705         * wtf/RefCountedLeakCounter.cpp:
1706         (WTF::RefCountedLeakCounter::~RefCountedLeakCounter):
1707         * wtf/RefPtrHashMap.h:
1708         (WTF::::set):
1709         (WTF::::get):
1710         (WTF::::inlineGet):
1711         (WTF::::take):
1712         * wtf/Spectrum.h:
1713         (WTF::Spectrum::add):
1714         (WTF::Spectrum::get):
1715         (WTF::Spectrum::buildList):
1716         * wtf/ThreadingPthreads.cpp:
1717         (WTF::identifierByPthreadHandle):
1718
1719 2012-08-27  Benjamin Poulain  <benjamin@webkit.org>
1720
1721         Add ECMAScript Number to String conversion to WTF::String
1722         https://bugs.webkit.org/show_bug.cgi?id=95016
1723
1724         Reviewed by Geoffrey Garen.
1725
1726         * wtf/text/WTFString.cpp:
1727         (WTF::String::numberToStringECMAScript):
1728         * wtf/text/WTFString.h:
1729         Add the implementation of numberToStringECMAScript(double) from UString to String.
1730         This will make it easier to replace UString in the future.
1731
1732 2012-08-27  Benjamin Poulain  <benjamin@webkit.org>
1733
1734         Even up WTF::String to CString functions
1735         https://bugs.webkit.org/show_bug.cgi?id=95008
1736
1737         Reviewed by Sam Weinig.
1738
1739         Apply advantages from UString to WTF::String.
1740
1741         * wtf/text/WTFString.cpp:
1742         (WTF::String::ascii): There is no need to special case the null length, both
1743         following branches use CString::newUninitialized(), which create empty string
1744         for null length.
1745         (WTF::String::latin1): Use characters16() instead of characters() to avoid
1746         testing is8Bit() a second time.
1747
1748 2012-08-24  Benjamin Poulain  <benjamin@webkit.org>
1749
1750         Touch Platform.h to solve a build dependency issue
1751
1752         Unreviewed.
1753
1754         * wtf/Platform.h:
1755
1756 2012-08-24  Benjamin Poulain  <bpoulain@apple.com>
1757
1758         Unify Number to StringImpl conversion
1759         https://bugs.webkit.org/show_bug.cgi?id=94879
1760
1761         Reviewed by Geoffrey Garen.
1762
1763         Previously, UString::number() and String::number() used different implementations.
1764
1765         WTF::String::number() was simply forwarding to String::format().
1766         UString::number() had an optimized version of the conversion.
1767
1768         This patch replace both implementation by a new version, faster than the two previous versions.
1769
1770         The new functions numberToStringImpl improvements are:
1771         -about 3 times faster than String::number().
1772         -14% faster than UString::number() on signed numbers.
1773         -9% faster than UString::number() on unsigned numbers.
1774
1775         * GNUmakefile.list.am:
1776         * WTF.gypi:
1777         * WTF.pro:
1778         * WTF.vcproj/WTF.vcproj:
1779         * WTF.xcodeproj/project.pbxproj:
1780         * wtf/CMakeLists.txt:
1781         * wtf/text/IntegerToStringConversion.cpp: Added.
1782         (WTF::numberToStringImplSigned):
1783         (WTF::numberToStringImpl):
1784         (WTF::numberToStringImplUnsigned):
1785         * wtf/text/IntegerToStringConversion.h: Added.
1786         * wtf/text/WTFString.cpp:
1787         (WTF::String::format):
1788         * wtf/text/WTFString.h:
1789         (WTF::String::number):
1790
1791 2012-08-24  Andras Becsi  <andras.becsi@nokia.com>
1792
1793         [Qt] Be more explicit about the ICU dependency in the error message
1794
1795         Rubber-stamped by Simon Hausmann.
1796
1797         When building QtWebKit with a Qt5 which was not configured with libICU support
1798         the error message is somewhat ambiguous about the indirect dependency.
1799
1800         * WTF.pri:
1801
1802 2012-08-23  Julien Chaffraix  <jchaffraix@webkit.org>
1803
1804         [Chromium] Enable AtomicString && CString && WTFString && StringImpl unit tests
1805         https://bugs.webkit.org/show_bug.cgi?id=94871
1806
1807         Reviewed by Benjamin Poulain.
1808
1809         * wtf/PassRefPtr.h:
1810         We need to include Assertions.h due to the COMPILE_ASSERT added in r89283.
1811         This matches other files in WTF though I am not sure why Chromium is the only
1812         platform complaining about that.
1813
1814 2012-08-23  Mark Rowe  <mrowe@apple.com>
1815
1816         Build fix for old, old versions of Clang.
1817
1818         * wtf/FastMalloc.cpp:
1819         (WTF): Rejigger things so that they parse correctly if __has_warning isn't defined.
1820
1821 2012-08-23  Emil A Eklund  <eae@chromium.org>
1822
1823         Add saturation arithmetic support to FractionalLayoutUnit
1824         https://bugs.webkit.org/show_bug.cgi?id=94364
1825
1826         Reviewed by Benjamin Poulain.
1827
1828         Add support functions for saturated addition and subtraction.
1829
1830         Test: TestWebKitAPI/Tests/WTF/SaturatedArithmeticOperations.cpp
1831
1832         * GNUmakefile.list.am:
1833         * WTF.gypi:
1834         * WTF.pro:
1835         * WTF.vcproj/WTF.vcproj:
1836         * WTF.xcodeproj/project.pbxproj:
1837         * WTF/wtf/CMakeLists.txt:
1838         Add SaturatedArithmetic.h to build files.
1839
1840         * wtf/SaturatedArithmetic.h: Added.
1841         (saturatedAddition):
1842         (saturatedSubtraction):
1843         Support functions for saturated addition/subtraction. Compares the signed
1844         bit of the values instead of using range checks to reduce branching.
1845
1846         * wtf/Platform.h:
1847         Add ENABLE_SATURATED_LAYOUT_ARITHMETIC flag.
1848
1849 2012-08-23  Mark Rowe  <mrowe@apple.com>
1850
1851         Roll back in the part of r126475 that I had rolled out.
1852
1853         * wtf/FastMalloc.cpp:
1854         (WTF): Disable the -Wunused-private-field warning around the declaration of
1855         TCMalloc_Central_FreeListPadded since the padding is intentionally unused.
1856         Only disable the warning if we detect it is enabled, since the warning may not
1857         be supported by the version of Clang that is being used.
1858
1859 2012-08-23  Mark Rowe  <mrowe@apple.com>
1860
1861         Roll out part of r126475 that breaks the build with older versions of Clang.
1862
1863         * wtf/FastMalloc.cpp:
1864
1865 2012-08-23  Mark Rowe  <mrowe@apple.com>
1866
1867         Make WTF build with the latest version of clang.
1868
1869         Reviewed by Dan Bernstein.
1870
1871         * wtf/FastMalloc.cpp:
1872         (WTF): Disable the -Wunused-private-field warning around the declaration of
1873         TCMalloc_Central_FreeListPadded since the padding is intentionally unused.
1874         (WTF::AdminRegionRecorder): Remove the unused m_reader member.
1875         (WTF::FastMallocZone::enumerate): Don't pass in the RemoteMemoryReader since
1876         it is no longer needed.
1877
1878 2012-08-22  Geoffrey Garen  <ggaren@apple.com>
1879
1880         Fixed a fastMallocForbid/Allow compile error for some compilers
1881         https://bugs.webkit.org/show_bug.cgi?id=94775
1882
1883         Reviewed by Gavin Barraclough.
1884
1885         * wtf/FastMalloc.h:
1886         (WTF::fastMallocForbid()):
1887         (WTF::fastMallocAllow()): Export, since these are called by JavaScriptCore.
1888
1889 2012-08-22  Geoffrey Garen  <ggaren@apple.com>
1890
1891         ThreadRestrictionVerifier should be opt-in, not opt-out
1892         https://bugs.webkit.org/show_bug.cgi?id=94761
1893
1894         Reviewed by Mark Hahnenberg.
1895
1896         WebKit's JavaScript engine supports use on multiple threads, so default-on
1897         is not appropriate for most of our objects, and it causes lots of suprious
1898         assertions.
1899
1900         * wtf/MetaAllocator.cpp:
1901         (WTF::MetaAllocatorHandle::MetaAllocatorHandle): No need to turn off
1902         explicitly, since it's off by default now.
1903
1904         * wtf/ThreadRestrictionVerifier.h:
1905         (WTF::ThreadRestrictionVerifier::ThreadRestrictionVerifier): Turn off by default.
1906
1907         (WTF::ThreadRestrictionVerifier::setMutexMode):
1908         (WTF::ThreadRestrictionVerifier::setDispatchQueueMode):
1909         (WTF::ThreadRestrictionVerifier::turnOffVerification): These assertions
1910         about state transitions were inconsistent with each other, and impossible
1911         to maintain with default off, so I removed them.
1912
1913 2012-08-22  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1914
1915         [Qt] Optionally support smooth-scrolling on all platforms
1916         https://bugs.webkit.org/show_bug.cgi?id=74926
1917
1918         Reviewed by Simon Hausmann.
1919
1920         Initialize GESTURE_ANIMATION feature flag.
1921
1922         * wtf/Platform.h:
1923
1924 2012-08-21  Mark Hahnenberg  <mhahnenberg@apple.com>
1925
1926         WTF Threading leaks kernel objects on platforms that use pthreads
1927         https://bugs.webkit.org/show_bug.cgi?id=94636
1928
1929         Reviewed by Geoffrey Garen.
1930
1931         Creating lots of Web workers on Mac platforms leaks lots of Mach ports. Eventually, the 
1932         process can exhaust its allocation of Mach ports from the kernel, which can then cause 
1933         all sorts of badness, including the inability to allocate new virtual memory from the 
1934         kernel. ThreadingPthreads.cpp and ThreadIdentifierDataPthreads.cpp need to be refactored 
1935         so that we do not leak these kernel resources. I would assume that we also leak kernel 
1936         resources on other pthreads platforms as well.
1937
1938         * wtf/ThreadIdentifierDataPthreads.cpp:
1939         (WTF):
1940         (WTF::ThreadIdentifierData::~ThreadIdentifierData): Now calls the event threadDidExit, which 
1941         handles all relevant tear-down of the thread metadata in the thread map.
1942         * wtf/ThreadingPthreads.cpp: Added a new class called PthreadState that encapsulates the 
1943         state of a thread and the possible transitions between those states.
1944         (PthreadState):
1945         (WTF::PthreadState::PthreadState):
1946         (WTF::PthreadState::joinableState): Returns the current state of the pthread.
1947         (WTF::PthreadState::pthreadHandle): Returns the pthread_t for this particular thread. This needs to 
1948         remain valid even after the thread has exited because somebody could come along at any time in the 
1949         future and call join on the thread.
1950         (WTF::PthreadState::didBecomeDetached): Signals that the thread was detached.
1951         (WTF::PthreadState::didExit): Signals that the thread's exit destructor (~ThreadIdentifierData) has run.
1952         (WTF::PthreadState::didJoin): Signals that the thread has been joined on successfully.
1953         (WTF::PthreadState::hasExited): Returns whether or not the thread's exit destructor has run.
1954         (WTF):
1955         (WTF::identifierByPthreadHandle): Changed to also check hasExited() on the threads it finds in the map. We 
1956         should only have one valid pthread_t in the map, but there are other pthread_t's that need to remain in the 
1957         thread map for when somebody joins on that thread id later.
1958         (WTF::establishIdentifierForPthreadHandle): Changed to put the allocate the new PthreadState data structure and 
1959         put it in the map.
1960         (WTF::pthreadHandleForIdentifierWithLockAlreadyHeld):
1961         (WTF::wtfThreadEntryPoint):
1962         (WTF::waitForThreadCompletion): We now do the relevant cleanup after the specified thread has been 
1963         successfully joined on depending on if the joined thread has already exited.
1964         (WTF::detachThread): Performs relevant cleanup if the thread has already exited. Otherwise signals to the 
1965         PthreadState that the thread has been detached.
1966         (WTF::threadDidExit): Function called by ~ThreadIdentifierData to indicate that the thread has exited. 
1967         Only cleans up after itself if the thread isn't Joinable (i.e. Joined or Detached).
1968
1969 2012-08-21  Ulan Degenbaev  <ulan@chromium.org>
1970
1971         Call AdjustAmountOfExternalAllocatedMemory when V8ArrayBuffer constructed and destructed
1972         https://bugs.webkit.org/show_bug.cgi?id=92993
1973
1974         Reviewed by Kenneth Russell.
1975
1976         Call AdjustAmountOfExternalAllocatedMemory when V8ArrayBuffer
1977         is constructed and destructed so that V8's garbage collection
1978         heuristics can account for the memory held by these objects.
1979
1980         * wtf/ArrayBuffer.h:
1981         (WTF):
1982         (ArrayBufferDeallocationObserver):
1983         (WTF::ArrayBufferContents::ArrayBufferContents):
1984         (WTF::ArrayBufferContents::transfer):
1985         (ArrayBufferContents):
1986         (ArrayBuffer):
1987         (WTF::ArrayBuffer::setDeallocationObserver):
1988         (WTF::ArrayBufferContents::~ArrayBufferContents):
1989
1990 2012-08-21  Benjamin Poulain  <bpoulain@apple.com>
1991
1992         Store CString data in the CStringBuffer to avoid the double indirection
1993         https://bugs.webkit.org/show_bug.cgi?id=94562
1994
1995         Reviewed by Darin Adler.
1996
1997         Previously, any non-trivial CString would require two allocations:
1998         1) CStringBuffer (ref-counted container for CString's data).
1999         2) VectorBuffer's m_buffer (the actual char data).
2000
2001         This patches changes CStringBuffer to hold the data previously owned by
2002         WTF::Vector and WTF::VectorBuffer. This makes CString more efficient
2003         both in CPU time and memory use.
2004
2005         * wtf/text/CString.cpp:
2006         (WTF::CStringBuffer::createUninitialized): This new method allocate the memory
2007         for CStringBuffer and its data. We simply allocate more memory after CStringBuffer
2008         to hold the data.
2009
2010         The extra memory needed to store the terminating zero is now handled by design.
2011         (WTF::CString::CString): Move the test for "str" one level up the stack from CString::init().
2012         This avoid double checking the pointer when using the other constructor.
2013         (WTF::CString::init):
2014         (WTF::CString::newUninitialized):
2015         (WTF::CString::copyBufferIfNeeded):
2016         * wtf/text/CString.h:
2017         (WTF::CStringBuffer::data):
2018         (WTF::CStringBuffer::length):
2019         (CStringBuffer):
2020         (WTF::CStringBuffer::CStringBuffer):
2021         (WTF::CStringBuffer::mutableData):
2022         (WTF::CString::length):
2023
2024 2012-08-21  Patrick Gansterer  <paroga@webkit.org>
2025
2026         Build fix for COMPILER(MSVC) && !CPU(X86) after r126023.
2027
2028         * wtf/MathExtras.h:
2029         (lrint):
2030
2031 2012-08-20  Dominik Röttsches  <dominik.rottsches@intel.com>
2032
2033         The 2d.imageData.object.round canvas test is failing
2034         https://bugs.webkit.org/show_bug.cgi?id=40272
2035
2036         Reviewed by Kenneth Rohde Christiansen.
2037
2038         According to the Uint8ClampedArray spec (http://www.khronos.org/registry/typedarray/specs/latest/#7.1)
2039         which references WebIDL's clamping rules, with implications defined in http://www.w3.org/TR/WebIDL/#es-octet
2040         we need to round to nearest integer, and to the even one if exactly halfway in between.
2041         As a solution: applying C99's lrint which, in default rounding mode, does that.
2042
2043         The updated version of test 2d.imageData.object.round.html test passes now.
2044
2045         * wtf/MathExtras.h:
2046         (lrint): Assembly based implementation for MSVC under X86, otherwise falling back to casting.
2047         * wtf/Uint8ClampedArray.h:
2048         (WTF::Uint8ClampedArray::set): lrint instead of simple rounding.
2049
2050 2012-08-17  Michael Saboff  <msaboff@apple.com>
2051
2052         Add ability to create AtomicString using LChar* buffer and length
2053         https://bugs.webkit.org/show_bug.cgi?id=94381
2054
2055         Reviewed by Geoffrey Garen.
2056
2057         Allows the use of 8 bit string data directly without converting to 16 bits first.
2058
2059         * wtf/text/AtomicString.cpp:
2060         (WTF::LCharBufferTranslator::hash):
2061         (LCharBufferTranslator):
2062         (WTF::LCharBufferTranslator::equal):
2063         (WTF::LCharBufferTranslator::translate):
2064         (WTF::AtomicString::add):
2065         * wtf/text/AtomicString.h:
2066         (WTF::AtomicString::AtomicString):
2067         (AtomicString):
2068         * wtf/text/StringImpl.h:
2069         (StringImpl):
2070
2071 2012-08-17  Benjamin Poulain  <bpoulain@apple.com>
2072
2073         Make it easier to append a literal to StringBuilder
2074         https://bugs.webkit.org/show_bug.cgi?id=94273
2075
2076         Reviewed by Kentaro Hara.
2077
2078         * wtf/text/StringBuilder.h:
2079         (WTF::StringBuilder::appendLiteral): Add the method StringBuilder::appendLiteral() for efficiently
2080         adding a string literal to the StringBuilder.
2081
2082 2012-08-17  Yong Li  <yoli@rim.com>
2083
2084         [BlackBerry] Turn on a few macros for jpeg decoding and image interpolation
2085         https://bugs.webkit.org/show_bug.cgi?id=94244
2086
2087         Reviewed by Antonio Gomes.
2088
2089         Turn on these macros to get better performance.
2090
2091         * wtf/Platform.h:
2092
2093 2012-08-17  Milian Wolff  <milian.wolff@kdab.com>
2094
2095         [Qt] QNX build fails due to ctype usage in system headers
2096         https://bugs.webkit.org/show_bug.cgi?id=93849
2097
2098         Reviewed by Simon Hausmann.
2099
2100         Move the check for whether DisallowCType should be active or not
2101         to the DisallowCType.h header. This way, we can update the list
2102         of platforms or OSes which do not work with this header in a
2103         central place. All users can now safely include the header
2104         and do not need to place custom guards around it.
2105
2106         * config.h:
2107         * wtf/DisallowCType.h:
2108
2109 2012-08-17  Milian Wolff  <milian.wolff@kdab.com>
2110
2111         [Qt] QNX build fails due to missing timegm declaration
2112         https://bugs.webkit.org/show_bug.cgi?id=93842
2113
2114         Reviewed by Simon Hausmann.
2115
2116         On QNX, timegm is declared in nbutils.h and one must link against
2117         nbutils to use it.
2118
2119         * WTF.pri:
2120         * wtf/DateMath.cpp:
2121
2122 2012-08-16  Kent Tamura  <tkent@chromium.org>
2123
2124         Build fix for Chromium-mac.
2125
2126         * wtf/text/WTFString.cpp: Remove unnecessary includes.
2127
2128 2012-08-16  Michael Saboff  <msaboff@apple.com>
2129
2130         HTML Parser should produce 8bit substrings for inline style and script elements
2131         https://bugs.webkit.org/show_bug.cgi?id=93742
2132
2133         Reviewed by Benjamin Poulain.
2134
2135         Added 8 bit path to String::isAllSpecialCharacters(). Added new String creator
2136         that takes a pointer to a UChar array that is known to contain only 8 bit
2137         characters (LChar's). Added new helper method to copy contents of a
2138         UChar buffer to a LChar buffer. The helper method includes X86-64 intrinsics
2139         of SSE family instructions for performance.
2140
2141         * wtf/Alignment.h:
2142         (WTF::isAlignedTo):
2143         * wtf/text/ASCIIFastPath.h:
2144         (WTF::copyLCharsFromUCharSource):
2145         * wtf/text/WTFString.cpp:
2146         (WTF::String::make8BitFrom16BitSource):
2147         * wtf/text/WTFString.h:
2148         (String):
2149         (WTF::isAllSpecialCharacters):
2150         (WTF::String::isAllSpecialCharacters):
2151
2152 2012-08-16  Benjamin Poulain  <bpoulain@apple.com>
2153
2154         Use initialization from literals for StringStatics
2155         https://bugs.webkit.org/show_bug.cgi?id=94185
2156
2157         Reviewed by Geoffrey Garen.
2158
2159         * wtf/text/StringStatics.cpp:
2160         Remove the arguments for DEFINE_GLOBAL. They are no longer used by the macro.
2161         (WTF::AtomicString::init):
2162         Use ConstructFromLiteral to initialize the strings faster and to save memory.
2163
2164 2012-08-14  Milian Wolff  <milian.wolff@kdab.com>
2165
2166         [Qt] QNX build fails due to reference to MADV_FREE_REUSE and MADV_FREE_REUSABLE
2167         https://bugs.webkit.org/show_bug.cgi?id=93843
2168
2169         Reviewed by Simon Hausmann.
2170
2171         QNX does not implement MADV_FREE_REUSE nor MADV_FREE_REUSABLE.
2172         The Blackberry port already sets the define to use the system
2173         malloc, which is now also done for QNX in general.
2174
2175         * wtf/Platform.h:
2176
2177 2012-08-13  Raphael Kubo da Costa  <rakuco@webkit.org>
2178
2179         [CMake] Remove glib-related Find modules and write single new one instead.
2180         https://bugs.webkit.org/show_bug.cgi?id=93786
2181
2182         Reviewed by Rob Buis.
2183
2184         * wtf/PlatformEfl.cmake: Use GLIB_* instead of Glib_*, and link directly to GIO, as wtf/gobject uses functions from it.
2185
2186 2012-08-11  Sam Weinig  <sam@webkit.org>
2187
2188         Enable XPC Service based WebProcess with runtime flag
2189         https://bugs.webkit.org/show_bug.cgi?id=93773
2190
2191         Reviewed by Dan Bernstein.
2192
2193         * wtf/Platform.h:
2194         Define HAVE_XPC on 10.7 and later.
2195
2196 2012-08-11  Benjamin Poulain  <bpoulain@apple.com>
2197
2198         Do the DecimalNumber to String conversion on 8 bits
2199         https://bugs.webkit.org/show_bug.cgi?id=93683
2200
2201         Reviewed by Andreas Kling.
2202
2203         Modify DecimalNumber to do the conversion to string on LChar instead of UChar.
2204
2205         * wtf/DecimalNumber.cpp:
2206         (WTF::DecimalNumber::toStringDecimal):
2207         (WTF::DecimalNumber::toStringExponential):
2208         * wtf/DecimalNumber.h:
2209         (DecimalNumber):
2210         * wtf/dtoa.h:
2211         * wtf/text/StringBuffer.h:
2212         (WTF::StringBuffer::operator[]): StringBuffer::operator[] was incorrectly typed to UChar, making
2213         the method impossible to instanciate with LChar.
2214         * wtf/text/WTFString.h:
2215         (String):
2216         (WTF::String::adopt): String::adopt() is modified to work with both LChar and UChar. StringImpl
2217         already support that.
2218         (WTF::appendNumber): Add support for any type that can instanciate the template.
2219
2220 2012-08-11  Benjamin Poulain  <benjamin@webkit.org>
2221
2222         WebCore::findAtomicString(PropertyName) always convert the name to 16bits
2223         https://bugs.webkit.org/show_bug.cgi?id=93685
2224
2225         Reviewed by Geoffrey Garen.
2226
2227         Previously, WebCore::findAtomicString() was causing a conversion for the 8bit property name
2228         to a 16bits due to the call to StringImpl::character16().
2229
2230         This patch fixes the issue by adding support for both 8bits and 16bits string in AtomicString::find().
2231
2232         * wtf/text/AtomicString.cpp:
2233         (HashAndCharacters):
2234         (WTF::HashAndCharactersTranslator::hash):
2235         (WTF::HashAndCharactersTranslator::equal):
2236         (WTF::HashAndCharactersTranslator::translate):
2237         Use a template to make the struct and the translator independant of the CharacterType.
2238
2239         (WTF::AtomicString::add):
2240         (WTF::findString):
2241         (WTF::AtomicString::find): Change the API to take a StringImpl*. AtomicString can use
2242         it efficiently to find the right string.
2243         * wtf/text/AtomicString.h:
2244         (AtomicString):
2245         * wtf/text/StringImpl.h:
2246         (StringImpl): Adapt the friends translator to support the template.
2247
2248 2012-08-10  Benjamin Poulain  <bpoulain@apple.com>
2249
2250         Add support for String initialization from literal to WTFString
2251         https://bugs.webkit.org/show_bug.cgi?id=93426
2252
2253         Reviewed by Anders Carlsson.
2254
2255         This patch adds two constructor to WTF::String in order to support fast initialization from literal:
2256         -String(ASCIILiteral): Constructor similar to String(const char*) while being faster. This constructor
2257          does not incur any overhead over String(const char*).
2258         -String(char[], ConstructFromLiteralTag): Template constructor that encode explicitely the size of the
2259          string.
2260
2261         String(ASCIILiteral) is expected to be used in most cases to avoid regressions. This constructor was
2262         added because of what we have learned from r124922: inlining the string length in the code causes a code bloat
2263         that is not always welcome.
2264
2265         Regarding performance of string initialization, the constructors performance are (6 characters string):
2266         -String(ASCIILiteral): 16% faster.
2267         -String(char[], ConstructFromLiteralTag): 33% faster (the delta increases with the string length).
2268
2269         In addition, no memory is allocated for the characters.
2270
2271         * wtf/text/StringImpl.cpp:
2272         * wtf/text/StringImpl.h:
2273         (WTF::StringImpl::createFromLiteral): Extend StringImpl::createFromLiteral to have a version
2274         with strlen() which avoids loading one extra argument.
2275         * wtf/text/WTFString.cpp:
2276         (WTF::String::String):
2277         * wtf/text/WTFString.h:
2278         (WTF::String::String):
2279         (ASCIILiteral): This class is aimed at making the construction of WTFString from a literal very easy.
2280         By using the explicit constructor ASCIILiteral(char *), one can expect the implicit conversion to String
2281         when needed.
2282         (WTF::ASCIILiteral::ASCIILiteral):
2283         (WTF::ASCIILiteral::operator const char*):
2284
2285 2012-08-08  Benjamin Poulain  <bpoulain@apple.com>
2286
2287         Use char* instead of LChar* for the public interface of String construction from literals
2288         https://bugs.webkit.org/show_bug.cgi?id=93402
2289
2290         Reviewed by Michael Saboff.
2291
2292         When the initialization from literal was added, some constructor/initialization function were
2293         using LChar for convenience.
2294
2295         Since those function should only take ASCII characters, using LChar* could cause confusion. This
2296         patch intents to clarify this by using char* for all those APIs.
2297
2298         * wtf/text/AtomicString.cpp:
2299         (WTF::CharBufferFromLiteralDataTranslator::hash):
2300         (WTF::CharBufferFromLiteralDataTranslator::equal):
2301         (WTF::CharBufferFromLiteralDataTranslator::translate):
2302         (WTF::AtomicString::addFromLiteralData):
2303         * wtf/text/AtomicString.h:
2304         (WTF::AtomicString::AtomicString):
2305         (AtomicString):
2306         * wtf/text/StringImpl.cpp:
2307         (WTF::StringImpl::createFromLiteral):
2308         * wtf/text/StringImpl.h:
2309         (StringImpl):
2310         (WTF::StringImpl::StringImpl):
2311         (WTF::StringImpl::createFromLiteral):
2312
2313 2012-08-08  Patrick Gansterer  <paroga@webkit.org>
2314
2315         Remove ce_time.(cpp|h) from list of source files
2316         https://bugs.webkit.org/show_bug.cgi?id=93446
2317
2318         Reviewed by Simon Hausmann.
2319
2320         r125004 removed the last dependency on functions defined in ce_time.cpp.
2321
2322         * wtf/PlatformWinCE.cmake:
2323
2324 2012-08-08  Alvaro Lopez Ortega  <alvaro@alobbs.com>
2325
2326         Atomics.h has incorrect GCC test for ext/atomicity.h when using LSB compilers
2327         https://bugs.webkit.org/show_bug.cgi?id=51974
2328
2329         Reviewed by Simon Hausmann.
2330
2331         * wtf/Atomics.h: Inhibits the inclusion of the atomicity.h GNU C++
2332         extension when compiling with a LSB compliant compiler. Thanks to
2333         Craig Scott for the new precompiler check code.
2334
2335 2012-08-07  Yoshifumi Inoue  <yosin@chromium.org>
2336
2337         [WTF] Add using WTF::msPerHour into DateMath.h
2338         https://bugs.webkit.org/show_bug.cgi?id=93428
2339
2340         Reviewed by Kent Tamura.
2341
2342         This patch adds "using WTF::msPerHour" into DateMath.h for some codes
2343         which will use it, e.g. bug 92960. Note: DateMath.h already has had
2344         using statements for msPerDay, msPerMinute and msPerSecond.
2345
2346         * wtf/DateMath.h: Added "using WTF::msPerHour".
2347
2348 2012-08-07  Benjamin Poulain  <benjamin@webkit.org>
2349
2350         Use the initialization from literal for JSC's Identifiers
2351         https://bugs.webkit.org/show_bug.cgi?id=93193
2352
2353         Reviewed by Geoffrey Garen.
2354
2355         * wtf/text/StringImpl.h: Update the names for the HashTranslator used by Identifier.
2356
2357 2012-07-19  Simon Hausmann  <simon.hausmann@nokia.com>
2358
2359         [Qt] Remove Qt 4 specific code paths
2360         https://bugs.webkit.org/show_bug.cgi?id=88161
2361
2362         Reviewed by Kenneth Rohde Christiansen.
2363
2364         * WTF.pri:
2365         * WTF.pro:
2366         * wtf/qt/StringQt.cpp:
2367         (WTF::String::String):
2368         (WTF::String::operator QString):
2369         * wtf/qt/UtilsQt.h: Removed.
2370         * wtf/qt/compat/QGuiApplication: Removed.
2371         * wtf/qt/compat/qguiapplication.h: Removed.
2372         * wtf/text/StringImpl.cpp:
2373         (WTF::StringImpl::~StringImpl):
2374         (WTF):
2375         * wtf/text/StringImpl.h:
2376         (StringImpl):
2377
2378 2012-08-06  Patrick Gansterer  <paroga@webkit.org>
2379
2380         [WIN] Remove dependency on pthread from MachineStackMarker
2381         https://bugs.webkit.org/show_bug.cgi?id=68429
2382
2383         Reviewed by Geoffrey Garen.
2384
2385         Windows has no support for calling a destructor for thread specific data.
2386         Since we need more control over creating and deleting thread specific keys
2387         we can not simply extend WTF::ThreadSpecific with this functionality.
2388
2389         All thread specific keys created via the new API get stored in a list.
2390         After a thread function finished we iterate over this list and call
2391         the registered destructor for every item if needed.
2392
2393         * wtf/ThreadSpecific.h:
2394         (WTF):
2395         (WTF::threadSpecificKeyCreate): Added wrapper around pthread_key_create.
2396         (WTF::threadSpecificKeyDelete): Added wrapper around pthread_key_delete.
2397         (WTF::threadSpecificSet): Added wrapper around pthread_setspecific.
2398         (WTF::threadSpecificGet): Added wrapper around pthread_getspecific.
2399         * wtf/ThreadSpecificWin.cpp:
2400
2401 2012-08-04  No'am Rosenthal  <noam.rosenthal@nokia.com>
2402
2403         [Qt] UI_SIDE_COMPOSITING code has confusing names
2404         https://bugs.webkit.org/show_bug.cgi?id=93164
2405
2406         Reviewed by Kenneth Rohde Christiansen.
2407
2408         Renamed UI_SIDE_COMPOSITING to COORDINATED_GRAPHICS.
2409
2410         * wtf/Platform.h:
2411
2412 2012-08-03  Michael Saboff  <msaboff@apple.com>
2413
2414         Convert HTML parser to handle 8-bit resources without converting to UChar*
2415         https://bugs.webkit.org/show_bug.cgi?id=90321
2416
2417         Reviewed by Adam Barth.
2418
2419         * wtf/text/WTFString.h:
2420         (WTF::String::dataSize): New method to return the number of bytes 
2421         the string requires.  This replaces a harcoded calculation based on
2422         length and sizeof(UChar).
2423
2424 2012-08-03  Benjamin Poulain  <benjamin@webkit.org>
2425
2426         StringImpl created from literal should be BufferInternal
2427         https://bugs.webkit.org/show_bug.cgi?id=92940
2428
2429         Reviewed by Anders Carlsson.
2430
2431         The ownership of string created from literal should be BufferInternal so that
2432         StringImpl never tries to delete the characters.
2433
2434         The ownership was accidentaly set to BufferOwned in r123689.
2435
2436         * wtf/text/StringImpl.cpp:
2437         (WTF::StringImpl::createFromLiteral): Update to use the new constructor.
2438         * wtf/text/StringImpl.h:
2439         (WTF::StringImpl::StringImpl):
2440         Add a new constructor making the construction from literal explicit.
2441         Add the flag s_hashFlagHasTerminatingNullCharacter since the data has the terminating
2442         null character.
2443
2444 2012-08-02  Patrick Gansterer  <paroga@webkit.org>
2445
2446         Move getLocalTime() as static inline function to DateMath
2447         https://bugs.webkit.org/show_bug.cgi?id=92955
2448
2449         Reviewed by Ryosuke Niwa.
2450
2451         getCurrentLocalTime() and getLocalTime() has been superseded with the
2452         GregorianDateTime class. So we can move it into DateMath.cpp as an static inline
2453         function. This allows us to remove the dependecy on time() and localtime()
2454         for Windows CE, where this functions require the ce_time library to work.
2455
2456         * wtf/CurrentTime.cpp:
2457         (WTF):
2458         * wtf/CurrentTime.h:
2459         * wtf/DateMath.cpp:
2460         (WTF):
2461         (WTF::getLocalTime):
2462
2463 2012-08-02  Patrick Gansterer  <paroga@webkit.org>
2464
2465         [WINCE] Return 0 at calculateDSTOffset(double, double)
2466         https://bugs.webkit.org/show_bug.cgi?id=92953
2467
2468         Reviewed by Ryosuke Niwa.
2469
2470         localtime() is implemented as a call to gmtime() in ce_time.c.
2471         Since this will never return correct values, returning 0 instead
2472         does not remove any existing functionality, but decreases the
2473         dependency on the (external) ce_time implementation.
2474
2475         * wtf/DateMath.cpp:
2476         (WTF::calculateDSTOffsetSimple):
2477
2478 2012-08-02  Arnaud Renevier  <a.renevier@sisa.samsung.com>
2479
2480         TypedArray set method is slow when called with another typed array
2481         https://bugs.webkit.org/show_bug.cgi?id=92556
2482
2483         Reviewed by Kenneth Russell.
2484
2485         Add an checkInboundData function to TypedArrayBase to check if a
2486         position will be not be out of bound or overflow from the typed array.
2487
2488         * wtf/TypedArrayBase.h:
2489         (WTF::TypedArrayBase::checkInboundData):
2490         (TypedArrayBase):
2491
2492 2012-08-01  Patrick Gansterer  <paroga@webkit.org>
2493
2494         Replace WTF::getCurrentLocalTime() with GregorianDateTime::setToCurrentLocalTime()
2495         https://bugs.webkit.org/show_bug.cgi?id=92286
2496
2497         Reviewed by Geoffrey Garen.
2498
2499         Add a method to GregorianDateTime to set its values to the current locale time.
2500         Replacing all occurrences of getCurrentLocalTime with the new function allows
2501         us to remove getCurrentLocalTime in a next step.
2502
2503         * GNUmakefile.list.am:
2504         * WTF.gypi:
2505         * WTF.pro:
2506         * WTF.vcproj/WTF.vcproj:
2507         * WTF.xcodeproj/project.pbxproj:
2508         * wtf/CMakeLists.txt:
2509         * wtf/DateMath.cpp:
2510         (WTF::dayInYear):
2511         * wtf/DateMath.h:
2512         (WTF):
2513         * wtf/GregorianDateTime.cpp: Added.
2514         (WTF):
2515         (WTF::GregorianDateTime::setToCurrentLocalTime):
2516         * wtf/GregorianDateTime.h:
2517         (GregorianDateTime):
2518
2519 2012-08-01  Patrick Gansterer  <paroga@webkit.org>
2520
2521         Fix FastMalloc build with assertions enabled.
2522
2523         * wtf/FastMalloc.cpp:
2524         (WTF::TCMalloc_PageHeap::isScavengerSuspended):
2525         (WTF::TCMalloc_PageHeap::scheduleScavenger):
2526         (WTF::TCMalloc_PageHeap::suspendScavenger):
2527
2528 2012-08-01  Patrick Gansterer  <paroga@webkit.org>
2529
2530         Export StringImpl::sizeInBytes() with WTF_EXPORT_STRING_API
2531         https://bugs.webkit.org/show_bug.cgi?id=92851
2532
2533         Reviewed by Hajime Morita.
2534
2535         r124069 missed to change one export macro, which is needed
2536         to make the windows port with USE(EXPORT_MACROS).
2537
2538         * wtf/text/StringImpl.h:
2539         (StringImpl):
2540
2541 2012-08-01  Patrick Gansterer  <paroga@webkit.org>
2542
2543         [WIN] Add missing WTF export macros to functions
2544         https://bugs.webkit.org/show_bug.cgi?id=92842
2545
2546         Reviewed by Hajime Morita.
2547
2548         When we switch the windows port to USE(EXPORT_MACROS) we
2549         need to export all functions referenced by WebKit.dll.
2550
2551         * wtf/ThreadingPrimitives.h:
2552         (WTF):
2553         * wtf/dtoa.h:
2554         (WTF):
2555         * wtf/dtoa/double-conversion.h:
2556         (StringToDoubleConverter):
2557         * wtf/unicode/UTF8.h:
2558
2559 2012-07-31  Sam Weinig  <sam@webkit.org>
2560
2561         Stop masking 8 bits off of the visited link hash. We need all the bits!
2562         https://bugs.webkit.org/show_bug.cgi?id=92799
2563
2564         Reviewed by Anders Carlsson.
2565
2566         * wtf/StringHasher.h:
2567         (WTF::StringHasher::hashWithTop8BitsMasked):
2568         (WTF::StringHasher::hash):
2569         (StringHasher):
2570         (WTF::StringHasher::computeHashAndMaskTop8Bits):
2571         (WTF::StringHasher::hashMemory):
2572         (WTF::StringHasher::avalancheBits):
2573         Rename existing computeHash and hash functions to computeHashAndMaskTop8Bits
2574         and hashWithTop8BitsMasked respectively. Add new computeHash and hash functions
2575         that do the StringHash without the masking.
2576
2577         * wtf/text/AtomicString.cpp:
2578         (WTF::CStringTranslator::hash):
2579         (WTF::UCharBufferTranslator::hash):
2580         (WTF::HashAndCharactersTranslator::hash):
2581         (WTF::SubstringTranslator::hash):
2582         (WTF::LCharBufferFromLiteralDataTranslator::hash):
2583         (WTF::AtomicString::fromUTF8Internal):
2584         * wtf/text/StringHash.h:
2585         (WTF::CaseFoldingHash::hash):
2586         * wtf/text/StringImpl.h:
2587         (WTF::StringImpl::setHash):
2588         * wtf/text/StringStatics.cpp:
2589         (WTF::StringImpl::hashSlowCase):
2590         * wtf/unicode/UTF8.cpp:
2591         (WTF::Unicode::calculateStringHashAndLengthFromUTF8MaskingTop8Bits):
2592         * wtf/unicode/UTF8.h:
2593         Update for new function names.
2594
2595 2012-07-31  Thiago Marcos P. Santos  <thiago.santos@intel.com>
2596
2597         Add a mechanism to dump the stack trace in case of a crash
2598         https://bugs.webkit.org/show_bug.cgi?id=92666
2599
2600         Reviewed by Csaba Osztrogonác.
2601
2602         Unix based ports can make use of signal handlers to dump the stack
2603         trace in case of a crash. This is specially handy when a test crashes on
2604         the bot without hitting an assertion, we might have a chance to see
2605         some insightful information at the reports.
2606
2607         * wtf/Assertions.cpp:
2608         * wtf/Assertions.h:
2609
2610 2012-07-31  Stephen Chenney  <schenney@chromium.org>
2611
2612         xmlserializer strips xlink from xlink:html svg image tag
2613         https://bugs.webkit.org/show_bug.cgi?id=79586
2614
2615         Reviewed by Nikolas Zimmermann.
2616
2617         Add WTF::xlinkAtom as a global AtomicString constant.
2618
2619         * wtf/text/AtomicString.h:
2620         (WTF): Add xlinkAtom.
2621         * wtf/text/StringStatics.cpp:
2622         (WTF): Add xlinkAtom.
2623         (WTF::AtomicString::init): Add xlinkAtom.
2624
2625 2012-07-30  Patrick Gansterer  <paroga@webkit.org>
2626
2627         Add WTF_EXPORT_PRIVATE to deleteOwnedPtr()
2628         https://bugs.webkit.org/show_bug.cgi?id=92668
2629
2630         Reviewed by Hajime Morita.
2631
2632         When using export macros all non-inlined deleteOwnedPtr()
2633         functions need to be declared with WTF_EXPORT_PRIVATE.
2634
2635         * wtf/OwnPtrCommon.h:
2636         (WTF):
2637
2638 2012-07-30  Wei James  <james.wei@intel.com>
2639
2640         atomicDecrement() never reach 0 on Android so no deref() will be called
2641         https://bugs.webkit.org/show_bug.cgi?id=92635
2642
2643         Reviewed by Adam Barth.
2644
2645         With Android NDK 7b and later, __atomic_dec()  is implemented by
2646         __sync_fetch_and_sub(), which will result in that atomicDecrement()
2647         returns the old value instead of new one.
2648
2649         * wtf/Atomics.h:
2650         (WTF):
2651         (WTF::atomicIncrement):
2652         (WTF::atomicDecrement):
2653
2654 2012-07-30  Patrick Gansterer  <paroga@webkit.org>
2655
2656         Add function to calculate the day in year from a date
2657         https://bugs.webkit.org/show_bug.cgi?id=92671
2658
2659         Reviewed by Ryosuke Niwa.
2660
2661         Replace monthToDayInYear() with dayInYear() which takes a whole
2662         date for calculation and will be used for bug 92286 later.
2663
2664         * wtf/DateMath.cpp:
2665         (WTF::dayInYear):
2666         (WTF::dateToDaysFrom1970):
2667
2668 2012-07-30  Patrick Gansterer  <paroga@webkit.org>
2669
2670         Add special export macro for string related functions
2671         https://bugs.webkit.org/show_bug.cgi?id=92624
2672
2673         Reviewed by Hajime Morita.
2674
2675         The windows port compiles string related code into every binary for performance reasons (see r59187).
2676         Add the WTF_EXPORT_STRING_API define to allow this behaviour with export macros too.
2677
2678         * wtf/ExportMacros.h:
2679         * wtf/text/AtomicString.h:
2680         (AtomicString):
2681         * wtf/text/StringImpl.h:
2682         (StringImpl):
2683         (WTF):
2684         * wtf/text/WTFString.h:
2685         (WTF):
2686         (String):
2687
2688 2012-07-30  Patrick Gansterer  <paroga@webkit.org>
2689
2690         Replace UnicodeWinCE with UnicodeWchar
2691         https://bugs.webkit.org/show_bug.cgi?id=92539
2692
2693         Reviewed by Ryosuke Niwa.
2694
2695         UnicodeWinCE never contained WinCE specific code. UnicodeWchar
2696         is a replacement for it, which is mainly based on the functions
2697         from <wchar.h>. It is ment as a minimal Unicode backend, which
2698         can be used very easy and has no external dependencies.
2699
2700         * WTF.gyp/WTF.gyp:
2701         * WTF.gypi:
2702         * wtf/Platform.h:
2703         * wtf/PlatformWinCE.cmake:
2704         * wtf/unicode/Unicode.h:
2705         * wtf/unicode/wchar/UnicodeWchar.cpp: Added.
2706         (Unicode):
2707         (WTF::Unicode::category):
2708         (WTF::Unicode::combiningClass):
2709         (WTF::Unicode::direction):
2710         (WTF::Unicode::decompositionType):
2711         (WTF::Unicode::hasLineBreakingPropertyComplexContext):
2712         (WTF::Unicode::mirroredChar):
2713         (WTF::Unicode::convertWithFunction):
2714         (WTF::Unicode::foldCase):
2715         (WTF::Unicode::toLower):
2716         (WTF::Unicode::toUpper):
2717         * wtf/unicode/wchar/UnicodeWchar.h: Added.
2718         (Unicode):
2719         (WTF::Unicode::isAlphanumeric):
2720         (WTF::Unicode::isDigit):
2721         (WTF::Unicode::isLetter):
2722         (WTF::Unicode::isLower):
2723         (WTF::Unicode::isPrintableChar):
2724         (WTF::Unicode::isPunct):
2725         (WTF::Unicode::isSpace):
2726         (WTF::Unicode::isUpper):
2727         (WTF::Unicode::isArabicChar):
2728         (WTF::Unicode::isSeparatorSpace):
2729         (WTF::Unicode::foldCase):
2730         (WTF::Unicode::toLower):
2731         (WTF::Unicode::toUpper):
2732         (WTF::Unicode::toTitleCase):
2733         (WTF::Unicode::umemcasecmp):
2734         * wtf/unicode/wince/UnicodeWinCE.cpp: Removed.
2735         * wtf/unicode/wince/UnicodeWinCE.h: Removed.
2736
2737 2012-07-26  Yury Semikhatsky  <yurys@chromium.org>
2738
2739         Web Inspector: move StringImpl size calculation to StringImpl
2740         https://bugs.webkit.org/show_bug.cgi?id=92359
2741
2742         Reviewed by Pavel Feldman.
2743
2744         Moved stringSize(StringImpl*) implementation from InspectorMemoryAgent to
2745         StringImpl::sizeInBytes();
2746
2747         * wtf/text/StringImpl.cpp:
2748         (WTF::StringImpl::sizeInBytes):
2749         (WTF):
2750         * wtf/text/StringImpl.h:
2751         (StringImpl):
2752
2753 2012-07-28  Patrick Gansterer  <paroga@webkit.org>
2754
2755         [WIN] Add missing export macro to friend decleration.
2756
2757         Since the __declspec is part of the function signature
2758         on windows, we need it at all friend declerations too.
2759
2760         * wtf/MediaTime.h:
2761
2762 2012-07-28  Patrick Gansterer  <paroga@webkit.org>
2763
2764         [CMake] Add missing MediaTime files after r123878.
2765
2766         * wtf/CMakeLists.txt:
2767
2768 2012-07-28  Patrick Gansterer  <paroga@webkit.org>
2769
2770         Remove obsolete functions from WTF::Unicode
2771         https://bugs.webkit.org/show_bug.cgi?id=92571
2772
2773         Reviewed by Kentaro Hara.
2774
2775         Remove hasLineBreakingPropertyComplexContextOrIdeographic() and digitValue(),
2776         since they are never used and defined for a few Unicode backends only.
2777
2778         * wtf/unicode/glib/UnicodeGLib.h:
2779         * wtf/unicode/icu/UnicodeIcu.h:
2780
2781 2012-07-27  Sheriff Bot  <webkit.review.bot@gmail.com>
2782
2783         Unreviewed, rolling out r123679.
2784         http://trac.webkit.org/changeset/123679
2785         https://bugs.webkit.org/show_bug.cgi?id=92565
2786
2787         Slowed down HTML parsing by 3.6% (Requested by abarth on
2788         #webkit).
2789
2790         * wtf/text/WTFString.h:
2791
2792 2012-07-27  Arnaud Renevier  <a.renevier@sisa.samsung.com>
2793
2794         use createUninitialized when creating TypedArray from another array
2795         https://bugs.webkit.org/show_bug.cgi?id=92518
2796
2797         Reviewed by Kenneth Russell.
2798
2799         Expose a createUninitialized static method on TypedArray classes.
2800
2801         * wtf/Float32Array.h:
2802         (Float32Array):
2803         (WTF::Float32Array::createUninitialized):
2804         (WTF):
2805         * wtf/Float64Array.h:
2806         (Float64Array):
2807         (WTF::Float64Array::createUninitialized):
2808         (WTF):
2809         * wtf/Int16Array.h:
2810         (Int16Array):
2811         (WTF::Int16Array::createUninitialized):
2812         (WTF):
2813         * wtf/Int32Array.h:
2814         (Int32Array):
2815         (WTF::Int32Array::createUninitialized):
2816         (WTF):
2817         * wtf/Int8Array.h:
2818         (Int8Array):
2819         (WTF::Int8Array::createUninitialized):
2820         (WTF):
2821         * wtf/Uint16Array.h:
2822         (Uint16Array):
2823         (WTF::Uint16Array::createUninitialized):
2824         (WTF):
2825         * wtf/Uint32Array.h:
2826         (Uint32Array):
2827         (WTF::Uint32Array::createUninitialized):
2828         (WTF):
2829         * wtf/Uint8Array.h:
2830         (Uint8Array):
2831         (WTF::Uint8Array::createUninitialized):
2832         (WTF):
2833         * wtf/Uint8ClampedArray.h:
2834         (Uint8ClampedArray):
2835
2836 2012-07-27  Patrick Gansterer  <paroga@webkit.org>
2837
2838         [WINCE] Use macros from ICU instead of defining the same functionality again
2839         https://bugs.webkit.org/show_bug.cgi?id=92530
2840
2841         Reviewed by Ryosuke Niwa.
2842
2843         Replace isHighSurrogate() with U16_IS_LEAD(), isLowSurrogate() with
2844         U16_IS_TRAIL() and surrogateToUcs4() with U16_GET_SUPPLEMENTARY().
2845
2846         * wtf/unicode/wince/UnicodeWinCE.h:
2847
2848 2012-07-27  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
2849
2850         [Qt] Fix build after r123917
2851         https://bugs.webkit.org/show_bug.cgi?id=92555
2852
2853         Unreviewed.
2854
2855         * wtf/GregorianDateTime.h: Needs string.h for memset().
2856
2857 2012-07-27  Paweł Forysiuk  <tuxator@o2.pl>
2858
2859         MinGW build fails because of missing header in GregorianDateTime.h
2860         https://bugs.webkit.org/show_bug.cgi?id=92531
2861
2862         * wtf/GregorianDateTime.h: Include time.h
2863
2864 2012-07-27  Jer Noble  <jer.noble@apple.com>
2865
2866         Unreviewed build fix.
2867
2868         Use MathExtras.h and the non std:: versions of isnan and signbit.
2869
2870         * wtf/MediaTime.cpp:
2871         (WTF::MediaTime::createWithFloat):
2872         (WTF::MediaTime::createWithDouble):
2873
2874 2012-07-27  Jer Noble  <jer.noble@apple.com>
2875
2876         Support a rational time class for use by media elements.
2877         https://bugs.webkit.org/show_bug.cgi?id=88787
2878
2879         Reviewed by Eric Carlson.
2880
2881         Add a new MediaTime class which implements rational math operations.
2882
2883         Add common constructors and assignment operators:
2884         * wtf/MediaTime.cpp: Added.
2885         (WTF::MediaTime::MediaTime):
2886         (WTF::MediaTime::~MediaTime):
2887         (WTF::MediaTime::operator=):
2888
2889         Add common math operators:
2890         * wtf/MediaTime.cpp:
2891         (WTF::MediaTime::operator+):
2892         (WTF::MediaTime::operator-):
2893         (WTF::MediaTime::operator<):
2894         (WTF::MediaTime::operator>):
2895         (WTF::MediaTime::operator==):
2896         (WTF::MediaTime::operator>=):
2897         (WTF::MediaTime::operator<=):
2898
2899         Add functions to check the MeiaTime time type flags:
2900         * wtf/MediaTime.h:
2901         (WTF::MediaTime::isValid):
2902         (WTF::MediaTime::isInvalid):
2903         (WTF::MediaTime::hasBeenRounde):
2904         (WTF::MediaTime::isPositiveInfinite):
2905         (WTF::MediaTime::isNegativeInfinite):
2906         (WTF::MediaTime::isIndefinite):
2907
2908         Add constants for commonly used MediaTime values:
2909         (WTF::MediaTime::zeroTime):
2910         (WTF::MediaTime::invalidTime):
2911         (WTF::MediaTime::positiveInfiniteTime):
2912         (WTF::MediaTime::negativeInfiniteTime):
2913         (WTF::MediaTime::indefiniteTime):
2914
2915         Add explicit conversion functions to convert to and from floating point values.
2916         * wtf/MediaTime.cpp:
2917         (WTF::MediaTime::createWithFloat):
2918         (WTF::MediaTime::createWithDouble):
2919         (WTF::MediaTime::toFloat):
2920         (WTF::MediaTime::toDouble):
2921
2922         Add some useful exported functions:
2923         * wtf/MediaTime.cpp:
2924         (WTF::MediaTime::compare): Master function for the comparison operators above.
2925         (WTF::MediaTime::setTimeScale): Rescale the time value to a new time scale.
2926         (WTF::abs): Return an absolute value for the current MediaTime.
2927
2928         Static utility functions to implement the above:
2929         * wtf/MediaTime.cpp:
2930         (WTF::greatestCommonDivisor):
2931         (WTF::leastCommonMultiple):
2932         (WTF::signum):
2933
2934         Windows-only implementations of isinf and signbit:
2935         * wtf/MediaTime.cpp:
2936         (std::isinf):
2937         (std::signbit):
2938
2939         Add the new class to platform build files:
2940         * GNUmakefile.list.am:
2941         * WTF.gypi:
2942         * WTF.pro:
2943         * WTF.vcproj/WTF.vcproj:
2944         * WTF.xcodeproj/project.pbxproj:
2945
2946 2012-07-27  Wei James  <james.wei@intel.com>
2947
2948         set WTF_USE_LOCKFREE_THREADSAFEREFCOUNTED for chromium android
2949         https://bugs.webkit.org/show_bug.cgi?id=91746
2950
2951         Reviewed by Adam Barth.
2952
2953         This patch is part of efforts to enable web audio for chromium android.
2954         Web audio component needs to use atomicIncrement and atomicDecrement,
2955         which are enabled by this MACRO.
2956
2957         As mentioned in https://bugs.webkit.org/show_bug.cgi?id=89428#c19, make
2958         this patch standalone.
2959
2960         * wtf/Atomics.h:
2961         (WTF):
2962
2963 2012-07-27  Wei James  <james.wei@intel.com>
2964
2965         set WTF_USE_LOCKFREE_THREADSAFEREFCOUNTED for chromium android
2966         https://bugs.webkit.org/show_bug.cgi?id=91746
2967
2968         Reviewed by Adam Barth.
2969
2970         This patch is part of efforts to enable web audio for chromium android.
2971         Web audio component needs to use atomicIncrement and atomicDecrement,
2972         which are enabled by this MACRO.
2973
2974         As mentioned in https://bugs.webkit.org/show_bug.cgi?id=89428#c19, make
2975         this patch standalone.
2976
2977         * wtf/Atomics.h:
2978         (WTF):
2979
2980 2012-07-26  Arnaud Renevier  <a.renevier@sisa.samsung.com>
2981
2982         constructing TypedArray from another TypedArray is slow
2983         https://bugs.webkit.org/show_bug.cgi?id=90838
2984
2985         Reviewed by Kenneth Russell.
2986
2987         Introduce virtual method getType on ArrayBufferView. It returns the actual
2988         type of the view. This method replaces previous is<Type>Array() methods.
2989
2990         * wtf/ArrayBufferView.h:
2991         * wtf/Float32Array.h:
2992         (WTF::Float32Array::getType):
2993         (Float32Array):
2994         * wtf/Float64Array.h:
2995         (WTF::Float64Array::getType):
2996         (Float64Array):
2997         * wtf/Int16Array.h:
2998         (WTF::Int16Array::getType):
2999         (Int16Array):
3000         * wtf/Int32Array.h:
3001         (WTF::Int32Array::getType):
3002         (Int32Array):
3003         * wtf/Int8Array.h:
3004         (WTF::Int8Array::getType):
3005         (Int8Array):
3006         * wtf/IntegralTypedArrayBase.h:
3007         * wtf/TypedArrayBase.h:
3008         (TypedArrayBase):
3009         (WTF::TypedArrayBase::item):
3010         * wtf/Uint16Array.h:
3011         (WTF::Uint16Array::getType):
3012         (Uint16Array):
3013         * wtf/Uint32Array.h:
3014         (WTF::Uint32Array::getType):
3015         (Uint32Array):
3016         * wtf/Uint8Array.h:
3017         (WTF::Uint8Array::getType):
3018         (Uint8Array):
3019         * wtf/Uint8ClampedArray.h:
3020         (WTF::Uint8ClampedArray::getType):
3021         (Uint8ClampedArray):
3022
3023 2012-07-26  Zeno Albisser  <zeno@webkit.org>
3024
3025         [Qt] requestAnimationFrame should only trigger when a new frame can be displayed.
3026         https://bugs.webkit.org/show_bug.cgi?id=88638
3027
3028         Disable REQUEST_ANIMATION_FRAME_TIMER for the Qt port and tie
3029         the servicing of scripted animations to layer syncing for WK2.
3030         For WK1 we rely on the RefreshAnimation that is based on QAbstractAnimation.
3031
3032         Reviewed by Jocelyn Turcotte.
3033
3034         * wtf/Platform.h:
3035
3036 2012-07-26  Yury Semikhatsky  <yurys@chromium.org>
3037
3038         Unreviewed. Revert r123740 as it breaks AppleMac compilation.
3039
3040         * wtf/text/StringImpl.cpp:
3041         * wtf/text/StringImpl.h:
3042
3043 2012-07-26  Yury Semikhatsky  <yurys@chromium.org>
3044
3045         Web Inspector: move StringImpl size calculation to StringImpl
3046         https://bugs.webkit.org/show_bug.cgi?id=92359
3047
3048         Reviewed by Pavel Feldman.
3049
3050         Moved stringSize(StringImpl*) implementation from InspectorMemoryAgent to
3051         StringImpl::sizeInBytes();
3052
3053         * wtf/text/StringImpl.cpp:
3054         (WTF::StringImpl::sizeInBytes):
3055         (WTF):
3056         * wtf/text/StringImpl.h:
3057         (StringImpl):
3058
3059 2012-07-25  Benjamin Poulain  <bpoulain@apple.com>
3060
3061         Initialize QualifiedName's strings from the read only data segment
3062         https://bugs.webkit.org/show_bug.cgi?id=92226
3063
3064         Reviewed by Anders Carlsson.
3065
3066         Add constructors for StringImpl and AtomicString to be able to create
3067         the strings from the literal in read only memory.
3068
3069         * wtf/text/AtomicString.cpp:
3070         (HashTranslatorCharBuffer):
3071         (WTF::LCharBufferFromLiteralDataTranslator::hash):
3072         (LCharBufferFromLiteralDataTranslator):
3073         (WTF::LCharBufferFromLiteralDataTranslator::equal):
3074         (WTF::LCharBufferFromLiteralDataTranslator::translate):
3075         (WTF::AtomicString::addFromLiteralData):
3076         * wtf/text/AtomicString.h:
3077         (WTF::AtomicString::AtomicString):
3078         (AtomicString):
3079         * wtf/text/StringImpl.cpp:
3080         (WTF::StringImpl::createFromLiteral):
3081         * wtf/text/StringImpl.h:
3082         (WTF):
3083         (StringImpl):
3084         (WTF::StringImpl::createFromLiteral):
3085
3086 2012-07-25  Michael Saboff  <msaboff@apple.com>
3087
3088         Convert HTML parser to handle 8-bit resources without converting to UChar*
3089         https://bugs.webkit.org/show_bug.cgi?id=90321
3090
3091         Reviewed by Geoffrey Garen.
3092
3093         * wtf/text/WTFString.h:
3094         (WTF::String::dataSize): New method to return the number of bytes 
3095         the string requires.  This replaces a harcoded calculation based on
3096         length and sizeof(UChar).
3097
3098 2012-07-25  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
3099
3100         Create a specialized pair for use in HashMap iterators
3101         https://bugs.webkit.org/show_bug.cgi?id=92137
3102
3103         Reviewed by Ryosuke Niwa.
3104
3105         The type used for internal storage in HashMap is exposed in its interface as iterator
3106         "contents". Currently HashMap uses std::pair<>, which this patch replaces with
3107         KeyValuePair.
3108
3109         Having this specialized structure will allow us to customize the members to be called
3110         key/value, improving readability in code using HashMap iterators. They are still called
3111         first/second to separate this change from the mechanical change of updating callsites.
3112
3113         * wtf/HashIterators.h:
3114         (HashTableConstKeysIterator):
3115         (HashTableConstValuesIterator):
3116         (HashTableKeysIterator):
3117         (HashTableValuesIterator):
3118         Use KeyValuePair instead of std::pair when defining the iterators.
3119
3120         * wtf/HashMap.h:
3121         (WTF):
3122         (WTF::KeyValuePairKeyExtractor::extract):
3123         (HashMap):
3124         Remove PairFirstExtractor. Add and use the KeyValuePair corresponding extractor.
3125
3126         (WTF::HashMapValueTraits::isEmptyValue): Use KeyValuePairHashTraits for HashMaps.
3127         (WTF::HashMapTranslator::translate):
3128         (WTF::HashMapTranslatorAdapter::translate):
3129         The traits of the mapped value is now called ValueTraits instead of SecondTraits.
3130
3131         * wtf/HashTable.h:
3132         (WTF::hashTableSwap): Add specialization for swapping KeyValuePairs.
3133         (WTF): Remove now unneeded specialization for std::pairs.
3134
3135         * wtf/HashTraits.h:
3136         (KeyValuePair):
3137         (WTF::KeyValuePair::KeyValuePair):
3138         (WTF):
3139         Specialized pair. In the future difference from pair should be the member names.
3140
3141         (KeyValuePairHashTraits):
3142         (WTF::KeyValuePairHashTraits::emptyValue):
3143         (WTF::KeyValuePairHashTraits::constructDeletedValue):
3144         (WTF::KeyValuePairHashTraits::isDeletedValue):
3145         These traits are analogous to PairHashTraits but for KeyValuePair.
3146
3147         * wtf/RefPtrHashMap.h: Use KeyValuePairHashTraits.
3148
3149 2012-07-25  Andrew Wilson  <atwilson@chromium.org>
3150
3151         Unreviewed, rolling out r123560.
3152         http://trac.webkit.org/changeset/123560
3153         https://bugs.webkit.org/show_bug.cgi?id=90321
3154
3155         Breaks chromium valgrind tests.
3156
3157         * wtf/text/WTFString.h:
3158
3159 2012-07-25  Csaba Osztrogonác  <ossy@webkit.org>
3160
3161         [Qt] There are parallel GC related crashes regularly
3162         https://bugs.webkit.org/show_bug.cgi?id=90957
3163
3164         Rubber-stamped by Zoltan Herczeg.
3165
3166         * wtf/Platform.h: Disable parallel GC temporarily on Qt until proper fix.
3167
3168 2012-07-24  Benjamin Poulain  <bpoulain@apple.com> && Joseph Pecoraro  <pecoraro@apple.com>
3169
3170         QualifiedName's HashSet should be big enough to hold at least all the static names
3171         https://bugs.webkit.org/show_bug.cgi?id=91891
3172
3173         Reviewed by Darin Adler.
3174
3175         Add a static struct to compute the HashTable capacity for any given size at compile time.
3176         This allow us to create HashTraits giving the minimumSize without hardcoding the values.
3177
3178         * wtf/HashTable.h:
3179         (OneifyLowBits):
3180         (UpperPowerOfTwoBound):
3181         (HashTableCapacityForSize): Compute the HashTable capacity at compile time.
3182
3183 2012-07-24  Michael Saboff  <msaboff@apple.com>
3184
3185         Convert HTML parser to handle 8-bit resources without converting to UChar*
3186         https://bugs.webkit.org/show_bug.cgi?id=90321
3187
3188         Reviewed by Geoffrey Garen.
3189
3190         * wtf/text/WTFString.h:
3191         (WTF::String::dataSize): New method to return the number of bytes 
3192         the string requires.  This replaces a harcoded calculation based on
3193         length and sizeof(UChar).
3194
3195 2012-07-24  Sam Weinig  <sam@webkit.org>
3196
3197         Add per-HashTable stats
3198         https://bugs.webkit.org/show_bug.cgi?id=92185
3199
3200         Reviewed by Anders Carlsson.
3201
3202         Add per-HashTable stats, so we can look at the effectiveness of an individual HashTable.
3203
3204         * wtf/HashTable.h:
3205         (WTF::HashTable::Stats::Stats):
3206         Add a HashTable::Stats to hold the stats.
3207
3208         (WTF::HashTable::Stats::recordCollisionAtCount):
3209         (WTF::HashTable::Stats::dumpStats):
3210         Add versions of recordCollisionAtCount and dumpStats for per-HashTable version.
3211
3212         (WTF::HashTable):
3213         Keep the stats, if enabled, in an OwnPtr, to not blow JSCell max size restrictions.
3214
3215         (WTF::lookup):
3216         (WTF::lookupForWriting):
3217         (WTF::fullLookupForWriting):
3218         (WTF::add):
3219         (WTF::reinsert):
3220         (WTF::remove):
3221         (WTF::rehash):
3222         Keep track of the stats as the table is used.
3223
3224 2012-07-24  Patrick Gansterer  <paroga@webkit.org>
3225
3226         Store the full year in GregorianDateTime
3227         https://bugs.webkit.org/show_bug.cgi?id=92067
3228
3229         Reviewed by Geoffrey Garen.
3230
3231         Use the full year instead of the offset from year 1900 
3232         for the year member variable of GregorianDateTime.
3233
3234         * wtf/GregorianDateTime.h:
3235         (WTF::GregorianDateTime::operator tm):
3236
3237 2012-07-23  Patrick Gansterer  <paroga@webkit.org>
3238
3239         Move GregorianDateTime from JSC to WTF namespace
3240         https://bugs.webkit.org/show_bug.cgi?id=91948
3241
3242         Reviewed by Geoffrey Garen.
3243
3244         Moving GregorianDateTime into the WTF namespace allows us to us to
3245         use it in WebCore too. The new class has the same behaviour as the
3246         old struct. Only the unused timeZone member has been removed.
3247
3248         * GNUmakefile.list.am:
3249         * WTF.gypi:
3250         * WTF.pro:
3251         * WTF.vcproj/WTF.vcproj:
3252         * WTF.xcodeproj/project.pbxproj:
3253         * wtf/CMakeLists.txt:
3254         * wtf/GregorianDateTime.h: Added.
3255         (GregorianDateTime):
3256
3257 2012-07-23  Rob Buis  <rbuis@rim.com>
3258
3259         [BlackBerry] Merge createThreadInternal implementations
3260         https://bugs.webkit.org/show_bug.cgi?id=91899
3261
3262         Reviewed by Yong Li.
3263
3264         PR 111675
3265
3266         Remove our implementation since the default thread stack size on QNX is fine.
3267
3268         * wtf/ThreadingPthreads.cpp:
3269         (WTF::createThreadInternal):
3270         (WTF::initializeCurrentThreadInternal): make sure we set the thread name.
3271
3272 2012-07-23  Patrick Gansterer  <paroga@webkit.org>
3273
3274         [WINCE] Define NOMINMAX in the build system instead of Platform.h
3275         https://bugs.webkit.org/show_bug.cgi?id=91938
3276
3277         Reviewed by Ryosuke Niwa.
3278
3279         * wtf/Platform.h:
3280
3281 2012-07-23  Patrick Gansterer  <paroga@webkit.org>
3282
3283         Build fix for Windows after r123317.
3284
3285         * wtf/DateMath.cpp: Added missing header include.
3286
3287 2012-07-23  Patrick Gansterer  <paroga@webkit.org>
3288
3289         [WIN] Use GetTimeZoneInformation() for calculateUTCOffset()
3290         https://bugs.webkit.org/show_bug.cgi?id=91935
3291
3292         Reviewed by Ryosuke Niwa.
3293
3294         GetTimeZoneInformation() returns the offset directly. Using it
3295         avoids unnecessary calculations and remove dependencies on
3296         other time related function, which do not exist on WinCE.
3297
3298         * wtf/DateMath.cpp:
3299         (WTF::calculateUTCOffset):
3300
3301 2012-07-20  Han Shen  <shenhan@google.com>
3302
3303         [Chromium] Compilation fails under gcc 4.7
3304         https://bugs.webkit.org/show_bug.cgi?id=90227
3305
3306         Reviewed by Tony Chang.
3307
3308         Disable warnings about c++0x compatibility in gcc newer than 4.6.
3309
3310         * WTF.gyp/WTF.gyp:
3311
3312 2012-07-19  Dan Bernstein  <mitz@apple.com>
3313
3314         The ATSUI-based complex text code is unused
3315         https://bugs.webkit.org/show_bug.cgi?id=91816
3316
3317         Reviewed by Sam Weinig.
3318
3319         Removed definitions of WTF_USE_ATSUI and WTF_USE_CORE_TEXT.
3320
3321         * wtf/Platform.h:
3322
3323 2012-07-19  Wei James  <james.wei@intel.com>
3324
3325         enable Web Audio for chromium android port
3326         https://bugs.webkit.org/show_bug.cgi?id=89428
3327
3328         Reviewed by Kenneth Russell.
3329
3330         * wtf/MathExtras.h:
3331         (log2):
3332         (log2f):
3333
3334 2012-07-19  Scott Graham  <scottmg@chromium.org>
3335
3336         [Chromium] disable warning on Windows from gcc-only pragma in Assertions.cpp"
3337         https://bugs.webkit.org/show_bug.cgi?id=91776
3338
3339         Reviewed by Ryosuke Niwa.
3340
3341         Avoids:
3342             ...\source\wtf\wtf\assertions.cpp(31) : warning C4068: unknown pragma
3343
3344         * WTF.gyp/WTF.gyp:
3345
3346 2012-07-19  Robert Sesek  <rsesek@chromium.org>
3347
3348         [chromium][Mac] Switch the MACOSX_DEPLOYMENT_TARGET to 10.6
3349         https://bugs.webkit.org/show_bug.cgi?id=91752
3350
3351         Reviewed by Eric Seidel.
3352
3353         When building CHROMIUM && DARWIN, do not enable ATSUI support.
3354
3355         * wtf/Platform.h:
3356
3357 2012-07-18  Yong Li  <yoli@rim.com>
3358
3359         [BlackBerry] Implement currentTime() and monotonicallyIncreasingTime() for OS(QNX)
3360         https://bugs.webkit.org/show_bug.cgi?id=91659
3361
3362         Reviewed by Rob Buis.
3363
3364         Implement currentTime() and monotonicallyIncreasingTime() for OS(QNX) with clock_gettime().
3365
3366         * wtf/CurrentTime.cpp:
3367         (WTF):
3368         (WTF::currentTime):
3369         (WTF::monotonicallyIncreasingTime):
3370
3371 2012-07-18  Tom Sepez  <tsepez@chromium.org>
3372
3373         OOB read of stack buffer below DoubleToStringConverter::CreateExponentialRepresentation() in debug builds
3374         https://bugs.webkit.org/show_bug.cgi?id=91642
3375
3376         Reviewed by Abhishek Arya.
3377
3378         * wtf/dtoa/double-conversion.cc:
3379         (DoubleToStringConverter::CreateExponentialRepresentation): NUL-terminate string buffer before passing it to StringBuilder::AddSubstring()
3380         
3381 2012-07-18  Michael Saboff  <msaboff@apple.com>
3382
3383         Make TextCodecLatin1 handle 8 bit data without converting to UChar's
3384         https://bugs.webkit.org/show_bug.cgi?id=90319
3385
3386         Reviewed by Oliver Hunt.
3387
3388         * wtf/text/StringImpl.h:
3389         (StringImpl): Exported LChar variant of adopt().
3390         * wtf/text/WTFString.h:
3391         (WTF::String::createUninitialized): Exported LChar variant.
3392
3393 2012-07-18  Rob Buis  <rbuis@rim.com>
3394
3395         Alignment crash in MIMESniffer
3396         https://bugs.webkit.org/show_bug.cgi?id=89787
3397
3398         Reviewed by Yong Li.
3399
3400         PR 169064
3401
3402         Change isPointerTypeAlignmentOkay so calling it does not require ifdefs.
3403
3404         * wtf/StdLibExtras.h:
3405         (isPointerTypeAlignmentOkay):
3406
3407 2012-07-17  Gabor Ballabas  <gaborb@inf.u-szeged.hu>
3408
3409         [Qt][V8] Remove the V8 related codepaths and configuration
3410         https://bugs.webkit.org/show_bug.cgi?id=90863
3411
3412         Reviewed by Simon Hausmann.
3413
3414         * WTF.pri:
3415
3416 2012-07-17  Sheriff Bot  <webkit.review.bot@gmail.com>
3417
3418         Unreviewed, rolling out r122834.
3419         http://trac.webkit.org/changeset/122834
3420         https://bugs.webkit.org/show_bug.cgi?id=91492
3421
3422         it broke the chromium (Requested by kkristof on #webkit).
3423
3424         * WTF.pri:
3425
3426 2012-07-17  Gabor Ballabas  <gaborb@inf.u-szeged.hu>
3427
3428         [Qt][V8] Remove the V8 related codepaths and configuration
3429         https://bugs.webkit.org/show_bug.cgi?id=90863
3430
3431         Reviewed by Simon Hausmann.
3432
3433         * WTF.pri:
3434
3435 2012-07-16  Hajime Morrita  <morrita@chromium.org>
3436
3437         WebCore needs WEBCORE_TESTING macro to mark methods being exported for testing.
3438         https://bugs.webkit.org/show_bug.cgi?id=90764
3439
3440         Reviewed by Adam Barth.
3441
3442         Added USE(EXPORT_MACROS_FOR_TESTING) and enabled it on GTK and Windows.
3443
3444         * wtf/ExportMacros.h:
3445         * wtf/Platform.h:
3446
3447 2012-07-16  Filip Pizlo  <fpizlo@apple.com>
3448
3449         Unreviewed build fix.
3450
3451         * wtf/FastMalloc.cpp:
3452         (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
3453
3454 2012-07-16  Adam Treat  <atreat@rim.com>
3455
3456         [BlackBerry] Use newer version of platform API to implement callOnMainThread
3457         https://bugs.webkit.org/show_bug.cgi?id=91404
3458
3459         Reviewed by Yong Li.
3460
3461         Right now we're using an outdated API that involves a virtual function call for no reason.
3462         Use the new API that is much more direct and to the point.
3463
3464         * wtf/blackberry/MainThreadBlackBerry.cpp:
3465         (WTF::scheduleDispatchFunctionsOnMainThread):
3466
3467 2012-07-14  Filip Pizlo  <fpizlo@apple.com>
3468
3469         Unreviewed, build fix.
3470
3471         * wtf/Assertions.cpp:
3472         * wtf/Platform.h:
3473         * wtf/unicode/icu/CollatorICU.cpp:
3474         (WTF::Collator::userDefault):
3475
3476 2012-07-13  Xianzhu Wang  <wangxianzhu@chromium.org>
3477
3478         Move WebCore/platform/text/Base64 to WTF/wtf/text
3479         https://bugs.webkit.org/show_bug.cgi?id=91162
3480
3481         Reviewed by Adam Barth.
3482
3483         * GNUmakefile.list.am:
3484         * WTF.gypi:
3485         * WTF.pro:
3486         * WTF.vcproj/WTF.vcproj:
3487         * WTF.xcodeproj/project.pbxproj:
3488         * wtf/CMakeLists.txt:
3489         * wtf/text/Base64.cpp: Renamed from Source/WebCore/platform/text/Base64.cpp.
3490         (WTF):
3491         (WTF::base64Encode):
3492         (WTF::base64Decode):
3493         (WTF::base64DecodeInternal):
3494         * wtf/text/Base64.h: Renamed from Source/WebCore/platform/text/Base64.h.
3495         (WTF):
3496         (WTF::base64Encode):
3497
3498 2012-07-12  Carlos Garcia Campos  <cgarcia@igalia.com>
3499
3500         [GTK] Add API to get HTTPS status to WebKit2 GTK+
3501         https://bugs.webkit.org/show_bug.cgi?id=91100
3502
3503         Reviewed by Martin Robinson.
3504
3505         Add support for GByteArray.
3506
3507         * wtf/gobject/GRefPtr.cpp:
3508         (WTF::refGPtr):
3509         (WTF):
3510         (WTF::derefGPtr):
3511         * wtf/gobject/GRefPtr.h:
3512         (WTF):
3513         * wtf/gobject/GTypedefs.h:
3514
3515 2012-07-12  Maciej Stachowiak  <mjs@apple.com>
3516
3517         Document ListHashSet iteration guarantees
3518         https://bugs.webkit.org/show_bug.cgi?id=91106
3519
3520         Reviewed by Eric Seidel.
3521
3522         * wtf/ListHashSet.h:
3523         (WTF): Expand class comment to document this.
3524
3525 2012-07-11  Mark Rowe  <mrowe@apple.com>
3526
3527         <http://webkit.org/b/91024> Build against the latest SDK when targeting older OS X versions.
3528
3529         Reviewed by Dan Bernstein.
3530
3531         The deployment target is already set to the version that we're targeting, and it's that setting
3532         which determines which functionality from the SDK is available to us.
3533
3534         * Configurations/Base.xcconfig:
3535
3536 2012-07-11  Mark Rowe  <mrowe@apple.com>
3537
3538         Replace definitions of BUILDING_ON / TARGETING macros with macros that will error when used.
3539
3540         Part of <http://webkit.org/b/91015> Remove BUILDING_ON / TARGETING macros in favor of system availability macros.
3541
3542         Reviewed by Anders Carlsson.
3543
3544         * wtf/Platform.h:
3545
3546 2012-07-11  Mark Rowe  <mrowe@apple.com>
3547
3548         Switch a few cases that care about the SDK over to checking __MAC_OS_X_VERSION_MAX_ALLOWED so that things build.
3549
3550         Part of <http://webkit.org/b/91015> Remove BUILDING_ON / TARGETING macros in favor of system availability macros
3551
3552         Reviewed by Filip Pizlo.
3553
3554         * wtf/FastMalloc.cpp:
3555         (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary): The SDK we're building against determines how many elements
3556         the structure is declared as having.
3557
3558 2012-07-11  Mark Rowe  <mrowe@apple.com>
3559
3560         <http://webkit.org/b/91015> Remove BUILDING_ON / TARGETING macros in favor of system availability macros
3561
3562         This removal was handled by a script that translates the relevant macros in to the equivalent checks
3563         using the system availability macros.
3564
3565         Reviewed by Filip Pizlo.
3566
3567         * wtf/Assertions.cpp:
3568         * wtf/FastMalloc.cpp:
3569         * wtf/Platform.h:
3570         * wtf/ThreadingPthreads.cpp:
3571         * wtf/unicode/icu/CollatorICU.cpp:
3572
3573 2012-07-11  Anders Carlsson  <andersca@apple.com>
3574
3575         Add -Wtautological-compare and -Wsign-compare warning flags
3576         https://bugs.webkit.org/show_bug.cgi?id=90994
3577
3578         Reviewed by Mark Rowe.
3579
3580         * Configurations/Base.xcconfig:
3581
3582 2012-07-10  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3583
3584         Re-enable __declspec(dl{import,export}) for MinGW when using EXPORT_MACROS
3585         https://bugs.webkit.org/show_bug.cgi?id=90612
3586
3587         Reviewed by Csaba Osztrogonác.
3588
3589         MinGW was switched to use auto import/export of symbols on r44184.
3590         From my understanding of the documentation, MinGW will not auto-export symbols
3591         unless there are no explicit __declspec(dlexport) in the DLL already.
3592
3593         The issues that originally made us rely on the auto-import feature of MinGW
3594         should now be resolved with the EXPORT_MACROS work. This patch re-enables them.
3595
3596         It also removes the GCC check for internal symbols hiding as the visibility should
3597         already be hidden by default for both MSVC and GCC on Windows anyway.
3598
3599         * wtf/ExportMacros.h:
3600
3601 2012-07-09  No'am Rosenthal  <noam.rosenthal@nokia.com>
3602
3603         Shared code that is guarded with ENABLE(WEBGL) should be guarded with USE()
3604         https://bugs.webkit.org/show_bug.cgi?id=90506
3605
3606         Reviewed by Martin Robinson.
3607
3608         Made USE(3D_GRAPHICS) default to true when ENABLE(WEBGL) is true.
3609         Also updated the Qt default to always use TEXTURE_MAPPER, and to use TEXTURE_MAPPER_GL when
3610         3D_GRAPHICS is used.
3611
3612         * wtf/Platform.h:
3613
3614 2012-07-08  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
3615
3616         Introduce a build flag for low quality JPEG images
3617         https://bugs.webkit.org/show_bug.cgi?id=90748
3618
3619         Reviewed by Adam Barth.
3620
3621         Turn on the newly introduced flags for android.
3622
3623         * wtf/Platform.h:
3624
3625 2012-07-05  Filip Pizlo  <fpizlo@apple.com>
3626
3627         INLINE_ARM_FUNCTION(thingy) should make thingy be thumb2 if we're using thumb2
3628         https://bugs.webkit.org/show_bug.cgi?id=90644
3629
3630         Reviewed by Mark Hahnenberg.
3631         
3632         Fix breakage introduced in http://trac.webkit.org/changeset/121885
3633
3634         * wtf/InlineASM.h:
3635
3636 2012-07-05  Zoltan Herczeg  <zherczeg@webkit.org>
3637
3638         Port DFG JIT to traditional ARM
3639         https://bugs.webkit.org/show_bug.cgi?id=90198
3640
3641         Reviewed by Filip Pizlo.
3642
3643         Enabling DFG JIT on ARM systems with 32 bit instruction set.
3644
3645         * wtf/InlineASM.h: