324a584251ca6ca72c2a22a981d828aae15db278
[WebKit-https.git] / WebCore / ChangeLog
1 2008-02-28  Matt Lilek  <webkit@mattlilek.com>
2
3         Reviewed by Tim Hatcher.
4
5         Bug 16535: Stylesheets loaded with @import are not editable
6         http://bugs.webkit.org/show_bug.cgi?id=16535
7         <rdar://problem/5712899>
8
9         Sheets loaded using @import were incorrectly being flagged as non-editable
10         user agent sheets because their parent sheet doesn't have an ownerNode. We now
11         check to make sure sheets also don't have a href before restricting their editability.
12
13         * page/inspector/StylesSidebarPane.js:
14
15 2008-02-28  Rodney Dawes  <dobey@wayofthemonkey.com>
16
17         Reviewed by Adam Roben.
18
19         Copy PluginPackageWin.cpp to shared PluginPackage.cpp.
20         Add PluginPackage.cpp to build configurations.
21         Remove PluginPackage destructor from TemporaryLinkStubs.cpp.
22         Use cross-platform pathGetFilename method.
23         Remove platform-specific code from shared PluginPackage implementation.
24         Remove shared code from PluginPackageWin.cpp.
25
26         * GNUmakefile.am:
27         * WebCore.pro:
28         * WebCoreSources.bkl:
29         * WebCore.vcproj/WebCore.vcproj:
30         * platform/gtk/TemporaryLinkStubs.cpp:
31         * platform/qt/TemporaryLinkStubs.cpp:
32         * platform/wx/TemporaryLinkStubs.cpp:
33         * plugins/PluginPackage.cpp:
34         * plugins/win/PluginPackageWin.cpp:
35
36 2008-02-28  Justin Garcia  <justin.garcia@apple.com>
37
38         Reviewed by Darin Adler.
39
40         <rdar://problem/4930986> REGRESSION: Paste As Quotation pastes black text instead of blue
41         
42         Add a second style span at copy time to hold document default styles.  This helps us
43         differentiate between those and user applied styles at paste time, where we'll want
44         to let Mail's Paste As Quotation blockquote override document default styles, but
45         not others.
46
47         * css/CSSComputedStyleDeclaration.cpp:
48         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Changed the unit type used 
49         for -webkit-text-stroke-width from CSS_NUMBER to CSS_PX, to match other properties that 
50         are thick | medium | thin | <length>.  Before, there was a mismatch between the unit 
51         type of -webkit-text-stroke-width property values in a CSSComputedStyleDeclaration for 
52         an element and that element's inlineStyleDecl(), causing identical values to always appear 
53         different to diff().
54         * editing/ReplaceSelectionCommand.cpp:
55         (WebCore::ReplaceSelectionCommand::handlePasteAsQuotationNode): Fixed.  Don't just change
56         the class to an empty string, completely remove it, it's no longer needed.
57         (WebCore::handleStyleSpansBeforeInsertion): Moved the optimization from doApply here.
58         (WebCore::ReplaceSelectionCommand::handleStyleSpans): 
59         Added, replaces removeRedundantStyles.
60         We aren't (yet) removing all redundant styles, just those on style spans, so I removed the
61         unused code and renamed the function.
62         There won't be more than two style spans that we need to consider, the one with the 
63         source document's default styles and styles on the commonAncestor of the copied Range, 
64         so don't look for more than two.
65         Let elements that wrap the incoming fragment override the source document's styles.
66         (WebCore::ReplaceSelectionCommand::doApply): Moved code to handleStyleSpansBeforeInsertion
67         and call the renamed handleStyleSpans.
68         * editing/ReplaceSelectionCommand.h:
69         * editing/markup.cpp:
70         (WebCore::removeDefaultStyles): Added.  Don't add document defaults to the style span
71         that holds user applied styles, since they'll be added to their own style span.
72         (WebCore::createMarkup):
73         Add a second style span that holds just the document defaults. This lets us differentiate
74         between those and user applied styles at paste time.
75         Mail blockquotes are just another type of special element, moved their handling there. This
76         also lets paste code make assumptions about the position of the two style spans (they are 
77         *always* parent-child).
78
79 2008-02-28  Brent Fulgham <bfulgham@gmail.com>
80
81         http://bugs.webkit.org/show_bug.cgi?id=17576
82         Modify RenderThemeWin to use SOFT_LINK
83
84         Reviewed by Adam Roben.
85
86         * rendering/RenderThemeWin.h: Remove unneeded library handle
87         * rendering/RenderThemeWin.cpp: Change to use SOFT_LINK
88           rather than hand-coded load library calls.
89
90 2008-02-28  Dan Bernstein  <mitz@apple.com>
91
92         Reviewed by Darin Adler.
93
94         - fix http://bugs.webkit.org/show_bug.cgi?id=17590
95           ASSERTION FAILED: subject in jsRegExpExecute()
96
97         * page/mac/FrameMac.mm:
98         (WebCore::Frame::matchLabelsAgainstElement): Added an early return in
99         case the element name is empty.
100
101 2008-02-28  Justin Garcia  <justin.garcia@apple.com>
102
103         Reviewed by Dan Bernstein
104         
105         Small editing speed up.
106         
107         * dom/Position.cpp:
108         (WebCore::Position::upstream): Don't check for a change in editability
109         if the current node hasn't changed.
110         (WebCore::Position::downstream): Ditto.
111
112 2008-02-27  Dan Bernstein  <mitz@apple.com>
113
114         Reviewed by John Sullivan.
115
116         - fix <rdar://problem/5607547> Single letter surrounded by soft hyphens can disappear
117
118         Test: fast/text/soft-hyphen-2.html
119
120         * rendering/bidi.cpp:
121         (WebCore::chopMidpointsAt): Changed to iterate midpoints backwards, so
122         that if there are two midpoints at the given position, only the last one
123         will be chopped off.
124
125 2008-02-27  Dan Bernstein  <mitz@apple.com>
126
127         Reviewed by Darin Adler.
128
129         - make centered text in right-to-left blocks spill over to the left
130
131         Test: fast/text/align-center-rtl-spill.html
132
133         * rendering/bidi.cpp:
134         (WebCore::RenderBlock::computeHorizontalPositionsForLine):
135
136 2008-02-27  Dan Bernstein  <mitz@apple.com>
137
138         Reviewed by Darin Adler.
139
140         - more bidi.cpp cleanup
141
142         * platform/text/BidiResolver.h:
143         (WebCore::BidiCharacterRun::destroy): Added. Overridden by BidiRun .
144         (WebCore::BidiResolver<Iterator, Run>::addRun): Moved BidiState::addRun()
145         here.
146         (WebCore::BidiResolver<Iterator, Run>::appendRun): Changed to use
147         addRun().
148         (WebCore::BidiResolver<Iterator, Run>::deleteRuns): Changed to use
149         destroy(), avoiding the need to specialize this method in BidiState.
150         * rendering/bidi.cpp:
151         (WebCore::BidiRun::destroy): Removed the RenderArena parameter.
152         (WebCore::BidiState::deleteRuns): Removed now-unnecessary specialization.
153         (WebCore::BidiState::addRun): Removed now-unnecessary specialization.
154         (WebCore::RenderBlock::createLineBoxes): 
155         (WebCore::RenderBlock::constructLine):
156         (WebCore::RenderBlock::computeHorizontalPositionsForLine): Added a FIXME.
157         (WebCore::RenderBlock::computeVerticalPositionsForLine):
158         (WebCore::buildCompactRuns):
159         (WebCore::RenderBlock::layoutInlineChildren):
160         (WebCore::RenderBlock::determineStartPosition):
161         (WebCore::RenderBlock::determineEndPosition):
162         (WebCore::RenderBlock::matchedEndLine):
163         (WebCore::skipNonBreakingSpace):
164         (WebCore::RenderBlock::skipWhitespace):
165         (WebCore::shouldSkipWhitespaceAfterStartObject):
166         * rendering/bidi.h:
167         (WebCore::BidiRun): Added m_ prefixes to several member variables. 
168
169 2008-02-27  Sam Weinig  <sam@webkit.org>
170
171         Reviewed by Darin.
172
173         Fix for <rdar://problem/5768769>
174
175         - Don't allow cross-origin calls using window.functionName.call(otherFrame)
176           syntax.
177
178         * bindings/js/JSLocation.cpp:
179         (WebCore::jsLocationProtoFuncToString): Do same-origin check.
180         * bindings/js/kjs_window.cpp:
181         (KJS::windowProtoFuncAToB): Ditto.
182         (KJS::windowProtoFuncBToA): Ditto.
183         (KJS::windowProtoFuncOpen): Ditto.
184         (KJS::windowProtoFuncClearTimeout): Ditto.
185         * bindings/scripts/CodeGeneratorJS.pm: Ditto.
186
187 2008-02-27  David Hyatt  <hyatt@apple.com>
188
189         More cleanup in preparation for fixing the HTML5 spec performance regression.
190
191         Reviewed by Sam Weinig
192
193         * dom/Attr.cpp:
194         (WebCore::Attr::childrenChanged):
195         * dom/Attr.h:
196         * dom/ContainerNode.cpp:
197         (WebCore::ContainerNode::insertBefore):
198         (WebCore::ContainerNode::replaceChild):
199         (WebCore::ContainerNode::removeChild):
200         (WebCore::ContainerNode::removeChildren):
201         (WebCore::ContainerNode::appendChild):
202         (WebCore::ContainerNode::addChild):
203         (WebCore::ContainerNode::childrenChanged):
204         * dom/ContainerNode.h:
205         * dom/Document.cpp:
206         (WebCore::Document::childrenChanged):
207         * dom/Document.h:
208         * dom/Element.cpp:
209         (WebCore::Element::childrenChanged):
210         * dom/Element.h:
211         * dom/Node.h:
212         (WebCore::Node::childrenChanged):
213         * html/HTMLObjectElement.cpp:
214         (WebCore::HTMLObjectElement::childrenChanged):
215         * html/HTMLObjectElement.h:
216         * html/HTMLOptGroupElement.cpp:
217         (WebCore::HTMLOptGroupElement::childrenChanged):
218         * html/HTMLOptGroupElement.h:
219         * html/HTMLOptionElement.cpp:
220         (WebCore::HTMLOptionElement::childrenChanged):
221         * html/HTMLOptionElement.h:
222         * html/HTMLScriptElement.cpp:
223         (WebCore::HTMLScriptElement::childrenChanged):
224         * html/HTMLScriptElement.h:
225         * html/HTMLSelectElement.cpp:
226         (WebCore::HTMLSelectElement::childrenChanged):
227         * html/HTMLSelectElement.h:
228         * html/HTMLStyleElement.cpp:
229         (WebCore::HTMLStyleElement::childrenChanged):
230         * html/HTMLStyleElement.h:
231         * html/HTMLTextAreaElement.cpp:
232         (WebCore::HTMLTextAreaElement::childrenChanged):
233         * html/HTMLTextAreaElement.h:
234         * html/HTMLTitleElement.cpp:
235         (WebCore::HTMLTitleElement::childrenChanged):
236         * html/HTMLTitleElement.h:
237         * svg/SVGClipPathElement.cpp:
238         (WebCore::SVGClipPathElement::childrenChanged):
239         * svg/SVGClipPathElement.h:
240         * svg/SVGDefinitionSrcElement.cpp:
241         (WebCore::SVGDefinitionSrcElement::childrenChanged):
242         * svg/SVGDefinitionSrcElement.h:
243         * svg/SVGFontFaceElement.cpp:
244         (WebCore::SVGFontFaceElement::childrenChanged):
245         * svg/SVGFontFaceElement.h:
246         * svg/SVGFontFaceFormatElement.cpp:
247         (WebCore::SVGFontFaceFormatElement::childrenChanged):
248         * svg/SVGFontFaceFormatElement.h:
249         * svg/SVGFontFaceSrcElement.cpp:
250         (WebCore::SVGFontFaceSrcElement::childrenChanged):
251         * svg/SVGFontFaceSrcElement.h:
252         * svg/SVGFontFaceUriElement.cpp:
253         (WebCore::SVGFontFaceUriElement::childrenChanged):
254         * svg/SVGFontFaceUriElement.h:
255         * svg/SVGGElement.cpp:
256         (WebCore::SVGGElement::childrenChanged):
257         * svg/SVGGElement.h:
258         * svg/SVGGradientElement.cpp:
259         (WebCore::SVGGradientElement::childrenChanged):
260         * svg/SVGGradientElement.h:
261         * svg/SVGMarkerElement.cpp:
262         (WebCore::SVGMarkerElement::childrenChanged):
263         * svg/SVGMarkerElement.h:
264         * svg/SVGMaskElement.cpp:
265         (WebCore::SVGMaskElement::childrenChanged):
266         * svg/SVGMaskElement.h:
267         * svg/SVGPatternElement.cpp:
268         (WebCore::SVGPatternElement::childrenChanged):
269         * svg/SVGPatternElement.h:
270         * svg/SVGStyleElement.cpp:
271         (WebCore::SVGStyleElement::childrenChanged):
272         * svg/SVGStyleElement.h:
273         * svg/SVGStyledElement.cpp:
274         (WebCore::SVGStyledElement::childrenChanged):
275         * svg/SVGStyledElement.h:
276         * svg/SVGTitleElement.cpp:
277         (WebCore::SVGTitleElement::childrenChanged):
278         * svg/SVGTitleElement.h:
279         * svg/SVGUseElement.cpp:
280         (WebCore::SVGUseElement::childrenChanged):
281         * svg/SVGUseElement.h:
282
283 2008-02-27  Julien Chaffraix <julien.chaffraix@gmail.com>
284
285         Reviewed by Alexey.
286
287         http://bugs.webkit.org/show_bug.cgi?id=17481
288         Several consecutive calls to XMLHttpRequest::open should dispatch only one readyState event
289
290         Test: http/tests/xmlhttprequest/xmlhttprequest-multiple-open.html
291
292         * xml/XMLHttpRequest.cpp:
293         (WebCore::XMLHttpRequest::open):
294
295 2008-02-27  Sriram Neelakandan  <sriram.neelakandan@gmail.com>
296
297         Reviewed, tweaked and landed by ap.
298
299         http://bugs.webkit.org/show_bug.cgi?id=17487
300         HTMLInput mysteriously fails to work if ICU dat file is missing
301
302         * platform/text/TextBreakIteratorICU.cpp: (WebCore::setUpIterator): Assert that the iterator
303         has been opened.
304
305 2008-02-27  Adam Roben  <aroben@apple.com>
306
307         Windows build fix after r30616
308
309         * platform/win/ClipboardWin.cpp:
310
311 2008-02-27  Nikolas Zimmermann  <zimmermann@kde.org>
312
313         Reviewed by Simon.
314
315         Small style cleanup, and obvious fix: SVGGElement reacted on
316         'clipPathUnits' changes, which is a funny copy&paste error.
317
318         * svg/SVGGElement.cpp:
319         (WebCore::SVGGElement::parseMappedAttribute):
320         (WebCore::SVGGElement::svgAttributeChanged):
321         (WebCore::SVGGElement::createRenderer):
322
323 2008-02-27  Nikolas Zimmermann  <zimmermann@kde.org>
324
325         Reviewed by Simon.
326
327         Cleanup coding style. Still on my way to fix dynamic updates of all SVG elements.
328         Currently at SVGF*. SVGDefs/DescElement don't need any dyn update fixes but cleanups.
329
330         * svg/SVGDefsElement.cpp:
331         (WebCore::SVGDefsElement::createRenderer):
332         * svg/SVGDefsElement.h:
333         * svg/SVGDescElement.h:
334
335 2008-02-26  Antti Koivisto  <antti@apple.com>
336
337         Reviewed by Darin.
338
339         Fix <rdar://problem/5761326>
340         REGRESSION: 1.5% -2% Sunspider regression from r30009 (ebay photo upload hang)
341         
342         Generate better code with VS:
343         - Use ALWAYS_INLINE macro to guarantee versions of allowsAccessFrom() are reduced to single functions
344         - Refactor error reporting so that there is no need to construct/destruct Strings in common cases
345         - Add a separate version of the function for cases where error messages are not wanted
346
347         * bindings/js/JSDOMWindowCustom.cpp:
348         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
349         * bindings/js/kjs_window.cpp:
350         (KJS::Window::allowsAccessFrom):
351         (KJS::Window::allowsAccessFromNoErrorMessage):
352         (KJS::Window::allowsAccessFromPrivate):
353         (KJS::Window::crossDomainAccessErrorMessage):
354         * bindings/js/kjs_window.h:
355
356 2008-02-26  Sam Weinig  <sam@webkit.org>
357
358         Reviewed by Dave Hyatt.
359
360         - remove DeprecatedCString, DeprecatedArray, and ArrayImpl.
361
362         * GNUmakefile.am:
363         * WebCore.pro:
364         * WebCore.vcproj/WebCore.vcproj:
365         * WebCore.xcodeproj/project.pbxproj:
366         * WebCoreSources.bkl:
367         * platform/ArrayImpl.cpp: Removed.
368         * platform/ArrayImpl.h: Removed.
369         * platform/DeprecatedArray.h: Removed.
370         * platform/DeprecatedCString.cpp: Removed.
371         * platform/DeprecatedCString.h: Removed.
372         * platform/text/CString.cpp:
373         (WebCore::CString::length):
374         * platform/text/CString.h:
375
376 2008-02-26  David Hyatt  <hyatt@apple.com>
377
378         Cleanup of childrenChanged in preparation for fixing the HTML5 spec slowdown.
379
380         Reviewed by Sam Weinig
381
382         * dom/Attr.cpp:
383         (WebCore::Attr::childrenChanged):
384         * dom/ContainerNode.cpp:
385         (WebCore::ContainerNode::insertBefore):
386         (WebCore::ContainerNode::replaceChild):
387         (WebCore::ContainerNode::removeChild):
388         (WebCore::ContainerNode::removeChildren):
389         (WebCore::ContainerNode::appendChild):
390         (WebCore::ContainerNode::addChild):
391         (WebCore::ContainerNode::childrenChanged):
392         * dom/ContainerNode.h:
393         * dom/EventTargetNode.cpp:
394         (WebCore::EventTargetNode::dispatchSubtreeModifiedEvent):
395         * dom/EventTargetNode.h:
396         * dom/NamedAttrMap.cpp:
397         (WebCore::NamedAttrMap::addAttribute):
398         (WebCore::NamedAttrMap::removeAttribute):
399
400 2008-02-26  Darin Adler  <darin@apple.com>
401
402         Reviewed by Sam.
403
404         - remove use of DeprecatedCString from Windows pasteboard code
405
406         * platform/win/ClipboardUtilitiesWin.cpp:
407         (WebCore::createGlobalData): Added an overload for Vector<char>.
408         Streamlined the logic a bit.
409         (WebCore::append): Added. Helper functions for appending to a
410         Vector<char>.
411         (WebCore::markupToCF_HTML): Rewrote to use Vector<char> instead
412         of DeprecatedCString. Also simplified the logic a bit and used
413         macros to handle the integer width.
414         (WebCore::urlToMarkup): Use Vector<UChar> instead of String.
415         (WebCore::replaceNewlinesWithWindowsStyleNewlines): Tweaked.
416         * platform/win/ClipboardUtilitiesWin.h: Update type of return
417         value from markupToCF_HTML. Did a bit of streamlining too.
418         * platform/win/ClipboardWin.cpp:
419         (WebCore::writeURL): Update for above changes.
420         (WebCore::ClipboardWin::declareAndWriteDragImage): Ditto.
421         (WebCore::ClipboardWin::writeRange): Ditto.
422         * platform/win/PasteboardWin.cpp:
423         (WebCore::Pasteboard::writeSelection): Ditto.
424         (WebCore::Pasteboard::writeURL): Ditto.
425
426 2008-02-26  Timothy Hatcher  <timothy@apple.com>
427
428         Reviewed by Adam Roben.
429
430         <rdar://problem/5712777> REGRESSION: Arrow up/down in inspector
431         source list does not scroll when item at edge is reached (16572)
432
433         Use scrollIntoViewIfNeeded() instead of the hand-rolled scrollToElement
434         we were using in utilities.js.
435
436         * page/inspector/DocumentPanel.js: Use scrollIntoViewIfNeeded instead of scrollToElement.
437         * page/inspector/Resource.js: Ditto.
438         * page/inspector/inspector.js: Ditto.
439         * page/inspector/SourcePanel.js: Use scrollIntoViewIfNeeded instead
440         of scrollIntoView, so the source line is centered in the view if needed.
441         * page/inspector/utilities.js: Removed scrollToElement().
442
443 2008-02-26  David Hyatt  <hyatt@apple.com>
444
445         Reviewed by Dan
446
447         http://bugs.webkit.org/show_bug.cgi?id=17485
448
449         Refine our behavior for empty inlines so that they work more correctly with margins/borders/padding.
450         Fixes a regression on huffingtonpost.com.
451
452         New tests added to fast/inline
453
454         * rendering/InlineFlowBox.cpp:
455         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
456         (WebCore::InlineFlowBox::placeBoxesVertically):
457         (WebCore::InlineFlowBox::shrinkBoxesWithNoTextChildren):
458         * rendering/RenderFlow.cpp:
459         (WebCore::RenderFlow::calcMargins):
460         * rendering/RenderFlow.h:
461         * rendering/RenderObject.h:
462         (WebCore::RenderObject::hasHorizontalBordersPaddingOrMargin):
463         (WebCore::RenderObject::hasHorizontalBordersOrPadding):
464         * rendering/bidi.cpp:
465         (WebCore::getBorderPaddingMargin):
466         (WebCore::RenderBlock::layoutInlineChildren):
467         (WebCore::inlineFlowRequiresLineBox):
468
469 2008-02-26  Sam Weinig  <sam@webkit.org>
470
471         Fix Windows build.
472
473         * platform/text/PlatformString.h:
474         (WebCore::reverseFind):
475
476 2008-02-26  Dan Bernstein  <mitz@apple.com>
477
478         Reviewed by Darin Adler.
479
480         - fix http://bugs.webkit.org/show_bug.cgi?id=17555
481           <rdar://problem/5766016> REGRESSION (r27351): Thumbnails positioned wrong on Getty Images results page
482
483         Test: fast/dynamic/subtree-table-cell-height.html
484
485         * rendering/RenderObject.cpp:
486         (WebCore::objectIsRelayoutBoundary): Exclude table cells, since their
487         height depends on their contents even if the CSS height property is
488         fixed.
489
490 2008-02-25  Sam Weinig  <sam@webkit.org>
491
492         Reviewed by Dan Bernstein.
493
494         Make the cleanPath function in CSSStyleSelector more efficient by using
495         a Vector<UChar>.
496
497         * css/CSSStyleSelector.cpp:
498         (WebCore::cleanPath): Make this function work on a Vector<UChar> instead
499         of a String.  Also remove unnecessary reverseFind call that could be acomplished
500         with two compares.
501         (WebCore::checkPseudoState): Remove reserveCapacity calls now that we are using
502         a stack buffer.
503         * platform/text/PlatformString.h:
504         (WebCore::find): Make this find generic enough that it can be used for
505         String::find.
506         (WebCore::reverseFind): Implement reverseFind so that it can be used
507         for with a UChar* and length.
508         * platform/text/StringImpl.cpp:
509         (WebCore::StringImpl::find): Use implementation in PlatformString.cpp
510         (WebCore::StringImpl::reverseFind): Ditto,
511
512 2008-02-26  Satoshi Nakagawa  <artension@gmail.com>
513
514         Reviewed by Darin. Tweaked and landed by Alexey.
515
516         http://bugs.webkit.org/show_bug.cgi?id=17411
517         Ideographic comma and full stop should be treated as line-breakable characters
518
519         Test: fast/text/line-breaks-after-ideographic-comma-or-full-stop.html
520
521         * platform/text/CharacterNames.h: Added ideographicComma and ideographicFullStop.
522         * rendering/break_lines.cpp: (WebCore::shouldBreakAfter): Added a workaround for an issue in
523         Unicode 5.0 that is causing this.
524
525 2008-02-26  MorganL  <morganl.webkit@yahoo.com>
526
527         Reviewed by eseidel.  Landed by eseidel
528
529         Fix improperly initialized m_isUpToDate member variable.
530         Fixs 50+ layout tests when run on Tiger.
531         http://bugs.webkit.org/show_bug.cgi?id=17549
532
533         * platform/network/cf/ResourceResponse.h:
534         (WebCore::ResourceResponse::ResourceResponse):
535         * platform/network/mac/ResourceResponse.h:
536         (WebCore::ResourceResponse::ResourceResponse):
537
538 2008-02-25  Dan Bernstein  <mitz@apple.com>
539
540         Reviewed by Sam Weinig.
541
542         - fix http://bugs.webkit.org/show_bug.cgi?id=17152
543           Paragraphs indented with :first-letter and text-align CSS render incorrectly
544
545         Test: fast/text/apply-start-width-after-skipped-text.html
546
547         * rendering/bidi.cpp:
548         (WebCore::RenderBlock::findNextLineBreak): Improved the logic for when
549         to figure in the padding, border and margin before a text node when the
550         line begins inside a text node.
551
552 2008-02-25  Kevin Ollivier  <kevino@theolliviers.com>
553
554         Windows build fix for wx port.
555
556         * loader/FTPDirectoryDocument.cpp:
557
558 2008-02-25  Mark Rowe  <mrowe@apple.com>
559
560         Windows build fix.
561
562         * platform/network/cf/ResourceResponseCFNet.cpp:
563         (WebCore::ResourceResponse::platformCompare):  Implement platformCompare for ResourceResponseCFNet.cpp.
564
565 2008-02-25  Beth Dakin  <bdakin@apple.com>
566
567         Reviewed by Geoff.
568
569         Fixed for <rdar://problem/5760530> REGRESSION: Assertion failure in 
570         Document::removePendingSheet() from r30438
571
572         r30438 added a call to CachedResource::error() from inside 
573         Loader::didReceiveData() if a CSS file 4xxs. There was an 
574         assumption in the loader, though, that either error() would be 
575         called, or didFinishLoading() would be called, so some work is 
576         duplicated in each. Now that we are calling an error() on files 
577         that will also make it to didFinishLoading() (since they succeeded 
578         in the network layer), we need to make sure we do not duplicate the 
579         work. CachedCSSStyleSheet::error() calls checkNotify, which ends up 
580         decrementing the document's pending style sheet counter. 
581         checkNotify() was still getting called, though, through the normal  
582         didFinishLoading code path, and the counter was being decremented 
583         twice. Bad!
584
585         * loader/loader.cpp:
586         (WebCore::Loader::didFinishLoading):
587         (WebCore::Loader::didReceiveData):
588
589 2008-02-25  Mark Rowe  <mrowe@apple.com>
590
591         Fix the Gtk, wx and Qt builds.
592
593         * GNUmakefile.am: Add new files.
594         * WebCore.pro: Ditto.
595         * WebCoreSources.bkl: Ditto.
596         * platform/network/AuthenticationChallengeBase.h: Fix up argument types.
597
598 2008-02-25  MorganL  <morganl.webkit@yahoo.com>
599
600         Reviewed by Darin Adler.
601
602         Eliminate some #ifdefs from headers in platform/network.
603         http://bugs.webkit.org/show_bug.cgi?id=17210
604
605         * WebCore.base.exp:
606         * WebCore.order:
607         * WebCore.vcproj/WebCore.vcproj:
608         * WebCore.xcodeproj/project.pbxproj:
609         * dom/XMLTokenizer.cpp:
610         * loader/ResourceLoader.h:
611         * platform/network/AuthenticationChallenge.cpp: Removed.
612         * platform/network/AuthenticationChallenge.h: Removed.
613         * platform/network/AuthenticationChallengeBase.cpp: Copied from platform/network/AuthenticationChallenge.cpp.
614         (WebCore::AuthenticationChallengeBase::AuthenticationChallengeBase):
615         (WebCore::AuthenticationChallengeBase::previousFailureCount):
616         (WebCore::AuthenticationChallengeBase::proposedCredential):
617         (WebCore::AuthenticationChallengeBase::protectionSpace):
618         (WebCore::AuthenticationChallengeBase::failureResponse):
619         (WebCore::AuthenticationChallengeBase::error):
620         (WebCore::AuthenticationChallengeBase::isNull):
621         (WebCore::AuthenticationChallengeBase::nullify):
622         (WebCore::AuthenticationChallengeBase::compare):
623         * platform/network/AuthenticationChallengeBase.h: Copied from platform/network/AuthenticationChallenge.h.
624         (WebCore::AuthenticationChallengeBase::platformCompare):
625         (WebCore::operator==):
626         (WebCore::operator!=):
627         * platform/network/ResourceError.cpp: Removed.
628         * platform/network/ResourceError.h: Removed.
629         * platform/network/ResourceErrorBase.cpp: Copied from platform/network/ResourceError.cpp.
630         (WebCore::ResourceErrorBase::lazyInit):
631         (WebCore::ResourceErrorBase::compare):
632         * platform/network/ResourceErrorBase.h: Copied from platform/network/ResourceError.h.
633         (WebCore::ResourceErrorBase::isNull):
634         (WebCore::ResourceErrorBase::domain):
635         (WebCore::ResourceErrorBase::errorCode):
636         (WebCore::ResourceErrorBase::failingURL):
637         (WebCore::ResourceErrorBase::localizedDescription):
638         (WebCore::ResourceErrorBase::ResourceErrorBase):
639         (WebCore::ResourceErrorBase::platformLazyInit):
640         (WebCore::ResourceErrorBase::platformCompare):
641         (WebCore::operator==):
642         * platform/network/ResourceResponseBase.cpp:
643         (WebCore::ResourceResponseBase::isHTTP):
644         (WebCore::ResourceResponseBase::url):
645         (WebCore::ResourceResponseBase::setUrl):
646         (WebCore::ResourceResponseBase::mimeType):
647         (WebCore::ResourceResponseBase::setMimeType):
648         (WebCore::ResourceResponseBase::expectedContentLength):
649         (WebCore::ResourceResponseBase::setExpectedContentLength):
650         (WebCore::ResourceResponseBase::textEncodingName):
651         (WebCore::ResourceResponseBase::setTextEncodingName):
652         (WebCore::ResourceResponseBase::suggestedFilename):
653         (WebCore::ResourceResponseBase::setSuggestedFilename):
654         (WebCore::ResourceResponseBase::httpStatusCode):
655         (WebCore::ResourceResponseBase::setHTTPStatusCode):
656         (WebCore::ResourceResponseBase::httpStatusText):
657         (WebCore::ResourceResponseBase::setHTTPStatusText):
658         (WebCore::ResourceResponseBase::httpHeaderField):
659         (WebCore::ResourceResponseBase::setHTTPHeaderField):
660         (WebCore::ResourceResponseBase::httpHeaderFields):
661         (WebCore::ResourceResponseBase::isAttachment):
662         (WebCore::ResourceResponseBase::setExpirationDate):
663         (WebCore::ResourceResponseBase::expirationDate):
664         (WebCore::ResourceResponseBase::setLastModifiedDate):
665         (WebCore::ResourceResponseBase::lastModifiedDate):
666         (WebCore::ResourceResponseBase::lazyInit):
667         (WebCore::ResourceResponseBase::compare):
668         * platform/network/ResourceResponseBase.h:
669         (WebCore::ResourceResponseBase::ResourceResponseBase):
670         (WebCore::ResourceResponseBase::platformLazyInit):
671         (WebCore::ResourceResponseBase::platformCompare):
672         (WebCore::operator==):
673         * platform/network/cf/AuthenticationCF.cpp:
674         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
675         (WebCore::AuthenticationChallenge::platformCompare):
676         * platform/network/cf/AuthenticationChallenge.h: Added.
677         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
678         (WebCore::AuthenticationChallenge::sourceHandle):
679         (WebCore::AuthenticationChallenge::cfURLAuthChallengeRef):
680         * platform/network/cf/ResourceError.h: Added.
681         (WebCore::ResourceError::ResourceError):
682         * platform/network/cf/ResourceErrorCF.cpp:
683         (WebCore::ResourceError::ResourceError):
684         (WebCore::ResourceError::platformLazyInit):
685         (WebCore::ResourceError::platformCompare):
686         (WebCore::ResourceError::operator CFStreamError):
687         * platform/network/cf/ResourceResponse.h:
688         (WebCore::ResourceResponse::ResourceResponse):
689         * platform/network/cf/ResourceResponseCFNet.cpp:
690         (WebCore::ResourceResponse::platformLazyInit):
691         * platform/network/curl/AuthenticationChallenge.h: Added.
692         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
693         * platform/network/curl/ResourceError.h: Added.
694         (WebCore::ResourceError::ResourceError):
695         * platform/network/curl/ResourceResponse.h:
696         (WebCore::ResourceResponse::ResourceResponse):
697         * platform/network/mac/AuthenticationChallenge.h: Added.
698         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
699         (WebCore::AuthenticationChallenge::sender):
700         (WebCore::AuthenticationChallenge::nsURLAuthenticationChallenge):
701         * platform/network/mac/AuthenticationMac.mm:
702         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
703         (WebCore::AuthenticationChallenge::platformCompare):
704         * platform/network/mac/ResourceError.h: Added.
705         (WebCore::ResourceError::ResourceError):
706         * platform/network/mac/ResourceErrorMac.mm:
707         (WebCore::ResourceError::platformLazyInit):
708         (WebCore::ResourceError::platformCompare):
709         * platform/network/mac/ResourceResponse.h:
710         (WebCore::ResourceResponse::ResourceResponse):
711         * platform/network/mac/ResourceResponseMac.mm:
712         (WebCore::ResourceResponse::platformLazyInit):
713         (WebCore::ResourceResponse::platformCompare):
714         * platform/network/qt/AuthenticationChallenge.h: Added.
715         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
716         * platform/network/qt/ResourceError.h: Added.
717         (WebCore::ResourceError::ResourceError):
718         * platform/network/qt/ResourceResponse.h:
719         (WebCore::ResourceResponse::ResourceResponse):
720         * xml/XSLTProcessor.cpp:
721
722 2008-02-25  Anders Carlsson  <andersca@apple.com>
723
724         Reviewed by Darin.
725
726         Move remaining render style objects over to start with a refcount of 1 and get
727         rid of DeprecatedDataRef.
728         
729         * rendering/DataRef.h:
730         (WebCore::DataRef::operator*):
731         (WebCore::DataRef::operator->):
732         * rendering/RenderStyle.h:
733         * rendering/SVGRenderStyle.cpp:
734         (WebCore::SVGRenderStyle::SVGRenderStyle):
735         * rendering/SVGRenderStyle.h:
736         (WebCore::SVGRenderStyle::create):
737         (WebCore::SVGRenderStyle::copy):
738         * rendering/SVGRenderStyleDefs.cpp:
739         (StyleFillData::StyleFillData):
740         (StyleStrokeData::StyleStrokeData):
741         (StyleStopData::StyleStopData):
742         (StyleTextData::StyleTextData):
743         (StyleClipData::StyleClipData):
744         (StyleMaskData::StyleMaskData):
745         (StyleMarkerData::StyleMarkerData):
746         (StyleMiscData::StyleMiscData):
747         * rendering/SVGRenderStyleDefs.h:
748         (WebCore::StyleFillData::create):
749         (WebCore::StyleFillData::copy):
750         (WebCore::StyleStrokeData::create):
751         (WebCore::StyleStrokeData::copy):
752         (WebCore::StyleStopData::create):
753         (WebCore::StyleStopData::copy):
754         (WebCore::StyleTextData::create):
755         (WebCore::StyleTextData::copy):
756         (WebCore::StyleClipData::create):
757         (WebCore::StyleClipData::copy):
758         (WebCore::StyleMaskData::create):
759         (WebCore::StyleMaskData::copy):
760         (WebCore::StyleMarkerData::create):
761         (WebCore::StyleMarkerData::copy):
762         (WebCore::StyleMiscData::create):
763         (WebCore::StyleMiscData::copy):
764
765 2008-02-25  Dan Bernstein  <mitz@apple.com>
766
767         Reviewed by Dave Hyatt.
768
769         - remove file-static BidiRun variables from bidi.cpp
770
771         * platform/text/BidiResolver.h:
772         (WebCore::BidiResolver::): Initialize m_logicallyLastRun.
773         (WebCore::BidiResolver::logicallyLastRun): Added.
774         (WebCore::BidiResolver::runCount): Made unsigned.
775         (WebCore::::reverseRuns): Changed ints to unsigned.
776         (WebCore::::createBidiRunsForLine): Made this function set
777         m_logicallyLastRun.
778         * rendering/RenderBlock.h:
779         * rendering/bidi.cpp:
780         (WebCore::BidiState::addRun): Removed setting of sLogicallyLastBidiRun.
781         (WebCore::RenderBlock::constructLine): Removed unused start parameter
782         and added run count and first and last run parameters. Replaced end
783         parameter with lastLine boolean and endObject pointer.
784         (WebCore::RenderBlock::computeHorizontalPositionsForLine): Added first
785         and logically last run parameters.
786         (WebCore::RenderBlock::computeVerticalPositionsForLine): Added firstRun
787         parameter.
788         (WebCore::RenderBlock::bidiReorderLine): Removed setting of static
789         variables.
790         (WebCore::RenderBlock::layoutInlineChildren): Changed to use BidiState
791         accessors instead of file statics.
792
793 2008-02-25  Rodney Dawes  <dobey@wayofthemonkey.com>
794
795         Reviewed by Jon Honeycutt.
796
797         http://bugs.webkit.org/show_bug.cgi?id=16924
798         Bug 16924: Shared PluginDatabase, PluginPackage, and PlugInInfoStore implementations
799
800         Add PluginInfoStore.cpp and new PluginDatabase.cpp to GTK+ and Qt ports.
801         Remove old PlugInInfoStoreQt.cpp as it is obsoleted by shared code.
802         Add PluginInfoStore, PluginDatabase, and PluginStream files to Wx build.
803         Add new PluginDatabase.cpp to Windows build.
804         Add temporary stubs for new PluginDatabase and PluginPackage.
805         shared classes to GTK+, Qt, and Wx ports.
806         Copy PluginDatabaseWin.cpp to PluginDatabase.cpp to preserve history.
807         Remove shared code from PluginDatabaseWin.cpp.
808         Remove Windows-specific code from PluginDatabase.cpp.
809         Use PlatformModule and PlatformFileTime instead of HMODULE and FILETIME.
810         Remove extraneous PluginPackage:: from hash() class method prototype.
811         Subsume storeFileVersion into PluginPackage::fetchInfo.
812         Add cross-platform PlatformModuleVersion type definition.
813         Use PlatformModuleVersion to store the module version.
814         Rename m_fileVersion[ML]S to m_moduleVersion.
815         Change compareFileVersion to use PlatformModuleVersion as the argument.
816         Move PluginView::determineQuirks and m_quirks to PluginPackage.
817         Updated determineQuirks for the PlatformModuleVersion.
818
819         * GNUmakefile.am:
820         * WebCore.pro:
821         * WebCoreSources.bkl:
822         * webcore-base.bkl:
823         * WebCore.vcproj/WebCore.vcproj:
824         * Platform/FileSystem.h:
825         * platform/qt/PlugInInfoStoreQt.cpp:
826         * platform/gtk/TemporaryLinkStubs.cpp:
827         * platform/qt/TemporaryLinkStubs.cpp:
828         * platform/wx/TemporaryLinkStubs.cpp:
829         * plugins/PluginDatabase.cpp:
830         * plugins/PluginDatabase.h:
831         * plugins/win/PluginDatabaseWin.cpp:
832         * plugins/PluginPackage.h:
833         * plugins/win/PluginPackageWin.cpp:
834         * plugins/PluginView.h:
835         * plugins/win/PluginViewWin.cpp:
836
837 2008-02-25  Anders Carlsson  <andersca@apple.com>
838
839         Reviewed by Darin.
840
841         Make more style objects start out with a refcount of 1.
842         
843         * rendering/RenderStyle.cpp:
844         (WebCore::StyleSurroundData::StyleSurroundData):
845         (WebCore::StyleBoxData::StyleBoxData):
846         (WebCore::StyleVisualData::StyleVisualData):
847         (WebCore::StyleBackgroundData::StyleBackgroundData):
848         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
849         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
850         (WebCore::StyleInheritedData::StyleInheritedData):
851         * rendering/RenderStyle.h:
852         (WebCore::StyleSurroundData::create):
853         (WebCore::StyleSurroundData::copy):
854         (WebCore::StyleBoxData::create):
855         (WebCore::StyleBoxData::copy):
856         (WebCore::StyleVisualData::create):
857         (WebCore::StyleVisualData::copy):
858         (WebCore::StyleBackgroundData::create):
859         (WebCore::StyleBackgroundData::copy):
860         (WebCore::StyleBackgroundData::~StyleBackgroundData):
861         (WebCore::StyleRareNonInheritedData::create):
862         (WebCore::StyleRareNonInheritedData::copy):
863         (WebCore::StyleRareInheritedData::create):
864         (WebCore::StyleRareInheritedData::copy):
865         (WebCore::StyleInheritedData::create):
866         (WebCore::StyleInheritedData::copy):
867
868 2008-02-25  Anders Carlsson  <andersca@apple.com>
869
870         Reviewed by Darin.
871
872         Make some of the refcounted style objects start out with a refcount of 1.
873
874         * rendering/DataRef.h:
875         Make a DeprecatedDataRef class which is just a copy of the old DataRef class.
876         Change DataRef to use ::create() and ::copy() instead of the constructors.
877         Change DataRef's pointer to be a RefPtr instead.
878
879         * rendering/RenderStyle.cpp:
880         (WebCore::StyleMarqueeData::StyleMarqueeData):
881         (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
882         (WebCore::StyleMultiColData::StyleMultiColData):
883         (WebCore::StyleTransformData::StyleTransformData):
884         Start with a RefCount of 1.
885         
886         * rendering/RenderStyle.h:
887         * rendering/SVGRenderStyle.h:
888         Add ::create() and ::copy() methods. Make not yet converted classes use DeprecatedDataRef.
889
890 2008-02-25  Darin Adler  <darin@apple.com>
891
892         Reviewed by Anders.
893         Based on a patch by Tim Steele <timsteele41@gmail.com>.
894
895         - fix http://bugs.webkit.org/show_bug.cgi?id=17186
896           Fragment navigation within a page permanently cancels meta refresh
897
898         Test: fast/loader/meta-refresh-anchor-click.html
899
900         * loader/FrameLoader.cpp:
901         (WebCore::FrameLoader::load): When load type is FrameLoadTypeRedirectWithLockedHistory,
902         always do a real load. This makes sure that meta refresh loads are treated as real loads
903         rather than anchor scrolls. Also tweaked formatting a bit.
904         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy): This function is
905         an alternate way to complete a load, so it needs to start the redirection timer if
906         redirection has already been scheduled.
907
908 2008-02-25  Dan Bernstein  <mitz@apple.com>
909
910         Reviewed by Darin Adler.
911
912         - avoid counting spaces in non-justified text
913
914         * rendering/bidi.cpp:
915         Removed file-static numSpaces.
916         (WebCore::BidiState::addRun): Removed space counting.
917         (WebCore::RenderBlock::computeHorizontalPositionsForLine): Added space
918         counting, conditional on the block having the text-align: justify
919         property value.
920         (WebCore::RenderBlock::bidiReorderLine): Removed initialization of
921         numSpaces.
922
923 2008-02-25  Darin Adler  <darin@apple.com>
924
925         Requested by Steve.
926
927         * platform/graphics/cg/ImageSourceCG.cpp:
928         (WebCore::ImageSource::createFrameAtIndex): Put the string into a global
929         variable (because CFSTR is inefficient on Windows).
930
931 2008-02-25  Darin Adler  <darin@apple.com>
932
933         Reviewed by Adam.
934
935         * WebCore.base.exp: Export blankURL, and sort the file.
936
937 2008-02-25  Simon Hausmann  <hausmann@webkit.org>
938
939         Reviewed by Mark Rowe.
940
941         Fix compilation with gcc 4.3, added stdio.h and unistd.h inclusions.
942
943         * dom/Position.cpp:
944         * dom/Range.cpp:
945         * editing/Selection.cpp:
946         * editing/SelectionController.cpp:
947         * editing/VisiblePosition.cpp:
948         * history/HistoryItem.cpp:
949         * loader/Cache.cpp:
950         * loader/FTPDirectoryParser.cpp:
951         * platform/KURL.cpp:
952         * platform/gtk/FileSystemGtk.cpp:
953         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
954         * platform/text/TextCodecLatin1.cpp:
955         * platform/text/TextCodecUserDefined.cpp:
956         * rendering/CounterNode.cpp:
957         * rendering/RenderObject.cpp:
958
959 2008-02-25  Johnny Ding  <johnnyding.webkit@gmail.com>
960
961         Reviewed by Darin Adler.
962
963         - fix http://bugs.webkit.org/show_bug.cgi?id=17444
964
965         In HTMLTokenizer::write, the code checks 'pendingScripts.isEmpty()' to decide
966         whether to save prependingSrc or not. However, in HTMLTokenizer::scriptHandler
967         and HTMLTokenizer::scriptExecution, the code checks testBit:LoadingExtScript
968         to decide whether to save prependingSrc or not. The later behavior is not right
969         because, in scriptHandler and scriptExecution, even the pendingScripts queue is
970         empty, the testBit:LoadingExtScript might be TRUE.
971
972         Test: fast/tokenizer/nested-multiple-scripts.html
973
974         * html/HTMLTokenizer.cpp:
975         (WebCore::HTMLTokenizer::scriptHandler): check pendingScripts.isEmpty() instead of
976         checking state.loadingExtScript().
977         (WebCore::HTMLTokenizer::scriptExecution): check pendingScripts.isEmpty() instead of
978         checking state.loadingExtScript().
979
980 2008-02-24  Darin Adler  <darin@apple.com>
981
982         * dom/Document.h: Removed stray duplicate declaration of
983         RegisteredEventListenerList.
984
985 2008-02-24  Darin Adler  <darin@apple.com>
986
987         * dom/Range.cpp:
988         (WebCore::Range::surroundContents): Removed incorrect comment.
989         I added it a while ago, and I was just mixed up.
990
991 2008-02-24  Darin Adler  <darin@apple.com>
992
993         - quick follow-up to that last check-in
994
995         * platform/graphics/cg/ImageSourceCG.cpp:
996         (WebCore::ImageSource::createFrameAtIndex): Use CFEqual instead of
997         WebCore::String's == for speed.
998
999 2008-02-24  Michael Knaup  <michael.knaup@mac.com>
1000
1001         Reviewed by Darin.
1002
1003         Bug 8749: XBM rendered incorrectly as black on white
1004
1005         xbm images are now created and rendered using black on a
1006         transparent background (same behavior as in Firefox)
1007
1008         Test: platform/mac/fast/canvas/canvas-draw-xbm-image.html
1009
1010         * platform/graphics/cg/ImageSourceCG.cpp:
1011         (WebCore::ImageSource::createFrameAtIndex):
1012
1013 2008-02-24  Dan Bernstein  <mitz@apple.com>
1014
1015         Reviewed by Darin Adler.
1016
1017         - fix http://bugs.webkit.org/show_bug.cgi?id=17471
1018           REGRESSION (r30438): Crash in deleteLineBoxes in cursor-adjusting code browsing Acid3
1019
1020         Test: http/tests/misc/object-image-error.html
1021
1022         * html/HTMLObjectElement.cpp:
1023         (WebCore::HTMLObjectElement::attach): Added an early return in case
1024         updateFromElement() has changed the object to use fallback content.
1025
1026 2008-02-24  Dan Bernstein  <mitz@apple.com>
1027
1028         Reviewed by Darin Adler.
1029
1030         - fix float positioning when a float that does not fit on the line is
1031           followed by a float that does
1032
1033         Test: fast/block/float/narrow-after-wide.html
1034
1035         * rendering/bidi.cpp:
1036         (WebCore::RenderBlock::findNextLineBreak): Changed to not position any
1037         more floats on the line once a float that does not fit is encountered.
1038         That float should be pushed to the next line, and so should all floats
1039         that follow, regardless of whether they can fit on the current line.
1040
1041 2008-02-24  Darin Adler  <darin@apple.com>
1042
1043         Reviewed by Sam.
1044
1045         - fix http://bugs.webkit.org/show_bug.cgi?id=16770
1046           Acid3 expects :visited styled links to restyle on iframe load
1047
1048         Disentangle global history updating from the back/forward history.
1049         There are many cases where we don't want to create a new back/forward
1050         item, but we do still want to add to the global history (used for visited
1051         link coloring) in those cases.
1052
1053         Test: fast/history/subframe-is-visited.html
1054
1055         * loader/FrameLoader.cpp:
1056         (WebCore::FrameLoader::updateGlobalHistory): Renamed from
1057         addHistoryForCurrentLocation and removed the back/forward handling.
1058         (WebCore::FrameLoader::updateHistoryForStandardLoad): Streamlined logic a
1059         bit. Replaced call to addHistoryForCurrentLocation with a call to
1060         addBackForwardItemClippedAtTarget. Added an unconditional call to
1061         updateGlobalHistory.
1062         (WebCore::FrameLoader::updateHistoryForClientRedirect): Added a FIXME;
1063         why doesn't this function update global history?
1064         (WebCore::FrameLoader::updateHistoryForBackForwardNavigation): Ditto.
1065         (WebCore::FrameLoader::updateHistoryForReload): Replaced the direct call
1066         the client with a call to the new updateGlobalHistory function.
1067         (WebCore::FrameLoader::updateHistoryForRedirectWithLockedHistory): Did
1068         the same changes as for updateHistoryForStandardLoad.
1069         * loader/FrameLoader.h: More of the same.
1070
1071         * loader/FrameLoaderClient.h: Removed updateGlobalHistoryForReload and
1072         renamed updateGlobalHistoryForStandardLoad to updateGlobalHistory.
1073
1074         * svg/graphics/SVGImageEmptyClients.h:
1075         (WebCore::SVGEmptyFrameLoaderClient::updateGlobalHistory): Updated to
1076         match the above.
1077
1078 2008-02-23  Darin Adler  <darin@apple.com>
1079
1080         Reviewed by Sam.
1081
1082         - fix http://bugs.webkit.org/show_bug.cgi?id=17508
1083           REGRESSION (r30535): mailto regression tests failing
1084
1085         * html/HTMLFormElement.cpp:
1086         (WebCore::HTMLFormElement::submit): Restore the old logic, with its unpleasant
1087         trip through String do to the replace operation. It's inefficient, but there's
1088         no real reason to worry about the efficiency of mailto forms, since that feature
1089         is nearly obsolete.
1090
1091 2008-02-23  Darin Adler  <darin@apple.com>
1092
1093         Reviewed by Sam.
1094
1095         - replace SegmentedString's use of DeprecatedValueList with Deque
1096
1097         Testing indicates this is a slight speed-up for page loading.
1098
1099         * platform/text/SegmentedString.cpp:
1100         (WebCore::SegmentedString::length): Update to use Deque.
1101         (WebCore::SegmentedString::setExcludeLineNumbers): Ditto.
1102         (WebCore::SegmentedString::append): Ditto.
1103         (WebCore::SegmentedString::prepend): Ditto.
1104         (WebCore::SegmentedString::advanceSubstring): Ditto.
1105         (WebCore::SegmentedString::toString): Ditto.
1106         * platform/text/SegmentedString.h: Tweak formatting. Don't bother making an entire
1107         class private with a single friend. Change m_sbstrings from a DeprecatedValueList
1108         to a Deque.
1109
1110 2008-02-23  Darin Adler  <darin@apple.com>
1111
1112         Reviewed by Anders.
1113
1114         - fix http://bugs.webkit.org/show_bug.cgi?id=17506
1115           REGRESSION (r30535): ASSERTION FAILED: i < size()
1116
1117         * loader/TextResourceDecoder.cpp:
1118         (WebCore::findTextEncoding): Fix off-by-one in code that null-terminates
1119         the C string here.
1120
1121 2008-02-23  Matt Lilek  <webkit@mattlilek.com>
1122
1123         Not reviewed, build fix.
1124
1125         * platform/network/cf/FormDataStreamCFNet.cpp:
1126         (WebCore::httpBodyFromRequest):
1127         * plugins/win/PluginViewWin.cpp:
1128         (WebCore::PluginView::handlePost):
1129
1130 2008-02-23  Dan Bernstein  <mitz@apple.com>
1131
1132         - fix a typo
1133
1134         * platform/graphics/win/GlyphPageTreeNodeCGWin.cpp:
1135         (WebCore::GlyphPage::fill):
1136         * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
1137         (WebCore::GlyphPage::fill):
1138
1139 2008-02-23  Dan Bernstein  <mitz@apple.com>
1140
1141         Reviewed by Anders Carlsson.
1142
1143         - fix GlyphPage::fill() logic for partial page fills
1144
1145         * platform/graphics/win/GlyphPageTreeNodeCGWin.cpp:
1146         (WebCore::GlyphPage::fill): Changed the test for non-BMP characters to
1147         work correctly when the length parameter is less than a full page size.
1148         Also updated the comment.
1149         * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
1150         (WebCore::GlyphPage::fill): Ditto.
1151
1152 2008-02-23  Kevin Ollivier  <kevino@theolliviers.com>
1153
1154         Reviewed by Darin Adler.
1155
1156         Move text drawing into wxcode, as we need platform-dependent
1157         APIs for drawing non-kerned text, which wx doesn't yet have.
1158         (But hopefully will, once these APIs are fleshed out on all
1159         platforms!)
1160
1161         http://bugs.webkit.org/show_bug.cgi?id=17396
1162
1163         * platform/graphics/wx/FontWx.cpp:
1164         (WebCore::Font::drawGlyphs):
1165         * platform/wx/wxcode/gtk/non-kerned-drawing.cpp: Added.
1166         * platform/wx/wxcode/mac/carbon/non-kerned-drawing.cpp: Added.
1167         * platform/wx/wxcode/non-kerned-drawing.h: Added.
1168         * platform/wx/wxcode/win/non-kerned-drawing.cpp: Added.
1169         * webcore-wx.bkl:
1170
1171 2008-02-23  Darin Adler  <darin@apple.com>
1172
1173         Pointed out by Mitz.
1174
1175         * loader/TextResourceDecoder.cpp:
1176         (WebCore::find): Fix a "==" that was supposed to be ">".
1177         (WebCore::findIgnoringCase): Ditto.
1178
1179 2008-02-23  Darin Adler  <darin@apple.com>
1180
1181         Reviewed by Sam.
1182
1183         * html/HTMLFormElement.cpp:
1184         (WebCore::appendEncodedString): Fix buffer overrun in the code I just landed.
1185
1186 2008-02-23  Darin Adler  <darin@apple.com>
1187
1188         Reviewed by Sam.
1189
1190         - remove all but 1 remaining use of DeprecatedCString
1191         - change FormData to start refcount at 1
1192
1193         * html/HTMLFormElement.cpp:
1194         (WebCore::appendString): Added. Helpers for Vector<char>.
1195         (WebCore::appendEncodedString): Renamed from encodeCString and changed to
1196         append to an existing Vector<char> to cut down a bit on memory allocation.
1197         (WebCore::HTMLFormElement::formData): Replace the DeprecatedCString called
1198         enc_string with a Vector<char> called encodedData. Change to use the new
1199         FormData::create function.
1200         (WebCore::HTMLFormElement::submit): Same thing, for the mailto form code.
1201
1202         * loader/TextResourceDecoder.cpp:
1203         (WebCore::find): Added. Helper for searching in char* with length.
1204         (WebCore::findIgnoringCase): Ditto.
1205         (WebCore::findTextEncoding): Added. Helper for looking up a text encoding
1206         when we have a char* with length rather than a null-terminated char*.
1207         (WebCore::findXMLEncoding): Changed to use char* and length rather than
1208         DeprecatedCString. Also fixed some things that would be one-character
1209         buffer overruns in a string that's not null-terminated.
1210         (WebCore::TextResourceDecoder::checkForCSSCharset): Change to use
1211         findTextEncoding rather than constructing a CString to pass to the
1212         TextEncodingconstructor.
1213         (WebCore::TextResourceDecoder::checkForHeadCharset): Ditto.
1214
1215         * platform/network/FormData.cpp:
1216         (WebCore::FormData::FormData): Changed to start refcount at 1.
1217         (WebCore::FormData::create): Added.
1218         (WebCore::FormData::copy): Call adoptRef since refcount starts at 1.
1219         * platform/network/FormData.h: Made constructor private. Added create functions.
1220
1221         * platform/network/mac/ResourceRequestMac.mm:
1222         (WebCore::ResourceRequest::doUpdateResourceRequest): Call FormData::create.
1223         * xml/XMLHttpRequest.cpp:
1224         (WebCore::XMLHttpRequest::send): Ditto.
1225
1226 2008-02-23  Darin Adler  <darin@apple.com>
1227
1228         Reviewed by Anders.
1229
1230         - http://bugs.webkit.org/show_bug.cgi?id=17067
1231           eliminate attributes parameter from JSObject::put for speed/clarity
1232
1233         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1234         (WebCore::JSCSSStyleDeclaration::customPut): Remove attributes argument.
1235
1236         * bindings/js/JSCanvasPixelArrayCustom.cpp:
1237         (WebCore::JSCanvasPixelArray::indexGetter): Use early exit idiom.
1238         (WebCore::JSCanvasPixelArray::indexSetter): Moved length check into the
1239         CanvasPixelArray object, for consistency with the getter. Removed attributes
1240         argument.
1241
1242         * bindings/js/JSDOMWindowCustom.cpp:
1243         (WebCore::JSDOMWindow::customPut): Removed special case for variable
1244         initialization, which is not needed since that does use put any more.
1245         Removed attributes argument.
1246
1247         * bindings/js/JSEventTargetBase.h:
1248         (WebCore::JSEventTargetBase::putValueProperty): Removed attributes argument.
1249         (WebCore::JSEventTargetBase::put): Ditto.
1250         (WebCore::JSEventTargetPrototype::self): Removed Internal flag.
1251         * bindings/js/JSEventTargetNode.cpp:
1252         (WebCore::JSEventTargetNode::put): Removed attributes argument.
1253         (WebCore::JSEventTargetNode::putValueProperty): Ditto.
1254         * bindings/js/JSEventTargetNode.h: Ditto.
1255         * bindings/js/JSHTMLAppletElementCustom.cpp:
1256         (WebCore::JSHTMLAppletElement::customPut): Ditto.
1257         * bindings/js/JSHTMLEmbedElementCustom.cpp:
1258         (WebCore::JSHTMLEmbedElement::customPut): Ditto.
1259         * bindings/js/JSHTMLInputElementBase.cpp:
1260         (WebCore::JSHTMLInputElementBase::put): Ditto.
1261         (WebCore::JSHTMLInputElementBase::putValueProperty): Ditto.
1262         * bindings/js/JSHTMLInputElementBase.h: Ditto.
1263         * bindings/js/JSHTMLObjectElementCustom.cpp:
1264         (WebCore::JSHTMLObjectElement::customPut): Ditto.
1265         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
1266         (WebCore::JSHTMLOptionsCollection::indexSetter): Ditto.
1267         * bindings/js/JSHTMLSelectElementCustom.cpp:
1268         (WebCore::JSHTMLSelectElement::indexSetter): Ditto.
1269         * bindings/js/JSHistoryCustom.cpp:
1270         (WebCore::JSHistory::customPut): Ditto.
1271         * bindings/js/JSLocation.cpp:
1272         (WebCore::JSLocation::put): Ditto.
1273         * bindings/js/JSLocation.h: Ditto.
1274         * bindings/js/JSXMLHttpRequest.cpp:
1275         (WebCore::JSXMLHttpRequest::put): Ditto.
1276         (WebCore::JSXMLHttpRequest::putValueProperty): Ditto.
1277         * bindings/js/JSXMLHttpRequest.h: Ditto.
1278
1279         * bindings/js/kjs_dom.cpp:
1280         (WebCore::getRuntimeObject): Changed return type to JSObject*.
1281         * bindings/js/kjs_dom.h: Ditto.
1282
1283         * bindings/js/kjs_events.cpp:
1284         (WebCore::JSClipboard::put): Removed attributes argument.
1285         (WebCore::JSClipboard::putValueProperty): Ditto.
1286         * bindings/js/kjs_events.h: Ditto.
1287
1288         * bindings/js/kjs_html.cpp:
1289         (WebCore::runtimeObjectGetter): Updated for change to getRuntimeObject to
1290         return a JSObject. Used early exit idiom.
1291         (WebCore::runtimeObjectPropertyGetter): Ditto.
1292         (WebCore::runtimeObjectCustomGetOwnPropertySlot): Ditto.
1293         (WebCore::runtimeObjectCustomPut): Use hasProperty to check for properties
1294         that we should put with the property syntax instead of canPut.
1295         (WebCore::runtimeObjectImplementsCall): Ditto.
1296         (WebCore::runtimeObjectCallAsFunction): Ditto.
1297         * bindings/js/kjs_html.h: Removed attributes argument to runtimeObjectCustomPut.
1298
1299         * bindings/js/kjs_window.cpp:
1300         (KJS::Window::put): Removed attributes argument.
1301         * bindings/js/kjs_window.h: Ditto.
1302
1303         * bindings/scripts/CodeGeneratorJS.pm: Removed attributes argument from put,
1304         putValueProperty, customPut, and indexSetter.
1305
1306         * html/CanvasPixelArray.h:
1307         (WebCore::CanvasPixelArray::set): Added index checking here, as in the get
1308         function. Before, the checking was done in the JavaScript bindings for set.
1309
1310 2008-02-23  Brent Fulgham  <bfulgham@gmail.com>
1311
1312         Reviewed by Adam and Darin.
1313
1314         http://bugs.webkit.org/show_bug.cgi?id=17442
1315         Correct the Windows Cairo implementation of GraphicsContext so
1316         that Windows 'WorldTransform' is kept in sync with the Cairo
1317         transormations.
1318
1319         Also corrects an uninitialized variable in the Cairo Windows
1320         image drag handler.
1321
1322         WARNING: NO TEST CASES ADDED OR CHANGED
1323
1324         * platform/graphics/cairo/GraphicsContextCairo.cpp:  Modify
1325           methods to call GraphicsContextPlatformPrivate calls, just
1326           as is done for the CoreGraphics version.  These calls are
1327           nop's for everything but Windows.
1328         (WebCore::GraphicsContext::savePlatformState):
1329         (WebCore::GraphicsContext::restorePlatformState):
1330         (WebCore::GraphicsContext::clip):
1331         (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
1332         (WebCore::GraphicsContext::translate):
1333         (WebCore::GraphicsContext::concatCTM): Re-enable for Windows
1334         (WebCore::GraphicsContext::beginTransparencyLayer):
1335         (WebCore::GraphicsContext::endTransparencyLayer):
1336         (WebCore::GraphicsContext::rotate):
1337         (WebCore::GraphicsContext::scale):
1338         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
1339         * platform/graphics/win/GraphicsContextCGWin.cpp:  Move common
1340           code for handling WorldTransform calls to parent class.
1341         * platform/graphics/win/GraphicsContextCairoWin.cpp:  Add common
1342           code for handling WorldTransform calls.
1343           (WebCore::GraphicsContextPlatformPrivate::concatCTM):  Change
1344           implementation so that it only handles WorldTransform.  The
1345           Cairo update is done in GraphicsContextCairo.cpp
1346         * platform/graphics/win/GraphicsContextWin.cpp:  Call platform-private
1347           methods to keep WorldTransform in sync.
1348         (WebCore::GraphicsContextPlatformPrivate::save):
1349         (WebCore::GraphicsContextPlatformPrivate::restore):
1350         (WebCore::GraphicsContextPlatformPrivate::clip):
1351         (WebCore::GraphicsContextPlatformPrivate::scale):
1352         (WebCore::GraphicsContextPlatformPrivate::rotate):
1353         (WebCore::GraphicsContextPlatformPrivate::translate):
1354         * platform/win/DragImageCairoWin.cpp:
1355         (WebCore::createDragImageFromImage):  Correct uninitialized value
1356
1357 2008-02-23  Dan Bernstein  <mitz@apple.com>
1358
1359         Reviewed by Dave Hyatt.
1360
1361         - make non-autowrapping text clear floats
1362
1363         Test: fast/text/whitespace/nowrap-clear-float.html
1364
1365         * rendering/RenderBlock.cpp:
1366         (WebCore::RenderBlock::nextFloatBottomBelow): Renamed nearestFloat() to
1367         this and changed to avoid comparing bottom to 0 in each iteration.
1368         (WebCore::RenderBlock::getClearDelta): Updated comment for the rename.
1369         * rendering/RenderBlock.h:
1370         * rendering/bidi.cpp:
1371         (WebCore::RenderBlock::fitBelowFloats): Added. Factored out of
1372         findNextLineBreak() and simplified.
1373         (WebCore::RenderBlock::findNextLineBreak): Changed to call
1374         fitBelowFloats(). Fixed the bug by trying to fit below floats in the
1375         case of non-wrapping text. Removed some redundancy.
1376
1377 2008-02-23  Sam Weinig  <sam@webkit.org>
1378
1379         Reviewed by Oliver Hunt.
1380
1381         Fix for http://bugs.webkit.org/show_bug.cgi?id=17504
1382         Speed up DOM lists array subscription syntax by using the fast 
1383         getOwnPropertySlot and set paths
1384
1385         - 6x speed improvement on Oliver's ImageData put test.
1386
1387         * bindings/scripts/CodeGeneratorJS.pm: Add fast path for getOwnPropertySlot
1388         and put when an indexGetter or indexSetter is used.  We can not use the fast
1389         path if an overridingNameGetter is used as there would be no way to override.
1390
1391 2008-02-23  Kevin Ollivier  <kevino@theolliviers.com>
1392
1393         wx build fix after JSImageData.cpp was added.
1394
1395         * WebCoreSources.bkl:
1396
1397 2008-02-23  Alexey Proskuryakov  <ap@webkit.org>
1398
1399         Windows build fix - move ThreadCondition implementation from WebCore to WTF.
1400
1401         * WebCore.vcproj/WebCore.vcproj:
1402         * platform/win/ThreadConditionWin.cpp: Removed.
1403
1404 2008-02-23  Alexey Proskuryakov  <ap@webkit.org>
1405
1406         Reviewed by Darin.
1407
1408         Move basic threading support from WebCore to WTF.
1409
1410         One call that remains in WebCore is callOnMainThread(), and it has its own header now.
1411
1412         * ForwardingHeaders/wtf/Locker.h: Added.
1413         * ForwardingHeaders/wtf/MessageQueue.h: Added.
1414         * ForwardingHeaders/wtf/Threading.h: Added.
1415         * GNUmakefile.am:
1416         * WebCore.pro:
1417         * WebCore.vcproj/WebCore.vcproj:
1418         * WebCore.xcodeproj/project.pbxproj:
1419         * WebCoreSources.bkl:
1420         * bindings/js/JSCustomSQLTransactionCallback.cpp:
1421         * dom/XMLTokenizer.cpp:
1422         * loader/icon/IconDatabase.cpp:
1423         (WebCore::iconDatabase):
1424         * loader/icon/IconDatabase.h:
1425         * platform/Locker.h: Removed.
1426         * platform/MainThread.h: Copied from WebCore/platform/Threading.h.
1427         (WebCore::initializeThreadingAndMainThread):
1428         * platform/MessageQueue.h: Removed.
1429         * platform/SecurityOrigin.h:
1430         * platform/Threading.h: Removed.
1431         * platform/ThreadingNone.cpp: Removed.
1432         * platform/gtk/MainThreadGtk.cpp: Copied from WebCore/platform/gtk/ThreadingGtk.cpp.
1433         * platform/gtk/ThreadingGtk.cpp: Removed.
1434         * platform/mac/MainThreadMac.mm: Copied from WebCore/platform/mac/Threading.mm.
1435         * platform/mac/Threading.mm: Removed.
1436         * platform/pthreads: Removed.
1437         * platform/pthreads/ThreadingPthreads.cpp: Removed.
1438         * platform/qt/MainThreadQt.cpp: Copied from WebCore/platform/qt/ThreadingQt.cpp.
1439         * platform/qt/ThreadingQt.cpp: Removed.
1440         * platform/sql/SQLValue.h:
1441         * platform/sql/SQLiteAuthorizer.h:
1442         * platform/sql/SQLiteDatabase.h:
1443         * platform/win/MainThreadWin.cpp: Copied from WebCore/platform/win/ThreadingWin.cpp.
1444         (WebCore::initializeThreadingAndMainThread):
1445         * platform/win/MutexWin.cpp: Removed.
1446         * platform/win/ThreadingWin.cpp: Removed.
1447         * platform/wx/MainThreadWx.cpp: Copied from WebCore/platform/wx/ThreadingWx.cpp.
1448         * platform/wx/ThreadingWx.cpp: Removed.
1449         * storage/Database.cpp:
1450         (WebCore::Database::Database):
1451         * storage/Database.h:
1452         * storage/DatabaseTask.h:
1453         * storage/DatabaseThread.h:
1454         * storage/DatabaseTracker.cpp:
1455         * storage/OriginQuotaManager.h:
1456         * storage/SQLError.h:
1457         * storage/SQLResultSet.h:
1458         * storage/SQLStatement.h:
1459         * storage/SQLStatementCallback.h:
1460         * storage/SQLStatementErrorCallback.h:
1461         * storage/SQLTransaction.h:
1462         * storage/SQLTransactionCallback.h:
1463         * storage/SQLTransactionErrorCallback.h:
1464         * webcore-wx.bkl:
1465
1466 2008-02-23  David Kilzer  <ddkilzer@apple.com>
1467
1468         Please clarify licensing for some files
1469         <http://bugs.webkit.org/show_bug.cgi?id=14970>
1470
1471         Reviewed by Darin.
1472
1473         * bindings/objc/WebScriptObject.h: Added Apple BSD-style license.
1474         * bindings/objc/WebScriptObjectPrivate.h: Ditto.
1475         * platform/text/mac/ShapeArabic.c: Added ICU license from WebCore/icu/LICENSE.
1476
1477 2008-02-22  Justin Garcia  <justin.garcia@apple.com>
1478
1479         Reviewed by Anders Carlsson.
1480
1481         <rdar://problem/5714333> Add document.getSelection()
1482         
1483         Add a synonym for window.getSelection() that FF supports.  There were requests in
1484         this bugs dupes to also support the IE only document.selection, but IE's Selection
1485         object is too different than ours currently for that to be safe (specifically, we
1486         don't support enough of IE's TextRange methods on our DOM Range object yet). I
1487         filed <rdar://problem/5761233> to cover that.
1488
1489         * dom/Document.cpp:
1490         (WebCore::Document::getSelection): Added.
1491         * dom/Document.h:
1492         * dom/Document.idl: Ditto.  JS only since this is about web compatibility.
1493
1494 2008-02-22  Oliver Hunt  <oliver@apple.com>
1495
1496         WX build fixes
1497
1498         * WebCoreSources.bkl:
1499
1500 2008-02-22  Oliver Hunt  <oliver@apple.com>
1501
1502         Once more with the cairo/qt/wx build fixing
1503
1504         * platform/graphics/cairo/ImageBufferCairo.cpp:
1505         * platform/graphics/qt/ImageBufferQt.cpp:
1506         * platform/graphics/wx/ImageBufferWx.cpp:
1507
1508 2008-02-22  Mark Rowe  <mrowe@apple.com>
1509
1510         Windows build fix.  Add missing include of DeprecatedCString.h and sort existing includes.
1511
1512         * platform/win/PasteboardWin.cpp:
1513
1514 2008-02-22  Mark Rowe  <mrowe@apple.com>
1515
1516         Speculative Windows build fix.
1517
1518         * platform/win/ClipboardUtilitiesWin.cpp:  Add missing include of DeprecatedCString.h and sort existing includes.
1519         * platform/win/ClipboardWin.cpp:  Ditto.
1520
1521 2008-02-22  Oliver Hunt  <oliver@apple.com>
1522
1523         Build fix for windows, wx and qt
1524
1525         * html/CanvasPixelArray.h:
1526         (WebCore::CanvasPixelArray::set):
1527
1528 2008-02-22  Oliver Hunt  <oliver@apple.com>
1529
1530         Unbreak windows vcproj
1531
1532         * WebCore.vcproj/WebCore.vcproj:
1533
1534 2008-02-22  Oliver Hunt  <oliver@apple.com>
1535
1536         Reviewed by Sam W.
1537
1538         Support Canvas.getImageData and Canvas.createImageData
1539         
1540         This patch adds support for all the pixel reading portions
1541         of the HTML5 Canvas spec.  There are two new types ImageData
1542         and CanvasPixelArray which are used to provide the HTML5
1543         ImageData object, and the required semantics for assignment
1544         to the ImageData data array.
1545         
1546         We only implement the CG version of ImageBuffer::getImageData,
1547         but the logic is null safe, so this will not introduce any
1548         crashes into other platforms, unfortunately it will result in
1549         JS Object detection "lying" on non-CG platforms.
1550
1551         Tests: fast/canvas/canvas-ImageData-behaviour.html
1552                fast/canvas/canvas-getImageData.html
1553
1554         * DerivedSources.make:
1555         * GNUmakefile.am:
1556         * WebCore.pro:
1557         * WebCore.vcproj/WebCore.vcproj:
1558         * WebCore.xcodeproj/project.pbxproj:
1559         * bindings/js/JSCanvasPixelArrayCustom.cpp: Added.
1560         (WebCore::JSCanvasPixelArray::indexGetter):
1561         (WebCore::JSCanvasPixelArray::indexSetter):
1562         (WebCore::toJS):
1563         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
1564         * bindings/scripts/CodeGeneratorJS.pm:
1565         * html/CanvasPixelArray.cpp: Added.
1566         (WebCore::CanvasPixelArray::create):
1567         * html/CanvasPixelArray.h: Added.
1568         (WebCore::CanvasPixelArray::data):
1569         (WebCore::CanvasPixelArray::length):
1570         (WebCore::CanvasPixelArray::set):
1571         (WebCore::CanvasPixelArray::get):
1572         * html/CanvasPixelArray.idl: Added.
1573         * html/CanvasRenderingContext2D.cpp:
1574         (WebCore::createEmptyImageData):
1575         (WebCore::CanvasRenderingContext2D::createImageData):
1576         (WebCore::CanvasRenderingContext2D::getImageData):
1577         * html/CanvasRenderingContext2D.h:
1578         * html/CanvasRenderingContext2D.idl:
1579         * html/HTMLCanvasElement.cpp:
1580         (WebCore::HTMLCanvasElement::convertLogicalToDevice):
1581         (WebCore::HTMLCanvasElement::createImageBuffer):
1582         * html/HTMLCanvasElement.h:
1583         * html/ImageData.cpp: Added.
1584         (WebCore::ImageData::create):
1585         (WebCore::ImageData::ImageData):
1586         * html/ImageData.h: Added.
1587         (WebCore::ImageData::width):
1588         (WebCore::ImageData::height):
1589         (WebCore::ImageData::data):
1590         * html/ImageData.idl: Added.
1591         * platform/graphics/ImageBuffer.h:
1592         * platform/graphics/cairo/ImageBufferCairo.cpp:
1593         (WebCore::ImageBuffer::getImageData):
1594         * platform/graphics/cg/ImageBufferCG.cpp:
1595         (WebCore::ImageBuffer::getImageData):
1596         * platform/graphics/qt/ImageBufferQt.cpp:
1597         (WebCore::ImageBuffer::getImageData):
1598         * platform/graphics/wx/ImageBufferWx.cpp:
1599         (WebCore::ImageBuffer::getImageData):
1600
1601 2008-02-22  Sam Weinig  <sam@webkit.org>
1602
1603         Rubber-stamped by Adam Roben.
1604
1605         Rid the project of the Devil known as DeprecatedString!
1606
1607         * GNUmakefile.am:
1608         * WebCore.base.exp:
1609         * WebCore.pro:
1610         * WebCore.vcproj/WebCore.vcproj:
1611         * WebCore.xcodeproj/project.pbxproj:
1612         * WebCoreSources.bkl:
1613         * dom/Node.h:
1614         * html/HTMLFormElement.cpp:
1615         * platform/DeprecatedString.cpp: Removed.
1616         * platform/DeprecatedString.h: Removed.
1617         * platform/graphics/qt/IconQt.cpp:
1618         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
1619         * platform/gtk/CookieJarGtk.cpp:
1620         * platform/gtk/CursorGtk.cpp:
1621         * platform/gtk/KeyEventGtk.cpp:
1622         * platform/mac/DeprecatedStringMac.mm: Removed.
1623         * platform/network/qt/ResourceHandleQt.cpp:
1624         * platform/network/win/CookieJarWin.cpp:
1625         (WebCore::cookies):
1626         * platform/qt/ClipboardQt.cpp:
1627         * platform/qt/CookieJarQt.cpp:
1628         * platform/qt/CursorQt.cpp:
1629         * platform/symbian/DeprecatedStringSymbian.cpp: Removed.
1630         * platform/text/AtomicString.cpp:
1631         * platform/text/AtomicString.h:
1632         * platform/text/PlatformString.h:
1633         * platform/text/String.cpp:
1634         * platform/text/StringImpl.cpp:
1635         * platform/text/qt/StringQt.cpp:
1636         (WebCore::String::String):
1637         * platform/text/wx/StringWx.cpp:
1638         * platform/win/BString.cpp:
1639         * platform/win/BString.h:
1640         * platform/win/PasteboardWin.cpp:
1641
1642 2008-02-22  Sam Weinig  <sam@webkit.org>
1643
1644         Reviewed by Geoff Garen.
1645
1646         - Remove use of DeprecatedString in CSSStyleSelector.
1647
1648         * css/CSSStyleSelector.cpp:
1649         (WebCore::findHash): Removed.  Use find instead.
1650         (WebCore::findSlashDotDotSlash): Changed to take a UChar* and a length.
1651         (WebCore::findSlashSlash): Ditto.
1652         (WebCore::findSlashDotSlash): Ditto.
1653         (WebCore::containsColonSlashSlash): Ditto.
1654         (WebCore::cleanPath): Change to operate on a String.
1655         (WebCore::checkPseudoState): Changed to use a Vector as a buffer.
1656
1657 2008-02-22  Geoffrey Garen  <ggaren@apple.com>
1658
1659         Reviewed by Sam Weinig.
1660         
1661         Fixed <rdar://problem/5057509> Repro leak of JSXMLHttpRequest and
1662         associated objects @ www.viamichelin.it, which was probably an underlying
1663         cause of <rdar://problem/5744037> Gmail out of memory (17455)
1664         
1665         If SubresourceLoader::create returned NULL, we would ref() / gcProtect()
1666         the XMLHttpRequest but think we hadn't, therefore never
1667         calling deref() / gcUnprotect().
1668         
1669         This could happen at gmail.com, since gmail.com attempts to send
1670         XMLHttpRequests from unload handlers in order to gather usage statistics.
1671         (According to comments in the code, SubresourceLoader::create returns
1672         NULL when called from an unload handler.)
1673
1674         The solution is to ref() / gcProtect() only if SubresourceLoader::create
1675         doesn't return NULL. This make sense, since we only need to protect the
1676         request as long as it has an outstanding network transaction.
1677         
1678         * xml/XMLHttpRequest.cpp:
1679         (WebCore::XMLHttpRequest::XMLHttpRequest):
1680         (WebCore::XMLHttpRequest::send):
1681
1682 2008-02-22  Darin Adler  <darin@apple.com>
1683
1684         Reviewed, tweaked and landed by Sam.
1685
1686         - Make RegularExpression operate on Strings instead of DeprecatedStrings.
1687
1688         * dom/DOMImplementation.cpp:
1689         (WebCore::DOMImplementation::isXMLMIMEType): Use string instead of DeprecatedString
1690         to build up the RegularExpression.
1691         * page/Frame.cpp:
1692         (WebCore::createRegExpForLabels): Use String instead of DeprecatedString.
1693         (WebCore::Frame::searchForLabelsAboveCell): Ditto.
1694         (WebCore::Frame::searchForLabelsBeforeElement): Ditto.
1695         (WebCore::Frame::matchLabelsAgainstElement): Ditto.
1696         * page/Frame.h:
1697         * page/mac/FrameMac.mm:
1698         (WebCore::regExpForLabels): Ditto.
1699         (WebCore::Frame::searchForNSLabelsAboveCell): Ditto.
1700         (WebCore::Frame::searchForLabelsBeforeElement): Ditto.
1701         (WebCore::Frame::matchLabelsAgainstElement): Ditto.
1702
1703         * platform/text/RegularExpression.cpp:
1704         (WebCore::RegularExpression::Private::Private):
1705         (WebCore::RegularExpression::Private::compile):
1706         (WebCore::RegularExpression::RegularExpression):
1707         (WebCore::RegularExpression::operator=):
1708         (WebCore::RegularExpression::pattern):
1709         (WebCore::RegularExpression::match):
1710         (WebCore::RegularExpression::search):
1711         (WebCore::RegularExpression::searchRev):
1712         (WebCore::replace): Added.
1713         * platform/text/RegularExpression.h:
1714         Change functions to take Strings as input instead of DeprecatedStrings and
1715         reduce the complexity of the class by removing unneeded globbing support.
1716
1717 2008-02-22  Jon Honeycutt  <jhoneycutt@apple.com>
1718
1719         Reviewed by Anders.
1720
1721         <rdar://problem/5760360> REGRESSION(r30376): Crash loading plugin page
1722         during stress test (after only 5 min) - null dereference
1723
1724         Full-frame plug-ins create PluginStream objects without loaders, as the
1725         PluginView receives the loading callbacks. We were trying to call
1726         setDefersLoading on these null pointers.
1727
1728         * plugins/PluginStream.cpp:
1729         (WebCore::PluginStream::startStream): Add null check.
1730         (WebCore::PluginStream::destroyStream): Same.
1731         (WebCore::PluginStream::deliverData): Same.
1732
1733 2008-02-22  Darin Adler  <darin@apple.com>
1734
1735         Reviewed and tweaked by Jon Honeycutt. Reviewed and landed by Sam.
1736
1737         - Remove uses of DeprecatedString in Windows plugin code.
1738
1739         * plugins/win/PluginPackageWin.cpp:
1740         (WebCore::getVersionInfo): Cleanup formatting.
1741         (WebCore::PluginPackage::freeLibraryTimerFired): Remove un-needed variable name.
1742         (WebCore::PluginPackage::storeFileVersion): Move casts.
1743         (WebCore::PluginPackage::fetchInfo): Use OwnArrayPtr and switch to more efficient
1744         use of Vectors.
1745         (WebCore::PluginPackage::load): Fix whitespace.
1746         (WebCore::PluginPackage::hash): Make the hashCodes const
1747         * plugins/win/PluginViewWin.cpp:
1748         (WebCore::makeURL): Use String instead of DeprecatedString.
1749         (WebCore::parseRFC822HeaderFields): Ditto.
1750         (WebCore::PluginView::handlePost): Ditto.
1751         (WebCore::PluginView::status): Ditto.
1752
1753 2008-02-22  Darin Adler  <darin@apple.com>
1754
1755         Reviewed, tweaked and landed by Sam.
1756
1757         - Don't use DeprecatedString in HTMLTokenizer.
1758
1759         * html/HTMLTokenizer.cpp:
1760         (WebCore::HTMLTokenizer::finish):
1761         * platform/text/PlatformString.h:
1762         (WebCore::find):
1763
1764 2008-02-21  Sam Weinig  <sam@webkit.org>
1765
1766         Reviewed by Anders Carlsson.
1767
1768         Fix for <rdar://problem/5757946>
1769
1770         - Parse URLs before checking whether they are javascript: urls
1771           (which require security checks).
1772
1773         * bindings/js/JSAttrCustom.cpp:
1774         (WebCore::JSAttr::setValue):
1775         * bindings/js/JSElementCustom.cpp:
1776         (WebCore::allowSettingSrcToJavascriptURL):
1777         * bindings/js/JSHTMLFrameElementCustom.cpp:
1778         (WebCore::allowSettingJavascriptURL):
1779         * bindings/js/JSHTMLIFrameElementCustom.cpp:
1780         (WebCore::JSHTMLIFrameElement::setSrc):
1781
1782 2008-02-21  Ada Chan  <adachan@apple.com>
1783
1784         <rdar://problem/5757873> Buffer overrun in DeprecatedCString::find() in WebCore
1785         We could get a buffer overrun in DeprecatedCString::find() if the end of the
1786         string matches a beginning portion of the substring, for example, if string is
1787         "a" but the substring is "ab".
1788         The code as is also will not match things correctly under certain situations
1789         since the inner while loop increments the index. For example, we wouldn't find
1790         a match if the string is "aab..." and the substring is "ab".  Changed the 
1791         inner while loop to increment a temporary index into str.
1792         
1793         Test: fast/loader/charset-parse.html
1794
1795         Reviewed by Dan Berstein.
1796
1797         * platform/DeprecatedCString.cpp:
1798         (WebCore::DeprecatedCString::find):
1799
1800 2008-02-21  David Hyatt  <hyatt@apple.com>
1801
1802         Fix for bug 17301.  CSS media queries need to use the correct viewport
1803         when contained in documents inside iframes (rather than always using the
1804         top-level document's viewport).  CSS media queries based on the viewport
1805         also needed to be dynamic and update as you resize the window (this is
1806         a HOT feature). :)
1807
1808         This patch gets Acid3 up to 86/100 with 3 colored boxes filled in.
1809
1810         Reviewed by olliej
1811
1812         Added fast/media/viewport-media-query.html
1813
1814         * css/CSSStyleSelector.cpp:
1815         (WebCore::CSSStyleSelector::CSSStyleSelector):
1816         (WebCore::CSSStyleSelector::addViewportDependentMediaQueryResult):
1817         (WebCore::CSSStyleSelector::affectedByViewportChange):
1818         * css/CSSStyleSelector.h:
1819         (WebCore::MediaQueryResult::MediaQueryResult):
1820         * css/MediaQueryEvaluator.cpp:
1821         (WebCore::MediaQueryEvaluator::MediaQueryEvaluator):
1822         (WebCore::MediaQueryEvaluator):
1823         (WebCore::MediaQueryEvaluator::eval):
1824         (WebCore::colorMediaFeatureEval):
1825         (WebCore::monochromeMediaFeatureEval):
1826         (WebCore::device_aspect_ratioMediaFeatureEval):
1827         (WebCore::device_pixel_ratioMediaFeatureEval):
1828         (WebCore::gridMediaFeatureEval):
1829         (WebCore::device_heightMediaFeatureEval):
1830         (WebCore::device_widthMediaFeatureEval):
1831         (WebCore::heightMediaFeatureEval):
1832         (WebCore::widthMediaFeatureEval):
1833         (WebCore::min_colorMediaFeatureEval):
1834         (WebCore::max_colorMediaFeatureEval):
1835         (WebCore::min_monochromeMediaFeatureEval):
1836         (WebCore::max_monochromeMediaFeatureEval):
1837         (WebCore::min_device_aspect_ratioMediaFeatureEval):
1838         (WebCore::max_device_aspect_ratioMediaFeatureEval):
1839         (WebCore::min_device_pixel_ratioMediaFeatureEval):
1840         (WebCore::max_device_pixel_ratioMediaFeatureEval):
1841         (WebCore::min_heightMediaFeatureEval):
1842         (WebCore::max_heightMediaFeatureEval):
1843         (WebCore::min_widthMediaFeatureEval):
1844         (WebCore::max_widthMediaFeatureEval):
1845         (WebCore::min_device_heightMediaFeatureEval):
1846         (WebCore::max_device_heightMediaFeatureEval):
1847         (WebCore::min_device_widthMediaFeatureEval):
1848         (WebCore::max_device_widthMediaFeatureEval):
1849         * css/MediaQueryEvaluator.h:
1850         * css/MediaQueryExp.cpp:
1851         (WebCore::MediaQueryExp::~MediaQueryExp):
1852         * css/MediaQueryExp.h:
1853         (WebCore::MediaQueryExp::value):
1854         (WebCore::MediaQueryExp::isViewportDependent):
1855         * html/HTMLMediaElement.cpp:
1856         (WebCore::HTMLMediaElement::pickMedia):
1857         * page/FrameView.cpp:
1858         (WebCore::FrameView::layout):
1859
1860 2008-02-21  Anders Carlsson  <andersca@apple.com>
1861
1862         Reviewed by Sam.
1863
1864         Make more classes start out with a refcount of 1.
1865
1866         * dom/QualifiedName.cpp:
1867         (WebCore::QNameComponentsTranslator::translate):
1868         (WebCore::QualifiedName::QualifiedName):
1869         * dom/QualifiedName.h:
1870         (WebCore::QualifiedName::QualifiedNameImpl::create):
1871         (WebCore::QualifiedName::QualifiedNameImpl::QualifiedNameImpl):
1872         * history/BackForwardList.cpp:
1873         (WebCore::BackForwardList::BackForwardList):
1874         * history/BackForwardList.h:
1875         (WebCore::BackForwardList::create):
1876         * page/Page.cpp:
1877         (WebCore::Page::Page):
1878         * platform/text/CString.cpp:
1879         (WebCore::CString::init):
1880         (WebCore::CString::newUninitialized):
1881         (WebCore::CString::copyBufferIfNeeded):
1882         * platform/text/CString.h:
1883         (WebCore::CStringBuffer::create):
1884         (WebCore::CStringBuffer::CStringBuffer):
1885
1886 2008-02-21  Kevin Ollivier  <kevino@theolliviers.com>
1887
1888         wx build fix for the domString() -> string() rename in r30443.
1889
1890         * platform/graphics/wx/FontPlatformDataWx.cpp:
1891         (WebCore::FontPlatformData::FontPlatformData):
1892
1893 2008-02-21  Antti Koivisto  <antti@apple.com>
1894
1895         Reviewed by Sam Weinig.
1896
1897         <rdar://problem/5753789>
1898         REGRESSION: 1.5% -2% Sunspider regression from r30009 (ebay photo upload hang)
1899         
1900         Ensure all versions of allowsAccessFrom are inlined to single functions. 
1901         This is a 2% win in browser hosted Sunspider. 
1902
1903         * bindings/js/kjs_window.cpp:
1904         (KJS::Window::allowsAccessFrom):
1905         (KJS::Window::allowsAccessFromPrivate):
1906         * bindings/js/kjs_window.h:
1907
1908 2008-02-21  Dan Bernstein  <mitz@apple.com>
1909
1910         Reviewed by Sam Weinig.
1911
1912         - minor cleanup
1913
1914         * rendering/bidi.cpp:
1915         (WebCore::bidiNext): Removed redundant isBR() check -- isText() returns
1916         true for RenderLineBreak.
1917         (WebCore::bidiFirst): Ditto.
1918         (WebCore::shouldSkipWhitespaceAfterStartObject):
1919         (WebCore::RenderBlock::findNextLineBreak):
1920
1921 2008-02-21  Geoffrey Garen  <ggaren@apple.com>
1922
1923         Reviewed by David Harrison.
1924         
1925         Fixed <rdar://problem/5756125> REGRESSION: A crash occurs at 
1926         WebCore::Frame::scriptProxy() when completing a search with Package Tracker widget
1927
1928         Test: fast/dom/script-element-without-frame-crash.html
1929
1930         * html/HTMLTokenizer.cpp:
1931         (WebCore::HTMLTokenizer::parseTag): Added back a NULL check that was
1932         accidentally removed in r30325.
1933
1934 2008-02-21  Rodney Dawes  <dobey@wayofthemonkey.com>
1935
1936         GTK+ build fix. s/domString()/string()/
1937
1938         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
1939         (FontPlatformData::FontPlatformData):
1940
1941 2008-02-20  Dan Bernstein  <mitz@apple.com>
1942
1943         Reviewed by Dave Hyatt.
1944
1945         - fix http://bugs.webkit.org/show_bug.cgi?id=17465
1946           REGRESSION: <DIV> tokenized into Div if still searching for DOCTYPE
1947
1948         Test: fast/tokenizer/doctype-search-reset.html
1949
1950         * html/HTMLTokenizer.cpp:
1951         (WebCore::HTMLTokenizer::parseTag):
1952
1953 2008-02-20  Dan Bernstein  <mitz@apple.com>
1954
1955         Reviewed by Dave Hyatt.
1956
1957         - fix http://bugs.webkit.org/show_bug.cgi?id=17464
1958           REGRESSION: Crash in RenderBlock::findNextLineBreak reading r30444 commit email in GMail
1959
1960         Test: fast/text/wbr-in-pre-crash.html
1961
1962         * rendering/bidi.cpp:
1963         (WebCore::RenderBlock::findNextLineBreak):
1964
1965 2008-02-20  Oliver Hunt  <oliver@apple.com>
1966
1967         Reviewed by Hyatt.
1968
1969         Bug 17303: Canvas crash in ImageBuffer
1970
1971         We handle a null GraphicsContext everywhere, but we weren't checking for 
1972         a null ImageBuffer, which is what will result in a null GraphicsContext in
1973         the first place.
1974
1975         Test: fast/canvas/access-zero-sized-canvas.html
1976
1977         * html/HTMLCanvasElement.cpp:
1978
1979 2008-02-20  David Hyatt  <hyatt@apple.com>
1980
1981         Fix the layout test failure that never should have passed in the first
1982         place by making changes to media lists actually result in the recomputation
1983         of the style selector.  Now it passes for the right reasons and not because
1984         of dumb luck.
1985
1986         Reviewed by Sam Weinig
1987
1988         * css/MediaList.cpp:
1989         (WebCore::MediaList::deleteMedium):
1990         (WebCore::MediaList::setMediaText):
1991         (WebCore::MediaList::appendMedium):
1992         (WebCore::MediaList::notifyChanged):
1993         * css/MediaList.h:
1994         * dom/Document.cpp:
1995         (WebCore::Document::attach):
1996
1997 2008-02-20  Darin Adler  <darin@apple.com>
1998
1999         Reviewed, tweaked and landed by Sam.
2000
2001         - make markup functions not use DeprecatedString.
2002
2003         * editing/markup.cpp:
2004         (WebCore::append): Added.
2005         (WebCore::escapeContentText): Build up string using a Vector.
2006         (WebCore::appendStartMarkup): Use String instead of DeprecatedString.
2007
2008 2008-02-20  Darin Adler  <darin@apple.com>
2009
2010         Reviewed, tweaked and landed by Sam.
2011
2012         - make TextIterator use a Vector instead of a DeprecatedString.
2013
2014         * editing/TextIterator.cpp:
2015         (WebCore::CharacterIterator::string): Build up the String using a
2016         Vector.
2017         (WebCore::WordAwareIterator::advance): Switch to using Vector functions.
2018         (WebCore::WordAwareIterator::length): Ditto.
2019         (WebCore::WordAwareIterator::characters): Ditto.
2020         * editing/TextIterator.h: Use a Vector<UChar> for the buffer instead
2021         of DeprecatedString.
2022
2023 2008-02-20  Darin Adler  <darin@apple.com>
2024
2025         Reviewed, tweaked and landed by Sam.
2026
2027         - make HTMLInterchange return a String instead of a DeprecatedString
2028
2029         * editing/HTMLInterchange.cpp:
2030         (WebCore::): Return a String from convertedSpaceString.
2031         (WebCore::convertHTMLTextToInterchangeFormat): Use a Vector instead of
2032         a DeprecatedString to build up the return String.
2033         * editing/HTMLInterchange.h:
2034
2035 2008-02-20  Eric Seidel  <eric@webkit.org>
2036
2037         Reviewed by Oliver.
2038
2039         Remove m_drawingContext and change m_data to m_imageBuffer
2040
2041         * html/HTMLCanvasElement.cpp:
2042         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
2043         (WebCore::HTMLCanvasElement::reset):
2044         (WebCore::HTMLCanvasElement::paint):
2045         (WebCore::HTMLCanvasElement::createImageBuffer):
2046         (WebCore::HTMLCanvasElement::buffer):
2047         (WebCore::HTMLCanvasElement::createPlatformImage):
2048         * html/HTMLCanvasElement.h:
2049
2050 2008-02-20  Anders Carlsson  <andersca@apple.com>
2051
2052         Reviewed by Sam.
2053
2054         Rename AtomicString::domString() to AtomicString::string().
2055         
2056         * css/CSSComputedStyleDeclaration.cpp:
2057         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2058         * css/CSSFontSelector.cpp:
2059         (WebCore::CSSFontSelector::getFontData):
2060         * dom/Attr.cpp:
2061         (WebCore::Attr::createTextChild):
2062         * dom/Comment.cpp:
2063         (WebCore::Comment::nodeName):
2064         * dom/Document.cpp:
2065         (WebCore::Document::recalcStyleSelector):
2066         (WebCore::Document::setHTMLWindowEventListener):
2067         (WebCore::Document::formElementsState):
2068         * dom/StyledElement.cpp:
2069         (WebCore::StyledElement::parseMappedAttribute):
2070         * dom/Text.cpp:
2071         (WebCore::Text::nodeName):
2072         * editing/SelectionController.cpp:
2073         (WebCore::SelectionController::debugRenderer):
2074         * html/HTMLCollection.cpp:
2075         (WebCore::HTMLCollection::checkForNameMatch):
2076         * html/HTMLElement.cpp:
2077         (WebCore::HTMLElement::nodeName):
2078         (WebCore::HTMLElement::setHTMLEventListener):
2079         * html/HTMLFormCollection.cpp:
2080         (WebCore::HTMLFormCollection::getNamedFormItem):
2081         * html/HTMLImageElement.cpp:
2082         (WebCore::HTMLImageElement::parseMappedAttribute):
2083         (WebCore::HTMLImageElement::isURLAttribute):
2084         * html/HTMLLinkElement.cpp:
2085         (WebCore::HTMLLinkElement::parseMappedAttribute):
2086         (WebCore::HTMLLinkElement::tokenizeRelAttribute):
2087         * html/HTMLObjectElement.cpp:
2088         (WebCore::HTMLObjectElement::isURLAttribute):
2089         (WebCore::HTMLObjectElement::containsJavaApplet):
2090         * html/HTMLParamElement.cpp:
2091         (WebCore::HTMLParamElement::isURLAttribute):
2092         * html/HTMLParser.cpp:
2093         (WebCore::HTMLParser::handleIsindex):
2094         * html/HTMLScriptElement.cpp:
2095         (WebCore::HTMLScriptElement::insertedIntoDocument):
2096         (WebCore::HTMLScriptElement::shouldExecuteAsJavaScript):
2097         * html/HTMLStyleElement.cpp:
2098         (WebCore::HTMLStyleElement::parseMappedAttribute):
2099         * html/HTMLTokenizer.cpp:
2100         (WebCore::HTMLTokenizer::parseTag):
2101         * html/HTMLViewSourceDocument.cpp:
2102         (WebCore::HTMLViewSourceDocument::addViewSourceToken):
2103         * loader/FrameLoader.cpp:
2104         (WebCore::FrameLoader::saveDocumentState):
2105         * page/FrameTree.cpp:
2106         (WebCore::FrameTree::uniqueChildName):
2107         * platform/text/AtomicString.h:
2108         (WebCore::AtomicString::string):
2109         (WebCore::AtomicString::contains):
2110         (WebCore::AtomicString::find):
2111         (WebCore::AtomicString::startsWith):
2112         (WebCore::AtomicString::endsWith):
2113         * rendering/RenderPartObject.cpp:
2114         (WebCore::RenderPartObject::updateWidget):
2115         * svg/SVGElement.cpp:
2116         (WebCore::SVGElement::addSVGEventListener):
2117         * svg/SVGSVGElement.cpp:
2118         (WebCore::SVGSVGElement::addSVGWindowEventListener):
2119         * xml/XPathFunctions.cpp:
2120         (WebCore::XPath::FunLocalName::evaluate):
2121         (WebCore::XPath::FunNamespaceURI::evaluate):
2122         (WebCore::XPath::FunName::evaluate):
2123
2124 2008-02-20  Brent Fulgham  <bfulgham@gmail.com>
2125
2126         Reviewed by Dan.
2127
2128         http://bugs.webkit.org/show_bug.cgi?id=17336
2129         Provide implementations for Windows (Cairo) build of WebKit that
2130         handles font formatting.
2131         - Split font implementation files to allow maximal code sharing
2132           between CG and Cairo back-ends. 
2133
2134         * WebCore.vcproj/WebCore.vcproj:
2135         * platform/graphics/SimpleFontData.h:   Add signatures for private win
2136           initialization functions.
2137         * platform/graphics/win/FontCacheWin.cpp:
2138         (WebCore::FontCache::platformInit):
2139         (WebCore::FontCache::createFontPlatformData):
2140         * platform/graphics/win/FontCairoWin.cpp: Removed.  Universal version
2141           is now part of platform/graphics/cairo.
2142         * platform/graphics/win/FontCustomPlatformDataCairo.cpp: Added.
2143         (WebCore::FontCustomPlatformDataCairo::~FontCustomPlatformDataCairo):
2144         (WebCore::FontCustomPlatformDataCairo::fontPlatformData):
2145         (WebCore::releaseData):
2146         (WebCore::createFontCustomPlatformData):
2147         * platform/graphics/win/FontCustomPlatformDataCairo.h: Added.
2148         (WebCore::FontCustomPlatformDataCairo::FontCustomPlatformDataCairo):
2149         * platform/graphics/win/FontPlatformData.h:
2150         (WebCore::FontPlatformData::FontPlatformData):
2151         (WebCore::FontPlatformData::fontFace):
2152         (WebCore::FontPlatformData::scaledFont):
2153         (WebCore::FontPlatformData::operator==):
2154         * platform/graphics/win/FontPlatformDataCGWin.cpp: Copied from WebCore/platform/graphics/win/FontPlatformDataWin.cpp.
2155         (WebCore::FontPlatformData::platformDataInit):
2156         * platform/graphics/win/FontPlatformDataCairoWin.cpp: Added.
2157         (WebCore::FontPlatformData::platformDataInit):
2158         (WebCore::FontPlatformData::FontPlatformData):
2159         (WebCore::FontPlatformData::setFont):
2160         * platform/graphics/win/FontPlatformDataWin.cpp:  Moved CG-specific
2161           code to FontPlatformDataCG.cpp.
2162         (WebCore::FontPlatformData::FontPlatformData):
2163         * platform/graphics/win/GlyphPageTreeNodeCGWin.cpp: Copied from WebCore/platform/graphics/win/GlyphPageTreeNodeWin.cpp.
2164         * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp: Copied from WebCore/platform/graphics/win/GlyphPageTreeNodeWin.cpp.
2165         (WebCore::GlyphPage::fill):
2166         * platform/graphics/win/GlyphPageTreeNodeWin.cpp: Removed.  Replaced
2167           with CG- and Cairo-specific versions.
2168         * platform/graphics/win/SimpleFontDataCGWin.cpp:
2169         (WebCore::SimpleFontData::platformInit):
2170         (WebCore::SimpleFontData::platformDestroy):
2171         (WebCore::SimpleFontData::platformWidthForGlyph):
2172         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
2173         (WebCore::SimpleFontData::platformInit):
2174         (WebCore::SimpleFontData::platformDestroy):
2175         (WebCore::SimpleFontData::platformWidthForGlyph):
2176         (WebCore::SimpleFontData::setFont):
2177         * platform/graphics/win/SimpleFontDataWin.cpp:
2178         (WebCore::SimpleFontData::initGDIFont):
2179         (WebCore::SimpleFontData::platformCommonDestroy):
2180         (WebCore::SimpleFontData::widthForGDIGlyph):
2181
2182 2008-02-20  Darin Adler  <darin@apple.com>
2183
2184         Reviewed by Sam.
2185
2186         * dom/Node.h: Took out unneeded forward declaration of TextStream.
2187
2188 2008-02-20  Darin Adler  <darin@apple.com>
2189
2190         Reviewed by Sam.
2191
2192         * rendering/RenderObject.h: Took out unneeded forward declaration of TextStream.
2193
2194 2008-02-20  David Hyatt  <hyatt@apple.com>
2195
2196         Fix for bug 16760, incorrect <object> MIME type handling and fallback
2197         handling.
2198
2199         Reviewed by darin
2200
2201         * html/HTMLImageLoader.cpp:
2202         (WebCore::HTMLImageLoader::notifyFinished):
2203         If the image had an error, make sure to do <object> fallback.
2204
2205         * html/HTMLObjectElement.cpp:
2206         (WebCore::HTMLObjectElement::renderFallbackContent):
2207         Before doing fallback check if there is a MIME type mismatch between
2208         an image type and a non-image type.  If so, detach and re-attach after
2209         storing the correct MIME type.
2210
2211         * loader/loader.cpp:
2212         (WebCore::Loader::didReceiveData):
2213         Consider it an error when a 404 is encountered on a CachedResource load.
2214
2215 2008-02-20  Anders Carlsson  <andersca@apple.com>
2216
2217         Reviewed by Sam.
2218
2219         StringImpl constructors used by AtomicString should start with a refcount of 1.
2220         
2221         * platform/text/AtomicString.cpp:
2222         (WebCore::AtomicString::add):
2223         * platform/text/AtomicString.h:
2224         * platform/text/StringImpl.cpp:
2225         (WebCore::StringImpl::StringImpl):
2226
2227 2008-02-20  Darin Adler  <darin@apple.com>
2228
2229         * bindings/js/kjs_navigator.cpp:
2230         (WebCore::needsYouTubeQuirk): Tweak comments.
2231
2232 2008-02-20  Anders Carlsson  <andersca@apple.com>
2233
2234         Reviewed by Darin.
2235
2236         Change all refcounted classes in page/ to start with a refcount of 1.
2237
2238         * page/BarInfo.cpp:
2239         (WebCore::BarInfo::BarInfo):
2240         * page/BarInfo.h:
2241         (WebCore::BarInfo::create):
2242         * page/Console.cpp:
2243         (WebCore::Console::Console):
2244         * page/Console.h:
2245         (WebCore::Console::create):
2246         * page/DOMSelection.cpp:
2247         (WebCore::DOMSelection::DOMSelection):
2248         * page/DOMSelection.h:
2249         (WebCore::DOMSelection::create):
2250         * page/DOMWindow.cpp:
2251         (WebCore::DOMWindow::DOMWindow):
2252         (WebCore::DOMWindow::screen):
2253         (WebCore::DOMWindow::history):
2254         (WebCore::DOMWindow::locationbar):
2255         (WebCore::DOMWindow::menubar):
2256         (WebCore::DOMWindow::personalbar):
2257         (WebCore::DOMWindow::scrollbars):
2258         (WebCore::DOMWindow::statusbar):
2259         (WebCore::DOMWindow::toolbar):
2260         (WebCore::DOMWindow::console):
2261         (WebCore::DOMWindow::getSelection):
2262         * page/DOMWindow.h:
2263         (WebCore::DOMWindow::create):
2264         * page/Frame.cpp:
2265         (WebCore::Frame::domWindow):
2266         * page/History.cpp:
2267         (WebCore::History::History):
2268         * page/History.h:
2269         (WebCore::History::create):
2270         * page/InspectorController.cpp:
2271         (WebCore::InspectorResource::create):
2272         (WebCore::InspectorResource::InspectorResource):
2273         (WebCore::InspectorDatabaseResource::create):
2274         (WebCore::InspectorDatabaseResource::InspectorDatabaseResource):
2275         (WebCore::InspectorController::didLoadResourceFromMemoryCache):
2276         (WebCore::InspectorController::identifierForInitialRequest):
2277         (WebCore::InspectorController::didOpenDatabase):
2278         * page/Plugin.h:
2279         (WebCore::Plugin::create):
2280         (WebCore::Plugin::Plugin):
2281         * page/Screen.cpp:
2282         (WebCore::Screen::Screen):
2283         * page/Screen.h:
2284         (WebCore::Screen::create):
2285
2286 2008-02-20  Sam Weinig  <sam@webkit.org>
2287
2288         Reviewed by Darin and Geoff.
2289
2290         - <rdar://problem/5754378> work around missing video on YouTube front page with a site-specific hack
2291
2292         * WebCore.base.exp: Updated.
2293
2294         * bindings/js/kjs_navigator.cpp:
2295         (WebCore::needsYouTubeQuirk): Added. Return true on Windows only when the quirk is needed.
2296         (WebCore::Navigator::getValueProperty): For the appVersion property, if needsYouTubeQuirk
2297         return true, then return the empty string.
2298
2299         * page/Settings.cpp:
2300         (WebCore::Settings::Settings): Set m_needsSiteSpecificQuirks to false.
2301         (WebCore::Settings::setNeedsSiteSpecificQuirks): Added.
2302         * page/Settings.h: Added m_needsSiteSpecificQuirks.
2303         (WebCore::Settings::needsSiteSpecificQuirks): Added.
2304
2305 2008-02-20  David Hyatt  <hyatt@apple.com>
2306
2307         Fix for bug 12751, doctype nodes aren't part of the Document (Acid3).
2308
2309         Reviewed by Sam Weinig
2310
2311         Many tests added in fast/doctypes.
2312
2313         * dom/DOMImplementation.cpp:
2314         (WebCore::DOMImplementation::createDocument):
2315         (WebCore::DOMImplementation::createHTMLDocument):
2316         * dom/Document.cpp:
2317         (WebCore::Document::Document):
2318         (WebCore::Document::setDocType):
2319         (WebCore::Document::attach):
2320         (WebCore::Document::getImageMap):
2321         * dom/Document.h:
2322         (WebCore::Document::doctype):
2323         (WebCore::Document::):
2324         (WebCore::Document::determineParseMode):
2325         (WebCore::Document::setParseMode):
2326         (WebCore::Document::parseMode):
2327         (WebCore::Document::inCompatMode):
2328         (WebCore::Document::inAlmostStrictMode):
2329         (WebCore::Document::inStrictMode):
2330         * dom/DocumentType.cpp:
2331         (WebCore::DocumentType::cloneNode):
2332         (WebCore::DocumentType::insertedIntoDocument):
2333         (WebCore::DocumentType::removedFromDocument):
2334         * dom/DocumentType.h:
2335         * dom/Node.cpp:
2336         (WebCore::Node::childAllowed):
2337         * dom/StyledElement.cpp:
2338         (WebCore::StyledElement::attributeChanged):
2339         * dom/XMLTokenizer.cpp:
2340         (WebCore::XMLTokenizer::internalSubset):
2341         (WebCore::):
2342         * editing/markup.cpp:
2343         (WebCore::appendStartMarkup):
2344         * html/HTMLAppletElement.cpp:
2345         (WebCore::HTMLAppletElement::createRenderer):
2346         * html/HTMLDocument.cpp:
2347         (WebCore::HTMLDocument::HTMLDocument):
2348         (WebCore::HTMLDocument::childAllowed):
2349         (WebCore::HTMLDocument::determineParseMode):
2350         * html/HTMLDocument.h:
2351         * html/HTMLMapElement.cpp:
2352         (WebCore::HTMLMapElement::parseMappedAttribute):
2353         * html/HTMLParamElement.cpp:
2354         (WebCore::HTMLParamElement::parseMappedAttribute):
2355         * html/HTMLParser.cpp:
2356         (WebCore::HTMLParser::parseDoctypeToken):
2357         * html/HTMLParser.h:
2358         * html/HTMLTokenizer.cpp:
2359         (WebCore::HTMLTokenizer::reset):
2360         (WebCore::HTMLTokenizer::parseDoctype):
2361         (WebCore::HTMLTokenizer::parseTag):
2362         (WebCore::HTMLTokenizer::write):
2363         (WebCore::HTMLTokenizer::finish):
2364         (WebCore::HTMLTokenizer::processDoctypeToken):
2365         * html/HTMLTokenizer.h:
2366         (WebCore::):
2367         (WebCore::DoctypeToken::DoctypeToken):
2368         (WebCore::DoctypeToken::reset):
2369         (WebCore::DoctypeToken::state):
2370         (WebCore::DoctypeToken::setState):
2371         (WebCore::HTMLTokenizer::State::inDoctype):
2372         (WebCore::HTMLTokenizer::State::setInDoctype):
2373         (WebCore::HTMLTokenizer::State::needsSpecialWriteHandling):
2374         (WebCore::HTMLTokenizer::State::):
2375         * html/HTMLViewSourceDocument.cpp:
2376         (WebCore::HTMLViewSourceDocument::addViewSourceToken):
2377         (WebCore::HTMLViewSourceDocument::addViewSourceDoctypeToken):
2378         * html/HTMLViewSourceDocument.h:
2379         * loader/FrameLoader.cpp:
2380         (WebCore::FrameLoader::write):
2381         (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
2382         * page/Frame.cpp:
2383         (WebCore::Frame::documentTypeString):
2384         * page/inspector/utilities.js:
2385         * xml/XSLTProcessor.cpp:
2386         (WebCore::XSLTProcessor::createDocumentFromSource):
2387
2388 2008-02-20  Anders Carlsson  <andersca@apple.com>
2389
2390         Reviewed by Darin.
2391
2392         Change most SVG related classes to start out with a ref count of 1.
2393         
2394         * bindings/js/JSSVGPointListCustom.cpp:
2395         (WebCore::JSSVGPointList::initialize):
2396         (WebCore::JSSVGPointList::insertItemBefore):
2397         (WebCore::JSSVGPointList::replaceItem):
2398         (WebCore::JSSVGPointList::appendItem):
2399         * bindings/js/JSSVGTransformListCustom.cpp:
2400         (WebCore::JSSVGTransformList::initialize):
2401         (WebCore::JSSVGTransformList::insertItemBefore):
2402         (WebCore::JSSVGTransformList::replaceItem):
2403         (WebCore::JSSVGTransformList::appendItem):
2404         * rendering/SVGCharacterLayoutInfo.h:
2405         (WebCore::SVGCharOnPath::create):
2406         (WebCore::SVGCharOnPath::SVGCharOnPath):
2407         * rendering/SVGRootInlineBox.cpp:
2408         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
2409         * svg/SVGAnimationElement.cpp:
2410         (WebCore::SVGAnimationElement::parseBeginOrEndValue):
2411         * svg/SVGClipPathElement.cpp:
2412         (WebCore::SVGClipPathElement::canvasResource):
2413         * svg/SVGElementInstance.cpp:
2414         (WebCore::SVGElementInstance::childNodes):
2415         * svg/SVGElementInstanceList.cpp:
2416         (WebCore::SVGElementInstanceList::SVGElementInstanceList):
2417         * svg/SVGElementInstanceList.h:
2418         (WebCore::SVGElementInstanceList::create):
2419         * svg/SVGFitToViewBox.cpp:
2420         (WebCore::SVGFitToViewBox::SVGFitToViewBox):
2421         * svg/SVGGradientElement.cpp:
2422         (WebCore::SVGGradientElement::SVGGradientElement):
2423         (WebCore::SVGGradientElement::canvasResource):
2424         * svg/SVGImageElement.cpp:
2425         (WebCore::SVGImageElement::SVGImageElement):
2426         * svg/SVGLengthList.h:
2427         (WebCore::SVGLengthList::create):
2428         * svg/SVGList.h:
2429         (WebCore::SVGList::SVGList):
2430         (WebCore::SVGPODListItem::create):
2431         (WebCore::SVGPODListItem::copy):
2432         (WebCore::SVGPODListItem::SVGPODListItem):
2433         (WebCore::SVGPODList::initialize):
2434         (WebCore::SVGPODList::insertItemBefore):
2435         (WebCore::SVGPODList::replaceItem):
2436         (WebCore::SVGPODList::appendItem):
2437         (WebCore::SVGPODList::SVGPODList):
2438         * svg/SVGMarkerElement.cpp:
2439         (WebCore::SVGMarkerElement::canvasResource):
2440         * svg/SVGMaskElement.cpp:
2441         (WebCore::SVGMaskElement::canvasResource):
2442         * svg/SVGNumberList.h:
2443         (WebCore::SVGNumberList::create):
2444         * svg/SVGPathElement.cpp:
2445         (WebCore::SVGPathElement::createSVGPathSegClosePath):
2446         (WebCore::SVGPathElement::createSVGPathSegMovetoAbs):
2447         (WebCore::SVGPathElement::createSVGPathSegMovetoRel):
2448         (WebCore::SVGPathElement::createSVGPathSegLinetoAbs):
2449         (WebCore::SVGPathElement::createSVGPathSegLinetoRel):
2450         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicAbs):
2451         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicRel):
2452         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticAbs):
2453         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticRel):
2454         (WebCore::SVGPathElement::createSVGPathSegArcAbs):
2455         (WebCore::SVGPathElement::createSVGPathSegArcRel):
2456         (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalAbs):
2457         (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalRel):
2458         (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalAbs):
2459         (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalRel):
2460         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothAbs):
2461         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothRel):
2462         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothAbs):
2463         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothRel):
2464         (WebCore::SVGPathElement::pathSegList):
2465         * svg/SVGPathElement.h:
2466         * svg/SVGPathSeg.h:
2467         (WebCore::SVGPathSeg::SVGPathSeg):
2468         * svg/SVGPathSegArc.h:
2469         (WebCore::SVGPathSegArcAbs::create):
2470         (WebCore::SVGPathSegArcRel::create):
2471         * svg/SVGPathSegClosePath.h:
2472         (WebCore::SVGPathSegClosePath::create):
2473         * svg/SVGPathSegCurvetoCubic.h:
2474         (WebCore::SVGPathSegCurvetoCubicAbs::create):
2475         (WebCore::SVGPathSegCurvetoCubicRel::create):
2476         * svg/SVGPathSegCurvetoCubicSmooth.h:
2477         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::create):
2478         (WebCore::SVGPathSegCurvetoCubicSmoothRel::create):
2479         * svg/SVGPathSegCurvetoQuadratic.h:
2480         (WebCore::SVGPathSegCurvetoQuadraticAbs::create):
2481         (WebCore::SVGPathSegCurvetoQuadraticRel::create):
2482         * svg/SVGPathSegCurvetoQuadraticSmooth.h:
2483         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::create):
2484         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::create):
2485         * svg/SVGPathSegLineto.h:
2486         (WebCore::SVGPathSegLinetoAbs::create):
2487         (WebCore::SVGPathSegLinetoRel::create):
2488         * svg/SVGPathSegLinetoHorizontal.h:
2489         (WebCore::SVGPathSegLinetoHorizontalAbs::create):
2490         (WebCore::SVGPathSegLinetoHorizontalRel::create):
2491         * svg/SVGPathSegLinetoVertical.h:
2492         (WebCore::SVGPathSegLinetoVerticalAbs::create):
2493         (WebCore::SVGPathSegLinetoVerticalRel::create):
2494         * svg/SVGPathSegList.h:
2495         (WebCore::SVGPathSegList::create):
2496         * svg/SVGPathSegMoveto.h:
2497         (WebCore::SVGPathSegMovetoAbs::create):
2498         (WebCore::SVGPathSegMovetoRel::create):
2499         * svg/SVGPatternElement.cpp:
2500         (WebCore::SVGPatternElement::SVGPatternElement):
2501         (WebCore::SVGPatternElement::canvasResource):
2502         * svg/SVGPointList.h:
2503         (WebCore::SVGPointList::create):
2504         * svg/SVGPolyElement.cpp:
2505         (WebCore::SVGPolyElement::points):
2506         * svg/SVGPreserveAspectRatio.cpp:
2507         (WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio):
2508         * svg/SVGPreserveAspectRatio.h:
2509         (WebCore::SVGPreserveAspectRatio::create):
2510         * svg/SVGRenderingIntent.h:
2511         (WebCore::SVGRenderingIntent::SVGRenderingIntent):
2512         * svg/SVGStringList.h:
2513         (WebCore::SVGStringList::create):
2514         * svg/SVGStyledTransformableElement.cpp:
2515         (WebCore::SVGStyledTransformableElement::SVGStyledTransformableElement):
2516         * svg/SVGTests.cpp:
2517         (WebCore::SVGTests::requiredFeatures):
2518         (WebCore::SVGTests::requiredExtensions):
2519         (WebCore::SVGTests::systemLanguage):
2520         * svg/SVGTextElement.cpp:
2521         (WebCore::SVGTextElement::SVGTextElement):
2522         * svg/SVGTextPositioningElement.cpp:
2523         (WebCore::SVGTextPositioningElement::SVGTextPositioningElement):
2524         * svg/SVGTransformList.h:
2525         (WebCore::SVGTransformList::create):
2526         * svg/SVGUnitTypes.h:
2527         (WebCore::SVGUnitTypes::SVGUnitTypes):
2528         * svg/SVGViewElement.cpp:
2529         (WebCore::SVGViewElement::viewTarget):
2530         * svg/SVGViewSpec.cpp:
2531         (WebCore::SVGViewSpec::SVGViewSpec):
2532         * svg/graphics/SVGPaintServer.cpp:
2533         (WebCore::SVGPaintServer::sharedSolidPaintServer):
2534         * svg/graphics/SVGPaintServer.h:
2535         * svg/graphics/SVGPaintServerGradient.h:
2536         (WebCore::SVGPaintServerGradient::SharedStopCache::create):
2537         (WebCore::SVGPaintServerGradient::SharedStopCache::SharedStopCache):
2538         * svg/graphics/SVGPaintServerLinearGradient.h:
2539         (WebCore::SVGPaintServerLinearGradient::create):
2540         * svg/graphics/SVGPaintServerPattern.h:
2541         (WebCore::SVGPaintServerPattern::create):
2542         * svg/graphics/SVGPaintServerRadialGradient.h:
2543         (WebCore::SVGPaintServerRadialGradient::create):
2544         * svg/graphics/SVGPaintServerSolid.h:
2545         (WebCore::SVGPaintServerSolid::create):
2546         * svg/graphics/SVGResource.cpp:
2547         (WebCore::SVGResource::SVGResource):
2548         * svg/graphics/SVGResource.h:
2549         * svg/graphics/SVGResourceClipper.h:
2550         (WebCore::SVGResourceClipper::create):
2551         * svg/graphics/SVGResourceMarker.h:
2552         (WebCore::SVGResourceMarker::create):
2553         * svg/graphics/SVGResourceMasker.h:
2554         (WebCore::SVGResourceMasker::create):
2555         * svg/graphics/cg/SVGPaintServerGradientCg.cpp:
2556         (WebCore::SVGPaintServerGradient::updateQuartzGradientStopsCache):
2557
2558 2008-02-20  Darin Adler  <darin@apple.com>
2559
2560         Reviewed by Sam.
2561
2562         - make conversion from CSS ParseString to String and AtomicString
2563           automatic and remove all the explicit calls to do the conversion
2564
2565         - fix CSS parsing to do fewer allocations, mostly by using the
2566           equalIgnoringCase function in CSSParser
2567
2568         * css/CSSGrammar.y: Take out all the explicit atomicString and
2569         domString calls now that ParseString knows how to convert itself.
2570
2571         * css/CSSParser.cpp:
2572         (WebCore::equal): Added.
2573         (WebCore::equalIgnoringCase): Allow non-lettters.
2574         (WebCore::ParseString::lower): Used charactersAreAllASCII.
2575         (WebCore::unitFromString): Use equal.
2576         (WebCore::CSSParser::parseValue): Removed unneeded call to domString.
2577         (WebCore::CSSParser::parseContent): Use equalIgnoringCase.
2578         (WebCore::CSSParser::parseBackgroundImage): Removed unneeded call to domString.
2579         (WebCore::CSSParser::parseTransitionTimingFunction): Use equalIgnoringCase.
2580         (WebCore::CSSParser::parseDashboardRegions): More of the same.
2581         (WebCore::CSSParser::parseCounterContent): Ditto.
2582         (WebCore::CSSParser::parseShape): Use equalIgnoringCase.
2583         (WebCore::CSSParser::parseFontFamily): Removed unneeded calls to domString.
2584         (WebCore::CSSParser::parseFontFaceSrc): More.
2585         (WebCore::CSSParser::parseFontFaceUnicodeRange): More.
2586         (WebCore::CSSParser::parseColor): Don't lowercase here -- setNamedColor now
2587         handles the case folding.
2588         (WebCore::CSSParser::parseColorFromValue): More.
2589         (WebCore::CSSParser::parseBorderImage): More.
2590         (WebCore::CSSParser::parseCounter): More.
2591         (WebCore::TransformOperationInfo::TransformOperationInfo): More.
2592         (WebCore::CSSParser::parseTransform): More.
2593         (WebCore::CSSParser::createCharsetRule): More.
2594         (WebCore::CSSParser::createImportRule): More.
2595
2596         * css/CSSParser.h: Removed domString and atomicString functions.
2597         (WebCore::ParseString::operator String): Added. Allows conversion to String
2598         without an explicit function call.
2599         (WebCore::ParseString::operator AtomicString): Ditto.
2600
2601         * css/MediaQueryExp.cpp:
2602         (WebCore::MediaQueryExp::MediaQueryExp): Removed a call to domString.
2603         * css/SVGCSSParser.cpp:
2604         (WebCore::CSSParser::parseSVGValue): Removed calls to domString.
2605
2606         * platform/graphics/Color.cpp:
2607         (WebCore::findNamedColor): Call toASCIILower on each character as we copy
2608         it into the 8-bit character buffer to make the operation fold case.
2609
2610 2008-02-20  Justin Garcia  <justin.garcia@apple.com>
2611
2612         Reviewed by Darin Adler.
2613
2614         <rdar://problem/5694920> Typing (esp. deleting) is slower due to TOT WebCore changes
2615
2616         * editing/DeleteSelectionCommand.cpp:
2617         (WebCore::DeleteSelectionCommand::initializeStartEnd): The common case here
2618         is where there are no special elements.  Avoid creating VisiblePositions in
2619         that case.  Additionally, this change postpones the more expensive creation
2620         of an upstream VisiblePosition until the last possible moment.
2621         (WebCore::DeleteSelectionCommand::saveTypingStyleState):
2622         (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete): Add an 
2623         early return for a common case: deleting characters that are all inside the 
2624         same text node. In that case the style at the start of the selection will 
2625         not change during the delete, so there is no need to save/recompute it.
2626         (WebCore::DeleteSelectionCommand::saveFullySelectedAnchor): Early return
2627         before VisiblePosition creation if the ends of the selection aren't enclosed
2628         by an anchor.
2629         * editing/TypingCommand.cpp:
2630         (WebCore::TypingCommand::markMisspellingsAfterTyping): Early return if spell
2631         checking isn't enabled.
2632
2633 2008-02-20  Alexey Proskuryakov  <ap@webkit.org>
2634
2635         Incorporates some improvements made by Dan Bernstein.
2636
2637         Reviewed by Darin.
2638
2639         http://bugs.webkit.org/show_bug.cgi?id=17106
2640         <rdar://problem/5750722> Debug build ASSERTs on page load
2641
2642         Test: fast/encoding/GBK/close-gbk-converter.html
2643
2644         * platform/text/TextCodecICU.cpp:
2645         (WebCore::getGbkEscape): Changed to use a switch instead of a HashMap, as there
2646         are only four values.
2647         (WebCore::gbkCallbackEscape): Check the reason why the function is called, and do not attempt
2648         getting an escape character if it's not UCNV_UNASSIGNED.
2649         (WebCore::gbkCallbackSubstitute): Ditto.
2650
2651 2008-02-20  Alexey Proskuryakov  <ap@webkit.org>
2652
2653         Build fix.
2654
2655         * xml/XMLHttpRequest.cpp:
2656         (WebCore::isSafeRequestHeader):
2657         (WebCore::XMLHttpRequest::setRequestHeader):
2658
2659 2008-02-20  Alexey Proskuryakov  <ap@webkit.org>
2660
2661         Reviewed by Darin.
2662
2663         <rdar://problem/5749455> Unable to set the Referer header in Dashboard using XMLHttpRequest
2664
2665         Cannot be tested in DRT.
2666
2667         * xml/XMLHttpRequest.cpp: (WebCore::canSetRequestHeader): Assume that a request that can load
2668         local files can also set any headers.
2669
2670 2008-02-19  Darin Adler  <darin@apple.com>
2671
2672         Reviewed by Sam.
2673
2674         - removed use of DeprecatedString for font family names
2675
2676         * css/CSSFontSelector.cpp:
2677         (WebCore::CSSFontSelector::addFontFaceRule): Update for name change.
2678         * css/CSSParser.cpp:
2679         (WebCore::CSSParser::parseFontFamily): Update to use new appendSpaceSeparated
2680         function and String rather than DeprecatedString.
2681         * css/CSSStyleSelector.cpp:
2682         (WebCore::CSSStyleSelector::applyProperty): Updated for name change.
2683         * css/FontFamilyValue.cpp:
2684         (WebCore::FontFamilyValue::FontFamilyValue): Replaced code using a regular
2685         expression with code that does the same thing more efficiently.
2686         (WebCore::FontFamilyValue::appendSpaceSeparated): Added.
2687         (WebCore::FontFamilyValue::cssText): Updated for name change.
2688         * css/FontFamilyValue.h: Changed DeprecatedString to String. Renamed fontName
2689         to familyName and parsedFontName to m_familyName. Removed unused genericFamilyType
2690         and m_genericFamilyType. Added appendSpaceSeparated so that m_familyName can
2691         be private instead of public.
2692
2693 2008-02-19  Darin Adler  <darin@apple.com>
2694
2695         - fix build when SVG is not enabled
2696
2697         * rendering/RenderTreeAsText.cpp: Added include of "TextStream.h".
2698
2699 2008-02-19  Anders Carlsson  <andersca@apple.com>
2700
2701         Reviewed by Darin.
2702
2703         Change all classes in xml/ to start out with a ref count of 1.
2704         
2705         * bindings/js/JSCustomXPathNSResolver.h:
2706         * bindings/js/JSXMLHttpRequest.cpp:
2707         (WebCore::JSXMLHttpRequest::JSXMLHttpRequest):
2708         * bindings/js/JSXSLTProcessor.cpp:
2709         (WebCore::JSXSLTProcessor::JSXSLTProcessor):
2710         * bindings/objc/DOMCustomXPathNSResolver.h:
2711         (WebCore::DOMCustomXPathNSResolver::create):
2712         * bindings/scripts/CodeGeneratorJS.pm:
2713         * bindings/scripts/CodeGeneratorObjC.pm:
2714         * dom/Document.cpp:
2715         (WebCore::Document::applyXSLTransform):
2716         (WebCore::Document::createExpression):
2717         (WebCore::Document::createNSResolver):
2718         (WebCore::Document::evaluate):
2719         * xml/DOMParser.h:
2720         (WebCore::DOMParser::create):
2721         (WebCore::DOMParser::DOMParser):
2722         * xml/NativeXPathNSResolver.h:
2723         (WebCore::NativeXPathNSResolver::create):
2724         * xml/XMLHttpRequest.cpp:
2725         (WebCore::XMLHttpRequest::XMLHttpRequest):
2726         * xml/XMLHttpRequest.h:
2727         (WebCore::XMLHttpRequest::create):
2728         * xml/XMLSerializer.h:
2729         (WebCore::XMLSerializer::create):
2730         (WebCore::XMLSerializer::XMLSerializer):
2731         * xml/XPathEvaluator.cpp:
2732         (WebCore::XPathEvaluator::createNSResolver):
2733         * xml/XPathEvaluator.h:
2734         (WebCore::XPathEvaluator::create):
2735         (WebCore::XPathEvaluator::XPathEvaluator):
2736         * xml/XPathExpression.cpp:
2737         (WebCore::XPathExpression::createExpression):
2738         (WebCore::XPathExpression::evaluate):
2739         * xml/XPathExpression.h:
2740         (WebCore::XPathExpression::create):
2741         (WebCore::XPathExpression::XPathExpression):
2742         * xml/XPathNSResolver.h:
2743         * xml/XPathResult.cpp:
2744         (WebCore::XPathResult::XPathResult):
2745         * xml/XPathResult.h:
2746         (WebCore::XPathResult::create):
2747         * xml/XPathValue.cpp:
2748         (WebCore::XPath::Value::modifiableNodeSet):
2749         * xml/XPathValue.h:
2750         (WebCore::XPath::ValueData::create):
2751         (WebCore::XPath::ValueData::ValueData):
2752         (WebCore::XPath::Value::Value):
2753         * xml/XSLTProcessor.h:
2754         (WebCore::XSLTProcessor::create):
2755         (WebCore::XSLTProcessor::XSLTProcessor):
2756
2757 2008-02-19  Darin Adler  <darin@apple.com>
2758
2759         Reviewed by Sam.
2760
2761         - Trimmed down TextStream and weaned it from DeprecatedString.
2762
2763         * page/mac/WebCoreFrameBridge.mm:
2764         (-[WebCoreFrameBridge renderTreeAsExternalRepresentation]):
2765         Removed now-unneeded call to getNSString.
2766
2767         * platform/text/TextStream.cpp: Removed unused functions.
2768         Use snprintf instead of sprintf, for better security.
2769         (WebCore::TextStream::release): Added.
2770         * platform/text/TextStream.h: Removed lots of unneeded stuff.
2771
2772         * rendering/RenderTreeAsText.cpp:
2773         (WebCore::externalRepresentation): Changed to use String instead
2774         of DeprecatedString.
2775         * rendering/RenderTreeAsText.h: Ditto.
2776
2777         * rendering/SVGRenderTreeAsText.cpp:
2778         (WebCore::writeSVGInlineTextBox): Use "\n" instead of endl.
2779         (WebCore::write): Ditto.
2780         (WebCore::writeRenderResources): Ditto.
2781
2782 2008-02-19  Justin Garcia  <justin.garcia@apple.com>
2783
2784         Reviewed by Darin Adler.
2785
2786         <rdar://problem/5694920> Typing (esp. deleting) is slower due to TOT WebCore changes
2787         
2788         This brings performance on the phone back to old levels.  Andre and I are doing
2789         some formal testing to see exactly where we stand.
2790
2791         * dom/Position.cpp:
2792         (WebCore::enclosingBlockIgnoringEditability): Added.  This is enclosingBlock
2793         without the expensive editability checks. upstream and downstream can avoid 
2794         those because they do their own editability checking.
2795         (WebCore::Position::upstream):
2796         (WebCore::Position::downstream):
2797
2798 2008-02-19  Chris Fleizach  <cfleizach@apple.com>
2799
2800         Reviewed by Darin.
2801
2802         <rdar://problem/3663560> AXLink for a "name" (anchor) on same page should include an AXLinkedUIElementAttribute
2803
2804         * bridge/mac/WebCoreAXObject.mm:
2805         (-[WebCoreAXObject linkedUIElement]):
2806         Returns the linked-to AX object (if the specified one is ignored by accessibility, returns the next un-ignored one by traversing the DOM).
2807         
2808         (-[WebCoreAXObject accessibilityAttributeNames]):
2809         (-[WebCoreAXObject accessibilityAttributeValue:]):
2810         Support NSAccessibilityLinkedUIElementsAttribute.
2811
2812 2008-02-19  Darin Adler  <darin@apple.com>
2813
2814         Reviewed by Sam.
2815
2816         - Removed old debugging aids, Node::dump, RenderObject::dump, and
2817           RenderObject::information, that used DeprecatedString.
2818
2819         * dom/CharacterData.cpp: Removed override of Node::dump.
2820         * dom/CharacterData.h: Ditto.
2821         * dom/Element.cpp: Ditto.
2822         * dom/Element.h: Ditto.
2823         * dom/EventTargetNode.cpp: Ditto.
2824         * dom/EventTargetNode.h: Ditto.
2825         * dom/Node.cpp: Removed Node::dump.
2826         * dom/Node.h: Ditto.
2827
2828         * rendering/RenderBlock.cpp: Removed override of RenderObject::dump.
2829         * rendering/RenderBlock.h: Ditto.
2830         * rendering/RenderFrameSet.cpp: Ditto.
2831         * rendering/RenderFrameSet.h: Ditto.
2832         * rendering/RenderObject.cpp: Removed RenderObject::dump and
2833         RenderObject::information.
2834         * rendering/RenderObject.h: Ditto.
2835         * rendering/RenderTable.cpp: Removed override of RenderObject::dump.
2836         * rendering/RenderTable.h: Ditto.
2837         * rendering/RenderTableCell.cpp: Ditto.
2838         * rendering/RenderTableCell.h: Ditto.
2839         * rendering/RenderTableCol.cpp: Ditto.
2840         * rendering/RenderTableCol.h: Ditto.
2841         * rendering/RenderTableSection.cpp: Ditto.
2842         * rendering/RenderTableSection.h: Ditto.
2843
2844         * rendering/RenderTreeAsText.h: Removed unneeded include of TextStream.h
2845         and added forward declarations as appropriate.
2846
2847         * svg/SVGSVGElement.cpp: Removed unneeded include of TextStream.h.
2848         * svg/graphics/SVGResourceClipper.cpp: And here.
2849         * svg/graphics/SVGResourceFilter.cpp: Ditto.
2850         * svg/graphics/filters/SVGFEBlend.cpp: Ditto.
2851         * svg/graphics/filters/SVGFEComponentTransfer.cpp: Ditto.
2852         * svg/graphics/filters/SVGFEComposite.cpp: Ditto.
2853         * svg/graphics/filters/SVGFEDiffuseLighting.cpp: Ditto.
2854         * svg/graphics/filters/SVGFEGaussianBlur.cpp: Ditto.
2855         * svg/graphics/filters/SVGFEImage.cpp: Ditto.
2856         * svg/graphics/filters/SVGFEMerge.cpp: Ditto.
2857         * svg/graphics/filters/SVGFEMorphology.cpp: Ditto.
2858         * svg/graphics/filters/SVGFEOffset.cpp: Ditto.
2859         * svg/graphics/filters/SVGFESpecularLighting.cpp: Ditto.
2860         * svg/graphics/filters/SVGFETurbulence.cpp: Ditto.
2861         * svg/graphics/filters/SVGFilterEffect.cpp: Ditto.
2862
2863 2008-02-19  Beth Dakin  <bdakin@apple.com>
2864
2865         Reviewed by Sam.
2866
2867         Fix for <rdar://problem/5729674> Seed: Crash in 
2868         RenderButton::setStyle at http://www.dinorpg.com
2869
2870         Inputs should not honor first-letter.
2871
2872         * rendering/RenderBlock.cpp:
2873         (WebCore::RenderBlock::updateFirstLetter):
2874
2875 2008-02-19  Dan Bernstein  <mitz@apple.com>
2876
2877         Reviewed by Darin Adler.
2878
2879         - fix <rdar://problem/5637569> CrashTracer: [REGRESSION] 620 crashes in Safari at com.apple.WebCore: WebCore::RenderBox::setStaticY + 15
2880
2881         Test: fast/text/wbr-styled.html
2882
2883         Changed RenderWordBreak to inherit from RenderText instead of
2884         RenderInline.
2885
2886         * rendering/RenderBlock.cpp:
2887         (WebCore::RenderBlock::calcInlinePrefWidths):
2888         * rendering/RenderFlow.h:
2889         * rendering/RenderText.cpp:
2890         (WebCore::RenderText::renderName):
2891         (WebCore::RenderText::isTextFragment):
2892         (WebCore::RenderText::isWordBreak):
2893         * rendering/RenderText.h:
2894         * rendering/RenderWordBreak.cpp:
2895         (WebCore::RenderWordBreak::RenderWordBreak):
2896         * rendering/RenderWordBreak.h:
2897         * rendering/bidi.cpp:
2898         (WebCore::RenderBlock::findNextLineBreak):
2899
2900 2008-02-19  Anders Carlsson  <andersca@apple.com>
2901
2902         Reviewed by Darin.
2903
2904         * WebCore.base.exp:
2905         * loader/mac/LoaderNSURLExtras.h:
2906         * loader/mac/LoaderNSURLExtras.m:
2907         Move unused functions to WebKit (where they are used)
2908         
2909         (vectorContainsString):
2910         Use const references.
2911         
2912         * platform/mac/WebCoreSystemInterface.h:
2913         * platform/mac/WebCoreSystemInterface.mm:
2914         Remove wkNSURLProtocolClassForReqest.
2915         
2916 2008-02-19  Justin Garcia  <justin.garcia@apple.com>
2917
2918         Reviewed by Darin Adler.
2919
2920         <rdar://problem/5694920> Typing (esp. deleting) is slower due to TOT WebCore 
2921         
2922         These changes bring deleting performance back to old levels on the phone
2923         except for deleting the first space to the right of a word, which we are
2924         still working on.
2925
2926         * dom/Position.cpp:
2927         (WebCore::Position::upstream): Avoid the use of enclosingBlock when determining
2928         if we have left the original enclosing block or entered a new one, and avoid
2929         rootEditableElement for determining if we have changed editability.  These
2930         operations are expensive.
2931         (WebCore::Position::downstream): Ditto.
2932
2933 2008-02-19  Darin Adler  <darin@apple.com>
2934
2935         Rubber stamped by Anders.
2936
2937         - removed explicit initialization to 1 for RefCounted; that's now the default
2938
2939         * loader/ResourceLoader.cpp:
2940         (WebCore::ResourceLoader::ResourceLoader): Removed RefCounted initializer.
2941         * platform/network/ResourceHandle.cpp:
2942         (WebCore::ResourceHandle::ResourceHandle): Ditto.
2943         * platform/text/StringImpl.cpp:
2944         (WebCore::StringImpl::StringImpl): Ditto.
2945
2946 2008-02-18  Anders Carlsson  <andersca@apple.com>
2947
2948         Reviewed by Darin.
2949
2950         Make ResourceLoader and ResourceHandle start out with a refcount of 1.
2951
2952         * loader/MainResourceLoader.cpp:
2953         (WebCore::MainResourceLoader::create):
2954         * loader/NetscapePlugInStreamLoader.cpp:
2955         (WebCore::NetscapePlugInStreamLoader::create):
2956         * loader/ResourceLoader.cpp:
2957         (WebCore::ResourceLoader::ResourceLoader):
2958         * loader/SubresourceLoader.cpp:
2959         (WebCore::SubresourceLoader::create):
2960         * platform/network/ResourceHandle.cpp:
2961         (WebCore::ResourceHandle::ResourceHandle):
2962         (WebCore::ResourceHandle::create):
2963
2964 2008-02-19  Alp Toker  <alp@atoker.com>
2965
2966         Reviewed by Mark Rowe.
2967
2968         http://bugs.webkit.org/show_bug.cgi?id=16863
2969         [GTK] tab focusing doesn't work
2970
2971         GDK_MOD2_MASK doesn't always mean meta so we can't use it to identify
2972         the meta key state.
2973
2974         Use GDK_META_MASK where available, otherwise do not support the meta
2975         key. This matches the behaviour of other applications.
2976
2977         Also add a comment noting that the platform event constructors need to
2978         be kept in sync (it's not obvious that there are multiple places that
2979         check the key state).
2980
2981         * platform/gtk/KeyEventGtk.cpp:
2982         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2983         * platform/gtk/MouseEventGtk.cpp:
2984         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
2985         * platform/gtk/WheelEventGtk.cpp:
2986         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2987
2988 2008-02-18  Brady Eidson  <beidson@apple.com>
2989
2990         Reviewed by Sam Weinig's white rhino tusk stamp
2991
2992         SQLiteTransaction::stop() should also reset the transaction-in-progress flag in its parent SQLiteDatabase
2993
2994         * platform/sql/SQLiteTransaction.cpp:
2995         (WebCore::SQLiteTransaction::stop):
2996
2997 2008-02-18  Brady Eidson  <beidson@apple.com>
2998
2999         Reviewed by Darin
3000
3001         Fix for <rdar://5747529> - ObjC Exception can cause JSLock to never be released
3002
3003         Test: platform/mac/plugins/webScriptObject-exception-deadlock.html
3004
3005         * bindings/objc/WebScriptObject.mm:
3006         (-[WebScriptObject valueForKey:]): The line `resultObj = [super valueForKey:key];    // defaults to throwing an exception` 
3007           says it all - it throws an exception.  This method also happens to hold the JSLock.  Problematically, when the exeception
3008           is thrown and the method exited, the JSLock is never released.  Fix that without otherwise changing behavior by holding the 
3009           JSLock in two individual scopes - Right before the exception and right after.  
3010
3011 2008-02-18  Darin Adler  <darin@apple.com>
3012
3013         Reviewed by Sam.
3014
3015         - reduce use of DeprecatedString and memory allocations in processing of CSS
3016         - remove unnecessary double -> float -> double trip in the CSS parser
3017         - cleaned up names and structure in CSS grammar
3018
3019         * css/CSSGrammar.y: Remove getPropertyID and getValueID. Both are now in CSSParser.cpp
3020         instead, and they now work on ParseString and String objects and don't require the caller
3021         to put the string into a char*. Gave members of the %union more sensible names, removed
3022         duplicates, and sorted into a logical order. Put the %expect back in, rather than leaving
3023         it commented out.
3024         * css/CSSParser.cpp:
3025         (WebCore::equalIgnoringCase): Added.
3026         (WebCore::hasPrefix): Added.
3027         (WebCore::CSSParser::parseTransitionProperty): Changed to call the new cssPropertyID,
3028         which obviates the need to call lower() and utf8() or to allocate memory at all. Also
3029         used equalIgnoringCase rather than putting the value into a String just to compare it.
3030         (WebCore::CSSParser::lex): Replaced convertASCIIToFloat with charactersToDouble. This change
3031         along with the CSSGrammar.y change, removes the double -> float -> double round trip, and
3032         affects the result of one layout test.
3033         (WebCore::cssPropertyID): Added. Gets the property ID from the gperf hash table, but
3034         without allocating any memory.
3035         (WebCore::cssValueKeywordID): Ditto.
3036         * css/CSSParser.h: Removed declaration for deprecatedString function (now used only in
3037         CSSParser.cpp; soon to be deleted). Added cssPropertyID and cssValueKeywordID functions.
3038
3039         * css/CSSStyleDeclaration.cpp:
3040         (WebCore::CSSStyleDeclaration::getPropertyCSSValue): Call cssPropertyID instead of propertyID.
3041         (WebCore::CSSStyleDeclaration::getPropertyValue): Ditto.
3042         (WebCore::CSSStyleDeclaration::getPropertyPriority): Ditto.
3043         (WebCore::CSSStyleDeclaration::getPropertyShorthand): Ditto.
3044         (WebCore::CSSStyleDeclaration::isPropertyImplicit): Ditto.
3045         (WebCore::CSSStyleDeclaration::setProperty): Ditto.
3046         (WebCore::CSSStyleDeclaration::removeProperty): Ditto.
3047         (WebCore::CSSStyleDeclaration::isPropertyName): Ditto.
3048         * css/CSSStyleDeclaration.h: Removed unnecessary includes, unnecessary Noncopyable boilerplate,
3049         and the getPropertyID function declaration along with its associated apology comment.
3050
3051         * css/makevalues.pl: Generate constants instead of macros for CSS value numbers (but not an
3052         enumeration, like properties, since you rarely have any reason to handle all values, but
3053         often have a reason to handle all properties). Renamed the constant for the number of CSS
3054         value keywords from CSS_VAL_TOTAL to numCSSValueKeywords, and added maxCSSValueKeywordLength.
3055
3056         * platform/text/String.cpp:
3057         (WebCore::charactersToDouble): Made this function more efficient by using a stack buffer
3058         rather than a CString.
3059
3060 2008-02-18  Dan Bernstein  <mitz@apple.com>
3061
3062         Reviewed by Dave Hyatt.
3063
3064         - fix <rdar://problem/5736225> crash in svgFontAndFaceElementForFontData on digitalstrom.org/cms
3065
3066         Test: fast/css/font-face-multiple-remote-sources.html
3067
3068         * css/CSSFontFace.cpp:
3069         (WebCore::CSSFontFace::fontLoaded):
3070         * css/CSSSegmentedFontFace.cpp:
3071         (WebCore::CSSSegmentedFontFace::fontLoaded):
3072
3073 2008-02-18  Darin Adler  <darin@apple.com>
3074
3075         Reviewed by Sam.
3076
3077         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3078         (WebCore::hasCSSPropertyNamePrefix): Added.
3079         (WebCore::cssPropertyName): Reimplement to not use DeprecatedString. Also made faster
3080         by using a Vector<UChar> and eliminating all the string operations.
3081
3082 2008-02-18  Stephanie Lewis  <slewis@apple.com>
3083
3084         Reviewed by Adam.
3085
3086         Remove workaround for <rdar://problem/5695848>.
3087         
3088         * platform/network/cf/ResourceResponseCFNet.cpp:
3089         (WebCore::ResourceResponse::doUpdateResourceResponse):
3090
3091 2008-02-18  Samuel Weinig  <sam@webkit.org>
3092
3093         Reviewed by Geoff Garen.
3094
3095         Fix for http://bugs.webkit.org/show_bug.cgi?id=17419
3096         Remove CompatMode from JavaScriptCore as it is never set to anything other than NativeMode
3097
3098         * bindings/js/kjs_proxy.cpp:
3099         (WebCore::KJSProxy::initScript):
3100
3101 2008-02-18  Alp Toker  <alp@atoker.com>
3102
3103         Reviewed by Mark Rowe.
3104
3105         http://bugs.webkit.org/show_bug.cgi?id=17381
3106         [CURL] Regression: data URL parsing broken after DeprecatedString removal (Acid2)
3107
3108         This patch resolves the regression for the GTK+ port.
3109
3110         * platform/network/curl/ResourceHandleManager.cpp:
3111         (WebCore::parseDataUrl):
3112
3113 2008-02-18  Darin Adler  <darin@apple.com>
3114
3115         Reviewed by Sam.
3116
3117         * platform/network/win/ResourceHandleWin.cpp:
3118         (WebCore::ResourceHandle::onHandleCreated): Use String instead of DeprecatedString.
3119         (WebCore::ResourceHandle::start): Ditto.
3120
3121 2008-02-18  Darin Adler  <darin@apple.com>
3122
3123         Reviewed by Sam.
3124
3125         * platform/network/win/CookieJarWin.cpp:
3126         (WebCore::setCookies): Use String instead of DeprecatedString.
3127         (WebCore::cookies): Ditto.
3128
3129 2008-02-18  Darin Adler  <darin@apple.com>
3130
3131         Reviewed by Sam.
3132
3133         - removed use of DeprecatedString in the Color class
3134
3135         * platform/graphics/Color.cpp:
3136         (WebCore::Color::parseHexColor): Streamlined logic a bit with early returns.
3137         Used toASCIIHexValue a character at a time rather than using toIntStrict
3138         in base 16 mode.
3139         (WebCore::findNamedColor): Added. Uses a fixed-size char buffer to look up
3140         a color using the gperf-generated findColor function. Saves a memory allocation
3141         vs. the old version that called DeprecatedString::latin1().
3142         (WebCore::Color::setNamedColor): Changed to use findNamedColor.
3143
3144 2008-02-18  Darin Adler  <darin@apple.com>
3145
3146         Reviewed by Sam.
3147
3148         * editing/htmlediting.cpp:
3149         (WebCore::stringWithRebalancedWhitespace): Changed to use String instead of
3150         DeprecatedString.
3151
3152 2008-02-18  Darin Adler  <darin@apple.com>
3153
3154         Reviewed by Sam.
3155
3156         * editing/SelectionController.cpp:
3157         (WebCore::SelectionController::debugRenderer): Changed to use String instead of
3158         DeprecatedString.
3159
3160 2008-02-18  Darin Adler  <darin@apple.com>
3161
3162         Reviewed and landed by Sam.
3163
3164         Remove DeprecatedStringList.
3165
3166         * GNUmakefile.am:
3167         * WebCore.pro:
3168         * WebCore.vcproj/WebCore.vcproj:
3169         * WebCore.xcodeproj/project.pbxproj:
3170         * WebCoreSources.bkl:
3171         * editing/markup.cpp:
3172         * platform/DeprecatedStringList.cpp: Removed.
3173         * platform/DeprecatedStringList.h: Removed.
3174         * platform/mac/DeprecatedStringListMac.mm: Removed.
3175
3176 2008-02-18  Darin Adler  <darin@apple.com>
3177
3178         Reviewed by Sam.
3179
3180         * css/CSSPrimitiveValueMappings.h: Add default cases to all the switch statements.
3181         This will ease the way some day if we decide to use an enum instead of int; otherwise
3182         we'll have a ton of "unhandled enum value" warnings here.
3183
3184 2008-02-18  Alp Toker  <alp@atoker.com>
3185
3186         Build fix for GTK+ < 2.10. Fall back to simple text clipboard copy
3187         with older GTK+ versions for now.
3188
3189         * platform/gtk/PasteboardGtk.cpp:
3190         (WebCore::Pasteboard::writeSelection):
3191
3192 2008-02-18  Darin Adler  <darin@apple.com>
3193
3194         Reviewed by Sam.
3195
3196         * WebCore.base.exp: Export a couple of WebCore::String functions we plan to use
3197         in the future in WebKit.
3198
3199 2008-02-18  Darin Adler  <darin@apple.com>
3200
3201         Reviewed by Sam.
3202
3203         * DerivedSources.make: Added the scripts to the ENABLE_SVG versions of the rules
3204         for CSSPropertyNames.h and CSSValueKeywords.h. Somehow that got left out, so the
3205         files would not be regenerated if the scripts were changed (but would if SVG was
3206         disabled).
3207
3208 2008-02-18  Alexey Proskuryakov  <ap@webkit.org>
3209
3210         Suggested by Darin.
3211
3212         * platform/KURL.h: (WebCore::KURL::operator const String&): Added, to avoid unexpected
3213         conversion via UString (as in bug 17418).
3214
3215 2008-02-18  Jon Honeycutt  <jhoneycutt@apple.com>
3216
3217         Reviewed by Darin.
3218
3219         <rdar://problem/5744899> Crash in Flash when clicking "Yes" to abort
3220         slow script Flash 9 dialog at http://www.kidzui.com
3221
3222         When navigating to a new page, we stop all outstanding PluginStreams.
3223         Flash hangs in the call to NPP_URLNotify. It eventually displays the
3224         "slow script" dialog, which relinquishes control to the system. While
3225         this dialog is running, the request we are in the process of cancelling
3226         completes, and we re-enter Flash to deliver the data. When the dialog
3227         is dismissed, the internal state of Flash has changed, and Flash
3228         crashes with a null dereference.
3229
3230         To work around this, we can defer loading before entering plug-in code,
3231         so that even if a plug-in yields to the system, we won't get callbacks
3232         while we're handling a callback.
3233
3234         * plugins/PluginStream.cpp:
3235         (WebCore::PluginStream::startStream): Defers loads while calling into
3236         plug-in.
3237         (WebCore::PluginStream::destroyStream): Same.
3238         (WebCore::PluginStream::deliverData): Same.
3239         (WebCore::PluginStream::didFail): Protect 'this' from deletion by
3240         destroyStream. Null out m_loader only after destroyStream returns.
3241         (WebCore::PluginStream::didFinishLoading): Same.
3242
3243 2008-02-18  Alexey Proskuryakov  <ap@webkit.org>
3244
3245         Reviewed by Darin.
3246
3247         http://bugs.webkit.org/show_bug.cgi?id=17418
3248         REGRESSION: Assertion failure dragging image (JSLock::lockCount() > 0)
3249
3250         * platform/win/ClipboardWin.cpp:
3251         (WebCore::ClipboardWin::declareAndWriteDragImage): Explicitly convert from KURL to String,
3252         as an implicit conversion uses UString and thus needs a JSLock.
3253
3254 2008-02-17  Sam Weinig  <sam@webkit.org>
3255
3256         Roll out r30360.
3257
3258         * loader/FrameLoader.cpp:
3259         (WebCore::FrameLoader::changeLocation):
3260
3261 2008-02-17  Sam Weinig  <sam@webkit.org>
3262
3263         Mac build fix.
3264
3265         * WebCore.xcodeproj/project.pbxproj:
3266
3267 2008-02-17  Alp Toker  <alp@atoker.com>
3268
3269         Attempt to fix the Wx build (has been broken all weekend).
3270
3271         Stub out some graphics functions.
3272
3273         * platform/graphics/wx/GraphicsContextWx.cpp:
3274         (WebCore::GraphicsContext::beginPath):
3275         (WebCore::GraphicsContext::addPath):
3276         * platform/graphics/wx/PathWx.cpp:
3277         (WebCore::Path::isEmpty):
3278
3279 2008-02-17  Julien Chaffraix  <julien.chaffraix@gmail.com>
3280
3281         Reviewed by Alexey Proskuryakov.
3282
3283         http://bugs.webkit.org/show_bug.cgi?id=16989
3284         bug 16989 : Add send() flag checks in XmlHttpRequest
3285
3286         Splitted XmlHttpRequest::abort into abort (called from JavaScript) and internalAbort that
3287         perform the cancellation and is called mainly from internal methods.
3288
3289         Tests: http/tests/xmlhttprequest/xmlhttprequest-abort-readyState-shouldDispatchEvent.html
3290                http/tests/xmlhttprequest/xmlhttprequest-abort-readyState-shouldNotDispatchEvent.html
3291                http/tests/xmlhttprequest/xmlhttprequest-test-send-flag.html
3292
3293         * xml/XMLHttpRequest.cpp:
3294         (WebCore::XMLHttpRequest::open): Now call internalAbort() and moved readyState change into method
3295         (WebCore::XMLHttpRequest::send): Added m_loader check
3296         (WebCore::XMLHttpRequest::abort): Now update readyState and clear the request headers as specified
3297         in the spec
3298
3299         (WebCore::XMLHttpRequest::internalAbort): Perform cancellation internal operations (no readyState update)
3300         (WebCore::XMLHttpRequest::setRequestHeader): Added m_loader check
3301
3302         (WebCore::XMLHttpRequest::processSyncLoadResults): Now call internalAbort() instead of abort()
3303         (WebCore::XMLHttpRequest::willSendRequest): Ditto
3304         (WebCore::XMLHttpRequest::cancelRequests): Ditto
3305         (WebCore::XMLHttpRequest::detachRequests): Ditto
3306         * xml/XMLHttpRequest.h: Added the private internalAbort method
3307
3308 2008-02-17  Sam Weinig  <sam@webkit.org>
3309
3310         Reviewed by Dan Bernstein.
3311
3312         Fix for http://bugs.webkit.org/show_bug.cgi?id=17365
3313         document.createEvent("MessageEvent") throws NOT_SUPPORTED_ERR
3314
3315         - Updated fast/events/event-instanceof.html to test document.createEvent("MessageEvent").
3316
3317         * DerivedSources.make:
3318         Generate Objective-C binding for DOMProgressEvent which was missing.
3319
3320         * WebCore.xcodeproj/project.pbxproj:
3321         Add missing DOMProgressEvent files to the project.
3322
3323         * bindings/js/JSEventCustom.cpp:
3324         (WebCore::toJS):
3325         Clean up and add case for SVGZoomEvent that was missing.
3326
3327         * bindings/objc/DOMEvents.mm:
3328         (+[DOMEvent _wrapEvent:WebCore::]):
3329         Clean up and add cases for ProgressEvent and MessageEvent that were missing.
3330
3331         * dom/Document.cpp:
3332         (WebCore::Document::createEvent):
3333         Add case for MessageEvent.
3334
3335 2008-02-17  Adam Treat  <treat@kde.org>
3336
3337         Reviewed by Eric Seidel.
3338
3339         http://bugs.webkit.org/show_bug.cgi?id=17008
3340         Meta refresh does not work with cache turned off
3341
3342         Fix for issue noticed on http://adserver.vivox.com/2
3343
3344         * loader/FrameLoader.cpp:
3345         (WebCore::FrameLoader::changeLocation):
3346
3347 2008-02-17  Alp Toker  <alp@atoker.com>
3348
3349         Reviewed by Sam Weinig.
3350
3351         Fix for change made in r30355. Issue noticed by İsmail Dönmez.
3352
3353         Verify SSL certs by default, but allow checks to be disabled with an
3354         environment variable (WEBKIT_IGNORE_SSL_ERRORS) for now.
3355
3356         * platform/network/curl/ResourceHandleManager.cpp:
3357         (WebCore::ResourceHandleManager::startJob):
3358
3359 2008-02-17  Bin Chen  <binary.chen@gmail.com>
3360
3361         Reviewed by Alp Toker.
3362
3363         http://bugs.webkit.org/show_bug.cgi?id=17404
3364         Bug 17404: curl certification problem
3365
3366         Disable SSL cert verification until we have a way of distributing
3367         certs and/or reporting SSL errors to the user.
3368
3369         * platform/network/curl/ResourceHandleManager.cpp:
3370         (WebCore::ResourceHandleManager::startJob):
3371
3372 2008-02-17  Alp Toker  <alp@atoker.com>
3373
3374         Reviewed by Mark Rowe.
3375
3376         DevHelp fails to load local files; URL truncated by one character.
3377
3378         Fix a file:// URL regression introduced in KURL.cpp r30243.
3379
3380         * platform/KURL.cpp:
3381         (WebCore::KURL::KURL):
3382
3383 2008-02-17  Dan Bernstein  <mitz@apple.com>
3384
3385         Reviewed by Darin Adler.
3386
3387         - fix http://bugs.webkit.org/show_bug.cgi?id=17033
3388           <rdar://problem/5709315> REGRESSION: Really long <option> causes unnecessary page scroll bars to accommodate content
3389
3390         Test: fast/forms/control-clip-overflow.html
3391
3392         * rendering/RenderFlow.cpp:
3393         (WebCore::RenderFlow::lowestPosition): Account for control clipping.
3394         (WebCore::RenderFlow::rightmostPosition): Ditto.
3395         (WebCore::RenderFlow::leftmostPosition): Ditto.
3396
3397 2008-02-16  Oliver Hunt  <oliver@apple.com>
3398
3399         Reviewed by Eric S.
3400
3401         Bug 17269: Deobfuscate CanvasRenderingContext2D.cpp
3402
3403         Use cross-platform code to determine the dirty rects for
3404         fill and stroke operations
3405
3406         * html/CanvasRenderingContext2D.cpp:
3407         (WebCore::CanvasRenderingContext2D::fill):
3408         (WebCore::CanvasRenderingContext2D::stroke):
3409           Added a FIXME as code inspection shows a trivial under-painting
3410           bug, although we currently ignore dirty rect tracking on canvas
3411           and repaint the whole thing anyway.
3412         (WebCore::CanvasRenderingContext2D::fillRect):
3413
3414 2008-02-16  Sam Weinig  <sam@webkit.org>
3415
3416         Reviewed by Darin Adler.
3417
3418         Take another step in the direction of getting rid of DeprecatedString
3419         by moving all the to{NumericType} off of it.
3420
3421         - Create free functions that take a UChar* buffer and length to do
3422           the string-to-number conversions.  This allows us to avoid two allocations
3423           if we don't already have a String and is consistent with the design we would
3424           like going forward.
3425         - Since the toInt (and family) functions on DeprecatedString were slightly
3426           different than the ones on String (they didn't allow trailing garbage),
3427           an extra set of 'Strict' toInt functions were added that have this behavior.
3428
3429         * platform/graphics/Color.cpp:
3430         (WebCore::Color::parseHexColor):
3431         * platform/text/PlatformString.h:
3432         * platform/text/String.cpp:
3433         (WebCore::String::percentage):
3434         (WebCore::String::toIntStrict):
3435         (WebCore::String::toUIntStrict):
3436         (WebCore::String::toInt64Strict):
3437         (WebCore::String::toUInt64Strict):
3438         (WebCore::String::toUInt):
3439         (WebCore::String::toDouble):
3440         (WebCore::isCharacterAllowedInBase):
3441         (WebCore::toIntegralType):
3442         (WebCore::lengthOfCharactersAsInteger):
3443         (WebCore::charactersToIntStrict):
3444         (WebCore::charactersToUIntStrict):
3445         (WebCore::charactersToInt64Strict):
3446         (WebCore::charactersToUInt64Strict):
3447         (WebCore::charactersToInt):
3448         (WebCore::charactersToUInt):
3449         (WebCore::charactersToInt64):
3450         (WebCore::charactersToUInt64):
3451         (WebCore::charactersToDouble):
3452         (WebCore::charactersToFloat):
3453         * platform/text/StringImpl.cpp:
3454         (WebCore::parseLength):
3455         (WebCore::StringImpl::toIntStrict):
3456         (WebCore::StringImpl::toUIntStrict):
3457         (WebCore::StringImpl::toInt64Strict):
3458         (WebCore::StringImpl::toUInt64Strict):
3459         (WebCore::StringImpl::toInt):
3460         (WebCore::StringImpl::toUInt):
3461         (WebCore::StringImpl::toInt64):
3462         (WebCore::StringImpl::toUInt64):
3463         (WebCore::StringImpl::toDouble):
3464         (WebCore::StringImpl::toFloat):
3465         * platform/text/StringImpl.h:
3466         * svg/SVGAnimationElement.cpp:
3467         (WebCore::SVGAnimationElement::parseClockValue):
3468         * svg/SVGFETurbulenceElement.cpp:
3469         (WebCore::SVGFETurbulenceElement::parseMappedAttribute):
3470
3471 2008-02-16  Dan Bernstein  <mitz@apple.com>
3472
3473         Reviewed by Sam Weinig.
3474
3475         - fix fixed-pitch font measurement of control characters that render
3476           as zero-width space
3477
3478         Test: fast/text/fixed-pitch-control-characters.html
3479
3480         * rendering/RenderText.cpp:
3481         (WebCore::RenderText::widthFromCache):
3482
3483 2008-02-16  Kevin Ollivier  <kevino@theolliviers.com>
3484
3485         wx build fix.
3486
3487         * platform/graphics/wx/GraphicsContextWx.cpp:
3488         (WebCore::GraphicsContext::drawImage):
3489
3490 2008-02-16  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
3491
3492         Reviewed by Alp Toker.
3493
3494         Cross document messaging GTK+/autotools build fix.
3495
3496         * GNUmakefile.am:
3497
3498 2008-02-15  Oliver Hunt  <oliver@apple.com>
3499
3500         Build fix for Qt and Cairo builds
3501
3502         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3503         (WebCore::GraphicsContext::drawImage):
3504         * platform/graphics/qt/GraphicsContextQt.cpp:
3505
3506 2008-02-15  Oliver Hunt  <oliver@apple.com>
3507
3508         Reviewed by Dan B.
3509
3510         Bug 17269: Deobfuscate CanvasRenderingContext2D.cpp
3511         Refactor CanvasRenderingContext2D::drawImage(HTMLCanvasElement) to remove evil ifdefs
3512
3513         Add logic draw(ImageBuffer*) method to GraphicsContext to handle
3514         painting the source canvas content.
3515
3516         * html/CanvasRenderingContext2D.cpp:
3517         (WebCore::CanvasRenderingContext2D::drawImage):
3518         * html/HTMLCanvasElement.cpp:
3519         (WebCore::HTMLCanvasElement::buffer):
3520         * html/HTMLCanvasElement.h:
3521         * platform/graphics/GraphicsContext.h:
3522         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3523         (WebCore::GraphicsContext::drawImage):
3524         * platform/graphics/cg/GraphicsContextCG.cpp:
3525         (WebCore::GraphicsContext::paintBuffer):
3526         (WebCore::GraphicsContext::drawImage):
3527         * platform/graphics/qt/GraphicsContextQt.cpp:
3528         (WebCore::GraphicsContext::drawImage):
3529
3530 2008-02-15  Kevin Ollivier  <kevino@theolliviers.com>
3531
3532         Reviewed by David Hyatt.
3533
3534         Using GetNativeFontInfoDesc() to generate the hash value was
3535         leading to duplicate entries in the HashMap. Use the font object's
3536         pointer instead.
3537
3538         http://bugs.webkit.org/show_bug.cgi?id=17371
3539
3540         * platform/graphics/wx/FontPlatformData.h:
3541         (WebCore::FontPlatformData::computeHash):
3542
3543 2008-02-15  Ada Chan  <adachan@apple.com>
3544
3545         When parsing url we get from a CFURLRef, we need to null terminate 
3546         the string for the case when url ends with a '/'.
3547
3548         Reviewed by Darin.
3549
3550         * platform/cf/KURLCFNet.cpp:
3551         (WebCore::KURL::KURL):
3552
3553 2008-02-15  Brady Eidson  <beidson@apple.com>
3554
3555         Reviewed by Darin
3556
3557         Fix for <rdar://problem/5727175> and <rdar://problem/5740495> - Database threads and callback scripts can run after
3558         a page has closed or loaded a new document
3559
3560         Deciding to make the Database I/O semantic the same as loaders/XHR when a document is shut down, this patch implements
3561         a policy of shutting down the databases in a document at the same time.  This includes removing all pending transactions 
3562         in a database, cutting off an queued statements in the current transaction, and preventing further callbacks from being
3563         made.
3564
3565         No new layout tests with this patch as the current layout tests were catching this issue in a plethora of ways already
3566         (crashing, unexpected exceptions and output, etc)
3567
3568         * dom/Document.cpp:
3569         (WebCore::Document::~Document): Don't actually stop the database thread here - it better have been stopped already.
3570           Add an assertion to that effect.
3571         (WebCore::Document::addOpenDatabase): Add a new database handle to this Document's open database set
3572         (WebCore::Document::removeOpenDatabase): Remove such a handle
3573         (WebCore::Document:: stopDatabases): Call "close" on all open Database handles for this document
3574         * dom/Document.h:
3575
3576         * loader/FrameLoader.cpp:
3577         (WebCore::FrameLoader::stopLoading): In addition to canceling all resource loads and XHRs, stop all database I/O
3578
3579         * platform/MessageQueue.h:
3580         (WebCore::MessageQueue::killed): 
3581
3582         * platform/sql/SQLiteTransaction.cpp:
3583         (WebCore::SQLiteTransaction::stop): Added.  Explicit stop to cut off a transaction so it won't try anymore SQL activity
3584         * platform/sql/SQLiteTransaction.h:
3585
3586         * storage/Database.cpp:
3587         (WebCore::Database::Database):
3588         (WebCore::Database::~Database):
3589         (WebCore::Database::markAsDeletedAndClose): Check if the thread has terminated before committing to waiting on the
3590           thread.
3591         (WebCore::Database::stop):  Stop this database, including all queued transactions and callbacks
3592         * storage/Database.h:
3593         (WebCore::Database::stopped):
3594
3595         * storage/DatabaseThread.cpp:
3596         (WebCore::DatabaseThread::terminationRequested):
3597         * storage/DatabaseThread.h:
3598
3599         * storage/SQLTransaction.cpp:
3600         (WebCore::SQLTransaction::executeSQL): Throw an exception if a new executeSQL comes in after a database is closed
3601         (WebCore::SQLTransaction::checkAndHandleClosedDatabase): Added.  Clears queued statements and clear the next step
3602           when the database has been closed since the last step/callback was run.  Also stops the current SQLite transaction,
3603           if any
3604         (WebCore::SQLTransaction::performNextStep):
3605         (WebCore::SQLTransaction::performPendingCallback):
3606         * storage/SQLTransaction.h:
3607
3608 2008-02-15  Adele Peterson  <adele@apple.com>
3609
3610         Reviewed by Darin.
3611
3612         Fix for <rdar://problem/5745072> REGRESSION (r29348): Shift + Tab does not change indent level on Google Docs
3613
3614         The immediate cause of this bug was that we stopped sending keypress events for the tab key when it is used to advance focus.
3615         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).
3616         This change makes the shift-tab behavior match the forward-tab behavior.
3617
3618         If the site had put their event handler (which does the indenting) on the keydown event, then this problem would have been avoided.
3619         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 
3620         in this respect, so I think this is the way to go for right now.
3621
3622         * page/EventHandler.cpp: (WebCore::EventHandler::defaultTabEventHandler):
3623
3624 2008-02-15  Anders Carlsson  <andersca@apple.com>
3625
3626         Reviewed by Alice.
3627
3628         <rdar://problem/5738678>
3629         REGRESSION: "Loading" status remains when uploading file to .Mac iDisk via Safari
3630         
3631         Use the new CFNetwork functions for setting body parts.
3632         
3633         * platform/network/cf/FormDataStreamCFNet.cpp:
3634         (WebCore::setHTTPBody):
3635         (WebCore::httpBodyFromRequest):
3636
3637 2008-02-15  Geoffrey Garen  <ggaren@apple.com>
3638
3639         Reviewed by Anders Carlsson.
3640         
3641         Fixed <rdar://problem/5725429> REGRESSION (r27898): Greenfield online
3642         surveys no longer work due to XMLHttpRequest exceptions
3643         
3644         Reverted some exception throwing code from r12194.
3645         
3646         To comply with the W3C draft spec, we used to throw an exception when
3647         trying to access responseText and responseXML at the wrong time, but
3648         that turned out to be a compatibility problem.
3649         
3650         Now, matching Firefox and previous versions of WebKit, we never throw
3651         an exception when accessing responseText or responseXML.
3652         
3653         See http://www.mail-archive.com/public-webapi@w3.org/msg02756.html.
3654
3655         * xml/XMLHttpRequest.cpp:
3656         (WebCore::XMLHttpRequest::getResponseText):
3657         (WebCore::XMLHttpRequest::getResponseXML):
3658
3659 2008-02-15  Justin Garcia  <justin.garcia@apple.com>
3660
3661         Reviewed by Dan Bernstein.
3662
3663         <rdar://problem/5738768> REGRESSION (r30062): Crash in InlineTextBox::isLineBreak() when Undoing a replace
3664         
3665         Rolled out <http://trac.webkit.org/projects/webkit/changeset/29667>
3666
3667         * editing/SelectionController.cpp:
3668         (WebCore::SelectionController::nodeWillBeRemoved):
3669
3670 2008-02-15  Alice Liu  <alice.liu@apple.com>
3671
3672         Reviewed by Darin.
3673
3674         Fixed <rdar://problem/5741440> REGRESSION (r28496): After deactivating JavaScript, scripts embedded in the HTML page continue to run
3675      
3676         Before this patch, Frame::scriptProxy() would only return null in the case that javascript was 
3677         disabled and if the script proxy field wasn't set (which would only be the case if the window 
3678         hasn't loaded anything yet).  Not all callers of scriptProxy() always check for a non-null return 
3679         value.  Those that did check would effectively be checking if javascript was enabled before proceeding.
3680         This fix consists of 2 elements: first, make sure that scriptProxy() will never return null, regardless 
3681         of whether javascript is disabled.  This will mean that callers who don't check for null won't crash.  
3682         Second, callers who did check for null now instead check for javascript being disabled.  This means that 
3683         code paths intended for preventing javascript from being run will be making the correct check.  Another
3684         minor addition to this patch is that I added a function on KSJProxy to be a shortcut for checking if javascript
3685         is enabled. 
3686
3687         * bindings/js/JSCustomSQLStatementCallback.cpp:
3688         (WebCore::JSCustomSQLStatementCallback::handleEvent):
3689         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
3690         (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
3691         * bindings/js/JSCustomSQLTransactionCallback.cpp:
3692         (WebCore::JSCustomSQLTransactionCallback::handleEvent):
3693         * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
3694         (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
3695         * bindings/js/JSCustomVoidCallback.cpp:
3696         (WebCore::JSCustomVoidCallback::handleEvent):
3697         * bindings/js/JSCustomXPathNSResolver.cpp:
3698         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
3699         * bindings/js/ScheduledAction.cpp:
3700         (WebCore::ScheduledAction::execute):
3701         * bindings/js/kjs_events.cpp:
3702         (WebCore::JSAbstractEventListener::handleEvent):
3703         (WebCore::JSLazyEventListener::parseCode):
3704         * bindings/js/kjs_html.cpp:
3705         (WebCore::runtimeObjectImplementsCall):
3706         * bindings/js/kjs_proxy.cpp:
3707         (WebCore::KJSProxy::isEnabled):
3708         * bindings/js/kjs_proxy.h:
3709         * bindings/js/kjs_window.cpp:
3710         (KJS::Window::retrieveWindow):
3711         (KJS::Window::retrieve):
3712         * dom/Document.cpp:
3713         (WebCore::Document::createHTMLEventListener):
3714         * dom/EventTarget.cpp:
3715         (WebCore::EventTarget::dispatchGenericEvent):
3716         * html/HTMLPlugInElement.cpp:
3717         (WebCore::HTMLPlugInElement::createNPObject):
3718         * html/HTMLScriptElement.cpp:
3719         (WebCore::HTMLScriptElement::evaluateScript):
3720         * html/HTMLTokenizer.cpp:
3721         (WebCore::HTMLTokenizer::parseTag):
3722         (WebCore::HTMLTokenizer::processToken):
3723         * loader/FrameLoader.cpp:
3724         (WebCore::FrameLoader::executeScript):
3725         (WebCore::FrameLoader::userGestureHint):
3726         (WebCore::FrameLoader::open):
3727         (WebCore::FrameLoader::dispatchWindowObjectAvailable):
3728         (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
3729         * manual-tests/disable-javascript-reload.html: Added.
3730         * page/Frame.cpp:
3731         (WebCore::Frame::scriptProxy):
3732         (WebCore::Frame::bindingRootObject):
3733         (WebCore::Frame::windowScriptNPObject):
3734         * page/Frame.h:
3735         * page/InspectorController.cpp:
3736         (WebCore::canPassNodeToJavaScript):
3737         * page/mac/FrameMac.mm:
3738         (WebCore::Frame::windowScriptObject):
3739         * svg/SVGDocumentExtensions.cpp:
3740         (WebCore::SVGDocumentExtensions::createSVGEventListener):
3741
3742 2008-02-15  Dan Bernstein  <mitz@apple.com>
3743
3744         Reviewed by Alexey Proskuryakov.
3745
3746         - WebCore part of fixing http://bugs.webkit.org/show_bug.cgi?id=17360
3747           <rdar://problem/5743131> REGRESSION: mp4 file downloaded from server is downloaded as html
3748
3749         Test: http/tests/loading/text-content-type-with-binary-extension.html
3750
3751         Refined the workaround for <rdar://problem/5321972> to exclude files
3752         with extensions that are known to be associated with binary MIME types.
3753
3754         * WebCore.xcodeproj/project.pbxproj: Added WebCoreURLResponse.{h,mm}.
3755         * platform/network/mac/ResourceResponseMac.mm:
3756         (WebCore::ResourceResponse::doUpdateResourceResponse): Moved the
3757         workaround logic into WebCoreURLResponse.
3758         * platform/network/mac/WebCoreURLResponse.h: Added.
3759         * platform/network/mac/WebCoreURLResponse.mm: Added.
3760         (createBinaryExtensionsSet): Returns a set of extensions known to
3761         belong to MIME types of binary data.
3762         (-[NSURLResponse _webcore_MIMEType]):
3763         (-[NSHTTPURLResponse _webcore_MIMEType]): Forces the MIME type from
3764         application/octet-stream to text/plain if that is the specified
3765         Content-Type, unless the extension is in the binary extensions set.
3766
3767 2008-02-15  Dan Bernstein  <mitz@apple.com>
3768
3769         Reviewed by Dave Hyatt.
3770
3771         - fix http://bugs.webkit.org/show_bug.cgi?id=17306
3772           <rdar://problem/5737923> Transitions between styles that have different transition-* properties behave inconsistently
3773
3774         * manual-tests/transitions.html: Added.
3775         * page/AnimationController.cpp:
3776         (WebCore::CompositeImplicitAnimation::animate): Changed to use the
3777         transition properties of the current style rather than the target style.
3778         (WebCore::AnimationControllerPrivate::get): Changed to not create an
3779         animation if the style does not have transitions.
3780         (WebCore::AnimationController::updateImplicitAnimations): Added code to
3781         return the target style if the current style is not animating.
3782         * rendering/RenderObject.cpp:
3783         (WebCore::RenderObject::setAnimatableStyle): Changed to call
3784         updateImplicitAnimations() even if the current style does not have
3785         transitions, because we may be animating out of a style that had them.
3786
3787 2008-02-15  Alexey Proskuryakov  <ap@webkit.org>
3788
3789         Rubber-stamped by Darin.
3790
3791         Remove an obsolete WebCore readme file.
3792
3793         * README: Removed.
3794
3795 2008-02-15  Sam Weinig  <sam@webkit.org>
3796
3797         Reviewed by Darin Adler.
3798
3799         Remove more uses of DeprecatedString in preparation of getting rid of it.
3800
3801         * bridge/mac/WebCoreScriptDebugger.mm:
3802         * css/CSSCursorImageValue.cpp:
3803         (WebCore::isSVGCursorIdentifier):
3804         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
3805         * css/CSSStyleSelector.h:
3806         * dom/Element.cpp:
3807         (WebCore::Element::dump):
3808         (WebCore::Element::formatForDebugger):
3809         * dom/Position.cpp:
3810         (WebCore::Position::debugPosition):
3811         (WebCore::Position::formatForDebugger):
3812         * dom/Range.cpp:
3813         (WebCore::Range::formatForDebugger):
3814         * dom/Text.cpp:
3815         (WebCore::Text::formatForDebugger):
3816         * editing/Selection.cpp:
3817         (WebCore::Selection::debugPosition):
3818         (WebCore::Selection::formatForDebugger):
3819         * editing/SelectionController.cpp:
3820         (WebCore::SelectionController::debugRenderer):
3821         * editing/VisiblePosition.cpp:
3822         (WebCore::VisiblePosition::debugPosition):
3823         * html/HTMLTokenizer.cpp:
3824         (WebCore::HTMLTokenizer::scriptHandler):
3825         (WebCore::HTMLTokenizer::parseTag):
3826         (WebCore::HTMLTokenizer::processToken):
3827         (WebCore::HTMLTokenizer::notifyFinished):
3828         * svg/SVGFontFaceElement.cpp:
3829         (WebCore::mapAttributeToCSSProperty):
3830
3831 2008-02-15  Adam Roben  <aroben@apple.com>
3832
3833         * bindings/scripts/CodeGenerator.pm: Touch this to force bindings to
3834         regenerate.
3835
3836 2008-02-15  Adam Roben  <aroben@apple.com>
3837
3838         Try to fix Qt/GTK+ builds
3839
3840         * WebCore.pro: Remove MessageEvent.{idl,cpp} from the unconditional
3841         parts of this file.
3842
3843 2008-02-15  Darin Adler  <darin@apple.com>
3844
3845         - another Qt build fix
3846
3847         * platform/qt/KURLQt.cpp:
3848         (WebCore::KURL::operator QUrl): Use the characters directly, not ascii().
3849         Eliminate references to urlString.
3850
3851 2008-02-15  Darin Adler  <darin@apple.com>
3852
3853         - another Qt build fix
3854
3855         * platform/qt/ClipboardQt.cpp:
3856         (WebCore::ClipboardQt::declareAndWriteDragImage): Use KURL instead of String.
3857
3858 2008-02-14  Darin Adler  <darin@apple.com>
3859
3860         - another round of build fixes
3861
3862         * platform/KURL.cpp:
3863         (WebCore::appendEncodedHostname): Fix spelling (strLen, not strlen).
3864         * platform/network/curl/ResourceHandleManager.cpp:
3865         (WebCore::parseDataUrl): Fix a ".." typo and call data instead of characters.
3866
3867 2008-02-14  Darin Adler  <darin@apple.com>
3868
3869         - added back accidentally-removed files
3870
3871         * platform/DeprecatedStringList.cpp: Copied from platform/DeprecatedStringList.cpp.
3872         * platform/DeprecatedStringList.h: Copied from platform/DeprecatedStringList.h.
3873         * platform/mac/DeprecatedStringListMac.mm: Copied from platform/mac/DeprecatedStringListMac.mm.
3874
3875 2008-02-14  Darin Adler  <darin@apple.com>
3876
3877         - more build fixes
3878
3879         * platform/KURL.cpp:
3880         (WebCore::appendEncodedHostname): Use String to make a QString.
3881         * platform/network/cf/ResourceRequest.h:
3882         (WebCore::ResourceRequest::ResourceRequest): Removed a stray deprecatedString() call.
3883         * platform/network/curl/ResourceHandleManager.cpp:
3884         (WebCore::parseDataUrl): Updated to String rather than DeprecatedString functions.
3885
3886 2008-02-14  Darin Adler  <darin@apple.com>
3887
3888         - next Qt build fix
3889
3890         * platform/network/qt/ResourceRequest.h:
3891         (WebCore::ResourceRequest::ResourceRequest): Removed a stray deprecatedString() call.
3892
3893 2008-02-14  Darin Adler  <darin@apple.com>
3894
3895         - another build fix
3896
3897         * platform/network/curl/ResourceRequest.h:
3898         (WebCore::ResourceRequest::ResourceRequest): Removed a stray deprecatedString() call.
3899
3900 2008-02-14  Darin Adler  <darin@apple.com>
3901
3902         - first Qt build fix
3903
3904         * dom/XMLTokenizer.cpp:
3905         (WebCore::XMLTokenizer::endElementNs): Added a missing string() call.
3906
3907 2008-02-14  Darin Adler  <darin@apple.com>
3908
3909         Reviewed by Eric Seidel.
3910
3911         Based on work by Marvin Decker <marv.decker@gmail.com>
3912
3913         - fix http://bugs.webkit.org/show_bug.cgi?id=16538
3914           KURL should use String instead of DeprecatedString
3915
3916         - fix http://bugs.webkit.org/show_bug.cgi?id=16485
3917           DocLoader::checkForReload will crash if the URL isNull
3918           and a similar problem in IconDatabase
3919
3920         - fix http://bugs.webkit.org/show_bug.cgi?id=16487
3921           KURL doesn't preserve isNull when constructed with a DeprecatedString
3922
3923         - changed completeURL and various DOM getters to return KURL, to avoid
3924           conversion back and forth from KURL to String
3925
3926         - changed the conversion of KURL to NSURL or NSString to be automatic,
3927           to ease the use of KURL in Objective C DOM bindings, and eliminated
3928           the getNSURL function
3929
3930         - because I had to visit the DOM bindings anyway, eliminated almost all
3931           the use of the KJS namespace for things in WebCore
3932
3933         - fixed HTMLOptionElement constructor to check for undefined rather
3934           than size of the arguments array
3935
3936         - eliminated some other unnecessary uses of DeprecatedString
3937
3938         - changed String::split to take a Vector parameter instead of returning
3939           a Vector, for better performance
3940
3941         - added a couple of missing calls to do layout in SVG image handling;
3942           I was able to reproduce these only because I had broken URLs for a
3943           while -- not sure how to reproduce them now but the changes are
3944           clearly needed
3945
3946         Performance testing shows this to be at least a 1% speedup.
3947
3948         Added a new function protocols to efficiently compare protocols
3949         without case errors and a blankURL function so we don't have to
3950         code "about:blank" in multiple places in the code and don't have to
3951         construct a frash KURL each time. Moved decode_string and encode_string
3952         out of KURL and gave them clearer names.
3953
3954         Made KURL constructors explicit to highlight potentially-expensive
3955         operations and the poor semantics of KURL's constructor that takes
3956         a String.
3957
3958         * WebCore.base.exp: Updated.
3959
3960         * bindings/js/JSAttrCustom.cpp:
3961         (WebCore::JSAttr::setValue): Use protocolIs.
3962         * bindings/js/JSAudioConstructor.h: KJS namespace change.
3963         * bindings/js/JSCSSRuleCustom.cpp:
3964         (WebCore::toJS): Ditto.
3965         * bindings/js/JSCSSValueCustom.cpp:
3966         (WebCore::toJS): Ditto.
3967         * bindings/js/JSDocumentCustom.cpp:
3968         (WebCore::JSDocument::location): Ditto.
3969         (WebCore::JSDocument::setLocation): Updated for KURL change.
3970         (WebCore::toJS): KJS namespace change.
3971         * bindings/js/JSElementCustom.cpp:
3972         (WebCore::allowSettingSrcToJavascriptURL): Use protocolIs.
3973         (WebCore::JSElement::setAttribute): KJS namespace change.
3974         (WebCore::JSElement::setAttributeNode): Ditto.
3975         (WebCore::JSElement::setAttributeNS): Ditto.
3976         (WebCore::JSElement::setAttributeNodeNS): Ditto.
3977         * bindings/js/JSHTMLFrameElementCustom.cpp:
3978         (WebCore::allowSettingJavascriptURL): Use protocolIs.
3979         (WebCore::JSHTMLFrameElement::setSrc): KJS namespace change.
3980         (WebCore::JSHTMLFrameElement::setLocation): Ditto.
3981         * bindings/js/JSHTMLIFrameElementCustom.cpp:
3982         (WebCore::JSHTMLIFrameElement::setSrc): Use protocolIs.
3983         * bindings/js/JSHTMLOptionElementConstructor.cpp:
3984         (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor):
3985         (WebCore::JSHTMLOptionElementConstructor::construct): Cleaned up the
3986         structure a bit and changed checking to check for undefined rather than
3987         number of arguments.
3988         * bindings/js/JSHTMLOptionElementConstructor.h: KJS namespace change.
3989         * bindings/js/JSLocation.cpp:
3990         (WebCore::JSLocation::put): Eliminated some DeprecatedString use,
3991         and use protocolIs.
3992         (WebCore::jsLocationProtoFuncReplace): Ditto.
3993         (WebCore::jsLocationProtoFuncReload): Ditto.
3994         (WebCore::jsLocationProtoFuncAssign): Ditto.
3995         * bindings/js/JSLocation.h: KJS namespace change.
3996         * bindings/js/JSNamedNodeMapCustom.cpp:
3997         (WebCore::JSNamedNodeMap::canGetItemsForName): Ditto.
3998         (WebCore::JSNamedNodeMap::nameGetter): Ditto.
3999         * bindings/js/JSNamedNodesCollection.cpp:
4000         (WebCore::JSNamedNodesCollection::JSNamedNodesCollection): Ditto.
4001         * bindings/js/JSNamedNodesCollection.h: Ditto.
4002         * bindings/js/JSXMLHttpRequest.cpp:
4003         (WebCore::jsXMLHttpRequestPrototypeFunctionOpen): Removed
4004         DeprecatedString use.
4005         (WebCore::jsXMLHttpRequestPrototypeFunctionSend): Ditto.
4006         * bindings/js/JSXMLHttpRequest.h: Moved this class into the WebCore
4007         namespace.
4008         * bindings/js/JSXSLTProcessor.cpp: Namespace change.
4009         * bindings/js/JSXSLTProcessor.h: Ditto.
4010
4011         * bindings/js/kjs_binding.cpp: Updated for namespace change.
4012         (WebCore::jsStringOrNull): Added an overload for KURL to allow DOM
4013         classes to return KURL even if the DOM expects a string.
4014         (WebCore::jsStringOrUndefined): Ditto.
4015         (WebCore::jsStringOrFalse): Ditto.
4016         * bindings/js/kjs_binding.h: Moved everything into the WebCore
4017         namespace.
4018
4019         * bindings/js/kjs_css.h: Namespace change.
4020         * bindings/js/kjs_events.cpp: Removed an include.
4021         * bindings/js/kjs_events.h: Namespace change.
4022         * bindings/js/kjs_html.h: Namespace change.
4023
4024         * bindings/js/kjs_navigator.cpp: Moved everything into the
4025         WebCore namespace.
4026         * bindings/js/kjs_navigator.h: Ditto.
4027
4028         * bindings/js/kjs_window.cpp:
4029         (KJS::parseModalDialogFeatures): Updated for String::split change.
4030         (KJS::createWindow): Use protocolIs and removed some DeprecatedString.
4031         (KJS::Window::put): Ditto.
4032         (KJS::Window::allowsAccessFrom): Ditto.
4033         (KJS::windowProtoFuncOpen): Ditto.
4034
4035         * bindings/objc/DOM.mm:
4036         (-[DOMElement _getURLAttribute:]): Removed getNSURL call.
4037         * bindings/objc/DOMHTML.mm:
4038         (-[DOMHTMLDocument _createDocumentFragmentWithMarkupString:baseURLString:]): Ditto.
4039
4040         * bindings/scripts/CodeGeneratorCOM.pm: Updated includes so conversions from
4041         KURL will work.
4042         * bindings/scripts/CodeGeneratorJS.pm: Updated for namespace changes, and also
4043         updated includes so conversions from KURL will work.
4044         * bindings/scripts/CodeGeneratorObjC.pm: Updated includes so conversions from
4045         KURL will work.
4046
4047         * bridge/mac/WebCoreAXObject.mm:
4048         (-[WebCoreAXObject accessibilityAttributeValue:]): Removed getNSURL call.
4049         Also streamlined the logic.
4050         (AXAttributedStringAppendText): Ditto.
4051
4052         * bridge/mac/WebCoreScriptDebugger.mm:
4053         (toNSString): Tweaked.
4054         (toNSURL): Removed getNSURL call.
4055
4056         * css/CSSImageValue.cpp:
4057         (WebCore::CSSImageValue::image): Removed DeprecatedString use.
4058         * css/CSSImportRule.cpp:
4059         (WebCore::CSSImportRule::insertedIntoParent): Ditto.
4060         * css/CSSParser.cpp:
4061         (WebCore::CSSParser::parseValue): Ditto.
4062         (WebCore::CSSParser::parseContent): Ditto.
4063         (WebCore::CSSParser::parseBackgroundImage): Ditto.
4064         (WebCore::CSSParser::parseFontFaceSrc): Ditto.
4065         (WebCore::CSSParser::parseBorderImage): Ditto.
4066         * css/CSSStyleSelector.cpp:
4067         (WebCore::CSSStyleSelector::setEncodedURL): Ditto.
4068         (WebCore::checkPseudoState): Ditto.
4069         * css/CSSStyleSelector.h: Ditto.
4070
4071         * css/MediaList.cpp:
4072         (WebCore::MediaList::setMediaText): Updated for String::split change.
4073
4074         * css/StyleBase.cpp:
4075         (WebCore::StyleBase::baseURL): Return KURL.
4076         * css/StyleBase.h: DItto.
4077
4078         * dom/Document.cpp:
4079         (WebCore::Document::~Document): Updated for namespace change.
4080         (WebCore::Document::documentURI): Return KURL.
4081         (WebCore::Document::setDocumentURI): Removed DeprecatedString use.
4082         (WebCore::Document::baseURI): Return KURL.
4083         (WebCore::Document::open): Updated to use blankURL.
4084         (WebCore::Document::setURL): Take KURL.
4085         (WebCore::Document::shouldBeAllowedToLoadLocalResources): Updated for
4086         change to use KURL
4087         (WebCore::Document::setBaseURL): Take KURL.
4088         (WebCore::Document::elementSheet): Updated for KURL change.
4089         (WebCore::Document::mappedElementSheet): Ditto.
4090         (WebCore::Document::processHttpEquiv): Ditto.
4091         (WebCore::Document::recalcStyleSelector): Removed use of
4092         DeprecatedString -- also noticed some dead code here!
4093         (WebCore::Document::setCookie): Ditto.
4094         (WebCore::Document::completeURL): Return KURL.
4095         * dom/Document.h: Use KURL instead of String in a few places.
4096
4097         * dom/DocumentType.cpp:
4098         (WebCore::DocumentType::baseURI): Return KURL.
4099         * dom/DocumentType.h: Ditto.
4100
4101         * dom/Element.cpp:
4102         (WebCore::Element::baseURI): Return KURL.
4103         * dom/Element.h: Ditto.
4104
4105         * dom/Node.cpp:
4106         (WebCore::Node::setDocument): Namespace change.
4107         (WebCore::Node::baseURI): Return KURL.
4108         * dom/Node.h: Ditto.
4109
4110         * dom/ProcessingInstruction.cpp:
4111         (WebCore::ProcessingInstruction::checkStyleSheet): Updated for KURL change.
4112         * dom/StyleElement.cpp:
4113         (WebCore::StyleElement::process): Changed to use Vector<UChar> instead of
4114         String for better performance.
4115         (WebCore::StyleElement::createSheet): Removed use of DeprecateString.
4116         * dom/XMLTokenizer.cpp:
4117         (WebCore::XMLTokenizer::endElementNs): Updated for KURL change.
4118         (WebCore::XMLTokenizer::end): Ditto.
4119         (WebCore::xmlDocPtrForString): Removed use of DeprecateString.
4120         * dom/XMLTokenizer.h: Ditto.
4121
4122         * editing/markup.cpp: Moved appendString to PlatformString.h.
4123         (WebCore::appendQuotedURLAttributeValue): Use protocolIs.
4124         (WebCore::completeURLs): Removed DeprecatedString use.
4125         (WebCore::createFragmentFromMarkup): Use blankURL.
4126         (WebCore::fillContainerFromString): Removed DeprecatedString use.
4127         (WebCore::createFragmentFromText): Ditto.
4128
4129         * history/HistoryItem.cpp:
4130         (WebCore::HistoryItem::url): Removed DeprecatedString use.
4131         (WebCore::HistoryItem::originalURL): Ditto.
4132         * history/HistoryItem.h: Removed include.
4133
4134         * html/HTMLAnchorElement.cpp:
4135         (WebCore::HTMLAnchorElement::defaultEventHandler): Removed use of
4136         DeprecatedString.
4137         (WebCore::HTMLAnchorElement::href): Return KURL.
4138         (WebCore::HTMLAnchorElement::hash): Removed DeprecatedString use.
4139         (WebCore::HTMLAnchorElement::host): Ditto.
4140         (WebCore::HTMLAnchorElement::hostname): Ditto.
4141         (WebCore::HTMLAnchorElement::pathname): Ditto.
4142         (WebCore::HTMLAnchorElement::port): Ditto.
4143         (WebCore::HTMLAnchorElement::protocol): Ditto.
4144         (WebCore::HTMLAnchorElement::search): Ditto.
4145         (WebCore::HTMLAnchorElement::toString): Ditto.
4146         * html/HTMLAnchorElement.h: Ditto.
4147         * html/HTMLAppletElement.cpp:
4148         (WebCore::HTMLAppletElement::createRenderer): Updated for KURL change.
4149         * html/HTMLAreaElement.cpp:
4150         (WebCore::HTMLAreaElement::href): Return KURL.
4151         * html/HTMLAreaElement.h: Ditto.
4152         * html/HTMLBaseElement.cpp:
4153         (WebCore::HTMLBaseElement::removedFromDocument): Updated for KURL change.
4154         (WebCore::HTMLBaseElement::process): Removed DeprecatedString use.
4155         * html/HTMLBodyElement.cpp:
4156         (WebCore::HTMLBodyElement::parseMappedAttribute): Updated for KURL change.
4157         * html/HTMLEmbedElement.cpp:
4158         (WebCore::HTMLEmbedElement::parseMappedAttribute): Removed use of
4159         DeprecatedString.
4160         * html/HTMLEmbedElement.h: Removed DeprecatedString use.
4161         * html/HTMLFormElement.cpp:
4162         (WebCore::HTMLFormElement::formWouldHaveSecureSubmission): Use protocolIs.
4163         (WebCore::encodeCString): Updated for change to String::split.
4164         (WebCore::HTMLFormElement::dataEncoding): Ditto.
4165         (WebCore::HTMLFormElement::formData): Removed DeprecatedString use.
4166         (WebCore::HTMLFormElement::isMailtoForm): Use protocolIs.
4167         (WebCore::HTMLFormElement::submit): Updated for KURL change.
4168         (WebCore::HTMLFormElement::reset): Ditto.
4169         * html/HTMLFrameElementBase.cpp:
4170         (WebCore::HTMLFrameElementBase::isURLAllowed): Updated for KURL change
4171         and use equalIgnoringRef instead of doing a setRef to get the same effect.
4172         (WebCore::HTMLFrameElementBase::openURL): Use blankURL.
4173         (WebCore::HTMLFrameElementBase::location): Return KURL.
4174         (WebCore::HTMLFrameElementBase::src): Return KURL.
4175         * html/HTMLFrameElementBase.h: Ditto.
4176         * html/HTMLImageElement.cpp:
4177         (WebCore::HTMLImageElement::parseMappedAttribute): Updated for KURL change.
4178         (WebCore::HTMLImageElement::longDesc): Return KURL.
4179         (WebCore::HTMLImageElement::lowsrc): Return KURL.
4180         (WebCore::HTMLImageElement::src): Return KURL.
4181         * html/HTMLImageElement.h: Ditto. Also removed imageMap() function.
4182         * html/HTMLInputElement.cpp:
4183         (WebCore::HTMLInputElement::src): Return KURL.
4184         * html/HTMLInputElement.h: Ditto.
4185         * html/HTMLLinkElement.cpp:
4186         (WebCore::HTMLLinkElement::parseMappedAttribute): Updated for KURL change.
4187         (WebCore::HTMLLinkElement::tokenizeRelAttribute): Updated for String::split change.
4188         (WebCore::HTMLLinkElement::href): Return KURL.
4189         * html/HTMLLinkElement.h: Ditto.
4190         * html/HTMLMediaElement.cpp:
4191         (WebCore::HTMLMediaElement::src): Return KURL.
4192         (WebCore::HTMLMediaElement::pickMedia): Updated for KURL change.
4193         * html/HTMLMediaElement.h: Ditto.
4194         * html/HTMLObjectElement.cpp:
4195         (WebCore::HTMLObjectElement::isImageType): Use protocolIs.
4196         (WebCore::HTMLObjectElement::data): Return KURL.
4197         * html/HTMLObjectElement.h: Ditto.
4198         * html/HTMLOptGroupElement.cpp:
4199      &