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