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