447a3e00d4d0e77be23903245c1492c608d08c8d
[WebKit-https.git] / WebCore / ChangeLog
1 2006-01-27  David Harrison  <harrison@apple.com>
2
3         Reviewed by John.
4
5         Fix two problems with editing around empty list items:
6         1) Arrowing up or down to an empty list item skipped the list item
7         2) Deleting the content of a list item made it so you could never get the cursor inside the empty item
8
9         Added tests:
10         * selection/move-by-line-002.html
11         * deleting/delete-listitem-002.html
12         
13         * khtml/editing/composite_edit_command.cpp:
14         (WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded):
15         - special check for empty list item because list marker assures non-zero height()
16         
17         * khtml/xml/dom_position.cpp:
18         (DOM::Position::inRenderedContent):
19         - fix check wrt BRs because text box is not required
20         
21         * rendering/bidi.cpp:
22         (khtml::RenderBlock::constructLine):
23         - make sure that br by itself in a list item gets a text-style box
24         
25         (khtml::RenderBlock::findNextLineBreak):
26         - make sure that br by itself in a list item gets a box at all
27
28 2006-01-29  Eric Seidel  <eseidel@apple.com>
29
30         Reviewed by hyatt & darin.
31
32         There are a few small, but intertwined fixes in this patch:
33
34         Remaining fixes for SVGTetris:
35         http://bugzilla.opendarwin.org/show_bug.cgi?id=6889
36
37         Testing blocked by: http://bugzilla.opendarwin.org/show_bug.cgi?id=6905
38
39         Fix for CDF support:
40         http://bugzilla.opendarwin.org/show_bug.cgi?id=6025
41
42         Updated test: svg/custom/simpleCDF.xml
43
44         Fix for filter updating:
45         http://bugzilla.opendarwin.org/show_bug.cgi?id=6849
46
47         Testing blocked by: http://bugzilla.opendarwin.org/show_bug.cgi?id=6904
48
49         Also, as a side effect of 6849, fixed double-apply of filters, improving:
50         http://bugzilla.opendarwin.org/show_bug.cgi?id=6713
51
52         Results updated for most tests, pixel results improved for filter tests.
53
54         * kcanvas/KCanvasFilters.cpp:
55         (KCanvasFilter::filterBBoxForItemBBox): moved into baseclass
56         * kcanvas/KCanvasFilters.h:
57         * kcanvas/RenderSVGImage.cpp:
58         (RenderSVGImage::paint): use relativeBBox
59         (RenderSVGImage::relativeBBox): added
60         (RenderSVGImage::imageChanged): added
61         (RenderSVGImage::getAbsoluteRepaintRect): fixed
62         * kcanvas/RenderSVGImage.h:
63         (KSVG::RenderSVGImage::imageChanged): added.
64         * kcanvas/device/quartz/KCanvasFilterQuartz.h:
65         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
66         (KCanvasFilterQuartz::applyFilter): use new baseclass method
67         (KCanvasFEFloodQuartz::getCIFilter): fixed.
68         * kcanvas/device/quartz/KCanvasItemQuartz.h:
69         * kcanvas/device/quartz/KCanvasItemQuartz.mm:
70         (KCanvasItemQuartz::layout): update width/height
71         (KCanvasItemQuartz::getAbsoluteRepaintRect): fixed.
72         (KCanvasItemQuartz::requiresLayer): moved to .cpp
73         (KCanvasItemQuartz::lineHeight): added.
74         (KCanvasItemQuartz::baselinePosition): added.
75         * kcanvas/device/quartz/KCanvasResourcesQuartz.h:
76         * kcanvas/device/quartz/KCanvasResourcesQuartz.mm:
77         (KCanvasContainerQuartz::canHaveChildren): moved to .cpp
78         (KCanvasContainerQuartz::requiresLayer): moved to .cpp
79         (KCanvasContainerQuartz::lineHeight): added.
80         (KCanvasContainerQuartz::baselinePosition): added.
81         (KCanvasContainerQuartz::paint): fixed.
82         (KCanvasContainerQuartz::viewportTransform): fixed.
83         (KCanvasContainerQuartz::getAbsoluteRepaintRect): fixed.
84         (KCanvasContainerQuartz::absoluteTransform): fixed.
85         * rendering/render_object.cpp:
86         (WebCore::RenderObject::absoluteTransform): fixed apply order.
87
88 2006-01-29  Eric Seidel  <eseidel@apple.com>
89
90         Reviewed by hyatt.
91
92         First set of fixes for SVG Tetris:
93         http://bugzilla.opendarwin.org/show_bug.cgi?id=6889
94
95         Tests:
96         * svg/custom/viewport-update.svg
97         Key press test not yet possible:
98         http://bugzilla.opendarwin.org/show_bug.cgi?id=6906
99
100         * bridge/mac/MacFrame.mm:
101         (MacFrame::keyEvent): pass key events to things other than HTML
102         * ksvg2/svg/SVGSVGElementImpl.cpp:
103         (WebCore::SVGSVGElementImpl::parseMappedAttribute): update viewport
104
105 2006-01-29  Eric Seidel  <eseidel@apple.com>
106
107         Reviewed by mjs.
108
109         Fix SVG layout tests crash due to Vector change.
110
111         * kcanvas/device/KRenderingDevice.cpp:
112         (KRenderingDevice::currentContext): check isEmpty, return 0
113
114 2006-01-28  Eric Seidel  <eseidel@apple.com>
115
116         Reviewed by mjs.
117
118         Remove bogus IntRect operator.
119
120         * platform/FloatRect.h:
121
122 2006-01-28  David Hyatt  <hyatt@apple.com>
123
124         Cleanup of RenderImage.  Eliminate unneeded members and methods.
125
126         Reviewed by darin
127
128         * bridge/mac/WebCoreFrameBridge.mm:
129         (-[WebCoreFrameBridge elementAtPoint:]):
130         * khtml/ecma/kjs_html.cpp:
131         (KJS::KJS::Context2DFunction::callAsFunction):
132         (KJS::drawPattern):
133         * khtml/html/HTMLInputElementImpl.cpp:
134         (WebCore::HTMLInputElementImpl::attach):
135         * khtml/html/html_imageimpl.cpp:
136         (WebCore::HTMLImageLoader::notifyFinished):
137         (WebCore::HTMLImageElementImpl::attach):
138         * khtml/html/html_imageimpl.h:
139         (WebCore::HTMLImageElementImpl::compositeOperator):
140         * khtml/html/html_objectimpl.cpp:
141         (WebCore::HTMLObjectElementImpl::attach):
142         * ksvg2/svg/SVGImageElementImpl.cpp:
143         (SVGImageElementImpl::attach):
144         * kwq/KWQPainter.h:
145         * kwq/KWQPainter.mm:
146         (WebCore::QPainter::drawImageAtPoint):
147         (WebCore::QPainter::drawImageInRect):
148         (WebCore::QPainter::drawImage):
149         (WebCore::QPainter::drawFloatImage):
150         (WebCore::QPainter::drawTiledImage):
151         (WebCore::QPainter::drawScaledAndTiledImage):
152         * kwq/WebCoreImageRenderer.h:
153         * loader/CachedImage.cpp:
154         (WebCore::CachedImage::ref):
155         (WebCore::CachedImage::notifyObservers):
156         (WebCore::CachedImage::data):
157         (WebCore::CachedImage::error):
158         * loader/CachedImage.h:
159         * loader/CachedObjectClient.h:
160         (WebCore::CachedObjectClient::imageChanged):
161         * platform/Image.h:
162         (WebCore::Image::):
163         * platform/mac/Image.mm:
164         (WebCore::Image::Image):
165         (WebCore::Image::resetAnimation):
166         (WebCore::Image::operator=):
167         (WebCore::Image::stopAnimations):
168         (WebCore::):
169         (WebCore::Image::compositeOperatorFromString):
170         * rendering/render_box.cpp:
171         (WebCore::RenderBox::paintBackgroundExtended):
172         * rendering/render_canvasimage.cpp:
173         (WebCore::RenderCanvasImage::paint):
174         * rendering/render_image.cpp:
175         (WebCore::RenderImage::RenderImage):
176         (WebCore::RenderImage::~RenderImage):
177         (WebCore::RenderImage::setContentObject):
178         (WebCore::RenderImage::setCachedImage):
179         (WebCore::RenderImage::imageChanged):
180         (WebCore::RenderImage::resetAnimation):
181         (WebCore::RenderImage::paint):
182         (WebCore::RenderImage::layout):
183         (WebCore::RenderImage::updateAltText):
184         (WebCore::RenderImage::calcReplacedWidth):
185         (WebCore::RenderImage::calcReplacedHeight):
186         * rendering/render_image.h:
187         (WebCore::RenderImage::cachedImage):
188         (WebCore::RenderImage::image):
189         (WebCore::RenderImage::errorOccurred):
190         * rendering/render_list.cpp:
191         (RenderListMarker::paint):
192         (RenderListMarker::imageChanged):
193         * rendering/render_list.h:
194         * rendering/render_object.cpp:
195         (WebCore::RenderObject::paintBorderImage):
196         (WebCore::RenderObject::setImage):
197         * rendering/render_object.h:
198
199 2006-01-28  Darin Adler  <darin@apple.com>
200
201         Reviewed by Eric.
202
203         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6711
204           crash if an event is dispatched to a listener that uses handleEvent
205
206         Test: fast/events/dispatch-to-handle-event.html
207
208         * khtml/ecma/kjs_events.cpp: (KJS::JSAbstractEventListener::handleEvent):
209         Remove boolean that is always false, and correct the one place that was
210         checking it to check the correct pointer instead.
211
212 2006-01-28  Maciej Stachowiak  <mjs@apple.com>
213
214         Reviewed by Darin.
215
216         - remove QPtrStack, replace with Vector or traverseNextNode as appropriate
217
218         * WebCore.xcodeproj/project.pbxproj:
219         * kcanvas/device/KRenderingDevice.cpp:
220         (KRenderingDevice::currentContext):
221         (KRenderingDevice::popContext):
222         (KRenderingDevice::pushContext):
223         * kcanvas/device/KRenderingDevice.h:
224         * khtml/html/html_documentimpl.cpp:
225         * khtml/xml/DocumentImpl.cpp:
226         * khtml/xml/xml_tokenizer.cpp:
227         (WebCore::XMLTokenizer::XMLTokenizer):
228         * kwq/KWQAccObject.mm:
229         (-[KWQAccObject addChildrenToArray:]):
230         * kwq/KWQPainter.mm:
231         (WebCore::QPainter::save):
232         (WebCore::QPainter::restore):
233         * kwq/KWQPtrStack.h: Removed.
234         * ForwardingHeaders/qptrstack.h: Removed.
235         * ForwardingHeaders/q3ptrstack.h: Removed.
236
237 2006-01-28  Maciej Stachowiak  <mjs@apple.com>
238
239         - added missing forwarding header to fix build.
240         
241         * ForwardingHeaders/kxmlcore/Vector.h: Added.
242
243 2006-01-28  Darin Adler  <darin@apple.com>
244
245         * khtml/ecma/kjs_binding.cpp: (KJS::setDOMException): Removed extra parameter
246         to fix the build.
247
248 2006-01-28  Maciej Stachowiak  <mjs@apple.com>
249
250         Reviewed by Darin.
251
252         - converted KWQKURL to use Vector
253         http://bugzilla.opendarwin.org/show_bug.cgi?id=6900
254
255         Use Vector in place of Array, and in place of the custom stack
256         buffers with overflow.
257         
258         * kwq/KWQKURL.mm:
259         (KURL::KURL):
260         (KURL::decode_string):
261         (KURL::parse):
262         (KURL::encode_string):
263         (findHostnamesInMailToURL):
264         (encodeHostnames):
265
266 2006-01-28  Darin Adler  <darin@apple.com>
267
268         Reviewed by Maciej.
269
270         - http://bugzilla.opendarwin.org/show_bug.cgi?id=6895
271           include exception names in JavaScript form of DOM exception
272
273         * khtml/ecma/kjs_binding.cpp: (KJS::setDOMException): Include the name of the
274         exception in the error message.
275
276 2006-01-28  Mitz Pettel  <opendarwin.org@mitzpettel.com>
277
278         Test: fast/table/add-before-anonymous-child.html
279
280         Reviewed by Darin.
281
282         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5868
283           Crash on HP.com with ToT and Safari 2.0.2 in khtml::RenderContainer::detach()
284
285         * rendering/RenderTableRow.cpp:
286         (WebCore::RenderTableRow::addChild): If beforeChild is inside an anonymous
287         cell, insert into the cell.
288         * rendering/RenderTableSection.cpp:
289         (WebCore::RenderTableSection::addChild): Changed comment.
290
291 2006-01-28  David Hyatt  <hyatt@apple.com>
292
293         Eliminate the mask() method on Image.  It's unused.
294
295         * platform/Image.h:
296         * platform/mac/Image.mm:
297
298 2006-01-28  David Hyatt  <hyatt@apple.com>
299
300         Clean up the Image class.  Eliminate the MIME type member variable.
301         Eliminate an unused constructor.  Fix the constructor to take
302         a QString rather than an NSString so that it's portable.  Rename
303         the receivedData method to decode.  Move canRenderImageType into
304         the Image class as a static method.
305
306         Reviewed by mjs
307
308         * khtml/html/html_objectimpl.cpp:
309         (WebCore::HTMLObjectElementImpl::isImageType):
310         * kwq/KWQLoader.h:
311         * kwq/KWQLoader.mm:
312         (KWQResponseMIMEType):
313         * loader/CachedImage.cpp:
314         (WebCore::CachedImage::data):
315         * platform/Image.h:
316         * platform/mac/Image.mm:
317         (WebCore::Image::supportsType):
318         (WebCore::Image::Image):
319         (WebCore::Image::~Image):
320         (WebCore::Image::decode):
321         (WebCore::Image::operator=):
322
323 2006-01-28  Alexander Kellett  <lypanov@kde.org>
324
325         Reviewed by eseidel.
326
327         SourceAlpha does not display until window is redrawn (resized)
328         http://bugzilla.opendarwin.org/show_bug.cgi?id=6375
329
330         Test: svg/custom/filter-source-alpha.svg
331
332         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
333         (KCanvasFilterQuartz::inputImage):
334
335 2006-01-28  David Hyatt  <hyatt@apple.com>
336
337         Fix CachedImage.h/.cpp up.  Lots of cleanup.  Eliminated
338         unused code and cleaned up method and member names.
339
340         Reviewed by darin
341
342         * WebCore.xcodeproj/project.pbxproj:
343         * khtml/html/html_imageimpl.cpp:
344         (WebCore::HTMLImageElementImpl::width):
345         (WebCore::HTMLImageElementImpl::height):
346         * loader/CachedImage.cpp:
347         (WebCore::CachedImage::CachedImage):
348         (WebCore::CachedImage::ref):
349         (WebCore::CachedImage::deref):
350         (WebCore::CachedImage::image):
351         (WebCore::CachedImage::imageSize):
352         (WebCore::CachedImage::decodedRect):
353         (WebCore::CachedImage::notifyObservers):
354         (WebCore::CachedImage::clear):
355         (WebCore::CachedImage::data):
356         (WebCore::CachedImage::error):
357         (WebCore::CachedImage::checkNotify):
358         * loader/CachedImage.h:
359         (WebCore::CachedImage::isDecoded):
360         (WebCore::CachedImage::isErrorImage):
361         (WebCore::CachedImage::schedule):
362         (WebCore::CachedImage::isImage):
363         * loader/CachedImageCallback.cpp: Removed.
364         * loader/CachedImageCallback.h: Removed.
365         * loader/loader.cpp:
366         (WebCore::Loader::servePendingRequests):
367         (WebCore::Loader::slotFinished):
368         * platform/Image.h:
369         * platform/mac/Image.mm:
370         (WebCore::Image::receivedData):
371         * rendering/render_box.cpp:
372         (WebCore::RenderBox::paintBackgroundExtended):
373         * rendering/render_image.cpp:
374         (WebCore::RenderImage::setImage):
375         (WebCore::RenderImage::paint):
376         * rendering/render_line.cpp:
377         (WebCore::InlineFlowBox::paintBackground):
378         (WebCore::InlineFlowBox::paintBackgroundAndBorder):
379         * rendering/render_list.cpp:
380         (RenderListMarker::setImage):
381         * rendering/render_object.cpp:
382         (WebCore::RenderObject::mustRepaintBackgroundOrBorder):
383         (WebCore::RenderObject::paintBorder):
384         (WebCore::RenderObject::setImage):
385
386 2006-01-27  Maciej Stachowiak  <mjs@apple.com>
387
388         Reviewed by Geoff.
389
390         - GC after destroying the very last frame to avoid node leak false positives
391         http://bugzilla.opendarwin.org/show_bug.cgi?id=6884
392
393         * ForwardingHeaders/JSLock.h: added
394         * page/Page.cpp:
395         (Page::~Page): In debug mode, when destroying the last page,
396         0 out m_mainFrame to destroy the very last frame and then garbage collect,
397         so a GC happens at a time when the stack won't have references into the JS
398         heap for the conservative GC to catch.
399
400 2006-01-27  Maciej Stachowiak  <mjs@apple.com>
401
402         Reviewed by Eric.
403
404         - remove nearly all the substance of ObjectContents and put it on Frame
405         http://bugzilla.opendarwin.org/show_bug.cgi?id=6885
406
407         * ForwardingHeaders/kjs/JSLock.h: Added.
408         * bridge/mac/MacFrame.mm:
409         (Plugin::Plugin): renamed from KWQPluginPart, make it able to store a view.
410         (Plugin::view): And return the QWidget* view.
411         (MacFrame::createPart): Use Plugin instead of KWQPluginPart, avoid setWidget.
412         (MacFrame::setView): Don't use m_url directly so much, and use through d-> if
413         needed.
414         (MacFrame::userAgent): ditto
415         (MacFrame::openURLFromPageCache): ditto
416         * kwq/KWQObject.cpp:
417         (QObject::inherits): Removed case for ObjectContents, which is not long for this
418         world.
419         * kwq/KWQObject.h:
420         * page/Frame.cpp:
421         (Frame::init): Don't pass parent() to FramePrivate, we can't possibly have one
422         yet.
423         (Frame::restoreURL): d->m_url, not m_url
424         (Frame::didOpenURL): ditto
425         (Frame::executeScript): ditto
426         (Frame::receivedFirstData): ditto
427         (Frame::begin): ditto
428         (Frame::gotoAnchor): ditto
429         (Frame::requestObject): ditto, plus only use Frame methods when we really have a Frame.
430         (Frame::processObjectRequest): ditto, also get view() not widget().
431         (Frame::childFrame): remove excess spaces and pointless assert.
432         (Frame::parentFrame): just call parent() (could probably remove this).
433         (Frame::reparseConfiguration): d->m_url not m_url
434         (Frame::canCachePage): ditto
435         (Frame::updatePolicyBaseURL): ditto
436         (Frame::scrollToAnchor): ditto
437         (Frame::setName): set in FramePrivate
438         (Frame::name): get from FramePrivate
439         (Frame::setParent): similarly
440         (Frame::parent): similarly
441         (Frame::url): similarly
442         * page/Frame.h:
443         * page/FramePrivate.h:
444         (FramePrivate::FramePrivate): Added m_parent, m_name and m_url.
445         * page/FrameView.cpp:
446         (FrameView::viewportMousePressEvent): Call frame directly instead of
447         sending through QApplication.
448         (FrameView::viewportMouseDoubleClickEvent): ditto
449         (FrameView::viewportMouseMoveEvent): ditto
450         (FrameView::viewportMouseReleaseEvent): ditto
451         * page/ObjectContents.h:
452         (ObjectContents::ObjectContents): Removed url, setParent, parent, name,
453         setName, openURL, closeURL, widget, setWidget, event and customEvent methods,
454         and corresponding fields. Add pure virtual view() method.
455
456 2006-01-27  Darin Adler  <darin@apple.com>
457
458         Reviewed by Adele.
459
460         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6075
461           REGRESSION: event.relatedTarget not working, breaks menus at www.ati.com
462
463         Test: fast/events/related-target.html
464
465         * khtml/xml/NodeImpl.h:
466         * khtml/xml/NodeImpl.cpp: (WebCore::NodeImpl::dispatchMouseEvent): Added a
467         relatedTarget parameter to a couple overloads.
468
469         * page/FrameView.cpp:
470         (FrameView::viewportMouseMoveEvent): Moved code to set prevMouseX/Y out of here
471         and into dispatchMouseEvent, because it now handles mouseout and mouseover events,
472         and that's what these globals are used for. This fixes DumpRenderTree to work
473         properly with mouseout and mouseover (because it delivers only mouse down and up,
474         no mouse move events).
475         (FrameView::dispatchMouseEvent): Passed in the "other" node as the related target
476         for mouseout and mouseover events. Also set prevMouseX/Y.
477
478 2006-01-27  David Hyatt  <hyatt@apple.com>
479
480         Fix for 6867.  Rename QPixmap to Image and move it to platform/.
481         Eliminate QPaintDevice and QPaintDeviceMetrics completely, since
482         they aren't necessary.
483
484         Reviewed by anders
485
486         * ForwardingHeaders/q3paintdevicemetrics.h: Removed.
487         * ForwardingHeaders/qpaintdevice.h: Removed.
488         * ForwardingHeaders/qpaintdevicemetrics.h: Removed.
489         * ForwardingHeaders/qpixmap.h: Removed.
490         * WebCore.xcodeproj/project.pbxproj:
491         * bridge/mac/MacFrame.mm:
492         (MacFrame::fileWrapperForElement):
493         * bridge/mac/WebCoreFrameBridge.mm:
494         (-[WebCoreFrameBridge reapplyStylesForDeviceType:]):
495         (nowPrinting):
496         (-[WebCoreFrameBridge elementAtPoint:]):
497         * css/css_valueimpl.cpp:
498         (WebCore::CSSPrimitiveValueImpl::computeLength):
499         (WebCore::CSSPrimitiveValueImpl::computeLengthFloat):
500         * css/css_valueimpl.h:
501         * css/csshelper.cpp:
502         * css/cssstyleselector.cpp:
503         (WebCore::CSSStyleSelector::CSSStyleSelector):
504         (WebCore::CSSStyleSelector::init):
505         (WebCore::CSSStyleSelector::initForStyleResolve):
506         (WebCore::CSSStyleSelector::styleForElement):
507         (WebCore::CSSStyleSelector::pseudoStyleForElement):
508         (WebCore::convertToLength):
509         (WebCore::CSSStyleSelector::applyProperty):
510         (WebCore::CSSStyleSelector::mapBackgroundXPosition):
511         (WebCore::CSSStyleSelector::mapBackgroundYPosition):
512         * css/cssstyleselector.h:
513         * kcanvas/KCanvasFilters.h:
514         (KCanvasFEImage::image):
515         (KCanvasFEImage::setImage):
516         * kcanvas/KCanvasImage.h:
517         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
518         (KCanvasFEImageQuartz::getCIFilter):
519         * kcanvas/device/quartz/KCanvasResourcesQuartz.h:
520         (KCanvasImageQuartz::init):
521         * khtml/ecma/kjs_events.cpp:
522         (KJS::ClipboardProtoFunc::callAsFunction):
523         * khtml/ecma/kjs_html.cpp:
524         (KJS::KJS::Context2DFunction::callAsFunction):
525         (KJS::drawPattern):
526         (KJS::_rh):
527         (KJS::ImagePattern::createPattern):
528         * khtml/ecma/kjs_html.h:
529         (KJS::ImagePattern::image):
530         * khtml/ecma/kjs_window.cpp:
531         (KJS::Screen::getValueProperty):
532         * khtml/editing/SelectionController.h:
533         * khtml/html/html_imageimpl.h:
534         (WebCore::HTMLImageElementImpl::image):
535         * khtml/misc/helper.h:
536         * khtml/xml/DocumentImpl.cpp:
537         (WebCore::DocumentImpl::DocumentImpl):
538         (WebCore::DocumentImpl::~DocumentImpl):
539         (WebCore::DocumentImpl::recalcStyle):
540         (WebCore::DocumentImpl::attach):
541         (WebCore::DocumentImpl::detach):
542         * khtml/xml/DocumentImpl.h:
543         (WebCore::DocumentImpl::printing):
544         (WebCore::DocumentImpl::setPrinting):
545         * khtml/xml/dom2_eventsimpl.h:
546         * ksvg2/css/SVGCSSStyleSelector.cpp:
547         * ksvg2/misc/KCanvasRenderingStyle.cpp:
548         (WebCore::KSVGPainterFactory::cssPrimitiveToLength):
549         (WebCore::KSVGPainterFactory::strokePainter):
550         * ksvg2/svg/SVGCursorElementImpl.cpp:
551         (SVGCursorElementImpl::notifyFinished):
552         * ksvg2/svg/SVGCursorElementImpl.h:
553         (KSVG::SVGCursorElementImpl::image):
554         * ksvg2/svg/SVGDocumentImpl.cpp:
555         (SVGDocumentImpl::SVGDocumentImpl):
556         * ksvg2/svg/SVGFEImageElementImpl.cpp:
557         (SVGFEImageElementImpl::notifyFinished):
558         * ksvg2/svg/SVGMaskElementImpl.cpp:
559         (KSVG::SVGMaskElementImpl::drawMaskerContent):
560         * ksvg2/svg/SVGSVGElementImpl.cpp:
561         * kwq/KWQApplication.h:
562         * kwq/KWQApplication.mm:
563         (QDesktopWidget::screenDepth):
564         * kwq/KWQClipboard.h:
565         * kwq/KWQClipboard.mm:
566         (WebCore::KWQClipboard::dragImage):
567         (WebCore::KWQClipboard::setDragImage):
568         (WebCore::KWQClipboard::setDragImageElement):
569         * kwq/KWQComboBox.mm:
570         * kwq/KWQCursor.h:
571         * kwq/KWQCursor.mm:
572         (WebCore::createCustomCursor):
573         (WebCore::QCursor::QCursor):
574         * kwq/KWQKPartsEvent.h:
575         * kwq/KWQObject.h:
576         * kwq/KWQPaintDevice.h: Removed.
577         * kwq/KWQPaintDeviceMetrics.h: Removed.
578         * kwq/KWQPaintDeviceMetrics.mm: Removed.
579         * kwq/KWQPainter.h:
580         (WebCore::QPainter::printing):
581         * kwq/KWQPainter.mm:
582         (WebCore::QPainter::drawImage):
583         (WebCore::QPainter::drawFloatImage):
584         (WebCore::QPainter::drawTiledImage):
585         (WebCore::QPainter::drawScaledAndTiledImage):
586         * kwq/KWQPixmap.h: Removed.
587         * kwq/KWQPixmap.mm: Removed.
588         * kwq/KWQPrinter.h:
589         (QPrinter::QPrinter):
590         * kwq/KWQWidget.h:
591         * loader/Cache.cpp:
592         (khtml::Cache::init):
593         (khtml::Cache::clear):
594         (khtml::Cache::requestImage):
595         (khtml::Cache::getStatistics):
596         * loader/Cache.h:
597         * loader/CachedImage.cpp:
598         (WebCore::CachedImage::CachedImage):
599         (WebCore::CachedImage::ref):
600         (WebCore::CachedImage::tiled_image):
601         (WebCore::CachedImage::image):
602         (WebCore::CachedImage::image_size):
603         (WebCore::CachedImage::do_notify):
604         (WebCore::CachedImage::data):
605         (WebCore::CachedImage::error):
606         * loader/CachedImage.h:
607         * loader/CachedImageCallback.cpp:
608         (WebCore::CachedImageCallback::notifyUpdate):
609         (WebCore::CachedImageCallback::notifyFinished):
610         (WebCore::CachedImageCallback::handleError):
611         * loader/CachedObject.h:
612         (WebCore::CachedObject::):
613         * loader/CachedObjectClient.h:
614         (WebCore::CachedObjectClient::setImage):
615         * loader/DocLoader.cpp:
616         (khtml::DocLoader::setAutoloadImages):
617         (khtml::DocLoader::setShowAnimations):
618         * loader/loader.cpp:
619         (WebCore::Loader::servePendingRequests):
620         (WebCore::Loader::slotFinished):
621         * page/Frame.cpp:
622         (Frame::paint):
623         * page/Frame.h:
624         * page/FrameView.cpp:
625         (selectCursor):
626         * page/FrameView.h:
627         * platform/Image.h: Added.
628         * platform/mac/Image.mm: Added.
629         (WebCore::Image::loadResource):
630         (WebCore::Image::Image):
631         (WebCore::Image::~Image):
632         (WebCore::Image::imageRef):
633         (WebCore::Image::resetAnimation):
634         (WebCore::Image::setAnimationRect):
635         (-[WebImageCallback initWithCallback:WebCore::]):
636         (WebCore::Image::shouldUseThreadedDecoding):
637         (WebCore::Image::receivedData):
638         (WebCore::Image::mask):
639         (WebCore::Image::isNull):
640         (WebCore::Image::size):
641         (WebCore::Image::rect):
642         (WebCore::Image::width):
643         (WebCore::Image::height):
644         (WebCore::Image::resize):
645         (WebCore::Image::operator=):
646         (WebCore::Image::increaseUseCount):
647         (WebCore::Image::decreaseUseCount):
648         (WebCore::Image::stopAnimations):
649         (WebCore::Image::flushRasterCache):
650         * rendering/InlineTextBox.cpp:
651         (khtml::InlineTextBox::paint):
652         * rendering/InlineTextBox.h:
653         * rendering/RenderBlock.cpp:
654         (WebCore::RenderBlock::paintChildren):
655         (WebCore::RenderBlock::paintObject):
656         * rendering/RenderText.h:
657         * rendering/font.cpp:
658         (khtml::Font::update):
659         * rendering/font.h:
660         * rendering/render_box.cpp:
661         (WebCore::RenderBox::paintBackgroundExtended):
662         * rendering/render_canvasimage.cpp:
663         (WebCore::RenderCanvasImage::paint):
664         * rendering/render_flow.cpp:
665         (RenderFlow::paintLines):
666         * rendering/render_image.cpp:
667         (WebCore::RenderImage::RenderImage):
668         (WebCore::RenderImage::~RenderImage):
669         (WebCore::RenderImage::setContentObject):
670         (WebCore::RenderImage::setImage):
671         (WebCore::RenderImage::paint):
672         (WebCore::RenderImage::layout):
673         (WebCore::RenderImage::calcReplacedWidth):
674         (WebCore::RenderImage::calcReplacedHeight):
675         * rendering/render_image.h:
676         (WebCore::RenderImage::image):
677         (WebCore::RenderImage::getImage):
678         * rendering/render_line.cpp:
679         (WebCore::InlineFlowBox::paintBackground):
680         (WebCore::InlineFlowBox::paintBackgroundAndBorder):
681         * rendering/render_list.cpp:
682         (RenderListItem::getAbsoluteRepaintRect):
683         (RenderListMarker::paint):
684         (RenderListMarker::setImage):
685         (RenderListMarker::calcMinMaxWidth):
686         * rendering/render_list.h:
687         * rendering/render_object.cpp:
688         (WebCore::RenderObject::mustRepaintBackgroundOrBorder):
689         (WebCore::RenderObject::paintBorderImage):
690         (WebCore::RenderObject::paintBorder):
691         (WebCore::RenderObject::setImage):
692         * rendering/render_object.h:
693         * rendering/render_replaced.cpp:
694         (WebCore::RenderWidget::paint):
695         * rendering/render_replaced.h:
696         * rendering/render_theme_mac.mm:
697         (khtml::RenderThemeMac::setFontFromControlSize):
698
699 2006-01-27  Darin Adler  <darin@apple.com>
700
701         Reviewed by Maciej.
702
703         - fix another part of http://bugzilla.opendarwin.org/show_bug.cgi?id=6731
704           REGRESSION: change event fires at load time for checked items
705
706         Revised test: fast/forms/radio-button-no-change-event.html
707
708         * khtml/html/HTMLInputElementImpl.cpp: (WebCore::HTMLInputElementImpl::setChecked):
709         Don't send a change event for a radio button getting unchecked (matches Gecko at least).
710
711 2006-01-26  Eric Seidel  <eseidel@apple.com>
712
713         Reviewed by mjs.
714
715         Leak fixes in SVG code.
716         http://bugzilla.opendarwin.org/show_bug.cgi?id=6588
717
718         * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
719         (teardownShadingWithStyle): delete image and context when through.
720         (KRenderingPaintServerGradientQuartz::KRenderingPaintServerGradientQuartz): zero out cached mask
721         (KRenderingPaintServerGradientQuartz::~KRenderingPaintServerGradientQuartz): destroy cached mask image.
722         (KRenderingPaintServerLinearGradientQuartz::setup): delete mask before making new
723         (KRenderingPaintServerRadialGradientQuartz::setup): delete mask before making new
724         * ksvg2/misc/KCanvasRenderingStyle.cpp:
725         (WebCore::sharedSolidPaintServer): forgot "static" keyword
726         * ksvg2/svg/SVGPolyElementImpl.cpp:
727         (SVGPolyElementImpl::notifyAttributeChange): use RefPtr
728
729 2006-01-26  Maciej Stachowiak  <mjs@apple.com>
730
731         Reviewed by Eric.
732
733         - various leaks on "fast" LayoutTests
734         
735         http://bugzilla.opendarwin.org/show_bug.cgi?id=6819
736         http://bugzilla.opendarwin.org/show_bug.cgi?id=6823
737         http://bugzilla.opendarwin.org/show_bug.cgi?id=6824
738         
739         It turns out these all had the same cause.
740         
741         * page/Frame.cpp:
742         (Frame::clear): If we have a document, make sure to cancel parsing,
743         in case it has a tokenizer and parser that are keeping it alive. Use
744         cancelParsing to avoid possibly accidentally firing the onload handler.
745         * khtml/xml/DocumentImpl.cpp:
746         (WebCore::DocumentImpl::cancelParsing): Factored out of implicitOpen.
747         (WebCore::DocumentImpl::implicitOpen): Call cancelParsing now.
748         * khtml/xml/DocumentImpl.h:
749
750 2006-01-26  Beth Dakin  <bdakin@apple.com>
751
752         Reviewed by Hyatt.
753
754         Fix for <rdar://problem/4256504> khtml::RenderBlock::skipWhitespace 
755         crashes upon interaction with radio buttons.
756
757         The old code held an assumption that positioned elements would 
758         always have line boxes. This is not necessarily the case, so this 
759         patch makes sure that the lines are dirtied appropriately.
760
761         * rendering/RenderContainer.cpp:
762         (WebCore::RenderContainer::removeChildNode): Call 
763         dirtyLinesFromChangedChild() if oldChild is positioned and has
764         inline children.
765         (WebCore::RenderContainer::insertChildNode): Only check the the 
766         child is not floating; it can be positioned.
767
768 2006-01-26  Mitz Pettel  <opendarwin.org@mitzpettel.com>
769
770         Test: fast/dom/HTMLImageElement/image-without-renderer-width.html
771
772         Reviewed and landed by Anders.
773
774         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6841
775           REGRESSION: WebKit (Thursday, January 26, 2006) crash in HTMLImageElementImpl::width()
776
777         * khtml/html/html_imageimpl.cpp:
778         (WebCore::HTMLImageElementImpl::width): Return the image's dimensions only if it isn't
779         null, but even if it hasn't finished loading.
780         (WebCore::HTMLImageElementImpl::height): Ditto.
781
782 2006-01-26  Adele Peterson  <adele@apple.com>
783
784         Reviewed by Hyatt and Vicki.
785
786         Fix for broken layout tests.
787
788         * khtml/html/HTMLInputElementImpl.cpp: (WebCore::HTMLInputElementImpl::focus): 
789
790 2006-01-26  Anders Carlsson  <andersca@mac.com>
791
792         Reviewed by Eric.
793
794         - http://bugzilla.opendarwin.org/show_bug.cgi?id=6845
795         Autogenerate more classes
796         
797         This makes DocumentType and DOMImplementation autogenerated.
798         
799         * JSCore.cpp: Added.
800         
801         * WebCore.xcodeproj/project.pbxproj:
802         Add JSCore.cpp
803         
804         * bindings/scripts/CodeGeneratorJS.pm:
805         Add attributes for controlling how null values should be converted
806         to and from DOMString objects.
807         
808         * bindings/scripts/IDLParser.pm:
809         * bindings/scripts/IDLStructure.pm:
810         Remove the extended attributes hash on attribute objects and
811         use the one on the signature.
812
813         * khtml/ecma/kjs_dom.cpp:
814         (KJS::DOMNodeProtoFunc::callAsFunction):
815         For isSupported, just convert the version argument to an empty string if
816         null is passed in. The reason for this change is that the autogenerated
817         binding for DOMImplementation::hasFeature does the same thing. This also makes
818         us behave like Mozilla and Opera.
819         
820         (KJS::toDocumentType):
821         (KJS::getDOMNode):
822         Use JSDocumentType.
823         
824         (KJS::getDOMDOMImplementation):
825         Use JSDOMImplementation.
826         
827         * khtml/ecma/kjs_dom.h:
828         Remove DOMDOMImplementation and DOMDocumentType
829         
830         * khtml/xml/DOMImplementation.idl: Added.
831         * khtml/xml/DocumentType.idl: Added.
832
833 2006-01-26  Alexander Kellett  <lypanov@kde.org>
834
835         Reviewed by eseidel.  Landed by eseidel.
836
837         <text> elements with a scale on a parent <g> breaks nodeAtPoint
838         Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6843
839         
840         Test: svg/custom/text-hit-test.svg
841
842         * kcanvas/RenderSVGText.cpp:
843         (RenderSVGText::nodeAtPoint):
844
845 2006-01-26  Maciej Stachowiak  <mjs@apple.com>
846
847         Reviewed by Geoff.
848
849         - fixed a couple hundred node leaks on the traversal layout tests
850         http://bugzilla.opendarwin.org/show_bug.cgi?id=6828
851
852         There were three basic problems here, any one of which was enough
853         to cause the leak.
854         
855         1) If the filter function for a NodeFilter, NodeIterator or TreeWalker
856         had that object in scope, it would cause a GC reference cycle. I fixed
857         this by making these JS functions get marked by the corresponding JS object,
858         as for XMLHttpRequest.
859         
860         2) The TraversalImpl class that's a base class for NodeIteratorImpl and 
861         TreeWalkerImpl did not have a virtual destructor, leading the Shared
862         template to call the base class destructor on deref.
863         
864         3) ref/deref on the document were mismatched, I fixed all that sort of nonsense
865         by using RefPtr instead of manual ref/deref.
866         
867         * khtml/dom/dom2_traversal.h:
868         (DOM::NodeFilterCondition::mark): Add no-op virtual mark method, JS subclass
869         will do something useful here.
870         * khtml/ecma/kjs_traversal.cpp:
871         (KJS::DOMNodeIterator::mark): Mark the DOM-level filter.
872         (KJS::DOMNodeFilter::mark): ditto
873         (KJS::DOMTreeWalker::mark): ditto
874         (KJS::JSNodeFilterCondition::JSNodeFilterCondition): reformatted.
875         (KJS::JSNodeFilterCondition::mark): Mark the filter function.
876         * khtml/ecma/kjs_traversal.h:
877         * khtml/xml/dom2_traversalimpl.cpp:
878         (DOM::NodeFilterImpl::NodeFilterImpl): diligently applied RefPtr
879         (DOM::TraversalImpl::TraversalImpl): ditto
880         (DOM::TraversalImpl::~TraversalImpl): ditto
881         (DOM::NodeIteratorImpl::NodeIteratorImpl): ditto
882         (DOM::NodeIteratorImpl::~NodeIteratorImpl): ditto
883         (DOM::NodeIteratorImpl::setReferenceNode): ditto
884         (DOM::TreeWalkerImpl::TreeWalkerImpl): ditto
885         (DOM::TreeWalkerImpl::setCurrentNode): ditto
886         * khtml/xml/dom2_traversalimpl.h:
887         (DOM::NodeFilterImpl::mark): call mark() on the codition
888         (DOM::TraversalImpl::root): Use .get()
889         (DOM::TraversalImpl::filter): ditto
890         (DOM::NodeIteratorImpl::referenceNode): ditto
891         (DOM::NodeIteratorImpl::document): ditto
892         (DOM::TreeWalkerImpl::currentNode): ditto
893
894 2006-01-26  Maciej Stachowiak  <mjs@apple.com>
895
896         Reviewed by Geoff.
897
898         - fixed ~40 DOM nodes leaked when running any two of the outerHTML DOM tests (actually just a false positive)
899         http://bugzilla.opendarwin.org/show_bug.cgi?id=6822
900
901         * kwq/KWQPageState.mm:
902         (-[KWQPageState clear]): Garbage collect after deleting a bunch of
903         stuff that holds onto JS objects. This should avoid false positive leaks
904         and is good in any case since page state deallocation is already deferred.
905
906 2006-01-26  Adele Peterson  <adele@apple.com>
907
908         Reviewed by Vicki.
909
910         - fix for <rdar://problem/4422624> REGRESSION: crash loading webmail.mac.com
911
912         Test added:
913         fast/forms/input-no-renderer.html
914
915         * khtml/html/HTMLInputElementImpl.cpp:
916         (WebCore::HTMLInputElementImpl::focus): Nil check for renderer.
917
918 2006-01-26  David Harrison  <harrison@apple.com>
919
920         Reviewed by Timothy.
921
922         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6835
923           REGRESSION: WebKit crashes when loading a script on Wikipedia
924
925         Test added:
926         editing/deleting/delete-listitem-001.html
927         
928         * rendering/render_list.cpp:
929         (RenderListItem::setStyle):
930         (RenderListItem::resetMarkerValue):
931         (RenderListItem::getAbsoluteRepaintRect):
932         (RenderListMarker::paint):
933
934 2006-01-26  Mitz Pettel  <opendarwin.org@mitzpettel.com>
935
936         Reviewed by Darin, landed by ap.
937         
938         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6388
939           REGRESSION: Incomplete repaint when dragging the map on Google maps
940
941         * manual-tests/bugzilla-6388.html: Added.
942         * rendering/render_layer.cpp:
943         (WebCore::RenderLayer::computeRepaintRects): Cache the object's absolute position
944         before update.
945         (WebCore::RenderLayer::updateLayerPositions): Use the cached position to determine if
946         the object moved. If it did, do a full repaint.
947         * rendering/render_layer.h:
948
949 2006-01-26  Eric Seidel  <eseidel@apple.com>
950
951         Fixes xcode project to better notice when generated files change.
952         Also fixes failing test cases on build slaves.
953
954         * WebCore.xcodeproj/project.pbxproj:
955
956 2006-01-26  Mitz Pettel  <opendarwin.org@mitzpettel.com>
957
958         Reviewed by Darin, committed by ap.
959         
960         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6278
961           REGRESSION: Incomplete repaint when table cell width changes during layout
962
963         * manual-tests/bugzilla-6278.html: Added.
964         * rendering/RenderTableSection.cpp:
965         (WebCore::RenderTableSection::setCellWidths): If during layout a cell changes from
966         not needing layout to needing layout, call repaintObjectsBeforeLayout on it.
967
968 2006-01-26  Eric Seidel  <eseidel@apple.com>
969
970         Reviewed by mjs.
971
972         SVG shows up blank in WebKit+SVG
973         http://bugzilla.opendarwin.org/show_bug.cgi?id=6620
974         
975         Test: svg/custom/viewport-no-width-height.svg
976
977         * css/svg.css: default to width/height 100% for <svg>
978
979 2006-01-26  Anders Carlsson  <andersca@mac.com>
980
981         Reviewed by Darin.
982
983         http://bugzilla.opendarwin.org/show_bug.cgi?id=6805
984         Support constants in IDL files
985
986         * bindings/scripts/CodeGeneratorJS.pm:
987         If an interface has constants, generate a constructor
988         object and add the constants as properties. Also add a
989         getConstructor method to the interface object.
990         
991         * bindings/scripts/CodeGenerator.pm:
992         * bindings/scripts/generate-bindings.pl:
993         Add a --force-generation flag to force regeneration of files
994         even though nothing has changed.
995         
996         * khtml/ecma/kjs_events.cpp:
997         * khtml/ecma/kjs_events.h:
998         Remove MutationEventConstructor and DOMMutationEvent,
999         those are autogenerated now.
1000         
1001         * bindings/js/JSEvents.cpp:
1002         Include JSMutationEvent.cpp
1003
1004         * khtml/ecma/kjs_window.cpp:        
1005         (KJS::Window::getValueProperty):
1006         * khtml/ecma/kjs_window.h:
1007         (KJS::Window::):
1008         Add MutationEvent property.
1009         
1010         * khtml/xml/MutationEvent.idl: Added.
1011
1012 2006-01-25  Alexander Kellett  <lypanov@kde.org>
1013
1014         Reviewed by eseidel.  Landed by eseidel
1015
1016         Percentage values for width, height are not rendered correctly.
1017         http://bugzilla.opendarwin.org/show_bug.cgi?id=5331
1018         
1019         Tests:
1020         * svg/custom/percentage-rect.svg
1021         * svg/custom/percentage-rect2.svg
1022
1023         Create items for even empty paths to prevent an empty render tree.
1024         Calculate the viewport element on the fly rather than caching it,
1025         unless there is no context from which to calculate it. Call 
1026         notifyAttributeChange() on layout to fix usage of viewport
1027         percentages for lengths. Remove portion of code which appears to 
1028         do nothing but worsen the situation.
1029
1030         * kcanvas/device/quartz/KCanvasItemQuartz.h:
1031         * kcanvas/device/quartz/KCanvasItemQuartz.mm:
1032         (KCanvasItemQuartz::layout):
1033         * ksvg2/svg/SVGLengthImpl.cpp:
1034         (SVGLengthImpl::value):
1035         * ksvg2/svg/SVGStyledElementImpl.cpp:
1036         (SVGStyledElementImpl::createRenderer):
1037
1038 2006-01-26  Eric Seidel  <eseidel@apple.com>
1039
1040         Reviewed by hyatt.
1041
1042         Disable <animateTransform> to stop layout test crashes.
1043         http://bugzilla.opendarwin.org/show_bug.cgi?id=6780
1044
1045         * ksvg2/misc/KSVGTimeScheduler.cpp: hack out animateTransform.
1046
1047 2006-01-26  Eric Seidel  <eseidel@apple.com>
1048
1049         Reviewed by mjs.
1050
1051         Deploy RefPtr throughout more of WebCore
1052         http://bugzilla.opendarwin.org/show_bug.cgi?id=6754
1053
1054         * bridge/mac/MacFrame.mm:
1055         (MacFrame::shouldClose): no need to call .get()
1056         * khtml/html/HTMLElementImpl.cpp:
1057         (WebCore::HTMLElementImpl::createContextualFragment):
1058         * khtml/html/HTMLSelectElementImpl.cpp:
1059         (WebCore::HTMLSelectElementImpl::remove):
1060         * khtml/html/HTMLTextAreaElementImpl.cpp:
1061         (WebCore::HTMLTextAreaElementImpl::setDefaultValue):
1062         * khtml/html/html_baseimpl.cpp:
1063         (WebCore::HTMLBodyElementImpl::HTMLBodyElementImpl):
1064         (WebCore::HTMLBodyElementImpl::~HTMLBodyElementImpl):
1065         (WebCore::HTMLBodyElementImpl::createLinkDecl):
1066         (WebCore::HTMLBodyElementImpl::parseMappedAttribute):
1067         * khtml/html/html_baseimpl.h:
1068         * khtml/html/html_headimpl.cpp:
1069         (WebCore::HTMLLinkElementImpl::HTMLLinkElementImpl):
1070         (WebCore::HTMLLinkElementImpl::~HTMLLinkElementImpl):
1071         (WebCore::HTMLLinkElementImpl::process):
1072         (WebCore::HTMLLinkElementImpl::setStyleSheet):
1073         (WebCore::HTMLLinkElementImpl::isLoading):
1074         (WebCore::HTMLStyleElementImpl::HTMLStyleElementImpl):
1075         (WebCore::HTMLStyleElementImpl::childrenChanged):
1076         (WebCore::HTMLStyleElementImpl::isLoading):
1077         * khtml/html/html_headimpl.h:
1078         (DOM::HTMLLinkElementImpl::sheet):
1079         (DOM::HTMLStyleElementImpl::sheet):
1080         * khtml/html/html_tableimpl.cpp:
1081         (WebCore::HTMLTableElementImpl::parseMappedAttribute):
1082         (WebCore::HTMLTableSectionElementImpl::insertRow):
1083         (WebCore::HTMLTableSectionElementImpl::deleteRow):
1084         (WebCore::HTMLTableRowElementImpl::deleteCell):
1085         * khtml/xml/NodeImpl.cpp:
1086         (WebCore::NodeImpl::dispatchEvent):
1087         (WebCore::NodeImpl::dispatchGenericEvent):
1088         (WebCore::NodeImpl::dispatchWindowEvent):
1089         (WebCore::NodeImpl::dispatchMouseEvent):
1090         (WebCore::NodeImpl::dispatchKeyEvent):
1091         (WebCore::NodeImpl::createRendererIfNeeded):
1092         * khtml/xml/NodeImpl.h:
1093         * khtml/xml/dom_elementimpl.cpp:
1094         (WebCore::MappedAttributeImpl::clone):
1095         (WebCore::StyledElementImpl::StyledElementImpl):
1096         (WebCore::StyledElementImpl::createInlineStyleDecl):
1097         (WebCore::StyledElementImpl::destroyInlineStyleDecl):
1098         (WebCore::StyledElementImpl::getInlineStyleDecl):
1099         * khtml/xml/dom_elementimpl.h:
1100         (DOM::MappedAttributeImpl::MappedAttributeImpl):
1101         (DOM::MappedAttributeImpl::style):
1102         (DOM::MappedAttributeImpl::decl):
1103         (DOM::MappedAttributeImpl::setDecl):
1104         (DOM::StyledElementImpl::inlineStyleDecl):
1105         * khtml/xml/dom_position.cpp:
1106         (DOM::Position::Position):
1107         (DOM::Position::clear):
1108         * khtml/xml/dom_position.h:
1109         (DOM::Position::node):
1110
1111 2006-01-25  Maciej Stachowiak  <mjs@apple.com>
1112
1113         Reviewed by Dave Hyatt.
1114         
1115         - garbage collect a bit later when destroying Frame (fixes node leak false positives)
1116         http://bugzilla.opendarwin.org/show_bug.cgi?id=6818       
1117
1118         * khtml/ecma/kjs_proxy.cpp:
1119         (WebCore::KJSProxyImpl::~KJSProxyImpl): Garbage collect after destroying
1120         the script interpreter.
1121         * page/Frame.cpp:
1122         (Frame::clear): Add a boolean parameter to indicate whether properties
1123         of the window object should also be cleared (defaults to true).
1124         (Frame::~Frame): Call clear(false) instead of clear()
1125         * page/Frame.h:
1126
1127 2006-01-25  Maciej Stachowiak  <mjs@apple.com>
1128
1129         Reviewed by Darin.
1130
1131         - Turn on NodeImpl leak counter for debug builds
1132         http://bugzilla.opendarwin.org/show_bug.cgi?id=6808
1133
1134         * khtml/xml/NodeImpl.cpp:
1135         (WebCore::NodeImplCounter::~NodeImplCounter): Uncomment node
1136         counter now tit won't give a lot of false positives.
1137
1138 2006-01-25  Maciej Stachowiak  <mjs@apple.com>
1139
1140         Reviewed by Dave Hyatt.
1141         
1142         - fixed "Whole DOM tree can leak if Document is hover/active/focus node on quit"
1143         http://bugzilla.opendarwin.org/show_bug.cgi?id=6809
1144         
1145         This fixes 175 reproducible node leaks in the editing layout tests.
1146         
1147         * khtml/xml/DocumentImpl.cpp:
1148         (WebCore::DocumentImpl::detach): Clear hover, focus and active nodes. It doesn't
1149         make sense to have these without a view anyway, and if any of them is the document
1150         it can cause a leak of the whole DOM.
1151
1152 2006-01-25  Adele Peterson  <adele@apple.com>
1153
1154         Reviewed by Maciej.
1155
1156         http://bugzilla.opendarwin.org/show_bug.cgi?id=6816
1157         Crash in dispatchMouseEvent - Missing nil check
1158
1159         No test added because I was not able to reproduce the crash reliably. 
1160
1161         * page/FrameView.cpp: (FrameView::dispatchMouseEvent):
1162
1163 2006-01-25  Justin Garcia  <justin.garcia@apple.com>
1164
1165         Reviewed by mjs
1166         
1167         <http://bugzilla.opendarwin.org/show_bug.cgi?id=6644>
1168         TinyMCE: Undo operation crashes Safari
1169         <rdar://problem/4343068>
1170         Some shouldChangeSelection calls are nonsensical
1171
1172         Notify the SelectionController of node removals,
1173         and blow away the selection when end points are removed.
1174
1175         Tests added:
1176         * editing/selection/remove-node-1.html
1177         * editing/selection/remove-node-2.html
1178         
1179         * khtml/editing/SelectionController.cpp:
1180         (WebCore::MutationListener::handleEvent):
1181         (WebCore::SelectionController::SelectionController):
1182         (WebCore::SelectionController::~SelectionController):
1183         (WebCore::SelectionController::operator=):
1184         (WebCore::SelectionController::moveTo):
1185         (WebCore::SelectionController::setSelection):
1186         (WebCore::SelectionController::nodeWillBeRemoved):
1187         (WebCore::SelectionController::clear):
1188         (WebCore::SelectionController::setBase):
1189         (WebCore::SelectionController::setExtent):
1190         * khtml/editing/SelectionController.h:
1191         (WebCore::MutationListener::MutationListener):
1192         (WebCore::MutationListener::selectionController):
1193         (WebCore::MutationListener::setSelectionController):
1194         * rendering/RenderContainer.cpp:
1195         (WebCore::RenderContainer::removeChildNode):
1196         * rendering/render_flow.cpp:
1197         (RenderFlow::destroy):
1198
1199 2006-01-25  Adele Peterson  <adele@apple.com>
1200
1201         Reviewed by Hyatt.
1202
1203         This change lets us display an aqua appearance for the new text fields.
1204
1205         Updated results for:
1206         * fast/forms/input-appearance-focus.html
1207
1208         * rendering/RenderTextField.cpp: (WebCore::RenderTextField::createDivStyle): 
1209           remove styling of the div, since RenderTheme handles that now.
1210         * rendering/render_theme.cpp:
1211         (khtml::RenderTheme::adjustStyle): call adjustTextFieldStyle.
1212         (khtml::RenderTheme::paint): call paintTextField.
1213         (khtml::RenderTheme::adjustTextFieldStyle): added FIXME to turn off appearance later.
1214         * rendering/render_theme.h: added adjustTextFieldStyle, paintTextField
1215         * rendering/render_theme_mac.h: added paintTextField, setTextFieldState, and NSTextFieldCell.
1216         * rendering/render_theme_mac.mm:
1217         (khtml::): Added static textFieldMargins.
1218         (khtml::RenderThemeMac::adjustRepaintRect): update text field state and size.
1219         (khtml::RenderThemeMac::paintTextField): Added. Paints the NSTextFieldCell
1220         (khtml::RenderThemeMac::setTextFieldCellState): Initialize NSTextFieldCell, and update enabled state.
1221
1222 2006-01-25  David Hyatt  <hyatt@apple.com>
1223
1224         Rename QBrush to Brush and move it to platform/.  Remove unused QPoint/Size/RectF forwarding
1225         headers.
1226
1227         * ForwardingHeaders/QPointF: Removed.
1228         * ForwardingHeaders/QRectF: Removed.
1229         * ForwardingHeaders/QSizeF: Removed.
1230         * WebCore.xcodeproj/project.pbxproj:
1231         * khtml/editing/SelectionController.cpp:
1232         (WebCore::SelectionController::paintCaret):
1233         * kwq/KWQBrush.h: Removed.
1234         * kwq/KWQNamespace.h:
1235         * kwq/KWQObject.h:
1236         * kwq/KWQPainter.h:
1237         * kwq/KWQPainter.mm:
1238         (QPainter::setBrush):
1239         (QPainter::brush):
1240         (QPainter::drawRect):
1241         (QPainter::drawEllipse):
1242         (QPainter::drawConvexPolygon):
1243         (QPainter::fillRect):
1244         * kwq/KWQPalette.h:
1245         (QColorGroup::brush):
1246         * platform/Brush.h: Added.
1247         (WebCore::Brush::):
1248         (WebCore::Brush::Brush::Brush):
1249         (WebCore::Brush::operator==):
1250         (WebCore::Brush::operator!=):
1251         * rendering/RenderBlock.cpp:
1252         (WebCore::RenderBlock::fillHorizontalSelectionGap):
1253         (WebCore::RenderBlock::fillVerticalSelectionGap):
1254         (WebCore::RenderBlock::fillLeftSelectionGap):
1255         (WebCore::RenderBlock::fillRightSelectionGap):
1256         * rendering/render_box.cpp:
1257         (WebCore::RenderBox::outlineBox):
1258         * rendering/render_canvasimage.cpp:
1259         (WebCore::RenderCanvasImage::paint):
1260         * rendering/render_image.cpp:
1261         (WebCore::RenderImage::paint):
1262         * rendering/render_list.cpp:
1263         (RenderListMarker::paint):
1264         * rendering/render_replaced.cpp:
1265         (WebCore::RenderWidget::paint):
1266
1267 2006-01-25  Anders Carlsson  <andersca@mac.com>
1268
1269         Reviewed by Timothy Hatcher.
1270
1271         http://bugzilla.opendarwin.org/show_bug.cgi?id=6807
1272         generate-bindings.pl should not use find command
1273         
1274         * bindings/scripts/generate-bindings.pl:
1275         Use opendir and readdir instead of find.
1276
1277 2006-01-25  David Hyatt <hyatt@apple.com
1278
1279         Fix Win32 build bustage. Make the autogeneration from .idl work
1280         just like it does on Mac.  Also update the project to account for
1281         the move of QPen.
1282
1283         * WebCore.vcproj/WebCore/WebCore.vcproj:
1284         * WebCore.vcproj/WebCore/build-generated-files.sh:
1285         * bindings/scripts/generate-bindings.pl:
1286
1287 2006-01-25  David Hyatt  <hyatt@apple.com>
1288
1289         Rename QPen to Pen and move it to the platform/ directory.
1290
1291         * ForwardingHeaders/qpen.h: Removed.
1292         * WebCore.xcodeproj/project.pbxproj:
1293         * kwq/KWQNamespace.h:
1294         (Qt::):
1295         * kwq/KWQPainter.h:
1296         * kwq/KWQPainter.mm:
1297         (QPainter::pen):
1298         (QPainter::setPen):
1299         (QPainter::drawRect):
1300         (QPainter::drawLine):
1301         (QPainter::drawEllipse):
1302         (QPainter::drawArc):
1303         (QPainter::drawConvexPolygon):
1304         * kwq/KWQPen.cpp: Removed.
1305         * kwq/KWQPen.h: Removed.
1306         * platform/Pen.cpp: Added.
1307         (WebCore::Pen::Pen):
1308         (WebCore::Pen::color):
1309         (WebCore::Pen::width):
1310         (WebCore::Pen::style):
1311         (WebCore::Pen::setColor):
1312         (WebCore::Pen::setWidth):
1313         (WebCore::Pen::setStyle):
1314         (WebCore::Pen::operator==):
1315         (WebCore::Pen::operator!=):
1316         * platform/Pen.h: Added.
1317         (WebCore::Pen::):
1318         * rendering/InlineTextBox.cpp:
1319         (khtml::InlineTextBox::paintMarkedTextUnderline):
1320         * rendering/RenderTableCell.cpp:
1321         (WebCore::outlineBox):
1322         * rendering/RenderText.cpp:
1323         * rendering/render_box.cpp:
1324         (WebCore::RenderBox::outlineBox):
1325         * rendering/render_frames.cpp:
1326         (WebCore::RenderFrameSet::userResize):
1327         * rendering/render_image.cpp:
1328         * rendering/render_line.cpp:
1329         * rendering/render_list.cpp:
1330         * rendering/render_object.cpp:
1331         (WebCore::RenderObject::drawBorder):
1332
1333 2006-01-25  Timothy Hatcher  <timothy@apple.com>
1334
1335         Move off of -[NSFont widthOfString:] since it is now deprecated.
1336         Use the NSStringDrawing -[NSString sizeWithAttributes:] API.
1337
1338         * bridge/mac/MacFrame.mm:
1339         (MacFrame::attributedString):
1340         * kwq/KWQTextArea.mm:
1341         (-[KWQTextAreaTextView sizeWithColumns:rows:]):
1342
1343 2006-01-24  Tim Omernick  <timo@apple.com>
1344
1345         Reviewed by Dave Harrison.
1346
1347         <rdar://problem/4339024>
1348         <http://bugzilla.opendarwin.org/show_bug.cgi?id=6785> "Fix for possible leak of applet, object, or embed
1349         (and plugin view)"
1350         
1351         No test cases added.  This is a fix for a leak which is difficult to trigger under normal page load
1352         circumstances, because it requires that the host application modify an <embed> using the Objective C
1353         API.
1354
1355         * khtml/html/html_objectimpl.cpp:
1356         (WebCore::HTMLAppletElementImpl::~HTMLAppletElementImpl):
1357         Assert that appletInstance has been deleted by detach().
1358         (WebCore::HTMLAppletElementImpl::detach):
1359         Delete appletInstance, because it references the widget owned by the renderer we're about to destroy.
1360         It is assumed elsewhere (getRuntimeObject(), kjs_dom.cpp) that the instance is owned by the applet
1361         element.  Therefore, it is required that the element destroy the instance in its tear-down phase.
1362         (WebCore::HTMLEmbedElementImpl::~HTMLEmbedElementImpl):
1363         Assert that embedInstance has been deleted by detach().
1364         (WebCore::HTMLEmbedElementImpl::detach):
1365         Delete embedInstance, same reason.  This is the one that fixes <rdar://problem/4339024>.
1366         (WebCore::HTMLObjectElementImpl::~HTMLObjectElementImpl):
1367         Assert that objectInstance has been deleted by detach().
1368         (WebCore::HTMLObjectElementImpl::detach):
1369         Delete embedInstance, same reason.
1370         * khtml/html/html_objectimpl.h:
1371         Declared HTMLAppletElementImpl::detach() and HTMLEmbedElementImpl::detach().
1372
1373 2006-01-24  Anders Carlsson  <andersca@mac.com>
1374
1375         Reviewed by Darin.
1376
1377         - http://bugzilla.opendarwin.org/show_bug.cgi?id=5975
1378         WebCore needs to use KDOM-like DOM binding autogeneration
1379         
1380         This is a first cut at an autogeneration framework based on 
1381         what KDOM uses, but with some changes to be able to move
1382         gradually to using autogenerated files. Currently only Javascript
1383         is supported, but ObjC support could be added by writing a new code
1384         generator package.
1385         
1386         * WebCore.xcodeproj/project.pbxproj:
1387         Call generate-bindings.pl
1388
1389         * bindings/js/JSEvents.cpp: Added.
1390         New file which #includes all generated files in the event module
1391         (Just JSWheelEvent.cpp for now)
1392         
1393         * khtml/xml/WheelEvent.idl: Added.
1394         
1395         * bindings/scripts: Added.
1396         * bindings/scripts/CodeGenerator.pm: Added.
1397         * bindings/scripts/CodeGeneratorJS.pm: Added.
1398         * bindings/scripts/IDLParser.pm: Added.
1399         * bindings/scripts/IDLStructure.pm: Added.
1400         * bindings/scripts/generate-bindings.pl: Added.
1401         
1402         * khtml/ecma/kjs_events.cpp:
1403         Remove DOMWheelEvent class.
1404         
1405         (KJS::getDOMEvent):
1406         Use JSWheelEvent here.
1407         
1408         * khtml/ecma/kjs_events.h:
1409         Remove DOMWheelEvent class.
1410
1411 2006-01-25  David Harrison  <harrison@apple.com>
1412
1413         Reviewed by Justin.
1414
1415         <rdar://problem/3907635> copy/paste of list item text moves list item up one <LI>
1416         <rdar://problem/3907647> Enhance list editing: return inserts <li></li>
1417         <rdar://problem/4060158> deleting selection within table deletes more than intended
1418         <rdar://problem/4061232> Deleting a list can delete unselected content
1419         <rdar://problem/4062212> after pasting in contents of web.apple.com, typing before start adds to table instead of before table
1420         <rdar://problem/4064437> After copy/paste from bugweb cannot go back to entering text at left side of page
1421         <rdar://problem/4259845> Table editing in design mode is broken
1422         <rdar://problem/4287667> Insertion point goes before table instead of inside first cell
1423         <rdar://problem/4345749> Editing HTML - Enter at end of <LI> inserts uneditable blank <LI>
1424         <rdar://problem/4345794> HTML editing: Enter at end of last <LI> does not add new <LI>
1425         <rdar://problem/4345825> HTML Editing: editing first <LI> element removes first <LI> and more
1426         <rdar://problem/4345835> HTML editing: editing last <LI> removes everything within <BODY>
1427         <rdar://problem/4345879> HTML editing: editing first <TD> moves data out of table
1428
1429         ...also added showTree() static functions because switch to gcc 4.0 makes calling instance methods unreliable
1430
1431         - numerous small changes to handle empty list items
1432         - fix numeric list marker updating when adding/deleting list items
1433         - start to decompose "special element" handling, replacing it with appropriate handling of the different
1434           kinds of special elements in various situations, rather than giving a blanket treatment.  I will do more
1435           of this in subsequent checkins.
1436         - numerous small editing/selection changes to handle VisiblePosition at table offset childNodeCount()
1437         - simplify and fix equivalentRangeCompliantPosition, rename it to rangeCompliantEquivalent and make it static
1438         - some minor reformatting to current standards
1439         - the comments in the list below are for changes not covered by the above comments
1440         
1441         * khtml/editing/Selection.cpp:
1442         (WebCore::Selection::toRange):
1443         (WebCore::Selection::validate):
1444         * khtml/editing/SelectionController.cpp:
1445         (WebCore::SelectionController::modifyExtendingLeftBackward):
1446         - character selection backward from after table selects the table
1447         (WebCore::showTree):
1448         * khtml/editing/composite_edit_command.cpp:
1449         (WebCore::CompositeEditCommand::removeFullySelectedNode):
1450         - make sure empty cell has some height
1451         (WebCore::CompositeEditCommand::positionOutsideTabSpan):
1452         - check for !isTabSpanTextNode() to make calling this function easier
1453         (WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded):
1454         * khtml/editing/delete_selection_command.cpp:
1455         (WebCore::positionBeforePossibleContainingSpecialElement):
1456         (WebCore::positionAfterPossibleContainingSpecialElement):
1457         (WebCore::DeleteSelectionCommand::initializeStartEnd):
1458         - new.  more consistent handling of special element boundaries.
1459         (WebCore::DeleteSelectionCommand::initializePositionData):
1460         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
1461         - handle childless block (e.g. empty table cell)
1462         - allow merging across list items
1463         (WebCore::DeleteSelectionCommand::moveNodesAfterNode):
1464         - use new isEmpty() method for renderers, to handle empty list items
1465         * khtml/editing/delete_selection_command.h:
1466         * khtml/editing/htmlediting.cpp:
1467         (WebCore::isAtomicNode):
1468         (WebCore::editingIgnoresContent):
1469         - new.  smarter check than isReplaced()
1470         (WebCore::rangeCompliantEquivalent):
1471         (WebCore::maxDeepOffset):
1472         (WebCore::isFirstVisiblePositionInSpecialElement):
1473         (WebCore::positionBeforeContainingSpecialElement):
1474         (WebCore::isLastVisiblePositionInSpecialElement):
1475         (WebCore::positionAfterContainingSpecialElement):
1476         (WebCore::positionOutsideContainingSpecialElement):
1477         (WebCore::positionBeforeNode):
1478         (WebCore::positionAfterNode):
1479         (WebCore::isListElement):
1480         (WebCore::isTableElement):
1481         (WebCore::isFirstVisiblePositionAfterTableElement):
1482         (WebCore::positionBeforePrecedingTableElement):
1483         (WebCore::positionAvoidingSpecialElementBoundary):
1484         * khtml/editing/htmlediting.h:
1485         * khtml/editing/insert_line_break_command.cpp:
1486         (khtml::InsertLineBreakCommand::doApply):
1487         * khtml/editing/insert_paragraph_separator_command.cpp:
1488         (khtml::InsertParagraphSeparatorCommand::doApply):
1489         * khtml/editing/insert_text_command.cpp:
1490         (khtml::InsertTextCommand::prepareForTextInsertion):
1491         (khtml::InsertTextCommand::input):
1492         * khtml/editing/replace_selection_command.cpp:
1493         (WebCore::isMailPasteAsQuotationNode):
1494         (WebCore::ReplacementFragment::countRenderedBlocks):
1495         (WebCore::ReplaceSelectionCommand::doApply):
1496         - allow for fact that fragments have no VisiblePositions
1497         * khtml/editing/visible_position.cpp:
1498         (khtml::VisiblePosition::isCandidate):
1499         (khtml::showTree):
1500         (khtml::makeRange):
1501         (khtml::setStart):
1502         (khtml::setEnd):
1503         * khtml/editing/visible_position.h:
1504         * khtml/editing/visible_units.cpp:
1505         (khtml::previousBoundary):
1506         (khtml::nextBoundary):
1507         (khtml::startOfLine):
1508         - allow for fact that renderers for list markers and other generated content
1509           have no corresponding NodeImpl.
1510         (khtml::endOfLine):
1511         - ditto
1512         (khtml::nextLinePosition):
1513         (khtml::startOfParagraph):
1514         (khtml::endOfParagraph):
1515         * khtml/xml/ContainerNodeImpl.cpp:
1516         (WebCore::ContainerNodeImpl::getUpperLeftCorner):
1517         (WebCore::ContainerNodeImpl::childNode):
1518         * khtml/xml/ContainerNodeImpl.h:
1519         * khtml/xml/NodeImpl.cpp:
1520         (WebCore::NodeImpl::childNode):
1521         (WebCore::NodeImpl::traversePreviousNode):
1522         (WebCore::NodeImpl::nextEditable):
1523         (WebCore::showTree):
1524         * khtml/xml/NodeImpl.h:
1525         * khtml/xml/dom_position.cpp:
1526         (DOM::Position::upstream):
1527         (DOM::Position::downstream):
1528         (DOM::Position::inRenderedContent):
1529         (DOM::showTree):
1530         * khtml/xml/dom_position.h:
1531         * rendering/render_canvas.cpp:
1532         (RenderCanvas::selectionRect):
1533         * rendering/render_list.cpp:
1534         (RenderListItem::calcListValue):
1535         (RenderListItem::isEmpty):
1536         (getParentOfFirstLineBox):
1537         (RenderListItem::resetMarkerValue):
1538         (RenderListItem::updateMarkerLocation):
1539         * rendering/render_list.h:
1540         (khtml::RenderListMarker::isListMarker):
1541         * rendering/render_object.cpp:
1542         (WebCore::RenderObject::nextRenderer):
1543         (WebCore::RenderObject::previousRenderer):
1544         (WebCore::showTree):
1545         * rendering/render_object.h:
1546         (WebCore::RenderObject::getBaselineOfLastLineBox):
1547         (WebCore::RenderObject::isEmpty):
1548
1549 2006-01-25  Timothy Hatcher  <timothy@apple.com>
1550
1551         Build fix, -[NSFont defaultLineHeightForFont] is deprecated.
1552         We need to use -[NSLayoutManager defaultLineHeightForFont:] instead.
1553
1554         * kwq/KWQLineEdit.mm:
1555         (QLineEdit::sizeForCharacterWidth):
1556         (QLineEdit::baselinePosition):
1557
1558 2006-01-24  Darin Adler  <darin@apple.com>
1559
1560         Reviewed by Adele.
1561
1562         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6731
1563           REGRESSION: change event fires at load time for checked items
1564
1565         Test: fast/forms/radio-button-no-change-event.html
1566
1567         * khtml/html/HTMLInputElementImpl.cpp: (WebCore::HTMLInputElementImpl::setChecked):
1568         One of many possible fixes: Don't send the event if the element is not yet in
1569         a document (as in when parsing the initial attributes).
1570
1571 2006-01-24  Adele Peterson  <adele@apple.com>
1572
1573         Reviewed by Hyatt.
1574
1575         This change will allow the new text field elements to get focus, and to respond to the focus and blur events.
1576
1577         Added: fast/forms/input-appearance-focus.html
1578
1579         * khtml/html/HTMLElementImpl.cpp: (WebCore::HTMLElementImpl::isFocusable): 
1580           Removed recently added code that allowed editable elements with no parent to be focusable.  
1581           We don't need to do this now that we try to focus the input element, instead of the inner div.
1582         * khtml/html/HTMLGenericFormElementImpl.cpp: (WebCore::HTMLGenericFormElementImpl::isMouseFocusable): Added case to for text fields.
1583         * khtml/html/HTMLInputElementImpl.cpp:
1584         (WebCore::HTMLInputElementImpl::focus): Added. Selects contents of text field.
1585         (WebCore::HTMLInputElementImpl::setSelectionStart): Added break; in switch statement.
1586         (WebCore::HTMLInputElementImpl::setSelectionEnd): ditto.
1587         (WebCore::HTMLInputElementImpl::select): ditto.
1588         (WebCore::HTMLInputElementImpl::setSelectionRange): ditto.
1589         * khtml/html/HTMLInputElementImpl.h: Added focus()
1590         * khtml/xml/dom_elementimpl.h: Made focus() virtual.
1591         * page/Frame.cpp: (Frame::setFocusNodeIfNeeded):
1592           Walk up the Render Tree instead of the DOM tree when trying to find a node to focus.  
1593           This will let us choose the input node instead of one of the nodes in the shadow tree.
1594         * page/FrameView.cpp: (FrameView::dispatchMouseEvent): ditto.
1595         * rendering/RenderContainer.cpp: (WebCore::RenderContainer::destroyLeftoverChildren): Corrected misspelling. 
1596         * rendering/RenderTextField.cpp:
1597         (WebCore::RenderTextField::select): Implemented.  Select contents of inner div.
1598         * rendering/RenderTextField.h:
1599         (WebCore::RenderTextField::renderName): Changed order.
1600         (WebCore::RenderTextField::removeLeftoverAnonymousBoxes): ditto.
1601
1602 2006-01-24  Darin Adler  <darin@apple.com>
1603
1604         Reviewed by Eric.
1605
1606         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6782
1607           REGRESSION: replaceChild broken when node to replace is first (TinyMCE test app broken)
1608
1609         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6784
1610           REGRESSION: 25 layout tests failing (basic DOM operations)
1611
1612         Test: fast/dom/replace-first-child.html
1613
1614         * khtml/xml/ContainerNodeImpl.cpp:
1615         (WebCore::ContainerNodeImpl::insertBefore): Change one place that hands off ownership of
1616         as PassRefPtr that causes us to almost always return 0. Fix test that would screw up when
1617         both "prev" and "refChild->previousSibling()" were 0.
1618         (WebCore::ContainerNodeImpl::appendChild): Changed a nearly-identical place handing off
1619         ownership as above.
1620
1621 2006-01-24  Maciej Stachowiak  <mjs@apple.com>
1622
1623         Reviewed by Dave Hyatt.
1624         
1625         - fixed crash if a node is removed from the DOM before being reparented due to residual style
1626         http://bugzilla.opendarwin.org/show_bug.cgi?id=6778
1627
1628         * khtml/html/htmlparser.cpp:
1629         (HTMLParser::handleResidualStyleCloseTagAcrossBlocks): If the
1630         block has been removed from the document, then do not remove it
1631         from its parent or add it to its new location. This prevents the
1632         crash and matches Mozilla.
1633
1634 2006-01-24  Darin Adler  <darin@apple.com>
1635
1636         Reviewed by John Sullivan.
1637
1638         - http://bugzilla.opendarwin.org/show_bug.cgi?id=6750
1639           replace QDateTime with a simpler platform abstraction
1640
1641         * ForwardingHeaders/qdatetime.h: Removed.
1642         * kwq/KWQDateTime.cpp: Removed.
1643         * kwq/KWQDateTime.h: Removed.
1644
1645         * platform/SystemTime.h: Added.
1646         * platform/mac/SystemTime.cpp: (WebCore::currentTime): Added.
1647         * platform/win: Added.
1648         * platform/win/SystemTime.cpp: (WebCore::currentTime): Added.
1649
1650         * WebCore.vcproj/WebCore/WebCore.vcproj: Added new files, removed old.
1651         * WebCore.xcodeproj/project.pbxproj: Ditto.
1652
1653         * css/css_base.h: Removed include of <qdatetime.h>.
1654         * css/cssstyleselector.cpp: Ditto.
1655
1656         * khtml/html/htmltokenizer.h:
1657         * khtml/html/htmltokenizer.cpp: Convert tabs to spaces.
1658         (WebCore::HTMLTokenizer::continueProcessing): Change parameter from QTime to double.
1659         Use currentTime() instead of QTime::elapsed().
1660         (WebCore::HTMLTokenizer::write): Use currentTime() instead of QTime::elapsed().
1661
1662         * config.h: Added HAVE_FUNC_USLEEP for now, not sure this is really a
1663         good way to handle this.
1664         * khtml/xml/ContainerNodeImpl.cpp: (WebCore::ContainerNodeImpl::setActive):
1665         Use currentTime() instead of QTime::elapsed(). Use HAVE_FUNC_USLEEP for the if.
1666
1667         * khtml/xml/DocumentImpl.h:
1668         * khtml/xml/DocumentImpl.cpp:
1669         (WebCore::DocumentImpl::DocumentImpl): Use currentTime() instead of QTime::elapsed().
1670         (WebCore::DocumentImpl::implicitClose): Ditto.
1671         (WebCore::DocumentImpl::minimumLayoutDelay): Ditto.
1672         (WebCore::DocumentImpl::elapsedTime): Ditto.
1673
1674         * khtml/xml/dom2_eventsimpl.cpp: (WebCore::EventImpl::EventImpl): Use currentTime()
1675         instead of local function called currentTimeStamp().
1676
1677         * khtml/xml/xml_tokenizer.h: Removed declaration of class QTime.
1678
1679         * ksvg2/misc/KSVGTimeScheduler.h:
1680         * ksvg2/misc/KSVGTimeScheduler.cpp:
1681         (KSVG::TimeScheduler::TimeScheduler): Use currentTime instead of QTime::elapsed.
1682         (KSVG::TimeScheduler::startAnimations): Ditto.
1683         (KSVG::TimeScheduler::toggleAnimations): Ditto.
1684         (KSVG::TimeScheduler::elapsed): Ditto.
1685
1686         * page/Frame.cpp: (Frame::clear): Removed unused m_parsetime.
1687         * page/FramePrivate.h: Ditto.
1688
1689 2006-01-24  David Hyatt  <hyatt@apple.com>
1690
1691         Fix for bug 6781, convert QColor to Color (and QRgb to RGBA32).  r=maciej.
1692
1693         * ForwardingHeaders/qcolor.h: Removed.
1694         * WebCore+SVG/KDOMSettings.h:
1695         * WebCore+SVG/RGBColorImpl.cpp:
1696         (RGBColorImpl::RGBColorImpl):
1697         (RGBColorImpl::red):
1698         (RGBColorImpl::green):
1699         (RGBColorImpl::blue):
1700         * WebCore+SVG/RGBColorImpl.h:
1701         * WebCore.xcodeproj/project.pbxproj:
1702         * bindings/objc/DOMCSS.mm:
1703         (getWrapperForRGB):
1704         (setWrapperForRGB):
1705         (removeWrapperForRGB):
1706         (-[DOMRGBColor dealloc]):
1707         (-[DOMRGBColor finalize]):
1708         (-[DOMRGBColor red]):
1709         (-[DOMRGBColor green]):
1710         (-[DOMRGBColor blue]):
1711         (-[DOMRGBColor _initWithRGB:]):
1712         (+[DOMRGBColor _RGBColorWithRGB:]):
1713         (-[DOMRGBColor alpha]):
1714         (-[DOMRGBColor _color]):
1715         * bridge/mac/MacFrame.mm:
1716         (MacFrame::attributedString):
1717         (MacFrame::fontAttributesForSelectionStart):
1718         (MacFrame::bodyBackgroundColor):
1719         (convertAttributesToUnderlines):
1720         * css/css_valueimpl.cpp:
1721         (WebCore::CSSPrimitiveValueImpl::CSSPrimitiveValueImpl):
1722         (WebCore::CSSPrimitiveValueImpl::cssText):
1723         * css/csshelper.h:
1724         * css/cssparser.cpp:
1725         (CSSParser::parseColor):
1726         (CSSParser::parseColorFromValue):
1727         * css/cssparser.h:
1728         * css/cssstyleselector.cpp:
1729         (WebCore::CSSStyleSelector::canShareStyleWithElement):
1730         (WebCore::):
1731         (WebCore::colorForCSSValue):
1732         (WebCore::CSSStyleSelector::applyProperty):
1733         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue):
1734         * css/cssstyleselector.h:
1735         * kcanvas/KCanvasFilters.h:
1736         (KCanvasFEDiffuseLighting::lightingColor):
1737         (KCanvasFEDiffuseLighting::setLightingColor):
1738         (KCanvasFEFlood::floodColor):
1739         (KCanvasFEFlood::setFloodColor):
1740         (KCanvasFESpecularLighting::lightingColor):
1741         (KCanvasFESpecularLighting::setLightingColor):
1742         * kcanvas/KCanvasTreeDebug.cpp:
1743         (operator<<):
1744         * kcanvas/KCanvasTreeDebug.h:
1745         * kcanvas/device/KRenderingDevice.h:
1746         * kcanvas/device/KRenderingPaintServerGradient.cpp:
1747         (KCSortedGradientStopList::addStop):
1748         * kcanvas/device/KRenderingPaintServerGradient.h:
1749         * kcanvas/device/KRenderingPaintServerSolid.cpp:
1750         (KRenderingPaintServerSolid::color):
1751         (KRenderingPaintServerSolid::setColor):
1752         * kcanvas/device/KRenderingPaintServerSolid.h:
1753         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
1754         (ciColor):
1755         * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
1756         (setupShadingWithStyle):
1757         * kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
1758         (KRenderingPaintServerPatternQuartz::setup):
1759         * khtml/ecma/kjs_css.h:
1760         * khtml/ecma/kjs_html.cpp:
1761         (KJS::KJS::Context2DFunction::callAsFunction):
1762         (KJS::colorRefFromValue):
1763         (KJS::colorFromValue):
1764         (KJS::Context2D::putValueProperty):
1765         (KJS::GradientFunction::callAsFunction):
1766         * khtml/ecma/kjs_html.h:
1767         * khtml/editing/apply_style_command.cpp:
1768         (WebCore::StyleChange::checkForLegacyHTMLStyleChange):
1769         * khtml/html/html_baseimpl.cpp:
1770         (WebCore::HTMLBodyElementImpl::parseMappedAttribute):
1771         * khtml/misc/helper.h:
1772         * khtml/xml/DocumentImpl.cpp:
1773         (WebCore::DocumentImpl::DocumentImpl):
1774         (WebCore::DocumentImpl::resetLinkColor):
1775         (WebCore::DocumentImpl::resetVisitedLinkColor):
1776         * khtml/xml/DocumentImpl.h:
1777         (WebCore::DocumentImpl::setTextColor):
1778         (WebCore::DocumentImpl::textColor):
1779         (WebCore::DocumentImpl::linkColor):
1780         (WebCore::DocumentImpl::visitedLinkColor):
1781         (WebCore::DocumentImpl::activeLinkColor):
1782         (WebCore::DocumentImpl::setLinkColor):
1783         (WebCore::DocumentImpl::setVisitedLinkColor):
1784         (WebCore::DocumentImpl::setActiveLinkColor):
1785         * ksvg2/css/SVGCSSStyleSelector.cpp:
1786         (KDOM::CSSStyleSelector::applySVGProperty):
1787         * ksvg2/css/SVGRenderStyle.h:
1788         * ksvg2/css/SVGRenderStyleDefs.h:
1789         * ksvg2/misc/KCanvasRenderingStyle.cpp:
1790         (WebCore::KSVGPainterFactory::fillPaintServer):
1791         * ksvg2/misc/KSVGTimeScheduler.cpp:
1792         (KSVG::SVGTimer::notifyAll):
1793         * ksvg2/svg/SVGAnimateColorElementImpl.cpp:
1794         (SVGAnimateColorElementImpl::handleTimerEvent):
1795         (SVGAnimateColorElementImpl::clampColor):
1796         (SVGAnimateColorElementImpl::color):
1797         (SVGAnimateColorElementImpl::initialColor):
1798         * ksvg2/svg/SVGAnimateColorElementImpl.h:
1799         * ksvg2/svg/SVGAnimateElementImpl.cpp:
1800         (SVGAnimateElementImpl::handleTimerEvent):
1801         * ksvg2/svg/SVGColorImpl.cpp:
1802         (SVGColorImpl::setRGBColor):
1803         (SVGColorImpl::color):
1804         * ksvg2/svg/SVGColorImpl.h:
1805         * ksvg2/svg/SVGGradientElementImpl.cpp:
1806         (SVGGradientElementImpl::rebuildStops):
1807         * kwq/KWQAccObject.mm:
1808         (AXAttributeStringSetStyle):
1809         * kwq/KWQBrush.h:
1810         (QBrush::QBrush::QBrush):
1811         (QBrush::color):
1812         (QBrush::setColor):
1813         * kwq/KWQColor.h: Removed.
1814         * kwq/KWQColor.mm: Removed.
1815         * kwq/KWQColorData.gperf: Removed.
1816         * kwq/KWQKConfigBase.h:
1817         * kwq/KWQKConfigBase.mm:
1818         (KConfig::readColorEntry):
1819         * kwq/KWQLineEdit.mm:
1820         (QLineEdit::setPalette):
1821         * kwq/KWQNamespace.h:
1822         (Qt::):
1823         * kwq/KWQObject.h:
1824         * kwq/KWQPainter.h:
1825         * kwq/KWQPainter.mm:
1826         (QPainter::setPen):
1827         (QPainter::setBrush):
1828         (QPainter::drawText):
1829         (QPainter::drawHighlightForText):
1830         (QPainter::selectedTextBackgroundColor):
1831         (_fillRectXX):
1832         (QPainter::setShadow):
1833         (QPainter::initFocusRing):
1834         * kwq/KWQPalette.h:
1835         (QColorGroup::QColorGroup):
1836         (QColorGroup::color):
1837         (QColorGroup::setColor):
1838         (QColorGroup::background):
1839         (QColorGroup::foreground):
1840         (QColorGroup::base):
1841         (QPalette::QPalette):
1842         (QPalette::background):
1843         (QPalette::foreground):
1844         * kwq/KWQPen.cpp:
1845         (QPen::QPen):
1846         (QPen::color):
1847         (QPen::setColor):
1848         * kwq/KWQPen.h:
1849         * kwq/KWQRenderTreeDebug.cpp:
1850         (operator<<):
1851         * kwq/KWQTextEdit.mm:
1852         (QTextEdit::setPalette):
1853         * loader/CachedImage.cpp:
1854         (WebCore::CachedImage::tiled_pixmap):
1855         * loader/CachedImage.h:
1856         * page/Frame.cpp:
1857         (Frame::paint):
1858         * page/Frame.h:
1859         (MarkedTextUnderline::MarkedTextUnderline):
1860         * platform/Color.cpp: Added.
1861         (WebCore::makeRGB):
1862         (WebCore::makeRGBA):
1863         (WebCore::parseHexColor):
1864         (WebCore::Color::Color):
1865         (WebCore::Color::name):
1866         (WebCore::Color::setNamedColor):
1867         (WebCore::Color::hsv):
1868         (WebCore::Color::setHsv):
1869         (WebCore::Color::light):
1870         (WebCore::Color::dark):
1871         (WebCore::Color::getRgbaF):
1872         * platform/Color.h: Added.
1873         (WebCore::Color::Color):
1874         (WebCore::Color::rgb):
1875         (WebCore::Color::setRgb):
1876         (WebCore::operator==):
1877         (WebCore::operator!=):
1878         * platform/ColorData.gperf: Added.
1879         * rendering/InlineTextBox.cpp:
1880         (khtml::simpleDifferenceBetweenColors):
1881         (khtml::correctedTextColor):
1882         (khtml::InlineTextBox::paint):
1883         (khtml::InlineTextBox::paintSelection):
1884         (khtml::InlineTextBox::paintMarkedTextBackground):
1885         (khtml::InlineTextBox::paintDecoration):
1886         * rendering/RenderTable.h:
1887         (WebCore::RenderTable::bgColor):
1888         * rendering/RenderTableCell.cpp:
1889         (WebCore::outlineBox):
1890         (WebCore::RenderTableCell::paintBoxDecorations):
1891         * rendering/font.cpp:
1892         (khtml::Font::drawHighlightForText):
1893         (khtml::Font::drawText):
1894         * rendering/font.h:
1895         * rendering/render_box.cpp:
1896         (WebCore::RenderBox::paintRootBoxDecorations):
1897         (WebCore::RenderBox::paintBackgrounds):
1898         (WebCore::RenderBox::paintBackground):
1899         (WebCore::RenderBox::paintBackgroundExtended):
1900         (WebCore::RenderBox::outlineBox):
1901         * rendering/render_box.h:
1902         * rendering/render_flow.cpp:
1903         (RenderFlow::paintFocusRing):
1904         (RenderFlow::paintOutlineForLine):
1905         * rendering/render_form.cpp:
1906         (RenderFieldset::paintBorderMinusLegend):
1907         * rendering/render_frames.cpp:
1908         (WebCore::RenderFrameSet::userResize):
1909         * rendering/render_image.cpp:
1910         (WebCore::RenderImage::paint):
1911         * rendering/render_layer.h:
1912         * rendering/render_line.cpp:
1913         (WebCore::InlineFlowBox::paintBackgrounds):
1914         (WebCore::InlineFlowBox::paintBackground):
1915         (WebCore::InlineFlowBox::paintBackgroundAndBorder):
1916         (WebCore::InlineFlowBox::paintDecorations):
1917         (WebCore::EllipsisBox::paint):
1918         * rendering/render_line.h:
1919         * rendering/render_list.cpp:
1920         (RenderListMarker::paint):
1921         * rendering/render_object.cpp:
1922         (WebCore::RenderObject::drawBorder):
1923         (WebCore::RenderObject::paintBorder):
1924         (WebCore::RenderObject::paintOutline):
1925         (WebCore::RenderObject::selectionColor):
1926         (WebCore::RenderObject::getTextDecorationColors):
1927         * rendering/render_object.h:
1928         (WebCore::RenderObject::paintBackgroundExtended):
1929         * rendering/render_replaced.cpp:
1930         (WebCore::RenderReplaced::selectionColor):
1931         * rendering/render_replaced.h:
1932         * rendering/render_style.h:
1933         (khtml::BorderValue::isTransparent):
1934         (khtml::CollapsedBorderValue::color):
1935         (khtml::RenderStyle::hasBackground):
1936         (khtml::RenderStyle::borderLeftColor):
1937         (khtml::RenderStyle::borderRightColor):
1938         (khtml::RenderStyle::borderTopColor):
1939         (khtml::RenderStyle::borderBottomColor):
1940         (khtml::RenderStyle::outlineColor):
1941         (khtml::RenderStyle::color):
1942         (khtml::RenderStyle::backgroundColor):
1943         (khtml::RenderStyle::setBackgroundColor):
1944         (khtml::RenderStyle::setBorderLeftColor):
1945         (khtml::RenderStyle::setBorderRightColor):
1946         (khtml::RenderStyle::setBorderTopColor):
1947         (khtml::RenderStyle::setBorderBottomColor):
1948         (khtml::RenderStyle::setOutlineColor):
1949         (khtml::RenderStyle::setColor):
1950         (khtml::RenderStyle::initialColor):
1951         * rendering/render_theme.cpp:
1952         (khtml::RenderTheme::isControlStyled):
1953         * rendering/render_theme.h:
1954
1955 2006-01-24  Darin Adler  <darin@apple.com>
1956
1957         Reviewed by John and Anders.
1958
1959         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6732
1960           REGRESSION: Repro crash at Google Maps
1961
1962         * khtml/ecma/JSXMLHttpRequest.cpp:
1963         (KJS::JSXMLHttpRequest::getValueProperty): Clean up a bit, using PassRefPtr where appropriate.
1964         (KJS::JSXMLHttpRequest::mark): Remove get calls now that getter functions don't return PassRefPtr.
1965         (KJS::JSXMLHttpRequest::JSXMLHttpRequest): Put the object into the DOM objects map.
1966         (KJS::JSXMLHttpRequest::~JSXMLHttpRequest): Remove the object from the DOM objects map. Also clear
1967         out both listeners so the implementation object isn't left with dangling pointers (since we won't
1968         be around to mark those objects any more).
1969         (KJS::JSXMLHttpRequestProtoFunc::callAsFunction): Tightened up the code a bit.
1970
1971         * xml/xmlhttprequest.h:
1972         * xml/xmlhttprequest.cpp:
1973         (WebCore::XMLHttpRequest::getResponseXML): Change to return just a plain old pointer. Remove
1974         the unnecessary typeIsXML boolean.
1975         (WebCore::XMLHttpRequest::onReadyStateChangeListener): Change to return just a plain old pointer.
1976         Update for name changes.
1977         (WebCore::XMLHttpRequest::setOnReadyStateChangeListener): Ditto.
1978         (WebCore::XMLHttpRequest::onLoadListener): Ditto.
1979         (WebCore::XMLHttpRequest::setOnLoadListener): Ditto.
1980         (WebCore::XMLHttpRequest::send): Protect the DOM wrapper if any as well as ourselves while
1981         the load is in progress.
1982         (WebCore::XMLHttpRequest::abort): Unprotect to balance out the above.
1983         (WebCore::XMLHttpRequest::slotFinished): Ditto.
1984
1985         * khtml/ecma/JSXMLHttpRequest.h: Just formatting changes.
1986
1987 2006-01-24  Darin Adler  <darin@apple.com>
1988
1989         Reviewed by Justin.
1990
1991         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6753
1992           REGRESSION (r12282-12292): Crash loading TinyMCE test app
1993
1994         * khtml/xml/ContainerNodeImpl.h: Remove some internals that don't need
1995         to be member functions.
1996         * khtml/xml/ContainerNodeImpl.cpp:
1997         (WebCore::ContainerNodeImpl::insertBefore): Improved algorithm to keep
1998         refs to more things so that we don't end up with a dangling pointer (fixes
1999         the crash) and so that we do not crash if someone modifies the tree inside
2000         a DOM mutation event handler (theoretical only at this point, needs test
2001         cases).
2002         (WebCore::ContainerNodeImpl::replaceChild): Ditto.
2003         (WebCore::willRemoveChild): Changed from member function to free function.
2004         (WebCore::ContainerNodeImpl::removeChild): Fix potential problem if the
2005         mutation event handler moves the node into a different parent.
2006         (WebCore::ContainerNodeImpl::appendChild): Made changes like those in
2007         insertBefore above.
2008         (WebCore::dispatchChildInsertionEvents): Changed from member function to
2009         free function. Tightened up handling of some edge cases.
2010         (WebCore::dispatchChildRemovalEvents): Ditto.
2011
2012 2006-01-24  Darin Adler  <darin@apple.com>
2013
2014         Reviewed by John Sullivan.
2015
2016         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6696
2017           REGRESSION: JavaScript window.opener set incorrectly
2018
2019         * khtml/ecma/kjs_window.cpp: (KJS::WindowFunc::callAsFunction):
2020         Fix local variable "frame" that was shadowing another local variable
2021         named "frame" by naming the one for the new frame "newFrame".
2022
2023 2006-01-24  Maciej Stachowiak  <mjs@apple.com>
2024
2025         - fix build
2026
2027         * ksvg2/scripts/make_names.pl: Update script to generate code that
2028         works with the new HashMap.
2029
2030 2006-01-23  Darin Adler  <darin@apple.com>
2031
2032         Reviewed by Eric.
2033
2034         - fixed a storage leak found by running run-webkit-tests fast --leak
2035
2036         * khtml/xml/dom_xmlimpl.cpp:
2037         (ProcessingInstructionImpl::checkStyleSheet): Removed bogus deref call,
2038         since the RefPtr handles it for us. Also deployed PassRefPtr in one place.
2039         (ProcessingInstructionImpl::setStyleSheet): Removed more bogus ref/deref calls.
2040
2041 2006-01-23  Maciej Stachowiak  <mjs@apple.com>
2042
2043         Rubber stamped by Eric.
2044
2045         - Made some functions return const AtomicString& instead of
2046         AtomicString because they could. 
2047         
2048         Result of Darin's and Eric's comments on the last patch.
2049
2050         * khtml/html/HTMLGenericFormElementImpl.cpp:
2051         (WebCore::HTMLGenericFormElementImpl::name):
2052         * khtml/html/HTMLGenericFormElementImpl.h:
2053         * khtml/html/HTMLInputElementImpl.cpp:
2054         (WebCore::HTMLInputElementImpl::name):
2055         * khtml/html/HTMLInputElementImpl.h:
2056
2057 2006-01-23  Maciej Stachowiak  <mjs@apple.com>
2058
2059         Reviewed by Eric.
2060
2061         - renamed PointerHash to PtrHash
2062         - made PtrHash the default hash function for int and pointer types that aren't further specialized
2063         - added an AtomicStringImpl class to make it easier and more typesafe to identity hash atomic strings
2064         - did appropriate consequent cleanup (very few places now need to declare a hash function)
2065         http://bugzilla.opendarwin.org/show_bug.cgi?id=6752
2066         
2067         * bindings/objc/DOM.mm:
2068         * bridge/mac/WebCoreFrameBridge.mm:
2069         (-[WebCoreFrameBridge elementWithName:inForm:]):
2070         * css/cssstyleselector.cpp:
2071         (WebCore::CSSRuleSet::getIDRules):
2072         (WebCore::CSSRuleSet::getClassRules):
2073         (WebCore::CSSRuleSet::getTagRules):
2074         (WebCore::CSSRuleSet::addToRuleSet):
2075         * khtml/dom/dom_string.h:
2076         (KXMLCore::):
2077         * khtml/ecma/kjs_binding.cpp:
2078         (KJS::UString::UString):
2079         * khtml/ecma/kjs_dom.cpp:
2080         (KJS::DOMNode::mark):
2081         * khtml/ecma/kjs_html.cpp:
2082         (KJS::KJS::HTMLElement::classInfo):
2083         (KJS::HTMLElement::accessors):
2084         (KJS::HTMLElement::selectSetter):
2085         (KJS::HTMLElement::inputSetter):
2086         (KJS::HTMLElement::textAreaSetter):
2087         (KJS::HTMLElement::buttonSetter):
2088         * khtml/ecma/kjs_window.h:
2089         * khtml/editing/apply_style_command.cpp:
2090         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
2091         * khtml/html/HTMLCollectionImpl.h:
2092         * khtml/html/HTMLElementImpl.cpp:
2093         (WebCore::HTMLElementImpl::isRecognizedTagName):
2094         (WebCore::inlineTagList):
2095         (WebCore::blockTagList):
2096         * khtml/html/HTMLFormCollectionImpl.cpp:
2097         (WebCore::HTMLFormCollectionImpl::updateNameCache):
2098         * khtml/html/HTMLGenericFormElementImpl.cpp:
2099         (WebCore::HTMLGenericFormElementImpl::name):
2100         (WebCore::HTMLGenericFormElementImpl::setName):
2101         * khtml/html/HTMLGenericFormElementImpl.h:
2102         * khtml/html/HTMLInputElementImpl.cpp:
2103         (WebCore::HTMLInputElementImpl::name):
2104         * khtml/html/HTMLInputElementImpl.h:
2105         * khtml/html/htmlfactory.cpp:
2106         (DOM::HTMLElementFactory::createHTMLElement):
2107         * khtml/html/htmlparser.cpp:
2108         (HTMLParser::isHeaderTag):
2109         (HTMLParser::isResidualStyleTag):
2110         (HTMLParser::isAffectedByResidualStyle):
2111         * khtml/xml/DocumentImpl.cpp:
2112         (WebCore::DocumentImpl::checkedRadioButtonForGroup):
2113         (WebCore::DocumentImpl::removeRadioButtonGroup):
2114         * khtml/xml/DocumentImpl.h:
2115         * khtml/xml/NodeImpl.h:
2116         * khtml/xml/dom_atomicstring.h:
2117         (DOM::AtomicString::AtomicString):
2118         (DOM::AtomicString::impl):
2119         (KXMLCore::):
2120         * khtml/xml/dom_stringimpl.cpp:
2121         (DOM::equal):
2122         * khtml/xml/dom_stringimpl.h:
2123         (KXMLCore::):
2124         * khtml/xml/xml_tokenizer.h:
2125         * ksvg2/misc/KSVGTimeScheduler.cpp:
2126         (KSVG::SVGTimer::notifyAll):
2127         * kwq/KWQKJobClasses.h:
2128         * kwq/KWQObject.cpp:
2129         * loader/CachedObject.h:
2130         * loader/CachedObjectClientWalker.h:
2131         * loader/loader.h:
2132         * page/Frame.cpp:
2133         (Frame::endAllLifeSupport):
2134         * rendering/render_canvas.cpp:
2135         (RenderCanvas::selectionRect):
2136         (RenderCanvas::setSelection):
2137         * rendering/render_canvas.h:
2138         * rendering/render_object.h:
2139         * xml/xmlhttprequest.h:
2140
2141 2006-01-23 Mitz Pettel  <opendarwin.org@mitzpettel.com>
2142
2143         Reviewed by Darin.
2144
2145         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6733
2146           REGRESSION: html input doesn't honor change to value
2147
2148         * rendering/render_form.cpp: (RenderLineEdit::slotTextChanged): Made newText a
2149         DOMString. Assigning the empty DOMString to a QString and back to a DOMString
2150         resulted in a null string, which should be avoided here.
2151
2152         * khtml/dom/dom_string.cpp: (DOM::DOMString::qstring): Don't turn an empty
2153         DOMString into a null QString; make an empty QString instead.
2154
2155 2006-01-23  Darin Adler  <darin@apple.com>
2156
2157         Reviewed by Maciej.
2158
2159         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6385
2160           REGRESSION: Unnamed frames return a generated name as window.frameElement.name
2161
2162         Test: fast/frames/frame-element-name.html
2163
2164         * khtml/ecma/kjs_html.cpp: (KJS::HTMLElement::getOwnPropertySlot):
2165         Remove the quirk where frame and iframe elements reflect all the
2166         properties of the window inside the frame. Testing indicates that
2167         no other browser does this -- not sure why we were doing it.
2168
2169 2006-01-23  Maciej Stachowiak  <mjs@apple.com>
2170
2171         Rubber stamped by Tim Hatcher.
2172         
2173         - renamed insert() operation on HashSet, HashCountedSet and HashTable to add()
2174         for consistency with HashMap
2175
2176         * bridge/mac/MacFrame.mm:
2177         (MacFrame::didTellBridgeAboutLoad):
2178         * khtml/ecma/kjs_dom.cpp:
2179         (KJS::DOMNode::mark):
2180         * khtml/html/HTMLElementImpl.cpp:
2181         (WebCore::HTMLElementImpl::isRecognizedTagName):
2182         (WebCore::inlineTagList):
2183         (WebCore::blockTagList):
2184         * khtml/html/HTMLFormCollectionImpl.cpp:
2185         (WebCore::HTMLFormCollectionImpl::updateNameCache):
2186         * khtml/html/htmlparser.cpp:
2187         (HTMLParser::isHeaderTag):
2188         (HTMLParser::isResidualStyleTag):
2189         (HTMLParser::isAffectedByResidualStyle):
2190         * khtml/xml/DocumentImpl.cpp:
2191         (WebCore::DocumentImpl::addElementById):
2192         (WebCore::DocumentImpl::registerDisconnectedNodeWithEventListeners):
2193         * khtml/xml/NodeImpl.cpp:
2194         (WebCore::NodeImpl::registerNodeList):
2195         * khtml/xml/dom_atomicstring.cpp:
2196         (DOM::AtomicString::add):
2197         * khtml/xml/dom_qname.cpp:
2198         (DOM::QualifiedName::QualifiedName):
2199         * loader/CachedObject.cpp:
2200         (WebCore::CachedObject::ref):
2201         * page/Frame.cpp:
2202         (Frame::keepAlive):
2203         * rendering/render_canvas.cpp:
2204         (RenderCanvas::addWidget):
2205         * rendering/render_frames.cpp:
2206         (WebCore::RenderPartObject::updateWidget):
2207         * rendering/render_line.cpp:
2208         (WebCore::InlineFlowBox::paint):
2209         * xml/xmlhttprequest.cpp:
2210         (WebCore::XMLHttpRequest::addToRequestsByDocument):
2211
2212 2006-01-23  Justin Garcia  <justin.garcia@apple.com>
2213
2214         Reviewed by thatcher
2215         
2216         Turned on -O2 for B&I build.
2217
2218         * WebCore.xcodeproj/project.pbxproj:
2219
2220 2006-01-23  Darin Adler  <darin@apple.com>
2221
2222         Reviewed by John Sullivan.
2223
2224         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6617
2225           REGRESSION: Crash in cloneChildNodes when clicking element
2226
2227         Test: fast/dom/clone-node-form-elements-with-attr.html
2228
2229         Changed cloneNode and some other functions to return PassRefPtr.
2230         Also made m_render private and changed its name to m_renderer.
2231
2232         * bindings/objc/DOM.mm: (-[DOMNode cloneNode:]): Add call to get() needed
2233         now that cloneNode returns a PassRefPtr.
2234
2235         * khtml/editing/break_blockquote_command.cpp:
2236         (WebCore::BreakBlockquoteCommand::doApply):
2237         * khtml/editing/insert_paragraph_separator_command.cpp:
2238         (khtml::InsertParagraphSeparatorCommand::doApply):
2239         * khtml/editing/split_element_command.cpp:
2240         (khtml::SplitElementCommand::doApply):
2241         * khtml/html/htmlparser.cpp:
2242         (HTMLParser::handleResidualStyleCloseTagAcrossBlocks):
2243         (HTMLParser::reopenResidualStyleTags):
2244         * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::processContents):
2245         * ksvg2/svg/SVGUseElementImpl.cpp: (SVGUseElementImpl::closeRenderer):
2246         Use RefPtr and PassRefPtr as appropriate, since the result of cloneNode
2247         is now a referenced object in a PassRefPtr rather than a floating one and
2248         so needs to be kept referenced until used.
2249
2250         * khtml/html/HTMLElementImpl.h:
2251         * khtml/html/HTMLElementImpl.cpp:
2252         (WebCore::HTMLElementImpl::cloneNode): Changed to return a PassRefPtr.
2253         (WebCore::HTMLElementImpl::children): Ditto.
2254         * khtml/xml/DocumentFragmentImpl.h:
2255         * khtml/xml/DocumentFragmentImpl.cpp:
2256         (DOM::DocumentFragmentImpl::cloneNode): Changed to return a PassRefPtr.
2257         * khtml/xml/DocumentImpl.h:
2258         * khtml/xml/DocumentTypeImpl.h:
2259         * khtml/xml/DocumentTypeImpl.cpp:
2260         (DOM::DocumentTypeImpl::cloneNode): Changed to return a PassRefPtr.
2261         * khtml/xml/NamedNodeMapImpl.h:
2262         (WebCore::NamedNodeMapImpl::getNamedItem): Changed to return PassRefPtr.
2263         (WebCore::NamedNodeMapImpl::removeNamedItem): Ditto.
2264         (WebCore::NamedNodeMapImpl::setNamedItemNS): Ditto.
2265
2266         * khtml/html/HTMLGenericFormElementImpl.cpp:
2267         (WebCore::HTMLGenericFormElementImpl::attach): Use renderer() instead of
2268         getting at m_render directly.
2269         (WebCore::HTMLGenericFormElementImpl::recalcStyle): Ditto.
2270         (WebCore::HTMLGenericFormElementImpl::isFocusable): Ditto.
2271         (WebCore::HTMLGenericFormElementImpl::isKeyboardFocusable): Ditto.
2272         (WebCore::HTMLGenericFormElementImpl::isMouseFocusable): Ditto.
2273         * khtml/html/HTMLInputElementImpl.cpp:
2274         (WebCore::HTMLInputElementImpl::selectionStart): Ditto.
2275         (WebCore::HTMLInputElementImpl::selectionEnd): Ditto.
2276         (WebCore::HTMLInputElementImpl::setSelectionStart): Ditto.
2277         (WebCore::HTMLInputElementImpl::setSelectionEnd): Ditto.
2278         (WebCore::HTMLInputElementImpl::select): Ditto.
2279         (WebCore::HTMLInputElementImpl::setSelectionRange): Ditto.
2280         (WebCore::HTMLInputElementImpl::parseMappedAttribute): Ditto.
2281         (WebCore::HTMLInputElementImpl::setValue): Ditto.
2282         (WebCore::HTMLInputElementImpl::defaultEventHandler): Ditto.
2283         * khtml/html/HTMLSelectElementImpl.cpp:
2284         (WebCore::HTMLSelectElementImpl::recalcStyle): Ditto.
2285         (WebCore::HTMLSelectElementImpl::setRecalcListItems): Ditto.
2286         (WebCore::HTMLSelectElementImpl::reset): Ditto.
2287         (WebCore::HTMLSelectElementImpl::notifyOptionSelected): Ditto.
2288         (WebCore::HTMLSelectElementImpl::defaultEventHandler): Ditto.
2289         * khtml/html/HTMLTextAreaElementImpl.cpp:
2290         (WebCore::HTMLTextAreaElementImpl::selectionStart): Ditto.
2291         (WebCore::HTMLTextAreaElementImpl::selectionEnd): Ditto.
2292         (WebCore::HTMLTextAreaElementImpl::setSelectionStart): Ditto.
2293         (WebCore::HTMLTextAreaElementImpl::setSelectionEnd): Ditto.
2294         (WebCore::HTMLTextAreaElementImpl::select): Ditto.
2295         (WebCore::HTMLTextAreaElementImpl::setSelectionRange): Ditto.
2296         (WebCore::HTMLTextAreaElementImpl::updateValue): Ditto.
2297         (WebCore::HTMLTextAreaElementImpl::setValue): Ditto.
2298         * khtml/html/html_baseimpl.cpp:
2299         (WebCore::HTMLFrameElementImpl::updateForNewURL): Ditto.
2300         (WebCore::HTMLFrameElementImpl::openURL): Ditto.
2301         (WebCore::HTMLFrameElementImpl::attach): Ditto.
2302         (WebCore::HTMLFrameElementImpl::close): Ditto.
2303         (WebCore::HTMLFrameElementImpl::willRemove): Ditto.
2304         (WebCore::HTMLFrameElementImpl::isFocusable): Ditto.
2305         (WebCore::HTMLFrameElementImpl::setFocus): Ditto.
2306         (WebCore::HTMLFrameElementImpl::frameWidth): Ditto.
2307         (WebCore::HTMLFrameElementImpl::frameHeight): Ditto.
2308         (WebCore::HTMLFrameSetElementImpl::defaultEventHandler): Ditto.
2309         (WebCore::HTMLFrameSetElementImpl::recalcStyle): Ditto.
2310         (WebCore::HTMLIFrameElementImpl::attach): Ditto.
2311         (WebCore::HTMLIFrameElementImpl::recalcStyle): Ditto.
2312         * khtml/html/html_imageimpl.cpp:
2313         (WebCore::HTMLImageElementImpl::parseMappedAttribute): Ditto.
2314         (WebCore::HTMLImageElementImpl::width): Ditto.
2315         (WebCore::HTMLImageElementImpl::height): Ditto.
2316         * khtml/html/html_inlineimpl.cpp:
2317         (WebCore::HTMLAnchorElementImpl::isFocusable): Ditto.
2318         * khtml/html/html_listimpl.cpp:
2319         (DOM::HTMLLIElementImpl::parseMappedAttribute): Ditto.
2320         (DOM::HTMLLIElementImpl::attach): Ditto.
2321         * khtml/html/html_objectimpl.cpp:
2322         (WebCore::HTMLAppletElementImpl::getAppletInstance): Ditto.
2323         (WebCore::HTMLAppletElementImpl::closeRenderer): Ditto.
2324         (WebCore::HTMLEmbedElementImpl::getEmbedInstance): Ditto.
2325         (WebCore::HTMLEmbedElementImpl::attach): Ditto.
2326         (WebCore::HTMLObjectElementImpl::getObjectInstance): Ditto.
2327         (WebCore::HTMLObjectElementImpl::parseMappedAttribute): Ditto.
2328         (WebCore::HTMLObjectElementImpl::attach): Ditto.
2329         (WebCore::HTMLObjectElementImpl::detach): Ditto.
2330         (WebCore::HTMLObjectElementImpl::recalcStyle): Ditto.
2331         * khtml/html/html_tableimpl.cpp:
2332         (WebCore::HTMLTableElementImpl::parseMappedAttribute): Ditto.
2333         (WebCore::HTMLTableElementImpl::attach): Ditto.
2334         * khtml/xml/ContainerNodeImpl.cpp:
2335         (WebCore::ContainerNodeImpl::getUpperLeftCorner): Ditto.
2336         (WebCore::ContainerNodeImpl::getLowerRightCorner): Ditto.
2337         (WebCore::ContainerNodeImpl::setActive): Ditto.
2338         (WebCore::ContainerNodeImpl::setHovered): Ditto.
2339         * khtml/xml/DocumentImpl.cpp:
2340         (WebCore::DocumentImpl::~DocumentImpl): Ditto.
2341         (WebCore::DocumentImpl::elementFromPoint): Ditto.
2342         (WebCore::DocumentImpl::recalcStyle): Ditto.
2343         (WebCore::DocumentImpl::attach): Ditto.
2344         (WebCore::DocumentImpl::restoreRenderer): Ditto.
2345         (WebCore::DocumentImpl::detach): Ditto.
2346         (WebCore::DocumentImpl::setVisuallyOrdered): Ditto.
2347         (WebCore::DocumentImpl::updateSelection): Ditto.
2348         (WebCore::DocumentImpl::prepareMouseEvent): Ditto.
2349         (WebCore::DocumentImpl::cloneNode): Changed to return PassRefPtr.
2350         (WebCore::DocumentImpl::recalcStyleSelector): Use renderer() instead
2351         of getting at m_render directly.
2352         (WebCore::DocumentImpl::setInPageCache): Ditto.
2353
2354         * khtml/xml/NodeImpl.h:
2355         * khtml/xml/NodeImpl.cpp:
2356         (WebCore::NodeImpl::NodeImpl): Changed m_render to m_renderer.
2357         (WebCore::NodeImpl::~NodeImpl): Changed use of m_render to renderer().
2358         (WebCore::NodeImpl::getRect): Ditto.
2359         (WebCore::NodeImpl::attach): Ditto.
2360         (WebCore::NodeImpl::detach): Ditto.
2361         (WebCore::NodeImpl::createRendererIfNeeded): Ditto.
2362         (WebCore::NodeImpl::getElementsByTagName): Changed to return PassRefPtr.
2363         (WebCore::NodeImpl::getElementsByTagNameNS): Ditto.
2364
2365         * khtml/xml/dom_elementimpl.h:
2366         * khtml/xml/dom_elementimpl.cpp:
2367         (WebCore::AttrImpl::cloneNode): Changed to return PassRefPtr.
2368         (WebCore::ElementImpl::cloneNode): Ditto.
2369         (WebCore::ElementImpl::scrollIntoView): Use renderer() instead of m_render.
2370         (WebCore::ElementImpl::scrollIntoViewIfNeeded): Ditto.
2371         (WebCore::ElementImpl::recalcStyle): Ditto.
2372         (WebCore::ElementImpl::setAttributeNode): Changed to return PassRefPtr.
2373         (WebCore::ElementImpl::removeAttributeNode): Ditto.
2374         (WebCore::NamedAttrMapImpl::removeNamedItemNS): Ditto.
2375         (WebCore::NamedAttrMapImpl::setNamedItem): Ditto.
2376         (WebCore::NamedAttrMapImpl::removeNamedItem): Ditto.
2377         (DOM::ElementImpl::setAttributeNodeNS): Ditto.
2378
2379         * khtml/xml/dom_textimpl.h:
2380         * khtml/xml/dom_textimpl.cpp:
2381         (CharacterDataImpl::setData): Changed use of m_render to renderer().
2382         (CharacterDataImpl::appendData): Ditto.
2383         (CharacterDataImpl::insertData): Ditto.
2384         (CharacterDataImpl::deleteData): Ditto.
2385         (CharacterDataImpl::replaceData): Ditto.
2386         (CommentImpl::cloneNode): Changed to return PassRefPtr.
2387         (TextImpl::splitText): Changed use of m_render to renderer().
2388         (TextImpl::cloneNode): Changed to return PassRefPtr.
2389         (TextImpl::recalcStyle): Changed use of m_render to renderer().
2390         (CDATASectionImpl::cloneNode): Changed to return PassRefPtr.
2391
2392         * khtml/xml/dom_xmlimpl.h:
2393         * khtml/xml/dom_xmlimpl.cpp:
2394         (DOM::EntityImpl::cloneNode): Changed to return PassRefPtr.
2395         (DOM::EntityReferenceImpl::cloneNode): Ditto.
2396         (DOM::NotationImpl::cloneNode): Ditto.
2397         (DOM::ProcessingInstructionImpl::cloneNode): Ditto.
2398
2399         - removed unused code
2400
2401         * khtml/html/html_documentimpl.cpp: Removed unused slotHistoryChanged function.
2402         * khtml/html/html_documentimpl.h: Ditto.
2403         * kwq/KWQObject.cpp: (QObject::connect): Removed special case for
2404         slotHistoryChanged, no longer used.
2405
2406         - fixed storage leak
2407
2408         * bridge/mac/MacFrame.mm: (MacFrame::~MacFrame): Delete window widget.
2409
2410 2006-01-23  Anders Carlsson  <andersca@mac.com>
2411
2412         Forgot to add this as part of 
2413         http://bugzilla.opendarwin.org/show_bug.cgi?id=3869
2414         
2415         * manual-tests/resources/webkit-background.png: Added.
2416
2417 2006-01-22  Darin Adler  <darin@apple.com>
2418
2419         - fix layout tests
2420
2421         * rendering/RenderTable.cpp: (WebCore::RenderTable::addChild): Added
2422         missing code to set wrapInAnonymousSection false in the case where
2423         adding a footer.
2424
2425 2006-01-22  Maciej Stachowiak  <mjs@apple.com>
2426
2427         Reviewed by Darin.
2428         
2429         - Set up Page class and invert Frame / WebCoreFrameBridge ownership
2430         http://bugzilla.opendarwin.org/show_bug.cgi?id=6577
2431
2432         * bridge/mac/MacFrame.h:
2433         * bridge/mac/MacFrame.mm:
2434         (MacFrame::MacFrame): Initialize _bridge
2435         (MacFrame::~MacFrame): Clear the bridge's frame pointer and release it.
2436         (Frame::frameDetached): Reverse order of removing from old-style frames
2437         array and calling frameDetached.
2438         (MacFrame::createPart): Don't ref the part when creating it, since the child
2439         bridge is no longer going to own a ref.
2440         (MacFrame::setBridge): KWQRetain / KWQRelease since we know own the bridge.
2441         (MacFrame::detachFromView): New method; clear out the view.
2442         * bridge/mac/WebCoreFrameBridge.h:
2443         * bridge/mac/WebCoreFrameBridge.mm:
2444         (Bridge): Helper method to get a WebCoreFrameBridge from a Frame.
2445         (-[WebCoreFrameBridge firstChild]): Call through Frame.
2446         (-[WebCoreFrameBridge lastChild]): ditto
2447         (-[WebCoreFrameBridge childCount]): ditto
2448         (-[WebCoreFrameBridge previousSibling]): ditto
2449         (-[WebCoreFrameBridge nextSibling]): ditto
2450         (-[WebCoreFrameBridge isDescendantOfFrame:]): No need to cast parent
2451         pointer.
2452         (-[WebCoreFrameBridge appendChild:]): Call through Frame.
2453         (-[WebCoreFrameBridge _clearRenderPart]): New helper method to free
2454         the renderPart when removing a child.
2455         (-[WebCoreFrameBridge removeChild:]): Clear child's render part
2456         and call through to Frame.
2457         (-[WebCoreFrameBridge dealloc]): Remove unneeded m_frame-related code.
2458         (-[WebCoreFrameBridge finalize]): ditto
2459         (-[WebCoreFrameBridge clearFrame]): New helper method, needed now that
2460         bridge can outlive frame.
2461         (-[WebCoreFrameBridge handleFallbackContent]): Make safe against a null
2462         frame.
2463         (-[WebCoreFrameBridge removeFromFrame]): ditto
2464         * bridge/mac/WebCorePageBridge.h:
2465         * bridge/mac/WebCorePageBridge.mm:
2466         (-[WebCorePageBridge initWithMainFrame:]): Create a Page instance.
2467         (-[WebCorePageBridge dealloc]): Delete the Page.
2468         (-[WebCorePageBridge mainFrame]): Get the main frame from the Page.
2469         * khtml/ecma/kjs_binding.cpp:
2470         (KJS::ScriptInterpreter::globalExec): Override; keep frame alive, then
2471         call superclass.
2472         * khtml/ecma/kjs_binding.h:
2473         * khtml/ecma/kjs_proxy.cpp:
2474         (KJSProxyImpl::clear): Don't pass exec to window.
2475         (KJSProxyImpl::interpreter): Don't do keepAlive.
2476         * khtml/ecma/kjs_window.cpp:
2477         (KJS::Window::isSafeScript): If the active part's document is gone, use the frame's
2478         URL for security check purposes.
2479         (KJS::Window::clear): Don't take an ExecState parameter any more - it
2480         wasn't used.
2481         * khtml/ecma/kjs_window.h:
2482         * khtml/xml/DocumentImpl.cpp:
2483         (WebCore::DocumentImpl::implicitOpen): If we've got a tokenizer, delete
2484         it before closing - you don't ever want to fire an onload handler because of
2485         an open.
2486         * page/Frame.cpp:
2487         (Frame::init): Pass `this' to FramePrivate constructor.
2488         (FrameCounter::~FrameCounter): Added debug counting of leftover
2489         Frame objects on exit.
2490         (Frame::Frame): Moved out-of-line. Increment debug counter.
2491         (Frame::~Frame): Assert that there is no life support going, either at the
2492         start or end of this method. Decrement frame counter.
2493         (Frame::stopLoading): tweaked for the fact that ChildFrame::m_frame is now
2494         a RefPtr.
2495         (Frame::clear): ditto
2496         (Frame::stop): ditto
2497         (Frame::stopAnimations): ditto
2498         (Frame::checkEmitLoadEvent): ditto
2499         (Frame::processObjectRequest): ditto
2500         (Frame::childFrame): ditto
2501         (Frame::findFrame): ditto
2502         (Frame::setZoomFactor): ditto
2503         (Frame::frames): ditto
2504         (Frame::connectChild): ditto
2505         (Frame::disconnectChild): ditto
2506         (Frame::endAllLifeSupport): Method that, in debug mode, will clear
2507         all life suppor timers so the Frame exit counter works.
2508         (Frame::keepAlive): In debug mode, add proper support for
2509         endAllLifeSupport
2510         (Frame::slotEndLifeSupport): ditto
2511         (Frame::setPolicyBaseURL): Update for the fact that ChildFrame::m_frame is now
2512         a RefPtr.
2513         (Frame::treeNode): New helper method, get the FrameTreeNode class that implements
2514         frame tree traversal.
2515         (Frame::nextSibling): Simple wrapper that calls through to treeNode().
2516         (Frame::previousSibling): ditto
2517         (Frame::firstChild): ditto
2518         (Frame::lastChild): ditto
2519         (Frame::childCount): ditto
2520         (Frame::appendChild): ditto
2521         (Frame::removeChild): ditto
2522         (Frame::detachFromView): no-op, just a virtual base for the MAcFrame method.
2523         * page/Frame.h:
2524         * page/FramePrivate.h:
2525         (FramePrivate::FramePrivate): Add FrameTreeNode member.
2526         * page/FrameTreeNode.cpp: Added.
2527         (FrameTreeNode::~FrameTreeNode): detach all children from their view
2528         (FrameTreeNode::appendChild): implemented
2529         (FrameTreeNode::removeChild): implemented - make sure to detach child
2530         from its view.
2531         * page/FrameTreeNode.h: Added.
2532         (FrameTreeNode::FrameTreeNode): New; initialize fields tht need it.
2533         (FrameTreeNode::nextSibling): Trivial inline.
2534         (FrameTreeNode::previousSibling): ditto
2535         (FrameTreeNode::firstChild): ditto
2536         (FrameTreeNode::lastChild): ditto
2537         (FrameTreeNode::childCount): ditto
2538         * page/Page.cpp: Added.
2539         (Page::Page): Initialize mainFrame and bump pageCount appropriately.
2540         (Page::~Page): Detach main frame from view, handle ending life support
2541         when last frame is destroyed.
2542         * page/Page.h: Added.
2543         (Page::mainFrame): Trivial inline.
2544         * WebCore.xcodeproj/project.pbxproj: Add new files.
2545
2546 2006-01-22  Darin Adler  <darin@apple.com>
2547
2548         * Info.plist: Updated Apple copyright date. Need to update others
2549         too at some point.
2550
2551         * WebCore-svg.exp: Removed unused empty file.
2552
2553 2006-01-22  Eric Seidel  <eseidel@apple.com>
2554
2555         Reviewed by darin.
2556
2557         Make <animateColor> work again (broke during DOM merger).
2558         http://bugzilla.opendarwin.org/show_bug.cgi?id=5964
2559         
2560         No layout test possible.
2561
2562         * WebCore.xcodeproj/project.pbxproj:
2563         * kcanvas/device/quartz/KCanvasItemQuartz.h:
2564         * kcanvas/device/quartz/KCanvasItemQuartz.mm:
2565         (KCanvasItemQuartz::getAbsoluteRepaintRect): moved to .cpp file
2566         * khtml/xml/DocumentImpl.cpp:
2567         (WebCore::DocumentImpl::implicitClose): start svg animations
2568         (WebCore::DocumentImpl::svgExtensions): svg document extensions
2569         (WebCore::DocumentImpl::accessSVGExtensions): svg doc extensions
2570         * khtml/xml/DocumentImpl.h:
2571         * ksvg2/css/SVGCSSStyleSelector.cpp:
2572         (KDOM::CSSStyleSelector::applySVGProperty):
2573         * ksvg2/svg/SVGAElementImpl.cpp:
2574         (SVGAElementImpl::defaultEventHandler): cleanup
2575         * ksvg2/svg/SVGAnimateColorElementImpl.cpp:
2576         (SVGAnimateColorElementImpl::handleTimerEvent): update css lookup
2577         * ksvg2/svg/SVGAnimateElementImpl.cpp:
2578         (SVGAnimateElementImpl::handleTimerEvent): fix css property lookup
2579         * ksvg2/svg/SVGAnimateTransformElementImpl.cpp:
2580         (SVGAnimateTransformElementImpl::handleTimerEvent):
2581         * ksvg2/svg/SVGAnimationElementImpl.cpp:
2582         (SVGAnimationElementImpl::closeRenderer): use doc extensions
2583         (SVGAnimationElementImpl::targetAttribute): fix css properties
2584         (SVGAnimationElementImpl::setTargetAttribute): fix css properties
2585         * ksvg2/svg/SVGDocumentImpl.cpp:
2586         (SVGDocumentImpl::svgView): remove unnecessary static cast
2587         (SVGDocumentImpl::executeScripts):
2588         * ksvg2/svg/SVGDocumentImpl.h:
2589         * ksvg2/svg/SVGElementImpl.cpp:
2590         (WebCore::SVGElementImpl::addSVGEventListener): helper function
2591         (WebCore::SVGElementImpl::parseMappedAttribute): use helper
2592         * ksvg2/svg/SVGElementImpl.h:
2593         * ksvg2/svg/SVGGElementImpl.cpp:
2594         * ksvg2/svg/SVGGElementImpl.h:
2595         * ksvg2/svg/SVGSVGElementImpl.cpp:
2596         (WebCore::SVGSVGElementImpl::SVGSVGElementImpl):
2597         (WebCore::SVGSVGElementImpl::~SVGSVGElementImpl):
2598         (WebCore::SVGSVGElementImpl::addSVGWindowEventListner): helper
2599         (WebCore::SVGSVGElementImpl::parseMappedAttribute): use helper
2600         * ksvg2/svg/SVGSVGElementImpl.h:
2601         * ksvg2/svg/SVGSetElementImpl.cpp:
2602         (SVGSetElementImpl::handleTimerEvent): use doc extensions
2603         * ksvg2/svg/SVGStyledElementImpl.h:
2604         * page/Frame.cpp:
2605         (Frame::pauseTimeouts): pause svg animation
2606         (Frame::resumeTimeouts): resume svg animation
2607         * rendering/render_canvas.h:
2608
2609 2006-01-22  Darin Adler  <darin@apple.com>
2610
2611         - fix deployment builds
2612
2613         * rendering/RenderTable.cpp: (WebCore::RenderTable::addChild): Init bool.
2614
2615 2006-01-22  Darin Adler  <darin@apple.com>
2616
2617         Reviewed by Maciej.
2618
2619         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5731
2620           Form element as display table-cell hangs Safari (will eventually crash)
2621
2622         Test: fast/table/form-with-table-style.html
2623
2624         Hang was caused by the fact that RenderContainer has code to wrap table
2625         styled elements in appropriate anonymous table elements, but the table
2626         elements themselves have a special case for form elements that causes them
2627         to call through, which led to infinite recursion as RenderContainer kept
2628         making new tables which kept calling through to RenderContainer::addChild.
2629
2630         * rendering/RenderTable.cpp:
2631         (WebCore::RenderTable::addChild): Improved logic about wrapping children
2632         in anonymous table sections in the following ways: (1) Do wrap a form
2633         properly it has a table display style (such as table-cell or table-row).
2634         (2) When an item has a particular display style, check that it has the
2635         right type of render object before casting it to that type. Also
2636         restructured the code a little to make it slightly more readable.
2637         (WebCore::RenderTable::layout): Added a FIXME about forms that have a
2638         display style that makes it a table section, since they will be skipped
2639         here in the loop to lay children out.
2640         (WebCore::RenderTable::recalcSections): Added checks similar to the ones
2641         in addChild above.
2642
2643         * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::addChild):
2644         Moved form tag logic inside render object type check so that a table row
2645         that happens to be a form element won't be affected by the special form
2646         tag logic. Also added an explicit check for the table-cell style so we
2647         will wrap it in a row rather than just putting the form at this level.
2648
2649         * rendering/RenderTableRow.h: Removed removeChildNode and dump functions
2650         that just called through to the base class.
2651         * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::addChild):
2652         Moved form tag logic inside render object type check so that a table cell
2653         that happens to be a form element won't be affected by the special form
2654         tag logic. Removed unnecessary null check of section() at end of function.
2655
2656         * rendering/RenderTableCol.h: Removed addChild because all it did was
2657         assert (incorrectly) and then call through to the base class. Changed
2658         _span to be m_span.
2659         * rendering/RenderTableCol.cpp: Removed addChild function. Updated for
2660         change in name of m_span field.
2661
2662 2006-01-22  Darin Adler  <darin@apple.com>
2663
2664         Reviewed by Maciej.
2665
2666         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=3518
2667           REGRESSION (312-412): mojibake left behind when scrolling a clipped <select>
2668
2669         * kwq/KWQListBox.mm: (QListBox::QListBox): Call setCopiesOnScroll:NO.
2670         * kwq/KWQTextArea.mm: (-[KWQTextArea initWithFrame:]): Ditto.
2671
2672 2006-01-22  David Kilzer  <ddkilzer@kilzer.net>
2673
2674         Reviewed by Maciej.
2675
2676         - fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=5656
2677         REGRESSION: Buttons on Yahoo! Mail misplaced in ToT
2678         <rdar://problem/4404335>
2679         Tests whether white-space mode on buttons is inheritied and not forced.
2680         Originally broken in Subversion revision r10909.
2681
2682         * css/html4.css: Remove default white-space value for <button> tag to
2683         allow it to be inherited.
2684         * rendering/render_theme_mac.mm:
2685         (khtml::RenderThemeMac::adjustButtonStyle): Fix misleading comment.
2686
2687         * css/UserAgentStyleSheets.cpp: Touched this file to make the rebuild
2688         of html4.css work (shouldn't have to do this).
2689
2690 2006-01-22  Darin Adler  <darin@apple.com>
2691
2692         * css/make-css-file-arrays.pl: Fix typo that was resulting in a bunch
2693         of whitespace that was supposed to go into a derived source file going
2694         to the console instead.
2695
2696 2006-01-22  Eric Seidel  <eseidel@apple.com>
2697
2698         Reviewed by darin.
2699
2700         SVG needs to support "evt" instead of "event" in event handlers.
2701         http://bugzilla.opendarwin.org/show_bug.cgi?id=5874
2702         
2703         Test: svg/custom/evt-onload.svg
2704
2705         * WebCore.xcodeproj/project.pbxproj: added new classes
2706         * khtml/ecma/kjs_events.cpp:
2707         * khtml/ecma/kjs_events.h:
2708         * khtml/ecma/kjs_proxy.cpp:
2709         (WebCore::KJSProxyImpl::createHTMLEventHandler): simplified
2710         (WebCore::KJSProxyImpl::createSVGEventHandler): new
2711         * khtml/ecma/kjs_proxy.h:
2712         * khtml/ecma/kjs_window.cpp:
2713         * khtml/ecma/kjs_window.h:
2714         * khtml/xml/DocumentImpl.cpp:
2715         (WebCore::DocumentImpl::createHTMLEventListener): simplified
2716         (WebCore::DocumentImpl::createSVGEventListener): new
2717         * khtml/xml/DocumentImpl.h:
2718         * khtml/xml/NodeImpl.cpp:
2719         (WebCore::NodeImpl::dispatchEvent): use RefPtr
2720         * ksvg2/events/JSSVGLazyEventListener.cpp: Added.
2721         (WebCore::JSSVGLazyEventListener::JSSVGLazyEventListener): added.
2722         (WebCore::JSSVGLazyEventListener::eventParameterName): added.
2723         * ksvg2/events/JSSVGLazyEventListener.h: Added.
2724         * ksvg2/svg/SVGElementImpl.cpp:
2725         (SVGElementImpl::parseMappedAttribute): use new SVG event handler
2726         * ksvg2/svg/SVGSVGElementImpl.cpp:
2727         (SVGSVGElementImpl::parseMappedAttribute): use new SVG event handler
2728         * page/Frame.cpp: updated KJSProxyImpl namespace
2729         * page/Frame.h: updated KJSProxyImpl namespace
2730         * page/FramePrivate.h: updated KJSProxyImpl namespace
2731
2732 2006-01-22  Darin Adler  <darin@apple.com>
2733
2734        Reviewed by Maciej.
2735
2736        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=3508
2737          REGRESSION (125-412): problem with negative margin-top and position: absolute (vre.aitg.com)
2738          <rdar://problem/4093277> REGRESSION (125-312): layout problem at vre.aitg.com (3508)
2739
2740        Test: fast/css/position-negative-top-margin.html
2741
2742        * rendering/RenderBlock.cpp: (WebCore::RenderBlock::adjustPositionedBlock):
2743        Fixed two different problems that contributed to the bug: (1) Added a call to calcVerticalMargins
2744        otherwise the margin will always be 0. (2) Corrected logic for the negative margin case, which
2745        was comparing a negative margin-top to a number representing the absolute value of the margin.
2746
2747 2006-01-22  Alexey Proskuryakov  <ap@nypop.com>
2748
2749         Reviewed by Darin.
2750
2751        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=3702
2752          Web page is laid out incorrectly after printing with print-specific style sheet.
2753          <rdar://problem/3706259> Web page distorts after printing with print-specific style sheet (3702)
2754
2755         Also replaced tabs with spaces in the changed files.
2756
2757         Test cases: 
2758         * fast/table/append-cells.html
2759         * fast/table/append-cells2.html
2760         * fast/table/remove-td-display-none.html
2761
2762         * rendering/RenderTable.cpp:
2763         (WebCore::RenderTable::recalcSections): Shrink columns and columnPos to the
2764           actual number of columns.
2765
2766         * rendering/RenderTableSection.cpp:
2767         (WebCore::RenderTableSection::numColumns): New function.
2768         (WebCore::RenderTableSection::dump): Use gridRows instead of grid.size() for row count,
2769           preventing crashes.
2770
2771         * rendering/RenderTableSection.h: Added numColumns() and a comment about cCol/cRow.
2772
2773 2006-01-22  Darin Adler  <darin@apple.com>
2774
2775         Reviewed by Anders.
2776
2777         - http://bugzilla.opendarwin.org/show_bug.cgi?id=6705
2778           use PassRefPtr in more of the basic DOM operations
2779
2780         Once we do the same with cloneNode, I believe we'll fix one of our P1 bugs,
2781         but cloneNode was a little too much to do without doing this first pass.
2782
2783         * khtml/xml/NodeImpl.cpp:
2784         (WebCore::NodeImpl::childNodes): Updated for parameter changes.
2785         (WebCore::NodeImpl::insertBefore): Ditto.
2786         (WebCore::NodeImpl::replaceChild): Ditto.
2787         (WebCore::NodeImpl::removeChild): Ditto.
2788         (WebCore::NodeImpl::appendChild): Ditto.
2789         (WebCore::NodeImpl::addChild): Ditto.
2790         (WebCore::NodeImpl::addEventListener): Ditto.
2791         (WebCore::NodeImpl::setHTMLEventListener): Ditto.
2792         (WebCore::NodeImpl::isDefaultNamespace): Updated for changed name of ancestorElement.
2793         (WebCore::NodeImpl::lookupPrefix): Ditto.
2794         (WebCore::NodeImpl::lookupNamespaceURI): Ditto.
2795         (WebCore::NodeImpl::lookupNamespacePrefix): Ditto.
2796         (WebCore::NodeImpl::ancestorElement): Changed name from getAncestorElement.
2797         * khtml/xml/NodeImpl.h: Changed most functions where it makes sense to take and return
2798         PassRefPtr instead of raw pointers. Even non-obvious cases like appendChild, where the
2799         return value has to be PassRefPtr only because it might be removed when the JavaScript
2800         triggered by the DOM mutation event runs (normally, there's no need to return an "owning"
2801         pointer because the tree now owns the newly-inserted node). Made the ancestorElement
2802         function private.
2803
2804         * khtml/xml/ContainerNodeImpl.cpp:
2805         (WebCore::ContainerNodeImpl::ContainerNodeImpl): Updated for changes from
2806         _first to m_firstChild and _last to m_lastChild.
2807         (WebCore::ContainerNodeImpl::removeAllChildren): Ditto.
2808         (WebCore::ContainerNodeImpl::firstChild): Ditto.
2809         (WebCore::ContainerNodeImpl::lastChild): Ditto.
2810         (WebCore::ContainerNodeImpl::insertBefore): Updated for parameter changes.
2811         (WebCore::ContainerNodeImpl::replaceChild): Ditto.
2812         (WebCore::ContainerNodeImpl::willRemove): Updated for m_lastChild.
2813         (WebCore::ContainerNodeImpl::removeChild): Updated for parameter changes.
2814         (WebCore::ContainerNodeImpl::removeChildren): Updated for m_first/lastChild.
2815         (WebCore::ContainerNodeImpl::appendChild): Updated for parameter changes.
2816         (WebCore::ContainerNodeImpl::hasChildNodes): Updated for m_firstChild.
2817         (WebCore::ContainerNodeImpl::addChild): Updated for parameter changes.
2818         (WebCore::ContainerNodeImpl::attach): Updated for m_firstChild.
2819         (WebCore::ContainerNodeImpl::detach): Ditto.
2820         (WebCore::ContainerNodeImpl::insertedIntoDocument): Ditto.
2821         (WebCore::ContainerNodeImpl::removedFromDocument): Ditto.
2822         (WebCore::ContainerNodeImpl::insertedIntoTree): Ditto.
2823         (WebCore::ContainerNodeImpl::removedFromTree): Ditto.
2824         * khtml/xml/ContainerNodeImpl.h: Removed unused checkSameDocument and checkIsChild.
2825         Made more things private, updated parameters for NodeImpl functions.
2826
2827         * khtml/html/HTMLSelectElementImpl.cpp:
2828         (DOM::HTMLSelectElementImpl::insertBefore): Ditto.
2829         (DOM::HTMLSelectElementImpl::replaceChild): Ditto.
2830         (DOM::HTMLSelectElementImpl::removeChild): Ditto.
2831         (DOM::HTMLSelectElementImpl::appendChild): Ditto.
2832         (DOM::HTMLSelectElementImpl::addChild): Ditto.
2833         * khtml/html/HTMLSelectElementImpl.h: Ditto.
2834
2835         * khtml/html/HTMLOptGroupElementImpl.cpp:
2836         (WebCore::HTMLOptGroupElementImpl::insertBefore): Updated for parameter type change.
2837         Also changed to look at return value, not exception code, to check for success.
2838         (WebCore::HTMLOptGroupElementImpl::replaceChild): Ditto.
2839         (WebCore::HTMLOptGroupElementImpl::removeChild): Ditto.
2840         (WebCore::HTMLOptGroupElementImpl::appendChild): Ditto.
2841         (WebCore::HTMLOptGroupElementImpl::addChild): Ditto.
2842         * khtml/html/HTMLOptGroupElementImpl.h: Ditto.
2843
2844         * WebCore+SVG/kdom.h: Renamed enum from ExceptionCode to ExceptionCodes
2845         to avoid conflict with a typedef ExceptionCode I added.
2846
2847         * bindings/objc/DOM.mm:
2848         (-[DOMNode insertBefore::]): Added get() call since return value is a PassRefPtr.
2849         (-[DOMNode replaceChild::]): Ditto.
2850         (-[DOMNode removeChild:]): Ditto.
2851         (-[DOMNode appendChild:]): Ditto.
2852
2853         * khtml/ecma/kjs_dom.h: Changed getDOMNode to take PassRefPtr.
2854         * khtml/ecma/kjs_dom.cpp: (KJS::getDOMNode): Changed to take PassRefPtr.
2855
2856         * khtml/html/HTMLElementImpl.cpp: Added dom2_events.h include, now needed.
2857         Re-sorted includes.
2858         * ksvg2/svg/SVGElementImpl.cpp: Ditto.
2859
2860         * khtml/html/html_documentimpl.cpp: (WebCore::HTMLDocumentImpl::documentElement):
2861         Changed access to now-private data member _first to equivalent inline function
2862         fastFirstChild().
2863         * khtml/xml/DocumentImpl.cpp: (WebCore::DocumentImpl::recalcStyle): Ditto.
2864         * khtml/xml/dom_elementimpl.cpp: (WebCore::ElementImpl::recalcStyle): Ditto.
2865
2866         * khtml/html/html_tableimpl.cpp:
2867         (WebCore::HTMLTableElementImpl::setCaption): Updated to work with new replaceChild
2868         that returns PassRefPtr.
2869         (WebCore::HTMLTableElementImpl::setTHead): Ditto.
2870         (WebCore::HTMLTableElementImpl::setTFoot): Ditto.
2871         (WebCore::HTMLTableElementImpl::setTBody): Ditto.
2872         (WebCore::HTMLTableElementImpl::addChild): Updated for parameter type change.
2873         (WebCore::HTMLTableSectionElementImpl::addChild): Ditto.
2874         (WebCore::HTMLTableRowElementImpl::addChild): Ditto.
2875         * khtml/html/html_tableimpl.h: Ditto.
2876
2877         * khtml/html/htmlparser.cpp: (HTMLParser::handleResidualStyleCloseTagAcrossBlocks):
2878         Removed an unneeded explicit call to removeChild. appendChild already takes care of
2879         removing the child from its own location. This avoids the fact that removeChild was
2880         removing the parent, the only thing keeping the node alive. This is sort of the
2881         "flip side" of our removeChild leaks -- code that depended on the behavior that
2882         caused the leaks.
2883
2884         * khtml/xml/xml_tokenizer.cpp: (WebCore::XMLTokenizer::startElementNs):
2885         Removed unneeded isHTMLElement() calls from before the "qualified name" change.
2886
2887 2006-01-22  Eric Seidel  <eseidel@apple.com>
2888
2889         Rubber-stamped by anders.
2890
2891         Remove WebCore-no-SVG target and wrap files in #if SVG_SUPPORT
2892         http://bugzilla.opendarwin.org/show_bug.cgi?id=6633
2893
2894 2006-01-22  Alexey Proskuryakov  <ap@nypop.com>
2895
2896         Reviewed by Maciej.
2897
2898         - http://bugzilla.opendarwin.org/show_bug.cgi?id=6642
2899           Split XMLHttpRequest class into JS binding and implementation
2900
2901         * WebCore.xcodeproj/project.pbxproj: Adjusted for moved and renamed files.
2902         New group "xml" to match directory structure.
2903         * xml: Added.
2904         * khtml/ecma/JSXMLHttpRequest.cpp: Added.
2905         * khtml/ecma/JSXMLHttpRequest.h: Added.
2906         * khtml/ecma/xmlhttprequest.cpp: Removed.
2907         * khtml/ecma/xmlhttprequest.h: Removed.
2908         * xml/xmlhttprequest.cpp: Added.
2909         * xml/xmlhttprequest.h: Added.
2910         * khtml/ecma/kjs_binding.cpp:
2911         (KJS::jsStringOrUndefined): Moved from kjs_events.cpp.
2912         * khtml/ecma/kjs_binding.h: Added prototype for jsStringOrUndefined().
2913         * khtml/ecma/kjs_events.cpp: Removed jsStringOrUndefined().
2914         * khtml/ecma/kjs_window.cpp: 
2915         (KJS::Window::getValueProperty): Use new class name for JSXMLHttpRequest.
2916         * kwq/KWQSlot.cpp: XMLHttpRequestQObject is now in WebCore, not KJS.
2917         * page/Frame.cpp:
2918         (Frame::stopLoading): XMLHttpRequest is now in WebCore, not KJS.
2919
2920 2006-01-22  Alexander Kellett  <lypanov@kde.org>
2921
2922         Reviewed by eseidel.  Landed by eseidel.
2923
2924         Add support for custom fill/strokes on text.
2925         http://bugzilla.opendarwin.org/show_bug.cgi?id=6448
2926         
2927         40+ layout tests already cover this.
2928
2929         * kcanvas/RenderSVGText.cpp:
2930         (RenderSVGText::paint): use new painter setup/teardown infrastructure
2931         * kcanvas/device/KRenderingPaintServer.h:
2932         (KRenderingPaintServer::KRenderingPaintServer):
2933         (KRenderingPaintServer::setup):
2934         (KRenderingPaintServer::render):
2935         (KRenderingPaintServer::teardown):
2936         (KRenderingPaintServer::isPaintingText):
2937         (KRenderingPaintServer::setPaintingText):
2938         * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
2939         (setupShadingWithStyle):
2940         (renderShadingWithStyle):
2941         (teardownShadingWithStyle):
2942         (KRenderingPaintServerLinearGradientQuartz::draw):
2943         (KRenderingPaintServerLinearGradientQuartz::setup):
2944         (KRenderingPaintServerLinearGradientQuartz::render):
2945         (KRenderingPaintServerLinearGradientQuartz::teardown):
2946         (KRenderingPaintServerRadialGradientQuartz::draw):
2947         (KRenderingPaintServerRadialGradientQuartz::setup):
2948         (KRenderingPaintServerRadialGradientQuartz::render):
2949         (KRenderingPaintServerRadialGradientQuartz::teardown):
2950         * kcanvas/device/quartz/KRenderingPaintServerQuartz.h:
2951         (KRenderingPaintServerPatternQuartz::KRenderingPaintServerPatternQuartz):
2952         * kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
2953         (KRenderingPaintServerQuartzHelper::strokePath):
2954         (KRenderingPaintServerQuartzHelper::clipToStrokePath):
2955         (KRenderingPaintServerQuartzHelper::fillPath):
2956         (KRenderingPaintServerQuartzHelper::clipToFillPath):
2957         (KRenderingPaintServerSolidQuartz::draw):
2958         (KRenderingPaintServerSolidQuartz::setup):
2959         (KRenderingPaintServerSolidQuartz::render):
2960         (KRenderingPaintServerSolidQuartz::teardown):
2961         (KRenderingPaintServerPatternQuartz::draw):
2962         (KRenderingPaintServerPatternQuartz::setup):
2963         (KRenderingPaintServerPatternQuartz::render):
2964         (KRenderingPaintServerPatternQuartz::teardown):
2965         * kcanvas/device/quartz/QuartzSupport.h: fix prototype
2966         * kcanvas/device/quartz/QuartzSupport.mm:
2967         (applyStrokeStyleToContext):
2968         * ksvg2/misc/KCanvasRenderingStyle.cpp:
2969         (KSVGPainterFactory::fillPaintServer):
2970         (KSVGPainterFactory::strokePaintServer):
2971         (KSVGPainterFactory::cssPrimitiveToLength):
2972         (KSVGPainterFactory::strokePainter):
2973         (KSVGPainterFactory::fillPainter):
2974         * ksvg2/misc/KCanvasRenderingStyle.h:
2975
2976 2006-01-21  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2977
2978         Reviewed by Darin.
2979         
2980         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=3509
2981           REGRESSION(125-412) Portion of nested table is not painted correctly on cafepress site
2982           <rdar://problem/4039615> REGRESSION(125-188) Portion of nested table is not painted correctly on cafepress site
2983
2984         * manual-tests/bugzilla-3509.html: Added.
2985         * rendering/RenderBlock.cpp:
2986         (WebCore::RenderBlock::layoutBlockChildren): Force repaint if the child didn't move but
2987         didn't repaint correctly during layout because it was not at its final position then.
2988
2989 2006-01-21  Anders Carlsson  <andersca@mac.com>
2990
2991         Reviewed by Darin.
2992
2993         http://bugzilla.opendarwin.org/show_bug.cgi?id=3869
2994         Should use HTML Image element instead of JS Image object
2995         <rdar://problem/3852987> JavaScript image.complete property never returns true (3869)
2996
2997         * khtml/ecma/kjs_events.cpp:
2998         (KJS::ClipboardProtoFunc::callAsFunction):
2999         Don't check Image object. Instead, if the element passed in
3000         is an image element which isn't in any document, use its pixmap.
3001         
3002         * khtml/ecma/kjs_html.cpp:
3003         (KJS::HTMLElement::imageGetter):
3004         Add complete.
3005         
3006         (KJS::ImageConstructorImp::construct):
3007         Take a QPixmap instead of an Image.
3008         
3009         (KJS::KJS::Context2DFunction::callAsFunction):
3010         Remove usage of Image and use HTMLImageElementImpl instead.
3011
3012         * khtml/ecma/kjs_html.h:
3013         Remove Image class.
3014         
3015         (KJS::HTMLElement::):
3016         Add ImgComplete.
3017         
3018         * khtml/html/html_imageimpl.cpp:
3019         (WebCore::HTMLImageElementImpl::width):
3020         (WebCore::HTMLImageElementImpl::height):
3021         If the element has no renderer but its image size is known
3022         return that instead.
3023         
3024         (WebCore::HTMLImageElementImpl::complete):
3025         New function, returns true if an image has finished loading.
3026         
3027         * khtml/html/html_imageimpl.h:
3028         Add complete.
3029         
3030         * manual-tests/drag-image.html: Added.
3031
3032 2006-01-21  Anders Carlsson  <andersca@mac.com>
3033
3034         Reviewed by Darin.
3035
3036         - fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=6691
3037         TinyMCE: strikethrough unimplemented
3038         
3039         * khtml/editing/jsediting.cpp:
3040         Add support for the "Strikethrough" command.
3041         
3042 2006-01-21  Mitz Pettel  <opendarwin.org@mitzpettel.com>
3043
3044         Test: fast/dynamic/hovered-detach.html
3045
3046         Reviewed by Darin.
3047
3048         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5983
3049           REGRESSION: onmouseover-powered navbar at MacNN renders incorrectly
3050           <rdar://problem/4403730> REGRESSION: onmouseover powered navbar renders incorrectly at macnn.com (5983)
3051
3052         * khtml/xml/NodeImpl.cpp:
3053         (WebCore::NodeImpl::detach): Set m_hovered to false and set the document's
3054         hoverNode to an hovered ancestor that still has a renderer.
3055         * rendering/render_layer.cpp: Changed static method hoverAncestor() into a
3056         RenderObject instance method.
3057         (WebCore::commonAncestor):
3058         (WebCore::RenderLayer::updateHoverActiveState):
3059         * rendering/render_object.cpp: Ditto.
3060         (WebCore::RenderObject::hoverAncestor)
3061         * rendering/render_object.h: Ditto.
3062
3063 2006-01-20  David Hyatt  <hyatt@apple.com>
3064
3065         Fix for bug 6666, pseudo-element rules incorrectly displayed
3066         in Web Inspector.
3067         
3068         Reviewed by darin
3069
3070         Added fast/inspector/matchedrules.html as test case.
3071
3072         * css/cssstyleselector.cpp:
3073         (WebCore::CSSStyleSelector::matchRulesForList):
3074
3075 2006-01-20  Timothy Hatcher  <timothy@apple.com>
3076
3077         Reviewed by John.
3078
3079         Removes code that is no longer needed with the new Web Inspector.
3080
3081         * bridge/mac/WebCoreFrameBridge.h: removes the WebCoreDOMTreeCopier protocol.
3082         * bridge/mac/WebCoreFrameBridge.mm: removes copyDOMNode:copier:
3083
3084 2006-01-21  Anders Carlsson  <andersca@mac.com>
3085
3086         Reviewed by David Hyatt.
3087
3088         Rename Frame::xmlDocImpl => Frame::document and
3089         Frame::replaceDocImpl => Frame::setDocument
3090         
3091         * bridge/mac/MacFrame.mm:
3092         (MacFrame::findString):
3093         (MacFrame::advanceToNextMisspelling):
3094         (MacFrame::nextKeyViewInFrame):
3095         (MacFrame::nextKeyViewInFrameHierarchy):
3096         (MacFrame::keyEvent):
3097         (MacFrame::dispatchCPPEvent):
3098         (MacFrame::setDisplaysWithFocusAttributes):
3099         (MacFrame::bodyBackgroundColor):
3100         (MacFrame::markMisspellings):
3101         (MacFrame::respondToChangedSelection):
3102         (MacFrame::setMarkedTextRange):
3103         (MacFrame::dashboardRegionsDictionary):
3104         (MacFrame::shouldClose):
3105         * bridge/mac/WebCoreFrameBridge.mm:
3106         (updateRenderingForBindings):
3107         (frameHasSelection):
3108         (-[WebCoreFrameBridge addData:]):
3109         (-[WebCoreFrameBridge didNotOpenURL:pageCache:]):
3110         (-[WebCoreFrameBridge saveDocumentState]):
3111         (-[WebCoreFrameBridge restoreDocumentState]):
3112         (-[WebCoreFrameBridge saveDocumentToPageCache]):
3113         (-[WebCoreFrameBridge _documentTypeString]):
3114         (-[WebCoreFrameBridge deselectAll]):
3115         (-[WebCoreFrameBridge reapplyStylesForDeviceType:]):
3116         (nowPrinting):
3117         (-[WebCoreFrameBridge _setupRootForPrinting:]):
3118         (-[WebCoreFrameBridge computePageRectsWithPrintWidthScaleFactor:printHeight:]):
3119         (-[WebCoreFrameBridge copyDOMTree:]):
3120         (-[WebCoreFrameBridge URLWithAttributeString:]):
3121         (-[WebCoreFrameBridge unmarkAllMisspellings]):
3122         (-[WebCoreFrameBridge nextKeyView]):
3123         (-[WebCoreFrameBridge previousKeyView]):
3124         (-[WebCoreFrameBridge nextKeyViewInsideWebFrameViews]):
3125         (-[WebCoreFrameBridge previousKeyViewInsideWebFrameViews]):
3126         (-[WebCoreFrameBridge DOMDocument]):
3127         (-[WebCoreFrameBridge baseURL]):
3128         (-[WebCoreFrameBridge domain]):
3129         (-[WebCoreFrameBridge numPendingOrLoadingRequests]):
3130         (-[WebCoreFrameBridge doneProcessingData]):
3131         (-[WebCoreFrameBridge selectionColor]):
3132         (-[WebCoreFrameBridge accessibilityTree]):
3133         (-[WebCoreFrameBridge setSelectedDOMRange:affinity:closeTyping:]):
3134         (-[WebCoreFrameBridge convertToNSRange:]):
3135         (-[WebCoreFrameBridge convertToDOMRange:]):
3136         (-[WebCoreFrameBridge replaceMarkedTextWithText:]):
3137         (-[WebCoreFrameBridge smartDeleteRangeForProposedRange:]):
3138         (-[WebCoreFrameBridge documentFragmentWithMarkupString:baseURLString:]):
3139         (-[WebCoreFrameBridge documentFragmentWithText:]):
3140         (-[WebCoreFrameBridge documentFragmentWithNodesAsParagraphs:]):
3141         (-[WebCoreFrameBridge replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):
3142         (-[WebCoreFrameBridge insertLineBreak]):
3143         (-[WebCoreFrameBridge insertParagraphSeparator]):
3144         (-[WebCoreFrameBridge insertParagraphSeparatorInQuotedContent]):
3145         (-[WebCoreFrameBridge insertText:selectInsertedText:]):
3146         (-[WebCoreFrameBridge moveSelectionToDragCaret:smartMove:]):
3147         (-[WebCoreFrameBridge deleteSelectionWithSmartDelete:]):
3148         (-[WebCoreFrameBridge deleteKeyPressedWithSmartDelete:]):
3149         (-[WebCoreFrameBridge forwardDeleteKeyPressedWithSmartDelete:]):
3150         * khtml/ecma/kjs_html.cpp:
3151         (KJS::KJS::HTMLDocument::putValueProperty):
3152         * khtml/ecma/kjs_window.cpp:
3153         (KJS::createNewWindow):
3154         (KJS::Window::getValueProperty):
3155         (KJS::Window::namedItemGetter):
3156         (KJS::Window::getOwnPropertySlot):
3157         (KJS::Window::put):
3158         (KJS::Window::isSafeScript):
3159         (KJS::Window::setListener):
3160         (KJS::Window::getListener):
3161         (KJS::WindowFunc::callAsFunction):
3162         (KJS::Window::updateLayout):
3163         (KJS::ScheduledAction::execute):
3164         (KJS::Location::put):
3165         (KJS::LocationFunc::callAsFunction):
3166         * khtml/ecma/xmlhttprequest.cpp:
3167         (KJS::XMLHttpRequestProtoFunc::callAsFunction):
3168         * khtml/editing/jsediting.cpp:
3169         * khtml/html/html_baseimpl.cpp:
3170         (WebCore::HTMLFrameElementImpl::contentDocument):
3171         * khtml/html/htmltokenizer.cpp:
3172         (WebCore::HTMLTokenizer::scriptExecution):
3173         * khtml/xml/DocumentImpl.cpp:
3174         (WebCore::DocumentImpl::parentDocument):
3175         * khtml/xsl/xslt_processorimpl.cpp:
3176         (DOM::XSLTProcessorImpl::createDocumentFromSource):
3177         * kwq/KWQAccObject.mm:
3178         (-[KWQAccObject textUnderElement]):
3179         (-[KWQAccObject doAXTextMarkerForPosition:]):
3180         (-[KWQAccObject rendererForView:]):
3181         * kwq/KWQKJavaAppletWidget.mm:
3182         (KJavaAppletWidget::KJavaAppletWidget):
3183         * page/Frame.cpp:
3184         (Frame::document):
3185         (Frame::setDocument):
3186         (Frame::setFocusNodeIfNeeded):
3187         (Frame::isPointInsideSelection):
3188         (Frame::computeAndSetTypingStyle):
3189         (Frame::applyStyle):
3190         (Frame::applyParagraphStyle):
3191         (Frame::selectionComputedStyle):
3192         (Frame::selectFrameElementInParentIfFullySelected):
3193         (Frame::renderer):
3194         (Frame::scrollOverflow):
3195         (Frame::paint):
3196         (Frame::adjustPageHeight):
3197         (Frame::updatePolicyBaseURL):
3198         (Frame::setPolicyBaseURL):
3199         (Frame::forceLayoutWithPageWidthRange):
3200         (Frame::sendScrollEvent):
3201         (Frame::clearTimers):
3202         (Frame::styleForSelectionStart):
3203         (Frame::setSelectionFromNone):
3204         (Frame::setWindowHasFocus):
3205         (Frame::backslashAsCurrencySymbol):
3206         * page/Frame.h:
3207         * page/FrameView.cpp:
3208         (FrameView::~FrameView):
3209         (FrameView::clear):
3210         (FrameView::resizeEvent):
3211         (FrameView::adjustViewSize):
3212         (FrameView::layout):
3213         (FrameView::updateDashboardRegions):
3214         (FrameView::viewportMousePressEvent):
3215         (FrameView::viewportMouseDoubleClickEvent):
3216         (FrameView::viewportMouseMoveEvent):
3217         (FrameView::viewportMouseReleaseEvent):
3218         (FrameView::keyPressEvent):
3219         (FrameView::dispatchDragEvent):
3220         (FrameView::updateDragAndDrop):
3221         (FrameView::focusNextPrevNode):
3222         (FrameView::dispatchMouseEvent):
3223         (FrameView::viewportWheelEvent):
3224         (FrameView::timerEvent):
3225         (FrameView::scheduleRelayout):
3226         (FrameView::unscheduleRelayout):
3227         * rendering/render_frames.cpp:
3228         (WebCore::RenderPartObject::updateWidget):
3229
3230 2006-01-20  Chris Petersen  <cpetersen@apple.com>
3231
3232         Reviewed by eseidel.
3233
3234         Build fix.
3235
3236         * khtml/xml/DocumentImpl.cpp:
3237
3238 2006-01-20  Eric Seidel  <eseidel@apple.com>
3239
3240         Reviewed by beth.
3241
3242         Unbreak build (partial commit of animation patch)
3243
3244         * khtml/xml/DocumentImpl.cpp:
3245         (WebCore::DocumentImpl::implicitClose):
3246         * khtml/xml/DocumentImpl.h:
3247
3248 2006-01-20  Eric Seidel  <eseidel@apple.com>
3249
3250         Reviewed by beth.
3251
3252         Missed the kcanvas directory in my previous commit.
3253         http://bugzilla.opendarwin.org/show_bug.cgi?id=6683
3254
3255         * kcanvas/KCanvasContainer.h:
3256         * kcanvas/RenderForeignObject.h:
3257         * kcanvas/RenderSVGText.h:
3258
3259 2006-01-20  Mitz Pettel  <opendarwin.org@mitzpettel.com>
3260
3261         Test: fast/overflow/image-selection-highlight.html
3262
3263         Reviewed by Darin, committed by Adele.
3264         
3265         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6673
3266           Selection highlight doesn't scroll along with an image contained in an overflow:scroll block
3267
3268         * rendering/render_replaced.cpp:
3269         (WebCore::RenderReplaced::selectionRect): Subtract the containing block's scroll offset.
3270
3271 2006-01-19  Eric Seidel  <eseidel@apple.com>
3272
3273         Reviewed by beth.
3274
3275         Break classes in render_table out into separate files.
3276         Move render_block to RenderBlock.
3277         Move render_container to RenderContainer.
3278         http://bugzilla.opendarwin.org/show_bug.cgi?id=6683
3279
3280         * WebCore.xcodeproj/project.pbxproj:
3281         * bridge/mac/MacFrame.mm:
3282         * kcanvas/KCanvasContainer.h:
3283         * kcanvas/RenderForeignObject.h:
3284         * kcanvas/RenderSVGText.h:
3285         * khtml/editing/visible_units.cpp:
3286         * khtml/html/html_tableimpl.cpp:
3287         (WebCore::HTMLTableElementImpl::insertRow):
3288         * khtml/xml/dom2_rangeimpl.cpp:
3289         * khtml/xml/dom_position.cpp:
3290         * kwq/KWQRenderTreeDebug.cpp:
3291         * page/Frame.cpp:
3292         * rendering/InlineTextBox.cpp:
3293         * rendering/RenderBlock.cpp: Added.
3294         * rendering/RenderBlock.h: Added.
3295         * rendering/RenderContainer.cpp: Added.
3296         (WebCore::RenderContainer::addChild):
3297         * rendering/RenderContainer.h: Added.
3298         * rendering/RenderTable.cpp: Added.
3299         (WebCore::RenderTable::RenderTable):
3300         (WebCore::RenderTable::updateFirstLetter):
3301         * rendering/RenderTable.h: Added.
3302         * rendering/RenderTableCell.cpp: Added.
3303         (WebCore::RenderTableCell::RenderTableCell):
3304         (WebCore::RenderTableCell::updateFromElement):
3305         * rendering/RenderTableCell.h: Added.
3306         * rendering/RenderTableCol.cpp: Added.
3307         (WebCore::RenderTableCol::RenderTableCol):
3308         (WebCore::RenderTableCol::updateFromElement):
3309         * rendering/RenderTableCol.h: Added.
3310         * rendering/RenderTableRow.cpp: Added.
3311         (WebCore::RenderTableRow::RenderTableRow):
3312         * rendering/RenderTableRow.h: Added.
3313         * rendering/RenderTableSection.cpp: Added.
3314         (WebCore::RenderTableSection::RenderTableSection):
3315         * rendering/RenderTableSection.h: Added.
3316         * rendering/RenderText.cpp:
3317         * rendering/bidi.cpp:
3318         * rendering/render_block.cpp: Removed.
3319         * rendering/render_block.h: Removed.
3320         * rendering/render_box.cpp:
3321         * rendering/render_canvas.h:
3322         * rendering/render_container.cpp: Removed.
3323         * rendering/render_container.h: Removed.
3324         * rendering/render_flexbox.h:
3325         * rendering/render_flow.cpp:
3326         * rendering/render_flow.h:
3327         * rendering/render_form.h:
3328         * rendering/render_frames.h:
3329         * rendering/render_inline.cpp:
3330         * rendering/render_inline.h:
3331         * rendering/render_line.cpp:
3332         * rendering/render_list.h:
3333         * rendering/render_object.cpp:
3334         * rendering/render_replaced.h:
3335         * rendering/render_table.cpp: Removed.
3336         * rendering/render_table.h: Removed.
3337         * rendering/table_layout.cpp:
3338
3339 2006-01-19  Eric Seidel  <eseidel@apple.com>
3340
3341         Reviewed by darin.
3342
3343         <embed> and <object> tags show up blank when going back/forward.
3344         http://bugzilla.opendarwin.org/show_bug.cgi?id=6679
3345
3346         No test currently possible.
3347
3348         * page/Frame.cpp:
3349         (Frame::canCachePage):
3350
3351 2006-01-19  Eric Seidel  <eseidel@apple.com>
3352
3353         Reviewed by darin.
3354
3355         Split html_miscimpl.* into separate files and move html_elementimpl
3356         http://bugzilla.opendarwin.org/show_bug.cgi?id=6670
3357
3358         * WebCore.xcodeproj/project.pbxproj:
3359         * bindings/objc/DOM.mm:
3360         * bindings/objc/DOMHTML.mm:
3361         * bridge/mac/WebCoreFrameBridge.mm:
3362         * css/css_valueimpl.cpp:
3363         * css/cssstyleselector.cpp:
3364         (WebCore::CSSStyleSelector::applyProperty):
3365         * khtml/ecma/kjs_dom.cpp:
3366         * khtml/ecma/kjs_html.cpp:
3367         * khtml/editing/apply_style_command.cpp:
3368         * khtml/editing/markup.cpp:
3369         * khtml/editing/replace_selection_command.cpp:
3370         * khtml/html/HTMLBaseFontElementImpl.cpp: Added.
3371         * khtml/html/HTMLBaseFontElementImpl.h: Added.
3372         * khtml/html/HTMLButtonElementImpl.cpp:
3373         * khtml/html/HTMLCollectionImpl.cpp: Added.
3374         (WebCore::HTMLCollectionImpl::traverseNextItem):
3375         * khtml/html/HTMLCollectionImpl.h: Added.
3376         * khtml/html/HTMLElementImpl.cpp: Added.
3377         * khtml/html/HTMLElementImpl.h: Added.
3378         * khtml/html/HTMLFieldSetElementImpl.cpp:
3379         * khtml/html/HTMLFormCollectionImpl.cpp: Added.
3380         * khtml/html/HTMLFormCollectionImpl.h: Added.
3381         * khtml/html/HTMLFormElementImpl.cpp:
3382         * khtml/html/HTMLFormElementImpl.h:
3383         * khtml/html/HTMLGenericFormElementImpl.cpp:
3384         * khtml/html/HTMLGenericFormElementImpl.h:
3385         * khtml/html/HTMLInputElementImpl.cpp:
3386         * khtml/html/HTMLIsIndexElementImpl.cpp:
3387         * khtml/html/HTMLLabelElementImpl.h:
3388         * khtml/html/HTMLLegendElementImpl.cpp:
3389         * khtml/html/HTMLNameCollectionImpl.cpp: Added.
3390         * khtml/html/HTMLNameCollectionImpl.h: Added.
3391         * khtml/html/HTMLOptGroupElementImpl.cpp:
3392         * khtml/html/HTMLOptGroupElementImpl.h:
3393         * khtml/html/HTMLOptionElementImpl.h:
3394         * khtml/html/HTMLSelectElementImpl.cpp:
3395         * khtml/html/HTMLTextAreaElementImpl.cpp:
3396         * khtml/html/html_baseimpl.cpp:
3397         * khtml/html/html_baseimpl.h:
3398         * khtml/html/html_blockimpl.cpp:
3399         * khtml/html/html_blockimpl.h:
3400         * khtml/html/html_canvasimpl.cpp:
3401         * khtml/html/html_documentimpl.cpp:
3402         * khtml/html/html_documentimpl.h:
3403         * khtml/html/html_elementimpl.cpp: Removed.
3404         * khtml/html/html_elementimpl.h: Removed.
3405         * khtml/html/html_headimpl.cpp:
3406         (WebCore::HTMLLinkElementImpl::setStyleSheet):
3407         (WebCore::HTMLLinkElementImpl::isLoading):
3408         * khtml/html/html_headimpl.h:
3409         * khtml/html/html_imageimpl.cpp:
3410         * khtml/html/html_inlineimpl.cpp:
3411         * khtml/html/html_inlineimpl.h:
3412         * khtml/html/html_listimpl.h:
3413         * khtml/html/html_miscimpl.cpp: Removed.
3414         * khtml/html/html_miscimpl.h: Removed.
3415         * khtml/html/html_objectimpl.cpp:
3416         * khtml/html/html_tableimpl.h:
3417         * khtml/html/htmlfactory.cpp:
3418         * khtml/html/htmlparser.cpp:
3419         * khtml/html/htmltokenizer.cpp:
3420         (WebCore::HTMLTokenizer::scriptHandler):
3421         (WebCore::HTMLTokenizer::scriptExecution):
3422         * khtml/xml/DocumentImpl.cpp:
3423         * khtml/xml/dom2_rangeimpl.cpp:
3424         * khtml/xml/dom_elementimpl.cpp:
3425         * kwq/KWQAccObject.mm:
3426         * loader/loader.cpp:
3427         * page/Frame.cpp:
3428         (Frame::restoreURL):
3429         (Frame::stopLoading):
3430         (Frame::receivedFirstData):
3431         (Frame::gotoAnchor):
3432         (Frame::requestObject):
3433         (Frame::processObjectRequest):
3434         (Frame::submitForm):
3435         (Frame::slotParentCompleted):
3436         (Frame::findFrame):
3437         (Frame::executeScript):
3438         * page/FrameView.cpp:
3439         (FrameView::useSlowRepaints):
3440         * rendering/render_applet.cpp:
3441         * rendering/render_applet.h:
3442         * rendering/render_box.cpp:
3443         (WebCore::RenderBox::contentWidth):
3444         (WebCore::RenderBox::paintRootBoxDecorations):
3445         (WebCore::RenderBox::paintBoxDecorations):
3446         (WebCore::RenderBox::getClipRect):
3447         (WebCore::RenderBox::calcWidth):
3448         (WebCore::RenderBox::calcHeight):
3449         * rendering/render_canvasimage.cpp:
3450         * rendering/render_canvasimage.h:
3451         * rendering/render_frames.cpp:
3452         * rendering/render_image.cpp:
3453         * rendering/render_image.h:
3454         * rendering/render_layer.cpp:
3455
3456 2006-01-19  Anders Carlsson  <andersca@mac.com>
3457
3458         Reviewed by Darin.
3459
3460         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6653
3461         CSSStyleDeclaration returns empty string when trying to access shorthand 
3462         properties using JS accessors.
3463         
3464         * khtml/ecma/kjs_css.cpp:
3465         (KJS::DOMCSSStyleDeclaration::cssPropertyGetter):
3466         if getCSSPropertyValue returns 0 (which is true for shorthand properties), 
3467         try getPropertyValue instead.
3468
3469 2006-01-19  Adele Peterson  <adele@apple.com>
3470
3471         Reviewed by Hyatt and Darin.
3472
3473         http://bugzilla.opendarwin.org/show_bug.cgi?id=6665
3474         Implement NSView-less version of <input type="text">
3475         
3476         Initial implementation of new and improved text fields.  
3477         This will only be turned on if an input element has khtml-appearance: textfield.
3478
3479         * WebCore.xcodeproj/project.pbxproj: Added RenderTextField.h and RenderTextField.cpp
3480         * css/cssvalues.in: Fixed omitted button-bevel value.  
3481           This was causing an off-by-one error when getting khtml-appearance value.
3482         * khtml/html/HTMLInputElementImpl.cpp: Added checks for khtml-appearance to decide 
3483           when to use RenderTextField instead of RenderLineEdit.
3484         (DOM::HTMLInputElementImpl::selectionStart):
3485         (DOM::HTMLInputElementImpl::selectionEnd):
3486         (DOM::HTMLInputElementImpl::setSelectionStart):
3487         (DOM::HTMLInputElementImpl::setSelectionEnd):
3488         (DOM::HTMLInputElementImpl::select):
3489         (DOM::HTMLInputElementImpl::setSelectionRange):
3490         (DOM::HTMLInputElementImpl::createRenderer):
3491         (DOM::HTMLInputElementImpl::defaultEventHandler):
3492         * khtml/html/HTMLInputElementImpl.h:
3493         * khtml/html/html_elementimpl.cpp:
3494         (HTMLElementImpl::isFocusable): Also allow editable elements with no parent to be focusable.
3495         * khtml/xml/NodeImpl.h:
3496         (WebCore::NodeImpl::setAttached): Added to set m_attached without having to call attach().
3497         * rendering/RenderTextField.cpp: Added.
3498         (khtml:::RenderBlock):
3499         (khtml::RenderTextField::~RenderTextField):
3500         (khtml::RenderTextField::addChild):
3501         (khtml::RenderTextField::removeChild):
3502         (khtml::RenderTextField::setStyle):
3503         (khtml::RenderTextField::getDivStyle):
3504         (khtml::RenderTextField::updateFromElement):
3505         (khtml::RenderTextField::selectionStart):
3506         (khtml::RenderTextField::selectionEnd):
3507         (khtml::RenderTextField::setSelectionStart):
3508         (khtml::RenderTextField::setSelectionEnd):
3509         (khtml::RenderTextField::select):
3510         (khtml::RenderTextField::setSelectionRange):
3511         * rendering/RenderTextField.h: Added.
3512         (khtml::RenderTextField::removeLeftoverAnonymousBoxes):
3513         (khtml::RenderTextField::renderName):
3514         * rendering/render_container.cpp:
3515         (RenderContainer::destroy): use renamed destroyLeftoverChildren.
3516         (RenderContainer::destroyLeftoverChildren): renamed from destroyLeftoverAnonymousChildren.
3517         * rendering/render_container.h:
3518         * rendering/render_flow.cpp:
3519         (RenderFlow::destroy): use renamed destroyLeftoverChildren.
3520
3521 2006-01-18  Darin Adler  <darin@apple.com>
3522
3523         Reviewed by Hyatt.
3524
3525         - removed all use of QMap
3526
3527         * ForwardingHeaders/qmap.h: Removed.
3528         * WebCore.xcodeproj/project.pbxproj: Removed KWQMap.h, KWQMapImpl.h, KWQMapImpl.cpp.
3529         * kwq/KWQMap.h: Removed.
3530         * kwq/KWQMapImpl.cpp: Removed.
3531         * kwq/KWQMapImpl.h: Removed.
3532
3533         * bridge/BrowserExtension.h: (WebCore::URLArgs::metaData): Converted from QMap of QString
3534         to HashMap of DOMString.
3535         * bridge/mac/BrowserExtensionMac.mm: Ditto.
3536         * bridge/mac/MacFrame.mm:
3537         (MacFrame::openURLRequest): Ditto.
3538         (MacFrame::urlSelected): Ditto.
3539         (MacFrame::createPart): Ditto.
3540         * khtml/ecma/kjs_window.cpp:
3541         (KJS::parseModalDialogFeatures): Ditto.
3542         (KJS::boolFeature): Ditto.
3543         (KJS::intFeature): Ditto.
3544         (KJS::createNewWindow): Ditto.
3545         (KJS::showModalDialog): Ditto.
3546         (KJS::WindowFunc::callAsFunction): Ditto.
3547         * khtml/html/html_objectimpl.cpp: (WebCore::HTMLAppletElementImpl::createRenderer): Ditto.
3548         * khtml/xml/dom_xmlimpl.cpp: (DOM::ProcessingInstructionImpl::checkStyleSheet): Ditto.
3549         * khtml/xml/xml_tokenizer.cpp:
3550         (WebCore::toString): Added. Converts to DOMString instead of QString.
3551         (WebCore::attributesStartElementNsHandler): Converted from QMap of QString to HashMap of DOMString.
3552         (WebCore::parseAttributes): Ditto.
3553         * khtml/xml/xml_tokenizer.h: (WebCore::Tokenizer::setTransformSource): Ditto.
3554         * ksvg2/misc/KSVGTimeScheduler.cpp: (KSVG::SVGTimer::notifyAll): Ditto.
3555         * kwq/KWQKJavaAppletWidget.h: Ditto.
3556         * kwq/KWQKJavaAppletWidget.mm: (KJavaAppletWidget::KJavaAppletWidget): Ditto.
3557         * kwq/KWQKJobClasses.h: Ditto.
3558         * kwq/KWQKJobClasses.mm: (KIO::TransferJob::addMetaData): Ditto.
3559         * page/Frame.cpp:
3560         (Frame::didOpenURL): Ditto.
3561         (Frame::changeLocation): Ditto.
3562         (Frame::mark): Ditto.
3563         (Frame::setMark): Ditto.
3564         (Frame::urlSelected): Ditto.
3565         (Frame::requestObject): Ditto.
3566         (Frame::processObjectRequest): Ditto.
3567         (Frame::submitForm): Ditto.
3568         * rendering/render_applet.cpp:
3569         (WebCore::RenderApplet::RenderApplet): Ditto.
3570         (WebCore::RenderApplet::createWidgetIfNecessary): Ditto.
3571         (WebCore::RenderApplet::layout): Ditto.
3572         * rendering/render_applet.h:
3573         (WebCore::RenderApplet::renderName): Ditto.
3574         (WebCore::RenderApplet::element): Ditto.
3575         (WebCore::RenderEmptyApplet::renderName): Ditto.
3576
3577         * khtml/dom/dom_string.h:
3578         (WebCore::DOMString::createCFString): Added. Not yet implemented or used.
3579         (WebCore::DOMString::operator NSString*): Updated to call through to DOMStringImpl.
3580         Added hash functions and hash traits so you can use DOMString in hash tables.
3581         * khtml/xml/dom_stringimpl.h: Added conversion to and from CFStringRef/NSString.
3582         * khtml/xml/dom_stringimpl.cpp: Took out an excess "DOM::".
3583
3584         * bindings/objc/DOMInternal.mm: (DOMStringImpl::operator NSString *): Moved from DOMString
3585         to DOMStringImpl.
3586
3587         - changed the mark from a SelectionController to a Selection
3588           (maybe it can be a Position instead?)
3589
3590         * page/Frame.h: Changed mark() and setMark() to use a Selection.
3591         * page/FramePrivate.h: Changed mark to a Selection.
3592
3593         * bridge/mac/WebCoreFrameBridge.mm: (-[WebCoreFrameBridge setMarkDOMRange:]):
3594         Updated for change from SelectionController to Selection.
3595
3596         - removed extraneous includes
3597
3598         * kwq/KWQKHTMLSettings.h: Removed include of "KWQMap.h".
3599         * kwq/KWQKIOGlobal.h: Ditto.
3600
3601         * khtml/editing/htmlediting.h: Removed extraneous includes and namespace prefixes.
3602
3603         * khtml/html/html_canvasimpl.h: Removed extraneous includes and moved into the
3604         WebCore namespace.
3605         * khtml/html/html_canvasimpl.cpp: Ditto.
3606         * khtml/html/htmltokenizer.cpp: Ditto.
3607         * khtml/html/htmltokenizer.h: Ditto.
3608         * khtml/xml/DocumentImpl.cpp: Ditto.
3609         * kwq/KWQEditCommand.mm: Ditto.
3610         * rendering/render_canvasimage.h: Ditto.
3611         * rendering/render_image.h: Ditto.
3612
3613         * khtml/editing/composite_edit_command.cpp: Updated includes because of ones
3614         that were removed from headers.
3615         * khtml/editing/htmlediting.cpp: Ditto.
3616         * khtml/editing/jsediting.cpp: Ditto.
3617         * khtml/editing/replace_selection_command.cpp: Ditto.
3618         * rendering/render_canvasimage.cpp: Ditto.
3619         * rendering/render_image.cpp: Ditto.
3620
3621         * loader/loader.cpp: (WebCore::Loader::servePendingRequests): Removed code to add the
3622         cache control string, since that was hardcoded to empty string anyway.
3623
3624 2006-01-19  Eric Seidel  <eseidel@apple.com>
3625
3626         Reviewed by darin & anders.
3627
3628         Fix opacity crasher for <text> and <image>.
3629         http://bugzilla.opendarwin.org/show_bug.cgi?id=6668
3630         Even though the crash is fixed, opacity still doesn't work.
3631         http://bugzilla.opendarwin.org/show_bug.cgi?id=6669
3632         
3633         Test: svg/custom/text-image-opacity.svg
3634
3635         * kcanvas/RenderSVGImage.cpp:
3636         (RenderSVGImage::paint):
3637         * kcanvas/RenderSVGText.cpp:
3638         (RenderSVGText::paint):
3639
3640 2006-01-19  Eric Seidel  <eseidel@apple.com>
3641
3642         Reviewed by darin.
3643
3644         Remove CFDictionary usage from KWQObject.*
3645         http://bugzilla.opendarwin.org/show_bug.cgi?id=6468
3646
3647         * kwq/KWQObject.cpp:
3648         (KWQObjectTimer::KWQObjectTimer):
3649         (QObject::restartTimer):
3650         (QObject::timerIntervals):
3651         (KWQObjectTimer::deleteTimer):
3652         (QObject::killTimer):
3653         (QObject::killTimers):
3654         (sendDeferredTimerEvent):
3655
3656 2006-01-18  David Hyatt <hyatt@apple.com
3657
3658         Fix for bug 6657, remove all uses of MacFrame from cross-platform
3659         code.  Also remove uses of BrowserExtensionMac (and make the
3660         frame responsible for instantiation of the appropriate
3661         platform-specific object).
3662
3663         Also #ifdef out all the Dashboard code in the engine for non-Apple
3664         platforms.
3665
3666         Reviewed by anders
3667
3668         * ForwardingHeaders/khtml_ext.h: Removed.
3669         * ForwardingHeaders/kparts/browserextension.h: Removed.
3670         * WebCore.vcproj/WebCore/WebCore.vcproj:
3671         * bridge/BrowserExtension.h: Added.
3672         (WebCore::BrowserExtension::BrowserExtension):
3673         * bridge/mac/BrowserExtensionMac.h: Added.
3674         * bridge/mac/BrowserExtensionMac.mm: Added.
3675         * bridge/mac/KWQKHTMLPartBrowserExtension.h: Removed.
3676         * bridge/mac/KWQKHTMLPartBrowserExtension.mm: Removed.
3677         * bridge/mac/KWQKPartsBrowserExtension.h: Removed.
3678         * bridge/mac/MacFrame.h:
3679         (MacFrame::createBrowserExtension):
3680         (MacFrame::markedTextRange):
3681         * css/css_computedstyle.cpp:
3682         (DOM::):
3683         (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
3684         * css/css_valueimpl.cpp:
3685         (WebCore::CSSPrimitiveValueImpl::cleanup):
3686         (WebCore::CSSPrimitiveValueImpl::cssText):
3687         * css/css_valueimpl.h:
3688         (DOM::CSSPrimitiveValueImpl::):
3689         * css/cssparser.cpp:
3690         (CSSParser::parseValue):
3691         * css/cssparser.h:
3692         * css/cssstyleselector.cpp:
3693         (WebCore::CSSStyleSelector::applyProperty):
3694         * khtml/ecma/kjs_events.cpp:
3695         (KJS::JSAbstractEventListener::handleEvent):
3696         * khtml/ecma/kjs_navigator.cpp:
3697         (KJS::Navigator::getValueProperty):
3698         * khtml/ecma/kjs_proxy.cpp:
3699         (KJSProxyImpl::evaluate):
3700         (KJSProxyImpl::initScript):
3701         * khtml/ecma/kjs_window.cpp:
3702         (KJS::canShowModalDialog):
3703         (KJS::canShowModalDialogNow):
3704         (KJS::showModalDialog):
3705         (KJS::Window::getValueProperty):
3706         (KJS::Window::scheduleClose):
3707         (KJS::Window::isSafeScript):
3708         (KJS::parseWindowFeatures):
3709         (KJS::constrainToVisible):
3710         (KJS::WindowFunc::callAsFunction):
3711         (KJS::ScheduledAction::execute):
3712         (KJS::BarInfo::getValueProperty):
3713         (KJS::History::getValueProperty):
3714         * khtml/editing/jsediting.cpp:
3715         * khtml/editing/typing_command.cpp:
3716         (khtml::TypingCommand::markMisspellingsAfterTyping):
3717         * khtml/html/HTMLFormElementImpl.cpp:
3718         (DOM::HTMLFormElementImpl::formData):
3719         (DOM::HTMLFormElementImpl::submit):
3720         * khtml/html/html_objectimpl.cpp:
3721         (DOM::HTMLAppletElementImpl::getAppletInstance):
3722         (DOM::HTMLEmbedElementImpl::getEmbedInstance):
3723         (DOM::HTMLObjectElementImpl::getObjectInstance):
3724         * khtml/xml/DocumentImpl.cpp:
3725         (DocumentImpl::DocumentImpl):
3726         (DocumentImpl::updateTitle):
3727         (DocumentImpl::implicitClose):
3728         (DocumentImpl::referrer):
3729         * khtml/xml/DocumentImpl.h:
3730         * khtml/xml/dom_elementimpl.cpp:
3731         (WebCore::ElementImpl::focus):
3732         * page/Frame.cpp:
3733         (Frame::init):
3734         (Frame::didOpenURL):
3735         (Frame::browserExtension):
3736         (Frame::begin):
3737         (Frame::scheduleHistoryNavigation):
3738         (Frame::changeLocation):
3739         (Frame::setSelection):
3740         (Frame::urlSelected):
3741         (Frame::requestFrameName):
3742         (Frame::requestObject):
3743         (Frame::processObjectRequest):
3744         (Frame::submitForm):
3745         (Frame::slotChildCompleted):
3746         (Frame::shouldChangeSelection):
3747         (Frame::appliedEditing):
3748         (Frame::unappliedEditing):
3749         (Frame::reappliedEditing):
3750         (Frame::copyToPasteboard):
3751         (Frame::cutToPasteboard):
3752         (Frame::pasteFromPasteboard):
3753         (Frame::pasteAndMatchStyle):
3754         (Frame::transpose):
3755         (Frame::redo):
3756         (Frame::undo):
3757         (Frame::paint):
3758         * page/Frame.h:
3759         * page/FramePrivate.h:
3760         * page/FrameView.cpp:
3761         (KHTMLView::layout):
3762         (KHTMLView::updateDashboardRegions):
3763         (KHTMLView::viewportMousePressEvent):
3764         (KHTMLView::viewportMouseDoubleClickEvent):
3765         (KHTMLView::viewportMouseMoveEvent):
3766         (KHTMLView::viewportMouseReleaseEvent):
3767         (KHTMLView::mediaType):
3768         (KHTMLView::viewportWheelEvent):
3769         * page/FrameView.h:
3770         * rendering/InlineTextBox.cpp:
3771         (khtml::InlineTextBox::paint):
3772         * rendering/render_form.cpp:
3773         * rendering/render_layer.cpp:
3774         (khtml::RenderLayer::scrollToOffset):
3775         (khtml::RenderLayer::updateScrollInfoAfterLayout):
3776         * rendering/render_object.cpp:
3777         (WebCore::RenderObject::setStyle):
3778         * rendering/render_replaced.cpp:
3779
3780 2006-01-18  Darin Adler  <darin@apple.com>
3781
3782         Reviewed by Hyatt.
3783
3784         - change KWQList to use qsort instead of CFArraySort
3785
3786         * kwq/KWQListImpl.cpp:
3787         (compareFuncWrapper): Wrapper that uses global variables to overcome the lack
3788         of a "data" pointer in qsort. Could have used qsort_r but that would be less portable.
3789         (KWQListImpl::sort): Use qsort instead of CFArraySortValues.
3790
3791 2006-01-18  Darin Adler  <darin@apple.com>
3792
3793         Reviewed by Beth.
3794
3795         - changed the three signal/slot related files from ObjC++ to C++ files
3796
3797         * WebCore.xcodeproj/project.pbxproj:
3798         * kwq/KWQSignal.cpp: Added.
3799         * kwq/KWQSignal.mm: Removed.
3800         * kwq/KWQSignalStubs.cpp: Added.
3801         * kwq/KWQSignalStubs.mm: Removed.
3802         * kwq/KWQSlot.cpp: Added.
3803         * kwq/KWQSlot.mm: Removed.
3804
3805 2006-01-18  David Hyatt <hyatt@apple.com>
3806         
3807         Make Win32 build again.  Update the scripts and deal
3808         with all the recent file moves.
3809
3810         Reviewed by xenon
3811
3812         * WebCore.vcproj/WebCore/WebCore.vcproj:
3813         * WebCore.vcproj/WebCore/build-generated-files.sh:
3814         * rendering/render_container.cpp:
3815         * rendering/render_object.cpp:
3816
3817 2006-01-18  Mitz Pettel  <opendarwin.org@mitzpettel.com>
3818
3819         Test: fast/overflow/overflow-rtl-inline-scrollbar.html
3820
3821         Reviewed by Hyatt.
3822         
3823         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6618
3824           Inline in RTL block with overflow:auto and left border makes scroll bar appear
3825         
3826         Inline flows were always returning 0 for leftmostPosition(). Their real leftmost
3827         edges are determined by their inline boxes, which
3828         RenderBlock::leftmostPosition already takes into account.
3829
3830         * khtml/rendering/render_flow.cpp:
3831         (RenderFlow::lowestPosition): Don't descend into inline flows.
3832         (RenderFlow::rightmostPosition): Ditto.
3833         (RenderFlow::leftmostPosition): Ditto.
3834
3835 2006-01-18  Anders Carlsson  <andersca@mac.com>
3836
3837         Fix build.
3838         
3839         * khtml/ecma/kjs_navigator.cpp:
3840         * page/FrameView.cpp:
3841         Remove kstandarddirs.h includes.
3842         
3843 2006-01-18  Darin Adler  <darin@apple.com>
3844
3845         Reviewed by Hyatt.
3846
3847         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6646
3848           compile CSS sources in instead of reading them from disk
3849
3850         * css/make-css-file-arrays.pl: Added. Used to generate C array forms of the ".css" files.
3851         * css/UserAgentStyleSheets.cpp: Added. Used to indirectly compile the generated file.
3852
3853         * WebCore.xcodeproj/project.pbxproj: Added new source files. Added a build phase to
3854         invoke the make-css-file-arrays.pl script. Removed the .css files, which no longer need
3855         to be installed as part of the final package.
3856
3857         * WebCore.vcproj/WebCore/WebCore.vcproj: Added new files.
3858         * WebCore.vcproj/WebCore/build-generated-files.sh: Added make-css-file-arrays.pl script
3859         section; not tested.
3860
3861         * css/cssstyleselector.cpp: (WebCore::parseUASheet): Removed code to read user agent
3862         sheets from disk. Replaced with code that gets them from compiled-in arrays instead.
3863         Uses a pretty lame DOMString hack that could be reworked some day.
3864         (WebCore::CSSStyleSelector::loadDefaultStyle): Change to load from arrays intead of disk.
3865
3866         * css/html4.css: Added missing license header, tweaked format a bit.
3867         * css/quirks.css: Added missing license header, tweaked format.
3868         * css/svg.css: Moved from ksvg2/css directory.
3869         * ksvg2/css/svg.css: Moved to top level css directory.
3870
3871         * page/Frame.cpp: Removed includes of qfile.h and kstandarddirs.h.
3872
3873         * ForwardingHeaders/kstandarddirs.h: Removed.
3874         * ForwardingHeaders/qfile.h: Removed.
3875         * kwq/KWQFile.h: Removed.
3876         * kwq/KWQFile.mm: Removed.
3877         * kwq/KWQKStandardDirs.h: Removed.
3878         * kwq/KWQKStandardDirs.mm: Removed.
3879
3880 2006-01-17  Alexander Kellett  <lypanov@kde.org>
3881
3882         Reviewed by Maciej.
3883
3884         - Remove the now-unused KRenderingPaintServerImage[Quartz].
3885
3886         * WebCore.xcodeproj/project.pbxproj:
3887         * kcanvas/KCanvasTreeDebug.cpp:
3888         * kcanvas/device/KRenderingPaintServer.h:
3889         * kcanvas/device/KRenderingPaintServerImage.cpp: Removed.
3890         * kcanvas/device/KRenderingPaintServerImage.h: Removed.
3891         * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
3892         * kcanvas/device/quartz/KRenderingPaintServerQuartz.h:
3893         * kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
3894         * ksvg2/svg/SVGFEImageElementImpl.cpp:
3895         * kwq/KWQPainter.mm:
3896
3897 2006-01-17  Darin Adler  <darin@apple.com>
3898
3899         Reviewed by John Sullivan.
3900
3901         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6377
3902           <rdar://problem/4400315> All XML crashes in TOT with JavaScript disabled (6377)
3903
3904         * bridge/mac/MacFrame.mm:
3905         (MacFrame::bindingRootObject): Assert that this is only called when JavaScript is enabled.
3906         (MacFrame::windowScriptObject): Return 0 if JavaScript is disabled.
3907         (MacFrame::windowScriptNPObject): Ditto.
3908         (MacFrame::partClearedInBegin): Don't call the "window script object available" call if
3909         JavaScript is disabled.
3910
3911 2006-01-17  Justin Garcia  <justin.garcia@apple.com>
3912
3913         Reviewed by darin
3914         
3915         <http://bugzilla.opendarwin.org/show_bug.cgi?id=6632>
3916         REGRESSION: Selection includes spaces that it shouldn't
3917         <rdar://problem/4407845> 
3918         REGRESSION (TOT): blank space before found text selected at http://www.schepers.cc/comiclinks.html
3919         
3920         Layout test added:
3921         * editing/selection/after-line-wrap.html
3922
3923         * khtml/editing/visible_position.cpp:
3924         (khtml::VisiblePosition::previous): Don't stop at the first candidate,
3925         it may be visually equivalent to the original position.
3926         * khtml/xml/dom_position.cpp:
3927         (DOM::Position::upstream): Don't move to a position on a different line.
3928         (DOM::Position::downstream): Ditto.
3929
3930 2006-01-17  Justin Garcia  <justin.garcia@apple.com>
3931
3932         Reviewed by eric.
3933         
3934         Deployment builds now use -O2
3935
3936         * WebCore.xcodeproj/project.pbxproj:
3937         * khtml/html/htmltokenizer.cpp: Turned off inlining to fix
3938         link error.
3939
3940 2006-01-17  David Hyatt  <hyatt@apple.com>
3941        
3942         Move khtml/rendering to WebCore/rendering.
3943
3944         * WebCore.xcodeproj/project.pbxproj:
3945         * khtml/rendering: Removed.
3946         * khtml/rendering/DataRef.h: Removed.
3947         * khtml/rendering/InlineTextBox.cpp: Removed.
3948         * khtml/rendering/InlineTextBox.h: Removed.
3949         * khtml/rendering/RenderText.cpp: Removed.
3950         * khtml/rendering/RenderText.h: Removed.
3951         * khtml/rendering/RenderTextFragment.cpp: Removed.
3952         * khtml/rendering/RenderTextFragment.h: Removed.
3953         * khtml/rendering/bidi.cpp: Removed.
3954         * khtml/rendering/bidi.h: Removed.
3955         * khtml/rendering/break_lines.cpp: Removed.
3956         * khtml/rendering/break_lines.h: Removed.
3957         * khtml/rendering/font.cpp: Removed.
3958         * khtml/rendering/font.h: Removed.
3959         * khtml/rendering/render_applet.cpp: Removed.
3960         * khtml/rendering/render_applet.h: Removed.
3961         * khtml/rendering/render_arena.cpp: Removed.
3962         * khtml/rendering/render_arena.h: Removed.
3963         * khtml/rendering/render_block.cpp: Removed.
3964         * khtml/rendering/render_block.h: Removed.
3965         * khtml/rendering/render_box.cpp: Removed.
3966         * khtml/rendering/render_box.h: Removed.
3967         * khtml/rendering/render_br.cpp: Removed.
3968         * khtml/rendering/render_br.h: Removed.
3969         * khtml/rendering/render_button.cpp: Removed.
3970         * khtml/rendering/render_button.h: Removed.
3971         * khtml/rendering/render_canvas.cpp: Removed.
3972         * khtml/rendering/render_canvas.h: Removed.
3973         * khtml/rendering/render_canvasimage.cpp: Removed.
3974         * khtml/rendering/render_canvasimage.h: Removed.
3975         * khtml/rendering/render_container.cpp: Removed.
3976         * khtml/rendering/render_container.h: Removed.
3977         * khtml/rendering/render_flexbox.cpp: Removed.
3978         * khtml/rendering/render_flexbox.h: Removed.
3979         * khtml/rendering/render_flow.cpp: Removed.
3980         * khtml/rendering/render_flow.h: Removed.
3981         * khtml/rendering/render_form.cpp: Removed.
3982         * khtml/rendering/render_form.h: Removed.
3983         * khtml/rendering/render_frames.cpp: Removed.
3984         * khtml/rendering/render_frames.h: Removed.
3985         * khtml/rendering/render_image.cpp: Removed.
3986         * khtml/rendering/render_image.h: Removed.
3987         * khtml/rendering/render_inline.cpp: Removed.
3988         * khtml/rendering/render_inline.h: Removed.
3989         * khtml/rendering/render_layer.cpp: Removed.
3990         * khtml/rendering/render_layer.h: Removed.
3991         * khtml/rendering/render_line.cpp: Removed.
3992         * khtml/rendering/render_line.h: Removed.
3993         * khtml/rendering/render_list.cpp: Removed.
3994         * khtml/rendering/render_list.h: Removed.
3995         * khtml/rendering/render_object.cpp: Removed.
3996         * khtml/rendering/render_object.h: Removed.
3997         * khtml/rendering/render_replaced.cpp: Removed.
3998         * khtml/rendering/render_replaced.h: Removed.
3999         * khtml/rendering/render_style.cpp: Removed.
4000         * khtml/rendering/render_style.h: Removed.
4001         * khtml/rendering/render_table.cpp: Removed.
4002         * khtml/rendering/render_table.h: Removed.
4003         * khtml/rendering/render_theme.cpp: Removed.
4004         * khtml/rendering/render_theme.h: Removed.
4005         * khtml/rendering/render_theme_mac.h: Removed.
4006         * khtml/rendering/render_theme_mac.mm: Removed.
4007         * khtml/rendering/table_layout.cpp: Removed.
4008         * khtml/rendering/table_layout.h: Removed.
4009         * rendering: Added.
4010         * rendering/DataRef.h: Added.
4011         * rendering/InlineTextBox.cpp: Added.
4012         * rendering/InlineTextBox.h: Added.
4013         * rendering/RenderText.cpp: Added.
4014         * rendering/RenderText.h: Added.
4015         * rendering/RenderTextFragment.cpp: Added.
4016         * rendering/RenderTextFragment.h: Added.
4017         * rendering/bidi.cpp: Added.
4018         * rendering/bidi.h: Added.
4019         * rendering/break_lines.cpp: Added.
4020         * rendering/break_lines.h: Added.
4021         * rendering/font.cpp: Added.
4022         * rendering/font.h: Added.
4023         * rendering/render_applet.cpp: Added.
4024         * rendering/render_applet.h: Added.
4025         * rendering/render_arena.cpp: Added.
4026         * rendering/render_arena.h: Added.
4027         * rendering/render_block.cpp: Added.
4028         * rendering/render_block.h: Added.
4029         * rendering/render_box.cpp: Added.
4030         * rendering/render_box.h: Added.
4031         * rendering/render_br.cpp: Added.
4032         * rendering/render_br.h: Added.
4033         * rendering/render_button.cpp: Added.
4034         * rendering/render_button.h: Added.
4035         * rendering/render_canvas.cpp: Added.
4036         * rendering/render_canvas.h: Added.
4037         * rendering/render_canvasimage.cpp: Added.
4038         * rendering/render_canvasimage.h: Added.
4039         * rendering/render_container.cpp: Added.
4040         * rendering/render_container.h: Added.
4041         * rendering/render_flexbox.cpp: Added.
4042         * rendering/render_flexbox.h: Added.
4043         * rendering/render_flow.cpp: Added.
4044         * rendering/render_flow.h: Added.
4045         * rendering/render_form.cpp: Added.
4046         * rendering/render_form.h: Added.
4047         * rendering/render_frames.cpp: Added.
4048         * rendering/render_frames.h: Added.
4049         * rendering/render_image.cpp: Added.
4050         * rendering/render_image.h: Added.
4051         * rendering/render_inline.cpp: Added.
4052         * rendering/render_inline.h: Added.
4053         * rendering/render_layer.cpp: Added.
4054         * rendering/render_layer.h: Added.
4055         * rendering/render_line.cpp: Added.
4056         * rendering/render_line.h: Added.
4057         * rendering/render_list.cpp: Added.
4058         * rendering/render_list.h: Added.
4059         * rendering/render_object.cpp: Added.
4060         * rendering/render_object.h: Added.
4061         * rendering/render_replaced.cpp: Added.
4062         * rendering/render_replaced.h: Added.
4063         * rendering/render_style.cpp: Added.
4064         * rendering/render_style.h: Added.
4065         * rendering/render_table.cpp: Added.
4066         * rendering/render_table.h: Added.
4067         * rendering/render_theme.cpp: Added.
4068         * rendering/render_theme.h: Added.
4069         * rendering/render_theme_mac.h: Added.
4070         * rendering/render_theme_mac.mm: Added.
4071         * rendering/table_layout.cpp: Added.
4072         * rendering/table_layout.h: Added.
4073
4074 2006-01-17  David Hyatt  <hyatt@apple.com>
4075
4076         Land support for a style method on DOMAttr from JS that will
4077         allow the Web Inspector to include presentational attributes
4078         in the style list.
4079         
4080         Reviewed by xenon
4081
4082         * khtml/ecma/kjs_dom.cpp:
4083         (KJS::DOMAttr::getValueProperty):
4084         * khtml/ecma/kjs_dom.h:
4085         (KJS::DOMAttr::):
4086
4087 2006-01-17  Beth Dakin  <bdakin@apple.com>
4088
4089         Reviewed by Hyatt and Darin
4090
4091         Fix for <rdar://problem/4405836> REGRESSION: crash at webmail.aol.com 
4092         when deleting mail in khtml::RenderTableCell::collapsedBottomBorder() const 
4093         + 232
4094
4095         RenderTableCell::collapsedBottomBorder() gets nextCell by calling 
4096         table()->cellBelow(this). In the case of the crash, cellBelow() returns 
4097         a pointer to a table cell that was already destroyed. cellBelow() thinks 
4098         that the pointer is still good because the grid of cells has not been updated 
4099         because all of this code is called through the hitTest and the hitTest does 
4100         not update the layout. The fix that I have is simply it have the hitTest call 
4101         updateLayout(). This is the only change in behavior. The rest of the patch 
4102         preserves behavior for simulated clicks. fast/events/stopPropagation-submit 
4103         caught this problem that arose from calling updateLayout() in the hitTest; 
4104         we should always have an x and y position of 0 for simulated clicks. This 
4105         preserves that behavior by keeping track of whether a click is simulated or not.
4106
4107         * khtml/html/HTMLInputElementImpl.cpp:
4108         (DOM::HTMLInputElementImpl::defaultEventHandler): If the click is simulated, 
4109         set xPos and yPos to 0.
4110         * khtml/html/html_elementimpl.cpp:
4111         (HTMLElementImpl::setContentEditable): Fix spacing.
4112         (HTMLElementImpl::click): It isn't necessary to check if there is a renderer.
4113         * khtml/rendering/render_layer.cpp:
4114         (khtml::RenderLayer::hitTest): Call updateLayout().
4115         * khtml/xml/NodeImpl.cpp:
4116         (WebCore::NodeImpl::dispatchSimulatedMouseEvent): Set isSimulated to true.
4117         (WebCore::NodeImpl::dispatchMouseEvent): Keep track of isSimulated.
4118         * khtml/xml/NodeImpl.h: Same.
4119         * khtml/xml/dom2_eventsimpl.cpp:
4120         (DOM::MouseRelatedEventImpl::MouseRelatedEventImpl): Add isSimulated to
4121         MouseRelatedEventImpl().
4122         (DOM::MouseRelatedEventImpl::computePositions): Only change the offsets if 
4123         it's not simulated.
4124         (DOM::MouseEventImpl::MouseEventImpl): Add isSimulated to MouseEventImpl()
4125         * khtml/xml/dom2_eventsimpl.h: 
4126         (DOM::MouseRelatedEventImpl::isSimulated): Declarations of isSimulated
4127         (DOM::MouseEventImpl::isSimulated): Same.
4128
4129 2006-01-17  Duncan Wilcox  <duncan@mclink.it>
4130
4131         Reviewed by Darin, landed by ap.
4132
4133         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6609
4134           Use Selection instead of SelectionController where possible
4135
4136         This patch replaces the use of SelectionController with Selection in the edit commands.
4137
4138         It also cleans up the relationship between Selection and SelectionController: 
4139         SelectionController used to need to be friend to Selection to call validate() 
4140         on it, now validation is enforced on every update of Selection.
4141
4142         * khtml/editing/Selection.cpp:
4143         (WebCore::Selection::Selection):
4144         (WebCore::Selection::expandUsingGranularity):
4145         (WebCore::Selection::validate):
4146         * khtml/editing/Selection.h:
4147         (WebCore::Selection::setExtent):
4148         (WebCore::Selection::granularity):
4149         (WebCore::operator==):
4150         * khtml/editing/SelectionController.cpp:
4151         (WebCore::SelectionController::SelectionController):
4152         (WebCore::SelectionController::moveTo):
4153         (WebCore::SelectionController::expandUsingGranularity):
4154         (WebCore::SelectionController::clear):