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