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