cb3bd97525342ad49fc200e2a947d25b1fec098d
[WebKit-https.git] / WebCore / ChangeLog
1 2006-07-29  Mike Emmel  <mike.emmel@gmail.com>
2
3         Reviewed and tweaked by Darin.
4
5         - fixes for Linux build
6           (still might not compile, since Darin tweaked but was unable to test).
7
8         * WebCoreSources.bkl: Added some new sources, removed some obsolete ones.
9         * Projects/gdk/webcore-gdk.bkl: Added RenderPopupMenuGdk.cpp
10
11         * html/HTMLPlugInElement.h: Removed incorrect syntax with class name
12         before ::.
13
14         * platform/gdk/FrameGdk.h:
15         * platform/gdk/FrameGdk.cpp: Updated parameters of constructor. Moved a couple stubs
16         out of this file.
17         * platform/gdk/RenderPopupMenuGdk.h: Added.
18         * platform/gdk/RenderPopupMenuGdk.cpp: Added. Just a file full of empty stubs.
19         * platform/gdk/RenderThemeGdk.h:
20         * platform/gdk/RenderThemeGdk.cpp: (WebCore::RenderThemeGdk::createPopupMenu): Added.
21
22         * platform/gdk/TemporaryLinkStubs.cpp: Add some new stubs.
23
24 2006-07-29  Mark Rowe  <opendarwin.org@bdash.net.nz>
25
26         Reviewed by Darin.
27
28         http://bugzilla.opendarwin.org/show_bug.cgi?id=10022
29         Bug 10022: REGRESSION: Crash in WebCore::XMLTokenizer::characters
30
31         * dom/XMLTokenizer.cpp:
32         (WebCore::XMLTokenizer::resumeParsing): If the write() call resulted in new callbacks being
33         added, don't call through to end() just yet.
34
35 2006-07-29  Mitz Pettel  <opendarwin.org@mitzpettel.com>
36
37         Reviewed by John Sullivan.
38
39         - manual test for http://bugzilla.opendarwin.org/show_bug.cgi?id=9984
40           ASSERTION FAILURE: _private->mouseDownEvent != nil
41           (WebKit/WebView/WebHTMLView.m:4863 -[WebHTMLView(WebInternal) _delegateDragSourceActionMask])
42
43         * manual-tests/subview-click-assertion.html: Added.
44
45 2006-07-29  Andrew Wellington  <proton@wiretapped.net>
46
47         Reviewed by Darin.
48
49         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8587 / <rdar://problem/4631844>
50         REGRESSION: {display:list-item} items outside an ol or ul element don't number correctly
51
52         * rendering/RenderListItem.cpp:
53         (WebCore::enclosingList): If no real list element is found, use parent instead.
54         (WebCore::previousListItem): Check list elements to see if they are list items -- the
55         old code assumed that a list would never be a list item but this is entirely possible
56         with CSS and especially with the new rule that means any DOM element could act as a list.
57
58 2006-07-29  Alexey Proskuryakov  <ap@nypop.com>
59
60         Reviewed by Darin.
61
62         Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10147
63         REGRESSION: custom attribute values set via javascript are not persistent
64
65         Test: fast/dom/Element/setAttribute-case-insensitivity.html
66
67         * dom/Element.cpp:
68         (WebCore::Element::setAttribute): Use the lowercased localName for retrieving the old value, too.
69
70 2006-07-28  Timothy Hatcher  <timothy@apple.com>
71
72         Suggested by Darin.
73
74         Moving the implementation of isContentEditable to the
75         the WebPrivate category.
76
77         * bindings/objc/DOM.mm:
78         (-[DOMNode isContentEditable]):
79
80 2006-07-28  Justin Garcia  <justin.garcia@apple.com>
81
82         Reviewed by levi
83         
84         First part of:
85         <rdar://problem/4515463>
86         REGRESSION: Blot and Mail both do a very poor job of pasting the main www.apple.com page
87         
88         Migrate to isBlock and enclosingBlock.
89         Changed RendereringInfo::isBlock and ReplacementFragment::isBlock
90         to wasBlock so that they don't conflict with isBlock and because
91         it's more descriptive.
92
93         * editing/ReplaceSelectionCommand.cpp:
94         (WebCore::ReplacementFragment::mergeStartNode):
95         (WebCore::ReplacementFragment::wasBlock):
96         (WebCore::ReplacementFragment::saveRenderingInfo):
97         (WebCore::ReplacementFragment::renderedBlocks):
98         (WebCore::RenderingInfo::RenderingInfo):
99         (WebCore::ReplaceSelectionCommand::shouldMergeStart):
100         (WebCore::ReplaceSelectionCommand::doApply):
101         * editing/ReplaceSelectionCommand.h:
102         (WebCore::RenderingInfo::wasBlock):
103
104 2006-07-27  Justin Garcia  <justin.garcia@apple.com>
105
106         Reviewed by levi
107         
108         More changes for:
109         <rdar://problem/4242293>
110         Poor paste fidelity of http://www.google.com/
111
112         * editing/markup.cpp:
113         (WebCore::needInterchangeNewlineAfter): Added.
114         (WebCore::createMarkup): 
115         Only add an interchangeNewline if we're annotating for interchange.  Can't test 
116         this until we expose createMarkup in non-annotate mode (I'd expose Range::toHTML).
117         Remove the FIXME about prepending the interchangeNewline before creating the rest 
118         of the markup.  Its correct to surround the interchangeNewline in ancestors of the
119         adjusted startNode.
120         Fixed the check to see if an interchangeNewline is needed (!inSameBlock).  This would
121         add an interchangeNewline for a selection that started before a table.
122         Removed the workaround for the bug where markup for a table was not included when 
123         selecting the contents of a table, since this change fixes the general problem of 
124         markup for ancestors of the startNode being left out.
125         Don't leave out ancestors of the startNode as we leave their subtrees.  Execute the
126         code to include them even if we closed ancestors in the ancestorsToClose list.
127
128 2006-07-28  Timothy Hatcher  <timothy@apple.com>
129
130         Reviewed by John.
131
132         Adding isContentEditable to DOMNode's private category. 
133
134         * bindings/objc/DOMPrivate.h:
135
136 2006-07-28  Alexey Proskuryakov  <ap@nypop.com>
137
138         Rolling out http://bugzilla.opendarwin.org/show_bug.cgi?id=6010 because of failing layout tests.
139         Add better SVGLoad event support.
140
141         * dom/EventTargetNode.cpp:
142         (WebCore::EventTargetNode::dispatchGenericEvent):
143         * html/HTMLImageLoader.cpp:
144         (WebCore::HTMLImageLoader::dispatchLoadEvent):
145         * html/HTMLImageLoader.h:
146         * ksvg2/misc/SVGImageLoader.cpp:
147         (WebCore::SVGImageLoader::SVGImageLoader):
148         * ksvg2/misc/SVGImageLoader.h:
149         * ksvg2/svg/SVGAElement.cpp:
150         (WebCore::SVGAElement::parseMappedAttribute):
151         * ksvg2/svg/SVGAnimatedBoolean.h:
152         * ksvg2/svg/SVGElement.cpp:
153         (WebCore::SVGElement::SVGElement):
154         (WebCore::SVGElement::parseMappedAttribute):
155         * ksvg2/svg/SVGElement.h:
156         (WebCore::SVGElement::adjustViewportClipping):
157         (WebCore::SVGElement::closeRenderer):
158         (WebCore::SVGElement::rendererIsNeeded):
159         (WebCore::SVGElement::isClosed):
160         (WebCore::svg_dynamic_cast):
161         * ksvg2/svg/SVGExternalResourcesRequired.h:
162         * ksvg2/svg/SVGImageElement.cpp:
163         (SVGImageElement::SVGImageElement):
164         * ksvg2/svg/SVGImageElement.h:
165         * ksvg2/svg/SVGSVGElement.cpp:
166         (WebCore::SVGSVGElement::parseMappedAttribute):
167         * ksvg2/svg/SVGScriptElement.cpp:
168         (SVGScriptElement::SVGScriptElement):
169         (SVGScriptElement::parseMappedAttribute):
170         (SVGScriptElement::executeScript):
171         * xml/xmlhttprequest.cpp:
172         (WebCore::XMLHttpRequest::callReadyStateChangeListener):
173
174 2006-07-28  Adele Peterson  <adele@apple.com>
175
176         Rolling out http://bugzilla.opendarwin.org/show_bug.cgi?id=9753 because of failing layout tests.
177         SVG with width and height 100% leaves room for scrollbar on the right.
178
179         * kcanvas/RenderPath.cpp:
180         * kcanvas/RenderPath.h:
181         * kcanvas/RenderSVGContainer.cpp:
182         (WebCore::RenderSVGContainer::layout):
183         * ksvg2/svg/SVGCircleElement.cpp:
184         * ksvg2/svg/SVGCircleElement.h:
185         * ksvg2/svg/SVGEllipseElement.cpp:
186         * ksvg2/svg/SVGEllipseElement.h:
187         * ksvg2/svg/SVGLineElement.cpp:
188         * ksvg2/svg/SVGLineElement.h:
189         * ksvg2/svg/SVGRectElement.cpp:
190         * ksvg2/svg/SVGRectElement.h:
191         * ksvg2/svg/SVGStyledElement.h:
192
193 2006-07-27  Eric Seidel  <eric@eseidel.com>
194
195         Reviewed by darin.
196         
197         Add better SVGLoad event support.
198         http://bugzilla.opendarwin.org/show_bug.cgi?id=6010
199         There will still need to be additional support added for <link> and <script> elements.
200         Not all of the error -> loaded -> error transition cases work yet.
201
202         * dom/EventTargetNode.cpp:
203         (WebCore::EventTargetNode::dispatchGenericEvent):
204         * html/HTMLImageLoader.cpp:
205         (WebCore::HTMLImageLoader::dispatchLoadEvent):
206         * html/HTMLImageLoader.h:
207         (WebCore::HTMLImageLoader::haveFiredLoadEvent):
208         (WebCore::HTMLImageLoader::setHaveFiredLoadEvent):
209         * ksvg2/misc/SVGImageLoader.cpp:
210         (WebCore::SVGImageLoader::SVGImageLoader):
211         (WebCore::SVGImageLoader::dispatchLoadEvent):
212         * ksvg2/misc/SVGImageLoader.h:
213         * ksvg2/svg/SVGAElement.cpp:
214         (WebCore::SVGAElement::parseMappedAttribute):
215         * ksvg2/svg/SVGAnimatedBoolean.h:
216         * ksvg2/svg/SVGElement.cpp:
217         (WebCore::SVGElement::SVGElement):
218         (WebCore::SVGElement::parseMappedAttribute):
219         (WebCore::SVGElement::haveLoadedRequiredResources):
220         (WebCore::SVGElement::sendSVGLoadEventIfPossible):
221         (WebCore::SVGElement::closeRenderer):
222         * ksvg2/svg/SVGElement.h:
223         (WebCore::SVGElement::rendererIsNeeded):
224         (WebCore::svg_dynamic_cast):
225         * ksvg2/svg/SVGExternalResourcesRequired.h:
226         * ksvg2/svg/SVGImageElement.cpp:
227         (SVGImageElement::SVGImageElement):
228         (SVGImageElement::haveLoadedRequiredResources):
229         * ksvg2/svg/SVGImageElement.h:
230         * ksvg2/svg/SVGSVGElement.cpp:
231         (WebCore::SVGSVGElement::parseMappedAttribute):
232         * ksvg2/svg/SVGScriptElement.cpp:
233         (WebCore::SVGScriptElement::SVGScriptElement):
234         (WebCore::SVGScriptElement::parseMappedAttribute):
235         (WebCore::SVGScriptElement::executeScript):
236         * xml/xmlhttprequest.cpp:
237         (WebCore::XMLHttpRequest::callReadyStateChangeListener): use new Event() instead of createEvent
238
239 2006-07-27  Mitz Pettel  <opendarwin.org@mitzpettel.com>
240
241         Reviewed by Anders.
242
243         - http://bugzilla.opendarwin.org/show_bug.cgi?id=10135
244           Cleanup: remove useless parameters from RenderObject::position()
245
246         No test possible (no functionality change)
247
248         * rendering/RenderBox.cpp:
249         (WebCore::RenderBox::position):
250         * rendering/RenderBox.h:
251         * rendering/RenderObject.h:
252         (WebCore::RenderObject::position):
253         * rendering/RenderTableRow.h:
254         (WebCore::RenderTableRow::position):
255         * rendering/RenderTableSection.h:
256         (WebCore::RenderTableSection::position):
257         * rendering/RenderText.cpp:
258         (WebCore::RenderText::position):
259         * rendering/RenderText.h:
260         * rendering/bidi.cpp:
261         (WebCore::RenderBlock::constructLine):
262         (WebCore::RenderBlock::computeVerticalPositionsForLine):
263
264 2006-07-27  Rob Buis  <buis@kde.org>
265
266         Reviewed by Maciej.
267
268         http://bugzilla.opendarwin.org/show_bug.cgi?id=9753
269         SVG with width and height 100% leaves room for scrollbar on the right.
270
271         Relayout children of svg containers, except svg shapes that do not depend on percentages.
272
273         * kcanvas/RenderPath.cpp: (WebCore::RenderPath::hasPercentageValues):
274         * kcanvas/RenderPath.h:
275         * kcanvas/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::layout):
276         * ksvg2/svg/SVGCircleElement.cpp: (SVGCircleElement::hasPercentageValues):
277         * ksvg2/svg/SVGCircleElement.h:
278         * ksvg2/svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::hasPercentageValues):
279         * ksvg2/svg/SVGEllipseElement.h:
280         * ksvg2/svg/SVGLineElement.cpp: (SVGLineElement::hasPercentageValues):
281         * ksvg2/svg/SVGLineElement.h:
282         * ksvg2/svg/SVGRectElement.cpp: (WebCore::SVGRectElement::hasPercentageValues):
283         * ksvg2/svg/SVGRectElement.h:
284         * ksvg2/svg/SVGStyledElement.h: (WebCore::SVGStyledElement::hasPercentageValues):
285
286 2006-07-27  Justin Garcia  <justin.garcia@apple.com>
287
288         Reviewed by levi
289         
290         <rdar://problem/4242293>
291         Poor paste fidelity of http://www.google.com/
292
293         * editing/ApplyStyleCommand.cpp:
294         (WebCore::ApplyStyleCommand::applyInlineStyle):  Fixed crasher with nil-check.
295         * editing/markup.cpp:
296         (WebCore::startMarkup): Style information wasn't added to an element if it had
297         attributes but no style attribute.
298
299 2006-07-27  Alexander Kellett  <lypanov@kde.org>
300
301         Reviewed by Darin.
302
303         - fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9867
304           REGRESSION: code that modifies form element in Firefox modifies form attribute in WebKit
305
306         * bindings/scripts/CodeGeneratorJS.pm: add new attribute - HasOverridingNameGetter
307         * html/HTMLFormElement.idl:
308
309 2006-07-27  Rob Buis  <buis@kde.org>
310
311         Reviewed by Anders.
312
313         http://bugzilla.opendarwin.org/show_bug.cgi?id=8992
314         Some HTML DOM attributes have incorrect types
315
316         Adjust idl and dom source code for HTMLImageElement and
317         HTMLBaseFontElement to choose correct type for
318         HTMLImageElement::border and HTMLBaseFontElement::size
319         attributes.
320
321         * html/HTMLBaseFontElement.cpp:
322         (WebCore::HTMLBaseFontElement::size):
323         (WebCore::HTMLBaseFontElement::setSize):
324         * html/HTMLBaseFontElement.h:
325         * html/HTMLBaseFontElement.idl:
326         * html/HTMLImageElement.cpp:
327         (WebCore::HTMLImageElement::border):
328         (WebCore::HTMLImageElement::setBorder):
329         * html/HTMLImageElement.h:
330         * html/HTMLImageElement.idl:
331
332 2006-07-27  Justin Garcia  <justin.garcia@apple.com>
333
334         Reviewed by levi
335         
336         <rdar://problem/4628409>
337         Safari crashes in CompositeEditCommand::removeBlockPlaceholder entering text in a web page form
338
339         * editing/CompositeEditCommand.cpp:
340         (WebCore::CompositeEditCommand::removeBlockPlaceholder): 
341         A script on the page shrinks the textarea down to zero rows just
342         before insertion.  That gives the shadow div a zero height, removing
343         [div, 0] as a candidate for a VisiblePosition.  Then 
344         InsertTextCommand::input() tries to create a VisiblePosition from 
345         [div, 0] and fails.  A nil check is a quick fix.  Another might
346         be to make positions where there is a caret selection candidates.
347         Another might be to make any [div, 0] where div is a shadow div inside
348         a form element a candidate.
349
350 2006-07-27  Graham Dennis  <graham.dennis@gmail.com>
351
352         Reviewed by Darin.
353
354         - fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=10094
355           Japanese characters improperly rendering in TOT
356           
357         Test: fast/encoding/denormalised-voiced-japanese-chars.html
358
359         * platform/Font.cpp:
360         (WebCore::WidthIterator::advance): pass currentCharacter to normalizeVoicingMarks
361         (WebCore::WidthIterator::normalizeVoicingMarks): turn the currentCharacter variable
362         into an argument as WidthIterator::advance doesn't update m_currentCharacter while
363         looping
364
365 2006-07-27  Eric Seidel  <eric@eseidel.com>
366
367         Reviewed by ap.
368
369         Complex entities seem to fail on TOT
370         http://bugzilla.opendarwin.org/show_bug.cgi?id=6390
371         Use an alternative work-around to an XML Entity parsing bug.
372
373         * dom/XMLTokenizer.cpp:
374         (WebCore::XMLTokenizer::write):
375         (WebCore::hackAroundLibXMLEntityBug): added.
376         (WebCore::startElementNsHandler):
377         (WebCore::endElementNsHandler):
378         (WebCore::charactersHandler):
379         (WebCore::processingInstructionHandler):
380         (WebCore::cdataBlockHandler):
381         (WebCore::commentHandler):
382         (WebCore::getEntityHandler):
383
384 2006-07-27  Rob Buis  <buis@kde.org>
385
386         Reviewed by Darin.
387
388         http://bugzilla.opendarwin.org/show_bug.cgi?id=9938
389         Fix viewBox issues in Hixie's test
390
391         Do a more accurate and quicker job of parsing the viewBox
392         attribute. Handle properly on negative width/height and
393         invalid syntax in general.
394
395         * ksvg2/svg/SVGFitToViewBox.cpp:
396         (SVGFitToViewBox::parseViewBox):
397
398 2006-07-27  Eric Seidel  <eric@eseidel.com>
399
400         Reviewed by ap.
401
402         Enables getSVGDocument() support for HTMLObjectElement and HTMLEmbedElement
403         http://bugzilla.opendarwin.org/show_bug.cgi?id=9237
404         This patch does not try to autogenerate anything, but enables the SVG functionality.
405         Also fix HTMLObjectElement vspace and hspace to be numbers instead of strings to match IE & Firefox.
406
407         * bindings/js/kjs_dom.cpp:
408         (KJS::toJS):
409         * bindings/js/kjs_html.cpp:
410         (KJS::JSHTMLElement::objectGetter):
411         (KJS::HTMLElementFunction::callAsFunction):
412         (KJS::JSHTMLElement::objectSetter):
413         * bindings/js/kjs_html.h:
414         (KJS::JSHTMLElement::):
415         * dom/Document.h:
416         (WebCore::Document::isSVGDocument):
417         * html/HTMLEmbedElement.cpp:
418         (WebCore::HTMLEmbedElement::contentDocument):
419         (WebCore::HTMLEmbedElement::getSVGDocument):
420         * html/HTMLEmbedElement.h:
421         * html/HTMLObjectElement.cpp:
422         (WebCore::HTMLObjectElement::HTMLObjectElement):
423         (WebCore::HTMLObjectElement::getInstance):
424         (WebCore::HTMLObjectElement::parseMappedAttribute):
425         (WebCore::HTMLObjectElement::contentDocument):
426         (WebCore::HTMLObjectElement::rendererIsNeeded):
427         (WebCore::HTMLObjectElement::createRenderer):
428         (WebCore::HTMLObjectElement::setCode):
429         (WebCore::HTMLObjectElement::setArchive):
430         (WebCore::HTMLObjectElement::setBorder):
431         (WebCore::HTMLObjectElement::setCodeBase):
432         (WebCore::HTMLObjectElement::setCodeType):
433         (WebCore::HTMLObjectElement::setData):
434         (WebCore::HTMLObjectElement::hspace):
435         (WebCore::HTMLObjectElement::setHspace):
436         (WebCore::HTMLObjectElement::setStandby):
437         (WebCore::HTMLObjectElement::setType):
438         (WebCore::HTMLObjectElement::setUseMap):
439         (WebCore::HTMLObjectElement::vspace):
440         (WebCore::HTMLObjectElement::setVspace):
441         (WebCore::HTMLObjectElement::getSVGDocument):
442         * html/HTMLObjectElement.h:
443         * ksvg2/svg/SVGDocument.h:
444         (WebCore::SVGDocument::isSVGDocument):
445         * rendering/RenderWidget.h:
446         (WebCore::RenderWidget::frameView):
447
448 2006-07-26  Alexey Proskuryakov  <ap@nypop.com>
449
450         Reviewed by Darin.
451
452         Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9901
453         XSLTProcessor cannot parse text nodes for INPUT ELEMENTS in an XSLT stylesheet
454
455         Test: fast/js/xhtml-serialize.html
456
457         * editing/markup.cpp:
458         (WebCore::endMarkup): If the element has child nodes, write a closing tag even if it 
459         is not permitted in HTML, to make it valid XML.
460
461 2006-07-26  Alice Liu  <alice.liu@apple.com>
462
463         Reviewed by John Sullivan (and Kevin and Timo).
464
465         landing this patch for John et al.  
466         Fixed <rdar://problem/4651380> REGRESSION (9A232->9A234): existing web clips don't render if you restart Dashboard
467
468         * page/FrameView.cpp:
469         (WebCore::FrameView::layout):
470         moved the call to didFirstLayout to above the check for needsLayout
471         because we need to call didFirstLayout for every webview, not just
472         ones we think need layout.  
473
474 2006-07-26  Justin Garcia  <justin.garcia@apple.com>
475
476         Reviewed by darin
477         
478         <rdar://problem/4652788>
479         REGRESSION: Can't change size or style of any text in message body
480
481         * dom/Node.cpp:
482         (WebCore::Node::isContentRichlyEditable): Mimic Node::isContentEditable.
483         * html/HTMLElement.cpp:
484         (WebCore::HTMLElement::isContentRichlyEditable): First check
485         the frame for editability, then userModify, like what
486         HTMLElement::isContentEditable() does.
487         * html/HTMLElement.h:
488
489 2006-07-26  Mitz Pettel  <opendarwin.org@mitzpettel.com>
490
491         Reviewed by ap.
492
493         - fix debug-only information() string for table cells
494
495         * rendering/RenderObject.cpp:
496         (WebCore::RenderObject::information):
497
498 2006-07-25  David Harrison  <harrison@apple.com>
499
500         Reviewed by timo and Darin.
501
502         <rdar://problem/4618584> "Paste and Match Style" is not working in Mail (add SPI)
503         
504         * WebCore.xcodeproj/project.pbxproj:
505         * bridge/mac/WebCoreFrameBridge.h:
506         * bridge/mac/WebCoreFrameBridge.mm:
507         (-[WebCoreFrameBridge replaceSelectionWithNode:selectReplacement:smartReplace:matchStyle:]):
508         Add matchStyle parameter for use by WebKit.
509
510 2006-07-25  Justin Garcia  <justin.garcia@apple.com>
511
512         Reviewed by adele
513         
514         <rdar://problem/4649560>
515         REGRESSION: Can't Select All when the body is contentEditable="true"
516
517         * editing/VisiblePosition.cpp:
518         (WebCore::VisiblePosition::canonicalPosition): Allow descent from a non-editable html
519         element into an editable body as a convenience.
520
521 2006-07-25  Justin Garcia  <justin.garcia@apple.com>
522
523         Reviewed by darin
524         
525         <rdar://problem/4468458> Incoming HTML message is editable <body contenteditable="true">
526
527         * dom/Document.cpp:
528         (WebCore::Document::inDesignMode): Removed some spaces.
529         * page/Frame.cpp:
530         (WebCore::Frame::applyEditingStyleToElement): Just add CSS properties needed for editing.
531         (WebCore::Frame::removeEditingStyleFromElement): Made this a no-op, we'll remove
532         it eventually.
533
534 2006-07-25  David Kilzer  <ddkilzer@kilzer.net>
535
536         Reviewed by Darin.
537
538         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9717
539           Replace IDL ConvertUndefinedToTrue parameter attribute with Optional attribute
540
541         No test added because there is no change in functionality.
542
543         * bindings/js/kjs_binding.cpp: Removed valueToBooleanTreatUndefinedAsTrue() method.
544         * bindings/js/kjs_binding.h: Ditto.
545         * bindings/scripts/CodeGeneratorJS.pm: Removed support for ConvertUndefinedToTrue parameter attribute.
546         * dom/Element.h: Set default value to true for scrollIntoView() and scrollIntoViewIfNeeded() arguments.
547         * dom/Element.idl: Replaced ConvertUndefinedToTrue attribute with Optional attribute.
548           Fixed name of scrollIntoViewIfNeeded() argument to match implementation.
549         * page/DOMWindow.idl: Replaced ConvertUndefinedToTrue attribute with Optional attribute.
550
551 2006-07-24  Dan Waylonis  <waylonis@google.com>
552
553         Reviewed and tweaked a bunch by Darin.
554
555         Test: plugins/bindings-test.html
556
557         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9902
558           jsNull and NSNull not properly converted between JS and ObjC
559
560         * bindings/objc/WebScriptObject.mm:
561         (+[WebScriptObject _convertValueToObjcValue:originExecutionContext:executionContext:]):
562         Added case that converts jsNull to NSNull.
563
564 2006-07-24  Darin Adler  <darin@apple.com>
565
566         Reviewed by Adele and Justin.
567
568         - fix <rdar://problem/4613616> REGRESSION: some spaces typed in <textarea> are posted as non-breaking spaces (9630)
569           http://bugzilla.opendarwin.org/show_bug.cgi?id=9630
570         - also fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=9939
571           REGRESSION: Pasting text into native text area with newline at end does not preserve newline
572         - removed some uses of DeprecatedPtrList in the markup code
573
574         Test: fast/forms/textarea-type-spaces.html
575         Test: fast/forms/textarea-paste-newline.html
576
577         * bindings/objc/DOMHTML.mm: (-[DOMHTMLDocument createDocumentFragmentWithText:]):
578         Updated call to pass a range -- in this case it is the range of the entire document,
579         so this will not handle the whitespace properly.
580
581         * bridge/mac/WebCoreFrameBridge.h: Added range context parameter to the
582         documentFragmentWithText: method, so we can handle whitespace properly.
583         * bridge/mac/WebCoreFrameBridge.mm:
584         (-[WebCoreFrameBridge nodesFromList:]): Changed from DeprecatedPtrList to Vector.
585         (-[WebCoreFrameBridge markupStringFromNode:nodes:]): Ditto.
586         (-[WebCoreFrameBridge markupStringFromRange:nodes:]): Ditto.
587         (-[WebCoreFrameBridge documentFragmentWithText:inContext:]): Added range context
588         parameter -- pass it on to createFragmentFromText.
589         (-[WebCoreFrameBridge documentFragmentWithNodesAsParagraphs:]): Changed from
590         DeprecatedPtrList to Vector.
591         (-[WebCoreFrameBridge replaceSelectionWithText:selectReplacement:smartReplace:]):
592         Pass the range of the current selection as context when creating the fragment.
593
594         * dom/Position.cpp: (WebCore::Position::inRenderedText): Replace range check with
595         a call to the new containsCaretOffset function -- helps make the caret work right when
596         it is past the end of the last line in a textarea.
597
598         * editing/CompositeEditCommand.cpp:
599         (WebCore::CompositeEditCommand::rebalanceWhitespaceAt): Don't do anything if the
600         style does not call for collapsing whitespace.
601         (WebCore::CompositeEditCommand::rebalanceWhitespace): Call replaceWhitespaceAt
602         to share code, including the new logic mentioned above.
603
604         * editing/InsertLineBreakCommand.cpp: (WebCore::InsertLineBreakCommand::doApply):
605         Use a text node instead of a break element when inserting and the style is preserveNewline.
606
607         * editing/JSEditor.cpp: (WebCore::execRemoveFormat): Pass the selection range
608         to createFragmentFromText.
609
610         * editing/RebalanceWhitespaceCommand.cpp: (WebCore::RebalanceWhitespaceCommand::doApply):
611         Assert that we're in a style that collapses whitespace. It's the caller's responsibility
612         not to call otherwise.
613
614         * editing/ReplaceSelectionCommand.h: Removed unused destructor, type, isSingleTextNode,
615         isTreeFragment, m_type, and added a context parameter to inertFragmentForTestRendering.
616         Also changed the constructor to take a selection rather than a pointer to the root
617         editable element, replaced removeEndBRIfNeeded with shouldRemoveEndBR and removed an
618         unused parameter from shouldMergeEnd.
619         * editing/ReplaceSelectionCommand.cpp:
620         (WebCore::ReplacementFragment::ReplacementFragment): Removed code to set up m_type.
621         Compute root editable element from passed-in selection. Used the start of the selection
622         as a base node for style purposes for the test rendering. Removed the special case
623         "single text node" alternative to createFragmentFromText in the plain text case, since
624         createFragmentFromText now handles that correctly.
625         (WebCore::ReplacementFragment::insertFragmentForTestRendering): Copy the whitespace
626         property from the source location when creating a temporary element for test rendering.
627         (WebCore::ReplacementFragment::shouldMergeEnd): Removed unneeded boolean
628         parameter fragmentHadInterchangeNewlineAtEnd, which is always false.
629         (WebCore::ReplaceSelectionCommand::doApply): Update for ReplacementFragment changes,
630         change code to not remove end BR when it can be re-used instead, don't call the
631         paragraph separator insertion when the position is at the start of a paragraph already,
632         removed redundant computation of identical "next" value, removed unneeded boolean
633         parameter to shouldMergeEnd, add case for merging when all we need to do is to delete
634         a newline character, removed unneeded code to set insertionPos after all code that uses
635         it, and  use spaces instead of non-breaking spaces when doing smart paste if the
636         context is one where we do not collapse white space.
637         (WebCore::ReplaceSelectionCommand::shouldRemoveEndBR): Renamed and changed to return
638         a boolean instead of doing the removal.
639
640         * editing/markup.h: Use Vector instead of DeprecatedPtrList. Change the
641         createFragmentFromText function to take a range for context instead of a document.
642         * editing/markup.cpp:
643         (WebCore::markup): Use Vector instead of DeprecatedPtrList.
644         (WebCore::createMarkup): Ditto.
645         (WebCore::createParagraphContentsFromString): Remove unneeded document parameter
646         and changed a couple places to use isEmpty instead of comparing with "".
647         (WebCore::createFragmentFromText): Given the new context parameter, if the context
648         is one that preserves newlines, then use "\n" instead of <br> elements.
649         (WebCore::createFragmentFromNodes): Use Vector instead of DeprecatedPtrList.
650
651         * html/HTMLElement.cpp: (WebCore::HTMLElement::setInnerText): Do not use <br>
652         elements if the context of this node is one where we preserve newlines.
653
654         * rendering/InlineTextBox.h:
655         * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::containsCaretOffset):
656         Added. Implements the appropriate rule for determining if a caret position is
657         in this line or not. Returns true for both one line and the next in cases where
658         affinity must be considered to determine which line the caret is on.
659
660         * rendering/RenderText.h: Make atLineWrap no longer be a member function.
661         * rendering/RenderText.cpp:
662         (WebCore::atLineWrap): Remove special rule about preserveNewline and isLineBreak,
663         which will no longer apply due to the new containsCaretOffset function logic.
664         (WebCore::RenderText::caretRect): Use containsCaretOffset.
665         (WebCore::RenderText::inlineBox): Ditto.
666
667         * rendering/RenderTextControl.cpp:
668         (WebCore::RenderTextControl::updateFromElement): Make a placeholder <br> element
669         after calling setInnerText so that the last newline in the string has the effect
670         we expect outside the HTML world (an additional line).
671         (WebCore::RenderTextControl::setSelectionRange): Set granularity of the selection
672         too. The layout tests caught this problem, which needs a better solution long term.
673         (WebCore::RenderTextControl::text): Call textContent with the parameter false
674         so it will not include newlines for <br> elements. Now the only <br> element
675         that will ever be in the shadow DOM tree is the one to prevent collapsing, and
676         that one should not show up in the text value.
677
678         * rendering/bidi.cpp: (WebCore::RenderBlock::findNextLineBreak): Took a rule
679         that specifically called out the pre whitespace mode and made it work for all
680         the modes that preserve newlines. This makes sure we get a last line box for
681         text after the last "\n" even in cases where there is no <br> afterward.
682
683         * editing/DeleteSelectionCommand.cpp:
684         (WebCore::DeleteSelectionCommand::fixupWhitespace):
685         * editing/InsertParagraphSeparatorCommand.cpp:
686         (WebCore::InsertParagraphSeparatorCommand::doApply):
687         Added assertions to make sure we don't do anything when we're not collapsing
688         whitespace.
689
690         * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::setDefaultValue):
691         Changed to use Vector instead of DeprecatedPtrList.
692
693         * editing/HTMLInterchange.cpp: Removed obsolete comment.
694
695         * loader/Cache.h: Removed a stray include.
696
697 2006-07-24  Adele Peterson  <adele@apple.com>
698
699         Reviewed by Justin.
700
701         - Fix for <rdar://problem/4632132> Changing style of content with mixed editability fails
702
703         Test: * editing/style/apple-style-editable-mix.html
704
705         * dom/Node.cpp: (WebCore::Node::isContentRichlyEditable): Doesn't need to check the editable root.  It now just
706           checks the user modify property of its own renderer, since that is inherited.
707         * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::applyInlineStyle): If the end position is in a table,
708         Adjust the end node to the last descendant of the table, so we don't skip over any runs.
709
710 2006-07-24  Darin Adler  <darin@apple.com>
711
712         Reviewed by Hyatt.
713
714         - implement String::createCFString
715
716         * WebCore.xcodeproj/project.pbxproj: Added StringImplMac.mm and StringMac.mm.
717
718         * bindings/objc/DOMInternal.mm: Moved NSString conversion functions out of here.
719
720         * platform/mac/StringImplMac.mm: Added. Moved NSString conversion members here
721         and added the CFStringRef ones.
722         * platform/mac/StringMac.mm: Added. Ditto.
723
724 2006-07-24  David Hyatt  <hyatt@apple.com>
725
726         Two bug fixes.
727
728         (1) Make sure to mark positioned objects that depend on line position to
729         mark themselves as needing layout when their line box placeholder gets
730         repositioned.
731
732         * rendering/RenderBox.cpp:
733         (WebCore::RenderBox::position):
734        
735         (2) Improve highlighting to factor the inflation into overflow so that
736         invalidation and repainting will work properly.
737
738         * rendering/RootInlineBox.cpp:
739         (WebCore::RootInlineBox::addHighlightOverflow):
740         * rendering/RootInlineBox.h:
741         * rendering/bidi.cpp:
742         (WebCore::RenderBlock::layoutInlineChildren):
743
744 2006-07-24  Anders Carlsson  <acarlsson@apple.com>
745
746         Reviewed by Adele.
747
748         <rdar://problem/4641824> REGRESSION: Wikipedia widget fails to complete a search after pressing return key
749         
750         * html/HTMLInputElement.cpp:
751         (WebCore::HTMLInputElement::defaultEventHandler):
752         Don't eat enter events for search fields that have no enclosing form; they need to be passed to AppKit so
753         that onsearch can be invoked.
754         
755         * manual-tests/onsearch-enter.html: Added.
756
757 2006-07-24  Dave MacLachlan  <dmaclach@mac.com>
758
759         Reviewed by Darin and Alexey.
760         
761         Fix for: <http://bugzilla.opendarwin.org/show_bug.cgi?id=8425> 
762         and <http://bugzilla.opendarwin.org/show_bug.cgi?id=6947>
763
764         Test: svg/custom/non-opaque-filters.svg
765
766         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
767         (WebCore::KCanvasFilterQuartz::prepareFilter):
768         We create an autorelease pool so we can control the deallocation of the
769         CIContext that we're creating. The CIContext retains the CGContext that 
770         you pass it internally so when the CIContext is released, the 
771         CGContext is released as well.
772         This is all fine and dandy unless you wrap the creation of the CIFilter
773         with a pair of CGBegin/EndTransparencyLayer calls which swap the context
774         out from underneath you. So if you start with context A, 
775         CGBeginTransparencyLayer swaps it out and gives you B. You create a CIFilter
776         with it and add a reference to B. CGEndTransparencyLayer swaps out B and
777         gives you back A. Autorelease pool comes and cleans up the Filter, and calls
778         release on A, but A never got the refcount in the first place. B did. BOOM!
779         So we create a pool, then do a retain, then release the pool so that we 
780         don't have to worry about the pool releasing it at a later time.
781         See <rdar://problem/4647735> for reduction of CGEndTransparencyLayer case
782
783 2006-07-24  Mitz Pettel  <opendarwin.org@mitzpettel.com>
784
785         Reviewed by Hyatt.
786
787         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9669
788           Incomplete repaint when changing an inline's border
789
790         Test: fast/repaint/line-overflow.html
791
792         * rendering/RenderBlock.h:
793         * rendering/bidi.cpp:
794         (WebCore::RenderBlock::layoutInlineChildren): Added repaintTop and repaintBottom
795         variables to track the vertical edges of the area that changed, accounting for
796         lines that were deleted, inserted or moved. Removed unnecessary updating of
797         m_overflowHeight.
798         (WebCore::RenderBlock::determineStartPosition): Removed unnecessary updating of
799         m_overflowHeight.
800         (WebCore::RenderBlock::determineEndPosition):
801         (WebCore::RenderBlock::matchedEndLine): Added repaintTop and repaintBottom
802         arguments, which this method updates to account for deleted lines.
803         (WebCore::RenderBlock::checkLinesForOverflow): Removed outdated FIXME.
804
805 2006-07-24  Mitz Pettel  <opendarwin.org@mitzpettel.com>
806
807         Reviewed by Darin.
808
809         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10075
810           REGRESSION: Reversed pop-up text in visually-ordered Hebrew pages
811
812         Test: fast/forms/select-visual-hebrew.html
813
814         * css/html4.css: Set "-webkit-rtl-ordering: logical" on select elements.
815
816 2006-07-24  Alexey Proskuryakov  <ap@nypop.com>
817
818         Reviewed by Darin.
819
820         Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10009
821         REGRESSION: Schubert-IT PDF Plug-in not working for full page (works in frames)
822
823         * page/Frame.cpp:
824         (WebCore::Frame::begin): Give PDF plugins a chance to handle frame content, before ImageDocument
825         claims it.
826
827 2006-07-24  Mitz Pettel  <opendarwin.org@mitzpettel.com>
828
829         Reviewed by Darin.
830
831         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10083
832           REGRESSION (r15584): editing/selection/select-from-textfield-outwards failing
833
834         * rendering/RenderBlock.cpp:
835         (WebCore::RenderBlock::positionForCoordinates): Added back change from the fix
836         for bug 9312: For coordinates outside a replaced object, return the position
837         just before (after) the element if the coordinates are above or to the left (below
838         or to the right).
839
840 2006-07-23  Mark Rowe  <opendarwin.org@bdash.net.nz>
841
842         Reviewed by maciej.
843
844         Bug 9686: [Drosera] Need the ability to break into Drosera on Javascript exceptions
845         http://bugzilla.opendarwin.org/show_bug.cgi?id=9686
846
847         WebCore portion of the fix.
848
849         * bridge/mac/WebCoreScriptDebugger.h:
850         (-[WebScriptDebugger exceptionRaised:sourceId:line::]): Add delegate method.
851         * bridge/mac/WebCoreScriptDebugger.mm:
852         (WebCoreScriptDebuggerImp::exception): Call delegate method when an exception is raised.
853
854 2006-07-23  Alice Liu  <alice.liu@apple.com>
855
856         Reviewed by Adele.
857         Actually Adele figured out how to fix the layout test failures.  Landing this patch for her.  Layout test failures exposed but not caused by  r15584 (my patch earlier today).
858
859         * editing/visible_units.cpp:
860         (WebCore::previousLinePosition):
861         When setting selection endpoints, don't traverse down into nodes where editing would ignore its contents. Use the parent node instead.  
862         (WebCore::nextLinePosition):
863         same as above
864
865 2006-07-23  David Harrison  <harrison@apple.com>
866
867         Reviewed by timo.
868
869         <rdar://problem/4646759> Mail crash editing To Do - WebCore::InsertTextCommand::prepareForTextInsertion
870         
871         * Test: editing/deleting/delete-mixed-editable-content-001.html
872
873         * editing/visible_units.cpp:
874         (WebCore::startOfParagraph):
875         Respect editable boundary the same way endOfParagraph does.
876
877 2006-07-23  Beth Dakin  <bdakin@apple.com>
878
879         Reviewed by Maciej. (Patch by me, Maciej, and Harrison.)
880
881         Fix for <rdar://problem/4529398> WebCore crashes when pasting rich 
882         text - WebCore::InlineBox::root()
883
884         The initial rendering crash was due to a render object having a 
885         stale reference to an inline box that had already been deleted and 
886         then recreated in the exact same location in memory. (Crazy, I 
887         know.) The situation seemed pretty specific to list markers 
888         according to Hyatt according to Maciej, so that is what I patched 
889         specifically. Fixing this crash unearthed a separate editing crash 
890         where we were trying to insert a block into itself. I worked on 
891         that with Maciej and Harrison, and Harrison came up with a fix.
892
893         * editing/CompositeEditCommand.cpp:
894         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): This is the fix for the editing crash. If paragraphStart is an atomic 
895         node, insert the new block into the parent instead.
896         * rendering/InlineBox.cpp:
897         (WebCore::InlineBox::isChildOfParent): This function is for 
898         posterity. It will help keep the linebox tree in check.
899         * rendering/InlineBox.h:
900         * rendering/InlineFlowBox.cpp:
901         (WebCore::InlineFlowBox::addToLine): Added assert.
902         (WebCore::InlineFlowBox::deleteLine): Added assert.
903         * rendering/ListMarkerBox.cpp:
904         (WebCore::ListMarkerBox::destroy): If this has a parent, call 
905         removeChild on this.
906         (WebCore::ListMarkerBox::operator delete):
907         * rendering/ListMarkerBox.h:
908
909 2006-07-23  Alice Liu  <alice.liu@apple.com>
910
911         Reviewed by Darin.
912
913         fixed <rdar://problem/4617841> REGRESSION (NativeTextField): You can move keyboard focus to a field without getting insertion point
914
915         * rendering/RenderBlock.cpp:
916         (WebCore::RenderBlock::positionForCoordinates):
917         removed some unnecessary vertical position checks and added a fudge factor to be more forgiving for clicks near lines.
918         * rendering/RenderTextControl.cpp:
919         (WebCore::RenderTextControl::nodeAtPoint):
920         added implementation
921         * rendering/RenderTextControl.h:
922         added function protocol
923
924 2006-07-23  Adele Peterson  <adele@apple.com>
925
926         Reviewed by Darin.
927
928         Updating fix from last checkin.
929
930         * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutVerticalBox):
931         Only tell the view about this flexbox if there isn't another flexbox already cached.
932
933 2006-07-23  Adele Peterson  <adele@apple.com>
934
935         Reviewed by Maciej.
936
937         - Fix for <rdar://problem/4644614> REGRESSION: Typing, pasting or dragging in new text areas causes unnecessary scrolling
938
939         * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): Don't updateScrollInfoAfterLayout if an ancestor flexible box is just on
940         its first layout.
941         * rendering/RenderFlexibleBox.cpp:
942         (WebCore::RenderFlexibleBox::layoutBlock): ditto.
943         (WebCore::RenderFlexibleBox::layoutVerticalBox): Let the view know if this flex box is doing its first pass at layout.
944
945         * rendering/RenderView.cpp: (WebCore::RenderView::RenderView): Caches a flexible box that's doing its first layout.
946         * rendering/RenderView.h:
947         (WebCore::RenderView::setFlexBoxInFirstLayout):
948         (WebCore::RenderView::flexBoxInFirstLayout):
949
950 2006-07-22  Alexey Proskuryakov  <ap@nypop.com>
951
952         Reviewed by Darin.
953
954         Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10038
955         REGRESSION: Length of navigator.mimeTypes collection returns number of installed plugins, not number 
956         of registered mime types
957
958         * bindings/js/kjs_navigator.cpp:
959         (KJS::MimeTypes::getValueProperty): Return the length of the mime types vector, not the plugins one.
960         (KJS::MimeTypes::getOwnPropertySlot): Fixed another typo, which prevented MimeTypes::getValueProperty()
961         from even being called.
962
963 2006-07-21  Maciej Stachowiak  <mjs@apple.com>
964
965         Reviewed by Adele and Tim Omernick.
966
967         <rdar://problem/4641004> 9A224: Safari crashes in WebCore::RenderMenuList::showPopup when changing a input select field to input text field
968
969         Couldn't figure out how to make layout test, here's a manual test:
970         * manual-tests/remove-select-onchange.html: Added.
971         
972         * rendering/RenderMenuList.cpp:
973         (WebCore::RenderMenuList::showPopup): Don't add the RenderPopupMenu to the render
974         tree so it doesn't get destroyed if we do.
975         
976         The remaining changes are to let the RenderPopupMenu know its menu list w/o having
977         to be in the render tree:
978         
979         * rendering/RenderPopupMenu.cpp:
980         (WebCore::RenderPopupMenu::RenderPopupMenu):
981         * rendering/RenderPopupMenu.h:
982         (WebCore::RenderPopupMenu::menuList):
983         * rendering/RenderPopupMenuMac.h:
984         * rendering/RenderPopupMenuMac.mm:
985         (WebCore::RenderPopupMenuMac::RenderPopupMenuMac):
986         * rendering/RenderPopupMenuWin.h:
987         (WebCore::RenderPopupMenuWin::RenderPopupMenuWin):
988         * rendering/RenderTheme.h:
989         * rendering/RenderThemeMac.h:
990         * rendering/RenderThemeMac.mm:
991         (WebCore::RenderThemeMac::createPopupMenu):
992         * rendering/RenderThemeWin.cpp:
993         (WebCore::RenderThemeWin::createPopupMenu):
994         * rendering/RenderThemeWin.h:
995
996 2006-07-21  Adele Peterson  <adele@apple.com>
997
998         Reviewed by Darin.
999
1000         Fix for: <rdar://problem/4643238> REGRESSION: Can't set insertion point at the end of a line of text
1001
1002         Test: fast/forms/textarea-scrolled-endline-caret.html
1003
1004         * rendering/RenderBlock.cpp: (WebCore::RenderBlock::positionForCoordinates):
1005         When looking for the closest line box, take the scroll offset into account.
1006
1007 2006-07-21  Tim Omernick  <timo@apple.com>
1008
1009         Reviewed by Geoff & Maciej.
1010
1011         <rdar://problem/4632505> REGRESSION: Crash at WebCore::Widget::getView() const + 6
1012
1013         Geoff is working on a layout test for this.
1014
1015         * bridge/mac/FrameMac.mm:
1016         (WebCore::FrameMac::focusWindow):
1017         (WebCore::FrameMac::unfocusWindow):
1018         Check for a NULL view.  The view can be NULL if the frame has not yet loaded any data.  This fixes the crash, but the behavior is still
1019         wrong -- we should focus the frame once it gets a view.  I've filed <rdar://problem/4645685> to track that.  It's not as urgent as this
1020         crasher.
1021         
1022 2006-07-21  Maciej Stachowiak  <mjs@apple.com>
1023
1024         Reviewed by Darin.
1025
1026         <rdar://problem/4523976> REGRESSION (NativeTextField): Crash occurs when choosing "Undo Typing" after typing and setting the value
1027
1028         * rendering/RenderTextControl.cpp:
1029         (WebCore::RenderTextControl::updateFromElement): Clear the undo
1030         chain when the text control contents have been set
1031         programmatically.
1032         * bridge/mac/FrameMac.mm:
1033         (WebCore::FrameMac::clearUndoRedoOperations): Before clearing undo
1034         stack, close all open undo groups and then open an equal number,
1035         since otherwise NSUndoManager ends up in an inconsistent state
1036         leading to uncaught ObjC exceptions.
1037
1038 2006-07-21  Beth Dakin  <bdakin@apple.com>
1039         
1040         Reviewed by Darin.
1041
1042         Just moving this assertion down a couple of lines. It was hitting 
1043         every time you try to print a page because we put it too early in 
1044         the function.
1045
1046         * bridge/mac/WebCoreFrameBridge.mm:
1047         (-[WebCoreFrameBridge drawRect:]):
1048
1049 2006-07-21  Justin Garcia  <justin.garcia@apple.com>
1050
1051         Reviewed by levi
1052         
1053         <rdar://problem/4548238>
1054         REGRESSION: Can't remove the first OL/UL list item in a Mail's compose window
1055
1056         * editing/CompositeEditCommand.cpp:
1057         (WebCore::CompositeEditCommand::breakOutOfEmptyListItem): 
1058         Moved from InsertParagraphSeparator.  Does its own typing style restoration.
1059         * editing/CompositeEditCommand.h:
1060         * editing/InsertParagraphSeparatorCommand.cpp:
1061         (WebCore::InsertParagraphSeparatorCommand::doApply): Call breakOutOfEmptyListItem.
1062         * editing/TypingCommand.cpp:
1063         (WebCore::TypingCommand::deleteKeyPressed): Call breakOutOfEmptyListItem if
1064         the endingSelection is at the start of an editable region.
1065         * editing/htmlediting.cpp:
1066         (WebCore::embeddedSublist): Moved from InsertParagraphSeparator.
1067         (WebCore::appendedSublist): Ditto.
1068         (WebCore::enclosingEmptyListItem): Ditto.
1069         * editing/htmlediting.h:
1070
1071 === Safari-521.20 ===
1072
1073 2006-07-21  Tim Omernick  <timo@apple.com>
1074
1075         Reviewed by Beth Dakin & John Sullivan.
1076
1077         <rdar://problem/4633717> 9A218: Reproducible crash in -[NSScroller mouseDown:]
1078
1079         Beth is in the middle of making a layout test for this; she will land it soon.
1080
1081         * platform/mac/ScrollBarMac.mm:
1082         (ScrollBar::~ScrollBar):
1083         Call Widget::removeFromSuperview() rather than -removeFromSuperview directly on the scroll bar view.
1084         Widget::removeFromSuperview() obeys the "mustStayInWindow" flag, which is set while tracking the mouse
1085         in view-based widgets to prevent their destruction while the tracking is in progress.
1086         I searched around WebCore and this is the only Widget subclass that directly removes its view rather
1087         than using removeFromSuperview().
1088
1089 2006-07-21  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1090
1091         Reviewed by Darin.
1092
1093         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9312
1094           REGRESSION: Selection bug in new text fields when selecting past the first letter
1095
1096         Test: editing/selection/select-from-textfield-outwards.html
1097
1098         * editing/Selection.cpp:
1099         (WebCore::Selection::adjustForEditableContent): Added code to handle the case
1100         where the selection starts (resp. ends) in the last (resp. first) visual position
1101         inside an editable root.
1102         * editing/htmlediting.cpp:
1103         (WebCore::comparePositions): Fixed the case of comparing a position inside a shadow
1104         tree with a position in the shadow ancestor.
1105         * rendering/RenderBlock.cpp:
1106         (WebCore::RenderBlock::positionForCoordinates): For coordinates outside a replaced
1107         object, return the position just before (after) the element if the coordinates are above or
1108         to the left (below or to the right).
1109         * rendering/RenderObject.cpp:
1110         (WebCore::RenderObject::caretMaxOffset): Changed to return 1 for replaced objects.
1111         * rendering/RenderText.cpp:
1112         (WebCore::RenderText::positionForCoordinates): Changed to return the last position
1113         in the lowest text box if the y coordinate is below all text boxes.
1114
1115 2006-07-21  Geoffrey Garen  <ggaren@apple.com>
1116
1117         Reviewed by Darin.
1118         
1119         - Fixed <rdar://problem/4507265> REGRESSION: overlays don't work on 
1120         HousingMaps.com (Google Maps-based site)
1121         
1122         - Made style.filter undetectable, like document.all.
1123         
1124         Unfortunately, the SVG spec-makers invented a CSS attribute named 'filter',
1125         which conflicts with IE's custom CSS attribute by the same name. Web programs 
1126         like the Google maps API test for style.filter, and assume it's the IE 
1127         style.filter if they find it, so we need to make style.filter undetectable 
1128         to avoid breaking them.
1129         
1130         An alternative solution would be to hotwire a delorean, go back in time,
1131         and beg the web standards makers to make standards that work on the web.
1132
1133         * bindings/js/kjs_css.cpp:
1134         (KJS::DOMCSSStyleDeclaration::cssPropertyGetter):
1135
1136 2006-07-20  Justin Garcia  <justin.garcia@apple.com>
1137
1138         Reviewed by john
1139         
1140         <rdar://problem/4641033>
1141         REGRESSION: Pasting from web pages into Mail (or Blot) often loses most of the content
1142         
1143         * editing/markup.cpp:
1144         (WebCore::createMarkup): We surround the currently accumulated markup with markup 
1145         for ancestors of the startNode when the pre-order traversal leaves the trees rooted 
1146         at those ancestors.  We assumed that any ancestors of the current node not in the 
1147         ancestorsToClose list were those kind of ancestors.  But we don't add renderer-less 
1148         containers to the ancestorsToClose list.  So, we were incorrectly surrounding the 
1149         currently accumulated markup with markup for render-less containers.  Most of the
1150         content at apple.com was being put inside an <optgroup> inside a <select> element.  
1151         Then on Paste createContextualFragment would drop it.
1152
1153 2006-07-21  Anders Carlsson  <acarlsson@apple.com>
1154
1155         Reviewed by Geoff.
1156
1157         * dom/Document.h:
1158         (WebCore::Document::):
1159         * dom/EventTargetNode.cpp:
1160         (WebCore::EventTargetNode::addEventListener):
1161         * page/FrameView.cpp:
1162         (WebCore::FrameView::layout):
1163         * rendering/RenderLayer.cpp:
1164         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
1165         Only dispatch overflowchanged events if overflowchanged event listeners have been registered on the document.
1166
1167 2006-07-20  Anders Carlsson  <acarlsson@apple.com>
1168
1169         Reviewed by Geoff.
1170
1171         <rdar://problem/4637807> REGRESSION: "Features & Options" page at volvocars.us fails
1172
1173         * xml/XSLTProcessor.cpp:
1174         (WebCore::xsltParamArrayFromParameterMap):
1175         Turns out parameters never worked. String parameters need to be escaped so we create a transform context,
1176         add the parameters to it quoted and then use xsltApplyStylesheetUser which lets us pass the transform context to it.
1177         This also works around a bug in libxslt where a hash table isn't allocated.
1178
1179 2006-07-20  Alice Liu  <alice.liu@apple.com>
1180
1181         Reviewed by Tim Omernick.
1182
1183         Fixed <rdar://problem/4621649> repro crash: Upload link causes crash on pages.google.com in Frame::nodeForWidget
1184         added manual test because there is no way to change the value of an <input type=file> via the DOM.  It's not supported because it's a security risk. 
1185
1186         * manual-tests/remove-input-file-onchange.html: Added.
1187         * platform/mac/FileButtonMac.mm:
1188         (-[WebFileChooserButton chooseFilename:]):
1189         swapped the calls to changeFilename and bridgeForWidget because changeFilename will destroy the widget that is accessed in bridgeForWidget 
1190
1191 2006-07-20  Alice Liu  <alice.liu@apple.com>
1192
1193         Reviewed by Adele.
1194
1195         Fixed <rdar://problem/4532113> REGRESSION (NativeTextField): Crash occurs after modifying field then reloading page -[FormDelegate frameLayoutHasChanged:]
1196         added a manual test because of the need to use AutoFill.
1197
1198         * dom/Node.h:
1199         (WebCore::Node::aboutToUnload):
1200         added virtual function prototype
1201         * html/HTMLInputElement.cpp:
1202         (WebCore::HTMLInputElement::aboutToUnload):
1203         added implementation that sends textFieldDidEndEditing notification
1204         * html/HTMLInputElement.h:
1205         added virtual function prototype
1206         * manual-tests/input-type-file-autocomplete-frame-1.html: Added.
1207         * manual-tests/input-type-file-autocomplete-frame-2.html: Added.
1208         * manual-tests/input-type-file-autocomplete-refresh.html: Added.
1209         * page/Frame.cpp:
1210         (WebCore::Frame::stopLoading):
1211         before unloading, call aboutToUnload on the current focused node
1212
1213 2006-07-20  Brady Eidson  <beidson@apple.com>
1214
1215         Reviewed by Maciej
1216
1217         fixed <rdar://problem/4611303> REGRESSION: repro crash in WebCore::EventTargetNode::dispatchWindowEvent at aeropostale.com
1218         There was an attempt to deref an EventListener that got cleaned up in GC.  Changing Document's EventListener list from 
1219         vanilla ptrs to refptrs to prevent GC, following EventTargetNode's proven example.
1220
1221         * dom/Document.cpp:
1222         (WebCore::Document::Document):
1223         (WebCore::Document::clear):
1224         (WebCore::Document::handleWindowEvent):
1225         (WebCore::Document::getHTMLWindowEventListener):
1226         (WebCore::Document::removeHTMLWindowEventListener):
1227         (WebCore::Document::removeWindowEventListener):
1228         (WebCore::Document::hasWindowEventListener):
1229         Changed all of the list iterators to work with RefPtrs instead of vanilla ptrs
1230
1231         * dom/Document.h:
1232         Changed the EventListener list to be a vanilla pointer list to a refptr list
1233
1234 2006-07-20  John Sullivan  <sullivan@apple.com>
1235
1236         Reviewed by Maciej
1237
1238         - WebCore part of fix for:
1239         <rdar://problem/4557386> REGRESSION (419.3-521.19): repro Safari world leak involving 
1240         closing tabs after clicking in a web page
1241         
1242         * bridge/mac/WebCoreFrameBridge.h:
1243         (-[WebCoreFrameBridge textViewWasFirstResponderAtMouseDownTime:])
1244         renamed to be more specific (formerly wasFirstResponderAtMouseDownTime:)
1245         * bridge/mac/FrameMac.mm:
1246         (WebCore::FrameMac::passMouseDownEventToWidget):
1247         updated for name change
1248
1249 2006-07-19  Alexey Proskuryakov  <ap@nypop.com>
1250
1251         Reviewed by Darin.
1252
1253         Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8272
1254         Use of window.open & window.close can cause crash
1255
1256         * platform/PlatformMouseEvent.h:
1257         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
1258         * platform/mac/PlatformMouseEventMac.mm:
1259         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
1260         The default constructor now creates a "zero" event, and a new one was added to create the "current" one.
1261
1262         * bridge/mac/FrameMac.mm:
1263         (WebCore::FrameMac::handleMouseMoveEvent):
1264         * rendering/RenderFormElement.cpp:
1265         (WebCore::RenderFormElement::clicked): 
1266         Updated for the above changes.
1267
1268         * platform/gdk/MouseEventGdk.cpp:
1269         * platform/gdk/TemporaryLinkStubs.cpp:
1270         (PlatformMouseEvent::PlatformMouseEvent):
1271         * platform/win/MouseEventWin.cpp:
1272         * platform/win/TemporaryLinkStubs.cpp:
1273         (PlatformMouseEvent::PlatformMouseEvent):
1274         Trying not to break other platforms.
1275
1276         * manual-tests/invalid-mouse-event.html: Added.
1277
1278 2006-07-20  Maciej Stachowiak  <mjs@apple.com>
1279         
1280         Reviewed by Anders.
1281
1282         - delete line that I only commented in the last patch - meant to do this before landing
1283
1284         * html/HTMLFrameElement.cpp:
1285         (WebCore::HTMLFrameElement::close): 
1286
1287 2006-07-19  Maciej Stachowiak  <mjs@apple.com>
1288
1289         Reviewed by Geoff.
1290
1291         - fixed <rdar://problem/4634484> REGRESSION: Project Change Request form should have vertical scroll bar, but doesn't
1292         
1293         I couldn't figure out how to make an automated test case for this,
1294         or even a manual one. It seems to be timing-related in some way.
1295
1296         * html/HTMLFrameElement.cpp:
1297         (WebCore::HTMLFrameElement::close): detach the child frame from
1298         its element, not the frame containing this element.
1299
1300 2006-07-20  Anders Carlsson  <acarlsson@apple.com>
1301
1302         Reviewed by Darin.
1303
1304         * bridge/mac/FrameMac.mm:
1305         (WebCore::FrameMac::nextKeyViewInFrame):
1306         Hold a ref to the node in case it gets destroyed by an event handler.
1307
1308 2006-07-19  Mark Rowe  <opendarwin.org@bdash.net.nz>
1309
1310         Reviewed by Darin.
1311
1312         http://bugzilla.opendarwin.org/show_bug.cgi?id=10021
1313         Bug 10021: REGRESSION: Stack overflow due to infinite recursion in 
1314         Image::checkForSolidColor
1315
1316         * platform/Image.cpp:
1317         (WebCore::Image::cacheFrame): Don't call checkForSolidColor unless 
1318         the frame was decoded successfully.
1319
1320 2006-07-19  Adele Peterson  <adele@apple.com>
1321
1322         Reviewed by Maciej.
1323
1324         - Fix for: 
1325         <rdar://problem/4422657> REGRESSION: member name field or password field should have focus after loading webmail.mac.com (7405)
1326         http://bugzilla.opendarwin.org/show_bug.cgi?id=7405
1327
1328         <rdar://problem/4614181> REGRESSION: Crash in WebCore::RenderTextField::text() when quoting post at the Ars Technica forum (9707)
1329         http://bugzilla.opendarwin.org/show_bug.cgi?id=9707
1330
1331         Needs an http test. (http://bugzilla.opendarwin.org/show_bug.cgi?id=10020)
1332
1333         These bugs were both cases where focus() was called on an element which didn't have a renderer yet because stylesheets hadn't finished loading yet.
1334         Now, we detect this case and let setFocusNode be called.  And when the stylesheet finishes loading, and the element attaches, a timer will fire, 
1335         which will cause the correct selection & scrolling behavior to occur. 
1336
1337         This fix removes selection and scrolling behavior from the focus method.  This code is now in a new method, updateFocusAppearance.
1338         updateFocusAppearance can now be called directly from focus(), but it can also be called when a timer fires.  This timer gets set
1339         up when an element attaches, and its already been focused by the focus method.  We have to use a timer, because updateFocusAppearance can cause
1340         a layout to happen, and we don't want that to happen in the middle of attach().
1341
1342         * bindings/objc/DOM.mm: (-[DOMElement isFocused]): Added SPI for autofill.
1343         * bindings/objc/DOMPrivate.h:
1344
1345         * dom/Element.cpp:
1346         (WebCore::Element::Element): Initializes timer and needFocusAppearanceUpdate bool.
1347         (WebCore::Element::attach): Checks needsFocusAppearanceUpdate, and if the node is focused, then starts the timer.
1348         (WebCore::Element::focus): Updated to check supportsFocus before calling setFocusNode, 
1349         and only requiring the element to be focusable now before updating focus appearance.
1350         (WebCore::Element::updateFocusAppearance): Added. Separates the selection, and the scrolling from focusing the node.
1351         (WebCore::Element::updateFocusAppearanceTimerFired): Stops the timer, and if the element is focusable, calls updateFocusAppearance.
1352         (WebCore::Element::stopUpdateFocusAppearanceTimer):  Cancels timer, and setsNeedsFocusAppearanceUpdate(false).
1353         (WebCore::Element::detach): Calls stopUpdateFocusAppearanceTimer.
1354         (WebCore::Element::blur): ditto.
1355         * dom/Element.h:
1356         (WebCore::Element::needsFocusAppearanceUpdate): Added so the timer only fires when focus() methods have caused an element to be focused.
1357         (WebCore::Element::setNeedsFocusAppearanceUpdate): Added so focus methods can set this flag.
1358
1359         * dom/Node.h: (WebCore::Node::supportsFocus): Added.  Base class just calls isFocusable.
1360         * html/HTMLAnchorElement.h: Added supportsFocus.
1361         * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::supportsFocus): Added. Checks for the case where stylesheets haven't loaded yet,
1362         so we can still focus the node without a renderer, and when it gets a renderer, we'll update the focus appearance.
1363         * html/HTMLGenericFormElement.h: (WebCore::HTMLGenericFormElement::supportsFocus): ditto.
1364         * html/HTMLGenericFormElement.cpp: Removed include of Document.h since this is now in the header.
1365
1366         * html/HTMLInputElement.cpp:
1367         (WebCore::HTMLInputElement::focus): Updated to check supportsFocus before calling setFocusNode, 
1368         and only requiring the element to be focusable now before updating focus appearance.
1369         (WebCore::HTMLInputElement::updateFocusAppearance): Added. Separates the selection, and the scrolling from focusing the node.
1370         * html/HTMLInputElement.h:
1371
1372         * html/HTMLTextAreaElement.cpp:
1373         (WebCore::HTMLTextAreaElement::focus): Updated to check supportsFocus before calling setFocusNode, 
1374         and only requiring the element to be focusable now before updating focus appearance.
1375         (WebCore::HTMLTextAreaElement::updateFocusAppearance): Added. Separates the selection, and the scrolling from focusing the node.
1376         * html/HTMLTextAreaElement.h:
1377
1378 2006-07-19  Justin Garcia  <justin.garcia@apple.com>
1379
1380         Reviewed by levi
1381         
1382         <rdar://problem/4631972>
1383         REGRESSION: Mail crashes when pasting entire contents of http://www.apple.com/support/ into a new mail message
1384
1385         * dom/Position.cpp:
1386         (WebCore::Position::upstream): Deployed isBlock and enclosingBlock.
1387         (WebCore::Position::downstream): Ditto.
1388         * editing/CompositeEditCommand.cpp:
1389         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): Ditto.
1390         * editing/htmlediting.cpp:
1391         (WebCore::canHaveChildrenForEditing): Added !iframe.
1392         (WebCore::isBlock): Added, returns !node->renderer()->isInline()
1393         (WebCore::enclosingBlock): Added.
1394         * editing/htmlediting.h:
1395
1396 2006-07-19  Anders Carlsson  <acarlsson@apple.com>
1397
1398         Reviewed by Adele.
1399
1400         <rdar://problem/4631272> REGRESSION: Crash tabbing out of hostname field at autorestore.apple.com
1401         
1402         * bridge/mac/FrameMac.mm:
1403         (WebCore::FrameMac::nextKeyViewInFrame):
1404         Take into account that focus handlers can cause a node's renderer to be destroyed.
1405         
1406 2006-07-19  David Hyatt  <hyatt@apple.com>
1407
1408         Fix for 4638376.  The 1x1 solid color image optimization was broken when
1409         I re-architected image.  This patch restores the optimization for CG.  Cairo
1410         will still need the optimization.
1411
1412         Reviewed by darin
1413
1414         WARNING: NO TEST CASES ADDED OR CHANGED (need test cases still)
1415
1416         * platform/Image.cpp:
1417         (WebCore::Image::Image):
1418         (WebCore::Image::invalidateData):
1419         (WebCore::Image::cacheFrame):
1420         * platform/Image.h:
1421         (WebCore::Image::setIsPDF):
1422         * platform/cairo/ImageCairo.cpp:
1423         (WebCore::Image::checkForSolidColor):
1424         * platform/mac/ImageMac.mm:
1425         (WebCore::Image::initNativeData):
1426         (WebCore::Image::invalidateNativeData):
1427         (WebCore::Image::checkForSolidColor):
1428         (WebCore::Image::draw):
1429         (WebCore::Image::drawTiled):
1430
1431 2006-07-19  Justin Garcia  <justin.garcia@apple.com>
1432
1433         Reviewed by levi
1434         
1435         <rdar://problem/4613519>
1436         REGRESSION: Pasting text in native text area inserts text one character before it should (9527)
1437
1438         * editing/InsertParagraphSeparatorCommand.cpp:
1439         (WebCore::InsertParagraphSeparatorCommand::doApply): Turn into an InsertLineBreakCommand instead of bailing
1440         if the enclosingBlockFlowElement doesn't have a parent.
1441
1442 2006-07-19  David Harrison  <harrison@apple.com>
1443
1444         Reviewed by Tim Hatcher.
1445
1446         <rdar://problem/4629307> -[DOMRange markupString] does not include the initial table element if it is at the beginning of the range
1447         <rdar://problem/4062218> pasting in contents of web.apple.com strips off the <table> element from the first table
1448         
1449         Better patch than previous checkin.
1450
1451         * test: editing/pasteboard/paste-table-003.html
1452         
1453         * editing/markup.cpp:
1454         (WebCore::createMarkup):
1455         Make sure to include the table when including a tbody.
1456
1457 === Safari-521.19 ===
1458
1459 2006-07-19  David Harrison  <harrison@apple.com>
1460
1461         Reviewed by Tim Hatcher.
1462
1463         <rdar://problem/4629307> -[DOMRange markupString] does not include the initial table element if it is at the beginning of the range
1464
1465         No test case as this can only be reproduced through ObjC APIs.
1466
1467         * editing/markup.cpp:
1468         (WebCore::createMarkup):
1469         Adjust the range for ancestor markup handling when main loop skips first node.
1470
1471 2006-07-18  David Hyatt  <hyatt@apple.com>
1472
1473         Fix for radar 4611287, make resizable text fields opt-in rather than
1474         opt-out.  Open source users will need to write the pref into their defaults
1475         to see the resizers on textareas now.
1476
1477         Reviewed by mjs and adele
1478
1479         * WebCore.xcodeproj/project.pbxproj:
1480         * bridge/mac/WebCoreSettings.mm:
1481         (-[WebCoreSettings setTextAreasAreResizable:]):
1482         * css/cssparser.cpp:
1483         (WebCore::CSSParser::parseValue):
1484         * css/cssstyleselector.cpp:
1485         (WebCore::CSSStyleSelector::applyProperty):
1486         * css/html4.css:
1487
1488 2006-07-18  Anders Carlsson  <acarlsson@apple.com>
1489
1490         Reviewed by Darin.
1491
1492         http://bugzilla.opendarwin.org/show_bug.cgi?id=9959
1493         REGRESSION: iframes stop rendering after 200th one on successive reloads
1494         
1495         * html/HTMLFrameElement.cpp:
1496         (WebCore::HTMLFrameElement::attach):
1497         (WebCore::HTMLFrameElement::close):
1498         * html/HTMLIFrameElement.cpp:
1499         (WebCore::HTMLIFrameElement::insertedIntoDocument):
1500         (WebCore::HTMLIFrameElement::willRemove):
1501         Remove calls to incrementFrameCount and decrementFrameCount.
1502         
1503         * page/Frame.cpp:
1504         (WebCore::Frame::Frame):
1505         Call incrementFrameCount here.
1506         
1507         (WebCore::Frame::~Frame):
1508         Call disconnectOwnerElement.
1509         
1510         (WebCore::Frame::disconnectOwnerElement):
1511         Call decrementFrameCount here.
1512         
1513 2006-07-18  Alexey Proskuryakov  <ap@nypop.com>
1514
1515         Reviewed by Darin.
1516
1517         Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9013
1518         Let correct CSS custom cursor declarations parse
1519
1520         * css/cssparser.cpp:
1521         (WebCore::CSSParser::parseValue): Ignore any values following a custom CSS cursor URI, instead of
1522         requiring that it is the only one in the list (which is actually illegal, according to the spec). 
1523         This is only a temporary hack, with a real implementation to follow in bug 6001/6002.
1524
1525         * manual-tests/custom-cursors.html: Added a test for this issue.
1526         * manual-tests/resources/helpCursor.tiff: A cursor image used in the test.
1527
1528 2006-07-18  Timothy Hatcher  <timothy@apple.com>
1529
1530         Reviewed by Anders.
1531         
1532         <rdar://problem/4636216> NetNewsWire fails to launch on 9A224 - missing symbols
1533         
1534         WebCore needs to add -sub_library libobjc to maintain
1535         backwards compatibility with binaries linked with WebKit
1536         before JavaScriptCore moved out of WebKit.
1537
1538         * WebCore.xcodeproj/project.pbxproj:
1539
1540 2006-07-18  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1541
1542         Reviewed by Justin.
1543
1544         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9978
1545           REGRESSION (r12949-r12988): Clicking the first letter on a line places the caret at the end of the previous line
1546
1547         Test: editing/selection/click-start-of-line.html
1548
1549         * rendering/RenderText.cpp:
1550         (WebCore::RenderText::positionForCoordinates): Changed to return downstream
1551         affinity if the x coordinate is to the left of the middle of the first character
1552         in the text box.
1553
1554 2006-07-18  Anders Carlsson  <acarlsson@apple.com>
1555
1556         Reviewed by Darin.
1557
1558         http://bugzilla.opendarwin.org/show_bug.cgi?id=9695
1559         <rdar://problem/4614085> 
1560         TOT REGRESSION: NativeTextArea: Text area does not respond to Cmd-UpArrow/Cmd-DownArrow (9695)
1561         
1562         * editing/SelectionController.cpp:
1563         (WebCore::SelectionController::modifyExtendingRightForward):
1564         (WebCore::SelectionController::modifyMovingRightForward):
1565         (WebCore::SelectionController::modifyExtendingLeftBackward):
1566         (WebCore::SelectionController::modifyMovingLeftBackward):
1567         If the caret is inside an editable region, the beginning/end of the document should actually be the
1568         beginning/end of the editable region.
1569
1570 2006-07-17  Tim Omernick  <timo@apple.com>
1571
1572         Reviewed by Maciej.
1573
1574         <rdar://problem/4612079> need a way to prevent pages from scrolling to reveal elements that are focused
1575         by script
1576
1577         * bridge/mac/WebCoreFrameBridge.h:
1578         * bridge/mac/WebCoreFrameBridge.mm:
1579         (-[WebCoreFrameBridge setProhibitsScrolling:]):
1580         * page/Frame.cpp:
1581         (WebCore::Frame::prohibitsScrolling):
1582         (WebCore::Frame::setProhibitsScrolling):
1583         * page/Frame.h:
1584         * page/FramePrivate.h:
1585         (WebCore::FramePrivate::FramePrivate):
1586         * page/FrameView.cpp:
1587         (WebCore::FrameView::scrollPointRecursively):
1588         (WebCore::FrameView::setContentsPos):
1589         * page/FrameView.h:
1590         * platform/ScrollView.h:
1591
1592 2006-07-17  Maciej Stachowiak  <mjs@apple.com>
1593
1594         Reviewed by Dave Harrison.
1595         
1596         - fixed <rdar://problem/4618089> Blot crashes when I paste in all the contents of http://www.apple.com/startpage/
1597
1598         * editing/htmlediting.cpp:
1599         (WebCore::editingIgnoresContent):
1600
1601 2006-07-17  Justin Garcia  <justin.garcia@apple.com>
1602
1603         Reviewed by levi
1604         
1605         <rdar://problem/4621728>
1606         REGRESSION: Selecting by dragging down creates selection in wrong direction, with certain steps
1607         <rdar://problem/4604932>
1608         REGRESSION: Dragging too far left on a line will select all lines above it.
1609  
1610         No layout test because of 9980.
1611
1612         * rendering/RenderBlock.cpp:
1613         (WebCore::RenderBlock::positionForCoordinates): Don't return positions inside editable roots
1614         for coordinates outside those roots, except for coordinates outside a document that is entirely 
1615         editable.
1616
1617 2006-07-17  Timothy Hatcher  <timothy@apple.com>
1618
1619         Reviewed by Darin.
1620
1621         <rdar://problem/4635281> JSCanvasRenderingContext2D::drawImage needs to initialize the exception code to zero
1622
1623         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
1624         (WebCore::JSCanvasRenderingContext2D::drawImage): initialize ec to zero
1625         * html/CanvasRenderingContext2D.cpp:
1626         (WebCore::CanvasRenderingContext2D::drawImage): initialize ec before earlier return
1627
1628 2006-07-17  Timothy Hatcher  <timothy@apple.com>
1629
1630         Reviewed by Maciej.
1631
1632         <rdar://problem/4634874> WebScriptObject and WebUndefined are no longer defined by WebKit
1633
1634         Moves WebScriptObject and WebUndefined to WebCore.
1635
1636         * WebCore.exp:
1637         * WebCore.xcodeproj/project.pbxproj:
1638         * bindings/objc/DOM.mm:
1639         * bindings/objc/DOMCore.h:
1640         * bindings/objc/DOMInternal.mm:
1641         * bindings/objc/DOMUtility.mm:
1642         * bindings/objc/WebScriptObject.mm: Added.
1643         (+[WebUndefined allocWithZone:]):
1644         (-[WebUndefined initWithCoder:]):
1645         (-[WebUndefined encodeWithCoder:]):
1646         (-[WebUndefined copyWithZone:]):
1647         * bindings/objc/WebScriptObjectPrivate.h: Added.
1648         * bridge/mac/FrameMac.mm:
1649         * bridge/mac/WebCoreScriptDebugger.mm:
1650
1651 2006-07-17  David Hyatt  <hyatt@apple.com>
1652
1653         Back out the fix for 5564, since it turns out font:x-small; is a pretty
1654         prominent IE-specific CSS hack.  Because Web sites rely on IE's incorrect
1655         font parsing as a means of also correcting IE's incorrect font size rules.
1656
1657         This fixes Yahoo.com.
1658
1659         Reviewed by darin
1660
1661         * css/cssparser.cpp:
1662         (WebCore::CSSParser::parseFont):
1663
1664 2006-07-17  Justin Garcia  <justin.garcia@apple.com>
1665
1666         Reviewed by levi
1667         
1668         <rdar://problem/4618389> REGRESSION: After applying a link to the last word of a sentence, a new selection is created at the start of the sentence
1669         
1670         * dom/Document.cpp:
1671         (WebCore::Document::updateSelection):
1672
1673 2006-07-17  Maciej Stachowiak  <mjs@apple.com>
1674
1675         Reviewed by Beth.
1676         
1677         <rdar://problem/4604946> REGRESSION: 'checkboxRef.checked = true' fires onchange event in Leopard
1678
1679         * html/HTMLInputElement.cpp:
1680         (WebCore::HTMLInputElement::setChecked):
1681         (WebCore::HTMLInputElement::preDispatchEventHandler):
1682         * html/HTMLInputElement.h:
1683
1684 2006-07-16  David Kilzer  <ddkilzer@kilzer.net>
1685
1686         Reviewed by Darin.
1687
1688         - fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9954
1689           REGRESSION: document.dir should return empty string in <head>
1690
1691         Test: fast/dom/document-dir-property.html
1692
1693         * bindings/js/kjs_html.cpp:
1694         (KJS::JSHTMLDocument::getValueProperty): Return an empty string instead of an
1695         undefined value for an unset document.dir property.
1696
1697 2006-07-16  David Kilzer  <ddkilzer@kilzer.net>
1698
1699         Reviewed by Darin.
1700
1701         * dom/NodeFilter.idl:
1702         Removed "No newline at end of file" that snuck in as part of the "apply patch" process.
1703         * manual-tests/input-empty-on-focus.html:
1704         Removed "Property changes" that snuck in as part of the "apply patch" process.
1705
1706 2006-07-16  Darin Adler  <darin@apple.com>
1707
1708         Reviewed by John Sullivan.
1709
1710         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9943
1711           <rdar://problem/4590613>
1712           REGRESSION (Tiger-TOT): menus are offset to the right at http://movies.aol.com/movie-photo-bts/superman-returns
1713
1714         The problem turns out to be the fact that body.offsetLeft is returning a non-zero value.
1715         I have no idea why the menus worked in Tiger Safari, because body.offsetLeft behavior has not changed.
1716         Presumably some other bug that we fixed had been compensating.
1717
1718         Test: fast/html/body-offset-properties.html
1719
1720         * rendering/RenderObject.cpp:
1721         (WebCore::RenderObject::offsetLeft): Always return 0 for any object without an offsetParent.
1722         (WebCore::RenderObject::offsetTop): Ditto.
1723         (WebCore::RenderObject::offsetParent): Return 0 for the body (treat as a special case).
1724
1725 2006-07-16  Beth Dakin  <bdakin@apple.com>
1726
1727         Reviewed by Maciej.
1728
1729         Fix for <rdar://problem/4616595> REGRESSION: Problems with world 
1730         clock widget clock hand motion on 9A211 + 4604574
1731
1732         The second hand on the widget was jiggling because the rotation was 
1733         messing up the use of the affine transformation matrix while 
1734         rounding to pixel boundaries in device space. We are mainly 
1735         concerned with rounding to pixel boundaries with the scale in mind, 
1736         so this patch extracts the scale to device space from the matrix, 
1737         and rounds to pixel boundaries using only the scale. This doesn't 
1738         seem like it is a perfect solution, but it definitely solves the 
1739         immediate problem. We will probably need to re-address what should 
1740         happen to avoid pixel cracks with rotations at non-integral scale 
1741         factors. 
1742
1743         * platform/cg/GraphicsContextCG.cpp:
1744         (WebCore::GraphicsContext::roundToDevicePixels):
1745
1746 2006-07-15  Darin Adler  <darin@apple.com>
1747
1748         - fix mistake from fix for 8952 that was breaking layout tests
1749
1750         * editing/SelectionController.cpp: (WebCore::SelectionController::nodeWillBeRemoved):
1751         Justin was right! I changed the behavior of the function by accident. Changed it
1752         back so that it doesn't blow away the selection on the DOM side in the case where
1753         it didn't before.
1754
1755         I will write 100 times on the blackboard: "When Justin says something about editing,
1756         assume he is right."
1757
1758 2006-07-15  Darin Adler  <darin@apple.com>
1759
1760         - try to fix Windows build
1761
1762         * WebCore.vcproj/WebCore/WebCore.vcproj: Added StreamingTextDecoderICU.cpp/h.
1763
1764 2006-07-15  Darin Adler  <darin@apple.com>
1765
1766         Reviewed by John Sullivan.
1767
1768         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8952
1769           <rdar://problem/4575185>
1770           REGRESSION: crash on drag of highlighted Google custom home page modules
1771
1772         Test: fast/dynamic/move-node-with-selection.html
1773
1774         * editing/SelectionController.cpp: (WebCore::SelectionController::nodeWillBeRemoved):
1775         Call updateRendering before calling clearSelection(), since it's important to do any
1776         work beforehand, and there are calls inside clearSelection that will indirectly do an
1777         updateRendering. Also change code to make fewer assumptions about object lifetime.
1778
1779 2006-07-15  Darin Adler  <darin@apple.com>
1780
1781         Reviewed by John Sullivan.
1782
1783         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8587
1784           <rdar://problem/4631844>
1785           REGRESSION: {display:list-item} on items outside an ol or ul element no longer causes incremental numbering
1786
1787         Test: fast/lists/numeric-markers-outside-list.html
1788
1789         * rendering/RenderListItem.cpp: (WebCore::previousListItem):
1790         Look for list items, even when we're outside any list.
1791
1792 2006-07-15  Adele Peterson  <adele@apple.com>
1793
1794         Reviewed by John.
1795
1796         - Fix for <rdar://problem/4593970> REGRESSION (NativeTextField): autofill menu disappears after typing a 2nd character
1797
1798         This was caused by composite editing commands, (like typing or pasting) that include a DeleteCommand, being
1799         interpreted by the form delegate as an actual delete.  This fix doesn't notify the form delegate if the deletion is
1800         part of an editing command to replace the selected text.
1801
1802         * editing/DeleteSelectionCommand.h: Added m_replace to keep track of whether this deletion is 
1803           part of a composite command to replace the text being deleted.
1804         * editing/DeleteSelectionCommand.cpp:
1805         (WebCore::DeleteSelectionCommand::DeleteSelectionCommand): Initialize m_replace.
1806         (WebCore::DeleteSelectionCommand::doApply): Only notify the form delegate of the deletion if the text is not being replaced.
1807         * editing/CompositeEditCommand.h:
1808         * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::deleteSelection): 
1809           Added replace argument to construct DeleteSelectionCommand.
1810           
1811         * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::input): Call deleteSelection with replace argument.
1812         * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply): ditto.
1813
1814 2006-07-15  Geoffrey Garen  <ggaren@apple.com>
1815
1816         Reviewed by Maciej, tweaked to match Darin's patch.
1817         
1818         - Fixed <rdar://problem/4631837> REGRESSION: Reproducible crash on 
1819         FCKeditor demo (9911)
1820         
1821         * WebCore.xcodeproj/project.pbxproj:
1822         * bindings/js/kjs_html.cpp:
1823         (KJS::JSHTMLDocument::putValueProperty): Check for a null body element before
1824         forwarding the put request to it. I confirmed that no other parts of the 
1825         file use 'body' or 'bodyElement' without checking for null. 
1826         
1827         Also, use 'body' rather than 'bodyElement' because dir can bet set on 
1828         any element, not just HTMLBodyElement.
1829
1830 2006-07-15  Darin Adler  <darin@apple.com>
1831
1832         Reviewed by Adele.
1833
1834         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8871
1835           <rdar://problem/4575417>
1836           REGRESSION: Pressing Enter/Return in a text input removes the selected text
1837
1838         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9743
1839           <rdar://problem/4614228>
1840           REGRESSION: crash dispatching JavaScript-created keyboard event to input element
1841
1842         * bridge/mac/FrameMac.mm: (WebCore::FrameMac::doTextFieldCommandFromEvent):
1843         Add a null check to fix the crash, and a FIXME explaining why this is not necessarily
1844         enough for the future.
1845
1846         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler):
1847         Consume Enter key keypress events even if the element is not in a form.
1848
1849         * platform/mac/KeyEventMac.mm: (WebCore::keyIdentifierForKeyEvent): Added \n to the
1850         characters that turn into "Enter". Actual keyboard events always are \r or \003 on
1851         the Macintosh, but in layout tests we can use \n, and everything other than the
1852         code path here works, so worth fixing.
1853
1854 2006-07-15  Darin Adler  <darin@apple.com>
1855
1856         Reviewed by John Sullivan.
1857
1858         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9883
1859           <rdar://problem/4631821>
1860           REGRESSION: NativePopups don't work correctly in some forum software
1861
1862         Test: fast/forms/select-selected.html
1863
1864         * rendering/RenderMenuList.h:
1865         * rendering/RenderMenuList.cpp:
1866         (WebCore::RenderMenuList::updateFromElement): Added code to map the selected option
1867         index to a list index before using it to index into the list.
1868         (WebCore::RenderMenuList::showPopup): Added code to map the selection option index
1869         to a list index before passing it to the menu renderer.
1870         (WebCore::RenderMenuList::valueChanged): Added code to map the list index back to a
1871         option index before calling setSelectedIndex (that function takes an option index).
1872
1873 2006-07-15  Darin Adler  <darin@apple.com>
1874
1875         Reviewed by John Sullivan.
1876
1877         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9928
1878           REGRESSION: Text Encoding menu inoperative (after gcc protocol build fix)
1879
1880         * bindings/objc/DOM.mm:
1881         (-[DOMNode addEventListener:::]): Moved into DOMEventTarget category.
1882         (-[DOMNode removeEventListener:::]): Ditto.
1883         (-[DOMNode dispatchEvent:]): Ditto.
1884
1885         * WebCore.xcodeproj/project.pbxproj: Allow Xcode to do its thing.
1886
1887 2006-07-15  Maciej Stachowiak  <mjs@apple.com>
1888
1889         Reviewed by Anders.
1890
1891         <rdar://problem/4632144> REGRESSION: table column tests failing as a result of very recent fix
1892
1893         * rendering/RenderTable.cpp:
1894         (WebCore::RenderTable::addChild): columns and colgroups are valid children of a table too, not
1895         just table sections!
1896
1897 2006-07-15  Anders Carlsson  <acarlsson@apple.com>
1898
1899         Reviewed by Darin.
1900
1901         http://bugzilla.opendarwin.org/show_bug.cgi?id=9866
1902         <rdar://problem/4631561>
1903         REGRESSION: Repro crash from mangleme using iframe, only from server.
1904         
1905         * html/HTMLIFrameElement.cpp:
1906         (WebCore::HTMLIFrameElement::attach):
1907         Add null check for contentFrame() since content frames won't be created for invalid URLs.        
1908
1909 2006-07-14  Alexey Proskuryakov  <ap@nypop.com>
1910
1911         Reviewed by Darin.
1912
1913         Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=4195
1914         REGRESSION: KOI8-U encoding no longer supported.
1915
1916         Tests:
1917         * http/tests/misc/BOM-override.pl
1918         * http/tests/misc/BOM-override-script.html
1919         * fast/encoding/charset-koi8-u.html
1920         * fast/encoding/charset-x-nextstep.html
1921
1922         Restored a TEC code path for encodings that are not supported by ICU (but which currently
1923         passes all layout tests even by itself with ICU disabled). A lot of refactoring is 
1924         still needed - most importantly, round-tripping encoding names via CFStringEncoding 
1925         makes little sense now.
1926
1927         * WebCore.exp:
1928         * bridge/mac/WebCoreTextDecoder.h: Removed.
1929         * bridge/mac/WebCoreTextDecoder.mm: Removed.
1930         WebCoreTextDecoder was not used anywhere since WebTextView was moved into WebCore.
1931
1932         * loader/Decoder.cpp:
1933         (Decoder::Decoder):
1934         (Decoder::setEncodingName):
1935         (Decoder::decode):
1936         Use StreamingTextDecoder::create().
1937
1938         * platform/StreamingTextDecoder.cpp:
1939         (WebCore::StreamingTextDecoder::create):
1940         (WebCore::StreamingTextDecoder::~StreamingTextDecoder):
1941         * platform/StreamingTextDecoder.h:
1942         StreamingTextDecoder is just an abstract interface to implementations now.
1943
1944         * platform/StreamingTextDecoderICU.cpp: Added.
1945         (WebCore::StreamingTextDecoderICU::StreamingTextDecoderICU):
1946         (WebCore::StreamingTextDecoderICU::~StreamingTextDecoderICU):
1947         (WebCore::StreamingTextDecoderICU::releaseICUConverter):
1948         (WebCore::StreamingTextDecoderICU::textEncodingSupported):
1949         (WebCore::StreamingTextDecoderICU::convertUTF16):
1950         (WebCore::StreamingTextDecoderICU::convertIfASCII):
1951         (WebCore::StreamingTextDecoderICU::createICUConverter):
1952         (WebCore::StreamingTextDecoderICU::appendOmittingBOM):
1953         (WebCore::StreamingTextDecoderICU::convertUsingICU):
1954         (WebCore::StreamingTextDecoderICU::convert):
1955         (WebCore::StreamingTextDecoderICU::toUnicode):
1956         (WebCore::StreamingTextDecoderICU::fromUnicode):
1957         * platform/StreamingTextDecoderICU.h: Added.
1958         Renamed from StreamingTextDecoder; added a way to tell whether the encoding is actually
1959         supported by the decoder; minor cleanup.
1960
1961         * platform/TextEncoding.cpp:
1962         (WebCore::TextEncoding::effectiveEncoding): Moved from StreamingTextDecoder.
1963         (WebCore::TextEncoding::toUnicode): Use StreamingTextDecoder::create().
1964         (WebCore::TextEncoding::fromUnicode): Moved to StreamingTextDecoderICU.
1965         
1966         * platform/TextEncoding.h: Changed __APPLE__ to PLATFORM(MAC); added effectiveEncoding().
1967
1968         * platform/mac/StreamingTextDecoderMac.cpp: Added.
1969         (WebCore::StreamingTextDecoderMac::StreamingTextDecoderMac):
1970         (WebCore::StreamingTextDecoderMac::~StreamingTextDecoderMac):
1971         (WebCore::StreamingTextDecoderMac::releaseTECConverter):
1972         (WebCore::StreamingTextDecoderMac::textEncodingSupported):
1973         (WebCore::StreamingTextDecoderMac::convertUTF16):
1974         (WebCore::StreamingTextDecoderMac::convertIfASCII):
1975         (WebCore::StreamingTextDecoderMac::createTECConverter):
1976         (WebCore::StreamingTextDecoderMac::appendOmittingBOM):
1977         (WebCore::StreamingTextDecoderMac::convertOneChunkUsingTEC):
1978         (WebCore::StreamingTextDecoderMac::convertUsingTEC):
1979         (WebCore::StreamingTextDecoderMac::convert):
1980         (WebCore::StreamingTextDecoderMac::toUnicode):
1981         (WebCore::StreamingTextDecoderMac::fromUnicode):
1982         * platform/mac/StreamingTextDecoderMac.h: Added.
1983         (WebCore::StreamingTextDecoderMac::convert):
1984         This is a TEC+CFString code path for decoding, basically restored from a year-old revision.
1985
1986         * platform/mac/TextEncodingMac.cpp: Removed. Code moved to StreamingTextDecoderMac.
1987
1988         * WebCore.xcodeproj/project.pbxproj:
1989
1990 === Safari-521.17 ===
1991
1992 2006-07-14  Timothy Hatcher  <timothy@apple.com>
1993
1994         <rdar://problem/4623957> SWB: gcc-5412 (new?) objc warning causes WebCore project failure
1995
1996         Made a DOMNode category in DOMEvents.h that lets DOMNode conform to the
1997         DOMEventTarget protocol that works with GCC 5412.
1998
1999         Removed forward declarations of WebCoreWidgetHolder and imported WebCoreWidgetHolder.h.
2000
2001         Removed all <Cocoa/Cocoa.h> and <Foundation/Foundation.h> imports in other headers,
2002         we import <Cocoa/Cocoa.h> in the prefix header for ObjC.
2003
2004         * WebCore.xcodeproj/project.pbxproj:
2005         * bindings/objc/DOMCore.h:
2006         * bindings/objc/DOMEvents.h:
2007         * bridge/mac/FormDataMac.h:
2008         * bridge/mac/WebCoreAXObject.h:
2009         * bridge/mac/WebCoreCache.h:
2010         * bridge/mac/WebCoreEncodings.h:
2011         * bridge/mac/WebCoreFrameBridge.h:
2012         * bridge/mac/WebCoreFrameNamespaces.h:
2013         * bridge/mac/WebCoreJavaScript.h:
2014         * bridge/mac/WebCorePageBridge.h:
2015         * bridge/mac/WebCorePageState.h:
2016         * bridge/mac/WebCoreResourceLoader.h:
2017         * bridge/mac/WebCoreScriptDebugger.h:
2018         * bridge/mac/WebCoreSettings.h:
2019         * bridge/mac/WebCoreStringTruncator.h:
2020         * bridge/mac/WebCoreStringTruncator.mm:
2021         * bridge/mac/WebCoreTextDecoder.h:
2022         * bridge/mac/WebDashboardRegion.h:
2023         * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
2024         * platform/mac/CookieJar.mm:
2025         * platform/mac/DeprecatedStringMac.mm:
2026         * platform/mac/FontDataMac.mm:
2027         * platform/mac/FoundationExtras.h:
2028         * platform/mac/TextBoundaries.mm:
2029         * platform/mac/WebCoreHistory.h:
2030         * platform/mac/WebCoreHistory.m:
2031         * platform/mac/WebCoreKeyGenerator.h:
2032         * platform/mac/WebCoreTextArea.h:
2033         * platform/mac/WebCoreTextField.h:
2034         * platform/mac/WebCoreTextRenderer.h:
2035         * platform/mac/WebCoreView.h:
2036         * platform/mac/WebCoreWidgetHolder.h:
2037
2038 2006-07-14  Geoffrey Garen  <ggaren@apple.com>
2039
2040         Reviewed by Maciej.
2041
2042         - Updated ScriptInterpreter to work with Interpreter ref-counting in 
2043         JavaScriptCore.
2044
2045         (KJS::ScriptInterpreter::~ScriptInterpreter): Now protected to catch
2046         manual delete.
2047
2048 2006-07-14  Anders Carlsson  <acarlsson@apple.com>
2049
2050         Reviewed by Adele and Justin.
2051
2052         http://bugzilla.opendarwin.org/show_bug.cgi?id=9658
2053         <rdar://problem/4613948>
2054         REGRESSION: Check Spelling does not work in textarea elements
2055         
2056         * bridge/mac/FrameMac.mm:
2057         (WebCore::FrameMac::advanceToNextMisspelling):
2058         Don't use setStartBefore or setEndAfter on the search range because for shadow trees, there
2059         is no notion of before and after. Instead, use setStart and setEnd and pass in the start and end
2060         indices respectively.
2061         
2062         * dom/Range.cpp:
2063         (WebCore::Range::checkNodeBA):
2064         Allow range operations on shadow trees.
2065
2066         * manual-tests/form-element-spelling.html: Added.
2067
2068 2006-07-14  Beth Dakin  <bdakin@apple.com>
2069
2070         Reviewed by Hyatt.
2071
2072         Fix for <rdar://problem/4621660> REGRESSION: Safari crashing in 
2073         WebCore::FrameView::updateOverflowStatus
2074
2075         m_viewportRenderer is never initialized for framesets, and it 
2076         shouldn't be. So we just need to nil-check for it in 
2077         updateOverflowStatus() and return early.
2078
2079         * page/FrameView.cpp:
2080         (WebCore::FrameView::updateOverflowStatus): Nil check.
2081
2082 2006-07-14  Adele Peterson  <adele@apple.com>
2083
2084         RS by Darin.
2085
2086         Backing out fix for <rdar://problem/4604703> 
2087         REGRESSION (NativeTextField): Focus is not removed from password field after I ctrl-click into a different field
2088
2089         Darin had a better fix in WebKit for this.
2090
2091         * bridge/mac/FrameMac.mm: (WebCore::FrameMac::sendContextMenuEvent):
2092
2093 2006-07-14  Adele Peterson  <adele@apple.com>
2094
2095         Reviewed by Darin.
2096
2097         - Fix for <rdar://problem/4614054> REGRESSION: Safari submits forms when the Return key is hit to complete inline inputs
2098
2099         * page/Frame.h: (WebCore::Frame::inputManagerHasMarkedText): Added.
2100         * bridge/mac/FrameMac.h: ditto.
2101         * bridge/mac/FrameMac.mm: (WebCore::FrameMac::inputManagerHasMarkedText): Added. Asks the input manager if there's marked text.
2102         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler): For text fields, don't submit the form on Enter
2103         if the input manager says there's marked text.  I added this code for all text field paths.  For widgets, WebCoreTextField.mm
2104         has code to deal with this case.  But as we convert search, password, and isindex, they will need to do this check too.
2105
2106 2006-07-14  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2107
2108         Reviewed by Darin.
2109
2110         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9907
2111           REGRESSION (r15418): editing/pasteboard/paste-table-001 fails in pixel  mode
2112
2113         * rendering/RenderText.cpp:
2114         (WebCore::RenderText::caretRect): Fixed the calculation of the max/min allowed caret
2115         position.
2116
2117 2006-07-14  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2118
2119         Reviewed by Darin.
2120
2121         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9905
2122           REGRESSION (r15404-r15415): Repro crash when pressing delete in an empty editable div
2123
2124         Test: editing/deleting/delete-at-start-or-end.html
2125
2126         * editing/TypingCommand.cpp:
2127         (WebCore::TypingCommand::deleteKeyPressed): Added null check.
2128         (WebCore::TypingCommand::forwardDeleteKeyPressed): Ditto.
2129
2130 2006-07-14  David Kilzer  <ddkilzer@kilzer.net>
2131
2132         Reviewed by Geoffrey.
2133
2134         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9903
2135           Simplify logic in JSHTMLOptionsCollection::setLength() by using no-arg getNumber()
2136
2137         No test cases since there is no change in functionality.
2138
2139         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
2140         (WebCore::JSHTMLOptionsCollection::setLength):  Simplified logic by using the
2141         no-argument getNumber() method.
2142
2143 2006-07-14  Geoffrey Garen  <ggaren@apple.com>
2144
2145         Reviewed by Adele.
2146
2147         - Build fix: don't need BLOCK_OBJC_EXCEPTIONS because we already have
2148         one surrounding this function, and the nested one makes the compiler
2149         think our local variable is volatile (seems like a compiler bug to me).
2150         
2151         * bridge/mac/FrameMac.mm:
2152         (WebCore::FrameMac::sendContextMenuEvent):
2153
2154 2006-07-14  Timothy Hatcher  <timothy@apple.com>
2155
2156         Reviewed by Maciej.
2157
2158         Make JavaScriptCore a public framework. Adjusted the paths.
2159
2160         * WebCore.xcodeproj/project.pbxproj:
2161
2162 2006-07-14  Maciej Stachowiak  <mjs@apple.com>
2163
2164         Reviewed by Hyatt.
2165
2166         - fixed <rdar://problem/4567031> REGRESSION: Crash at WebCore::RenderBlock::createLineBoxes (seems to be a security hole?)
2167         
2168         I also fixed all the similar crash / assertion failure cases I could think of.
2169
2170         * dom/Node.cpp:
2171         (WebCore::Node::nextRendererWithSameParent): Helper function for some of the above.
2172         * dom/Node.h:
2173         * rendering/RenderTable.cpp:
2174         (WebCore::RenderTable::addChild): Don't allow inserting forms when not in
2175         an HTML document, since we don't need that quirk and because parsing won't
2176         do certain render tree fixups. Also watch out for case when inserting before
2177         the renderer of a misnested child.
2178         * rendering/RenderTableRow.cpp:
2179         (WebCore::RenderTableRow::addChild): ditto
2180         * rendering/RenderTableSection.cpp:
2181         (WebCore::RenderTableSection::addChild): ditto
2182
2183 2006-07-13  Adele Peterson  <adele@apple.com>
2184
2185         Reviewed by Maciej.
2186
2187         - Fix for <rdar://problem/4604703> 
2188         REGRESSION (NativeTextField): Focus is not removed from password field after I ctrl-click into a different field
2189
2190         Test:
2191         * manual-tests/password-ctrl-click-lose-focus.html: Added.
2192
2193         * bridge/mac/FrameMac.mm: (WebCore::FrameMac::sendContextMenuEvent):
2194         If we're about to set a selection in the current view, make sure its the first responder.
2195         In this case, this will cause the password field to resign first responder at the right time.
2196
2197 2006-07-13  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2198
2199         Reviewed by Hyatt.
2200
2201         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9670
2202           REGRESSION: RTL white-space:pre-wrap text is offset to the right
2203
2204         Test: fast/text/international/rtl-white-space-pre-wrap.html
2205
2206         * rendering/RenderText.cpp:
2207         (WebCore::RenderText::caretRect): Fixed LTR case and added the RTL case
2208         of clipping the caret position to the text box when the caret is after
2209         the trailing space of an autowrapped line.
2210         * rendering/bidi.cpp:
2211         (WebCore::RenderBlock::computeHorizontalPositionsForLine): Changed to truncate-
2212         to-fit the logically last text box if it contains the trailing spaces of an
2213         autowrapped line. 
2214         (WebCore::RenderBlock::bidiReorderLine): Remember the logically last text run.
2215         In the case of autowrapped text with white space that overflows beyond the line,
2216         the last text run is the one containing the overflowing white space.
2217         (WebCore::RenderBlock::findNextLineBreak): Split overflowing white space on a
2218         line that autowraps only after white space into a separate text run.
2219
2220 2006-07-13  David Harrison  <harrison@apple.com>
2221
2222         Reviewed by Dave Hyatt.
2223
2224         <rdar://problem/4624203> -webkit-highlight should be behind images
2225
2226         * rendering/RenderImage.cpp:
2227         (WebCore::RenderImage::paint):
2228         * rendering/RenderListMarker.cpp:
2229         (WebCore::RenderListMarker::paint):
2230         * rendering/RenderWidget.cpp:
2231         (WebCore::RenderWidget::paint):
2232         Call custom highlighter before painting the image, marker, or widget.
2233
2234 2006-07-13  David Harrison  <harrison@apple.com>
2235
2236         Reviewed by Justin and Levi.
2237
2238         <rdar://problem/4620743> REGRESSION: Option-Delete doesn't delete words during typing
2239
2240         * Tests:
2241         editing/deleting/delete-by-word-001.html
2242         editing/deleting/delete-by-word-002.html
2243
2244         * editing/TypingCommand.cpp:
2245         (WebCore::TypingCommand::deleteKeyPressed):
2246         (WebCore::TypingCommand::forwardDeleteKeyPressed):
2247         (WebCore::TypingCommand::doApply):
2248         * editing/TypingCommand.h:
2249         Delete and forward delete to use specified granularity.
2250         Undo of delete and forward delete to select what had been deleted (non-char granularity only).
2251         
2252         * page/Frame.cpp:
2253         (WebCore::Frame::setSelection):
2254         Close typing and end style even if selection is not changing.
2255         * page/Frame.h:
2256         Remove unused setSelection parameter keepTypingStyle.
2257
2258 2006-07-12  Levi Weintraub  <lweintraub@apple.com>
2259
2260         Reviewed by justin
2261
2262         <rdar://problem/4622763> Deleting from beginning of paragraph following a table deletes rather than selects the table
2263
2264         * editing/DeleteSelectionCommand.cpp:
2265         (WebCore::DeleteSelectionCommand::initializeStartEnd): Added selection expansion for HRs.
2266         (WebCore::DeleteSelectionCommand::initializePositionData): Now uses enclosingBlockFlowOrTableElement
2267         instead of enclosingBlockFlowElement.
2268         (WebCore::DeleteSelectionCommand::removeNode): Use to identify that we need a placeholder
2269         when the start or end block is removed.
2270         (WebCore::DeleteSelectionCommand::handleGeneralDelete): Added check for canHaveChildrenForEditing
2271         to keep things like HRs from being given children.
2272         (WebCore::DeleteSelectionCommand::doApply): Switched to use member variable for needPlaceholder.
2273         * editing/DeleteSelectionCommand.h: Made needPlaceholder a member variable.
2274         * editing/TypingCommand.cpp:
2275         (WebCore::TypingCommand::deleteKeyPressed): Fixed selection bug for tables and open typing commands.
2276         (WebCore::TypingCommand::forwardDeleteKeyPressed): Ditto.
2277         * editing/htmlediting.cpp:
2278         (WebCore::editingIgnoresContent): Added check for HRs, since it's not considered a widget.
2279         * editing/visible_units.cpp:
2280         (WebCore::startOfParagraph): Fix for HRs and tables.
2281         (WebCore::endOfParagraph): Ditto.
2282
2283 2006-07-13  Alexey Proskuryakov  <ap@nypop.com>
2284
2285         Reviewed by Darin.
2286
2287         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9880
2288           Memory leaks running DOM-Hanoi
2289
2290         No change in behavior, thus no test included.
2291
2292         * bridge/mac/FrameMac.mm:
2293         (WebCore::FrameMac::setStatusBarText): Use a local autorelease pool to release the temporaries - 
2294         the test runs non-stop, and the enclosing pool doesn't get a chance to be drained.
2295
2296 2006-07-12  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2297
2298         Reviewed by Adele.
2299
2300         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9862
2301           REGRESSION: GMail: Crash in RenderView::repaintViewRectangle when spoofing as FF
2302         - see also <rdar://problem/4622407>
2303
2304         Test: fast/frames/repaint-display-none-crash.html
2305
2306         * rendering/RenderView.cpp:
2307         (WebCore::RenderView::repaintViewRectangle): Added null checking of the owner element's
2308         renderer, which can be null if the iframe is set to display:none.
2309
2310 2006-07-12  Justin Garcia  <justin.garcia@apple.com>
2311
2312         Reviewed by levi
2313         
2314         <rdar://problem/4509393>
2315         selected DOM range starts with <object>, 0 offset but selection should include the <object>
2316
2317         * editing/ReplaceSelectionCommand.cpp:
2318         (WebCore::ReplaceSelectionCommand::shouldMergeStart): 
2319         Don't pull content out of a table cell.
2320         * editing/htmlediting.cpp:
2321         (WebCore::editingIgnoresContent): Added <select> nodes.
2322         (WebCore::rangeCompliantEquivalent): Convert [node, 0] positions to positionBeforeNode(node)
2323         for more types of nodes.
2324         * rendering/RenderContainer.cpp:
2325         (WebCore::RenderContainer::positionForCoordinates): 
2326         Fix a crasher when right clicking on an anonymous table.
2327
2328 2006-07-12  John Sullivan  <sullivan@apple.com>
2329
2330         Reviewed by Brady Eidson
2331         
2332         - fixed <rdar://problem/4611164> REGRESSION: Crash occurs when undoing a series of 
2333         misspelled words (WebCore::RenderObject::repaint(bool)
2334
2335         * dom/Document.cpp:
2336         (WebCore::Document::removeMarkers):
2337         put (it - markers.begin()) in a local variable before altering markers, in every case where this was
2338         happening. One of the cases like this was fixed a while back, but other cases were
2339         either missed at that time or crept in since. 
2340
2341 2006-07-13  Anders Carlsson  <acarlsson@apple.com>
2342
2343         Reviewed by Justin.
2344
2345         http://bugzilla.opendarwin.org/show_bug.cgi?id=9663
2346         REGRESSION (r14948-r14956): Selection in text field remains highlighted when the text field loses focus
2347         
2348         * dom/Document.cpp:
2349         (WebCore::Document::updateSelection):
2350         Don't return early if the selection is empty.
2351
2352 2006-07-12  Anders Carlsson  <acarlsson@apple.com>
2353
2354         Reviewed by Adele.
2355
2356         <rdar://problem/4614656> REGRESSION: onpaste() handlers don't run for textarea elements
2357         
2358         * bridge/mac/FrameMac.mm:
2359         (WebCore::FrameMac::dispatchCPPEvent):
2360         If the element is a shadow node, dispatch the event to its real parent.
2361
2362         * manual-tests/textarea-onpaste.html: Added.
2363
2364 2006-07-12  Beth Dakin  <bdakin@apple.com>
2365
2366         Reviewed by Anders.
2367
2368         Fix for layout test regressions after my check-in last night. Just 
2369         a silly mistake where I should have asked if we were NOT printing 
2370         instead of if we were in the listbox code.
2371
2372         * WebCore.xcodeproj/project.pbxproj: Project file wars. Back to 
2373         XCode 2.3
2374         * platform/mac/ListBoxMac.mm:
2375         (itemTextRenderer): Inverted check.
2376         (groupLabelTextRenderer): Inverted check.
2377
2378 2006-07-12  Darin Adler  <darin@apple.com>
2379
2380         Reviewed by Maciej.
2381
2382         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9806
2383           <rdar://problem/4622622>
2384           REGRESSION: Large rowspan causes WebKit to call abort()
2385
2386         Test: fast/table/large-rowspan-crash.html
2387
2388         * rendering/RenderTableSection.cpp:
2389         (WebCore::RenderTableSection::ensureRows):
2390         Use sizeof(RowStruct) instead of sizeof(int).
2391         Clearly we'll need something better to solve this completely.
2392         I expect another smaller, but still huge, value will still cause a problem.
2393
2394 2006-07-12  Anders Carlsson  <acarlsson@apple.com>
2395
2396         Reviewed by Maciej.
2397
2398         <rdar://problem/4586665> REGRESSION: autorestore.apple.com: Crashes Safari in WebCore::Widget::client() const
2399
2400         * bridge/mac/FrameMac.h:
2401         Add focusCallResultedInViewBeingCreated argument. 
2402         
2403         * bridge/mac/FrameMac.mm:
2404         (WebCore::FrameMac::nextKeyViewInFrame):
2405         If the call to focus() caused the node to get a native widget, set focusCallResultedInViewBeingCreated to true.
2406         
2407         (WebCore::FrameMac::nextKeyViewInFrameHierarchy):
2408         Don't reset the focus node if focusCallResultedInViewBeingCreated is true. Also, add magic to prevent setting
2409         a text field as the first responder if its field editor already is the current first responder.
2410         
2411         * page/FrameView.cpp:
2412         (WebCore::FrameView::handleMousePressEvent):
2413         In some cases, get the event target node again after dispatching the mouse event.
2414
2415 2006-07-12  Beth Dakin  <bdakin@apple.com>
2416
2417         Reviewed by Adele.
2418
2419         Fix for <rdar://problem/4615765> Input[type='search' fields 
2420         initially render too large in Widgets
2421
2422         Fundamentally, the problem here is that we were miscalculating 
2423         things because [NSGraphicsContext currentContextDrawingToScreen] 
2424         was evaluating to false when widgets first load. We only ever used 
2425         this check, however, to determine if we were printing or not, so it 
2426         should not have evaluated to false for loading in Dashbaord. 
2427         Instead, if we query the RenderView about whether or not we are 
2428         printing, we will get the right answer.
2429
2430         No test case added since this appears only to affect Dashboard.
2431
2432         * bridge/mac/WebCoreFrameBridge.mm:
2433         (-[WebCoreFrameBridge drawRect:]): Ask the RenderView if we are 
2434         printing instead. This is not part of the actual bug fix, but it 
2435         seems wise to get rid of all calls to [NSGraphicsContext 
2436         currentContextDrawingToScreen] when we are just trying to determine 
2437         if we are printing or not.
2438         * platform/mac/ListBoxMac.mm:
2439         (itemTextRenderer):This function now takes a boolean, isPrinting.
2440         (groupLabelTextRenderer): Same as above.
2441         (ListBox::sizeForNumberOfLines): Ask the RenderView if we are 
2442         printing.
2443         (-[WebCoreTableView drawRow:clipRect:]): Same as above.
2444         * platform/mac/PopUpButtonMac.mm:
2445         (PopUpButton::sizeHint): Same as above.
2446         * platform/mac/TextFieldMac.mm:
2447         (-[NSSearchFieldCell _addStringToRecentSearches:]):
2448         * rendering/RenderLineEdit.cpp: Same as above.
2449
2450 2006-07-12  Adele Peterson  <adele@apple.com>
2451
2452         Reviewed by Maciej.
2453
2454         Fix for: http://bugzilla.opendarwin.org/show_bug.cgi?id=9813
2455         OPTION text can paint over select element's scrollbar
2456
2457         Test: fast/forms/option-text-clip.html
2458
2459         * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::paintObject):
2460         When calculating the clip to apply to the button text, also consider padding.
2461         In the future, we may have separate renderers for the text part, and the arrow part
2462         of the control, and then the separation should be natural.  For now, we use padding.
2463
2464 2006-07-11  David Kilzer  <ddkilzer@kilzer.net>
2465
2466         Windows build fix.  Reviewed by NOBODY.
2467
2468         * WebCore.vcproj/WebCore/WebCore.vcproj:  Added JSHTMLOptionsCollection.cpp/h
2469         and JSHTMLOptionsCollectionCuston.cpp.  VC++ Express realphabetized the file list.
2470
2471 2006-07-11  Darin Adler  <darin@apple.com>
2472
2473         Reviewed by Adele.
2474
2475         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9809
2476           <rdar://problem/4619515>
2477           focus ring fails to appear on select element after choosing item from popup
2478
2479         - includes http://bugzilla.opendarwin.org/show_bug.cgi?id=9853
2480           improvements to select element, including some storage leak fixes
2481
2482         * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::index): Use a const
2483         reference for the list items, so we don't have to copy a vector.
2484         * html/HTMLSelectElement.cpp:
2485         (WebCore::HTMLSelectElement::selectedIndex): Ditto.
2486         (WebCore::HTMLSelectElement::setSelectedIndex): Ditto.
2487         (WebCore::HTMLSelectElement::length): Ditto.
2488         (WebCore::HTMLSelectElement::remove): Ditto.
2489         (WebCore::HTMLSelectElement::value): Ditto.
2490         (WebCore::HTMLSelectElement::setValue): Ditto.
2491         (WebCore::HTMLSelectElement::stateValue): Ditto.
2492         (WebCore::HTMLSelectElement::restoreState): Ditto.
2493         (WebCore::HTMLSelectElement::appendFormData): Ditto.
2494         (WebCore::HTMLSelectElement::optionToListIndex): Ditto.
2495         (WebCore::HTMLSelectElement::listToOptionIndex): Ditto.
2496         (WebCore::HTMLSelectElement::recalcListItems): Made const, with the appropriate
2497         fields mutable.
2498         (WebCore::HTMLSelectElement::reset): Use a const reference for
2499         the list items, so we don't have to copy the vector. Remove the call to
2500         setSelectionChanged for the RenderMenuList case.
2501         (WebCore::HTMLSelectElement::notifyOptionSelected): Ditto, on both counts.
2502         (WebCore::HTMLSelectElement::defaultEventHandler): Call focus() before showing
2503         the pop-up.
2504         * html/HTMLSelectElement.h: The RenderMenuList class is no longer a friend.
2505         Changed the listItems function to return a const reference to the vector so
2506         it no longer copies the vector. Removed the const_cast to the call to
2507         recalcListItems and changed it to a const member function. Made m_recalcListItems
2508         mutable.
2509         * rendering/DeprecatedRenderSelect.cpp:
2510         (WebCore::DeprecatedRenderSelect::updateFromElement): Removed an unnecessary call
2511         to recalcListItems, which is called automatically. Use a const reference for the
2512         list items so we don't have to copy a vector.
2513         (WebCore::DeprecatedRenderSelect::layout): Ditto.
2514         (WebCore::DeprecatedRenderSelect::selectionChanged): Ditto.
2515         (WebCore::DeprecatedRenderSelect::updateSelection): Ditto.
2516         * rendering/RenderMenuList.cpp:
2517         (WebCore::RenderMenuList::RenderMenuList): Updated for renamed data members.
2518         (WebCore::RenderMenuList::createInnerBlock): Ditto.
2519         (WebCore::RenderMenuList::addChild): Ditto.
2520         (WebCore::RenderMenuList::removeChild): Ditto.
2521         (WebCore::RenderMenuList::setStyle): Ditto. Also removed code to set the style
2522         on the pop-up menu, because it's created with the correct style and destroyed
2523         before it a style change could occur.
2524         (WebCore::RenderMenuList::updateFromElement): Rearranged code to compute the
2525         maximum width in a simpler fashion, and to not bother trying to maintain
2526         the "selected" flags on the elements, since the HTMLSelectElement class
2527         takes care of that. Store the width as an int. Call setText to set the text
2528         based on the selected element's option text.
2529         (WebCore::RenderMenuList::paintObject): Don't check m_inner when setting
2530         up the clip -- always set up the clip.
2531         (WebCore::RenderMenuList::calcMinMaxWidth): Use m_optionsWidth directly
2532         instead of calling ceilf on m_longestWidth.
2533         (WebCore::RenderMenuList::showPopup): Don't use m_popupMenu to store the
2534         menu -- instead keep the pointer in a local variable. Get the selected
2535         index from the HTMLSelectElement.
2536         (WebCore::RenderMenuList::valueChanged): Call HTMLSelectElement::setSelectedIndex
2537         to do most of the work.
2538         * rendering/RenderMenuList.h: Renamed m_inner to m_innerBlock. Removed
2539         m_popupMenu, m_size, m_selectionChanged, and m_selectedIndex. Renamed
2540         m_longestWidth to m_optionsWidth and changed it to be an int. Removed
2541         unneeded override of removeLeftoverAnonymousBoxes function. Removed
2542         unneeded selectionChanged, setSelectionChanged, updateSelection, and
2543         hasPopupMenu functions. Removed extra includes.
2544         * rendering/RenderPopupMenu.cpp: (WebCore::RenderPopupMenu::populate):
2545         Change to iterate the list items instead of iterating all children
2546         of the select node.
2547         * rendering/RenderPopupMenu.h: Renamed getRenderMenuList to menuList.
2548         * rendering/RenderPopupMenuMac.mm:
2549         (WebCore::RenderPopupMenuMac::populate): Moved code to clear and create
2550         the pop-up here from the caller. Removed an extra retain that would cause
2551         the NSPopUpButtonCell to leak.
2552         (WebCore::RenderPopupMenuMac::showPopup): Removed unnecessary code to
2553         create the pop-up, which is now in populate, and also the call to the
2554         clear function, for the same reason. Reorganized code to make it a bit
2555         more readable. Removed an unnecessary if to check if frame is nil.
2556         Used a RefPtr to make sure we don't make a call on a frame after it's
2557         deleted. As part of the reorganization fixed a problem where we'd retain
2558         the event and then return early without releasing it in one case.
2559         (WebCore::RenderPopupMenuMac::addSeparator): Tweaked a little.
2560         (WebCore::RenderPopupMenuMac::addGroupLabel): Grouped all the code to
2561         manage the NSMenu at the bottom of the function.
2562         (WebCore::RenderPopupMenuMac::addOption): Ditto.
2563
2564 2006-07-11  Justin Garcia  <justin.garcia@apple.com>
2565
2566         Reviewed by levi
2567         
2568         <rdar://problem/4620686>
2569         REGRESSION: Mispelling markers are still displayed when using the delete key to place caret into a misspelled word
2570
2571         * bridge/mac/FrameMac.mm:
2572         (WebCore::FrameMac::respondToChangedSelection): Remove markers from newAdjacentWords 
2573         even if oldAdjacentWords is equal to newAdjacentWords.  This happens during a deletion.
2574         
2575
2576 2006-07-11  Tim Omernick  <timo@apple.com>
2577
2578         Reviewed by NOBODY (build fix)
2579
2580         * bindings/objc/DOMPrivate.h:
2581         Don't @class NPObject; that breaks files that actually #import <JavaScriptCore/npruntime.h>, since the NPObject
2582         there is of a different type.
2583         Also clarified a highly misleading comment from my last commit.  I meant to clarify the comment
2584         before landing.
2585
2586 2006-07-12  Anders Carlsson  <acarlsson@apple.com>
2587
2588         Reviewed by Geoff.
2589
2590         http://bugzilla.opendarwin.org/show_bug.cgi?id=9635
2591         REGRESSION: Crash when adding to cart at <http://www.yemeksepeti.com/>
2592         
2593         * html/HTMLTokenizer.cpp:
2594         (WebCore::HTMLTokenizer::scriptHandler):
2595         Don't load external scripts if the parser is stopped.
2596         
2597         * manual-tests/open-close-tokenizer-crash.html: Added.
2598         * manual-tests/resources/empty-file.js: Added.
2599         * manual-tests/resources/open-close-tokenizer-crash.html: Added.
2600         Add manual test.
2601
2602 2006-07-11  John Sullivan  <sullivan@apple.com>
2603
2604         Reviewed by Kevin, Timo O, Brady, Darin, and Hyatt (whee!)
2605
2606         - added support for creating a selection image with white text
2607
2608         * rendering/RenderObject.h:
2609         (WebCore::):
2610         add PaintRestriction enum
2611         (WebCore::RenderObject::PaintInfo::PaintInfo):
2612         add forceWhiteText boolean to PaintInfo struct
2613
2614         * page/FramePrivate.h:
2615         (WebCore::FramePrivate::FramePrivate):
2616         replaced m_selectionOnly bool with m_paintRestriction, which also handles forcing the
2617         text to white
2618
2619         * page/Frame.cpp:
2620         (WebCore::Frame::paint):
2621         updated to use & pass m_paintRestriction where it used to use & pass just m_selectionOnly
2622
2623         * bridge/mac/FrameMac.h:
2624         * bridge/mac/FrameMac.mm:
2625         (WebCore::FrameMac::selectionImage):
2626         now takes forceWhiteText parameter, stored in FramePrivate as part of PaintRestriction
2627
2628         * bridge/mac/WebCoreFrameBridge.h:
2629         * bridge/mac/WebCoreFrameBridge.mm:
2630         (-[WebCoreFrameBridge selectionImageForcingWhiteText:]):
2631         renamed from selectionImage, now takes forceWhiteText parameter, which is passed
2632         down into Frame
2633
2634         * rendering/RenderLayer.h:
2635         * rendering/RenderLayer.cpp:
2636         (WebCore::RenderLayer::paint):
2637         use a PaintRestriction value where we used to use a selectionOnly bool
2638         (WebCore::RenderLayer::paintLayer):
2639         ditto; also stores forceWhiteText in PaintInfo struct
2640
2641         * kcanvas/KCanvasResources.cpp:
2642         (WebCore::KCanvasMarker::draw):
2643         updated for changed signature of PaintInfo constructor
2644
2645         * ksvg2/svg/SVGMaskElement.cpp:
2646         (WebCore::SVGMaskElement::drawMaskerContent):
2647         ditto
2648
2649         * ksvg2/svg/SVGPatternElement.cpp:
2650         (WebCore::SVGPatternElement::drawPatternContentIntoTile):
2651         ditto
2652
2653         * rendering/InlineTextBox.cpp:
2654         (WebCore::InlineTextBox::paint):
2655         paint with white text color if forceWhiteText is set in PaintInfo struct
2656
2657 2006-07-11  Tim Omernick  <timo@apple.com>
2658
2659         Reviewed by Anders.
2660
2661         <http://bugzilla.opendarwin.org/show_bug.cgi?id=9843>:
2662         Give Netscape plug-ins access to their own DOM element
2663
2664         * html/HTMLPlugInElement.h:
2665         Just import JSC headers on Mac.  The NPObject and Bindings::Instance stuff is only used on Mac anyway.
2666         Changed __APPLE__ to PLATFORM(MAC).
2667         Added m_NPObject ivar.
2668         * html/HTMLPlugInElement.cpp:
2669         (WebCore::HTMLPlugInElement::HTMLPlugInElement):
2670         Initialize the NPObject.
2671         (WebCore::HTMLPlugInElement::~HTMLPlugInElement):
2672         Release the NPObject when the element is destroyed.
2673         (WebCore::HTMLPlugInElement::createNPObject):
2674         Creates an NPObject for the element.
2675         (WebCore::HTMLPlugInElement::getNPObject):
2676         Returns the NPObject for the element, creating and caching it if necessary.
2677
2678         * html/HTMLAppletElement.h:
2679         Changed __APPLE__ to PLATFORM(MAC).
2680         * html/HTMLAppletElement.cpp:
2681         ditto
2682         * html/HTMLEmbedElement.h:
2683         ditto
2684         * html/HTMLEmbedElement.cpp:
2685         ditto
2686         * html/HTMLObjectElement.h:
2687         ditto
2688         * html/HTMLObjectElement.cpp:
2689         ditto
2690
2691         * bindings/objc/DOMPrivate.h:
2692         Added -[DOMElement _NPObject].
2693
2694         * bindings/objc/DOM.mm:
2695         (-[DOMElement _NPObject]):
2696         Returns the NPObject for the element.  Since this is only needed by the Netscape plug-in API, you can only get 
2697         the NPObject for applet, embed, and object elements.
2698         
2699 2006-07-11  Adele Peterson  <adele@apple.com>
2700
2701         Reviewed by Hyatt.
2702
2703         - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9861
2704         REGRESSION: Can't dynamically change list box to popup
2705         
2706         and updated fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9859
2707         REGRESSION: Can't dynamically change popup to list box
2708
2709         The original fix for 9859 was in the renderer, and I think we can catch the change
2710         earlier in the element to detach and reattach.
2711
2712         I also did some cleanup to remove the PopupButton code path from DeprecatedRenderSelect
2713
2714         Test: fast/forms/select-change-listbox-to-popup.html
2715
2716         * html/HTMLSelectElement.cpp:
2717         (WebCore::HTMLSelectElement::parseMappedAttribute): If the new attribute value is going to require us to change from listbox to popup or vice versa,
2718         and we're already attached, then detach and reattach to create the correct renderer.  If we're not attached, then we'll create the correct renderer
2719         when we attach.
2720         (WebCore::HTMLSelectElement::recalcStyle): Updated shouldUseMenuList since it no longer takes a RenderStyle.
2721         (WebCore::HTMLSelectElement::isKeyboardFocusable): ditto.
2722         (WebCore::HTMLSelectElement::isMouseFocusable): ditto.
2723         (WebCore::HTMLSelectElement::createRenderer): ditto.
2724         (WebCore::HTMLSelectElement::setRecalcListItems): ditto.
2725         (WebCore::HTMLSelectElement::reset): ditto.
2726         (WebCore::HTMLSelectElement::notifyOptionSelected): ditto.
2727         (WebCore::HTMLSelectElement::defaultEventHandler): ditto.
2728
2729         * html/HTMLSelectElement.h: (WebCore::HTMLSelectElement::shouldUseMenuList):
2730         This method no longer takes a RenderStyle.  That was leftover from when we used to use the appearance
2731         to determine whether or not to use the new menu list implementation.
2732
2733         * rendering/DeprecatedRenderSelect.h: Removed PopupButton code path.
2734         * rendering/DeprecatedRenderSelect.cpp:
2735         (WebCore::DeprecatedRenderSelect::DeprecatedRenderSelect):
2736         (WebCore::DeprecatedRenderSelect::setWidgetWritingDirection):
2737         (WebCore::DeprecatedRenderSelect::updateFromElement):
2738         (WebCore::DeprecatedRenderSelect::baselinePosition):
2739         (WebCore::DeprecatedRenderSelect::layout):
2740         (WebCore::DeprecatedRenderSelect::updateSelection):
2741
2742         * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::updateFromElement):
2743         Backed out previous fix since this is now done in HTMLSelectElement.
2744
2745 2006-07-11  Adele Peterson  <adele@apple.com>
2746
2747         Reviewed by Hyatt.
2748
2749         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9859
2750         REGRESSION: Can't dynamically change popup to list box
2751
2752         Test: fast/forms/select-change-popup-to-listbox.html
2753
2754         * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::updateFromElement):
2755         If the select element has the multiple property set, or has a size > 1, then it
2756         really should be a list box, so we detach and attach the element so it creates the
2757         correct type of renderer.
2758
2759 2006-07-11  John Sullivan  <sullivan@apple.com>
2760
2761         Reviewed by Beth Dakin and Tim Omernick
2762
2763         - fixed <rdar://problem/4622794> HiDPI: dragging the selection in Safari can show pixel cracks 
2764         at non-integral scale factors
2765
2766         * bridge/mac/FrameMac.mm:
2767         (WebCore::FrameMac::imageFromRect):
2768         round image rect in window coordinate space
2769
2770 2006-07-10  Darin Adler  <darin@apple.com>
2771
2772         Reviewed by Geoff.
2773
2774         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9811
2775           rdar://problem/4619572
2776           OPTION text contained in OPTGROUP appears at the wrong size
2777
2778         * dom/Node.h:
2779         * dom/Node.cpp: (WebCore::Node::renderStyle): Made a const member function.
2780         The derived classes were overriding with const member functions, and I could
2781         change either this or the derived -- decided to do this.
2782
2783 2006-07-10  Darin Adler  <darin@apple.com>
2784
2785         Reviewed by Geoff.
2786
2787         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9810
2788           rdar://problem/4619534
2789           OPTGROUP label text is using the default font instead of Lucida Grande
2790
2791         * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::setFontFromControlSize):
2792         Code wants the family name, but was calling fontName, which is not the same thing.
2793         Also removed the unneeded conversion to DeprecatedString.
2794
2795 === Safari-521.16 ===
2796
2797 2006-07-10  David Kilzer  <ddkilzer@kilzer.net>
2798
2799         Reviewed by Darin.
2800
2801         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9179
2802           Implement select.options.add() method
2803
2804         Tests:
2805         - fast/dom/select-selectedIndex-multiple.html
2806         - fast/dom/select-selectedIndex.html
2807         - fast/js/select-options-add.html
2808
2809         * DerivedSources.make: Added JSHTMLOptionsCollection.h.
2810         * ForwardingHeaders/kjs/operations.h: Added.
2811         * WebCore.xcodeproj/project.pbxproj: Added new source files.
2812         * bindings/js/JSHTMLOptionsCollectionCustom.cpp: Added.
2813         (WebCore::JSHTMLOptionsCollection::length):
2814         (WebCore::JSHTMLOptionsCollection::setLength):
2815         (WebCore::JSHTMLOptionsCollection::indexSetter):
2816         * bindings/js/kjs_html.cpp: Removed JSHTMLOptionsCollection implementation.
2817         Renamed classes and methods for consistency.
2818         (KJS::JSHTMLElement::selectGetter):
2819         (KJS::JSHTMLElement::put):
2820         (KJS::JSHTMLElement::selectSetter):
2821         (KJS::JSHTMLCollection::JSHTMLCollection):
2822         (KJS::JSHTMLCollectionProtoFunc::callAsFunction):
2823         (KJS::getHTMLOptionsCollection):
2824         * bindings/js/kjs_html.h: Ditto.
2825         * bindings/scripts/CodeGeneratorJS.pm: Added support for HasCustomIndexSetter class attribute.
2826         Added support for Optional parameter attribute, which makes generated code assume overloaded
2827         implementation methods are available for a JavaScript function with optional arguments.  Changed
2828         local 'impl' variables to 'imp' so that impl() methods could be called without class designation.
2829         * html/HTMLOptionElement.idl: Added GenerateNativeConverter attribute.
2830         * html/HTMLOptionsCollection.cpp: Added methods used by generated JSHTMLOptionsCollection class.
2831         (WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
2832         (WebCore::HTMLOptionsCollection::add):
2833         (WebCore::HTMLOptionsCollection::selectedIndex):
2834         (WebCore::HTMLOptionsCollection::setSelectedIndex):
2835         (WebCore::HTMLOptionsCollection::setLength):
2836         * html/HTMLOptionsCollection.h: Ditto.
2837         * html/HTMLOptionsCollection.idl: Added.
2838
2839 2006-07-10  David Harrison  <harrison@apple.com>
2840
2841         Reviewed by Dave Hyatt.
2842
2843         <rdar://problem/4602408> -webkit-highlight needs to support images and elements other than text
2844
2845         * rendering/RenderBox.cpp:
2846         (WebCore::RenderBox::paintCustomHighlight):
2847         * rendering/RenderBox.h:
2848         Utility for subclasses.
2849         
2850         * rendering/RenderImage.cpp:
2851         (WebCore::RenderImage::paint):
2852         Custom highlight in front of images.
2853         
2854         * rendering/RenderListMarker.cpp:
2855         (WebCore::RenderListMarker::paint):
2856         Custom highlight in front of list markers.
2857
2858         * rendering/RenderWidget.cpp:
2859         (WebCore::RenderWidget::paint):
2860         Custom highlight in front of objects.
2861
2862 2006-07-10  David Hyatt  <hyatt@apple.com>
2863
2864         <rdar://problem/4620557> REGRESSION: In a mail message, text isn't painted
2865         correctly after choosing Redo Typing
2866
2867         Better fix for repainting issue with positioned objects when height
2868         changes.  Optimize when only a positioned child changes so that we don't
2869         incorrectly do normal flow layout.
2870
2871         Reviewed by darin
2872
2873         * WebCore.xcodeproj/project.pbxproj:
2874         * rendering/RenderBlock.cpp:
2875         (WebCore::RenderBlock::layoutBlock):
2876         * rendering/RenderFlexibleBox.cpp:
2877         (WebCore::RenderFlexibleBox::layoutBlock):
2878         * rendering/RenderTable.cpp:
2879         (WebCore::RenderTable::layout):
2880         * rendering/RenderView.cpp:
2881         (WebCore::RenderView::layout):
2882         * rendering/bidi.cpp:
2883         (WebCore::RenderBlock::layoutInlineChildren):
2884
2885 2006-07-10  Adele Peterson  <adele@apple.com>
2886
2887         Reviewed by Beth.
2888
2889         - Fix for <rdar://problem/4621442> REGRESSION (NativePopup) : Popup menus aren't drawn correctly on page at orbitz.com; cheaptickets.com
2890
2891         Test: fast/forms/select-style.html
2892
2893         * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::isControlStyled):
2894         Don't let popups be style-able for now.  We'll allow it later, when we
2895         have a good way to handle border & backgrounds and still having it look like a control.
2896
2897 2006-07-10  Justin Garcia  <justin.garcia@apple.com>
2898
2899         Reviewed by harrison
2900         
2901         <rdar://problem/4619260>
2902         9A213 + Safari 521.15.1 Crash with To Do's alarm icon (WebCore::maxDeepOffset(WebCore::Node const*) )
2903         <rdar://problem/4619841>
2904         REGRESSION: Dragging selection over input field results in a crash (WebCore::maxDeepOffset(WebCore::Node const*)
2905
2906         * WebCore.xcodeproj/project.pbxproj:
2907         * editing/Selection.cpp:
2908         (WebCore::Selection::adjustForEditableContent): Iterate using next/previousVisuallyDistinctCandidate 
2909         instead of traverseNext/Previous node because we were skipping positions.  Jump out of shadow trees.  
2910         Migrate to isEditablePosition instead of isContentEditable.
2911         
2912
2913 2006-07-10  Beth Dakin  <bdakin@apple.com>
2914
2915         Reviewed by Adele.
2916
2917         Shuffling comments around from my last check-in to make things read 
2918         more clearly.
2919
2920         * page/DOMWindow.h:
2921         * page/DOMWindow.idl:
2922
2923 2006-07-10  Beth Dakin  <bdakin@apple.com>
2924
2925         Reviewed by Darin.
2926
2927         Fix for <rdar://problem/4621095> The should be a way to 
2928         access the user interface scale factor through the DOM
2929
2930         window.devicePixelRatio returns the user interface scale factor.
2931
2932         * page/DOMWindow.cpp:
2933         (WebCore::DOMWindow::devicePixelRatio):
2934         * page/DOMWindow.h:
2935         * page/DOMWindow.idl:
2936
2937 2006-07-10  Brady Eidson  <beidson@apple.com>
2938
2939         Reviewed by Alexey
2940
2941         Resolved the console error messages people got from the new DB even if they didn't have it enabled
2942
2943         * icon/IconDatabase.cpp:
2944         (WebCore::IconDatabase::pruneUnreferencedIcons):
2945         (WebCore::IconDatabase::pruneUnretainedIcons):
2946         Added quick check to bail if the DB isn't open
2947
2948 2006-07-10  David Harrison  <harrison@apple.com>
2949
2950         Reviewed by Tim Hatcher
2951
2952         Partial fix for...
2953         <rdar://problem/4619260> 9A213 + Safari 521.15.1 Crash with To Do's alarm icon (WebCore::maxDeepOffset(WebCore::Node const*) )
2954         
2955         * editing/Selection.cpp:
2956         (WebCore::Selection::adjustForEditableContent):
2957         Allow for node being 0.  This is a bandaid fix to prevent the crash.  It will still assert in a debug build.  See bug for more info.
2958
2959 2006-07-10  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2960
2961         Reviewed by Darin.
2962
2963         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9808
2964           REGRESSION: Incorrect layout (and ERROR) when forcing ATSU For All Text
2965
2966         * manual-tests/ATSU-bad-layout.html: Added.
2967         * platform/mac/FontMac.mm:
2968         (WebCore::Font::floatWidthForComplexText): Return 0 immediately for empty runs.
2969
2970 2006-07-10  Darin Adler  <darin@apple.com>
2971
2972         - try to fix the no-SVG build
2973
2974         * ksvg2/misc/SVGImageLoader.cpp: Move namespace brace inside the #if.
2975
2976 2006-07-10  Darin Adler  <darin@apple.com>
2977
2978         Reviewed by Anders.
2979
2980         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9833
2981           REGRESSION: Reproducible crash: RenderMenuList.cpp:58: failed assertion `!m_first'
2982
2983         * manual-tests/empty-title-popup.html: Added.
2984
2985         * rendering/RenderMenuList.h: Add createInnerBlock.
2986         * rendering/RenderMenuList.cpp:
2987         (WebCore::RenderMenuList::createInnerBlock): Factored out of addChild.
2988         (WebCore::RenderMenuList::addChild): Call createInnerBlock.
2989         (WebCore::RenderMenuList::setText): Changed parameter type.
2990         (WebCore::RenderMenuList::showPopup): Call createInnerBlock before calling
2991         the parent class's addChild.
2992
2993 2006-07-10  Rob Buis  <buis@kde.org>
2994
2995         Reviewed by Maciej via IRC.
2996
2997         Make sure the attributes are calculated against viewport width value,
2998         as defined in the spec.  http://paste.lisp.org/display/22342
2999
3000         * ksvg2/svg/SVGEllipseElement.cpp:
3001         (WebCore::SVGEllipseElement::rx): Changed LM_HEIGHT to LM_WIDTH.
3002         * ksvg2/svg/SVGLineElement.cpp:
3003         (SVGLineElement::x2): Ditto.
3004
3005 2006-07-10  Beth Dakin  <bdakin@apple.com>
3006
3007         Reviewed by Maciej.
3008
3009         Fix for <rdar://problem/4610314> Support the CSS3 content property 
3010         for images
3011
3012         This patch provides initial support for the CSS3 content property. 
3013         It lacks support for any content other than images, and only allows 
3014         content for elements that seemed safe for now.
3015
3016         * css/cssstyleselector.cpp:
3017         (WebCore::CSSStyleSelector::applyProperty): Remove restrictions for 
3018         just :before and :after
3019         * html/HTMLBRElement.cpp:
3020         (WebCore::HTMLBRElement::createRenderer):
3021         * html/HTMLFrameSetElement.cpp:
3022         (WebCore::HTMLFrameSetElement::createRenderer):
3023         * html/HTMLImageElement.cpp:
3024         (WebCore::HTMLImageElement::createRenderer):
3025         * html/HTMLLegendElement.cpp:
3026         (WebCore::HTMLLegendElement::createRenderer):
3027         * rendering/RenderImage.cpp:
3028         (WebCore::RenderImage::RenderImage):
3029         (WebCore::RenderImage::setCachedImage): Don't allow the image to be 
3030         set this way if it was already set with the content property.
3031         * rendering/RenderImage.h:
3032         (WebCore::RenderImage::setIsAnonymousImage): Anonymous images are 
3033         those set through the content property.
3034         (WebCore::RenderImage::isAnonymousImage):
3035         * rendering/RenderObject.cpp:
3036         (WebCore::RenderObject::createObject): If there is content 
3037         specified, create a RenderImage with the content and initialize the 
3038         cached image to whatever was specified in the CSS.
3039
3040 2006-07-10  Brady Eidson  <beidson@apple.com>
3041
3042         Reviewed by NOBODY (Build Fix!)
3043
3044         * icon/SiteIcon.cpp:
3045         (SiteIcon::getImage):
3046         Release build made an "unused variable" warning, which is, of course, an error.  fixed that.
3047
3048 2006-07-10  Brady Eidson  <beidson@apple.com>
3049
3050         Reviewed by Maciej
3051
3052         SQLite Icon DB now fully replicates functionality of the old DB, including pruning to keep unused
3053         information out to keep down disk usage.  For now, it is still off by default, as the critical
3054         feature of importing old icons into the new DB is still unrealized.
3055         If you'd like to test, add #define ICONDEBUG to your WebKitPrefix.h
3056
3057         * icon/IconDatabase.cpp:
3058         (WebCore::IconDatabase::IconDatabase):
3059         (WebCore::IconDatabase::open):
3060           -Sets up a timer for initial pruning
3061         (WebCore::IconDatabase::iconForPageURL):
3062           -Switched away from "dirty blob hack" as the problem is provisionally solved
3063         (WebCore::IconDatabase::retainIconForURL):
3064         (WebCore::IconDatabase::releaseIconForURL):
3065           -Same as found in WebKit
3066         (WebCore::IconDatabase::totalRetainCountForIconURL):
3067           -Adds up all retainers of icon
3068         (WebCore::IconDatabase::forgetIconForIconURLFromDatabase):
3069           -Wipes an Icon table entry out
3070         (WebCore::IconDatabase::establishTemporaryIconIDForIconURL):
3071         (WebCore::IconDatabase::establishTemporaryIconIDForEscapedIconURL):
3072         (WebCore::IconDatabase::establishIconIDForIconURL):
3073         (WebCore::IconDatabase::establishIconIDForEscapedIconURL):
3074           -Added ability to get an iconID without creating a new one if a lookup is all
3075            that is genuinely wanted
3076         (WebCore::IconDatabase::pruneUnreferencedIcons):
3077         (WebCore::IconDatabase::pruneUnretainedIcons):
3078           -Called on a timer on DB startup to clean it out
3079         * icon/IconDatabase.h:
3080         * icon/SiteIcon.cpp:
3081         (SiteIcon::SiteIcon):
3082         (SiteIcon::~SiteIcon):
3083           -Deletes the image on deletion
3084         (SiteIcon::getImage):
3085           -Cut down on no-longer-necessary debug info
3086
3087 2006-07-10  Anders Carlsson  <acarlsson@apple.com>
3088
3089         Reviewed by Adele.
3090
3091         http://bugzilla.opendarwin.org/show_bug.cgi?id=9245
3092         Quirksmode: Incorrect handling of disabled BUTTON elements
3093
3094         * html/HTMLButtonElement.cpp:
3095         (WebCore::HTMLButtonElement::defaultEventHandler):
3096         Don't call prepareSubmit if the element is disabled.
3097
3098         * html/HTMLInputElement.cpp:
3099         (WebCore::HTMLInputElement::defaultEventHandler):
3100         Don't call prepareSubmit if the element is disabled.
3101
3102 2006-07-10  Darin Adler  <darin@apple.com>
3103
3104         - try to fix Windows build
3105
3106         * platform/win/TemporaryLinkStubs.cpp: Put a few functions in the WebCore namespace.
3107         * platform/gdk/TemporaryLinkStubs.cpp: Ditto.
3108
3109 2006-07-10  Darin Adler  <darin@apple.com>
3110
3111         Reviewed by Geoff.
3112
3113         - fix failures seen in layout tests
3114
3115         * bindings/js/kjs_dom.cpp: (KJS::toJS): Restore one of the few WebCore:: prefixes
3116         that really needed to be there -- because we have two classes named JSHTMLDocument
3117         at the moment! (One in KJS and one in WebCore namespace.)
3118
3119 2006-07-10  Darin Adler  <darin@apple.com>
3120
3121         - try to fix Windows build
3122
3123         * rendering/RenderLayer.h: Correct a forward declaration of ScrollBar.
3124
3125 2006-07-09  Adele Peterson  <adele@apple.com>
3126
3127         Reviewed by Maciej.
3128
3129         Fix for <rdar://problem/4463835> Switch to use new popup menu implementation for <select>
3130
3131         * css/html4.css: Added style for new selects, and for list boxes.
3132         * html/HTMLSelectElement.h: (WebCore::HTMLSelectElement::shouldUseMenuList): Removed check for appearance so new popups can be styled.
3133    
3134         * rendering/RenderMenuList.cpp:
3135         (WebCore::RenderMenuList::setStyle): Removed padding.  This is now set by the theme.
3136         (WebCore::RenderMenuList::calcMinMaxWidth): Now takes minimum text size into account.
3137         * rendering/RenderMenuList.h: Removed baselinePosition since we're letting the theme calculate that.
3138
3139         * rendering/RenderTheme.cpp: (WebCore::RenderTheme::isControlContainer): Added menuList as a ControlContainer, 
3140         so RenderThemeMac will compute its baseline.
3141         * rendering/RenderTheme.h: (WebCore::RenderTheme::minimumTextSize): Added.
3142         * rendering/RenderThemeMac.h: Added minimumTextSize, setPopupPaddingFromControlSize, popupButtonSizes, popupButtonMargins, popupButtonPadding.
3143         Removed sizeOfArrowControl. 
3144         * rendering/RenderThemeMac.mm:
3145         (WebCore::): Added enum for padding.
3146         (WebCore::RenderThemeMac::adjustRepaintRect): Now inflates rect to account for control shadow.
3147         (WebCore::RenderThemeMac::baselinePosition): Now calculates baseline for menulist.
3148         (WebCore::RenderThemeMac::popupButtonMargins): Tweaked values.
3149         (WebCore::RenderThemeMac::popupButtonSizes): Added.
3150         (WebCore::RenderThemeMac::popupButtonPadding): Added, so different padding can be set for different control sizes.
3151         (WebCore::RenderThemeMac::setPopupPaddingFromControlSize): Added.
3152         (WebCore::RenderThemeMac::paintMenuList): Now inflates rect to account for control shadow.
3153         (WebCore::RenderThemeMac::adjustMenuListStyle): Resets border, sets padding, sets control size.
3154         (WebCore::RenderThemeMac::setPopupButtonCellState): Removed unnecessary class name.
3155         (WebCore::RenderThemeMac::minimumTextSize): Added.
3156
3157 2006-07-09  Darin Adler  <darin@apple.com>
3158
3159         - add back "unused code" for plain text fields, still used by <isindex>!
3160
3161         * platform/TextField.h:
3162         * platform/mac/TextFieldMac.mm:
3163         * platform/mac/WebCoreTextField.h:
3164         * platform/mac/WebCoreTextField.mm:
3165         * rendering/RenderLineEdit.cpp:
3166
3167 2006-07-09  Darin Adler  <darin@apple.com>
3168
3169         Reviewed by Tim Hatcher.
3170
3171         - put more into the WebCore namespace
3172         - removed unused code for plain text fields
3173
3174         Put more classes, class templates, enums, functions, and constants into
3175         the WebCore namespace, including all the headers in the platform directory.
3176
3177         Removed lots of unneeded "WebCore::" qualifiers and "using" directives.
3178
3179         Added some "WebCore::" qualifiers in a few places.
3180
3181         Removed "uses WebCore::" in headers that we said we'd remove "when
3182         everything is in the WebCore namespace".
3183
3184         * bindings/js/JSDOMParser.cpp:
3185         * bindings/js/JSHTMLElementWrapperFactory.cpp:
3186         * bindings/js/JSXSLTProcessor.cpp:
3187         * bindings/js/kjs_binding.cpp:
3188         * bindings/js/kjs_css.cpp:
3189         * bindings/js/kjs_dom.cpp:
3190         * bindings/js/kjs_dom.h:
3191         * bindings/js/kjs_events.cpp:
3192         * bindings/js/kjs_proxy.h:
3193         * bindings/js/kjs_window.h:
3194         * bindings/objc/DOM.mm:
3195         * bridge/History.h:
3196         * bridge/JavaAppletWidget.h:
3197         * bridge/mac/FormDataMac.h:
3198         * bridge/mac/FormDataMac.mm:
3199         * bridge/mac/WebCoreAXObject.mm:
3200         * bridge/mac/WebCoreEncodings.mm:
3201         * bridge/mac/WebCoreFrameBridge.h:
3202         * bridge/mac/WebCoreIconDatabaseBridge.mm:
3203         * bridge/mac/WebCorePageState.h:
3204         * bridge/mac/WebCoreScriptDebugger.mm:
3205         * bridge/mac/WebCoreSettings.h:
3206         * css/CSSGrammar.y:
3207         * css/CSSPageRule.cpp:
3208         * css/CSSPageRule.h:
3209         * css/MediaList.cpp:
3210         * css/cssstyleselector.h:
3211         * dom/Clipboard.h:
3212         * dom/Document.cpp:
3213         * dom/Document.h:
3214         * dom/EventTargetNode.h:
3215         * dom/Node.cpp:
3216         * dom/Node.h:
3217         * dom/Position.h:
3218         * dom/Range.cpp:
3219         * dom/XMLTokenizer.cpp:
3220         * editing/AppendNodeCommand.h:
3221         * editing/ApplyStyleCommand.cpp:
3222         * editing/BreakBlockquoteCommand.cpp:
3223         * editing/BreakBlockquoteCommand.h:
3224         * editing/CompositeEditCommand.cpp:
3225         * editing/CompositeEditCommand.h:
3226         * editing/CreateLinkCommand.h:
3227         * editing/DeleteFromTextNodeCommand.h:
3228         * editing/DeleteSelectionCommand.h:
3229         * editing/FormatBlockCommand.h:
3230         * editing/HTMLInterchange.cpp:
3231         * editing/HTMLInterchange.h:
3232         * editing/IndentOutdentCommand.h:
3233         * editing/InsertIntoTextNodeCommand.h:
3234         * editing/InsertLineBreakCommand.h:
3235         * editing/InsertListCommand.h:
3236         * editing/InsertNodeBeforeCommand.h:
3237         * editing/InsertTextCommand.cpp:
3238         * editing/InsertTextCommand.h:
3239         * editing/JSEditor.cpp:
3240         * editing/JSEditor.h:
3241         * editing/JoinTextNodesCommand.h:
3242         * editing/MergeIdenticalElementsCommand.cpp:
3243         * editing/MergeIdenticalElementsCommand.h:
3244         * editing/ModifySelectionListLevel.h:
3245         * editing/MoveSelectionCommand.h:
3246         * editing/RebalanceWhitespaceCommand.h:
3247         * editing/RemoveNodeAttributeCommand.h:
3248         * editing/RemoveNodeCommand.h:
3249         * editing/RemoveNodePreservingChildrenCommand.h:
3250         * editing/ReplaceSelectionCommand.h:
3251         * editing/SetNodeAttributeCommand.h:
3252         * editing/SplitElementCommand.cpp:
3253         * editing/SplitElementCommand.h:
3254         * editing/SplitTextNodeCommand.cpp:
3255         * editing/SplitTextNodeCommand.h:
3256         * editing/SplitTextNodeContainingElementCommand.h:
3257         * editing/TypingCommand.cpp:
3258         * editing/TypingCommand.h:
3259         * editing/UnlinkCommand.h:
3260         * editing/VisiblePosition.cpp:
3261         * editing/WrapContentsInDummySpanCommand.cpp:
3262         * editing/WrapContentsInDummySpanCommand.h:
3263         * editing/markup.cpp:
3264         * editing/markup.h:
3265         * html/HTMLAnchorElement.cpp:
3266         * html/HTMLBodyElement.cpp:
3267         * html/HTMLButtonElement.h:
3268         * html/HTMLCollection.h:
3269         * html/HTMLDocument.h:
3270         * html/HTMLEmbedElement.cpp:
3271         * html/HTMLFormElement.cpp:
3272         * html/HTMLFormElement.h:
3273         * html/HTMLFrameElement.cpp:
3274         * html/HTMLFrameSetElement.cpp:
3275         * html/HTMLKeygenElement.cpp:
3276         * html/HTMLLabelElement.cpp:
3277         * html/HTMLObjectElement.cpp:
3278         * html/HTMLObjectElement.h:
3279         * html/HTMLTableElement.cpp:
3280         * html/HTMLTablePartElement.cpp:
3281         * icon/IconDatabase.h:
3282         * kcanvas/KCanvasPath.h:
3283         * kcanvas/KCanvasResources.cpp:
3284         * kcanvas/KCanvasResources.h:
3285         * kcanvas/KCanvasTreeDebug.cpp:
3286         * kcanvas/KCanvasTreeDebug.h:
3287         * kcanvas/RenderSVGContainer.cpp:
3288         * kcanvas/RenderSVGText.h:
3289         * kcanvas/device/KRenderingPaintServer.h:
3290         * kcanvas/device/KRenderingPaintServerGradient.h:
3291         * kcanvas/device/KRenderingPaintServerSolid.cpp:
3292         * ksvg2/misc/SVGImageLoader.cpp:
3293         * ksvg2/svg/SVGElement.cpp:
3294         * ksvg2/svg/SVGElement.h:
3295         * ksvg2/svg/SVGForeignObjectElement.cpp:
3296         * ksvg2/svg/SVGForeignObjectElement.h:
3297         * ksvg2/svg/SVGImageElement.cpp:
3298         * ksvg2/svg/SVGPoint.h:
3299         * ksvg2/svg/SVGStylable.h:
3300         * ksvg2/svg/SVGTRefElement.cpp:
3301         * ksvg2/svg/SVGTRefElement.h:
3302         * ksvg2/svg/SVGTSpanElement.cpp:
3303         * ksvg2/svg/SVGTSpanElement.h:
3304         * ksvg2/svg/SVGTextElement.h:
3305         * ksvg2/svg/svgpathparser.cpp:
3306         * ksvg2/svg/svgpathparser.h:
3307         * loader/Cache.h:
3308         * loader/DocLoader.h:
3309         * loader/LoaderFunctions.h:
3310         * loader/mac/LoaderFunctionsMac.mm:
3311         * page/Frame.h:
3312         * page/FrameView.h:
3313         * page/Page.h:
3314         * page/Settings.h:
3315         * platform/AffineTransform.cpp:
3316         * platform/AffineTransform.h:
3317         * platform/Arena.cpp:
3318         * platform/Arena.h:
3319         * platform/CookieJar.h:
3320         * platform/DeprecatedCString.cpp:
3321         * platform/DeprecatedCString.h:
3322         * platform/DeprecatedPtrList.h:
3323         * platform/DeprecatedPtrListImpl.cpp:
3324         * platform/DeprecatedPtrListImpl.h:
3325         * platform/DeprecatedPtrQueue.h:
3326         * platform/DeprecatedString.cpp:
3327         * platform/DeprecatedString.h:
3328         * platform/DeprecatedStringList.cpp:
3329         * platform/DeprecatedStringList.h:
3330         * platform/DeprecatedValueList.h:
3331         * platform/DeprecatedValueListImpl.cpp:
3332         * platform/DeprecatedValueListImpl.h:
3333         * platform/FileButton.h:
3334         * platform/FloatPoint.h:
3335         * platform/FloatRect.h:
3336         * platform/FloatSize.h:
3337         * platform/FontData.h:
3338         * platform/FontFallbackList.h:
3339         * platform/GraphicsContext.h:
3340         * platform/IntPoint.h:
3341         * platform/IntRect.h:
3342         * platform/IntSize.h:
3343         * platform/KURL.cpp:
3344         * platform/KURL.h:
3345         * platform/ListBox.h:
3346         * platform/Logging.cpp:
3347         * platform/Logging.h:
3348         * platform/Pen.h:
3349         * platform/PopUpButton.h:
3350         * platform/RegularExpression.cpp:
3351         * platform/RegularExpression.h:
3352         * platform/SSLKeyGenerator.h:
3353         * platform/ScrollBar.h:
3354         * platform/SegmentedString.h:
3355         * platform/Shared.h:
3356         * platform/Slider.h:
3357         * platform/StringImpl.h:
3358         * platform/TextBox.h:
3359         * platform/TextField.h:
3360         * platform/TextStream.cpp:
3361         * platform/TextStream.h:
3362         * platform/TransferJob.h:
3363         * platform/TransferJobClient.h:
3364         * platform/Widget.h:
3365         * platform/cg/AffineTransformCG.cpp:
3366         * platform/mac/ClipboardMac.h:
3367         * platform/mac/ClipboardMac.mm:
3368         * platform/mac/DeprecatedStringListMac.mm:
3369         * platform/mac/FontCacheMac.mm:
3370         * platform/mac/KURLMac.mm:
3371         * platform/mac/ListBoxMac.mm:
3372         * platform/mac/PopUpButtonMac.mm:
3373         * platform/mac/SSLKeyGeneratorMac.mm:
3374         * platform/mac/TextBoxMac.mm:
3375         * platform/mac/TextFieldMac.mm:
3376         * platform/mac/WebCoreTextArea.h:
3377         * platform/mac/WebCoreTextArea.mm:
3378         * platform/mac/WebCoreTextField.h:
3379         * platform/mac/WebCoreTextField.mm:
3380         * rendering/DeprecatedRenderSelect.h:
3381         * rendering/RenderArena.cpp:
3382         * rendering/RenderArena.h:
3383         * rendering/RenderBlock.cpp:
3384         * rendering/RenderBox.cpp:
3385         * rendering/RenderContainer.cpp:
3386         * rendering/RenderFlexibleBox.cpp:
3387         * rendering/RenderFlow.cpp:
3388         * rendering/RenderLayer.cpp:
3389         * rendering/RenderLineEdit.cpp:
3390         * rendering/RenderObject.h:
3391         * rendering/RenderStyle.cpp:
3392         * rendering/RenderStyle.h:
3393         * rendering/RenderText.cpp:
3394         * rendering/RenderTextFragment.cpp:
3395         * rendering/RenderTheme.h:
3396         * rendering/RenderTreeAsText.cpp:
3397         * rendering/RenderTreeAsText.h:
3398         * rendering/RenderView.h:
3399         * rendering/bidi.h:
3400         * xml/XSLStyleSheet.cpp:
3401         * xml/XSLTProcessor.cpp:
3402
3403 2006-07-09  Geoffrey Garen  <ggaren@apple.com>
3404
3405         Reviewed by Beth.
3406
3407         * bindings/js/kjs_window.cpp:
3408         (KJS::Window::clear): Garbage collect after reinitalizing the global
3409         object, not before, since the reinitialization tends to create garbage.
3410
3411 2006-07-09  Timothy Hatcher  <timothy@apple.com>
3412
3413         Reviewed by Darin.
3414
3415         Bug 9820: Move new DOM API that has been through API review to public headers
3416         http://bugzilla.opendarwin.org/show_bug.cgi?id=9820
3417
3418         * bindings/objc/DOM.mm:
3419         (-[DOMElement focus]):
3420         (-[DOMElement blur]):
3421         (-[DOMRange text]):
3422         (-[DOMRange _text]):
3423         * bindings/objc/DOMCSS.mm:
3424         (-[DOMRGBColor color]):
3425         (-[DOMRGBColor _color]):
3426         * bindings/objc/DOMCore.h:
3427         * bindings/objc/DOMEvents.h:
3428         * bindings/objc/DOMExtensions.h:
3429         * bindings/objc/DOMHTML.mm:
3430         (-[DOMHTMLElement titleDisplayString]):
3431         (-[DOMHTMLDocument createDocumentFragmentWithMarkupString:baseURL:]):
3432         (-[DOMHTMLDocument createDocumentFragmentWithText:]):
3433         (-[DOMHTMLDocument _createDocumentFragmentWithMarkupString:baseURLString:]):
3434         (-[DOMHTMLDocument _createDocumentFragmentWithText:]):
3435         * bindings/objc/DOMPrivate.h:
3436         * bindings/objc/DOMXPath.h:
3437         * bindings/objc/DOMXPath.mm:
3438
3439 2006-07-09  Beth Dakin  <bdakin@apple.com>
3440
3441         Reviewed by Maciej.
3442
3443         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9749 A 
3444         nested content editable div causes unnecessary screen redraws.
3445         
3446         We were repainting too much because we were deciding that we needed 
3447         a full layout because we didn't have a first line box. Our code 
3448         used to hold a lot of assumptions that positioned elements would 
3449         always have line boxes, but I fixed a few bugs a while back that 
3450         appeared because this assumption isn't true. This assumption was 
3451         also causing the extra redraws because the check meant that we 
3452         would decide to do a full layout for any positioned element that 
3453         did not have any line boxes in the first place. Maciej and I talked 
3454         about this, and we couldn't figure out why the check for line boxes 
3455         was part of determining if we need a full layout in the first 
3456         place. After hunting around the code, we decided to assume that 
3457         this check is antiquated. Removing it fixes the bug and doesn't 
3458         seem to break any layout tests. So, fingers crossed!
3459
3460         Will add layout test so soon.
3461
3462         * rendering/bidi.cpp:
3463         (WebCore::RenderBlock::layoutInlineChildren): Remove firstLineBox 
3464         check.
3465
3466 2006-07-09  David Harrison  <harrison@apple.com>
3467
3468         Reviewed by John Sullivan.
3469
3470         <rdar://problem/4598149> Deleting the contents of a DOMRange and then inserting a node into it crashes in WebCore::Font::canUseGlyphCache
3471
3472         Test: fast/dom/delete-contents.html
3473         
3474         * dom/Range.cpp:
3475         (WebCore::Range::processContents):
3476
3477 2006-07-09  Darin Adler  <darin@apple.com>
3478
3479         - another round of renaming; and KWQ is dead
3480
3481         * WebCore.vcproj/WebCore/WebCore.vcproj: Remove paths for kwq and khtml directories.
3482         Move files to their new locations. Did rename.
3483         * WebCore.xcodeproj/project.pbxproj: Move files to their new locations. Did rename.
3484         * WebCoreSources.bkl: Did rename.
3485         * webcore-base.bkl: Removed kwq.
3486
3487         * kwq/AccessibilityObjectCache.h: Removed.
3488         * kwq/AccessibilityObjectCache.mm: Removed.
3489         * kwq/FormDataMac.h: Removed.
3490         * kwq/FormDataMac.mm: Removed.
3491         * kwq/WebCoreAXObject.h: Removed.
3492         * kwq/WebCoreAXObject.mm: Removed.
3493         * kwq/WebCoreEditCommand.h: Removed.
3494         * kwq/WebCoreEditCommand.mm: Removed.
3495         * kwq/WebCorePageState.h: Removed.
3496         * kwq/WebCorePageState.mm: Removed.
3497         * kwq/WebCoreResourceLoaderImp.h: Removed.
3498         * kwq/WebCoreResourceLoaderImp.mm: Removed.
3499
3500         * bridge/AXObjectCache.h: Added.
3501         * bridge/mac/AXObjectCacheMac.mm: Added.
3502         * bridge/mac/WebCoreAXObject.h: Added.
3503         * bridge/mac/WebCoreAXObject.mm: Added.
3504
3505         * loader/CachedObject.cpp: Removed.
3506         * loader/CachedObject.h: Removed.
3507         * loader/CachedObjectClient.h: Removed.
3508         * loader/CachedObjectClientWalker.cpp: Removed.
3509         * loader/CachedObjectClientWalker.h: Removed.
3510
3511         * loader/CachedResource.cpp: Added.
3512         * loader/CachedResource.h: Added.
3513         * loader/CachedResourceClient.h: Added.
3514         * loader/CachedResourceClientWalker.cpp: Added.
3515         * loader/CachedResourceClientWalker.h: Added.
3516
3517         * bridge/mac/FrameMac.mm:
3518         * bridge/mac/WebCoreFrameBridge.mm:
3519         * css/CSSImageValue.h:
3520         * css/CSSImportRule.h:
3521         * dom/Document.cpp:
3522         * dom/Document.h:
3523         * dom/Notation.h:
3524         * dom/ProcessingInstruction.h:
3525         * dom/XMLTokenizer.cpp:
3526         * html/CanvasPattern.h:
3527         * html/HTMLDocument.h:
3528         * html/HTMLImageLoader.cpp:
3529         * html/HTMLImageLoader.h:
3530         * html/HTMLLinkElement.h:
3531         * html/HTMLScriptElement.cpp:
3532         * html/HTMLScriptElement.h:
3533         * html/HTMLTokenizer.cpp:
3534         * html/HTMLTokenizer.h:
3535         * kcanvas/KCanvasFilters.h:
3536         * ksvg2/svg/SVGCursorElement.cpp:
3537         * ksvg2/svg/SVGCursorElement.h:
3538         * ksvg2/svg/SVGFEImageElement.cpp:
3539         * ksvg2/svg/SVGFEImageElement.h:
3540         * loader/Cache.cpp:
3541         * loader/Cache.h:
3542         * loader/CachedCSSStyleSheet.cpp:
3543         * loader/CachedCSSStyleSheet.h:
3544         * loader/CachedImage.cpp:
3545         * loader/CachedImage.h:
3546         * loader/CachedScript.cpp:
3547         * loader/CachedScript.h:
3548         * loader/CachedXBLDocument.cpp:
3549         * loader/CachedXBLDocument.h:
3550         * loader/CachedXSLStyleSheet.cpp:
3551         * loader/CachedXSLStyleSheet.h:
3552         * loader/DocLoader.cpp:
3553         * loader/DocLoader.h:
3554         * loader/LoaderFunctions.h:
3555         * loader/Request.cpp:
3556         * loader/Request.h:
3557         * loader/loader.cpp:
3558         * loader/loader.h:
3559         * loader/mac/LoaderFunctionsMac.mm:
3560         * page/Frame.cpp:
3561         * page/FrameView.cpp:
3562         * platform/gdk/TemporaryLinkStubs.cpp:
3563         * platform/mac/ClipboardMac.h:
3564         * platform/win/TemporaryLinkStubs.cpp:
3565         * rendering/RenderBox.h:
3566         * rendering/RenderContainer.cpp:
3567         * rendering/RenderImage.cpp:
3568         * rendering/RenderImage.h:
3569         * rendering/RenderLayer.h:
3570         * rendering/RenderObject.cpp:
3571         * rendering/RenderObject.h:
3572         * rendering/RenderStyle.cpp:
3573         * rendering/RenderStyle.h:
3574         * xml/XSLImportRule.h:
3575         Did renaming.
3576
3577         * platform/mac/can-convert.mm: Removed.
3578
3579 2006-07-09  Anders Carlsson  <acarlsson@apple.com>
3580
3581         Reviewed by Tim O.
3582
3583         * WebCore.exp:
3584         Add wkPathFromFont.
3585         
3586         * platform/mac/FontDataMac.mm:
3587         (-[NSFont WebCore]):
3588         Use wkPathFromFont.
3589         
3590         * platform/mac/WebCoreSystemInterface.h:
3591         * platform/mac/WebCoreSystemInterface.mm:
3592         Declare wkPathFromFont.
3593
3594 2006-07-09  Brady Eidson  <beidson@apple.com>
3595
3596         Reviewed by Maciej
3597
3598         Set the stage to remove the workaround for the SQLite BLOB corruption.  A few other small cleanups, and
3599         preparation for pruning unreferenced and unretained icons.
3600
3601         * icon/IconDatabase.cpp:
3602         (WebCore::IconDatabase::recreateDatabase):  Added another trigger to assist in icon removal
3603         (WebCore::IconDatabase::deletePrivateTables):  Cleaned up logging messages
3604         (WebCore::IconDatabase::imageDataForIconID):  #ifdefed the blobbing hack for impending removal, use the real blob by default
3605         (WebCore::IconDatabase::imageDataForIconURL):  same
3606         (WebCore::IconDatabase::imageDataForPageURL):  same
3607         (WebCore::IconDatabase::pruneUnreferencedIcons):  Will delete any icons and their data that are not referenced
3608           by any PageURL
3609         * icon/IconDatabase.h:
3610
3611         * icon/SQLDatabase.h:  Changed BlobAsVector to be unsigned char as thats the most reasonable type for
3612           a byte-buffer, and is what CFData expects
3613         * icon/SQLStatement.cpp:
3614         (WebCore::SQLStatement::getColumnBlobAsVector):
3615
3616 2006-07-09  Darin Adler  <darin@apple.com>
3617
3618         - move all but the last 12 files out of kwq directory
3619         - removed a few unused source files I discovered
3620
3621         * WebCore.vcproj/WebCore/WebCore.vcproj: Update for new file locations.
3622         * WebCore.xcodeproj/project.pbxproj: Ditto.
3623
3624         * bridge/mac/FrameMac.mm:
3625         * dom/Element.h:
3626         * html/HTMLImageLoader.cpp:
3627         * loader/Cache.cpp:
3628         * loader/Cache.h:
3629         * loader/CachedCSSStyleSheet.cpp:
3630         * loader/CachedCSSStyleSheet.h:
3631         * loader/CachedImage.cpp:
3632         * loader/CachedImage.h:
3633         * loader/CachedObject.h:
3634         * loader/CachedScript.cpp:
3635         * loader/CachedScript.h:
3636         * loader/CachedXBLDocument.cpp:
3637         * loader/CachedXBLDocument.h:
3638         * loader/CachedXSLStyleSheet.cpp:
3639         * loader/CachedXSLStyleSheet.h:
3640         * loader/DocLoader.cpp:
3641         * loader/DocLoader.h:
3642         * page/Frame.cpp:
3643         * page/Frame.h:
3644         * page/FramePrivate.h:
3645         * platform/gdk/TemporaryLinkStubs.cpp:
3646         * platform/win/TemporaryLinkStubs.cpp:
3647         * rendering/DeprecatedSlider.cpp:
3648         * rendering/RenderObject.h:
3649         * xml/xmlhttprequest.cpp:
3650         Updated includes as needed for file location changes. Changed
3651         CachePolicy uses to match new filename and enum names.
3652
3653         * loader/CachedResource.cpp: Removed.
3654         * loader/CachedResource.h: Removed.
3655         * loader/CachedResourceClient.h: Removed.
3656         * loader/CachedResourceClientWalker.cpp: Removed.
3657         * loader/CachedResourceClientWalker.h: Removed.
3658         The above files were checked in by accident a while back. The rename of
3659         CachedObject to CachedResource is now reflected in do-webcore-rename,
3660         and will be done soon.
3661
3662         * kwq/AffineTransform.cpp: Removed.
3663         * kwq/AffineTransform.h: Removed.
3664         * kwq/CacheControl.h: Removed.
3665         * kwq/DeprecatedPtrQueue.h: Removed.
3666         * kwq/FileButton.h: Removed.
3667         * kwq/FileButton.mm: Removed.
3668         * kwq/ListBox.h: Removed.
3669         * kwq/ListBox.mm: Removed.
3670         * kwq/LoaderFunctions.h: Removed.
3671         * kwq/LoaderFunctions.mm: Removed.
3672         * kwq/PopUpButton.h: Removed.
3673         * kwq/PopUpButton.mm: Removed.
3674         * kwq/SSLKeyGenerator.h: Removed.
3675         * kwq/SSLKeyGenerator.mm: Removed.
3676         * kwq/Settings.h: Removed.
3677         * kwq/TextBox.h: Removed.
3678         * kwq/TextBox.mm: Removed.
3679         * kwq/TextField.h: Removed.
3680         * kwq/TextField.mm: Removed.
3681         * kwq/WebCoreScrollBar.h: Removed.
3682         * kwq/WebCoreScrollBar.mm: Removed.
3683         * kwq/WebCoreSlider.h: Removed.
3684         * kwq/WebCoreSlider.mm: Removed.
3685
3686         * loader/CachePolicy.h: Added.
3687         * loader/LoaderFunctions.h: Added.
3688
3689         * loader/mac/LoaderFunctionsMac.mm: Added.
3690
3691         * page/Settings.h: Added.
3692
3693         * platform/AffineTransform.cpp: Added.
3694         * platform/AffineTransform.h: Added.
3695         * platform/DeprecatedPtrQueue.h: Added.
3696         * platform/FileButton.h: Added.
3697         * platform/ListBox.h: Added.
3698         * platform/PopUpButton.h: Added.
3699         * platform/SSLKeyGenerator.h: Added.
3700         * platform/ScrollBar.h: Added.
3701         * platform/Slider.h: Added.
3702         * platform/TextBox.h: Added.
3703         * platform/TextField.h: Added.
3704
3705         * platform/cg/AffineTransformCG.cpp: Added.
3706
3707         * platform/mac/FileButtonMac.mm: Added.
3708         * platform/mac/ListBoxMac.mm: Added.
3709         * platform/mac/PopUpButtonMac.mm: Added.
3710         * platform/mac/SSLKeyGeneratorMac.mm: Added.
3711         * platform/mac/ScrollBarMac.mm: Added.
3712         * platform/mac/ScrollBarMac.mm: Added.
3713         * platform/mac/SliderMac.mm: Added.
3714         * platform/mac/SliderMac.mm: Added.
3715         * platform/mac/TextBoxMac.mm: Added.
3716         * platform/mac/TextFieldMac.mm: Added.
3717
3718 2006-07-09  Darin Adler  <darin@apple.com>
3719
3720         - move 4 files out of kwq directory
3721         - make some minor project adjustments for the WebCore project
3722
3723         * WebCore.xcodeproj/project.pbxproj: Link libsqlite3 the same way we do other
3724         libraries, rather than using a custom linker option. Moved the files from their
3725         old locations to the new ones. Removed "khtml" from the list of header search
3726         paths since that directory doesn't exist any more. Eliminated STYLE_LDFLAGS
3727         and just put -umbrella WebKit in OTHER_LDFLAGS in the Production configuration
3728         (was a leftover from "build styles" in Xcode 1). Changed to use EXPORTED_SYMBOLS_FILE
3729         instead of using -exported_symbols_list directly again now that Xcode has fixed the
3730         "strip twice" bug. Removed unneeded explicit SECTORDER_FLAGS = "" settings.
3731         Removed the explicit -Y,3 option now that Xcode does that by default.
3732
3733         * WebCore.vcproj/WebCore/WebCore.vcproj: Removed some obsolete uneeded files,
3734         many of which didn't exist any more. Moved the files from their old locations
3735         to the new ones.
3736
3737         * WebCoreSources.bkl: Moved the files from their old locations to the new ones.
3738
3739         * kwq/DeprecatedCString.cpp: Removed.
3740         * kwq/DeprecatedCString.h: Removed.
3741         * kwq/TextStream.cpp: Removed.
3742         * kwq/TextStream.h: Removed.
3743         * platform/DeprecatedCString.cpp: Added.
3744         * platform/DeprecatedCString.h: Added.
3745         * platform/TextStream.cpp: Added.
3746         * platform/TextStream.h: Added.
3747
3748 2006-07-09  Darin Adler  <darin@apple.com>
3749
3750         Rubber stamped by Maciej (kinda).
3751
3752         - did the next pass of renaming (used do-webcore-rename script)
3753           this takes care of most of the remaining KWQ names (almost all)
3754
3755         * WebCore+SVG/DOMList.h:
3756         * WebCore.vcproj/WebCore/WebCore.vcproj:
3757         * WebCore.xcodeproj/project.pbxproj:
3758         * WebCoreSources.bkl:
3759         * bindings/js/kjs_dom.cpp:
3760         * bindings/js/kjs_window.cpp:
3761         * bindings/objc/DOMHTML.mm:
3762         * bridge/mac/FrameMac.h:
3763         * bridge/mac/FrameMac.mm:
3764         * bridge/mac/WebCoreFrameBridge.mm:
3765         * bridge/mac/WebCoreSettings.h:
3766         * bridge/mac/WebCoreSettings.mm:
3767         * bridge/win/FrameWin.cpp:
3768         * css/CSSPrimitiveValue.cpp:
3769         * css/CSSValueKeywords.in:
3770         * css/MediaQueryEvaluator.cpp:
3771         * css/cssparser.cpp:
3772         * css/cssstyleselector.cpp:
3773         * css/cssstyleselector.h:
3774         * dom/CharacterData.cpp:
3775         * dom/CharacterData.h:
3776         * dom/Document.cpp:
3777         * dom/Element.cpp:
3778         * dom/Element.h:
3779         * dom/EventTargetNode.cpp:
3780         * dom/EventTargetNode.h:
3781         * dom/Node.cpp:
3782         * dom/Node.h:
3783         * dom/Position.cpp:
3784         * dom/ProcessingInstruction.cpp:
3785         * dom/QualifiedName.cpp:
3786         * dom/QualifiedName.h:
3787         * dom/XMLTokenizer.cpp: Added.
3788         * dom/xml_tokenizer.cpp: Removed.
3789         * dom/xml_tokenizer.h: Removed.
3790         * editing/EditAction.h:
3791         * editing/HTMLInterchange.cpp:
3792         * editing/HTMLInterchange.h:
3793         * editing/Selection.h:
3794         * editing/SelectionController.h:
3795         * editing/TextAffinity.h:
3796         * editing/TextIterator.cpp:
3797         * editing/TextIterator.h:
3798         * editing/VisiblePosition.h:
3799         * editing/htmlediting.cpp:
3800         * editing/markup.cpp:
3801         * editing/markup.h:
3802         * editing/visible_units.cpp:
3803         * editing/visible_units.h:
3804         * html/HTMLDocument.cpp:
3805         * html/HTMLFontElement.cpp:
3806         * html/HTMLInputElement.cpp:
3807         * html/HTMLKeygenElement.cpp:
3808         * html/HTMLSelectElement.h:
3809         * html/HTMLTextAreaElement.cpp:
3810         * html/HTMLTextFieldInnerElement.cpp:
3811         * html/HTMLTokenizer.cpp:
3812         * html/HTMLTokenizer.h:
3813         * kcanvas/KCanvasContainer.cpp: Removed.
3814         * kcanvas/KCanvasContainer.h: Removed.
3815         * kcanvas/KCanvasCreator.cpp:
3816         * kcanvas/KCanvasFilters.cpp:
3817         * kcanvas/KCanvasFilters.h:
3818         * kcanvas/KCanvasMatrix.cpp:
3819         * kcanvas/KCanvasMatrix.h:
3820         * kcanvas/KCanvasPath.cpp:
3821         * kcanvas/KCanvasPath.h:
3822         * kcanvas/KCanvasResources.cpp:
3823         * kcanvas/KCanvasResources.h:
3824         * kcanvas/KCanvasTreeDebug.cpp:
3825         * kcanvas/KCanvasTreeDebug.h:
3826         * kcanvas/RenderForeignObject.cpp:
3827         * kcanvas/RenderForeignObject.h:
3828         * kcanvas/RenderPath.cpp:
3829         * kcanvas/RenderPath.h:
3830         * kcanvas/RenderSVGContainer.cpp: Added.
3831         * kcanvas/RenderSVGContainer.h: Added.
3832         * kcanvas/RenderSVGImage.cpp:
3833         * kcanvas/RenderSVGImage.h:
3834         * kcanvas/RenderSVGText.cpp:
3835         * kcanvas/RenderSVGText.h:
3836         * kcanvas/device/KRenderingPaintServer.h:
3837         * kcanvas/device/KRenderingPaintServerGradient.cpp:
3838         * kcanvas/device/KRenderingPaintServerGradient.h:
3839         * kcanvas/device/KRenderingPaintServerPattern.cpp:
3840         * kcanvas/device/KRenderingPaintServerPattern.h:
3841         * kcanvas/device/KRenderingPaintServerSolid.cpp:
3842         * kcanvas/device/KRenderingPaintServerSolid.h:
3843         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
3844         * kcanvas/device/quartz/KCanvasItemQuartz.h:
3845         * kcanvas/device/quartz/KCanvasResourcesQuartz.h:
3846         * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
3847         * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
3848         * kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
3849         * ksvg2/css/CSSValueKeywords.in:
3850         * ksvg2/css/SVGRenderStyleDefs.cpp:
3851         * ksvg2/misc/KCanvasRenderingStyle.cpp:
3852         * ksvg2/misc/KSVGTimeScheduler.cpp:
3853         * ksvg2/svg/SVGAElement.cpp:
3854         * ksvg2/svg/SVGAnimateTransformElement.cpp:
3855         * ksvg2/svg/SVGAnimateTransformElement.h:
3856         * ksvg2/svg/SVGGElement.cpp:
3857         * ksvg2/svg/SVGHelper.cpp:
3858         * ksvg2/svg/SVGHelper.h:
3859         * ksvg2/svg/SVGImageElement.cpp:
3860         * ksvg2/svg/SVGLinearGradientElement.cpp:
3861         * ksvg2/svg/SVGMarkerElement.cpp:
3862         * ksvg2/svg/SVGMaskElement.cpp:
3863         * ksvg2/svg/SVGMatrix.cpp:
3864         * ksvg2/svg/SVGMatrix.h:
3865         * ksvg2/svg/SVGPatternElement.cpp:
3866         * ksvg2/svg/SVGRadialGradientElement.cpp:
3867         * ksvg2/svg/SVGSVGElement.cpp:
3868         * ksvg2/svg/SVGStyledElement.h:
3869         * ksvg2/svg/SVGStyledTransformableElement.cpp:
3870         * ksvg2/svg/SVGStyledTransformableElement.h:
3871         * ksvg2/svg/SVGSwitchElement.cpp:
3872         * ksvg2/svg/SVGTextElement.cpp:
3873         * ksvg2/svg/SVGTransformable.h:
3874         * ksvg2/svg/SVGUseElement.cpp:
3875         * kwq/AffineTransform.cpp: Added.
3876         * kwq/AffineTransform.h: Added.
3877         * kwq/DeprecatedCString.cpp: Added.
3878         * kwq/DeprecatedCString.h: Added.
3879         * kwq/DeprecatedPtrQueue.h: Added.
3880         * kwq/FileButton.h: Added.
3881         * kwq/FileButton.mm: Added.
3882         * kwq/FormDataMac.mm: Added.
3883         * kwq/KWQCString.cpp: Removed.
3884         * kwq/KWQCString.h: Removed.
3885         * kwq/KWQComboBox.h: Removed.
3886         * kwq/KWQComboBox.mm: Removed.
3887         * kwq/KWQEditCommand.h: Removed.
3888         * kwq/KWQEditCommand.mm: Removed.
3889         * kwq/KWQFileButton.h: Removed.
3890         * kwq/KWQFileButton.mm: Removed.
3891         * kwq/KWQFormData.h: Removed.
3892         * kwq/KWQFormData.mm: Removed.
3893         * kwq/KWQKHTMLSettings.h: Removed.
3894         * kwq/KWQKIOGlobal.h: Removed.
3895         * kwq/KWQKSSLKeyGen.h: Removed.
3896         * kwq/KWQKSSLKeyGen.mm: Removed.
3897         * kwq/KWQLineEdit.h: Removed.
3898         * kwq/KWQLineEdit.mm: Removed.
3899         * kwq/KWQListBox.h: Removed.
3900         * kwq/KWQListBox.mm: Removed.
3901         * kwq/KWQLoader.h: Removed.
3902         * kwq/KWQLoader.mm: Removed.
3903         * kwq/KWQPageState.h: Removed.
3904         * kwq/KWQPageState.mm: Removed.
3905         * kwq/KWQPtrQueue.h: Removed.
3906         * kwq/KWQResourceLoader.h: Removed.
3907         * kwq/KWQResourceLoader.mm: Removed.
3908         * kwq/KWQScrollBar.h: Removed.
3909         * kwq/KWQScrollBar.mm: Removed.
3910         * kwq/KWQSlider.h: Removed.
3911         * kwq/KWQSlider.mm: Removed.
3912         * kwq/KWQTextEdit.h: Removed.
3913         * kwq/KWQTextEdit.mm: Removed.
3914         * kwq/KWQTextStream.cpp: Removed.
3915         * kwq/KWQTextStream.h: Removed.
3916         * kwq/KWQWMatrix.cpp: Removed.
3917         * kwq/KWQWMatrix.h: Removed.
3918         * kwq/ListBox.h: Added.
3919         * kwq/ListBox.mm: Added.
3920         * kwq/LoaderFunctions.h: Added.
3921         * kwq/LoaderFunctions.mm: Added.
3922         * kwq/PopUpButton.h: Added.
3923         * kwq/PopUpButton.mm: Added.
3924         * kwq/SSLKeyGenerator.h: Added.
3925         * kwq/SSLKeyGenerator.mm: Added.
3926         * kwq/Settings.h: Added.
3927         * kwq/TextBox.h: Added.
3928         * kwq/TextBox.mm: Added.
3929         * kwq/TextField.h: Added.
3930         * kwq/TextField.mm: Added.
3931         * kwq/TextStream.cpp: Added.
3932         * kwq/TextStream.h: Added.
3933         * kwq/WebCoreEditCommand.h: Added.
3934         * kwq/WebCoreEditCommand.mm: Added.
3935         * kwq/WebCorePageState.h: Added.
3936         * kwq/WebCorePageState.mm: Added.
3937         * kwq/WebCoreResourceLoaderImp.h: Added.
3938         * kwq/WebCoreResourceLoaderImp.mm: Added.
3939         * kwq/WebCoreScrollBar.h: Added.
3940         * kwq/WebCoreScrollBar.mm: Added.
3941         * kwq/WebCoreSlider.h: Added.
3942         * kwq/WebCoreSlider.mm: Added.
3943         * loader/Cache.h:
3944         * loader/CachedCSSStyleSheet.cpp:
3945         * loader/CachedImage.cpp:
3946         * loader/CachedObject.h:
3947         * loader/CachedObjectClientWalker.h:
3948         * loader/CachedResource.h:
3949         * loader/CachedResourceClientWalker.h:
3950         * loader/CachedScript.h:
3951         * loader/CachedXBLDocument.h:
3952         * loader/Decoder.h:
3953         * loader/DocLoader.cpp:
3954         * loader/DocLoader.h:
3955         * loader/FormData.h:
3956         * loader/ImageDocument.cpp:
3957         * loader/PluginDocument.cpp:
3958         * loader/TextDocument.cpp:
3959         * loader/loader.cpp:
3960         * loader/loader.h:
3961         * page/Frame.cpp:
3962         * page/Frame.h:
3963         * page/FramePrivate.h:
3964         * page/Page.cpp:
3965         * page/Page.h:
3966         * platform/DeprecatedPtrList.h:
3967         * platform/DeprecatedPtrListImpl.cpp:
3968         * platform/DeprecatedPtrListImpl.h:
3969         * platform/DeprecatedString.cpp:
3970         * platform/DeprecatedString.h:
3971         * platform/DeprecatedStringList.cpp:
3972         * platform/DeprecatedStringList.h:
3973         * platform/DeprecatedValueList.h:
3974         * platform/DeprecatedValueListImpl.cpp:
3975         * platform/DeprecatedValueListImpl.h:
3976         * platform/FloatSize.h:
3977         * platform/Font.cpp:
3978         * platform/KURL.cpp:
3979         * platform/RegularExpression.cpp:
3980         * platform/RegularExpression.h:
3981         * platform/SegmentedString.h:
3982         * platform/StreamingTextDecoder.cpp:
3983         * platform/String.cpp:
3984         * platform/StringImpl.cpp:
3985         * platform/TextEncoding.cpp:
3986         * platform/TransferJob.cpp:
3987         * platform/TransferJob.h:
3988         * platform/TransferJobInternal.h:
3989         * platform/gdk/FrameGdk.cpp:
3990         * platform/gdk/TemporaryLinkStubs.cpp:
3991         * platform/mac/ClipboardMac.h:
3992         * platform/mac/ClipboardMac.mm:
3993         * platform/mac/CursorMac.mm:
3994         * platform/mac/DeprecatedStringMac.mm: Added.
3995         * platform/mac/FontCacheMac.mm:
3996         * platform/mac/FontMac.mm:
3997         * platform/mac/FoundationExtras.h:
3998         * platform/mac/ImageMac.mm:
3999         * platform/mac/KURLMac.mm:
4000         * platform/mac/MouseEventMac.mm: Removed.
4001         * platform/mac/QStringListMac.mm: Removed.
4002         * platform/mac/QStringMac.mm: Removed.
4003         * platform/mac/TransferJobMac.mm:
4004         * platform/mac/WebCoreTextArea.h:
4005         * platform/mac/WebCoreTextArea.mm:
4006         * platform/mac/WebCoreTextField.h:
4007         * platform/mac/WebCoreTextField.mm:
4008         * platform/mac/WidgetMac.mm:
4009         * platform/win/TemporaryLinkStubs.cpp:
4010         * rendering/DataRef.h:
4011         * rendering/DeprecatedRenderSelect.cpp:
4012         * rendering/DeprecatedRenderSelect.h:
4013         * rendering/DeprecatedSlider.cpp:
4014         * rendering/InlineFlowBox.cpp:
4015         * rendering/RenderApplet.cpp:
4016         * rendering/RenderBlock.cpp:
4017         * rendering/RenderBlock.h:
4018         * rendering/RenderContainer.cpp:
4019         * rendering/RenderFileButton.cpp:
4020         * rendering/RenderFlexibleBox.cpp:
4021         * rendering/RenderFlow.cpp:
4022         * rendering/RenderFormElement.cpp:
4023         * rendering/RenderFrameSet.cpp:
4024         * rendering/RenderFrameSet.h:
4025         * rendering/RenderImage.cpp:
4026         * rendering/RenderInline.cpp:
4027         * rendering/RenderLayer.cpp:
4028         * rendering/RenderLayer.h:
4029         * rendering/RenderLineEdit.cpp:
4030         * rendering/RenderListItem.cpp:
4031         * rendering/RenderListMarker.cpp:
4032         * rendering/RenderObject.cpp:
4033         * rendering/RenderObject.h:
4034         * rendering/RenderPartObject.cpp:
4035         * rendering/RenderReplaced.cpp:
4036         * rendering/RenderStyle.cpp: Added.
4037         * rendering/RenderStyle.h: Added.
4038         * rendering/RenderTable.cpp:
4039         * rendering/RenderTable.h:
4040         * rendering/RenderTableCell.cpp:
4041         * rendering/RenderTableCell.h:
4042         * rendering/RenderTableCol.cpp:
4043         * rendering/RenderTableCol.h:
4044         * rendering/RenderTableRow.cpp:
4045         * rendering/RenderTableSection.cpp:
4046         * rendering/RenderTableSection.h:
4047         * rendering/RenderText.cpp:
4048         * rendering/RenderText.h:
4049         * rendering/RenderTextArea.cpp:
4050         * rendering/RenderTextControl.cpp: Added.
4051         * rendering/RenderTextControl.h: Added.
4052         * rendering/RenderTextField.cpp: Removed.
4053         * rendering/RenderTextField.h: Removed.
4054         * rendering/RenderTheme.cpp:
4055         * rendering/RenderThemeMac.mm:
4056         * rendering/RenderTreeAsText.cpp:
4057         * rendering/RenderTreeAsText.h:
4058         * rendering/RenderView.cpp:
4059         * rendering/RenderWidget.cpp:
4060         * rendering/bidi.cpp:
4061         * rendering/render_style.cpp: Removed.
4062         * rendering/render_style.h: Removed.
4063         * xml/XSLStyleSheet.cpp:
4064         * xml/XSLTProcessor.cpp:
4065         * xml/xmlhttprequest.cpp:
4066         * xpath/impl/XPathParser.cpp:
4067
4068 2006-07-09  Rob Buis  <buis@kde.org>
4069
4070         Reviewed by Darin.
4071
4072         http://bugzilla.opendarwin.org/show_bug.cgi?id=8251
4073         navigator.platform incorrect in WebKit.app on Intel Macs
4074
4075         For navigator.platform return "MacIntel" for Intel processors, "MacPPC"
4076         otherwise.
4077
4078         * bindings/js/kjs_navigator.cpp:
4079         (KJS::Navigator::getValueProperty):
4080
4081 2006-07-08  Timothy Hatcher  <timothy@apple.com>
4082
4083         Reviewed by Maciej.
4084
4085         Bug 5312: comments aren't available via DOM
4086         http://bugzilla.opendarwin.org/show_bug.cgi?id=5312
4087
4088         <rdar://problem/4564414> getting comments via DOM isn't working (5312)
4089         <rdar://problem/4545691> DOM_COMMENT node masking out real DOM elements
4090
4091         * dom/Document.cpp:
4092         (WebCore::Document::removedLastRef): set m_documentElement to 0
4093         (WebCore::Document::childrenChanged): invalidate the document element we have cached in case it was replaced
4094         (WebCore::Document::documentElement): cache the first element as the document node if m_documentElement is 0
4095         * dom/Document.h: added m_documentElement
4096         * html/HTMLDocument.cpp: removed documentElement(), HTML documents just use Document's documentElement()
4097         * html/HTMLDocument.h: ditto
4098         * html/HTMLParser.cpp:
4099         (WebCore::HTMLParser::handleError): make a new HTML node is the document's firstChild is NULL or
4100         the firstChild is not a HTML element (like a comment)
4101         * html/HTMLTokenizer.cpp:
4102         (WebCore::HTMLTokenizer::parseComment): removed the #ifdef to include comment nodes
4103
4104 2006-07-08  Anders Carlsson  <acarlsson@apple.com>
4105
4106         Reviewed by Darin, tweaked slightly and landed by Maciej.
4107
4108         http://bugzilla.opendarwin.org/show_bug.cgi?id=9787
4109         fast/frames tests failing (bad pointer to owner element) under MallocScribble
4110         
4111         * html/HTMLFrameElement.cpp:
4112         (WebCore::HTMLFrameElement::close):
4113         Disconnect the owner element of our frame.
4114         
4115         * html/HTMLIFrameElement.cpp:
4116         (WebCore::HTMLIFrameElement::attach):
4117         Don't call setFrame here.
4118         
4119         * html/HTMLPlugInElement.cpp:
4120         (WebCore::HTMLPlugInElement::detach):
4121         Disconnect the owner element of our frame.
4122
4123         * html/HTMLPlugInElement.h:
4124         (WebCore::HTMLPlugInElement::setFrameName):        
4125         New function.
4126         
4127         * page/Frame.cpp:
4128         (WebCore::Frame::Frame):