049fe47e241eda859fd3e1a6d3dca383e9372017
[WebKit-https.git] / WebCore / ChangeLog
1 2008-02-19  Anders Carlsson  <andersca@apple.com>
2
3         Reviewed by Darin.
4
5         WARNING: NO TEST CASES ADDED OR CHANGED
6
7         * ChangeLog:
8         * WebCore.base.exp:
9         * loader/mac/LoaderNSURLExtras.h:
10         * loader/mac/LoaderNSURLExtras.m:
11         Move unused functions to WebKit (where they are used)
12         
13         (vectorContainsString):
14         Use const references.
15         
16         * platform/mac/WebCoreSystemInterface.h:
17         * platform/mac/WebCoreSystemInterface.mm:
18         Remove wkNSURLProtocolClassForReqest.
19         
20 2008-02-19  Justin Garcia  <justin.garcia@apple.com>
21
22         Reviewed by Darin Adler.
23
24         <rdar://problem/5694920> Typing (esp. deleting) is slower due to TOT WebCore 
25         
26         These changes bring deleting performance back to old levels on the phone
27         except for deleting the first space to the right of a word, which we are
28         still working on.
29
30         * dom/Position.cpp:
31         (WebCore::Position::upstream): Avoid the use of enclosingBlock when determining
32         if we have left the original enclosing block or entered a new one, and avoid
33         rootEditableElement for determining if we have changed editability.  These
34         operations are expensive.
35         (WebCore::Position::downstream): Ditto.
36
37 2008-02-19  Darin Adler  <darin@apple.com>
38
39         Rubber stamped by Anders.
40
41         - removed explicit initialization to 1 for RefCounted; that's now the default
42
43         * loader/ResourceLoader.cpp:
44         (WebCore::ResourceLoader::ResourceLoader): Removed RefCounted initializer.
45         * platform/network/ResourceHandle.cpp:
46         (WebCore::ResourceHandle::ResourceHandle): Ditto.
47         * platform/text/StringImpl.cpp:
48         (WebCore::StringImpl::StringImpl): Ditto.
49
50 2008-02-18  Anders Carlsson  <andersca@apple.com>
51
52         Reviewed by Darin.
53
54         Make ResourceLoader and ResourceHandle start out with a refcount of 1.
55
56         * loader/MainResourceLoader.cpp:
57         (WebCore::MainResourceLoader::create):
58         * loader/NetscapePlugInStreamLoader.cpp:
59         (WebCore::NetscapePlugInStreamLoader::create):
60         * loader/ResourceLoader.cpp:
61         (WebCore::ResourceLoader::ResourceLoader):
62         * loader/SubresourceLoader.cpp:
63         (WebCore::SubresourceLoader::create):
64         * platform/network/ResourceHandle.cpp:
65         (WebCore::ResourceHandle::ResourceHandle):
66         (WebCore::ResourceHandle::create):
67
68 2008-02-19  Alp Toker  <alp@atoker.com>
69
70         Reviewed by Mark Rowe.
71
72         http://bugs.webkit.org/show_bug.cgi?id=16863
73         [GTK] tab focusing doesn't work
74
75         GDK_MOD2_MASK doesn't always mean meta so we can't use it to identify
76         the meta key state.
77
78         Use GDK_META_MASK where available, otherwise do not support the meta
79         key. This matches the behaviour of other applications.
80
81         Also add a comment noting that the platform event constructors need to
82         be kept in sync (it's not obvious that there are multiple places that
83         check the key state).
84
85         * platform/gtk/KeyEventGtk.cpp:
86         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
87         * platform/gtk/MouseEventGtk.cpp:
88         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
89         * platform/gtk/WheelEventGtk.cpp:
90         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
91
92 2008-02-18  Brady Eidson  <beidson@apple.com>
93
94         Reviewed by Sam Weinig's white rhino tusk stamp
95
96         SQLiteTransaction::stop() should also reset the transaction-in-progress flag in its parent SQLiteDatabase
97
98         * platform/sql/SQLiteTransaction.cpp:
99         (WebCore::SQLiteTransaction::stop):
100
101 2008-02-18  Brady Eidson  <beidson@apple.com>
102
103         Reviewed by Darin
104
105         Fix for <rdar://5747529> - ObjC Exception can cause JSLock to never be released
106
107         Test: platform/mac/plugins/webScriptObject-exception-deadlock.html
108
109         * bindings/objc/WebScriptObject.mm:
110         (-[WebScriptObject valueForKey:]): The line `resultObj = [super valueForKey:key];    // defaults to throwing an exception` 
111           says it all - it throws an exception.  This method also happens to hold the JSLock.  Problematically, when the exeception
112           is thrown and the method exited, the JSLock is never released.  Fix that without otherwise changing behavior by holding the 
113           JSLock in two individual scopes - Right before the exception and right after.  
114
115 2008-02-18  Darin Adler  <darin@apple.com>
116
117         Reviewed by Sam.
118
119         - reduce use of DeprecatedString and memory allocations in processing of CSS
120         - remove unnecessary double -> float -> double trip in the CSS parser
121         - cleaned up names and structure in CSS grammar
122
123         * css/CSSGrammar.y: Remove getPropertyID and getValueID. Both are now in CSSParser.cpp
124         instead, and they now work on ParseString and String objects and don't require the caller
125         to put the string into a char*. Gave members of the %union more sensible names, removed
126         duplicates, and sorted into a logical order. Put the %expect back in, rather than leaving
127         it commented out.
128         * css/CSSParser.cpp:
129         (WebCore::equalIgnoringCase): Added.
130         (WebCore::hasPrefix): Added.
131         (WebCore::CSSParser::parseTransitionProperty): Changed to call the new cssPropertyID,
132         which obviates the need to call lower() and utf8() or to allocate memory at all. Also
133         used equalIgnoringCase rather than putting the value into a String just to compare it.
134         (WebCore::CSSParser::lex): Replaced convertASCIIToFloat with charactersToDouble. This change
135         along with the CSSGrammar.y change, removes the double -> float -> double round trip, and
136         affects the result of one layout test.
137         (WebCore::cssPropertyID): Added. Gets the property ID from the gperf hash table, but
138         without allocating any memory.
139         (WebCore::cssValueKeywordID): Ditto.
140         * css/CSSParser.h: Removed declaration for deprecatedString function (now used only in
141         CSSParser.cpp; soon to be deleted). Added cssPropertyID and cssValueKeywordID functions.
142
143         * css/CSSStyleDeclaration.cpp:
144         (WebCore::CSSStyleDeclaration::getPropertyCSSValue): Call cssPropertyID instead of propertyID.
145         (WebCore::CSSStyleDeclaration::getPropertyValue): Ditto.
146         (WebCore::CSSStyleDeclaration::getPropertyPriority): Ditto.
147         (WebCore::CSSStyleDeclaration::getPropertyShorthand): Ditto.
148         (WebCore::CSSStyleDeclaration::isPropertyImplicit): Ditto.
149         (WebCore::CSSStyleDeclaration::setProperty): Ditto.
150         (WebCore::CSSStyleDeclaration::removeProperty): Ditto.
151         (WebCore::CSSStyleDeclaration::isPropertyName): Ditto.
152         * css/CSSStyleDeclaration.h: Removed unnecessary includes, unnecessary Noncopyable boilerplate,
153         and the getPropertyID function declaration along with its associated apology comment.
154
155         * css/makevalues.pl: Generate constants instead of macros for CSS value numbers (but not an
156         enumeration, like properties, since you rarely have any reason to handle all values, but
157         often have a reason to handle all properties). Renamed the constant for the number of CSS
158         value keywords from CSS_VAL_TOTAL to numCSSValueKeywords, and added maxCSSValueKeywordLength.
159
160         * platform/text/String.cpp:
161         (WebCore::charactersToDouble): Made this function more efficient by using a stack buffer
162         rather than a CString.
163
164 2008-02-18  Dan Bernstein  <mitz@apple.com>
165
166         Reviewed by Dave Hyatt.
167
168         - fix <rdar://problem/5736225> crash in svgFontAndFaceElementForFontData on digitalstrom.org/cms
169
170         Test: fast/css/font-face-multiple-remote-sources.html
171
172         * css/CSSFontFace.cpp:
173         (WebCore::CSSFontFace::fontLoaded):
174         * css/CSSSegmentedFontFace.cpp:
175         (WebCore::CSSSegmentedFontFace::fontLoaded):
176
177 2008-02-18  Darin Adler  <darin@apple.com>
178
179         Reviewed by Sam.
180
181         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
182         (WebCore::hasCSSPropertyNamePrefix): Added.
183         (WebCore::cssPropertyName): Reimplement to not use DeprecatedString. Also made faster
184         by using a Vector<UChar> and eliminating all the string operations.
185
186 2008-02-18  Stephanie Lewis  <slewis@apple.com>
187
188         Reviewed by Adam.
189
190         Remove workaround for <rdar://problem/5695848>.
191         
192         * platform/network/cf/ResourceResponseCFNet.cpp:
193         (WebCore::ResourceResponse::doUpdateResourceResponse):
194
195 2008-02-18  Samuel Weinig  <sam@webkit.org>
196
197         Reviewed by Geoff Garen.
198
199         Fix for http://bugs.webkit.org/show_bug.cgi?id=17419
200         Remove CompatMode from JavaScriptCore as it is never set to anything other than NativeMode
201
202         * bindings/js/kjs_proxy.cpp:
203         (WebCore::KJSProxy::initScript):
204
205 2008-02-18  Alp Toker  <alp@atoker.com>
206
207         Reviewed by Mark Rowe.
208
209         http://bugs.webkit.org/show_bug.cgi?id=17381
210         [CURL] Regression: data URL parsing broken after DeprecatedString removal (Acid2)
211
212         This patch resolves the regression for the GTK+ port.
213
214         * platform/network/curl/ResourceHandleManager.cpp:
215         (WebCore::parseDataUrl):
216
217 2008-02-18  Darin Adler  <darin@apple.com>
218
219         Reviewed by Sam.
220
221         * platform/network/win/ResourceHandleWin.cpp:
222         (WebCore::ResourceHandle::onHandleCreated): Use String instead of DeprecatedString.
223         (WebCore::ResourceHandle::start): Ditto.
224
225 2008-02-18  Darin Adler  <darin@apple.com>
226
227         Reviewed by Sam.
228
229         * platform/network/win/CookieJarWin.cpp:
230         (WebCore::setCookies): Use String instead of DeprecatedString.
231         (WebCore::cookies): Ditto.
232
233 2008-02-18  Darin Adler  <darin@apple.com>
234
235         Reviewed by Sam.
236
237         - removed use of DeprecatedString in the Color class
238
239         * platform/graphics/Color.cpp:
240         (WebCore::Color::parseHexColor): Streamlined logic a bit with early returns.
241         Used toASCIIHexValue a character at a time rather than using toIntStrict
242         in base 16 mode.
243         (WebCore::findNamedColor): Added. Uses a fixed-size char buffer to look up
244         a color using the gperf-generated findColor function. Saves a memory allocation
245         vs. the old version that called DeprecatedString::latin1().
246         (WebCore::Color::setNamedColor): Changed to use findNamedColor.
247
248 2008-02-18  Darin Adler  <darin@apple.com>
249
250         Reviewed by Sam.
251
252         * editing/htmlediting.cpp:
253         (WebCore::stringWithRebalancedWhitespace): Changed to use String instead of
254         DeprecatedString.
255
256 2008-02-18  Darin Adler  <darin@apple.com>
257
258         Reviewed by Sam.
259
260         * editing/SelectionController.cpp:
261         (WebCore::SelectionController::debugRenderer): Changed to use String instead of
262         DeprecatedString.
263
264 2008-02-18  Darin Adler  <darin@apple.com>
265
266         Reviewed and landed by Sam.
267
268         Remove DeprecatedStringList.
269
270         * GNUmakefile.am:
271         * WebCore.pro:
272         * WebCore.vcproj/WebCore.vcproj:
273         * WebCore.xcodeproj/project.pbxproj:
274         * WebCoreSources.bkl:
275         * editing/markup.cpp:
276         * platform/DeprecatedStringList.cpp: Removed.
277         * platform/DeprecatedStringList.h: Removed.
278         * platform/mac/DeprecatedStringListMac.mm: Removed.
279
280 2008-02-18  Darin Adler  <darin@apple.com>
281
282         Reviewed by Sam.
283
284         * css/CSSPrimitiveValueMappings.h: Add default cases to all the switch statements.
285         This will ease the way some day if we decide to use an enum instead of int; otherwise
286         we'll have a ton of "unhandled enum value" warnings here.
287
288 2008-02-18  Alp Toker  <alp@atoker.com>
289
290         Build fix for GTK+ < 2.10. Fall back to simple text clipboard copy
291         with older GTK+ versions for now.
292
293         * platform/gtk/PasteboardGtk.cpp:
294         (WebCore::Pasteboard::writeSelection):
295
296 2008-02-18  Darin Adler  <darin@apple.com>
297
298         Reviewed by Sam.
299
300         * WebCore.base.exp: Export a couple of WebCore::String functions we plan to use
301         in the future in WebKit.
302
303 2008-02-18  Darin Adler  <darin@apple.com>
304
305         Reviewed by Sam.
306
307         * DerivedSources.make: Added the scripts to the ENABLE_SVG versions of the rules
308         for CSSPropertyNames.h and CSSValueKeywords.h. Somehow that got left out, so the
309         files would not be regenerated if the scripts were changed (but would if SVG was
310         disabled).
311
312 2008-02-18  Alexey Proskuryakov  <ap@webkit.org>
313
314         Suggested by Darin.
315
316         * platform/KURL.h: (WebCore::KURL::operator const String&): Added, to avoid unexpected
317         conversion via UString (as in bug 17418).
318
319 2008-02-18  Jon Honeycutt  <jhoneycutt@apple.com>
320
321         Reviewed by Darin.
322
323         <rdar://problem/5744899> Crash in Flash when clicking "Yes" to abort
324         slow script Flash 9 dialog at http://www.kidzui.com
325
326         When navigating to a new page, we stop all outstanding PluginStreams.
327         Flash hangs in the call to NPP_URLNotify. It eventually displays the
328         "slow script" dialog, which relinquishes control to the system. While
329         this dialog is running, the request we are in the process of cancelling
330         completes, and we re-enter Flash to deliver the data. When the dialog
331         is dismissed, the internal state of Flash has changed, and Flash
332         crashes with a null dereference.
333
334         To work around this, we can defer loading before entering plug-in code,
335         so that even if a plug-in yields to the system, we won't get callbacks
336         while we're handling a callback.
337
338         * plugins/PluginStream.cpp:
339         (WebCore::PluginStream::startStream): Defers loads while calling into
340         plug-in.
341         (WebCore::PluginStream::destroyStream): Same.
342         (WebCore::PluginStream::deliverData): Same.
343         (WebCore::PluginStream::didFail): Protect 'this' from deletion by
344         destroyStream. Null out m_loader only after destroyStream returns.
345         (WebCore::PluginStream::didFinishLoading): Same.
346
347 2008-02-18  Alexey Proskuryakov  <ap@webkit.org>
348
349         Reviewed by Darin.
350
351         http://bugs.webkit.org/show_bug.cgi?id=17418
352         REGRESSION: Assertion failure dragging image (JSLock::lockCount() > 0)
353
354         * platform/win/ClipboardWin.cpp:
355         (WebCore::ClipboardWin::declareAndWriteDragImage): Explicitly convert from KURL to String,
356         as an implicit conversion uses UString and thus needs a JSLock.
357
358 2008-02-17  Sam Weinig  <sam@webkit.org>
359
360         Roll out r30360.
361
362         * loader/FrameLoader.cpp:
363         (WebCore::FrameLoader::changeLocation):
364
365 2008-02-17  Sam Weinig  <sam@webkit.org>
366
367         Mac build fix.
368
369         * WebCore.xcodeproj/project.pbxproj:
370
371 2008-02-17  Alp Toker  <alp@atoker.com>
372
373         Attempt to fix the Wx build (has been broken all weekend).
374
375         Stub out some graphics functions.
376
377         * platform/graphics/wx/GraphicsContextWx.cpp:
378         (WebCore::GraphicsContext::beginPath):
379         (WebCore::GraphicsContext::addPath):
380         * platform/graphics/wx/PathWx.cpp:
381         (WebCore::Path::isEmpty):
382
383 2008-02-17  Julien Chaffraix  <julien.chaffraix@gmail.com>
384
385         Reviewed by Alexey Proskuryakov.
386
387         http://bugs.webkit.org/show_bug.cgi?id=16989
388         bug 16989 : Add send() flag checks in XmlHttpRequest
389
390         Splitted XmlHttpRequest::abort into abort (called from JavaScript) and internalAbort that
391         perform the cancellation and is called mainly from internal methods.
392
393         Tests: http/tests/xmlhttprequest/xmlhttprequest-abort-readyState-shouldDispatchEvent.html
394                http/tests/xmlhttprequest/xmlhttprequest-abort-readyState-shouldNotDispatchEvent.html
395                http/tests/xmlhttprequest/xmlhttprequest-test-send-flag.html
396
397         * xml/XMLHttpRequest.cpp:
398         (WebCore::XMLHttpRequest::open): Now call internalAbort() and moved readyState change into method
399         (WebCore::XMLHttpRequest::send): Added m_loader check
400         (WebCore::XMLHttpRequest::abort): Now update readyState and clear the request headers as specified
401         in the spec
402
403         (WebCore::XMLHttpRequest::internalAbort): Perform cancellation internal operations (no readyState update)
404         (WebCore::XMLHttpRequest::setRequestHeader): Added m_loader check
405
406         (WebCore::XMLHttpRequest::processSyncLoadResults): Now call internalAbort() instead of abort()
407         (WebCore::XMLHttpRequest::willSendRequest): Ditto
408         (WebCore::XMLHttpRequest::cancelRequests): Ditto
409         (WebCore::XMLHttpRequest::detachRequests): Ditto
410         * xml/XMLHttpRequest.h: Added the private internalAbort method
411
412 2008-02-17  Sam Weinig  <sam@webkit.org>
413
414         Reviewed by Dan Bernstein.
415
416         Fix for http://bugs.webkit.org/show_bug.cgi?id=17365
417         document.createEvent("MessageEvent") throws NOT_SUPPORTED_ERR
418
419         - Updated fast/events/event-instanceof.html to test document.createEvent("MessageEvent").
420
421         * DerivedSources.make:
422         Generate Objective-C binding for DOMProgressEvent which was missing.
423
424         * WebCore.xcodeproj/project.pbxproj:
425         Add missing DOMProgressEvent files to the project.
426
427         * bindings/js/JSEventCustom.cpp:
428         (WebCore::toJS):
429         Clean up and add case for SVGZoomEvent that was missing.
430
431         * bindings/objc/DOMEvents.mm:
432         (+[DOMEvent _wrapEvent:WebCore::]):
433         Clean up and add cases for ProgressEvent and MessageEvent that were missing.
434
435         * dom/Document.cpp:
436         (WebCore::Document::createEvent):
437         Add case for MessageEvent.
438
439 2008-02-17  Adam Treat  <treat@kde.org>
440
441         Reviewed by Eric Seidel.
442
443         http://bugs.webkit.org/show_bug.cgi?id=17008
444         Meta refresh does not work with cache turned off
445
446         Fix for issue noticed on http://adserver.vivox.com/2
447
448         * loader/FrameLoader.cpp:
449         (WebCore::FrameLoader::changeLocation):
450
451 2008-02-17  Alp Toker  <alp@atoker.com>
452
453         Reviewed by Sam Weinig.
454
455         Fix for change made in r30355. Issue noticed by İsmail Dönmez.
456
457         Verify SSL certs by default, but allow checks to be disabled with an
458         environment variable (WEBKIT_IGNORE_SSL_ERRORS) for now.
459
460         * platform/network/curl/ResourceHandleManager.cpp:
461         (WebCore::ResourceHandleManager::startJob):
462
463 2008-02-17  Bin Chen  <binary.chen@gmail.com>
464
465         Reviewed by Alp Toker.
466
467         http://bugs.webkit.org/show_bug.cgi?id=17404
468         Bug 17404: curl certification problem
469
470         Disable SSL cert verification until we have a way of distributing
471         certs and/or reporting SSL errors to the user.
472
473         * platform/network/curl/ResourceHandleManager.cpp:
474         (WebCore::ResourceHandleManager::startJob):
475
476 2008-02-17  Alp Toker  <alp@atoker.com>
477
478         Reviewed by Mark Rowe.
479
480         DevHelp fails to load local files; URL truncated by one character.
481
482         Fix a file:// URL regression introduced in KURL.cpp r30243.
483
484         * platform/KURL.cpp:
485         (WebCore::KURL::KURL):
486
487 2008-02-17  Dan Bernstein  <mitz@apple.com>
488
489         Reviewed by Darin Adler.
490
491         - fix http://bugs.webkit.org/show_bug.cgi?id=17033
492           <rdar://problem/5709315> REGRESSION: Really long <option> causes unnecessary page scroll bars to accommodate content
493
494         Test: fast/forms/control-clip-overflow.html
495
496         * rendering/RenderFlow.cpp:
497         (WebCore::RenderFlow::lowestPosition): Account for control clipping.
498         (WebCore::RenderFlow::rightmostPosition): Ditto.
499         (WebCore::RenderFlow::leftmostPosition): Ditto.
500
501 2008-02-16  Oliver Hunt  <oliver@apple.com>
502
503         Reviewed by Eric S.
504
505         Bug 17269: Deobfuscate CanvasRenderingContext2D.cpp
506
507         Use cross-platform code to determine the dirty rects for
508         fill and stroke operations
509
510         * html/CanvasRenderingContext2D.cpp:
511         (WebCore::CanvasRenderingContext2D::fill):
512         (WebCore::CanvasRenderingContext2D::stroke):
513           Added a FIXME as code inspection shows a trivial under-painting
514           bug, although we currently ignore dirty rect tracking on canvas
515           and repaint the whole thing anyway.
516         (WebCore::CanvasRenderingContext2D::fillRect):
517
518 2008-02-16  Sam Weinig  <sam@webkit.org>
519
520         Reviewed by Darin Adler.
521
522         Take another step in the direction of getting rid of DeprecatedString
523         by moving all the to{NumericType} off of it.
524
525         - Create free functions that take a UChar* buffer and length to do
526           the string-to-number conversions.  This allows us to avoid two allocations
527           if we don't already have a String and is consistent with the design we would
528           like going forward.
529         - Since the toInt (and family) functions on DeprecatedString were slightly
530           different than the ones on String (they didn't allow trailing garbage),
531           an extra set of 'Strict' toInt functions were added that have this behavior.
532
533         * platform/graphics/Color.cpp:
534         (WebCore::Color::parseHexColor):
535         * platform/text/PlatformString.h:
536         * platform/text/String.cpp:
537         (WebCore::String::percentage):
538         (WebCore::String::toIntStrict):
539         (WebCore::String::toUIntStrict):
540         (WebCore::String::toInt64Strict):
541         (WebCore::String::toUInt64Strict):
542         (WebCore::String::toUInt):
543         (WebCore::String::toDouble):
544         (WebCore::isCharacterAllowedInBase):
545         (WebCore::toIntegralType):
546         (WebCore::lengthOfCharactersAsInteger):
547         (WebCore::charactersToIntStrict):
548         (WebCore::charactersToUIntStrict):
549         (WebCore::charactersToInt64Strict):
550         (WebCore::charactersToUInt64Strict):
551         (WebCore::charactersToInt):
552         (WebCore::charactersToUInt):
553         (WebCore::charactersToInt64):
554         (WebCore::charactersToUInt64):
555         (WebCore::charactersToDouble):
556         (WebCore::charactersToFloat):
557         * platform/text/StringImpl.cpp:
558         (WebCore::parseLength):
559         (WebCore::StringImpl::toIntStrict):
560         (WebCore::StringImpl::toUIntStrict):
561         (WebCore::StringImpl::toInt64Strict):
562         (WebCore::StringImpl::toUInt64Strict):
563         (WebCore::StringImpl::toInt):
564         (WebCore::StringImpl::toUInt):
565         (WebCore::StringImpl::toInt64):
566         (WebCore::StringImpl::toUInt64):
567         (WebCore::StringImpl::toDouble):
568         (WebCore::StringImpl::toFloat):
569         * platform/text/StringImpl.h:
570         * svg/SVGAnimationElement.cpp:
571         (WebCore::SVGAnimationElement::parseClockValue):
572         * svg/SVGFETurbulenceElement.cpp:
573         (WebCore::SVGFETurbulenceElement::parseMappedAttribute):
574
575 2008-02-16  Dan Bernstein  <mitz@apple.com>
576
577         Reviewed by Sam Weinig.
578
579         - fix fixed-pitch font measurement of control characters that render
580           as zero-width space
581
582         Test: fast/text/fixed-pitch-control-characters.html
583
584         * rendering/RenderText.cpp:
585         (WebCore::RenderText::widthFromCache):
586
587 2008-02-16  Kevin Ollivier  <kevino@theolliviers.com>
588
589         wx build fix.
590
591         * platform/graphics/wx/GraphicsContextWx.cpp:
592         (WebCore::GraphicsContext::drawImage):
593
594 2008-02-16  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
595
596         Reviewed by Alp Toker.
597
598         Cross document messaging GTK+/autotools build fix.
599
600         * GNUmakefile.am:
601
602 2008-02-15  Oliver Hunt  <oliver@apple.com>
603
604         Build fix for Qt and Cairo builds
605
606         * platform/graphics/cairo/GraphicsContextCairo.cpp:
607         (WebCore::GraphicsContext::drawImage):
608         * platform/graphics/qt/GraphicsContextQt.cpp:
609
610 2008-02-15  Oliver Hunt  <oliver@apple.com>
611
612         Reviewed by Dan B.
613
614         Bug 17269: Deobfuscate CanvasRenderingContext2D.cpp
615         Refactor CanvasRenderingContext2D::drawImage(HTMLCanvasElement) to remove evil ifdefs
616
617         Add logic draw(ImageBuffer*) method to GraphicsContext to handle
618         painting the source canvas content.
619
620         * html/CanvasRenderingContext2D.cpp:
621         (WebCore::CanvasRenderingContext2D::drawImage):
622         * html/HTMLCanvasElement.cpp:
623         (WebCore::HTMLCanvasElement::buffer):
624         * html/HTMLCanvasElement.h:
625         * platform/graphics/GraphicsContext.h:
626         * platform/graphics/cairo/GraphicsContextCairo.cpp:
627         (WebCore::GraphicsContext::drawImage):
628         * platform/graphics/cg/GraphicsContextCG.cpp:
629         (WebCore::GraphicsContext::paintBuffer):
630         (WebCore::GraphicsContext::drawImage):
631         * platform/graphics/qt/GraphicsContextQt.cpp:
632         (WebCore::GraphicsContext::drawImage):
633
634 2008-02-15  Kevin Ollivier  <kevino@theolliviers.com>
635
636         Reviewed by David Hyatt.
637
638         Using GetNativeFontInfoDesc() to generate the hash value was
639         leading to duplicate entries in the HashMap. Use the font object's
640         pointer instead.
641
642         http://bugs.webkit.org/show_bug.cgi?id=17371
643
644         * platform/graphics/wx/FontPlatformData.h:
645         (WebCore::FontPlatformData::computeHash):
646
647 2008-02-15  Ada Chan  <adachan@apple.com>
648
649         When parsing url we get from a CFURLRef, we need to null terminate 
650         the string for the case when url ends with a '/'.
651
652         Reviewed by Darin.
653
654         * platform/cf/KURLCFNet.cpp:
655         (WebCore::KURL::KURL):
656
657 2008-02-15  Brady Eidson  <beidson@apple.com>
658
659         Reviewed by Darin
660
661         Fix for <rdar://problem/5727175> and <rdar://problem/5740495> - Database threads and callback scripts can run after
662         a page has closed or loaded a new document
663
664         Deciding to make the Database I/O semantic the same as loaders/XHR when a document is shut down, this patch implements
665         a policy of shutting down the databases in a document at the same time.  This includes removing all pending transactions 
666         in a database, cutting off an queued statements in the current transaction, and preventing further callbacks from being
667         made.
668
669         No new layout tests with this patch as the current layout tests were catching this issue in a plethora of ways already
670         (crashing, unexpected exceptions and output, etc)
671
672         * dom/Document.cpp:
673         (WebCore::Document::~Document): Don't actually stop the database thread here - it better have been stopped already.
674           Add an assertion to that effect.
675         (WebCore::Document::addOpenDatabase): Add a new database handle to this Document's open database set
676         (WebCore::Document::removeOpenDatabase): Remove such a handle
677         (WebCore::Document:: stopDatabases): Call "close" on all open Database handles for this document
678         * dom/Document.h:
679
680         * loader/FrameLoader.cpp:
681         (WebCore::FrameLoader::stopLoading): In addition to canceling all resource loads and XHRs, stop all database I/O
682
683         * platform/MessageQueue.h:
684         (WebCore::MessageQueue::killed): 
685
686         * platform/sql/SQLiteTransaction.cpp:
687         (WebCore::SQLiteTransaction::stop): Added.  Explicit stop to cut off a transaction so it won't try anymore SQL activity
688         * platform/sql/SQLiteTransaction.h:
689
690         * storage/Database.cpp:
691         (WebCore::Database::Database):
692         (WebCore::Database::~Database):
693         (WebCore::Database::markAsDeletedAndClose): Check if the thread has terminated before committing to waiting on the
694           thread.
695         (WebCore::Database::stop):  Stop this database, including all queued transactions and callbacks
696         * storage/Database.h:
697         (WebCore::Database::stopped):
698
699         * storage/DatabaseThread.cpp:
700         (WebCore::DatabaseThread::terminationRequested):
701         * storage/DatabaseThread.h:
702
703         * storage/SQLTransaction.cpp:
704         (WebCore::SQLTransaction::executeSQL): Throw an exception if a new executeSQL comes in after a database is closed
705         (WebCore::SQLTransaction::checkAndHandleClosedDatabase): Added.  Clears queued statements and clear the next step
706           when the database has been closed since the last step/callback was run.  Also stops the current SQLite transaction,
707           if any
708         (WebCore::SQLTransaction::performNextStep):
709         (WebCore::SQLTransaction::performPendingCallback):
710         * storage/SQLTransaction.h:
711
712 2008-02-15  Adele Peterson  <adele@apple.com>
713
714         Reviewed by Darin.
715
716         Fix for <rdar://problem/5745072> REGRESSION (r29348): Shift + Tab does not change indent level on Google Docs
717
718         The immediate cause of this bug was that we stopped sending keypress events for the tab key when it is used to advance focus.
719         We had a special case for forward-tab in designMode, where the default behavior was to insert a tab key (or respect the keypress handler behavior).
720         This change makes the shift-tab behavior match the forward-tab behavior.
721
722         If the site had put their event handler (which does the indenting) on the keydown event, then this problem would have been avoided.
723         This is something we should look into and maybe advise the site on in the future.  However, it's a low-risk change to just make tab and shift-tab uniform 
724         in this respect, so I think this is the way to go for right now.
725
726         * page/EventHandler.cpp: (WebCore::EventHandler::defaultTabEventHandler):
727
728 2008-02-15  Anders Carlsson  <andersca@apple.com>
729
730         Reviewed by Alice.
731
732         <rdar://problem/5738678>
733         REGRESSION: "Loading" status remains when uploading file to .Mac iDisk via Safari
734         
735         Use the new CFNetwork functions for setting body parts.
736         
737         * platform/network/cf/FormDataStreamCFNet.cpp:
738         (WebCore::setHTTPBody):
739         (WebCore::httpBodyFromRequest):
740
741 2008-02-15  Geoffrey Garen  <ggaren@apple.com>
742
743         Reviewed by Anders Carlsson.
744         
745         Fixed <rdar://problem/5725429> REGRESSION (r27898): Greenfield online
746         surveys no longer work due to XMLHttpRequest exceptions
747         
748         Reverted some exception throwing code from r12194.
749         
750         To comply with the W3C draft spec, we used to throw an exception when
751         trying to access responseText and responseXML at the wrong time, but
752         that turned out to be a compatibility problem.
753         
754         Now, matching Firefox and previous versions of WebKit, we never throw
755         an exception when accessing responseText or responseXML.
756         
757         See http://www.mail-archive.com/public-webapi@w3.org/msg02756.html.
758
759         * xml/XMLHttpRequest.cpp:
760         (WebCore::XMLHttpRequest::getResponseText):
761         (WebCore::XMLHttpRequest::getResponseXML):
762
763 2008-02-15  Justin Garcia  <justin.garcia@apple.com>
764
765         Reviewed by Dan Bernstein.
766
767         <rdar://problem/5738768> REGRESSION (r30062): Crash in InlineTextBox::isLineBreak() when Undoing a replace
768         
769         Rolled out <http://trac.webkit.org/projects/webkit/changeset/29667>
770
771         * editing/SelectionController.cpp:
772         (WebCore::SelectionController::nodeWillBeRemoved):
773
774 2008-02-15  Alice Liu  <alice.liu@apple.com>
775
776         Reviewed by Darin.
777
778         Fixed <rdar://problem/5741440> REGRESSION (r28496): After deactivating JavaScript, scripts embedded in the HTML page continue to run
779      
780         Before this patch, Frame::scriptProxy() would only return null in the case that javascript was 
781         disabled and if the script proxy field wasn't set (which would only be the case if the window 
782         hasn't loaded anything yet).  Not all callers of scriptProxy() always check for a non-null return 
783         value.  Those that did check would effectively be checking if javascript was enabled before proceeding.
784         This fix consists of 2 elements: first, make sure that scriptProxy() will never return null, regardless 
785         of whether javascript is disabled.  This will mean that callers who don't check for null won't crash.  
786         Second, callers who did check for null now instead check for javascript being disabled.  This means that 
787         code paths intended for preventing javascript from being run will be making the correct check.  Another
788         minor addition to this patch is that I added a function on KSJProxy to be a shortcut for checking if javascript
789         is enabled. 
790
791         * bindings/js/JSCustomSQLStatementCallback.cpp:
792         (WebCore::JSCustomSQLStatementCallback::handleEvent):
793         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
794         (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
795         * bindings/js/JSCustomSQLTransactionCallback.cpp:
796         (WebCore::JSCustomSQLTransactionCallback::handleEvent):
797         * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
798         (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
799         * bindings/js/JSCustomVoidCallback.cpp:
800         (WebCore::JSCustomVoidCallback::handleEvent):
801         * bindings/js/JSCustomXPathNSResolver.cpp:
802         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
803         * bindings/js/ScheduledAction.cpp:
804         (WebCore::ScheduledAction::execute):
805         * bindings/js/kjs_events.cpp:
806         (WebCore::JSAbstractEventListener::handleEvent):
807         (WebCore::JSLazyEventListener::parseCode):
808         * bindings/js/kjs_html.cpp:
809         (WebCore::runtimeObjectImplementsCall):
810         * bindings/js/kjs_proxy.cpp:
811         (WebCore::KJSProxy::isEnabled):
812         * bindings/js/kjs_proxy.h:
813         * bindings/js/kjs_window.cpp:
814         (KJS::Window::retrieveWindow):
815         (KJS::Window::retrieve):
816         * dom/Document.cpp:
817         (WebCore::Document::createHTMLEventListener):
818         * dom/EventTarget.cpp:
819         (WebCore::EventTarget::dispatchGenericEvent):
820         * html/HTMLPlugInElement.cpp:
821         (WebCore::HTMLPlugInElement::createNPObject):
822         * html/HTMLScriptElement.cpp:
823         (WebCore::HTMLScriptElement::evaluateScript):
824         * html/HTMLTokenizer.cpp:
825         (WebCore::HTMLTokenizer::parseTag):
826         (WebCore::HTMLTokenizer::processToken):
827         * loader/FrameLoader.cpp:
828         (WebCore::FrameLoader::executeScript):
829         (WebCore::FrameLoader::userGestureHint):
830         (WebCore::FrameLoader::open):
831         (WebCore::FrameLoader::dispatchWindowObjectAvailable):
832         (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
833         * manual-tests/disable-javascript-reload.html: Added.
834         * page/Frame.cpp:
835         (WebCore::Frame::scriptProxy):
836         (WebCore::Frame::bindingRootObject):
837         (WebCore::Frame::windowScriptNPObject):
838         * page/Frame.h:
839         * page/InspectorController.cpp:
840         (WebCore::canPassNodeToJavaScript):
841         * page/mac/FrameMac.mm:
842         (WebCore::Frame::windowScriptObject):
843         * svg/SVGDocumentExtensions.cpp:
844         (WebCore::SVGDocumentExtensions::createSVGEventListener):
845
846 2008-02-15  Dan Bernstein  <mitz@apple.com>
847
848         Reviewed by Alexey Proskuryakov.
849
850         - WebCore part of fixing http://bugs.webkit.org/show_bug.cgi?id=17360
851           <rdar://problem/5743131> REGRESSION: mp4 file downloaded from server is downloaded as html
852
853         Test: http/tests/loading/text-content-type-with-binary-extension.html
854
855         Refined the workaround for <rdar://problem/5321972> to exclude files
856         with extensions that are known to be associated with binary MIME types.
857
858         * WebCore.xcodeproj/project.pbxproj: Added WebCoreURLResponse.{h,mm}.
859         * platform/network/mac/ResourceResponseMac.mm:
860         (WebCore::ResourceResponse::doUpdateResourceResponse): Moved the
861         workaround logic into WebCoreURLResponse.
862         * platform/network/mac/WebCoreURLResponse.h: Added.
863         * platform/network/mac/WebCoreURLResponse.mm: Added.
864         (createBinaryExtensionsSet): Returns a set of extensions known to
865         belong to MIME types of binary data.
866         (-[NSURLResponse _webcore_MIMEType]):
867         (-[NSHTTPURLResponse _webcore_MIMEType]): Forces the MIME type from
868         application/octet-stream to text/plain if that is the specified
869         Content-Type, unless the extension is in the binary extensions set.
870
871 2008-02-15  Dan Bernstein  <mitz@apple.com>
872
873         Reviewed by Dave Hyatt.
874
875         - fix http://bugs.webkit.org/show_bug.cgi?id=17306
876           <rdar://problem/5737923> Transitions between styles that have different transition-* properties behave inconsistently
877
878         * manual-tests/transitions.html: Added.
879         * page/AnimationController.cpp:
880         (WebCore::CompositeImplicitAnimation::animate): Changed to use the
881         transition properties of the current style rather than the target style.
882         (WebCore::AnimationControllerPrivate::get): Changed to not create an
883         animation if the style does not have transitions.
884         (WebCore::AnimationController::updateImplicitAnimations): Added code to
885         return the target style if the current style is not animating.
886         * rendering/RenderObject.cpp:
887         (WebCore::RenderObject::setAnimatableStyle): Changed to call
888         updateImplicitAnimations() even if the current style does not have
889         transitions, because we may be animating out of a style that had them.
890
891 2008-02-15  Alexey Proskuryakov  <ap@webkit.org>
892
893         Rubber-stamped by Darin.
894
895         Remove an obsolete WebCore readme file.
896
897         * README: Removed.
898
899 2008-02-15  Sam Weinig  <sam@webkit.org>
900
901         Reviewed by Darin Adler.
902
903         Remove more uses of DeprecatedString in preparation of getting rid of it.
904
905         * bridge/mac/WebCoreScriptDebugger.mm:
906         * css/CSSCursorImageValue.cpp:
907         (WebCore::isSVGCursorIdentifier):
908         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
909         * css/CSSStyleSelector.h:
910         * dom/Element.cpp:
911         (WebCore::Element::dump):
912         (WebCore::Element::formatForDebugger):
913         * dom/Position.cpp:
914         (WebCore::Position::debugPosition):
915         (WebCore::Position::formatForDebugger):
916         * dom/Range.cpp:
917         (WebCore::Range::formatForDebugger):
918         * dom/Text.cpp:
919         (WebCore::Text::formatForDebugger):
920         * editing/Selection.cpp:
921         (WebCore::Selection::debugPosition):
922         (WebCore::Selection::formatForDebugger):
923         * editing/SelectionController.cpp:
924         (WebCore::SelectionController::debugRenderer):
925         * editing/VisiblePosition.cpp:
926         (WebCore::VisiblePosition::debugPosition):
927         * html/HTMLTokenizer.cpp:
928         (WebCore::HTMLTokenizer::scriptHandler):
929         (WebCore::HTMLTokenizer::parseTag):
930         (WebCore::HTMLTokenizer::processToken):
931         (WebCore::HTMLTokenizer::notifyFinished):
932         * svg/SVGFontFaceElement.cpp:
933         (WebCore::mapAttributeToCSSProperty):
934
935 2008-02-15  Adam Roben  <aroben@apple.com>
936
937         * bindings/scripts/CodeGenerator.pm: Touch this to force bindings to
938         regenerate.
939
940 2008-02-15  Adam Roben  <aroben@apple.com>
941
942         Try to fix Qt/GTK+ builds
943
944         * WebCore.pro: Remove MessageEvent.{idl,cpp} from the unconditional
945         parts of this file.
946
947 2008-02-15  Darin Adler  <darin@apple.com>
948
949         - another Qt build fix
950
951         * platform/qt/KURLQt.cpp:
952         (WebCore::KURL::operator QUrl): Use the characters directly, not ascii().
953         Eliminate references to urlString.
954
955 2008-02-15  Darin Adler  <darin@apple.com>
956
957         - another Qt build fix
958
959         * platform/qt/ClipboardQt.cpp:
960         (WebCore::ClipboardQt::declareAndWriteDragImage): Use KURL instead of String.
961
962 2008-02-14  Darin Adler  <darin@apple.com>
963
964         - another round of build fixes
965
966         * platform/KURL.cpp:
967         (WebCore::appendEncodedHostname): Fix spelling (strLen, not strlen).
968         * platform/network/curl/ResourceHandleManager.cpp:
969         (WebCore::parseDataUrl): Fix a ".." typo and call data instead of characters.
970
971 2008-02-14  Darin Adler  <darin@apple.com>
972
973         - added back accidentally-removed files
974
975         * platform/DeprecatedStringList.cpp: Copied from platform/DeprecatedStringList.cpp.
976         * platform/DeprecatedStringList.h: Copied from platform/DeprecatedStringList.h.
977         * platform/mac/DeprecatedStringListMac.mm: Copied from platform/mac/DeprecatedStringListMac.mm.
978
979 2008-02-14  Darin Adler  <darin@apple.com>
980
981         - more build fixes
982
983         * platform/KURL.cpp:
984         (WebCore::appendEncodedHostname): Use String to make a QString.
985         * platform/network/cf/ResourceRequest.h:
986         (WebCore::ResourceRequest::ResourceRequest): Removed a stray deprecatedString() call.
987         * platform/network/curl/ResourceHandleManager.cpp:
988         (WebCore::parseDataUrl): Updated to String rather than DeprecatedString functions.
989
990 2008-02-14  Darin Adler  <darin@apple.com>
991
992         - next Qt build fix
993
994         * platform/network/qt/ResourceRequest.h:
995         (WebCore::ResourceRequest::ResourceRequest): Removed a stray deprecatedString() call.
996
997 2008-02-14  Darin Adler  <darin@apple.com>
998
999         - another build fix
1000
1001         * platform/network/curl/ResourceRequest.h:
1002         (WebCore::ResourceRequest::ResourceRequest): Removed a stray deprecatedString() call.
1003
1004 2008-02-14  Darin Adler  <darin@apple.com>
1005
1006         - first Qt build fix
1007
1008         * dom/XMLTokenizer.cpp:
1009         (WebCore::XMLTokenizer::endElementNs): Added a missing string() call.
1010
1011 2008-02-14  Darin Adler  <darin@apple.com>
1012
1013         Reviewed by Eric Seidel.
1014
1015         Based on work by Marvin Decker <marv.decker@gmail.com>
1016
1017         - fix http://bugs.webkit.org/show_bug.cgi?id=16538
1018           KURL should use String instead of DeprecatedString
1019
1020         - fix http://bugs.webkit.org/show_bug.cgi?id=16485
1021           DocLoader::checkForReload will crash if the URL isNull
1022           and a similar problem in IconDatabase
1023
1024         - fix http://bugs.webkit.org/show_bug.cgi?id=16487
1025           KURL doesn't preserve isNull when constructed with a DeprecatedString
1026
1027         - changed completeURL and various DOM getters to return KURL, to avoid
1028           conversion back and forth from KURL to String
1029
1030         - changed the conversion of KURL to NSURL or NSString to be automatic,
1031           to ease the use of KURL in Objective C DOM bindings, and eliminated
1032           the getNSURL function
1033
1034         - because I had to visit the DOM bindings anyway, eliminated almost all
1035           the use of the KJS namespace for things in WebCore
1036
1037         - fixed HTMLOptionElement constructor to check for undefined rather
1038           than size of the arguments array
1039
1040         - eliminated some other unnecessary uses of DeprecatedString
1041
1042         - changed String::split to take a Vector parameter instead of returning
1043           a Vector, for better performance
1044
1045         - added a couple of missing calls to do layout in SVG image handling;
1046           I was able to reproduce these only because I had broken URLs for a
1047           while -- not sure how to reproduce them now but the changes are
1048           clearly needed
1049
1050         Performance testing shows this to be at least a 1% speedup.
1051
1052         Added a new function protocols to efficiently compare protocols
1053         without case errors and a blankURL function so we don't have to
1054         code "about:blank" in multiple places in the code and don't have to
1055         construct a frash KURL each time. Moved decode_string and encode_string
1056         out of KURL and gave them clearer names.
1057
1058         Made KURL constructors explicit to highlight potentially-expensive
1059         operations and the poor semantics of KURL's constructor that takes
1060         a String.
1061
1062         * WebCore.base.exp: Updated.
1063
1064         * bindings/js/JSAttrCustom.cpp:
1065         (WebCore::JSAttr::setValue): Use protocolIs.
1066         * bindings/js/JSAudioConstructor.h: KJS namespace change.
1067         * bindings/js/JSCSSRuleCustom.cpp:
1068         (WebCore::toJS): Ditto.
1069         * bindings/js/JSCSSValueCustom.cpp:
1070         (WebCore::toJS): Ditto.
1071         * bindings/js/JSDocumentCustom.cpp:
1072         (WebCore::JSDocument::location): Ditto.
1073         (WebCore::JSDocument::setLocation): Updated for KURL change.
1074         (WebCore::toJS): KJS namespace change.
1075         * bindings/js/JSElementCustom.cpp:
1076         (WebCore::allowSettingSrcToJavascriptURL): Use protocolIs.
1077         (WebCore::JSElement::setAttribute): KJS namespace change.
1078         (WebCore::JSElement::setAttributeNode): Ditto.
1079         (WebCore::JSElement::setAttributeNS): Ditto.
1080         (WebCore::JSElement::setAttributeNodeNS): Ditto.
1081         * bindings/js/JSHTMLFrameElementCustom.cpp:
1082         (WebCore::allowSettingJavascriptURL): Use protocolIs.
1083         (WebCore::JSHTMLFrameElement::setSrc): KJS namespace change.
1084         (WebCore::JSHTMLFrameElement::setLocation): Ditto.
1085         * bindings/js/JSHTMLIFrameElementCustom.cpp:
1086         (WebCore::JSHTMLIFrameElement::setSrc): Use protocolIs.
1087         * bindings/js/JSHTMLOptionElementConstructor.cpp:
1088         (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor):
1089         (WebCore::JSHTMLOptionElementConstructor::construct): Cleaned up the
1090         structure a bit and changed checking to check for undefined rather than
1091         number of arguments.
1092         * bindings/js/JSHTMLOptionElementConstructor.h: KJS namespace change.
1093         * bindings/js/JSLocation.cpp:
1094         (WebCore::JSLocation::put): Eliminated some DeprecatedString use,
1095         and use protocolIs.
1096         (WebCore::jsLocationProtoFuncReplace): Ditto.
1097         (WebCore::jsLocationProtoFuncReload): Ditto.
1098         (WebCore::jsLocationProtoFuncAssign): Ditto.
1099         * bindings/js/JSLocation.h: KJS namespace change.
1100         * bindings/js/JSNamedNodeMapCustom.cpp:
1101         (WebCore::JSNamedNodeMap::canGetItemsForName): Ditto.
1102         (WebCore::JSNamedNodeMap::nameGetter): Ditto.
1103         * bindings/js/JSNamedNodesCollection.cpp:
1104         (WebCore::JSNamedNodesCollection::JSNamedNodesCollection): Ditto.
1105         * bindings/js/JSNamedNodesCollection.h: Ditto.
1106         * bindings/js/JSXMLHttpRequest.cpp:
1107         (WebCore::jsXMLHttpRequestPrototypeFunctionOpen): Removed
1108         DeprecatedString use.
1109         (WebCore::jsXMLHttpRequestPrototypeFunctionSend): Ditto.
1110         * bindings/js/JSXMLHttpRequest.h: Moved this class into the WebCore
1111         namespace.
1112         * bindings/js/JSXSLTProcessor.cpp: Namespace change.
1113         * bindings/js/JSXSLTProcessor.h: Ditto.
1114
1115         * bindings/js/kjs_binding.cpp: Updated for namespace change.
1116         (WebCore::jsStringOrNull): Added an overload for KURL to allow DOM
1117         classes to return KURL even if the DOM expects a string.
1118         (WebCore::jsStringOrUndefined): Ditto.
1119         (WebCore::jsStringOrFalse): Ditto.
1120         * bindings/js/kjs_binding.h: Moved everything into the WebCore
1121         namespace.
1122
1123         * bindings/js/kjs_css.h: Namespace change.
1124         * bindings/js/kjs_events.cpp: Removed an include.
1125         * bindings/js/kjs_events.h: Namespace change.
1126         * bindings/js/kjs_html.h: Namespace change.
1127
1128         * bindings/js/kjs_navigator.cpp: Moved everything into the
1129         WebCore namespace.
1130         * bindings/js/kjs_navigator.h: Ditto.
1131
1132         * bindings/js/kjs_window.cpp:
1133         (KJS::parseModalDialogFeatures): Updated for String::split change.
1134         (KJS::createWindow): Use protocolIs and removed some DeprecatedString.
1135         (KJS::Window::put): Ditto.
1136         (KJS::Window::allowsAccessFrom): Ditto.
1137         (KJS::windowProtoFuncOpen): Ditto.
1138
1139         * bindings/objc/DOM.mm:
1140         (-[DOMElement _getURLAttribute:]): Removed getNSURL call.
1141         * bindings/objc/DOMHTML.mm:
1142         (-[DOMHTMLDocument _createDocumentFragmentWithMarkupString:baseURLString:]): Ditto.
1143
1144         * bindings/scripts/CodeGeneratorCOM.pm: Updated includes so conversions from
1145         KURL will work.
1146         * bindings/scripts/CodeGeneratorJS.pm: Updated for namespace changes, and also
1147         updated includes so conversions from KURL will work.
1148         * bindings/scripts/CodeGeneratorObjC.pm: Updated includes so conversions from
1149         KURL will work.
1150
1151         * bridge/mac/WebCoreAXObject.mm:
1152         (-[WebCoreAXObject accessibilityAttributeValue:]): Removed getNSURL call.
1153         Also streamlined the logic.
1154         (AXAttributedStringAppendText): Ditto.
1155
1156         * bridge/mac/WebCoreScriptDebugger.mm:
1157         (toNSString): Tweaked.
1158         (toNSURL): Removed getNSURL call.
1159
1160         * css/CSSImageValue.cpp:
1161         (WebCore::CSSImageValue::image): Removed DeprecatedString use.
1162         * css/CSSImportRule.cpp:
1163         (WebCore::CSSImportRule::insertedIntoParent): Ditto.
1164         * css/CSSParser.cpp:
1165         (WebCore::CSSParser::parseValue): Ditto.
1166         (WebCore::CSSParser::parseContent): Ditto.
1167         (WebCore::CSSParser::parseBackgroundImage): Ditto.
1168         (WebCore::CSSParser::parseFontFaceSrc): Ditto.
1169         (WebCore::CSSParser::parseBorderImage): Ditto.
1170         * css/CSSStyleSelector.cpp:
1171         (WebCore::CSSStyleSelector::setEncodedURL): Ditto.
1172         (WebCore::checkPseudoState): Ditto.
1173         * css/CSSStyleSelector.h: Ditto.
1174
1175         * css/MediaList.cpp:
1176         (WebCore::MediaList::setMediaText): Updated for String::split change.
1177
1178         * css/StyleBase.cpp:
1179         (WebCore::StyleBase::baseURL): Return KURL.
1180         * css/StyleBase.h: DItto.
1181
1182         * dom/Document.cpp:
1183         (WebCore::Document::~Document): Updated for namespace change.
1184         (WebCore::Document::documentURI): Return KURL.
1185         (WebCore::Document::setDocumentURI): Removed DeprecatedString use.
1186         (WebCore::Document::baseURI): Return KURL.
1187         (WebCore::Document::open): Updated to use blankURL.
1188         (WebCore::Document::setURL): Take KURL.
1189         (WebCore::Document::shouldBeAllowedToLoadLocalResources): Updated for
1190         change to use KURL
1191         (WebCore::Document::setBaseURL): Take KURL.
1192         (WebCore::Document::elementSheet): Updated for KURL change.
1193         (WebCore::Document::mappedElementSheet): Ditto.
1194         (WebCore::Document::processHttpEquiv): Ditto.
1195         (WebCore::Document::recalcStyleSelector): Removed use of
1196         DeprecatedString -- also noticed some dead code here!
1197         (WebCore::Document::setCookie): Ditto.
1198         (WebCore::Document::completeURL): Return KURL.
1199         * dom/Document.h: Use KURL instead of String in a few places.
1200
1201         * dom/DocumentType.cpp:
1202         (WebCore::DocumentType::baseURI): Return KURL.
1203         * dom/DocumentType.h: Ditto.
1204
1205         * dom/Element.cpp:
1206         (WebCore::Element::baseURI): Return KURL.
1207         * dom/Element.h: Ditto.
1208
1209         * dom/Node.cpp:
1210         (WebCore::Node::setDocument): Namespace change.
1211         (WebCore::Node::baseURI): Return KURL.
1212         * dom/Node.h: Ditto.
1213
1214         * dom/ProcessingInstruction.cpp:
1215         (WebCore::ProcessingInstruction::checkStyleSheet): Updated for KURL change.
1216         * dom/StyleElement.cpp:
1217         (WebCore::StyleElement::process): Changed to use Vector<UChar> instead of
1218         String for better performance.
1219         (WebCore::StyleElement::createSheet): Removed use of DeprecateString.
1220         * dom/XMLTokenizer.cpp:
1221         (WebCore::XMLTokenizer::endElementNs): Updated for KURL change.
1222         (WebCore::XMLTokenizer::end): Ditto.
1223         (WebCore::xmlDocPtrForString): Removed use of DeprecateString.
1224         * dom/XMLTokenizer.h: Ditto.
1225
1226         * editing/markup.cpp: Moved appendString to PlatformString.h.
1227         (WebCore::appendQuotedURLAttributeValue): Use protocolIs.
1228         (WebCore::completeURLs): Removed DeprecatedString use.
1229         (WebCore::createFragmentFromMarkup): Use blankURL.
1230         (WebCore::fillContainerFromString): Removed DeprecatedString use.
1231         (WebCore::createFragmentFromText): Ditto.
1232
1233         * history/HistoryItem.cpp:
1234         (WebCore::HistoryItem::url): Removed DeprecatedString use.
1235         (WebCore::HistoryItem::originalURL): Ditto.
1236         * history/HistoryItem.h: Removed include.
1237
1238         * html/HTMLAnchorElement.cpp:
1239         (WebCore::HTMLAnchorElement::defaultEventHandler): Removed use of
1240         DeprecatedString.
1241         (WebCore::HTMLAnchorElement::href): Return KURL.
1242         (WebCore::HTMLAnchorElement::hash): Removed DeprecatedString use.
1243         (WebCore::HTMLAnchorElement::host): Ditto.
1244         (WebCore::HTMLAnchorElement::hostname): Ditto.
1245         (WebCore::HTMLAnchorElement::pathname): Ditto.
1246         (WebCore::HTMLAnchorElement::port): Ditto.
1247         (WebCore::HTMLAnchorElement::protocol): Ditto.
1248         (WebCore::HTMLAnchorElement::search): Ditto.
1249         (WebCore::HTMLAnchorElement::toString): Ditto.
1250         * html/HTMLAnchorElement.h: Ditto.
1251         * html/HTMLAppletElement.cpp:
1252         (WebCore::HTMLAppletElement::createRenderer): Updated for KURL change.
1253         * html/HTMLAreaElement.cpp:
1254         (WebCore::HTMLAreaElement::href): Return KURL.
1255         * html/HTMLAreaElement.h: Ditto.
1256         * html/HTMLBaseElement.cpp:
1257         (WebCore::HTMLBaseElement::removedFromDocument): Updated for KURL change.
1258         (WebCore::HTMLBaseElement::process): Removed DeprecatedString use.
1259         * html/HTMLBodyElement.cpp:
1260         (WebCore::HTMLBodyElement::parseMappedAttribute): Updated for KURL change.
1261         * html/HTMLEmbedElement.cpp:
1262         (WebCore::HTMLEmbedElement::parseMappedAttribute): Removed use of
1263         DeprecatedString.
1264         * html/HTMLEmbedElement.h: Removed DeprecatedString use.
1265         * html/HTMLFormElement.cpp:
1266         (WebCore::HTMLFormElement::formWouldHaveSecureSubmission): Use protocolIs.
1267         (WebCore::encodeCString): Updated for change to String::split.
1268         (WebCore::HTMLFormElement::dataEncoding): Ditto.
1269         (WebCore::HTMLFormElement::formData): Removed DeprecatedString use.
1270         (WebCore::HTMLFormElement::isMailtoForm): Use protocolIs.
1271         (WebCore::HTMLFormElement::submit): Updated for KURL change.
1272         (WebCore::HTMLFormElement::reset): Ditto.
1273         * html/HTMLFrameElementBase.cpp:
1274         (WebCore::HTMLFrameElementBase::isURLAllowed): Updated for KURL change
1275         and use equalIgnoringRef instead of doing a setRef to get the same effect.
1276         (WebCore::HTMLFrameElementBase::openURL): Use blankURL.
1277         (WebCore::HTMLFrameElementBase::location): Return KURL.
1278         (WebCore::HTMLFrameElementBase::src): Return KURL.
1279         * html/HTMLFrameElementBase.h: Ditto.
1280         * html/HTMLImageElement.cpp:
1281         (WebCore::HTMLImageElement::parseMappedAttribute): Updated for KURL change.
1282         (WebCore::HTMLImageElement::longDesc): Return KURL.
1283         (WebCore::HTMLImageElement::lowsrc): Return KURL.
1284         (WebCore::HTMLImageElement::src): Return KURL.
1285         * html/HTMLImageElement.h: Ditto. Also removed imageMap() function.
1286         * html/HTMLInputElement.cpp:
1287         (WebCore::HTMLInputElement::src): Return KURL.
1288         * html/HTMLInputElement.h: Ditto.
1289         * html/HTMLLinkElement.cpp:
1290         (WebCore::HTMLLinkElement::parseMappedAttribute): Updated for KURL change.
1291         (WebCore::HTMLLinkElement::tokenizeRelAttribute): Updated for String::split change.
1292         (WebCore::HTMLLinkElement::href): Return KURL.
1293         * html/HTMLLinkElement.h: Ditto.
1294         * html/HTMLMediaElement.cpp:
1295         (WebCore::HTMLMediaElement::src): Return KURL.
1296         (WebCore::HTMLMediaElement::pickMedia): Updated for KURL change.
1297         * html/HTMLMediaElement.h: Ditto.
1298         * html/HTMLObjectElement.cpp:
1299         (WebCore::HTMLObjectElement::isImageType): Use protocolIs.
1300         (WebCore::HTMLObjectElement::data): Return KURL.
1301         * html/HTMLObjectElement.h: Ditto.
1302         * html/HTMLOptGroupElement.cpp:
1303         (WebCore::HTMLOptGroupElement::groupLabelText): Removed DeprecatedString use.
1304         * html/HTMLParser.cpp:
1305         (WebCore::HTMLParser::reportErrorToConsole): Updated for KURL change.
1306         * html/HTMLScriptElement.cpp:
1307         (WebCore::HTMLScriptElement::insertedIntoDocument): Ditto.
1308         (WebCore::HTMLScriptElement::text): Changed to use Vector<UChar> instead of
1309         String for better performance.
1310         (WebCore::HTMLScriptElement::src): Return KURL.
1311         * html/HTMLScriptElement.h: Ditto.
1312         * html/HTMLSourceElement.cpp:
1313         (WebCore::HTMLSourceElement::src): Return KURL.
1314         * html/HTMLSourceElement.h: Ditto.
1315         * html/HTMLTableElement.cpp:
1316         (WebCore::HTMLTableElement::parseMappedAttribute): Updated for KURL change.
1317         * html/HTMLTablePartElement.cpp:
1318         (WebCore::HTMLTablePartElement::parseMappedAttribute): Updated for KURL change.
1319         * html/HTMLTextAreaElement.cpp:
1320         (WebCore::HTMLTextAreaElement::setValue): Removed DeprecatedString use.
1321         * html/HTMLTokenizer.cpp:
1322         (WebCore::HTMLTokenizer::scriptExecution): Ditto.
1323         (WebCore::HTMLTokenizer::notifyFinished): Use protocolIs.
1324         * html/HTMLVideoElement.cpp:
1325         (WebCore::HTMLVideoElement::poster): Return KURL.
1326         * html/HTMLVideoElement.h: Ditto.
1327         * html/HTMLViewSourceDocument.cpp:
1328         (WebCore::HTMLViewSourceDocument::addText): Updated for String::split change.
1329
1330         * loader/DocLoader.cpp:
1331         (WebCore::DocLoader::checkForReload): Add an explicit check for an empty URL
1332         here to avoid problems using its string as a hash table key later.
1333         (WebCore::DocLoader::requestResource): Removed DeprecatedString use.
1334
1335         * loader/FTPDirectoryDocument.cpp:
1336         (WebCore::FTPDirectoryTokenizer::createTDForFilename): Updated for KURL change.
1337         (WebCore::FTPDirectoryTokenizer::parseAndAppendOneLine): Removed use of
1338         DeprecatedString.
1339
1340         * loader/FrameLoader.cpp:
1341         (WebCore::FrameLoader::requestFrame): Use protocolIs.
1342         (WebCore::FrameLoader::loadSubframe): Use blankURL.
1343         (WebCore::FrameLoader::submitForm): Use protocolIs and removed use of
1344         DeprecatedString.
1345         (WebCore::FrameLoader::iconURL): Return KURL. Use protcolIs.
1346         (WebCore::FrameLoader::didOpenURL): Use protocolIs.
1347         (WebCore::FrameLoader::didExplicitOpen): Use blankURL.
1348         (WebCore::FrameLoader::executeIfJavaScriptURL): Use protocolIs.
1349         Update for name change to decodeURLEscapeSequences.
1350         (WebCore::FrameLoader::receivedFirstData): Updated for KURL changes.
1351         (WebCore::FrameLoader::begin): Removed DeprecatedString use.
1352         Renamed baseurl to baseURL. Updated to use KURL more.
1353         (WebCore::FrameLoader::gotoAnchor): Removed use of encodedHtmlRef
1354         function, which is no different from ref.
1355         (WebCore::FrameLoader::completeURL): Updated for KURL change.
1356         (WebCore::FrameLoader::scheduleLocationChange): Ditto.
1357         (WebCore::FrameLoader::canCachePage): Use protocolIs.
1358         (WebCore::FrameLoader::updatePolicyBaseURL): Update for KURL change.
1359         (WebCore::FrameLoader::setPolicyBaseURL): Take KURL.
1360         (WebCore::FrameLoader::startRedirectionTimer): Removed use of
1361         DeprecatedString.
1362         (WebCore::FrameLoader::load): Use protocolIs.
1363         (WebCore::FrameLoader::shouldHideReferrer): Use protocolIs.
1364         (WebCore::FrameLoader::shouldAllowNavigation): Updated for KURL change.
1365         (WebCore::FrameLoader::commitProvisionalLoad): Use blankURL.
1366         (WebCore::FrameLoader::open): Use protcolIs.
1367         (WebCore::FrameLoader::createHistoryItem): Use blankURL.
1368         (WebCore::FrameLoader::createJavaAppletWidget): Updated for KURL change.
1369         (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady): Removed
1370         DeprecatedString use.
1371         * loader/FrameLoader.h: Ditto.
1372
1373         * loader/ImageDocument.cpp:
1374         (WebCore::ImageDocument::createDocumentStructure): Updated for KURL change.
1375         * loader/PluginDocument.cpp:
1376         (WebCore::PluginTokenizer::createDocumentStructure): Ditto.
1377
1378         * loader/icon/IconDatabase.cpp:
1379         (WebCore::IconDatabase::iconForPageURL): Added a check for an empty URL
1380         before trying to use it as a hash table key.
1381
1382         * loader/icon/IconLoader.h: Tweaked includes.
1383
1384         * loader/loader.cpp:
1385         (WebCore::Loader::servePendingRequests): Use protcolIs. Also removed some
1386         code to set up a local variable that is never used (and a DeprecatedString
1387         on to boot!).
1388
1389         * loader/mac/LoaderNSURLExtras.m:
1390         (suggestedFilenameWithMIMEType): Removed unnecessary typecast.
1391
1392         * page/ContextMenuController.cpp: Removed include.
1393
1394         * page/mac/EventHandlerMac.mm:
1395         (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks):
1396         Use protocolIs.
1397
1398         * page/mac/WebCoreFrameBridge.mm:
1399         (-[WebCoreFrameBridge URLWithAttributeString:]): Removed getNSURL call.
1400         (-[WebCoreFrameBridge baseURL]): Ditto.
1401
1402         * platform/KURL.cpp:
1403         (WebCore::isSchemeFirstChar): Fixed bug in handling of values >= 0x80.
1404         (WebCore::isSchemeChar): Ditto.
1405         (WebCore::isPathSegmentEndChar): Ditto.
1406         (WebCore::hexDigitValue): Changed parameter type to UChar.
1407         (WebCore::copyASCII): Added.
1408         (WebCore::findFirstOf): Added.
1409         (WebCore::KURL::protocolIs): Added.
1410         (WebCore::KURL::KURL): Tightened logic up quite a bit. Changed parameter
1411         types from DeprecatedString to String.
1412         (WebCore::KURL::init): Changed parameter type to String. Preserved the
1413         passed-in string even if the base is invalid. Cleaned up logic to determine
1414         if the originalString should be pased in to the parse function. Simplified
1415         by calling the new parse overload that takes String in many cases.
1416         (WebCore::KURL::lastPathComponent): Return String.
1417         (WebCore::KURL::protocol): Ditto.
1418         (WebCore::KURL::host): Ditto.
1419         (WebCore::KURL::port): Changed logic to use early return for clarity.
1420         (WebCore::KURL::pass): Return String.
1421         (WebCore::KURL::user): Ditto.
1422         (WebCore::KURL::ref): Ditto.
1423         (WebCore::assertProtocolIsGood): Added.
1424         (WebCore::KURL::protocolIs): Added.
1425         (WebCore::KURL::query): Return String.
1426         (WebCore::KURL::path): Ditto.
1427         (WebCore::KURL::setProtocol): Take String.
1428         (WebCore::KURL::setHost): Ditto.
1429         (WebCore::KURL::setPort): Use String.
1430         (WebCore::KURL::setHostAndPort): Take String.
1431         (WebCore::KURL::setUser): Ditto.
1432         (WebCore::KURL::setPass): Ditto.
1433         (WebCore::KURL::setRef): Ditto.
1434         (WebCore::KURL::setQuery): Ditto.
1435         (WebCore::KURL::setPath): Ditto.
1436         (WebCore::KURL::prettyURL): Return String. Use Vector<UChar> to build it.
1437         (WebCore::decodeURLEscapeSequences): Renamed from KURL::decode_string.
1438         Return String. Use Vector<UChar> to build it.
1439         (WebCore::KURL::isLocalFile): Use protocolIs.
1440         (WebCore::KURL::parse): Added an overload that takes a String to replace
1441         the use of DeprecatedString::ascii at various call sites. Updated for
1442         name change (urlString -> m_string).
1443         (WebCore::equalIgnoringRef): Wrote a new implementation that doesn't
1444         do any allocation.
1445         (WebCore::encodeWithURLEscapeSequences): Renamed from KURL::encode_string.
1446         Return String.
1447         (WebCore::appendEncodedHostname): Added. Replaces encodeHostname and
1448         avoids the need to allocate a string.
1449         (WebCore::findHostnamesInMailToURL): Update to use findFirstOf instead of
1450         regular expressions.
1451         (WebCore::findHostnameInHierarchicalURL): Ditto.
1452         (WebCore::encodeHostnames): Use protocolIs and the other helpers above.
1453         (WebCore::encodeRelativeString): Changed to put result into a CharBuffer.
1454         (WebCore::substituteBackslashes): Updated to use String.
1455         (WebCore::KURL::copyToBuffer): Added.
1456         (WebCore::protocolIs): Added.
1457         (WebCore::blankURL): Added.
1458         (WebCore::KURL::print): Updated.
1459         * platform/KURL.h: Added a number of comments. Reorganized the header a bit.
1460         Made the string constructors explicit. Changed to use String instead of
1461         DeprecatedString. Removed encodedHTMLRef. Renamed and added a few functions.
1462
1463         * platform/cf/KURLCFNet.cpp:
1464         (WebCore::KURL::KURL): Streamlined the logic a bit.
1465         (WebCore::KURL::createCFURL): Changed to use copyToBuffer.
1466
1467         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1468         (WebCore::MediaPlayerPrivate::createQTMovie): Removed getNSURL call.
1469         Use protocolIs.
1470         * platform/mac/ClipboardMac.mm:
1471         (WebCore::ClipboardMac::declareAndWriteDragImage): Removed getNSURL call.
1472         * platform/mac/CookieJar.mm:
1473         (WebCore::cookies): Removed getNSURL call.
1474         (WebCore::setCookies): Removed getNSURL call.
1475         * platform/mac/KURLMac.mm:
1476         (WebCore::KURL::KURL): Streamlined the logic a bit.
1477         * platform/mac/PasteboardMac.mm:
1478         (WebCore::Pasteboard::writeURL): Removed getNSURL call.
1479         (WebCore::Pasteboard::writeImage): Ditto.
1480         * platform/mac/SSLKeyGeneratorMac.mm:
1481         (WebCore::signedPublicKeyAndChallengeString): Ditto.
1482
1483         * platform/network/HTTPParsers.cpp:
1484         (WebCore::filenameFromHTTPContentDisposition): Updated for String::split.
1485         * platform/network/ResourceHandle.cpp:
1486         (WebCore::ResourceHandle::portAllowed): Use protocolIs.
1487
1488         * platform/network/cf/ResourceErrorCF.cpp:
1489         (WebCore::ResourceError::operator CFErrorRef): Removed deprecatedString call.
1490         * platform/network/curl/ResourceHandleManager.cpp:
1491         (WebCore::headerCallback): Ditto.
1492         (WebCore::parseDataUrl): Use String instead of DeprecatedString.
1493         (WebCore::ResourceHandleManager::startJob): Updated for KURL changes.
1494         * platform/network/mac/ResourceErrorMac.mm:
1495         (WebCore::ResourceError::operator NSError*): Removed getNSURL call.
1496         * platform/network/mac/ResourceRequest.h:
1497         (WebCore::ResourceRequest::ResourceRequest): Removed DeprecatedString use.
1498         * platform/network/mac/ResourceRequestMac.mm:
1499         (WebCore::ResourceRequest::doUpdatePlatformRequest): Removed getNSURL call.
1500         * platform/network/mac/ResourceResponseMac.mm:
1501         (WebCore::ResourceResponse::nsURLResponse): Removed getNSURL call.
1502
1503         * platform/qt/ClipboardQt.cpp:
1504         (WebCore::ClipboardQt::writeURL): Removed deprecatedString call.
1505
1506         * platform/text/CString.h:
1507         (WebCore::CStringBuffer::length): Fixed size_t/unsigned mismatch to make it
1508         possible to compile this on Windows with higher warning level
1509
1510         * platform/text/PlatformString.h: Updated split to modify a result parameter
1511         rather than returning a Vector. Added charactersAreAllASCII and an append
1512         function that appends a String to a Vector<UChar>.
1513         * platform/text/String.cpp:
1514         (WebCore::String::split): Updated.
1515
1516         * platform/win/BString.cpp:
1517         (WebCore::BString::BString): Added conversion from KURL.
1518         * platform/win/BString.h: Ditto.
1519
1520         * platform/win/ClipboardUtilitiesWin.cpp:
1521         (WebCore::markupToCF_HTML): Removed use of deprecatedString.
1522         * platform/win/ClipboardWin.cpp:
1523         (WebCore::filesystemPathFromUrlOrTitle): Ditto.
1524         (WebCore::createGlobalHDropContent): Ditto.
1525         (WebCore::ClipboardWin::setData): Ditto.
1526         (WebCore::ClipboardWin::writeRange): Ditto.
1527         * platform/win/PasteboardWin.cpp:
1528         (WebCore::Pasteboard::writeSelection): Ditto.
1529         * plugins/PluginStream.cpp:
1530         (WebCore::PluginStream::startStream): Ditto.
1531         (WebCore::PluginStream::destroyStream): Ditto.
1532         * plugins/win/PluginViewWin.cpp:
1533         (WebCore::scriptStringIfJavaScriptURL): Ditto.
1534         (WebCore::PluginView::performRequest): Ditto.
1535         (WebCore::PluginView::PluginView): Ditto.
1536
1537         * rendering/HitTestResult.cpp:
1538         (WebCore::HitTestResult::absoluteImageURL): Removed DeprecatedString use.
1539         (WebCore::HitTestResult::absoluteLinkURL): Ditto.
1540
1541         * rendering/RenderFrameSet.cpp:
1542         (WebCore::RenderFrameSet::layOutAxis): Fixed comment wording.
1543         * rendering/RenderImage.cpp:
1544         (WebCore::RenderImage::paintReplaced): Removed use of DeperecatedString,
1545         (WebCore::RenderImage::imageMap): Changed to call useMap instead of imageMap;
1546         both do the same thing, and the first is standard DOM.
1547
1548         * rendering/RenderObject.cpp:
1549         (WebCore::RenderObject::addPDFURLRect): Rewrote and streamlined to remove
1550         DeprecatedString use.
1551         * rendering/RenderObject.h: Changed addPDFURLRect to take const IntRect&.
1552
1553         * rendering/RenderPartObject.cpp:
1554         (WebCore::isURLAllowed): Updated for KURL change and use equalIgnoringRef
1555         instead of doing a setRef to get the same effect.
1556         (WebCore::RenderPartObject::updateWidget): Updated for KURL change.
1557
1558         * rendering/RenderText.cpp:
1559         (WebCore::charactersAreAllASCII): Moved the guts to PlatformString.h.
1560
1561         * rendering/SVGRenderSupport.cpp:
1562         (WebCore::renderSubtreeToImage): Added missing call to do layout. I ran
1563         into this while doing some layout tests while URL processing was broken.
1564
1565         * rendering/SVGRenderTreeAsText.h: Removed include.
1566
1567         * svg/SVGImageLoader.cpp:
1568         (WebCore::SVGImageLoader::updateFromElement): Removed DeprecatedString use.
1569
1570         * svg/graphics/SVGImage.cpp:
1571         (WebCore::SVGImage::draw): Added missing call to do layout. I ran
1572         into this while doing some layout tests while URL processing was broken.
1573         (WebCore::SVGImage::dataChanged): Use a null URL rather than an arbitrary
1574         string for the document.
1575
1576         * xml/XMLHttpRequest.cpp:
1577         (WebCore::XMLHttpRequest::getResponseXML): Removed DeprecatedString use.
1578         (WebCore::XMLHttpRequest::urlMatchesDocumentDomain): Ditto.
1579         (WebCore::XMLHttpRequest::open): Ditto.
1580         (WebCore::XMLHttpRequest::send):  Namespace change.
1581         (WebCore::XMLHttpRequest::dropProtection): Ditto.
1582         * xml/XMLHttpRequest.h: Removed DeprecatedString use.
1583
1584         * xml/XSLImportRule.cpp:
1585         (WebCore::XSLImportRule::loadSheet): Removed DeprecatedString use.
1586         * xml/XSLStyleSheet.cpp:
1587         (WebCore::XSLStyleSheet::loadChildSheets): Ditto.
1588         (WebCore::XSLStyleSheet::loadChildSheet): Ditto.
1589         * xml/XSLStyleSheet.h: Ditto.
1590         * xml/XSLTProcessor.cpp:
1591         (WebCore::docLoaderFunc): Ditto.
1592         (WebCore::xsltStylesheetPointer): Ditto.
1593         (WebCore::xmlDocPtrFromNode): Ditto.
1594
1595 2008-02-14  Ada Chan  <adachan@apple.com>
1596
1597         <rdar://problem/5744728> Fix leaks of RegularExpression objects in Frame.cpp.
1598         
1599         Reviewed by Jon and Darin.
1600
1601         * page/Frame.cpp:
1602         (WebCore::createRegExpForLabels):
1603         (WebCore::Frame::searchForLabelsBeforeElement):
1604         (WebCore::Frame::matchLabelsAgainstElement):
1605
1606 2008-02-14  Stephanie Lewis  <slewis@apple.com>
1607
1608         Reviewed by Geoff.
1609
1610         Update order files.
1611
1612         * WebCore.order:
1613
1614 2008-02-14  Oliver Hunt  <oliver@apple.com>
1615
1616         Reviewed by Geoff G and Weinig.
1617
1618         <rdar://problem/5726608> REGRESSION (r29428): Assigning to window.status does not update status bar
1619
1620         Revert the portions of r29428 responsible for breaking the ability to
1621         set window.status
1622
1623         * page/DOMWindow.cpp:
1624         (WebCore::DOMWindow::setStatus):
1625         (WebCore::DOMWindow::defaultStatus):
1626         (WebCore::DOMWindow::setDefaultStatus):
1627         * page/DOMWindow.h:
1628         * page/DOMWindow.idl:
1629
1630 2008-02-14  Anders Carlsson  <andersca@apple.com>
1631
1632         Reviewed by Darin.
1633
1634         <rdar://problem/5721790>
1635         Crash in WebCore::DeprecatedString::operator= + 31 at news.google.com
1636         
1637         Use pointers in the cache map tables. Otherwise when we rehash, 
1638         we will end up destroying Cache objects that node lists might point to.
1639         
1640         * dom/Node.cpp:
1641         (WebCore::NodeListsNodeData::~NodeListsNodeData):
1642         (WebCore::Node::getElementsByName):
1643         (WebCore::Node::getElementsByClassName):
1644
1645 2008-02-14  Alp Toker  <alp@atoker.com>
1646
1647         Reviewed by Darin.
1648
1649         http://bugs.webkit.org/show_bug.cgi?id=17353
1650         XMLTokenizer installs global libxml2 callbacks that can break client applications
1651
1652         Patch by Mark Rowe (with a few changes).
1653
1654         The xmlRegisterInputCallbacks/xmlRegisterOutputCallbacks done at
1655         init are global so we need to make sure these callbacks only get used
1656         by XMLTokenizer and never by libxml2 calls in user applications.
1657
1658         This patch modifies the match and open functions to only apply when we
1659         are certain the caller is XMLTokenizer by checking globalDocLoader and
1660         ensuring we're on the correct thread.
1661
1662         Some possible issues remain. See the bug report for details.
1663
1664         * dom/XMLTokenizer.cpp:
1665         (WebCore::matchFunc):
1666         (WebCore::openFunc):
1667         (WebCore::createStringParser):
1668
1669 2008-02-14  Timothy Hatcher  <timothy@apple.com>
1670
1671         Reviewed by Darin Adler.
1672
1673         <rdar://problem/5743768> A deadlock during storage layout tests
1674
1675         Make sure not to hold the m_openDatabaseMapGuard mutex when calling
1676         Database::markAsDeletedAndClose(), since that can cause a deadlock
1677         during the synchronous DatabaseThread call it triggers.
1678
1679         * storage/DatabaseTracker.cpp:
1680         (WebCore::DatabaseTracker::deleteDatabaseFile):
1681
1682 2008-02-14  Adam Roben  <aroben@apple.com>
1683
1684         Turn on cross-document messaging support by default
1685
1686         Reviewed by Darin.
1687
1688         * Configurations/WebCore.xcconfig:
1689         * WebCore.pro:
1690         * WebCore.vcproj/WebCore.vcproj:
1691
1692 2008-02-14  Adam Roben  <aroben@apple.com>
1693
1694         Conditionalize cross-document messaging support
1695
1696         The cross-document messaging parts of HTML 5 are in flux and we want
1697         ports to be able to turn off the support as needed.
1698
1699         Note that the support is turned off by default right now. A subsequent
1700         commit will turn it on by default.
1701
1702         Reviewed by Darin.
1703
1704         * GNUmakefile.am:
1705         * WebCore.vcproj/build-generated-files.sh:
1706         * bindings/js/JSDOMWindowCustom.cpp:
1707         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
1708         * bindings/js/JSEventCustom.cpp:
1709         (WebCore::toJS):
1710         * dom/Event.cpp:
1711         (WebCore::Event::isMessageEvent):
1712         * dom/Event.h:
1713         * dom/MessageEvent.cpp:
1714         * dom/MessageEvent.h:
1715         * dom/MessageEvent.idl:
1716         * page/DOMWindow.cpp:
1717         (WebCore::DOMWindow::postMessage):
1718         * page/DOMWindow.h:
1719         * page/DOMWindow.idl:
1720
1721 2008-02-14  Adam Roben  <aroben@apple.com>
1722
1723         Improve the efficiency of SecurityOriginHash
1724
1725         Reviewed by Alexey.
1726
1727         * platform/SecurityOriginHash.h:
1728         (WebCore::SecurityOriginHash::hash): Now takes a const
1729         RefPtr<SecurityOrigin>& to reduce ref-count churn.
1730         (WebCore::SecurityOriginHash::equal): Ditto.
1731
1732 2008-02-13  Justin Garcia  <justin.garcia@apple.com>
1733
1734         Reviewed by Oliver Hunt.
1735
1736         Fixes the editing/deleting/5729680.html failure.  It succeeds when run by itself
1737         but fails when run with other tests because FramePrivate's m_selectionGranularity
1738         isn't reset when a Frame receives a new document.  It was also uninitialized in
1739         the constructor.
1740
1741         * loader/FrameLoader.cpp:
1742         (WebCore::FrameLoader::clear): Initialize m_selectionGranularity.
1743         * page/Frame.cpp:
1744         (WebCore::FramePrivate::FramePrivate): Ditto.
1745
1746 2008-02-13  Jon Honeycutt  <jhoneycutt@apple.com>
1747
1748         Reviewed by Anders.
1749
1750         <rdar://problem/5739282> Hangs after closing video trailer popup with
1751         VLC plugin
1752
1753         VLC hangs on NPP_Destroy if we call NPP_SetWindow with a null window
1754         handle.
1755
1756         * plugins/PluginQuirkSet.h: Added new quirk
1757         PluginQuirkDontSetNullWindowHandleOnDestroy.
1758         (WebCore::):
1759         * plugins/win/PluginViewWin.cpp:
1760         (WebCore::PluginView::stop): Selectively call NPP_SetWindow.
1761         (WebCore::PluginView::determineQuirks): Set new quirk for VLC plug-in.
1762
1763 2008-02-13  Rodney Dawes  <dobey@wayofthemonkey.com>
1764
1765         Reviewed by Alp Toker.
1766
1767         Fix non-SVG builds.
1768
1769         * css/CSSCursorImageValue.cpp:
1770
1771 2008-02-13  Justin Garcia  <justin.garcia@apple.com>
1772
1773         Reviewed by Adam Roben.
1774
1775         <rdar://problem/5729680> REGRESSION (r27873): Removing the last character of a word in Mail or Safari also removes the following space
1776         
1777         * editing/Editor.cpp:
1778         (WebCore::Editor::deleteWithDirection): Fixed a typo.
1779
1780 2008-02-13  Nikolas Zimmermann  <zimmermann@kde.org>
1781
1782         Reviewed by Oliver.
1783
1784         Actually fix the manual-tests/svg-cursor-changes.svg testcase.
1785         I only reran layout tests when fixing the last issues with the patch,
1786         instead of trying the manual-test :( Fixed.
1787
1788         * css/CSSCursorImageValue.cpp:
1789         (WebCore::CSSCursorImageValue::CSSCursorImageValue):
1790         (WebCore::CSSCursorImageValue::~CSSCursorImageValue):
1791         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
1792         * css/CSSCursorImageValue.h:
1793
1794 2008-02-13  Adam Roben  <aroben@apple.com>
1795
1796         Windows build fix
1797
1798         * css/CSSCursorImageValue.cpp: #include MathExtras.h to get roundf.
1799
1800 2008-02-13  Nikolas Zimmermann  <zimmermann@kde.org>
1801
1802         Reviewed by Darin & Eric.
1803
1804         Fixes: http://bugs.webkit.org/show_bug.cgi?id=17258 (SVG uses erroneous cursor implementation)
1805
1806         SVG cursors are not well-integrated within the CSS(3) cursor support in WebCore.
1807         SVGCursorElement duplicates CSSCursorImageValue functionality and inherits from
1808         CachedResourceClient itself, handling remote-image acquisation on its own.
1809
1810         RenderStyle's CursorData class holds "IntPoint hotSpot", "CachedImage* image"
1811         and just for SVG a 'String cursorFragmentId' (a reference to a SVG <cursor> element, by id).
1812
1813         SVG stores a reference to a SVGCursorElement, which holds a CachedImage pointer itself -
1814         instead of storing the CachedImage in the CursorData class, as it's supposed to be.
1815         Because of that several places in WebCore contain special SVG cursor handling - which
1816         is unneeded.
1817
1818         Fix all issues by integrating within CSSCursorImageValue, remove 'String cursorFragmentId'
1819         from RenderStyle, kill any special SVG cursor handling in WebCore and fix dynamic attribute
1820         changes through DOM / SVG DOM (scripting of 'x' / 'y' / 'xlink:href' attribute). Now you
1821         can script the mouse cursor location using SVG - the feature anyone has waited for.
1822
1823         Added manual test case: manual-tests/svg-cursor-changes.svg (no support for cursors in DRT)
1824
1825         * css/CSSCursorImageValue.cpp:
1826         (WebCore::isSVGCursorIdentifier):
1827         (WebCore::resourceReferencedByCursorElement):
1828         (WebCore::CSSCursorImageValue::~CSSCursorImageValue):
1829         (WebCore::CSSCursorImageValue::updateIfNeeded):
1830         (WebCore::CSSCursorImageValue::image):
1831         * css/CSSCursorImageValue.h:
1832         * css/CSSImageValue.cpp:
1833         (WebCore::CSSImageValue::image):
1834         * css/CSSImageValue.h:
1835         * css/CSSParser.cpp:
1836         (WebCore::CSSParser::parseValue):
1837         * css/CSSStyleSelector.cpp:
1838         (WebCore::CSSStyleSelector::applyProperty):
1839         * manual-tests/svg-cursor-changes.svg: Added.
1840         * page/EventHandler.cpp:
1841         (WebCore::EventHandler::selectCursor):
1842         * rendering/RenderStyle.cpp:
1843         * rendering/RenderStyle.h:
1844         (WebCore::CursorData::operator==):
1845         * svg/SVGCursorElement.cpp:
1846         (WebCore::SVGCursorElement::SVGCursorElement):
1847         (WebCore::SVGCursorElement::~SVGCursorElement):
1848         (WebCore::SVGCursorElement::parseMappedAttribute):
1849         (WebCore::SVGCursorElement::addClient):
1850         (WebCore::SVGCursorElement::removeClient):
1851         (WebCore::SVGCursorElement::svgAttributeChanged):
1852         * svg/SVGCursorElement.h:
1853         (WebCore::SVGCursorElement::isValid):
1854
1855 2008-02-13  Alp Toker  <alp@atoker.com>
1856
1857         Reviewed by Adam Roben.
1858
1859         Split out pure-cairo Font code to FontCairo.cpp.
1860
1861         Part of the ongoing work to share code with the Win port.
1862
1863         * GNUmakefile.am:
1864         * WebCore.pro:
1865         * platform/graphics/cairo/FontCairo.cpp: Added.
1866         (WebCore::Font::drawGlyphs):
1867         * platform/graphics/gtk/FontGtk.cpp:
1868
1869 2008-02-13  Kevin Ollivier <kevino@theolliviers.com>
1870
1871         Reviewed by Darin Adler.
1872
1873         Import wx/defs.h to keep windows.h from using ANSI functions
1874         (see note in file for more info) and use the 8-bit string friendly
1875         version of StringImpl::computeHash since we're passing it un UTF8
1876         string. Also, don't cache the hash result.
1877         
1878         http://bugs.webkit.org/show_bug.cgi?id=17321
1879
1880         * config.h:
1881         * platform/graphics/wx/FontPlatformData.h:
1882         (WebCore::FontPlatformData::hash):
1883         (WebCore::FontPlatformData::computeHash):
1884
1885 2008-02-13  Rodney Dawes  <dobey@wayofthemonkey.com>
1886
1887         Fix Bug 17220: Illogical dependency between PluginView and
1888         PluginDatabase
1889         
1890         <http://bugs.webkit.org/show_bug.cgi?id=17220>
1891
1892         Reviewed by Adam and Darin.
1893
1894         Rename PluginDatabase::createPluginView to PluginView::create, to make
1895         the illogical dependency between the two, logical
1896         Make PluginDatabase::findPlugin a public method
1897         Update the includes in PluginView and PluginDatabase for the change
1898
1899         * plugins/PluginDatabase.h:
1900         * plugins/PluginView.h:
1901         * plugins/win/PluginDatabaseWin.cpp:
1902         * plugins/win/PluginViewWin.cpp:
1903
1904 2008-02-13  Adam Roben  <aroben@apple.com>
1905
1906         Build fix
1907
1908         * platform/graphics/cg/GraphicsContextCG.cpp: Added missing #include.
1909
1910 2008-02-13  Matt Lilek  <webkit@mattlilek.com>
1911
1912         Not reviewed, build fix.
1913
1914         * platform/graphics/cg/GraphicsContextCG.cpp:
1915         (WebCore::GraphicsContext::paintBuffer):
1916
1917 2008-02-13  Darin Adler  <darin@apple.com>
1918
1919         - try to fix Wx build
1920
1921         * platform/graphics/wx/GraphicsContextWx.cpp:
1922         (WebCore::GraphicsContext::paintBuffer): Added.
1923
1924         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1925         (WebCore::GraphicsContext::paintBuffer): Added missing paintingDisabled() check.
1926         * platform/graphics/cg/GraphicsContextCG.cpp:
1927         (WebCore::GraphicsContext::paintBuffer): Ditto.
1928         * platform/graphics/qt/GraphicsContextQt.cpp:
1929         (WebCore::GraphicsContext::paintBuffer): Ditto.
1930
1931 2008-02-13  Darin Adler  <darin@apple.com>
1932
1933         - try to fix Wx build
1934
1935         * platform/wx/LocalizedStringsWx.cpp: Add missing include.
1936
1937 2008-02-11  Darin Adler  <darin@apple.com>
1938
1939         - roll out fix for <rdar://problem/5726016> REGRESSION: Xcode News window renders
1940           incorrectly due to visibility fix
1941
1942         Removed the Xcode-specific quirk at the request of some folks on the Xcode team.
1943
1944         * WebCore.base.exp: Rolled out change.
1945         * css/CSSMutableStyleDeclaration.cpp:
1946         (WebCore::CSSMutableStyleDeclaration::setProperty): Ditto.
1947         * page/Settings.cpp:
1948         (WebCore::Settings::Settings): Ditto. But keep the initialization of
1949         m_fontRenderingMode.
1950         (WebCore::Settings::setNeedsXcodeVisibilityQuirk): Removed.
1951         * page/Settings.h:
1952         (WebCore::Settings::needsXcodeVisibilityQuirk): Removed.
1953
1954 2008-02-13  Alexey Proskuryakov  <ap@webkit.org>
1955
1956         Reviewed by Darin.
1957
1958         <rdar://problem/5740042> Database termination issues
1959
1960         Test: storage/close-during-stress-test.html
1961
1962         * dom/Document.cpp:
1963         (WebCore::Document::databaseThread):
1964         * dom/Document.h:
1965         Don't re-create the database thread if it has been already terminated.
1966
1967         * storage/Database.h: (WebCore::Database::document): Changed m_database to a RefPtr to avoid
1968         having a hanging reference.
1969
1970         * storage/DatabaseThread.cpp:
1971         (WebCore::DatabaseThread::requestTermination):
1972
1973         * storage/SQLTransaction.cpp: (WebCore::SQLTransaction::~SQLTransaction): Removed logging.
1974         Transactions are deleted during GC, so it's usually not importatnt to know when it happens.
1975
1976 2008-02-12  Bernhard Rosenkraenzer  <bero@arklinux.org>
1977
1978         Reviewed by Darin.
1979
1980         - fix http://bugs.webkit.org/show_bug.cgi?id=17340
1981           WebCore/platform/Timer.cpp fails to build with gcc 4.3
1982
1983         * platform/Timer.cpp: Add include of <limits.h> since this file uses UINT_MAX.
1984
1985 2008-02-12  Timothy Hatcher  <timothy@apple.com>
1986
1987         Reviewed by Brady Eidson.
1988
1989         <rdar://problem/5652560> Can't delete database if the website that
1990         uses it has been opened in this session
1991
1992         Close the Database on the database thread before deleting the file.
1993         Tested and works on Windows and Mac.
1994
1995         * platform/sql/SQLiteDatabase.cpp:
1996         (WebCore::SQLiteDatabase::close): Assert we are on the opening thread.
1997         * storage/Database.cpp:
1998         (WebCore::Database::markAsDeletedAndClose): Unschedule any pending
1999         Database tasks, and start and imediate DatabaseCloseTask.
2000         (WebCore::Database::close): Close the SQLDatabase.
2001         * storage/Database.h: Renamed markAsDeleted to markAsDeletedAndClose.
2002         * storage/DatabaseTask.cpp:
2003         (WebCore::DatabaseCloseTask::DatabaseCloseTask): New task.
2004         (WebCore::DatabaseCloseTask::doPerformTask): Call close on the Database.
2005         (WebCore::DatabaseCloseTask::debugTaskName): Return "DatabaseCloseTask".
2006         * storage/DatabaseTask.h: Add DatabaseCloseTask.
2007         * storage/DatabaseTracker.cpp:
2008         (WebCore::DatabaseTracker::deleteDatabaseFile): Call the renamed
2009           markAsDeletedAndClose.
2010
2011 2008-02-12  Oliver Hunt  <oliver@apple.com>
2012
2013         Endeavour to fix qt and gtk builds
2014
2015         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2016         * platform/graphics/qt/GraphicsContextQt.cpp:
2017
2018 2008-02-12  Oliver Hunt  <oliver@apple.com>
2019
2020         Reviewed by Eric S.
2021
2022         Bug 17269: Deobfuscate CanvasRenderingContext2D.cpp
2023         Remove ifdef's from canvas paint code
2024
2025         By making GraphicsContext aware of the crossplatform ImageBuffer
2026         type we can migrate the ifdef-ified paint code in HTMLCanvasElement
2027         into platform implementations of GraphicsContext.
2028
2029         * html/HTMLCanvasElement.cpp:
2030         (WebCore::HTMLCanvasElement::paint):
2031         * platform/graphics/GraphicsContext.h:
2032         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2033         (WebCore::GraphicsContext::paintBuffer):
2034         * platform/graphics/cg/GraphicsContextCG.cpp:
2035         (WebCore::GraphicsContext::paintBuffer):
2036         * platform/graphics/qt/GraphicsContextQt.cpp:
2037         (WebCore::GraphicsContext::paintBuffer):
2038
2039 2008-02-12  Brady Eidson  <beidson@apple.com>
2040
2041         Reviewed by Darin Adler
2042
2043         Fix for <rdar://problem/5737692> - Database API needs to support SuccessCallback
2044
2045         Layout tests will come shortly with a mess of DRT changes
2046
2047         * platform/SecurityOrigin.cpp:
2048         (WebCore::SecurityOrigin::SecurityOrigin): Standardize on "empty string" instead of null string
2049           as different paths of constructing a SecurityOrigin were causing different hashes for the "same"
2050           SecurityOrigin
2051
2052         * storage/Database.cpp:
2053         (WebCore::Database::changeVersion): Pass in the successCallback
2054         (WebCore::Database::transaction): Ditto
2055
2056         * storage/SQLTransaction.cpp:
2057         (WebCore::SQLTransaction::SQLTransaction):
2058         (WebCore::SQLTransaction::debugStepName):
2059         (WebCore::SQLTransaction::performNextStep): Update ASSERTs for the new valid steps
2060         (WebCore::SQLTransaction::performPendingCallback): Ditto
2061         (WebCore::SQLTransaction::postflightAndCommit): Schedule the success callback if it exists - otherwise
2062           skip straight to cleanupAfterSuccessCallback()
2063         (WebCore::SQLTransaction::deliverSuccessCallback): Deliver success callback on the main thread, then
2064           schedule cleanupAfterSuccessCallback()
2065         (WebCore::SQLTransaction::cleanupAfterSuccessCallback): Cleanup and end the transaction
2066         (WebCore::SQLTransaction::handleTransactionError):
2067         (WebCore::SQLTransaction::deliverTransactionErrorCallback):
2068         (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback):
2069         * storage/SQLTransaction.h:
2070
2071 2008-02-12  Steve Falkenburg  <sfalken@apple.com>
2072
2073         Changes to support merged MIDL output.
2074         
2075         All COM interfaces are now generated to WebKit.h.
2076         
2077         Reviewed by Sam, Ada.
2078
2079         * bindings/scripts/CodeGeneratorCOM.pm:
2080
2081 2008-02-12  Dan Bernstein  <mitz@apple.com>
2082
2083         Reviewed by Adam Roben.
2084
2085         - fix http://bugs.webkit.org/show_bug.cgi?id=17041
2086           <rdar://problem/5709660> Eastern Asian fonts do not display without specific box in Control Panel
2087
2088         Revised the system fallback font lookup logic to use MLang font linking
2089         again. To avoid reintroducing bug 16548 and <rdar://problem/5280188>,
2090         for CJK characters, try linking based on a single code page at a time,
2091         starting with the user's default code page (if it is one of the CJK
2092         code pages) followed by the other CJK code pages in a prescribed order
2093         that matches what Firefox does.
2094
2095         * platform/graphics/win/FontCacheWin.cpp:
2096         (WebCore::getCJKCodePageMasks): Added. Returns the search order for CJK
2097         code pages, with the user's default code page first.
2098         (WebCore::currentFontContainsCharacter): Factored out of
2099         getFontDataForCharacters().
2100         (WebCore::createMLangFont): Ditto.
2101         (WebCore::FontCache::getFontDataForCharacters):
2102
2103 2008-02-12  Rodney Dawes  <dobey@wayofthemonkey.com>
2104
2105         Reviewed by Alp Toker.
2106
2107         Add -DMAEMO_CHANGES when the hildon CONFIG option is specified
2108         Add hildon-1 to PKGCONFIG when hildon CONFIG option is specified
2109
2110         * WebCore.pro:
2111
2112 2008-02-12  Dan Bernstein  <mitz@apple.com>
2113
2114         Reviewed by Timothy Hatcher.
2115
2116         - <rdar://problem/5738175> Remove workaround for <rdar://problem/5539388> from post-Tiger builds
2117
2118         * platform/graphics/cg/GraphicsContextCG.cpp:
2119         (WebCore::GraphicsContext::setShadow):
2120
2121 2008-02-12  Brady Eidson  <beidson@apple.com>
2122
2123         Release build fix
2124
2125         * storage/DatabaseTask.cpp:
2126
2127 2008-02-12  Alexey Proskuryakov <ap@webkit.org> and Brady Eidson <beidson@apple.com>
2128
2129         Reviewed by Brady.
2130
2131         http://bugs.webkit.org/show_bug.cgi?id=17177
2132         <rdar://problem/5729619> Storage tasks are getting lost
2133
2134         <rdar://problem/5729445> REGRESSION: Cannot schedule more than one transaction at a time
2135
2136         <rdar://problem/5729446> Major thread safety issue in Database code
2137
2138         * platform/MessageQueue.h: Added a thread-safe queue abstraction.
2139
2140         * WebCore.vcproj/WebCore.vcproj:
2141         * WebCore.xcodeproj/project.pbxproj:
2142         Added MessageQueue.h.
2143
2144         * dom/Document.cpp:
2145         (WebCore::Document::~Document): Fixed a race condition resulting in a hanging reference.
2146
2147         * storage/Database.idl: Fixed parameter declarations to actually match implementation
2148         (which is custom, so it got out of sync).
2149
2150         * storage/DatabaseTask.h:
2151         (WebCore::DatabaseTask::database):
2152         (WebCore::DatabaseTransactionTask::transaction):
2153         Changed tasks to hold more information internally. Added helpers for better debug logging.
2154
2155         * storage/DatabaseTask.cpp:
2156         (WebCore::DatabaseTask::DatabaseTask):
2157         (WebCore::DatabaseTask::performTask):
2158         (WebCore::DatabaseOpenTask::DatabaseOpenTask):
2159         (WebCore::DatabaseOpenTask::doPerformTask):
2160         (WebCore::DatabaseOpenTask::debugTaskName):
2161         (WebCore::DatabaseTransactionTask::DatabaseTransactionTask):
2162         (WebCore::DatabaseTransactionTask::~DatabaseTransactionTask):
2163         (WebCore::DatabaseTransactionTask::doPerformTask):
2164         (WebCore::DatabaseTransactionTask::debugTaskName):
2165         (WebCore::DatabaseTableNamesTask::DatabaseTableNamesTask):
2166         (WebCore::DatabaseTableNamesTask::doPerformTask):
2167         (WebCore::DatabaseTableNamesTask::debugTaskName):
2168         Implementation for the above.
2169
2170         (WebCore::DatabaseTask::lockForSynchronousScheduling):
2171         (WebCore::DatabaseTask::waitForSynchronousCompletion):
2172         Fixed a potential race condition: if the task completed before we entered a wait, we'd never
2173         wake up. There was an assertion guarding against this, but no actual guarantee that I could see.
2174
2175         * storage/DatabaseThread.cpp:
2176         (WebCore::DatabaseThread::DatabaseThread):
2177         (WebCore::DatabaseThread::requestTermination):
2178         (WebCore::DatabaseThread::databaseThread):
2179         (WebCore::DatabaseThread::scheduleTask):
2180         (WebCore::DatabaseThread::scheduleImmediateTask):
2181         (WebCore::DatabaseThread::unscheduleDatabaseTasks):
2182         * storage/DatabaseThread.h:
2183         Changed to use MessageQueue.
2184
2185         * storage/Database.cpp:
2186         (WebCore::guidMutex):
2187         (WebCore::guidToVersionMap):
2188         (WebCore::guidToDatabaseMap):
2189         (WebCore::Database::openDatabase):
2190         (WebCore::Database::Database):
2191         (WebCore::Database::~Database):
2192         (WebCore::Database::openAndVerifyVersion):
2193         (WebCore::guidForOriginAndName):
2194         (WebCore::Database::changeVersion):
2195         (WebCore::Database::transaction):
2196         (WebCore::Database::scheduleTransaction):
2197         (WebCore::Database::scheduleTransactionStep):
2198         (WebCore::Database::scheduleTransactionCallback):
2199         (WebCore::Database::version):
2200         (WebCore::Database::deliverPendingCallback):
2201         (WebCore::Database::tableNames):
2202         * storage/Database.h:
2203         Changed m_transactionQueue to a MessageQueue.
2204         Got rid of callback tracking - these can take care of themselves.
2205         Got rid of a DatabaseThread member, as the Document can be asked for it.
2206         Moved private static members and helpers out of the header.
2207         Lost CurrentThreadSetter debug helper on the way. We may need to re-add something like that later.
2208
2209         * storage/SQLTransaction.h:
2210         * storage/SQLTransaction.cpp: Added a lot of debug logging.
2211         (WebCore::SQLTransaction::scheduleToRunStatements): Removed "m_currentStatement = 0" assignment,
2212         as it created a race condition. Everything seems to work better without it, although a real fix
2213         would be to get rid of this variable - it's evil shared data that isn't even protected in any way.
2214
2215         * manual-tests/database-threading-stress-test-2.html: Added.
2216         * manual-tests/database-threading-stress-test.html: Added.
2217
2218 2008-02-12  Adam Roben  <aroben@apple.com>
2219
2220         Fix Bug 17328: REGRESSION (r30147): Inspector is unstyled on Windows
2221
2222         <http://bugs.webkit.org/show_bug.cgi?id=17328>
2223         <rdar://5737946>
2224
2225         Reviewed by Mitz.
2226
2227         Test: fast/loader/local-css-allowed-in-strict-mode.html
2228
2229         * platform/network/cf/ResourceResponseCFNet.cpp:
2230         (WebCore::ResourceResponse::doUpdateResourceResponse): Add a case for
2231         .css files.
2232
2233 2008-02-12  Anders Carlsson  <andersca@apple.com>
2234
2235         Build fix.
2236         
2237         * loader/ImageDocument.cpp:
2238
2239 2008-02-12  Anders Carlsson  <andersca@apple.com>
2240
2241         Reviewed by Mitz.
2242
2243         Make the code that sets the image title cross platform.
2244
2245         * WebCore.xcodeproj/project.pbxproj:
2246         Remove ImageDocumentMac.
2247         
2248         * loader/ImageDocument.cpp:
2249         (WebCore::ImageTokenizer::finish):
2250
2251         * loader/mac/ImageDocumentMac.h: Removed.
2252         * loader/mac/ImageDocumentMac.mm: Removed.
2253         
2254         * page/mac/WebCoreFrameBridge.h:
2255         * page/mac/WebCoreViewFactory.h:
2256         Move imageTitleForFilename:size from the bridge to
2257         the view factory.
2258         
2259         * platform/LocalizedStrings.h:
2260         Add imageTitle.
2261         
2262         * platform/mac/LocalizedStringsMac.mm:
2263         (WebCore::imageTitle):
2264         Have imageTitle call the view factory.
2265         
2266         * platform/qt/Localizations.cpp:
2267         (WebCore::imageTitle):
2268         * platform/wx/LocalizedStringsWx.cpp:
2269         (WebCore::imageTitle):
2270         * platform/gtk/LocalizedStringsGtk.cpp:
2271         (WebCore::imageTitle):
2272         Add stubs.
2273         
2274 2008-02-12  Oliver Hunt  <oliver@apple.com>
2275
2276         more Qt fixes
2277
2278         * html/HTMLCanvasElement.cpp:
2279         (WebCore::HTMLCanvasElement::paint):
2280
2281 2008-02-12  Oliver Hunt  <oliver@apple.com>
2282
2283         And another attempt to fixerate Qt
2284
2285         * html/HTMLCanvasElement.cpp:
2286         (WebCore::HTMLCanvasElement::paint):
2287
2288 2008-02-12  Oliver Hunt  <oliver@apple.com>
2289
2290         Attempt to fix Qt build
2291
2292         * html/HTMLCanvasElement.h:
2293
2294 2008-02-11  Oliver Hunt  <oliver@apple.com>
2295
2296         Reviewed by Alp Toker.
2297
2298         Make canvas use an ImageBuffer for its backing store
2299
2300         In order to make the canvas implementation less platform dependent
2301         (and thus reduce the current quagmire of ifdefs) we now use an 
2302         ImageBuffer to provide the backing buffer, an immediate consequence
2303         of this is to remove multiple ifdefs in the construction of the
2304         buffer.  This patch allows us to further reduce the platform
2305         dependencies in later patches.
2306
2307
2308         * html/CanvasRenderingContext2D.cpp:
2309         (WebCore::CanvasRenderingContext2D::drawImage):
2310         * html/HTMLCanvasElement.cpp:
2311         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
2312         (WebCore::HTMLCanvasElement::~HTMLCanvasElement):
2313         (WebCore::HTMLCanvasElement::reset):
2314         (WebCore::HTMLCanvasElement::paint):
2315         (WebCore::HTMLCanvasElement::createDrawingContext):
2316         (WebCore::HTMLCanvasElement::drawingContext):
2317         (WebCore::HTMLCanvasElement::createPlatformImage):
2318         * html/HTMLCanvasElement.h:
2319
2320 2008-02-11  Dan Bernstein  <mitz@apple.com>
2321
2322         Reviewed by Dave Hyatt.
2323
2324         - fix http://bugs.webkit.org/show_bug.cgi?id=17320
2325           <rdar://problem/5736953> :last-child does not set the "uses sibling rules" flag
2326
2327         Test: fast/css/last-child-style-sharing.html
2328
2329         * css/CSSGrammar.y: Changed to call setUsesSiblingRules(true) for all
2330         CSS3 selectors that require it.
2331
2332 2008-02-11  Sam Weinig  <sam@webkit.org>
2333
2334         Reviewed by Darin Adler.
2335
2336         Make the cross-domain security model more closely match Firefox by always returning the
2337         native built-in functions when accessing functions cross-domain.
2338
2339         Fixes for:
2340         <rdar://problem/5735497> Match Firefox's cross-domain model more accurately by return the built-in version of functions even if they have been overridden
2341         <rdar://problem/5735443> Crash when setting the Window objects prototype to a custom Object and then calling a method on it
2342
2343         Tests: fast/dom/Window/window-custom-prototype-crash.html
2344                fast/dom/Window/window-function-frame-getter-precedence.html
2345                http/tests/security/cross-frame-access-get-override.html
2346                http/tests/security/cross-frame-access-location-get-override.html
2347                http/tests/security/cross-frame-access-location-get.html
2348                http/tests/security/cross-frame-access-location-put.html
2349
2350         * bindings/js/JSDOMWindowCustom.cpp:
2351         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
2352         - Return the native-built in version of an cross-domain allowed function (eg. window.focus) whether or
2353           not it has been overridden, instead of undefined.
2354         - When doing findEntry lookup, use the the tables directly (JSDOMWindowPrototype::info.propHashTable) 
2355           instead of calling the virtual classInfo() method to avoid the unnecessary overhead.
2356         - Allow access to the native toString function cross-domain.  It always returns "[object Window]".
2357         - Use the new nonCachingStaticFunctionGetter when return allowed functions cross-frame so that
2358           the function an overridden function is not inadvertantly returned from the PropertyMap.\
2359
2360         * bindings/js/JSHistoryCustom.cpp:
2361         (WebCore::JSHistory::customGetOwnPropertySlot):
2362         - Implement the same model as described above for the History object, always returning the
2363           native built-in function cross-domain.
2364         - Allow access to the native toString function cross-domain.
2365         - Clean up the code to make it clear that the custom functionality is only there for cross-domain
2366           access.
2367
2368         * bindings/js/JSLocation.cpp:
2369         (WebCore::JSLocation::getOwnPropertySlot):
2370         - Match the generated classes by moving all the custom logic into a separate customGetOwnPropertySlot
2371           function.  This will help moving to a generated class in the future.
2372         (WebCore::JSLocation::customGetOwnPropertySlot):
2373         - Implement the same model as described above for the Location object, always returning the
2374           native built-in function cross-domain.
2375         - Clean up the code to make it clear that the custom functionality is only there for cross-domain
2376           access.
2377         (WebCore::JSLocation::put):
2378         (WebCore::JSLocation::deleteProperty):
2379         (WebCore::JSLocation::getPropertyNames):
2380         * bindings/js/JSLocation.h:
2381         - Clean up to match the rest of the file a little better.
2382
2383         * bindings/js/kjs_binding.cpp:
2384         (WebCore::allowsAccessFromFrame):
2385         (WebCore::printErrorMessageForFrame):
2386         (WebCore::nonCachingStaticFunctionGetter):
2387         (WebCore::objectToStringFunctionGetter):
2388         * bindings/js/kjs_binding.h:
2389         - Put common functionality related to cross-domain access here to serve as a central shared point.
2390           This includes moving and augmenting the allowsAccessFromFrame method that was in both JSHistoryCustom.cpp
2391           and JSLocation.cpp.
2392
2393         * bindings/js/kjs_dom.cpp:
2394         (WebCore::checkNodeSecurity):
2395         - Use the new allowsAccessFromFrame method.
2396
2397         * bindings/js/kjs_window.cpp:
2398         (KJS::Window::childFrameGetter): Cleanup.
2399         (KJS::Window::namedItemGetter): Cleanup.
2400         (KJS::Window::getOwnPropertySlot):
2401         - Do the prototype lookup early to match Firefox in having function lookup have a higher precedence
2402           than the index or shortcut name getters.
2403         - Cleanup function to make it more understandable and slightly more efficient.
2404         (KJS::Window::allowsAccessFrom):
2405         - Add a new variant of this method that takes a reference to a String, which, on failure, will
2406           contain the error message to print out.  The caller can then pass this to printErrorMessage.
2407           This allows for code to check allowsAccessFrom and act on the result without printing out the
2408           error message. For convenience, a version with out the String parameter has been left which 
2409           prints out the message automatically.
2410         (KJS::Window::printErrorMessage):
2411         * bindings/js/kjs_window.h:
2412
2413 2008-02-11  Darin Adler  <darin@apple.com>
2414
2415         Reviewed by Mitz.
2416
2417         - fix <rdar://problem/5726016> REGRESSION: Xcode News window renders
2418           incorrectly due to visibility fix
2419
2420         Added an Xcode-specific quirk.
2421
2422         * WebCore.base.exp: Added export for new Settings function.
2423         * css/CSSMutableStyleDeclaration.cpp:
2424         (WebCore::CSSMutableStyleDeclaration::setProperty): Here's the crazy quirk.
2425         If you try to change the visibilty on a node with the class name tab_content,
2426         instead it will use display:none.
2427         * page/Settings.cpp:
2428         (WebCore::Settings::Settings): Initialize m_needsXcodeVisibilityQuirk. Also
2429         initialize m_fontRenderingMode! This seems like it was a bug before, but we
2430         probably were getting lucky and always getting 0 on Windows, which is the
2431         only place the setting matters.
2432         (WebCore::Settings::setNeedsXcodeVisibilityQuirk): Added.
2433         * page/Settings.h:
2434         (WebCore::Settings::needsXcodeVisibilityQuirk): Added.
2435
2436 2008-02-11  Timothy Hatcher  <timothy@apple.com>
2437
2438         Reviewed by Brady Eidson.
2439
2440         <rdar://problem/5733069> Many m_quotaMap uses do not hold the m_quotaMapGuard
2441
2442         * storage/DatabaseTracker.cpp:
2443         (WebCore::DatabaseTracker::hasEntryForOrigin): Hold m_quotaMapGuard when using m_quotaMap.
2444         (WebCore::DatabaseTracker::origins): Ditto.
2445         (WebCore::DatabaseTracker::setQuota): Ditto.
2446         (WebCore::DatabaseTracker::deleteAllDatabases): Call origins() and itterate over the
2447         origins to call deleteOrigin().
2448         (WebCore::DatabaseTracker::deleteOrigin): Hold m_quotaMapGuard when using m_quotaMap.
2449
2450 2008-02-11  David Hyatt  <hyatt@apple.com>
2451
2452         Fix for bug 17286, crash accessing a null RenderStyle.  Add a simple null check.
2453
2454         Reviewed by aroben
2455
2456         Added fast/css/empty-generated-content.html
2457
2458         * css/CSSStyleSelector.cpp:
2459         (WebCore::CSSStyleSelector::checkOneSelector):
2460
2461 2008-02-11  Rob Buis  <buis@kde.org>
2462
2463         Reviewed by David Kilzer.
2464
2465         http://bugs.webkit.org/show_bug.cgi?id=17201
2466         Bug 17201: Use RefPtr in CSSParser::parseFont() to get rid of goto silliness
2467
2468         Gets rid of goto usage in parseFont.
2469
2470         * css/CSSParser.cpp:
2471         (WebCore::CSSParser::parseFont):
2472
2473 2008-02-11  David Hyatt  <hyatt@apple.com>
2474
2475         Fix for bug 17298, Acid3 text should be black and not red.  Make sure stylesheets with the wrong MIME type
2476         are not accepted in strict mode.
2477
2478         Reviewed by darin
2479
2480         Added http/tests/misc/css-reject-in-strict-mode.html
2481
2482         * css/CSSImportRule.cpp:
2483         (WebCore::CSSImportRule::setCSSStyleSheet):
2484         * css/CSSImportRule.h:
2485         * dom/Document.cpp:
2486         (WebCore::Document::setCSSStyleSheet):
2487         * dom/Document.h:
2488         * dom/ProcessingInstruction.cpp:
2489         (WebCore::ProcessingInstruction::setCSSStyleSheet):
2490         * dom/ProcessingInstruction.h:
2491         * html/HTMLLinkElement.cpp:
2492         (WebCore::HTMLLinkElement::setCSSStyleSheet):
2493         * html/HTMLLinkElement.h:
2494         * html/HTMLMediaElement.cpp:
2495         (WebCore::HTMLMediaElement::pickMedia):
2496         * loader/CachedCSSStyleSheet.cpp:
2497         (WebCore::CachedCSSStyleSheet::ref):
2498         (WebCore::CachedCSSStyleSheet::checkNotify):
2499         (WebCore::CachedCSSStyleSheet::canUseSheet):
2500         * loader/CachedCSSStyleSheet.h:
2501         (WebCore::CachedCSSStyleSheet::sheetText):
2502         * loader/CachedResourceClient.h:
2503         (WebCore::CachedResourceClient::setCSSStyleSheet):
2504         * loader/mac/UserStyleSheetLoader.cpp:
2505         (UserStyleSheetLoader::setCSSStyleSheet):
2506         * loader/mac/UserStyleSheetLoader.h:
2507
2508 2008-02-11  Adam Roben  <aroben@apple.com>
2509
2510         Fix Bug 14316: Inspector's Console truncates long strings
2511
2512         <http://bugs.webkit.org/show_bug.cgi?id=14316>
2513         <rdar://5357695>
2514
2515         We no longer call Object.describe to format all the output of commands
2516         enetered into the Console. The ConsolePanel object now has a set of
2517         formatting functions that append a formatted representation of the
2518         passed-in object to the passed-in container node.
2519
2520         Reviewed by Sam.
2521
2522         * page/inspector/ConsolePanel.js:
2523         (WebInspector.ConsolePanel._onEnterPressed): Updated for rename of
2524         _outputToNode to _format.
2525         (WebInspector.ConsolePanel._format): Renamed from _outputToNode. Use
2526         Object.type to get the type of the object, then call the appropriate
2527         formatting function.
2528         (WebInspector.ConsolePanel._formatvalue): Added.
2529         (WebInspector.ConsolePanel._formatstring): Added. This function
2530         contains the actual fix for the bug, since it doesn't truncate the
2531         string no matter how long it is.
2532         (WebInspector.ConsolePanel._formatregexp): Added.
2533         (WebInspector.ConsolePanel._formatarray): Added. This is a bit more
2534         functional than Object.describe for arrays, since it recursively
2535         formats each item in the array. One advantage of this is that Nodes in
2536         arrays will be linkified instead of just turning into "[Object
2537         HTMLBodyElement]" or similar.
2538         (WebInspector.ConsolePanel._formatnode): Added.
2539         (WebInspector.ConsolePanel._formatobject): Added.
2540         (WebInspector.ConsolePanel.
2541         * page/inspector/utilities.js:
2542         (Object.type): Added. Code was pulled out of Object.describe and
2543         reorganized slightly.
2544         (Object.describe): Call Object.type. There should be no change in
2545         behavior of this function.
2546
2547 2008-02-11  Alp Toker  <alp@atoker.com>
2548
2549         Wx build fix for breakage introduced in r30142. Spotted by Darin.
2550
2551         * platform/network/curl/ResourceHandleManager.cpp:
2552         (WebCore::parseDataUrl):
2553
2554 2008-02-11  Brent Fulgham  <bfulgham@gmail.com>
2555
2556         Reviewed and tweaked by Darin
2557
2558         - http://bugs.webkit.org/show_bug.cgi?id=17299
2559           a couple compilation fixes for Cairo/Win32 configuration
2560
2561         * platform/graphics/cairo/ImageSourceCairo.cpp:
2562         (WebCore::createDecoder): Turn off XBMImageDecoder for PLATFORM(WIN) configuration.
2563         * rendering/RenderThemeWin.cpp:
2564         (WebCore::prepareForDrawing): Added IntRect parameter.
2565         (WebCore::doneDrawing): Ditto.
2566         (WebCore::RenderThemeWin::paintButton): Ditto.
2567         (WebCore::RenderThemeWin::paintTextField): Ditto.
2568         (WebCore::RenderThemeWin::paintMenuListButton): Ditto.
2569         (WebCore::RenderThemeWin::systemFont): Added.
2570
2571 2008-02-11  Alp Toker  <alp@atoker.com>
2572
2573         Reviewed by Alexey.
2574
2575         Acid3 data URL parsing fix for the GTK+ port.
2576
2577         Avoid WebCore's base64Decode() when possible since it's not a
2578         general-purpose Base64 decoder and fails on newlines.
2579
2580         * platform/network/curl/ResourceHandleManager.cpp:
2581         (WebCore::parseDataUrl):
2582
2583 2008-02-11  Darin Adler  <darin@apple.com>
2584
2585         - another Qt build fix
2586
2587         * platform/qt/PopupMenuQt.cpp:
2588         (WebCore::PopupMenu::PopupMenu): Added explicit RefCounted constructor.
2589
2590 2008-02-10  Darin Adler  <darin@apple.com>
2591
2592         - another Qt build fix (wish the Qt bot wouldn't stop on the first error)
2593
2594         * platform/qt/FileChooserQt.cpp:
2595         (WebCore::FileChooser::FileChooser): Added explicit RefCounted constructor.
2596
2597 2008-02-10  Darin Adler  <darin@apple.com>
2598
2599         - another Qt build fix
2600
2601         * platform/graphics/qt/IconQt.cpp:
2602         (WebCore::Icon::Icon): Added explicit RefCounted constructor.
2603
2604 2008-02-10  Alp Toker  <alp@atoker.com>
2605
2606         Another Win build fix for r30133 breakage.
2607
2608         * plugins/win/PluginPackageWin.cpp:
2609         (WebCore::PluginPackage::PluginPackage):
2610
2611 2008-02-10  Alp Toker  <alp@atoker.com>
2612
2613         Build fix GTK+ and prospective build fix for Win breakage introduced
2614         in r30133.
2615
2616         * platform/Cursor.h:
2617         (WebCore::SharedCursor::SharedCursor):
2618         * platform/graphics/gtk/IconGtk.cpp:
2619         (WebCore::Icon::Icon):
2620         * platform/gtk/FileChooserGtk.cpp:
2621         (WebCore::FileChooser::FileChooser):
2622         * platform/gtk/PopupMenuGtk.cpp:
2623         (WebCore::PopupMenu::PopupMenu):
2624
2625 2008-02-10  Darin Adler  <darin@apple.com>
2626
2627         - try to fix Win, Qt, GTK, and WX builds
2628
2629         * platform/Cursor.h:
2630         (WebCore::SharedCursor::SharedCursor): Added explicit RefCounted constructor.
2631         * platform/graphics/win/IconWin.cpp:
2632         (WebCore::Icon::Icon): Ditto.
2633         * platform/win/FileChooserWin.cpp:
2634         (WebCore::FileChooser::FileChooser): Ditto.
2635         * platform/win/PopupMenuWin.cpp:
2636         (WebCore::PopupMenu::PopupMenu): Ditto.
2637         * platform/wx/TemporaryLinkStubs.cpp:
2638         (FileChooser::FileChooser): Ditto.
2639         (PopupMenu::PopupMenu): Ditto.
2640         (Icon::Icon): Ditto.
2641         * plugins/PluginStream.cpp:
2642         (WebCore::PluginStream::PluginStream): Ditto.
2643
2644 2008-02-10  David Hyatt  <hyatt@apple.com>
2645
2646         Fix for bug 17082, cssRules should be live.
2647
2648         Reviewed by olliej
2649
2650         Added fast/css/live-cssrules.html
2651
2652         * css/CSSRuleList.cpp:
2653         (WebCore::CSSRuleList::CSSRuleList):
2654         (WebCore::CSSRuleList::length):
2655         (WebCore::CSSRuleList::item):
2656         (WebCore::CSSRuleList::deleteRule):
2657         (WebCore::CSSRuleList::insertRule):
2658         * css/CSSRuleList.h:
2659
2660 2008-02-10  David Hyatt  <hyatt@apple.com>
2661
2662         Fix for bug 17253.  <iframe> contents need to be reflected into the DOM as a single text node.
2663
2664         Reviewed by olliej
2665
2666         fast/frames/iframe-text-contents.html
2667
2668         * html/HTMLParser.cpp:
2669         (WebCore::HTMLParser::getNode):
2670         * html/HTMLTokenizer.cpp:
2671         (WebCore::HTMLTokenizer::parseSpecial):
2672         (WebCore::HTMLTokenizer::parseComment):
2673         (WebCore::HTMLTokenizer::parseTag):
2674         * html/HTMLTokenizer.h:
2675         (WebCore::HTMLTokenizer::State::inIFrame):
2676         (WebCore::HTMLTokenizer::State::setInIFrame):
2677         (WebCore::HTMLTokenizer::State::inAnySpecial):
2678         (WebCore::HTMLTokenizer::State::needsSpecialWriteHandling):
2679         (WebCore::HTMLTokenizer::State::):
2680
2681 2008-02-10  Andrew Wellington  <proton@wiretapped.net>
2682
2683         Reviewed and tweaked by Darin.
2684         
2685         DOMRange.surroundContents throws wrong exception (Acid3 bug)
2686         http://bugs.webkit.org/show_bug.cgi?id=16749
2687         
2688         Throw BAD_BOUNDARYPOINTS_ERR if attempting to split a non-text node that
2689         has offsets in characters.
2690
2691         * dom/Range.cpp:
2692         (WebCore::Range::surroundContents):
2693
2694 2008-02-10  Darin Adler  <darin@apple.com>
2695
2696         Reviewed by Eric.
2697
2698         - http://bugs.webkit.org/show_bug.cgi?id=17256
2699           Make clients of RefCounted explicitly set the count to 0.
2700
2701         * bindings/js/JSSVGPODTypeWrapper.h:
2702         (WebCore::JSSVGPODTypeWrapper::JSSVGPODTypeWrapper):
2703         * css/CSSFontFace.h:
2704         (WebCore::CSSFontFace::CSSFontFace):
2705         * css/CSSRuleList.cpp:
2706         (WebCore::CSSRuleList::CSSRuleList):
2707         * css/CSSSegmentedFontFace.cpp:
2708         (WebCore::CSSSegmentedFontFace::CSSSegmentedFontFace):
2709         * css/Counter.h:
2710         (WebCore::Counter::Counter):
2711         * css/Pair.h:
2712         (WebCore::Pair::Pair):
2713         * css/Rect.h:
2714         (WebCore::Rect::Rect):
2715         * css/StyleBase.h:
2716         (WebCore::StyleBase::StyleBase):
2717         * css/StyleSheetList.cpp:
2718         (WebCore::StyleSheetList::StyleSheetList):
2719         * dom/Attr.cpp:
2720         (WebCore::Attr::Attr):
2721         * dom/Attr.h:
2722         * dom/Attribute.h:
2723         (WebCore::Attribute::Attribute):
2724         * dom/Clipboard.cpp:
2725         (WebCore::Clipboard::Clipboard):
2726         * dom/DOMImplementation.h:
2727         (WebCore::DOMImplementation::DOMImplementation):
2728         * dom/Event.cpp:
2729         (WebCore::Event::Event):
2730         * dom/EventListener.h:
2731         (WebCore::EventListener::EventListener):
2732         * dom/ExceptionBase.cpp:
2733         (WebCore::ExceptionBase::ExceptionBase):
2734         * dom/NamedAttrMap.h:
2735         (WebCore::NamedAttrMap::insertAttribute):
2736         * dom/NamedNodeMap.h:
2737         (WebCore::NamedNodeMap::NamedNodeMap):
2738         * dom/NodeFilter.h:
2739         (WebCore::NodeFilter::NodeFilter):
2740         * dom/NodeFilterCondition.h:
2741         (WebCore::NodeFilterCondition::NodeFilterCondition):
2742         * dom/NodeList.h:
2743         (WebCore::NodeList::NodeList):
2744         * dom/QualifiedName.h:
2745         (WebCore::QualifiedName::QualifiedNameImpl::QualifiedNameImpl):
2746         (WebCore::QualifiedName::ref):
2747         * dom/Range.cpp:
2748         (WebCore::Range::Range):
2749         * dom/RegisteredEventListener.cpp:
2750         (WebCore::RegisteredEventListener::RegisteredEventListener):
2751         * dom/StyledElement.h:
2752         * dom/Traversal.cpp:
2753         (WebCore::Traversal::Traversal):
2754         * editing/EditCommand.cpp:
2755         (WebCore::EditCommand::EditCommand):
2756         * history/BackForwardList.cpp:
2757         (WebCore::BackForwardList::BackForwardList):
2758         * history/CachedPage.cpp:
2759         (WebCore::CachedPage::CachedPage):
2760         * history/HistoryItem.cpp:
2761         (WebCore::HistoryItem::HistoryItem):
2762         * html/CanvasGradient.cpp:
2763         (WebCore::CanvasGradient::CanvasGradient):
2764         * html/CanvasPattern.cpp:
2765         (WebCore::CanvasPattern::CanvasPattern):
2766         * html/CanvasRenderingContext2D.cpp:
2767         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
2768         * html/CanvasStyle.cpp:
2769         (WebCore::CanvasStyle::CanvasStyle):
2770         * html/HTMLCollection.cpp:
2771         (WebCore::HTMLCollection::HTMLCollection):
2772         * html/MediaError.h:
2773         (WebCore::MediaError::MediaError):
2774         * html/TimeRanges.cpp:
2775         (TimeRanges::TimeRanges):
2776         * html/TimeRanges.h:
2777         (WebCore::TimeRanges::TimeRanges):
2778         * html/VoidCallback.h:
2779         (WebCore::VoidCallback::VoidCallback):
2780         * loader/DocumentLoader.cpp:
2781         (WebCore::DocumentLoader::DocumentLoader):
2782         * loader/FormState.cpp:
2783         (WebCore::FormState::FormState):
2784         * loader/ResourceLoader.cpp:
2785         (WebCore::ResourceLoader::ResourceLoader):
2786         * loader/TextResourceDecoder.cpp:
2787         (WebCore::TextResourceDecoder::TextResourceDecoder):
2788         * loader/icon/IconRecord.cpp:
2789         (WebCore::IconRecord::IconRecord):
2790         * page/BarInfo.cpp:
2791         (WebCore::BarInfo::BarInfo):
2792         * page/Console.cpp:
2793         (WebCore::Console::Console):
2794         * page/DOMSelection.cpp:
2795         (WebCore::DOMSelection::DOMSelection):
2796         * page/DOMWindow.cpp:
2797         (WebCore::DOMWindow::DOMWindow):
2798         * page/Frame.cpp:
2799         (WebCore::Frame::Frame):
2800         * page/History.cpp:
2801         (WebCore::History::History):
2802         * page/InspectorController.cpp:
2803         (WebCore::InspectorResource::InspectorResource):
2804         (WebCore::InspectorDatabaseResource::InspectorDatabaseResource):
2805         * page/Plugin.h:
2806         (WebCore::Plugin::Plugin):
2807         * page/Screen.cpp:
2808         (WebCore::Screen::Screen):
2809         * platform/ArrayImpl.cpp:
2810         (WebCore::ArrayImpl::ArrayPrivate::ArrayPrivate):
2811         * platform/DeprecatedValueListImpl.cpp:
2812         (WebCore::DeprecatedValueListImpl::Private::Private):
2813         * platform/ScrollBar.cpp:
2814         (WebCore::Scrollbar::Scrollbar):
2815         * platform/SharedBuffer.cpp:
2816         (WebCore::SharedBuffer::SharedBuffer):
2817         * platform/graphics/FontFallbackList.cpp:
2818         (WebCore::FontFallbackList::FontFallbackList):
2819         * platform/graphics/FontFamily.cpp:
2820         (WebCore::FontFamily::FontFamily):
2821         * platform/graphics/FontFamily.h:
2822         (WebCore::FontFamily::FontFamily):
2823         * platform/graphics/FontSelector.h:
2824         (WebCore::FontSelector::FontSelector):
2825         (WebCore::FontSelector::~FontSelector):
2826         * platform/graphics/GlyphPageTreeNode.h:
2827         (WebCore::GlyphPage::GlyphPage):
2828         * platform/graphics/mac/IconMac.mm:
2829         (WebCore::Icon::Icon):
2830         * platform/mac/FileChooserMac.mm:
2831         (WebCore::FileChooser::FileChooser):
2832         * platform/mac/PopupMenuMac.mm:
2833         (WebCore::PopupMenu::PopupMenu):
2834         * platform/mac/SharedBufferMac.mm:
2835         (WebCore::SharedBuffer::SharedBuffer):
2836         * platform/network/FormData.cpp:
2837         (WebCore::FormData::FormData):
2838         * platform/network/FormData.h:
2839         (WebCore::FormData::FormData):
2840         * platform/network/ResourceHandle.cpp:
2841         (WebCore::ResourceHandle::ResourceHandle):
2842         * platform/text/CString.h:
2843         (WebCore::CStringBuffer::CStringBuffer):
2844         * platform/text/RegularExpression.cpp:
2845         (WebCore::RegularExpression::Private::Private):
2846         * rendering/RenderStyle.cpp:
2847         (WebCore::StyleSurroundData::StyleSurroundData):
2848         (WebCore::StyleBoxData::StyleBoxData):
2849         (WebCore::StyleVisualData::StyleVisualData):
2850         (WebCore::StyleBackgroundData::StyleBackgroundData):
2851         (WebCore::StyleMarqueeData::StyleMarqueeData):
2852         (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
2853         (WebCore::StyleMultiColData::StyleMultiColData):
2854         (WebCore::StyleTransformData::StyleTransformData):
2855         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2856         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
2857         (WebCore::StyleInheritedData::StyleInheritedData):
2858         * rendering/RenderStyle.h:
2859         (WebCore::TransformOperation::TransformOperation):
2860         (WebCore::CursorList::CursorList):
2861         * rendering/SVGCharacterLayoutInfo.h:
2862         (WebCore::SVGCharOnPath::SVGCharOnPath):
2863         * rendering/SVGRenderStyle.cpp:
2864         (WebCore::SVGRenderStyle::SVGRenderStyle):
2865         * rendering/SVGRenderStyle.h:
2866         (WebCore::SVGRenderStyle::SVGRenderStyle):
2867         * rendering/SVGRenderStyleDefs.cpp:
2868         (StyleFillData::StyleFillData):
2869         (StyleStrokeData::StyleStrokeData):
2870         (StyleStopData::StyleStopData):
2871         (StyleTextData::StyleTextData):
2872         (StyleClipData::StyleClipData):
2873         (StyleMaskData::StyleMaskData):
2874         (StyleMarkerData::StyleMarkerData):
2875         (StyleMiscData::StyleMiscData):
2876         * storage/SQLResultSetRowList.h:
2877         (WebCore::SQLResultSetRowList::SQLResultSetRowList):
2878         * svg/SVGAngle.cpp:
2879         (WebCore::SVGAngle::SVGAngle):
2880         * svg/SVGAnimatedTemplate.h:
2881         (WebCore::SVGAnimatedTemplate::SVGAnimatedTemplate):
2882         * svg/SVGElementInstanceList.cpp:
2883         (WebCore::SVGElementInstanceList::SVGElementInstanceList):
2884         * svg/SVGList.h:
2885         (WebCore::SVGList::SVGList):
2886         (WebCore::SVGPODListItem::SVGPODListItem):
2887         * svg/SVGPathSeg.h:
2888         (WebCore::SVGPathSeg::SVGPathSeg):
2889         * svg/SVGPreserveAspectRatio.cpp:
2890         (WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio):
2891         * svg/SVGRenderingIntent.h:
2892         (WebCore::SVGRenderingIntent::SVGRenderingIntent):
2893         * svg/SVGUnitTypes.h:
2894         (WebCore::SVGUnitTypes::SVGUnitTypes):
2895         * svg/graphics/SVGPaintServerGradient.h:
2896         (WebCore::SVGPaintServerGradient::SharedStopCache::SharedStopCache):
2897         * svg/graphics/SVGResource.cpp:
2898         (WebCore::SVGResource::SVGResource):
2899         * xml/DOMParser.h:
2900         (WebCore::DOMParser::DOMParser):
2901         * xml/XMLHttpRequest.cpp:
2902         (WebCore::XMLHttpRequest::XMLHttpRequest):
2903         * xml/XMLSerializer.h:
2904         (WebCore::XMLSerializer::XMLSerializer):
2905         * xml/XPathEvaluator.h:
2906         (WebCore::XPathEvaluator::XPathEvaluator):
2907         * xml/XPathExpression.h:
2908         (WebCore::XPathExpression::XPathExpression):
2909         * xml/XPathNSResolver.h:
2910         (WebCore::XPathNSResolver::XPathNSResolver):
2911         * xml/XPathResult.cpp:
2912         (WebCore::XPathResult::XPathResult):
2913         * xml/XPathValue.h:
2914         (WebCore::XPath::ValueData::ValueData):
2915         * xml/XSLTProcessor.h:
2916         (WebCore::XSLTProcessor::XSLTProcessor):
2917
2918 2008-02-09  Kevin Ollivier  <kevino@theolliviers.com>
2919
2920         Reviewed by Eric Seidel.
2921
2922         Calling select() when all the file descriptors are NULL
2923         stops the file download on Windows. As a result, do not
2924         call select() when there are no valid descriptors.
2925
2926         http://bugs.webkit.org/show_bug.cgi?id=17178
2927
2928         * platform/network/curl/ResourceHandleManager.cpp:
2929         (WebCore::ResourceHandleManager::downloadTimerCallback):
2930
2931 2008-02-09  Dan Bernstein  <mitz@apple.com>
2932
2933         Reviewed by Sam Weinig.
2934
2935         - fix http://bugs.webkit.org/show_bug.cgi?id=17259
2936           Element::recalcStyle() needlessly null-checks the result of styleForElement()
2937
2938         * dom/Element.cpp:
2939         (WebCore::Element::recalcStyle): Removed unneeded null checks.
2940         styleForElement() can never return null.
2941
2942 2008-02-09  David Hyatt  <hyatt@apple.com>
2943
2944         Fix for bug 17254, nth-* selectors do not work with negative coefficients.
2945
2946         Reviewed by Mitz.
2947
2948         fast/css/negative-nth-child.html
2949
2950         * css/CSSStyleSelector.cpp:
2951         (WebCore::parseNth):
2952
2953 2008-02-09  David Hyatt  <hyatt@apple.com>
2954
2955         Fix for bug 17203, high CPU usage loading HTML5 spec.  This patch significantly improves the performance
2956         of CSS3 selectors.
2957
2958         (1) Split the notion of being affected by positional rules into "forward" and "backward."  The "forward"
2959         selectors do not need to re-resolve during parsing, since children are appended on the end.  Only the
2960         "backward" selectors like last-child or nth-last-child have to re-resolve when a close tag is encountered.
2961
2962         (2) Extend childrenChanged to specify whether the children were changed by the parser or not.  This allows
2963         Element::childrenChanged to know when the parser is adding children so that it can ignore those adds when
2964         possible.
2965
2966         (3) Make sure all Elements now know whether or not their children are currently parsing.  Backwards selectors
2967         like last-child will always return false when children are still being parsed.  When an Element finishes
2968         parsing its children, finishParsingChildren() gets called and will make sure the children re-resolve properly.
2969
2970         (4) Added a beginParsingChildren method and renamed finishParsing to finishedParsingChildren.
2971
2972         (5) Eliminated one-off hacks that did the same thing in HTMLObjectElement and HTMLAppletElement.
2973
2974         (6) Patched many incorrect implementations of finishedParsingChildren that did not properly call into their
2975         base class (mostly new SVG elements that got added for SVG fonts around the time this became a requirement).
2976
2977         Reviewed by Eric
2978
2979         * css/CSSStyleSelector.cpp:
2980         (WebCore::CSSStyleSelector::checkSelector):
2981         (WebCore::CSSStyleSelector::checkOneSelector):
2982         * dom/Attr.cpp:
2983         (WebCore::Attr::childrenChanged):
2984         * dom/Attr.h:
2985         * dom/ContainerNode.cpp:
2986         (WebCore::ContainerNode::addChild):
2987         * dom/Document.cpp:
2988         (WebCore::Document::childrenChanged):
2989         * dom/Document.h:
2990         * dom/Element.cpp:
2991         (WebCore::Element::Element):
2992         (WebCore::Element::recalcStyle):
2993         (WebCore::checkFirstChildRules):
2994         (WebCore::checkLastChildRules):
2995         (WebCore::checkEmptyRules):
2996         (WebCore::checkStyleRules):
2997         (WebCore::Element::childrenChanged):
2998         (WebCore::Element::finishParsingChildren):
2999         * dom/Element.h:
3000         (WebCore::Element::finishedParsingChildren):
3001         (WebCore::Element::beginParsingChildren):
3002         * dom/Node.cpp:
3003         * dom/Node.h:
3004         (WebCore::Node::finishParsingChildren):
3005         (WebCore::Node::beginParsingChildren):
3006         (WebCore::Node::childrenChanged):
3007         * dom/StyledElement.cpp:
3008         (WebCore::StyledElement::StyledElement):
3009         * dom/StyledElement.h:
3010         * dom/XMLTokenizer.cpp:
3011         (WebCore::XMLTokenizer::startElementNs):
3012         (WebCore::XMLTokenizer::endElementNs):
3013         (WebCore::):
3014         * html/HTMLAppletElement.cpp:
3015         (WebCore::HTMLAppletElement::HTMLAppletElement):
3016         (WebCore::HTMLAppletElement::finishParsingChildren):
3017         * html/HTMLAppletElement.h:
3018         * html/HTMLElementFactory.cpp:
3019         (WebCore::objectConstructor):
3020         * html/HTMLGenericFormElement.cpp:
3021         (WebCore::HTMLFormControlElementWithState::finishParsingChildren):
3022         * html/HTMLGenericFormElement.h:
3023         * html/HTMLObjectElement.cpp:
3024         (WebCore::HTMLObjectElement::HTMLObjectElement):
3025         (WebCore::HTMLObjectElement::finishParsingChildren):
3026         (WebCore::HTMLObjectElement::childrenChanged):
3027         * html/HTMLObjectElement.h:
3028         * html/HTMLOptGroupElement.cpp:
3029         (WebCore::HTMLOptGroupElement::childrenChanged):
3030         * html/HTMLOptGroupElement.h:
3031         * html/HTMLOptionElement.cpp:
3032         (WebCore::HTMLOptionElement::childrenChanged):
3033         * html/HTMLOptionElement.h:
3034         * html/HTMLParser.cpp:
3035         (WebCore::HTMLParser::insertNode):
3036         (WebCore::HTMLParser::pushBlock):
3037         (WebCore::HTMLParser::popOneBlockCommon):
3038         * html/HTMLScriptElement.cpp:
3039         (WebCore::HTMLScriptElement::childrenChanged):
3040         (WebCore::HTMLScriptElement::finishParsingChildren):
3041         * html/HTMLScriptElement.h:
3042         * html/HTMLSelectElement.cpp:
3043         (WebCore::HTMLSelectElement::childrenChanged):
3044         * html/HTMLSelectElement.h:
3045         * html/HTMLStyleElement.cpp:
3046         (WebCore::HTMLStyleElement::finishParsingChildren):
3047         (WebCore::HTMLStyleElement::childrenChanged):
3048         * html/HTMLStyleElement.h:
3049         * html/HTMLTextAreaElement.cpp:
3050         (WebCore::HTMLTextAreaElement::childrenChanged):
3051         * html/HTMLTextAreaElement.h:
3052         * html/HTMLTitleElement.cpp:
3053         (WebCore::HTMLTitleElement::childrenChanged):
3054         * html/HTMLTitleElement.h:
3055          * rendering/RenderApplet.cpp:
3056         (WebCore::RenderApplet::createWidgetIfNecessary):
3057         * rendering/RenderPartObject.cpp:
3058         (WebCore::RenderPartObject::updateWidget):
3059         * rendering/RenderStyle.cpp:
3060         (WebCore::RenderStyle::RenderStyle):
3061         * rendering/RenderStyle.h:
3062         (WebCore::RenderStyle::childrenAffectedByForwardPositionalRules):
3063         (WebCore::RenderStyle::setChildrenAffectedByForwardPositionalRules):
3064         (WebCore::RenderStyle::childrenAffectedByBackwardPositionalRules):
3065         (WebCore::RenderStyle::setChildrenAffectedByBackwardPositionalRules):
3066         * svg/SVGAnimationElement.cpp:
3067         (WebCore::SVGAnimationElement::finishParsingChildren):
3068         * svg/SVGAnimationElement.h:
3069         * svg/SVGClipPathElement.cpp:
3070         (WebCore::SVGClipPathElement::childrenChanged):
3071         * svg/SVGClipPathElement.h:
3072         * svg/SVGDefinitionSrcElement.cpp:
3073         (WebCore::SVGDefinitionSrcElement::childrenChanged):
3074         * svg/SVGDefinitionSrcElement.h:
3075         * svg/SVGElement.cpp:
3076         (WebCore::SVGElement::finishParsingChildren):
3077         * svg/SVGElement.h:
3078         * svg/SVGFontFaceElement.cpp:
3079         (WebCore::SVGFontFaceElement::childrenChanged):
3080         * svg/SVGFontFaceElement.h:
3081         * svg/SVGFontFaceFormatElement.cpp:
3082         (WebCore::SVGFontFaceFormatElement::childrenChanged):
3083         * svg/SVGFontFaceFormatElement.h:
3084         * svg/SVGFontFaceSrcElement.cpp:
3085         (WebCore::SVGFontFaceSrcElement::childrenChanged):
3086         * svg/SVGFontFaceSrcElement.h:
3087         * svg/SVGFontFaceUriElement.cpp:
3088         (WebCore::SVGFontFaceUriElement::childrenChanged):
3089         * svg/SVGFontFaceUriElement.h:
3090         * svg/SVGGElement.cpp:
3091         (WebCore::SVGGElement::childrenChanged):
3092         * svg/SVGGElement.h:
3093         * svg/SVGGradientElement.cpp:
3094         (WebCore::SVGGradientElement::childrenChanged):
3095         * svg/SVGGradientElement.h:
3096         * svg/SVGMarkerElement.cpp:
3097         (WebCore::SVGMarkerElement::childrenChanged):
3098         * svg/SVGMarkerElement.h:
3099         * svg/SVGMaskElement.cpp:
3100         (WebCore::SVGMaskElement::childrenChanged):
3101         * svg/SVGMaskElement.h:
3102         * svg/SVGPatternElement.cpp:
3103         (WebCore::SVGPatternElement::childrenChanged):
3104         * svg/SVGPatternElement.h:
3105         * svg/SVGStyleElement.cpp:
3106         (WebCore::SVGStyleElement::finishParsingChildren):
3107         (WebCore::SVGStyleElement::childrenChanged):
3108         * svg/SVGStyleElement.h:
3109         * svg/SVGStyledElement.cpp:
3110         (WebCore::SVGStyledElement::childrenChanged):
3111         * svg/SVGStyledElement.h:
3112         * svg/SVGTitleElement.cpp:
3113         (WebCore::SVGTitleElement::childrenChanged):
3114         * svg/SVGTitleElement.h:
3115         * svg/SVGUseElement.cpp:
3116         (WebCore::SVGUseElement::childrenChanged):
3117         * svg/SVGUseElement.h:
3118         
3119 2008-02-09  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3120
3121         Unreviewed build fix
3122
3123         Somehow the removal of adjustSliderThumbSize(RenderObject*) sneaked
3124         into the patch.
3125
3126         * platform/qt/RenderThemeQt.h:
3127
3128 2008-02-09  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3129
3130         Reviewed by Adele.
3131
3132         paintResizeControl is dead, remove the code. This painting
3133         is done by the RenderLayer.
3134
3135         * platform/qt/RenderThemeQt.cpp:
3136         * platform/qt/RenderThemeQt.h:
3137         * rendering/RenderThemeMac.h:
3138         * rendering/RenderThemeMac.mm:
3139
3140 2008-02-07  Kevin Ollivier <kevino@theolliviers.com>
3141
3142         Reviewed by Eric Seidel, Adam Roben.
3143
3144         MSVC7 fixes.
3145         http://bugs.webkit.org/show_bug.cgi?id=17211
3146
3147         * platform/Threading.h:
3148         - On MSVC7, when the Interlocked* functions are used, the ref count gets out of sync.
3149           (MSVC8 seems not to have this problem.) Use the old implementation which works correctly.
3150         * platform/win/SharedTimerWin.cpp:
3151         - USER_TIMER_MINIMUM/MAXIMUM aren't defined in winuser.h for the MSVC 2003 Platform SDK
3152           so define them if they are not already defined.
3153
3154 2008-02-08  Brent Fulgham  <bfulgham@gmail.com>
3155
3156         Reviewed by Adam Roben.
3157
3158         Bug 17226: Fix Windows (Cairo) build of image-decoders
3159         http://bugs.webkit.org/show_bug.cgi?id=17226
3160
3161         * platform/image-decoders/gif/GIFImageDecoder.cpp:
3162         * platform/image-decoders/png/PNGImageDecoder.cpp:
3163
3164 2008-02-08  Timothy Hatcher  <timothy@apple.com>
3165
3166         Reviewed by Brady Eidson.
3167
3168         <rdar://problem/5640896> Removing database then trying
3169         to recreate it causes trouble
3170
3171         Added open Database support to DatabaseTracker. So any Database that 
3172         is deleted will be marked as deleted and will fail to open any transaction
3173         or execute any new SQL queries.
3174
3175         * storage/Database.cpp:
3176         (WebCore::Database::Database): Call DatabaseTracker::addOpenDatabase.
3177         (WebCore::Database::~Database): Call DatabaseTracker::removeOpenDatabase.
3178         (WebCore::Database::markAsDeleted): Set the m_deleted flag.
3179         (WebCore::Database::version): Return a null String if m_deleted is true.
3180         * storage/Database.h:
3181         (WebCore::Database::deleted): Return m_deleted.
3182         * storage/DatabaseTracker.cpp:
3183         (WebCore::DatabaseTracker::addOpenDatabase): Add the Database to a map of origins and names.
3184         (WebCore::DatabaseTracker::removeOpenDatabase): Remove the Database from the map.
3185         (WebCore::DatabaseTracker::deleteDatabaseFile): Call markAsDeleted on all the open Databases
3186           matching the origin/name.
3187         * storage/DatabaseTracker.h:
3188         * storage/SQLStatement.cpp:
3189         (WebCore::SQLStatement::setDatabaseDeletedError): Set the error about the user deleting the database.
3190         * storage/SQLStatement.h:
3191         * storage/SQLTransaction.cpp:
3192         (WebCore::SQLTransaction::executeSQL): If the Database is deleted, call setDatabaseDeletedError.
3193         (WebCore::SQLTransaction::openTransactionAndPreflight): Set the error about the user deleting the database
3194           if the Database was marked as deleted.
3195
3196 2008-02-08  Darin Adler  <darin@apple.com>
3197
3198         Reviewed by Eric.
3199
3200         - fix http://bugs.webkit.org/show_bug.cgi?id=15003
3201           Function.prototype.constructor should not be DontDelete/ReadOnly (Acid3 bug)
3202
3203         Test: fast/js/constructor-attributes.html
3204
3205         * bindings/scripts/CodeGeneratorJS.pm: Remove unwanted attributes from "constructor".
3206
3207 2008-02-08  Anders Carlsson  <andersca@apple.com>
3208
3209         Reviewed by Mitz.
3210
3211         <rdar://problem/5650446>
3212         http://bugs.webkit.org/show_bug.cgi?id=16102
3213         Crash in FrameLoader::stopLoadingSubframes() on IMDB page
3214
3215         Store the child frame in a RefPtr to prevent it from being deleted when the
3216         frame tree changes while calling stopAllLoaders().
3217         
3218         * loader/FrameLoader.cpp:
3219         (WebCore::FrameLoader::stopLoadingSubframes):
3220
3221 2008-02-08  Kevin Ollivier  <kevino@theolliviers.com>
3222
3223         wx port build fix. Add time.h to define time_t.
3224
3225         * platform/FileSystem.h:
3226
3227 2008-02-08  Alp Toker  <alp@atoker.com>
3228
3229         Reviewed by Adam Roben.
3230
3231         Avoid null-dereference crasher noticed in the GTK+ port and also
3232         affecting the Win debug build.
3233
3234         Covered by existing tests.
3235
3236         * dom/Document.cpp:
3237         (WebCore::Document::userStyleSheet):
3238
3239 2008-02-08  Anders Carlsson  <andersca@apple.com>
3240
3241         Reviewed by Adam.
3242
3243         <rdar://problem/5724188> 
3244         REGRESSION: PLT 0.7% slower due to 29926 (change Text::createWithLengthLimit to take a UChar pointer)
3245         
3246         Revert r29926 which caused the regression.
3247         
3248         * dom/Text.cpp:
3249         (WebCore::Text::createWithLengthLimit):
3250         * dom/Text.h:
3251         * html/HTMLParser.cpp:
3252         (WebCore::HTMLParser::parseToken):
3253         * loader/TextDocument.cpp:
3254         (WebCore::TextTokenizer::write):
3255
3256 2008-02-08  Sam Weinig  <sam@webkit.org>
3257
3258         Reviewed by Hyatt.
3259
3260         Fix for <rdar://problem/5732491>
3261         http://bugs.webkit.org/show_bug.cgi?id=17213
3262         The querySelectorAll method on an element node does not search only the element's descendants
3263
3264         Test: fast/dom/SelectorAPI/elementRoot.html
3265
3266         * dom/Node.cpp:
3267         (WebCore::Node::querySelector): Make sure to stay within the root node when traversing the tree.
3268         * dom/SelectorNodeList.cpp:
3269         (WebCore::SelectorNodeList::SelectorNodeList): ditto.
3270
3271
3272
3273 2008-02-08  David Hyatt  <hyatt@apple.com>
3274
3275         Fix for bug 16798, button should default to type=submit.
3276
3277         Reviewed by darin
3278
3279         * html/HTMLButtonElement.cpp:
3280         (WebCore::HTMLButtonElement::type):
3281         (WebCore::HTMLButtonElement::parseMappedAttribute):
3282
3283 2008-02-08  Rodney Dawes  <dobey@wayofthemonkey.com>
3284
3285         Reviewed by Jon Honeycutt.
3286
3287         Redefine some platform-specific types as cross-platform types
3288         Add pathGetFileName method to get the filename from a path string
3289         Add unloadModule method to unload a loadable module from the process
3290         Implement new methods for GTK+ and Windows
3291         Implement missing homeDirectoryPath method for GTK+
3292         Add stub methods for new and missing methods for Wx and Qt
3293
3294         * platform/FileSystem.h:
3295         * platform/gtk/FileSystemGtk.cpp:
3296         * platform/qt/FileSystemQt.cpp:
3297         * platform/win/FileSystemWin.cpp:
3298         * platform/wx/FileSystemWx.cpp:
3299
3300 2008-02-08  Adam Roben  <aroben@apple.com>
3301
3302         Windows build fix after r30088
3303
3304         * bindings/scripts/CodeGeneratorCOM.pm: Touch this to force the COM
3305         bindings to rebuild.
3306
3307 2008-02-08  Pierre-Luc Beaudoin  <pierre-luc.beaudoin@collabora.co.uk>
3308
3309         Reviewed by Alp Toker.
3310
3311         http://bugs.webkit.org/show_bug.cgi?id=17009
3312         [Gtk] Webkit strips accents from some dead-key combinations
3313
3314         KeyEvents have to go through the gtk input method.
3315
3316         Also implement the isKeypad check and make disambiguateKeyDownEvent
3317         behave more like other ports.
3318
3319         * platform/PlatformKeyboardEvent.h:
3320         * platform/gtk/KeyEventGtk.cpp:
3321         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
3322         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
3323         (WebCore::PlatformKeyboardEvent::gdkEventKey):
3324
3325 2008-02-08  Darin Adler  <darin@apple.com>
3326
3327         Reviewed by Eric.
3328
3329         - fix http://bugs.webkit.org/show_bug.cgi?id=3492
3330           TreeWalker implementation needs to be fixed (affects Acid3)
3331         - fix http://bugs.webkit.org/show_bug.cgi?id=4714
3332           NodeIterator does not handle exceptions from the filter function (affects Acid3)
3333         - fix http://bugs.webkit.org/show_bug.cgi?id=4716
3334           NodeIterator will crash if the filter function removes the current node from the document
3335
3336         Test: traversal/exception-forwarding.html
3337
3338         This turned into a near-rewrite of NodeIterator and TreeWalker.
3339
3340         * bindings/js/JSNodeFilterCondition.h:
3341         * bindings/js/JSNodeFilterCondition.cpp:
3342         (WebCore::takeException): Added.
3343         (WebCore::JSNodeFilterCondition::acceptNode): Added an out parameter to return
3344         a JavaScript exception.
3345
3346         * bindings/js/JSNodeFilterCustom.cpp:
3347         (WebCore::JSNodeFilter::acceptNode): Wrote a custom binding for this that raises
3348         a JavaScript exception if the out parameter is set.
3349
3350         * bindings/js/JSNodeIteratorCustom.cpp:
3351         (WebCore::JSNodeIterator::nextNode): Wrote a custom binding for this that raises
3352         a JavaScript exception if the out parameter is set.
3353         (WebCore::JSNodeIterator::previousNode): Ditto.
3354
3355         * bindings/js/JSTreeWalkerCustom.cpp:
3356         (WebCore::JSTreeWalker::parentNode): Wrote a custom binding for this that raises
3357         a JavaScript exception if the out parameter is set.
3358         (WebCore::JSTreeWalker::firstChild): Ditto.
3359         (WebCore::JSTreeWalker::lastChild): Ditto.
3360         (WebCore::JSTreeWalker::nextSibling): Ditto.
3361         (WebCore::JSTreeWalker::previousSibling): Ditto.
3362         (WebCore::JSTreeWalker::previousNode): Ditto.
3363         (WebCore::JSTreeWalker::nextNode): Ditto.
3364
3365         * bindings/objc/DOM.mm:
3366         (WebCore::ObjCNodeFilterCondition::acceptNode): Updated to include new exception
3367         out parameter.
3368         (-[DOMDocument createNodeIterator:whatToShow:filter:expandEntityReferences:]):
3369         Use RefPtr to make object lifetimes clearer.
3370         (-[DOMDocument createTreeWalker:whatToShow:filter:expandEntityReferences:]):
3371         Ditto.
3372
3373         * bindings/scripts/CodeGeneratorJS.pm: Added include of NodeFilter.h for
3374         JSDocument.cpp.
3375
3376         * dom/Document.h:
3377         * dom/Document.cpp:
3378         (WebCore::Document::createNodeIterator): Changed to use PassRefPtr.
3379         (WebCore::Document::createTreeWalker): Ditto.
3380
3381         * dom/NodeFilter.h:
3382         * dom/NodeFilter.cpp:
3383         (WebCore::NodeFilter::NodeFilter): Changed to use PassRefPtr.
3384         (WebCore::NodeFilter::acceptNode): Added an out parameter to return
3385         a JavaScript exception.
3386         * dom/NodeFilter.idl: Custom binding for acceptNode.
3387
3388         * dom/NodeFilterCondition.h:
3389         * dom/NodeFilterCondition.cpp:
3390         (WebCore::NodeFilterCondition::acceptNode): Added an out parameter to return
3391         a JavaScript exception.
3392
3393         * dom/NodeIterator.cpp:
3394         (WebCore::NodeIterator::NodeIterator): Changed to use PassRefPtr more.
3395         Eliminated m_doc, using the root node instead, and unnecessary check for
3396         null -- rootNode must be non-null and all nodes have a non-null document.
3397         (WebCore::NodeIterator::~NodeIterator): Changed to get document from root.
3398         (WebCore::NodeIterator::nextNode): Rewrote to use a RefPtr since the
3399         acceptNode function could do anything, including removing the last
3400         reference to the current node. Also folded findNextNode into this function
3401         since it's the only one that needs to call it.
3402         (WebCore::NodeIterator::previousNode): Same thing, but the other direction.
3403         (WebCore::NodeIterator::detach): Changed to use the root node as the indication
3404         that we're detached rather than a separate boolean.
3405         (WebCore::NodeIterator::notifyBeforeNodeRemoval): Removed some unnneeded
3406         checks. Removed incorrect use of findNextNode/findPreviousNode -- those
3407         functions call acceptNode and the DOM standard is quite clear that these
3408         functions do not take that into account, allowing the current node to become
3409         one that's not accepted.
3410
3411         * dom/NodeIterator.h: Changed constructor to use PassRefPtr more. Changed
3412         nextNode and previousNode to have an out parameter with a JavaScript exception.
3413         Removed helper functions setReferenceNode, setPointerBeforeReferenceNode,
3414         detached, setDetached, document, findNextNode, and findPreviousNode. All were
3415         unnecessary. Removed data member m_doc which was just rootNode()->document().
3416
3417         * dom/NodeIterator.idl: Custom binding for nextNode and previousNode.
3418
3419         * dom/Traversal.cpp:
3420         (WebCore::Traversal::Traversal): Use PassRefPtr more.
3421         (WebCore::Traversal::acceptNode): Added out parameter for JavaScript exception.
3422         Also rearranged the function a little bit for clarity.
3423
3424         * dom/Traversal.h: Changed acceptNode to have an out parameter with a JavaScript
3425         exception and made it protected, since it's only for use by the derived classes.
3426
3427         * dom/TreeWalker.cpp:
3428         (WebCore::TreeWalker::TreeWalker): Updated to use PassRefPtr.
3429         (WebCore::TreeWalker::setCurrentNode): Updated to use PassRefPtr and deleted
3430         the overloaded version since it's not needed.
3431         (WebCore::TreeWalker::parentNode): Rewrote to propagate the exception and also
3432         to implement rules about when to check things like whether we're in the tree.
3433         The previous fix where we called isDescendantOf was not entirely correct, because
3434         the specification allows you to walk outside the tree if you get there somehow.
3435         What it doesn't allow is walking outside the tree from inside. The new
3436         implementation handles this correctly.
3437         (WebCore::TreeWalker::firstChild): Ditto.
3438         (WebCore::TreeWalker::lastChild): Ditto.
3439         (WebCore::TreeWalker::previousSibling): Ditto.
3440         (WebCore::TreeWalker::nextSibling): Ditto.
3441         (WebCore::TreeWalker::previousNode): Ditto. Because of the need to check the
3442         acceptNode function on parents, this can't use traversePreviousNode (more's the
3443         pity, because it's a bit complicated).
3444         (WebCore::TreeWalker::nextNode): Ditto.
3445
3446         * dom/TreeWalker.h: Changed constructor and setCurrentNode to use PassRefPtr
3447         more. Changed the navigation functions to have an out parameter with a JavaScript
3448         exception. Removed helper functions setCurrentNode and ancestorRejected.
3449
3450         * dom/TreeWalker.idl: Custom binding for navigation functions.
3451
3452 2008-02-08  Eric Seidel  <eric@webkit.org>
3453
3454         Reviewed by darin.
3455
3456         Add support for Text.wholeText and Text.replaceWholeText
3457         http://bugs.webkit.org/show_bug.cgi?id=17125
3458
3459         Test EntityReferences to make sure they're always treated as read-only
3460         In doing so I discovered a bug in document.adoptNode(readonlyNode) (and fixed it)
3461
3462         * dom/Document.cpp:
3463         (WebCore::Document::adoptNode): throw NO_MODIFICATION_ALLOWED_ERR when passed a readonly node
3464         * dom/Node.cpp:
3465         * dom/Node.cpp:
3466         (WebCore::Node::textContent):
3467         * dom/Text.cpp:
3468         (WebCore::earliestLogicallyAdjacentTextNode):
3469         (WebCore::latestLogicallyAdjacentTextNode):
3470         (WebCore::Text::wholeText):
3471         (WebCore::Text::replaceWholeText):
3472         * dom/Text.h:
3473         * dom/Text.idl:
3474
3475 2008-02-06  Kimmo Kinnunen  <kimmok@iki.fi>
3476
3477         Reviewed by Tim Hatcher.
3478
3479         Fixes: http://bugs.webkit.org/show_bug.cgi?id=17191
3480         HTML5: Client-side database queries should return values of type number
3481         Test: storage/sql-data-types.html
3482
3483         Make the DB queries return a value as a number if it was inserted
3484         as a number to the database.
3485         * platform/sql/SQLiteStatement.cpp:
3486         (WebCore::SQLiteStatement::getColumnValue): new member function to return SQLValues
3487         * platform/sql/SQLiteStatement.h:
3488         * storage/SQLStatement.cpp:
3489         (WebCore::SQLStatement::execute): use getColumnValue instead of getColumnText
3490
3491 2008-02-07  Ada Chan  <adachan@apple.com>
3492
3493         <rdar://problem/5292433> certificate authentication support broken in Safari 3.0
3494         Added mechanism to communicate client certificate info back to CFNetwork.
3495
3496         Reviewed by Adam.
3497
3498         * platform/network/ResourceHandle.h:
3499         * platform/network/cf/ResourceHandleCFNet.cpp:
3500         (WebCore::clientCerts): Keep a mapping of hosts to client certificates.
3501         (WebCore::makeFinalRequest): If we have a client certificate for the host, pass it
3502         to CFNetwork by setting it in the SSL properties.
3503         (WebCore::ResourceHandle::setClientCertificate): Map client certificate to the host.
3504
3505 2008-02-07  Adam Roben  <aroben@apple.com>
3506
3507         Qt build fix
3508
3509         * platform/SharedBuffer.cpp: Removed a stub implementation of
3510         createWithContentsOfFile, now that each platform has its own stub.
3511
3512 2008-02-07  Adam Roben  <aroben@apple.com>
3513
3514         Fix Bug 17138: REGRESSION: Node highlight not updated properly
3515
3516         <http://bugs.webkit.org/show_bug.cgi?id=17138>
3517         <rdar://problem/5719869>
3518
3519         Reviewed by Darin.
3520
3521         No test possible.
3522
3523         * page/InspectorController.cpp:
3524         (WebCore::InspectorController::drawNodeHighlight): Update the
3525         overlayRect after scrolling to make sure that we translate the context
3526         by the correct amount.
3527
3528 2008-02-07  Adam Roben  <aroben@apple.com>
3529
3530         Qt and GTK+ build fixes
3531
3532         * platform/gtk/FileSystemGtk.cpp: Added a missing #include.
3533         * platform/qt/FileSystemQt.cpp: Ditto.
3534
3535 2008-02-07  Adam Roben  <aroben@apple.com>
3536
3537         Some cleanup of Mac-only user stylesheet code
3538
3539         I moved UserStyleSheetLoader out of Frame.cpp into its own files, and
3540         moved some Mac-only Frame methods to FrameMac.mm.
3541
3542         Reviewed by Darin.
3543
3544         * WebCore.xcodeproj/project.pbxproj: Added new files to project.
3545         * loader/mac/UserStyleSheetLoader.cpp: Added.
3546         (UserStyleSheetLoader::UserStyleSheetLoader):
3547         (UserStyleSheetLoader::~UserStyleSheetLoader):
3548         * loader/mac/UserStyleSheetLoader.h: Added.
3549         * page/Frame.cpp: Removed setUserStyleSheet[Location]
3550         * page/mac/FrameMac.mm:
3551         (WebCore::Frame::setUserStyleSheetLocation): Moved here from
3552         Frame.cpp.
3553         (WebCore::Frame::setUserStyleSheet): Ditto.
3554
3555 2008-02-07  Adam Roben  <aroben@apple.com>
3556
3557         Fix <rdar://5555260> GMail never loads when a user stylesheet is
3558         specified
3559
3560         The fix in r29841 did not guarantee that the user stylesheet would not
3561         still be loading by the time GMail called document.write, and so was
3562         not a complete fix.
3563