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