e96c97ba567a3229c2db846186b6c703f0ff37c1
[WebKit-https.git] / WebCore / ChangeLog
1 2006-07-07  Justin Garcia  <justin.garcia@apple.com>
2
3         Reviewed by levi
4         
5         Fix Mail ToDo crashers.
6
7         * dom/Range.cpp:
8         (WebCore::Range::compareBoundaryPoints): Added an ASSERT that both
9         containers are non-null and an early return.
10         * editing/Selection.cpp:
11         (WebCore::Selection::validate): Fix a dangling start/end.
12         (WebCore::Selection::adjustForEditableContent): Added an early return if
13         m_start or m_end are null.
14         (WebCore::Selection::isContentEditable): Use isRichlyEditablePosition.
15         (WebCore::Selection::isContentRichlyEditable): Ditto.
16         * editing/Selection.h:
17         * editing/VisiblePosition.cpp:
18         (WebCore::VisiblePosition::next): Use the new highestEditableRoot.
19         (WebCore::VisiblePosition::previous): Ditto.
20         * editing/htmlediting.cpp:
21         (WebCore::highestEditableRoot): Takes in a position.
22         (WebCore::isEditablePosition): Added.
23         (WebCore::isRichlyEditablePosition): Added.
24         (WebCore::rootEditableElement): Added.
25         (WebCore::nextCandidate): Moved and split out from nextVisiblePosition.
26         (WebCore::nextVisuallyDistinctCandidate): Ditto.
27         (WebCore::previousCandidate): Moved and split out from previousVisiblePosition.
28         (WebCore::previousVisuallyDistinctCandidate): Ditto.
29         (WebCore::firstEditablePositionAfterPositionInRoot): Iterate over positions,
30         using nextVisuallyDistinctCandidate, skipping atomic nodes that are non-editable.
31         (WebCore::lastEditablePositionBeforePositionInRoot): Ditto.
32         * editing/htmlediting.h:
33         * editing/visible_units.cpp:
34         (WebCore::startOfWord): Added a FIXME.
35
36 2006-07-07  Levi Weintraub  <lweintraub@apple.com>
37
38         Reviewed by justin
39
40         Allowed deletion typing commands to take in a granularity
41
42         * bridge/mac/WebCoreFrameBridge.h: Pass granularity across the bridge
43         * bridge/mac/WebCoreFrameBridge.mm: Ditto
44         (-[WebCoreFrameBridge deleteKeyPressedWithSmartDelete:granularity:]):
45         (-[WebCoreFrameBridge forwardDeleteKeyPressedWithSmartDelete:granularity:]):
46         * editing/TypingCommand.cpp: Constructors take in a granularity
47         (WebCore::TypingCommand::TypingCommand):
48         (WebCore::TypingCommand::deleteKeyPressed):
49         (WebCore::TypingCommand::forwardDeleteKeyPressed):
50         * editing/TypingCommand.h: ditto
51         * page/Frame.h: Fixed bug that shouldDeleteSelection wasn't virtual
52
53 2006-07-07  Brady Eidson  <beidson@apple.com>
54
55         Reviewed by Anders and Tim Hatcher
56
57         Added an accessor to a SQLite config option to change its disk-syncing behavior.
58         Used this accessor to significantly speed up writes to the Icon DB.
59
60         * icon/IconDatabase.cpp:
61         (WebCore::IconDatabase::open):  Disable full syncing to the SQLite db to speed up writes to the icondb
62
63         * icon/SQLDatabase.cpp:
64         (SQLDatabase::setFullsync):
65         (SQLDatabase::setSynchronous):
66         * icon/SQLDatabase.h:
67         (WebCore::SQLDatabase::):  Added accessor to the SQLite config pragma "synchronous"
68
69 2006-07-07  Darin Adler  <darin@apple.com>
70
71         Reviewed by Maciej.
72
73         - fixed a storage leak noticed by the buildbot
74
75         * dom/Document.cpp: (WebCore::Document::removedLastRef):
76         Call delete on the markers before clearing the map containing them.
77
78 2006-07-08  Anders Carlsson  <acarlsson@apple.com>
79
80         Reviewed by Brady.
81
82         http://bugzilla.opendarwin.org/show_bug.cgi?id=9777
83         Reproducible crash in Loading/Frames in ToT.
84         
85         The problem was that the renderpart destructor resets the frame's 
86         owner element. For iframes, this should only be done when the element is 
87         going to be removed from the document.
88         
89         * html/HTMLIFrameElement.cpp:
90         (WebCore::HTMLIFrameElement::~HTMLIFrameElement):
91         (WebCore::HTMLIFrameElement::willRemove):
92         (WebCore::HTMLIFrameElement::removedFromDocument):
93         (WebCore::HTMLIFrameElement::detach):        
94         * html/HTMLIFrameElement.h:
95         Remove the frame in willRemove instead.
96         
97         * rendering/RenderPart.cpp:
98         (WebCore::RenderPart::RenderPart):
99         (WebCore::RenderPart::~RenderPart):
100         * rendering/RenderPart.h:
101         Don't call setFrame(0) in the destructor when the element is an iframe element.
102
103 2006-07-07  Darin Adler  <darin@apple.com>
104
105         Reviewed by Anders.
106
107         - fixed a storage leak noticed by the buildbot
108
109         * page/FrameView.cpp: (WebCore::FrameViewPrivate::~FrameViewPrivate):
110         Delete m_scheduledEvents.
111
112 2006-07-07  Darin Adler  <darin@apple.com>
113
114         Reviewed by Adele.
115
116         - fixed a couple of storage leaks noticed by the buildbot
117
118         * html/HTMLOptGroupElement.cpp: (WebCore::HTMLOptGroupElement::attach):
119         Call deref on the style after calling setRenderStyle, since styleForRenderer
120         returns us a "ref'd" RenderStyle object.
121         * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::attach): Ditto.
122
123 2006-07-07  Darin Adler  <darin@apple.com>
124
125         Reviewed by Adele.
126
127         - fix some license mistakes
128
129         * LICENSE-APPLE: Added more years of publication to the copyright here.
130
131         * html/CanvasGradient.idl: Corrected license on this file. It had the wrong one.
132         * html/CanvasPattern.idl: Ditto.
133         * html/CanvasRenderingContext2D.idl: Ditto.
134         * html/HTMLCanvasElement.idl: Ditto.
135
136 2006-07-06  Levi Weintraub  <lweintraub@apple.com>
137
138         Reviewed by justin
139
140         Improved table editing: pressing delete directly before or after a table will now select
141         the table first, then delete it, instead of just deleting it. Useful for when the table's
142         existence is non-obvious.
143
144         * bridge/mac/FrameMac.h: Added shouldDeleteSelection, which allows WebCore to trigger
145         deletion editing deligates
146         * bridge/mac/FrameMac.mm: ditto
147         (WebCore::FrameMac::shouldDeleteSelection):
148         * bridge/mac/WebCoreFrameBridge.h: ditto
149         * editing/TypingCommand.cpp: Implemented check for a caret position next to a table, and
150         subsequent selection (as opposed to removal)
151         (WebCore::TypingCommand::deleteKeyPressed):
152         (WebCore::TypingCommand::forwardDeleteKeyPressed):
153         * page/Frame.cpp: shouldDeleteSelection added
154         (WebCore::Frame::shouldDeleteSelection):
155         * page/Frame.h: ditto
156
157 2006-07-07  Sam Weinig  <sam.weinig@gmail.com>
158
159         Reviewed by Eric.
160
161         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9768
162           Split XSLImportRule out of XSLStyleSheet.* into separate 
163           files (one class per file).
164
165         * WebCore.xcodeproj/project.pbxproj:
166         * xml/XSLImportRule.cpp: Added.
167         (WebCore::XSLImportRule::XSLImportRule):
168         (WebCore::XSLImportRule::parentStyleSheet):
169         (WebCore::XSLImportRule::loadSheet):
170         * xml/XSLImportRule.h: Added.
171         * xml/XSLStyleSheet.cpp:
172         * xml/XSLStyleSheet.h:
173
174 2006-07-07  Anders Carlsson  <acarlsson@apple.com>
175
176         Reviewed by Darin.
177
178         http://bugzilla.opendarwin.org/show_bug.cgi?id=8300
179         REGRESSION: First mouse click is randomly ignored when clicking on checkbox and radio buttons
180         
181         * css/html4.css:
182         Set "-webkit-user-select: ignore" on radio buttons and check boxes .
183         
184 2006-07-07  Maciej Stachowiak  <mjs@apple.com>
185
186         Reviewed by Tim Hatcher.
187
188         - fix 20 Node leaks on fast/events tests - these should be the last ones
189
190         * bindings/objc/DOMEvents.mm:
191         (-[DOMEvent dealloc]): implement - deref the event!
192         (-[DOMEvent finalize]): ditto
193
194 2006-07-06  Maciej Stachowiak  <mjs@apple.com>
195
196         Reviewed by Tim Hatcher.
197
198         - fix 26 Node leaks on fast/dom tests
199
200         * dom/Document.cpp:
201         (WebCore::Document::removedLastRef): delete tokenizer - if we are still parsing at this point, we don't
202         want nodes held by the parser to keep the document alive.
203         * html/HTMLParser.cpp:
204         (WebCore::RefNonDocNodePtr::RefNonDocNodePtr): Smart pointer that acts like RefPtr for Node,
205         but avoids refing document nodes to avoid cycles.
206         (WebCore::RefNonDocNodePtr::~RefNonDocNodePtr):
207         (WebCore::RefNonDocNodePtr::get):
208         (WebCore::RefNonDocNodePtr::operator*):
209         (WebCore::RefNonDocNodePtr::operator->):
210         (WebCore::RefNonDocNodePtr::operator!):
211         (WebCore::RefNonDocNodePtr::operator UnspecifiedBoolType):
212         (WebCore::RefNonDocNodePtr::operator=):
213         (WebCore::operator==):
214         (WebCore::operator!=):
215         (WebCore::HTMLStackElem): Use a RefNonDocNodePtr instead of RefPtr<Node>
216         (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks): Use a RefPtr here to avoid crashing
217
218 2006-07-06  Adele Peterson  <adele@apple.com>
219
220         Reviewed by Maciej.
221
222         Fixed new popup control to open up when the spacebar and the up and down arrows are pressed.
223
224         - Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=9762
225         [Native pop up] Highlighted item text is black instead of white
226
227         * html/HTMLSelectElement.cpp:
228         (WebCore::HTMLSelectElement::isKeyboardFocusable): Added.
229         (WebCore::HTMLSelectElement::isMouseFocusable): Added.
230         (WebCore::HTMLSelectElement::defaultEventHandler): Updated to showPopup for up and down arrow keys and spacebar.
231         * html/HTMLSelectElement.h: (WebCore::HTMLSelectElement::shouldUseMenuList): Made this const.
232         * rendering/RenderPopupMenu.cpp: (WebCore::RenderPopupMenu::populate): Added FIXME.
233         * rendering/RenderPopupMenuMac.mm:
234         (WebCore::RenderPopupMenuMac::showPopup): Updated to save the NSEvent that triggers the popup, so we can send
235         fake mouseUp and keyUp events when the NSMenu returns.
236         (WebCore::RenderPopupMenuMac::addGroupLabel): Only set the NSForegroundColorAttributeName attribute if the text isn't black.
237         Follow-up bug about other colors: http://bugzilla.opendarwin.org/show_bug.cgi?id=9769
238         (WebCore::RenderPopupMenuMac::addOption): ditto.
239         * bridge/mac/FrameMac.h: (WebCore::FrameMac::currentEvent): Returns the current NSEvent.
240
241 2006-07-06  Justin Garcia  <justin.garcia@apple.com>
242
243         Reviewed by levi
244         
245         <rdar://problem/4609184>
246         Mail crashes at WebCore::Selection::adjustForEditableContent
247         <rdar://problem/4609140>
248         Crash at WebCore::Range::compareBoundaryPoints
249         
250         * editing/Selection.cpp:
251         (WebCore::Selection::adjustForEditableContent):
252         * editing/VisiblePosition.cpp:
253         (WebCore::VisiblePosition::next): Moved code into a helper function.
254         (WebCore::VisiblePosition::previous): Ditto.
255         * editing/htmlediting.cpp:
256         (WebCore::comparePositions): Moved from Selection.cpp.
257         (WebCore::lowestEditableAncestor): Added.  Returns rootEditableElement
258         for a node in editable content and the rootEditableElement for the first
259         ancestor that's editable for a node in non-editable content.
260         (WebCore::firstEditablePositionAfterPositionInRoot): 
261         (WebCore::lastEditablePositionBeforePositionInRoot):
262         * editing/htmlediting.h:
263
264 2006-07-06  Anders Carlsson  <acarlsson@apple.com>
265
266         Reviewed by Adele.
267
268         http://bugzilla.opendarwin.org/show_bug.cgi?id=9528
269         REGRESSION: arrow key skips '>' in Bugzilla replies due to '\n' in text nodes
270         
271         Patch by Darin, tweaked by Anders.
272         
273         * html/HTMLElement.cpp:
274         (WebCore::HTMLElement::setInnerText):
275         Convert newline characters to <br> elements. I've verified that what's done here is what WinIE does when setting innerText.
276         
277         (WebCore::HTMLElement::setOuterText):
278         Fix comment.
279
280         * rendering/RenderTextField.cpp:
281         (WebCore::RenderTextField::textWithHardLineBreaks):
282         Remove assert. m_div->firstChild() can be null now because setInnerText doesn't create
283         text nodes for empty strings anymore.
284
285 2006-07-06  Adele Peterson  <adele@apple.com>
286
287         Reviewed by Tim Hatcher.
288
289         - Speculative fix for <rdar://problem/4605532> unrepro crash at cnn.com after upgrading to 10.4.7 (but happening with 10.4.6 too)
290
291         * page/FrameView.cpp: (WebCore::FrameView::layout): Ref's the view during layout, since a recalcStyle could cause the view to be deleted.
292         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.
293         * page/FrameView.h: (WebCore::FrameView::hasOneRef): Added.
294
295 2006-07-06  Anders Carlsson  <acarlsson@apple.com>
296
297         Reviewed by Maciej.
298
299         <rdar://problem/4610891> Support overflow events
300         
301         * DerivedSources.make:
302         Add generated sources.
303         
304         * WebCore.xcodeproj/project.pbxproj:
305         Add new files.
306         
307         * bindings/js/kjs_events.cpp:
308         (KJS::toJS):
309         Support creating wrappers for overflow events..
310         
311         * bindings/objc/DOMEvents.h:
312         * bindings/objc/DOMEvents.mm:
313         (+[DOMEvent _eventWith:]):
314         (-[DOMOverflowEvent _overflowEvent]):
315         (-[DOMOverflowEvent orient]):
316         (-[DOMOverflowEvent horizontalOverflow]):
317         (-[DOMOverflowEvent verticalOverflow]):
318         Add Objective-C wrapper for overflow events.
319         
320         * dom/Event.cpp:
321         (WebCore::Event::isOverflowEvent):        
322         * dom/Event.h:
323         * dom/EventNames.h:
324         * dom/OverflowEvent.cpp: Added.
325         (WebCore::OverflowEvent::OverflowEvent):
326         (WebCore::OverflowEvent::isOverflowEvent):
327         * dom/OverflowEvent.h: Added.
328         (WebCore::OverflowEvent::):
329         (WebCore::OverflowEvent::orient):
330         (WebCore::OverflowEvent::horizontalOverflow):
331         (WebCore::OverflowEvent::verticalOverflow):
332         * dom/OverflowEvent.idl: Added.
333         Add overflow events.
334         
335         * page/FrameView.cpp:
336         (WebCore::FrameViewPrivate::FrameViewPrivate):
337         (WebCore::FrameView::applyOverflowToViewport):        
338         (WebCore::FrameView::layout):
339         Dispatch any scheduled events when layout is done.
340         
341         (WebCore::FrameView::scheduleEvent):
342         New function which schedules an event.
343         
344         (WebCore::FrameView::updateOverflowStatus):
345         Update overflow status for the viewport.
346         
347         (WebCore::FrameView::dispatchScheduledEvents):
348         New function which dispatches all scheduled events.
349         
350         * page/FrameView.h:
351         Add declarations.
352         
353         * rendering/RenderLayer.cpp:
354         (WebCore::RenderLayer::RenderLayer):
355         (WebCore::RenderLayer::updateOverflowStatus):
356         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
357         * rendering/RenderLayer.h:
358         Schedule overflow events when overflow status changes.
359
360 2006-07-06  Timothy Hatcher  <timothy@apple.com>
361
362         Reviewed by Geoff.
363
364         <rdar://problem/4610881> Expose scroll-related JS properties to ObjC DOM interface
365         <rdar://problem/4519675> offsetLeft, offsetTop, offsetHeight, and offsetWidth
366         properties are not exposed to ObjC
367
368         * bindings/objc/DOMPrivate.h:
369         * bindings/objc/DOMHTML.mm:
370         (-[DOMHTMLElement offsetLeft]):
371         (-[DOMHTMLElement offsetTop]):
372         (-[DOMHTMLElement offsetWidth]):
373         (-[DOMHTMLElement offsetHeight]):
374         (-[DOMHTMLElement offsetParent]):
375         (-[DOMHTMLElement clientWidth]):
376         (-[DOMHTMLElement clientHeight]):
377         (-[DOMHTMLElement scrollLeft]):
378         (-[DOMHTMLElement setScrollLeft:]):
379         (-[DOMHTMLElement scrollTop]):
380         (-[DOMHTMLElement setScrollTop:]):
381         (-[DOMHTMLElement scrollWidth]):
382         (-[DOMHTMLElement scrollHeight]):
383
384 2006-07-06  Maciej Stachowiak  <mjs@apple.com>
385
386         Reviewed by Adele.
387
388         - fix 435 more layout tests Node leaks
389
390         * editing/CompositeEditCommand.cpp:
391         (WebCore::CompositeEditCommand::moveParagraphs): fix more instances of leaked DOM ranges
392
393 2006-07-06  David Harrison  <harrison@apple.com>
394
395         Reviewed by Geoff
396
397         <rdar://problem/4565031> innerHTML of XMP tag returns special characters like '&gt;' instead of '>'
398  
399         Test: fast/innerHTML/006.html
400        
401         * editing/markup.cpp:
402         (WebCore::startMarkup):
403         (WebCore::createMarkup):
404         Do not special quote content of XMP nodes.
405
406 2006-07-06  Maciej Stachowiak  <mjs@apple.com>
407
408         Not reviewed - build fix.
409
410         - back out earlier leak fix, as it caused a crash on one of the fast/invalid layout tests
411
412         * dom/Document.cpp:
413         (WebCore::Document::removedLastRef):
414         * html/HTMLParser.cpp:
415         (WebCore::HTMLStackElem::HTMLStackElem):
416         (WebCore::HTMLParser::popNestedHeaderTag):
417         (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks):
418         (WebCore::HTMLParser::reopenResidualStyleTags):
419         (WebCore::HTMLParser::popBlock):
420         (WebCore::HTMLParser::popOneBlock):
421
422 2006-07-06  Maciej Stachowiak  <mjs@apple.com>
423
424         Reviewed by Anders.
425
426         - fix ~3000 Node leaks on the editing tests
427
428         * editing/CompositeEditCommand.cpp:
429         (WebCore::CompositeEditCommand::moveParagraphs): put a newly created Range in a RefPtr
430         to avoid leaking it, as this leaks the whole document.
431
432 2006-07-06  Maciej Stachowiak  <mjs@apple.com>
433
434         Reviewed by Anders.
435
436         - fix 26 Node leaks on various fast/dom tests
437
438         * dom/Document.cpp:
439         (WebCore::Document::removedLastRef): Delete the tokenizer here, since if we are in mid-parse,
440         the parser might hold refs on some of our children that have self-only refs.
441         * html/HTMLParser.cpp:
442         (WebCore::HTMLStackElem::HTMLStackElem): don't ref the node if it is a document to avoid ref cycles
443         (WebCore::HTMLStackElem::~HTMLStackElem): ditto
444         (WebCore::HTMLStackElem::node): changed interface a bit to support the above
445         (WebCore::HTMLStackElem::setNode): ditto
446         (WebCore::HTMLParser::popNestedHeaderTag): use new interface to HTMLStackElem
447         (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks): ditto
448         (WebCore::HTMLParser::reopenResidualStyleTags): ditto
449         (WebCore::HTMLParser::popBlock): ditto
450         (WebCore::HTMLParser::popOneBlock): ditto
451
452 2006-07-06  Mitz Pettel  <opendarwin.org@mitzpettel.com>
453
454         Reviewed by Adele.
455         
456         * rendering/RenderMenuList.h:
457         (WebCore::RenderMenuList::createsAnonymousWrapper): This method replaces
458         allowsReusingAnonymousChild() and has the opposite meaning.
459         
460 2006-07-05  Adele Peterson  <adele@apple.com>
461
462         Build fixes.
463
464         * WebCore.vcproj/WebCore/WebCore.vcproj:
465         * platform/win/TemporaryLinkStubs.cpp:
466         * rendering/RenderMenuList.cpp:
467         (WebCore::RenderMenuList::calcMinMaxWidth):
468         * rendering/RenderPopupMenuWin.h:
469         (WebCore::RenderPopupMenuWin::RenderPopupMenuWin):
470         * rendering/RenderThemeWin.cpp:
471
472 2006-07-05  Maciej Stachowiak  <mjs@apple.com>
473
474         Reviewed by Adele.
475
476         - fix 308 Node leaks on the editing layout tests
477
478         * dom/Document.cpp: (WebCore::Document::removedLastRef): Clear the markers once there
479         are no real refs on the document, otherwise a self-only reference cycle w/ the document
480         can occur.
481
482 2006-07-05  Adele Peterson  <adele@apple.com>
483
484         Reviewed by Maciej and Hyatt.
485
486         Initial implementation of popup menu control.  This can be turned on by setting -webkit-appearance: menulist on a select element.
487
488         * WebCore.xcodeproj/project.pbxproj: Added RenderMenuList.h, RenderMenuList.cpp, RenderPopupMenu.h, RenderPopupMenu.cpp, 
489         RenderPopupMenuWin.h, RenderPopupMenuMac.h, RenderPopupMenuMac.mm, 
490     
491         * dom/Node.cpp:
492         (WebCore::Node::renderStyle): Added. Returns the renderer's style.  If there's no renderer, returns's a RenderStyle that's kept by the node.
493         This is important for HTMLOptGroupElement and HTMLOptionElement, which don't have renderers.
494         (WebCore::Node::setRenderStyle): Added.
495         * dom/Node.h:
496         * dom/Element.cpp: (WebCore::Element::recalcStyle): Updated to use renderStyle so recalcStyle will work for HTMLOptionElements and HTMLOptGroupElements.
497            
498         * css/cssstyleselector.cpp: Updated to call renderStyle method on the node, so resolving style works on elements w/o renderers that cache style. 
499         (WebCore::CSSStyleSelector::initForStyleResolve):
500         (WebCore::CSSStyleSelector::locateCousinList):
501         (WebCore::CSSStyleSelector::canShareStyleWithElement):
502         (WebCore::CSSStyleSelector::locateSharedStyle):
503         (WebCore::CSSStyleSelector::checkOneSelector):
504
505         * css/html4.css: Removed display:none from options and optgroups, since we're now caching style for these elements.
506         Added font-weight styles for option and optgroup.
507         
508         * html/HTMLOptGroupElement.h: Added m_style to keep track of a RenderStyle for the element, even though we aren't creating a renderer.
509         This will allow us to honor style for optgroups and options for popup menus (and eventually list boxes too).
510         (WebCore::HTMLOptGroupElement::rendererIsNeeded): Added.
511         (WebCore::HTMLOptGroupElement::renderStyle): Added.
512         * html/HTMLOptionElement.h: ditto.
513         (WebCore::HTMLOptionElement::rendererIsNeeded): Added.
514         (WebCore::HTMLOptionElement::renderStyle): Added.
515         
516         * html/HTMLOptGroupElement.cpp:
517         (WebCore::HTMLOptGroupElement::HTMLOptGroupElement): Initialize m_style.
518         (WebCore::HTMLOptGroupElement::attach): Set the renderStyle.
519         (WebCore::HTMLOptGroupElement::detach): Clear m_style.
520         (WebCore::HTMLOptGroupElement::setRenderStyle): Added.
521         (WebCore::HTMLOptGroupElement::groupLabelText): Added.
522         * html/HTMLOptionElement.cpp: ditto.
523         (WebCore::HTMLOptionElement::HTMLOptionElement):
524         (WebCore::HTMLOptionElement::attach):
525         (WebCore::HTMLOptionElement::detach):
526         (WebCore::HTMLOptionElement::setRenderStyle):
527         (WebCore::HTMLOptionElement::optionText):
528
529         * html/HTMLSelectElement.cpp: Added code to use the new RenderMenuList if the appearance is set to MenuListAppearance, 
530         and if we're not creating a list box renderer.
531         (WebCore::HTMLSelectElement::recalcStyle):
532         (WebCore::HTMLSelectElement::createRenderer):
533         (WebCore::HTMLSelectElement::setRecalcListItems):
534         (WebCore::HTMLSelectElement::reset):
535         (WebCore::HTMLSelectElement::notifyOptionSelected):
536         (WebCore::HTMLSelectElement::defaultEventHandler):
537         * html/HTMLSelectElement.h:
538
539         * WebCore.exp: Added _wkPopupMenu.
540         * platform/mac/WebCoreSystemInterface.h: Added wkPopupMenu to get the NSMenu to pop up.
541         * platform/mac/WebCoreSystemInterface.mm:
542
543         * platform/win/TemporaryLinkStubs.cpp: Added stubs for RenderPopupMenuWin.
544         (RenderPopupMenuWin::RenderPopupMenuWin):
545         (RenderPopupMenuWin::~RenderPopupMenuWin):
546         (RenderPopupMenuWin::clear):
547         (RenderPopupMenuWin::populate):
548         (RenderPopupMenuWin::showPopup):
549         (RenderPopupMenuWin::addSeparator):
550         (RenderPopupMenuWin::addGroupLabel):
551         (RenderPopupMenuWin::addOption):
552         * rendering/RenderPopupMenuWin.h: Added.
553
554         * rendering/RenderPopupMenu.cpp: Added.
555         (WebCore::RenderPopupMenu::RenderPopupMenu):
556         (WebCore::RenderPopupMenu::~RenderPopupMenu):
557         (WebCore::RenderPopupMenu::clear):
558         (WebCore::RenderPopupMenu::populate): Walks the DOM tree, and adds separators, options, and group labels to the RenderPopupMenu.
559         (WebCore::RenderPopupMenu::showPopup):
560         (WebCore::RenderPopupMenu::addSeparator):
561         (WebCore::RenderPopupMenu::addGroupLabel):
562         (WebCore::RenderPopupMenu::addOption):
563         * rendering/RenderPopupMenu.h: Added.
564         (WebCore::RenderPopupMenu::renderName):
565         (WebCore::RenderPopupMenu::getRenderMenuList):
566         * rendering/RenderPopupMenuMac.h: Added.
567         * rendering/RenderPopupMenuMac.mm: Added.
568         (WebCore::RenderPopupMenuMac::RenderPopupMenuMac):
569         (WebCore::RenderPopupMenuMac::~RenderPopupMenuMac):
570         (WebCore::RenderPopupMenuMac::clear): Removes all items from the menu.
571         (WebCore::RenderPopupMenuMac::populate): Disables menuChangedMessages before populating the menu.
572         (WebCore::RenderPopupMenuMac::showPopup): Calculates the right position, and calls wkPopupMenu.
573         (WebCore::RenderPopupMenuMac::addSeparator):
574         (WebCore::RenderPopupMenuMac::addGroupLabel):
575         (WebCore::RenderPopupMenuMac::addOption):
576         
577         * rendering/RenderMenuList.cpp: Added.
578         (WebCore::RenderMenuList::RenderMenuList):
579         (WebCore::RenderMenuList::addChild):
580         (WebCore::RenderMenuList::removeChild):
581         (WebCore::RenderMenuList::setStyle):
582         (WebCore::RenderMenuList::updateFromElement): If the options have changed, iterate through the children to find the menu item with the widest text.
583         Set the button text to the selected item's text.
584         (WebCore::RenderMenuList::setText):
585         (WebCore::RenderMenuList::paintObject):
586         (WebCore::RenderMenuList::baselinePosition):
587         (WebCore::RenderMenuList::calcMinMaxWidth):
588         (WebCore::RenderMenuList::showPopup):
589         (WebCore::RenderMenuList::layout):
590         (WebCore::RenderMenuList::updateSelection):
591         (WebCore::RenderMenuList::valueChanged):
592         * rendering/RenderMenuList.h: Added.
593         (WebCore::RenderMenuList::removeLeftoverAnonymousBoxes):
594         (WebCore::RenderMenuList::allowsReusingAnonymousChild):
595         (WebCore::RenderMenuList::canHaveChildren):
596         (WebCore::RenderMenuList::renderName):
597         (WebCore::RenderMenuList::setOptionsChanged):
598         (WebCore::RenderMenuList::selectionChanged):
599         (WebCore::RenderMenuList::setSelectionChanged):
600         (WebCore::RenderMenuList::hasPopupMenu):
601
602         * rendering/RenderTheme.cpp: Added cases for MenuListAppearance.
603         (WebCore::RenderTheme::adjustStyle):
604         (WebCore::RenderTheme::paint):
605         (WebCore::RenderTheme::paintBorderOnly):
606         (WebCore::RenderTheme::isControlStyled):
607         (WebCore::RenderTheme::adjustMenuListStyle):
608         (WebCore::RenderTheme::createPopupMenu): creates platform-specific RenderPopupMenu.
609         * rendering/RenderTheme.h:
610         (WebCore::RenderTheme::sizeOfArrowControl): Added. 
611         (WebCore::RenderTheme::paintMenuList): Added.
612         * rendering/RenderThemeMac.h:
613         * rendering/RenderThemeMac.mm:
614         (WebCore::RenderThemeMac::adjustRepaintRect):
615         (WebCore::RenderThemeMac::paintMenuList):
616         (WebCore::RenderThemeMac::adjustMenuListStyle):
617         (WebCore::RenderThemeMac::setPopupButtonCellState):
618         (WebCore::RenderThemeMac::createPopupMenu):
619         (WebCore::RenderThemeMac::sizeOfArrowControl):
620         * rendering/RenderThemeWin.cpp: (WebCore::RenderThemeWin::createPopupMenu):
621         * rendering/RenderThemeWin.h:
622
623 2006-07-05  Brady Eidson  <beidson@apple.com>
624
625         Reviewed by Tim Omernick.
626
627         IconDatabase now respects private browsing via the use of in memory, temporary tables
628
629         * bridge/mac/WebCoreIconDatabaseBridge.mm:
630         (-[WebCoreIconDatabaseBridge iconForPageURL:withSize:]):
631         (-[WebCoreIconDatabaseBridge iconURLForPageURL:]): Renamed WebCore::IconDatabase methods, changes reflected here
632
633         * icon/IconDatabase.cpp:
634         (WebCore::IconDatabase::clearDatabase):
635         (WebCore::IconDatabase::deletePrivateTables):
636         (WebCore::IconDatabase::imageDataForIconID):
637         (WebCore::IconDatabase::imageDataForIconURL):
638         (WebCore::IconDatabase::imageDataForPageURL):
639         (WebCore::IconDatabase::setPrivateBrowsingEnabled):
640         (WebCore::IconDatabase::iconForPageURL):
641         (WebCore::IconDatabase::iconURLForPageURL):
642         (WebCore::IconDatabase::setIconDataForIconURL):
643         (WebCore::IconDatabase::performSetIconDataForIconID):
644         (WebCore::IconDatabase::establishTemporaryIconIDForEscapedIconURL):
645         (WebCore::IconDatabase::establishIconIDForEscapedIconURL):
646         (WebCore::IconDatabase::setHaveNoIconForIconURL):
647         (WebCore::IconDatabase::setIconURLForPageURL):
648         (WebCore::IconDatabase::performSetIconURLForPageURL):
649         (WebCore::IconDatabase::hasIconForIconURL):
650         -Some style/comment cleanups, but mainly putting private browsing handling in place
651
652         * icon/IconDatabase.h:  Some methods added, others renamed, some comments added
653
654         * icon/SQLStatement.cpp:
655         (WebCore::SQLStatement::getColumnName):
656         (WebCore::SQLStatement::getColumnName16):
657         (WebCore::SQLStatement::getColumnText):
658         (WebCore::SQLStatement::getColumnText16):
659         -The above 4 had changes to return String() for empty results instead of "" as it's less expensive;
660
661 2006-07-05  John Sullivan  <sullivan@apple.com>
662
663         Reviewed by Darin and Adele.
664         
665         - fixed <rdar://problem/4609162> REGRESSION: When tabbing between links on a page, 
666         the window doesn't scroll to link that's not in view
667
668         * html/HTMLAnchorElement.cpp:
669         * html/HTMLAnchorElement.h:
670         removed HTMLAnchorElement::focus and HTMLAnchorElement::blur. 
671         
672         HTMLAnchorElement::focus just called document()->setFocusNode(). The scroll-to-reveal
673         code used to be inside document()->setFocusNode(), but now it's in Element::focus, and this override
674         was preventing that code from running.
675         
676         HTMLAnchorElement::blur was exactly the same implementation as Element::blur (and there aren't any
677         other implementations of ::blur in the class hierarchy in between). This change has no practical
678         effect, other than removing duplicate code.
679         
680         Adele and I think that it was an oversight not to remove these two methods on 12/20/05
681         these methods were removed from HTMLButtonElementImpl and HTMLInputElementImpl.
682
683 2006-07-05  Anders Carlsson  <acarlsson@apple.com>
684
685         * bridge/win/FrameWin.cpp:
686         (WebCore::FrameWin::FrameWin):
687         * bridge/win/FrameWin.h:
688         * platform/win/TemporaryLinkStubs.cpp:
689         (FrameWin::createFrame):
690         Fix Win32 build.
691
692 2006-07-05  Anders Carlsson  <acarlsson@apple.com>
693
694         * WebCore.xcodeproj/project.pbxproj:
695         Revert accidental change of debug format to DWARF.
696
697 2006-07-05  Anders Carlsson  <acarlsson@apple.com>
698
699         Reviewed by Maciej.
700
701         http://bugzilla.opendarwin.org/show_bug.cgi?id=3581
702         iFrames set to display:none are Missing from frames array
703
704         * bridge/mac/FrameMac.h:
705         * bridge/mac/FrameMac.mm:
706         (WebCore::FrameMac::FrameMac):
707         (WebCore::FrameMac::createFrame):
708         * bridge/mac/WebCoreFrameBridge.h:
709         * bridge/mac/WebCoreFrameBridge.mm:
710         (-[WebCoreFrameBridge initSubframeWithOwnerElement:]):
711         (-[WebCoreFrameBridge installInFrame:]):
712         Modify to pass the owner element instead of the owner renderer.        
713
714         * dom/ContainerNode.cpp:
715         (WebCore::ContainerNode::insertBefore):
716         (WebCore::ContainerNode::replaceChild):
717         (WebCore::ContainerNode::appendChild):
718         Dispatch the node inserted events before attaching the nodes. This is what the
719         tokenizer does.
720         
721         * html/HTMLFrameElement.cpp:
722         (WebCore::HTMLFrameElement::openURL):
723         (WebCore::HTMLFrameElement::attach):
724         Pass the element to requestFrame.
725         
726         (WebCore::HTMLFrameElement::setLocation):
727         Don't call attach/detach on an iframe.
728
729         * html/HTMLIFrameElement.cpp:
730         (WebCore::HTMLIFrameElement::insertedIntoDocument):
731         Load the frame here (using openURL).
732         
733         (WebCore::HTMLIFrameElement::removedFromDocument):
734         Call frameDetached.
735         
736         (WebCore::HTMLIFrameElement::attach):
737         If there's a renderer, attach the content frame to it.
738         
739         (WebCore::HTMLIFrameElement::detach):
740         Reset the renderer's frame.
741         
742         (WebCore::HTMLIFrameElement::openURL):
743         Modify to request the frame.
744         
745         * html/HTMLIFrameElement.h:
746         Add detach.
747         
748         * page/Frame.cpp:
749         (WebCore::parentFromOwnerElement):
750         (WebCore::Frame::Frame):
751         (WebCore::Frame::~Frame):
752         (WebCore::Frame::requestFrame):
753         (WebCore::Frame::requestObject):
754         (WebCore::Frame::loadSubframe):
755         (WebCore::Frame::ownerElement):
756         (WebCore::Frame::ownerRenderer):
757         (WebCore::Frame::disconnectOwnerElement):
758         * page/Frame.h:
759         * page/FramePrivate.h:
760         (WebCore::FramePrivate::FramePrivate):        
761         * rendering/RenderPart.cpp:
762         (WebCore::RenderPart::setFrame):
763         Modify to keep an owner element around instead of the renderer. 
764         
765         * rendering/RenderPartObject.cpp:
766         (WebCore::RenderPartObject::updateWidget):
767         Don't do anything for iframes.
768
769 2006-07-04  Kevin Ollivier  <kevino@theolliviers.com>
770
771         Reviewed by Maciej, reworked a bit by Darin.
772
773         Compile fixes for wx port / gcc 4.0.2
774         
775         * platform/PlatformString.h:
776         * platform/StringImpl.h:
777         Include CoreFoundation for CF-specific code.
778         
779         * dom/DocPtr.h:
780         * doc/EventTargetNode.h:
781         Silence warnings about 'extra tokens' after #endif on gcc 4.0.2.
782         (Not an error but warnings appear frequently.)
783         
784         * WebCoreSources.bkl:
785         * webcore-base.bkl:
786         Synching ports sources file with TOT. Also, making sure SRCDIR variable
787         overrides any previous values.
788         
789         * loader/ImageDocument.cpp:
790         Use PLATFORM(MAC) for the parts that are specific to the Macintosh version,
791         and move the Objective-C parts to another file.
792
793         * loader/mac/ImageDocumentMac.h: Added.
794         * loader/mac/ImageDocumentMac.mm: Added.
795
796 2006-07-04  Sam Weinig  <sam.weinig@gmail.com>
797
798         Build fix.
799
800         * platform/Color.cpp:
801         (WebCore::makeRGBAFromHSLA):
802
803 2006-07-02  David Carson  <dacarson@gmail.com>
804
805         Reviewed by Darin.
806   
807         - Added HSL color support as specified in CSS3 spec.
808         http://bugzilla.opendarwin.org/show_bug.cgi?id=9506
809         Added parsing support of hsl(h,s,l) and hsla(h,s,l,a)
810         Added converting code to convert HSL to RGB
811
812         * css/cssparser.cpp:
813         (WebCore::CSSParser::parseColorParameters):
814         Moved common code to parse RGB/RGBA values into it's
815         own function. This code was duplicated in the parseColorFromValue()
816         method.
817         (WebCore::CSSParser::parseHSLParameters):
818         Common code to parse HSL/HSLA values.
819         (WebCore::CSSParser::parseColorFromValue):
820         Moved RGB/RGBA parsing out to seperate function as the code was
821         duplicated. 
822         Added parsing support for hsl( and hsla(
823         * css/cssparser.h:
824         Added two new functions parseColorParameters() and 
825         parseHSLParameters().
826         * platform/Color.cpp:
827         (WebCore::calcHue):
828         Added Hue parameter to RGB color.
829         (WebCore::makeRGBAFromHSLA):
830         New function to convert HSLA to RGBA.
831         * platform/Color.h:
832         Added new functions makeRGBAFromHSLA() and calcHue().
833
834 2006-07-02  Mike Emmel  <mike.emmel@gmail.com>
835
836         Reviewed and landed by ggaren.
837
838         * platform/gdk/TransferJobManager.cpp
839         Fixed broken dowload logic
840         * platform/gdk/ScrollViewGdk.cpp 
841         Add comment that scrollbarSize is a temporary variable
842         * Projects/gdk/webcore-gdk.bkl
843         Defined NDEBUG build executable is miscompiled otherwise
844         * WebCoreSources.bkl
845         added icon/SiteIcon.cpp editing/IndentOutdentCommand.cpp 
846         html/HTMLViewSourceDocument.cpp
847
848 2006-07-02  Shawn Stricker  <kb1ibt@gmail.com>
849
850         Reviewed by Timothy Hatcher.  Build fix for Linux.
851
852         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9684
853           [GDK] multiple little fixes and a few new things for Templinkstubs
854
855         * platform/gdk/ScrollViewGdk.cpp:
856         (WebCore::ScrollView::setDrawable): Changed SCROLLBAR_SIZE to scrollbarSize.
857         * platform/gdk/TemporaryLinkStubs.cpp:
858         (Image::drawTiled): Added missing parameter to argument list.
859         * platform/gdk/TransferJobManager.cpp:
860         (WebCore::writeCallback): Added missing parenthesis to static_cast.
861
862 2006-07-02  Mitz Pettel  <opendarwin.org@mitzpettel.com>
863
864         Reviewed by Darin.
865
866         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9674
867           REGRESSION (r15075): Blank or incomplete pages on digg.com
868
869         Replaced the requestingScript state bit added in the fix for bug 9317
870         with a m_requestingScript bool that is set before and restored
871         after calling ref() on a CachedScript.
872         
873         Test: fast/tokenizer/nested-cached-scripts.html
874
875         * html/HTMLTokenizer.cpp:
876         (WebCore::HTMLTokenizer::HTMLTokenizer):
877         (WebCore::HTMLTokenizer::begin):
878         (WebCore::HTMLTokenizer::scriptHandler):
879         (WebCore::HTMLTokenizer::notifyFinished):
880         * html/HTMLTokenizer.h:
881         (WebCore::HTMLTokenizer::State::):
882
883 2006-07-01  David Kilzer  <ddkilzer@kilzer.net>
884
885         Reviewed by NOBODY (build fix).
886
887         * platform/gdk/TransferJobManager.cpp:
888         (WebCore::writeCallback): Changed 'static_cat' to 'static_cast'.
889
890 2006-06-30  Mike Emmel  <mike.emmel@gmail.com>
891
892         Reviewed and worked over a lot by Darin.
893
894         - check in first set of GDK-specific sources
895
896         * platform/gdk/BrowserExtensionGdk.h: Added.
897         * platform/gdk/CookieJarGdk.cpp: Added.
898         * platform/gdk/CursorGdk.cpp: Added.
899         * platform/gdk/FontCacheGdk.cpp: Added.
900         * platform/gdk/FontDataGdk.cpp: Added.
901         * platform/gdk/FontGdk.cpp: Added.
902         * platform/gdk/FontPlatformData.h: Added.
903         * platform/gdk/FontPlatformDataGdk.cpp: Added.
904         * platform/gdk/FrameGdk.cpp: Added.
905         * platform/gdk/FrameGdk.h: Added.
906         * platform/gdk/GlyphMapGdk.cpp: Added.
907         * platform/gdk/KeyEventGdk.cpp: Added.
908         * platform/gdk/KeyboardCodes.h: Added.
909         * platform/gdk/MouseEventGdk.cpp: Added.
910         * platform/gdk/PageGdk.cpp: Added.
911         * platform/gdk/RenderThemeGdk.cpp: Added.
912         * platform/gdk/RenderThemeGdk.h: Added.
913         * platform/gdk/ScreenGdk.cpp: Added.
914         * platform/gdk/ScrollViewGdk.cpp: Added.
915         * platform/gdk/SharedTimerLinux.cpp: Added.
916         * platform/gdk/SystemTimeLinux.cpp: Added.
917         * platform/gdk/TemporaryLinkStubs.cpp: Added.
918         * platform/gdk/TransferJobCurl.cpp: Added.
919         * platform/gdk/TransferJobManager.cpp: Added.
920         * platform/gdk/TransferJobManager.h: Added.
921         * platform/gdk/WheelEventGdk.cpp: Added.
922         * platform/gdk/WidgetGdk.cpp: Added.
923         * platform/gdk/gdk-encodings.txt: Added.
924
925 2006-06-30  Mike Emmel  <mike.emmel@gmail.com>
926
927         Reviewed by Darin.
928
929         * WebCoreSources.bkl: Updated for recent file changes.
930
931 2006-06-30  Mike Emmel  <mike.emmel@gmail.com>
932
933         Reviewed and enhanced by Darin.
934
935         Compilation fixes for Linux/Gdk.
936
937         * WebCore/platform/FontData.h: Added forward declaration of a class.
938         * WebCore/platform/cairo/GraphicsContextCairo.cpp: Fixed case on include.
939         * WebCore/bindings/js/kjs_html.cpp: Added <math.h> include.
940
941         * WebCore/css/maketokenizer: Fixed incorrect check for Linux that was
942         already true even on Mac OS X. Added some additional includes and
943         defines to the Linux extra generated code.
944
945 2006-06-30  Mitz Pettel  <opendarwin.org@mitzpettel.com>
946
947         Reviewed by Hyatt.
948
949         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7204
950           float inserted in fixed height block via DOM not repainted
951
952         Test: fast/repaint/float-move-during-layout.html
953
954         * rendering/RenderBlock.cpp:
955         (WebCore::RenderBlock::layoutBlockChildren):
956         (WebCore::RenderBlock::repaintOverhangingFloats): Renamed repaintFloatingDescendants()
957         to this and limited it to repainting overhanging floats. Added a boolean parameter that forces
958         all descendant overhanging floats (that don't have their own layer) to paint.
959         * rendering/RenderBlock.h:
960         * rendering/RenderBox.cpp:
961         (WebCore::RenderBox::repaintDuringLayoutIfMoved): Changed to paint all descendant
962         floats.
963         * rendering/RenderObject.cpp:
964         (WebCore::RenderObject::repaintOverhangingFloats):
965         * rendering/RenderObject.h:
966
967 2006-06-30  Levi Weintraub  <lweintraub@apple.com>
968
969         Reviewed by justin
970
971         * editing/VisiblePosition.cpp: Removed is[Not]EqualIgnoringAffinity and made operator== use the logic that ignores affinity.
972         * editing/VisiblePosition.h: Ditto.
973         (WebCore::operator==):
974         * editing/visible_units.cpp:
975         (WebCore::isStartOfParagraph): Changed to compare VisiblePositions using ==.
976         (WebCore::isEndOfParagraph): Ditto.
977         (WebCore::isStartOfBlock): Ditto.
978         (WebCore::isEndOfBlock): Ditto.
979
980 === Safari-521.14 ===
981
982 2006-06-30  Justin Garcia  <justin.garcia@apple.com>
983
984         Reviewed by levi
985
986         * editing/htmlediting.cpp:
987         (WebCore::canHaveChildrenForEditing): Don't insert children into
988         object tags while editing.
989
990 2006-06-30  Justin Garcia  <justin.garcia@apple.com>
991
992         Reviewed by harrison
993         
994         <rdar://problem/4598309
995         Caret gets stuck when it hits non editable content within an editable body
996         <http://bugzilla.opendarwin.org/show_bug.cgi?id=9510>
997         Caret will jump out of an editable region
998         
999         * dom/Position.cpp:
1000         (WebCore::Position::upstream): Don't move into a new editable region so that 
1001         candidates that that straddle an editable/non-editable boundary will 
1002         correspond to different VisiblePositions.
1003         (WebCore::Position::downstream): Ditto.
1004         * editing/SelectionController.cpp:
1005         (WebCore::SelectionController::modifyMovingRightForward): Use VisiblePosition::next(true)
1006         (WebCore::SelectionController::modifyMovingLeftBackward): Use VisiblePosition::previous(true)
1007         * editing/VisiblePosition.cpp:
1008         (WebCore::VisiblePosition::next): Added code to jump to the next editable region as long
1009         as it has the same highest editable root.
1010         (WebCore::VisiblePosition::previous): Ditto.
1011         * editing/VisiblePosition.h:
1012         * editing/htmlediting.cpp:
1013         (WebCore::highestEditableRoot): Added, returns the highest editable root of a node if that
1014         node is in editable content, otherwise 0.
1015         * editing/htmlediting.h:
1016
1017 2006-06-30  David Kilzer  <ddkilzer@kilzer.net>
1018
1019         Reviewed by Darin.
1020
1021         - Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9358
1022           REGRESSION: Assertion failure in HTMLInputElement::setValueFromRenderer
1023           (value == constrainValue(value)) when deleting all text
1024
1025         Test: editing/deleting/delete-all-text-in-text-field-assertion.html
1026
1027         Bug 9661 filed to fix the follow-up issue:
1028         http://bugzilla.opendarwin.org/show_bug.cgi?id=9661
1029         textContent returns "\n" for a <br> even if it is collapsed
1030
1031         * html/HTMLInputElement.cpp:
1032         (WebCore::HTMLInputElement::setValueFromRenderer): Work around "\n" value
1033         when all characters are deleted from a text field.
1034
1035 2006-06-30  David Harrison  <harrison@apple.com>
1036
1037         Reviewed by Tim Omernick
1038
1039         <rdar://problem/4609481> Crash calling -[WebScriptObject valueForKey:] when JS disabled
1040         
1041         * bridge/mac/FrameMac.mm:
1042         (WebCore::FrameMac::executionContextForDOM):
1043         Early return if JS is not enabled.
1044
1045 2006-06-30  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1046
1047         Reviewed by Tim H.
1048
1049         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9664
1050           REGRESSION (r15106): Crash in fast/events/mouseover-mouseout2.html
1051
1052         * page/FrameView.cpp:
1053         (WebCore::FrameView::handleMouseMoveEvent): Added a check that oldSubframe is
1054         still a subframe of the view's frame before passing the event to it.
1055
1056 2006-06-29  Timothy Hatcher  <timothy@apple.com>
1057
1058         Reviewed by Darin.
1059
1060         <rdar://problem/3694163> -[KWQPageState finalize] is incorrect; design change needed
1061         <rdar://problem/3694165> -[WebCoreFrameBridge finalize] is incorrect; design change needed
1062
1063         Added close methods that need to be called before these
1064         objects can be released. This ensures proper tear-down under GC.
1065
1066         * WebCore.xcodeproj/project.pbxproj:
1067         * bridge/mac/WebCoreFrameBridge.h:
1068         * bridge/mac/WebCoreFrameBridge.mm:
1069         (-[WebCoreFrameBridge dealloc]):
1070         (-[WebCoreFrameBridge finalize]):
1071         (-[WebCoreFrameBridge close]):
1072         * bridge/mac/WebCorePageBridge.h:
1073         * bridge/mac/WebCorePageBridge.mm:
1074         (-[WebCorePageBridge setMainFrame:]):
1075         (-[WebCorePageBridge dealloc]):
1076         (-[WebCorePageBridge finalize]):
1077         (-[WebCorePageBridge close]):
1078         (-[WebCorePageBridge mainFrame]):
1079         (-[WebCorePageBridge setGroupName:]):
1080         (-[WebCorePageBridge groupName]):
1081         * kwq/KWQPageState.h:
1082         * kwq/KWQPageState.mm:
1083         (-[KWQPageState dealloc]):
1084         (-[KWQPageState finalize]):
1085         (-[KWQPageState close]):
1086
1087 2006-06-29  Sam Weinig  <sam.weinig@gmail.com>
1088
1089         Reviewed by Hyatt.
1090
1091         - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=4874
1092         Table with absolute bottom positioning is positioned incorrectly
1093
1094         Note: patch originally from Mitz, spruced up by Weinig.
1095
1096         * rendering/RenderBox.cpp:
1097         (WebCore::RenderBox::calcAbsoluteVerticalValues):
1098         * rendering/RenderTable.cpp:
1099         (WebCore::RenderTable::layout):
1100
1101 2006-06-29  Graham Dennis  <Graham.Dennis@gmail.com>
1102
1103         Reviewed by Justin.
1104
1105         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9505
1106           moveParagraphContentsToNewBlockIfNecessary creates a new block outside the current position
1107
1108         * editing/CompositeEditCommand.cpp:
1109         Added sanity checking to prevent modifying nodes outside of 
1110         where we should be
1111         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
1112
1113 2006-06-29  Brady Eidson  <beidson@apple.com>
1114
1115         Reviewed by Levi.
1116
1117         In addition to a few small details, logging changes, and style cleanups, this is a stop-gap hack
1118         for a problem in SQLite's blob handling.  Querying for a blob in a void* form is reproducibly
1119         returning a corrupt buffer.  The temporary solution is to query for the blob as "quoted text" and
1120         manually convert the return string into a character buffer.
1121
1122         * icon/IconDatabase.cpp:
1123         (WebCore::IconDatabase::recreateDatabase):
1124         (WebCore::IconDatabase::createPrivateTables):
1125
1126         (WebCore::hexToUnsignedChar): These two functions are the text-to-character-data converters for the time being
1127         (WebCore::hexStringToVector):
1128
1129         (WebCore::IconDatabase::imageDataForIconID):
1130         (WebCore::IconDatabase::imageDataForIconURL):
1131         (WebCore::IconDatabase::imageDataForPageURL):
1132         (WebCore::IconDatabase::iconForPageURL):
1133         (WebCore::IconDatabase::hasIconForIconURL):
1134         * icon/IconDatabase.h:  changes the icon data accessors to return a Vector<unsigned char> instead of void*
1135
1136         * icon/SQLStatement.cpp:
1137         (WebCore::SQLStatement::columnCount):
1138         (WebCore::SQLStatement::getColumnBlob):
1139         * icon/SiteIcon.cpp:
1140         (SiteIcon::getImage):
1141
1142 2006-06-29  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1143
1144         Reviewed by Darin.
1145
1146         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9652
1147           Assertion failure when changing an RTL table cell to display:none
1148
1149         Test: fast/table/rtl-cell-display-none-assert.html
1150
1151         * rendering/RenderTableSection.cpp:
1152         (WebCore::RenderTableSection::layoutRows): Corrected the index used as
1153         the last index in the columnPos vector.
1154
1155 2006-06-29  Darin Adler  <darin@apple.com>
1156
1157         Reviewed by Anders.
1158
1159         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9622
1160           showModalDialog returnValue ignored, function result is always "undefined"
1161
1162         * manual-tests/modal-dialog.html: Added.
1163         * manual-tests/show-modal-dialog-test.html: Added.
1164
1165         * page/Frame.cpp: (WebCore::Frame::clear): Call KJSProxy::clear with the
1166         clearWindowProperties parameter instead of not calling it at all when
1167         clearWindowProperties is false.
1168
1169         * bindings/js/kjs_proxy.h: Add boolean clearWindowProperties parameter.
1170         * bindings/js/kjs_proxy.cpp: (WebCore::KJSProxy::clear): Pass clearWindowProperties
1171         variable through to Window::clear instead of not calling it at all.
1172
1173         * bindings/js/kjs_window.h: Add boolean clearWindowProperties parameter.
1174         * bindings/js/kjs_window.cpp: (KJS::Window::clear): If clearWindowProperties
1175         is false, do only the returnValue work, not the rest of the work.
1176
1177         * manual-tests/modal-dialog.html: Added.
1178         * manual-tests/show-modal-dialog-test.html: Added.
1179
1180 2006-06-29  Beth Dakin  <bdakin@apple.com>
1181
1182         Reviewed by Hyatt.
1183
1184         Fix for <rdar://problem/4450615> Add composite mode to background 
1185         styles
1186
1187         -webkit-background-composite will set a composite mode on a 
1188         background image.
1189
1190         * css/CSSComputedStyleDeclaration.cpp:
1191         (WebCore::):
1192         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1193         * css/CSSPropertyNames.in: Add -webkit-background-composite
1194         * css/CSSValueKeywords.in: Add all possible values (clear, copy, 
1195         source-over, source-in, source-out, source-atop, destination-over, 
1196         destination-in, destination-out, destination-atop, xor, plus-
1197         darker, highlight, and plus-lighter)
1198         * css/cssparser.cpp:
1199         (WebCore::CSSParser::parseValue):
1200         (WebCore::CSSParser::parseBackgroundProperty):
1201         * css/cssstyleselector.cpp:
1202         (WebCore::CSSStyleSelector::applyProperty):
1203         (WebCore::CSSStyleSelector::mapBackgroundComposite):
1204         * css/cssstyleselector.h:
1205         * platform/GraphicsContext.cpp:
1206         (WebCore::GraphicsContext::drawTiledImage):
1207         * platform/GraphicsContext.h: drawTiledImage() now takes a 
1208         composite operator.
1209         * platform/Image.h: drawTiled() now takes a composite operator.
1210         * platform/cairo/ImageCairo.cpp:
1211         (WebCore::Image::drawTiled): Set the composite operator.
1212         * platform/mac/ImageMac.mm:
1213         (WebCore::Image::drawTiled): Set the composite operator.
1214         * platform/win/TemporaryLinkStubs.cpp:
1215         (Image::drawTiled):
1216         * rendering/RenderBox.cpp:
1217         (WebCore::RenderBox::paintBackgroundExtended): Send the composite 
1218         operator in the render style over to the graphics context.
1219         * rendering/render_style.cpp:
1220         (WebCore::BackgroundLayer::BackgroundLayer):
1221         (WebCore::BackgroundLayer::operator=):
1222         (WebCore::BackgroundLayer::operator==):
1223         (WebCore::BackgroundLayer::fillUnsetProperties):
1224         (WebCore::BackgroundLayer::cullEmptyLayers):
1225         * rendering/render_style.h:
1226         (WebCore::BackgroundLayer::backgroundComposite):
1227         (WebCore::BackgroundLayer::isBackgroundCompositeSet):
1228         (WebCore::BackgroundLayer::setBackgroundComposite):
1229         (WebCore::BackgroundLayer::clearBackgroundComposite):
1230         (WebCore::RenderStyle::backgroundComposite):
1231         (WebCore::RenderStyle::initialBackgroundComposite):
1232
1233 2006-06-29  David Kilzer  <ddkilzer@kilzer.net>
1234
1235         Reviewed by Darin.
1236
1237         http://bugzilla.opendarwin.org/show_bug.cgi?id=9649
1238         The no-svg build broke after r15091
1239
1240         * bindings/objc/DOMInternal.h: Added #if XPATH_SUPPORT/#endif.
1241         * bindings/objc/DOMInternal.mm: Ditto.
1242         (raiseDOMException):
1243         * bindings/objc/DOMXPath.h: Ditto.
1244         * bindings/objc/DOMXPath.mm: Ditto.
1245         * bindings/objc/DOMXPathInternal.h: Ditto.
1246
1247 2006-06-29  Anders Carlsson  <acarlsson@apple.com>
1248
1249         Reviewed by Tim O.
1250
1251         <rdar://problem/4599760> Objective-C XPath support
1252         
1253         * WebCore.xcodeproj/project.pbxproj:
1254         Add files.
1255         
1256         * bindings/objc/DOMInternal.h:
1257         * bindings/objc/DOMInternal.mm:
1258         (raiseDOMException):
1259         Handle XPath exceptions
1260         
1261         * bindings/objc/DOMXPath.h: Added.
1262         (-[DOMXPathNSResolver lookupNamespaceURI:]):
1263         * bindings/objc/DOMXPath.mm: Added.
1264         (-[DOMNativeXPathNSResolver dealloc]):
1265         (-[DOMNativeXPathNSResolver finalize]):
1266         (-[DOMNativeXPathNSResolver _xpathNSResolver]):
1267         (-[DOMNativeXPathNSResolver _initWithXPathNSResolver:]):
1268         (+[DOMNativeXPathNSResolver _xpathNSResolverWith:]):
1269         (-[DOMNativeXPathNSResolver lookupNamespaceURI:]):
1270         (-[DOMXPathResult dealloc]):
1271         (-[DOMXPathResult finalize]):
1272         (-[DOMXPathResult resultType]):
1273         (-[DOMXPathResult numberValue]):
1274         (-[DOMXPathResult stringValue]):
1275         (-[DOMXPathResult booleanValue]):
1276         (-[DOMXPathResult singleNodeValue]):
1277         (-[DOMXPathResult invalidIteratorState]):
1278         (-[DOMXPathResult snapshotLength]):
1279         (-[DOMXPathResult iterateNext]):
1280         (-[DOMXPathResult snapshotItem:]):
1281         (-[DOMXPathResult _xpathResult]):
1282         (-[DOMXPathResult _initWithXPathResult:]):
1283         (+[DOMXPathResult _xpathResultWith:]):
1284         (-[DOMXPathExpression evaluate:::]):
1285         (-[DOMXPathExpression _xpathExpression]):
1286         (-[DOMXPathExpression _initWithXPathExpression:]):
1287         (+[DOMXPathExpression _xpathExpressionWith:]):
1288         (-[DOMDocument createExpression::]):
1289         (-[DOMDocument createNSResolver:]):
1290         (-[DOMDocument evaluate:::::]):
1291         * bindings/objc/DOMXPathInternal.h: Added.
1292         Add Objective-C XPath API.
1293
1294 2006-06-28  David Hyatt  <hyatt@apple.com>
1295
1296         Add support for custom highlighting to paint at the root line box level
1297         (and to inflate the box it uses so that it can go outside the bounds of
1298         the line if necessary).
1299
1300         Reviewed by harrison
1301
1302         * bridge/mac/FrameMac.h:
1303         * bridge/mac/FrameMac.mm:
1304         (WebCore::FrameMac::customHighlightLineRect):
1305         (WebCore::FrameMac::paintCustomHighlight):
1306         * bridge/mac/WebCoreFrameBridge.h:
1307         * rendering/InlineTextBox.cpp:
1308         (WebCore::InlineTextBox::paintCustomHighlight):
1309         * rendering/RootInlineBox.cpp:
1310         (WebCore::RootInlineBox::paintCustomHighlight):
1311         (WebCore::RootInlineBox::paint):
1312         * rendering/RootInlineBox.h:
1313
1314 2006-06-28  Levi Weintraub  <lweintraub@apple.com>
1315
1316         Reviewed by justin
1317
1318         <rdar://problem/4592005> FormatBlock inserts in the wrong place, disregarding editable content
1319         <rdar://problem/4590763> FormatBlock for paragraph style doesn't work
1320
1321         * dom/Node.cpp:
1322         (WebCore::Node::rootEditableElement): Return inline nodes
1323         * editing/FormatBlockCommand.cpp:
1324         (WebCore::FormatBlockCommand::doApply): Keep from inserting before editable content
1325         * editing/JSEditor.cpp: Support html braces (<>) around tag names
1326
1327 2006-06-28  Justin Garcia  <justin.garcia@apple.com>
1328
1329         Reviewed by levi
1330         
1331         svg/custom/text-hit-test.svg was failing
1332
1333         * rendering/RenderContainer.cpp:
1334         (WebCore::RenderContainer::positionForCoordinates): Don't skip child
1335         renderers that have a height of 0 when looking for the closest child
1336         renderer, they may contain content that overflows.
1337         * rendering/RenderText.cpp:
1338         (WebCore::RenderText::positionForCoordinates): Fixed typos.
1339
1340 2006-06-28  David Hyatt  <hyatt@apple.com>
1341
1342         Make the view source document properly handle <script>.  We don't syntax
1343         highlight the JS yet, but it shows up properly now.
1344
1345         Reviewed by john
1346
1347         * WebCore.xcodeproj/project.pbxproj:
1348         * html/HTMLTokenizer.cpp:
1349         (WebCore::HTMLTokenizer::scriptHandler):
1350
1351 2006-06-28  Timothy Hatcher  <timothy@apple.com>
1352
1353         Prefer the Stabs debugging symbols format until DWARF bugs are fixed.
1354
1355         * WebCore.xcodeproj/project.pbxproj:
1356
1357 2006-06-28  Justin Garcia  <justin.garcia@apple.com>
1358
1359         Reviewed by levi
1360         
1361         Fixed EditActions for InsertHorizontalRule and RemoveFormat.
1362         
1363         * editing/JSEditor.cpp:
1364         * editing/ReplaceSelectionCommand.cpp:
1365         (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand):
1366         (WebCore::ReplaceSelectionCommand::editingAction):
1367         * editing/ReplaceSelectionCommand.h:
1368
1369 2006-06-28  Levi Weintraub  <lweintraub@apple.com>
1370
1371          Build Fix. Reviewed by NOBODY
1372
1373         * editing/IndentOutdentCommand.cpp:
1374         (WebCore::IndentOutdentCommand::indentRegion):
1375
1376 2006-06-28  Levi Weintraub  <lweintraub@apple.com>
1377
1378         Reviewed by justin
1379
1380         http://bugzilla.opendarwin.org/show_bug.cgi?id=7568
1381         Bug 7568: Implement Indent/Outdent
1382
1383         * WebCore.vcproj/WebCore/WebCore.vcproj: Added IndentOutdentCommand.h/cpp
1384         * WebCore.xcodeproj/project.pbxproj: Ditto.
1385         * editing/IndentOutdentCommand.cpp: Added.
1386         (WebCore::IndentOutdentCommand::IndentOutdentCommand):
1387         (WebCore::enclosingListOrBlockquote):
1388         (WebCore::IndentOutdentCommand::splitTreeToNode): Splits the DOM tree from a
1389         descendent node to an ending ancestor, duplicating nodes when necessary. Returns
1390         the last node split. Used to insert blockquotes at the topmost level.
1391         (WebCore::IndentOutdentCommand::indentRegion):
1392         (WebCore::IndentOutdentCommand::outdentParagraph):
1393         (WebCore::IndentOutdentCommand::outdentRegion):
1394         (WebCore::IndentOutdentCommand::doApply):
1395         * editing/IndentOutdentCommand.h: Added.
1396         (WebCore::IndentOutdentCommand::):
1397         * editing/JSEditor.cpp: Added the execCommands Indent and Outdent
1398         * editing/htmlediting.cpp:
1399         (WebCore::enclosingNodeWithTag): Finds the enclosing node with any specified tag.
1400         (WebCore::enclosingListChild): Added checks for nill and editable boundaries.
1401         (WebCore::outermostEnclosingListChild): Returns the highest ancestor list child.
1402         (WebCore::highestAncestor): Added.
1403         (WebCore::createElement): Changed the passed in string to a const reference.
1404         * editing/htmlediting.h:
1405
1406 2006-06-28  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1407
1408         Reviewed by Darin and Hyatt.
1409
1410         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9561
1411           REGRESSION: Content property on :before of button causes hang on click or hover
1412
1413         Test: fast/forms/button-generated-content.html
1414
1415         * rendering/RenderBlock.cpp:
1416         (WebCore::RenderBlock::setStyle):
1417         * rendering/RenderButton.cpp:
1418         (WebCore::RenderButton::updatePseudoChild): Added. Calls updatePseudoChildForObject()
1419         on the button itself or on its inner div, if it has one.
1420         * rendering/RenderButton.h:
1421         (WebCore::RenderButton::createsAnonymousWrapper): Added. Returns true.
1422         * rendering/RenderContainer.cpp:
1423         (WebCore::RenderContainer::pseudoChild): Added. Returns the child containing
1424         generated content of the requested type if there is one, or otherwise the
1425         child before/after which such generated content should come.
1426         (WebCore::RenderContainer::updatePseudoChild): Removed the child parameter and moved the guts
1427         of this method into updatePseudoChildForObject, which this method calls unless the object
1428         is an anonymous wrapper.
1429         (WebCore::RenderContainer::updatePseudoChildForObject): Added. Does the what
1430         updatePseudoChildForObject did previously, but fetches the pseudo style from
1431         the styledObject parameter.
1432         * rendering/RenderContainer.h:
1433         * rendering/RenderInline.cpp:
1434         (WebCore::RenderInline::setStyle):
1435         (WebCore::RenderInline::addChildToFlow):
1436         (WebCore::RenderInline::splitInlines):
1437         (WebCore::RenderInline::splitFlow):
1438         * rendering/RenderObject.h:
1439         (WebCore::RenderObject::createsAnonymousWrapper): Added. This method replaces
1440         allowsReusingAnonymousChild and returns the opposite of what that method used to
1441         return. Returns true if the object creates an anonymous child to contain all its
1442         other children.
1443
1444 2006-06-27  Brady Eidson  <beidson@apple.com>
1445
1446         Reviewed by Maciej
1447
1448         Hookup the new semi-functional SQLite icon database.
1449         For now, it is living side-by-side with the old DB so one can compare the
1450         two for debugging purposes.  Also, it is disabled (in WebKit) by default unless you
1451         compile with ICONDEBUG #defined.
1452
1453         * WebCore.xcodeproj/project.pbxproj:  Added file SiteIcon.cpp
1454
1455         * bridge/mac/WebCoreIconDatabaseBridge.h:
1456         * bridge/mac/WebCoreIconDatabaseBridge.mm:
1457         (-[WebCoreIconDatabaseBridge privateBrowsingEnabled]):
1458         (-[WebCoreIconDatabaseBridge iconForPageURL:withSize:]):
1459         (-[WebCoreIconDatabaseBridge iconURLForPageURL:]):
1460         (-[WebCoreIconDatabaseBridge _setIconData:forIconURL:]):
1461
1462         * icon/IconDatabase.cpp:
1463         (WebCore::IconDatabase::isValidDatabase):
1464         (WebCore::IconDatabase::recreateDatabase):
1465         (WebCore::IconDatabase::createPrivateTables):
1466         (WebCore::IconDatabase::deletePrivateTables):
1467         (WebCore::IconDatabase::imageDataForIconID):
1468         (WebCore::IconDatabase::imageDataForIconURL):
1469         (WebCore::IconDatabase::imageDataForPageURL):
1470         (WebCore::IconDatabase::setPrivateBrowsingEnabled):
1471         (WebCore::IconDatabase::iconForPageURL):
1472         (WebCore::IconDatabase::iconURLForURL):
1473         (WebCore::IconDatabase::setIconDataForIconURL):
1474         (WebCore::IconDatabase::establishIconIDForEscapedIconURL):
1475         (WebCore::IconDatabase::setHaveNoIconForIconURL):
1476         (WebCore::IconDatabase::setIconURLForPageURL):
1477         (WebCore::IconDatabase::hasIconForIconURL):
1478         * icon/IconDatabase.h:
1479         (WebCore::SiteIcon::getIconURL):
1480         (WebCore::IconDatabase::getPrivateBrowsingEnabled):
1481         
1482         * icon/SiteIcon.cpp: Added.
1483         (SiteIcon::SiteIcon):
1484         (SiteIcon::~SiteIcon):
1485         (SiteIcon::getImage):
1486         (SiteIcon::resetExpiration):
1487         (SiteIcon::getExpiration):
1488
1489 2006-06-27  Rob Buis  <buis@kde.org>
1490
1491         Reviewed by Darin.
1492
1493         http://bugzilla.opendarwin.org/show_bug.cgi?id=9605
1494         REGRESSION: pageX and pageY are both 0 for events created with initMouseEvent
1495
1496         Calculate pageX/pageY and clientX/clientY values when using initMouseEvent.
1497
1498         * dom/MouseEvent.cpp:
1499         (WebCore::MouseEvent::initMouseEvent):
1500         * dom/MouseRelatedEvent.cpp:
1501         (WebCore::MouseRelatedEvent::initCoordinates):
1502         * dom/MouseRelatedEvent.h:
1503
1504 2006-06-27  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1505
1506         Reviewed by Maciej and Darin.
1507
1508         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9317
1509           REGRESSION: crash in HTML tokenizer at Japanese Apple support page
1510
1511         Test: fast/tokenizer/write-unclosed-script.html
1512
1513         * html/HTMLTokenizer.cpp:
1514         (WebCore::HTMLTokenizer::scriptHandler): Changed to reset the inScript flag
1515         and scriptCodeSize before possible script execution, but not afterwards.
1516         This way, if script execution write()s a <script> tag without closing it,
1517         the tokenizer is left in inScript state. Added code to set the requestingScript
1518         flag around the request for the cached script, to let notifiyFinished() know
1519         that it's being called under scriptHandler().
1520         (WebCore::HTMLTokenizer::scriptExecution): Removed code that saved and restored
1521         the inScript flag. This function is always entered now with inScript being false.
1522         (WebCore::HTMLTokenizer::notifyFinished): Changed to use the new requestingScript
1523         state flag instead of the inScript flag, which is always false now when entering
1524         this function.
1525         * html/HTMLTokenizer.h:
1526         Added the requestingScript state bit, used to tell notifyFinished() that it
1527         is being called under scriptHandler() (which happens when the script is already
1528         in cache).
1529
1530 2006-06-27  Justin Garcia  <justin.garcia@apple.com>
1531
1532         Reviewed by levi
1533
1534         * editing/JSEditor.cpp: Added RemoveFormat.
1535
1536 2006-06-27  Kevin Decker    <kdecker@apple.com>
1537
1538         Reviewed by brady.
1539
1540         Fixed: <rdar://problem/4597679> TOT REGRESSION: popup blocker DOA
1541         
1542         Need to add window.open() support to DumpRenderTree before landing an actual layout test.
1543
1544         * bindings/js/kjs_window.cpp: 
1545         (KJS::WindowFunc::callAsFunction): Because FrameTree::find() returns true for empty strings, 
1546         we must check for empty framenames. Otherwise, illegitimate window.open() calls with no name
1547         will pass right through the popup blocker.
1548
1549 2006-06-28  Anders Carlsson  <acarlsson@apple.com>
1550
1551         Reviewed by Darin.
1552
1553         * css/CSSComputedStyleDeclaration.cpp:
1554         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1555         Move FIXME comment here.
1556         
1557         * page/DOMWindow.cpp:
1558         (WebCore::DOMWindow::getComputedStyle):
1559         Don't do a null check on the renderer here. Everything's handled by 
1560         CSSComputedStyleDeclaration anyway.
1561
1562 2006-06-27  Justin Garcia  <justin.garcia@apple.com>
1563
1564         Reviewed by darin
1565
1566         * rendering/RenderContainer.cpp: Fixed #include formatting.
1567
1568 2006-06-27  Justin Garcia  <justin.garcia@apple.com>
1569
1570         Reviewed by levi
1571         
1572         <rdar://problem/4599735> Clicking out of a table at the extremes of an editable document doesn't appear to work
1573
1574         * rendering/RenderBlock.cpp:
1575         (WebCore::RenderBlock::positionForCoordinates): In the fall through case,
1576         where we can't find a child block that contains (x, y), pass to RenderFlow
1577         instead of the last visible child block.
1578         * rendering/RenderContainer.cpp:
1579         (WebCore::RenderContainer::positionForCoordinates): Don't pass to the closest 
1580         child renderer if this is a table and (x, y) is outside the table.  Return
1581         a VisiblePosition before or after the table.
1582         Fixed the code that finds the closest child renderer.
1583
1584 2006-06-27  David Hyatt  <hyatt@apple.com>
1585
1586         Preserve entity text in view source mode.  This patch doesn't highlight the
1587         the entities yet, but it at least prevents their resolution and removal.
1588
1589         Reviewed by darin
1590
1591         * WebCore.xcodeproj/project.pbxproj:
1592         * html/HTMLTokenizer.cpp:
1593         (WebCore::HTMLTokenizer::parseEntity):
1594
1595 2006-06-27  Anders Carlsson  <acarlsson@apple.com>
1596
1597         Reviewed by Geoff.
1598
1599         http://bugzilla.opendarwin.org/show_bug.cgi?id=9623
1600         REGRESSION: getComputedStyle should do a relayout
1601         
1602         * page/DOMWindow.cpp:
1603         (WebCore::DOMWindow::getComputedStyle):
1604         Do a relayout.
1605
1606 2006-06-27  Maciej Stachowiak  <mjs@apple.com>
1607
1608         Reviewed by Adele
1609
1610         - fixed <rdar://problem/4550473> Reproducible hang on www.digg.com
1611         
1612         * dom/NodeList.cpp:
1613         (WebCore::NodeList::recursiveItem): Make NodeList caching also
1614         work for backwards iteration - if the requested index is before
1615         the last cached, but closer to it than to the start of the list,
1616         then search backwards from there.
1617         (WebCore::NodeList::itemForwardsFromCurrent): Split this out as a
1618         helper method.
1619         (WebCore::NodeList::itemBackwardsFromCurrent): New helper, similar
1620         to the above.
1621         * dom/NodeList.h:
1622
1623 2006-06-27  Brady Eidson  <beidson@apple.com>
1624
1625         Reviewed by Levi
1626
1627         Some SQLDatabase cleanup (style stuff) and enhancements
1628
1629         * icon/SQLDatabase.cpp:
1630         (SQLDatabase::open):
1631         (SQLDatabase::executeCommand):
1632         (SQLDatabase::returnsAtLeastOneResult):  Accessor to see if this query returns results
1633         (SQLDatabase::lastInsertRowID):  Accessor for the rowid of the last insert
1634         * icon/SQLDatabase.h:
1635         (WebCore::SQLStatement::prepareAndStep):
1636         * icon/SQLStatement.cpp:
1637         (WebCore::SQLStatement::bindInt64):
1638         -All of the following used to require the user to manually prepare and step a statement
1639         before asking for the result.  Now it will prepare and step itself so you can use a temporary
1640         object to get a quick result
1641         (WebCore::SQLStatement::getColumnName):
1642         (WebCore::SQLStatement::getColumnName16):
1643         (WebCore::SQLStatement::getColumnText):
1644         (WebCore::SQLStatement::getColumnText16):
1645         (WebCore::SQLStatement::getColumnDouble):
1646         (WebCore::SQLStatement::getColumnInt):
1647         (WebCore::SQLStatement::getColumnInt64):
1648         (WebCore::SQLStatement::getColumnBlobAsVector):
1649         (WebCore::SQLStatement::getColumnBlob):
1650
1651 2006-06-27  Ada Chan <adachan@apple.com>
1652
1653         Reviewed by sfalken.
1654
1655         Fixed build.
1656
1657         * WebCore.vcproj/WebCore/WebCore.vcproj:
1658
1659 2006-06-27  Beth Dakin  <bdakin@apple.com>
1660
1661         Reviewed by Hyatt.
1662
1663         Fix for <rdar://problem/4602635> Media queries must be extended to 
1664         address CSS pixel scaling factor
1665
1666         * css/MediaFeatureNames.h: Add -webkit-device-pixel-ratio, -webkit-
1667         min-device-pixel-ratio, and -webkit-max-device-pixel-ratio to the 
1668         list of feature names.
1669         * css/MediaQueryEvaluator.cpp:
1670         (WebCore::cmpvalue): Added a version of cmpvalue that compares 
1671         floats.
1672         (WebCore::device_pixel_ratioMediaFeatureEval):
1673         (WebCore::min_device_pixel_ratioMediaFeatureEval):
1674         (WebCore::max_device_pixel_ratioMediaFeatureEval):
1675
1676 2006-06-27  Darin Adler  <darin@apple.com>
1677
1678         Reviewed by Geoff.
1679
1680         - finish with http://bugzilla.opendarwin.org/show_bug.cgi?id=9606
1681           REGRESSION: some callers are still using clientX/Y to get pageX/Y
1682
1683         * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::userResize):
1684         Change to use pageX/Y, but this really doesn't matter since framesets
1685         can't be scrolled -- it's the frames that are scrolled. So this change
1686         has no user-visible effect, but it's still better this way.
1687
1688 2006-06-27  Darin Adler  <darin@apple.com>
1689
1690         Reviewed by Geoff.
1691
1692         - fix 2/3 of http://bugzilla.opendarwin.org/show_bug.cgi?id=9606
1693           REGRESSION: some callers are still using clientX/Y to get pageX/Y
1694
1695         Test: fast/events/anchor-image-scrolled-x-y.html
1696         Test: fast/events/input-image-scrolled-x-y.html
1697
1698         * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::defaultEventHandler): Use pageX/Y.
1699         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler): Ditto.
1700
1701 2006-06-27  Brady Eidson  <beidson@apple.com>
1702
1703         Reviewed by Maciej
1704
1705         Added functionality to WebCore::Image to get multiple representations/sizes into TIFF data
1706
1707         * platform/mac/ImageMac.mm:
1708         (WebCore::Image::getTIFFRepresentation):
1709
1710 2006-06-26  David Hyatt  <hyatt@apple.com>
1711
1712         Fix for 9538, support syntax highlighted HTML source.  Lots of loose
1713         ends still (script/style/comments/doctype/entities/accurate whitespace).
1714
1715         Reviewed by darin
1716
1717         * DerivedSources.make:
1718         * WebCore.xcodeproj/project.pbxproj:
1719         * bridge/mac/WebCoreFrameBridge.h:
1720         * bridge/mac/WebCoreFrameBridge.mm:
1721         (-[WebCoreFrameBridge setInViewSourceMode:]):
1722         (-[WebCoreFrameBridge inViewSourceMode]):
1723         * css/cssstyleselector.cpp:
1724         (WebCore::CSSStyleSelector::loadDefaultStyle):
1725         (WebCore::CSSStyleSelector::matchUARules):
1726         * css/cssstyleselector.h:
1727         * css/view-source.css: Added.
1728         * dom/Document.cpp:
1729         (WebCore::Document::implicitClose):
1730         * dom/xml_tokenizer.h:
1731         (WebCore::Tokenizer::Tokenizer):
1732         (WebCore::Tokenizer::~Tokenizer):
1733         (WebCore::Tokenizer::inViewSourceMode):
1734         (WebCore::Tokenizer::setInViewSourceMode):
1735         * html/HTMLAttributeNames.in:
1736         * html/HTMLFrameElement.cpp:
1737         (WebCore::HTMLFrameElement::init):
1738         (WebCore::HTMLFrameElement::parseMappedAttribute):
1739         (WebCore::HTMLFrameElement::attach):
1740         * html/HTMLFrameElement.h:
1741         (WebCore::HTMLFrameElement::viewSourceMode):
1742         * html/HTMLTokenizer.cpp:
1743         (WebCore::HTMLTokenizer::HTMLTokenizer):
1744         (WebCore::HTMLTokenizer::scriptHandler):
1745         (WebCore::HTMLTokenizer::scriptExecution):
1746         (WebCore::HTMLTokenizer::parseTag):
1747         (WebCore::HTMLTokenizer::continueProcessing):
1748         (WebCore::HTMLTokenizer::write):
1749         (WebCore::HTMLTokenizer::timerFired):
1750         (WebCore::HTMLTokenizer::end):
1751         (WebCore::HTMLTokenizer::processToken):
1752         (WebCore::HTMLTokenizer::notifyFinished):
1753         * html/HTMLTokenizer.h:
1754         * html/HTMLViewSourceDocument.cpp: Added.
1755         (WebCore::HTMLViewSourceDocument::HTMLViewSourceDocument):
1756         (WebCore::HTMLViewSourceDocument::createTokenizer):
1757         (WebCore::HTMLViewSourceDocument::addViewSourceToken):
1758         (WebCore::HTMLViewSourceDocument::addViewSourceAttribute):
1759         (WebCore::HTMLViewSourceDocument::addSpanWithClassName):
1760         * html/HTMLViewSourceDocument.h: Added.
1761         * page/Frame.cpp:
1762         (WebCore::Frame::begin):
1763         (WebCore::Frame::inViewSourceMode):
1764         (WebCore::Frame::setInViewSourceMode):
1765         * page/Frame.h:
1766         * page/FramePrivate.h:
1767         (WebCore::FramePrivate::FramePrivate):
1768         * rendering/RenderPartObject.cpp:
1769         (WebCore::RenderPartObject::updateWidget):
1770
1771 2006-06-26  Anders Carlsson  <acarlsson@apple.com>
1772
1773         Reviewed by Darin.
1774
1775         http://bugzilla.opendarwin.org/show_bug.cgi?id=9031
1776         REGRESSION: Crash when closing tabs on newegg.com
1777         
1778         * page/Frame.cpp:
1779         (WebCore::Frame::pageDestroyed):        
1780         * page/Frame.h:
1781         Add new method which is invoked when the frame's page has been destroyed.
1782         Currently this function disassociates the JS Window object with the frame, 
1783         stopping any running JS timers.
1784         
1785         * page/Page.cpp:
1786         (WebCore::Page::~Page):
1787         Call pageDestroyed on all frames.
1788
1789 2006-06-26  Rob Buis  <buis@kde.org>
1790
1791         Reviewed and reworked by Darin.
1792
1793         Code cleanup, calculate clientX/clientY in one central place.
1794
1795         * dom/EventTargetNode.h:
1796         * dom/EventTargetNode.cpp: (WebCore::EventTargetNode::dispatchMouseEvent):
1797         Renamed parameters to pageX/Y since they aren't clientX/Y values.
1798         Removed code to compute clientX/Y (was a bit confused in naming before),
1799         because that's now done inside MouseEvent.
1800
1801         * dom/MouseEvent.h:
1802         * dom/MouseEvent.cpp:
1803         (WebCore::MouseEvent::MouseEvent): Removed clientX/Y parameters.
1804         (WebCore::MouseEvent::initMouseEvent): Added comments about problems I noticed.
1805         (WebCore::MouseEvent::which): Fixed comment that confusingly mentioned KHTML,
1806         when it was talking about the DOM standard.
1807
1808         * dom/MouseRelatedEvent.h:
1809         * dom/MouseRelatedEvent.cpp:
1810         (WebCore::contentsX): Added helper function.
1811         (WebCore::contentsY): Ditto.
1812         (WebCore::MouseRelatedEvent::MouseRelatedEvent): Removed clientX/Y parameter,
1813         and added code to compute clientX/Y based on pageX/Y.
1814         (WebCore::MouseRelatedEvent::receivedTarget): Fixed comments.
1815
1816         * dom/WheelEvent.h:
1817         * dom/WheelEvent.cpp: (WebCore::WheelEvent::WheelEvent): Removed clientX/Y
1818         parameter.
1819
1820         * page/FrameView.cpp: (WebCore::FrameView::dispatchDragEvent): Removed the code
1821         to compute coordinates, and renamed the confusingly named clientPos (which was
1822         a page-relative position) to contentsPos.
1823
1824 2006-06-25  David Carson  <dacarson@gmail.com>
1825
1826         Reviewed and tweaked by Darin.
1827
1828         - http://bugzilla.opendarwin.org/show_bug.cgi?id=9185
1829         REGRESSION: UserID field appears with an incorrect height 
1830         on americanexpresslogin page
1831         - Height and Width attribute only applies to IMAGE and HIDDEN
1832         types.
1833
1834         * dom/NamedMappedAttrMap.h:
1835         (WebCore::NamedMappedAttrMap::getAttributeItem):
1836         Added to static_cast method.
1837
1838         * html/HTMLInputElement.cpp:
1839         (WebCore::HTMLInputElement::setInputType):
1840         Update the style decl if input type has changed.
1841         (WebCore::HTMLInputElement::mapToEntry):
1842         Only Cache height and width if it is an IMAGE or HIDDEN
1843         (WebCore::HTMLInputElement::parseMappedAttribute):
1844         Check type before adding height and width style.
1845         (WebCore::HTMLInputElement::attach):
1846         Remove code for discarding width.
1847
1848         * html/HTMLInputElement.h:
1849         (WebCore::HTMLInputElement::respectHeightAndWidthAttrs):
1850         New method added to report if this input type uses height & width.
1851
1852 2006-06-25  David Kilzer  <ddkilzer@kilzer.net>
1853
1854         Reviewed by Darin.
1855
1856         - http://bugzilla.opendarwin.org/show_bug.cgi?id=9537
1857           REGRESSION: Reproducible crash in WebCore::RenderTextField::textWithHardLineBreaks()
1858
1859         Test: fast/forms/textarea-hard-linewrap-empty.html
1860
1861         * rendering/RenderTextField.cpp:
1862         (WebCore::RenderTextField::textWithHardLineBreaks): Added null check for
1863         m_div->firstChild()->renderer().
1864
1865 2006-06-25  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1866
1867         Reviewed by Darin.
1868
1869         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9388
1870           REGRESSION: outlines don't get erased when removed in some cases
1871
1872         Test: fast/repaint/outline-shrinking.html
1873
1874         * rendering/RenderObject.cpp:
1875         (WebCore::RenderObject::setStyle): Always repaint with the old style if the outline is
1876         becoming narrower, even if we are going to relayout.
1877
1878 2006-06-25  Rob Buis  <buis@kde.org>
1879
1880         Reviewed by Darin.
1881
1882         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8707:
1883         event.clientX and event.clientY should be relative to the viewport, not the canvas
1884
1885         Make sure clientX and clientY take into account the scroll offsets
1886         of the view.
1887
1888         * dom/EventTargetNode.cpp:
1889         (WebCore::EventTargetNode::dispatchMouseEvent):
1890         * dom/MouseEvent.cpp:
1891         (WebCore::MouseEvent::MouseEvent):
1892         * dom/MouseEvent.h:
1893         * dom/MouseRelatedEvent.cpp:
1894         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
1895         (WebCore::MouseRelatedEvent::initCoordinates):
1896         * dom/MouseRelatedEvent.h:
1897         * dom/WheelEvent.cpp:
1898         (WebCore::WheelEvent::WheelEvent):
1899         * page/FrameView.cpp:
1900         (WebCore::FrameView::dispatchDragEvent):
1901
1902 2006-06-25  Timothy Hatcher  <timothy@apple.com>
1903
1904         Reviewed by Darin.
1905
1906         Bug 9574: Drosera should show inline scripts within the original HTML
1907         http://bugzilla.opendarwin.org/show_bug.cgi?id=9574
1908
1909         * Pass the starting line number and error message to the debugger.
1910         * Call parsedSource even if there was a script parse error so the
1911           debugger can show the parse error.
1912         * Pass NSURL objects to the ObjC delegate for the script URLs.
1913
1914         * bridge/mac/WebCoreScriptDebugger.h:
1915         * bridge/mac/WebCoreScriptDebugger.mm:
1916         (toNSURL):
1917         (WebCoreScriptDebuggerImp::sourceParsed):
1918
1919 2006-06-24  David Kilzer  <ddkilzer@kilzer.net>
1920
1921         Build fix.  Reviewed by NOBODY.
1922
1923         - Backed out patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=8707
1924           event.clientX and event.clientY should be relative to the viewport, not the canvas
1925
1926         * dom/EventTargetNode.cpp:
1927         (WebCore::EventTargetNode::dispatchMouseEvent):
1928         * dom/MouseEvent.cpp:
1929         (WebCore::MouseEvent::MouseEvent):
1930         * dom/MouseEvent.h:
1931         * dom/MouseRelatedEvent.cpp:
1932         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
1933         (WebCore::MouseRelatedEvent::initCoordinates):
1934         * dom/MouseRelatedEvent.h:
1935         * dom/WheelEvent.cpp:
1936         (WebCore::WheelEvent::WheelEvent):
1937
1938 2006-06-24  Rob Buis  <buis@kde.org>
1939
1940         Reviewed by Darin.
1941
1942         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8707:
1943         event.clientX and event.clientY should be relative to the viewport, not the canvas
1944
1945         Make sure clientX and clientY take into account the scroll offsets
1946         of the view.
1947
1948         Test: fast/dom/window-xy-properties.html
1949
1950         * dom/EventTargetNode.cpp:
1951         (WebCore::EventTargetNode::dispatchMouseEvent):
1952         * dom/MouseEvent.cpp:
1953         (WebCore::MouseEvent::MouseEvent):
1954         * dom/MouseEvent.h:
1955         * dom/MouseRelatedEvent.cpp:
1956         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
1957         (WebCore::MouseRelatedEvent::initCoordinates):
1958         * dom/MouseRelatedEvent.h:
1959         * dom/WheelEvent.cpp:
1960         (WebCore::WheelEvent::WheelEvent):
1961
1962 2006-06-24  Rob Buis  <buis@kde.org>
1963
1964         Reviewed by Darin.
1965
1966         http://bugzilla.opendarwin.org/show_bug.cgi?id=9352
1967         Webkit doesn't respect stroke-width in SVG for smaller <circle>s
1968
1969         Make sure the stroke path is set before applying gradient transforms.
1970
1971         * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
1972         (WebCore::KRenderingPaintServerGradientQuartz::setup):
1973         (WebCore::KRenderingPaintServerGradientQuartz::renderPath):
1974
1975 2006-06-24  Alexey Proskuryakov  <ap@nypop.com>
1976
1977         Rubber-stamped by Eric.
1978
1979         Add a -h (do not follow symlinks) option to ln in derived sources build script (without it,
1980         a symlink was created inside the source directory on second build).
1981
1982         * WebCore.xcodeproj/project.pbxproj:
1983
1984 2006-06-24  James G. Speth  <speth@end.com>
1985
1986         Reviewed by Darin.  Copyrights tweaked by ddkilzer.
1987         
1988         Bug 8331: DOMNodeLists returned to Objective-C are not properly wrapped
1989         http://bugzilla.opendarwin.org/show_bug.cgi?id=8331
1990         
1991         DOMNodes were the only objects handled by createObjcInstanceForValue.
1992         now it handles all of these: DOMNode, DOMNodeList, DOMNamedNodeMap, DOMStyleSheetList,
1993         DOMStyleSheet, DOMMediaList, DOMCSSRuleList, DOMCSSRule, DOMCSSStyleDeclaration, and DOMCSSValue
1994         
1995         * WebCore.xcodeproj/project.pbxproj: added file DOMCSSInternal.h to project
1996         * bindings/js/kjs_css.cpp:
1997         (KJS::): changed ClassInfo for DOMCSSStyleSheet to have DOMStyleSheet as its parent class
1998         * bindings/objc/DOM.mm:
1999         (-[DOMDocumentType :]):  moved DOMNamedNodeMap (WebCoreInternal) interface to DOMInternal.h
2000         * bindings/objc/DOMCSS.mm: moved WebCoreInternal interfaces to DOMCSSInternal.h
2001         * bindings/objc/DOMCSSInternal.h: Added file, contains WebCoreInternal interface for CSS classes
2002         * bindings/objc/DOMInternal.h: added DOMNamedNodeMap (WebCoreInternal) interface
2003         * bindings/objc/DOMUtility.mm:
2004         (KJS::ScriptInterpreter::createObjcInstanceForValue): support for more classes
2005
2006 2006-06-24  David Kilzer  <ddkilzer@kilzer.net>
2007
2008         Reviewed by Timothy.
2009
2010         * Info.plist: Fixed copyright to include 2003-2006.
2011         * manual-tests/NPN_Invoke/Info.plist: Added copyright statement.
2012
2013 2006-06-24  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2014
2015         Reviewed by Darin, landed by ap.
2016
2017         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9547
2018           Resize corner does not track the mouse accurately
2019
2020         Test: fast/css/resize-corner-tracking.html
2021
2022         * page/FrameView.cpp:
2023         (WebCore::FrameView::handleMousePressEvent): Store the offset from the layer's
2024         resizing corner where dragging has started.
2025         (WebCore::FrameView::handleMouseMoveEvent): Pass the stored offset to the
2026         layer's resize method.
2027         * rendering/RenderLayer.cpp:
2028         (WebCore::RenderLayer::resize): Added an offset parameter, which is added to
2029         the mouse location.
2030         For objects that may have intrinsic margins applied to them,
2031         added code to lift the margins into the object's style in order to keep them
2032         constant.
2033         Changed to take the content size as the base size if the box-sizing property
2034         is content-box.
2035         (WebCore::RenderLayer::offsetFromResizeCorner): Added. Returns the offset of the
2036         given point from the corner that tracks the mouse when resizing.
2037         * rendering/RenderLayer.h:
2038
2039 2006-06-24  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2040
2041         Reviewed by Darin, landed by ap.
2042
2043         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9316
2044           REGRESSION: text field width shrinks on first keystroke
2045
2046         Test: fast/forms/floating-textfield-relayout.html
2047
2048         * page/FrameView.cpp:
2049         (WebCore::FrameView::layoutRoot): Added. During subtree relayout, returns
2050         the subtree root. Otherwise returns 0.
2051         (WebCore::FrameView::layoutPending): Made const.
2052         * page/FrameView.h:
2053         * rendering/RenderBox.cpp:
2054         (WebCore::RenderBox::calcWidth): Added early return if this is the root
2055         of a subtree being laid out. 
2056
2057 2006-06-24  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2058
2059         Reviewed by Hyatt.
2060
2061         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9531
2062           Pages that need only a horizontal scroll bar get a vertical one as well
2063
2064         The change affects many existing tests.
2065
2066         * page/FrameView.cpp:
2067         (WebCore::FrameView::layout): Mark the body renderer as needing layout if
2068         the view's height has changed and the body stretches to the view's height.
2069         * rendering/RenderBox.cpp:
2070         (WebCore::RenderBox::calcHeight):
2071         * rendering/RenderBox.h:
2072         (WebCore::RenderBox::stretchesToViewHeight): Added. Moved the logic for when
2073         the HTML block needs to stretch to the view's height from calcHeight() here.
2074
2075 2006-06-24  Alexey Proskuryakov  <ap@nypop.com>
2076
2077         Reviewed by Darin.
2078
2079         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7461
2080           Always encode the path part of an URI as UTF-8
2081
2082         Test: http/tests/uri/utf8-path.html
2083
2084         * platform/KURL.cpp:
2085         (encodeRelativeString): Always set pathEncoding to UTF-8.
2086
2087 2006-06-24  Graham Dennis  <Graham.Dennis@gmail.com>
2088
2089         Reviewed by Darin, landed by ap.
2090         
2091         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9467
2092           TreeWalker/NodeIterator do not restrict the traversal
2093         
2094         Test: traversal/stay-within-root.html
2095
2096         * dom/Node.cpp:
2097         (WebCore::Node::traversePreviousNode):
2098         * dom/Node.h:
2099         Add a stayWithin argument to traversePreviousNode just like the other
2100         traversal functions
2101         * dom/NodeIterator.cpp:
2102         (WebCore::NodeIterator::findNextNode):
2103         (WebCore::NodeIterator::findPreviousNode):
2104         Ensure that when moving forward or backward that the root node is not
2105         exited
2106         * dom/TreeWalker.cpp:
2107         (WebCore::TreeWalker::previousNode):
2108         (WebCore::TreeWalker::nextNode):
2109         Ditto
2110         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
2111
2112 2006-06-24  Jonas Witt <jonas.witt@gmail.com>
2113
2114         Reviewed by ggaren, landed by ap.
2115
2116         - http://bugzilla.opendarwin.org/show_bug.cgi?id=9181
2117           Complete DOMUIEvent Obj-C API to reflect UIEvent
2118
2119         * WebCore.exp: add new classes DOMKeyboardEvent and DOMWheelEvent to the exported 
2120           symbols list of WebCore.framework
2121
2122         Updated DOMUIEvent to include all DOM Level 2 properties
2123         Added DOMKeyboardEvent (DOM Level 3)
2124         Added two non-W3C accessors (keyCode, charCode) of DOMKeyboardEvent to a separate file (DOMEventsNonstandard)
2125         Added DOMWheelEvent (non-W3C) in separate file (DOMEventsNonstandard)
2126         Added this file (DOMEventsNonstandard) to the build process
2127
2128         * WebCore.xcodeproj/project.pbxproj:
2129         * bindings/objc/DOM.h:
2130         * bindings/objc/DOMEvents.h:
2131         * bindings/objc/DOMEvents.mm:
2132         (+[DOMEvent _eventWith:]):
2133         (-[DOMUIEvent _UIEvent]):
2134         (-[DOMUIEvent view]):
2135         (-[DOMUIEvent detail]):
2136         (-[DOMUIEvent initUIEvent:::::]):
2137         (-[DOMKeyboardEvent _keyboardEvent]):
2138         (-[DOMKeyboardEvent keyIdentifier]):
2139         (-[DOMKeyboardEvent keyLocation]):
2140         (-[DOMKeyboardEvent ctrlKey]):
2141         (-[DOMKeyboardEvent shiftKey]):
2142         (-[DOMKeyboardEvent altKey]):
2143         (-[DOMKeyboardEvent metaKey]):
2144         (-[DOMKeyboardEvent getModifierState:]):
2145         (-[DOMMouseEvent button]):
2146         * bindings/objc/DOMEventsNonstandard.mm: Added.
2147         (-[DOMWheelEvent _wheelEvent]):
2148         (-[DOMWheelEvent screenX]):
2149         (-[DOMWheelEvent screenY]):
2150         (-[DOMWheelEvent clientX]):
2151         (-[DOMWheelEvent clientY]):
2152         (-[DOMWheelEvent ctrlKey]):
2153         (-[DOMWheelEvent shiftKey]):
2154         (-[DOMWheelEvent altKey]):
2155         (-[DOMWheelEvent metaKey]):
2156         (-[DOMWheelEvent isHorizontal]):
2157         (-[DOMWheelEvent wheelDelta]):
2158         (-[DOMKeyboardEvent _keyboardEvent]):
2159         (-[DOMKeyboardEvent keyCode]):
2160         (-[DOMKeyboardEvent charCode]):
2161         * bindings/objc/DOMPrivate.h:
2162
2163 2006-06-24  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2164
2165         Reviewed and landed by ap.
2166
2167         - http://bugzilla.opendarwin.org/show_bug.cgi?id=9563
2168           Remove unused layoutSuppressed field and inLayout() method
2169
2170         No test added because there is no change in functionality.
2171
2172         * page/FrameView.cpp:
2173         (WebCore::FrameViewPrivate::reset):
2174         (WebCore::FrameView::layout):
2175         * page/FrameView.h:
2176         * rendering/RenderView.cpp:
2177         (WebCore::RenderView::layout):
2178
2179 2006-06-24  Alexey Proskuryakov  <ap@nypop.com>
2180
2181         Reviewed by Darin.
2182
2183         - http://bugzilla.opendarwin.org/show_bug.cgi?id=8177
2184         Javascript search incredibly slow
2185
2186         No change in functionality, thus no test.
2187
2188         Use info sharing for named collections, too. Moved shared HTMLCollection infos from HTMLDocument 
2189         to Document.  Renamed collection types to use the preferred WebKit style. Replaced direct
2190         HTMLCollection creation with using accessors from Document in a few places.
2191
2192         * bindings/objc/DOMHTML.mm:
2193         (-[DOMHTMLElement children]):
2194         (-[DOMHTMLDocument images]):
2195         (-[DOMHTMLDocument applets]):
2196         (-[DOMHTMLDocument links]):
2197         (-[DOMHTMLDocument forms]):
2198         (-[DOMHTMLDocument anchors]):
2199         (-[DOMHTMLMapElement areas]):
2200         (-[DOMHTMLTableSectionElement rows]):
2201         (-[DOMHTMLTableElement rows]):
2202         (-[DOMHTMLTableElement tBodies]):
2203         (-[DOMHTMLTableRowElement cells]):
2204         * dom/Document.cpp:
2205         (WebCore::Document::images):
2206         (WebCore::Document::applets):
2207         (WebCore::Document::embeds):
2208         (WebCore::Document::objects):
2209         (WebCore::Document::scripts):
2210         (WebCore::Document::links):
2211         (WebCore::Document::forms):
2212         (WebCore::Document::anchors):
2213         (WebCore::Document::all):
2214         (WebCore::Document::windowNamedItems):
2215         (WebCore::Document::documentNamedItems):
2216         (WebCore::Document::nameCollectionInfo):
2217         * dom/Document.h:
2218         (WebCore::Document::collectionInfo):
2219         * html/HTMLCollection.cpp:
2220         (WebCore::HTMLCollection::HTMLCollection):
2221         (WebCore::HTMLCollection::traverseNextItem):
2222         (WebCore::HTMLCollection::checkForNameMatch):
2223         (WebCore::HTMLCollection::updateNameCache):
2224         * html/HTMLCollection.h:
2225         (WebCore::HTMLCollection::):
2226         * html/HTMLDocument.h:
2227         * html/HTMLElement.cpp:
2228         (WebCore::HTMLElement::children):
2229         * html/HTMLMapElement.cpp:
2230         (WebCore::HTMLMapElement::areas):
2231         * html/HTMLNameCollection.h:
2232         * html/HTMLNameCollection.cpp:
2233         (WebCore::HTMLNameCollection::HTMLNameCollection):
2234         (WebCore::HTMLNameCollection::traverseNextItem):
2235         * html/HTMLFormCollection.cpp:
2236         * html/HTMLOptionsCollection.cpp:
2237         (WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
2238         * html/HTMLSelectElement.h:
2239         (WebCore::HTMLSelectElement::collectionInfo):
2240         * html/HTMLTableElement.cpp:
2241         (WebCore::HTMLTableElement::rows):
2242         (WebCore::HTMLTableElement::tBodies):
2243         * html/HTMLTableRowElement.cpp:
2244         (WebCore::HTMLTableRowElement::cells):
2245         * html/HTMLTableSectionElement.cpp:
2246         (WebCore::HTMLTableSectionElement::rows):
2247         * kwq/WebCoreAXObject.mm:
2248         (-[WebCoreAXObject accessibilityAttributeValue:]):
2249         * page/Frame.cpp:
2250         (WebCore::Frame::gotoAnchor):
2251
2252 2006-06-24  Alexey Proskuryakov  <ap@nypop.com>
2253
2254         Reviewed by Darin.
2255
2256         - http://bugzilla.opendarwin.org/show_bug.cgi?id=9418
2257         WebKit will not build when Space exists in path
2258
2259         * WebCore.xcodeproj/project.pbxproj: Enclose search paths in quotes; create symlinks to 
2260         avoid passing paths with spaces to make.
2261
2262 2006-06-23  Tim Omernick  <timo@apple.com>
2263
2264         Reviewed by Tim Hatcher.
2265
2266         <rdar://problem/4560947> Leopard REGRESSION: Dragging to TileGame Widget is broken
2267
2268         * page/FrameView.cpp:
2269         (WebCore::FrameView::updateDragAndDrop):
2270         Use the passed mouse event, instead of the "current" event.  There is no such thing as
2271         a "drag event".  Asking for the current event during a drag returns a weird system-
2272         internal event with an invalid mouse location.
2273
2274 2006-06-23  Timothy Hatcher  <timothy@apple.com>
2275
2276         Reviewed by Eric.
2277
2278         Manual test added: cursor.html
2279
2280         Bug 9560: should support new CSS3 cursor types to get more resizing directions
2281         http://bugzilla.opendarwin.org/show_bug.cgi?id=9560
2282
2283         Adds support for ew-resize, ns-resize, nesw-resize, nwse-resize,
2284         col-resize and row-resize CSS3 cursor values.
2285
2286         Also converted some of the cursor images to grayscale tiffs,
2287         some were RGB but had no color data.
2288
2289         * Resources/eastResizeCursor.tiff:
2290         * Resources/eastWestResizeCursor.tiff: Added.
2291         * Resources/helpCursor.tiff:
2292         * Resources/moveCursor.tiff:
2293         * Resources/northEastResizeCursor.tiff:
2294         * Resources/northEastSouthWestResizeCursor.tiff: Added.
2295         * Resources/northResizeCursor.tiff:
2296         * Resources/northSouthResizeCursor.tiff: Added.
2297         * Resources/northWestResizeCursor.tiff:
2298         * Resources/northWestSouthEastResizeCursor.tiff: Added.
2299         * Resources/southEastResizeCursor.tiff:
2300         * Resources/southResizeCursor.tiff:
2301         * Resources/southWestResizeCursor.tiff:
2302         * Resources/textAreaResizeCorner.tiff:
2303         * Resources/waitCursor.tiff:
2304         * Resources/westResizeCursor.tiff:
2305         * WebCore.xcodeproj/project.pbxproj:
2306         * css/CSSComputedStyleDeclaration.cpp:
2307         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2308         * css/CSSValueKeywords.in:
2309         * css/cssparser.cpp:
2310         (WebCore::CSSParser::parseValue):
2311         * manual-tests/cursor.html: Added.
2312         * page/FrameView.cpp:
2313         (WebCore::selectCursor):
2314         * platform/Cursor.h:
2315         * platform/mac/CursorMac.mm:
2316         (WebCore::northSouthResizeCursor):
2317         (WebCore::eastWestResizeCursor):
2318         (WebCore::northEastSouthWestResizeCursor):
2319         (WebCore::northWestSouthEastResizeCursor):
2320         (WebCore::columnResizeCursor):
2321         (WebCore::rowResizeCursor):
2322         * platform/win/CursorWin.cpp:
2323         (WebCore::northSouthResizeCursor):
2324         (WebCore::eastWestResizeCursor):
2325         (WebCore::northEastSouthWestResizeCursor):
2326         (WebCore::northWestSouthEastResizeCursor):
2327         (WebCore::columnResizeCursor):
2328         (WebCore::rowResizeCursor):
2329         * rendering/render_style.h: cursor needs 5 bits now
2330
2331 2006-06-23  John Sullivan  <sullivan@apple.com>
2332
2333         Reviewed by Tim Omernick
2334         
2335         - fixed <rdar://problem/4597685> stale rects for document markers can be left behind in certain cases
2336
2337         * dom/Document.h:
2338         * dom/Document.cpp:
2339         (WebCore::Document::setRenderedRectForMarker):
2340         changed parameter from IntRect to const IntRect& at Darin's request
2341         (WebCore::Document::invalidateRenderedRectsForMarkersInRect):
2342         new method, tests whether the rendered rect for each marker intersects the
2343         passed rect. If so, sets the rendered rect back to the placeholder rect that
2344         means that the rect for this marker isn't known.
2345         
2346         * page/Frame.cpp:
2347         (WebCore::Frame::paint):
2348         call invalidateRenderedRectsForMarkersInRect on the rect we're about to paint.
2349         This ensures that old stale rects won't be preserved if the associated marker
2350         has moved such that it is out of the painted area.
2351
2352 2006-06-23  Justin Garcia  <justin.garcia@apple.com>
2353
2354         Reviewed by levi
2355
2356         <rdar://problem/4527702>
2357         REGRESSION: Quote bars go away on first paragraph when I delete reply text
2358
2359         * editing/DeleteSelectionCommand.cpp:
2360         (WebCore::DeleteSelectionCommand::mergeParagraphs):
2361         Add a rule for when to merge into empty blocks.
2362
2363 === WebCore-521.13 ===
2364
2365 2006-06-23  Patrick Beard  <beard@apple.com>
2366
2367         Reviewed by Tim Hatcher.
2368
2369         <rdar://problem/4223619> Safari crashed in -[NSFont __isSystemFont]
2370         CFRetain and CFRelease NSFont's when FontPlatformData has a reference.
2371         We only do this when GC is enabled for performance reasons.
2372         No tests possible.
2373
2374         * platform/mac/FontPlatformData.h:
2375         (WebCore::FontPlatformData::FontPlatformData):
2376         (WebCore::FontPlatformData::~FontPlatformData):
2377
2378 2006-06-23  Justin Garcia  <justin.garcia@apple.com>
2379
2380         Reviewed by levi
2381         
2382         <http://bugzilla.opendarwin.org/show_bug.cgi?id=8074>
2383         Caret before/after block tables is too small
2384         <rdar://problem/4598331>
2385         right arrow out of a table shows cursor in a weird place
2386
2387         * rendering/RenderBox.cpp:
2388         (WebCore::RenderBox::caretRect): Don't propagate to children, 
2389         VisiblePositions inside containers don't refer to children.
2390         Don't use the font height for tables.
2391
2392 2006-06-23  Brady Eidson  <beidson@apple.com>
2393
2394         Reviewed by Kevin.
2395
2396         Added 64-bit String::number() functions
2397
2398         * platform/PlatformString.h:
2399         * platform/String.cpp:
2400         (WebCore::String::number):
2401
2402 2006-06-22  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2403
2404         Reviewed by Hyatt.
2405
2406         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9497
2407           REGRESSION: Incomplete repainting when scrolling thumbnails on Flickr
2408
2409         Test: fast/repaint/clipped-relative.html
2410
2411         * page/FrameView.cpp:
2412         (WebCore::FrameView::layout):
2413         * rendering/RenderBlock.cpp:
2414         (WebCore::RenderBlock::removePositionedObjects): Removed call to computeRepaintRects().
2415         Previously, it was needed to update the cached rects before RenderBox::setStyle()
2416         called updateLayerPositions().
2417         * rendering/RenderBox.cpp:
2418         (WebCore::RenderBox::setStyle): Changed to call updateLayerPositions() for a newly-
2419         created layer only if it does not need layout. Otherwise,  updateLayerPositions() will
2420         be called after layout. This saves a repaint in some cases.
2421         * rendering/RenderLayer.cpp:
2422         (WebCore::RenderLayer::checkForRepaintOnResize): Renamed computeRepaintRects() to
2423         this and deleted the code that cached the absolute position and repaint rects.
2424         (WebCore::RenderLayer::updateLayerPositions): Added code to cache the absolute
2425         position and repaint rects right after updating the layer's position.
2426         * rendering/RenderLayer.h:
2427
2428 2006-06-22  Beth Dakin  <bdakin@apple.com>
2429
2430         Reviewed by Maciej.
2431
2432         Fix for <rdar://problem/4599015> REGRESSION: Hand on clock widget 
2433         don't appear at all
2434
2435         This regression was caused by <rdar://problem/4567520> HIDPI: pixel 
2436         cracks in weather widget at 1.83 scaling
2437
2438         * html/CanvasRenderingContext2D.cpp:
2439         (WebCore::CanvasRenderingContext2D::drawImage): Do the contains 
2440         check before rounding to integral device pixels.
2441
2442 2006-06-22  Anders Carlsson  <acarlsson@apple.com>
2443
2444         Reviewed by John.
2445
2446         <rdar://problem/4529334> REGRESSION: Can't configure RadarInMotion widget for U.S. locations on Leopard (Javascript errors)
2447         
2448         * dom/Document.cpp:
2449         (WebCore::Document::completeURL):
2450         Check if both the URL and base URL are empty instead of using URL() which returns "about:blank" if the URL is empty.
2451         
2452 2006-06-22  Anders Carlsson  <acarlsson@apple.com>
2453
2454         Reviewed by Maciej.
2455
2456         <rdar://problem/4499675> Package Tracker widget always crashes in WebCore::Frame::jScriptEnabled() const + 0
2457
2458         * html/HTMLParser.cpp:
2459         (WebCore::HTMLParser::noscriptCreateErrorCheck):
2460         (WebCore::HTMLParser::canvasCreateErrorCheck):
2461         (WebCore::HTMLParser::isInline):
2462         Add null-checks for document->frame() since it can be 0 for documents created using createHTMLDocument.
2463
2464 2006-06-22  Anders Carlsson  <acarlsson@apple.com>
2465
2466         Reviewed by Maciej.
2467
2468         <rdar://problem/4524840> Entities contained in DOCTYPE referenced DTD in XSLT source document are unknown
2469         
2470         * dom/xml_tokenizer.cpp:
2471         (WebCore::shouldAllowExternalLoad):
2472         Use correct path for the catalog.
2473         
2474         (WebCore::errorFunc):
2475         Add error function to keep parser errors from going to the console.
2476         
2477         (WebCore::XMLTokenizer::write):
2478         Remove if (0 &&)
2479         
2480         (WebCore::XMLTokenizer::end):
2481         Pass DocLoader to xmlDocPtrForString.
2482         
2483         (WebCore::xmlDocPtrForString):        
2484         * dom/xml_tokenizer.h:
2485         Add DocLoader argument to xmlDocPtrForString so external DTDs and entities can be loaded.
2486         
2487         * xml/XSLTProcessor.cpp:
2488         (WebCore::xmlDocPtrFromNode):
2489         Pass DocLoader to xmlDocPtrForString
2490         
2491 2006-06-21  David Hyatt  <hyatt@apple.com>
2492
2493         Back out -webkit-overlay and just rename it back to overlay.
2494
2495         Reviewed by darin
2496
2497         * css/CSSComputedStyleDeclaration.cpp:
2498         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2499         * css/CSSValueKeywords.in:
2500         * css/cssparser.cpp:
2501         (WebCore::CSSParser::parseValue):
2502         * css/cssstyleselector.cpp:
2503         (WebCore::CSSStyleSelector::applyProperty):
2504
2505 2006-06-21  Justin Garcia  <justin.garcia@apple.com>
2506
2507         Reviewed by levi
2508
2509         * editing/DeleteSelectionCommand.cpp:
2510         (WebCore::DeleteSelectionCommand::initializePositionData): Fix a bug in the code
2511         to stop merges across table cells.
2512         (WebCore::DeleteSelectionCommand::mergeParagraphs): Move the code to stop merges
2513         across table cells to initializePositionData so that its changes to 
2514         m_mergeBlocksAfterDelete can take effect on the endingPosition.
2515         * editing/InsertParagraphSeparatorCommand.cpp:
2516         (WebCore::InsertParagraphSeparatorCommand::doApply): Turn into an InsertLineBreak
2517         instead of splitting/cloning a table cell.
2518
2519 2006-06-21  Beth Dakin  <bdakin@apple.com>
2520
2521         Reviewed by John.
2522
2523         Fix for <rdar://problem/3914965> Misspelled text underline doesn't 
2524         look right at non-standard scale factors
2525
2526         * platform/mac/GraphicsContextMac.mm:
2527         (WebCore::GraphicsContext::drawLineForMisspelling): We need to call  
2528         into our previously-created SPI for pattern-drawing so that the 
2529         phase is right at all scale factors.
2530
2531 2006-06-21  David Hyatt  <hyatt@apple.com>
2532
2533         Fix for 7362, implement the CSS3 overflow-x and overflow-y properties.
2534
2535         Reviewed by adele
2536
2537         * WebCore.xcodeproj/project.pbxproj:
2538         * css/CSSComputedStyleDeclaration.cpp:
2539         (WebCore::):
2540         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2541         * css/CSSPropertyNames.in:
2542         * css/cssparser.cpp:
2543         (WebCore::CSSParser::parseValue):
2544         * css/cssstyleselector.cpp:
2545         (WebCore::CSSStyleSelector::adjustRenderStyle):
2546         (WebCore::CSSStyleSelector::applyProperty):
2547         * page/FrameView.cpp:
2548         (WebCore::FrameView::applyOverflowToViewport):
2549         (WebCore::FrameView::layout):
2550         * rendering/RenderBlock.cpp:
2551         (WebCore::RenderBlock::layoutBlock):
2552         (WebCore::RenderBlock::determineHorizontalPosition):
2553         (WebCore::RenderBlock::layoutBlockChildren):
2554         (WebCore::RenderBlock::rightOffset):
2555         (WebCore::RenderBlock::rightmostPosition):
2556         (WebCore::RenderBlock::calcMinMaxWidth):
2557         * rendering/RenderBox.cpp:
2558         (WebCore::RenderBox::setStyle):
2559         (WebCore::RenderBox::contentWidth):
2560         (WebCore::RenderBox::contentHeight):
2561         (WebCore::RenderBox::sizesToIntrinsicWidth):
2562         (WebCore::RenderBox::calcHeight):
2563         (WebCore::RenderBox::calcPercentageHeight):
2564         * rendering/RenderFlexibleBox.cpp:
2565         (WebCore::RenderFlexibleBox::layoutBlock):
2566         * rendering/RenderLayer.cpp:
2567         (WebCore::RenderLayer::scrollToOffset):
2568         (WebCore::RenderLayer::shouldAutoscroll):
2569         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
2570         (WebCore::RenderLayer::styleChanged):
2571         * rendering/RenderLayer.h:
2572         * rendering/RenderObject.cpp:
2573         (WebCore::RenderObject::clientWidth):
2574         (WebCore::RenderObject::clientHeight):
2575         * rendering/RenderObject.h:
2576         (WebCore::RenderObject::hasAutoVerticalScrollbar):
2577         (WebCore::RenderObject::hasAutoHorizontalScrollbar):
2578         (WebCore::RenderObject::scrollsOverflow):
2579         (WebCore::RenderObject::scrollsOverflowX):
2580         (WebCore::RenderObject::scrollsOverflowY):
2581         (WebCore::RenderObject::includeVerticalScrollbarSize):
2582         (WebCore::RenderObject::includeHorizontalScrollbarSize):
2583         * rendering/RenderTextArea.cpp:
2584         (WebCore::RenderTextArea::setStyle):
2585         * rendering/RenderTextField.cpp:
2586         (WebCore::RenderTextField::createDivStyle):
2587         (WebCore::RenderTextField::calcHeight):
2588         (WebCore::RenderTextField::calcMinMaxWidth):
2589         * rendering/bidi.cpp:
2590         (WebCore::RenderBlock::layoutInlineChildren):
2591         * rendering/render_style.cpp:
2592         (WebCore::RenderStyle::diff):
2593         * rendering/render_style.h:
2594         (WebCore::):
2595         (WebCore::RenderStyle::NonInheritedFlags::operator==):
2596         (WebCore::RenderStyle::setBitDefaults):
2597         (WebCore::RenderStyle::overflowX):
2598         (WebCore::RenderStyle::overflowY):
2599         (WebCore::RenderStyle::setOverflowX):
2600         (WebCore::RenderStyle::setOverflowY):
2601         (WebCore::RenderStyle::initialOverflowX):
2602         (WebCore::RenderStyle::initialOverflowY):
2603
2604 2006-06-21  Justin Garcia  <justin.garcia@apple.com>
2605
2606         Reviewed by levi
2607         
2608         <rdar://problem/4590366>
2609         REGRESSION: Selection incorrectly paints gaps on TOT
2610
2611         * dom/Document.cpp:
2612         (WebCore::Document::updateSelection): Use the leftmost candidate for the end of the
2613         selection and the rightmost candidate for the start of the selection.
2614         * dom/Position.cpp:
2615         (WebCore::Position::upstream): Cross line wraps so that we can use upstream/downstream
2616         to get to candidates before/after linewraps.
2617         (WebCore::Position::downstream):
2618         (WebCore::Position::inRenderedContent):
2619         * editing/DeleteSelectionCommand.cpp:
2620         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
2621         (WebCore::DeleteSelectionCommand::mergeParagraphs):
2622         * editing/InsertParagraphSeparatorCommand.cpp:
2623         (WebCore::InsertParagraphSeparatorCommand::doApply): 
2624         Ensure that the leftmost candidate is used.  We should sample the style from that one.
2625         When the block to insert is after a br, a br should be inserted even in strict mode.
2626         * editing/InsertTextCommand.cpp:
2627         (WebCore::InsertTextCommand::input): 
2628         Insert at the leftmost candidate, get rid of a use of trailingWhitespacePosition.
2629         Don't apply a style if its unnecessary.
2630         * editing/ReplaceSelectionCommand.cpp:
2631         (WebCore::ReplaceSelectionCommand::doApply): "pos" can be invalidated, don't use it.
2632         * editing/VisiblePosition.cpp:
2633         Renamed initDeepPosition and made it return the canonical position.
2634         (WebCore::VisiblePosition::init):
2635         (WebCore::VisiblePosition::canonicalPosition):
2636         * editing/VisiblePosition.h: 
2637         (WebCore::VisiblePosition::characterBefore): Added.
2638         * editing/visible_units.cpp:
2639         (WebCore::startOfParagraph):
2640         * rendering/InlineTextBox.cpp:
2641         (WebCore::InlineTextBox::selectionState): When a selection ends at a line wrap, it shouldn't extend
2642         onto the next line.
2643
2644 2006-06-21  David Hyatt  <hyatt@apple.com>
2645
2646         Reviewed and committed by Beth.
2647
2648         Fix for <rdar://problem/4595337> Resizing a containing block 
2649         strictly vertically does not cause contained height:100% element to 
2650         also be resized.
2651
2652         * rendering/RenderBlock.cpp:
2653         (WebCore::RenderBlock::layoutBlockChildren): Also layout if the 
2654         child's min or max height is a percent.
2655
2656 2006-06-21  Anders Carlsson  <acarlsson@apple.com>
2657
2658         Reviewed by Geoff.
2659
2660         http://bugzilla.opendarwin.org/show_bug.cgi?id=6058
2661         XMLTokenizer runs all <script> tags at once instead of as they're encountered
2662         
2663         * dom/xml_tokenizer.cpp:
2664         (WebCore::XMLTokenizer::XMLTokenizer):
2665         Initialize new members.
2666         
2667         (WebCore::XMLTokenizer::endElementNs):
2668         If we've encountered a script tag, execute the script here. If the script
2669         tag refers to an external resource, pause the parser while loading it.
2670         
2671         (WebCore::XMLTokenizer::end):
2672         Move code from finish() to here
2673         
2674         (WebCore::XMLTokenizer::finish):
2675         Only call end() if the parser isn't paused.
2676         
2677         (WebCore::XMLTokenizer::notifyFinished):
2678         Evaluate the script here and resume the parser.
2679         
2680         (WebCore::XMLTokenizer::resumeParsing):
2681         If finish() was called, call end() after writing all data.
2682
2683 2006-06-21  Steve Falkenburg  <sfalken@apple.com>
2684
2685         Fix build break
2686
2687         * platform/win/TemporaryLinkStubs.cpp:
2688         (FrameWin::shouldInterruptJavaScript):
2689
2690 2006-06-21  Anders Carlsson  <acarlsson@apple.com>
2691
2692         Move FrameWin::shouldInterruptJavaScript to TemporaryLinkStubs.cpp
2693         
2694         * bridge/win/FrameWin.cpp:
2695         * platform/win/TemporaryLinkStubs.cpp:
2696         (FrameWin::shouldInterruptJavaScript):
2697
2698 2006-06-21  Ben Goodger <bengoodger@gmail.com>
2699
2700         Reviewed by Maciej. 
2701
2702         Fix for: http://bugzilla.opendarwin.org/show_bug.cgi?id=9523
2703         More Win32 build bustage.
2704  
2705         * WebCore.vcproj/WebCore/WebCore.vcproj:
2706         * bridge/win/FrameWin.cpp:
2707         (WebCore::FrameWin::shouldInterruptJavaScript):
2708         * bridge/win/FrameWin.h:
2709
2710 2006-06-20  Adele Peterson  <adele@apple.com>
2711
2712         Reviewed by Anders.
2713
2714         Fix for: http://bugzilla.opendarwin.org/show_bug.cgi?id=8948
2715         Switch to use new text field implementation for <textarea>
2716
2717         * css/html4.css:
2718         * html/HTMLTextAreaElement.cpp:
2719         (WebCore::HTMLTextAreaElement::selectionStart):
2720         (WebCore::HTMLTextAreaElement::selectionEnd):
2721         (WebCore::HTMLTextAreaElement::setSelectionStart):
2722         (WebCore::HTMLTextAreaElement::setSelectionEnd):
2723         (WebCore::HTMLTextAreaElement::select):
2724         (WebCore::HTMLTextAreaElement::setSelectionRange):
2725         (WebCore::HTMLTextAreaElement::createRenderer):
2726         (WebCore::HTMLTextAreaElement::appendFormData):
2727         (WebCore::HTMLTextAreaElement::isKeyboardFocusable):
2728         (WebCore::HTMLTextAreaElement::isMouseFocusable):
2729         (WebCore::HTMLTextAreaElement::focus):
2730         (WebCore::HTMLTextAreaElement::defaultEventHandler):
2731         (WebCore::HTMLTextAreaElement::updateValue):
2732         (WebCore::HTMLTextAreaElement::setValue):
2733
2734 2006-06-20  Brady Eidson  <beidson@apple.com>
2735
2736         Reviewed by Maciej
2737
2738         Fixed capitalization mistake that I made, someone else fixed, then I accidentally made it go back to the old way
2739
2740         * icon/SQLStatement.cpp:
2741
2742 2006-06-20  Brady Eidson  <beidson@apple.com>
2743
2744         Reviewed by Maciej.
2745
2746         More changes/additions setting the stage for the major IconDatabase hookup.
2747
2748         * WebCore.xcodeproj/project.pbxproj:  Added SQLTransaction.cpp
2749
2750         * bridge/mac/WebCoreIconDatabaseBridge.h: Added call-throughs and translations to pass WebKit DB to WebCore DB
2751         * bridge/mac/WebCoreIconDatabaseBridge.mm:
2752         (+[WebCoreIconDatabaseBridge sharedBridgeInstance]):
2753         (-[WebCoreIconDatabaseBridge setPrivateBrowsingEnabled:]):
2754         (-[WebCoreIconDatabaseBridge iconForURL:withSize:]):
2755         (-[WebCoreIconDatabaseBridge iconURLForURL:]):
2756         (-[WebCoreIconDatabaseBridge defaultIconWithSize:]):
2757         (-[WebCoreIconDatabaseBridge retainIconForURL:]):
2758         (-[WebCoreIconDatabaseBridge releaseIconForURL:]):
2759         (-[WebCoreIconDatabaseBridge _setIconData:forIconURL:]):
2760         (-[WebCoreIconDatabaseBridge _setHaveNoIconForIconURL:]):
2761         (-[WebCoreIconDatabaseBridge _setIconURL:forURL:]):
2762         (-[WebCoreIconDatabaseBridge _hasIconForIconURL:]):
2763
2764         * bridge/mac/WebCorePageBridge.mm: Added WebCore's IconDatabase logging channel to the user-prefs check
2765         (initializeLoggingChannelsIfNecessary):
2766
2767         * icon/IconDatabase.cpp:  Added stubs and basic SQL usage to create the sqlite DB and respond to WebKit calls
2768         (WebCore::IconDatabase::IconDatabase):
2769         (WebCore::IconDatabase::open):
2770         (WebCore::IconDatabase::close):
2771         (WebCore::IconDatabase::isValidDatabase):
2772         (WebCore::IconDatabase::recreateDatabase):
2773         (WebCore::IconDatabase::setPrivateBrowsingEnabled):
2774         (WebCore::IconDatabase::iconForURL):
2775         (WebCore::IconDatabase::iconURLForURL):
2776         (WebCore::IconDatabase::defaultIcon):
2777         (WebCore::IconDatabase::retainIconForURL):
2778         (WebCore::IconDatabase::releaseIconForURL):
2779         (WebCore::IconDatabase::setIconForIconURL):
2780         (WebCore::IconDatabase::setHaveNoIconForIconURL):
2781         (WebCore::IconDatabase::setIconURLForPageURL):
2782         (WebCore::IconDatabase::hasIconForIconURL):
2783
2784         * icon/IconDatabase.h:  WebIcon will be an internal class used in IconDatabase but is not complete yet
2785         (WebCore::WebIcon::getExpiration):
2786         (WebCore::WebIcon::getTouch):
2787
2788         * icon/SQLDatabase.cpp:  Added more SQLite convenience methods
2789         (SQLDatabase::setFullsync):
2790         (SQLDatabase::setBusyTimeout):
2791         (SQLDatabase::setBusyHandler):
2792         * icon/SQLDatabase.h:
2793         * icon/SQLStatement.cpp:
2794         (WebCore::SQLStatement::returnsAtLeastOneResult):
2795
2796         * icon/SQLTransaction.cpp: Added basic commit/rollback support with this simple class
2797         (SQLTransaction::SQLTransaction):
2798         (SQLTransaction::~SQLTransaction):
2799         (SQLTransaction::begin):
2800         (SQLTransaction::commit):
2801         (SQLTransaction::rollback):
2802
2803 2006-06-20  Adele Peterson  <adele@apple.com>
2804
2805         Reviewed by Maciej.
2806
2807         Fixes for:
2808         http://bugzilla.opendarwin.org/show_bug.cgi?id=8724
2809         REGRESSION: onSelect handler doesn't work for text fields
2810
2811         http://bugzilla.opendarwin.org/show_bug.cgi?id=7676
2812         REGRESSION: Selection methods on new text fields don't work if text field is hidden
2813
2814         http://bugzilla.opendarwin.org/show_bug.cgi?id=8867
2815         REGRESSION: selectionStart/End return 0 for input element once it no longer has focus
2816
2817         Implemented onSelect for new text fields and textareas.  Also fixed selection restore
2818         behavior to better match other browsers and Safari 2.0 behavior.
2819
2820         Tests:
2821         * fast/forms/input-selection-restore.html
2822         * fast/forms/input-selection-hidden.html
2823         * fast/forms/onselect-textarea.html
2824         * fast/forms/onselect-textfield.html
2825
2826         * html/HTMLInputElement.h: (WebCore::HTMLInputElement::cacheSelection): Added.
2827         * html/HTMLInputElement.cpp:
2828         (WebCore::HTMLInputElement::init): Initializes cached selection.
2829         (WebCore::HTMLInputElement::selectionStart): If this element doesn't have focus, return the cached selection value.
2830         (WebCore::HTMLInputElement::selectionEnd): ditto.
2831         (WebCore::HTMLInputElement::setValue): Restore a caret at the starting point of the old selection.  Matches Safari 2.0 behavior.
2832
2833         * html/HTMLTextAreaElement.h: (WebCore::HTMLTextAreaElement::cacheSelection): Added.
2834         * html/HTMLTextAreaElement.cpp:
2835         (WebCore::HTMLTextAreaElement::HTMLTextAreaElement): Initializes cached selection.
2836         (WebCore::HTMLTextAreaElement::selectionStart): If this element doesn't have focus, return the cached selection value.
2837         (WebCore::HTMLTextAreaElement::selectionEnd): ditto.
2838         (WebCore::HTMLTextAreaElement::focus): If this is the first focus, set a caret at the end of the text.  Otherwise,
2839         restore the cached selection.  This matches other browsers' behavior.
2840         (WebCore::HTMLTextAreaElement::setValue): Restore a caret at the starting point of the old selection.  Matches Safari 2.0 behavior.
2841
2842         * page/Frame.h: Added notifyRendererOfSelectionChange method. 
2843         * page/Frame.cpp:
2844         (WebCore::Frame::notifyRendererOfSelectionChange): Added.  Calls selectionChanged for text fields and textareas.  Forwards a userTriggered
2845         argument so selectionChanged knows whether or not to fire onSelect.
2846         (WebCore::Frame::setSelection): Calls notifyRendererOfSelectionChange(false).  This gets called for all selection changes, so the renderer
2847         can always update its cached selection values.
2848         (WebCore::Frame::handleMouseReleaseEvent): Calls notifyRendererOfSelectionChange(true) so onSelect will get fired when the user is done
2849         making a selection with the mouse.
2850         * bridge/mac/WebCoreFrameBridge.mm:
2851         (-[WebCoreFrameBridge alterCurrentSelection:direction:granularity:]): Calls notifyRendererOfSelectionChange(true) so onSelect gets
2852         fired when the user makes a selection with the keyboard.
2853         (-[WebCoreFrameBridge alterCurrentSelection:verticalDistance:]): ditto.
2854
2855         * rendering/RenderTextField.h: Add userTriggered parameter to selectionChanged.
2856         * rendering/RenderTextField.cpp:
2857         (WebCore::RenderTextField::setSelectionRange): For visibility:hidden, cache the selection and 
2858         return early since we won't be able to actually set the selection.
2859         (WebCore::RenderTextField::selectionChanged): Caches the selection.  
2860         If the selection is a range, and its triggered by user action, then fire the onSelect event.
2861
2862 2006-06-21  Anders Carlsson  <acarlsson@apple.com>
2863
2864         * bridge/win/FrameWin.cpp:
2865         (WebCore::shouldInterruptJavaScript):
2866         * bridge/win/FrameWin.h:
2867         Try fixing the Windows build.
2868
2869 2006-06-20  Adele Peterson  <adele@apple.com>
2870
2871         RS by Tim Hatcher.
2872
2873         Renamed RenderSelect to DeprecatedRenderSelect to prepare for new popup menu and list menu implementations.
2874        
2875         * WebCore.xcodeproj/project.pbxproj:
2876         * html/HTMLOptionElement.h:
2877         * html/HTMLSelectElement.cpp:
2878         (WebCore::HTMLSelectElement::recalcStyle):
2879         (WebCore::HTMLSelectElement::createRenderer):
2880         (WebCore::HTMLSelectElement::setRecalcListItems):
2881         (WebCore::HTMLSelectElement::reset):
2882         (WebCore::HTMLSelectElement::notifyOptionSelected):
2883         * html/HTMLSelectElement.h:
2884         * rendering/DeprecatedRenderSelect.cpp: Added.
2885         (WebCore::DeprecatedRenderSelect::DeprecatedRenderSelect):
2886         (WebCore::DeprecatedRenderSelect::setWidgetWritingDirection):
2887         (WebCore::DeprecatedRenderSelect::setStyle):
2888         (WebCore::DeprecatedRenderSelect::updateFromElement):
2889         (WebCore::DeprecatedRenderSelect::baselinePosition):
2890         (WebCore::DeprecatedRenderSelect::calcMinMaxWidth):
2891         (WebCore::DeprecatedRenderSelect::layout):
2892         (WebCore::DeprecatedRenderSelect::valueChanged):
2893         (WebCore::DeprecatedRenderSelect::selectionChanged):
2894         (WebCore::DeprecatedRenderSelect::setOptionsChanged):
2895         (WebCore::DeprecatedRenderSelect::createListBox):
2896         (WebCore::DeprecatedRenderSelect::updateSelection):
2897         * rendering/DeprecatedRenderSelect.h: Added.
2898         (WebCore::DeprecatedRenderSelect::renderName):
2899         * rendering/RenderSelect.cpp: Removed.
2900         * rendering/RenderSelect.h: Removed.
2901
2902 2006-06-20  Anders Carlsson  <acarlsson@apple.com>
2903
2904         Reviewed by Geoff.
2905
2906         http://bugzilla.opendarwin.org/show_bug.cgi?id=9509
2907         Would like a way to pause/resume XML parsing
2908
2909         * dom/xml_tokenizer.cpp:
2910         (WebCore::PendingCallbacks::PendingCallbacks):
2911         (WebCore::PendingCallbacks::appendStartElementNSCallback):
2912         (WebCore::PendingCallbacks::appendEndElementNSCallback):
2913         (WebCore::PendingCallbacks::appendCharactersCallback):
2914         (WebCore::PendingCallbacks::appendProcessingInstructionCallback):
2915         (WebCore::PendingCallbacks::appendCDATABlockCallback):
2916         (WebCore::PendingCallbacks::appendCommentCallback):
2917         (WebCore::PendingCallbacks::appendInternalSubsetCallback):
2918         (WebCore::PendingCallbacks::appendErrorCallback):
2919         (WebCore::PendingCallbacks::callAndRemoveFirstCallback):
2920         (WebCore::PendingCallbacks::isEmpty):
2921         (WebCore::PendingCallbacks::PendingCallback::~PendingCallback):
2922         (WebCore::PendingCallbacks::PendingStartElementNSCallback::~PendingStartElementNSCallback):
2923         (WebCore::PendingCallbacks::PendingStartElementNSCallback::call):
2924         (WebCore::PendingCallbacks::PendingEndElementNSCallback::call):
2925         (WebCore::PendingCallbacks::PendingCharactersCallback::~PendingCharactersCallback):
2926         (WebCore::PendingCallbacks::PendingCharactersCallback::call):
2927         (WebCore::PendingCallbacks::PendingProcessingInstructionCallback::~PendingProcessingInstructionCallback):
2928         (WebCore::PendingCallbacks::PendingProcessingInstructionCallback::call):
2929         (WebCore::PendingCallbacks::PendingCDATABlockCallback::~PendingCDATABlockCallback):
2930         (WebCore::PendingCallbacks::PendingCDATABlockCallback::call):
2931         (WebCore::PendingCallbacks::PendingCommentCallback::~PendingCommentCallback):
2932         (WebCore::PendingCallbacks::PendingCommentCallback::call):
2933         (WebCore::PendingCallbacks::PendingInternalSubsetCallback::~PendingInternalSubsetCallback):
2934         (WebCore::PendingCallbacks::PendingInternalSubsetCallback::call):
2935         (WebCore::PendingCallbacks::):
2936         New classes which manage a list of pending SAX callbacks that have not yet
2937         been sent to the tokenizer.
2938         
2939         (WebCore::XMLTokenizer::XMLTokenizer):
2940         Initialize new member variables.
2941         
2942         (WebCore::XMLTokenizer::~XMLTokenizer):
2943         Delete PendingCallbacks object.
2944         
2945         (WebCore::XMLTokenizer::write):
2946         If the parser is paused, queue the data to be written.
2947         
2948         (WebCore::XMLTokenizer::startElementNs):
2949         (WebCore::XMLTokenizer::endElementNs):
2950         (WebCore::XMLTokenizer::characters):
2951         (WebCore::XMLTokenizer::error):
2952         (WebCore::XMLTokenizer::processingInstruction):
2953         (WebCore::XMLTokenizer::cdataBlock):
2954         (WebCore::XMLTokenizer::comment):
2955         (WebCore::XMLTokenizer::internalSubset):
2956         If the parser has been paused, queue the callbacks instead.
2957
2958         (WebCore::XMLTokenizer::handleError):
2959         New function, called by both ::error and :PendingCallbacks::callAndRemoveFirstCallback
2960         
2961         (WebCore::XMLTokenizer::finish):
2962         (WebCore::XMLTokenizer::pauseParsing):
2963          Set m_parserPaused to true.
2964         
2965         (WebCore::XMLTokenizer::resumeParsing):
2966         Call the pending callbacks and then parse the pending source.
2967         
2968 2006-06-20  David Hyatt  <hyatt@apple.com>
2969
2970         Don't send the custom highlighter callback when painting is disabled.
2971
2972         Reviewed by harrison
2973
2974         * WebCore.xcodeproj/project.pbxproj:
2975         * rendering/InlineTextBox.cpp:
2976         (WebCore::InlineTextBox::paint):
2977
2978 2006-06-20  Anders Carlsson  <acarlsson@apple.com>
2979
2980         Reviewed by John
2981
2982         <rdar://problem/4592244> REGRESSION (417.9.3 - 420+): (some?) plain text files have all lines concatenated into one line
2983         
2984         * loader/TextDocument.cpp:
2985         (WebCore::TextTokenizer::checkBuffer):
2986         (WebCore::TextTokenizer::TextTokenizer):
2987         (WebCore::TextTokenizer::write):        
2988         (WebCore::TextTokenizer::finish):
2989         Add a text buffer which is used for translation of CR and CRLF to plain LF, 
2990         like the HTML tokenizer does.
2991
2992 2006-06-20  Maciej Stachowiak  <mjs@apple.com>
2993
2994         Reviewed by Eric.
2995
2996         - fix crasher on one of the layout tests caused by my recent checkin
2997
2998         * kcanvas/RenderSVGText.cpp:
2999         (WebCore::RenderSVGText::paint):
3000
3001 2006-06-19  Alexey Proskuryakov  <ap@nypop.com>
3002
3003         Reviewed by Darin.
3004
3005         - http://bugzilla.opendarwin.org/show_bug.cgi?id=5499
3006         Page reload does not send any cache control headers
3007
3008         Test: http/tests/misc/refresh-headers.php
3009
3010         * bindings/js/kjs_window.cpp:
3011         (KJS::LocationFunc::callAsFunction): Call scheduleRefresh() for Location::Reload.
3012
3013         * page/Frame.h: Add scheduleRefresh(). Don't derive from TransferJob or implement its methods - that was
3014         used only for storing response HTTP headers, which was an overkill.
3015
3016         * page/FramePrivate.h: Replace TransferJob with a HashMap for storing response headers.
3017
3018         * page/Frame.cpp:
3019         (WebCore::Frame::didOpenURL): Don't needlessly change d->m_cachePolicy. Don't create a TransferJob.
3020         (WebCore::Frame::stopLoading): Directly access the metadata map, instead of going through a TransferJob.
3021         (WebCore::Frame::receivedFirstData): Ditto.
3022         (WebCore::Frame::addMetaData): Ditto.
3023         (WebCore::Frame::scheduleRefresh): A new function that schedules a refresh, similarly to what
3024         scheduleRedirection() does.
3025         (WebCore::Frame::changeLocation): Set request.reload attribute based on the current cache policy.
3026
3027 2006-06-19  Ben Goodger  <bengoodger@gmail.com>
3028
3029         Reviewed by Darin.
3030
3031         http://bugzilla.opendarwin.org/show_bug.cgi?id=9501
3032         Windows build fails with link error CharsetTable not defined
3033
3034         * platform/make-charset-table.pl:
3035         (process_iana_charsets): Move test for equality to alias "None" until after
3036         normalization steps to ensure escape characters in the input data don't
3037         interfere with processing.  Convert nearby tabs to 4 spaces in this function.
3038
3039 2006-06-18  Maciej Stachowiak  <mjs@apple.com>
3040
3041         Reviewed by Darin.
3042
3043         - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=9488
3044         "Animated GIFs do not respect transforms in SVG"
3045         
3046         http://bugzilla.opendarwin.org/show_bug.cgi?id=6946
3047         "SVG shows invalidation issues in WebKit"
3048         
3049         http://www.treebuilder.de/default.asp?file=441875.xml
3050         "Invalidation issues with "SVG 3d" demo"
3051         
3052         http://code.google.com/webstats/2005-12/pages.html
3053         "SVG text doesn't repaint correctly"
3054
3055         * kcanvas/KCanvasContainer.cpp:
3056         (WebCore::KCanvasContainer::computeAbsoluteRepaintRect): Override base class, and apply
3057         appropriate transforms, so damage rects in transformed SVG content get propagated up properly.
3058         (WebCore::KCanvasContainer::getAbsoluteRepaintRect): note a FIXME; this method
3059         seems wrong.
3060         * kcanvas/KCanvasContainer.h: Prototype new method.
3061
3062         * css/svg.css: Don't apply overflow:hidden to foreignObject, since that makes it a RenderLayer
3063         so it paints twice.
3064         * kcanvas/RenderForeignObject.cpp:
3065         (WebCore::RenderForeignObject::paint): Transform the damage rect before passing it down to HTML content,
3066         so everything paints that is supposed to. Also handle opacity here since we won't get layers.
3067         (WebCore::RenderForeignObject::computeAbsoluteRepaintRect): Override base class, and apply
3068         appropriate transforms, so damage rects in HTML embedded in SVG get propagated up properly.
3069         (WebCore::RenderForeignObject::requiresLayer): Never use a RenderLayer.
3070         (WebCore::RenderForeignObject::layout): Make sure to dirty our previous bounds when layout
3071         changes, as by transform.
3072         * kcanvas/RenderForeignObject.h:
3073
3074         * kcanvas/RenderSVGImage.cpp:
3075         (WebCore::RenderSVGImage::paint): Transform the damage rect when painting. Also handle opacity 
3076         here since we won't get layers.
3077         (WebCore::RenderForeignObject::computeAbsoluteRepaintRect): Override base class, and apply
3078         appropriate transforms, so damage rects in SVG images  get propagated up properly.
3079         (WebCore::RenderSVGImage::translationForAttributes): New helper method, factored out of below.
3080         (WebCore::RenderSVGImage::translateForAttributes): Use above.
3081         (WebCore::RenderSVGImage::requiresLayer): Never use a RenderLayer.
3082         (WebCore::RenderSVGImage::layout): Make sure to properly dirty the old bounds, accounting
3083         for transforms.
3084         (WebCore::RenderSVGImage::relativeBBox): Correct bbox computation.
3085         * kcanvas/RenderSVGImage.h:
3086
3087         * kcanvas/RenderSVGText.cpp:
3088         (WebCore::RenderSVGText::paint): Transform incoming damage rect. Handle opacity here since we
3089         won't get a layer.
3090         (WebCore::RenderSVGText::computeAbsoluteRepaintRect): Apply transforms.
3091         (WebCore::RenderSVGText::requiresLayer): Never use a RenderLayer.
3092         (WebCore::RenderSVGText::layout): Make sure to dirty the old bounds.
3093
3094         * platform/cg/GraphicsContextCG.cpp:
3095         (WebCore::GraphicsContext::roundToDevicePixels): Instead of transforming rect to device space
3096         and back to user space, do this for the origin and lower right corner of the rect. Otherwise the
3097         rect will get inflated if user space is rotated or skewed.
3098
3099         * kcanvas/RenderPath.cpp:
3100         (WebCore::RenderPath::layout): Make sure to dirty the old bounds.
3101         (WebCore::RenderPath::paint): Hhandle opacity here.
3102         
3103         Bonus fix:
3104         
3105         * kcanvas/RenderSVGImage.cpp:
3106         (WebCore::RenderSVGImage::nodeAtPoint): Fix hit testing. Wasn't applying the x/y
3107         attribute transform.
3108
3109 2006-06-19  Sam Weinig  <sam.weinig@gmail.com>
3110
3111         Reviewed by Darin.
3112
3113         - fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9500
3114           Split dom2_eventsimpl.* into separate files (one class per file).
3115
3116         * WebCore.xcodeproj/project.pbxproj:
3117         * bindings/js/kjs_binding.cpp:
3118         * bindings/js/kjs_dom.cpp:
3119         * bindings/js/kjs_events.cpp:
3120         * bindings/js/kjs_html.cpp:
3121         * bindings/js/kjs_window.cpp:
3122         * bindings/objc/DOM.mm:
3123         * bindings/objc/DOMEvents.mm:
3124         * bindings/objc/DOMInternal.mm:
3125         * bindings/scripts/CodeGeneratorJS.pm:
3126         * bridge/mac/FrameMac.mm:
3127         * dom/BeforeTextInsertedEvent.h:
3128         * dom/BeforeUnloadEvent.cpp: Added.
3129         * dom/BeforeUnloadEvent.h: Added.
3130         (WebCore::BeforeUnloadEvent::result):
3131         * dom/CharacterData.cpp:
3132         * dom/Clipboard.h: Added.
3133         (WebCore::Clipboard::~Clipboard):
3134         * dom/ClipboardEvent.cpp: Added.
3135         (WebCore::ClipboardEvent::ClipboardEvent):
3136         * dom/ClipboardEvent.h: Added.
3137         (WebCore::ClipboardEvent::clipboard):
3138         * dom/ContainerNode.cpp:
3139         * dom/Document.cpp:
3140         * dom/Event.cpp: Added.
3141         (WebCore::Event::Event):
3142         (WebCore::Event::initEvent):
3143         * dom/Event.h: Added.
3144         (WebCore::):
3145         (WebCore::Event::):
3146         (WebCore::Event::type):
3147         (WebCore::Event::target):
3148         (WebCore::Event::currentTarget):
3149         (WebCore::Event::setCurrentTarget):
3150         (WebCore::Event::eventPhase):
3151         (WebCore::Event::setEventPhase):
3152         (WebCore::Event::bubbles):
3153         (WebCore::Event::cancelable):
3154         (WebCore::Event::timeStamp):
3155         (WebCore::Event::stopPropagation):
3156         (WebCore::Event::propagationStopped):
3157         (WebCore::Event::defaultPrevented):
3158         (WebCore::Event::setDefaultHandled):
3159         (WebCore::Event::defaultHandled):
3160         (WebCore::Event::preventDefault):
3161         (WebCore::Event::setDefaultPrevented):
3162         (WebCore::Event::setCancelBubble):
3163         (WebCore::Event::getCancelBubble):
3164         (WebCore::Event::dispatched):
3165         * dom/EventTargetNode.cpp:
3166         * dom/KeyboardEvent.cpp: Added.
3167         (WebCore::KeyboardEvent::KeyboardEvent):
3168         (WebCore::KeyboardEvent::initKeyboardEvent):
3169         * dom/KeyboardEvent.h: Added.
3170         (WebCore::KeyboardEvent::):
3171         (WebCore::KeyboardEvent::keyIdentifier):
3172         (WebCore::KeyboardEvent::keyLocation):
3173         (WebCore::KeyboardEvent::altGraphKey):
3174         (WebCore::KeyboardEvent::keyEvent):
3175         * dom/MouseEvent.cpp: Added.
3176         (WebCore::MouseEvent::MouseEvent):
3177         (WebCore::MouseEvent::initMouseEvent):
3178         (WebCore::MouseEvent::isDragEvent):
3179         (WebCore::MouseEvent::toElement):
3180         (WebCore::MouseEvent::fromElement):
3181         * dom/MouseEvent.h: Added.
3182         (WebCore::MouseEvent::button):
3183         (WebCore::MouseEvent::relatedTarget):
3184         (WebCore::MouseEvent::clipboard):
3185         * dom/MouseRelatedEvent.cpp: Added.
3186         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
3187         * dom/MouseRelatedEvent.h: Added.
3188         (WebCore::MouseRelatedEvent::screenX):
3189         (WebCore::MouseRelatedEvent::screenY):
3190         (WebCore::MouseRelatedEvent::clientX):
3191         (WebCore::MouseRelatedEvent::clientY):
3192         (WebCore::MouseRelatedEvent::layerX):
3193         (WebCore::MouseRelatedEvent::layerY):
3194         (WebCore::MouseRelatedEvent::offsetX):
3195         (WebCore::MouseRelatedEvent::offsetY):
3196         (WebCore::MouseRelatedEvent::isSimulated):
3197         * dom/MutationEvent.cpp: Added.
3198         (WebCore::MutationEvent::MutationEvent):
3199         (WebCore::MutationEvent::initMutationEvent):
3200         * dom/MutationEvent.h: Added.
3201         (WebCore::MutationEvent::):
3202         (WebCore::MutationEvent::relatedNode):
3203         (WebCore::MutationEvent::prevValue):
3204         (WebCore::MutationEvent::newValue):
3205         (WebCore::MutationEvent::attrName):
3206         (WebCore::MutationEvent::attrChange):
3207         * dom/RegisteredEventListener.cpp: Added.
3208         (WebCore::RegisteredEventListener::RegisteredEventListener):
3209         (WebCore::operator==):
3210         * dom/RegisteredEventListener.h: Added.
3211         (WebCore::RegisteredEventListener::eventType):
3212         (WebCore::RegisteredEventListener::listener):
3213         (WebCore::RegisteredEventListener::useCapture):
3214         (WebCore::RegisteredEventListener::removed):
3215         (WebCore::RegisteredEventListener::setRemoved):
3216         (WebCore::operator!=):
3217         * dom/UIEvent.cpp: Added.
3218         (WebCore::UIEvent::UIEvent):
3219         (WebCore::UIEvent::initUIEvent):
3220         * dom/UIEvent.h: Added.
3221         (WebCore::UIEvent::view):
3222         (WebCore::UIEvent::detail):
3223         * dom/UIEventWithKeyState.h: Added.
3224         (WebCore::UIEventWithKeyState::UIEventWithKeyState):
3225         (WebCore::UIEventWithKeyState::ctrlKey):
3226         (WebCore::UIEventWithKeyState::shiftKey):
3227         (WebCore::UIEventWithKeyState::altKey):
3228         (WebCore::UIEventWithKeyState::metaKey):
3229         * dom/WheelEvent.cpp: Added.
3230         (WebCore::WheelEvent::WheelEvent):
3231         * dom/WheelEvent.h: Added.
3232         (WebCore::WheelEvent::isHorizontal):
3233         (WebCore::WheelEvent::wheelDelta):
3234         * dom/dom2_eventsimpl.cpp: Removed.
3235         * dom/dom2_eventsimpl.h: Removed.
3236         * editing/EditCommand.cpp:
3237         * editing/SelectionController.cpp:
3238         * html/HTMLAnchorElement.cpp:
3239         * html/HTMLButtonElement.cpp:
3240         * html/HTMLDocument.cpp:
3241         * html/HTMLElement.cpp:
3242         * html/HTMLFrameSetElement.cpp:
3243         * html/HTMLInputElement.cpp:
3244         * html/HTMLSelectElement.cpp:
3245         * html/HTMLTextAreaElement.cpp:
3246         * ksvg2/events/SVGZoomEvent.h:
3247         * ksvg2/svg/SVGAElement.cpp:
3248         * page/Frame.cpp:
3249         * page/FrameView.cpp:
3250         * platform/PlatformKeyboardEvent.h:
3251         * platform/PlatformMouseEvent.h:
3252         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
3253         * platform/PlatformWheelEvent.h:
3254         * platform/mac/ClipboardMac.h:
3255         * rendering/RenderFrameSet.cpp:
3256         * rendering/RenderLayer.cpp:
3257         * rendering/RenderObject.cpp:
3258         * rendering/RenderTextField.cpp:
3259         * xml/xmlhttprequest.cpp:
3260
3261 2006-06-19  Darin Adler  <darin@apple.com>
3262
3263         Reviewed by Brady.
3264
3265         - removed a few empty/unused files Brady found by tracking down the nm error message
3266
3267         * editing/VisibleRange.cpp: Removed.
3268         * editing/VisibleRange.h: Removed.
3269         * kcanvas/KCanvasImage.cpp: Removed.
3270
3271         * WebCore.vcproj/WebCore/WebCore.vcproj: Removed VisibleRange.cpp/h.
3272         * WebCore.xcodeproj/project.pbxproj: Removed VisibleRange.cpp/h and KCanvasImage.cpp.
3273         * WebCoreSources.bkl: Removed VisibleRange.cpp.
3274
3275 2006-06-19  Alexey Proskuryakov  <ap@nypop.com>
3276
3277         Reviewed by Darin.
3278
3279         - http://bugzilla.opendarwin.org/show_bug.cgi?id=9492
3280         Fix or remove window.debug.
3281
3282         It was only available in newly created windows, and became undefined after changing the URL
3283         or reloading. Let's try removing it; hopefully, no-one will notice.
3284
3285         * bindings/js/kjs_proxy.cpp:
3286         (WebCore::KJSProxy::initScriptIfNeeded): Don't add window.debug.
3287
3288 2006-06-19  Alexey Proskuryakov  <ap@nypop.com>
3289
3290         Reviewed by Darin.
3291
3292         - http://bugzilla.opendarwin.org/show_bug.cgi?id=8972
3293         REGRESSION: invalid UTF-8 sequences are not displayed
3294
3295         Test: LayoutTests/fast/encoding/invalid-UTF-8.html
3296
3297         * dom/xml_tokenizer.cpp:
3298         (WebCore::getXHTMLEntity): Properly null-terminate the result. This didn't matter
3299         before, because the garbage at the end was guaranteed to be invalid UTF-8, and was 
3300         omitted in appendOmittingUnwanted();
3301
3302         * platform/StreamingTextDecoder.cpp:
3303         (WebCore::StreamingTextDecoder::appendOmittingBOM): Only omit BOM characters.
3304         Renamed back from appendOmittingUnwanted();
3305
3306         (WebCore::StreamingTextDecoder::convertUsingICU):
3307         * platform/StreamingTextDecoder.h:
3308         Update for the above function renaming.
3309
3310 2006-06-18  David Kilzer  <ddkilzer@kilzer.net>
3311
3312         Reviewed by darin.
3313
3314         http://bugzilla.opendarwin.org/show_bug.cgi?id=9498
3315         Remove dead code left in JSHTMLDocument::getOwnPropertySlot() from r14298 (Bug 7838)
3316
3317         * bindings/js/kjs_html.cpp:
3318         (KJS::JSHTMLDocument::getOwnPropertySlot): Remove dead code.
3319
3320 2006-06-18  David Kilzer  <ddkilzer@kilzer.net>
3321
3322         Reviewed by ggaren.
3323
3324         * manual-tests/redraw-page-cache-visited-links.html: Changed to use DOM mouse event.
3325
3326 2006-06-18  David Kilzer  <ddkilzer@kilzer.net>
3327
3328         Reviewed by ggaren.
3329
3330         - Update a manual test for http://bugzilla.opendarwin.org/show_bug.cgi?id=9150
3331           DumpRenderTree should be able to keep URL history during runs
3332
3333         * manual-tests/redraw-page-cache-visited-links.html: Added note about window.history hack.
3334         Fixed coordinates for mouse events.  Added call to keepWebHistory().
3335         * manual-tests/resources/redraw-page-cache-visited-links-2.html: Added note about
3336         window.history hack.
3337
3338 2006-06-17  Anders Carlsson  <acarlsson@apple.com>
3339
3340         Reviewed by Geoff.
3341
3342         * bindings/js/kjs_binding.cpp:
3343         (KJS::ScriptInterpreter::ScriptInterpreter):
3344         Set the default script timeout.
3345         
3346         (KJS::ScriptInterpreter::shouldInterruptScript):
3347         New function which asks the frame if the script should be interrupted.
3348         
3349         * bindings/js/kjs_binding.h:
3350                 
3351         * bindings/js/kjs_events.cpp:
3352         (KJS::JSAbstractEventListener::handleEvent):
3353         * bindings/js/kjs_proxy.cpp:
3354         (WebCore::KJSProxy::evaluate):
3355         Add calls to startTimeoutCheck/stopTimeoutCheck
3356         
3357         * bindings/js/kjs_window.cpp:
3358         (KJS::WindowFunc::callAsFunction):
3359         Add calls to pauseTimeoutCheck/unpauseTimeoutCheck 
3360         
3361         (KJS::ScheduledAction::execute):
3362         Add calls to startTimeoutCheck/stopTimeoutCheck
3363         
3364         * bridge/mac/FrameMac.h:
3365         * bridge/mac/FrameMac.mm:
3366         (WebCore::FrameMac::shouldInterruptJavaScript):
3367         New function which asks the bridge if the script should be interrupted.
3368         
3369         * bridge/mac/WebCoreFrameBridge.h:
3370         * page/Frame.h:
3371         Add function declarations.
3372         
3373 2006-06-17  Alexey Proskuryakov  <ap@nypop.com>
3374
3375         Reviewed by ggaren.
3376
3377         - http://bugzilla.opendarwin.org/show_bug.cgi?id=8131
3378         Some properties and methods of window and document objects cannot be converted to a string
3379
3380         Most of the properties were already fixed, this just adds adds a prototype to window.debug.
3381
3382         Test: fast/dom/everything-to-string.html
3383
3384         * bindings/js/kjs_proxy.cpp:
3385         (WebCore::TestFunctionImp::TestFunctionImp): 
3386         (WebCore::KJSProxy::initScriptIfNeeded):
3387
3388 2006-06-17  David Kilzer  <ddkilzer@kilzer.net>
3389
3390         Reviewed by Maciej.
3391
3392         - Fix capitalization issue for case-sensitive filesystems.
3393
3394         * icon/SQLStatement.cpp: Change assertions.h to Assertions.h.
3395
3396 2006-06-17  Mitz Pettel  <opendarwin.org@mitzpettel.com>
3397
3398         Reviewed by Hyatt.
3399
3400         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7395
3401           Table not properly re-flowed when floated div removed from layout
3402
3403         Test: fast/block/float/table-relayout.html
3404
3405         * rendering/RenderBlock.cpp:
3406         (WebCore::RenderBlock::markAllDescendantsWithFloatsForLayout): Added marking
3407         of children that use lineWidth.
3408         * rendering/RenderBlock.h: Added a FIXME.
3409
3410 2006-06-17  Rob Buis  <buis@kde.org>
3411
3412         Reviewed by Darin.
3413
3414         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=6282:
3415         Adding new Option with new Option(text, value, defaultSelected, selected) fails to update selectedIndex
3416
3417         Update selectedIndex when a new option is added using javascript.
3418
3419         * bindings/js/kjs_html.cpp:
3420         (KJS::JSHTMLSelectCollection::put):
3421         * html/HTMLSelectElement.cpp:
3422         (WebCore::HTMLSelectElement::setSelectedIndex):
3423         (WebCore::HTMLSelectElement::setOption):
3424         (WebCore::HTMLSelectElement::setLength):
3425         * html/HTMLSelectElement.h:
3426
3427 2006-06-17  Mitz Pettel  <opendarwin.org@mitzpettel.com>
3428
3429         Reviewed by Darin.
3430
3431         - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=9466
3432           Assertion failure when dragging an image from the document into Safari's address bar
3433
3434         * manual-tests/reset-initiatedDrag.html: Added.
3435
3436 2006-06-16  David Kilzer  <ddkilzer@kilzer.net>
3437
3438         Reviewed by darin.
3439
3440         http://bugzilla.opendarwin.org/show_bug.cgi?id=9463
3441         REGRESSION (r14879): Assertion failure in CSSParser::sinkFloatingSelector()
3442         (m_floatingSelectors.contains(selector)) in some CSS tests
3443
3444         * css/CSSGrammar.y: Create CSSSelector for FUNCTION using CSSParser::createFloatingSelector()
3445         instead of the bare constructor.
3446
3447 2006-06-16  David Harrison  <harrison@apple.com>
3448
3449         Reviewed by Hatcher.
3450
3451         <rdar://problem/4565312> Mail has a weird drawing artifact with dotted red lines running across the window
3452
3453         Problem was that revision lost a check to not draw the markers
3454         when paintingDisabled().   This led the markers to be drawn when
3455         the window deactivated, at which time the view happens to be flipped.
3456
3457         It is similar but not the same as the Mail ToDo highlighting
3458         issue, which is due to the custom highlight method
3459         drawing when the focusView is nil.  Mail team knows this
3460         and has tested the fix.
3461
3462         * platform/mac/GraphicsContextMac.mm:
3463         (WebCore::GraphicsContext::drawLineForMisspelling):
3464         Early return if paintingDisabled().
3465
3466 2006-06-16  Adele Peterson  <adele@apple.com>
3467
3468         Reviewed by Hyatt.
3469
3470         Adjust padding of inner div so text lines up with text fields.
3471         Adjust height of textarea so it only leaves room for the horizontal
3472         scrollbar if overflow is set to scroll, or if overflow is set to
3473         auto and there's no word wrap.
3474
3475         These changes will be tested by current layout tests when the
3476         new textarea implementation takes effect.
3477
3478         * rendering/RenderTextField.cpp:
3479         (WebCore::RenderTextField::createDivStyle):
3480         (WebCore::RenderTextField::calcHeight):
3481
3482 2006-06-16  John Sullivan  <sullivan@apple.com>
3483
3484         Reviewed by Darin
3485         
3486         - fixed <rdar://problem/4590062> crash in marker code with particular set of steps on daringfireball.net
3487
3488         * dom/Document.cpp:
3489         (WebCore::Document::addMarker):
3490         Store [it - markers.begin()] in a local variable before modifying markers, since modifying markers can
3491         change value of [it - markers.begin()].
3492
3493 2006-06-16  Adele Peterson  <adele@apple.com>
3494
3495         Reviewed by Alice.
3496
3497         Added code to draw Cocoa-like border for textareas instead of just using CSS.
3498
3499         * WebCore.exp:
3500         * css/html4.css: Sets a 1px solid border.
3501         * platform/mac/WebCoreSystemInterface.h:
3502         * platform/mac/WebCoreSystemInterface.mm:
3503         * rendering/RenderThemeMac.h: Formatting changes.
3504         * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintTextArea):
3505         Uses new wkDrawBezeledTextArea to draw border.
3506
3507 2006-06-16  Mitz Pettel  <opendarwin.org@mitzpettel.com>
3508
3509         Reviewed by hyatt.
3510
3511         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9432
3512           REGRESSION: crash in capitalization code due to empty-string generated content
3513
3514         Test: fast/text/capitalize-empty-generated-string.html
3515
3516         * rendering/RenderText.cpp:
3517         (WebCore::RenderText::setText): Skip empty-string text renderers when
3518         looking for the previous character.
3519
3520 2006-06-15  Justin Garcia  <justin.garcia@apple.com>
3521
3522         Reviewed by levi
3523
3524         <http://bugzilla.opendarwin.org/show_bug.cgi?id=8637>
3525         REGRESSION (11-16-05): Selection gaps left behind after delete
3526
3527         * editing/SelectionController.cpp:
3528         (WebCore::SelectionController::nodeWillBeRemoved): Invalidate the selection so that 
3529         selection gaps are invalidated.
3530
3531 2006-06-15  Timothy Hatcher  <timothy@apple.com>
3532
3533         Reviewed by Geoff and Darin.
3534         
3535         Prefer the DWARF debugging symbols format for use in Xcode 2.3.
3536
3537         * WebCore.xcodeproj/project.pbxproj:
3538
3539 2006-06-15  Justin Garcia  <justin.garcia@apple.com>
3540
3541         Reviewed by harrison
3542         
3543         * editing/CompositeEditCommand.cpp:
3544         (WebCore::hasARenderedDescendant):
3545         (WebCore::CompositeEditCommand::prune): Ascend using the DOM
3546         (WebCore::CompositeEditCommand::moveParagraphs): Placeholder insertion
3547         during deletion is fixed, removing the fall back.
3548
3549 2006-06-15  Nicholas Shanks  <contact@nickshanks.com>
3550
3551         Reviewed by Hyatt, landed by Joost de Valk.
3552
3553         Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=3233
3554
3555         Add support for the :lang pseudo-class.
3556
3557         * css/CSSGrammar.y:
3558         * css/CSSSelector.cpp:
3559         (WebCore::CSSSelector::operator == ):
3560         * css/CSSSelector.h:
3561         (WebCore::CSSSelector::CSSSelector):
3562         * css/cssparser.cpp:
3563         (WebCore::CSSParser::lex):
3564         * css/cssstyleselector.cpp:
3565         (WebCore::CSSStyleSelector::checkOneSelector):
3566         * css/tokenizer.flex:
3567
3568 2006-06-15  Justin Garcia  <justin.garcia@apple.com>
3569
3570         Reviewed by harrison
3571         
3572         <http://bugzilla.opendarwin.org/show_bug.cgi?id=9456>
3573         REGRESSION (417.9.2-420+): Cmd-G doesn't work in Safari after double-click and Cmd-E
3574         
3575         * page/Frame.cpp:
3576         (WebCore::Frame::findString): When comparing the found range with
3577         what's currently selected a) build a selection with the found
3578         range to remove collapsed whitespace and b) compare ranges 
3579         instead of selection objects to ignore the way that the 
3580         current selection was made (to ignore the base and extent).
3581
3582 2006-06-15  David Kilzer  <ddkilzer@kilzer.net>
3583
3584         Reviewed by mjs.
3585
3586         http://bugzilla.opendarwin.org/show_bug.cgi?id=9382
3587         IDL files missing copyright/license headers
3588
3589         Add Apple BSD license and copyright to IDL files.
3590
3591         * ksvg2/bindings/idl/svg/GetSVGDocument.idl:
3592         * ksvg2/bindings/idl/svg/SVGAElement.idl:
3593         * ksvg2/bindings/idl/svg/SVGAnimateColorElement.idl:
3594         * ksvg2/bindings/idl/svg/SVGAnimateElement.idl:
3595         * ksvg2/bindings/idl/svg/SVGAnimateTransformElement.idl:
3596         * ksvg2/bindings/idl/svg/SVGAnimatedAngle.idl:
3597         * ksvg2/bindings/idl/svg/SVGAnimatedBoolean.idl:
3598         * ksvg2/bindings/idl/svg/SVGAnimatedEnumeration.idl:
3599         * ksvg2/bindings/idl/svg/SVGAnimatedInteger.idl:
3600         * ksvg2/bindings/idl/svg/SVGAnimatedLengthList.idl:
3601         * ksvg2/bindings/idl/svg/SVGAnimatedNumber.idl:
3602         * ksvg2/bindings/idl/svg/SVGAnimatedNumberList.idl:
3603         * ksvg2/bindings/idl/svg/SVGAnimatedPathData.idl:
3604         * ksvg2/bindings/idl/svg/SVGAnimatedPoints.idl:
3605         * ksvg2/bindings/idl/svg/SVGAnimatedPreserveAspectRatio.idl:
3606         * ksvg2/bindings/idl/svg/SVGAnimatedRect.idl:
3607         * ksvg2/bindings/idl/svg/SVGAnimatedString.idl:
3608         * ksvg2/bindings/idl/svg/SVGAnimatedTransformList.idl:
3609         * ksvg2/bindings/idl/svg/SVGAnimationElement.idl:
3610         * ksvg2/bindings/idl/svg/SVGCircleElement.idl:
3611         * ksvg2/bindings/idl/svg/SVGClipPathElement.idl:
3612         * ksvg2/bindings/idl/svg/SVGComponentTransferFunctionElement.idl:
3613         * ksvg2/bindings/idl/svg/SVGCursorElement.idl:
3614         * ksvg2/bindings/idl/svg/SVGDOMImplementation.idl:
3615         * ksvg2/bindings/idl/svg/SVGDefsElement.idl:
3616         * ksvg2/bindings/idl/svg/SVGDescElement.idl:
3617         * ksvg2/bindings/idl/svg/SVGElementInstance.idl:
3618         * ksvg2/bindings/idl/svg/SVGElementInstanceList.idl:
3619         * ksvg2/bindings/idl/svg/SVGEllipseElement.idl:
3620         * ksvg2/bindings/idl/svg/SVGEvent.idl:
3621         * ksvg2/bindings/idl/svg/SVGException.idl:
3622         * ksvg2/bindings/idl/svg/SVGExternalResourcesRequired.idl:
3623         * ksvg2/bindings/idl/svg/SVGFEBlendElement.idl:
3624         * ksvg2/bindings/idl/svg/SVGFEColorMatrixElement.idl:
3625         * ksvg2/bindings/idl/svg/SVGFEComponentTransferElement.idl:
3626         * ksvg2/bindings/idl/svg/SVGFECompositeElement.idl:
3627         * ksvg2/bindings/idl/svg/SVGFEFloodElement.idl:
3628         * ksvg2/bindings/idl/svg/SVGFEFuncAElement.idl:
3629         * ksvg2/bindings/idl/svg/SVGFEFuncBElement.idl:
3630         * ksvg2/bindings/idl/svg/SVGFEFuncGElement.idl:
3631         * ksvg2/bindings/idl/svg/SVGFEFuncRElement.idl:
3632         * ksvg2/bindings/idl/svg/SVGFEGaussianBlurElement.idl:
3633         * ksvg2/bindings/idl/svg/SVGFEImageElement.idl:
3634         * ksvg2/bindings/idl/svg/SVGFEMergeElement.idl:
3635         * ksvg2/bindings/idl/svg/SVGFEMergeNodeElement.idl:
3636         * ksvg2/bindings/idl/svg/SVGFEOffsetElement.idl:
3637         * ksvg2/bindings/idl/svg/SVGFETileElement.idl:
3638         * ksvg2/bindings/idl/svg/SVGFETurbulenceElement.idl:
3639         * ksvg2/bindings/idl/svg/SVGFilterElement.idl:
3640         * ksvg2/bindings/idl/svg/SVGFilterPrimitiveStandardAttributes.idl:
3641         * ksvg2/bindings/idl/svg/SVGFitToViewBox.idl:
3642         * ksvg2/bindings/idl/svg/SVGGElement.idl:
3643         * ksvg2/bindings/idl/svg/SVGGradientElement.idl:
3644         * ksvg2/bindings/idl/svg/SVGICCColor.idl:
3645         * ksvg2/bindings/idl/svg/SVGImageElement.idl:
3646         * ksvg2/bindings/idl/svg/SVGLangSpace.idl:
3647         * ksvg2/bindings/idl/svg/SVGLengthList.idl:
3648         * ksvg2/bindings/idl/svg/SVGLineElement.idl:
3649         * ksvg2/bindings/idl/svg/SVGLinearGradientElement.idl:
3650         * ksvg2/bindings/idl/svg/SVGLocatable.idl:
3651         * ksvg2/bindings/idl/svg/SVGMarkerElement.idl:
3652         * ksvg2/bindings/idl/svg/SVGNumberList.idl:
3653         * ksvg2/bindings/idl/svg/SVGPaint.idl:
3654         * ksvg2/bindings/idl/svg/SVGPathElement.idl:
3655         * ksvg2/bindings/idl/svg/SVGPathSeg.idl:
3656         * ksvg2/bindings/idl/svg/SVGPathSegArc.idl:
3657         * ksvg2/bindings/idl/svg/SVGPathSegClosePath.idl:
3658         * ksvg2/bindings/idl/svg/SVGPathSegCurvetoCubic.idl:
3659         * ksvg2/bindings/idl/svg/SVGPathSegCurvetoCubicSmooth.idl:
3660         * ksvg2/bindings/idl/svg/SVGPathSegCurvetoQuadratic.idl:
3661         * ksvg2/bindings/idl/svg/SVGPathSegCurvetoQuadraticSmooth.idl:
3662         * ksvg2/bindings/idl/svg/SVGPathSegLineto.idl:
3663         * ksvg2/bindings/idl/svg/SVGPathSegLinetoHorizontal.idl:
3664         * ksvg2/bindings/idl/svg/SVGPathSegLinetoVertical.idl:
3665         * ksvg2/bindings/idl/svg/SVGPathSegList.idl:
3666         * ksvg2/bindings/idl/svg/SVGPathSegMoveto.idl:
3667         * ksvg2/bindings/idl/svg/SVGPatternElement.idl:
3668         * ksvg2/bindings/idl/svg/SVGPointList.idl:
3669         * ksvg2/bindings/idl/svg/SVGPolygonElement.idl:
3670         * ksvg2/bindings/idl/svg/SVGPolylineElement.idl:
3671         * ksvg2/bindings/idl/svg/SVGPreserveAspectRatio.idl:
3672         * ksvg2/bindings/idl/svg/SVGRadialGradientElement.idl:
3673         * ksvg2/bindings/idl/svg/SVGRectElement.idl:
3674         * ksvg2/bindings/idl/svg/SVGRenderingIntent.idl:
3675         * ksvg2/bindings/idl/svg/SVGScriptElement.idl:
3676         * ksvg2/bindings/idl/svg/SVGSetElement.idl:
3677         * ksvg2/bindings/idl/svg/SVGStopElement.idl:
3678         * ksvg2/bindings/idl/svg/SVGStringList.idl:
3679         * ksvg2/bindings/idl/svg/SVGStylable.idl:
3680         * ksvg2/bindings/idl/svg/SVGStyleElement.idl:
3681         * ksvg2/bindings/idl/svg/SVGSwitchElement.idl:
3682         * ksvg2/bindings/idl/svg/SVGSymbolElement.idl:
3683         * ksvg2/bindings/idl/svg/SVGTSpanElement.idl:
3684         * ksvg2/bindings/idl/svg/SVGTests.idl:
3685         * ksvg2/bindings/idl/svg/SVGTextContentElement.idl:
3686         * ksvg2/bindings/idl/svg/SVGTextElement.idl:
3687         * ksvg2/bindings/idl/svg/SVGTextPositioningElement.idl:
3688         * ksvg2/bindings/idl/svg/SVGTitleElement.idl:
3689         * ksvg2/bindings/idl/svg/SVGTransformList.idl:
3690         * ksvg2/bindings/idl/svg/SVGTransformable.idl:
3691         * ksvg2/bindings/idl/svg/SVGURIReference.idl:
3692         * ksvg2/bindings/idl/svg/SVGUnitTypes.idl:
3693         * ksvg2/bindings/idl/svg/SVGUseElement.idl:
3694         * ksvg2/bindings/idl/svg/SVGViewElement.idl:
3695         * ksvg2/bindings/idl/svg/SVGZoomAndPan.idl:
3696         * ksvg2/bindings/idl/svg/SVGZoomEvent.idl:
3697         * ksvg2/svg/SVGAnimatedLength.idl:
3698
3699 2006-06-14  Justin Garcia  <justin.garcia@apple.com>
3700
3701         Reviewed by levi
3702
3703         <rdar://problem/4439248>
3704         REGRESSION(412-417): [RTL] Serious problem with RTL signatures in Mail.app in 10.4.4 (7766)
3705
3706         * editing/markup.cpp:
3707         (WebCore::renderedText): Use plainText so that we'll pull rendered text but in DOM order.
3708
3709 2006-06-14  Levi Weintraub  <lweintraub@apple.com>
3710
3711         Reviewed by justin
3712
3713         <http://bugzilla.opendarwin.org/show_bug.cgi?id=7580>
3714         TinyMCE: Implement execCommand(formatBlock, ...)
3715
3716         * WebCore.xcodeproj/project.pbxproj: Added FormatBlock.{h,cpp} to the project.
3717         * WebCore.vcproj/WebCore/WebCore.vcproj: Ditto.
3718         * bridge/mac/WebCoreFrameBridge.h: Added WebUndoActions
3719         * editing/CompositeEditCommand.cpp:
3720         (WebCore::CompositeEditCommand::moveParagraph): Added a preserveStyle bool.
3721         (WebCore::CompositeEditCommand::moveParagraphs): Ditto.  downstream() the start
3722         or else we'll move collapsed whitespace and uncollapse it.
3723         * editing/CompositeEditCommand.h:
3724         * editing/DeleteSelectionCommand.cpp:
3725         (WebCore::DeleteSelectionCommand::initializePositionData):
3726         (WebCore::DeleteSelectionCommand::handleSpecialCaseBRDelete): Don't update m_endingPosition
3727         because that's removeNode's responsibility.
3728         (WebCore::updatePositionForNodeRemoval): Added.
3729         (WebCore::DeleteSelectionCommand::removeNode): Turned removeFullySelectedNode into a virtual
3730         overload of removeNode so that we can update positions as we remove nodes.
3731         (WebCore::updatePositionForTextRemoval): Added.
3732         (WebCore::DeleteSelectionCommand::deleteTextFromNode):
3733         (WebCore::DeleteSelectionCommand::handleGeneralDelete): 
3734         (WebCore::DeleteSelectionCommand::fixupWhitespace): Got rid of m_trailingWhitespaceValid
3735         since m_trailingWhitespace is always valid (we update it as we remove nodes).
3736         (WebCore::DeleteSelectionCommand::mergeParagraphs):
3737         (WebCore::DeleteSelectionCommand::doApply): Leading and trailing spaces should
3738         be fixed if they have collapsed before merging paragraphs.
3739         * editing/DeleteSelectionCommand.h:
3740         * editing/EditAction.h:
3741         (WebCore::):
3742         * editing/FormatBlockCommand.cpp: Added.
3743         (WebCore::FormatBlockCommand::FormatBlockCommand):
3744         (WebCore::FormatBlockCommand::modifyRange): Similar to InsertListCommand::modifyRange().
3745         (WebCore::FormatBlockCommand::doApply):
3746         * editing/FormatBlockCommand.h: Added.
3747         (WebCore::FormatBlockCommand::editingAction):
3748         * editing/InsertListCommand.h:
3749         (WebCore::InsertListCommand::editingAction):
3750         * editing/JSEditor.cpp:
3751         * editing/MergeIdenticalElementsCommand.cpp:
3752         (WebCore::MergeIdenticalElementsCommand::doApply):
3753         * editing/htmlediting.cpp:
3754         (WebCore::validBlockTag):
3755         (WebCore::createElement):
3756         * editing/htmlediting.h:
3757
3758 2006-06-14  Maciej Stachowiak  <mjs@apple.com>
3759
3760         Reviewed by Anders.
3761
3762         - fixed <rdar://problem/4586051> 10.4.7 regression: 'Saved and recent' button on mapquest.com does not work
3763
3764         * dom/EventTargetNode.cpp:
3765         (WebCore::EventTargetNode::dispatchWindowEvent):
3766
3767 2006-06-14  David Hyatt  <hyatt@apple.com>
3768
3769         Rename RenderSlider to DeprecatedSlider, so that I can start work on
3770         the new NSView-less slider.
3771
3772         Reviewed by john
3773
3774         * WebCore.vcproj/WebCore/WebCore.vcproj:
3775         * WebCore.xcodeproj/project.pbxproj:
3776         * html/HTMLInputElement.cpp:
3777         (WebCore::HTMLInputElement::createRenderer):
3778         * rendering/DeprecatedSlider.cpp: Added.
3779         (WebCore::DeprecatedSlider::DeprecatedSlider):
3780         (WebCore::DeprecatedSlider::calcMinMaxWidth):
3781         (WebCore::DeprecatedSlider::updateFromElement):
3782         (WebCore::DeprecatedSlider::valueChanged):
3783         * rendering/DeprecatedSlider.h: Added.
3784         (WebCore::DeprecatedSlider::renderName):
3785         * rendering/RenderSlider.cpp: Removed.
3786         * rendering/RenderSlider.h: Removed.
3787
3788 2006-06-13  Geoffrey Garen  <ggaren@apple.com>
3789
3790         Reviewed by Maciej.
3791         
3792         - Fixed <rdar://problem/4562192> Creating a new DOMHTMLDocument 
3793         appears challenging.
3794         
3795         - Added createHTMLDocument to Objc bindings, fixed up implementation
3796         to comply with the DOM 2 Candidate Recommendation in which is was defined.
3797         (It never made the final spec.) Also removed use of deprecatedString,
3798         to avoid unnecessary killing of puppies.
3799
3800         * WebCore.xcodeproj/project.pbxproj:
3801         * bindings/objc/DOM.mm:
3802         (-[DOMImplementation createHTMLDocument:]):
3803         * bindings/objc/DOMPrivate.h:
3804         * dom/DOMImplementation.cpp:
3805         (WebCore::DOMImplementation::createDocument):
3806         (WebCore::DOMImplementation::createHTMLDocument):
3807
3808 2006-06-13  Alice Liu  <alice.liu@apple.com>
3809
3810         Reviewed by Adele.
3811
3812         fixed <rdar://problem/4457902> HTMLSelectElement.remove() can't handle an option obj being passed to it, results in hang on http://www.ibc-solar.de/www_ibc/fst_solarmonitoring.jsp
3813
3814         * bindings/js/kjs_html.cpp:
3815         (KJS::HTMLElementFunction::callAsFunction):
3816         support this by converting the argument to an options object
3817         before passing to remove()
3818
3819 2006-06-13  Darin Adler  <darin@apple.com>
3820
3821         Reviewed by Geoff.
3822
3823         - fix <rdar://problem/4585333> Changing location for weather on yahoo.com home page redirects to another page
3824
3825         This patch fixes a bug where the event listener cache does not distinguish
3826         HTML and non-HTML listeners. Incorrect behavior where stopPropagation also
3827         prevented default masked a case of this bug on the yahoo.com home page until
3828         we fixed bug 5180 on 2005-10-03.
3829
3830         Test: fast/events/event-listener-html-non-html-confusion.html
3831
3832         * bindings/js/kjs_window.h: Add additional listener maps for HTML event listeners.
3833
3834         * bindings/js/kjs_window.cpp:
3835         (KJS::Window::~Window): Go through the additional maps when clearing the window object
3836         pointer in event listeners.
3837         (KJS::Window::getJSEventListener): Look in the HTML or non-HTML map depending on the
3838         argument passed.
3839         (KJS::Window::getJSUnprotectedEventListener): Ditto.
3840
3841         * bindings/js/kjs_events.cpp:
3842         (KJS::JSUnprotectedEventListener::JSUnprotectedEventListener): Add to either the HTML
3843         or non-HTML map depending on the argument passed.
3844         (KJS::JSUnprotectedEventListener::~JSUnprotectedEventListener): Remove from either the
3845         HTML or non-HTML map depending on whether the HTML flag is set.
3846         (KJS::JSEventListener::JSEventListener): More of the same.
3847         (KJS::JSEventListener::~JSEventListener): Ditto.
3848         (KJS::JSLazyEventListener::parseCode): Same thing here. In a lazy event listener there
3849         is not a listener at construction time, thus the code here to put the listener into a
3850         map needs the HTML vs. non-HTML logic.
3851
3852 2006-06-13  Maciej Stachowiak  <mjs@apple.com>
3853
3854         Reviewed by Darin.
3855         
3856         <rdar://problem/4583892> 10.4.7 regression: Hang occurs when attempting to load search results at mapquest.com
3857
3858         * dom/EventTargetNode.cpp:
3859         (WebCore::EventTargetNode::dispatchGenericEvent): Don't allow
3860         "load" events to propagate up to the window. We need this quirk to
3861         avoid site hangs, because they depend on an old Mozilla bug.
3862
3863 2006-06-13  Antti Koivisto  <koivisto@iki.fi>
3864
3865         Reviewed by Hyatt.
3866
3867         http://bugzilla.opendarwin.org/show_bug.cgi?id=9314
3868         Relative positioned block size doesnt update root layer size
3869
3870         - take relative positioning into account in leftmost/rightmost/lowestPosition()
3871         - ignore zero width/height boxes in leftmost/rightmost/lowestPosition()
3872         - split relativePositionOffset() to x and y functions
3873         
3874         * rendering/RenderBox.cpp:
3875         (WebCore::RenderBox::absolutePosition):
3876         (WebCore::RenderBox::relativePositionOffsetX):
3877         (WebCore::RenderBox::relativePositionOffsetY):
3878         (WebCore::RenderBox::lowestPosition):
3879         (WebCore::RenderBox::rightmostPosition):
3880         (WebCore::RenderBox::leftmostPosition):
3881         * rendering/RenderBox.h:
3882         * rendering/RenderFlow.cpp:
3883         (WebCore::RenderFlow::lowestPosition):
3884         (WebCore::RenderFlow::rightmostPosition):
3885         (WebCore::RenderFlow::leftmostPosition):
3886         * rendering/RenderLayer.cpp:
3887         (WebCore::RenderLayer::updateLayerPosition):
3888         * rendering/RenderObject.cpp:
3889         (WebCore::RenderObject::offsetLeft):
3890         (WebCore::RenderObject::offsetTop):
3891
3892 2006-06-13  Anders Carlsson  <acarlsson@apple.com>
3893
3894         Reviewed by Dave Hyatt.
3895
3896         http://bugzilla.opendarwin.org/show_bug.cgi?id=9427
3897         xml-stylesheet processing instructions outside of the prolog should have no effect.
3898
3899         * dom/ProcessingInstruction.cpp:
3900         (WebCore::ProcessingInstruction::checkStyleSheet):
3901         Remove todo comment.
3902         
3903         * dom/xml_tokenizer.cpp:
3904         (WebCore::XMLTokenizer::processingInstruction):
3905         Only check for style sheet if the root element hasn't yet been encountered.
3906
3907 2006-06-13  Anders Carlsson  <acarlsson@apple.com>
3908
3909         Reviewed by Geoff.
3910
3911         http://bugzilla.opendarwin.org/show_bug.cgi?id=9406
3912         REGRESSION: fix for bug 9390 broke two layout tests
3913         
3914         * loader/PluginDocument.cpp:
3915         (WebCore::PluginTokenizer::writeRawData):
3916         Call finished() after setting up the document structure so we'll emit onload events.
3917
3918 2006-06-12  Geoffrey Garen  <ggaren@apple.com>
3919
3920         build fix -- forgot to svn add this file
3921         
3922         * ForwardingHeaders/kjs/SavedBuiltins.h: Added.
3923
3924 2006-06-12  Brady Eidson  <beidson@apple.com>
3925
3926         Reviewed by Maciej.
3927
3928         Fixed a bug in append(char) and append(UChar) where our intended copy-on-write semantics was ignored!
3929
3930         * platform/String.cpp:
3931         (WebCore::String::append):
3932
3933 2006-06-12  Geoffrey Garen  <ggaren@apple.com>
3934
3935         Reviewed by TimO, Maciej.
3936
3937         - WebCore part of merging InterpreterImp into Interpreter. No test
3938         because there's no behavior change.
3939         
3940         A substantive change here is that ScriptInterpreter::mark must now chain to
3941         Interpreter::mark, since Interpreter needs to mark the things that
3942         InterpreterImp used to mark.
3943         
3944         * WebCore.xcodeproj/project.pbxproj:
3945         * bindings/js/kjs_binding.cpp:
3946         * bindings/js/kjs_window.cpp:
3947         (KJS::Window::put):
3948         * bridge/mac/WebCoreFrameBridge.mm:
3949         * bridge/mac/WebCoreScriptDebugger.mm:
3950         (-[WebCoreScriptCallFrame evaluateWebScript:]):
3951         * kwq/KWQPageState.mm:
3952
3953 2006-06-12  Brady Eidson <beidson@apple.com>
3954
3955         Reviewed by Maciej.
3956
3957         Changed String::ascii() to return a Vector<char> instead of const char*
3958         This allows us to use it "regularly" as the returned vector will destruct
3959         and not leak memory like the previous approach.
3960         We can now do a String.ascii().data() to get a char* buffer instead of 
3961         String.deprecatedString().ascii().  It doesn't improve the style much but
3962         dumping the memory-leak issue is a plus.
3963
3964         * icon/IconDatabase.cpp:
3965         (WebCore::IconDatabase::open):
3966         (WebCore::IconDatabase::clearDatabase):
3967         * icon/SQLDatabase.cpp:
3968         (SQLDatabase::open):
3969         * icon/SQLStatement.cpp:
3970         (WebCore::SQLStatement::prepare):
3971         (WebCore::SQLStatement::step):
3972         (WebCore::SQLStatement::returnTextResults):
3973         (WebCore::SQLStatement::returnTextResults16):
3974         (WebCore::SQLStatement::returnIntResults):
3975         (WebCore::SQLStatement::returnInt64Results):
3976         (WebCore::SQLStatement::returnDoubleResults):
3977         In addition to the changes to the string classes, changed my database code over to the new
3978         preferred method.
3979
3980         * platform/PlatformString.h:
3981         * platform/String.cpp:
3982         (WebCore::String::ascii):
3983         * platform/StringImpl.cpp:
3984         (WebCore::StringImpl::ascii):
3985         * platform/StringImpl.h:
3986
3987 2006-06-12  Dave Hyatt <hyatt@apple.com>
3988
3989         Add the notion of a selection foreground color to the engine for
3990         Win32.  Rename existing selectionColor methods to be
3991         selectionBackgroundColor instead.
3992
3993         Change the 60% alpha blend rule for transparent selection to
3994         instead be a range from 60-80%, with less transparency being
3995         used as needed to ensure the transformed color more closely
3996         approximates the original operating system color when blended
3997         with a white background.
3998
3999         Reviewed by mjs
4000
4001         * platform/Color.cpp:
4002         (WebCore::blend):
4003         (WebCore::Color::blendWithWhite):
4004         * platform/Color.h:
4005         * rendering/InlineTextBox.cpp:
4006         (WebCore::InlineTextBox::paint):
4007         (WebCore::InlineTextBox::paintSelection):
4008         * rendering/RenderBlock.cpp:
4009         (WebCore::RenderBlock::fillHorizontalSelectionGap):
4010         (WebCore::RenderBlock::fillVerticalSelectionGap):
4011         (WebCore::RenderBlock::fillLeftSelectionGap):
4012         (WebCore::RenderBlock::fillRightSelectionGap):
4013         * rendering/RenderHTMLCanvas.cpp:
4014         (WebCore::RenderHTMLCanvas::paint):
4015         * rendering/RenderImage.cpp:
4016         (WebCore::RenderImage::paint):
4017         * rendering/RenderListMarker.cpp:
4018         (WebCore::RenderListMarker::paint):
4019         * rendering/RenderObject.cpp:
4020         (WebCore::RenderObject::selectionBackgroundColor):
4021         (WebCore::RenderObject::selectionForegroundColor):
4022         * rendering/RenderObject.h:
4023         * rendering/RenderTheme.cpp:
4024         (WebCore::RenderTheme::activeSelectionBackgroundColor):
4025         (WebCore::RenderTheme::inactiveSelectionBackgroundColor):
4026         (WebCore::RenderTheme::platformActiveSelectionBackgroundColor):
4027         (WebCore::RenderTheme::platformInactiveSelectionBackgroundColor):
4028         (WebCore::RenderTheme::platformActiveSelectionForegroundColor):
4029         (WebCore::RenderTheme::platformInactiveSelectionForegroundColor):
4030         * rendering/RenderTheme.h:
4031         * rendering/RenderThemeMac.h:
4032         * rendering/RenderThemeMac.mm:
4033         (WebCore::RenderThemeMac::platformActiveSelectionBackgroundColor):
4034         (WebCore::RenderThemeMac::platformInactiveSelectionBackgroundColor):
4035         * rendering/RenderThemeWin.cpp:
4036         (WebCore::RenderThemeWin::platformActiveSelectionBackgroundColor):
4037         (WebCore::RenderThemeWin::platformInactiveSelectionBackgroundColor):
4038         (WebCore::RenderThemeWin::platformActiveSelectionForegroundColor):
4039         (WebCore::RenderThemeWin::platformInactiveSelectionForegroundColor):
4040         * rendering/RenderThemeWin.h:
4041         * rendering/RenderWidget.cpp:
4042         (WebCore::RenderWidget::paint):
4043
4044 2006-06-12  John Sullivan  <sullivan@apple.com>
4045
4046         Reviewed by Darin Adler.
4047         
4048         * page/Frame.cpp:
4049         (WebCore::Frame::markAllMatchesForText):
4050         Do a "fake" paint here so that the rectangles for the text matches will have been
4051         computed by the time this method returns.
4052
4053 2006-06-12  Brady Eidson  <beidson@apple.com>
4054
4055         Reviewed by Levi and Tim Omernick.
4056
4057         -Added a skeleton sqlite3 icon database file to IconDatabase
4058         -Added functionality to validate and recreate this icon.db file
4059         -Fixed some buggys in SQLDatabase.cpp
4060
4061         * icon/IconDatabase.cpp:
4062         (WebCore::IconDatabase::open):
4063         (WebCore::IconDatabase::isValidDatabase):
4064         (WebCore::IconDatabase::clearDatabase):
4065         (WebCore::IconDatabase::recreateDatabase):
4066         * icon/IconDatabase.h:
4067
4068         * icon/SQLStatement.cpp:
4069         (WebCore::SQLStatement::columnCount):
4070         (WebCore::SQLStatement::getColumnName):
4071         (WebCore::SQLStatement::getColumnName16):
4072         (WebCore::SQLStatement::getColumnText):
4073         (WebCore::SQLStatement::getColumnText16):
4074         (WebCore::SQLStatement::getColumnDouble):
4075         (WebCore::SQLStatement::getColumnInt):
4076         (WebCore::SQLStatement::getColumnInt64):
4077         (WebCore::SQLStatement::getColumnBlob):
4078         -Added checks to make sure we had a valid working sqlite3_statement as the sqlite3_*
4079         function calls weren't as error-tolerant as documentation advertised
4080         (maybe differences between the 3.3 docs I looked at and the 3.1.3 version installed on OSX)
4081
4082 2006-06-12  Brady Eidson  <beidson@apple.com>
4083
4084         Reviewed by Levi.
4085
4086         -Added SQLite helper wrappers to ease use of SQLite in the IconDatabase.  
4087         -Changed the base IconDatabase over to this new framework.
4088
4089         * WebCore.xcodeproj/project.pbxproj:
4090         * bridge/mac/WebCoreIconDatabaseBridge.mm:
4091         (-[WebCoreIconDatabaseBridge closeSharedDatabase]):
4092             -By popular request, removed an annoying log message I'd accidentally left in
4093
4094         * icon/IconDatabase.cpp:
4095         (WebCore::IconDatabase::IconDatabase):
4096         (WebCore::IconDatabase::open):
4097         (WebCore::IconDatabase::close):
4098         (WebCore::IconDatabase::~IconDatabase):
4099         * icon/IconDatabase.h:
4100         (WebCore::IconDatabase::isOpen):
4101             -Changed over IconDatabase from direct sqlite3_* calls to the new SQLDatabase calls
4102
4103         * icon/SQLDatabase.cpp: Added.
4104         (SQLDatabase::SQLDatabase):
4105         (SQLDatabase::open):
4106         (SQLDatabase::close):
4107         (SQLDatabase::executeCommand):
4108         (SQLDatabase::tableExists):
4109         * icon/SQLDatabase.h: Added.
4110         (WebCore::SQLDatabase::isOpen):
4111         (WebCore::SQLDatabase::getPath):
4112         (WebCore::SQLDatabase::lastError):
4113         (WebCore::SQLDatabase::lastErrorMsg):
4114         (WebCore::SQLStatement::isPrepared):
4115         (WebCore::SQLStatement::lastError):
4116         (WebCore::SQLStatement::lastErrorMsg):
4117         * icon/SQLStatement.cpp: Added.
4118         (WebCore::SQLStatement::SQLStatement):
4119         (WebCore::SQLStatement::~SQLStatement):
4120         (WebCore::SQLStatement::prepare):
4121         (WebCore::SQLStatement::step):
4122         (WebCore::SQLStatement::finalize):
4123         (WebCore::SQLStatement::reset):
4124         (WebCore::SQLStatement::executeCommand):
4125         (WebCore::SQLStatement::bindBlob):
4126         (WebCore::SQLStatement::bindText):
4127         (WebCore::SQLStatement::columnCount):
4128         (WebCore::SQLStatement::getColumnName):
4129         (WebCore::SQLStatement::getColumnName16):
4130         (WebCore::SQLStatement::getColumnText):
4131         (WebCore::SQLStatement::getColumnText16):
4132         (WebCore::SQLStatement::getColumnDouble):
4133         (WebCore::SQLStatement::getColumnInt):
4134         (WebCore::SQLStatement::getColumnInt64):
4135         (WebCore::SQLStatement::getColumnBlob):
4136         (WebCore::SQLStatement::returnTextResults):
4137         (WebCore::SQLStatement::returnTextResults16):
4138         (WebCore::SQLStatement::returnIntResults):
4139         (WebCore::SQLStatement::returnInt64Results):
4140         (WebCore::SQLStatement::returnDoubleResults):
4141             -Initial checking of SQLDatabase framework
4142
4143         * platform/PlatformString.h:
4144         * platform/String.cpp:
4145         (WebCore::String::String):
4146             -Added an explicit UChar* constructor to our string class as much of sqlite3's UTF16 handling is based on 
4147             null-terminated UTF16 which we didn't yet support.
4148
4149 2006-06-11  David Kilzer  <ddkilzer@kilzer.net>
4150
4151         Reviewed by Maciej.
4152
4153         http://bugzilla.opendarwin.org/show_bug.cgi?id=9408
4154         Clean build fails with "make: *** No rule to make target `SVGElementFactory.cpp', needed by `all'. Stop"
4155
4156         * DerivedSources.make: Fix clean builds.
4157
4158 2006-06-11  Darin Adler  <darin@apple.com>
4159
4160         - another try at fixing Windows
4161
4162         * loader/CachedResource.h:
4163         * platform/cairo/GraphicsContextCairo.cpp:
4164         * platform/image-decoders/ImageDecoder.h:
4165         (WebCore::ImageDecoder::setData):
4166         * platform/image-decoders/gif/GIFImageDecoder.cpp:
4167         (WebCore::GIFImageDecoderPrivate::decode):
4168         (WebCore::GIFImageDecoder::setData):
4169         * platform/image-decoders/gif/GIFImageDecoder.h:
4170         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
4171         (WebCore::JPEGImageReader::decode):
4172         (WebCore::JPEGImageDecoder::setData):
4173         * platform/image-decoders/jpeg/JPEGImageDecoder.h:
4174         * platform/image-decoders/png/PNGImageDecoder.cpp:
4175         (WebCore::PNGImageReader::decode):
4176         (WebCore::PNGImageDecoder::setData):
4177         * platform/image-decoders/png/PNGImageDecoder.h:
4178         s/DeprecatedByteArray/Vector<char>/
4179
4180 2006-06-11  Darin Adler  <darin@apple.com>
4181
4182         - try to fix Windows build
4183
4184         * platform/cairo/ImageCairo.cpp: (WebCore::Image::loadResource):
4185         Use Vector<char> instead of DeprecatedByteArray.
4186
4187         * platform/win/TemporaryLinkStubs.cpp: (KWQServeSynchronousRequest):
4188         Don't try to return 0 from a function that returns a Vector<char>.
4189
4190 2006-06-11  Sam Weinig  <sam.weinig@gmail.com>
4191
4192         Reviewed b