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