* platform/mac/GraphicsContextMac.mm: Fix one no-SVG compile problem by adding
[WebKit-https.git] / WebCore / ChangeLog
1 2006-04-13  Darin Adler  <darin@apple.com>
2
3         * platform/mac/GraphicsContextMac.mm: Fix one no-SVG compile problem by adding
4         a "using namespace std".
5
6 2006-04-12  Darin Adler  <darin@apple.com>
7
8         Rubber-stamped by Anders.
9
10         - fix Windows build
11
12         * WebCore.vcproj/Image\ Viewer/Image\ Viewer.vcproj: Add loader directory.
13
14         - use std::min/max exclusively intead of kMin/Max
15         - eliminate KWQDef.h since all it had left in it was kMin/Max
16
17         * WebCore.vcproj/WebCore/WebCore.vcproj: Remove KWQDef.h.
18         * WebCore.xcodeproj/project.pbxproj: Ditto.
19
20         * kwq/KWQDef.h: Removed.
21
22         * bridge/mac/FrameMac.mm:
23         (WebCore::FrameMac::attributedString):
24         * bridge/mac/WebCoreFrameBridge.mm:
25         (-[WebCoreFrameBridge computePageRectsWithPrintWidthScaleFactor:printHeight:]):
26         * css/cssstyleselector.cpp:
27         (WebCore::CSSStyleSelector::applyProperty):
28         (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
29         (WebCore::CSSStyleSelector::fontSizeForKeyword):
30         * dom/Document.cpp:
31         (WebCore::Document::minimumLayoutDelay):
32         (WebCore::Document::addMarker):
33         * dom/StyledElement.cpp:
34         (WebCore::StyledElement::addCSSColor):
35         * dom/xml_tokenizer.cpp:
36         (WebCore::OffsetBuffer::readOutBytes):
37         * editing/ApplyStyleCommand.cpp:
38         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
39         * editing/CompositeEditCommand.cpp:
40         (WebCore::CompositeEditCommand::deleteInsignificantText):
41         * editing/TextIterator.cpp:
42         (WebCore::TextIterator::handleTextNode):
43         (WebCore::TextIterator::handleTextBox):
44         (WebCore::CharacterIterator::string):
45         (WebCore::findPlainText):
46         * editing/htmlediting.cpp:
47         (WebCore::rangeCompliantEquivalent):
48         * editing/markup.cpp:
49         (WebCore::renderedText):
50         * editing/visible_units.cpp:
51         (WebCore::startOfParagraph):
52         * html/HTMLSelectElement.cpp:
53         (WebCore::HTMLSelectElement::parseMappedAttribute):
54         * html/HTMLTokenizer.cpp:
55         (WebCore::HTMLTokenizer::parseComment):
56         (WebCore::HTMLTokenizer::parseEntity):
57         (WebCore::HTMLTokenizer::parseTag):
58         (WebCore::HTMLTokenizer::enlargeBuffer):
59         (WebCore::HTMLTokenizer::enlargeScriptBuffer):
60         * html/html_imageimpl.cpp:
61         (WebCore::HTMLAreaElement::getRegion):
62         * html/html_tableimpl.cpp:
63         (WebCore::HTMLTableElement::parseMappedAttribute):
64         * ksvg2/css/SVGCSSParser.cpp:
65         (WebCore::CSSParser::parseSVGPaint):
66         (WebCore::CSSParser::parseSVGColor):
67         * kwq/KWQComboBox.mm:
68         (QComboBox::sizeHint):
69         * kwq/KWQListBox.mm:
70         (QListBox::sizeForNumberOfLines):
71         * kwq/KWQSlider.mm:
72         (QSlider::setValue):
73         * loader/Cache.cpp:
74         (WebCore::Cache::setSize):
75         * page/Frame.cpp:
76         (WebCore::Frame::forceLayoutWithPageWidthRange):
77         * platform/DeprecatedPtrListImpl.h:
78         * platform/DeprecatedString.cpp:
79         (ucstrcmp):
80         * platform/DeprecatedString.h:
81         * platform/DeprecatedValueListImpl.h:
82         * platform/mac/GraphicsContextMac.mm:
83         (WebCore::GraphicsContext::addRoundedRectClip):
84         * platform/mac/WebCoreTextArea.mm:
85         (-[WebCoreTextView _trackResizeFromMouseDown:]):
86         * rendering/InlineTextBox.cpp:
87         (WebCore::InlineTextBox::isSelected):
88         (WebCore::InlineTextBox::selectionRect):
89         (WebCore::InlineTextBox::placeEllipsisBox):
90         (WebCore::InlineTextBox::selectionStartEnd):
91         (WebCore::InlineTextBox::paintMarkedTextBackground):
92         (WebCore::InlineTextBox::paintSpellingMarker):
93         (WebCore::InlineTextBox::paintTextMatchMarker):
94         (WebCore::InlineTextBox::paintMarkedTextUnderline):
95         * rendering/RenderBlock.cpp:
96         (WebCore::RenderBlock::overflowRect):
97         (WebCore::RenderBlock::layoutBlock):
98         (WebCore::RenderBlock::collapseMargins):
99         (WebCore::RenderBlock::clearFloatsIfNeeded):
100         (WebCore::RenderBlock::estimateVerticalPosition):
101         (WebCore::RenderBlock::determineHorizontalPosition):
102         (WebCore::RenderBlock::setCollapsedBottomMargin):
103         (WebCore::RenderBlock::handleBottomOfBlock):
104         (WebCore::RenderBlock::layoutBlockChildren):
105         (WebCore::RenderBlock::fillVerticalSelectionGap):
106         (WebCore::RenderBlock::fillLeftSelectionGap):
107         (WebCore::RenderBlock::fillRightSelectionGap):
108         (WebCore::RenderBlock::positionNewFloats):
109         (WebCore::RenderBlock::nearestFloatBottom):
110         (WebCore::RenderBlock::lowestPosition):
111         (WebCore::RenderBlock::rightmostPosition):
112         (WebCore::RenderBlock::leftmostPosition):
113         (WebCore::RenderBlock::getClearDelta):
114         (WebCore::RenderBlock::calcMinMaxWidth):
115         (WebCore::RenderBlock::calcInlineMinMaxWidth):
116         (WebCore::RenderBlock::calcBlocminMaxWidth):
117         * rendering/RenderBlock.h:
118         * rendering/RenderBox.cpp:
119         (WebCore::RenderBox::calcBorderBoxWidth):
120         (WebCore::RenderBox::calcBorderBoxHeight):
121         (WebCore::RenderBox::calcContentBoxWidth):
122         (WebCore::RenderBox::calcContentBoxHeight):
123         (WebCore::RenderBox::paintRootBoxDecorations):
124         (WebCore::RenderBox::paintBoxDecorations):
125         (WebCore::RenderBox::calcWidth):
126         (WebCore::RenderBox::calcWidthUsing):
127         (WebCore::RenderBox::calcHeight):
128         (WebCore::RenderBox::calcPercentageHeight):
129         (WebCore::RenderBox::calcReplacedWidth):
130         (WebCore::RenderBox::calcReplacedHeight):
131         (WebCore::RenderBox::calcAbsoluteHorizontalValues):
132         (WebCore::RenderBox::calcAbsoluteVerticalValues):
133         * rendering/RenderCanvas.cpp:
134         (WebCore::RenderCanvas::layout):
135         * rendering/RenderFlexibleBox.cpp:
136         (WebCore::RenderFlexibleBox::calcMinMaxWidth):
137         (WebCore::RenderFlexibleBox::layoutHorizontalBox):
138         (WebCore::RenderFlexibleBox::layoutVerticalBox):
139         (WebCore::RenderFlexibleBox::allowedChildFlex):
140         * rendering/RenderFlow.cpp:
141         (WebCore::RenderFlow::paintLines):
142         (WebCore::RenderFlow::lowestPosition):
143         (WebCore::RenderFlow::rightmostPosition):
144         (WebCore::RenderFlow::leftmostPosition):
145         (WebCore::RenderFlow::paintOutlineForLine):
146         * rendering/RenderImage.cpp:
147         (WebCore::RenderImage::imageChanged):
148         (WebCore::RenderImage::calcReplacedWidth):
149         (WebCore::RenderImage::calcReplacedHeight):
150         * rendering/RenderLayer.cpp:
151         (WebCore::RenderLayer::scrollRectToVisible):
152         (WebCore::RenderLayer::computeScrollDimensions):
153         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
154         (WebCore::RenderLayer::absoluteBoundingBox):
155         (WebCore::Marquee::marqueeSpeed):
156         (WebCore::Marquee::computePosition):
157         (WebCore::Marquee::timerFired):
158         * rendering/RenderObject.cpp:
159         (WebCore::RenderObject::drawBorder):
160         (WebCore::RenderObject::paintBorderImage):
161         (WebCore::RenderObject::paintBorder):
162         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
163         * rendering/RenderTable.cpp:
164         (WebCore::RenderTable::calcWidth):
165         (WebCore::RenderTable::layout):
166         (WebCore::RenderTable::paintBoxDecorations):
167         * rendering/RenderTableCell.cpp:
168         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
169         * rendering/RenderTableSection.cpp:
170         (WebCore::RenderTableSection::layoutRows):
171         (WebCore::RenderTableSection::lowestPosition):
172         (WebCore::RenderTableSection::rightmostPosition):
173         (WebCore::RenderTableSection::leftmostPosition):
174         * rendering/RenderText.cpp:
175         (WebCore::RenderText::caretRect):
176         (WebCore::RenderText::calcMinMaxWidth):
177         (WebCore::RenderText::minXPos):
178         (WebCore::RenderText::width):
179         (WebCore::RenderText::caretMinOffset):
180         (WebCore::RenderText::caretMaxOffset):
181         * rendering/bidi.cpp:
182         (WebCore::RenderBlock::computeHorizontalPositionsForLine):
183         (WebCore::RenderBlock::layoutInlineChildren):
184         (WebCore::RenderBlock::checkLinesForOverflow):
185         * rendering/render_form.cpp:
186         (WebCore::RenderLineEdit::setSelectionStart):
187         (WebCore::RenderLineEdit::setSelectionEnd):
188         (WebCore::RenderLineEdit::setSelectionRange):
189         (WebCore::RenderFieldset::layoutLegend):
190         (WebCore::RenderFieldset::paintBoxDecorations):
191         (WebCore::RenderSelect::layout):
192         (WebCore::RenderTextArea::calcMinMaxWidth):
193         (WebCore::RenderSlider::updateFromElement):
194         * rendering/render_frames.cpp:
195         (WebCore::RenderFrameSet::layout):
196         * rendering/render_line.cpp:
197         (WebCore::InlineFlowBox::placeBoxesHorizontally):
198         (WebCore::InlineFlowBox::verticallyAlignBoxes):
199         (WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
200         (WebCore::InlineFlowBox::placeBoxesVertically):
201         (WebCore::InlineFlowBox::paintBackgroundAndBorder):
202         * rendering/render_line.h:
203         (WebCore::RootInlineBox::selectionHeight):
204         * rendering/render_list.cpp:
205         (WebCore::RenderListItem::positionListMarker):
206         * rendering/render_replaced.cpp:
207         (WebCore::RenderReplaced::shouldPaint):
208         * rendering/table_layout.cpp:
209         (WebCore::FixedTableLayout::calcMinMaxWidth):
210         (WebCore::AutoTableLayout::recalcColumn):
211         (WebCore::AutoTableLayout::calcMinMaxWidth):
212         (WebCore::AutoTableLayout::calcEffectiveWidth):
213         (WebCore::AutoTableLayout::layout):
214         Use min/max instead of kMin/kMax.
215
216 2006-04-12  Darin Adler  <darin@apple.com>
217
218         Rubber-stamped by Anders.
219
220         - get ready for some more de-KWQ-ing done by the renaming script in two ways
221             1) stop using forwarding headers for things within WebCore
222             2) remove a bit of unused stuff
223
224         * loader/CachedImage.h:
225         * loader/CachedImage.cpp:
226         * loader/DocLoader.cpp:
227         * loader/DocLoader.h:
228         * page/Frame.cpp:
229         * xml/XSLTProcessor.cpp:
230         Removed unused showAnimations functions and data. We can add back later if we need it.
231         And if we do, we won't use a typedef from KHTMLSettings.
232
233         * ForwardingHeaders/java: Removed.
234         * ForwardingHeaders/java/kjavaappletwidget.h: Removed.
235         * ForwardingHeaders/khtml_settings.h: Removed.
236         * ForwardingHeaders/kio: Removed.
237         * ForwardingHeaders/kio/global.h: Removed.
238         * ForwardingHeaders/ksslkeygen.h: Removed.
239         * ForwardingHeaders/q3ptrlist.h: Removed.
240         * ForwardingHeaders/q3valuelist.h: Removed.
241         * ForwardingHeaders/qcombobox.h: Removed.
242         * ForwardingHeaders/qfontmetrics.h: Removed.
243         * ForwardingHeaders/qlineedit.h: Removed.
244         * ForwardingHeaders/qmatrix.h: Removed.
245         * ForwardingHeaders/qptrlist.h: Removed.
246         * ForwardingHeaders/qptrqueue.h: Removed.
247         * ForwardingHeaders/qregexp.h: Removed.
248         * ForwardingHeaders/qscrollbar.h: Removed.
249         * ForwardingHeaders/qtextedit.h: Removed.
250         * ForwardingHeaders/qtextstream.h: Removed.
251         * ForwardingHeaders/qvaluelist.h: Removed.
252         * ForwardingHeaders/qwmatrix.h: Removed.
253
254         * WebCore+SVG/DOMList.h:
255         * bindings/js/kjs_dom.cpp:
256         * bindings/js/kjs_dom.h:
257         * bindings/js/kjs_window.cpp:
258         * css/css_stylesheetimpl.h:
259         * css/css_valueimpl.cpp:
260         * css/css_valueimpl.h:
261         * css/cssstyleselector.cpp:
262         * dom/CharacterData.cpp:
263         * dom/Document.cpp:
264         * dom/Document.h:
265         * dom/EventTargetNode.cpp:
266         * dom/Node.cpp:
267         * editing/BreakBlockquoteCommand.h:
268         * editing/htmlediting.cpp:
269         * html/FormDataList.h:
270         * html/HTMLKeygenElement.cpp:
271         * html/HTMLTokenizer.h:
272         * html/html_objectimpl.cpp:
273         * kcanvas/KCanvasFilters.cpp:
274         * kcanvas/KCanvasMatrix.cpp:
275         * kcanvas/KCanvasMatrix.h:
276         * kcanvas/KCanvasPath.cpp:
277         * kcanvas/KCanvasPath.h:
278         * kcanvas/KCanvasResources.cpp:
279         * kcanvas/KCanvasTreeDebug.h:
280         * kcanvas/RenderForeignObject.h:
281         * kcanvas/RenderPath.h:
282         * kcanvas/RenderSVGImage.h:
283         * kcanvas/RenderSVGText.h:
284         * kcanvas/device/KRenderingPaintServerGradient.cpp:
285         * kcanvas/device/KRenderingPaintServerPattern.cpp:
286         * kcanvas/device/KRenderingPaintServerSolid.cpp:
287         * kcanvas/device/quartz/KCanvasItemQuartz.h:
288         * kcanvas/device/quartz/KCanvasResourcesQuartz.h:
289         * ksvg2/svg/SVGColor.cpp:
290         * ksvg2/svg/SVGComponentTransferFunctionElement.cpp:
291         * ksvg2/svg/SVGDocument.h:
292         * ksvg2/svg/SVGFEBlendElement.cpp:
293         * ksvg2/svg/SVGFEColorMatrixElement.cpp:
294         * ksvg2/svg/SVGFEComponentTransferElement.cpp:
295         * ksvg2/svg/SVGFECompositeElement.cpp:
296         * ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
297         * ksvg2/svg/SVGFEDisplacementMapElement.cpp:
298         * ksvg2/svg/SVGFEGaussianBlurElement.cpp:
299         * ksvg2/svg/SVGFELightElement.cpp:
300         * ksvg2/svg/SVGFEMergeElement.cpp:
301         * ksvg2/svg/SVGFEOffsetElement.cpp:
302         * ksvg2/svg/SVGFESpecularLightingElement.cpp:
303         * ksvg2/svg/SVGFETileElement.cpp:
304         * ksvg2/svg/SVGFETurbulenceElement.cpp:
305         * ksvg2/svg/SVGFitToViewBox.cpp:
306         * ksvg2/svg/SVGLengthList.cpp:
307         * ksvg2/svg/SVGMatrix.h:
308         * ksvg2/svg/SVGNumberList.cpp:
309         * ksvg2/svg/SVGPreserveAspectRatio.cpp:
310         * ksvg2/svg/SVGSVGElement.cpp:
311         * ksvg2/svg/SVGStringList.cpp:
312         * ksvg2/svg/SVGStyledElement.h:
313         * ksvg2/svg/SVGStyledTransformableElement.cpp:
314         * ksvg2/svg/SVGTransformable.cpp:
315         * ksvg2/svg/SVGURIReference.h:
316         * ksvg2/svg/svgpathparser.cpp:
317         * kwq/KWQKHTMLSettings.h:
318         * loader/Cache.h:
319         * loader/CachedObject.h:
320         * loader/Decoder.cpp:
321         * loader/FormData.h:
322         * loader/loader.h:
323         * page/Frame.h:
324         * page/FramePrivate.h:
325         * platform/Font.cpp:
326         * platform/SegmentedString.h:
327         * platform/mac/FontMac.mm:
328         * platform/mac/WebCoreTextField.mm:
329         * rendering/RenderBlock.cpp:
330         * rendering/RenderObject.cpp:
331         * rendering/RenderTable.cpp:
332         * rendering/RenderTableCell.cpp:
333         * rendering/RenderTableCol.cpp:
334         * rendering/RenderTableSection.cpp:
335         * rendering/bidi.h:
336         * rendering/break_lines.cpp:
337         * rendering/render_applet.cpp:
338         * rendering/render_form.cpp:
339         * rendering/render_form.h:
340         * rendering/render_frames.cpp:
341         * rendering/render_style.h:
342         * xml/xmlhttprequest.cpp:
343         Updated includes.
344
345         * WebCore.xcodeproj/project.pbxproj: Resorted a couple things.
346
347 2006-04-12  Adele Peterson  <adele@apple.com>
348
349         Reviewed by Darin and Tim O.
350
351         WebCore part of fix for:
352         http://bugzilla.opendarwin.org/show_bug.cgi?id=8061
353         REGRESSION: New text fields need to send callbacks used by autocomplete
354
355         Fix for:
356         http://bugzilla.opendarwin.org/show_bug.cgi?id=8156
357         FrameMac::submitForm is busted after Vector changes
358
359         * bindings/objc/DOMHTML.mm:
360         (-[DOMHTMLInputElement _rectOnScreen]): Use boundingBox method so this no longer relies on an NSTextField.  
361         The old code is no longer needed because this method was used by autocomplete, and that was not enabled for password or search fields.
362         (-[DOMHTMLInputElement _replaceCharactersInRange:withString:selectingFromIndex:]): New implementation that uses setValue and setSelectionRange
363         instead of NSTextField specific code.
364         (-[DOMHTMLInputElement _selectedRange]): Creates range by calling selectionStart and selectionEnd on the input element.
365         (-[DOMHTMLInputElement _setAutofilled:]): Provides a way for the autofill code to set a flag on the input element so
366          it knows when its value is set by autofill.  This is how we change the background color.
367         * bindings/objc/DOMPrivate.h: Removed _displayedValue, _setDisplayedValue, _setBackgroundColor since these are no
368          longer needed for the new text field implementation, and aren't used for remaining NSView-style password and search fields.
369          Added _setAutofilled method.
370         * bridge/mac/FrameMac.h: Added virtual clearRecordedFormValues and recordFormValue.  These were moved into Frame.cpp recently, which broke
371         how Safari asked to add form values to the keychain.
372
373         * bridge/mac/FrameMac.mm:
374         (WebCore::createNSDictionary): Added. Converts a hashmap to an NSDictionary for m_formValuesAboutToBeSubmitted.  This is needed to fix the submit form bug.
375         (WebCore::selectorForKeyEvent): Added.  This helper function converts key events into selectors that the autocomplete code needs to know about.
376         (WebCore::FrameMac::FrameMac):
377         (WebCore::FrameMac::submitForm): Convert saved form and formValues into DOMElement and NSMutableDictionary.
378         (WebCore::FrameMac::textFieldDidBeginEditing): Added so the input element can send this notification over the bridge.
379         (WebCore::FrameMac::textFieldDidEndEditing): ditto.
380         (WebCore::FrameMac::textDidChangeInTextField): ditto.
381         (WebCore::FrameMac::doTextFieldCommandFromEvent): ditto. Also calls selectorForKeyEvent.
382         (WebCore::FrameMac::textWillBeDeletedInTextField): ditto.
383         * page/Frame.cpp:
384         (WebCore::Frame::textFieldDidBeginEditing): ditto.
385         (WebCore::Frame::textFieldDidEndEditing): ditto.
386         (WebCore::Frame::textDidChangeInTextField): ditto.
387         (WebCore::Frame::doTextFieldCommandFromEvent): ditto.
388         (WebCore::Frame::textWillBeDeletedInTextField): ditto.
389         * page/Frame.h: ditto.
390         * platform/PlatformString.h: (WebCore::String::replace): Added to use an existing version of StringImpl::replace.
391
392         * rendering/RenderTextField.cpp:
393         (WebCore::RenderTextField::setSelectionRange): Setting the selection here should close the typing command.
394         (WebCore::RenderTextField::subtreeHasChanged): Calls textDidChangeInTextField.
395
396         * dom/Document.cpp: (WebCore::Document::setFocusNode): Calls dispatchFocusEvent and dispatchBlurEvent instead of directly dispatching the events.  This gives the node a chance to do other work before dispatching the event.
397
398         * dom/EventTargetNode.cpp:
399         (WebCore:: EventTargetNode::dispatchFocusEvent): Added.
400         (WebCore:: EventTargetNode::dispatchBlurEvent): Added.
401         * dom/EventTargetNode.h:
402
403         * html/HTMLInputElement.cpp:
404         (WebCore::HTMLInputElement::init): initializes m_autofilled.
405         (WebCore::HTMLInputElement::dispatchFocusEvent): Calls textFieldDidBeginEditing and then calls up to the base class
406         (WebCore::HTMLInputElement::dispatchBlurEvent): Calls textFieldDidEndEditing and then calls up to the base class
407         (WebCore::HTMLInputElement::defaultEventHandler): For keypress events, calls doTextFieldCommandFromEvent so the form delegate will
408         have a chance to say whether or not it is going to handle the event.
409        (WebCore::HTMLInputElement::isKeyboardFocusable): Uses isNonWidgetTextField instead of checking the inputType.
410         (WebCore::HTMLInputElement::isMouseFocusable): ditto.
411         (WebCore::HTMLInputElement::focus): ditto.
412         (WebCore::HTMLInputElement::constrainValue): Uses isTextField instead of checking inputType.
413         * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::submit): ditto.
414         * html/HTMLInputElement.h:
415         (WebCore::HTMLInputElement::isTextField): Added. Checks for TEXT, PASSWORD, and SEARCH
416         (WebCore::HTMLInputElement::isNonWidgetTextField): Added.  Checks for all converted controls.
417         (WebCore::HTMLInputElement::autofilled): Added.
418         (WebCore::HTMLInputElement::setAutofilled): Added.
419         * html/HTMLTextFieldInnerElement.cpp: (WebCore::HTMLTextFieldInnerElement::defaultEventHandler): Uses isNonWidgetTextField instead of checking the inputType.
420
421         * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::doApply):
422          If the deletion is occuring in a text field, call textWillBeDeletedInTextField so the frame can
423          call across the bridge to notify the form delegate.
424
425         * css/css_base.cpp: (WebCore::CSSSelector::extractPseudoType): Added autofill string for "-khtml-autofill".
426         * css/css_base.h: (WebCore::CSSSelector::): Added PseudoAutofill to enum.
427         * css/cssstyleselector.cpp:
428         (WebCore::CSSStyleSelector::checkOneSelector): Added case for PseudoAutofill that checks the input element's autofilled flag.
429         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Changed  -webkit-focus-ring-color to -khtml-focus-ring-color for consistency.
430         * css/html4.css: Added background-color and background-image for input:-khtml-autofill style.
431          Changed -webkit-focus-ring-color to -khtml-focus-ring-color for consistency.
432         * css/CSSValueKeywords.in: ditto.
433         * css/cssparser.cpp:
434         (WebCore::CSSParser::parseValue): ditto.
435         (WebCore::CSSParser::parseShadow): ditto.
436
437 2006-04-12  Mitz Pettel  <opendarwin.org@mitzpettel.com>
438  
439          Reviewed by hyatt
440  
441          - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=4855
442            List item's bullets fail to redraw correctly after their style is set with JavaScript
443  
444          * manual-tests/list-marker-repaint.html: Added.
445          * rendering/RenderBlock.cpp:
446          (WebCore::RenderBlock::layoutBlock): Call positionListMarker() after laying out
447          the children.
448          (WebCore::RenderBlock::calcInlineMinMaxWidth): Call calcWidth() on the child
449          if we are going to use its marginLeft() or marginRight(), which is if they are
450          given as a percentage or if the child is a list marker.
451          * rendering/RenderBlock.h:
452          (WebCore::RenderBlock::positionListMarker): Added this virtual function which
453          RenderListItem implements and which is called from layoutBlock().
454          * rendering/RenderFlow.cpp:
455          (WebCore::RenderFlow::addFocusRingRects): Avoid adding focus rings around outside list
456          markers. Previously it did not matter since the markers had zero width.
457          * rendering/bidi.cpp:
458          (WebCore::RenderBlock::findNextLineBreak): Outside list markers should not contribute
459          to the line width, even now that they have width.
460          * rendering/render_line.cpp:
461          (WebCore::InlineFlowBox::placeBoxesHorizontally): Skip outside list markers.
462          * rendering/render_list.cpp:
463          (WebCore::RenderListItem::positionListMarker): Added.
464          (WebCore::RenderListMarker::paint): Removed code that was used to right-align outside
465          text markers, since that is achieved by margins now.
466          (WebCore::RenderListMarker::calcMinMaxWidth): Changed the marker height to be the font height.
467          Made the width of outside list markers non-zero and equal to the width of inside markers.
468          Changed the width to include only the marker and not any padding. Increased the width of bullets
469          by 2 to contain spillage due to antialiasing.
470          (WebCore::RenderListMarker::calcWidth): Calculate horizontal margins. Padding that was
471          previously included in the width is now part of the margins. 
472          (WebCore::RenderListMarker::getRelativeMarkerRect): Adjusted for the changes to width and
473          margins.
474          * rendering/render_list.h:
475
476 2006-04-12  Darin Adler  <darin@apple.com>
477
478         Rubber-stamped by Hyatt.
479
480         - moved some more files out of KWQ to more-permanent homes
481
482         * WebCore.vcproj/WebCore/WebCore.vcproj: Updated for new locations.
483         * WebCore.xcodeproj/project.pbxproj: Ditto.
484
485         * kwq/BlockExceptions.h: Removed.
486         * kwq/BlockExceptions.mm: Removed.
487         * kwq/ClipboardMac.h: Removed.
488         * kwq/ClipboardMac.mm: Removed.
489         * kwq/DeprecatedPtrList.h: Removed.
490         * kwq/DeprecatedPtrListImpl.cpp: Removed.
491         * kwq/DeprecatedPtrListImpl.h: Removed.
492         * kwq/DeprecatedValueList.h: Removed.
493         * kwq/DeprecatedValueListImpl.cpp: Removed.
494         * kwq/DeprecatedValueListImpl.h: Removed.
495         * kwq/WebCoreTextArea.h: Removed.
496         * kwq/WebCoreTextArea.mm: Removed.
497         * kwq/WebCoreTextField.h: Removed.
498         * kwq/WebCoreTextField.mm: Removed.
499         * platform/DeprecatedPtrList.h: Added.
500         * platform/DeprecatedPtrListImpl.cpp: Added.
501         * platform/DeprecatedPtrListImpl.h: Added.
502         * platform/DeprecatedValueList.h: Added.
503         * platform/DeprecatedValueListImpl.cpp: Added.
504         * platform/DeprecatedValueListImpl.h: Added.
505         * platform/mac/BlockExceptions.h: Added.
506         * platform/mac/BlockExceptions.mm: Added.
507         * platform/mac/ClipboardMac.h: Added.
508         * platform/mac/ClipboardMac.mm: Added.
509         * platform/mac/WebCoreTextArea.h: Added.
510         * platform/mac/WebCoreTextArea.mm: Added.
511         * platform/mac/WebCoreTextField.h: Added.
512         * platform/mac/WebCoreTextField.mm: Added.
513
514 2006-04-12  David Harrison  <harrison@apple.com>
515
516         Reviewed by Darin.
517
518         <rdar://problem/4386640> AX: AXPreviousSentenceStartTextMarkerForTextMarker does not respect paragraph boundary
519         <rdar://problem/4414575> AX: Dictionary popup cannot find some words on Dictionary.app
520
521         AXPreviousSentenceStartTextMarkerForTextMarker failed to stop at the beginning a block because
522         SimplifiedBackwardsTextIterator::handleNonTextNode() emitted a space when exiting the block.
523         Fixed by emitting a newline instead.
524         
525         Word boundary failed to stop at the beginning of a block because no character at all was emitted
526         when leaving the block, because the exitNode was checking specific html tags to decide whether the
527         node is block, but the node was xml.  Fixed by using the node's renderer, if present.
528         
529         (see related changes in WebKit)
530         
531         Tests added:
532         * editing/selection/extend-by-sentence-001.html: Added.
533         * fast/dom/inner-text-001.html: Added.
534         
535         * bridge/mac/WebCoreFrameBridge.h:
536         * bridge/mac/WebCoreFrameBridge.mm:
537         (-[WebCoreFrameBridge alterCurrentSelection:direction:granularity:]):
538         Add sentence navigation/selection.
539         
540         * editing/Selection.cpp:
541         (WebCore::Selection::validate):
542         Add sentence navigation/selection.
543
544         * editing/SelectionController.cpp:
545         (WebCore::SelectionController::modifyExtendingRightForward):
546         (WebCore::SelectionController::modifyMovingRightForward):
547         (WebCore::SelectionController::modifyExtendingLeftBackward):
548         (WebCore::SelectionController::modifyMovingLeftBackward):
549         (WebCore::SelectionController::modify):
550         Add sentence navigation/selection.
551
552         * editing/TextGranularity.h:
553         (WebCore::):
554         Add SentenceGranularity and SentenceBoundary.
555
556         * editing/TextIterator.cpp:
557         (WebCore::isTableCell):
558         (WebCore::shouldEmitTabBeforeNode):
559         (WebCore::shouldEmitNewlineForNode):
560         (WebCore::shouldEmitNewlinesBeforeAndAfterNode):
561         (WebCore::shouldEmitExtraNewlineForNode):
562         New utility functions that prefer renderers over html tag names.
563
564         (WebCore::TextIterator::handleNonTextNode):
565         (WebCore::TextIterator::exitNode):
566         (WebCore::SimplifiedBackwardsTextIterator::advance):
567         Use new utility functions.
568         
569         (WebCore::SimplifiedBackwardsTextIterator::handleNonTextNode):
570         Use new utility functions.  Also emit linefeed instead of space,
571         so sentence parsing works across block boundaries.
572         
573         (WebCore::SimplifiedBackwardsTextIterator::exitNode):
574         Use new utility functions.
575
576         (WebCore::SimplifiedBackwardsTextIterator::emitNewline):
577         Renamed from emitNewlineForBROrText because it is not always for BR or text.
578         
579         * editing/TextIterator.h:
580         Renamed emitNewlineForBROrText to emitNewline.
581         
582         * editing/visible_units.cpp:
583         * editing/visible_units.h:
584         (WebCore::previousBoundary):
585         (WebCore::nextBoundary):
586         (WebCore::previousSentencePosition):
587         (WebCore::nextSentencePosition):
588         Add sentence navigation/selection.
589
590 2006-04-12  Darin Adler  <darin@apple.com>
591
592         Rubber-stamped by Hyatt.
593
594         - moved Decoder and FormData classes into loader directory
595           (Decoder, because it's part of the loading process.
596            FormData, because it's used as a parameter when specifying
597            what to load. Arguably either could be in page instead.)
598         - moved Length.h from css to renderer, cause that's where Hyatt
599           says it belongs
600
601         * WebCore.vcproj/WebCore/WebCore.vcproj: Updated for new locations.
602         * WebCore.xcodeproj/project.pbxproj: Ditto.
603
604         * khtml: Removed.
605         * loader/Decoder.cpp: Added.
606         * loader/Decoder.h: Added.
607         * loader/FormData.cpp: Added.
608         * loader/FormData.h: Added.
609
610         * css/Length.h: Removed.
611         * rendering/Length.h: Added.
612
613         * bridge/mac/WebCoreEncodings.mm:
614         * dom/Document.h:
615         * kwq/KWQFormData.mm:
616         * loader/CachedXBLDocument.cpp:
617         * loader/CachedXSLStyleSheet.cpp:
618         * page/ResourceRequest.h:
619         * platform/TransferJobInternal.h:
620         * xml/xmlhttprequest.cpp:
621         Updated includes.
622
623 2006-04-12  Mitz Pettel  <opendarwin.org@mitzpettel.com>
624
625         Reviewed by darin
626
627         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8337
628           Incomplete repaint of inlines' outline during editing
629
630         * manual-tests/inline-outline-repaint.html: Added.
631         * rendering/RenderBlock.cpp:
632         (WebCore::RenderBlock::layoutBlock): Add the maximal outline width to the
633         inlines' repaint rect.
634
635 2006-04-12  Justin Garcia  <justin.garcia@apple.com>
636
637         Reviewed by darin
638         
639         <http://bugzilla.opendarwin.org/show_bug.cgi?id=8335>
640         Implement execCommand(InsertHorizontalRule)
641
642         * editing/JSEditor.cpp:
643
644 2006-04-12  Darin Adler  <darin@apple.com>
645
646         Rubber-stamped by Hyatt.
647
648         - moved xsl files into xml directory, removed xbl files (for now)
649
650         * WebCore.vcproj/WebCore/WebCore.vcproj: Updated for new locations.
651         * WebCore.xcodeproj/project.pbxproj: Ditto.
652         * khtml/xbl: Removed.
653         * khtml/xsl: Removed.
654         * xml/XSLStyleSheet.cpp: Added.
655         * xml/XSLStyleSheet.h: Added.
656         * xml/XSLTProcessor.cpp: Added.
657         * xml/XSLTProcessor.h: Added.
658
659 2006-04-12  David Hyatt  <hyatt@apple.com>
660
661         Fix for 5283, make sure overflow doesn't paint on top of positioned elements.
662
663         Reviewed by beth
664
665         * kwq/RenderTreeAsText.cpp:
666         (writeLayers):
667         * rendering/RenderLayer.cpp:
668         (WebCore::RenderLayer::RenderLayer):
669         (WebCore::RenderLayer::~RenderLayer):
670         (WebCore::RenderLayer::addChild):
671         (WebCore::RenderLayer::removeChild):
672         (WebCore::RenderLayer::paintLayer):
673         (WebCore::RenderLayer::hitTestLayer):
674         (WebCore::RenderLayer::dirtyOverflowList):
675         (WebCore::RenderLayer::updateOverflowList):
676         (WebCore::RenderLayer::collectLayers):
677         (WebCore::RenderLayer::shouldBeOverflowOnly):
678         (WebCore::RenderLayer::styleChanged):
679         * rendering/RenderLayer.h:
680         (WebCore::RenderLayer::isOverflowOnly):
681         (WebCore::RenderLayer::overflowList):
682
683 2006-04-12  Darin Adler  <darin@apple.com>
684
685         * WebCore.xcodeproj/project.pbxproj: Turn SVG support back on.
686         I accidentally checked in this file with SVG off last night.
687
688 2006-04-12  Darin Adler  <darin@apple.com>
689
690         - try to fix Windows build
691
692         * platform/TransferJobInternal.h: Declare HANDLE.
693         * platform/image-decoders/gif/GIFImageReader.h: Include GIFImageDecoder.h.
694         * rendering/RenderThemeWin.h: Declare HANDLE and HMODULE.
695
696 2006-04-12  Darin Adler  <darin@apple.com>
697
698         - another attempt to get things building
699
700         * bindings/js/kjs_proxy.cpp: Add "kjs_events.h" include, needed when not
701         building SVG (so for Windows too).
702         * editing/TextIterator.h: Add back include of Vector.h.
703
704 2006-04-11  Darin Adler  <darin@apple.com>
705
706         - try to fix Windows build
707
708         * html/HTMLCollection.h: Add back include of Vector.h.
709         * page/Frame.h: Ditto.
710         * platform/Timer.h: Ditto.
711
712         - more changes for no-SVG (not working yet though)
713
714         * editing/CompositeEditCommand.h: Added css_valueimpl.h include.
715
716 2006-04-11  Darin Adler  <darin@apple.com>
717
718         - try to fix no-SVG build
719
720         * kwq/RenderTreeAsText.cpp: Added back an include only needed for non-SVG.
721         * rendering/RenderObject.h: Ditto.
722
723 2006-04-11  Darin Adler  <darin@apple.com>
724
725         - try to fix Windows build
726
727         * ForwardingHeaders/kxmlcore/HashForward.h: Removed.
728         * dom/xml_tokenizer.h: Include another header instead of HashForward.h.
729         * loader/Cache.h: Ditto.
730         * page/Page.h: Ditto.
731         * platform/TransferJob.h: Ditto.
732
733 2006-04-11  Justin Garcia  <justin.garcia@apple.com>
734
735         Reviewed by harrison
736         
737         Fixes more instances of:
738         <rdar://problem/3950559>
739         CrashTracer: 2116 crashes in Mail at com.apple.WebCore: khtml::CompositeEditCommand::insertNodeAfter + 32
740
741         * editing/ReplaceSelectionCommand.cpp:
742         (WebCore::ReplaceSelectionCommand::doApply): Do paragraph merging using moveParagraphs.
743
744 2006-04-11  Justin Garcia  <justin.garcia@apple.com>
745
746         Reviewed by harrison
747         
748         Some setup for work on paste performance.
749
750         * editing/CompositeEditCommand.cpp:
751         (WebCore::CompositeEditCommand::moveParagraph): 
752         Moved code from mergeParagraphs so that it can be used in ReplaceSelectionCommand.
753         * editing/CompositeEditCommand.h:
754         * editing/DeleteSelectionCommand.cpp:
755         (WebCore::DeleteSelectionCommand::mergeParagraphs):
756         (WebCore::DeleteSelectionCommand::doApply):
757         * editing/VisiblePosition.cpp:
758         (WebCore::VisiblePosition::init): Put the code that chooses m_deepPosition into initDeepPosition.
759         (WebCore::VisiblePosition::initDeepPosition): 
760         Fixed a bug: don't fall through to the code that's only for positions inside unrendered space between blocks when
761         downstream() is a candidate.  Added a comment about why the fall through code is necessary.
762         * editing/VisiblePosition.h:
763
764 2006-04-11  John Sullivan  <sullivan@apple.com>
765
766         Reviewed by Darin Adler.
767         
768         - fixed <rdar://problem/4509328> highlight all matches hangs when searching for tab character on www.google.com (and others)
769         
770         For reasons not yet completely understood, searching for a tab character on some pages (Google, Amazon) finds a match
771         with a non-collapsed range but then claims that the end visible position of the match is the original start visible 
772         position of the search range. This was causing the highlightAllMatches code to loop forever. Fixed the loop by 
773         checking for the non-advancing search range explicitly. I'm going to track down a reduction of the bogus 
774         search-for-tab issue, and write that up as a separate bug (that bug is not a regression; you can "find" a tab on 
775         google in Tiger also).
776
777         * page/Frame.cpp:
778         (WebCore::Frame::highlightAllMatchesForString):
779         break the loop if the search range hasn't advanced
780
781 2006-04-10  Darin Adler  <darin@apple.com>
782
783         Rubber-stamped by John Sullivan (except for pbxproj change).
784
785         - updated to use the new Forward.h and HashForward.h headers
786         - moved the showTree debugging functions out of the WebCore
787           namespace so they are easier to call from gdb, and renamed
788           the showTree member functions so they don't get in the way;
789           now you can do "call showTree(x)" in gdb and it just works
790         - removed a lot of unneeded includes
791
792         * WebCore.xcodeproj/project.pbxproj: Fixed a lot of paths that
793         were not relative to the enclosing group.
794
795         * ForwardingHeaders/kxmlcore/Forward.h: Added.
796         * ForwardingHeaders/kxmlcore/HashForward.h: Added.
797         * bindings/js/JSCanvasRenderingContext2DBase.cpp:
798         * bindings/js/JSXMLHttpRequest.cpp:
799         * bindings/js/JSXMLHttpRequest.h:
800         * bindings/js/JSXSLTProcessor.h:
801         * bindings/js/kjs_binding.h:
802         * bindings/js/kjs_dom.cpp:
803         * bindings/js/kjs_dom.h:
804         * bindings/js/kjs_events.cpp:
805         * bindings/js/kjs_events.h:
806         * bindings/js/kjs_html.cpp:
807         * bindings/js/kjs_navigator.cpp:
808         * bindings/js/kjs_navigator.h:
809         * bindings/js/kjs_proxy.cpp:
810         * bindings/js/kjs_traversal.h:
811         * bindings/js/kjs_window.cpp:
812         * bindings/js/kjs_window.h:
813         * bindings/objc/DOM.mm:
814         * bindings/objc/DOMCSS.mm:
815         * bindings/objc/DOMCore.h:
816         * bindings/objc/DOMEvents.mm:
817         * bindings/objc/DOMHTML.mm:
818         * bindings/objc/DOMImplementationFront.h:
819         * bindings/objc/DOMInternal.mm:
820         * bindings/objc/DOMUtility.mm:
821         * bindings/objc/DOMViews.mm:
822         * bridge/BrowserExtension.h:
823         * bridge/mac/BrowserExtensionMac.mm:
824         * bridge/mac/FrameMac.h:
825         * bridge/mac/FrameMac.mm:
826         * bridge/mac/WebCoreFrameBridge.mm:
827         * bridge/mac/WebCoreFrameNamespaces.mm:
828         * bridge/mac/WebCoreJavaScript.mm:
829         * bridge/win/PageWin.cpp:
830         * css/CSSComputedStyleDeclaration.cpp:
831         * css/css_base.h:
832         * css/css_ruleimpl.h:
833         * css/css_valueimpl.cpp:
834         * css/cssparser.cpp:
835         * css/cssparser.h:
836         * css/cssstyleselector.cpp:
837         * css/cssstyleselector.h:
838         * dom/AbstractView.h:
839         * dom/AtomicStringList.h:
840         * dom/Attribute.cpp:
841         * dom/Attribute.h:
842         * dom/Comment.cpp:
843         * dom/ContainerNode.cpp:
844         * dom/DOMImplementation.cpp:
845         * dom/DOMImplementation.h:
846         * dom/Document.cpp:
847         * dom/Document.h:
848         * dom/Element.h:
849         * dom/EventTargetNode.cpp:
850         (WebCore::EventTargetNode::dump):
851         (WebCore::forbidEventDispatch):
852         (WebCore::allowEventDispatch):
853         (WebCore::eventDispatchForbidden):
854         * dom/EventTargetNode.h:
855         (WebCore::EventTargetNode::postDispatchEventHandler):
856         * dom/NamedAttrMap.h:
857         * dom/Node.cpp:
858         (WebCore::Node::showNode):
859         (WebCore::Node::showTree):
860         (WebCore::Node::showTreeAndMark):
861         (showTree):
862         * dom/Node.h:
863         * dom/NodeList.cpp:
864         * dom/NodeList.h:
865         * dom/Position.cpp:
866         (showTree):
867         * dom/Position.h:
868         * dom/Range.cpp:
869         * dom/Range.h:
870         * dom/StyledElement.cpp:
871         * dom/StyledElement.h:
872         * dom/dom2_eventsimpl.cpp:
873         * dom/dom2_eventsimpl.h:
874         * dom/dom2_traversalimpl.h:
875         * dom/dom_xmlimpl.cpp:
876         * dom/xml_tokenizer.cpp:
877         * dom/xml_tokenizer.h:
878         * editing/AppendNodeCommand.cpp:
879         * editing/ApplyStyleCommand.cpp:
880         * editing/ApplyStyleCommand.h:
881         * editing/BreakBlockquoteCommand.cpp:
882         * editing/CompositeEditCommand.cpp:
883         * editing/CreateLinkCommand.cpp:
884         * editing/DeleteFromTextNodeCommand.cpp:
885         * editing/DeleteFromTextNodeCommand.h:
886         * editing/DeleteSelectionCommand.cpp:
887         * editing/EditCommand.cpp:
888         * editing/EditCommand.h:
889         * editing/HTMLInterchange.cpp:
890         * editing/InsertIntoTextNodeCommand.cpp:
891         * editing/InsertIntoTextNodeCommand.h:
892         * editing/InsertLineBreakCommand.cpp:
893         * editing/InsertNodeBeforeCommand.cpp:
894         * editing/InsertParagraphSeparatorCommand.cpp:
895         * editing/InsertTextCommand.cpp:
896         * editing/JSEditor.cpp:
897         * editing/JoinTextNodesCommand.cpp:
898         * editing/MergeIdenticalElementsCommand.cpp:
899         * editing/ModifySelectionListLevelCommand.cpp:
900         * editing/MoveSelectionCommand.cpp:
901         * editing/RebalanceWhitespaceCommand.h:
902         * editing/RemoveCSSPropertyCommand.h:
903         * editing/ReplaceSelectionCommand.cpp:
904         * editing/ReplaceSelectionCommand.h:
905         * editing/Selection.cpp:
906         (WebCore::Selection::formatForDebugger):
907         (WebCore::Selection::showTree):
908         (showTree):
909         * editing/Selection.h:
910         * editing/SelectionController.cpp:
911         (WebCore::SelectionController::formatForDebugger):
912         (WebCore::SelectionController::showTree):
913         (showTree):
914         * editing/SelectionController.h:
915         * editing/TextIterator.cpp:
916         * editing/TextIterator.h:
917         * editing/TypingCommand.cpp:
918         * editing/TypingCommand.h:
919         * editing/UnlinkCommand.cpp:
920         * editing/VisiblePosition.cpp:
921         (WebCore::isEqualIgnoringAffinity):
922         (WebCore::VisiblePosition::formatForDebugger):
923         (WebCore::VisiblePosition::showTree):
924         (showTree):
925         * editing/VisiblePosition.h:
926         (WebCore::VisiblePosition::VisiblePosition):
927         (WebCore::operator==):
928         * editing/WrapContentsInDummySpanCommand.cpp:
929         * editing/htmlediting.h:
930         * editing/markup.cpp:
931         * editing/markup.h:
932         (WebCore::):
933         * editing/visible_units.cpp:
934         * html/CanvasGradient.cpp:
935         * html/CanvasRenderingContext2D.h:
936         * html/CanvasStyle.cpp:
937         * html/CanvasStyle.h:
938         * html/FormDataList.cpp:
939         * html/FormDataList.h:
940         * html/HTMLCollection.cpp:
941         * html/HTMLCollection.h:
942         * html/HTMLDocument.cpp:
943         * html/HTMLDocument.h:
944         * html/HTMLElement.cpp:
945         * html/HTMLElementFactory.cpp:
946         * html/HTMLElementFactory.h:
947         * html/HTMLFormCollection.cpp:
948         * html/HTMLFormElement.cpp:
949         * html/HTMLFormElement.h:
950         * html/HTMLInputElement.cpp:
951         * html/HTMLParser.cpp:
952         * html/HTMLSelectElement.cpp:
953         * html/HTMLSelectElement.h:
954         * html/HTMLTokenizer.cpp:
955         * html/HTMLTokenizer.h:
956         * html/html_baseimpl.cpp:
957         * html/html_headimpl.h:
958         * kcanvas/KCanvasCreator.cpp:
959         * kcanvas/KCanvasFilters.h:
960         * kcanvas/KCanvasPath.h:
961         * kcanvas/KCanvasResources.h:
962         * kcanvas/KCanvasTreeDebug.cpp:
963         * kcanvas/RenderPath.cpp:
964         * kcanvas/RenderPath.h:
965         * kcanvas/device/KRenderingDevice.h:
966         * kcanvas/device/KRenderingPaintServerGradient.h:
967         * kcanvas/device/KRenderingPaintServerPattern.h:
968         * kcanvas/device/KRenderingPaintServerSolid.h:
969         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
970         * kcanvas/device/quartz/KCanvasMaskerQuartz.h:
971         * kcanvas/device/quartz/KCanvasResourcesQuartz.h:
972         * kcanvas/device/quartz/KCanvasResourcesQuartz.mm:
973         * kcanvas/device/quartz/KRenderingPaintServerQuartz.h:
974         * khtml/misc/decoder.cpp:
975         * khtml/misc/decoder.h:
976         * khtml/xsl/XSLStyleSheet.cpp:
977         * khtml/xsl/XSLTProcessor.cpp:
978         * khtml/xsl/XSLTProcessor.h:
979         * ksvg2/css/SVGRenderStyle.h:
980         * ksvg2/ecma/GlobalObject.cpp:
981         * ksvg2/misc/KCanvasRenderingStyle.h:
982         * ksvg2/misc/SVGDocumentExtensions.h:
983         * ksvg2/svg/SVGAngle.h:
984         * ksvg2/svg/SVGAnimateColorElement.h:
985         * ksvg2/svg/SVGAnimatedColor.h:
986         * ksvg2/svg/SVGAnimatedLengthList.h:
987         * ksvg2/svg/SVGAnimatedNumberList.h:
988         * ksvg2/svg/SVGAnimatedString.h:
989         * ksvg2/svg/SVGAnimatedTransformList.h:
990         * ksvg2/svg/SVGAnimationElement.h:
991         * ksvg2/svg/SVGColor.h:
992         * ksvg2/svg/SVGCursorElement.h:
993         * ksvg2/svg/SVGHelper.h:
994         * ksvg2/svg/SVGLength.h:
995         * ksvg2/svg/SVGList.h:
996         * ksvg2/svg/SVGPaint.h:
997         * ksvg2/svg/SVGPathSeg.h:
998         * ksvg2/svg/SVGPatternElement.h:
999         * ksvg2/svg/SVGSVGElement.cpp:
1000         * ksvg2/svg/SVGSVGElement.h:
1001         * ksvg2/svg/SVGStringList.h:
1002         * ksvg2/svg/SVGTransform.h:
1003         * kwq/AccessibilityObjectCache.mm:
1004         * kwq/ClipboardMac.mm:
1005         * kwq/JavaAppletWidget.mm:
1006         * kwq/KWQComboBox.mm:
1007         * kwq/KWQEditCommand.mm:
1008         * kwq/KWQFileButton.mm:
1009         * kwq/KWQKHTMLSettings.h:
1010         * kwq/KWQKSSLKeyGen.mm:
1011         * kwq/KWQLoader.mm:
1012         * kwq/KWQPageState.mm:
1013         * kwq/KWQTextEdit.mm:
1014         * kwq/RegularExpression.h:
1015         * kwq/RenderTreeAsText.cpp:
1016         * kwq/RenderTreeAsText.h:
1017         * kwq/WebCoreAXObject.mm:
1018         * loader/Cache.cpp:
1019         * loader/Cache.h:
1020         * loader/CachedCSSStyleSheet.cpp:
1021         * loader/CachedObject.h:
1022         * loader/CachedScript.cpp:
1023         * loader/CachedXBLDocument.cpp:
1024         * loader/CachedXBLDocument.h:
1025         * loader/CachedXSLStyleSheet.cpp:
1026         * loader/CachedXSLStyleSheet.h:
1027         * loader/DocLoader.cpp:
1028         * page/Frame.cpp:
1029         * page/Frame.h:
1030         * page/FramePrivate.h:
1031         * page/FrameTree.cpp:
1032         * page/FrameTree.h:
1033         * page/FrameView.cpp:
1034         * page/FrameView.h:
1035         * page/Page.cpp:
1036         * page/Page.h:
1037         * page/Plugin.h:
1038         (WebCore::Plugin::Plugin):
1039         (WebCore::Plugin::view):
1040         * platform/Color.cpp:
1041         * platform/FloatRect.h:
1042         * platform/Font.cpp:
1043         * platform/Font.h:
1044         * platform/FontFamily.cpp:
1045         * platform/GraphicsContext.cpp:
1046         * platform/Image.cpp:
1047         * platform/Image.h:
1048         * platform/IntRect.h:
1049         * platform/KURL.cpp:
1050         * platform/KURL.h:
1051         * platform/SegmentedString.h:
1052         * platform/Shared.h:
1053         * platform/StreamingTextDecoder.cpp:
1054         * platform/StringImpl.cpp:
1055         * platform/StringImpl.h:
1056         * platform/TextEncoding.h:
1057         * platform/Timer.cpp:
1058         * platform/Timer.h:
1059         * platform/TransferJob.cpp:
1060         * platform/TransferJob.h:
1061         * platform/TransferJobInternal.h:
1062         * platform/cairo/GraphicsContextCairo.cpp:
1063         * platform/cairo/ImageCairo.cpp:
1064         * platform/cairo/ImageSourceCairo.cpp:
1065         * platform/image-decoders/gif/GIFImageReader.cpp:
1066         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
1067         * platform/mac/FontFamilyMac.mm:
1068         * platform/mac/FontMac.mm:
1069         * platform/mac/ImageMac.mm:
1070         * platform/mac/TextEncodingMac.cpp:
1071         * platform/mac/TransferJobMac.mm:
1072         * platform/win/FontPlatformDataWin.cpp:
1073         * platform/win/TransferJobWin.cpp:
1074         * rendering/RenderBlock.cpp:
1075         * rendering/RenderBlock.h:
1076         * rendering/RenderBox.cpp:
1077         * rendering/RenderBox.h:
1078         * rendering/RenderCanvas.cpp:
1079         * rendering/RenderCanvas.h:
1080         * rendering/RenderContainer.cpp:
1081         * rendering/RenderFlexibleBox.h:
1082         * rendering/RenderFlow.cpp:
1083         * rendering/RenderFlow.h:
1084         * rendering/RenderImage.cpp:
1085         * rendering/RenderImage.h:
1086         * rendering/RenderLayer.cpp:
1087         * rendering/RenderLayer.h:
1088         * rendering/RenderObject.cpp:
1089         (showTree):
1090         * rendering/RenderObject.h:
1091         * rendering/RenderTableCell.h:
1092         * rendering/RenderTableSection.h:
1093         * rendering/RenderText.cpp:
1094         * rendering/RenderText.h:
1095         * rendering/RenderTextField.cpp:
1096         * rendering/RenderTextFragment.h:
1097         * rendering/RenderTheme.h:
1098         * rendering/RenderThemeMac.mm:
1099         * rendering/RenderThemeWin.cpp:
1100         * rendering/bidi.cpp:
1101         * rendering/render_form.h:
1102         * rendering/render_line.cpp:
1103         (showTree):
1104         * rendering/render_line.h:
1105         * rendering/render_list.cpp:
1106         * rendering/render_replaced.cpp:
1107         * rendering/render_replaced.h:
1108         * rendering/render_style.cpp:
1109         * rendering/render_style.h:
1110         * xml/xmlhttprequest.h:
1111
1112 2006-04-10  Darin Adler  <darin@apple.com>
1113
1114         - try to fix the Windows build
1115
1116         * WebCore.vcproj/WebCore/WebCore.vcproj: Fix mistaken bad editing of
1117         AdditionalIncludeDirectories.
1118
1119 2006-04-10  David Hyatt  <hyatt@apple.com>
1120
1121         Make focus ring painting respect clips set by WebCore (e.g., overflow).
1122
1123         Reviewed by darin
1124
1125         * platform/GraphicsContext.h:
1126         * platform/mac/GraphicsContextMac.mm:
1127         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
1128         (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
1129         (WebCore::GraphicsContext::setFocusRingClip):
1130         (WebCore::GraphicsContext::clearFocusRingClip):
1131         (WebCore::GraphicsContext::drawFocusRing):
1132         * platform/mac/WebCoreGraphicsBridge.h:
1133         * platform/mac/WebCoreGraphicsBridge.m:
1134         (-[WebCoreGraphicsBridge drawFocusRingWithPath:radius:color:clipRect:]):
1135         * rendering/RenderLayer.cpp:
1136         (WebCore::setClip):
1137         (WebCore::restoreClip):
1138
1139 2006-04-10  Darin Adler  <darin@apple.com>
1140
1141         Reviewed by Geoff.
1142
1143         - death to khtml/ecma, long live bindings/js
1144
1145         * khtml/ecma: Removed. Moved all files to bindings/js.
1146
1147         * bindings/js/JSDOMParser.cpp: Added.
1148         * bindings/js/JSDOMParser.h: Added.
1149         * bindings/js/JSXMLHttpRequest.cpp: Added.
1150         * bindings/js/JSXMLHttpRequest.h: Added.
1151         * bindings/js/JSXMLSerializer.cpp: Added.
1152         * bindings/js/JSXMLSerializer.h: Added.
1153         * bindings/js/JSXSLTProcessor.cpp: Added.
1154         * bindings/js/JSXSLTProcessor.h: Added.
1155         * bindings/js/kjs_binding.cpp: Added.
1156         * bindings/js/kjs_binding.h: Added.
1157         * bindings/js/kjs_css.cpp: Added.
1158         * bindings/js/kjs_css.h: Added.
1159         * bindings/js/kjs_dom.cpp: Added.
1160         * bindings/js/kjs_dom.h: Added.
1161         * bindings/js/kjs_events.cpp: Added.
1162         * bindings/js/kjs_events.h: Added.
1163         * bindings/js/kjs_html.cpp: Added.
1164         * bindings/js/kjs_html.h: Added.
1165         * bindings/js/kjs_navigator.cpp: Added.
1166         * bindings/js/kjs_navigator.h: Added.
1167         * bindings/js/kjs_proxy.cpp: Added.
1168         * bindings/js/kjs_proxy.h: Added.
1169         * bindings/js/kjs_traversal.cpp: Added.
1170         * bindings/js/kjs_traversal.h: Added.
1171         * bindings/js/kjs_views.cpp: Added.
1172         * bindings/js/kjs_views.h: Added.
1173         * bindings/js/kjs_window.cpp: Added.
1174         * bindings/js/kjs_window.h: Added.
1175
1176         * DerivedSources.make: Removed khtml/ecma from directory list.
1177         * WebCore.vcproj/WebCore/WebCore.vcproj: Moved files from
1178         khtml/ecma to bindings/js.
1179         * WebCore.xcodeproj/project.pbxproj: Ditto.
1180
1181 2006-04-10  Darin Adler  <darin@apple.com>
1182
1183         Reviewed by Geoff.
1184
1185         - try to fix the Windows build
1186
1187         * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::reset):
1188         Put code to release m_drawingContext into an __APPLE__ ifdef.
1189
1190         * platform/win/TemporaryLinkStubs.cpp:
1191
1192 2006-04-10  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1193
1194         Reviewed by Eric, landed by ap.
1195
1196         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8295
1197           Dictionary pop-up panel targets the wrong word in a scrolled IFRAME
1198
1199         * kwq/WebCoreAXObject.mm:
1200         (-[WebCoreAXObject doAXTextMarkerForPosition:]): Removed the addition of scroll
1201         offsets, which is redundant for scrolled views, then changed the first view
1202         to be the document's scrolled view instead of its scroll view (all subsequent views were
1203         already scrolled views).
1204         * manual-tests/dictionary-scrolled-iframe.html: Added.
1205
1206 2006-04-09  Alexey Proskuryakov  <ap@nypop.com>
1207
1208         Reviewed by Darin.
1209
1210         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7877
1211         XMLHttpRequest ignores username/password passed to open()
1212
1213         Test: http/tests/xmlhttprequest/basic-auth.html
1214
1215         * platform/KURL.cpp:
1216         (KURL::setUser): Enable a code path that handles non-empty user name -
1217         it was already present, but commented out and protected with an assertion.
1218         (KURL::setPass): Ditto.
1219
1220 2006-04-09  Darin Adler  <darin@apple.com>
1221
1222         Reviewed by Anders.
1223
1224         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=4884
1225           Canvas element breaks when RenderObject creation is deferred by external CSS
1226
1227         Test: fast/canvas/canvas-before-css.html
1228
1229         This patch makes us match the canvas documentation in Hixie's Web Applications
1230         draft as far as when the canvas is created and recreated and how it's sized.
1231         It also gets rid of the compositeOperation attribute of the canvas element.
1232         We can add that back if we need it. Anders points out that this specifically
1233         changes behavior for canvas elements where the size is set in CSS and not with
1234         width and height attributes. The CSS size now determines how big a box the canvas
1235         is rendered into, but has no effect on the size of the canvas's buffer.
1236
1237         * html/CanvasRenderingContext2D.h: Added overloads of drawImage that take
1238         HTMLCanvasElement, which is no longer derived from HTMLImageElement.
1239         * html/CanvasRenderingContext2D.cpp:
1240         (WebCore::imageSize): Renamed from imageOrCanvasSize. Now used for images only,
1241         because canvas is no longer derived from image.
1242         (WebCore::CanvasRenderingContext2D::drawImage): Split the implementation of this
1243         for image sources from the implementation for canvas sources.
1244         (WebCore::CanvasRenderingContext2D::willDraw): Changed to call a new willDraw
1245         function on the canvas element.
1246         (WebCore::CanvasRenderingContext2D::drawingContext): Changed to call drawingContext
1247         on the canvas element rather than the renderer.
1248
1249         * html/HTMLCanvasElement.h: Changed HTMLCanvasElement to derive from HTMLElement
1250         instead of HTMLImageElement. Added width, height, setWidth, setHeight, willDraw,
1251         paint, drawingContext, createDrawingContext, and reset functions. Added m_size,
1252         m_createdDrawingContext, m_data, and m_drawingContext data members. Removed
1253         mapToEntry, attach, detach, and isURLAttribute functins.
1254
1255         * html/HTMLCanvasElement.cpp:
1256         (WebCore::HTMLCanvasElement::HTMLCanvasElement): Added initializers for new m_size,
1257         m_createdDrawingContext, m_data, and m_drawingContext data members.
1258         (WebCore::HTMLCanvasElement::~HTMLCanvasElement): Free m_data and m_drawingContext.
1259         (WebCore::HTMLCanvasElement::parseMappedAttribute): Got rid of special case for
1260         srcAttr, which is no longer needed since we aren't deriving from HTMLImageElement.
1261         Added code that triggers a reset when either width or height is set.
1262         (WebCore::HTMLCanvasElement::createRenderer): Added code to set the intrinsic
1263         width and height of the renderer to the size of the element.
1264         (WebCore::HTMLCanvasElement::setHeight): Added. Sets the height attribute.
1265         (WebCore::HTMLCanvasElement::setWidth): Added. Sets the width attribute.
1266         (WebCore::HTMLCanvasElement::willDraw): Added. Tells the renderer to repaint.
1267         Also has FIXME mentioning we could dirty only the part that has changed in the future.
1268         (WebCore::HTMLCanvasElement::reset): Added. Sets the size of the canvas and discards
1269         the old buffer, which is an indirect way of resetting the buffer to transparent black.
1270         (WebCore::HTMLCanvasElement::paint): Added. Draws the canvas image into the graphics
1271         context that's passed in.
1272         (WebCore::HTMLCanvasElement::createDrawingContext): Added. Allocates a buffer for
1273         the bits, then creates a bitmap context for drawing into the buffer.
1274         (WebCore::HTMLCanvasElement::drawingContext): Added. Calls createDrawingContext if
1275         needed, then returns the current drawing context.
1276         (WebCore::HTMLCanvasElement::createPlatformImage): Changed to always call CGContextFlush
1277         and to create the image from the context in this class.
1278
1279         * rendering/RenderHTMLCanvas.h: Remove almost all of the contents of this file.
1280         Removed ~RenderHTMLCanvas, setNeedsImageUpdate, element, updateDrawnImage, drawingContext,
1281         createDrawingContext, and drawnImage functions and _drawingContext, _drawingContextData,
1282         _drawnImage, and _needsImageUpdate booleans. Changed RenderHTMLCanvas to derive from
1283         RenderReplaced instead of RenderImage.
1284
1285         * rendering/RenderHTMLCanvas.cpp:
1286         (WebCore::RenderHTMLCanvas::RenderHTMLCanvas): Changed to only initialize RenderReplaced.
1287         (WebCore::RenderHTMLCanvas::renderName): Moved this in here, since there's no good reason
1288         to have this virtual function inlined.
1289         (WebCore::RenderHTMLCanvas::paint): Changed implementation to use HTMLCanvasElement::paint
1290         instead ofcalling CGContextDrawImage directly.
1291         (WebCore::RenderHTMLCanvas::layout): Removed the code that detects changes in width and
1292         causes the drawing context to be recreated; instead, if the width and height changes we
1293         scale when we paint the canvas.
1294
1295         * bindings/js/JSCanvasRenderingContext2DBase.cpp:
1296         (WebCore::JSCanvasRenderingContext2DBaseProtoFunc::callAsFunction):
1297         Separated out handling for <canvas> vs. <img> elements in drawRect, since
1298         HTMLCanvasElement is no longer derived from HTMLImageElement.
1299
1300 2006-04-09  Rob Buis  <buis@kde.org>
1301
1302         Reviewed by eseidel.  Landed by eseidel.
1303
1304         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=6027:
1305         Dirty rect invalidation issues in mozilla sample
1306
1307         Make sure the paths calculate the new bounding box and not
1308         use the cached bbox.
1309
1310         No automated test case possible.
1311
1312         * kcanvas/RenderPath.cpp:
1313         (WebCore::RenderPath::setPath):
1314
1315 2006-04-09  Rob Buis  <buis@kde.org>
1316
1317         Reviewed by darin.  Landed by eseidel.
1318
1319         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=6930:
1320         % width/height on nested <svg> tags do not work
1321
1322         Set the context correctly for inner <svg>, so calculation of
1323         width/height for inner <svg> elements is done against the
1324         viewport element.
1325
1326         Test: svg/custom/inner-percent.svg
1327
1328         * ksvg2/svg/SVGSVGElement.cpp:
1329         (WebCore::SVGSVGElement::width):
1330         (WebCore::SVGSVGElement::height):
1331
1332 2006-04-08  Rob Buis  <buis@kde.org>
1333
1334         Reviewed by eseidel.  Landed by eseidel.
1335
1336         No automated test case possible.
1337
1338         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=7531:
1339         hang in SVGPolygonElementImpl::toPathData in polygon test case
1340
1341         Make sure the points list is cleared, just like the path
1342         list is cleared first before (re)parsing.
1343
1344         * ksvg2/svg/SVGPolyElement.cpp:
1345         (SVGPolyElement::parseMappedAttribute):
1346
1347 2006-04-08  Darin Adler  <darin@apple.com>
1348
1349         Reviewed by Beth.
1350
1351         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7622
1352           REGRESSION: New text fields should compute maxlength considering composed character sequences
1353
1354         Test: fast/forms/input-text-maxlength.html
1355         Test: fast/forms/input-text-paste-maxlength.html
1356
1357         * html/HTMLInputElement.h: Removed all friend classes (not needed any more). Renamed
1358         typeEnum to InputType. Made init() function private. Tweaked parameter names and formatting
1359         in many function declarations. Made canHaveSelection, selectionStart, and selectionEnd
1360         const. Made data members except for m_name private instead of protected. Added private
1361         functions constrainValue and recheckValue. Removed unused isEditable function.
1362
1363         * html/HTMLInputElement.cpp:
1364         (WebCore::numGraphemeClusters): Added.
1365         (WebCore::numCharactersInGraphemeClusters): Added.
1366         (WebCore::HTMLInputElement::isKeyboardFocusable): Use inputType() instead of using m_type
1367         directly.
1368         (WebCore::HTMLInputElement::isMouseFocusable): Ditto.
1369         (WebCore::HTMLInputElement::focus): Ditto.
1370         (WebCore::HTMLInputElement::setInputType): Added code to call constrainValue or recheckValue
1371         so we will enforce maxLen if changing from a type that doesn't have maxLen to one that does.
1372         (WebCore::HTMLInputElement::type): More-standard formatting for switch statement. Put
1373         cases into alphabetical order.
1374         (WebCore::HTMLInputElement::state): Changed switch statement to include all case values and
1375         not include a default case to take advantage of gcc's missing case warning.
1376         (WebCore::HTMLInputElement::restoreState): Ditto.
1377         (WebCore::HTMLInputElement::canHaveSelection): Ditto.
1378         (WebCore::HTMLInputElement::selectionStart): Ditto.
1379         (WebCore::HTMLInputElement::selectionEnd): Ditto.
1380         (WebCore::HTMLInputElement::setSelectionStart): Ditto.
1381         (WebCore::HTMLInputElement::setSelectionEnd): Ditto.
1382         (WebCore::HTMLInputElement::select): Ditto.
1383         (WebCore::HTMLInputElement::setSelectionRange): Ditto.
1384         (WebCore::HTMLInputElement::click): Ditto.
1385         (WebCore::HTMLInputElement::accessKeyAction): Ditto.
1386         (WebCore::HTMLInputElement::parseMappedAttribute): Use inputType() instead of using m_type
1387         directly. Added call to recheckValue when parsing a new value for the maxlength attribute.
1388         (WebCore::HTMLInputElement::rendererIsNeeded): Changed switch statement to include all case
1389         values and not include a default case to take advantage of gcc's missing case warning.
1390         (WebCore::HTMLInputElement::createRenderer): Ditto.
1391         (WebCore::HTMLInputElement::attach): Remove code to condition the value attribute when done
1392         parsing. This is now all handled by constrainValue and recheckValue as needed.
1393         (WebCore::HTMLInputElement::isSuccessfulSubmitButton): Use inputType() instead of using
1394         m_type directly.
1395         (WebCore::HTMLInputElement::appendFormData): Ditto. Rearranged code a little.
1396         (WebCore::HTMLInputElement::setChecked): Ditto.
1397         (WebCore::HTMLInputElement::setIndeterminate): Ditto.
1398         (WebCore::HTMLInputElement::value): Ditto. Call constrainValue when reading the value out
1399         of the value attribute.
1400         (WebCore::HTMLInputElement::valueWithDefault): Use inputType() instead of using
1401         m_type directly. Changed switch statement to include all case values and not include a
1402         default case to take advantage of gcc's missing case warning.
1403         (WebCore::HTMLInputElement::setValue): Ditto. Call constrainValue when storing a value.
1404         (WebCore::HTMLInputElement::setValueFromRenderer): Added an assertion.
1405         (WebCore::HTMLInputElement::storesValueSeparateFromAttribute): Use inputType() instead of
1406         using m_type directly.
1407         (WebCore::HTMLInputElement::preDispatchEventHandler): Ditto.
1408         (WebCore::HTMLInputElement::postDispatchEventHandler): Ditto.
1409         (WebCore::HTMLInputElement::defaultEventHandler): Ditto. Changed code to truncate inserted
1410         text in a BeforeTextInsertedEvent to use the new constrainValue function and also the
1411         numGraphemeClusters function, so it's based on grapheme clusters instead of characters and
1412         shares code.
1413         (WebCore::HTMLInputElement::constrainValue): Added.
1414         (WebCore::HTMLInputElement::recheckValue): Added.
1415
1416         * html/HTMLIsIndexElement.cpp: (WebCore::HTMLIsIndexElement::HTMLIsIndexElement):
1417         Removed unneeded code to set m_type to TEXT, which is already what it gets set to by
1418         the base class's constructor.
1419
1420         * html/HTMLGenericFormElement.h: Removed unused isEditable function.
1421         * html/HTMLGenericFormElement.cpp: Ditto.
1422         * html/HTMLTextAreaElement.h: Ditto.
1423         * html/HTMLTextAreaElement.cpp: Ditto.
1424
1425         * platform/StringImpl.cpp: (WebCore::StringImpl::truncate): Changed > to >= so that
1426         truncating to the size of the string does nothing, efficiently.
1427
1428         * rendering/RenderText.h: Added declaration of characterBreakIterator.
1429         * rendering/RenderText.cpp:
1430         (WebCore::characterBreakIterator): Made this public so it can be used in other files.
1431         Maybe we should also move it to another source file later. Also renamed to remove the
1432         "get" from the title.
1433         (WebCore::RenderText::previousOffset): Updated for name change.
1434         (WebCore::RenderText::nextOffset): Updated for name change.
1435
1436         * rendering/RenderTextField.cpp: (WebCore::RenderTextField::updateFromElement):
1437         Removed code to implement maxlength checking. That's handled entirely in the DOM now.
1438         Also moved down the code to get the value into a string so that it's done only in the
1439         case where the string is used.
1440
1441         * rendering/render_form.cpp: (WebCore::RenderFileButton::valueChanged): Use setValueFromRenderer
1442         instead of setting the value directly in the input element. We changed this for all the other
1443         types a while ago, and it works just as well for the input element.
1444
1445         * dom/BeforeTextInsertedEvent.h: Added setText function. Previously, clients changed the text
1446         by modifying the text object in place, but going forward we'd like to avoid that sort of thing.
1447  
1448         * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplacementFragment::ReplacementFragment):
1449         Changed code to assume clients will change the text in the event rather than mutating the
1450         text object itself. This is compatible with possible future changes to String to be copy
1451         on write.
1452         * editing/TypingCommand.cpp: (WebCore::TypingCommand::insertText): Ditto.
1453
1454 2006-04-07  Darin Adler  <darin@apple.com>
1455
1456         Reviewed by Hyatt.
1457
1458         - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=8134
1459           REGRESSION: dragging down from the middle of a text field does not select to end of field
1460
1461         * editing/Selection.cpp:
1462         (WebCore::comparePositions): Added. Takes shadow content into account.
1463         (WebCore::Selection::validate): Changed to call comparePositions instead of calling
1464         Range::compareBoundaryPoints directly. Also removed unneeded code to redundantly set
1465         m_start and m_end to null and did a bit of reformatting.
1466
1467         - some tiny efficiency improvements to the tokenizer -- no measurable speedup, but removes
1468           a little bit of unneeded code
1469
1470         * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::parseTag): Changed all the places
1471         that do "unsigned short x = *c" to "unsigned short x = c->unicode()" when c is a QChar,
1472         otherwise we do an unnecessary conversion to char (which requires a branch to see if
1473         the c fits in a char).
1474
1475 2006-04-07  Justin Garcia  <justin.garcia@apple.com>
1476
1477         Reviewed by harrison
1478         
1479         Rolled the fix for 8250 back in and fixed a bug:
1480         The local variables for the first and last nodes in the fragment
1481         need to be reset when the fragment is changed for plaintext-only mode
1482         or a change from the beforetextinserted event handler.
1483
1484         * editing/ReplaceSelectionCommand.cpp:
1485         (WebCore::ReplacementFragment::ReplacementFragment):
1486
1487 2006-04-07  Maciej Stachowiak  <mjs@apple.com>
1488
1489         Reviewed by Darin.
1490         
1491         - fixed REGRESSION: offsetParent on element with no offset parent crashes
1492
1493         * dom/Element.cpp:
1494         (WebCore::Element::offsetParent): Add missing null check.
1495
1496 2006-04-07  Justin Garcia  <justin.garcia@apple.com>
1497
1498         Reviewed by adele
1499         
1500         maxlength truncation in text fields didn't work if the fragment was a
1501         single text node.
1502
1503         * editing/ReplaceSelectionCommand.cpp:
1504         (WebCore::ReplacementFragment::ReplacementFragment):
1505
1506 2006-04-07  Justin Garcia  <justin.garcia@apple.com>
1507
1508         Reviewed by harrison
1509         
1510         <http://bugzilla.opendarwin.org/show_bug.cgi?id=8250>
1511         REGRESSION: Interchange newlines aren't passed with the khtmlBeforeTextInsertedEvent
1512
1513         * editing/ReplaceSelectionCommand.cpp:
1514         (WebCore::ReplacementFragment::ReplacementFragment):
1515         Interchange content removal happened before khtmlBeforeTextInsertedEvent was sent.
1516
1517 2006-04-07  Justin Garcia  <justin.garcia@apple.com>
1518
1519         Reviewed by adele
1520         
1521         <http://bugzilla.opendarwin.org/show_bug.cgi?id=8219>
1522         REGRESSION: Two extra newlines added when pasting a single styled line into a plaintext-only region
1523
1524         * editing/ReplaceSelectionCommand.cpp:
1525         (WebCore::ReplacementFragment::ReplacementFragment):
1526         Converting the fragment to plaintext introduced an extraneous newline because
1527         the range passed to plainText ended after the paragraph containing the fragment
1528         built from the markup that TextEdit put on the paste board.  TextIterator will
1529         emit a newline when it exits a paragraph.
1530         Two extra newlines were added because the '\n' in the plaintext string turns
1531         into an interchange newline, which isn't removed because of 8250, and the
1532         interchange newline looks like inline content that requires the insertion of
1533         a paragraph separator during paste.
1534         Fixed by creating a range using VisiblePositions at the start and the end of 
1535         the node that holds the fragment during paste's test rendering.
1536
1537 2006-04-06  Justin Garcia  <justin.garcia@apple.com>
1538
1539         Reviewed by harrison
1540         
1541         <http://bugzilla.opendarwin.org/show_bug.cgi?id=8145>
1542         REGRESSION: Pasting text from TextEdit with a bold word into text field results in crash
1543
1544         * editing/AppendNodeCommand.cpp:
1545         (WebCore::AppendNodeCommand::doApply): 
1546         Assert that the node will be placed somewhere that's contenteditable.
1547         * editing/InsertNodeBeforeCommand.cpp:
1548         (WebCore::InsertNodeBeforeCommand::doApply): Ditto
1549         * editing/JSEditor.cpp: 
1550         Enabled insertHTML for plaintext-only regions since it's useful for debugging rich 
1551         content pastes into the new text fields.
1552         * editing/ReplaceSelectionCommand.cpp:
1553         (WebCore::ReplaceSelectionCommand::doApply):
1554         1) After the first paragraph of the fragment has been merged with the first part of the
1555         paragraph where the paste occured, if the next node to be inserted is inline, we put it 
1556         in a new paragraph because it was at the start of a paragraph in the fragment.  The change
1557         is to insert a paragraph separator if insertionPos.next() is null or outside of the current 
1558         editable region.
1559         2) Before the paste begins, a paragraph separator is inserted in order to avoid 
1560         nesting blocks from the fragment to be pasted inside the block where the paste will 
1561         occur.  I made two fixes to the code that decides whether or not to insert the 
1562         paragraph separator and added testcases for each.  Added a fixme because it appears that
1563         this code is also used to ensure that the aforementioned insertionPos will be at the end of 
1564         a paragraph.  This code should only be about preventing nesting.
1565
1566 2006-04-06  Maciej Stachowiak  <mjs@apple.com>
1567
1568         Reviewed by Anders.
1569
1570         - Convert Element JS bindings to be almost completely autogenerated
1571         http://bugzilla.opendarwin.org/show_bug.cgi?id=8227
1572
1573         * dom/Element.idl: Declare full interface in IDL.
1574         * dom/Element.h:
1575         (WebCore::Element::tagQName): Renamed from tagName, so the real DOM
1576         method can be called tagName.
1577         (WebCore::Element::tagName): inline alias for nodeName.
1578         * dom/Element.cpp:
1579         (WebCore::Element::scrollByUnits): Moved logic from JS bindings to
1580         core DOM.
1581         (WebCore::Element::scrollByLines): ditto
1582         (WebCore::Element::scrollByPages): ditto
1583         (WebCore::Element::offsetLeft): ditto, plus make unrendered elements return 0 not undefined
1584         (WebCore::Element::offsetTop): ditto, plus make unrendered elements return 0 not undefined
1585         (WebCore::Element::offsetWidth): ditto, plus make unrendered elements return 0 not undefined
1586         (WebCore::Element::offsetHeight): ditto, plus make unrendered elements return 0 not undefined
1587         (WebCore::Element::offsetParent): ditto
1588         (WebCore::Element::clientWidth): ditto, plus make unrendered elements return 0 not undefined
1589         (WebCore::Element::clientHeight): ditto, plus make unrendered elements return 0 not undefined
1590         (WebCore::Element::scrollLeft): ditto
1591         (WebCore::Element::scrollTop): ditto
1592         (WebCore::Element::setScrollLeft): ditto
1593         (WebCore::Element::setScrollTop): ditto
1594         (WebCore::Element::scrollWidth): ditto, plus make unrendered elements return 0 not undefined
1595         (WebCore::Element::scrollHeight): ditto, plus make unrendered elements return 0 not undefined
1596
1597         * bindings/scripts/CodeGeneratorJS.pm: Added support for
1598         ConvertUndefinedToTrue, for benefit of scroll methods where
1599         omitted arguments should be treated as true.  However, maybe
1600         explicit overloading in the IDL would be a better long-term
1601         approach for optional arguments.
1602
1603         * khtml/ecma/kjs_binding.cpp:
1604         (KJS::valueToStringWithNullCheck): fixed formatting
1605         (KJS::valueToBooleanTreatUndefinedAsTrue): added for binding of scrollIntoView
1606         (isn't this lame?)
1607         * khtml/ecma/kjs_binding.h:
1608         (KJS::toJS): fixed formatting, added new stuff
1609         * khtml/ecma/kjs_dom.cpp:
1610         (KJS::DOMElement::getValueProperty): removed most of contents
1611         (KJS::DOMElement::putValueProperty): ditto
1612         (KJS::DOMElementProtoFunc::callAsFunction): ditto
1613
1614         * css/cssstyleselector.cpp:
1615         (WebCore::CSSStyleSelector::canShareStyleWithElement): updated for rename
1616         of tagName to tagQName
1617         (WebCore::CSSStyleSelector::checkOneSelector): ditto
1618         * dom/Document.cpp:
1619         (WebCore::Document::importNode): ditto
1620         * editing/ApplyStyleCommand.cpp:
1621         (WebCore::ApplyStyleCommand::removeInlineStyle): ditto
1622         (WebCore::areIdenticalElements): ditto
1623         * html/HTMLElement.cpp:
1624         (WebCore::HTMLElement::inEitherTagList): ditto
1625         (WebCore::HTMLElement::inInlineTagList): ditto
1626         (WebCore::HTMLElement::inBlockTagList): ditto
1627
1628 2006-04-06  Beth Dakin  <bdakin@apple.com>
1629
1630         Reviewed by Darin.
1631
1632         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8203 
1633         REGRESSION: "Invite a friend" text field in GMail page spills out 
1634         of table
1635
1636         RenderReplaced::calcMinMaxWidth() sets m_minWidth to 0 when the 
1637         width is a percent, so this patch copies that behavior into 
1638         RenderTextField::calcMinMaxWidth().
1639
1640         * rendering/RenderTextField.cpp:
1641         (WebCore::RenderTextField::calcMinMaxWidth):
1642
1643 2006-04-06  Darin Adler  <darin@apple.com>
1644
1645         - try to fix Windows build
1646
1647         * WebCore.vcproj/WebCore/WebCore.vcproj: Add JSDocument.cpp.
1648
1649 2006-04-05  Darin Adler  <darin@apple.com>
1650
1651         Reviewed by Adele.
1652
1653         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8111
1654           REGRESSION (NativeTextField): first click in form field on weather.com leaves focus
1655           but no caret
1656
1657         Test: fast/forms/input-text-self-emptying-click.html
1658
1659         * page/MouseEventWithHitTestResults.h: Removed url, target, m_url and m_target,
1660         replacing them with isOverLink and m_isOverLink. Replaced innerNode with targetNode,
1661         and added logic to handle the case where the target node is removed from the document
1662         but the element the target node was in is still inside the document.
1663         * page/MouseEventWithHitTestResults.cpp: Added.
1664
1665         * WebCore.xcodeproj/project.pbxproj: Added MouseEventWithHitTestResults.cpp.
1666         * WebCore.vcproj/WebCore/WebCore.vcproj: Ditto.
1667
1668         * kwq/RenderTreeAsText.cpp: (nodePosition): Added a call to shadowParentNode so we
1669         correctly dump positions within shadow trees. This was needed to give a good result
1670         from my new test for this bug.
1671
1672         * dom/Document.cpp:
1673         (WebCore::Document::prepareMouseEvent): Update to pass fewer parameters to the
1674         constructor for MouseEventWithHitTestResults. Now takes isOverLink boolean, and no
1675         longer takes href and target parameters.
1676
1677         * page/Frame.cpp:
1678         (WebCore::Frame::handleMousePressEventDoubleClick): Use new name targetNode, instead
1679         of old name innerNode.
1680         (WebCore::Frame::handleMousePressEventTripleClick): Ditto.
1681         (WebCore::Frame::handleMousePressEventSingleClick): Ditto. Also change code to check
1682         if over a link to use !isOverLink instead of url.isNull.
1683         (WebCore::Frame::handleMousePressEvent): Ditto. Also remove unused "url" local variable.
1684         (WebCore::Frame::handleMouseMoveEvent): Ditto.
1685         (WebCore::Frame::handleMouseReleaseEvent): Ditto.
1686         (WebCore::Frame::passWidgetMouseDownEventToWidget): Ditto.
1687
1688         * bridge/mac/FrameMac.mm:
1689         (WebCore::FrameMac::handleMousePressEvent): Use new name targetNode, instead of old
1690         name innerNode.
1691         (WebCore::FrameMac::handleMouseMoveEvent): Ditto.
1692         (WebCore::FrameMac::passSubframeEventToSubframe): Ditto.
1693         (WebCore::FrameMac::sendContextMenuEvent): Ditto.
1694
1695         * page/FrameView.cpp:
1696         (WebCore::subframeForEvent): Use new name targetNode, instead of old name innerNode.
1697         (WebCore::FrameView::handleMousePressEvent): Ditto.
1698         (WebCore::FrameView::handleMouseDoubleClickEvent): Ditto.
1699         (WebCore::selectCursor): Ditto. Also change code to check if over a link to use
1700         isOverLink instead of !url.isNull.
1701         (WebCore::FrameView::handleMouseMoveEvent): Ditto.
1702         (WebCore::FrameView::handleMouseReleaseEvent): Ditto.
1703         (WebCore::FrameView::updateDragAndDrop): Ditto.
1704
1705 2006-04-05  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1706
1707         Reviewed and landed by Maciej.
1708
1709         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8184
1710           REGRESSION (r13655): Layer outline not clipped where it should be
1711
1712         * rendering/RenderLayer.cpp:
1713         (WebCore::RenderLayer::calculateRects): Reverted this part of the fix for bug 7943.
1714         The outlineRect should not be inflated.
1715
1716 2006-04-05  Rob Buis  <buis@kde.org>
1717
1718         Reviewed by Eric, landed by Maciej.
1719
1720         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=7627:
1721         SVG from the W3C SVG 1.1 test suite (cubic01.svg) renders as all black
1722
1723         Fix this svg stylesheet to use strict-mode, as this makes sure
1724         class selecting is done correctly.
1725
1726         * ksvg2/svg/SVGStyleElement.cpp:
1727         (SVGStyleElement::childrenChanged):
1728
1729 2006-04-05  Justin Garcia  <justin.garcia@apple.com>
1730
1731         Reviewed by mjs
1732
1733         I forgot to convert one of the implicit remove/inserts to an explicit remove/insert,
1734         so we were hitting the assert I just added to InsertNodeBeforeCommand that checked for
1735         implicit removes.
1736
1737         * editing/ReplaceSelectionCommand.cpp:
1738         (WebCore::ReplaceSelectionCommand::doApply):
1739
1740 2006-04-05  Maciej Stachowiak  <mjs@apple.com>
1741
1742         Reviewed by Anders.
1743
1744         - autogenerate bindings for all of the methods and properties of Document
1745         http://bugzilla.opendarwin.org/show_bug.cgi?id=8163
1746
1747         - also removed document.actualEncoding since it is not in any spec
1748         or implemented by any other browser
1749         
1750         * DerivedSources.make: add JSDocument.h to results
1751         * WebCore.xcodeproj/project.pbxproj: Added new files to project
1752         * bindings/scripts/CodeGeneratorJS.pm: Support for new stuff needed by Document.
1753         * dom/Document.cpp:
1754         (WebCore::Document::readyState): moved impl here from JS bindings
1755         (WebCore::Document::inputEncoding): ditto
1756         (WebCore::Document::defaultCharset): ditto
1757         (WebCore::Document::setCharset): ditto
1758         * dom/Document.h:
1759         (WebCore::Document::charset): added, synonym for inputEncoding.
1760         (WebCore::Document::characterSet): ditto
1761         * dom/Document.idl: Added. Full interface for the Document object.
1762         * khtml/ecma/JSXMLHttpRequest.cpp:
1763         (KJS::JSXMLHttpRequestProtoFunc::callAsFunction): JSDocument, not DOMDocument
1764         * khtml/ecma/JSXSLTProcessor.cpp:
1765         (KJS::XSLTProcessorProtoFunc::callAsFunction): ditto
1766         * khtml/ecma/kjs_binding.cpp:
1767         (KJS::jsStringOrFalse): Added this convenience for the method on Document
1768         that bizzarely returns false on failure and a string otherwise.
1769         * khtml/ecma/kjs_binding.h:
1770         * khtml/ecma/kjs_css.cpp:
1771         (KJS::toJS): renamed for consistency
1772         * khtml/ecma/kjs_css.h:
1773         * khtml/ecma/kjs_dom.cpp:
1774         - removed all traces of DOMDocument
1775         (KJS::toJS): JSDocument, not DOMDocument
1776         * khtml/ecma/kjs_dom.h:
1777         * khtml/ecma/kjs_html.cpp:
1778         (KJS::):
1779         (KJS::JSHTMLDocument::JSHTMLDocument): inherit from JSDocument
1780         (KJS::JSHTMLDocument::getOwnPropertySlot): ditto
1781         (KJS::JSHTMLDocument::put): ditto
1782         * khtml/ecma/kjs_html.h:
1783         * khtml/ecma/kjs_traversal.cpp:
1784         (KJS::toJS): added overloads
1785         (KJS::toNodeFilter): handle JS functions as well as impl NodeFilter objects
1786         * khtml/ecma/kjs_traversal.h:
1787         * platform/AtomicString.h:
1788         (WebCore::AtomicString::AtomicString): Allow implicit conversion from String.
1789
1790 2006-04-05  Justin Garcia  <justin.garcia@apple.com>
1791
1792         Reviewed by darin
1793         
1794         <http://bugzilla.opendarwin.org/show_bug.cgi?id=8198>
1795         Hitting an assert on undo paste
1796         
1797         ReplaceSelectionCommand was doing a combination of undoable and non-undoable 
1798         removes from the ReplacementFragment.  On Undo Paste, the undoable removes 
1799         couldn't be undone because the tree was in a different state than it was
1800         at the time of the remove.  This patch makes all the removes from the fragment 
1801         non-undoable.  We could make them all undoable, but I can't think of any reason 
1802         why we'd want the fragment to be reconstructed on an Undo Paste.
1803
1804         * editing/AppendNodeCommand.cpp:
1805         (WebCore::AppendNodeCommand::doApply):
1806         Assert that the node to append isn't already in a tree, since if it is, it will 
1807         be removed in a non-undoable way.
1808         * editing/InsertNodeBeforeCommand.cpp:
1809         (WebCore::InsertNodeBeforeCommand::doApply): Ditto.
1810         * editing/ReplaceSelectionCommand.cpp:
1811         (WebCore::ReplaceSelectionCommand::doApply): 
1812         Nodes were being moved from the fragment to the document with undoable inserts.  
1813         Undoable inserts implicitly remove the node (in a non-undoable way) from its 
1814         old location if it is already in a tree.  I now explicitly remove the nodes 
1815         from the fragment before inserting them into the document to make it clear that 
1816         they are being removed in a non-non-undoable way.  I also changed the one undoable 
1817         remove from the fragment to a non-undoable remove.
1818         * editing/ReplaceSelectionCommand.h: 
1819         Made ReplacementFragment's non-undoable removeNode public.
1820
1821 2006-04-05  Darin Adler  <darin@apple.com>
1822
1823         - fixed the build
1824
1825         * WebCore.xcodeproj/project.pbxproj: Oops! Resolved merge conflict.
1826
1827 2006-04-05  Darin Adler  <darin@apple.com>
1828
1829         Reviewed by Maciej.
1830
1831         - fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8049
1832           StringImpl hash traits deleted value creates an init routine for WebCore
1833           <rdar://problem/4442248> REGRESSION: WebCore has init routines (8049)
1834
1835         * platform/StringHash.h: Added. Moved hash functions and such for
1836         WebCore::String and friends into this file so we don't have to include
1837         the hash traits header everywhere. Changed hashing for WebCore::StringImpl
1838         and WebCore::String so that they use a raw pointer for the underlying
1839         storage type, taking advantage of the new feature added in JavaScriptCore.
1840
1841         * platform/AtomicString.h: Moved StrHash specialization to StringHash.h.
1842         * platform/PlatformString.h: Moved StrHash specialization to StringHash.h.
1843         * platform/StringImpl.h: Moved StrHash, CaseInsensitiveHash, and HashTraits
1844         to StringHash.h. Left DefaultHash behind so that you can't get the wrong
1845         hash function by accident if you forget to include "StringHash.h".
1846
1847         * platform/StringImpl.cpp: Added include of StringHash.h and removed
1848         RefPtr<StringImpl> HashTraits<RefPtr<StringImpl> >::_deleted, which is
1849         the object with a global initializer causing all the trouble!
1850
1851         * kwq/AccessibilityObjectCache.h: Changed hash function to be IntHash
1852         instead of PtrHash.
1853
1854         * dom/StyledElement.cpp: Changed MappedAttributeKeyTraits to inherit from
1855         the generic traits in KXMLCore so we get a StorageType. Also cleaned up a
1856         tiny bit by adding default values to the MappedAttributeKey constructor.
1857
1858         * platform/CharsetNames.cpp: Changed hash traits here to be a new
1859         TextEncodingIDHashTraits struct rather than defining new default traits
1860         for the integer type since more integer types have default traits in
1861         HashTraits.h now. Also added a specialization so this class will share
1862         the underlying implementation (since InvalidEncoding happens to be -1).
1863
1864         * bridge/mac/FrameMac.h:
1865         * dom/Document.h:
1866         * dom/xml_tokenizer.h:
1867         * khtml/xsl/XSLTProcessor.h:
1868         * kwq/JavaAppletWidget.h:
1869         * page/FramePrivate.h:
1870         * page/Page.cpp:
1871         * platform/AtomicString.cpp:
1872         * platform/TransferJob.h:
1873         * rendering/render_applet.h:
1874         Added include of StringHash.h.
1875
1876         * WebCore.xcodeproj/project.pbxproj: Added StringHash.h. Remove unneeded
1877         CREATE_HASH_TABLE variable in build settings. Re-sorted some file lists.
1878         Added quotes to the CREATE_HASH_TABLE initialization in the rule that
1879         builds generated files. Removed various unneeded build settings for that
1880         target as well.
1881
1882         * ForwardingHeaders/kxmlcore/HashTraits.h: Added.
1883
1884         - other minor cleanup
1885
1886         * bridge/mac/FrameMac.mm: Sorted includes.
1887         * dom/Node.cpp: Removed bogus symbol after #endif.
1888
1889         * khtml/xsl/XSLTProcessor.cpp: Sorted includes. Removed redundant using
1890         namespace WebCore.
1891         * loader/Cache.cpp: Ditto.
1892
1893 2006-04-05  Beth Dakin  <bdakin@apple.com>
1894
1895         Reviewed by Darin.
1896
1897         Fix for <rdar://problem/4502311> text-transform:capitalize needs to 
1898         treat nbsp as a regular space when ICU changes
1899
1900         There will be future changes in ICU to match the Unicode 4.1 
1901         standard which no longer recognizes &nbsp as a word separator. We 
1902         need to work around this with text-transform:capitalize because 
1903         words after non-breaking spaces still need to be capitalized.
1904
1905         No layout tests added because existing layout tests cover this.
1906
1907         * platform/StringImpl.cpp:
1908         (WebCore::StringImpl::capitalize): If the character is a non-
1909         breaking space, add a regular space to our temporary buffer, 
1910         otherwise, just copy the character in.
1911
1912 2006-04-05  Alexey Proskuryakov  <ap@nypop.com>
1913
1914         Reviewed by Darin.
1915
1916         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8110
1917           Define navigator.vendorSub (bcms.gov.uk doesn't allow access to login page)
1918
1919         Test: fast/dom/navigator-vendorSub.html
1920
1921         * khtml/ecma/kjs_navigator.cpp:
1922         (KJS::Navigator::getValueProperty): Return an empty string for vendorSub property.
1923         * khtml/ecma/kjs_navigator.h:
1924
1925 2006-04-04  Darin Adler  <darin@apple.com>
1926
1927         Reviewed by Justin (editing parts) and Adele (the rest).
1928
1929         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8182
1930           some text-field-related layout tests are failing
1931
1932         The smart paste code was getting confused and adding extra spaces.
1933
1934         * editing/ReplaceSelectionCommand.cpp:
1935         (WebCore::ReplaceSelectionCommand::doApply): Use isStartOfParagraph instead of
1936         isStartOfLine.
1937         (WebCore::ReplaceSelectionCommand::removeLinePlaceholderIfNeeded): Ditto.
1938
1939         * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::enclosingEmptyListItem):
1940         Change to call isStart/EndOfParagraph instead of Line.
1941
1942         * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::input):
1943         Add a comment about how isStartOfLine is almost certainly wrong here.
1944
1945         - clean up some loose ends in the Frame class from the recent renaming
1946
1947         * page/Frame.h: Removed declarations of deleteMe1, deleteMe2, and
1948         handleMouseMoveEventPart2.
1949         * page/Frame.cpp: (WebCore::Frame::handleMouseMoveEvent): Removed
1950         handleMouseMoveEventPart2 by renaming it to handleMouseMoveEvent and removing
1951         handleMouseMoveEvent itself.
1952
1953         - invoke the makefile directly, removing the generate-derived-sources script
1954
1955         * WebCore.vcproj/WebCore/build-generated-files.sh: Call make directly.
1956         * WebCore.xcodeproj/project.pbxproj: Ditto.
1957         * generate-derived-sources: Removed.
1958
1959 2006-04-04  Adele Peterson  <adele@apple.com>
1960
1961         Reviewed by Justin.
1962
1963         - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8158
1964         REGRESSION: Clicking past RTL text in a new text field puts the caret on the wrong side of the text
1965
1966         Tests:
1967         editing/selection/caret-rtl.html
1968         editing/selection/caret-rtl-2.html
1969
1970         * rendering/RenderText.cpp: (WebCore::RenderText::positionForCoordinates):
1971         When calculating the position for the beginning or end of an InlineTextBox,
1972         we now use offsetForPosition instead of just using m_start and m_len, because
1973         offsetForPosition will take rtl text into account.  I also made some formatting
1974         changes.
1975
1976 2006-04-04  David Hyatt  <hyatt@apple.com>
1977
1978         Fix for bug 8065, inline blocks incorrectly loses spaces between them.
1979
1980         Reviewed by beth
1981
1982         * dom/Text.cpp:
1983         (WebCore::Text::rendererIsNeeded):
1984
1985 2006-04-04  Adele Peterson  <adele@apple.com>
1986
1987         Reviewed by Hyatt.
1988
1989         - Fix for:
1990         http://bugzilla.opendarwin.org/show_bug.cgi?id=8092
1991         REGRESSION (NativeTextField): table contents misaligned in Netflix queue
1992
1993         http://bugzilla.opendarwin.org/show_bug.cgi?id=8141
1994         REGRESSION: Native text field fails to wrap inside table
1995
1996         http://bugzilla.opendarwin.org/show_bug.cgi?id=8072
1997         REGRESSION: text fields at connect.apple.com spill out of the containing box
1998
1999         Test: fast/forms/input-table.html
2000
2001         Rewrote calcMinMaxWidth for text fields so it considers width, 
2002         min-width, and max-width settings as well as the size attribute.
2003
2004         * rendering/RenderTextField.cpp: (WebCore::RenderTextField::calcMinMaxWidth):
2005
2006 2006-04-04  Beth Dakin  <bdakin@apple.com>
2007
2008         Reviewed by Darin.
2009
2010         This is a followup to my fix for <rdar://problem/4493218>
2011         
2012         This patch re-names computeIntLength() and computeShortLength() to 
2013         be computeLengthInt() and computeLengthShort(), respectively, to 
2014         match the pre-existing computeLengthFloat(). This patch also adds 
2015         the slightly confusing-ly named computeLengthIntForLength() which 
2016         uses the max and min values of a 28-bit integer as bounds for 
2017         overflow. This function is necessary because Length objects expect 
2018         28-bit integers. 
2019
2020         * css/css_valueimpl.cpp:
2021         (WebCore::CSSPrimitiveValue::computeLengthInt):
2022         (WebCore::CSSPrimitiveValue::computeLengthIntForLength):
2023         (WebCore::CSSPrimitiveValue::computeLengthShort):
2024         * css/css_valueimpl.h:
2025         * css/cssstyleselector.cpp:
2026         (WebCore::convertToLength):
2027         (WebCore::CSSStyleSelector::applyProperty):
2028         (WebCore::CSSStyleSelector::mapBackgroundXPosition):
2029         (WebCore::CSSStyleSelector::mapBackgroundYPosition):
2030
2031 2006-04-04  Timothy Hatcher  <timothy@apple.com>
2032
2033         Reviewed by Darin.
2034
2035         The Debug and Release frameworks are now built with install paths relative to the build products directory.
2036         This removes the need for other projects to build with -framework WebCore and -framework JavaScriptCore. 
2037
2038         * WebCore.xcodeproj/project.pbxproj:
2039
2040 2006-04-04  Justin Garcia  <justin.garcia@apple.com>
2041
2042         Reviewed by darin
2043         
2044         <http://bugzilla.opendarwin.org/show_bug.cgi?id=6608>
2045         REGRESSION: Line disappears when deleting
2046         
2047         Rewrote moveNodesAfterNode to address these problems:
2048         It moved nodes without preserving their style. 
2049         It traversed over siblings looking for a br to know when
2050         to stop merging.  If the br was burried inside a span, it 
2051         wouldn't find it.  If the text is whitespace:pre, it wouldn't
2052         stop.
2053         In theory it would crash if the "enclosingInlineElements" of the start of the
2054         selection to delete and the end of the selection to delete were the
2055         same.  We think that this will fix these:
2056         <rdar://problems/3950559&4498113>
2057         CrashTracer: 2116 crashes in Mail at com.apple.WebCore: khtml::CompositeEditCommand::insertNodeAfter + 32
2058         CrashTracer: 1569 crashes in Mail at com.apple.WebCore: khtml::DeleteSelectionCommand::moveNodesAfterNode + 340
2059         But we haven't been able to construct a reproducible case.
2060         
2061         * editing/CompositeEditCommand.cpp:
2062         (WebCore::CompositeEditCommand::removeNodeAndPruneAncestors): Moved from ReplaceSelectionCommand.
2063         (WebCore::CompositeEditCommand::prune): Ditto.
2064         * editing/CompositeEditCommand.h:
2065         * editing/DeleteSelectionCommand.cpp:
2066         (WebCore::DeleteSelectionCommand::mergeParagraphs):
2067         (WebCore::DeleteSelectionCommand::doApply):
2068         * editing/DeleteSelectionCommand.h:
2069         * editing/ReplaceSelectionCommand.cpp:
2070         (WebCore::ReplaceSelectionCommand::doApply):
2071         * editing/ReplaceSelectionCommand.h:
2072         (WebCore::):
2073         * editing/markup.cpp:
2074         (WebCore::createMarkup): 
2075         Was crashing when passed a collapsed range.  I early return an empty string instead.
2076
2077 2006-04-04  John Sullivan  <sullivan@apple.com>
2078
2079         Reviewed by Adele Peterson.
2080         
2081         - WebCore part of <rdar://problem/4498418> "Autosaved" searchterms are saved during private browsing
2082
2083         * bridge/mac/WebCoreSettings.h:
2084         * bridge/mac/WebCoreSettings.mm:
2085         (-[WebCoreSettings setPrivateBrowsingEnabled:]):
2086         (-[WebCoreSettings privateBrowsingEnabled]):
2087         Teach WebCoreSettings about private browsing (WebKit knew, but WebCore didn't)
2088         
2089         * kwq/KWQKHTMLSettings.h:
2090         (KHTMLSettings::privateBrowsingEnabled):
2091         (KHTMLSettings::setPrivateBrowsingEnabled):
2092         Teach KHTMLSettings about private browsing
2093         
2094         * kwq/KWQLineEdit.mm:
2095         Fix wrong class in a category method declaration; the compiler didn't seem to mind.
2096         
2097         * kwq/WebCoreTextField.mm:
2098         (-[KWQSearchFieldCell _addStringToRecentSearches:]):
2099         Override this method to bail out if private browsing is enabled.
2100
2101 2006-04-04  Trey Matteson  <trey@usa.net>
2102
2103         Reviewed by Hyatt.
2104
2105         http://bugzilla.opendarwin.org/show_bug.cgi?id=7951
2106         REGRESSION: Safari crashes when printing a google map w/directions
2107
2108         Tests: none, because I believe it only happens when printing, due to the relayouts
2109
2110         * rendering/RenderTable.cpp:
2111         (WebCore::RenderTable::recalcSectionsIfNeeded): Add new utility to let the cells
2112         ensure the sections' grid data is up to date.
2113         * rendering/RenderTable.h:
2114         * rendering/RenderTableCell.cpp:
2115         (WebCore::RenderTableCell::calcMinMaxWidth):  Call above method.
2116
2117 2006-04-03  Justin Haygood <jhaygood@spsu.edu>
2118
2119         Reviewed by eseidel.  Landed by eseidel.
2120         
2121         - WIN32: maximumScroll() is the maximum scroll delta, not the maximum scroll position. Update to use
2122           the real maximum scroll position.
2123         http://bugzilla.opendarwin.org/show_bug.cgi?id=8160
2124
2125         * platform/win/ScrollViewWin.cpp:
2126         (WebCore::ScrollView::updateScrollBars):
2127
2128 2006-04-04  Eric Seidel  <eseidel@apple.com>
2129
2130         Reviewed by andersca.
2131
2132         Work-around spaces-in-pathnames issue in gnumake on win32.
2133         http://bugzilla.opendarwin.org/show_bug.cgi?id=8173
2134
2135         * WebCore.vcproj/WebCore/build-generated-files.sh:
2136
2137 2006-04-03  Darin Adler  <darin@apple.com>
2138
2139         - tried to fix build again
2140
2141         * WebCore.xcodeproj/project.pbxproj: Removed JSStyleSheet files.
2142         * WebCore.vcproj/WebCore/WebCore.vcproj: Ditto.
2143
2144 2006-04-03  Darin Adler  <darin@apple.com>
2145
2146         - fixed properties on a bunch of files
2147           (removed allow-tabs and svn:executable from many)
2148
2149         * css/css_base.cpp:
2150         * html/html_headimpl.cpp:
2151         * khtml/ecma/kjs_traversal.cpp:
2152         * kwq/DeprecatedPtrListImpl.cpp:
2153         * kwq/DeprecatedValueListImpl.cpp:
2154         * loader/CachedScript.h:
2155         * platform/ArrayImpl.cpp:
2156         * platform/StringImpl.cpp:
2157         * rendering/DataRef.h:
2158         * rendering/RenderContainer.cpp:
2159         * rendering/RenderTableCell.cpp:
2160         * rendering/bidi.h:
2161         * rendering/render_list.cpp:
2162         * rendering/render_style.cpp:
2163         * rendering/table_layout.h:
2164         Converted tabs to spaces.
2165
2166 2006-04-03  Alexey Proskuryakov  <ap@nypop.com>
2167
2168         Reviewed by Darin.
2169
2170         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7118
2171           Property values with extra items do not get treated as invalid (they should)
2172
2173         Tests: fast/css/invalidation-errors.html
2174                fast/css/invalidation-errors-2.html
2175                fast/css/invalidation-errors-3.html
2176
2177         * css/CSSGrammar.y: Rollback the properties added by parseValue() when it returns false.
2178         * css/cssparser.h: Moved shorthand counting to ShorthandScope, a new class in cssparser.cpp.
2179         * css/cssparser.cpp:
2180         (WebCore::CSSParser::rollbackLastProperties): Added.
2181         (WebCore::CSSParser::parseValue): Return false if there are too many properties in the list.
2182         (WebCore::CSSParser::parseBackgroundShorthand): Use ShorthandScope.
2183         (WebCore::CSSParser::parseShorthand): Ditto.
2184         (WebCore::CSSParser::parse4Values): Ditto.
2185
2186 2006-04-03  Darin Adler  <darin@apple.com>
2187
2188         - changed StyleSheet back to hand-generated since the generated toJS
2189           function was not making the right type of wrapper for CSS style sheets
2190           (fixes failing layout tests)
2191
2192         * DerivedSources.make: Removed JSStyleSheet.h.
2193         * css/StyleSheet.idl: Removed.
2194         * khtml/ecma/kjs_css.cpp: Added DOMStyleSheet back in.
2195         * khtml/ecma/kjs_css.h: Ditto.
2196
2197 2006-04-03  Darin Adler  <darin@apple.com>
2198
2199         - fixed Macintosh build
2200
2201         * WebCore.xcodeproj/project.pbxproj: Fixed paths of some files that were absolute
2202         paths from my machine.
2203
2204 2006-04-03  Darin Adler  <darin@apple.com>
2205
2206         - try to fix Windows build
2207
2208         * WebCore.vcproj/WebCore/WebCore.vcproj: Add three new generated files as source files.
2209
2210 2006-04-03  Darin Adler  <darin@apple.com>
2211
2212         Reviewed by Maciej.
2213
2214         - get RTL right for bug http://bugzilla.opendarwin.org/show_bug.cgi?id=8106
2215           REGRESSION (NativeTextField): New text fields don't scroll to the beginning when losing focus
2216
2217         * rendering/RenderTextField.cpp: (WebCore::RenderTextField::forwardEvent):
2218         Scroll to the right if RTL.
2219
2220 2006-04-03  Darin Adler  <darin@apple.com>
2221
2222         Reviewed by Maciej.
2223
2224         - http://bugzilla.opendarwin.org/show_bug.cgi?id=8147
2225           convert derived sources script to a Makefile
2226
2227         * DerivedSources.make: Added.
2228         * css/CSSPrimitiveValue.idl: Added.
2229         * css/Counter.idl: Added.
2230         * css/StyleSheet.idl: Added.
2231
2232         * WebCore.xcodeproj/project.pbxproj: Added new generated files, IDLs, and the makefile.
2233         * bindings/scripts/CodeGeneratorJS.pm:
2234
2235         * generate-derived-sources: Added license header. Removed most of the script, except for
2236         a single invocation of make.
2237
2238         * khtml/ecma/kjs_css.h: Removed DOMStyleSheet, DOMCSSPrimitiveValue,
2239         CSSPrimitiveValueConstructor, and DOMCounter.
2240         * khtml/ecma/kjs_css.cpp:
2241         (KJS::DOMCSSStyleSheet::DOMCSSStyleSheet): Changed to use JSStyleSheet as the base class.
2242         (KJS::DOMCSSStyleSheet::getOwnPropertySlot): Ditto.
2243         (KJS::DOMCSSValueProtoFunc::callAsFunction): Added.
2244         (KJS::toJS): Changed to use JSCSSPrimitiveValue.
2245         (KJS::DOMRGBColor::getValueProperty): Changed to call toJS instead of making a
2246         DOMCSSPrimitiveValue directly.
2247
2248 2006-04-03  Justin Garcia  <justin.garcia@apple.com>
2249
2250         Reviewed by harrison
2251         
2252         <http://bugzilla.opendarwin.org/show_bug.cgi?id=8117>
2253         REGRESSION (NativeTextField): Drag and drop text within a text input field modifies page
2254         
2255         The frame's selection is only set after all sub-commands have been 
2256         performed.  When we send the khtmlBeforeTextInsertedEvent to the root 
2257         editable element we were using frame->selection(), which may no longer 
2258         be in the document.
2259         
2260         Had to move the construction of the ReplacementFragment to when the
2261         replace operation is applied, because endingSelection isn't the 
2262         endingSelection of the last operation when the replace operation
2263         is constructed.
2264
2265         * editing/ReplaceSelectionCommand.cpp:
2266         (WebCore::ReplacementFragment::ReplacementFragment):
2267         (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand):
2268         (WebCore::ReplaceSelectionCommand::doApply):
2269         * editing/ReplaceSelectionCommand.h:
2270
2271 2006-04-03  Beth Dakin  <bdakin@apple.com>
2272
2273         Reviewed by Hyatt.
2274
2275         Fix for <rdar://problem/4495644> crash when mousing over links at 
2276         nationalrealestateinvestors.com in 
2277         WebCore::RenderBlock::findNextLineBreak
2278
2279         This is a fix for a repro crasher where a rootLineBox had a stale 
2280         pointer to a render object.
2281
2282         * rendering/RenderFlow.cpp:
2283         (WebCore::RenderFlow::dirtyLinesFromChangedChild): Only break from 
2284         the function because of selfNeedsLayout() if we are not an inline 
2285         flow, because if we are, we will not re-layout before bad things 
2286         can happen.
2287
2288 2006-04-03  Timothy Hatcher  <timothy@apple.com>
2289
2290         Reviewed by Maciej.
2291
2292         Removing idl files and some scripts from the WebCore target to prevent
2293         them from being copied into the Resources.
2294
2295         * WebCore.xcodeproj/project.pbxproj:
2296
2297 2006-04-03  Dave Hyatt  <hyatt@apple.com>
2298
2299         Implement basic theme support on Win32.  Still much to do, but
2300         the backgrounds of buttons, textfields, checkboxes and radio
2301         controls now draw correctly.  Still work to do for the Classic look
2302         and to get the foreground defaults of the controls correct.
2303
2304         Reviewed by anders
2305
2306         * dom/Node.h:
2307         (WebCore::Node::isReadOnly):
2308         * html/HTMLInputElement.h:
2309         (WebCore::HTMLInputElement::isReadOnly):
2310         * platform/win/IntRectWin.cpp:
2311         (WebCore::IntRect::operator RECT):
2312         * rendering/RenderTheme.cpp:
2313         (WebCore::RenderTheme::isControlStyled):
2314         (WebCore::RenderTheme::stateChanged):
2315         (WebCore::RenderTheme::isReadOnly):
2316         (WebCore::RenderTheme::isHovered):
2317         * rendering/RenderTheme.h:
2318         (WebCore::RenderTheme::supportsHover):
2319         * rendering/RenderThemeMac.h:
2320         * rendering/RenderThemeMac.mm:
2321         (WebCore::RenderThemeMac::isControlStyled):
2322         * rendering/RenderThemeWin.cpp:
2323         (WebCore::m_textFieldTheme):
2324         (WebCore::RenderThemeWin::~RenderThemeWin):
2325         (WebCore::RenderThemeWin::close):
2326         (WebCore::RenderThemeWin::supportsFocus):
2327         (WebCore::RenderThemeWin::determineState):
2328         (WebCore::RenderThemeWin::getThemeData):
2329         (WebCore::RenderThemeWin::paintButton):
2330         (WebCore::RenderThemeWin::setCheckboxSize):
2331         (WebCore::RenderThemeWin::setRadioSize):
2332         (WebCore::RenderThemeWin::paintTextField):
2333         * rendering/RenderThemeWin.h:
2334         (WebCore::ThemeData::m_state):
2335         (WebCore::RenderThemeWin::supportsHover):
2336         (WebCore::RenderThemeWin::paintCheckbox):
2337         (WebCore::RenderThemeWin::paintRadio):
2338
2339 2006-04-03  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2340
2341         Reviewed by Beth.
2342
2343         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8085
2344           REGRESSION: Main menu positioned incorrectly on eia.org and fedex.com/us
2345
2346         Test: fast/dom/Element/offsetTop-table-cell.html
2347
2348         * rendering/RenderObject.cpp:
2349         (WebCore::RenderObject::offsetTop): Skip table rows when adding up
2350         the offsets, since a table cell's yPos() is relative to the table
2351         section, not the row.
2352
2353 2006-04-03  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2354
2355         Test: fast/repaint/layer-outline.html fast/repaint/layer-outline-horizontal.html
2356
2357         Reviewed by Darin.
2358
2359         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7943
2360           Layer outline does not repaint
2361
2362         * rendering/RenderLayer.cpp:
2363         (WebCore::RenderLayer::paintLayer): Use the outlineRect for the
2364         outline phase and do it only if the outlineRect isn't empty.
2365         (WebCore::RenderLayer::calculateRects): Actually add the outline width to the
2366         outline rect.
2367
2368 2006-04-03  Adele Peterson  <adele@apple.com>
2369
2370         Reviewed by Justin.
2371
2372         - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8104
2373         REGRESSION (NativeTextField): New text fields should not allow pasting newlines
2374
2375         Test: fast/forms/input-truncate-newline.html
2376
2377         * html/HTMLInputElement.cpp:
2378         (WebCore::minPosition): Added helper function.
2379         (WebCore::HTMLInputElement::defaultEventHandler): Searches for /r or /n and 
2380          truncates the text to be inserted to the earliest newline.
2381
2382 2006-04-03  Alexey Proskuryakov  <ap@nypop.com>
2383
2384         Fixed a comment (forgot to save the file before the previous commit).
2385
2386         * xml/xmlhttprequest.cpp:
2387         (WebCore::XMLHttpRequest::open):
2388
2389 2006-04-03  Alexey Proskuryakov  <ap@nypop.com>
2390
2391         Reviewed by Darin.
2392
2393         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8099
2394           REGRESSION: XMLHttpRequest lowercase post requests broken
2395
2396         Test: http/tests/xmlhttprequest/methods-lower-case.html
2397
2398         * xml/xmlhttprequest.cpp:
2399         (WebCore::XMLHttpRequest::open): Uppercase some HTTP method names, to match a Firefox quirk.
2400         (WebCore::XMLHttpRequest::send): Account for the above change.
2401
2402 2006-04-02  Graham Dennis  <Graham.Dennis@gmail.com>
2403
2404         Reviewed by Darin.
2405
2406         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8032
2407           REGRESSION: Focus ring not completely redrawn after a Delete changes its size
2408
2409         * rendering/RenderObject.cpp:
2410         (WebCore::RenderObject::repaintAfterLayoutIfNeeded): When an element changes size, the
2411         delta rectangles that need to be invalidated must be inflated by the outline size to ensure
2412         that the previous outline is erased, and the space where the new outline is to be drawn is
2413         also invalidated. This behaviour is identical to the behaviour of borders that was fixed in
2414         bug 6301.
2415         * manual-tests/outline-repaint-glitch.html: Added. Manual testcase.
2416         This is just an outline version of border-repaint-glitch.html
2417
2418 2006-04-02  Trey Matteson  <trey@usa.net>
2419
2420         Reviewed by Maciej.
2421
2422         Support for fixing http://bugzilla.opendarwin.org/show_bug.cgi?id=8121
2423         REGRESSION: 404s are not displayed
2424
2425         * bridge/mac/WebCoreFrameBridge.mm:
2426         (-[WebCoreFrameBridge currentForm]): Nuke redundant nil check.
2427         (-[WebCoreFrameBridge frameElement]): Tweak to not rely on our document, which
2428         gives a correct result even at the start of our loading process.
2429         * bindings/objc/DOM.mm:
2430         (-[DOMDocument _ownerElement]): Nuke redundant nil check.
2431
2432 2006-04-02  David Kilzer  <ddkilzer@kilzer.net>
2433
2434         Reviewed by Maciej.
2435
2436         - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8079
2437         REGRESSION: Redraw from page cache does not show visited links
2438
2439         * page/Frame.cpp: (WebCore::Frame::reparseConfiguration): Added back
2440         updateStyleSelector call that was removed as part of the patch for bug 7907.
2441
2442 2006-04-02  Maciej Stachowiak  <mjs@apple.com>
2443
2444         Reviewed by Hyatt.
2445
2446         - fixed <rdar://problem/4198619> REGRESSION: tabbing through links fails after hitting text field w/ sys's "tab to all controls" off
2447         - fixed <rdar://problem/4463760> REGRESSION: Can't tab from old text field (like password fields) to new text field (6811)
2448         (http://bugzilla.opendarwin.org/show_bug.cgi?id=6811)
2449         - fixed tab and shift tab don't select the right things
2450         http://bugzilla.opendarwin.org/show_bug.cgi?id=5685
2451
2452         * bridge/mac/FrameMac.mm:
2453         (WebCore::FrameMac::nextKeyViewInFrame):
2454         * bridge/mac/WebCoreFrameBridge.h:
2455
2456 2006-04-02  Darin Adler  <darin@apple.com>
2457
2458         - add a few stubs to get Windows closer to building
2459
2460         * platform/win/TemporaryLinkStubs.cpp:
2461         (WebCore::focusRingColor):
2462         (WebCore::setFocusRingColorChangeFunction):
2463         (Frame::setNeedsReapplyStyles):
2464
2465 2006-04-02  Darin Adler  <darin@apple.com>
2466
2467         - fix the build
2468
2469         * WebCore.xcodeproj/project.pbxproj: Removed a bunch of files that should not have been
2470         mentioned at all, and a bunch of others that should be in the project but not in the target.
2471
2472 2006-04-02  Darin Adler  <darin@apple.com>
2473
2474         Reviewed by Adele.
2475
2476         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8123
2477           focus ring on new text field doesn't look like the old one
2478
2479         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7685
2480           Focus ring color should change to match graphite when system theme is graphite
2481
2482         - some cleanup to how we parse user agent style sheets
2483
2484         * css/CSSValueKeywords.in: Added -webkit-focus-ring-color.
2485
2486         * css/cssstyleselector.cpp:
2487         (WebCore::parseUASheet): Parse an array of chars instead of UTF-16.
2488         Cuts the size of the style sheet in half.
2489         (WebCore::CSSStyleSelector::applyProperty): Allow negative value for
2490         outline-offset. Changed shadow parsing to use getColorFromPrimitiveValue
2491         instead of repeating the same logic.
2492         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Added a case
2493         for the focus ring color.
2494         * rendering/render_style.h: (WebCore::RenderStyle::setOutlineOffset):
2495         Changed to allow negative values.
2496
2497         * css/html4.css: Removed a lot of excess spaces. Changed color of focus
2498         to -webkit-focus-ring-color. Changed width of focus to 5px.
2499         Added an outline-offset for <input type=text> of -2px.
2500
2501         * css/cssparser.cpp:
2502         (WebCore::CSSParser::parseValue): Added focus ring color as an outline color all
2503         the time, and as any other color when not in strict mode. I'm confused about what's
2504         best for this whole strict mode policy, and I may need advice on Hyatt to perfect
2505         this one later.
2506         (WebCore::CSSParser::parseColorFromValue): Removed code to pin r, g, and b because
2507         the functions in platform already take care of that. Kept the pinning of a, though
2508         because that's done in floating point before converting to an integer.
2509         (WebCore::CSSParser::parseShadow): Allow focus ring color when not in strict mode.
2510
2511         * bridge/mac/FrameMac.h: Eliminated the virtual detachFromView function.
2512         * bridge/mac/FrameMac.mm:
2513         (WebCore::FrameMac::FrameMac): Eliminated code to maintain the frame instances list.
2514         (WebCore::FrameMac::~FrameMac): Ditto.
2515         (WebCore::Frame::setNeedsReapplyStyles): Added.
2516
2517         * bridge/mac/WebCoreSettings.mm: (-[WebCoreSettings _updateAllViews]):
2518         * platform/mac/WebCoreTextRendererFactory.mm:
2519         (-[WebCoreTextRendererFactory clearCaches]):
2520         Changed to call the new Page::setNeedsReapplyStylesForSettingsChange instead of using the
2521         obsolete Frame::instances.
2522
2523         * page/Frame.h: Removed instances, mutableInstances, and detachFromView.
2524         * page/Frame.cpp: Ditto.
2525
2526         * page/FrameTree.cpp:
2527         (WebCore::FrameTree::~FrameTree): Call setView(0) instead of detachFromView().
2528         (WebCore::FrameTree::removeChild): Ditto.
2529
2530         * page/Page.h:
2531         * page/Page.cpp:
2532         (WebCore::Page::init): Added a set of pages instead of a page count. Also
2533         register a function for when the focus ring color changes the first time this
2534         is called.
2535         (WebCore::Page::~Page): Call setView(0) instead of detachFromView. Also update
2536         to manager the set of pages.
2537         (WebCore::Page::setNeedsReapplyStyles): Call setNeedsReapplyStyles on all frames.
2538         (WebCore::Page::setNeedsReapplyStylesForSettingsChange): Call setNeedsReapplyStyles
2539         on all frames with the passed-in settings.
2540
2541         * css/make-css-file-arrays.pl: Changed to run the C preprocessor on the
2542         input files and to generate an array of char instead of unsigned short.
2543
2544         * platform/PlatformString.h: Added a constructor that takes a char* and
2545         a length.
2546         * platform/String.cpp: (WebCore::String::String): Ditto.
2547
2548         * WebCore.xcodeproj/project.pbxproj: Just some tweaks; adding in a few files like
2549         the user agent style sheets.
2550
2551         * platform/Color.h: Removed all use of DeprecatedString. Cleaned up a bit.
2552         Added focusRingColor and setFocusRingColorChangeFunction.
2553         * platform/Color.cpp:
2554         (WebCore::makeRGB): Rewrote using max and min.
2555         (WebCore::makeRGBA): Ditto.
2556         (WebCore::parseHexColor): Cleaned up a bit; changed partway to String instead of
2557         DeprecatedString.
2558         (WebCore::Color::Color): Changed to use String and to call setNamedColor to save code.
2559         (WebCore::Color::setNamedColor): Changed to use String in the interface.
2560
2561         * platform/mac/ColorMac.mm:
2562         (WebCore::observeTheme): Added. Function used to start up the observer.
2563         (WebCore::setFocusRingColorChangeFunction): Added. Used to get a call back so we can
2564         update all the views when the color changes (including recomputing style to get the
2565         color change in).
2566         (WebCore::setFocusRingColorChangeFunction): Added. Returns one of the two focus
2567         ring colors. Both of these match what AppKit uses -- neither matches what we used
2568         to have in the html4.css file.
2569         (+[WebCoreControlTintObserver controlTintDidChange]): Added. Used to update when
2570         the appearance is changed from blue to graphite and back. We keep a global so we
2571         don't have to call over to AppKit every time; that's probably overkill but we need
2572         the obsever for the color change function anyway.
2573
2574 2006-04-02  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2575
2576         Test: fast/inline-block/overflow-clip.html
2577
2578         Reviewed by Darin.
2579
2580         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8118
2581           REGRESSION (r13595): Inline block's clipped overflow increases table row height
2582
2583         * rendering/render_line.cpp:
2584         (WebCore::InlineFlowBox::placeBoxesVertically): Don't look at interior overflow
2585         when calculating the contribution to the inline's vertical overflows.
2586
2587 2006-04-02  Eric Seidel  <eseidel@apple.com>
2588
2589         Reviewed by andersca.
2590
2591         Make WebCore safe against KJS::Node in JavaScriptCore private headers.
2592
2593         * editing/ReplaceSelectionCommand.h:
2594         * khtml/ecma/JSXMLSerializer.cpp:
2595         (KJS::XMLSerializerProtoFunc::callAsFunction):
2596         * khtml/ecma/JSXSLTProcessor.cpp:
2597         (KJS::XSLTProcessorProtoFunc::callAsFunction):
2598         * khtml/ecma/kjs_binding.cpp:
2599         (KJS::ScriptInterpreter::forgetDOMNodeForDocument):
2600         (KJS::ScriptInterpreter::putDOMNodeForDocument):
2601         * khtml/ecma/kjs_dom.cpp:
2602         (KJS::DOMNode::DOMNode):
2603         (KJS::DOMNode::mark):
2604         (KJS::DOMNode::getValueProperty):
2605         (KJS::DOMNode::putValueProperty):
2606         (KJS::DOMNodeProtoFunc::callAsFunction):
2607         (KJS::toNode):
2608         (KJS::DOMEventTargetNode::DOMEventTargetNode):
2609         (KJS::DOMDocumentProtoFunc::callAsFunction):
2610         (KJS::DOMElement::putValueProperty):
2611         (KJS::DOMElementProtoFunc::callAsFunction):
2612         (KJS::checkNodeSecurity):
2613         (KJS::toJS):
2614         (KJS::getRuntimeObject):
2615         (KJS::DOMNamedNodesCollection::DOMNamedNodesCollection):
2616         (KJS::DOMNamedNodesCollection::getOwnPropertySlot):
2617         * khtml/ecma/kjs_events.cpp:
2618         (KJS::JSLazyEventListener::JSLazyEventListener):
2619         (KJS::ClipboardProtoFunc::callAsFunction):
2620         * khtml/ecma/kjs_html.cpp:
2621         (KJS::JSHTMLDocument::namedItemGetter):
2622         (KJS::JSHTMLElement::framesetNameGetter):
2623         (KJS::JSHTMLElement::getOwnPropertySlot):
2624         (KJS::JSHTMLElement::pushEventHandlerScope):
2625         (KJS::JSHTMLCollection::callAsFunction):
2626         (KJS::JSHTMLCollection::getNamedItems):
2627         (KJS::JSHTMLSelectCollection::put):
2628         * khtml/ecma/kjs_traversal.cpp:
2629         (KJS::JSNodeFilterCondition::acceptNode):
2630         * khtml/ecma/kjs_window.cpp:
2631         (KJS::Window::put):
2632         * kwq/KWQPageState.mm:
2633         (-[KWQPageState WebCore::]):
2634
2635 2006-04-01  Darin Adler  <darin@apple.com>
2636
2637         Reviewed by Eric.
2638
2639         - removed a bunch of unneeded ForwardingHeaders and WebCore+SVG headers
2640
2641         * ForwardingHeaders/kcanvas: Removed.
2642         * ForwardingHeaders/kcanvas/KCanvas.h: Removed.
2643         * ForwardingHeaders/kdom: Removed.
2644         * ForwardingHeaders/kdom/DOMString.h: Removed.
2645         * ForwardingHeaders/kdom/Helper.h: Removed.
2646         * ForwardingHeaders/kdom/KDOMSettings.h: Removed.
2647         * ForwardingHeaders/kdom/Namespace.h: Removed.
2648         * ForwardingHeaders/kdom/cache: Removed.
2649         * ForwardingHeaders/kdom/cache/KDOMCachedImage.h: Removed.
2650         * ForwardingHeaders/kdom/cache/KDOMCachedObject.h: Removed.
2651         * ForwardingHeaders/kdom/cache/KDOMCachedObjectClient.h: Removed.
2652         * ForwardingHeaders/kdom/cache/KDOMCachedScript.h: Removed.
2653         * ForwardingHeaders/kdom/cache/KDOMLoader.h: Removed.
2654         * ForwardingHeaders/kdom/core: Removed.
2655         * ForwardingHeaders/kdom/core/DOMConfiguration.h: Removed.
2656         * ForwardingHeaders/kdom/core/DOMException.h: Removed.
2657         * ForwardingHeaders/kdom/core/DOMList.h: Removed.
2658         * ForwardingHeaders/kdom/core/DOMString.h: Removed.
2659         * ForwardingHeaders/kdom/core/NamedAttrMap.h: Removed.
2660         * ForwardingHeaders/kdom/core/ProcessingInstruction.h: Removed.
2661         * ForwardingHeaders/kdom/core/domattrs.h: Removed.
2662         * ForwardingHeaders/kdom/ecma: Removed.
2663         * ForwardingHeaders/kdom/ecma/GlobalObject.h: Removed.
2664         * ForwardingHeaders/kdom/events: Removed.
2665         * ForwardingHeaders/kdom/events/Event.h: Removed.
2666         * ForwardingHeaders/kdom/events/EventListener.h: Removed.
2667         * ForwardingHeaders/kdom/events/EventTarget.h: Removed.
2668         * ForwardingHeaders/kdom/events/KeyboardEvent.h: Removed.
2669         * ForwardingHeaders/kdom/events/MouseEvent.h: Removed.
2670         * ForwardingHeaders/kdom/events/UIEvent.h: Removed.
2671         * ForwardingHeaders/kdom/events/kdomevents.h: Removed.
2672         * ForwardingHeaders/kdom/kdom.h: Removed.
2673         * ForwardingHeaders/kdom/parser: Removed.
2674         * ForwardingHeaders/kdom/parser/KDOMParser.h: Removed.
2675         * ForwardingHeaders/ksvg2: Removed.
2676         * ForwardingHeaders/ksvg2/KSVGPart.h: Removed.
2677         * ForwardingHeaders/ksvg2/KSVGView.h: Removed.
2678         * ForwardingHeaders/ksvg2/css: Removed.
2679         * ForwardingHeaders/ksvg2/css/CSSPropertyNames.h: Removed.
2680         * ForwardingHeaders/ksvg2/css/CSSValueKeywords.h: Removed.
2681         * WebCore+SVG/KDOMHeaders.h: Removed.
2682         * WebCore+SVG/Namespace.h: Removed.
2683         * WebCore+SVG/kdom.h: Removed.
2684
2685         * WebCore.xcodeproj/project.pbxproj: Removed headers.
2686
2687         * kcanvas/KCanvasCreator.cpp:
2688         * kcanvas/KCanvasResources.cpp:
2689         * kcanvas/KCanvasTreeDebug.cpp:
2690         * kcanvas/RenderPath.cpp:
2691         * kcanvas/RenderSVGImage.cpp:
2692         * kcanvas/device/quartz/KCanvasItemQuartz.mm:
2693         * kcanvas/device/quartz/KCanvasMaskerQuartz.mm:
2694         * kcanvas/device/quartz/KCanvasResourcesQuartz.mm:
2695         * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
2696         * ksvg2/css/SVGCSSStyleSelector.cpp:
2697         * ksvg2/events/SVGZoomEvent.h:
2698         * ksvg2/misc/KCanvasRenderingStyle.cpp:
2699         * ksvg2/misc/KSVGTimeScheduler.cpp:
2700         * ksvg2/misc/SVGImageLoader.cpp:
2701         * ksvg2/svg/SVGAElement.cpp:
2702         * ksvg2/svg/SVGAnimationElement.cpp:
2703         * ksvg2/svg/SVGCircleElement.cpp:
2704         * ksvg2/svg/SVGClipPathElement.cpp:
2705         * ksvg2/svg/SVGCursorElement.cpp:
2706         * ksvg2/svg/SVGCursorElement.h:
2707         * ksvg2/svg/SVGDOMImplementation.cpp:
2708         * ksvg2/svg/SVGDocument.cpp:
2709         * ksvg2/svg/SVGDocument.h:
2710         * ksvg2/svg/SVGElement.cpp:
2711         * ksvg2/svg/SVGEllipseElement.cpp:
2712         * ksvg2/svg/SVGExternalResourcesRequired.cpp:
2713         * ksvg2/svg/SVGExternalResourcesRequired.h:
2714         * ksvg2/svg/SVGFEBlendElement.cpp:
2715         * ksvg2/svg/SVGFEColorMatrixElement.cpp:
2716         * ksvg2/svg/SVGFEComponentTransferElement.cpp:
2717         * ksvg2/svg/SVGFECompositeElement.cpp:
2718         * ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
2719         * ksvg2/svg/SVGFEDisplacementMapElement.cpp:
2720         * ksvg2/svg/SVGFEFloodElement.cpp:
2721         * ksvg2/svg/SVGFEGaussianBlurElement.cpp:
2722         * ksvg2/svg/SVGFEImageElement.cpp:
2723         * ksvg2/svg/SVGFEImageElement.h:
2724         * ksvg2/svg/SVGFELightElement.cpp:
2725         * ksvg2/svg/SVGFEMergeElement.cpp:
2726         * ksvg2/svg/SVGFEOffsetElement.cpp:
2727         * ksvg2/svg/SVGFESpecularLightingElement.cpp:
2728         * ksvg2/svg/SVGFETileElement.cpp:
2729         * ksvg2/svg/SVGFETurbulenceElement.cpp:
2730         * ksvg2/svg/SVGFilterElement.cpp:
2731         * ksvg2/svg/SVGGradientElement.cpp:
2732         * ksvg2/svg/SVGHelper.cpp:
2733         * ksvg2/svg/SVGImageElement.cpp:
2734         * ksvg2/svg/SVGLangSpace.cpp:
2735         * ksvg2/svg/SVGLength.cpp:
2736         * ksvg2/svg/SVGLineElement.cpp:
2737         * ksvg2/svg/SVGLinearGradientElement.cpp:
2738         * ksvg2/svg/SVGList.h:
2739         * ksvg2/svg/SVGLocatable.cpp:
2740         * ksvg2/svg/SVGMarkerElement.cpp:
2741         * ksvg2/svg/SVGMarkerElement.h:
2742         * ksvg2/svg/SVGMaskElement.cpp:
2743         * ksvg2/svg/SVGPathElement.cpp:
2744         * ksvg2/svg/SVGPatternElement.cpp:
2745         * ksvg2/svg/SVGPolyElement.cpp:
2746         * ksvg2/svg/SVGPolygonElement.cpp:
2747         * ksvg2/svg/SVGPolylineElement.cpp:
2748         * ksvg2/svg/SVGRadialGradientElement.cpp:
2749         * ksvg2/svg/SVGRectElement.cpp:
2750         * ksvg2/svg/SVGSVGElement.cpp:
2751         * ksvg2/svg/SVGStopElement.cpp:
2752         * ksvg2/svg/SVGStyleElement.cpp:
2753         * ksvg2/svg/SVGStyledElement.cpp:
2754         * ksvg2/svg/SVGStyledLocatableElement.cpp:
2755         * ksvg2/svg/SVGStyledTransformableElement.cpp:
2756         * ksvg2/svg/SVGTextElement.cpp:
2757         * ksvg2/svg/SVGTransformable.cpp:
2758         * ksvg2/svg/SVGUseElement.cpp:
2759         * ksvg2/svg/SVGViewElement.cpp:
2760         Updated includes.
2761
2762 2006-04-01  Darin Adler  <darin@apple.com>
2763
2764         Reviewed by Maciej.
2765
2766         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8089
2767           REGRESSION: Caret position is off in native text field with text-align:right
2768
2769         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8082
2770           REGRESSION: Empty RTL text fields place the caret on the left side
2771
2772         Need a way to make a test for this. No obvious way at the moment.
2773
2774         * rendering/RenderFlow.cpp: (WebCore::RenderFlow::caretRect):
2775         Consider border, padding, and the width of the caret properly in the
2776         calculation of the caret's X position.
2777
2778         * rendering/RenderBox.cpp: (WebCore::RenderBox::caretRect):
2779         Fixed some similar issues and rewrote this function for clarity.
2780         However, I suspect this function was and remains broken and is almost
2781         never called.
2782
2783 2006-04-01  Darin Adler  <darin@apple.com>
2784
2785         Reviewed by Justin.
2786
2787         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8106
2788           REGRESSION (NativeTextField): New text fields don't scroll to the beginning when losing focus
2789
2790         Test: fast/forms/input-text-scroll-left-on-blur.html
2791
2792         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler): Pass blur events
2793         through to the RenderTextField, as well as mouse, drag, and wheel events.
2794         * rendering/RenderTextField.cpp: (WebCore::RenderTextField::forwardEvent): Scroll all the way to
2795         the left on a blur.
2796
2797         - unrelated small changes
2798
2799         * html/HTMLTextFieldInnerElement.cpp: Removed excess includes.
2800         (WebCore::HTMLTextFieldInnerElement::defaultEventHandler): Tweaked comments a bit.
2801
2802         * dom/Element.cpp:
2803         (WebCore::Element::scrollIntoView): Removed unneeded this-> before function call.
2804         (WebCore::Element::scrollIntoViewIfNeeded): Ditto.
2805
2806         * page/FrameView.cpp: (WebCore::FrameView::dispatchMouseEvent): Removed obsolete comment.
2807
2808 2006-03-31  Maciej Stachowiak  <mjs@apple.com>
2809
2810         Reviewed by Adele.
2811         
2812         <rdar://problem/4497684> REGRESSION(NativeTextField): After undoing pasted text in a field, the field changes to only a few pixels in height (8096)
2813
2814         * editing/ReplaceSelectionCommand.cpp:
2815         (WebCore::ReplaceSelectionCommand::doApply): merge into start block when pasting into
2816         an empty editable subtree.
2817
2818 2006-04-01  Darin Adler  <darin@apple.com>
2819
2820         Reviewed by Maciej.
2821
2822         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8063
2823           REGRESSION: double clicking in new text fields won't select whole words
2824
2825         Test: fast/forms/input-text-double-click.html
2826
2827         * editing/visible_units.cpp: (WebCore::nextBoundary): Set the end of the range by
2828         calling selectNodeContents rather than by calling setEndAfter. The problem with
2829         setEndAfter is that it doesn't do anything when the parent of the node is 0, and
2830         also it's not really what we want, since the boundary node is one with editable
2831         contents -- we want to stay inside the boundary node.
2832
2833         * editing/Selection.cpp: (WebCore::Selection::validate): Fix a tiny formatting glitch
2834         I noticed at the same time.
2835
2836 2006-03-31  John Sullivan  <sullivan@apple.com>
2837
2838         Reviewed by Tim Hatcher.
2839         
2840         - fixed <rdar://problem/4372842> 10.4.4 Regression: control-clicking on a misspelled word 
2841         doesn't select it or offer corrections (first click only)
2842
2843         * bridge/mac/FrameMac.mm:
2844         (WebCore::FrameMac::sendContextMenuEvent):
2845         Rolled in this one-line change that Hyatt wrote ages ago.
2846
2847 2006-03-31  Beth Dakin  <bdakin@apple.com>
2848
2849         Reviewed by John.
2850
2851         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8108
2852         REGRESSION (r13590-r13593): Floating table's cells don't paint 
2853         their background
2854
2855         This is a regression from my painting patch yesterday. Just a silly 
2856         error I didn't catch.
2857
2858         * rendering/RenderTable.cpp:
2859         (WebCore::RenderTable::paint): Change the phase of our new 
2860         PaintInfo, not our old one.
2861
2862 2006-03-31  Tim Omernick  <timo@apple.com>
2863
2864         Reviewed by Adele.
2865
2866         <http://bugzilla.opendarwin.org/show_bug.cgi?id=7858>
2867         <rdar://problem/4483359> REGRESSION: New text field doesn't recognize the read only attribute
2868         
2869         * rendering/RenderTextField.cpp:
2870         (WebCore::RenderTextField::createDivStyle):
2871         Set user modify based on the form element's readOnly().
2872         (WebCore::RenderTextField::updateFromElement):
2873         ditto
2874
2875 2006-03-31  Adele Peterson  <adele@apple.com>
2876
2877         Reviewed by Tim Omernick.
2878
2879         Updating shadowAncestorNode so it doesn't check for rootEditableElement.  Now we just walk
2880         up the tree to look for a shadowNode, and then we find the shadowParent.
2881
2882         * dom/Node.cpp: (WebCore::Node::shadowAncestorNode):
2883         * rendering/RenderTextField.cpp: (WebCore::RenderTextField::setSelectionRange):
2884          Updated assertion to check for shadowAncestorNode instead of rootEditableElement.
2885
2886 2006-03-31  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2887
2888         Reviewed by John Sullivan.
2889         
2890         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8101
2891           REGSRESSION: Fix for bug 7031 causes 30 layout tests to fail
2892
2893         * rendering/render_line.cpp:
2894         (WebCore::InlineFlowBox::placeBoxesVertically): Change top and bottom positions
2895         only if childAffectsTopBottomPos is true.
2896         * rendering/RenderFlow.cpp:
2897         (WebCore::RenderFlow::paintLines): Redo a part of the patch for bug 7031 that
2898         wasn't committed with the rest of the patch.
2899
2900 2006-03-31  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2901
2902         Reviewed by Darin, landed by Beth.
2903
2904         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8081
2905         REGRESSION: Drop-down menu has gap at top
2906
2907         * rendering/RenderBox.cpp:
2908         (WebCore::RenderBox::calcAbsoluteVerticalValues): When calculating 
2909         the hypothetical vertical position in normal flow, skip table rows 
2910         in the ancestor chain, since a table cell's Y position is relative 
2911         to the table section, not the row.
2912
2913 2006-03-31  Dave Hyatt <hyatt@apple.com>
2914
2915         Fix the border drawing for themes on Win32.
2916
2917         Reviewed by adele
2918
2919         * rendering/RenderBox.cpp:
2920         (WebCore::RenderBox::paintBoxDecorations):
2921         * rendering/RenderTheme.cpp:
2922         (WebCore::RenderTheme::paintBorderOnly):
2923         * rendering/RenderTheme.h:
2924
2925 2006-03-31  Darin Adler  <darin@apple.com>
2926
2927         Reviewed by John Sullivan.
2928
2929         * khtml/ecma/kjs_binding.cpp: Added names for VALIDATION_ERR and
2930         TYPE_MISMATCH_ERR; new DOM Level 3 errors that need to be listed in
2931         the mapping from error code to error name.
2932
2933         * dom/Element.idl: Removed comment from bad old days where we had to
2934         touch these files to make them rebuild.
2935
2936 2006-03-30  Maciej Stachowiak  <mjs@apple.com>
2937
2938         - fixed Windows build breakage from previous change
2939
2940         * platform/ScrollView.h:
2941         * platform/win/FontWin.cpp:
2942         (WebCore::Font::drawLineForText):
2943         * platform/win/ScrollViewWin.cpp:
2944         (WebCore::ScrollView::scrollOffset):
2945         (WebCore::ScrollView::scrollBy):
2946
2947 2006-03-30  Maciej Stachowiak  <mjs@apple.com>
2948
2949         Reviewed by Eric.
2950         
2951         - various Point / Size related cleanup
2952         
2953         First, I clarified the semantics of some operations to keep a
2954         better distinction between IntPoint and IntSize:
2955         
2956         * platform/IntPoint.h:
2957         (WebCore::IntPoint::move): new convenience to move a point by separate
2958         x and y deltas.
2959         (WebCore::operator+=): You can't add a point to a point, you can only add
2960         a size to a point.
2961         (WebCore::operator+): ditto
2962         (WebCore::operator-): point - point = size; point - size = point
2963         (WebCore::operator-=): only allow subtracting a size for the mutating version
2964         * platform/IntRect.h:
2965         (WebCore::IntRect::move): tweaked to use IntPoint::move, also, move by an IntSize,
2966         not an IntPoint.
2967         * platform/IntSize.h:
2968         (WebCore::IntSize::shrunkTo): analog to expandedTo
2969         (WebCore::IntSize::clampNegativeToZero): a handy helper
2970         (WebCore::operator-): Added unary minus operator
2971
2972         Made the same changes for FloatPoint:
2973         
2974         * platform/FloatPoint.h:
2975         (WebCore::FloatPoint::move):
2976         (WebCore::operator+=):
2977         (WebCore::operator-=):
2978         (WebCore::operator+):
2979         (WebCore::operator-):
2980         * platform/FloatRect.h:
2981         (WebCore::FloatRect::move):
2982         * platform/FloatSize.h:
2983         (WebCore::operator-):
2984
2985         Then I changed a bunch of stuff to pass around IntPoint instead of separate x and y
2986         coordinates. The main one was:
2987         
2988         * platform/ScrollView.h:
2989         * platform/mac/ScrollViewMac.mm:
2990         (WebCore::ScrollView::scrollOffset): new method, return an IntSize
2991         (WebCore::ScrollView::contentsToViewport): take and return an IntPoint
2992         (WebCore::ScrollView::viewportToContents): take and return an IntPoint
2993         * platform/win/ScrollViewWin.cpp:
2994         (WebCore::ScrollView::updateContents): handle things in terms of scrollOffset,
2995         not scrollPoint
2996         (WebCore::ScrollView::visibleContentRect):
2997         (WebCore::ScrollView::contentsX):
2998         (WebCore::ScrollView::contentsY):
2999         (WebCore::ScrollView::viewportToContents):
3000         (WebCore::ScrollView::contentsToViewport):
3001         (WebCore::scrollOffset):
3002         (WebCore::ScrollView::maximumScroll):
3003         (WebCore::ScrollView::scrollBy):
3004         (WebCore::ScrollView::updateScrollBars):
3005
3006         The rest is mainly updates for these changes.
3007
3008         * bridge/mac/FrameMac.h:
3009         * bridge/mac/FrameMac.mm:
3010         (WebCore::FrameMac::eventMayStartDrag):
3011         (WebCore::FrameMac::dragHysteresisExceeded):
3012         (WebCore::FrameMac::handleMouseMoveEvent):
3013         (WebCore::FrameMac::mouseDown):
3014         (WebCore::FrameMac::shouldDragAutoNode):
3015         (WebCore::FrameMac::sendContextMenuEvent):
3016         * bridge/mac/WebCoreFrameBridge.mm:
3017         (-[WebCoreFrameBridge isPointInsideSelection:]):
3018         * dom/EventTargetNode.cpp:
3019         (WebCore::EventTargetNode::dispatchMouseEvent):
3020         (WebCore::EventTargetNode::dispatchWheelEvent):
3021         * khtml/ecma/kjs_window.cpp:
3022         (KJS::WindowFunc::callAsFunction):
3023         * page/Frame.cpp:
3024         (WebCore::Frame::shouldDragAutoNode):
3025         (WebCore::Frame::isPointInsideSelection):
3026         (WebCore::Frame::selectClosestWordFromMouseEvent):
3027         (WebCore::Frame::handleMousePressEventDoubleClick):
3028         (WebCore::Frame::handleMousePressEventTripleClick):
3029         (WebCore::Frame::handleMousePressEventSingleClick):
3030         (WebCore::Frame::handleMouseMoveEventPart2):
3031         (WebCore::Frame::handleMouseReleaseEvent):
3032         * page/Frame.h:
3033         * page/FrameView.cpp:
3034         (WebCore::FrameView::dispatchDragEvent):
3035         (WebCore::FrameView::prepareMouseEvent):
3036         (WebCore::FrameView::handleWheelEvent):
3037         * rendering/RenderLayer.cpp:
3038         (WebCore::RenderLayer::scrollRectToVisible):
3039         * rendering/RenderObject.cpp:
3040         (WebCore::RenderObject::draggableNode):
3041         * rendering/RenderObject.h:
3042         (WebCore::RenderObject::positionForPoint):
3043         * rendering/render_list.cpp:
3044         (WebCore::RenderListMarker::paint):
3045
3046 2006-03-30  Maciej Stachowiak  <mjs@apple.com>
3047
3048         - fixed windows build
3049
3050         * platform/win/TemporaryLinkStubs.cpp:
3051         (Widget::unlockDrawingFocus):
3052
3053 2006-03-31  Eric Seidel  <eseidel@apple.com>
3054
3055         Reviewed by mjs.
3056
3057         A bit more code cleanup.
3058
3059         * bridge/mac/WebCoreScriptDebugger.mm:
3060         (-[WebCoreScriptCallFrame evaluateWebScript:]):
3061         * html/HTMLFormElement.cpp:
3062         (WebCore::HTMLFormElement::submit):
3063         * html/HTMLInputElement.cpp:
3064         (WebCore::HTMLInputElement::setValue):
3065         * kwq/WebCoreTextField.mm:
3066         (-[KWQTextFieldController textView:shouldHandleEvent:]):
3067         (-[KWQSecureTextField selectText:]):
3068         * page/Frame.cpp:
3069         (WebCore::Frame::submitForm):
3070         * platform/Widget.h:
3071         * platform/mac/WidgetMac.mm:
3072         * rendering/render_frames.cpp:
3073         (WebCore::RenderFrameSet::userResize):
3074
3075 2006-03-30  Maciej Stachowiak  <mjs@apple.com>
3076
3077         Reviewed by Eric.
3078
3079         * bridge/mac/FrameMac.mm:
3080         (WebCore::FrameMac::wheelEvent):
3081         (WebCore::FrameMac::eventMayStartDrag):
3082         (WebCore::FrameMac::handleMouseMoveEvent):
3083         (WebCore::FrameMac::sendContextMenuEvent):
3084         * bridge/mac/WebCoreFrameBridge.mm:
3085         (-[WebCoreFrameBridge RenderObject::nodeInfoAtPoint:allowShadowContent:]):
3086         * dom/Document.cpp:
3087         (WebCore::Document::elementFromPoint):
3088         (WebCore::Document::prepareMouseEvent):
3089         * dom/Document.h:
3090         * kwq/WebCoreAXObject.mm:
3091         (-[WebCoreAXObject doAXTextMarkerForPosition:]):
3092         (-[WebCoreAXObject accessibilityHitTest:]):
3093         * manual-tests/frame-hover.html: Added.
3094         * manual-tests/resources/hover-subframe-1.html: Added.
3095         * manual-tests/resources/hover-subframe-2.html: Added.
3096         * page/Frame.cpp:
3097         (WebCore::Frame::isPointInsideSelection):
3098         * page/FrameView.cpp:
3099         (WebCore::FrameView::prepareMouseEvent):
3100         (WebCore::FrameView::handleWheelEvent):
3101         * platform/IntRect.h:
3102         (WebCore::IntRect::contains):
3103         * rendering/RenderLayer.cpp:
3104         (WebCore::isSubframeCanvas):
3105         (WebCore::frameVisibleRect):
3106         (WebCore::RenderLayer::hitTest):
3107         (WebCore::shouldApplyImplicitCapture):
3108         (WebCore::RenderLayer::hitTestLayer):
3109         * rendering/RenderLayer.h:
3110
3111 2006-03-30  Mitz Pettel  <opendarwin.org@mitzpettel.com>
3112
3113         Tests: fast/repaint/flexible-box-overflow.html fast/repaint/flexible-box-overflow-horizontal.html
3114
3115         Reviewed by Darin.
3116         
3117         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8056
3118           Flexible boxes do not repaint their top, left and children's overflows
3119
3120         * rendering/RenderBlock.cpp:
3121         (WebCore::RenderBlock::layoutBlockChildren):
3122         * rendering/RenderFlexibleBox.cpp:
3123         (WebCore::FlexBoxIterator::next):
3124         (WebCore::RenderFlexibleBox::layoutHorizontalBox): Update top overflow when
3125         determining vertical positions. Update horizontal overflows after horizontal
3126         positions are determined.
3127         (WebCore::RenderFlexibleBox::layoutVerticalBox):  Update left overflow when
3128         determining horizontal positions. Update vertical overflows after vertical
3129         positions are determined.
3130         (WebCore::RenderFlexibleBox::allowedChildFlex):
3131
3132 2006-03-30  Mitz Pettel  <opendarwin.org@mitzpettel.com>
3133
3134         Tests: fast/repaint/text-shadow.html fast/repaint/text-shadow-horizontal.html
3135
3136         Reviewed by Darin.
3137
3138         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7301
3139           Text shadow does not repaint correctly
3140
3141         * rendering/InlineTextBox.cpp:
3142         (WebCore::InlineTextBox::paint): Paint the text box if it is within the maximum
3143         possible horizontal shadow overflow of the damage rect.
3144         * rendering/InlineTextBox.h: Removed unused function checkVerticalPoint().
3145         * rendering/RenderFlow.cpp:
3146         (WebCore::RenderFlow::paintLines): Use the vertical overflows instead of the
3147         selection vertical bounds.
3148         (WebCore::RenderFlow::hitTestLines):
3149         * rendering/render_line.cpp:
3150         (WebCore::InlineFlowBox::placeBoxesHorizontally): Include overflow due to text shadow
3151         in leftPosition and rightPosition and keep track of the maximum horizontal shadow
3152         on the inline.
3153         (WebCore::InlineFlowBox::verticallyAlignBoxes):
3154         (WebCore::InlineFlowBox::placeBoxesVertically): Include overflow due to shadow and
3155         inline-blocks' overflow in topPosition and bottomPosition but not in the selection
3156         vertical bounds.
3157         (WebCore::RootInlineBox::selectionTop):
3158         * rendering/render_line.h:
3159         (WebCore::InlineFlowBox:::InlineRunBox):
3160         (WebCore::InlineFlowBox::setVerticalSelectionPositions):
3161         (WebCore::InlineFlowBox::maxHorizontalShadow):
3162         (WebCore::RootInlineBox::setVerticalSelectionPositions):
3163         (WebCore::RootInlineBox::selectionBottom):
3164         (WebCore::RootInlineBox::selectionHeight):
3165
3166 2006-03-30  Beth Dakin  <bdakin@apple.com>
3167
3168         Reviewed by Hyatt.
3169
3170         Fix for <rdar://problem/4472371> REGRESSION(417.9-TOT): Focus ring 
3171         around link in overflow:auto div isn't clipped to div
3172
3173         Focus rings around the children off overflow:auto divs were not 
3174         being appropriately clipped because they were being painted with 
3175         the div's outlineRect, when they should be painted separately. This 
3176         patch adds two new PaintPhases -- PaintPhaseSelfOutline and 
3177         PaintPhaseChildOutlines -- to address this problem.
3178
3179         This patch also changes the name of PaintAction back to PaintPhase. 
3180         Because Hyatt said so.
3181
3182         * kcanvas/KCanvasResources.cpp:
3183         (WebCore::KCanvasMarker::draw):
3184         * kcanvas/RenderPath.cpp:
3185         (WebCore::RenderPath::paint):
3186         * kcanvas/RenderSVGImage.cpp:
3187         (WebCore::RenderSVGImage::paint):
3188         * kcanvas/device/quartz/KCanvasResourcesQuartz.mm:
3189         (WebCore::KCanvasContainerQuartz::paint):
3190         * ksvg2/svg/SVGMaskElement.cpp:
3191         (WebCore::SVGMaskElement::drawMaskerContent):
3192         * ksvg2/svg/SVGPatternElement.cpp:
3193         (WebCore::SVGPatternElement::drawPatternContentIntoTile):
3194         * rendering/InlineTextBox.cpp:
3195         (WebCore::InlineTextBox::paint):
3196         * rendering/RenderBlock.cpp:
3197         (WebCore::RenderBlock::paint):
3198         (WebCore::RenderBlock::paintChildren):
3199         (WebCore::RenderBlock::paintObject):
3200         (WebCore::RenderBlock::paintFloats):
3201         (WebCore::RenderBlock::paintEllipsisBoxes):
3202         (WebCore::RenderBlock::paintSelection):
3203         * rendering/RenderBox.cpp:
3204         (WebCore::RenderBox::setStyle):
3205         * rendering/RenderCanvas.cpp:
3206         (WebCore::RenderCanvas::paint):
3207         * rendering/RenderFlow.cpp:
3208         (WebCore::RenderFlow::paintLines):
3209         * rendering/RenderHTMLCanvas.cpp:
3210         (WebCore::RenderHTMLCanvas::paint):
3211         * rendering/RenderImage.cpp:
3212         (WebCore::RenderImage::paint):
3213         * rendering/RenderLayer.cpp:
3214         (WebCore::RenderLayer::paintLayer):
3215         * rendering/RenderObject.cpp:
3216         (WebCore::RenderObject::maximalOutlineSize):
3217         * rendering/RenderObject.h:
3218         (WebCore::):
3219         (WebCore::RenderObject::PaintInfo::PaintInfo):
3220         * rendering/RenderTable.cpp:
3221         (WebCore::RenderTable::paint):
3222         * rendering/RenderTableCell.cpp:
3223         (WebCore::RenderTableCell::paint):
3224         * rendering/RenderTableRow.cpp:
3225         (WebCore::RenderTableRow::paint):
3226         * rendering/RenderTableSection.cpp:
3227         (WebCore::RenderTableSection::paint):
3228         * rendering/render_button.cpp:
3229         (WebCore::RenderButton::paintObject):
3230         * rendering/render_line.cpp:
3231         (WebCore::InlineBox::paint):
3232         (WebCore::InlineFlowBox::paint):
3233         (WebCore::InlineFlowBox::paintBackgroundAndBorder):
3234         (WebCore::RootInlineBox::paintEllipsisBox):
3235         * rendering/render_list.cpp:
3236         (WebCore::RenderListMarker::paint):
3237         * rendering/render_replaced.cpp:
3238         (WebCore::RenderReplaced::shouldPaint):
3239         (WebCore::RenderWidget::paint):
3240
3241 2006-03-30  Tim Omernick  <timo@apple.com>
3242
3243         Manual test case for the Java aspect of <rdar://problem/4212626> REGRESSION: LIVECONNECT:
3244         JavaScript type for Java Strings is function, not object
3245
3246         * manual-tests/java-string-object-type.html: Added.
3247         * manual-tests/resources/StringTypeTest.class: Added.
3248         * manual-tests/resources/StringTypeTest.java: Added.
3249
3250 2006-03-30  Eric Seidel  <eseidel@apple.com>
3251
3252         Reviewed by hyatt.
3253
3254         Fix text form controls, and add basic submit support!
3255
3256         * bridge/win/FrameWin.cpp:
3257         (WebCore::FrameWin::submitForm):
3258         * bridge/win/FrameWin.h:
3259         * platform/win/KeyEventWin.cpp:
3260         (WebCore::keyIdentifierForWindowsKeyCode):
3261         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
3262         * platform/win/TemporaryLinkStubs.cpp:
3263         (FrameWin::incomingReferrer):
3264         * platform/win/TransferJobWin.cpp:
3265         (WebCore::TransferJob::start):
3266
3267 2006-03-30  Adele Peterson  <adele@apple.com>
3268
3269         Reviewed by Justin.
3270
3271         - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8083
3272         REGRESSION: Repro crash when dragging to select over a new text field
3273
3274         * editing/Selection.cpp: (WebCore::Selection::adjustForEditableContent):
3275         When searching for non-editable content, if the end of the selection is in a 
3276         shadow tree, then we need to jump out of that first.
3277
3278 2006-03-30  Justin Garcia  <justin.garcia@apple.com>
3279
3280         Reviewed by darin
3281         
3282         http://bugzilla.opendarwin.org/show_bug.cgi?id=6989
3283         REGRESSION: Plain-text mode needed for contenteditable area used in new text field
3284
3285         * bridge/mac/WebCoreFrameBridge.h:
3286         * bridge/mac/WebCoreFrameBridge.mm:
3287         (-[WebCoreFrameBridge isSelectionEditable]):
3288         (-[WebCoreFrameBridge isSelectionRichlyEditable]):
3289         * css/CSSComputedStyleDeclaration.cpp:
3290         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3291         * css/CSSValueKeywords.in:
3292         * css/cssparser.cpp:
3293         (WebCore::CSSParser::parseValue):
3294         * dom/Node.cpp:
3295         (WebCore::Node::isContentRichlyEditable):
3296         * dom/Node.h:
3297         * editing/EditCommand.cpp:
3298         (WebCore::EditCommand::apply):
3299         * editing/JSEditor.cpp:
3300         * editing/ReplaceSelectionCommand.cpp:
3301         (WebCore::ReplacementFragment::ReplacementFragment):
3302         (WebCore::ReplaceSelectionCommand::doApply):
3303         * editing/Selection.h:
3304         (WebCore::Selection::rootEditableElement):
3305         (WebCore::Selection::isContentEditable):
3306         (WebCore::Selection::isContentRichlyEditable):
3307         * editing/SelectionController.h:
3308         (WebCore::SelectionController::rootEditableElement):
3309         (WebCore::SelectionController::isContentEditable):
3310         (WebCore::SelectionController::isContentRichlyEditable):
3311         * html/HTMLElement.cpp:
3312         (WebCore::HTMLElement::isContentEditable):
3313         (WebCore::HTMLElement::contentEditable):
3314         (WebCore::HTMLElement::setContentEditable):
3315         * rendering/RenderTextField.cpp:
3316         (WebCore::RenderTextField::createDivStyle):
3317         * rendering/render_style.h:
3318         (WebCore::):
3319         
3320 2006-03-30  David Harrison  <harrison@apple.com>
3321
3322         Reviewed by Justin.
3323
3324         <rdar://problem/4444693> REGRESSION: Deleting empty lines causes quoted text to mistakenly get "unquoted"
3325
3326         * editing/DeleteSelectionCommand.cpp:
3327         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
3328         Formatting.
3329         (WebCore::DeleteSelectionCommand::moveNodesAfterNode):
3330         Generalize check that preserves nesting when deleting to the beginning of an ancestor block.
3331
3332         * editing/deleting/delete-block-merge-contents-022.html: Added.
3333         * editing/deleting/delete-block-merge-contents-023.html: Added.
3334         * editing/deleting/delete-block-merge-contents-024.html: Added.
3335
3336 2006-03-30  Mitz Pettel  <opendarwin.org@mitzpettel.com>
3337
3338         Reviewed by Darin.
3339
3340         - Test for http://bugzilla.opendarwin.org/show_bug.cgi?id=8076
3341           REGRESSION: native text fields are reversed on "visual Hebrew" pages
3342
3343         * fast/forms/visual-hebrew-text-field-expected.checksum: Added.
3344         * fast/forms/visual-hebrew-text-field-expected.png: Added.
3345         * fast/forms/visual-hebrew-text-field-expected.txt: Added.
3346         * fast/forms/visual-hebrew-text-field.html: Added.
3347
3348 2006-03-30  Alexey Proskuryakov  <ap@nypop.com>
3349
3350         Reviewed by John Sullivan.
3351
3352         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8051
3353           Empty forms are submitted incorrectly
3354
3355         Test: fast/forms/empty-get.html
3356
3357         * platform/KURL.cpp:
3358         (KURL::setQuery): Add a question mark for empty query strings, too.
3359
3360 2006-03-30  Dave Hyatt <hyatt@apple.com>
3361
3362         Roll out the fix to 7102 and reopen it to get Spinneret working
3363         again.
3364
3365         Reviewed by justin
3366
3367         * page/Frame.cpp:
3368         (WebCore::Frame::didOpenURL):
3369         (WebCore::Frame::receivedFirstData):
3370         (WebCore::Frame::begin):
3371
3372 2006-03-30  Dave Hyatt <hyatt@apple.com>
3373
3374         Land support for JPEG image decoding on Win32.
3375
3376         * WebCore.vcproj/WebCore/WebCore.vcproj:
3377         * platform/cairo/ImageSourceCairo.cpp:
3378         (WebCore::createDecoder):
3379         (WebCore::ImageSource::frameHasAlphaAtIndex):
3380         * platform/image-decoders/ImageDecoder.h:
3381         (WebCore::RGBA32Buffer::setRGBA):
3382         (WebCore::ImageDecoder::supportsAlpha):
3383         * platform/image-decoders/gif/GIFImageDecoder.cpp:
3384         (WebCore::GIFImageDecoder::haveDecodedRow):
3385         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
3386         (WebCore::JPEGImageReader::JPEGImageReader):
3387         (WebCore::JPEGImageReader::close):
3388         (WebCore::JPEGImageReader::skipBytes):
3389         (WebCore::JPEGImageReader::decode):
3390         (WebCore::JPEGImageReader::info):
3391         (WebCore::JPEGImageReader::samples):
3392         (WebCore::JPEGImageReader::decoder):
3393         (WebCore::error_exit):
3394         (WebCore::init_source):
3395         (WebCore::skip_input_data):
3396         (WebCore::fill_input_buffer):
3397         (WebCore::term_source):
3398         (WebCore::JPEGImageDecoder::decode):
3399         (WebCore::JPEGImageDecoder::outputScanlines):
3400         (WebCore::JPEGImageDecoder::jpegComplete):
3401         * platform/image-decoders/jpeg/JPEGImageDecoder.h:
3402         (WebCore::JPEGImageDecoder::supportsAlpha):
3403         (WebCore::JPEGImageDecoder::setSize):
3404         * platform/image-decoders/png/PNGImageDecoder.cpp:
3405         (WebCore::PNGImageDecoder::rowAvailable):
3406
3407 2006-03-29  Justin Garcia  <justin.garcia@apple.com>
3408
3409         Reviewed by darin
3410         
3411         <http://bugzilla.opendarwin.org/show_bug.cgi?id=8067>
3412         REGRESSION: selectionRect includes next/previous replaced elements
3413         Also fixes: <rdar://problems/4402375&4474871&4492934>
3414         
3415         In the case where a selection starts at the end or ends at the start
3416         of o, o->selectionState() != SelectionNone, but o isn't really selected.  
3417         Constraining the selection with upstream and downstream eliminates these
3418         types of endpoints, but constraining endpoints that occur at the 
3419         start or end of a paragraph creates positions inside containers - some 
3420         of which the selection painting code isn't equipped to handle.
3421
3422         * dom/Document.cpp:
3423         (WebCore::Document::updateSelection):
3424         * rendering/render_replaced.cpp:
3425         (WebCore::RenderReplaced::shouldPaint):
3426         (WebCore::RenderReplaced::selectionRect):
3427         (WebCore::RenderReplaced::setSelectionState):
3428         (WebCore::RenderWidget::setSelectionState):
3429
3430 2006-03-29  Adele Peterson  <adele@apple.com>
3431
3432         Reviewed by Hyatt.
3433
3434         - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=6986
3435         Switch to use new text field implementation for <input type="text">
3436
3437         * css/html4.css: Added default style info for new text fields.
3438         * rendering/RenderTextField.cpp:
3439         (WebCore::RenderTextField::createDivStyle): Added an extra 1px of padding on the left & right to match Win IE & the latest Mozilla.
3440         (WebCore::RenderTextField::updateFromElement): Removed some outdated comments.  Cleaned up the way we add text nodes to the div.
3441         (WebCore::RenderTextField::setSelectionStart): Tweaked selection code to better match Mozilla behavior.
3442         (WebCore::RenderTextField::setSelectionEnd): ditto.
3443         (WebCore::RenderTextField::select): Cleaned this up by having it call setSelectionRange.
3444         (WebCore::RenderTextField::setSelectionRange): Calls updateLayout now in case this is called in an onload handler, and no other layout has occurred.
3445         (WebCore::RenderTextField::calcMinMaxWidth): Use floatWidth to calculate the width of the "0" character.
3446         * rendering/RenderTheme.cpp: (WebCore::RenderTheme::isControlStyled): If the text field's specified border is different from 
3447          the default border, then treat the control as styled, so the engine knows to turn off the aqua appearance.
3448         * rendering/RenderThemeMac.mm:
3449         (WebCore::RenderThemeMac::paintTextField): return false so the engine knows not to try to draw the border.
3450         (WebCore::RenderThemeMac::adjustTextFieldStyle): text field style info has been moved to html4.css. 
3451          We also add intrinsic margins here if the font size is large enough.
3452         * html/HTMLTextFieldInnerElement.cpp: (WebCore::HTMLTextFieldInnerElement::defaultEventHandler):
3453          No longer check for appearance. All text fields with m_type == TEXT will use the new implementation.
3454         * html/HTMLInputElement.cpp:
3455         (WebCore::HTMLInputElement::isKeyboardFocusable): ditto.
3456         (WebCore::HTMLInputElement::focus): ditto.
3457         (WebCore::HTMLInputElement::selectionStart): ditto.
3458         (WebCore::HTMLInputElement::selectionEnd): ditto.
3459         (WebCore::HTMLInputElement::setSelectionStart): ditto.
3460         (WebCore::HTMLInputElement::setSelectionEnd): ditto.
3461         (WebCore::HTMLInputElement::select): ditto.
3462         (WebCore::HTMLInputElement::setSelectionRange): ditto.
3463         (WebCore::HTMLInputElement::createRenderer): ditto.
3464         (WebCore::HTMLInputElement::defaultEventHandler): ditto.
3465         (WebCore::HTMLInputElement::isMouseFocusable): Added.  Old text fields relied on the widget to provide a focus policy.  
3466          A text field that is focusable should be mouse focusable, and shouldn't need to ask the base class.
3467         * html/HTMLInputElement.h: Added isMouseFocusable.
3468         * html/HTMLGenericFormElement.cpp: (WebCore::HTMLGenericFormElement::isMouseFocusable):
3469          Removed specific text field code since that is now done in HTMLInputElement::isMouseFocusable.
3470         * dom/Document.cpp: (WebCore::Document::clearSelectionIfNeeded): Check that the new selection is does not have a shadowAncestorNode that is focused.
3471
3472 2006-03-29  Darin Adler  <darin@apple.com>
3473
3474         Reviewed by Eric.
3475
3476         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8026
3477           A particular animated SVG crashes in filter code
3478           <rdar://problem/4494775> A particular animated SVG crashes in filter code
3479
3480         - fix some code that is not handling references correctly for GC
3481
3482         Test: svg/custom/empty-merge.svg
3483
3484         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
3485         (WebCore::KCanvasFilterQuartz::KCanvasFilterQuartz): Use KWQRetainNSRelease to
3486         properly retain a reference to an Objective-C object in a C++ class.
3487         (WebCore::KCanvasFilterQuartz::~KCanvasFilterQuartz): Use KWQRelease instead of
3488         release.
3489         (WebCore::KCanvasFilterQuartz::prepareFilter): Use KWQRetain instead of retain.
3490         (WebCore::KCanvasFilterQuartz::applyFilter): Use KWQRelease instead of release.
3491         (WebCore::KCanvasFilterQuartz::imageForName): Use objectForKey: instead of
3492         valueForKey: on the dictionary to sidestep a bug in valueForKey: on empty strings
3493         and because what we're doing wit