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