2006-05-13 Rob Buis <buis@kde.org>
[WebKit-https.git] / WebCore / ChangeLog
1 2006-05-13  Rob Buis  <buis@kde.org>
2
3         Reviewed by Darin, landed by ap.
4
5         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8132
6         CSS parser sometimes accepts real number as integer
7
8         Add a boolean variable per css value to catch whether values
9         are specified as floats or integers.
10
11         Test: css2.1/rgb-float.html
12
13         * css/CSSGrammar.y:
14         * css/cssparser.cpp:
15         (WebCore::CSSParser::validUnit):
16         (WebCore::CSSParser::lex):
17         * css/cssparser.h:
18         * css/tokenizer.flex:
19
20 2006-05-13  Sam Weinig  <sam.weinig@gmail.com>
21
22         Reviewed by Hyatt, landed by ap.
23
24         Patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=7604
25         calcAbsoluteHorizontalValues() is being getting passed arguments
26         in the wrong order in calcAbsoluteHorizontal()
27
28         Cleans up the RenderBox code for absolutely positioned elements
29         and adds new functions for replaced absolutely positioned 
30         elements. Now uses Length so that magic number -666666 for 
31         auto lengths is no longer used.
32
33         * rendering/RenderBox.cpp:
34         (WebCore::RenderBox::calcAbsoluteHorizontal):
35         (WebCore::RenderBox::calcAbsoluteHorizontalValues):
36         (WebCore::RenderBox::calcAbsoluteVertical):
37         (WebCore::RenderBox::calcAbsoluteVerticalValues): 
38         (WebCore::RenderBox::calcAbsoluteHorizontalReplaced): Handle replaced
39         case separately.
40         (WebCore::RenderBox::calcAbsoluteVerticalReplaced): ditto.
41         * rendering/RenderBox.h:
42
43 2006-05-12  David Hyatt  <hyatt@apple.com>
44
45         Bug 8880, remove the remaining drawing/hit testing code from
46         FontData.
47
48         Reviewed by tim h
49
50         * platform/Font.cpp:
51         (WebCore::m_finalRoundingWidth):
52         (WebCore::WidthIterator::advanceOneCharacter):
53         (WebCore::Font::selectionRectForText):
54         (WebCore::Font::selectionRectForSimpleText):
55         (WebCore::Font::offsetForPosition):
56         (WebCore::Font::offsetForPositionForSimpleText):
57         * platform/Font.h:
58         (WebCore::TextRun::makeComplete):
59         * platform/FontData.h:
60         * platform/GlyphBuffer.h:
61         (WebCore::GlyphBuffer::clear):
62         * platform/mac/FontData.mm:
63         * platform/mac/FontMac.mm:
64         (WebCore::Font::selectionRectForComplexText):
65         (WebCore::Font::offsetForPositionForComplexText):
66
67 2006-05-12  Kevin M. Ollivier  <kevino@theolliviers.com>
68
69         Reviewed by Maciej.
70
71         Add missing include.
72         
73         * dom/Node.h: Add missing include for DeprecatedString.
74
75 2006-05-12  Mitz Pettel  <opendarwin.org@mitzpettel.com>
76
77         Reviewed by Darin.
78
79         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8835
80           REGRESSION: Line moves but selection highlight stays behind
81
82         Test: fast/dynamic/selection-highlight-adjust.html
83
84         * rendering/render_line.cpp:
85         (WebCore::RootInlineBox::adjustPosition): Adjust m_selectionTop
86         and m_selectionBottom.
87
88 2006-05-12  Timothy Hatcher  <timothy@apple.com>
89
90         Reviewed by Darin.
91
92         http://bugzilla.opendarwin.org/show_bug.cgi?id=7156
93         Bug 7156: TinyMCE: Links are actually activated in editable area, not editable.
94         
95         Links in editable areas will not activate or perform a navigation
96         change (on par with WinIE and Firefox.) To visit the link
97         you can shift-click. Manual test added.
98
99         * css/cssstyleselector.cpp:
100         (WebCore::CSSStyleSelector::adjustRenderStyle):
101         * html/HTMLAnchorElement.cpp:
102         (WebCore::HTMLAnchorElement::defaultEventHandler):
103         (WebCore::HTMLAnchorElement::setActive):
104         * html/HTMLAnchorElement.h:
105         * manual-tests/contenteditable-link.html: Added.
106         * page/FrameView.cpp:
107         (WebCore::selectCursor):
108
109 2006-05-12  Eric Seidel  <eseidel@apple.com>
110
111         Reviewed by timo.
112
113         Split out html_inlineimpl.* into separate files (one per class).
114
115         * WebCore.xcodeproj/project.pbxproj:
116         * bindings/js/kjs_html.cpp:
117         * bindings/objc/DOMHTML.mm:
118         * editing/CreateLinkCommand.cpp:
119         * editing/UnlinkCommand.cpp:
120         * html/HTMLAnchorElement.cpp: Added.
121         (WebCore::HTMLAnchorElement::HTMLAnchorElement):
122         * html/HTMLAnchorElement.h: Added.
123         * html/HTMLBRElement.cpp: Added.
124         * html/HTMLBRElement.h: Added.
125         * html/HTMLElementFactory.cpp:
126         * html/HTMLFontElement.cpp: Added.
127         (WebCore::HTMLFontElement::HTMLFontElement):
128         (WebCore::HTMLFontElement::setColor):
129         (WebCore::HTMLFontElement::setFace):
130         (WebCore::HTMLFontElement::setSize):
131         * html/HTMLFontElement.h: Added.
132         * html/HTMLModElement.cpp: Added.
133         (WebCore::HTMLModElement::setCite):
134         (WebCore::HTMLModElement::setDateTime):
135         * html/HTMLModElement.h: Added.
136         * html/HTMLQuoteElement.cpp: Added.
137         * html/HTMLQuoteElement.h: Added.
138         * html/html_imageimpl.h:
139         * html/html_inlineimpl.cpp: Removed.
140         * html/html_inlineimpl.h: Removed.
141         * page/FrameView.cpp:
142
143 2006-05-12  Eric Seidel  <eseidel@apple.com>
144
145         Reviewed by beth.
146
147         Fix build error.
148
149         * rendering/InlineFlowBox.cpp:
150         * rendering/RootInlineBox.cpp:
151
152 2006-05-12  Eric Seidel  <eseidel@apple.com>
153
154         Reviewed by beth.
155
156         Split out render_line.* into separate files (one per class).
157
158         * WebCore.xcodeproj/project.pbxproj:
159         * dom/ContainerNode.cpp:
160         * rendering/EllipsisBox.cpp: Added.
161         * rendering/EllipsisBox.h: Added.
162         (WebCore::EllipsisBox::EllipsisBox):
163         * rendering/InlineBox.cpp: Added.
164         * rendering/InlineBox.h: Added.
165         (WebCore::InlineBox::InlineBox):
166         (WebCore::InlineBox::~InlineBox):
167         (WebCore::InlineBox::bottomOverflow):
168         (WebCore::InlineBox::rightOverflow):
169         * rendering/InlineFlowBox.cpp: Added.
170         (WebCore::InlineFlowBox::placeBoxesHorizontally):
171         * rendering/InlineFlowBox.h: Added.
172         * rendering/InlineRunBox.h: Added.
173         (WebCore::InlineRunBox::InlineRunBox):
174         (WebCore::InlineRunBox::paintBackgroundAndBorder):
175         (WebCore::InlineRunBox::paintDecorations):
176         * rendering/InlineTextBox.h:
177         * rendering/RenderBlock.h:
178         * rendering/RenderFlow.h:
179         * rendering/RenderReplaced.cpp:
180         * rendering/RootInlineBox.cpp: Added.
181         * rendering/RootInlineBox.h: Added.
182         (WebCore::RootInlineBox::RootInlineBox):
183         * rendering/render_line.h: Removed.
184
185 2006-05-12  Eric Seidel  <eseidel@apple.com>
186
187         Reviewed by hyatt.
188
189         Split out table_layout.* into separate files (one per class).
190         Search replace instance variables "foo" with "m_foo" to comply with modern style.
191
192         * WebCore.xcodeproj/project.pbxproj:
193         * rendering/AutoTableLayout.cpp: Added.
194         (WebCore::AutoTableLayout::AutoTableLayout):
195         (WebCore::AutoTableLayout::recalcColumn):
196         (WebCore::AutoTableLayout::fullRecalc):
197         (WebCore::AutoTableLayout::calcMinMaxWidth):
198         (WebCore::AutoTableLayout::calcEffectiveWidth):
199         (WebCore::AutoTableLayout::insertSpanCell):
200         (WebCore::AutoTableLayout::layout):
201         (WebCore::AutoTableLayout::calcPercentages):
202         * rendering/AutoTableLayout.h: Added.
203         (WebCore::AutoTableLayout::totalPercent):
204         (WebCore::AutoTableLayout::Layout::Layout):
205         * rendering/FixedTableLayout.cpp: Added.
206         (WebCore::FixedTableLayout::FixedTableLayout):
207         (WebCore::FixedTableLayout::calcWidthArray):
208         (WebCore::FixedTableLayout::calcMinMaxWidth):
209         (WebCore::FixedTableLayout::layout):
210         * rendering/FixedTableLayout.h: Added.
211         * rendering/RenderTable.cpp:
212         * rendering/TableLayout.h: Added.
213         (WebCore::TableLayout::TableLayout):
214         * rendering/table_layout.cpp: Removed.
215         * rendering/table_layout.h: Removed.
216
217 2006-05-12  David Hyatt  <hyatt@apple.com>
218
219         Bug 8877.  Change form controls and the bridge entry points from the
220         Safari UI to use Font instead of FontData.
221
222         Reviewed by mjs
223
224         * bridge/mac/WebCoreStringTruncator.mm:
225         (stringWidth):
226         (truncateString):
227         (+[WebCoreStringTruncator widthOfString:font:]):
228         (+[WebCoreStringTruncator clear]):
229         * kwq/KWQComboBox.mm:
230         (QComboBox::sizeHint):
231         * kwq/KWQLineEdit.mm:
232         (QLineEdit::sizeForCharacterWidth):
233         * kwq/KWQListBox.mm:
234         (itemTextRenderer):
235         (groupLabelTextRenderer):
236         (QListBox::sizeForNumberOfLines):
237         (QListBox::clearCachedTextRenderers):
238         (-[KWQTableView drawRow:clipRect:]):
239         * platform/Font.cpp:
240         (WebCore::Font::drawSimpleText):
241         (WebCore::Font::drawText):
242         * platform/Font.h:
243         (WebCore::TextStyle::disableRoundingHacks):
244         (WebCore::TextStyle::setRTL):
245         * platform/FontData.h:
246         * platform/FontFallbackList.h:
247         * platform/FontPlatformData.h:
248         (WebCore::FontPlatformData::syntheticOblique):
249         * platform/Pen.h:
250         * platform/mac/FontData.mm:
251         (WebCore::FontData::smallCapsFontData):
252         (WebCore::findSubstituteRenderer):
253         * platform/mac/FontMac.mm:
254         (WebCore::FontFallbackList::setPlatformFont):
255         (WebCore::m_wordSpacing):
256         (WebCore::Font::drawComplexText):
257         * platform/mac/WebCoreTextRenderer.mm:
258         (WebCoreDrawTextAtPoint):
259         (WebCoreTextFloatWidth):
260         * platform/win/FontWin.cpp:
261         (WebCore::Font::drawText):
262         * rendering/InlineTextBox.cpp:
263         (WebCore::InlineTextBox::positionForOffset):
264
265 2006-05-12  Eric Seidel  <eseidel@apple.com>
266
267         Reviewed by kevin.
268
269         Move render_button to RenderButton.
270         Various small style cleanup.
271
272         * WebCore.xcodeproj/project.pbxproj:
273         * html/HTMLButtonElement.cpp:
274         * html/HTMLElement.cpp:
275         * html/HTMLGenericFormElement.cpp:
276         * html/HTMLInputElement.cpp:
277         * platform/mac/WebCoreTextArea.mm:
278         * rendering/RenderApplet.h:
279         * rendering/RenderBox.cpp:
280         * rendering/RenderButton.cpp: Added.
281         (WebCore::RenderButton::RenderButton):
282         (WebCore::RenderButton::addChild):
283         (WebCore::RenderButton::removeChild):
284         * rendering/RenderButton.h: Added.
285         * rendering/RenderEmptyApplet.h:
286         * rendering/RenderHTMLCanvas.h:
287         * rendering/RenderTreeAsText.cpp:
288         * rendering/render_button.cpp: Removed.
289         * rendering/render_button.h: Removed.
290         * rendering/table_layout.cpp:
291         (WebCore::FixedTableLayout::FixedTableLayout):
292         (WebCore::FixedTableLayout::calcWidthArray):
293         (WebCore::FixedTableLayout::calcMinMaxWidth):
294         (WebCore::FixedTableLayout::layout):
295         (WebCore::AutoTableLayout::AutoTableLayout):
296         (WebCore::AutoTableLayout::recalcColumn):
297         (WebCore::AutoTableLayout::fullRecalc):
298         (WebCore::AutoTableLayout::calcMinMaxWidth):
299         (WebCore::AutoTableLayout::calcEffectiveWidth):
300         (WebCore::AutoTableLayout::insertSpanCell):
301         (WebCore::AutoTableLayout::layout):
302         * rendering/table_layout.h:
303         (WebCore::TableLayout::TableLayout):
304         (WebCore::AutoTableLayout::totalPercent):
305         (WebCore::AutoTableLayout::Layout::Layout):
306
307 2006-05-12  Eric Seidel  <eseidel@apple.com>
308
309         Reviewed by mjs.
310
311         Split render_frames.* render_replaced.* and html_baseimpl.* into separate files (one class per file).
312         http://bugzilla.opendarwin.org/show_bug.cgi?id=8878
313
314         * WebCore.xcodeproj/project.pbxproj:
315         * bindings/js/kjs_html.cpp:
316         (KJS::JSHTMLDocumentProtoFunc::callAsFunction):
317         (KJS::JSHTMLDocument::namedItemGetter):
318         (KJS::JSHTMLDocument::getValueProperty):
319         (KJS::JSHTMLDocument::getOwnPropertySlot):
320         (KJS::JSHTMLDocument::putValueProperty):
321         (KJS::JSHTMLElement::formIndexGetter):
322         (KJS::JSHTMLElement::formNameGetter):
323         (KJS::JSHTMLElement::selectIndexGetter):
324         (KJS::JSHTMLElement::framesetNameGetter):
325         (KJS::JSHTMLElement::runtimeObjectGetter):
326         (KJS::JSHTMLElement::runtimeObjectPropertyGetter):
327         (KJS::JSHTMLElement::getOwnPropertySlot):
328         (KJS::JSHTMLElement::implementsCall):
329         (KJS::JSHTMLElement::callAsFunction):
330         (KJS::JSHTMLElement::getValueProperty):
331         (KJS::JSHTMLElement::toString):
332         (KJS::getForm):
333         (KJS::JSHTMLElement::pushEventHandlerScope):
334         (KJS::HTMLElementFunction::callAsFunction):
335         (KJS::JSHTMLElement::put):
336         (KJS::JSHTMLElement::selectSetter):
337         (KJS::JSHTMLElement::putValueProperty):
338         (KJS::toHTMLElement):
339         (KJS::toHTMLTableCaptionElement):
340         (KJS::toHTMLTableSectionElement):
341         (KJS::JSHTMLCollection::lengthGetter):
342         (KJS::JSHTMLCollection::indexGetter):
343         (KJS::JSHTMLCollection::nameGetter):
344         (KJS::JSHTMLCollection::getOwnPropertySlot):
345         (KJS::HTMLCollectionProtoFunc::callAsFunction):
346         (KJS::JSHTMLSelectCollection::selectedIndexGetter):
347         (KJS::JSHTMLSelectCollection::put):
348         (KJS::OptionConstructorImp::construct):
349         (KJS::getSelectHTMLCollection):
350         * bindings/objc/DOMHTML.mm:
351         * bridge/mac/FrameMac.mm:
352         (WebCore::FrameMac::createFrame):
353         * bridge/mac/WebCoreFrameBridge.mm:
354         (-[WebCoreFrameBridge copyRenderNode:copier:]):
355         * dom/Document.cpp:
356         (WebCore::widgetForNode):
357         * html/HTMLBodyElement.cpp: Added.
358         (WebCore::HTMLBodyElement::HTMLBodyElement):
359         (WebCore::HTMLBodyElement::parseMappedAttribute):
360         * html/HTMLBodyElement.h: Added.
361         * html/HTMLDocument.cpp:
362         * html/HTMLElementFactory.cpp:
363         * html/HTMLEmbedElement.cpp:
364         * html/HTMLFrameElement.cpp: Added.
365         (WebCore::HTMLFrameElement::isURLAllowed):
366         (WebCore::HTMLFrameElement::parseMappedAttribute):
367         (WebCore::HTMLFrameElement::setLocation):
368         * html/HTMLFrameElement.h: Added.
369         * html/HTMLFrameSetElement.cpp: Added.
370         (WebCore::HTMLFrameSetElement::HTMLFrameSetElement):
371         (WebCore::HTMLFrameSetElement::parseMappedAttribute):
372         (WebCore::HTMLFrameSetElement::attach):
373         (WebCore::HTMLFrameSetElement::defaultEventHandler):
374         (WebCore::HTMLFrameSetElement::recalcStyle):
375         * html/HTMLFrameSetElement.h: Added.
376         * html/HTMLHeadElement.cpp: Added.
377         (WebCore::HTMLHeadElement::HTMLHeadElement):
378         * html/HTMLHeadElement.h: Added.
379         * html/HTMLHtmlElement.cpp: Added.
380         (WebCore::HTMLHtmlElement::HTMLHtmlElement):
381         * html/HTMLHtmlElement.h: Added.
382         * html/HTMLIFrameElement.cpp: Added.
383         (WebCore::HTMLIFrameElement::HTMLIFrameElement):
384         * html/HTMLIFrameElement.h: Added.
385         * html/HTMLObjectElement.cpp:
386         * html/HTMLParser.cpp:
387         * html/html_baseimpl.cpp: Removed.
388         * html/html_baseimpl.h: Removed.
389         * kwq/WebCoreAXObject.mm:
390         * page/Frame.cpp:
391         (WebCore::isFrameElement):
392         (WebCore::Frame::applyEditingStyleToBodyElement):
393         (WebCore::Frame::removeEditingStyleFromBodyElement):
394         (WebCore::Frame::applyEditingStyleToElement):
395         (WebCore::Frame::removeEditingStyleFromElement):
396         (WebCore::Frame::selectionRect):
397         (WebCore::Frame::isFrameSet):
398         (WebCore::scanForForm):
399         (WebCore::Frame::currentForm):
400         (WebCore::Frame::nodeInfoAtPoint):
401         (WebCore::Frame::adjustPageHeight):
402         (WebCore::Frame::frameForWidget):
403         (WebCore::Frame::forceLayoutWithPageWidthRange):
404         (WebCore::Frame::passWidgetMouseDownEventToWidget):
405         * page/FrameView.cpp:
406         * rendering/RenderFrame.cpp: Added.
407         (WebCore::RenderFrame::viewCleared):
408         * rendering/RenderFrame.h: Added.
409         * rendering/RenderFrameSet.cpp: Added.
410         (WebCore::RenderFrameSet::RenderFrameSet):
411         (WebCore::RenderFrameSet::~RenderFrameSet):
412         (WebCore::RenderFrameSet::layout):
413         (WebCore::RenderFrameSet::positionFrames):
414         (WebCore::RenderFrameSet::userResize):
415         (WebCore::RenderFrameSet::canResize):
416         (WebCore::RenderFrameSet::dump):
417         * rendering/RenderFrameSet.h: Added.
418         * rendering/RenderImage.h:
419         * rendering/RenderPart.cpp: Added.
420         (WebCore::RenderPart::RenderPart):
421         * rendering/RenderPart.h: Added.
422         * rendering/RenderPartObject.cpp: Added.
423         (WebCore::isURLAllowed):
424         (WebCore::RenderPartObject::updateWidget):
425         (WebCore::RenderPartObject::viewCleared):
426         * rendering/RenderPartObject.h: Added.
427         * rendering/RenderReplaced.cpp: Added.
428         (WebCore::RenderReplaced::selectionColor):
429         * rendering/RenderReplaced.h: Added.
430         * rendering/RenderWidget.cpp: Added.
431         (WebCore::RenderWidget::deleteWidget):
432         * rendering/RenderWidget.h: Added.
433         * rendering/render_form.h:
434         * rendering/render_frames.cpp: Removed.
435         * rendering/render_frames.h: Removed.
436         * rendering/render_replaced.cpp: Removed.
437         * rendering/render_replaced.h: Removed.
438
439 2006-05-12  Eric Seidel  <eseidel@apple.com>
440
441         Reviewed by beth.
442
443         Split html_headimpl.* into separate files (one per class)
444         http://bugzilla.opendarwin.org/show_bug.cgi?id=8875
445
446         * WebCore.xcodeproj/project.pbxproj:
447         * bindings/js/kjs_css.cpp:
448         * bindings/js/kjs_html.cpp:
449         (KJS::JSHTMLElement::headGetter):
450         (KJS::JSHTMLElement::linkGetter):
451         * bindings/objc/DOMCSS.mm:
452         (+[DOMCounter _counterWith:]):
453         (-[DOMCounter finalize]):
454         (-[DOMCounter _DOMStyleSheet]):
455         (-[DOMStyleSheet _initWithStyleSheet:]):
456         (-[DOMStyleSheetList dealloc]):
457         (-[DOMStyleSheetList finalize]):
458         (-[DOMStyleSheetList _styleSheetList]):
459         (-[DOMStyleSheetList _initWithStyleSheetList:]):
460         (-[DOMCSSStyleSheet _CSSStyleSheet]):
461         (-[DOMMediaList dealloc]):
462         (-[DOMMediaList finalize]):
463         (-[DOMMediaList _mediaList]):
464         (-[DOMMediaList _initWithMediaList:]):
465         (-[DOMCSSRuleList dealloc]):
466         (-[DOMCSSRuleList finalize]):
467         (-[DOMCSSRuleList _ruleList]):
468         (-[DOMCSSRuleList _initWithRuleList:]):
469         (-[DOMCSSRule dealloc]):
470         (-[DOMCSSRule finalize]):
471         (-[DOMCSSRule _rule]):
472         (-[DOMCSSRule _initWithRule:]):
473         (-[DOMCSSStyleRule _styleRule]):
474         (-[DOMCSSMediaRule _mediaRule]):
475         (-[DOMCSSFontFaceRule _fontFaceRule]):
476         (-[DOMCSSPageRule _pageRule]):
477         (-[DOMCSSImportRule _importRule]):
478         (-[DOMCSSCharsetRule _importRule]):
479         (-[DOMCSSStyleDeclaration dealloc]):
480         (-[DOMCSSStyleDeclaration finalize]):
481         (-[DOMCSSStyleDeclaration _initWithStyleDeclaration:]):
482         (-[DOMCSSStyleDeclaration _styleDeclaration]):
483         (-[DOMCSSValue dealloc]):
484         (-[DOMCSSValue finalize]):
485         (-[DOMCSSValue _value]):
486         (-[DOMCSSValue _initWithValue:]):
487         (-[DOMCSSPrimitiveValue _primitiveValue]):
488         (-[DOMCSSValueList _valueList]):
489         (getWrapperForRGB):
490         (setWrapperForRGB):
491         (removeWrapperForRGB):
492         (-[DOMRGBColor _initWithRGB:]):
493         (-[DOMRect dealloc]):
494         (-[DOMRect finalize]):
495         (-[DOMRect _rect]):
496         (-[DOMRect _initWithRect:]):
497         (-[DOMCounter dealloc]):
498         (-[DOMCounter _counter]):
499         (-[DOMCounter _initWithCounter:]):
500         (-[DOMObject sheet]):
501         * bindings/objc/DOMHTML.mm:
502         (-[DOMHTMLCollection dealloc]):
503         (-[DOMHTMLCollection finalize]):
504         (-[DOMHTMLCollection _collection]):
505         (-[DOMHTMLCollection _initWithCollection:]):
506         (-[DOMHTMLOptionsCollection dealloc]):
507         (-[DOMHTMLOptionsCollection finalize]):
508         (-[DOMHTMLOptionsCollection _initWithOptionsCollection:]):
509         (-[DOMHTMLOptionsCollection _optionsCollection]):
510         (+[DOMHTMLElement _elementWith:]):
511         (-[DOMHTMLElement _HTMLElement]):
512         (-[DOMHTMLDocument _HTMLDocument]):
513         (-[DOMHTMLHtmlElement _HTMLHtmlElement]):
514         (-[DOMHTMLHeadElement _headElement]):
515         (-[DOMHTMLLinkElement _linkElement]):
516         (-[DOMHTMLTitleElement _titleElement]):
517         (-[DOMHTMLMetaElement _metaElement]):
518         (-[DOMHTMLBaseElement _baseElement]):
519         (-[DOMHTMLStyleElement _styleElement]):
520         (-[DOMHTMLBodyElement _bodyElement]):
521         (-[DOMHTMLFormElement _formElement]):
522         (+[DOMHTMLFormElement _formElementWith:]):
523         (-[DOMHTMLIsIndexElement _isIndexElement]):
524         (-[DOMHTMLSelectElement _selectElement]):
525         (-[DOMHTMLOptGroupElement _optGroupElement]):
526         (-[DOMHTMLOptionElement _optionElement]):
527         (-[DOMHTMLInputElement _inputElement]):
528         (-[DOMHTMLTextAreaElement _textAreaElement]):
529         (-[DOMHTMLButtonElement _buttonElement]):
530         (-[DOMHTMLLabelElement _labelElement]):
531         (-[DOMHTMLLabelElement form]):
532         (-[DOMHTMLFieldSetElement _fieldSetElement]):
533         (-[DOMHTMLLegendElement _legendElement]):
534         (-[DOMHTMLUListElement _uListElement]):
535         (-[DOMHTMLOListElement _oListElement]):
536         (-[DOMHTMLDListElement _dListElement]):
537         (-[DOMHTMLDirectoryElement _directoryListElement]):
538         (-[DOMHTMLMenuElement _menuListElement]):
539         (-[DOMHTMLLIElement _liElement]):
540         (-[DOMHTMLQuoteElement _quoteElement]):
541         (-[DOMHTMLDivElement _divElement]):
542         (-[DOMHTMLParagraphElement _paragraphElement]):
543         (-[DOMHTMLHeadingElement _headingElement]):
544         (-[DOMHTMLPreElement _preElement]):
545         (-[DOMHTMLBRElement _BRElement]):
546         (-[DOMHTMLBaseFontElement _baseFontElement]):
547         (-[DOMHTMLFontElement _fontElement]):
548         (-[DOMHTMLHRElement _HRElement]):
549         (-[DOMHTMLModElement _modElement]):
550         (-[DOMHTMLAnchorElement _anchorElement]):
551         (-[DOMHTMLImageElement _imageElement]):
552         (-[DOMHTMLObjectElement _objectElement]):
553         (-[DOMHTMLParamElement _paramElement]):
554         (-[DOMHTMLMapElement _mapElement]):
555         (-[DOMHTMLAreaElement _areaElement]):
556         (-[DOMHTMLScriptElement _scriptElement]):
557         (+[DOMHTMLTableCaptionElement _tableCaptionElementWith:]):
558         (-[DOMHTMLTableCaptionElement _tableCaptionElement]):
559         (+[DOMHTMLTableSectionElement _tableSectionElementWith:]):
560         (-[DOMHTMLTableSectionElement _tableSectionElement]):
561         (-[DOMHTMLTableElement createTHead]):
562         (-[DOMHTMLTableElement createTFoot]):
563         (-[DOMHTMLTableElement createCaption]):
564         (-[DOMHTMLTableElement insertRow:]):
565         (+[DOMHTMLTableElement _tableElementWith:]):
566         (-[DOMHTMLTableElement _tableElement]):
567         (-[DOMHTMLTableColElement _tableColElement]):
568         (-[DOMHTMLTableRowElement _tableRowElement]):
569         (-[DOMHTMLTableRowElement insertCell:]):
570         (+[DOMHTMLTableCellElement _tableCellElementWith:]):
571         (-[DOMHTMLTableCellElement _tableCellElement]):
572         (-[DOMHTMLFrameSetElement _frameSetElement]):
573         (-[DOMHTMLFrameElement _frameElement]):
574         (-[DOMHTMLIFrameElement _IFrameElement]):
575         (-[DOMHTMLEmbedElement _embedElement]):
576         (viewForElement):
577         * bridge/mac/FrameMac.mm:
578         (WebCore::FrameMac::searchForLabelsAboveCell):
579         (WebCore::FrameMac::searchForLabelsBeforeElement):
580         (WebCore::FrameMac::createFrame):
581         (WebCore::FrameMac::passMouseDownEventToWidget):
582         (WebCore::FrameMac::passSubframeEventToSubframe):
583         (WebCore::FrameMac::passWheelEventToChildWidget):
584         (WebCore::FrameMac::fileWrapperForElement):
585         (WebCore::listParent):
586         (WebCore::FrameMac::attributedString):
587         (WebCore::FrameMac::shouldBeginEditing):
588         (WebCore::FrameMac::shouldEndEditing):
589         (WebCore::FrameMac::setMarkedTextRange):
590         * dom/Document.cpp:
591         * dom/xml_tokenizer.cpp:
592         * html/HTMLBaseElement.cpp: Added.
593         (WebCore::HTMLBaseElement::removedFromDocument):
594         (WebCore::HTMLBaseElement::process):
595         * html/HTMLBaseElement.h: Added.
596         * html/HTMLDocument.cpp:
597         * html/HTMLElementFactory.cpp:
598         * html/HTMLLinkElement.cpp: Added.
599         (WebCore::HTMLLinkElement::HTMLLinkElement):
600         (WebCore::HTMLLinkElement::process):
601         * html/HTMLLinkElement.h: Added.
602         * html/HTMLMetaElement.cpp: Added.
603         (WebCore::HTMLMetaElement::HTMLMetaElement):
604         (WebCore::HTMLMetaElement::parseMappedAttribute):
605         (WebCore::HTMLMetaElement::process):
606         (WebCore::HTMLMetaElement::setContent):
607         (WebCore::HTMLMetaElement::setHttpEquiv):
608         (WebCore::HTMLMetaElement::setName):
609         * html/HTMLMetaElement.h: Added.
610         * html/HTMLParser.cpp:
611         * html/HTMLScriptElement.cpp: Added.
612         (WebCore::HTMLScriptElement::HTMLScriptElement):
613         (WebCore::HTMLScriptElement::parseMappedAttribute):
614         (WebCore::HTMLScriptElement::evaluateScript):
615         * html/HTMLScriptElement.h: Added.
616         * html/HTMLStyleElement.cpp: Added.
617         (WebCore::HTMLStyleElement::HTMLStyleElement):
618         * html/HTMLStyleElement.h: Added.
619         * html/HTMLTitleElement.cpp: Added.
620         (WebCore::HTMLTitleElement::HTMLTitleElement):
621         (WebCore::HTMLTitleElement::text):
622         (WebCore::HTMLTitleElement::setText):
623         * html/HTMLTitleElement.h: Added.
624         * html/html_headimpl.cpp: Removed.
625         * html/html_headimpl.h: Removed.
626         * loader/CachedCSSStyleSheet.h:
627         * rendering/RenderTableCell.cpp:
628         (WebCore::RenderTableCell::updateFromElement):
629         * rendering/RenderTableCol.cpp:
630         (WebCore::RenderTableCol::updateFromElement):
631
632 2006-05-12  Eric Seidel  <eseidel@apple.com>
633
634         Reviewed by beth.
635
636         Split out html_tableimpl.* into multiple files (one per class)
637         http://bugzilla.opendarwin.org/show_bug.cgi?id=8873
638
639         * WebCore.xcodeproj/project.pbxproj:
640         * html/HTMLTableCaptionElement.cpp: Added.
641         (WebCore::HTMLTableCaptionElement::HTMLTableCaptionElement):
642         * html/HTMLTableCaptionElement.h: Added.
643         * html/HTMLTableCellElement.cpp: Added.
644         (WebCore::HTMLTableCellElement::HTMLTableCellElement):
645         * html/HTMLTableCellElement.h: Added.
646         * html/HTMLTableColElement.cpp: Added.
647         (WebCore::HTMLTableColElement::HTMLTableColElement):
648         (WebCore::HTMLTableColElement::endTagRequirement):
649         (WebCore::HTMLTableColElement::tagPriority):
650         (WebCore::HTMLTableColElement::checkDTD):
651         * html/HTMLTableColElement.h: Added.
652         * html/HTMLTableElement.cpp: Added.
653         (WebCore::HTMLTableElement::HTMLTableElement):
654         (WebCore::HTMLTableElement::setCaption):
655         (WebCore::HTMLTableElement::setTHead):
656         (WebCore::HTMLTableElement::setTFoot):
657         (WebCore::HTMLTableElement::setTBody):
658         (WebCore::HTMLTableElement::createTHead):
659         (WebCore::HTMLTableElement::deleteTHead):
660         (WebCore::HTMLTableElement::createTFoot):
661         (WebCore::HTMLTableElement::deleteTFoot):
662         (WebCore::HTMLTableElement::createCaption):
663         (WebCore::HTMLTableElement::deleteCaption):
664         (WebCore::HTMLTableElement::insertRow):
665         (WebCore::HTMLTableElement::deleteRow):
666         (WebCore::HTMLTableElement::addChild):
667         (WebCore::HTMLTableElement::parseMappedAttribute):
668         (WebCore::HTMLTableElement::attach):
669         * html/HTMLTableElement.h: Added.
670         * html/HTMLTablePartElement.cpp: Added.
671         (WebCore::HTMLTablePartElement::parseMappedAttribute):
672         * html/HTMLTablePartElement.h: Added.
673         * html/HTMLTableRowElement.cpp: Added.
674         (WebCore::HTMLTableRowElement::HTMLTableRowElement):
675         (WebCore::HTMLTableRowElement::rowIndex):
676         * html/HTMLTableRowElement.h: Added.
677         * html/HTMLTableSectionElement.cpp: Added.
678         (WebCore::HTMLTableSectionElement::insertRow):
679         * html/HTMLTableSectionElement.h: Added.
680         * html/html_tableimpl.cpp: Removed.
681         * html/html_tableimpl.h: Removed.
682
683 2006-05-10  Eric Seidel  <eseidel@apple.com>
684
685         Reviewed by mjs & adele.
686
687         Split html_objectimpl.* into multiple files (one per class)
688         http://bugzilla.opendarwin.org/show_bug.cgi?id=8836
689
690         * WebCore.xcodeproj/project.pbxproj:
691         * bindings/js/kjs_dom.cpp:
692         (KJS::DOMNamedNodeMap::lengthGetter):
693         (KJS::DOMNamedNodeMap::indexGetter):
694         (KJS::DOMNamedNodeMap::nameGetter):
695         (KJS::DOMNamedNodeMapProtoFunc::callAsFunction):
696         (KJS::getRuntimeObject):
697         * bindings/js/kjs_html.cpp:
698         * html/HTMLAppletElement.cpp: Added.
699         * html/HTMLAppletElement.h: Added.
700         * html/HTMLElementFactory.cpp:
701         * html/HTMLEmbedElement.cpp: Added.
702         (WebCore::HTMLEmbedElement::HTMLEmbedElement):
703         (WebCore::HTMLEmbedElement::getInstance):
704         (WebCore::HTMLEmbedElement::parseMappedAttribute):
705         * html/HTMLEmbedElement.h: Added.
706         * html/HTMLNameCollection.cpp:
707         (WebCore::HTMLNameCollection::traverseNextItem):
708         * html/HTMLObjectElement.cpp: Added.
709         (WebCore::HTMLObjectElement::getInstance):
710         (WebCore::HTMLObjectElement::form):
711         (WebCore::HTMLObjectElement::parseMappedAttribute):
712         (WebCore::HTMLObjectElement::updateDocNamedItem):
713         * html/HTMLObjectElement.h: Added.
714         * html/HTMLParamElement.cpp: Added.
715         * html/HTMLParamElement.h: Added.
716         * html/HTMLParser.cpp:
717         * html/HTMLPlugInElement.cpp: Added.
718         * html/HTMLPlugInElement.h: Added.
719         * html/html_objectimpl.cpp: Removed.
720         * html/html_objectimpl.h: Removed.
721         * page/Frame.cpp:
722         (WebCore::Frame::handleFallbackContent):
723         * rendering/RenderApplet.cpp:
724         * rendering/render_frames.cpp:
725         (WebCore::RenderPartObject::updateWidget):
726
727 2006-05-12  Darin Adler  <darin@apple.com>
728
729         Reviewed by Adele.
730
731         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8521
732           crash bringing up context menu with CSS generated content
733
734         * bridge/mac/FrameMac.mm: (WebCore::FrameMac::sendContextMenuEvent):
735         Added a null check.
736
737         * manual-tests/context-click-generated-content.html: Added.
738
739 2006-05-12  Darin Adler  <darin@apple.com>
740
741         Reviewed by Adele.
742
743         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8715
744           REGRESSION: Caret to the right of an image is a big black rectangle.
745
746         * rendering/RenderBox.cpp: (WebCore::RenderBox::caretRect): Move caret to the
747         right side of the rect when the offset is non-zero, rather than expanding it.
748
749         * manual-tests/caret-image.html: Added.
750
751 2006-05-12  Mitz Pettel  <opendarwin.org@mitzpettel.com>
752
753         Reviewed and landed by Anders.
754         
755         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8866
756           REGRESSION: Incorrect caret position in RTL text
757
758         Test: fast/text/international/rtl-caret.html
759
760         * rendering/InlineTextBox.cpp:
761         (WebCore::InlineTextBox::positionForOffset): Added missing m_toAdd argument.
762
763 2006-05-12  David Hyatt  <hyatt@apple.com>
764
765         Bug 8864. Lift WebCoreTextStyle up into the API (as TextStyle).
766
767         Reviewed by mjs
768
769         * platform/Font.cpp:
770         (WebCore::m_finalRoundingWidth):
771         (WebCore::WidthIterator::advance):
772         (WebCore::Font::width):
773         (WebCore::Font::drawSimpleText):
774         (WebCore::Font::drawText):
775         (WebCore::Font::floatWidth):
776         (WebCore::Font::floatWidthForSimpleText):
777         * platform/Font.h:
778         (WebCore::TextStyle::m_attemptFontSubstitution):
779         (WebCore::TextStyle::tabWidth):
780         (WebCore::TextStyle::xPos):
781         (WebCore::TextStyle::padding):
782         (WebCore::TextStyle::rtl):
783         (WebCore::TextStyle::ltr):
784         (WebCore::TextStyle::directionalOverride):
785         (WebCore::TextStyle::applyRunRounding):
786         (WebCore::TextStyle::applyWordRounding):
787         (WebCore::TextStyle::attemptFontSubstitution):
788         (WebCore::Font::operator==):
789         * platform/GraphicsContext.cpp:
790         (WebCore::GraphicsContext::drawText):
791         (WebCore::GraphicsContext::drawHighlightForText):
792         * platform/GraphicsContext.h:
793         * platform/mac/FontMac.mm:
794         (WebCore::overrideLayoutOperation):
795         (WebCore::ATSULayoutParameters::initialize):
796         (WebCore::Font::selectionRectForText):
797         (WebCore::Font::drawComplexText):
798         (WebCore::Font::floatWidthForComplexText):
799         (WebCore::Font::offsetForPosition):
800         * rendering/InlineTextBox.cpp:
801         (WebCore::InlineTextBox::selectionRect):
802         (WebCore::InlineTextBox::paint):
803         (WebCore::InlineTextBox::paintSelection):
804         (WebCore::InlineTextBox::paintMarkedTextBackground):
805         (WebCore::InlineTextBox::paintTextMatchMarker):
806         (WebCore::InlineTextBox::offsetForPosition):
807         (WebCore::InlineTextBox::positionForOffset):
808         * rendering/RenderText.cpp:
809         (WebCore::RenderText::widthFromCache):
810         (WebCore::RenderText::calcMinMaxWidth):
811         (WebCore::RenderText::width):
812         * rendering/RenderTextField.cpp:
813         (WebCore::RenderTextField::calcMinMaxWidth):
814         * rendering/render_line.cpp:
815         (WebCore::EllipsisBox::paint):
816
817 2006-05-11  Alexey Proskuryakov  <ap@nypop.com>
818
819         Reviewed by Darin.
820
821         - http://bugzilla.opendarwin.org/show_bug.cgi?id=8770
822           XMLHttpRequest should strip CR/LF characters from the URL
823
824         Test: fast/loader/url-strip-cr-lf-tab.html
825
826         * platform/KURL.cpp:
827         (appendEscapingBadChars): Strip CR, LF and TAB, as Firefox and IE do.
828
829 2006-05-11  David Hyatt  <hyatt@apple.com>
830
831         Remove the misspelling drawing code from Font and FontData.  Implement it
832         natively in GraphicContext instead.
833
834         Reviewed by maciej
835
836         * platform/FontData.h:
837         * platform/GraphicsContext.cpp:
838         * platform/GraphicsContext.h:
839         * platform/cairo/GraphicsContextCairo.cpp:
840         (WebCore::GraphicsContext::drawLineForMisspelling):
841         * platform/mac/FontData.mm:
842         * platform/mac/FontMac.mm:
843         * platform/mac/GraphicsContextMac.mm:
844         (WebCore::GraphicsContext::drawLineForMisspelling):
845         * platform/win/FontWin.cpp:
846         * rendering/InlineTextBox.cpp:
847         (WebCore::InlineTextBox::paintSpellingMarker):
848
849 2006-05-11  David Hyatt  <hyatt@apple.com>
850
851         Remove drawLineForText from the Font API.  Implement it natively in
852         the two GraphicsContexts (CG and Cairo) instead.
853
854         Reviewed by maciej
855
856         * platform/Font.h:
857         * platform/FontData.h:
858         * platform/GraphicsContext.cpp:
859         * platform/GraphicsContext.h:
860         * platform/cairo/GraphicsContextCairo.cpp:
861         (WebCore::GraphicsContext::drawLineForText):
862         * platform/cg/GraphicsContextCG.cpp:
863         (WebCore::GraphicsContext::drawLineForText):
864         * platform/mac/FontData.mm:
865         * platform/mac/FontMac.mm:
866         * platform/win/FontWin.cpp:
867         (WebCore::Font::drawLineForText):
868         * rendering/InlineTextBox.cpp:
869         (WebCore::InlineTextBox::paintDecoration):
870         (WebCore::InlineTextBox::paintMarkedTextUnderline):
871         * rendering/render_line.cpp:
872         (WebCore::InlineFlowBox::paintDecorations):
873
874 2006-05-11  Steve Falkenburg  <sfalken@apple.com>
875
876         Reviewed by eric.
877
878         Fix last fix.
879
880         * dom/QualifiedName.h:
881         (WebCore::QualifiedName::QualifiedName):
882
883 2006-05-11  Steve Falkenburg  <sfalken@apple.com>
884
885         Reviewed by eric.
886
887         Fix crash on static constructors builds at exit due to qualified name default constructor not
888         initializing m_impl.
889
890         * dom/QualifiedName.cpp:
891         (WebCore::QualifiedName::deref):
892
893 2006-05-11  Mitz Pettel  <opendarwin.org@mitzpettel.com>
894
895         Reviewed by hyatt
896
897         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8851
898           REGRESSION: RTL text shifted to the right
899
900         Already covered by several tests in fast/text
901
902         * platform/Font.h:
903         (WebCore::TextRun::TextRun): Added length parameter.
904         * rendering/InlineTextBox.cpp: Pass the length to the TextRun constructor.
905         (WebCore::InlineTextBox::selectionRect):
906         (WebCore::InlineTextBox::paint):
907         (WebCore::InlineTextBox::paintSelection):
908         (WebCore::InlineTextBox::paintMarkedTextBackground):
909         (WebCore::InlineTextBox::paintTextMatchMarker):
910         (WebCore::InlineTextBox::offsetForPosition):
911         (WebCore::InlineTextBox::positionForOffset):
912         * rendering/RenderText.cpp:
913         (WebCore::RenderText::widthFromCache): Pass length and from instead of from and to
914         to the TextRun constructor.
915         (WebCore::RenderText::width): Ditto.
916
917 2006-05-11  David Hyatt  <hyatt@apple.com>
918
919         Fix a regression from the TextRun landing.  Delete the characters in
920         the adjustedRun, not the ones in the original run!
921
922         Reviewed by beth
923
924         * platform/mac/FontMac.mm:
925         (WebCore::Font::drawComplexText):
926
927 2006-05-10  Justin Garcia  <justin.garcia@apple.com>
928
929         Reviewed by thatcher, levi
930
931         * editing/ReplaceSelectionCommand.cpp:
932         (WebCore::ReplaceSelectionCommand::doApply):
933         Removed a use fragment.hasMoreThanOneBlock to decide if the paragraph containing the
934         position pasted into must be split to avoid block nesting.  We now split unnecessarily
935         some times, but the end merge cleans up for us.
936
937 2006-05-11  David Hyatt  <hyatt@apple.com>
938
939         This patch makes drawHighlightForText a completely cross-platform method
940         implemented by the GraphicsContext.  The platform-specific implementations
941         of the method in the Font class have been eliminated.
942
943         Reviewed by andersca
944
945         * platform/Font.h:
946         * platform/FontData.h:
947         Remove the drawHighlight methods.  Change the selectionRect method in
948         Font to return a FloatRect so that the GraphicsContext can do an accurate
949         fill.
950
951         * platform/GraphicsContext.cpp:
952         (WebCore::GraphicsContext::drawHighlightForText):
953         Implement the drawHighlightFunction in terms of the cross-platform
954         Font selectionRect functions and a new float-based fillRect graphics context
955         function.
956
957         * platform/GraphicsContext.h:
958         * platform/cairo/GraphicsContextCairo.cpp:
959         (WebCore::GraphicsContext::fillRect):
960         * platform/cg/GraphicsContextCG.cpp:
961         (WebCore::GraphicsContext::fillRect):
962         Add the new float-based fillRect function for Cairo and CG.
963
964         * platform/mac/FontData.mm:
965         (WebCore::CG_draw):
966         (WebCore::ATSU_draw):
967         Removed the CG and ATSU drawHighlight methods.  Remove the drawing of
968         the background from the deprecated draw methods (they'll be removed
969         soon).
970
971         * platform/mac/FontMac.mm:
972         (WebCore::Font::selectionRectForText):
973         * platform/win/FontWin.cpp:
974         (WebCore::Font::selectionRectForText):
975         Change selectionRectForText to return a FloatRect instead of an IntRect,
976         so that the GraphicsContext can do a precise fill.
977
978         * rendering/InlineTextBox.cpp:
979         (WebCore::InlineTextBox::selectionRect):
980         (WebCore::InlineTextBox::positionForOffset):
981         Modify the callers who expect an int-based selection rect so that they call
982         enclosingIntRect.
983
984 2006-05-11  Darin Adler  <darin@apple.com>
985
986         Reviewed by Adele.
987
988         - http://bugzilla.opendarwin.org/show_bug.cgi?id=8743
989           REGRESSION: focus() on input field selects all text within it
990           (was: cannot select cities on British Rail reservation site)
991
992         Test: fast/forms/double-focus.html
993
994         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::focus):
995         Changed to only call setFocusNode, select, and revealSelection
996         if the element is not already focused. Also changed to use return
997         a bit more rather than else.
998
999 2006-05-11  Darin Adler  <darin@apple.com>
1000
1001         Reviewed by Tim Hatcher (earlier version).
1002
1003         - http://bugzilla.opendarwin.org/show_bug.cgi?id=8821
1004           use the preprocessor for IDL files
1005
1006         * bindings/scripts/IDLParser.pm: Invoke the preprocessor via the "gcc"
1007         driver script, passing "-E" so we only preprocess, "-P" so we don't get
1008         "#line" directives, and "-x c++" so we handle both C and C++ comments.
1009         Removed the code to eliminate comments since the preprocessor handles that.
1010         * css/make-css-file-arrays.pl: This already invoked the preprocessor, but
1011         updated it to do the same way as above.
1012
1013 2006-05-11  Anders Carlsson  <acarlsson@apple.com>
1014
1015         Reviewed by Darin.
1016
1017         http://bugzilla.opendarwin.org/show_bug.cgi?id=7838
1018         Add support for mozilla-style node constructors as properties of the window object
1019         
1020         * DerivedSources.make:
1021         * WebCore.xcodeproj/project.pbxproj:
1022         Add new generated files.
1023         
1024         * bindings/js/JSCanvasRenderingContext2DBase.cpp:
1025         (WebCore::JSCanvasRenderingContext2DBaseProtoFunc::callAsFunction):
1026         * bindings/js/JSHTMLElementWrapperFactory.cpp:
1027         (WebCore::createJSWrapper):
1028         Specify the KJS namespace for JSHTMLElmement.
1029                 
1030         * bindings/js/kjs_dom.cpp:
1031         (KJS::toJS):
1032         Create a WebCore::JSHTMLDocument for document nodes. Also, create
1033         JSDocumentFragments for document fragments (instead of plain node objects).
1034         
1035         * bindings/js/kjs_html.cpp:
1036         (KJS::JSHTMLDocumentProtoFunc::callAsFunction):
1037         (KJS::JSHTMLDocument::JSHTMLDocument):
1038         (KJS::JSHTMLDocument::getOwnPropertySlot):
1039         Add a prototype for JSHTMLDocument and move all functions there.
1040         
1041         (KJS::JSHTMLElement::JSHTMLElement):
1042         (KJS::JSHTMLElement::getOwnPropertySlot):
1043         Update since JSHTMLElement now inherits from WebCore::JSHTMLElement.
1044         
1045         (KJS::JSHTMLElement::getValueProperty):
1046         (KJS::JSHTMLElement::putValueProperty):
1047         Remove title setter and getter. Those are autogenerated now.
1048         
1049         * bindings/js/kjs_html.h:
1050         (KJS::JSHTMLElement::):
1051         Inherit from WebCore::JSHTMLElement. Clarify the inheritance chain.
1052         
1053         * bindings/scripts/CodeGeneratorJS.pm:
1054         Always generate a prototype object, regardless of whether the object has any functions or
1055         constants.
1056         
1057         Use the type of generator attributes to determine what constructor to use. This is useful for
1058         the XMLDocument property in DOMWindow.idl, since that's just an alias for the Document constructor.
1059         
1060         * dom/DocumentFragment.idl: Added.        
1061         * html/HTMLDocument.idl: Added.
1062         * html/HTMLElement.idl: Added.
1063         
1064         * page/DOMWindow.idl:
1065         Add constructors for DocumentFragment, HTMLElement, HTMLDocument and XMLDocument. XMLDocument is just
1066         an alias for the Document constructor.
1067         
1068 2006-05-11  David Hyatt  <hyatt@apple.com>
1069
1070         Bug 8845.  Define a TextRun (similar to the old WebCoreTextRun) and
1071         make it the new API for Font and GraphicsContext when drawing/measuring
1072         text.
1073
1074         Reviewed by andersca
1075
1076         * platform/Font.cpp:
1077         (WebCore::m_finalRoundingWidth):
1078         (WebCore::WidthIterator::advance):
1079         (WebCore::WidthIterator::normalizeVoicingMarks):
1080         (WebCore::Font::width):
1081         (WebCore::Font::canUseGlyphCache):
1082         (WebCore::Font::drawSimpleText):
1083         (WebCore::Font::drawText):
1084         (WebCore::Font::floatWidth):
1085         (WebCore::Font::floatWidthForSimpleText):
1086         * platform/Font.h:
1087         (WebCore::TextRun::m_to):
1088         (WebCore::TextRun::operator[]):
1089         (WebCore::TextRun::data):
1090         (WebCore::TextRun::adjustFrom):
1091         (WebCore::TextRun::adjustTo):
1092         (WebCore::TextRun::characters):
1093         (WebCore::TextRun::length):
1094         (WebCore::TextRun::from):
1095         (WebCore::TextRun::to):
1096         * platform/GraphicsContext.cpp:
1097         (WebCore::GraphicsContext::drawText):
1098         (WebCore::GraphicsContext::drawHighlightForText):
1099         * platform/GraphicsContext.h:
1100         * platform/mac/FontMac.mm:
1101         (WebCore::addDirectionalOverride):
1102         (WebCore::overrideLayoutOperation):
1103         (WebCore::ATSULayoutParameters::initialize):
1104         (WebCore::Font::selectionRectForText):
1105         (WebCore::Font::drawComplexText):
1106         (WebCore::Font::drawHighlightForText):
1107         (WebCore::Font::floatWidthForComplexText):
1108         (WebCore::Font::checkSelectionPoint):
1109         * platform/win/FontWin.cpp:
1110         (WebCore::hackishExtentForString):
1111         (WebCore::Font::floatWidth):
1112         (WebCore::Font::drawText):
1113         (WebCore::Font::drawHighlightForText):
1114         (WebCore::Font::selectionRectForText):
1115         (WebCore::Font::checkSelectionPoint):
1116         * rendering/InlineTextBox.cpp:
1117         (WebCore::InlineTextBox::selectionRect):
1118         (WebCore::InlineTextBox::paint):
1119         (WebCore::InlineTextBox::paintSelection):
1120         (WebCore::InlineTextBox::paintMarkedTextBackground):
1121         (WebCore::InlineTextBox::paintTextMatchMarker):
1122         (WebCore::InlineTextBox::offsetForPosition):
1123         (WebCore::InlineTextBox::positionForOffset):
1124         * rendering/RenderBlock.cpp:
1125         (WebCore::stripTrailingSpace):
1126         * rendering/RenderFlexibleBox.cpp:
1127         (WebCore::RenderFlexibleBox::layoutVerticalBox):
1128         * rendering/RenderImage.cpp:
1129         (WebCore::RenderImage::imageChanged):
1130         (WebCore::RenderImage::paint):
1131         * rendering/RenderText.cpp:
1132         (WebCore::RenderText::cacheWidths):
1133         (WebCore::RenderText::widthFromCache):
1134         (WebCore::RenderText::trimmedMinMaxWidth):
1135         (WebCore::RenderText::calcMinMaxWidth):
1136         (WebCore::RenderText::width):
1137         * rendering/RenderTextField.cpp:
1138         (WebCore::RenderTextField::calcMinMaxWidth):
1139         * rendering/bidi.cpp:
1140         (WebCore::RenderBlock::tabWidth):
1141         (WebCore::RenderBlock::checkLinesForTextOverflow):
1142         * rendering/render_line.cpp:
1143         (WebCore::EllipsisBox::paint):
1144         * rendering/render_list.cpp:
1145         (WebCore::RenderListMarker::paint):
1146         (WebCore::RenderListMarker::calcMinMaxWidth):
1147         (WebCore::RenderListMarker::getRelativeMarkerRect):
1148
1149 2006-05-10  Justin Garcia  <justin.garcia@apple.com>
1150
1151         Reviewed by darin
1152
1153         * editing/ReplaceSelectionCommand.cpp:
1154         (WebCore::ReplaceSelectionCommand::doApply):
1155         Removed the code to find out if we must later add smart replace whitespace.  We can 
1156         wait until we've done the insertion to figure it out, and the position sampled (startPos)
1157         to make the decision about trailing whitespace was wrong.
1158         Changed the order that work is done during a paste: 1) Insert everything 2) Do one of
1159         the following: a) handle a trailing interchange newline, b) uncollapse the last incoming
1160         br if it has been collapsed because of quirks mode, c) do an end merge 3) Add smart replace
1161         whitespace (2 and 3 were reversed because the end merge must happen before we can know
1162         whether or not we need to add a trailing space).
1163         Don't do an end merge if the last node inserted was a br because the end merge will 
1164         clobber it.
1165         
1166         (WebCore::ReplaceSelectionCommand::removeEndBRIfNeeded):
1167         brs where [br, 0] is at the end of a block and not at the start of a paragraph
1168         are the ones that are collapsed because of quirks mode.
1169
1170 2006-05-10  David Hyatt  <hyatt@apple.com>
1171
1172         Rename isSpace to treatAsSpace.  Move it and the rounding hack function into
1173         Font and make them static methods (inlined in the header).  Make the rounding
1174         hack character table a static member as well.  Remove the redundant space/rounding
1175         functions from FontData.mm.
1176
1177         Reviewed by darin
1178
1179         * platform/Font.cpp:
1180         (WebCore::):
1181         (WebCore::m_finalRoundingWidth):
1182         (WebCore::WidthIterator::advance):
1183         * platform/Font.h:
1184         (WebCore::Font::treatAsSpace):
1185         (WebCore::Font::isRoundingHackCharacter):
1186         * platform/mac/FontData.mm:
1187         (WebCore::overrideLayoutOperation):
1188         (WebCore::createATSULayoutParameters):
1189         (WebCore::initializeWidthIterator):
1190         (WebCore::advanceWidthIterator):
1191         * platform/mac/FontMac.mm:
1192         (WebCore::overrideLayoutOperation):
1193         (WebCore::ATSULayoutParameters::initialize):
1194
1195 2006-05-10  Darin Adler  <darin@apple.com>
1196
1197         * WebCore: Removed an extra WebCore subtree that somehow got checked in.
1198
1199 2006-05-10  David Carson <dacarson@gmail.com>
1200
1201         - Fix for bug 8833. Removed inline keyword from functions declared
1202         in .mm and .cpp files. inline function code needs to reside in the
1203         header file for the linker to find the code. 
1204         http://www.parashift.com/c++-faq-lite/inline-functions.html#faq-9.7
1205
1206         Reviewed by Darin, landed by Timothy.
1207
1208         * platform/Font.cpp:
1209         (WebCore::isSpace):
1210         * platform/mac/FontData.mm:
1211         (WebCore::widthForGlyph):
1212         (WebCore::isRoundingHackCharacter):
1213         (WebCore::glyphForCharacter):
1214
1215 2006-05-10  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1216
1217         Reviewed and landed by Anders.
1218
1219         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8830
1220           REGRESSION: Words render on top of each other when fallback font is used
1221
1222         Already covered by several pixel tests in fast/text
1223
1224         * platform/Font.cpp:
1225         (WebCore::Font::drawSimpleText):
1226
1227 2006-05-10  David Hyatt  <hyatt@apple.com>
1228
1229         Fix for bug 8809, lift the Mac-specific WebTextRenderer code for
1230         drawing and measuring of runs up into the Font class.  The fast code
1231         path is in Font.cpp and is designed to be mostly cross-platform.  The
1232         slow code path is in FontMac.cpp and is Mac-specific.
1233
1234         Reviewed by darin
1235
1236         * WebCore.xcodeproj/project.pbxproj:
1237         * platform/Font.cpp:
1238         (WebCore::isSpace):
1239         (WebCore::):
1240         (WebCore::isRoundingHackCharacter):
1241         (WebCore::m_finalRoundingWidth):
1242         (WebCore::WidthIterator::advance):
1243         (WebCore::WidthIterator::normalizeVoicingMarks):
1244         (WebCore::Font::primaryFont):
1245         (WebCore::Font::setAlwaysUseComplexPath):
1246         (WebCore::Font::canUseGlyphCache):
1247         (WebCore::Font::drawSimpleText):
1248         (WebCore::Font::drawText):
1249         (WebCore::Font::floatWidth):
1250         (WebCore::Font::floatWidthForSimpleText):
1251         * platform/Font.h:
1252         * platform/FontData.h:
1253         (WebCore::FontData::platformData):
1254         * platform/GlyphBuffer.h: Added.
1255         (WebCore::GlyphBuffer::GlyphBuffer):
1256         (WebCore::GlyphBuffer::isEmpty):
1257         (WebCore::GlyphBuffer::size):
1258         (WebCore::GlyphBuffer::glyphs):
1259         (WebCore::GlyphBuffer::advances):
1260         (WebCore::GlyphBuffer::fontDataAt):
1261         (WebCore::GlyphBuffer::swap):
1262         (WebCore::GlyphBuffer::glyphAt):
1263         (WebCore::GlyphBuffer::advanceAt):
1264         (WebCore::GlyphBuffer::add):
1265         * platform/mac/FontData.mm:
1266         (WebCore::isSpace):
1267         (WebCore::isRoundingHackCharacter):
1268         (WebCore::FontData::widthForGlyph):
1269         (WebCore::m_ATSUMirrors):
1270         (WebCore::FontData::xHeight):
1271         (WebCore::FontData::smallCapsFontData):
1272         (WebCore::findSubstituteFont):
1273         (WebCore::rendererForAlternateFont):
1274         (WebCore::findSubstituteRenderer):
1275         (WebCore::FontData::findSubstituteFontData):
1276         (WebCore::computeWidthForSpace):
1277         (WebCore::FontData::updateGlyphMapEntry):
1278         (WebCore::extendGlyphMap):
1279         (WebCore::extendWidthMap):
1280         (WebCore::createATSULayoutParameters):
1281         (WebCore::FontData::glyphForCharacter):
1282         (WebCore::advanceWidthIterator):
1283         (WebCore::shouldUseATSU):
1284         * platform/mac/FontMac.mm:
1285         (WebCore::ATSULayoutParameters::m_padPerSpace):
1286         (WebCore::addDirectionalOverride):
1287         (WebCore::initializeATSUStyle):
1288         (WebCore::overrideLayoutOperation):
1289         (WebCore::ATSULayoutParameters::initialize):
1290         (WebCore::disposeATSULayoutParameters):
1291         (WebCore::Font::drawComplexText):
1292         (WebCore::Font::floatWidthForComplexText):
1293         (WebCore::Font::drawGlyphs):
1294         * platform/mac/WebCoreTextRenderer.mm:
1295         (WebCoreSetAlwaysUseATSU):
1296
1297 2006-05-10  Darin Adler  <darin@apple.com>
1298
1299         - another try at fixing the Windows build
1300
1301         * platform/win/FontWin.cpp: (WebCore::getFontData): Use characters()
1302         instead of unicode().
1303
1304 == Rolled over to ChangeLog-2006-05-10 ==