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