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