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