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