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