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