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