JavaScriptCore:
[WebKit.git] / WebCore / ChangeLog
1 2006-02-03  Timothy Hatcher  <timothy@apple.com>
2
3         Reviewed by Justin.
4
5         Renamed configuration names to Debug, Release and Production.
6
7         * WebCore.xcodeproj/project.pbxproj:
8
9 2006-02-03  Beth Dakin  <bdakin@apple.com>
10
11         Reviewed by Hyatt.
12
13         No test cases added because this is an unreproducible crash.
14
15         This is a speculative fix for <rdar://problem/4048026> 
16         CrashTracer: [BOUNCE BACK] 1219 crashes in Safari at 
17         com.apple.WebCore: KHTMLParser::popOneBlock + 36
18
19         It seems possible that current could be nil when this function is 
20         called, so the speculative fix is to add a nil check.
21
22         * khtml/html/htmlparser.cpp:
23         (HTMLParser::popOneBlock): Added nil check.
24
25 2006-02-03  David Hyatt  <hyatt@apple.com>
26
27         Refactoring of the image classes to make them even more
28         portable.
29
30         Reviewed by mjs
31
32         * WebCore.xcodeproj/project.pbxproj:
33         * platform/Image.cpp:
34         (WebCore::m_animationObserver):
35         (WebCore::Image::Image):
36         (WebCore::Image::~Image):
37         (WebCore::Image::resetAnimation):
38         (WebCore::Image::setData):
39         (WebCore::Image::isNull):
40         (WebCore::Image::size):
41         (WebCore::Image::rect):
42         (WebCore::Image::width):
43         (WebCore::Image::height):
44         (WebCore::):
45         (WebCore::Image::compositeOperatorFromString):
46         * platform/ImageData.cpp: Added.
47         (WebCore::FrameData::clear):
48         (WebCore::ImageData::ImageData):
49         (WebCore::ImageData::~ImageData):
50         (WebCore::ImageData::invalidateData):
51         (WebCore::ImageData::cacheFrame):
52         (WebCore::ImageData::isNull):
53         (WebCore::ImageData::size):
54         (WebCore::ImageData::setData):
55         (WebCore::ImageData::setNativeData):
56         (WebCore::ImageData::frameCount):
57         (WebCore::ImageData::isSizeAvailable):
58         (WebCore::ImageData::frameAtIndex):
59         (WebCore::ImageData::frameDurationAtIndex):
60         (WebCore::ImageData::shouldAnimate):
61         (WebCore::ImageData::startAnimation):
62         (WebCore::ImageData::stopAnimation):
63         (WebCore::ImageData::resetAnimation):
64         (WebCore::ImageData::advanceAnimation):
65         * platform/ImageData.h: Added.
66         (KXMLCore::):
67         (WebCore::FrameData::m_duration):
68         (WebCore::FrameData::~FrameData):
69         (WebCore::ImageData::setIsPDF):
70         (WebCore::ImageData::currentFrame):
71         * platform/ImageDecoder.h:
72         * platform/mac/Image.mm:
73         (WebCore::Image::loadResource):
74         (WebCore::Image::supportsType):
75         (WebCore::Image::getCGImageRef):
76         (WebCore::Image::getNSImage):
77         (WebCore::Image::getTIFFRepresentation):
78         (WebCore::graphicsContext):
79         (WebCore::setCompositingOperation):
80         (WebCore::fillSolidColorInRect):
81         (WebCore::Image::drawInRect):
82         (WebCore::drawPattern):
83         (WebCore::Image::tileInRect):
84         (WebCore::Image::scaleAndTileInRect):
85         * platform/mac/ImageData.mm: Added.
86         (WebCore::setCompositingOperation):
87         (WebCore::ImageData::invalidateAppleSpecificData):
88         (WebCore::ImageData::checkForSolidColor):
89         (WebCore::ImageData::getTIFFRepresentation):
90         (WebCore::ImageData::getNSImage):
91         * platform/mac/PDFDocumentImage.h: Added.
92         * platform/mac/PDFDocumentImage.mm: Added.
93         (WebCore::releasePDFDocumentData):
94         (WebCore::PDFDocumentImage::PDFDocumentImage):
95         (WebCore::PDFDocumentImage::~PDFDocumentImage):
96         (WebCore::PDFDocumentImage::documentRef):
97         (WebCore::PDFDocumentImage::mediaBox):
98         (WebCore::PDFDocumentImage::bounds):
99         (WebCore::PDFDocumentImage::adjustCTM):
100         (WebCore::PDFDocumentImage::setCurrentPage):
101         (WebCore::PDFDocumentImage::currentPage):
102         (WebCore::PDFDocumentImage::pageCount):
103         (WebCore::PDFDocumentImage::draw):
104
105 2006-02-03  David Hyatt  <hyatt@apple.com>
106
107         Make a new class called ImageDecoder that wraps a CGImageSource.
108         This paves the way for ImageData to become portable as well.
109
110         Reviewed by mjs
111
112         * WebCore.xcodeproj/project.pbxproj:
113         * platform/ImageDecoder.h: Added.
114         * platform/mac/Image.mm:
115         (WebCore::ImageData::~ImageData):
116         (WebCore::ImageData::invalidateData):
117         (WebCore::ImageData::cacheFrame):
118         (WebCore::ImageData::size):
119         (WebCore::ImageData::setCFData):
120         (WebCore::ImageData::frameCount):
121         (WebCore::ImageData::isSizeAvailable):
122         (WebCore::ImageData::drawInRect):
123         * platform/mac/ImageDecoder.cpp: Added.
124         (WebCore::ImageDecoder::ImageDecoder):
125         (WebCore::ImageDecoder::~ImageDecoder):
126         (WebCore::imageSourceOptions):
127         (WebCore::ImageDecoder::initialized):
128         (WebCore::ImageDecoder::setData):
129         (WebCore::ImageDecoder::isSizeAvailable):
130         (WebCore::ImageDecoder::size):
131         (WebCore::ImageDecoder::repetitionCount):
132         (WebCore::ImageDecoder::frameCount):
133         (WebCore::ImageDecoder::createFrameAtIndex):
134         (WebCore::ImageDecoder::frameDurationAtIndex):
135
136 2006-02-02  David Hyatt  <hyatt@apple.com>
137
138         Move ImageAnimationObserver into its own file.
139
140         Reviewed by mjs
141
142         * WebCore.xcodeproj/project.pbxproj:
143         * loader/CachedImage.h:
144         * platform/Image.h:
145         * platform/ImageAnimationObserver.h: Added.
146         (WebCore::ImageAnimationObserver::~ImageAnimationObserver):
147         * platform/mac/Image.mm:
148
149 2006-02-02  Maciej Stachowiak  <mjs@apple.com>
150
151         Reviewed by Adele.
152
153         - remove all use of the ChildFrame from outside Frame.cpp, in preparation for removing it
154
155         * bridge/mac/MacFrame.h:
156         * bridge/mac/MacFrame.mm:
157         (WebCore::MacFrame::frameDetached): Factor out the ChildFrame manipulations into a base
158         class method.
159         (WebCore::MacFrame::objectContentType): factored out from createPart, calls the bridge to
160         determine contents for an Object tag.
161         (WebCore::MacFrame::createPlugin): factor out code from createPart that makes a Plugin.
162         (WebCore::MacFrame::createFrame): ditto for code that makes a Frame.
163         (WebCore::MacFrame::createEmptyDocument): factored out part into the superclass
164         * khtml/xml/DocumentImpl.cpp:
165         (WebCore::DocumentImpl::ownerElement): Call new ownerElement method on Frame
166         instead of mucking at Frame internals.
167         * page/Frame.cpp:
168         (WebCore::Frame::createPart): Moved here from MacFrame, but some of the guts were
169         factored out.
170         (WebCore::Frame::ownerElement): New method, logic moved from DocumentImpl.
171         (WebCore::Frame::frameDetached): New virtual method, the part of this that
172         pokes at ChildFrame structures.
173         (WebCore::Frame::updateBaseURLForEmptyDocument): Helper that looks at the ChildFrame
174         array for the benefit of createEmptyDocument.
175         * page/Frame.h:
176         * page/Page.h: Fix up modeline.
177         * page/Plugin.h: Added.
178         (WebCore::Plugin::Plugin): Moved here from MacFrame.mm, since it is now used by Frame.
179         (WebCore::Plugin::view): ditto
180
181 2006-02-02  David Hyatt  <hyatt@apple.com>
182
183         Avoid extra copies of all the decoded image bytes.
184
185         Reviewed by mjs
186
187         * platform/mac/Image.mm:
188         (WebCore::ImageData::setData):
189
190 2006-02-02  Justin Garcia  <justin.garcia@apple.com>
191
192         Reviewed by darin, harrison
193         
194         <http://bugzilla.opendarwin.org/show_bug.cgi?id=6586>
195         REGRESSION: visible_text.cpp assertion failure in Mail.app
196
197         Calling range() on a WordIterator destroyed its RangeImpl, use
198         RefPtr instead of PassRefPtr.
199         Turned on continuous spell checking to test the fix, found
200         a crasher caused by invalid positions created in
201         previousBoundary.
202
203         Added layout test:
204         * editing/selection/end-of-document.html
205
206         * khtml/editing/visible_text.h:
207         * khtml/editing/visible_units.cpp:
208         (khtml::previousBoundary):
209
210 2006-02-02  David Hyatt  <hyatt@apple.com>
211
212         Vectorize Image.  Optimize so that we no longer throw away
213         all CGImageRefs.  Now we just throw away the last frame.
214
215         Reviewed by mjs
216
217         * platform/mac/Image.mm:
218         (WebCore::FrameData::m_duration):
219         (WebCore::FrameData::~FrameData):
220         (WebCore::FrameData::clear):
221         (WebCore::ImageData::invalidateData):
222         (WebCore::ImageData::cacheFrame):
223         (WebCore::ImageData::frameAtIndex):
224         (WebCore::ImageData::frameDurationAtIndex):
225
226 2006-01-31  Geoffrey Garen  <ggaren@apple.com>
227
228         Reviewed by mjs.
229
230         Cleaned up some stuff I came across when working with JS enabled/
231         disabled code:
232
233         (1) Renamed initScript to initScriptIfNeeded, because that's what it
234             does
235         (2) Removed dead or otherwise irrelevent code
236         (3) Fixed up comments
237         (4) Removed NULL checks for interpreter() since it never returns NULL,
238             replaced with single assert().
239
240         No test case because there's no change in behavior.
241
242         * khtml/ecma/kjs_proxy.cpp:
243         (WebCore::KJSProxyImpl::evaluate): 1
244         (WebCore::KJSProxyImpl::createHTMLEventHandler): 1
245         (WebCore::KJSProxyImpl::createSVGEventHandler): 1
246         (WebCore::KJSProxyImpl::interpreter): 4
247         (WebCore::KJSProxyImpl::initScriptIfNeeded): 1
248         * khtml/ecma/kjs_proxy.h: 1
249         * page/Frame.cpp:
250         (Frame::didOpenURL): 2, 3
251         (Frame::stopLoading): 2
252         (Frame::jScriptEnabled): 2
253         (Frame::jScript): changed method call to data member access to match
254                           style of rest of class
255         (Frame::javaEnabled): 2
256         (Frame::pluginsEnabled): 2
257         (Frame::begin): 3
258         (Frame::userGestureHint): 4
259         (Frame::pauseTimeouts): collapsed a line
260         (Frame::resumeTimeouts): ditto
261         (Frame::saveInterpreterBuiltins): 4
262         (Frame::restoreInterpreterBuiltins): 4
263         * page/Frame.h: 2
264         * page/FramePrivate.h: 2
265         (FramePrivate::FramePrivate): 2
266
267 2006-02-02  David Hyatt  <hyatt@apple.com>
268
269         Fix for PLT performance regression.  Make sure that the document's load event timer
270         isn't started again if it's already active.
271
272         Reviewed by mjs
273
274         * khtml/xml/DocumentImpl.cpp:
275         (WebCore::DocumentImpl::dispatchImageLoadEventSoon):
276
277 2006-02-02  Darin Adler  <darin@apple.com>
278
279         Reviewed by Maciej.
280
281         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7000
282           REGRESSION: Scrolling is triggering onunload in TOT
283
284         Tests:
285         - fast/events/onunload-body-property.html
286         - fast/events/onunload-window-property.html
287
288         * khtml/ecma/kjs_dom.cpp:
289         (KJS::DOMNode::getValueProperty): Change onunload case to use unloadEvent, not scrollEvent.
290         (KJS::DOMNode::putValueProperty): Ditto.
291         * khtml/ecma/kjs_window.cpp:
292         (KJS::Window::getValueProperty): Ditto.
293         (KJS::Window::putValueProperty): Ditto.
294
295 2006-02-02  Darin Adler  <darin@apple.com>
296
297         Reviewed by Hyatt.
298
299         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6998
300           setTimeout(0) tight loop uses almost all CPU (need 10ms minimum for timeout?)
301
302         * khtml/ecma/kjs_window.cpp: (KJS::WindowQObject::installTimeout): When converting
303         the timeout number from an integer ms to a double seconds, use a 10 ms minimum.
304
305 2006-02-02  Darin Adler  <darin@apple.com>
306
307         - added a FIXME about an incorrect change made to FloatRect
308           to fix the Win32 compile
309
310         * platform/FloatRect.cpp: (WebCore::enclosingIntRect): Added FIXME
311         because this should do a ceil operation, not a round operation.
312
313 2006-02-02  David Hyatt  <hyatt@apple.com>
314
315        Fix for bug 6957, rewrite image rendering in C++ and move it to
316        WebCore.  Animation now stops lazily and just uses the CachedObject
317        notification system to push updates so that rects no longer need to
318        be cached (or sets of animating renderers in specific views).
319        
320        Reviewed by darin
321
322         * WebCore.exp:
323         * bindings/objc/DOM.mm:
324         (-[DOMElement _image]):
325         (-[DOMElement _imageTIFFRepresentation]):
326         * bindings/objc/DOMPrivate.h:
327         * bridge/mac/MacFrame.mm:
328         (WebCore::MacFrame::khtmlMouseMoveEvent):
329         (WebCore::MacFrame::fileWrapperForElement):
330         * bridge/mac/WebCoreFrameBridge.h:
331         * bridge/mac/WebCoreFrameBridge.mm:
332         (-[WebCoreFrameBridge elementAtPoint:]):
333         * kcanvas/RenderSVGImage.cpp:
334         (RenderSVGImage::imageChanged):
335         * kcanvas/RenderSVGImage.h:
336         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
337         (KCanvasFEImageQuartz::getCIFilter):
338         * khtml/ecma/kjs_html.cpp:
339         (KJS::drawPattern):
340         * kwq/KWQClipboard.h:
341         (WebCore::KWQClipboard::setDragHasStarted):
342         * kwq/KWQClipboard.mm:
343         (WebCore::KWQClipboard::dragNSImage):
344         * kwq/KWQCursor.mm:
345         (WebCore::createCustomCursor):
346         * kwq/KWQPainter.h:
347         (WebCore::QPainter::):
348         * kwq/KWQPainter.mm:
349         (WebCore::QPainter::drawFloatImage):
350         (WebCore::QPainter::drawTiledImage):
351         (WebCore::QPainter::drawScaledAndTiledImage):
352         * kwq/KWQScrollView.h:
353         * kwq/KWQScrollView.mm:
354         (QScrollView::inWindow):
355         * kwq/WebCoreImageRendererFactory.h:
356         * kwq/WebCoreImageRendererFactory.m:
357         * loader/CachedImage.cpp:
358         (WebCore::CachedImage::ref):
359         (WebCore::CachedImage::imageRect):
360         (WebCore::CachedImage::notifyObservers):
361         (WebCore::CachedImage::data):
362         (WebCore::CachedImage::error):
363         (WebCore::CachedImage::shouldStopAnimation):
364         (WebCore::CachedImage::animationAdvanced):
365         * loader/CachedImage.h:
366         (WebCore::CachedImage::canRender):
367         * loader/CachedObjectClient.h:
368         (WebCore::CachedObjectClient::imageChanged):
369         (WebCore::CachedObjectClient::willRenderImage):
370         * platform/Image.h:
371         (WebCore::ImageAnimationObserver::~ImageAnimationObserver):
372         (WebCore::Image::animationObserver):
373         (WebCore::Image::):
374         * platform/mac/Image.mm:
375         (WebCore::releasePDFDocumentData):
376         (WebCore::PDFDocumentImage::PDFDocumentImage):
377         (WebCore::PDFDocumentImage::~PDFDocumentImage):
378         (WebCore::PDFDocumentImage::documentRef):
379         (WebCore::PDFDocumentImage::mediaBox):
380         (WebCore::PDFDocumentImage::bounds):
381         (WebCore::PDFDocumentImage::adjustCTM):
382         (WebCore::PDFDocumentImage::setCurrentPage):
383         (WebCore::PDFDocumentImage::currentPage):
384         (WebCore::PDFDocumentImage::pageCount):
385         (WebCore::PDFDocumentImage::draw):
386         (WebCore::ImageData::setIsPDF):
387         (WebCore::ImageData::currentFrame):
388         (WebCore::m_PDFDoc):
389         (WebCore::ImageData::~ImageData):
390         (WebCore::ImageData::invalidateData):
391         (WebCore::ImageData::cacheFrame):
392         (WebCore::ImageData::checkForSolidColor):
393         (WebCore::ImageData::isNull):
394         (WebCore::ImageData::size):
395         (WebCore::ImageData::setData):
396         (WebCore::ImageData::setCFData):
397         (WebCore::ImageData::imageSourceOptions):
398         (WebCore::ImageData::frameCount):
399         (WebCore::ImageData::isSizeAvailable):
400         (WebCore::ImageData::frameAtIndex):
401         (WebCore::ImageData::getTIFFRepresentation):
402         (WebCore::ImageData::getNSImage):
403         (WebCore::ImageData::frameDurationAtIndex):
404         (WebCore::ImageData::shouldAnimate):
405         (WebCore::ImageData::startAnimation):
406         (WebCore::ImageData::stopAnimation):
407         (WebCore::ImageData::resetAnimation):
408         (WebCore::ImageData::advanceAnimation):
409         (WebCore::ImageData::setCompositingOperation):
410         (WebCore::ImageData::fillSolidColorInRect):
411         (WebCore::ImageData::drawInRect):
412         (WebCore::drawPattern):
413         (WebCore::):
414         (WebCore::ImageData::tileInRect):
415         (WebCore::ImageData::scaleAndTileInRect):
416         (WebCore::Image::loadResource):
417         (WebCore::Image::supportsType):
418         (WebCore::m_animationObserver):
419         (WebCore::Image::Image):
420         (WebCore::Image::~Image):
421         (WebCore::Image::getCGImageRef):
422         (WebCore::Image::getNSImage):
423         (WebCore::Image::getTIFFRepresentation):
424         (WebCore::Image::resetAnimation):
425         (WebCore::Image::setData):
426         (WebCore::Image::isNull):
427         (WebCore::Image::size):
428         (WebCore::Image::rect):
429         (WebCore::graphicsContext):
430         (WebCore::Image::drawInRect):
431         (WebCore::Image::tileInRect):
432         (WebCore::Image::scaleAndTileInRect):
433         * rendering/render_box.cpp:
434         (WebCore::RenderBox::paintBackgroundExtended):
435         * rendering/render_image.cpp:
436         (WebCore::RenderImage::setCachedImage):
437         (WebCore::RenderImage::imageChanged):
438         * rendering/render_image.h:
439         * rendering/render_line.cpp:
440         (WebCore::InlineFlowBox::paintBackground):
441         (WebCore::InlineFlowBox::paintBackgroundAndBorder):
442         * rendering/render_list.cpp:
443         (RenderListMarker::imageChanged):
444         * rendering/render_list.h:
445         * rendering/render_object.cpp:
446         (WebCore::RenderObject::mustRepaintBackgroundOrBorder):
447         (WebCore::RenderObject::paintBorderImage):
448         (WebCore::RenderObject::paintBorder):
449         (WebCore::RenderObject::imageChanged):
450         (WebCore::RenderObject::willRenderImage):
451         * rendering/render_object.h:
452
453 2006-02-02  Mitz Pettel  <opendarwin.org@mitzpettel.com>
454
455         Test: LayoutTests/fast/block/positioning/height-change.html
456
457         Reviewed by Hyatt.
458
459         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6881
460           Block with position:absolute bottom:0 doesn't always move when height
461           of containing block changes (affects Safari RSS)
462
463         * rendering/RenderBlock.cpp:
464         (WebCore::RenderBlock::layoutBlock): Relayout positioned children if the
465         block's height changed during layout.
466         * rendering/render_flexbox.cpp:
467         (WebCore::RenderFlexibleBox::layoutBlock): Ditto.
468
469 2006-02-02  Maciej Stachowiak  <mjs@apple.com>
470
471         Reviewed by Darin.
472
473         - Move name and parent from Frame to FrameTreeNode
474         http://bugzilla.opendarwin.org/show_bug.cgi?id=6994
475
476         * bridge/mac/BrowserExtensionMac.mm:
477         (WebCore::BrowserExtensionMac::createNewWindow):
478         * bridge/mac/MacFrame.h:
479         * bridge/mac/MacFrame.mm:
480         (WebCore::MacFrame::generateFrameName):
481         (WebCore::MacFrame::submitForm):
482         (WebCore::Frame::frameDetached):
483         (WebCore::MacFrame::nextKeyViewInFrameHierarchy):
484         (WebCore::MacFrame::createEmptyDocument):
485         * bridge/mac/WebCoreFrameBridge.mm:
486         (-[WebCoreFrameBridge setParent:]):
487         (-[WebCoreFrameBridge parent]):
488         (-[WebCoreFrameBridge setName:]):
489         (-[WebCoreFrameBridge name]):
490         * khtml/ecma/kjs_window.cpp:
491         (KJS::Window::getValueProperty):
492         (KJS::Window::put):
493         (KJS::Window::isSafeScript):
494         (KJS::WindowFunc::callAsFunction):
495         * khtml/html/html_baseimpl.cpp:
496         (WebCore::HTMLFrameElementImpl::isURLAllowed):
497         * khtml/html/html_headimpl.cpp:
498         (WebCore::HTMLLinkElementImpl::process):
499         * khtml/xml/DocumentImpl.cpp:
500         (WebCore::DocumentImpl::ownerElement):
501         (WebCore::DocumentImpl::parentDocument):
502         * page/Frame.cpp:
503         (WebCore::Frame::checkCompleted):
504         (WebCore::Frame::redirectionTimerFired):
505         (WebCore::Frame::requestFrameName):
506         (WebCore::Frame::slotChildCompleted):
507         (WebCore::Frame::incrementFrameCount):
508         (WebCore::Frame::decrementFrameCount):
509         (WebCore::Frame::topLevelFrameCount):
510         (WebCore::Frame::selectFrameElementInParentIfFullySelected):
511         (WebCore::Frame::handleFallbackContent):
512         (WebCore::Frame::userGestureHint):
513         (WebCore::Frame::canCachePage):
514         (WebCore::Frame::updatePolicyBaseURL):
515         * page/Frame.h:
516         * page/FramePrivate.h:
517         (WebCore::FramePrivate::FramePrivate):
518         * page/FrameTreeNode.cpp:
519         (WebCore::FrameTreeNode::setName):
520         (WebCore::FrameTreeNode::appendChild):
521         (WebCore::FrameTreeNode::removeChild):
522         * page/FrameTreeNode.h:
523         (WebCore::FrameTreeNode::FrameTreeNode):
524         (WebCore::FrameTreeNode::name):
525         (WebCore::FrameTreeNode::parent):
526         (WebCore::FrameTreeNode::setParent):
527         * rendering/render_frames.cpp:
528         (WebCore::isURLAllowed):
529
530 2006-02-01  Darin Adler  <darin@apple.com>
531
532         Checking in without review because I *just* broke this with my last check-in.
533
534         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7018
535           REGRESSION: clearTimeout no longer works
536
537         Test: fast/dom/Window/clear-timeout.html
538
539         * khtml/ecma/kjs_window.cpp: (WindowQObject::clearTimeout): Fixed a
540         != that should have been a ==.
541
542 2006-02-01  Darin Adler  <darin@apple.com>
543
544         Reviewed by Hyatt.
545
546         - use Timer for everything, kill timer features of QObject, QTimer, QTimerEvent
547
548         * ForwardingHeaders/kxmlcore/Noncopyable.h: Added.
549         * ForwardingHeaders/kxmlcore/OwnArrayPtr.h: Added.
550         * ForwardingHeaders/kxmlcore/OwnPtr.h: Added.
551         * ForwardingHeaders/qtimer.h: Removed.
552         * kwq/KWQTimer.cpp: Removed.
553         * kwq/KWQTimer.h: Removed.
554
555         * kwq/KWQObject.h:
556         * kwq/KWQObject.cpp: Remove timer-related features.
557
558         * kwq/KWQEvent.h: Remove QTimerEvent.
559
560         * WebCore.xcodeproj/project.pbxproj: Updated for file changes.
561         * WebCore.vcproj/WebCore/WebCore.vcproj: Ditto.
562
563         * platform/Timer.h: Change to use nextFireInterval rather than nextFireTime.
564         More convenient and also no need to define what the epoch is. Change TimerBase
565         to use a virtual function rather than a function pointer. Added setDeferringTimers
566         function to ensure timers don't fire while handling an event.
567         * platform/mac/Timer.cpp:
568         (WebCore::timerFired): Added deferral support.
569         (WebCore::fireDeferred): Added.
570         (WebCore::TimerBase::TimerBase): Simplify to remove function pointer.
571         (WebCore::TimerBase::~TimerBase): Put in here, no longer inline.
572         (WebCore::TimerBase::start): Change to use interval.
573         (WebCore::TimerBase::startRepeating): Change since we use interval now.
574         (WebCore::TimerBase::startOneShot): Ditto.
575         (WebCore::TimerBase::stop): Added deferral support.
576         (WebCore::TimerBase::nextFireInterval): Added.
577         (WebCore::TimerBase::fire): Added.
578         (WebCore::isDeferringTimers): Added.
579         (WebCore::setDeferringTimers): Added.
580
581         * bridge/mac/MacFrame.mm:
582         (WebCore::MacFrame::startRedirectionTimer): Update for change to Timer class.
583         (WebCore::MacFrame::passMouseDownEventToWidget): Update to use setDeferringTimers
584         instead of QObject::setDefersTimers.
585
586         * khtml/ecma/kjs_window.h:
587         * khtml/ecma/kjs_window.cpp:
588         (KJS::DOMWindowTimer): Added. Class for JavaScript "timeout".
589         (KJS::WindowQObject::parentDestroyed): Update to use DOMWindowTimer.
590         (KJS::WindowQObject::installTimeout): Ditto.
591         (KJS::WindowQObject::pauseTimeouts): Ditto.
592         (KJS::WindowQObject::resumeTimeouts): Ditto.
593         (KJS::WindowQObject::clearTimeout): Ditto.
594         (KJS::WindowQObject::timerFired): Ditto.
595         (KJS::DOMWindowTimer::fired): Added.
596
597         * khtml/html/htmltokenizer.h:
598         * khtml/html/htmltokenizer.cpp:
599         (WebCore::HTMLTokenizer::HTMLTokenizer): Use Timer instead of timer ID.
600         (WebCore::HTMLTokenizer::reset): Ditto.
601         (WebCore::HTMLTokenizer::continueProcessing): Ditto.
602         (WebCore::HTMLTokenizer::write): Ditto.
603         (WebCore::HTMLTokenizer::stopParsing): Ditto.
604         (WebCore::HTMLTokenizer::processingData): Ditto.
605         (WebCore::HTMLTokenizer::timerFired): Ditto.
606         (WebCore::HTMLTokenizer::end): Ditto.
607         (WebCore::HTMLTokenizer::finish): Ditto.
608
609         * khtml/xml/DocumentImpl.h:
610         * khtml/xml/DocumentImpl.cpp:
611         (WebCore::DocumentImpl::DocumentImpl): Updated for changes to use RefPtr
612         more cases, and not use it for m_svgExtensions.
613         (WebCore::DocumentImpl::~DocumentImpl): Delete m_svgExtensions instead of
614         just deref'ing it since it's no longer shared.
615         (WebCore::DocumentImpl::implementation): Update for RefPtr.
616         (WebCore::DocumentImpl::elementSheet): Ditto.
617         (WebCore::DocumentImpl::styleSheets): Ditto.
618         (WebCore::DocumentImpl::recalcStyleSelector): Ditto.
619         (WebCore::DocumentImpl::dispatchImageLoadEventSoon): Update to use new style timer.
620         (WebCore::DocumentImpl::removeImage): Ditto.
621         (WebCore::DocumentImpl::dispatchImageLoadEventsNow): Ditto.
622         (WebCore::DocumentImpl::imageLoadEventTimerFired): Ditto.
623         (WebCore::DocumentImpl::svgExtensions): Update for RefPtr.
624         (WebCore::DocumentImpl::accessSVGExtensions): Ditto.
625
626         * ksvg2/misc/KSVGTimeScheduler.h:
627         (WebCore::TimeScheduler::document):
628         * ksvg2/misc/KSVGTimeScheduler.cpp:
629         (WebCore::SVGTimer::downcast):
630         (WebCore::SVGTimer::SVGTimer):
631         (WebCore::SVGTimer::start):
632         (WebCore::SVGTimer::calculateTimePercentage):
633         (WebCore::SVGTimer::notifyAll):
634         (WebCore::SVGTimer::addNotify):
635         (WebCore::SVGTimer::removeNotify):
636         (WebCore::TimeScheduler::TimeScheduler):
637         (WebCore::TimeScheduler::~TimeScheduler):
638         (WebCore::TimeScheduler::addTimer):
639         (WebCore::TimeScheduler::connectIntervalTimer):
640         (WebCore::TimeScheduler::disconnectIntervalTimer):
641         (WebCore::TimeScheduler::startAnimations):
642         (WebCore::TimeScheduler::toggleAnimations):
643         (WebCore::TimeScheduler::timerFired):
644         Rework to use new timer.
645
646         * ksvg2/misc/SVGDocumentExtensions.h:
647         * ksvg2/misc/SVGDocumentExtensions.cpp:
648         Make SVGDocumentExtensions no longer be shared, be solely owned by the document.
649
650         * ksvg2/svg/SVGDocumentImpl.cpp:
651         (WebCore::SVGDocumentImpl::createStyleSelector): Update for RefPtr use.
652
653         * kwq/KWQSlot.cpp: Remove endLifeSupport and timerNotify slots.
654
655         * page/Frame.h:
656         * page/Frame.cpp:
657         (WebCore::Frame::selectionLayoutChanged): Update to use new style timer.
658         (WebCore::Frame::caretBlinkTimerFired): Ditto.
659         * page/FramePrivate.h: (WebCore::FramePrivate::FramePrivate): Ditto.
660
661         * page/FrameView.h:
662         * page/FrameView.cpp:
663         (WebCore::FrameViewPrivate::FrameViewPrivate): Update to use new style timer.
664         (WebCore::FrameView::clear): Ditto.
665         (WebCore::FrameView::layout): Ditto.
666         (WebCore::FrameView::layoutTimerFired): Ditto.
667         (WebCore::FrameView::scheduleRelayout): Ditto.
668         (WebCore::FrameView::layoutPending): Ditto.
669         (WebCore::FrameView::haveDelayedLayoutScheduled): Ditto.
670         (WebCore::FrameView::unscheduleRelayout): Ditto.
671
672         * page/ObjectContents.h: Remove unneeded includes.
673
674         * rendering/render_frames.cpp: Removed include of <qtimer.h>.
675
676         * rendering/render_layer.h:
677         * rendering/render_layer.cpp:
678         (WebCore::Marquee::Marquee): Use new style timers.
679         (WebCore::Marquee::start): Ditto.
680         (WebCore::Marquee::suspend): Ditto.
681         (WebCore::Marquee::stop): Ditto.
682         (WebCore::Marquee::updateMarqueeStyle): Ditto.
683         (WebCore::Marquee::timerFired): Ditto.
684
685 2006-02-01  Darin Adler  <darin@apple.com>
686
687         Reviewed by Beth.
688
689         Fix for <rdar://problem/4424126> REGRESSION(412-420+): yellow 
690         highlight fails to follow cursor when mousing over star rating
691         (6232)
692
693         Event coordinates cannot be calculated until there is a target. 
694         This patch restructures the code so that the coordinates are 
695         initialized when the mouse event is created but are not calculated
696         until the target is set.
697
698         * khtml/xml/dom2_eventsimpl.cpp:
699         (WebCore::EventImpl::setTarget): Now calls receivedTarget() if the
700         target is not nil.
701         (WebCore::EventImpl::receivedTarget): virtual receivedTarget()
702         (WebCore::MouseRelatedEventImpl::MouseRelatedEventImpl): Call 
703         initCoordinates()
704         (WebCore::MouseRelatedEventImpl::initCoordinates): Formerly called 
705         computePositions(), this now only initializes the coordinates and 
706         lets receivedTarget() take care of the computations. 
707         (WebCore::MouseRelatedEventImpl::receivedTarget): Takes care of 
708         computing the coordinates.
709         (WebCore::MouseEventImpl::initMouseEvent): Call initCoordinates()
710         * khtml/xml/dom2_eventsimpl.h:
711         (WebCore::EventImpl::target): Fix spacing.
712         (WebCore::EventImpl::currentTarget): Same.
713         (WebCore::EventImpl::setCurrentTarget): Same.
714
715 2006-01-31  Maciej Stachowiak  <mjs@apple.com>
716
717         Reviewed by Darin.
718
719         - fixed REGRESSION: assertion failure mousing over DHTML menus at www.worldofwarcraft.com
720         http://bugzilla.opendarwin.org/show_bug.cgi?id=6931
721
722         * rendering/render_layer.cpp:
723         (WebCore::RenderLayer::hitTestLayer): Iterate vectors in a way that won't break on empty ones.
724
725 2006-01-31  Adele Peterson  <adele@apple.com>
726
727         Reviewed by Darin.
728
729         http://bugzilla.opendarwin.org/show_bug.cgi?id=6862
730         Input's value doesn't get updated after typing in new text field
731
732         Added test:
733         fast/forms/input-changing-value.html
734
735         Added an event listener for a DOMCharacterDataModifiedEvent on the inner div.
736         When we get the event, then we update the input element's value field.
737
738         There may be performance problems with this approach that we will have to
739         address before flipping the switch to use these new text fields.
740
741         * rendering/RenderTextField.cpp:
742         (WebCore::InputMutationListener::handleEvent): calls subtreeHasChanged
743         (WebCore::m_mutationListener):
744         (WebCore::RenderTextField::~RenderTextField): remove the event listener.
745         (WebCore::RenderTextField::setStyle): Remove unnecessary setStyle on text node.  
746          It should inherit style from the div already.
747         (WebCore::RenderTextField::updateFromElement): add the event listener.
748         (WebCore::RenderTextField::subtreeHasChanged): updates the input element's value.
749         * rendering/RenderTextField.h:
750         (WebCore::InputMutationListener::InputMutationListener): Added.
751         (WebCore::InputMutationListener::renderTextField): Added.
752         (WebCore::InputMutationListener::setInputElement): Added.
753
754 2006-01-31  Antti Koivisto <koivisto@iki.fi>
755
756         Reviewed by Dave Hyatt.
757         Landed by Timothy Hatcher.
758
759         http://bugzilla.opendarwin.org/show_bug.cgi?id=4959
760         Bug 4959: inline style not terminated properly after <form>
761
762         * khtml/html/htmlparser.cpp:
763         (HTMLParser::isResidualStyleTag): add <span> as residual style tag
764         (HTMLParser::isAffectedByResidualStyle): add <form> as tag affected by residual style
765
766 2006-01-31  Vicki Murley <vicki@apple.com>
767
768         Reviewed by Geoff.
769
770         - fix <rdar://problem/4426668> REGRESSION: sometimes URLs with named anchors in a
771         page don't jump to proper location in document (6916). Added test cases for this
772         fix and past link jumping bug fixes.
773
774         * khtml/xml/ContainerNodeImpl.cpp:
775         (WebCore::ContainerNodeImpl::getUpperLeftCorner): Traverse up the parent node chain
776         until you find one that has a sibling.
777         * manual-tests/linkjump-1.html: Added a note here - the bug for this test case is
778         still broken in TOT.
779         * manual-tests/linkjump-2.html: Added. Renamed scrollToAnchor.html, to group it with the
780         rest of the link jumping tests.
781         * manual-tests/linkjump-3.html: Added. Test case for this bug, <rdar://problem/4426668>.
782         * manual-tests/linkjump-4.html: Added. Test case for past fix, <rdar://problem/4247537>.
783         * manual-tests/linkjump-5.html: Added. Test case for past fix, <rdar://problem/4256060>.
784         * manual-tests/scrollToAnchor.html: Removed.
785
786 2006-01-31  David Harrison  <harrison@apple.com>
787
788         Reviewed by John.
789         <rdar://problem/4423922> TOT REGRESSION (r12358): first iframe in pair fails to copy
790
791         Layout test added:
792         * editing/pasteboard/paste-empty-startcontainer.html
793         
794         * khtml/xml/dom2_rangeimpl.cpp:
795         (DOM::RangeImpl::startNode):
796         - use empty non-textual m_startContainer itself if m_startOffset is 0, rather then nextSibling()
797
798 2006-01-31  Mitz Pettel  <opendarwin.org@mitzpettel.com>
799
800         Test: fast/forms/selected-index-assert.html.
801
802         Reviewed by Adele.
803         
804         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6942
805           Assertion failure in HTMLSelectElementImpl::selectedIndex (m_multiple)
806
807         * khtml/html/HTMLSelectElementImpl.cpp:
808         (WebCore::HTMLSelectElementImpl::selectedIndex): Removed bogus assert.
809         -1 is the correct value to return if no option is selected.
810
811 2006-01-31  Beth Dakin  <bdakin@apple.com>
812
813         Reviewed by Adele.
814
815         Fixing build bustage. Removing include of khtml_factory.h since it 
816         has been removed.
817
818         * rendering/font.cpp: No longer include khtml_factory.h
819
820 2006-01-31  David Kilzer  <ddkilzer@kilzer.net>
821
822         Reviewed by Hyatt.
823
824         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6584
825           REGRESSION: button after unclosed button gives trouble
826
827         * khtml/html/htmlparser.cpp: (HTMLParser::getNode):
828         Add buttonTag to error handling table to take care of unclosed tags.
829
830 2006-01-31  Mitz Pettel  <opendarwin.org@mitzpettel.com>
831
832         Test: fast/parser/script-after-frameset-assert.html
833
834         Reviewed by Darin.
835         
836         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6959
837           REGRESSION: Assertion failure in HTMLTokenizer::parseTag (!scriptNode) on page with ignored scripts
838
839         * khtml/html/htmltokenizer.cpp:
840         (WebCore::HTMLTokenizer::scriptHandler): Reset scriptNode to 0 if the
841         script is being skipped.
842
843 2006-01-31  Mitz Pettel  <opendarwin.org@mitzpettel.com>
844
845         Reviewed by Darin.
846
847         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6960
848           REGRESSION: Assertion failure in table_layout.cpp:216 calcWidthArray()
849
850         * rendering/table_layout.cpp: (WebCore::FixedTableLayout::calcWidthArray):
851         Remove the assertion.
852
853 2006-01-31  Anders Carlsson  <andersca@mac.com>
854
855         Reviewed by John.
856
857         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6964
858         ImagePatterns are always rendered mirrored
859         
860         * khtml/ecma/kjs_html.cpp:
861         (KJS::ImagePattern::createPattern):
862         Don't mirror the x coordinate when creating the pattern.
863
864 2006-01-31  Darin Adler  <darin@apple.com>
865
866         Reviewed by Hyatt.
867
868         - added a Timer class
869         - used the Timer class for the redirection timer
870         - moved Frame, FrameView, MacFrame, and FrameNodeTree into WebCore namespace
871         - removed more KWQ
872
873         * ForwardingHeaders/khtml_factory.h: Removed.
874         * kwq/KWQKHTMLFactory.cpp: Removed.
875         * kwq/KWQKHTMLFactory.h: Removed.
876
877         * platform/Timer.h: Added.
878         * platform/mac/Timer.cpp: Added.
879
880         * WebCore.vcproj/WebCore/WebCore.vcproj: Updated for added and removed files.
881         * WebCore.xcodeproj/project.pbxproj: Ditto.
882
883         * page/Frame.h:
884         * page/Frame.cpp:
885         (WebCore::Frame::init): Remove code to set up slotRedirect.
886         (WebCore::Frame::checkCompleted): Call start/stopRedirectionTimer instead of using
887         the redirection timer directly.
888         (WebCore::Frame::scheduleRedirection): Ditto.
889         (WebCore::Frame::scheduleLocationChange): Ditto.
890         (WebCore::Frame::scheduleHistoryNavigation): Ditto.
891         (WebCore::Frame::cancelRedirection): Ditto.
892         (WebCore::Frame::redirectionTimerFired): Renamed from slotRedirect.
893         (WebCore::Frame::slotParentCompleted): More startRedirectionTimer.
894         (WebCore::Frame::startRedirectionTimer): Added. Virtual bottleneck to start the
895         redirection timer.
896         (WebCore::Frame::stopRedirectionTimer): Added. Virtual bottleneck to stop the
897         redirection timer.
898
899         * page/FramePrivate.h: Changed m_redirectionTimer from a QTimer to a Timer.
900
901         * bridge/mac/MacFrame.mm:
902         (WebCore::MacFrame::startRedirectionTimer): Added. Avoids the need for the QTimer
903         "monitor" feature that I had added a while back to implement the client-redirected
904         callback.
905         (WebCore::MacFrame::stopRedirectionTimer): Ditto.
906
907         * kwq/KWQSlot.cpp: Removed slotRedirected.
908
909         * ForwardingHeaders/ksvg2/KSVGPart.h: Removed using to put Frame into various
910         namespaces (all of which are WebCore now anyway).
911
912         * bindings/objc/DOMInternal.mm:
913         * bridge/mac/BrowserExtensionMac.h:
914         * bridge/mac/KWQKHTMLView.cpp:
915         * bridge/mac/MacFrame.h:
916         * bridge/mac/WebCoreFrameBridge.h:
917         * bridge/mac/WebCoreFrameBridge.mm:
918         * bridge/mac/WebCorePageBridge.h:
919         * bridge/mac/WebCorePageBridge.mm:
920         * css/cssstyleselector.cpp:
921         * css/cssstyleselector.h:
922         * khtml/ecma/kjs_binding.cpp:
923         * khtml/ecma/kjs_binding.h:
924         * khtml/ecma/kjs_navigator.cpp:
925         * khtml/ecma/kjs_navigator.h:
926         * khtml/ecma/kjs_proxy.h:
927         * khtml/ecma/kjs_window.h:
928         * khtml/editing/SelectionController.h:
929         * khtml/editing/jsediting.h:
930         * khtml/html/html_baseimpl.h:
931         * khtml/html/html_documentimpl.cpp:
932         * khtml/html/html_documentimpl.h:
933         * khtml/html/html_headimpl.h:
934         * khtml/html/htmlparser.h:
935         * khtml/html/htmltokenizer.h:
936         * khtml/xml/DOMImplementationImpl.h:
937         * khtml/xml/DocumentImpl.h:
938         * khtml/xml/dom2_eventsimpl.h:
939         * khtml/xml/xml_tokenizer.h:
940         * khtml/xsl/xslt_processorimpl.h:
941         * ksvg2/svg/SVGDocumentImpl.cpp:
942         * kwq/KWQClipboard.h:
943         * kwq/KWQComboBox.mm:
944         * kwq/KWQFileButton.h:
945         * kwq/KWQFrame.mm:
946         * kwq/KWQKJavaAppletWidget.h:
947         * kwq/KWQListBox.mm:
948         * kwq/KWQSignalStubs.cpp:
949         * kwq/KWQSlider.mm:
950         * kwq/KWQTextField.mm:
951         * kwq/KWQWidget.mm:
952         * kwq/WebCoreSettings.mm:
953         * kwq/WebCoreTextRendererFactory.mm:
954         * loader/DocLoader.h:
955         * page/FrameTreeNode.cpp:
956         * page/FrameTreeNode.h:
957         * page/FrameView.cpp:
958         * page/FrameView.h:
959         * page/Page.cpp:
960         * page/Page.h:
961         * rendering/InlineTextBox.h:
962         * rendering/font.cpp:
963         * rendering/render_canvas.h:
964         * rendering/render_frames.h:
965         * rendering/render_object.h:
966         * rendering/render_replaced.h:
967         Updated for namespace and header changes.
968
969 2006-01-31  Anders Carlsson  <andersca@mac.com>
970
971         Reviewed by Darin.
972
973         The WebCore part of http://bugzilla.opendarwin.org/show_bug.cgi?id=6907
974         REGRESSION: United.com menus messed up due to document.all/MSIE sniff
975         
976         * khtml/ecma/kjs_html.h:
977         (KJS::HTMLAllCollection::masqueradeAsUndefined):
978         Update for name change.
979         
980 2006-01-30  Geoffrey Garen  <ggaren@apple.com>
981
982         Reviewed by mjs.
983
984         - Speculative fix for <rdar://problem/4135845> Crash executing 
985         cross-frame script on timeout in KJS::ScheduledAction::execute
986
987         If we ever get a reproducible case of 4135845, I'll add a test for it.
988
989         This is a re-working of Maciej's fix for 3157014 (circa 2003!). Since
990         you can't reliably predict what the state of the page will be when
991         a timer fires, I've made the timer responsbile for making sure that
992         everything is OK to execute.
993
994         I tested @ http://www.javascriptkit.com/script/cut3.shtml with various
995         combinations of reload, back, and regular navigations with JS enabled/
996         disabled to ensure that the previous crash didn't return. I also ran a 
997         leaks test and discovered some, but none unique to this patch. (See 
998         <rdar://problem/4427420> TOT REGRESSION: Leaks seen on page with 
999         JavaScript timer.)
1000
1001         * khtml/ecma/kjs_window.cpp:
1002         (KJS::ScheduledAction::execute): Return early if there's no window
1003         object. (This happens when JavaScript is disabled.)
1004         (KJS::Window::retrieveWindow): Reversed a backwards ASSERT, increased
1005         prettiness. (The assert fired while I was testing. Not sure why we
1006         haven't seen it before.)
1007         * page/Frame.cpp:
1008         (Frame::didOpenURL): Returned setting of JavaScript enabled/disabled
1009         preference to its rightful place. This introduces a new behavior: now,
1010         the unload event does not fire after you've disabled JavaScript. That 
1011         seems like a good thing. (See <rdar://problem/4426506> Disabling 
1012         JavaScript should immediately end JavaScript execution.)
1013         (Frame::begin): Ditto.
1014
1015 2006-01-30  Geoffrey Garen  <ggaren@apple.com>
1016
1017         Reviewed by Dave Harrison.
1018
1019         - Fixed <rdar://problem/4378159> crash in KWQKHTMLPart::userGestureHint
1020         from javascript enabled/disabled inconsistency when pasting webpage 
1021         into email or blot
1022
1023         * page/Frame.cpp:
1024         (Frame::userGestureHint): Check root frame's jScript() for NULL instead
1025         of checking inner frame's jScript().
1026         
1027         After init() has been called on a frame, but before begin() has been 
1028         called, the frame can have JavaScript enabled when its parent doesn't.
1029         (That seems wrong, so I've filed <rdar://problem/4426499> Child frame 
1030         momentarily has JavaScript enabled even though parent frame doesn't.)
1031         
1032         Regardless, it's better programming practice to NULL check the actual 
1033         pointer you're going to use, so that's what I've done here.
1034
1035         * manual-tests/paste-crash.html: Added.
1036         (No automated test because the crash depends on JavaScript being
1037         disabled.)
1038
1039 2006-01-30  Beth Dakin  <bdakin@apple.com>
1040
1041         Reviewed by Geoff
1042
1043         Fix for <rdar://problem/4298052> Crash in KWQCheckIfReloading at 
1044         http://www.inquisitorx.com/beta/
1045
1046         It is possible for the DocLoader's frame to be nil when the 
1047         DocLoader is not nil, so we need nil checks.
1048
1049         * kwq/KWQLoader.mm:
1050         (KWQServeRequest): Nil check.
1051         (KWQServeSynchronousRequest): Same.
1052         (KWQCheckIfReloading): Same.
1053         (KWQCheckCacheObjectStatus): Same.
1054         (KWQCacheObjectExpiresTime): Same.
1055         * kwq/KWQPageState.mm: Same.
1056
1057 2006-01-30  Eric Seidel  <eseidel@apple.com>
1058
1059         Add #import "KWQFontMetrics.h" to fix no-svg build.
1060
1061         * kwq/KWQPainter.mm:
1062
1063 2006-01-30  Darin Adler  <darin@apple.com>
1064
1065         Reviewed by Eric.
1066
1067         - cleanup of Int/Float-Size/Point/Rect classes
1068
1069         I did this as part of a redo of QMatrix, but I decided I should
1070         land this part separately.
1071
1072         Eliminated the concept of a null rect or point, which used to be
1073         indicated by negative width and height.
1074
1075         Changed right and bottom to to be, e.g., 2 for a rect at (0,0) 2x2.
1076         The old code followed Qt's system that says right is 1 in those cases,
1077         which is inappropriate for floating point, and old fashioned because
1078         modern graphics systems use coordinates for lines between pixels, not
1079         the pixels themselves.
1080
1081         Other API improvements to the point, size, and rect classes. For example,
1082         functions named with verbs now always modify the object itself.
1083
1084         * rendering/render_theme_mac.mm: (RenderThemeMac::paintButton): Fixed
1085         a bug where it said x() where it should say y().
1086
1087         * bridge/mac/MacFrame.h:
1088         * bridge/mac/MacFrame.mm:
1089         * bridge/mac/WebCoreFrameBridge.mm:
1090         * kcanvas/KCanvasContainer.cpp:
1091         * kcanvas/KCanvasItem.cpp:
1092         * kcanvas/RenderSVGImage.cpp:
1093         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
1094         * kcanvas/device/quartz/KCanvasItemQuartz.mm:
1095         * kcanvas/device/quartz/KCanvasResourcesQuartz.mm:
1096         * khtml/ecma/kjs_dom.cpp:
1097         * khtml/ecma/kjs_window.cpp:
1098         * khtml/editing/SelectionController.cpp:
1099         * khtml/html/html_inlineimpl.cpp:
1100         * khtml/html/html_objectimpl.cpp:
1101         * khtml/html/html_objectimpl.h:
1102         * khtml/misc/khtmllayout.h:
1103         * ksvg2/svg/SVGSVGElementImpl.cpp:
1104         * kwq/KWQAccObject.mm:
1105         * kwq/KWQComboBox.mm:
1106         * kwq/KWQFileButton.mm:
1107         * kwq/KWQFontMetrics.mm:
1108         * kwq/KWQPainter.h:
1109         * kwq/KWQPainter.mm:
1110         * kwq/KWQRegion.cpp:
1111         * kwq/KWQRenderTreeDebug.cpp:
1112         * kwq/KWQScrollView.mm:
1113         * kwq/KWQWMatrix.cpp:
1114         * kwq/KWQWidget.h:
1115         * kwq/KWQWidget.mm:
1116         * kwq/KWQWindowWidget.mm:
1117         * loader/CachedImage.cpp:
1118         * page/Frame.cpp:
1119         * page/FrameView.cpp:
1120         * platform/FloatPoint.cpp:
1121         * platform/FloatPoint.h:
1122         * platform/FloatRect.cpp:
1123         * platform/FloatRect.h:
1124         * platform/FloatSize.cpp:
1125         * platform/FloatSize.h:
1126         * platform/Image.h:
1127         * platform/IntPoint.cpp:
1128         * platform/IntPoint.h:
1129         * platform/IntPointArray.cpp:
1130         * platform/IntPointArray.h:
1131         * platform/IntRect.cpp:
1132         * platform/IntRect.h:
1133         * platform/IntSize.cpp:
1134         * platform/IntSize.h:
1135         * platform/mac/FloatPoint.mm:
1136         * platform/mac/FloatRect.mm:
1137         * platform/mac/FloatSize.mm:
1138         * platform/mac/Image.mm:
1139         * platform/mac/IntPoint.mm:
1140         * platform/mac/IntRect.mm:
1141         * platform/mac/IntSize.mm:
1142         * platform/mac/Screen.mm:
1143         * rendering/InlineTextBox.cpp:
1144         * rendering/RenderBlock.cpp:
1145         * rendering/RenderBlock.h:
1146         * rendering/RenderTable.cpp:
1147         * rendering/RenderTableCell.cpp:
1148         * rendering/RenderText.cpp:
1149         * rendering/render_box.cpp:
1150         * rendering/render_canvas.cpp:
1151         * rendering/render_canvasimage.cpp:
1152         * rendering/render_flow.cpp:
1153         * rendering/render_form.cpp:
1154         * rendering/render_frames.cpp:
1155         * rendering/render_layer.cpp:
1156         * rendering/render_line.cpp:
1157         * rendering/render_list.cpp:
1158         * rendering/render_object.cpp:
1159         * rendering/render_object.h:
1160         * rendering/render_replaced.cpp:
1161
1162 2006-01-29  Maciej Stachowiak  <mjs@apple.com>
1163
1164         Reviewed by Darin.
1165
1166         - Remove QSortedList and QPtrList sorting support
1167         http://bugzilla.opendarwin.org/show_bug.cgi?id=6929
1168
1169         * WebCore.xcodeproj/project.pbxproj:
1170         * kcanvas/device/KRenderingPaintServerGradient.cpp:
1171         (operator<<): Implement for Vector<KCGradientStop>
1172         (KRenderingPaintServerGradient::gradientStops): Use a Vector, not a subclass of
1173         QPtrList that sorts on every insert
1174         (compareStopOffset): Comparison function for sorting.
1175         (KRenderingPaintServerGradient::setGradientStops): Add a version that takes a Vector which sorts,
1176         and another which knows how to copy from another gradient paint server.
1177         * kcanvas/device/KRenderingPaintServerGradient.h:
1178         (makeGradientStop): Make a gradient stop pair.
1179         * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
1180         (KRenderingPaintServerGradientQuartz::~KRenderingPaintServerGradientQuartz): use delete
1181         on stops cache
1182         (KRenderingPaintServerGradientQuartz::updateQuartzGradientStopsCache): adapt to Vector
1183         * kcanvas/device/quartz/KRenderingPaintServerQuartz.h:
1184         * khtml/editing/visible_text.cpp:
1185         (khtml::compareBoxStart): Comparison function for sorting.
1186         (khtml::TextIterator::handleTextNode): Use Vector and std::sort instead of QSortedList
1187         for sorting. Keep current position as an index.
1188         (khtml::TextIterator::handleTextBox): Adapt for Vector use.
1189         * khtml/editing/visible_text.h:
1190         * ksvg2/svg/SVGGradientElementImpl.cpp:
1191         (SVGGradientElementImpl::rebuildStops): Use a Vector. Instead of modifying the existing one,
1192         make a fresh one and assign it.
1193         * ksvg2/svg/SVGLinearGradientElementImpl.cpp:
1194         (SVGLinearGradientElementImpl::buildGradient): don't copy item by item, just assign directly.
1195         * ksvg2/svg/SVGRadialGradientElementImpl.cpp:
1196         (SVGRadialGradientElementImpl::buildGradient): ditto
1197         * ksvg2/svg/SVGStopElementImpl.h:
1198         * kwq/KWQListImpl.cpp:
1199         * kwq/KWQPtrList.h:
1200         (QPtrList::sort): Removed.
1201         * kwq/KWQSortedList.h: Removed.
1202         * rendering/InlineTextBox.h: Remove now unneeded operator< and operator=
1203
1204 2006-01-29  Darin Adler  <darin@apple.com>
1205
1206         Reviewed by Maciej.
1207
1208         - killed more KWQ, KWinModule and QVariant
1209
1210         * ForwardingHeaders/kwinmodule.h: Removed.
1211         * ForwardingHeaders/qvariant.h: Removed.
1212
1213         * kwq/KWQKWinModule.h: Removed.
1214         * kwq/KWQKWinModule.mm: Removed.
1215         * kwq/KWQVariant.cpp: Removed.
1216         * kwq/KWQVariant.h: Removed.
1217
1218         * WebCore.vcproj/WebCore/WebCore.vcproj: Updated for removal.
1219         * WebCore.xcodeproj/project.pbxproj: Ditto.
1220
1221         * khtml/ecma/kjs_binding.h:
1222         * khtml/ecma/kjs_binding.cpp: Remove QVariant stuff.
1223
1224         * bridge/mac/WebCoreFrameBridge.mm:
1225         (-[WebCoreFrameBridge stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
1226         * khtml/ecma/kjs_events.cpp: (KJS::JSAbstractEventListener::handleEvent):
1227         * khtml/ecma/kjs_proxy.h:
1228         * khtml/ecma/kjs_proxy.cpp: (WebCore::KJSProxyImpl::evaluate):
1229         * page/Frame.h:
1230         * page/Frame.cpp:
1231         (getString):
1232         (Frame::replaceContentsWithScriptResult):
1233         (Frame::executeScript):
1234         (Frame::executeScheduledScript):
1235         (Frame::changeLocation):
1236         (Frame::urlSelected):
1237         (Frame::submitForm):
1238         Changed to use JSValue instead of QVariant for result of executing JavaScript.
1239
1240         * kwq/KWQObject.h: Removed a bunch of unneeded includes and forward declarations.
1241
1242         * bridge/mac/MacFrame.mm:
1243         * khtml/ecma/kjs_window.h:
1244         * khtml/ecma/kjs_window.cpp:
1245         * khtml/html/html_inlineimpl.cpp:
1246         * khtml/html/htmltokenizer.cpp:
1247         * khtml/xml/DocumentImpl.cpp:
1248         * khtml/xml/NodeImpl.cpp:
1249         * khtml/xml/dom2_eventsimpl.cpp:
1250         * khtml/xml/xml_tokenizer.cpp:
1251         * kwq/KWQComboBox.mm:
1252         * kwq/KWQFileButton.mm:
1253         * kwq/KWQListBox.mm:
1254         * kwq/KWQObject.cpp:
1255         * kwq/KWQSlider.mm:
1256         * kwq/KWQTextArea.mm:
1257         * kwq/KWQTextField.mm:
1258         * loader/CachedImage.h:
1259         * page/FrameView.h:
1260         * page/FrameView.cpp:
1261         * rendering/render_form.cpp:
1262         Updated includes, since KWQObject.h now includes less.
1263         Also updated callers to executeScript since one overload was removed.
1264
1265 2006-01-29  Eric Seidel <eseidel@apple.com>
1266
1267         Reviewed by darin.
1268
1269         Added back #include <qvaluelist.h> to fix WIN32 build.
1270
1271         * rendering/render_style.h:
1272
1273 2006-01-29  Darin Adler  <darin@apple.com>
1274
1275         Reviewed by Hyatt (drag image fix) and Maciej (the rest).
1276
1277         - fixed just-introduced crash dragging images
1278
1279         I don't know how to make a layout test for this.
1280
1281         * kwq/KWQClipboard.mm: (WebCore::KWQClipboard::dragImage): Fixed crash on
1282         dragging by initializing m_dragImage to 0.
1283
1284         - http://bugzilla.opendarwin.org/show_bug.cgi?id=6923
1285           remove more of KWQ, including the screen functions from QDesktopWidget
1286
1287         * kwq/KWQApplication.h: Removed.
1288         * kwq/KWQApplication.mm: Removed.
1289         * kwq/KWQGlobal.cpp: Removed.
1290         * kwq/KWQKPartsEvent.cpp: Removed.
1291         * kwq/KWQKPartsEvent.h: Removed.
1292         * kwq/KWQPair.h: Removed.
1293         * kwq/KWQStyle.cpp: Removed.
1294         * kwq/KWQStyle.h: Removed.
1295
1296         * ForwardingHeaders/kparts/event.h: Removed.
1297         * ForwardingHeaders/qapplication.h: Removed.
1298         * ForwardingHeaders/qstyle.h: Removed.
1299
1300         * WebCore.vcproj/WebCore/WebCore.vcproj: Updated for above changes.
1301         * WebCore.xcodeproj/project.pbxproj: Ditto.
1302
1303         * platform/Screen.h: Added. Replaces the desktop widget stuff in KWQApplication.mm.
1304         * platform/mac/Screen.mm: Added.
1305
1306         * kwq/KWQDef.h: Removed everything except for kMin and kMax from here.
1307         We should port to std::min and std::max, and then we can get rid of this
1308         header altogether.
1309
1310         * kwq/KWQKCursor.h: Removed setAutoHideCursor.
1311         * kwq/KWQKCursor.mm: Ditto.
1312
1313         * kwq/KWQWidget.h: Removed style() and setStyle() functions.
1314         * kwq/KWQWidget.mm: Ditto.
1315
1316         * khtml/ecma/kjs_window.h:
1317         * khtml/ecma/kjs_window.cpp:
1318         (KJS::Screen::Screen): Store a pointer to the Frame.
1319         (KJS::Screen::getValueProperty): Port to use the new Screen.h functions.
1320         (KJS::showModalDialog): Ditto.
1321         (KJS::Window::getValueProperty): Ditto.
1322         (KJS::WindowFunc::callAsFunction): Ditto.
1323
1324         * khtml/khtml_events.h:
1325         * khtml/khtml_events.cpp: Removed much of the code here.
1326         This can be cut down even more.
1327
1328         * khtml/misc/khtmllayout.h: Removed unused stuff and updated for KWQ changes.
1329
1330         * kwq/KWQCString.cpp:
1331         * kwq/KWQKURL.mm:
1332         * kwq/KWQPainter.mm:
1333         * kwq/KWQRegExp.cpp:
1334         * kwq/KWQRenderTreeDebug.cpp:
1335         * kwq/KWQString.h:
1336         * kwq/KWQString.mm:
1337         * kwq/KWQTextCodec.cpp:
1338         * WebCore+SVG/KDOMSettings.cpp:
1339         * bridge/mac/MacFrame.mm:
1340         * bridge/mac/WebCoreFrameBridge.mm:
1341         * css/cssparser.cpp:
1342         * kcanvas/KCanvasItem.cpp:
1343         * khtml/ecma/kjs_navigator.cpp:
1344         * khtml/html/HTMLSelectElementImpl.cpp:
1345         * khtml/html/html_tableimpl.h:
1346         * khtml/html/htmltokenizer.cpp:
1347         * khtml/misc/decoder.cpp:
1348         * ksvg2/css/KSVGCSSParser.cpp:
1349         * ksvg2/css/SVGRenderStyle.h:
1350         * page/Frame.h:
1351         * page/Frame.cpp:
1352         * page/FrameView.cpp:
1353         * platform/IntPointArray.cpp:
1354         * rendering/RenderBlock.cpp:
1355         * rendering/RenderTable.cpp:
1356         * rendering/bidi.cpp:
1357         * rendering/bidi.h:
1358         * rendering/render_form.cpp:
1359         * rendering/render_object.cpp:
1360         * rendering/render_object.h:
1361         * rendering/render_replaced.cpp:
1362         * rendering/render_style.h:
1363         * rendering/table_layout.cpp:
1364         Updated for above KWQ changes. Changed tabs to spaces.
1365
1366 2006-01-29  Eric Seidel <eseidel@apple.com>
1367
1368         Reviewed by hyatt.
1369
1370         Fix build for Win32.
1371
1372         * WebCore.vcproj/WebCore/WebCore.vcproj:
1373
1374 2006-01-29  David Hyatt  <hyatt@apple.com>
1375
1376         Fix for bug 6910, don't let Image be assignable or copiable.  It will soon represent  the actual
1377         original Image (including the data) and as such must remain unique.
1378
1379         Reviewed by darin
1380
1381         * kcanvas/KCanvasFilters.cpp:
1382         (KCanvasFEImage::~KCanvasFEImage):
1383         (KCanvasFEImage::setCachedImage):
1384         * kcanvas/KCanvasFilters.h:
1385         (KCanvasFEImage::KCanvasFEImage):
1386         (KCanvasFEImage::cachedImage):
1387         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
1388         (KCanvasFEImageQuartz::getCIFilter):
1389         * khtml/ecma/kjs_events.cpp:
1390         (KJS::ClipboardProtoFunc::callAsFunction):
1391         * khtml/ecma/kjs_html.cpp:
1392         (KJS::KJS::Context2DFunction::callAsFunction):
1393         (KJS::drawPattern):
1394         (KJS::_rh):
1395         (KJS::ImagePattern::~ImagePattern):
1396         (KJS::ImagePattern::createPattern):
1397         * khtml/ecma/kjs_html.h:
1398         (KJS::ImagePattern::cachedImage):
1399         * khtml/html/html_imageimpl.h:
1400         (WebCore::HTMLImageElementImpl::cachedImage):
1401         * khtml/xml/dom2_eventsimpl.h:
1402         * ksvg2/svg/SVGCursorElementImpl.cpp:
1403         (SVGCursorElementImpl::~SVGCursorElementImpl):
1404         (SVGCursorElementImpl::parseMappedAttribute):
1405         * ksvg2/svg/SVGCursorElementImpl.h:
1406         (KSVG::SVGCursorElementImpl::cachedImage):
1407         * ksvg2/svg/SVGFEImageElementImpl.cpp:
1408         (SVGFEImageElementImpl::~SVGFEImageElementImpl):
1409         (SVGFEImageElementImpl::parseMappedAttribute):
1410         (SVGFEImageElementImpl::notifyFinished):
1411         * kwq/KWQClipboard.h:
1412         * kwq/KWQClipboard.mm:
1413         (WebCore::KWQClipboard::dragImage):
1414         (WebCore::KWQClipboard::setDragImage):
1415         (WebCore::KWQClipboard::setDragImageElement):
1416         (WebCore::KWQClipboard::imageChanged):
1417         (WebCore::KWQClipboard::dragNSImage):
1418         * platform/Image.h:
1419
1420 2006-01-29  Darin Adler  <darin@apple.com>
1421
1422         Reviewed by Hyatt.
1423
1424         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6914
1425           REGRESSION: fast/block/basic/014.html crashes Safari
1426
1427         * rendering/render_image.h:
1428         (WebCore::RenderImage::image): Return a null image when m_cachedImage is 0.
1429         (WebCore::RenderImage::errorOccurred): Return false when m_cachedImage is 0.
1430         * rendering/render_image.cpp: (WebCore::RenderImage::nullImage): Added.
1431         Returns a global null image for use when we have no cached image.
1432
1433         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6919
1434           REGRESSION: Background images don't paint when they are finished loading
1435
1436         * rendering/render_object.h: Renamed the old setImage to imageChanged, the
1437         new name for the same function.
1438         * rendering/render_object.cpp: (WebCore::RenderObject::imageChanged): Ditto.
1439         * rendering/render_list.cpp: (RenderListMarker::imageChanged): Changed the
1440         call to parent to call the new imageChanged instead of the old setImage.
1441
1442         - fixed something else that was causing some layout test crashes
1443
1444         * kwq/KWQRenderTreeDebug.cpp: (externalRepresentation): Rearrange so we won't
1445         ever dereference a null pointer here.
1446
1447 2006-01-29  Maciej Stachowiak  <mjs@apple.com>
1448
1449         Reviewed by Darin.
1450
1451         - replace QValueVector and QPtrVector use with Vector, and remove them.
1452         http://bugzilla.opendarwin.org/show_bug.cgi?id=6909
1453
1454         * ForwardingHeaders/q3valuevector.h: Removed.
1455         * ForwardingHeaders/qptrvector.h: Removed.
1456         * ForwardingHeaders/qvector.h: Removed.
1457         * WebCore+SVG/KDOMSettings.cpp:
1458         (KDOMSettings::init):
1459         (KDOMSettings::isAdFiltered):
1460         * WebCore.xcodeproj/project.pbxproj:
1461         * bridge/mac/WebCoreFrameBridge.mm:
1462         (-[WebCoreFrameBridge elementWithName:inForm:]):
1463         (-[WebCoreFrameBridge controlsInForm:]):
1464         * css/cssstyleselector.h:
1465         * khtml/html/HTMLCollectionImpl.cpp:
1466         (WebCore::HTMLCollectionImpl::updateNameCache):
1467         (WebCore::HTMLCollectionImpl::namedItems):
1468         * khtml/html/HTMLCollectionImpl.h:
1469         * khtml/html/HTMLFormCollectionImpl.cpp:
1470         (WebCore::HTMLFormCollectionImpl::HTMLFormCollectionImpl):
1471         (WebCore::HTMLFormCollectionImpl::calcLength):
1472         (WebCore::HTMLFormCollectionImpl::item):
1473         (WebCore::HTMLFormCollectionImpl::getNamedFormItem):
1474         (WebCore::HTMLFormCollectionImpl::updateNameCache):
1475         * khtml/html/HTMLFormElementImpl.cpp:
1476         (WebCore::HTMLFormElementImpl::~HTMLFormElementImpl):
1477         (WebCore::HTMLFormElementImpl::length):
1478         (WebCore::HTMLFormElementImpl::submitClick):
1479         (WebCore::HTMLFormElementImpl::formData):
1480         (WebCore::HTMLFormElementImpl::submit):
1481         (WebCore::HTMLFormElementImpl::reset):
1482         (WebCore::insertIntoVector):
1483         (WebCore::removeFromVector):
1484         (WebCore::HTMLFormElementImpl::formElementIndex):
1485         (WebCore::HTMLFormElementImpl::registerImgElement):
1486         * khtml/html/HTMLFormElementImpl.h:
1487         * ksvg2/svg/SVGTextElementImpl.cpp:
1488         * kwq/KWQComboBox.h:
1489         * kwq/KWQListBox.h:
1490         * kwq/KWQPtrVector.h: Removed.
1491         * kwq/KWQRenderTreeDebug.cpp:
1492         (writeLayers):
1493         * kwq/KWQValueVector.h: Removed.
1494         * kwq/KWQVectorImpl.cpp: Removed.
1495         * kwq/KWQVectorImpl.h: Removed.
1496         * loader/loader.cpp:
1497         (WebCore::Loader::cancelRequests):
1498         * rendering/render_layer.cpp:
1499         (WebCore::RenderLayer::paintLayer):
1500         (WebCore::RenderLayer::hitTestLayer):
1501         (WebCore::compareZIndex):
1502         (WebCore::RenderLayer::updateZOrderLists):
1503         (WebCore::RenderLayer::collectLayers):
1504         * rendering/render_layer.h:
1505         (khtml::RenderLayer::posZOrderList):
1506         (khtml::RenderLayer::negZOrderList):
1507
1508 2006-01-29  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1509
1510         Test: fast/table/border-collapsing/rtl-border-collapsing.html
1511
1512         Reviewed by Darin.
1513
1514         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6888
1515           Collapsed borders appear on the wrong side or on the wrong cell in RTL tables
1516
1517         * rendering/RenderTable.cpp:
1518         (WebCore::RenderTable::cellBefore): Renamed cellLeft to this.
1519         (WebCore::RenderTable::cellAfter): Renamed cellRight to this.
1520         * rendering/RenderTable.h:
1521         * rendering/RenderTableCell.cpp:
1522         (WebCore::RenderTableCell::collapsedLeftBorder): Added the RTL case.
1523         (WebCore::RenderTableCell::collapsedRightBorder): Ditto.
1524         (WebCore::RenderTableCell::borderLeft):
1525         (WebCore::RenderTableCell::borderRight):
1526         (WebCore::RenderTableCell::collectBorders):
1527         (WebCore::RenderTableCell::paintCollapsedBorder):
1528         * rendering/RenderTableCell.h:
1529
1530 2006-01-29  Darin Adler  <darin@apple.com>
1531
1532         Reviewed by Maciej.
1533
1534         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6550
1535           REGRESSION: window.open('myurl', '_self') fails to load myurl in current window
1536
1537         Tests:
1538         * fast/dom/Window/window-open-parent-no-parent.html: Added.
1539         * fast/dom/Window/window-open-parent.html: Added.
1540         * fast/dom/Window/window-open-self.html: Added.
1541         * fast/dom/Window/window-open-top.html: Added.
1542
1543         * khtml/ecma/kjs_window.cpp: (KJS::WindowFunc::callAsFunction):
1544         Fix check for special frame names. These special frame names are supposed
1545         to always be unaffected by pop-up blocking. But the code instead was
1546         saying that the special frame names are always blocked. Oops!
1547
1548 2006-01-29  Darin Adler  <darin@apple.com>
1549
1550         Suggested by Alexey.
1551
1552         - fixed something Alexey noticed in the new exception names
1553
1554         Test: fast/dom/Range/range-exceptions.html
1555
1556         * khtml/ecma/kjs_binding.cpp: Added 0 to fix an off-by-one error for the
1557         names of the two DOM range exceptions.
1558
1559 2006-01-29  David Harrison  <harrison@apple.com>
1560
1561         Reviewed by John.
1562
1563         Fix two problems with editing around empty list items:
1564         1) Arrowing up or down to an empty list item skipped the list item
1565         2) Deleting the content of a list item made it so you could never get the cursor inside the empty item
1566
1567         Added tests:
1568         * selection/move-by-line-002.html
1569         * deleting/delete-listitem-002.html
1570         
1571         * khtml/editing/composite_edit_command.cpp:
1572         (WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded):
1573         - special check for empty list item because list marker assures non-zero height()
1574         
1575         * khtml/xml/dom_position.cpp:
1576         (DOM::Position::inRenderedContent):
1577         - fix check wrt BRs because text box is not required
1578         
1579         * rendering/bidi.cpp:
1580         (khtml::RenderBlock::constructLine):
1581         - make sure that br by itself in a list item gets a text-style box
1582         
1583         (khtml::RenderBlock::findNextLineBreak):
1584         - make sure that br by itself in a list item gets a box at all
1585
1586 2006-01-29  Eric Seidel  <eseidel@apple.com>
1587
1588         Reviewed by hyatt & darin.
1589
1590         There are a few small, but intertwined fixes in this patch:
1591
1592         Remaining fixes for SVGTetris:
1593         http://bugzilla.opendarwin.org/show_bug.cgi?id=6889
1594
1595         Testing blocked by: http://bugzilla.opendarwin.org/show_bug.cgi?id=6905
1596
1597         Fix for CDF support:
1598         http://bugzilla.opendarwin.org/show_bug.cgi?id=6025
1599
1600         Updated test: svg/custom/simpleCDF.xml
1601
1602         Fix for filter updating:
1603         http://bugzilla.opendarwin.org/show_bug.cgi?id=6849
1604
1605         Testing blocked by: http://bugzilla.opendarwin.org/show_bug.cgi?id=6904
1606
1607         Also, as a side effect of 6849, fixed double-apply of filters, improving:
1608         http://bugzilla.opendarwin.org/show_bug.cgi?id=6713
1609
1610         Results updated for most tests, pixel results improved for filter tests.
1611
1612         * kcanvas/KCanvasFilters.cpp:
1613         (KCanvasFilter::filterBBoxForItemBBox): moved into baseclass
1614         * kcanvas/KCanvasFilters.h:
1615         * kcanvas/RenderSVGImage.cpp:
1616         (RenderSVGImage::paint): use relativeBBox
1617         (RenderSVGImage::relativeBBox): added
1618         (RenderSVGImage::imageChanged): added
1619         (RenderSVGImage::getAbsoluteRepaintRect): fixed
1620         * kcanvas/RenderSVGImage.h:
1621         (KSVG::RenderSVGImage::imageChanged): added.
1622         * kcanvas/device/quartz/KCanvasFilterQuartz.h:
1623         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
1624         (KCanvasFilterQuartz::applyFilter): use new baseclass method
1625         (KCanvasFEFloodQuartz::getCIFilter): fixed.
1626         * kcanvas/device/quartz/KCanvasItemQuartz.h:
1627         * kcanvas/device/quartz/KCanvasItemQuartz.mm:
1628         (KCanvasItemQuartz::layout): update width/height
1629         (KCanvasItemQuartz::getAbsoluteRepaintRect): fixed.
1630         (KCanvasItemQuartz::requiresLayer): moved to .cpp
1631         (KCanvasItemQuartz::lineHeight): added.
1632         (KCanvasItemQuartz::baselinePosition): added.
1633         * kcanvas/device/quartz/KCanvasResourcesQuartz.h:
1634         * kcanvas/device/quartz/KCanvasResourcesQuartz.mm:
1635         (KCanvasContainerQuartz::canHaveChildren): moved to .cpp
1636         (KCanvasContainerQuartz::requiresLayer): moved to .cpp
1637         (KCanvasContainerQuartz::lineHeight): added.
1638         (KCanvasContainerQuartz::baselinePosition): added.
1639         (KCanvasContainerQuartz::paint): fixed.
1640         (KCanvasContainerQuartz::viewportTransform): fixed.
1641         (KCanvasContainerQuartz::getAbsoluteRepaintRect): fixed.
1642         (KCanvasContainerQuartz::absoluteTransform): fixed.
1643         * rendering/render_object.cpp:
1644         (WebCore::RenderObject::absoluteTransform): fixed apply order.
1645
1646 2006-01-29  Eric Seidel  <eseidel@apple.com>
1647
1648         Reviewed by hyatt.
1649
1650         First set of fixes for SVG Tetris:
1651         http://bugzilla.opendarwin.org/show_bug.cgi?id=6889
1652
1653         Tests:
1654         * svg/custom/viewport-update.svg
1655         Key press test not yet possible:
1656         http://bugzilla.opendarwin.org/show_bug.cgi?id=6906
1657
1658         * bridge/mac/MacFrame.mm:
1659         (MacFrame::keyEvent): pass key events to things other than HTML
1660         * ksvg2/svg/SVGSVGElementImpl.cpp:
1661         (WebCore::SVGSVGElementImpl::parseMappedAttribute): update viewport
1662
1663 2006-01-29  Eric Seidel  <eseidel@apple.com>
1664
1665         Reviewed by mjs.
1666
1667         Fix SVG layout tests crash due to Vector change.
1668
1669         * kcanvas/device/KRenderingDevice.cpp:
1670         (KRenderingDevice::currentContext): check isEmpty, return 0
1671
1672 2006-01-28  Eric Seidel  <eseidel@apple.com>
1673
1674         Reviewed by mjs.
1675
1676         Remove bogus IntRect operator.
1677
1678         * platform/FloatRect.h:
1679
1680 2006-01-28  David Hyatt  <hyatt@apple.com>
1681
1682         Cleanup of RenderImage.  Eliminate unneeded members and methods.
1683
1684         Reviewed by darin
1685
1686         * bridge/mac/WebCoreFrameBridge.mm:
1687         (-[WebCoreFrameBridge elementAtPoint:]):
1688         * khtml/ecma/kjs_html.cpp:
1689         (KJS::KJS::Context2DFunction::callAsFunction):
1690         (KJS::drawPattern):
1691         * khtml/html/HTMLInputElementImpl.cpp:
1692         (WebCore::HTMLInputElementImpl::attach):
1693         * khtml/html/html_imageimpl.cpp:
1694         (WebCore::HTMLImageLoader::notifyFinished):
1695         (WebCore::HTMLImageElementImpl::attach):
1696         * khtml/html/html_imageimpl.h:
1697         (WebCore::HTMLImageElementImpl::compositeOperator):
1698         * khtml/html/html_objectimpl.cpp:
1699         (WebCore::HTMLObjectElementImpl::attach):
1700         * ksvg2/svg/SVGImageElementImpl.cpp:
1701         (SVGImageElementImpl::attach):
1702         * kwq/KWQPainter.h:
1703         * kwq/KWQPainter.mm:
1704         (WebCore::QPainter::drawImageAtPoint):
1705         (WebCore::QPainter::drawImageInRect):
1706         (WebCore::QPainter::drawImage):
1707         (WebCore::QPainter::drawFloatImage):
1708         (WebCore::QPainter::drawTiledImage):
1709         (WebCore::QPainter::drawScaledAndTiledImage):
1710         * kwq/WebCoreImageRenderer.h:
1711         * loader/CachedImage.cpp:
1712         (WebCore::CachedImage::ref):
1713         (WebCore::CachedImage::notifyObservers):
1714         (WebCore::CachedImage::data):
1715         (WebCore::CachedImage::error):
1716         * loader/CachedImage.h:
1717         * loader/CachedObjectClient.h:
1718         (WebCore::CachedObjectClient::imageChanged):
1719         * platform/Image.h:
1720         (WebCore::Image::):
1721         * platform/mac/Image.mm:
1722         (WebCore::Image::Image):
1723         (WebCore::Image::resetAnimation):
1724         (WebCore::Image::operator=):
1725         (WebCore::Image::stopAnimations):
1726         (WebCore::):
1727         (WebCore::Image::compositeOperatorFromString):
1728         * rendering/render_box.cpp:
1729         (WebCore::RenderBox::paintBackgroundExtended):
1730         * rendering/render_canvasimage.cpp:
1731         (WebCore::RenderCanvasImage::paint):
1732         * rendering/render_image.cpp:
1733         (WebCore::RenderImage::RenderImage):
1734         (WebCore::RenderImage::~RenderImage):
1735         (WebCore::RenderImage::setContentObject):
1736         (WebCore::RenderImage::setCachedImage):
1737         (WebCore::RenderImage::imageChanged):
1738         (WebCore::RenderImage::resetAnimation):
1739         (WebCore::RenderImage::paint):
1740         (WebCore::RenderImage::layout):
1741         (WebCore::RenderImage::updateAltText):
1742         (WebCore::RenderImage::calcReplacedWidth):
1743         (WebCore::RenderImage::calcReplacedHeight):
1744         * rendering/render_image.h:
1745         (WebCore::RenderImage::cachedImage):
1746         (WebCore::RenderImage::image):
1747         (WebCore::RenderImage::errorOccurred):
1748         * rendering/render_list.cpp:
1749         (RenderListMarker::paint):
1750         (RenderListMarker::imageChanged):
1751         * rendering/render_list.h:
1752         * rendering/render_object.cpp:
1753         (WebCore::RenderObject::paintBorderImage):
1754         (WebCore::RenderObject::setImage):
1755         * rendering/render_object.h:
1756
1757 2006-01-28  Darin Adler  <darin@apple.com>
1758
1759         Reviewed by Eric.
1760
1761         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6711
1762           crash if an event is dispatched to a listener that uses handleEvent
1763
1764         Test: fast/events/dispatch-to-handle-event.html
1765
1766         * khtml/ecma/kjs_events.cpp: (KJS::JSAbstractEventListener::handleEvent):
1767         Remove boolean that is always false, and correct the one place that was
1768         checking it to check the correct pointer instead.
1769
1770 2006-01-28  Maciej Stachowiak  <mjs@apple.com>
1771
1772         Reviewed by Darin.
1773
1774         - remove QPtrStack, replace with Vector or traverseNextNode as appropriate
1775
1776         * WebCore.xcodeproj/project.pbxproj:
1777         * kcanvas/device/KRenderingDevice.cpp:
1778         (KRenderingDevice::currentContext):
1779         (KRenderingDevice::popContext):
1780         (KRenderingDevice::pushContext):
1781         * kcanvas/device/KRenderingDevice.h:
1782         * khtml/html/html_documentimpl.cpp:
1783         * khtml/xml/DocumentImpl.cpp:
1784         * khtml/xml/xml_tokenizer.cpp:
1785         (WebCore::XMLTokenizer::XMLTokenizer):
1786         * kwq/KWQAccObject.mm:
1787         (-[KWQAccObject addChildrenToArray:]):
1788         * kwq/KWQPainter.mm:
1789         (WebCore::QPainter::save):
1790         (WebCore::QPainter::restore):
1791         * kwq/KWQPtrStack.h: Removed.
1792         * ForwardingHeaders/qptrstack.h: Removed.
1793         * ForwardingHeaders/q3ptrstack.h: Removed.
1794
1795 2006-01-28  Maciej Stachowiak  <mjs@apple.com>
1796
1797         - added missing forwarding header to fix build.
1798         
1799         * ForwardingHeaders/kxmlcore/Vector.h: Added.
1800
1801 2006-01-28  Darin Adler  <darin@apple.com>
1802
1803         * khtml/ecma/kjs_binding.cpp: (KJS::setDOMException): Removed extra parameter
1804         to fix the build.
1805
1806 2006-01-28  Maciej Stachowiak  <mjs@apple.com>
1807
1808         Reviewed by Darin.
1809
1810         - converted KWQKURL to use Vector
1811         http://bugzilla.opendarwin.org/show_bug.cgi?id=6900
1812
1813         Use Vector in place of Array, and in place of the custom stack
1814         buffers with overflow.
1815         
1816         * kwq/KWQKURL.mm:
1817         (KURL::KURL):
1818         (KURL::decode_string):
1819         (KURL::parse):
1820         (KURL::encode_string):
1821         (findHostnamesInMailToURL):
1822         (encodeHostnames):
1823
1824 2006-01-28  Darin Adler  <darin@apple.com>
1825
1826         Reviewed by Maciej.
1827
1828         - http://bugzilla.opendarwin.org/show_bug.cgi?id=6895
1829           include exception names in JavaScript form of DOM exception
1830
1831         * khtml/ecma/kjs_binding.cpp: (KJS::setDOMException): Include the name of the
1832         exception in the error message.
1833
1834 2006-01-28  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1835
1836         Test: fast/table/add-before-anonymous-child.html
1837
1838         Reviewed by Darin.
1839
1840         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5868
1841           Crash on HP.com with ToT and Safari 2.0.2 in khtml::RenderContainer::detach()
1842
1843         * rendering/RenderTableRow.cpp:
1844         (WebCore::RenderTableRow::addChild): If beforeChild is inside an anonymous
1845         cell, insert into the cell.
1846         * rendering/RenderTableSection.cpp:
1847         (WebCore::RenderTableSection::addChild): Changed comment.
1848
1849 2006-01-28  David Hyatt  <hyatt@apple.com>
1850
1851         Eliminate the mask() method on Image.  It's unused.
1852
1853         * platform/Image.h:
1854         * platform/mac/Image.mm:
1855
1856 2006-01-28  David Hyatt  <hyatt@apple.com>
1857
1858         Clean up the Image class.  Eliminate the MIME type member variable.
1859         Eliminate an unused constructor.  Fix the constructor to take
1860         a QString rather than an NSString so that it's portable.  Rename
1861         the receivedData method to decode.  Move canRenderImageType into
1862         the Image class as a static method.
1863
1864         Reviewed by mjs
1865
1866         * khtml/html/html_objectimpl.cpp:
1867         (WebCore::HTMLObjectElementImpl::isImageType):
1868         * kwq/KWQLoader.h:
1869         * kwq/KWQLoader.mm:
1870         (KWQResponseMIMEType):
1871         * loader/CachedImage.cpp:
1872         (WebCore::CachedImage::data):
1873         * platform/Image.h:
1874         * platform/mac/Image.mm:
1875         (WebCore::Image::supportsType):
1876         (WebCore::Image::Image):
1877         (WebCore::Image::~Image):
1878         (WebCore::Image::decode):
1879         (WebCore::Image::operator=):
1880
1881 2006-01-28  Alexander Kellett  <lypanov@kde.org>
1882
1883         Reviewed by eseidel.
1884
1885         SourceAlpha does not display until window is redrawn (resized)
1886         http://bugzilla.opendarwin.org/show_bug.cgi?id=6375
1887
1888         Test: svg/custom/filter-source-alpha.svg
1889
1890         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
1891         (KCanvasFilterQuartz::inputImage):
1892
1893 2006-01-28  David Hyatt  <hyatt@apple.com>
1894
1895         Fix CachedImage.h/.cpp up.  Lots of cleanup.  Eliminated
1896         unused code and cleaned up method and member names.
1897
1898         Reviewed by darin
1899
1900         * WebCore.xcodeproj/project.pbxproj:
1901         * khtml/html/html_imageimpl.cpp:
1902         (WebCore::HTMLImageElementImpl::width):
1903         (WebCore::HTMLImageElementImpl::height):
1904         * loader/CachedImage.cpp:
1905         (WebCore::CachedImage::CachedImage):
1906         (WebCore::CachedImage::ref):
1907         (WebCore::CachedImage::deref):
1908         (WebCore::CachedImage::image):
1909         (WebCore::CachedImage::imageSize):
1910         (WebCore::CachedImage::decodedRect):
1911         (WebCore::CachedImage::notifyObservers):
1912         (WebCore::CachedImage::clear):
1913         (WebCore::CachedImage::data):
1914         (WebCore::CachedImage::error):
1915         (WebCore::CachedImage::checkNotify):
1916         * loader/CachedImage.h:
1917         (WebCore::CachedImage::isDecoded):
1918         (WebCore::CachedImage::isErrorImage):
1919         (WebCore::CachedImage::schedule):
1920         (WebCore::CachedImage::isImage):
1921         * loader/CachedImageCallback.cpp: Removed.
1922         * loader/CachedImageCallback.h: Removed.
1923         * loader/loader.cpp:
1924         (WebCore::Loader::servePendingRequests):
1925         (WebCore::Loader::slotFinished):
1926         * platform/Image.h:
1927         * platform/mac/Image.mm:
1928         (WebCore::Image::receivedData):
1929         * rendering/render_box.cpp:
1930         (WebCore::RenderBox::paintBackgroundExtended):
1931         * rendering/render_image.cpp:
1932         (WebCore::RenderImage::setImage):
1933         (WebCore::RenderImage::paint):
1934         * rendering/render_line.cpp:
1935         (WebCore::InlineFlowBox::paintBackground):
1936         (WebCore::InlineFlowBox::paintBackgroundAndBorder):
1937         * rendering/render_list.cpp:
1938         (RenderListMarker::setImage):
1939         * rendering/render_object.cpp:
1940         (WebCore::RenderObject::mustRepaintBackgroundOrBorder):
1941         (WebCore::RenderObject::paintBorder):
1942         (WebCore::RenderObject::setImage):
1943
1944 2006-01-27  Maciej Stachowiak  <mjs@apple.com>
1945
1946         Reviewed by Geoff.
1947
1948         - GC after destroying the very last frame to avoid node leak false positives
1949         http://bugzilla.opendarwin.org/show_bug.cgi?id=6884
1950
1951         * ForwardingHeaders/JSLock.h: added
1952         * page/Page.cpp:
1953         (Page::~Page): In debug mode, when destroying the last page,
1954         0 out m_mainFrame to destroy the very last frame and then garbage collect,
1955         so a GC happens at a time when the stack won't have references into the JS
1956         heap for the conservative GC to catch.
1957
1958 2006-01-27  Maciej Stachowiak  <mjs@apple.com>
1959
1960         Reviewed by Eric.
1961
1962         - remove nearly all the substance of ObjectContents and put it on Frame
1963         http://bugzilla.opendarwin.org/show_bug.cgi?id=6885
1964
1965         * ForwardingHeaders/kjs/JSLock.h: Added.
1966         * bridge/mac/MacFrame.mm:
1967         (Plugin::Plugin): renamed from KWQPluginPart, make it able to store a view.
1968         (Plugin::view): And return the QWidget* view.
1969         (MacFrame::createPart): Use Plugin instead of KWQPluginPart, avoid setWidget.
1970         (MacFrame::setView): Don't use m_url directly so much, and use through d-> if
1971         needed.
1972         (MacFrame::userAgent): ditto
1973         (MacFrame::openURLFromPageCache): ditto
1974         * kwq/KWQObject.cpp:
1975         (QObject::inherits): Removed case for ObjectContents, which is not long for this
1976         world.
1977         * kwq/KWQObject.h:
1978         * page/Frame.cpp:
1979         (Frame::init): Don't pass parent() to FramePrivate, we can't possibly have one
1980         yet.
1981         (Frame::restoreURL): d->m_url, not m_url
1982         (Frame::didOpenURL): ditto
1983         (Frame::executeScript): ditto
1984         (Frame::receivedFirstData): ditto
1985         (Frame::begin): ditto
1986         (Frame::gotoAnchor): ditto
1987         (Frame::requestObject): ditto, plus only use Frame methods when we really have a Frame.
1988         (Frame::processObjectRequest): ditto, also get view() not widget().
1989         (Frame::childFrame): remove excess spaces and pointless assert.
1990         (Frame::parentFrame): just call parent() (could probably remove this).
1991         (Frame::reparseConfiguration): d->m_url not m_url
1992         (Frame::canCachePage): ditto
1993         (Frame::updatePolicyBaseURL): ditto
1994         (Frame::scrollToAnchor): ditto
1995         (Frame::setName): set in FramePrivate
1996         (Frame::name): get from FramePrivate
1997         (Frame::setParent): similarly
1998         (Frame::parent): similarly
1999         (Frame::url): similarly
2000         * page/Frame.h:
2001         * page/FramePrivate.h:
2002         (FramePrivate::FramePrivate): Added m_parent, m_name and m_url.
2003         * page/FrameView.cpp:
2004         (FrameView::viewportMousePressEvent): Call frame directly instead of
2005         sending through QApplication.
2006         (FrameView::viewportMouseDoubleClickEvent): ditto
2007         (FrameView::viewportMouseMoveEvent): ditto
2008         (FrameView::viewportMouseReleaseEvent): ditto
2009         * page/ObjectContents.h:
2010         (ObjectContents::ObjectContents): Removed url, setParent, parent, name,
2011         setName, openURL, closeURL, widget, setWidget, event and customEvent methods,
2012         and corresponding fields. Add pure virtual view() method.
2013
2014 2006-01-27  Darin Adler  <darin@apple.com>
2015
2016         Reviewed by Adele.
2017
2018         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6075
2019           REGRESSION: event.relatedTarget not working, breaks menus at www.ati.com
2020
2021         Test: fast/events/related-target.html
2022
2023         * khtml/xml/NodeImpl.h:
2024         * khtml/xml/NodeImpl.cpp: (WebCore::NodeImpl::dispatchMouseEvent): Added a
2025         relatedTarget parameter to a couple overloads.
2026
2027         * page/FrameView.cpp:
2028         (FrameView::viewportMouseMoveEvent): Moved code to set prevMouseX/Y out of here
2029         and into dispatchMouseEvent, because it now handles mouseout and mouseover events,
2030         and that's what these globals are used for. This fixes DumpRenderTree to work
2031         properly with mouseout and mouseover (because it delivers only mouse down and up,
2032         no mouse move events).
2033         (FrameView::dispatchMouseEvent): Passed in the "other" node as the related target
2034         for mouseout and mouseover events. Also set prevMouseX/Y.
2035
2036 2006-01-27  David Hyatt  <hyatt@apple.com>
2037
2038         Fix for 6867.  Rename QPixmap to Image and move it to platform/.
2039         Eliminate QPaintDevice and QPaintDeviceMetrics completely, since
2040         they aren't necessary.
2041
2042         Reviewed by anders
2043
2044         * ForwardingHeaders/q3paintdevicemetrics.h: Removed.
2045         * ForwardingHeaders/qpaintdevice.h: Removed.
2046         * ForwardingHeaders/qpaintdevicemetrics.h: Removed.
2047         * ForwardingHeaders/qpixmap.h: Removed.
2048         * WebCore.xcodeproj/project.pbxproj:
2049         * bridge/mac/MacFrame.mm:
2050         (MacFrame::fileWrapperForElement):
2051         * bridge/mac/WebCoreFrameBridge.mm:
2052         (-[WebCoreFrameBridge reapplyStylesForDeviceType:]):
2053         (nowPrinting):
2054         (-[WebCoreFrameBridge elementAtPoint:]):
2055         * css/css_valueimpl.cpp:
2056         (WebCore::CSSPrimitiveValueImpl::computeLength):
2057         (WebCore::CSSPrimitiveValueImpl::computeLengthFloat):
2058         * css/css_valueimpl.h:
2059         * css/csshelper.cpp:
2060         * css/cssstyleselector.cpp:
2061         (WebCore::CSSStyleSelector::CSSStyleSelector):
2062         (WebCore::CSSStyleSelector::init):
2063         (WebCore::CSSStyleSelector::initForStyleResolve):
2064         (WebCore::CSSStyleSelector::styleForElement):
2065         (WebCore::CSSStyleSelector::pseudoStyleForElement):
2066         (WebCore::convertToLength):
2067         (WebCore::CSSStyleSelector::applyProperty):
2068         (WebCore::CSSStyleSelector::mapBackgroundXPosition):
2069         (WebCore::CSSStyleSelector::mapBackgroundYPosition):
2070         * css/cssstyleselector.h:
2071         * kcanvas/KCanvasFilters.h:
2072         (KCanvasFEImage::image):
2073         (KCanvasFEImage::setImage):
2074         * kcanvas/KCanvasImage.h:
2075         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
2076         (KCanvasFEImageQuartz::getCIFilter):
2077         * kcanvas/device/quartz/KCanvasResourcesQuartz.h:
2078         (KCanvasImageQuartz::init):
2079         * khtml/ecma/kjs_events.cpp:
2080         (KJS::ClipboardProtoFunc::callAsFunction):
2081         * khtml/ecma/kjs_html.cpp:
2082         (KJS::KJS::Context2DFunction::callAsFunction):
2083         (KJS::drawPattern):
2084         (KJS::_rh):
2085         (KJS::ImagePattern::createPattern):
2086         * khtml/ecma/kjs_html.h:
2087         (KJS::ImagePattern::image):
2088         * khtml/ecma/kjs_window.cpp:
2089         (KJS::Screen::getValueProperty):
2090         * khtml/editing/SelectionController.h:
2091         * khtml/html/html_imageimpl.h:
2092         (WebCore::HTMLImageElementImpl::image):
2093         * khtml/misc/helper.h:
2094         * khtml/xml/DocumentImpl.cpp:
2095         (WebCore::DocumentImpl::DocumentImpl):
2096         (WebCore::DocumentImpl::~DocumentImpl):
2097         (WebCore::DocumentImpl::recalcStyle):
2098         (WebCore::DocumentImpl::attach):
2099         (WebCore::DocumentImpl::detach):
2100         * khtml/xml/DocumentImpl.h:
2101         (WebCore::DocumentImpl::printing):
2102         (WebCore::DocumentImpl::setPrinting):
2103         * khtml/xml/dom2_eventsimpl.h:
2104         * ksvg2/css/SVGCSSStyleSelector.cpp:
2105         * ksvg2/misc/KCanvasRenderingStyle.cpp:
2106         (WebCore::KSVGPainterFactory::cssPrimitiveToLength):
2107         (WebCore::KSVGPainterFactory::strokePainter):
2108         * ksvg2/svg/SVGCursorElementImpl.cpp:
2109         (SVGCursorElementImpl::notifyFinished):
2110         * ksvg2/svg/SVGCursorElementImpl.h:
2111         (KSVG::SVGCursorElementImpl::image):
2112         * ksvg2/svg/SVGDocumentImpl.cpp:
2113         (SVGDocumentImpl::SVGDocumentImpl):
2114         * ksvg2/svg/SVGFEImageElementImpl.cpp:
2115         (SVGFEImageElementImpl::notifyFinished):
2116         * ksvg2/svg/SVGMaskElementImpl.cpp:
2117         (KSVG::SVGMaskElementImpl::drawMaskerContent):
2118         * ksvg2/svg/SVGSVGElementImpl.cpp:
2119         * kwq/KWQApplication.h:
2120         * kwq/KWQApplication.mm:
2121         (QDesktopWidget::screenDepth):
2122         * kwq/KWQClipboard.h:
2123         * kwq/KWQClipboard.mm:
2124         (WebCore::KWQClipboard::dragImage):
2125         (WebCore::KWQClipboard::setDragImage):
2126         (WebCore::KWQClipboard::setDragImageElement):
2127         * kwq/KWQComboBox.mm:
2128         * kwq/KWQCursor.h:
2129         * kwq/KWQCursor.mm:
2130         (WebCore::createCustomCursor):
2131         (WebCore::QCursor::QCursor):
2132         * kwq/KWQKPartsEvent.h:
2133         * kwq/KWQObject.h:
2134         * kwq/KWQPaintDevice.h: Removed.
2135         * kwq/KWQPaintDeviceMetrics.h: Removed.
2136         * kwq/KWQPaintDeviceMetrics.mm: Removed.
2137         * kwq/KWQPainter.h:
2138         (WebCore::QPainter::printing):
2139         * kwq/KWQPainter.mm:
2140         (WebCore::QPainter::drawImage):
2141         (WebCore::QPainter::drawFloatImage):
2142         (WebCore::QPainter::drawTiledImage):
2143         (WebCore::QPainter::drawScaledAndTiledImage):
2144         * kwq/KWQPixmap.h: Removed.
2145         * kwq/KWQPixmap.mm: Removed.
2146         * kwq/KWQPrinter.h:
2147         (QPrinter::QPrinter):
2148         * kwq/KWQWidget.h:
2149         * loader/Cache.cpp:
2150         (khtml::Cache::init):
2151         (khtml::Cache::clear):
2152         (khtml::Cache::requestImage):
2153         (khtml::Cache::getStatistics):
2154         * loader/Cache.h:
2155         * loader/CachedImage.cpp:
2156         (WebCore::CachedImage::CachedImage):
2157         (WebCore::CachedImage::ref):
2158         (WebCore::CachedImage::tiled_image):
2159         (WebCore::CachedImage::image):
2160         (WebCore::CachedImage::image_size):
2161         (WebCore::CachedImage::do_notify):
2162         (WebCore::CachedImage::data):
2163         (WebCore::CachedImage::error):
2164         * loader/CachedImage.h:
2165         * loader/CachedImageCallback.cpp:
2166         (WebCore::CachedImageCallback::notifyUpdate):
2167         (WebCore::CachedImageCallback::notifyFinished):
2168         (WebCore::CachedImageCallback::handleError):
2169         * loader/CachedObject.h:
2170         (WebCore::CachedObject::):
2171         * loader/CachedObjectClient.h:
2172         (WebCore::CachedObjectClient::setImage):
2173         * loader/DocLoader.cpp:
2174         (khtml::DocLoader::setAutoloadImages):
2175         (khtml::DocLoader::setShowAnimations):
2176         * loader/loader.cpp:
2177         (WebCore::Loader::servePendingRequests):
2178         (WebCore::Loader::slotFinished):
2179         * page/Frame.cpp:
2180         (Frame::paint):
2181         * page/Frame.h:
2182         * page/FrameView.cpp:
2183         (selectCursor):
2184         * page/FrameView.h:
2185         * platform/Image.h: Added.
2186         * platform/mac/Image.mm: Added.
2187         (WebCore::Image::loadResource):
2188         (WebCore::Image::Image):
2189         (WebCore::Image::~Image):
2190         (WebCore::Image::imageRef):
2191         (WebCore::Image::resetAnimation):
2192         (WebCore::Image::setAnimationRect):
2193         (-[WebImageCallback initWithCallback:WebCore::]):
2194         (WebCore::Image::shouldUseThreadedDecoding):
2195         (WebCore::Image::receivedData):
2196         (WebCore::Image::mask):
2197         (WebCore::Image::isNull):
2198         (WebCore::Image::size):
2199         (WebCore::Image::rect):
2200         (WebCore::Image::width):
2201         (WebCore::Image::height):
2202         (WebCore::Image::resize):
2203         (WebCore::Image::operator=):
2204         (WebCore::Image::increaseUseCount):
2205         (WebCore::Image::decreaseUseCount):
2206         (WebCore::Image::stopAnimations):
2207         (WebCore::Image::flushRasterCache):
2208         * rendering/InlineTextBox.cpp:
2209         (khtml::InlineTextBox::paint):
2210         * rendering/InlineTextBox.h:
2211         * rendering/RenderBlock.cpp:
2212         (WebCore::RenderBlock::paintChildren):
2213         (WebCore::RenderBlock::paintObject):
2214         * rendering/RenderText.h:
2215         * rendering/font.cpp:
2216         (khtml::Font::update):
2217         * rendering/font.h:
2218         * rendering/render_box.cpp:
2219         (WebCore::RenderBox::paintBackgroundExtended):
2220         * rendering/render_canvasimage.cpp:
2221         (WebCore::RenderCanvasImage::paint):
2222         * rendering/render_flow.cpp:
2223         (RenderFlow::paintLines):
2224         * rendering/render_image.cpp:
2225         (WebCore::RenderImage::RenderImage):
2226         (WebCore::RenderImage::~RenderImage):
2227         (WebCore::RenderImage::setContentObject):
2228         (WebCore::RenderImage::setImage):
2229         (WebCore::RenderImage::paint):
2230         (WebCore::RenderImage::layout):
2231         (WebCore::RenderImage::calcReplacedWidth):
2232         (WebCore::RenderImage::calcReplacedHeight):
2233         * rendering/render_image.h:
2234         (WebCore::RenderImage::image):
2235         (WebCore::RenderImage::getImage):
2236         * rendering/render_line.cpp:
2237         (WebCore::InlineFlowBox::paintBackground):
2238         (WebCore::InlineFlowBox::paintBackgroundAndBorder):
2239         * rendering/render_list.cpp:
2240         (RenderListItem::getAbsoluteRepaintRect):
2241         (RenderListMarker::paint):
2242         (RenderListMarker::setImage):
2243         (RenderListMarker::calcMinMaxWidth):
2244         * rendering/render_list.h:
2245         * rendering/render_object.cpp:
2246         (WebCore::RenderObject::mustRepaintBackgroundOrBorder):
2247         (WebCore::RenderObject::paintBorderImage):
2248         (WebCore::RenderObject::paintBorder):
2249         (WebCore::RenderObject::setImage):
2250         * rendering/render_object.h:
2251         * rendering/render_replaced.cpp:
2252         (WebCore::RenderWidget::paint):
2253         * rendering/render_replaced.h:
2254         * rendering/render_theme_mac.mm:
2255         (khtml::RenderThemeMac::setFontFromControlSize):
2256
2257 2006-01-27  Darin Adler  <darin@apple.com>
2258
2259         Reviewed by Maciej.
2260
2261         - fix another part of http://bugzilla.opendarwin.org/show_bug.cgi?id=6731
2262           REGRESSION: change event fires at load time for checked items
2263
2264         Revised test: fast/forms/radio-button-no-change-event.html
2265
2266         * khtml/html/HTMLInputElementImpl.cpp: (WebCore::HTMLInputElementImpl::setChecked):
2267         Don't send a change event for a radio button getting unchecked (matches Gecko at least).
2268
2269 2006-01-26  Eric Seidel  <eseidel@apple.com>
2270
2271         Reviewed by mjs.
2272
2273         Leak fixes in SVG code.
2274         http://bugzilla.opendarwin.org/show_bug.cgi?id=6588
2275
2276         * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
2277         (teardownShadingWithStyle): delete image and context when through.
2278         (KRenderingPaintServerGradientQuartz::KRenderingPaintServerGradientQuartz): zero out cached mask
2279         (KRenderingPaintServerGradientQuartz::~KRenderingPaintServerGradientQuartz): destroy cached mask image.
2280         (KRenderingPaintServerLinearGradientQuartz::setup): delete mask before making new
2281         (KRenderingPaintServerRadialGradientQuartz::setup): delete mask before making new
2282         * ksvg2/misc/KCanvasRenderingStyle.cpp:
2283         (WebCore::sharedSolidPaintServer): forgot "static" keyword
2284         * ksvg2/svg/SVGPolyElementImpl.cpp:
2285         (SVGPolyElementImpl::notifyAttributeChange): use RefPtr
2286
2287 2006-01-26  Maciej Stachowiak  <mjs@apple.com>
2288
2289         Reviewed by Eric.
2290
2291         - various leaks on "fast" LayoutTests
2292         
2293         http://bugzilla.opendarwin.org/show_bug.cgi?id=6819
2294         http://bugzilla.opendarwin.org/show_bug.cgi?id=6823
2295         http://bugzilla.opendarwin.org/show_bug.cgi?id=6824
2296         
2297         It turns out these all had the same cause.
2298         
2299         * page/Frame.cpp:
2300         (Frame::clear): If we have a document, make sure to cancel parsing,
2301         in case it has a tokenizer and parser that are keeping it alive. Use
2302         cancelParsing to avoid possibly accidentally firing the onload handler.
2303         * khtml/xml/DocumentImpl.cpp:
2304         (WebCore::DocumentImpl::cancelParsing): Factored out of implicitOpen.
2305         (WebCore::DocumentImpl::implicitOpen): Call cancelParsing now.
2306         * khtml/xml/DocumentImpl.h:
2307
2308 2006-01-26  Beth Dakin  <bdakin@apple.com>
2309
2310         Reviewed by Hyatt.
2311
2312         Fix for <rdar://problem/4256504> khtml::RenderBlock::skipWhitespace 
2313         crashes upon interaction with radio buttons.
2314
2315         The old code held an assumption that positioned elements would 
2316         always have line boxes. This is not necessarily the case, so this 
2317         patch makes sure that the lines are dirtied appropriately.
2318
2319         * rendering/RenderContainer.cpp:
2320         (WebCore::RenderContainer::removeChildNode): Call 
2321         dirtyLinesFromChangedChild() if oldChild is positioned and has
2322         inline children.
2323         (WebCore::RenderContainer::insertChildNode): Only check the the 
2324         child is not floating; it can be positioned.
2325
2326 2006-01-26  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2327
2328         Test: fast/dom/HTMLImageElement/image-without-renderer-width.html
2329
2330         Reviewed and landed by Anders.
2331
2332         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6841
2333           REGRESSION: WebKit (Thursday, January 26, 2006) crash in HTMLImageElementImpl::width()
2334
2335         * khtml/html/html_imageimpl.cpp:
2336         (WebCore::HTMLImageElementImpl::width): Return the image's dimensions only if it isn't
2337         null, but even if it hasn't finished loading.
2338         (WebCore::HTMLImageElementImpl::height): Ditto.
2339
2340 2006-01-26  Adele Peterson  <adele@apple.com>
2341
2342         Reviewed by Hyatt and Vicki.
2343
2344         Fix for broken layout tests.
2345
2346         * khtml/html/HTMLInputElementImpl.cpp: (WebCore::HTMLInputElementImpl::focus): 
2347
2348 2006-01-26  Anders Carlsson  <andersca@mac.com>
2349
2350         Reviewed by Eric.
2351
2352         - http://bugzilla.opendarwin.org/show_bug.cgi?id=6845
2353         Autogenerate more classes
2354         
2355         This makes DocumentType and DOMImplementation autogenerated.
2356         
2357         * JSCore.cpp: Added.
2358         
2359         * WebCore.xcodeproj/project.pbxproj:
2360         Add JSCore.cpp
2361         
2362         * bindings/scripts/CodeGeneratorJS.pm:
2363         Add attributes for controlling how null values should be converted
2364         to and from DOMString objects.
2365         
2366         * bindings/scripts/IDLParser.pm:
2367         * bindings/scripts/IDLStructure.pm:
2368         Remove the extended attributes hash on attribute objects and
2369         use the one on the signature.
2370
2371         * khtml/ecma/kjs_dom.cpp:
2372         (KJS::DOMNodeProtoFunc::callAsFunction):
2373         For isSupported, just convert the version argument to an empty string if
2374         null is passed in. The reason for this change is that the autogenerated
2375         binding for DOMImplementation::hasFeature does the same thing. This also makes
2376         us behave like Mozilla and Opera.
2377         
2378         (KJS::toDocumentType):
2379         (KJS::getDOMNode):
2380         Use JSDocumentType.
2381         
2382         (KJS::getDOMDOMImplementation):
2383         Use JSDOMImplementation.
2384         
2385         * khtml/ecma/kjs_dom.h:
2386         Remove DOMDOMImplementation and DOMDocumentType
2387         
2388         * khtml/xml/DOMImplementation.idl: Added.
2389         * khtml/xml/DocumentType.idl: Added.
2390
2391 2006-01-26  Alexander Kellett  <lypanov@kde.org>
2392
2393         Reviewed by eseidel.  Landed by eseidel.
2394
2395         <text> elements with a scale on a parent <g> breaks nodeAtPoint
2396         Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6843
2397         
2398         Test: svg/custom/text-hit-test.svg
2399
2400         * kcanvas/RenderSVGText.cpp:
2401         (RenderSVGText::nodeAtPoint):
2402
2403 2006-01-26  Maciej Stachowiak  <mjs@apple.com>
2404
2405         Reviewed by Geoff.
2406
2407         - fixed a couple hundred node leaks on the traversal layout tests
2408         http://bugzilla.opendarwin.org/show_bug.cgi?id=6828
2409
2410         There were three basic problems here, any one of which was enough
2411         to cause the leak.
2412         
2413         1) If the filter function for a NodeFilter, NodeIterator or TreeWalker
2414         had that object in scope, it would cause a GC reference cycle. I fixed
2415         this by making these JS functions get marked by the corresponding JS object,
2416         as for XMLHttpRequest.
2417         
2418         2) The TraversalImpl class that's a base class for NodeIteratorImpl and 
2419         TreeWalkerImpl did not have a virtual destructor, leading the Shared
2420         template to call the base class destructor on deref.
2421         
2422         3) ref/deref on the document were mismatched, I fixed all that sort of nonsense
2423         by using RefPtr instead of manual ref/deref.
2424         
2425         * khtml/dom/dom2_traversal.h:
2426         (DOM::NodeFilterCondition::mark): Add no-op virtual mark method, JS subclass
2427         will do something useful here.
2428         * khtml/ecma/kjs_traversal.cpp:
2429         (KJS::DOMNodeIterator::mark): Mark the DOM-level filter.
2430         (KJS::DOMNodeFilter::mark): ditto
2431         (KJS::DOMTreeWalker::mark): ditto
2432         (KJS::JSNodeFilterCondition::JSNodeFilterCondition): reformatted.
2433         (KJS::JSNodeFilterCondition::mark): Mark the filter function.
2434         * khtml/ecma/kjs_traversal.h:
2435         * khtml/xml/dom2_traversalimpl.cpp:
2436         (DOM::NodeFilterImpl::NodeFilterImpl): diligently applied RefPtr
2437         (DOM::TraversalImpl::TraversalImpl): ditto
2438         (DOM::TraversalImpl::~TraversalImpl): ditto
2439         (DOM::NodeIteratorImpl::NodeIteratorImpl): ditto
2440         (DOM::NodeIteratorImpl::~NodeIteratorImpl): ditto
2441         (DOM::NodeIteratorImpl::setReferenceNode): ditto
2442         (DOM::TreeWalkerImpl::TreeWalkerImpl): ditto
2443         (DOM::TreeWalkerImpl::setCurrentNode): ditto
2444         * khtml/xml/dom2_traversalimpl.h:
2445         (DOM::NodeFilterImpl::mark): call mark() on the codition
2446         (DOM::TraversalImpl::root): Use .get()
2447         (DOM::TraversalImpl::filter): ditto
2448         (DOM::NodeIteratorImpl::referenceNode): ditto
2449         (DOM::NodeIteratorImpl::document): ditto
2450         (DOM::TreeWalkerImpl::currentNode): ditto
2451
2452 2006-01-26  Maciej Stachowiak  <mjs@apple.com>
2453
2454         Reviewed by Geoff.
2455
2456         - fixed ~40 DOM nodes leaked when running any two of the outerHTML DOM tests (actually just a false positive)
2457         http://bugzilla.opendarwin.org/show_bug.cgi?id=6822
2458
2459         * kwq/KWQPageState.mm:
2460         (-[KWQPageState clear]): Garbage collect after deleting a bunch of
2461         stuff that holds onto JS objects. This should avoid false positive leaks
2462         and is good in any case since page state deallocation is already deferred.
2463
2464 2006-01-26  Adele Peterson  <adele@apple.com>
2465
2466         Reviewed by Vicki.
2467
2468         - fix for <rdar://problem/4422624> REGRESSION: crash loading webmail.mac.com
2469
2470         Test added:
2471         fast/forms/input-no-renderer.html
2472
2473         * khtml/html/HTMLInputElementImpl.cpp:
2474         (WebCore::HTMLInputElementImpl::focus): Nil check for renderer.
2475
2476 2006-01-26  David Harrison  <harrison@apple.com>
2477
2478         Reviewed by Timothy.
2479
2480         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6835
2481           REGRESSION: WebKit crashes when loading a script on Wikipedia
2482
2483         Test added:
2484         editing/deleting/delete-listitem-001.html
2485         
2486         * rendering/render_list.cpp:
2487         (RenderListItem::setStyle):
2488         (RenderListItem::resetMarkerValue):
2489         (RenderListItem::getAbsoluteRepaintRect):
2490         (RenderListMarker::paint):
2491
2492 2006-01-26  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2493
2494         Reviewed by Darin, landed by ap.
2495         
2496         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6388
2497           REGRESSION: Incomplete repaint when dragging the map on Google maps
2498
2499         * manual-tests/bugzilla-6388.html: Added.
2500         * rendering/render_layer.cpp:
2501         (WebCore::RenderLayer::computeRepaintRects): Cache the object's absolute position
2502         before update.
2503         (WebCore::RenderLayer::updateLayerPositions): Use the cached position to determine if
2504         the object moved. If it did, do a full repaint.
2505         * rendering/render_layer.h:
2506
2507 2006-01-26  Eric Seidel  <eseidel@apple.com>
2508
2509         Fixes xcode project to better notice when generated files change.
2510         Also fixes failing test cases on build slaves.
2511
2512         * WebCore.xcodeproj/project.pbxproj:
2513
2514 2006-01-26  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2515
2516         Reviewed by Darin, committed by ap.
2517         
2518         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6278
2519           REGRESSION: Incomplete repaint when table cell width changes during layout
2520
2521         * manual-tests/bugzilla-6278.html: Added.
2522         * rendering/RenderTableSection.cpp:
2523         (WebCore::RenderTableSection::setCellWidths): If during layout a cell changes from
2524         not needing layout to needing layout, call repaintObjectsBeforeLayout on it.
2525
2526 2006-01-26  Eric Seidel  <eseidel@apple.com>
2527
2528         Reviewed by mjs.
2529
2530         SVG shows up blank in WebKit+SVG
2531         http://bugzilla.opendarwin.org/show_bug.cgi?id=6620
2532         
2533         Test: svg/custom/viewport-no-width-height.svg
2534
2535         * css/svg.css: default to width/height 100% for <svg>
2536
2537 2006-01-26  Anders Carlsson  <andersca@mac.com>
2538
2539         Reviewed by Darin.
2540
2541         http://bugzilla.opendarwin.org/show_bug.cgi?id=6805
2542         Support constants in IDL files
2543
2544         * bindings/scripts/CodeGeneratorJS.pm:
2545         If an interface has constants, generate a constructor
2546         object and add the constants as properties. Also add a
2547         getConstructor method to the interface object.
2548         
2549         * bindings/scripts/CodeGenerator.pm:
2550         * bindings/scripts/generate-bindings.pl:
2551         Add a --force-generation flag to force regeneration of files
2552         even though nothing has changed.
2553         
2554         * khtml/ecma/kjs_events.cpp:
2555         * khtml/ecma/kjs_events.h:
2556         Remove MutationEventConstructor and DOMMutationEvent,
2557         those are autogenerated now.
2558         
2559         * bindings/js/JSEvents.cpp:
2560         Include JSMutationEvent.cpp
2561
2562         * khtml/ecma/kjs_window.cpp:        
2563         (KJS::Window::getValueProperty):
2564         * khtml/ecma/kjs_window.h:
2565         (KJS::Window::):
2566         Add MutationEvent property.
2567         
2568         * khtml/xml/MutationEvent.idl: Added.
2569
2570 2006-01-25  Alexander Kellett  <lypanov@kde.org>
2571
2572         Reviewed by eseidel.  Landed by eseidel
2573
2574         Percentage values for width, height are not rendered correctly.
2575         http://bugzilla.opendarwin.org/show_bug.cgi?id=5331
2576         
2577         Tests:
2578         * svg/custom/percentage-rect.svg
2579         * svg/custom/percentage-rect2.svg
2580
2581         Create items for even empty paths to prevent an empty render tree.
2582         Calculate the viewport element on the fly rather than caching it,
2583         unless there is no context from which to calculate it. Call 
2584         notifyAttributeChange() on layout to fix usage of viewport
2585         percentages for lengths. Remove portion of code which appears to 
2586         do nothing but worsen the situation.
2587
2588         * kcanvas/device/quartz/KCanvasItemQuartz.h:
2589         * kcanvas/device/quartz/KCanvasItemQuartz.mm:
2590         (KCanvasItemQuartz::layout):
2591         * ksvg2/svg/SVGLengthImpl.cpp:
2592         (SVGLengthImpl::value):
2593         * ksvg2/svg/SVGStyledElementImpl.cpp:
2594         (SVGStyledElementImpl::createRenderer):
2595
2596 2006-01-26  Eric Seidel  <eseidel@apple.com>
2597
2598         Reviewed by hyatt.
2599
2600         Disable <animateTransform> to stop layout test crashes.
2601         http://bugzilla.opendarwin.org/show_bug.cgi?id=6780
2602
2603         * ksvg2/misc/KSVGTimeScheduler.cpp: hack out animateTransform.
2604
2605 2006-01-26  Eric Seidel  <eseidel@apple.com>
2606
2607         Reviewed by mjs.
2608
2609         Deploy RefPtr throughout more of WebCore
2610         http://bugzilla.opendarwin.org/show_bug.cgi?id=6754
2611
2612         * bridge/mac/MacFrame.mm:
2613         (MacFrame::shouldClose): no need to call .get()
2614         * khtml/html/HTMLElementImpl.cpp:
2615         (WebCore::HTMLElementImpl::createContextualFragment):
2616         * khtml/html/HTMLSelectElementImpl.cpp:
2617         (WebCore::HTMLSelectElementImpl::remove):
2618         * khtml/html/HTMLTextAreaElementImpl.cpp:
2619         (WebCore::HTMLTextAreaElementImpl::setDefaultValue):
2620         * khtml/html/html_baseimpl.cpp:
2621         (WebCore::HTMLBodyElementImpl::HTMLBodyElementImpl):
2622         (WebCore::HTMLBodyElementImpl::~HTMLBodyElementImpl):
2623         (WebCore::HTMLBodyElementImpl::createLinkDecl):
2624         (WebCore::HTMLBodyElementImpl::parseMappedAttribute):
2625         * khtml/html/html_baseimpl.h:
2626         * khtml/html/html_headimpl.cpp:
2627         (WebCore::HTMLLinkElementImpl::HTMLLinkElementImpl):
2628         (WebCore::HTMLLinkElementImpl::~HTMLLinkElementImpl):
2629         (WebCore::HTMLLinkElementImpl::process):
2630         (WebCore::HTMLLinkElementImpl::setStyleSheet):
2631         (WebCore::HTMLLinkElementImpl::isLoading):
2632         (WebCore::HTMLStyleElementImpl::HTMLStyleElementImpl):
2633         (WebCore::HTMLStyleElementImpl::childrenChanged):
2634         (WebCore::HTMLStyleElementImpl::isLoading):
2635         * khtml/html/html_headimpl.h:
2636         (DOM::HTMLLinkElementImpl::sheet):
2637         (DOM::HTMLStyleElementImpl::sheet):
2638         * khtml/html/html_tableimpl.cpp:
2639         (WebCore::HTMLTableElementImpl::parseMappedAttribute):
2640         (WebCore::HTMLTableSectionElementImpl::insertRow):
2641         (WebCore::HTMLTableSectionElementImpl::deleteRow):
2642         (WebCore::HTMLTableRowElementImpl::deleteCell):
2643         * khtml/xml/NodeImpl.cpp:
2644         (WebCore::NodeImpl::dispatchEvent):
2645         (WebCore::NodeImpl::dispatchGenericEvent):
2646         (WebCore::NodeImpl::dispatchWindowEvent):
2647         (WebCore::NodeImpl::dispatchMouseEvent):
2648         (WebCore::NodeImpl::dispatchKeyEvent):
2649         (WebCore::NodeImpl::createRendererIfNeeded):
2650         * khtml/xml/NodeImpl.h:
2651         * khtml/xml/dom_elementimpl.cpp:
2652         (WebCore::MappedAttributeImpl::clone):
2653         (WebCore::StyledElementImpl::StyledElementImpl):
2654         (WebCore::StyledElementImpl::createInlineStyleDecl):
2655         (WebCore::StyledElementImpl::destroyInlineStyleDecl):
2656         (WebCore::StyledElementImpl::getInlineStyleDecl):
2657         * khtml/xml/dom_elementimpl.h:
2658         (DOM::MappedAttributeImpl::MappedAttributeImpl):
2659         (DOM::MappedAttributeImpl::style):
2660         (DOM::MappedAttributeImpl::decl):
2661         (DOM::MappedAttributeImpl::setDecl):
2662         (DOM::StyledElementImpl::inlineStyleDecl):
2663         * khtml/xml/dom_position.cpp:
2664         (DOM::Position::Position):
2665         (DOM::Position::clear):
2666         * khtml/xml/dom_position.h:
2667         (DOM::Position::node):
2668
2669 2006-01-25  Maciej Stachowiak  <mjs@apple.com>
2670
2671         Reviewed by Dave Hyatt.
2672         
2673         - garbage collect a bit later when destroying Frame (fixes node leak false positives)
2674         http://bugzilla.opendarwin.org/show_bug.cgi?id=6818       
2675
2676         * khtml/ecma/kjs_proxy.cpp:
2677         (WebCore::KJSProxyImpl::~KJSProxyImpl): Garbage collect after destroying
2678         the script interpreter.
2679         * page/Frame.cpp:
2680         (Frame::clear): Add a boolean parameter to indicate whether properties
2681         of the window object should also be cleared (defaults to true).
2682         (Frame::~Frame): Call clear(false) instead of clear()
2683         * page/Frame.h:
2684
2685 2006-01-25  Maciej Stachowiak  <mjs@apple.com>
2686
2687         Reviewed by Darin.
2688
2689         - Turn on NodeImpl leak counter for debug builds
2690         http://bugzilla.opendarwin.org/show_bug.cgi?id=6808
2691
2692         * khtml/xml/NodeImpl.cpp:
2693         (WebCore::NodeImplCounter::~NodeImplCounter): Uncomment node
2694         counter now tit won't give a lot of false positives.
2695
2696 2006-01-25  Maciej Stachowiak  <mjs@apple.com>
2697
2698         Reviewed by Dave Hyatt.
2699         
2700         - fixed "Whole DOM tree can leak if Document is hover/active/focus node on quit"
2701         http://bugzilla.opendarwin.org/show_bug.cgi?id=6809
2702         
2703         This fixes 175 reproducible node leaks in the editing layout tests.
2704         
2705         * khtml/xml/DocumentImpl.cpp:
2706         (WebCore::DocumentImpl::detach): Clear hover, focus and active nodes. It doesn't
2707         make sense to have these without a view anyway, and if any of them is the document
2708         it can cause a leak of the whole DOM.
2709
2710 2006-01-25  Adele Peterson  <adele@apple.com>
2711
2712         Reviewed by Maciej.
2713
2714         http://bugzilla.opendarwin.org/show_bug.cgi?id=6816
2715         Crash in dispatchMouseEvent - Missing nil check
2716
2717         No test added because I was not able to reproduce the crash reliably. 
2718
2719         * page/FrameView.cpp: (FrameView::dispatchMouseEvent):
2720
2721 2006-01-25  Justin Garcia  <justin.garcia@apple.com>
2722
2723         Reviewed by mjs
2724         
2725         <http://bugzilla.opendarwin.org/show_bug.cgi?id=6644>
2726         TinyMCE: Undo operation crashes Safari
2727         <rdar://problem/4343068>
2728         Some shouldChangeSelection calls are nonsensical
2729
2730         Notify the SelectionController of node removals,
2731         and blow away the selection when end points are removed.
2732
2733         Tests added:
2734         * editing/selection/remove-node-1.html
2735         * editing/selection/remove-node-2.html
2736         
2737         * khtml/editing/SelectionController.cpp:
2738         (WebCore::MutationListener::handleEvent):
2739         (WebCore::SelectionController::SelectionController):
2740         (WebCore::SelectionController::~SelectionController):
2741         (WebCore::SelectionController::operator=):
2742         (WebCore::SelectionController::moveTo):
2743         (WebCore::SelectionController::setSelection):
2744         (WebCore::SelectionController::nodeWillBeRemoved):
2745         (WebCore::SelectionController::clear):
2746         (WebCore::SelectionController::setBase):
2747         (WebCore::SelectionController::setExtent):
2748         * khtml/editing/SelectionController.h:
2749         (WebCore::MutationListener::MutationListener):
2750         (WebCore::MutationListener::selectionController):
2751         (WebCore::MutationListener::setSelectionController):
2752         * rendering/RenderContainer.cpp:
2753         (WebCore::RenderContainer::removeChildNode):
2754         * rendering/render_flow.cpp:
2755         (RenderFlow::destroy):
2756
2757 2006-01-25  Adele Peterson  <adele@apple.com>
2758
2759         Reviewed by Hyatt.
2760
2761         This change lets us display an aqua appearance for the new text fields.
2762
2763         Updated results for:
2764         * fast/forms/input-appearance-focus.html
2765
2766         * rendering/RenderTextField.cpp: (WebCore::RenderTextField::createDivStyle): 
2767           remove styling of the div, since RenderTheme handles that now.
2768         * rendering/render_theme.cpp:
2769         (khtml::RenderTheme::adjustStyle): call adjustTextFieldStyle.
2770         (khtml::RenderTheme::paint): call paintTextField.
2771         (khtml::RenderTheme::adjustTextFieldStyle): added FIXME to turn off appearance later.
2772         * rendering/render_theme.h: added adjustTextFieldStyle, paintTextField
2773         * rendering/render_theme_mac.h: added paintTextField, setTextFieldState, and NSTextFieldCell.
2774         * rendering/render_theme_mac.mm:
2775         (khtml::): Added static textFieldMargins.
2776         (khtml::RenderThemeMac::adjustRepaintRect): update text field state and size.
2777         (khtml::RenderThemeMac::paintTextField): Added. Paints the NSTextFieldCell
2778         (khtml::RenderThemeMac::setTextFieldCellState): Initialize NSTextFieldCell, and update enabled state.
2779
2780 2006-01-25  David Hyatt  <hyatt@apple.com>
2781
2782         Rename QBrush to Brush and move it to platform/.  Remove unused QPoint/Size/RectF forwarding
2783         headers.
2784
2785         * ForwardingHeaders/QPointF: Removed.
2786         * ForwardingHeaders/QRectF: Removed.
2787         * ForwardingHeaders/QSizeF: Removed.
2788         * WebCore.xcodeproj/project.pbxproj:
2789         * khtml/editing/SelectionController.cpp:
2790         (WebCore::SelectionController::paintCaret):
2791         * kwq/KWQBrush.h: Removed.
2792         * kwq/KWQNamespace.h:
2793         * kwq/KWQObject.h:
2794         * kwq/KWQPainter.h:
2795         * kwq/KWQPainter.mm:
2796         (QPainter::setBrush):
2797         (QPainter::brush):
2798         (QPainter::drawRect):
2799         (QPainter::drawEllipse):
2800         (QPainter::drawConvexPolygon):
2801         (QPainter::fillRect):
2802         * kwq/KWQPalette.h:
2803         (QColorGroup::brush):
2804         * platform/Brush.h: Added.
2805         (WebCore::Brush::):
2806         (WebCore::Brush::Brush::Brush):
2807         (WebCore::Brush::operator==):
2808         (WebCore::Brush::operator!=):
2809         * rendering/RenderBlock.cpp:
2810         (WebCore::RenderBlock::fillHorizontalSelectionGap):
2811         (WebCore::RenderBlock::fillVerticalSelectionGap):
2812         (WebCore::RenderBlock::fillLeftSelectionGap):
2813         (WebCore::RenderBlock::fillRightSelectionGap):
2814         * rendering/render_box.cpp:
2815         (WebCore::RenderBox::outlineBox):
2816         * rendering/render_canvasimage.cpp:
2817         (WebCore::RenderCanvasImage::paint):
2818         * rendering/render_image.cpp:
2819         (WebCore::RenderImage::paint):
2820         * rendering/render_list.cpp:
2821         (RenderListMarker::paint):
2822         * rendering/render_replaced.cpp:
2823         (WebCore::RenderWidget::paint):
2824
2825 2006-01-25  Anders Carlsson  <andersca@mac.com>
2826
2827         Reviewed by Timothy Hatcher.
2828
2829         http://bugzilla.opendarwin.org/show_bug.cgi?id=6807
2830         generate-bindings.pl should not use find command
2831         
2832         * bindings/scripts/generate-bindings.pl:
2833         Use opendir and readdir instead of find.
2834
2835 2006-01-25  David Hyatt <hyatt@apple.com
2836
2837         Fix Win32 build bustage. Make the autogeneration from .idl work
2838         just like it does on Mac.  Also update the project to account for
2839         the move of QPen.
2840
2841         * WebCore.vcproj/WebCore/WebCore.vcproj:
2842         * WebCore.vcproj/WebCore/build-generated-files.sh:
2843         * bindings/scripts/generate-bindings.pl:
2844
2845 2006-01-25  David Hyatt  <hyatt@apple.com>
2846
2847         Rename QPen to Pen and move it to the platform/ directory.
2848
2849         * ForwardingHeaders/qpen.h: Removed.
2850         * WebCore.xcodeproj/project.pbxproj:
2851         * kwq/KWQNamespace.h:
2852         (Qt::):
2853         * kwq/KWQPainter.h:
2854         * kwq/KWQPainter.mm:
2855         (QPainter::pen):
2856         (QPainter::setPen):
2857         (QPainter::drawRect):
2858         (QPainter::drawLine):
2859         (QPainter::drawEllipse):
2860         (QPainter::drawArc):
2861         (QPainter::drawConvexPolygon):
2862         * kwq/KWQPen.cpp: Removed.
2863         * kwq/KWQPen.h: Removed.
2864         * platform/Pen.cpp: Added.
2865         (WebCore::Pen::Pen):
2866         (WebCore::Pen::color):
2867         (WebCore::Pen::width):
2868         (WebCore::Pen::style):
2869         (WebCore::Pen::setColor):
2870         (WebCore::Pen::setWidth):
2871         (WebCore::Pen::setStyle):
2872         (WebCore::Pen::operator==):
2873         (WebCore::Pen::operator!=):
2874         * platform/Pen.h: Added.
2875         (WebCore::Pen::):
2876         * rendering/InlineTextBox.cpp:
2877         (khtml::InlineTextBox::paintMarkedTextUnderline):
2878         * rendering/RenderTableCell.cpp:
2879         (WebCore::outlineBox):
2880         * rendering/RenderText.cpp:
2881         * rendering/render_box.cpp:
2882         (WebCore::RenderBox::outlineBox):
2883         * rendering/render_frames.cpp:
2884         (WebCore::RenderFrameSet::userResize):
2885         * rendering/render_image.cpp:
2886         * rendering/render_line.cpp:
2887         * rendering/render_list.cpp:
2888         * rendering/render_object.cpp:
2889         (WebCore::RenderObject::drawBorder):
2890
2891 2006-01-25  Timothy Hatcher  <timothy@apple.com>
2892
2893         Move off of -[NSFont widthOfString:] since it is now deprecated.
2894         Use the NSStringDrawing -[NSString sizeWithAttributes:] API.
2895
2896         * bridge/mac/MacFrame.mm:
2897         (MacFrame::attributedString):
2898         * kwq/KWQTextArea.mm:
2899         (-[KWQTextAreaTextView sizeWithColumns:rows:]):
2900
2901 2006-01-24  Tim Omernick  <timo@apple.com>
2902
2903         Reviewed by Dave Harrison.
2904
2905         <rdar://problem/4339024>
2906         <http://bugzilla.opendarwin.org/show_bug.cgi?id=6785> "Fix for possible leak of applet, object, or embed
2907         (and plugin view)"
2908         
2909         No test cases added.  This is a fix for a leak which is difficult to trigger under normal page load
2910         circumstances, because it requires that the host application modify an <embed> using the Objective C
2911         API.
2912
2913         * khtml/html/html_objectimpl.cpp:
2914         (WebCore::HTMLAppletElementImpl::~HTMLAppletElementImpl):
2915         Assert that appletInstance has been deleted by detach().
2916         (WebCore::HTMLAppletElementImpl::detach):
2917         Delete appletInstance, because it references the widget owned by the renderer we're about to destroy.
2918         It is assumed elsewhere (getRuntimeObject(), kjs_dom.cpp) that the instance is owned by the applet
2919         element.  Therefore, it is required that the element destroy the instance in its tear-down phase.
2920         (WebCore::HTMLEmbedElementImpl::~HTMLEmbedElementImpl):
2921         Assert that embedInstance has been deleted by detach().
2922         (WebCore::HTMLEmbedElementImpl::detach):
2923         Delete embedInstance, same reason.  This is the one that fixes <rdar://problem/4339024>.
2924         (WebCore::HTMLObjectElementImpl::~HTMLObjectElementImpl):
2925         Assert that objectInstance has been deleted by detach().
2926         (WebCore::HTMLObjectElementImpl::detach):
2927         Delete embedInstance, same reason.
2928         * khtml/html/html_objectimpl.h:
2929         Declared HTMLAppletElementImpl::detach() and HTMLEmbedElementImpl::detach().
2930
2931 2006-01-24  Anders Carlsson  <andersca@mac.com>
2932
2933         Reviewed by Darin.
2934
2935         - http://bugzilla.opendarwin.org/show_bug.cgi?id=5975
2936         WebCore needs to use KDOM-like DOM binding autogeneration
2937         
2938         This is a first cut at an autogeneration framework based on 
2939         what KDOM uses, but with some changes to be able to move
2940         gradually to using autogenerated files. Currently only Javascript
2941         is supported, but ObjC support could be added by writing a new code
2942         generator package.
2943         
2944         * WebCore.xcodeproj/project.pbxproj:
2945         Call generate-bindings.pl
2946
2947         * bindings/js/JSEvents.cpp: Added.
2948         New file which #includes all generated files in the event module
2949         (Just JSWheelEvent.cpp for now)
2950         
2951         * khtml/xml/WheelEvent.idl: Added.
2952         
2953         * bindings/scripts: Added.
2954         * bindings/scripts/CodeGenerator.pm: Added.
2955         * bindings/scripts/CodeGeneratorJS.pm: Added.
2956         * bindings/scripts/IDLParser.pm: Added.
2957         * bindings/scripts/IDLStructure.pm: Added.
2958         * bindings/scripts/generate-bindings.pl: Added.
2959         
2960         * khtml/ecma/kjs_events.cpp:
2961         Remove DOMWheelEvent class.
2962         
2963         (KJS::getDOMEvent):
2964         Use JSWheelEvent here.
2965         
2966         * khtml/ecma/kjs_events.h:
2967         Remove DOMWheelEvent class.
2968
2969 2006-01-25  David Harrison  <harrison@apple.com>
2970
2971         Reviewed by Justin.
2972
2973         <rdar://problem/3907635> copy/paste of list item text moves list item up one <LI>
2974         <rdar://problem/3907647> Enhance list editing: return inserts <li></li>
2975         <rdar://problem/4060158> deleting selection within table deletes more than intended
2976         <rdar://problem/4061232> Deleting a list can delete unselected content
2977         <rdar://problem/4062212> after pasting in contents of web.apple.com, typing before start adds to table instead of before table
2978         <rdar://problem/4064437> After copy/paste from bugweb cannot go back to entering text at left side of page
2979         <rdar://problem/4259845> Table editing in design mode is broken
2980         <rdar://problem/4287667> Insertion point goes before table instead of inside first cell
2981         <rdar://problem/4345749> Editing HTML - Enter at end of <LI> inserts uneditable blank <LI>
2982         <rdar://problem/4345794> HTML editing: Enter at end of last <LI> does not add new <LI>
2983         <rdar://problem/4345825> HTML Editing: editing first <LI> element removes first <LI> and more
2984         <rdar://problem/4345835> HTML editing: editing last <LI> removes everything within <BODY>
2985         <rdar://problem/4345879> HTML editing: editing first <TD> moves data out of table
2986
2987         ...also added showTree() static functions because switch to gcc 4.0 makes calling instance methods unreliable
2988
2989         - numerous small changes to handle empty list items
2990         - fix numeric list marker updating when adding/deleting list items
2991         - start to decompose "special element" handling, replacing it with appropriate handling of the different
2992           kinds of special elements in various situations, rather than giving a blanket treatment.  I will do more
2993           of this in subsequent checkins.
2994         - numerous small editing/selection changes to handle VisiblePosition at table offset childNodeCount()
2995         - simplify and fix equivalentRangeCompliantPosition, rename it to rangeCompliantEquivalent and make it static
2996         - some minor reformatting to current standards
2997         - the comments in the list below are for changes not covered by the above comments
2998         
2999         * khtml/editing/Selection.cpp:
3000         (WebCore::Selection::toRange):
3001         (WebCore::Selection::validate):
3002         * khtml/editing/SelectionController.cpp:
3003         (WebCore::SelectionController::modifyExtendingLeftBackward):
3004         - character selection backward from after table selects the table
3005         (WebCore::showTree):
3006         * khtml/editing/composite_edit_command.cpp:
3007         (WebCore::CompositeEditCommand::removeFullySelectedNode):
3008         - make sure empty cell has some height
3009         (WebCore::CompositeEditCommand::positionOutsideTabSpan):
3010         - check for !isTabSpanTextNode() to make calling this function easier
3011         (WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded):
3012         * khtml/editing/delete_selection_command.cpp:
3013         (WebCore::positionBeforePossibleContainingSpecialElement):
3014         (WebCore::positionAfterPossibleContainingSpecialElement):
3015         (WebCore::DeleteSelectionCommand::initializeStartEnd):
3016         - new.  more consistent handling of special element boundaries.
3017         (WebCore::DeleteSelectionCommand::initializePositionData):
3018         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
3019         - handle childless block (e.g. empty table cell)
3020         - allow merging across list items
3021         (WebCore::DeleteSelectionCommand::moveNodesAfterNode):
3022         - use new isEmpty() method for renderers, to handle empty list items
3023         * khtml/editing/delete_selection_command.h:
3024         * khtml/editing/htmlediting.cpp:
3025         (WebCore::isAtomicNode):
3026         (WebCore::editingIgnoresContent):
3027         - new.  smarter check than isReplaced()
3028         (WebCore::rangeCompliantEquivalent):
3029         (WebCore::maxDeepOffset):
3030         (WebCore::isFirstVisiblePositionInSpecialElement):
3031         (WebCore::positionBeforeContainingSpecialElement):
3032         (WebCore::isLastVisiblePositionInSpecialElement):
3033         (WebCore::positionAfterContainingSpecialElement):
3034         (WebCore::positionOutsideContainingSpecialElement):
3035         (WebCore::positionBeforeNode):
3036         (WebCore::positionAfterNode):
3037         (WebCore::isListElement):
3038         (WebCore::isTableElement):
3039         (WebCore::isFirstVisiblePositionAfterTableElement):
3040         (WebCore::positionBeforePrecedingTableElement):
3041         (WebCore::positionAvoidingSpecialElementBoundary):
3042         * khtml/editing/htmlediting.h:
3043         * khtml/editing/insert_line_break_command.cpp:
3044         (khtml::InsertLineBreakCommand::doApply):
3045         * khtml/editing/insert_paragraph_separator_command.cpp:
3046         (khtml::InsertParagraphSeparatorCommand::doApply):
3047         * khtml/editing/insert_text_command.cpp:
3048         (khtml::InsertTextCommand::prepareForTextInsertion):
3049         (khtml::InsertTextCommand::input):
3050         * khtml/editing/replace_selection_command.cpp:
3051         (WebCore::isMailPasteAsQuotationNode):
3052         (WebCore::ReplacementFragment::countRenderedBlocks):
3053         (WebCore::ReplaceSelectionCommand::doApply):
3054         - allow for fact that fragments have no VisiblePositions
3055         * khtml/editing/visible_position.cpp:
3056         (khtml::VisiblePosition::isCandidate):
3057         (khtml::showTree):
3058         (khtml::makeRange):
3059         (khtml::setStart):
3060         (khtml::setEnd):
3061         * khtml/editing/visible_position.h:
3062         * khtml/editing/visible_units.cpp:
3063         (khtml::previousBoundary):
3064         (khtml::nextBoundary):
3065         (khtml::startOfLine):
3066         - allow for fact that renderers for list markers and other generated content
3067           have no corresponding NodeImpl.
3068         (khtml::endOfLine):
3069         - ditto
3070         (khtml::nextLinePosition):
3071         (khtml::startOfParagraph):
3072         (khtml::endOfParagraph):
3073         * khtml/xml/ContainerNodeImpl.cpp:
3074         (WebCore::ContainerNodeImpl::getUpperLeftCorner):
3075         (WebCore::ContainerNodeImpl::childNode):
3076         * khtml/xml/ContainerNodeImpl.h:
3077         * khtml/xml/NodeImpl.cpp:
3078         (WebCore::NodeImpl::childNode):
3079         (WebCore::NodeImpl::traversePreviousNode):
3080         (WebCore::NodeImpl::nextEditable):
3081         (WebCore::showTree):
3082         * khtml/xml/NodeImpl.h:
3083         * khtml/xml/dom_position.cpp:
3084         (DOM::Position::upstream):
3085         (DOM::Position::downstream):
3086         (DOM::Position::inRenderedContent):
3087         (DOM::showTree):
3088         * khtml/xml/dom_position.h:
3089         * rendering/render_canvas.cpp:
3090         (RenderCanvas::selectionRect):
3091         * rendering/render_list.cpp:
3092         (RenderListItem::calcListValue):
3093         (RenderListItem::isEmpty):
3094         (getParentOfFirstLineBox):
3095         (RenderListItem::resetMarkerValue):
3096         (RenderListItem::updateMarkerLocation):
3097         * rendering/render_list.h:
3098         (khtml::RenderListMarker::isListMarker):
3099         * rendering/render_object.cpp:
3100         (WebCore::RenderObject::nextRenderer):
3101         (WebCore::RenderObject::previousRenderer):
3102         (WebCore::showTree):
3103         * rendering/render_object.h:
3104         (WebCore::RenderObject::getBaselineOfLastLineBox):
3105         (WebCore::RenderObject::isEmpty):
3106
3107 2006-01-25  Timothy Hatcher  <timothy@apple.com>
3108
3109         Build fix, -[NSFont defaultLineHeightForFont] is deprecated.
3110         We need to use -[NSLayoutManager defaultLineHeightForFont:] instead.
3111
3112         * kwq/KWQLineEdit.mm:
3113         (QLineEdit::sizeForCharacterWidth):
3114         (QLineEdit::baselinePosition):
3115
3116 2006-01-24  Darin Adler  <darin@apple.com>
3117
3118         Reviewed by Adele.
3119
3120         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6731
3121           REGRESSION: change event fires at load time for checked items
3122
3123         Test: fast/forms/radio-button-no-change-event.html
3124
3125         * khtml/html/HTMLInputElementImpl.cpp: (WebCore::HTMLInputElementImpl::setChecked):
3126         One of many possible fixes: Don't send the event if the element is not yet in
3127         a document (as in when parsing the initial attributes).
3128
3129 2006-01-24  Adele Peterson  <adele@apple.com>
3130
3131         Reviewed by Hyatt.
3132
3133         This change will allow the new text field elements to get focus, and to respond to the focus and blur events.
3134
3135         Added: fast/forms/input-appearance-focus.html
3136
3137         * khtml/html/HTMLElementImpl.cpp: (WebCore::HTMLElementImpl::isFocusable): 
3138           Removed recently added code that allowed editable elements with no parent to be focusable.  
3139           We don't need to do this now that we try to focus the input element, instead of the inner div.
3140         * khtml/html/HTMLGenericFormElementImpl.cpp: (WebCore::HTMLGenericFormElementImpl::isMouseFocusable): Added case to for text fields.
3141         * khtml/html/HTMLInputElementImpl.cpp:
3142         (WebCore::HTMLInputElementImpl::focus): Added. Selects contents of text field.
3143         (WebCore::HTMLInputElementImpl::setSelectionStart): Added break; in switch statement.
3144         (WebCore::HTMLInputElementImpl::setSelectionEnd): ditto.
3145         (WebCore::HTMLInputElementImpl::select): ditto.
3146         (WebCore::HTMLInputElementImpl::setSelectionRange): ditto.
3147         * khtml/html/HTMLInputElementImpl.h: Added focus()
3148         * khtml/xml/dom_elementimpl.h: Made focus() virtual.
3149         * page/Frame.cpp: (Frame::setFocusNodeIfNeeded):
3150           Walk up the Render Tree instead of the DOM tree when trying to find a node to focus.  
3151           This will let us choose the input node instead of one of the nodes in the shadow tree.
3152         * page/FrameView.cpp: (FrameView::dispatchMouseEvent): ditto.
3153         * rendering/RenderContainer.cpp: (WebCore::RenderContainer::destroyLeftoverChildren): Corrected misspelling. 
3154         * rendering/RenderTextField.cpp:
3155         (WebCore::RenderTextField::select): Implemented.  Select contents of inner div.
3156         * rendering/RenderTextField.h:
3157         (WebCore::RenderTextField::renderName): Changed order.
3158         (WebCore::RenderTextField::removeLeftoverAnonymousBoxes): ditto.
3159
3160 2006-01-24  Darin Adler  <darin@apple.com>
3161
3162         Reviewed by Eric.
3163
3164         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6782
3165           REGRESSION: replaceChild broken when node to replace is first (TinyMCE test app broken)
3166
3167         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6784
3168           REGRESSION: 25 layout tests failing (basic DOM operations)
3169
3170         Test: fast/dom/replace-first-child.html
3171
3172         * khtml/xml/ContainerNodeImpl.cpp:
3173         (WebCore::ContainerNodeImpl::insertBefore): Change one place that hands off ownership of
3174         as PassRefPtr that causes us to almost always return 0. Fix test that would screw up when
3175         both "prev" and "refChild->previousSibling()" were 0.
3176         (WebCore::ContainerNodeImpl::appendChild): Changed a nearly-identical place handing off
3177         ownership as above.
3178
3179 2006-01-24  Maciej Stachowiak  <mjs@apple.com>
3180
3181         Reviewed by Dave Hyatt.
3182         
3183         - fixed crash if a node is removed from the DOM before being reparented due to residual style
3184         http://bugzilla.opendarwin.org/show_bug.cgi?id=6778
3185
3186         * khtml/html/htmlparser.cpp:
3187         (HTMLParser::handleResidualStyleCloseTagAcrossBlocks): If the
3188         block has been removed from the document, then do not remove it
3189         from its parent or add it to its new location. This prevents the
3190         crash and matches Mozilla.
3191
3192 2006-01-24  Darin Adler  <darin@apple.com>
3193
3194         Reviewed by John Sullivan.
3195
3196         - http://bugzilla.opendarwin.org/show_bug.cgi?id=6750
3197           replace QDateTime with a simpler platform abstraction
3198
3199         * ForwardingHeaders/qdatetime.h: Removed.
3200         * kwq/KWQDateTime.cpp: Removed.
3201         * kwq/KWQDateTime.h: Removed.
3202
3203         * platform/SystemTime.h: Added.
3204         * platform/mac/SystemTime.cpp: (WebCore::currentTime): Added.
3205         * platform/win: Added.
3206         * platform/win/SystemTime.cpp: (WebCore::currentTime): Added.
3207
3208         * WebCore.vcproj/WebCore/WebCore.vcproj: Added new files, removed old.
3209         * WebCore.xcodeproj/project.pbxproj: Ditto.
3210
3211         * css/css_base.h: Removed include of <qdatetime.h>.
3212         * css/cssstyleselector.cpp: Ditto.
3213
3214         * khtml/html/htmltokenizer.h:
3215         * khtml/html/htmltokenizer.cpp: Convert tabs to spaces.
3216         (WebCore::HTMLTokenizer::continueProcessing): Change parameter from QTime to double.
3217         Use currentTime() instead of QTime::elapsed().
3218         (WebCore::HTMLTokenizer::write): Use currentTime() instead of QTime::elapsed().
3219
3220         * config.h: Added HAVE_FUNC_USLEEP for now, not sure this is really a
3221         good way to handle this.
3222         * khtml/xml/ContainerNodeImpl.cpp: (WebCore::ContainerNodeImpl::setActive):
3223         Use currentTime() instead of QTime::elapsed(). Use HAVE_FUNC_USLEEP for the if.
3224
3225         * khtml/xml/DocumentImpl.h:
3226         * khtml/xml/DocumentImpl.cpp:
3227         (WebCore::DocumentImpl::DocumentImpl): Use currentTime() instead of QTime::elapsed().
3228         (WebCore::DocumentImpl::implicitClose): Ditto.
3229         (WebCore::DocumentImpl::minimumLayoutDelay): Ditto.
3230         (WebCore::DocumentImpl::elapsedTime): Ditto.
3231
3232         * khtml/xml/dom2_eventsimpl.cpp: (WebCore::EventImpl::EventImpl): Use currentTime()
3233         instead of local function called currentTimeStamp().
3234
3235         * khtml/xml/xml_tokenizer.h: Removed declaration of class QTime.
3236
3237         * ksvg2/misc/KSVGTimeScheduler.h:
3238         * ksvg2/misc/KSVGTimeScheduler.cpp:
3239         (KSVG::TimeScheduler::TimeScheduler): Use currentTime instead of QTime::elapsed.
3240         (KSVG::TimeScheduler::startAnimations): Ditto.
3241         (KSVG::TimeScheduler::toggleAnimations): Ditto.
3242         (KSVG::TimeScheduler::elapsed): Ditto.
3243
3244         * page/Frame.cpp: (Frame::clear): Removed unused m_parsetime.
3245         * page/FramePrivate.h: Ditto.
3246
3247 2006-01-24  David Hyatt  <hyatt@apple.com>
3248
3249         Fix for bug 6781, convert QColor to Color (and QRgb to RGBA32).  r=maciej.
3250
3251         * ForwardingHeaders/qcolor.h: Removed.
3252         * WebCore+SVG/KDOMSettings.h:
3253         * WebCore+SVG/RGBColorImpl.cpp:
3254         (RGBColorImpl::RGBColorImpl):
3255         (RGBColorImpl::red):
3256         (RGBColorImpl::green):
3257         (RGBColorImpl::blue):
3258         * WebCore+SVG/RGBColorImpl.h:
3259         * WebCore.xcodeproj/project.pbxproj:
3260         * bindings/objc/DOMCSS.mm:
3261         (getWrapperForRGB):
3262         (setWrapperForRGB):
3263         (removeWrapperForRGB):
3264         (-[DOMRGBColor dealloc]):
3265         (-[DOMRGBColor finalize]):
3266         (-[DOMRGBColor red]):
3267         (-[DOMRGBColor green]):
3268         (-[DOMRGBColor blue]):
3269         (-[DOMRGBColor _initWithRGB:]):
3270         (+[DOMRGBColor _RGBColorWithRGB:]):
3271         (-[DOMRGBColor alpha]):
3272         (-[DOMRGBColor _color]):
3273         * bridge/mac/MacFrame.mm:
3274         (MacFrame::attributedString):
3275         (MacFrame::fontAttributesForSelectionStart):
3276         (MacFrame::bodyBackgroundColor):
3277         (convertAttributesToUnderlines):
3278         * css/css_valueimpl.cpp:
3279         (WebCore::CSSPrimitiveValueImpl::CSSPrimitiveValueImpl):
3280         (WebCore::CSSPrimitiveValueImpl::cssText):
3281         * css/csshelper.h:
3282         * css/cssparser.cpp:
3283         (CSSParser::parseColor):
3284         (CSSParser::parseColorFromValue):
3285         * css/cssparser.h:
3286         * css/cssstyleselector.cpp:
3287         (WebCore::CSSStyleSelector::canShareStyleWithElement):
3288         (WebCore::):
3289         (WebCore::colorForCSSValue):
3290         (WebCore::CSSStyleSelector::applyProperty):
3291         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue):
3292         * css/cssstyleselector.h:
3293         * kcanvas/KCanvasFilters.h:
3294         (KCanvasFEDiffuseLighting::lightingColor):
3295         (KCanvasFEDiffuseLighting::setLightingColor):
3296         (KCanvasFEFlood::floodColor):
3297         (KCanvasFEFlood::setFloodColor):
3298         (KCanvasFESpecularLighting::lightingColor):
3299         (KCanvasFESpecularLighting::setLightingColor):
3300         * kcanvas/KCanvasTreeDebug.cpp:
3301         (operator<<):
3302         * kcanvas/KCanvasTreeDebug.h:
3303         * kcanvas/device/KRenderingDevice.h:
3304         * kcanvas/device/KRenderingPaintServerGradient.cpp:
3305         (KCSortedGradientStopList::addStop):
3306         * kcanvas/device/KRenderingPaintServerGradient.h:
3307         * kcanvas/device/KRenderingPaintServerSolid.cpp:
3308         (KRenderingPaintServerSolid::color):
3309         (KRenderingPaintServerSolid::setColor):
3310         * kcanvas/device/KRenderingPaintServerSolid.h:
3311         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
3312         (ciColor):
3313         * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
3314         (setupShadingWithStyle):
3315         * kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
3316         (KRenderingPaintServerPatternQuartz::setup):
3317         * khtml/ecma/kjs_css.h:
3318         * khtml/ecma/kjs_html.cpp:
3319         (KJS::KJS::Context2DFunction::callAsFunction):
3320         (KJS::colorRefFromValue):
3321         (KJS::colorFromValue):
3322         (KJS::Context2D::putValueProperty):
3323         (KJS::GradientFunction::callAsFunction):
3324         * khtml/ecma/kjs_html.h:
3325         * khtml/editing/apply_style_command.cpp:
3326         (WebCore::StyleChange::checkForLegacyHTMLStyleChange):
3327         * khtml/html/html_baseimpl.cpp:
3328         (WebCore::HTMLBodyElementImpl::parseMappedAttribute):
3329         * khtml/misc/helper.h:
3330         * khtml/xml/DocumentImpl.cpp:
3331         (WebCore::DocumentImpl::DocumentImpl):
3332         (WebCore::DocumentImpl::resetLinkColor):
3333         (WebCore::DocumentImpl::resetVisitedLinkColor):
3334         * khtml/xml/DocumentImpl.h:
3335         (WebCore::DocumentImpl::setTextColor):
3336         (WebCore::DocumentImpl::textColor):
3337         (WebCore::DocumentImpl::linkColor):
3338         (WebCore::DocumentImpl::visitedLinkColor):
3339         (WebCore::DocumentImpl::activeLinkColor):
3340         (WebCore::DocumentImpl::setLinkColor):
3341         (WebCore::DocumentImpl::setVisitedLinkColor):
3342         (WebCore::DocumentImpl::setActiveLinkColor):
3343         * ksvg2/css/SVGCSSStyleSelector.cpp:
3344         (KDOM::CSSStyleSelector::applySVGProperty):
3345         * ksvg2/css/SVGRenderStyle.h:
3346         * ksvg2/css/SVGRenderStyleDefs.h:
3347         * ksvg2/misc/KCanvasRenderingStyle.cpp:
3348         (WebCore::KSVGPainterFactory::fillPaintServer):
3349         * ksvg2/misc/KSVGTimeScheduler.cpp:
3350         (KSVG::SVGTimer::notifyAll):
3351         * ksvg2/svg/SVGAnimateColorElementImpl.cpp:
3352         (SVGAnimateColorElementImpl::handleTimerEvent):
3353         (SVGAnimateColorElementImpl::clampColor):
3354         (SVGAnimateColorElementImpl::color):
3355         (SVGAnimateColorElementImpl::initialColor):
3356         * ksvg2/svg/SVGAnimateColorElementImpl.h:
3357         * ksvg2/svg/SVGAnimateElementImpl.cpp:
3358         (SVGAnimateElementImpl::handleTimerEvent):
3359         * ksvg2/svg/SVGColorImpl.cpp:
3360         (SVGColorImpl::setRGBColor):
3361         (SVGColorImpl::color):
3362         * ksvg2/svg/SVGColorImpl.h:
3363         * ksvg2/svg/SVGGradientElementImpl.cpp:
3364         (SVGGradientElementImpl::rebuildStops):
3365         * kwq/KWQAccObject.mm:
3366         (AXAttributeStringSetStyle):
3367         * kwq/KWQBrush.h:
3368         (QBrush::QBrush::QBrush):
3369         (QBrush::color):
3370         (QBrush::setColor):
3371         * kwq/KWQColor.h: Removed.
3372         * kwq/KWQColor.mm: Removed.
3373         * kwq/KWQColorData.gperf: Removed.
3374         * kwq/KWQKConfigBase.h:
3375         * kwq/KWQKConfigBase.mm:
3376         (KConfig::readColorEntry):
3377         * kwq/KWQLineEdit.mm:
3378         (QLineEdit::setPalette):
3379         * kwq/KWQNamespace.h:
3380         (Qt::):
3381         * kwq/KWQObject.h:
3382         * kwq/KWQPainter.h:
3383         * kwq/KWQPainter.mm:
3384         (QPainter::setPen):
3385         (QPainter::setBrush):
3386         (QPainter::drawText):
3387         (QPainter::drawHighlightForText):
3388         (QPainter::selectedTextBackgroundColor):
3389         (_fillRectXX):
3390         (QPainter::setShadow):
3391         (QPainter::initFocusRing):
3392         * kwq/KWQPalette.h:
3393         (QColorGroup::QColorGroup):
3394         (QColorGroup::color):
3395         (QColorGroup::setColor):
3396         (QColorGroup::background):
3397         (QColorGroup::foreground):
3398         (QColorGroup::base):
3399         (QPalette::QPalette):
3400         (QPalette::background):
3401         (QPalette::foreground):
3402         * kwq/KWQPen.cpp:
3403         (QPen::QPen):
3404         (QPen::color):
3405         (QPen::setColor):
3406         * kwq/KWQPen.h:
3407         * kwq/KWQRenderTreeDebug.cpp:
3408         (operator<<):
3409         * kwq/KWQTextEdit.mm:
3410         (QTextEdit::setPalette):
3411         * loader/CachedImage.cpp:
3412         (WebCore::CachedImage::tiled_pixmap):
3413         * loader/CachedImage.h:
3414         * page/Frame.cpp:
3415         (Frame::paint):
3416         * page/Frame.h:
3417         (MarkedTextUnderline::MarkedTextUnderline):
3418         * platform/Color.cpp: Added.
3419         (WebCore::makeRGB):
3420         (WebCore::makeRGBA):
3421         (WebCore::parseHexColor):
3422         (WebCore::Color::Color):
3423         (WebCore::Color::name):
3424         (WebCore::Color::setNamedColor):
3425         (WebCore::Color::hsv):
3426         (WebCore::Color::setHsv):
3427         (WebCore::Color::light):
3428         (WebCore::Color::dark):
3429         (WebCore::Color::getRgbaF):
3430         * platform/Color.h: Added.
3431         (WebCore::Color::Color):
3432         (WebCore::Color::rgb):
3433         (WebCore::Color::setRgb):
3434         (WebCore::operator==):
3435         (WebCore::operator!=):
3436         * platform/ColorData.gperf: Added.
3437         * rendering/InlineTextBox.cpp:
3438         (khtml::simpleDifferenceBetweenColors):
3439         (khtml::correctedTextColor):
3440         (khtml::InlineTextBox::paint):
3441         (khtml::InlineTextBox::paintSelection):
3442         (khtml::InlineTextBox::paintMarkedTextBackground):
3443         (khtml::InlineTextBox::paintDecoration):
3444         * rendering/RenderTable.h:
3445         (WebCore::RenderTable::bgColor):
3446         * rendering/RenderTableCell.cpp:
3447         (WebCore::outlineBox):
3448         (WebCore::RenderTableCell::paintBoxDecorations):
3449         * rendering/font.cpp:
3450         (khtml::Font::drawHighlightForText):
3451         (khtml::Font::drawText):
3452         * rendering/font.h:
3453         * rendering/render_box.cpp:
3454         (WebCore::RenderBox::paintRootBoxDecorations):
3455         (WebCore::RenderBox::paintBackgrounds):
3456         (WebCore::RenderBox::paintBackground):
3457         (WebCore::RenderBox::paintBackgroundExtended):
3458         (WebCore::RenderBox::outlineBox):
3459         * rendering/render_box.h:
3460         * rendering/render_flow.cpp:
3461         (RenderFlow::paintFocusRing):
3462         (RenderFlow::paintOutlineForLine):
3463         * rendering/render_form.cpp:
3464         (RenderFieldset::paintBorderMinusLegend):
3465         * rendering/render_frames.cpp:
3466         (WebCore::RenderFrameSet::userResize):
3467         * rendering/render_image.cpp:
3468         (WebCore::RenderImage::paint):
3469         * rendering/render_layer.h:
3470         * rendering/render_line.cpp:
3471         (WebCore::InlineFlowBox::paintBackgrounds):
3472         (WebCore::InlineFlowBox::paintBackground):
3473         (WebCore::InlineFlowBox::paintBackgroundAndBorder):
3474         (WebCore::InlineFlowBox::paintDecorations):
3475         (WebCore::EllipsisBox::paint):
3476         * rendering/render_line.h:
3477         * rendering/render_list.cpp:
3478         (RenderListMarker::paint):
3479         * rendering/render_object.cpp:
3480         (WebCore::RenderObject::drawBorder):
3481         (WebCore::RenderObject::paintBorder):
3482         (WebCore::RenderObject::paintOutline):
3483         (WebCore::RenderObject::selectionColor):
3484         (WebCore::RenderObject::getTextDecorationColors):
3485         * rendering/render_object.h:
3486         (WebCore::RenderObject::paintBackgroundExtended):
3487         * rendering/render_replaced.cpp:
3488         (WebCore::RenderReplaced::selectionColor):
3489         * rendering/render_replaced.h:
3490         * rendering/render_style.h:
3491         (khtml::BorderValue::isTransparent):
3492         (khtml::CollapsedBorderValue::color):
3493         (khtml::RenderStyle::hasBackground):
3494         (khtml::RenderStyle::borderLeftColor):
3495         (khtml::RenderStyle::borderRightColor):
3496         (khtml::RenderStyle::borderTopColor):
3497         (khtml::RenderStyle::borderBottomColor):
3498         (khtml::RenderStyle::outlineColor):
3499         (khtml::RenderStyle::color):
3500         (khtml::RenderStyle::backgroundColor):
3501         (khtml::RenderStyle::setBackgroundColor):
3502         (khtml::RenderStyle::setBorderLeftColor):
3503         (khtml::RenderStyle::setBorderRightColor):
3504         (khtml::RenderStyle::setBorderTopColor):
3505         (khtml::RenderStyle::setBorderBottomColor):
3506         (khtml::RenderStyle::setOutlineColor):
3507         (khtml::RenderStyle::setColor):
3508         (khtml::RenderStyle::initialColor):
3509         * rendering/render_theme.cpp:
3510         (khtml::RenderTheme::isControlStyled):
3511         * rendering/render_theme.h:
3512
3513 2006-01-24  Darin Adler  <darin@apple.com>
3514
3515         Reviewed by John and Anders.
3516
3517         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6732
3518           REGRESSION: Repro crash at Google Maps
3519
3520         * khtml/ecma/JSXMLHttpRequest.cpp:
3521         (KJS::JSXMLHttpRequest::getValueProperty): Clean up a bit, using PassRefPtr where appropriate.
3522         (KJS::JSXMLHttpRequest::mark): Remove get calls now that getter functions don't return PassRefPtr.
3523         (KJS::JSXMLHttpRequest::JSXMLHttpRequest): Put the object into the DOM objects map.
3524         (KJS::JSXMLHttpRequest::~JSXMLHttpRequest): Remove the object from the DOM objects map. Also clear
3525         out both listeners so the implementation object isn't left with dangling pointers (since we won't
3526         be around to mark those objects any more).
3527         (KJS::JSXMLHttpRequestProtoFunc::callAsFunction): Tightened up the code a bit.
3528
3529         * xml/xmlhttprequest.h:
3530         * xml/xmlhttprequest.cpp:
3531         (WebCore::XMLHttpRequest::getResponseXML): Change to return just a plain old pointer. Remove
3532         the unnecessary typeIsXML boolean.
3533         (WebCore::XMLHttpRequest::onReadyStateChangeListener): Change to return just a plain old pointer.
3534         Update for name changes.
3535         (WebCore::XMLHttpRequest::setOnReadyStateChangeListener): Ditto.
3536         (WebCore::XMLHttpRequest::onLoadListener): Ditto.
3537         (WebCore::XMLHttpRequest::setOnLoadListener): Ditto.
3538         (WebCore::XMLHttpRequest::send): Protect the DOM wrapper if any as well as ourselves while
3539         the load is in progress.
3540         (WebCore::XMLHttpRequest::abort): Unprotect to balance out the above.
3541         (WebCore::XMLHttpRequest::slotFinished): Ditto.
3542
3543         * khtml/ecma/JSXMLHttpRequest.h: Just formatting changes.
3544
3545 2006-01-24  Darin Adler  <darin@apple.com>
3546
3547         Reviewed by Justin.
3548
3549         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6753
3550           REGRESSION (r12282-12292): Crash loading TinyMCE test app
3551
3552         * khtml/xml/ContainerNodeImpl.h: Remove some internals that don't need
3553         to be member functions.
3554         * khtml/xml/ContainerNodeImpl.cpp:
3555         (WebCore::ContainerNodeImpl::insertBefore): Improved algorithm to keep
3556         refs to more things so that we don't end up with a dangling pointer (fixes
3557         the crash) and so that we do not crash if someone modifies the tree inside
3558         a DOM mutation event handler (theoretical only at this point, needs test
3559         cases).
3560         (WebCore::ContainerNodeImpl::replaceChild): Ditto.
3561         (WebCore::willRemoveChild): Changed from member function to free function.
3562         (WebCore::ContainerNodeImpl::removeChild): Fix potential problem if the
3563         mutation event handler moves the node into a different parent.
3564         (WebCore::ContainerNodeImpl::appendChild): Made changes like those in
3565         insertBefore above.
3566         (WebCore::dispatchChildInsertionEvents): Changed from member function to
3567         free function. Tightened up handling of some edge cases.
3568         (WebCore::dispatchChildRemovalEvents): Ditto.
3569
3570 2006-01-24  Darin Adler  <darin@apple.com>
3571
3572         Reviewed by John Sullivan.
3573
3574         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6696
3575           REGRESSION: JavaScript window.opener set incorrectly
3576
3577         * khtml/ecma/kjs_window.cpp: (KJS::WindowFunc::callAsFunction):
3578         Fix local variable "frame" that was shadowing another local variable
3579         named "frame" by naming the one for the new frame "newFrame".
3580
3581 2006-01-24  Maciej Stachowiak  <mjs@apple.com>
3582
3583         - fix build
3584
3585         * ksvg2/scripts/make_names.pl: Update script to generate code that
3586         works with the new HashMap.
3587
3588 2006-01-23  Darin Adler  <darin@apple.com>
3589
3590         Reviewed by Eric.
3591
3592         - fixed a storage leak found by running run-webkit-tests fast --leak
3593
3594         * khtml/xml/dom_xmlimpl.cpp:
3595         (ProcessingInstructionImpl::checkStyleSheet): Removed bogus deref call,
3596         since the RefPtr handles it for us. Also deployed PassRefPtr in one place.
3597         (ProcessingInstructionImpl::setStyleSheet): Removed more bogus ref/deref calls.
3598
3599 2006-01-23  Maciej Stachowiak  <mjs@apple.com>
3600
3601         Rubber stamped by Eric.
3602
3603         - Made some functions return const AtomicString& instead of
3604         AtomicString because they could. 
3605         
3606         Result of Darin's and Eric's comments on the last patch.
3607
3608         * khtml/html/HTMLGenericFormElementImpl.cpp:
3609         (WebCore::HTMLGenericFormElementImpl::name):
3610         * khtml/html/HTMLGenericFormElementImpl.h:
3611         * khtml/html/HTMLInputElementImpl.cpp:
3612         (WebCore::HTMLInputElementImpl::name):
3613         * khtml/html/HTMLInputElementImpl.h:
3614
3615 2006-01-23  Maciej Stachowiak  <mjs@apple.com>
3616
3617         Reviewed by Eric.
3618
3619         - renamed PointerHash to PtrHash
3620         - made PtrHash the default hash function for int and pointer types that aren't further specialized
3621         - added an AtomicStringImpl class to make it easier and more typesafe to identity hash atomic strings
3622         - did appropriate consequent cleanup (very few places now need to declare a hash function)
3623         http://bugzilla.opendarwin.org/show_bug.cgi?id=6752
3624         
3625         * bindings/objc/DOM.mm:
3626         * bridge/mac/WebCoreFrameBridge.mm:
3627         (-[WebCoreFrameBridge elementWithName:inForm:]):
3628         * css/cssstyleselector.cpp:
3629         (WebCore::CSSRuleSet::getIDRules):
3630         (WebCore::CSSRuleSet::getClassRules):
3631         (WebCore::CSSRuleSet::getTagRules):
3632         (WebCore::CSSRuleSet::addToRuleSet):
3633         * khtml/dom/dom_string.h:
3634         (KXMLCore::):
3635         * khtml/ecma/kjs_binding.cpp:
3636         (KJS::UString::UString):
3637         * khtml/ecma/kjs_dom.cpp:
3638         (KJS::DOMNode::mark):
3639         * khtml/ecma/kjs_html.cpp:
3640         (KJS::KJS::HTMLElement::classInfo):
3641         (KJS::HTMLElement::accessors):
3642         (KJS::HTMLElement::selectSetter):
3643         (KJS::HTMLElement::inputSetter):
3644         (KJS::HTMLElement::textAreaSetter):
3645         (KJS::HTMLElement::buttonSetter):
364