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