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