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