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