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