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