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