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