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