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