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