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