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