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