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