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