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