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