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