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