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