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