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