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