Removed the __BUILDING_QT ifdef in JSStringRef.h and changed UChar for the Qt build...
[WebKit-https.git] / WebCore / ChangeLog
1 2007-07-30  Simon Hausmann  <hausmann@kde.org>
2
3         Reviewed by Lars.
4
5         Removed the __BUILDING_QT ifdef in JSStringRef.h and changed UChar for the Qt build to use wchar_t on Windows.
6
7         * platform/TextEncoding.cpp:
8         (WebCore::TextEncoding::encode):
9
10 2007-07-30  Simon Hausmann  <hausmann@kde.org>
11
12         Reviewed by Lars.
13
14         Don't link against libxml/libxslt unless we really need it.
15
16         * WebCore.pro:
17
18 2007-07-29  Tristan O'Tierney  <tristan@apple.com>
19
20         Reviewed by Oliver Hunt.
21
22         <rdar://problem/5369282> REGRESSION: DOMHTMLInput throwing exception due to missing _isEdited method
23
24         * bindings/objc/DOMHTML.mm:
25         (-[DOMHTMLInputElement _isEdited]):
26         (-[DOMHTMLTextAreaElement _isEdited]):
27         * bindings/objc/DOMPrivate.h:
28         Renamed _isUserEdited to _isEdited.
29
30 2007-07-29  Adam Treat  <treat@kde.org>
31
32         Reviewed by George Staikos.
33
34         Correctly set the update rect for the scrollbars when they are invalidated.
35         Do not paint entire page for each scroll delta.  Cache the dirty regions
36         when webkit calls ScrollView::updateContents as webkit expects the paint
37         routine to use the dirty regions bounding rect.
38
39         These changes greatly reduce the cpu load as we are no longer painting the
40         entire page for each 1px scroll :P
41
42         * platform/qt/ScrollViewQt.cpp:
43         (WebCore::ScrollView::ScrollViewPrivate::scrollBackingStore):
44         (WebCore::ScrollView::updateContents):
45         (WebCore::ScrollView::paint):
46         * platform/qt/WidgetQt.cpp:
47         (WebCore::Widget::invalidateRect):
48
49 2007-07-29  Adele Peterson  <adele@apple.com>
50
51         Reviewed by John.
52
53         WebCore part of fix for <rdar://problem/5102522> REGRESSION: Can't tab to webview that doesn't have editable content (affects Safari, preview pane in Mail)
54
55         * WebCore.exp:
56         * page/FocusController.cpp:
57         (WebCore::FocusController::setInitialFocus): Added.
58         (WebCore::FocusController::advanceFocus): Don't give the focus back to the chrome if this is the initial focus.
59         * page/FocusController.h:
60
61 2007-07-29  Adam Treat  <treat@kde.org>
62
63         Reviewed by Alexey Proskuryakov.
64
65         WebCore::Widget::setParent should be virtual.
66         It is reimplemented in ScrollViewQt for instance.
67
68         * platform/Widget.h:
69
70 2007-07-29  Alp Toker  <alp.toker@collabora.co.uk>
71
72         Reviewed by bdash.
73
74         http://bugs.webkit.org/show_bug.cgi?id=14711 (revisited)
75         RenderThemeGdk's buttons are state-agnostic (pressed, hovered)
76
77         Generalize shadow state into a function.
78         use a GtkHBox to work around a theme bug (thanks to Nigel Tao).
79
80         * platform/gdk/RenderThemeGdk.cpp:
81         (WebCore::RenderThemeGdk::determineShadow):
82         (WebCore::RenderThemeGdk::paintCheckbox):
83         (WebCore::RenderThemeGdk::paintRadio):
84         (WebCore::RenderThemeGdk::paintButton):
85         (WebCore::RenderThemeGdk::gtkWindowContainer):
86         * platform/gdk/RenderThemeGdk.h:
87
88 2007-07-27  Adele Peterson  <adele@apple.com>
89
90         Reviewed by Darin. 
91
92         Temporary fix for Windows to prevent crashing on all frame pages.  Darin
93         is working on a more permanent fix.
94
95         * loader/FrameLoader.cpp:
96
97 2007-07-27  Adam Treat  <treat@kde.org>
98
99         Reviewed by David Hyatt.
100
101         Fix crash when using QtWebKit canvas support.
102
103         * ChangeLog:
104         * html/HTMLCanvasElement.cpp:
105         (WebCore::HTMLCanvasElement::reset):
106
107 2007-07-27  Darin Adler  <darin@apple.com>
108
109         * rendering/RenderLayer.cpp: Rolled out accidentally-checked-in code.
110
111 2007-07-27  Darin Adler  <darin@apple.com>
112
113         Reviewed by John Sullivan.
114
115         - fix <rdar://problem/5261393> In Mail the plain text alternatives to messages with attachments show weird little OBJ thingies
116
117         The "weird little thingies" are U+FFFC characters. It's good to render them as zero-width, the way we do
118         with control characters -- helps Mail and doesn't hurt web browsing.
119
120         Test: fast/text/zero-width-characters.html
121
122         * platform/CharacterNames.h: Add names for leftToRightMark, rightToLeftMark, and objectReplacementCharacter.
123         * platform/GlyphPageTreeNode.cpp: (WebCore::GlyphPageTreeNode::initializePage): Give objectReplacementCharacter
124         zero width in the same way we do it for the various other characters.
125
126 2007-07-27  Lars Knoll <lars@trolltech.com>
127
128         Reviewed by Zack
129
130         Enable XSLT support for the gtk port.
131
132         * WebCore.pro:
133
134 2007-07-27  Zack Rusin  <zack@kde.org>
135
136         Reviewed by Zack and Lars.
137
138         Premature end after finishing parsing is a fatal error.
139
140         * dom/XMLTokenizer.cpp:
141         (WebCore::XMLTokenizer::end):
142
143 2007-07-27  Lars Knoll  <lars@trolltech.com>
144
145         Reviewed by Zack and Lars.
146
147         Simplify conversions that go from a QStringRef to a WebCore::String to not use a temporary QString.
148
149         * dom/XMLTokenizer.cpp:
150         (WebCore::):
151
152 2007-07-27  Zack Rusin  <zack@kde.org>
153
154         Reviewed by Zack and Lars.
155
156         Fix entity handling in the main document content (attributes still broken)
157
158         * dom/XMLTokenizer.cpp:
159         (WebCore::):
160
161 2007-07-27  Lars Knoll  <lars@trolltech.com>
162
163         Reviewed by Zack and Lars.
164
165         Correctly convert a null QString into a null WebCore::String. Add a String(const QStringRef&) constructor so that we can avoid converting QStringRef via QString to WebCore::String.
166
167         * dom/XMLTokenizer.cpp:
168         (WebCore::):
169         * platform/PlatformString.h:
170         * platform/qt/StringQt.cpp:
171         (WebCore::String::String):
172
173 2007-07-27  Zack Rusin  <zack@kde.org>
174
175         Reviewed by Zack and Lars.
176
177         Parse version and encoding of the xml document.
178
179         * dom/XMLTokenizer.cpp:
180         (WebCore::XMLTokenizer::write):
181
182 2007-07-27  Zack Rusin  <zack@kde.org>
183
184         Reviewed by Zack and Lars.
185
186         Correctly or semi-correctly parse the public and system id.
187
188         Patch from Lars.
189
190         * dom/XMLTokenizer.cpp:
191         (WebCore::):
192
193 2007-07-27  Zack Rusin  <zack@kde.org>
194
195         Reviewed by Zack and Lars.
196
197         Fix uri parsing for attributes.
198
199         * dom/XMLTokenizer.cpp:
200         (WebCore::):
201
202 2007-07-27  Zack Rusin  <zack@kde.org>
203
204         Reviewed by Zack and Lars.
205
206         Fixing qualified name parsing - from Lars.
207
208         * dom/XMLTokenizer.cpp:
209         (WebCore::XMLTokenizer::insertErrorMessageBlock):
210         (WebCore::):
211
212 2007-07-27  Zack Rusin  <zack@kde.org>
213
214         Reviewed by Zack and Lars.
215
216         Parse dtd's
217
218         * dom/XMLTokenizer.cpp:
219         (WebCore::XMLTokenizer::resumeParsing):
220         (WebCore::):
221         * dom/XMLTokenizer.h:
222
223 2007-07-27  Zack Rusin  <zack@kde.org>
224
225         Reviewed by Zack and Lars.
226
227         Implement error handling.
228
229         Add our copyrights
230
231         * dom/XMLTokenizer.cpp:
232         (WebCore::XMLTokenizer::handleError):
233         (WebCore::XMLTokenizer::end):
234         (WebCore::):
235         * dom/XMLTokenizer.h:
236
237 2007-07-27  Zack Rusin  <zack@kde.org>
238
239         Reviewed by Zack and Lars.
240
241         Making the stylesheets work (plus everything else basically)
242
243         * dom/XMLTokenizer.cpp:
244         (WebCore::XMLTokenizer::write):
245         (WebCore::XMLTokenizer::insertErrorMessageBlock):
246         (WebCore::):
247         * dom/XMLTokenizer.h:
248
249 2007-07-27  Zack Rusin  <zack@kde.org>
250
251         Reviewed by Zack and Lars.
252
253         Remove the libxml dependency when not compiling with XSLT.
254
255         Just ifdefing, displaying xml doesn't work.
256
257         * WebCore.pro:
258         * dom/XMLTokenizer.cpp:
259         (WebCore::XMLTokenizer::XMLTokenizer):
260         (WebCore::XMLTokenizer::write):
261         (WebCore::XMLTokenizer::startElementNs):
262         (WebCore::XMLTokenizer::enterText):
263         (WebCore::XMLTokenizer::exitText):
264         (WebCore::XMLTokenizer::initializeParserContext):
265         (WebCore::XMLTokenizer::end):
266         (WebCore::XMLTokenizer::lineNumber):
267         (WebCore::XMLTokenizer::columnNumber):
268         (WebCore::XMLTokenizer::stopParsing):
269         (WebCore::XMLTokenizer::resumeParsing):
270         (WebCore::):
271         * dom/XMLTokenizer.h:
272
273 2007-07-27  Simon Hausmann  <hausmann@kde.org>
274
275         Reviewed by Zack.
276
277         Work around bug in the moc when used as preprocessor for generating the bindings. -DFOO=1 is needed instead of -DFOO
278         to make the <hash>if FOO conditional match.
279
280         * WebCore.pro:
281
282 2007-07-27  Patrick Hanna  <phanna@email.unc.edu>
283
284         Reviewed by Darin Adler.
285
286         Change PluginBase::refresh to be static and update PluginsFunc::callAsFunction accordingly. Now we no longer
287         allocate an instance of a JSObject subclass on the stack which could lead to a crash during garbage collection.
288
289         * bindings/js/kjs_navigator.cpp:
290         (KJS::PluginsFunc::callAsFunction):
291
292 2007-07-27  Simon Hausmann  <hausmann@kde.org>
293
294         Done with and reviewed by Lars and Zack.
295
296         Fix snprintf hack for the Qt/Windows build with mingw-gcc. MingW has snprintf, so we don't need this helper function.
297
298         * page/FrameTree.cpp:
299         * platform/DeprecatedString.cpp:
300         (WebCore::DeprecatedString::format):
301         * platform/String.cpp:
302         (WebCore::String::format):
303
304 2007-07-27  Simon Hausmann  <hausmann@kde.org>
305
306         Done with and reviewed by Lars and Zack.
307
308         Make the DocTypeStrings.cpp generation work with MingW. Cleaned it up to be a regular extra compiler at the same time.
309
310         * WebCore.pro:
311
312 2007-07-27  Simon Hausmann  <hausmann@kde.org>
313
314         Done with and reviewed by Lars and Zack.
315
316         MingW build fixes: Do the "OBJECTS_TRAILING_SLASH" trick not only for win32-msvc but for all win32 mkspecs. Added LIB/INCLUDE hack from Qt to make us pick up 3rdparty libraries such as libxml from these environment variables.
317
318         * WebCore.pro:
319
320 2007-07-27  Simon Hausmann  <hausmann@kde.org>
321
322         Done with and reviewed by Lars and Zack.
323
324         Use $(MOVE) instead of mv to eliminated the shell dependency and replaced the long shell line to call bison and modify the css grammar file with a few lines of portable perl code.
325
326         * WebCore.pro:
327         * css/makegrammar.pl: Added.
328
329 2007-07-27  Simon Hausmann  <hausmann@kde.org>
330
331         Done with and reviewed by Lars and Zack.
332
333         On make install on Windows copy the dll into the bin dir.
334
335         * WebCore.pro:
336
337 2007-07-27  Simon Hausmann  <hausmann@kde.org>
338
339         Done with and reviewed by Lars and Zack.
340
341         Link in libxml and libxslt on Windows.
342
343         * WebCore.pro:
344
345 2007-07-27  Simon Hausmann  <hausmann@kde.org>
346
347         Done with and reviewed by Lars and Zack.
348
349         Temporarily disable the ICO support for the Qt build on Windows.
350
351         * WebCore.pro:
352         * platform/graphics/qt/ImageDecoderQt.cpp:
353
354 2007-07-27  Simon Hausmann  <hausmann@kde.org>
355
356         Done with and reviewed by Lars and Zack.
357
358         Fix evaluation with ActiveState Perl 5.6. Somehow it tried to treat nameEntries as array.
359
360         * bindings/scripts/CodeGeneratorJS.pm:
361
362 2007-07-27  Simon Hausmann  <hausmann@kde.org>
363
364         Done with and reviewed by Lars and Zack.
365
366         Fix compilation with MSVC in the Qt build (missing header files).
367
368         * loader/icon/IconDatabaseNone.cpp:
369         * platform/graphics/svg/SVGImage.cpp:
370
371 2007-07-27  Simon Hausmann  <hausmann@kde.org>
372
373         Done with and reviewed by Lars and Zack.
374
375         Disable the favicon database on Windows for now, to eliminate the sqlite dependency.
376
377         * WebCore.pro:
378
379 2007-07-27  Simon Hausmann  <hausmann@kde.org>
380
381         Done with and reviewed by Lars and Zack.
382
383         Added custom preprocessor support to make_names.pl and use the moc for it in the Qt build.
384
385         * WebCore.pro:
386         * ksvg2/scripts/make_names.pl:
387
388 2007-07-27  Simon Hausmann  <hausmann@kde.org>
389
390         Done with and reviewed by Lars and Zack.
391
392         Disable the batch mode for nmake to work around the clash of Node.c and Node.cpp both mapping to Node.obj
393
394         * WebCore.pro:
395
396 2007-07-27  Simon Hausmann  <hausmann@kde.org>
397
398         Done with and reviewed by Lars and Zack.
399
400         Fix compilation under Windows (removed sys/time.h dependency, use Qt instead).
401
402         * platform/qt/SystemTimeQt.cpp:
403
404 2007-07-27  Simon Hausmann  <hausmann@kde.org>
405
406         Done with and reviewed by Lars and Zack.
407
408         Fix compilation on Windows.
409
410         * platform/graphics/qt/PathQt.cpp:
411
412 2007-07-27  Simon Hausmann  <hausmann@kde.org>
413
414         Done with and reviewed by Lars and Zack.
415
416         Fix generation of ColorData.c on Windows.
417
418         * WebCore.pro:
419
420 2007-07-27  Simon Hausmann  <hausmann@kde.org>
421
422         Done with and reviewed by Lars and Zack.
423
424         Fix compilation under Qt/Windows.
425
426         * loader/icon/IconDatabase.cpp:
427         (WebCore::IconDatabase::open):
428
429 2007-07-27  Simon Hausmann  <hausmann@kde.org>
430
431         Done with and reviewed by Lars and Zack.
432
433         Changed extendedAttributes to be a variable instead of a hash directly. Required to work with ActiveState perl.
434
435         * bindings/scripts/IDLStructure.pm:
436
437 2007-07-27  Simon Hausmann  <hausmann@kde.org>
438
439         Done with and reviewed by Lars and Zack.
440
441         Fix header guard generation for CSSGrammar.h under Windows
442
443         * WebCore.pro:
444
445 2007-07-27  Simon Hausmann  <hausmann@kde.org>
446
447         Done with and reviewed by Lars and Zack.
448
449         Fix build with moc as preprocessor. Don't rely the preprocessor preserving whitespace at the beginning of lines.
450
451         * bindings/scripts/IDLParser.pm:
452
453 2007-07-27  Simon Hausmann  <hausmann@kde.org>
454
455         Done with and reviewed by Lars and Zack.
456
457         Make make-css-file-arrays.pl work on Windows by not calling /usr/bin/gcc as preprocessor for the Qt build.
458
459         * WebCore.pro:
460         * css/make-css-file-arrays.pl:
461
462 2007-07-27  Simon Hausmann  <hausmann@kde.org>
463
464         Done with and reviewed by Lars and Zack.
465
466         More gperf commandline fixes for Windows.
467
468         * WebCore.pro:
469
470 2007-07-27  Simon Hausmann  <hausmann@kde.org>
471
472         Done with and reviewed by Lars and Zack.
473
474         More quoting fixes for perl under Windows.
475
476         * WebCore.pro:
477
478 2007-07-27  Simon Hausmann  <hausmann@kde.org>
479
480         Done with and reviewed by Lars and Zack.
481
482         Fix command quoting under Windows
483
484         * WebCore.pro:
485
486 2007-07-27  Simon Hausmann  <hausmann@kde.org>
487
488         Done with and reviewed by Lars and Zack.
489
490         Fix cssmakeprops and cssmakevalue scripts to work on Windows without cygwin perl. Avoid inplace substitutions and direct invocation of /bin/sh. Also call gperf with arguments that GnuWin32's gperf understands.
491
492         * ksvg2/scripts/cssmakeprops:
493         * ksvg2/scripts/cssmakevalues:
494
495 2007-07-27  Simon Hausmann  <hausmann@kde.org>
496
497         Done with and reviewed by Lars and Zack.
498
499         Beautiful hacks to make more of the extra compiler magic work under Windows outside of cygwin.
500
501         * WebCore.pro:
502
503 2007-07-27  Simon Hausmann  <hausmann@kde.org>
504
505         Done with and reviewed by Lars and Zack.
506
507         Correctly propagate the custom preprocessor option through the idl parser and the codegenerator.
508
509         * bindings/scripts/CodeGenerator.pm:
510         * bindings/scripts/generate-bindings.pl:
511
512 2007-07-27  Simon Hausmann  <hausmann@kde.org>
513
514         Done with and reviewed by Lars and Zack.
515
516         When constructing the absolute path when searching for IDL files in the list of search paths don't prepend a slash if $SOURCEROOT as environment variable is not set. In the Qt build we pass absolute search paths already and we don't set SOURCEROOT. Under Unix that gives a double slash for the directory which works fine, under Windows we get /c:\webkit\foo which of course does not work.
517
518         * bindings/scripts/CodeGenerator.pm:
519
520 2007-07-27  Simon Hausmann  <hausmann@kde.org>
521
522         Done with and reviewed by Lars and Zack.
523
524         Relax the regular expression that tries to find constant declarations in the IDL source to not require leading whitespace. This makes it work with preprocessors that happen to eliminate leading whitespace.
525
526         * bindings/scripts/IDLParser.pm:
527
528 2007-07-27  Simon Hausmann  <hausmann@kde.org>
529
530         Done with and reviewed by Lars and Zack.
531
532         Try to use the moc as preprocessor for the IDL bindings generator
533
534         * WebCore.pro:
535
536 2007-07-27  Simon Hausmann  <hausmann@kde.org>
537
538         Done with and reviewed by Lars and Zack.
539
540         Make it possible to specify the preprocessor the bindings generator uses instead of hardcoding /usr/bin/gcc (which is of course no option on Windows). Also try to use a more portable and Windows friendly way of opening the reading pipe to the preprocessor.
541
542         * bindings/scripts/IDLParser.pm:
543         * bindings/scripts/generate-bindings.pl:
544
545 2007-07-27  Simon Hausmann  <hausmann@kde.org>
546
547         Done with and reviewed by Lars and Zack.
548
549         Don't use stdout redirection for make_names.pl as it doesn't work under Windows perl (outside cygwin).
550
551         * ksvg2/scripts/make_names.pl:
552
553 2007-07-27  Simon Hausmann  <hausmann@kde.org>
554
555         Done with and reviewed by Lars and Zack.
556
557         Fix DocTypeStrings.cpp generation to work on Windows with cmd.exe
558
559         * WebCore.pro:
560
561 2007-07-27  Simon Hausmann  <hausmann@kde.org>
562
563         Reviewed by Lars.
564
565         Work around aliasing bugs in WebCore by compiling with -fno-strict-aliasing for gcc builds for now.
566
567         * WebCore.pro:
568
569 2007-07-27  Simon Hausmann  <hausmann@kde.org>
570
571         Reviewed by Lars.
572
573         Use -Wreturn-type only when compiling with g++
574
575         * WebCore.pro:
576
577 2007-07-27  Simon Hausmann  <hausmann@kde.org>
578
579         Reviewed by Zack.
580
581         Don't use pkg-config on Windows for the Qt build
582
583         * WebCore.pro:
584
585 2007-07-27  Simon Hausmann  <hausmann@kde.org>
586
587         Reviewed by Zack.
588
589         Fix compilation with MSVC.
590
591         * platform/graphics/qt/ImageDecoderQt.cpp:
592
593 2007-07-26  Tristan O'Tierney  <tristan@apple.com>
594
595         Reviewed by Anders Carlsson.
596
597         <rdar://problem/5350019> REGRESSION: Pages on milliyet.com are added to Back list when visited, causing Back button to just reload
598
599         * loader/FrameLoader.cpp:
600         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
601         If the policy action is FrameLoadTypeRedirectLockHistory, don't add the frame load url to the history.
602
603 2007-07-26  Anders Carlsson  <andersca@apple.com>
604
605         Reviewed by Geoff.
606
607         Add a FIXME about caching pages with plug-ins that have outstanding NPObjects.
608         
609         * loader/FrameLoader.cpp:
610         (WebCore::FrameLoader::canCachePage):
611
612 2007-07-26  David Hyatt  <hyatt@apple.com>
613
614         FIx for <rdar://problem/5289721> CrashTracer: [REGRESSION] 2658 crashes in Safari at com.apple.WebCore: WebCore::RenderInline::height const + 16
615
616         Adding a null check for now and an assert.  We don't know how/why this
617         bug happens, but hopefully the assert will help people to reproduce.
618
619         Reviewed by kevin
620
621         * rendering/RenderInline.cpp:
622         (WebCore::RenderInline::height):
623
624 2007-07-26  Anders Carlsson  <andersca@apple.com>
625
626         Reviewed by Oliver.
627
628         <rdar://problem/5362783>
629         In Mail, a crash occurs at WTF::fastMalloc() when attempting to create a new HTML message from http://nytimes.com/
630         
631         If the cache is disabled and there is already a resource with the given URL, return it instead of creating a new one.
632         
633         * loader/DocLoader.cpp:
634         (WebCore::DocLoader::requestResource):
635
636 2007-07-26  Adele Peterson  <adele@apple.com>
637
638         Reviewed by Geoff. 
639
640         Build fix.
641
642         * platform/network/cf/ResourceRequest.h:
643
644 2007-07-26  Anders Carlsson  <andersca@apple.com>
645
646         Reviewed by John Sullivan.
647
648         <rdar://problem/5349389> 
649         Some frame load delegate methods not called when loading a page from the BF cache
650         
651         These calls were moved to FrameLoader::begin, which is never called for pages loaded
652         from the BF cache. This happened in revision 24490.
653          
654         * loader/FrameLoader.cpp:
655         (WebCore::FrameLoader::transitionToCommitted):
656         Call delegate methods if the load is from the BF cache.
657
658 2007-07-26  Kevin McCullough  <kmccullough@apple.com>
659
660         Reviewed by Darin, Geoff and Sam.
661
662         - <rdar://problem/5150461> Resizing the window larger than the screen causes no resize.
663         - We now better match the behavior of other browsers.
664
665         * bindings/js/kjs_window.cpp:
666         (KJS::constrainToVisible):
667         (KJS::WindowFunc::callAsFunction):
668
669 2007-07-26  Tristan O'Tierney  <tristan@apple.com>
670
671         Reviewed by Adele Peterson.
672         
673         <rdar://problem/5359921> WebCore should maintain a dirty flag for confirmation on unsaved changes
674
675         * bindings/objc/DOMHTML.mm:
676         (-[DOMHTMLInputElement _isUserEdited]):
677         (-[DOMHTMLTextAreaElement _isUserEdited]):
678         Renamed _isEdited to _isUserEdited since the functionality is now different
679         
680         * bindings/objc/DOMPrivate.h:
681         Renamed _isEdited to _isUserEdited.
682         
683         * rendering/RenderTextControl.cpp:
684         (WebCore::RenderTextControl::RenderTextControl):
685         Defaulted m_userEdited to false
686         
687         (WebCore::RenderTextControl::updateFromElement):
688         Set m_userEdited to false, since the change wasn't triggered first by an edit
689         
690         (WebCore::RenderTextControl::subtreeHasChanged):
691         Set m_userEdited to true, since it has been touched by the user
692         
693         * rendering/RenderTextControl.h:
694         (WebCore::RenderTextControl::isUserEdited):
695         (WebCore::RenderTextControl::setUserEdited):
696         Added two new methods to set/return the userEdited boolean value.
697         
698 2007-07-26  Geoffrey Garen  <ggaren@apple.com>
699
700         Reviewed by Beth Dakin.
701
702         Fixed NULL-dereference crash seen on buildbot.
703         
704         No bug filed because this is a part of <rdar://problem/5241167>.
705
706         * history/PageCache.h:
707         (WebCore::PageCache::get): NULL-check HistoryItems passed to get()
708         and remove(), to match the old semantics of HashMap. For clarity,
709         ASSERT that add() is not called with NULL arguments.
710
711 2007-07-26  Anders Carlsson  <andersca@apple.com>
712
713         Reviewed by Oliver Hunt.
714
715         <rdar://problem/5361106> Crash in user style sheet when loading webpage
716
717         Null check m_frame.
718         
719         * dom/Document.cpp:
720         (WebCore::Document::stylesheetLoaded):
721
722 2007-07-26  Geoffrey Garen  <ggaren@apple.com>
723
724         Used `svn merge -r24646:24645' to revert project changes I accidentally
725         checked in.
726
727         * WebCore.xcodeproj/project.pbxproj:
728
729 2007-07-26  Geoffrey Garen  <ggaren@apple.com>
730
731         Reviewed by Darin Adler.
732
733         Fixed <rdar://problem/5241167> REGRESSION: PLT 1% slower due to r21793 
734         (global page cache cap)
735         
736         I just measured a .1%-.2% regression in PLT average, but a .4% win in 
737         PLT fastest run, so I think this regression is licked.
738
739         Surprisingly, the combination of wtf data structures I originally used 
740         for PageCache turned out to be too slow, so I reworked PageCache to use
741         a hand-crafted linked list for LRU tracking (instead of ListHashSet), 
742         to store its CachedPages in the HistoryItems to which they corresponded 
743         (instead of using a HashMap), and to ref/deref HistoryItems manually
744         (instead of using RefPtr, which would ref once for every reference in 
745         the linked list).
746
747         * history/HistoryItem.h: Added data members for PageCache data. Made
748         PageCache a friend so it could access them. Ideally (from an 
749         encapsulation perspective), we would store this data an independent 
750         structure, but that's just too slow.
751
752         * history/PageCache.cpp: Added a hand-crafted linked list for LRU 
753         tracking.
754         (WebCore::PageCache::PageCache):
755         (WebCore::PageCache::add): Adopt the HistoryItem's ref when it's added.
756         (WebCore::PageCache::remove): deref() the Historyitem when it's 
757         removed.
758         (WebCore::PageCache::prune):
759         (WebCore::PageCache::addToLRUList):
760         (WebCore::PageCache::removeFromLRUList):
761
762         * history/PageCache.h:
763         (WebCore::PageCache::get): Inlined just in case.
764
765 2007-07-26  Adam Treat  <treat@kde.org>
766
767         Reviewed by George Staikos.
768
769         Launch the context menu in the right place.
770
771         * platform/qt/ContextMenuQt.cpp:
772         (WebCore::ContextMenu::setPlatformDescription):
773
774 2007-07-25  Maciej Stachowiak  <mjs@apple.com>
775
776         Reviewed by Mark.
777
778         - follow-up to previous change to avoid assertion failures in debug
779         
780         * xml/XMLHttpRequest.cpp:
781         (WebCore::XMLHttpRequest::getResponseText): hold JSLock when needed
782         (WebCore::XMLHttpRequest::open): ditto
783         (WebCore::XMLHttpRequest::didFinishLoading): ditto
784         (WebCore::XMLHttpRequest::didReceiveData): ditto
785         * xml/XMLHttpRequest.h:
786
787 2007-07-25  Anders Carlsson  <andersca@apple.com>
788
789         Reviewed by Darin.
790
791         <rdar://problem/5327912> 
792         iDisk: Web iDisk & main iDisk appear blank
793         
794         Prepend any remaining text that scripts might have written.
795         
796         * html/HTMLTokenizer.cpp:
797         (WebCore::HTMLTokenizer::scriptExecution):
798
799 2007-07-25  Kevin McCullough  <kmccullough@apple.com>
800
801         Reviewed by Tim, Darin, Oliver.
802
803         - <rdar://problem/5329440> REGRESSION: Clicking links with the feed:// protocol in Safari 3 does nothing
804         - Check for file:// urls when clicking links, not block all schemes that are treated as local.
805
806         * loader/FrameLoader.cpp:
807         (WebCore::FrameLoader::load):
808
809 2007-07-25  Maciej Stachowiak  <mjs@apple.com>
810
811         Reviewed by Darin.
812
813         - fixed <rdar://problem/5300291> Optimize GC to reclaim big, temporary objects (like XMLHttpRequest.responseXML) quickly
814         
815         With this plus related JavaScriptCore changes, a number of XMLHttpRequest situations that
816         result in huge data sets are addressed, including a single huge responseXML on an XMR done
817         repeatedly, or accessing responseText repeatedly during loading of a single large XHR.
818         
819         In addition to the GC changes in JavaScriptCore, I changed responseText to be stored as a
820         KJS::UString instead of a WebCore::String so that the JavaScript responseText value can
821         share the buffer (indeed multiple intermediate responseTexts can share its buffer).
822
823         
824         First of all, here's some manual test cases that will each blow out the process VM without this fix,
825         but will settle into decent steady state with.
826         
827         * manual-tests/memory: Added.
828         * manual-tests/memory/MessageUidsAlreadyDownloaded2: Added.
829         * manual-tests/memory/string-growth.html: Added.
830         * manual-tests/memory/xhr-multiple-requests-responseText.html: Added.
831         * manual-tests/memory/xhr-multiple-requests-responseXML.html: Added.
832         * manual-tests/memory/xhr-multiple-requests.html: Added.
833         * manual-tests/memory/xhr-repeated-string-access.xml: Added.
834
835         And here's the actual code changes:
836         
837         * WebCore.xcodeproj/project.pbxproj:
838         * bindings/js/JSDocumentCustom.cpp:
839         (WebCore::toJS): Record extra cost if the document is frameless (counting the nodes
840         doesn't make a measurable performance difference here in any case I could find)
841         * bindings/js/JSXMLHttpRequest.cpp:
842         (KJS::JSXMLHttpRequest::getValueProperty): Adjust for the fact that ressponseText
843         is now stored as a UString.
844         * bindings/js/kjs_binding.cpp:
845         (KJS::jsOwnedStringOrNull): New helper.
846         * bindings/js/kjs_binding.h:
847         * xml/XMLHttpRequest.cpp:
848         (WebCore::XMLHttpRequest::getResponseText): It's a UString!
849         (WebCore::XMLHttpRequest::getResponseXML): handle the fact that m_responseText
850         is a UString.
851         (WebCore::XMLHttpRequest::XMLHttpRequest): ditto.
852         (WebCore::XMLHttpRequest::abort): call dropProtection
853         (WebCore::XMLHttpRequest::didFinishLoading): call dropProtection
854         (WebCore::XMLHttpRequest::dropProtection): after removing our GC protection,
855         report extra cost of this XHR's responseText buffer.
856         * xml/XMLHttpRequest.h:
857
858 2007-07-25  Timothy Hatcher  <timothy@apple.com>
859
860         Reviewed by Brady.
861
862         <rdar://problem/4796657> table deletion outline does not always follow the table size as editing occurs inside
863
864         Change the outline element to position itself automaticlly using the top, left, bottom and right CSS properties.
865         This made the container element redundant, so it has been removed. Now the outline element and the delete button
866         both get appended to the target element and positioned based on that container element. This removes the need
867         to update the width and height when the target contents changed.
868
869         * editing/DeleteButtonController.cpp:
870         (WebCore::DeleteButtonController::show): Change the style properties and remove the container element.
871         (WebCore::DeleteButtonController::hide): Remove the button and outline from the target element.
872         * editing/DeleteButtonController.h: Removed updateOutlineStyle, respondToChangedContents and m_containerElement.
873         * editing/Editor.cpp:
874         (WebCore::Editor::respondToChangedContents): Remove the call to DeleteButtonController respondToChangedContents.
875
876 2007-07-25  Anders Carlsson  <andersca@apple.com>
877
878         Reviewed by Darin.
879
880         <rdar://problem/5344471>
881         CrashTracer: [USER] 1 crash in Mail at WebCore::PluginTokenizer::writeRawData(char const*, int)
882         
883         Make sure to layout so we'll have a renderer. Also null-check the renderer for extra safety.
884         
885         * loader/PluginDocument.cpp:
886         (WebCore::PluginTokenizer::writeRawData):
887
888 2007-07-25  Marvin Decker  <marv.decker@gmail.com>
889
890         Reviewed by Maciej, Darin.
891
892         - http://bugs.webkit.org/show_bug.cgi?id=14030
893
894         Add ResourceHandle::setClient to resolve some messiness with handle
895         releasing. Clear the client when ResourceLoader is going to release
896         the handle to prevent crashes in the case where somebody still holds a
897         reference (this doesn't seem to currently happen in practice). Add
898         NULL-checking for ResourceHandle implementations using the client.
899
900         * loader/ResourceLoader.cpp:
901         (WebCore::ResourceLoader::releaseResources):
902         * platform/network/ResourceHandle.cpp:
903         (WebCore::ResourceHandle::fireBlockedFailure):
904         (WebCore::ResourceHandle::setClient):
905         * platform/network/ResourceHandle.h:
906         * platform/network/cf/ResourceHandleCFNet.cpp:
907         (WebCore::willSendRequest):
908         (WebCore::didReceiveResponse):
909         (WebCore::didReceiveData):
910         (WebCore::didFinishLoading):
911         (WebCore::didFail):
912         (WebCore::willCacheResponse):
913         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
914         (WebCore::ResourceHandle::receivedCancellation):
915         * platform/network/mac/ResourceHandleMac.mm:
916         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
917         (WebCore::ResourceHandle::didCancelAuthenticationChallenge):
918         (WebCore::ResourceHandle::receivedCancellation):
919         (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
920         (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
921         (-[WebCoreResourceHandleAsDelegate connection:didReceiveData:lengthReceived:]):
922         (-[WebCoreResourceHandleAsDelegate connection:willStopBufferingData:]):
923         (-[WebCoreResourceHandleAsDelegate connectionDidFinishLoading:]):
924         (-[WebCoreResourceHandleAsDelegate connection:didFailWithError:]):
925         (-[WebCoreResourceHandleAsDelegate connection:willCacheResponse:]):
926
927 2007-07-25  Maxime Britto  <mbritto@pleyo.com>
928
929         Reviewed by Darin.
930
931         - fix http://bugs.webkit.org/show_bug.cgi?id=11756
932           <rdar://problem/5286420>
933
934         Fix a typo error to really compare the present domain to the domain of the parent of the targeted frame.
935
936         * loader/FrameLoader.cpp: (WebCore::FrameLoader::canTarget):
937
938 2007-07-25  Mitz Pettel  <mitz@webkit.org>
939
940         Reviewed by Darin.
941
942         - fix http://bugs.webkit.org/show_bug.cgi?id=14758
943           REGRESSION: Repeated text after line break on facebook.com
944
945         Test: fast/text/reset-emptyRun.html
946
947         * platform/BidiResolver.h:
948         (WebCore::::deleteRuns): Re-add a line that was removed for no reason at all
949         during refactoring in r24485.
950         * rendering/bidi.cpp:
951         (WebCore::BidiState::deleteRuns): Ditto.
952
953 2007-07-24  Oliver Hunt  <oliver@apple.com>
954
955         Reviewed by Adam and Justin.
956
957         <rdar://problem/5141779> WebView editableDOMRangeForPoint: & moveDragCaretToPoint: returns last position in DOMText range
958
959         Remove bridge implementation for editableDOMRangeForPoint: and moveDragCaretToPoint:. 
960         Now use cross-platform code Editor::rangeForPoint and DragController::placeDragCaret instead.
961         This required lifting local code from DragController.cpp into the shared methods
962         Frame::visiblePositionForPoint and Frame::documentAtPoint.
963
964         * WebCore.exp:
965         * editing/Editor.cpp:
966         (WebCore::Editor::rangeForPoint):
967         * editing/Editor.h:
968         * page/DragController.cpp:
969         (WebCore::DragController::dragEnded):
970         (WebCore::DragController::performDrag):
971         (WebCore::DragController::dragEnteredOrUpdated):
972         (WebCore::DragController::tryDocumentDrag):
973         (WebCore::DragController::operationForLoad):
974         (WebCore::setSelectionToDragCaret):
975         (WebCore::DragController::concludeDrag):
976         (WebCore::DragController::placeDragCaret):
977         * page/DragController.h:
978         * page/Frame.cpp:
979         (WebCore::Frame::visiblePositionForPoint):
980         (WebCore::Frame::documentAtPoint):
981         * page/Frame.h:
982         * page/mac/WebCoreFrameBridge.h:
983         * page/mac/WebCoreFrameBridge.mm:
984
985 2007-07-24  Sam Weinig  <sam@webkit.org>
986
987         Rubber-stamped by Adam Roben.
988
989         Remove unused .strip files.
990
991         * WebCore.xcodeproj/project.pbxproj:
992
993 2007-07-24  Adele Peterson  <adele@apple.com>
994
995         Reviewed by Hyatt.
996
997         Fix for <rdar://problem/5308492> Computed width for elements with box-sizing: border-box is not equal to the width set in the CSS
998
999         Test: fast/css/getComputedStyle-border-box.html
1000
1001         * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1002           For the width and height properties, when you get the value from the renderer, use the renderer's box sizing value to determine the size.
1003
1004 2007-07-24  Anders Carlsson  <andersca@apple.com>
1005
1006         Reviewed by Kevin Decker.
1007
1008         <rdar://problem/5355781>
1009         REGRESSION: reproducible crash in CoreFoundation!CFRunLoopFinished on Flash pages
1010         
1011         Null check the loader.
1012         
1013         * plugins/win/PluginStreamWin.cpp:
1014         (WebCore::PluginStreamWin::start):
1015
1016 2007-07-24  Adele Peterson  <adele@apple.com>
1017
1018         Reviewed by Hyatt and Adam.
1019
1020         Fix for <rdar://problem/5130590> REGRESSION: style="width:1px" on <select> element no longer hides the element
1021
1022         Removed hack that forced large padding on popup buttons.  Now we put that padding in the inner block, so that
1023         the specified width will be honored.
1024
1025         * rendering/RenderMenuList.cpp:
1026         (WebCore::RenderMenuList::adjustInnerStyle): Set the padding on the inner block based on the metrics provided by the theme.
1027         (WebCore::RenderMenuList::controlClipRect): Clip to the intersection of the inner content box and the outer content box.
1028          This will leave room for the arrows which sit in the inner box padding, and if the inner box ever spills out of the outer box, 
1029          that will get clipped too.
1030         (WebCore::RenderMenuList::calcPrefWidths):  Add in the inner box's padding and border to the pref widths.
1031
1032         * rendering/RenderThemeMac.mm:
1033         (WebCore::RenderThemeMac::paintMenuList): Only inflate the rect for the shadow if the rect is big enough to fit the whole control.
1034          Also, on Leopard, the NSCell will draw outside of a small rect, so add a clip for that case.
1035         (WebCore::RenderThemeMac::paintMenuListButton): Restrict font scale to make sure the arrows will actually fit in the bounds vertically.
1036          Don't draw the arrows if they won't fit horizontally.  Reset padding.  Since WinIE doesn't honor padding for popups, its not critical to
1037          support padding at this time.
1038         (WebCore::RenderThemeMac::adjustMenuListStyle): Don't set the padding here.  Instead, we're going to set the padding on the inner block of the select.
1039         (WebCore::RenderThemeMac::adjustMenuListButtonStyle): ditto.
1040         (WebCore::RenderThemeMac::popupInternalPaddingLeft): Added.  Provides internal padding values for RenderMenuList.
1041         (WebCore::RenderThemeMac::popupInternalPaddingRight): ditto.
1042         (WebCore::RenderThemeMac::popupInternalPaddingTop): ditto.
1043         (WebCore::RenderThemeMac::popupInternalPaddingBottom): ditto.
1044         * rendering/RenderThemeMac.h:
1045
1046         * rendering/RenderThemeSafari.cpp:  The same changes that were made to RenderThemeMac were made here, with variations for the arrow differences.
1047           This code should be refactored and shared, but now did not seem like the right time to do that refactoring.
1048         (WebCore::RenderThemeSafari::paintMenuList):
1049         (WebCore::RenderThemeSafari::paintMenuListButton):
1050         (WebCore::RenderThemeSafari::adjustMenuListStyle):
1051         (WebCore::RenderThemeSafari::popupInternalPaddingLeft):
1052         (WebCore::RenderThemeSafari::popupInternalPaddingRight):
1053         (WebCore::RenderThemeSafari::popupInternalPaddingTop):
1054         (WebCore::RenderThemeSafari::popupInternalPaddingBottom):
1055         (WebCore::RenderThemeSafari::adjustMenuListButtonStyle):
1056         * rendering/RenderThemeSafari.h:
1057
1058         * rendering/RenderTheme.h: Added to provide internal padding values for RenderMenuList.
1059         (WebCore::RenderTheme::popupInternalPaddingLeft):
1060         (WebCore::RenderTheme::popupInternalPaddingRight):
1061         (WebCore::RenderTheme::popupInternalPaddingTop):
1062         (WebCore::RenderTheme::popupInternalPaddingBottom):
1063
1064 2007-07-24  Lars Knoll  <lars@trolltech.com>
1065
1066         Reviewed by Adam Roben & David Kilzer.
1067
1068         replace the makeprop and makevalues shell scripts by equivalent perl versions. This is required to remove the last shell dependency when building QtWebKit on Windows.
1069
1070         * DerivedSources.make:
1071         * WebCore.pro:
1072         * WebCore.xcodeproj/project.pbxproj:
1073         * css/makeprop: Added.
1074         * css/makeprop.pl: Removed.
1075         * css/makevalues: Added.
1076         * css/makevalues.pl: Removed.
1077
1078 2007-07-24  Beth Dakin  <bdakin@apple.com>
1079
1080         Reviewed by Darin.
1081
1082         Fix for http://bugs.webkit.org/show_bug.cgi?id=14714 REGRESSION: 
1083         ASSERTION FAILED: i < size() in Vector.h:401 on negative -webkit-
1084         column-width
1085         - and -
1086         http://bugs.webkit.org/show_bug.cgi?id=14718 REGRESSION: ASSERTION 
1087         FAILED: i < size() in Vector.h:401 on zero -webkit-column-count
1088
1089         * rendering/RenderBlock.cpp:
1090         (WebCore::RenderBlock::calcColumnWidth): Make 1 the minimum value 
1091         for column-width and column-count. Since the spec does not address 
1092         what to do with negative values for these properties, we are 
1093         patching the rendering code instead of the parser.
1094
1095 2007-07-24  Anders Carlsson  <andersca@apple.com>
1096
1097         Reviewed by Steve.
1098         
1099         <rdar://problem/5355403>
1100         REGRESSION: 303A2 does not display pdf files with AdobeReader 8.1
1101         
1102         Close the file before handing off the file name to the plug-in.
1103         
1104         * plugins/win/PluginStreamWin.cpp:
1105         (WebCore::PluginStreamWin::destroyStream):
1106
1107 2007-07-24  Alp Toker  <alp.toker@collabora.co.uk>
1108
1109         Reviewed by Adam.
1110
1111         http://bugs.webkit.org/show_bug.cgi?id=14711
1112         RenderThemeGdk's buttons are state-agnostic (pressed, hovered)
1113
1114         Remove unnecessary label from widget instances.
1115         Render check and radio widgets correctly.
1116         Determine the widget state and render it appropriately.
1117
1118         * platform/gdk/RenderThemeGdk.cpp:
1119         (WebCore::RenderThemeGdk::determineState):
1120         (WebCore::RenderThemeGdk::paintCheckbox):
1121         (WebCore::RenderThemeGdk::paintRadio):
1122         (WebCore::RenderThemeGdk::paintButton):
1123         (WebCore::RenderThemeGdk::gtkButton):
1124         (WebCore::RenderThemeGdk::gtkCheckbox):
1125         (WebCore::RenderThemeGdk::gtkRadioButton):
1126         * platform/gdk/RenderThemeGdk.h:
1127
1128 2007-07-24  Mark Rowe  <mrowe@apple.com>
1129
1130         Reviewed by Antti.
1131
1132         <rdar://problem/5356666> NSMenuItem's seen leaking on buildbot
1133
1134         * platform/mac/ContextMenuItemMac.mm:
1135         (WebCore::ContextMenuItem::releasePlatformDescription): Transfer ownership from the RetainPtr's CF-based retain
1136         count to the Foundation retain count so that callers of releasePlatformDescription can use -[NSObject release]
1137         to dispose of it in a manner that won't leak under Obj-C GC.
1138         * platform/mac/ContextMenuMac.mm:
1139         (WebCore::ContextMenu::appendItem): Release platformItem as we were transferred its ownership by releasePlatformDescription.
1140         (WebCore::ContextMenu::insertItem): ditto.
1141
1142 2007-07-24  Mitz Pettel  <mitz@webkit.org>
1143
1144         Reviewed by Darin.
1145
1146         - fix http://bugs.webkit.org/show_bug.cgi?id=14684
1147           Hebrew text in Safari chrome is reversed (LTR instead of RTL)
1148
1149         Test: fast/text/drawBidiText.html
1150
1151         * WebCore.pro:
1152         * WebCore.vcproj/WebCore.vcproj:
1153         * WebCore.xcodeproj/project.pbxproj:
1154         * WebCoreSources.bkl:
1155         * manual-tests/chrome-bidi-text.html: Added.
1156         * manual-tests/resources/chrome-bidi-text-window.html: Added.
1157         * platform/BidiReorderCharacters.cpp: Removed.
1158         * platform/BidiReorderCharacters.h: Removed.
1159         * platform/BidiResolver.h:
1160         (WebCore::BidiCharacterRun::start): Added accessor method.
1161         (WebCore::BidiCharacterRun::stop): Ditto.
1162         (WebCore::BidiCharacterRun::level): Ditto.
1163         (WebCore::BidiCharacterRun::next): Ditto.
1164         (WebCore::::appendRun): Added default implementation.
1165         * platform/TextStyle.h:
1166         (WebCore::TextStyle::setDirectionalOverride): Added accessor method.
1167         * platform/graphics/GraphicsContext.cpp:
1168         (WebCore::TextRunIterator::TextRunIterator): Added. A BidiResolver-
1169         compliant iterator over the characters in a TextRun.
1170         (WebCore::TextRunIterator::offset):
1171         (WebCore::TextRunIterator::increment):
1172         (WebCore::TextRunIterator::atEnd):
1173         (WebCore::TextRunIterator::current):
1174         (WebCore::TextRunIterator::direction):
1175         (WebCore::TextRunIterator::operator==):
1176         (WebCore::TextRunIterator::operator!=):
1177         (WebCore::GraphicsContext::drawBidiText): Added. Applies the Unicode
1178         Bidi Algorithm to the text and draws the resulting unidirectional runs
1179         in the right order and with the right directionality.
1180         * platform/graphics/GraphicsContext.h:
1181         * platform/win/PopupMenuWin.cpp:
1182         (WebCore::PopupMenu::paint): Replaced the use of a character buffer
1183         and BidiReorderCharacters with calling to drawBidiText(). Removed special
1184         handling of '-webkit-rtl-ordering:visual' because that CSS property is an
1185         implementation detail of WebCore's visual Hebrew support, and the UA stylesheet
1186         sets it to 'logical' for this form control. Authors can specify the ordering
1187         using the 'direction' and 'unicode-bidi' properties.
1188         * platform/win/WebCoreTextRenderer.cpp:
1189         (WebCore::isOneLeftToRightRun): Added. Checks if the text consists of
1190         a single left-to-right run, in which case it requires no bidi processing.
1191         (WebCore::doDrawTextAtPoint): Changed to call drawBidiText if the text
1192         is not entirely left-to-right.
1193         * rendering/RenderFileUploadControl.cpp:
1194         (WebCore::RenderFileUploadControl::paintObject): Replaced the use of a
1195         character buffer in BidiReorderCharacters with calling to drawBidiText().
1196         Removed special handling of '-webkit-rtl-ordering:visual' for the same reason
1197         stated above.
1198         * rendering/RenderListBox.cpp:
1199         (WebCore::RenderListBox::paintItemForeground): Ditto. Also changed the
1200         run-rounding modes used when drawing to match those used when measuring.
1201
1202 2007-07-23  Oliver Hunt  <oliver@apple.com>
1203
1204         Reviewed by Steve.
1205
1206         Windows build fix, remove superfluous !
1207
1208         * page/EventHandler.cpp:
1209         (WebCore::EventHandler::keyEvent):
1210
1211 2007-07-23  Adam Roben  <aroben@apple.com>
1212
1213         Add an assignment operator for BString that takes a BSTR
1214
1215         Reviewed by Geoff and Oliver.
1216
1217         * platform/win/BString.cpp:
1218         (WebCore::BString::operator=):
1219         * platform/win/BString.h:
1220
1221 2007-07-23  Justin Garcia  <justin.garcia@apple.com>
1222
1223         Reviewed by Geoff.
1224         
1225         <rdar://problem/5354455> Word selection when right-clicking can be confusing (14728)
1226
1227         * page/EventHandler.cpp:
1228         (WebCore::EventHandler::sendContextMenuEvent): In non-editable content,
1229         only do word selection over text.  In editable content, we will continue
1230         to select images, line breaks and other elements on right-clicks, to match 
1231         TextEdit.  For now, in editable content, we'll live with the cases where 
1232         positionForPoint creates selections that aren't underneath the mouse.  These
1233         aren't regressions because we've always done word selection on right clicks
1234         in editable content.
1235
1236 2007-07-23  Anders Carlsson  <andersca@apple.com>
1237
1238         Reviewed by Oliver.
1239
1240         <rdar://problem/5335354>
1241         REGRESSION(r21359-r21368): Can't edit inside RTEF editable region
1242         
1243         If Document::open is called and there's a pending load that has not yet started,
1244         that load should be cancelled.
1245         
1246         * dom/Document.cpp:
1247         (WebCore::Document::open):
1248
1249 2007-07-23  Timothy Hatcher  <timothy@apple.com>
1250
1251         Reviewed by Hyatt.
1252
1253         <rdar://problem/5242145> REGRESSION: Clicking on symbol in documentation often doesn't scroll to symbol
1254
1255         A renderer for the anchor wasn't always available at the time parsing finished. So we need
1256         to bail out of gotoAnchor if stylesheets are pending and remember to call gotoAnchor later
1257         once all of the pending stylesheets load.
1258
1259         * dom/Document.cpp:
1260         (WebCore::Document::Document): Initialize m_gotoAnchorNeededAfterStylesheetsLoad to false.
1261         (WebCore::Document::stylesheetLoaded): If we have no more pending stylesheets, call gotoAnchor if needed.
1262         * dom/Document.h:
1263         (WebCore::Document::gotoAnchorNeededAfterStylesheetsLoad): New method.
1264         (WebCore::Document::setGotoAnchorNeededAfterStylesheetsLoad): Ditto.
1265         * loader/FrameLoader.cpp:
1266         (WebCore::FrameLoader::gotoAnchor): Bail early if the document still has pending stylesheets.
1267         * loader/FrameLoader.h: Make gotoAnchor() public.
1268
1269 2007-07-23  John Sullivan  <sullivan@apple.com>
1270
1271         Reviewed by Darin
1272         
1273         - fixed <rdar://problem/5327887> Printing Mail note (or Safari page) with misspelled word prints red underline
1274
1275         * rendering/InlineTextBox.cpp:
1276         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
1277         When printing, bail out without doing any work. Also moved a couple of lines down below another early
1278         bailout since they were pointless above it.
1279
1280 2007-07-23  Oliver Hunt  <oliver@apple.com>
1281
1282         Reviewed by Darin.
1283         
1284         <rdar://problem/5353577> WebKit key event behaviour needs to better match other browsers keyevent behaviour
1285         <rdar://problem/5352152> REGRESSION (24399-24479): Pressing Enter in a search field at apple.com no longer starts a search with Korean IM
1286         <rdar://problem/5352649> WebKit should send keyDown event on autorepeat keyDowns
1287         http://bugs.webkit.org/show_bug.cgi?id=14690
1288
1289         Perform Input Method call first so that our behaviour is determined by whether or not 
1290         the input method has actually handle the event, rather than by making guesses based 
1291         on the existences of marked text.  This fixes issues with IMs that have side effects
1292         even on events they do not handle.
1293
1294         Refactored the code in order to improve clarity given the hoisting required by performing
1295         the IM call earlier.
1296
1297         * page/EventHandler.cpp:
1298         (WebCore::EventHandler::keyEvent):
1299
1300 2007-07-23  Anders Carlsson  <andersca@apple.com>
1301
1302         Reviewed by Darin.
1303
1304         <rdar://problem/5045711> 
1305         http://bugs.webkit.org/show_bug.cgi?id=12938
1306         Google calendar settings page crashes
1307         
1308         Move handling of checked radio buttons to a new class, HTMLFormElement::CheckedRadioButtons. 
1309         Each <form> element has an instance of this class. For radio buttons without a containing 
1310         form, the document has an instance of HTMLFormElement::CheckedRadioButtons where the
1311         state of those radio buttons will be stored.
1312         be stored.
1313         
1314         This also fixes another bug where removing a checked radio button that does not have a
1315         containing form would not remove the radio button from the checked radio buttons map,
1316         which could lead to a crash due to a dangling pointer.
1317         
1318         * dom/Document.cpp:
1319         (WebCore::Document::~Document):
1320         * dom/Document.h:
1321         (WebCore::Document::checkedRadioButtons):
1322         * html/HTMLFormElement.cpp:
1323         (WebCore::HTMLFormElement::registerFormElement):
1324         (WebCore::HTMLFormElement::removeFormElement):
1325         (WebCore::HTMLFormElement::CheckedRadioButtons::didCheckButton):
1326         (WebCore::HTMLFormElement::CheckedRadioButtons::checkedButtonForGroup):
1327         (WebCore::HTMLFormElement::CheckedRadioButtons::removeButtonIfChecked):
1328         * html/HTMLFormElement.h:
1329         (WebCore::HTMLFormElement::checkedRadioButtons):
1330         * html/HTMLGenericFormElement.cpp:
1331         (WebCore::HTMLGenericFormElement::insertedIntoTree):
1332         * html/HTMLInputElement.cpp:
1333         (WebCore::HTMLInputElement::~HTMLInputElement):
1334         (WebCore::checkedRadioButtons):
1335         (WebCore::HTMLInputElement::isKeyboardFocusable):
1336         (WebCore::HTMLInputElement::setInputType):
1337         (WebCore::HTMLInputElement::parseMappedAttribute):
1338         (WebCore::HTMLInputElement::setChecked):
1339         (WebCore::HTMLInputElement::preDispatchEventHandler):
1340         (WebCore::HTMLInputElement::willMoveToNewOwnerDocument):
1341         * manual-tests/remove-form-node-with-radio-buttons-crash.html: Added.
1342
1343 2007-07-23  David Hyatt  <hyatt@apple.com>
1344
1345         Fix for 5350587, hang in iExploder text 8101.  The code that painted outlines for continuations was buggy
1346         in that it assumed the chain was always inline-block-inline, but this is only true for the innermost chained
1347         continuation.  To make this more robust, we always just use the inline's containing block's containing block,
1348         which should be guaranteed to enclose all renderers in the continuation chain.  In addition, there is now a
1349         null check (to guarantee no more hangs) and an assert (to check if we hit this situation again where the block
1350         used to paint does not properly enclose the continuation chain).
1351
1352         Reviewed by beth
1353
1354         fast/inline/outline-continuation.html
1355
1356         * rendering/RenderBlock.cpp:
1357         (WebCore::RenderBlock::paintContinuationOutlines):
1358         * rendering/InlineFlowBox.cpp:
1359         (WebCore::RenderInline::paint):
1360
1361 2007-07-22  Holger Hans Peter Freyther  <zecke@selfish.org>
1362
1363         Reviewed by Adam.
1364
1365         WARNING: NO TEST CASES ADDED OR CHANGED
1366
1367         Add the WebKit/Gtk API to the buildsystem, ask qmake to create a
1368         pkg-config file and install headers and libraries.
1369
1370         Start to emit signals from FrameLoaderClientGdk, hide the kit Frame
1371         inside the the FrameLoaderClientGdk.
1372
1373         Move ChromeClientGdk to WebKit/gtk/WebCoreSupport
1374
1375         * WebCore.pro:
1376         * loader/gdk/FrameLoaderClientGdk.cpp:
1377         * loader/gdk/FrameLoaderClientGdk.h:
1378         * platform/gdk/ChromeClientGdk.h: Removed.
1379         * platform/gdk/FrameGdk.cpp: Remove code not belonging here
1380         * platform/gdk/FrameGdk.h:
1381         * platform/gdk/ScrollViewGdk.cpp: The gdkDrawable won't exist at that time and it is fine
1382         * platform/gdk/TemporaryLinkStubs.cpp: Removed ChromeClientGdk stubs
1383
1384 2007-07-22  Maciej Stachowiak  <mjs@apple.com>
1385
1386         Reviewed by Adam.
1387
1388         <rdar://problem/5353174> REGRESSION: 1% JavaScript performance regression fro Window refactoring (14717)
1389         http://bugs.webkit.org/show_bug.cgi?id=14717
1390         
1391         * bindings/js/kjs_window.cpp:
1392         * bindings/js/kjs_window.h:
1393         (KJS::Window::impl): inlined
1394         * page/DOMWindow.cpp:
1395         * page/DOMWindow.h:
1396         (WebCore::DOMWindow::frame): inlined
1397
1398 2007-07-22  Darin Adler  <darin@apple.com>
1399
1400         * platform/ContextMenu.cpp: Added missing include.
1401
1402 2007-07-22  Sam Weinig  <sam@webkit.org>
1403
1404         Reviewed by Darin.
1405
1406         Fix for http://bugs.webkit.org/show_bug.cgi?id=14682
1407         REGRESSION(24285-24399): alerts do not appear at W3C RTL test page
1408
1409         Test: fast/dom/Window/window-function-name-getter-precedence.html
1410
1411         * bindings/js/JSDOMWindowCustom.cpp:
1412         (WebCore::JSDOMWindow::customGetOwnPropertySlot): Make sure to return functions
1413         before the custom name getter.
1414
1415 2007-07-22  Darin Adler  <darin@apple.com>
1416
1417         Reviewed by Adam.
1418
1419         - fix <rdar://problem/5353263> ContextMenuItem and ContextMenu objects leaking (seen on buildbot)
1420
1421         * platform/ContextMenu.cpp:
1422         (WebCore::separatorItem): Return an auto_ptr instead of a raw pointer, since this function
1423         creates an object that's the caller's responsibility to delete.
1424         (WebCore::createAndAppendFontSubMenu): Create the context menu on the stack, not the heap,
1425         since setSubMenu does not take ownership, and hence the objects were leaking.
1426         (WebCore::createAndAppendSpellingAndGrammarSubMenu): Ditto.
1427         (WebCore::createAndAppendSpellingSubMenu): Ditto.
1428         (WebCore::createAndAppendSpeechSubMenu): Ditto.
1429         (WebCore::createAndAppendWritingDirectionSubMenu): Ditto.
1430
1431 2007-07-22  Darin Adler  <darin@apple.com>
1432
1433         Reviewed by Kevin Decker.
1434
1435         - fix <rdar://problem/5126394> REGRESSION: Crash after clicking back button in test application (13250)
1436           http://bugs.webkit.org/show_bug.cgi?id=13250
1437
1438         * bindings/objc/WebScriptObject.mm:
1439         (_didExecute): Removed unnecessary check for isValid() since the _rootObject method already
1440         takes care of that check.
1441         (-[WebScriptObject _imp]): Made this return 0 if there is not a valid rootObject.
1442         (-[WebScriptObject _isSafeScript]): Made this always return false if there is not a valid
1443         rootObject, eliminating the need to check _rootObject for nil if the code is checking _isSafeScript.
1444         (-[WebScriptObject callWebScriptMethod:withArguments:]): Removed check of _rootObject, since it's
1445         immediately followed by a check of _isSafeScript. Removed awkward conversion of name from NSString *
1446         to KJS::Identifier and did it using WebCore::String instead -- makes it clear that there's no
1447         arbitrary JavaScript execution after _isSafeScript and before _imp, so we don't need to null-check
1448         the _imp pointer. Added a second check of _isSafeScript after calling get to get the function
1449         object, since arbitrary changes could occur in there, including navigation to a new frame.
1450         This also takes care of null checking the second call to _imp.
1451         (-[WebScriptObject evaluateWebScript:]): Removed check of _rootObject, since it's
1452         immediately followed by a check of _isSafeScript. Removed awkward conversion of script from NSString *
1453         to KJS::Identifier and did it using WebCore::String instead -- makes it clear that there's no
1454         arbitrary JavaScript execution after _isSafeScript and before _imp, so we don't need to null-check
1455         the _imp pointer.
1456         (-[WebScriptObject setValue:forKey:]): Removed check of _rootObject, since it's
1457         immediately followed by a check of _isSafeScript. Removed awkward conversion of key from NSString *
1458         to KJS::Identifier and did it using WebCore::String instead -- makes it clear that there's no
1459         arbitrary JavaScript execution after _isSafeScript and before _imp, so we don't need to null-check
1460         the _imp pointer.
1461         (-[WebScriptObject valueForKey:]): Ditto.
1462         (-[WebScriptObject removeWebScriptKey:]): Ditto.
1463         (-[WebScriptObject stringRepresentation]): Removed check of _rootObject, since it's
1464         immediately followed by a check of _isSafeScript. Removed unnecessary local variable
1465         and const_cast from the call to the _imp method.
1466         (-[WebScriptObject webScriptValueAtIndex:]): Removed check of _rootObject, since it's
1467         immediately followed by a check of _isSafeScript.
1468         (-[WebScriptObject setWebScriptValueAtIndex:value:]): Ditto.
1469         (-[WebScriptObject JSObject]): Ditto.
1470
1471 2007-07-22  Darin Adler  <darin@apple.com>
1472
1473         Reviewed by Anders Carlsson and John Sullivan.
1474
1475         - speculative fix for <rdar://problem/5337500> CrashTracer: [USER] 4 crashes in Mail
1476           at WebCore::HTMLImageElement::isURLAttribute(WebCore::Attribute*) const
1477
1478         * editing/markup.cpp: Added AttributeChange class.
1479         (WebCore::completeURLs): Changed function so that all the URL completion is done in
1480         a separate pass after finding all the URL attributes. This is safer, since actually
1481         applying an attribute change could have any arbitrary effect on the document; it's
1482         tricky to iterate a document while it's being modified and we don't have the checks
1483         here that would be needed to make that work in pathological cases.
1484
1485 2007-07-18  Darin Adler  <darin@apple.com>
1486
1487         Reviewed by Adam.
1488
1489         - fix <rdar://problem/5350604> REGRESSION: Crash in inspector controller code after
1490           clicking back button in test application (14337)
1491
1492         * page/InspectorController.cpp: (WebCore::InspectorController::addScriptResource):
1493         Replace an assertion that was firing with some code that at least doesn't immediately crash.
1494
1495 2007-07-22  Darin Adler  <darin@apple.com>
1496
1497         Reviewed by Anders.
1498
1499         - improve the fix for <rdar://problem/5298816> Crash redirecting message,
1500           in -[SharedBufferData initWithSharedBuffer:]; fixes a crash seen on the buildbot
1501
1502         * loader/DocLoader.cpp: (WebCore::DocLoader::~DocLoader): Call setDocLoader(0) on all
1503         the resources so they don't try to use a stale DocLoader pointer later.
1504
1505 2007-07-21  Mitz Pettel  <mitz@webkit.org>
1506
1507         Reviewed by Sam Weinig.
1508
1509         - fixed typos and markup in the following manual tests
1510
1511         * manual-tests/accidental-strict-mode.html:
1512         * manual-tests/caretScrolling.html:
1513         * manual-tests/close-on-closedWindow.html:
1514
1515 2007-07-21  Sam Weinig  <sam@webkit.org>
1516
1517         Reviewed by Mitz.
1518
1519         Patch for <rdar://problem/5352013>
1520         The computed style for background-position is wrong for the initial value
1521
1522         - Set the initial value for background-position-x and background-position-y (and
1523           therefore background-position) to 0% instead of 0px.
1524
1525         * rendering/RenderStyle.cpp:
1526         (WebCore::BackgroundLayer::BackgroundLayer):
1527         * rendering/RenderStyle.h:
1528         (WebCore::RenderStyle::initialBackgroundXPosition):
1529         (WebCore::RenderStyle::initialBackgroundYPosition):
1530
1531 2007-07-20  Brady Eidson  <beidson@apple.com>
1532
1533         Reviewed by Adele and Andersca
1534
1535         <rdar://problem/5336105> - WebBackForwardList created from scratch is unusable (always leads to crash)
1536
1537         * WebCore.exp: Export the BackForwardList c'tor so WebKit can create one explicitly
1538
1539 2007-07-20  Sam Weinig  <sam@webkit.org>
1540
1541         Reviewed by Beth Dakin.
1542
1543         Fix for <rdar://problem/5351901>
1544         Computed value of border-position should return a CSSValueList, not a CSSPrimitiveValue
1545
1546         - Return a space separated CSSValueList for background-position
1547           instead of a CSSPrimitiveValue (string type).
1548         - Remove the "else if (renderer)" case as it never returns a different
1549           value than just calling length.value().
1550         - Make background-position-x and background-position-y behave like
1551           background-position.  Fix case of initial value return 'auto' instead
1552           of 0.
1553
1554         Test: fast/css/getComputedStyle-background-position.html
1555
1556         * css/CSSComputedStyleDeclaration.cpp:
1557         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1558
1559 2007-07-20  Geoffrey Garen  <ggaren@apple.com>
1560
1561         Build fix for non-Mac platforms.
1562         
1563         * bindings/js/GCController.cpp:
1564
1565 2007-07-20  Anders Carlsson  <andersca@apple.com>
1566
1567         Reviewed by Darin.
1568
1569         If the style sheet requested is a user style sheet, don't store it in the DocLoader's resource map;
1570         user style sheets can outlive their doc loaders.
1571
1572         * loader/DocLoader.cpp:
1573         (WebCore::DocLoader::requestCSSStyleSheet):
1574
1575 2007-07-20  Justin Garcia  <justin.garcia@apple.com>
1576
1577         Reviewed by Darin.
1578
1579         <rdar://problem/5109817> Ctrl-click on word in non-editable text doesn't select it
1580         
1581         * bridge/EditorClient.h: Removed a client method for enabling/disabling
1582         word selection on right clicks.
1583         * editing/Editor.cpp: Ditto.
1584         * editing/Editor.h:
1585         * page/EventHandler.cpp:
1586         (WebCore::EventHandler::sendContextMenuEvent): Select the
1587         word underneath the mouse regardless of whether its editable.
1588
1589 2007-07-20  Ada Chan  <adachan@apple.com>
1590
1591         Reviewed by Darin and Adam.
1592
1593         <rdar://problem/5338385> Fixed infinite loop in ScrollView::scrollRectIntoViewRecursively().
1594         Also removed an unused local variable.
1595
1596         * platform/win/ScrollViewWin.cpp:
1597         (WebCore::ScrollView::scrollRectIntoViewRecursively):
1598
1599 2007-07-21  Antti  <antti@apple.com>
1600
1601         Reviewed by Darin.
1602         
1603         Fix <rdar://problem/5305788>
1604         REGRESSION: Safari sometimes loads IE-specific stylesheet on www.apaema.org
1605         
1606         Pick the preferred style sheet set based on document order even if the sheet is still loading. Previously 
1607         the set was chosen based on which stylesheet happened to arrive first. Just fix the problem at hand 
1608         and resist urge to start refactoring this function.
1609
1610         * dom/Document.cpp:
1611         (WebCore::Document::recalcStyleSelector):
1612
1613 2007-07-20  Sam Weinig  <sam@webkit.org>
1614
1615         Reviewed by Darin.
1616
1617         Fix for <rdar://problem/5351252>
1618         Computed value for -webkit-background-size and border-spacing
1619         should be space separated CSSValueLists.
1620
1621         * css/CSSComputedStyleDeclaration.cpp:
1622         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1623
1624 2007-07-20  Geoffrey Garen  <ggaren@apple.com>
1625
1626         Suggested by Darin Adler.
1627         
1628         Slight tweak to my last commit: changed gcController() to return a 
1629         reference instead of a pointer.
1630
1631 2007-07-20  Geoffrey Garen  <ggaren@apple.com>
1632
1633         Reviewed by Darin Adler.
1634         
1635         Fixed http://bugs.webkit.org/show_bug.cgi?id=12900 Page tear-down 
1636         forces garbage collection once per frame
1637
1638         Also fixed <rdar://problem/5286989> GC on window close does not always 
1639         bring the JS object count down to 0
1640         
1641         Implemented a 0-delay GC timer in WebCore. Instead of forcing GC
1642         immediately, code that thinks it has created a lot of garbage starts
1643         the timer. This has two advantages: 
1644
1645         1) Multiple GCs can coalesce. In my pathological test case, this 
1646         improves performance by an order of magnitude. 
1647         
1648         2) Conservative marking is less likely to keep alive important dead
1649         objects, like the window object, because the stack is small and free of
1650         JS processing when the timer fires.
1651
1652         Added GCController.h/.cpp, sometimes blindly:
1653         * WebCore.pro:
1654         * WebCore.vcproj/WebCore.vcproj:
1655         * WebCore.xcodeproj/project.pbxproj:
1656         * WebCoreSources.bkl:
1657
1658         Added singleton that implements GC on a 0-delay timer:
1659         * bindings/js/GCController.h: Added.
1660         * bindings/js/GCController.cpp: Added.
1661         
1662         Changed Collector::collect() calls below to call to the singleton:
1663         * bindings/js/kjs_proxy.cpp:
1664         (WebCore::KJSProxy::~KJSProxy):
1665         * bindings/js/kjs_window.cpp:
1666         (KJS::Window::clear):
1667         * history/CachedPage.cpp:
1668         (WebCore::CachedPage::clear):
1669         
1670         * page/Frame.cpp:
1671         (WebCore::Frame::~Frame): Removed previous slightly hackish attempt to
1672         avoid conservative marking of the window object.
1673
1674 2007-07-20  Anders Carlsson  <andersca@apple.com>
1675     
1676         Reviewed by Darin.
1677
1678         <rdar://problem/5298816> Crash redirecting message, in -[SharedBufferData initWithSharedBuffer:]
1679         
1680         Have cached resources keep track of what DocLoader they belong to. This is so that they can remove themselves
1681         from the DocLoader's resource map when they're destroyed when the cache is disabled.
1682         
1683         * html/HTMLImageLoader.cpp:
1684         (WebCore::HTMLImageLoader::updateFromElement):
1685         * loader/Cache.cpp:
1686         (WebCore::Cache::requestResource):
1687         * loader/CachedResource.cpp:
1688         (WebCore::CachedResource::CachedResource):
1689         (WebCore::CachedResource::~CachedResource):
1690         * loader/CachedResource.h:
1691         (WebCore::CachedResource::setDocLoader):
1692
1693 2007-07-20  Brady Eidson  <beidson@apple.com>
1694
1695         Reviewed by Darin
1696
1697         <rdar://problem/5153021> and http://bugs.webkit.org/show_bug.cgi?id=13364
1698
1699         The issue here was that if a document in a subframe was loaded from a URL, but then a script did 
1700         document.open or document.write during parsing, we would overwrite the document's url and baseurl 
1701         with the parent frame's url.  WRONG!
1702
1703         * dom/Document.cpp:
1704         (WebCore::Document::open): Only set the url and baseURL in document.open if they are still empty or about:blank
1705
1706 2007-07-20  Maciej Stachowiak  <mjs@apple.com>
1707
1708         Reviewed by Oliver.
1709
1710         <rdar://problem/5326303> REGRESSION: blur event fires upon navigating away from a page with focused element
1711
1712
1713         
1714         The proximate cause was the recent change to keep focus on the
1715         WebHTMLView when switching views. But the reason this happend was
1716         that didCommitLoadForFrame got called at a time when the new view
1717         was in place, but the old document was still there. This was a
1718         longstanding problem with the delegate, and fixing it cleans it
1719         up.
1720
1721         * loader/FrameLoader.cpp:
1722         (WebCore::FrameLoader::begin): Don't send dispatchWindowObjectAvailable if
1723         caller asked not to (this is to allow order of delegates to be the same).
1724         (WebCore::FrameLoader::transitionToCommitted): Don't emit didCommitLoadForFrame here.
1725         (WebCore::FrameLoader::receivedFirstData): Instead do it here, after calling begin(),
1726         so the new document is set up.
1727         * loader/FrameLoader.h: Add new optional parameter to begin().
1728
1729 2007-07-20  Sam Weinig  <sam@webkit.org>
1730
1731         Reviewed by Beth Dakin.
1732
1733         Update for fix for http://bugs.webkit.org/show_bug.cgi?id=14646
1734         <rdar://problem/5340449>
1735
1736         - Return a CSSValueList instead of CSSValue (with a Pair type) for
1737           computed values of border radii.
1738         - Add ability to CSSValueList to print out a space separated list
1739           instead of a comma.
1740         - Add border radii to list of computed styles that we create and can
1741           iterate over.
1742
1743         * css/CSSComputedStyleDeclaration.cpp:
1744         (WebCore::):
1745         (WebCore::getBorderRadiusCornerValue):
1746         * css/CSSValueList.cpp:
1747         (WebCore::CSSValueList::CSSValueList):
1748         (WebCore::CSSValueList::cssText):
1749         * css/CSSValueList.h:
1750
1751 2007-07-20  Mitz Pettel  <mitz@webkit.org>
1752
1753         Reviewed by Darin.
1754
1755         - http://bugs.webkit.org/show_bug.cgi?id=14626
1756           Make bidiReorderCharacters independent of RenderBlock
1757
1758         No layout test possible because there is no change in functionality.
1759
1760         This patch generalizes RenderBlock's implementation of the Unicode Bidi Algorithm
1761         in the form of the BidiResolver class template. An instance of a BidiResolver class
1762         can generate a sequence of runs with corresponding level and override attributes,
1763         given a range specified by start and end iterators. The iterators can optionally
1764         call back to the BidiResolver instance to push or pop explicit embedding levels.
1765
1766         The patch replaces BidiState with a specialization of BidiResolver that uses
1767         BidiIterators and generates BidiRuns. It also eliminates some of the file statics
1768         in bidi.cpp, instead relying on BidiResolver data members.
1769
1770         The patch makes the BidiContext part of BidiStatus, thus making BidiStatus the
1771         entire state that needs to be saved and restored in order to restart the bidi
1772         algorithm at a given point. Previously, you had to keep and pass around two
1773         separate structures, namely the BidiContext and the BidiStatus.
1774
1775         bidiReorderCharacters is implemented without relying on render objects, using
1776         a BidiResolver specialization that uses simple character buffer iterators and
1777         simple run structures.
1778
1779         * WebCore.pro:
1780         * WebCore.vcproj/WebCore.vcproj:
1781         * WebCore.xcodeproj/project.pbxproj:
1782         * WebCoreSources.bkl:
1783         * platform/BidiContext.cpp: Added.
1784         (WebCore::operator==):
1785         * platform/BidiContext.h: Added.
1786         (WebCore::BidiContext::BidiContext):
1787         (WebCore::BidiContext::ref):
1788         (WebCore::BidiContext::deref):
1789         (WebCore::BidiContext::parent):
1790         (WebCore::BidiContext::level):
1791         (WebCore::BidiContext::dir):
1792         (WebCore::BidiContext::override):
1793         * platform/BidiReorderCharacters.cpp: Added.
1794         (WebCore::CharacterBufferIterator::CharacterBufferIterator):
1795         (WebCore::CharacterBufferIterator::offset):
1796         (WebCore::CharacterBufferIterator::increment):
1797         (WebCore::CharacterBufferIterator::atEnd):
1798         (WebCore::CharacterBufferIterator::current):
1799         (WebCore::CharacterBufferIterator::direction):
1800         (WebCore::CharacterBufferIterator::operator==):
1801         (WebCore::CharacterBufferIterator::operator!=):
1802         (WebCore::::appendRun):
1803         (WebCore::bidiReorderCharacters):
1804         * platform/BidiReorderCharacters.h: Added.
1805         * platform/BidiResolver.h: Added.
1806         (WebCore::BidiStatus::BidiStatus):
1807         (WebCore::operator==):
1808         (WebCore::operator!=):
1809         (WebCore::BidiCharacterRun::BidiCharacterRun):
1810         (WebCore::BidiCharacterRun::reversed):
1811         (WebCore::BidiCharacterRun::dirOverride):
1812         (WebCore::BidiCharacterRun::next):
1813         (WebCore::BidiResolver::):
1814         (WebCore::BidiResolver::context):
1815         (WebCore::BidiResolver::setContext):
1816         (WebCore::BidiResolver::setLastDir):
1817         (WebCore::BidiResolver::setLastStrongDir):
1818         (WebCore::BidiResolver::setEorDir):
1819         (WebCore::BidiResolver::dir):
1820         (WebCore::BidiResolver::setDir):
1821         (WebCore::BidiResolver::status):
1822         (WebCore::BidiResolver::setStatus):
1823         (WebCore::BidiResolver::adjustEmbedding):
1824         (WebCore::BidiResolver::setAdjustEmbedding):
1825         (WebCore::BidiResolver::firstRun):
1826         (WebCore::BidiResolver::lastRun):
1827         (WebCore::BidiResolver::runCount):
1828         (WebCore::::embed):
1829         (WebCore::::deleteRuns):
1830         (WebCore::::reverseRuns):
1831         (WebCore::::createBidiRunsForLine):
1832         * platform/win/PopupMenuWin.cpp:
1833         (WebCore::PopupMenu::paint):
1834         * rendering/RenderBlock.h:
1835         * rendering/RenderFileUploadControl.cpp:
1836         (WebCore::RenderFileUploadControl::paintObject):
1837         * rendering/RenderListBox.cpp:
1838         (WebCore::RenderListBox::paintItemForeground):
1839         * rendering/RootInlineBox.cpp:
1840         (WebCore::RootInlineBox::childRemoved):
1841         (WebCore::RootInlineBox::lineBreakBidiStatus):
1842         (WebCore::RootInlineBox::setLineBreakInfo):
1843         * rendering/RootInlineBox.h:
1844         (WebCore::RootInlineBox::RootInlineBox):
1845         * rendering/bidi.cpp:
1846         (WebCore::BidiIterator::BidiIterator):
1847         (WebCore::BidiState::deleteRuns):
1848         (WebCore::operator==):
1849         (WebCore::operator!=):
1850         (WebCore::bidiNext):
1851         (WebCore::bidiFirst):
1852         (WebCore::BidiState::addRun):
1853         (WebCore::appendRunsForObject):
1854         (WebCore::BidiState::appendRun):
1855         (WebCore::RenderBlock::constructLine):
1856         (WebCore::RenderBlock::computeHorizontalPositionsForLine):
1857         (WebCore::RenderBlock::computeVerticalPositionsForLine):
1858         (WebCore::RenderBlock::bidiReorderLine):
1859         (WebCore::buildCompactRuns):
1860         (WebCore::RenderBlock::layoutInlineChildren):
1861         (WebCore::RenderBlock::determineStartPosition):
1862         (WebCore::RenderBlock::determineEndPosition):
1863         (WebCore::RenderBlock::matchedEndLine):
1864         (WebCore::RenderBlock::skipWhitespace):
1865         * rendering/bidi.h:
1866         (WebCore::BidiRun::BidiRun):
1867         (WebCore::BidiRun::next):
1868
1869 2007-07-20  Darin Adler  <darin@apple.com>
1870
1871         Reviewed by John Sullivan.
1872
1873         - fix for <rdar://problem/5331723> <rdar://problem/5331723> Safari gives error
1874           103 for URLs that Adobe Lightroom's Preview feature produces, with ":1" in the hostname
1875
1876         Test: fast/loader/file-URL-with-port-number.html
1877
1878         * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::portAllowed):
1879         Don't do any port blocking for file URLs.
1880
1881 2007-07-20  Mitz Pettel  <mitz@webkit.org>
1882
1883         Reviewed by Darin.
1884
1885         - fix http://bugs.webkit.org/show_bug.cgi?id=14689
1886           REGRESSION (3.0.2-TOT): <select> menu items have incorrect background color
1887
1888         * manual-tests/item-background.html: Added.
1889         * platform/PopupMenuClient.h:
1890         * platform/graphics/Color.cpp:
1891         (WebCore::blendComponent): Renamed the static method blend() to this.
1892         (WebCore::Color::blend): Added. Compositing (in "normal" or "source over"
1893         blend mode) B.blend(C) over A is equivalent to compositing C over the
1894         result of compositing B over A.
1895         (WebCore::Color::blendWithWhite): Changed for the above rename.
1896         * platform/graphics/Color.h:
1897         * platform/win/PopupMenuWin.cpp:
1898         (WebCore::PopupMenu::paint): Changed to use itemBackgroundColor().
1899         * rendering/RenderMenuList.cpp:
1900         (WebCore::RenderMenuList::itemBackgroundColor): Added. Returns the color
1901         that would result from overlaying the item's background color over the
1902         menu's background color over solid white. Note that clientStyle() cannot
1903         be used for the menu's background color, since background color is not
1904         inherited by the inner block (the regression resulted from changing
1905         clientStyle() to return the inner block's style), and that the color
1906         returned from this method is guaranteed to be opaque.
1907         * rendering/RenderMenuList.h:
1908         * rendering/RenderTextControl.cpp:
1909         (WebCore::RenderTextControl::itemBackgroundColor): Added.
1910         * rendering/RenderTextControl.h:
1911
1912 2007-07-20  Rob Buis  <buis@kde.org>
1913
1914         Reviewed by Darin.
1915
1916         http://bugs.webkit.org/show_bug.cgi?id=14642
1917         REGRESSION(r24064-24096): Reflection type effect in canvas tag broke
1918
1919         Do not stop the fill/stroke operation when encountering an empty path.
1920
1921         * html/CanvasRenderingContext2D.cpp:
1922         (WebCore::CanvasRenderingContext2D::fill):
1923         (WebCore::CanvasRenderingContext2D::stroke):
1924
1925 2007-07-20  Lars Knoll  <lars@trolltech.com>
1926
1927         Reviewed by Simon.
1928
1929         Remove some files that are not used anymore.
1930
1931         * platform/qt/FontCacheQt.cpp: Removed.
1932         * platform/qt/FontDataQt.cpp: Removed.
1933         * platform/qt/FontPlatformData.h: Removed.
1934         * platform/qt/FontPlatformDataQt.cpp: Removed.
1935         * platform/qt/GlyphPageTreeNodeQt.cpp: Removed.
1936
1937 2007-07-20  Lars Knoll  <lars@trolltech.com>
1938
1939         Reviewed by Simon.
1940
1941         use the correct font for spaces.
1942
1943         * platform/qt/FontQt.cpp:
1944         (WebCore::generateComponents):
1945
1946 2007-07-20  Lars Knoll  <lars@trolltech.com>
1947
1948         Reviewed by Simon.
1949
1950         spaces where not correctly taken into account for both offsetForPosition and selectionRectForText. Because of that selections sort of worked in LTR text, but completely failed in RTL.
1951
1952         * platform/qt/FontQt.cpp:
1953         (WebCore::TextRunComponent::isSpace):
1954         (WebCore::TextRunComponent::TextRunComponent):
1955         (WebCore::generateComponents):
1956         (WebCore::Font::drawText):
1957         (WebCore::Font::offsetForPosition):
1958         (WebCore::Font::selectionRectForText):
1959
1960 2007-07-20  Lars Knoll  <lars@trolltech.com>
1961
1962         Reviewed by Simon.
1963
1964         fix up some smaller issues in selection handling. It's still not perfect and selections in mixed rtl/ltr text are still broken, but it's getting there.
1965
1966         * platform/qt/FontQt.cpp:
1967         (WebCore::Font::offsetForPosition):
1968         (WebCore::cursorToX):
1969         (WebCore::Font::selectionRectForText):
1970
1971 2007-07-20  Lars Knoll  <lars@trolltech.com>
1972
1973         Reviewed by Simon.
1974
1975         make offsetForPosition and selectionRectForText work correctly with small caps.
1976
1977         * platform/qt/FontQt.cpp:
1978         (WebCore::Font::offsetForPosition):
1979         (WebCore::cursorToX):
1980         (WebCore::Font::selectionRectForText):
1981
1982 2007-07-20  Lars Knoll  <lars@trolltech.com>
1983
1984         Reviewed by Simon.
1985
1986         clip the drawn text correctly when needed.
1987
1988         * platform/qt/FontQt.cpp:
1989         (WebCore::Font::drawText):
1990
1991 2007-07-20  Lars Knoll  <lars@trolltech.com>
1992
1993         Reviewed by Simon.
1994
1995         Fix offsetForPosition and selectionRectForText methods.
1996
1997         * platform/qt/FontQt.cpp:
1998         (WebCore::Font::offsetForPosition):
1999         (WebCore::cursorToX):
2000         (WebCore::Font::selectionRectForText):
2001
2002 2007-07-20  Lars Knoll  <lars@trolltech.com>
2003
2004         Reviewed by Simon.
2005
2006         fix BiDi text rendering.
2007
2008         * platform/qt/FontQt.cpp:
2009         (WebCore::TextRunComponent::TextRunComponent):
2010         (WebCore::generateComponents):
2011         (WebCore::Font::drawText):
2012
2013 2007-07-20  Mark Rowe  <mrowe@apple.com>
2014
2015         Reviewed by Maciej.
2016
2017         Move FTPDirectoryTokenizer::m_templateDocumentData to be a function-scoped static
2018         to avoid creating a global initializer.  This fixes the build for x86_64.
2019
2020         * loader/FTPDirectoryDocument.cpp:
2021         (WebCore::FTPDirectoryTokenizer::loadDocumentTemplate):
2022
2023 2007-07-19  Geoffrey Garen  <ggaren@apple.com>
2024
2025         Reviewed by Maciej Stachowiak.
2026         
2027         Fixed <rdar://problem/5347849> Cache eviction of live decoded data is 
2028         thrash-y
2029         
2030         The solution here is to evict live decoded data based on a strict LRU
2031         model. This should work well as a "scrolling window."
2032
2033         With this patch, I see a substantial reduction in CPU while scrolling
2034         through a page with large images on a low memory system. Layout tests
2035         pass.
2036
2037         * loader/Cache.h: Changed from a size-based vector of LRU lists to a
2038         single LRU list in order to implement strict LRU.
2039         
2040         * loader/CachedResource.h: Removed tracking of access count, since that
2041         was the old cache eviction model.
2042
2043 2007-07-19  Oliver Hunt  <oliver@apple.com>
2044
2045         Reviewed by Maciej.
2046
2047         <rdar://problem/5076807> REGRESSION: Can't undo conversion of inline text (by hitting ESC)
2048         <rdar://problem/5346167> DOM key events triggered during IME composition differ in webkit/mac vs all windows browsers
2049
2050         We now basically match the behaviour of IE/Windows. This means that during composition keydown and autorepeat
2051         keys generate keydown events with a keyCode of 229, which correlates to the windows VK_PROCESSKEY message.
2052         keyup events are generated with the keyCode of the actual key that was pressed.
2053
2054         The only difference is on the first keydown of a composition, in which IE will use keyCode == 229, and we will
2055         send an event with the keyCode for the actual key that was pressed.
2056
2057         * page/EventHandler.cpp:
2058         (WebCore::EventHandler::keyEvent):
2059         * platform/PlatformKeyboardEvent.h:
2060         (WebCore::PlatformKeyboardEvent::setWindowsKeyCode):
2061
2062 2007-07-19  Brady Eidson  <beidson@apple.com>
2063
2064         Reviewed by Sam
2065
2066         <rdar://problem/5134929> REGRESSION: Colon detected as delimiting an empty port is stripped
2067
2068         The fix for this was in KURL::parse() which had a slightly changed rule that would strip the colon if there
2069         was no port.
2070
2071         An additional canonicalization fix was made in window.location.host to match the expected behavior of leaving
2072         the colon in place - before this fix, if the colon was there but no port was there, we'd see the port as 0.
2073
2074         * bindings/js/kjs_window.cpp:
2075         (KJS::Location::put): Call setHostAndPort instead of setHost and setPort seperately
2076
2077         * manual-tests/location-host-canonicalization.html: Added.
2078
2079         * platform/KURL.cpp:
2080         (WebCore::KURL::setHostAndPort): Set the host and port as one string component then reparse the URL
2081         (WebCore::KURL::parse): Change one line to consider the empty colon as part of the host name
2082         * platform/KURL.h:
2083
2084 2007-07-19  Anders Carlsson  <andersca@apple.com>
2085
2086         Reviewed by Adam.
2087
2088         <rdar://problem/5288617>
2089         Crash playing a very large QuickTime movie in Safari
2090         
2091         <rdar://problem/5271174>
2092         http://bugs.webkit.org/show_bug.cgi?id=14148
2093         LEAK: Serious memory consumption and leak when loading QT movies.
2094         
2095         Don't keep plugin stream data in memory since some plugin resources (like QT movies)
2096         can be really big. If a plug-in wants data in a file, create a file and write data to it 
2097         as it's coming from the wire, instead of using a big buffer.
2098         
2099         * loader/ResourceLoader.cpp:
2100         (WebCore::ResourceLoader::ResourceLoader):
2101         (WebCore::ResourceLoader::addData):
2102         (WebCore::ResourceLoader::willStopBufferingData):
2103         * loader/ResourceLoader.h:
2104         (WebCore::ResourceLoader::setShouldBufferData):
2105         * plugins/win/PluginStreamWin.cpp:
2106         (WebCore::PluginStreamWin::PluginStreamWin):
2107         (WebCore::PluginStreamWin::start):
2108         (WebCore::PluginStreamWin::startStream):
2109         (WebCore::PluginStreamWin::destroyStream):
2110         (WebCore::PluginStreamWin::didReceiveData):
2111         (WebCore::PluginStreamWin::didFinishLoading):
2112         * plugins/win/PluginStreamWin.h:
2113
2114 2007-07-19  Geoffrey Garen  <ggaren@apple.com>
2115
2116         Reviewed by Darin Adler.
2117         
2118         Fixed <rdar://problem/5348384> Restore old return value behavior of 
2119         stringByEvaluatingJavaScriptFromString
2120         
2121         Return an empty string unless you have a string, boolean, or number
2122         result.
2123
2124         * WebCore.xcodeproj/project.pbxproj:
2125         * page/mac/WebCoreFrameBridge.mm:
2126         (-[WebCoreFrameBridge stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
2127
2128 2007-07-19  Darin Adler  <darin@apple.com>
2129
2130         Reviewed by Alexey.
2131
2132         - fix http://bugs.webkit.org/show_bug.cgi?id=14666
2133           remove unused xxx-encodings.txt for all platforms other than Mac
2134
2135         * platform/gdk/gdk-encodings.txt: Removed.
2136         * platform/win/win-encodings.txt: Removed.
2137         * platform/wx/wx-encodings.txt: Removed.
2138
2139         * platform/character-sets.txt: Moved into mac subdirectory since it's only used for Mac; at some
2140         point I hope to remove it completely.
2141         * platform/make-charset-table.pl: Ditto.
2142         * platform/mac/character-sets.txt: Copied from platform/character-sets.txt.
2143         * platform/mac/make-charset-table.pl: Copied from platform/make-charset-table.pl.
2144
2145         * DerivedSources.make: Moved CharsetData.cpp into the MACOS section.
2146         Changed the build rule to use Mac-specific paths for everything and got rid of
2147         make variables.
2148
2149         * WebCore.vcproj/build-generated-files.sh: Removed code to set ENCODINGS_FILE and ENCODINGS_PREFIX.
2150         * WebCore.xcodeproj/project.pbxproj: Ditto.
2151         * make-generated-sources.sh: Ditto.
2152
2153         * Projects/gdk/webcore-gdk.bkl: Removed code to pass gdk-encodings.txt to make-generated-sources.sh.
2154         * Projects/wx/webcore-wx.bkl: Ditto, but for wx-encodings.txt.
2155
2156 2007-07-19  Antti  <antti@apple.com>
2157
2158         Reviewed by Darin.
2159
2160         Fix <rdar://problem/5257371>
2161         Dashcode Client crash when clicking on placemarks in Maps widget in WebCore::DeprecatedPtrListImpl::addIterator
2162         
2163         FlexibleBoxes should never have inline children. Don't move children out from last remaining anonymous block.
2164
2165         * rendering/RenderBlock.cpp:
2166         (WebCore::RenderBlock::removeChild): real fix
2167         * rendering/RenderFlexibleBox.cpp:
2168         (WebCore::RenderFlexibleBox::layoutVerticalBox): just to be sure, this is checked elsewhere too
2169
2170 2007-07-19  Anders Carlsson  <andersca@apple.com>
2171
2172         Reviewed by Darin.
2173
2174         <rdar://problem/5322268>
2175         Safari Crash at http://www.exlibrisgroup.com/sfx_openurl.htm
2176         
2177         Add a real copy constructor and assignment operator for CollectionInfo
2178         so that the vectors in the cache maps will be copied correctly.
2179         
2180         * html/HTMLCollection.cpp:
2181         (WebCore::HTMLCollection::CollectionInfo::CollectionInfo):
2182         (WebCore::HTMLCollection::CollectionInfo::swap):
2183         * html/HTMLCollection.h:
2184         (WebCore::HTMLCollection::CollectionInfo::operator=):
2185         (WebCore::HTMLCollection::CollectionInfo::copyCacheMap):
2186
2187 2007-07-19  David Hyatt  <hyatt@apple.com>
2188
2189         Fix for 5237574, Colloquy main view does not size correctly.  Make
2190         sure to reset the baseilne when calculating a row's height/baseline, so
2191         that old values don't stick around.
2192
2193         Reviewed by Tim Hatcher
2194
2195         * rendering/RenderTableSection.cpp:
2196         (WebCore::RenderTableSection::calcRowHeight):
2197
2198 2007-07-19  Antti  <antti@apple.com>
2199
2200         Reviewed by John.
2201         
2202         Fix <rdar://problem/5346697>
2203         REGRESSION(r23773): Visibile children on invisible layer are not painted (fast/layers/layer-visibility.html fails)
2204         
2205         Test m_hasVisibleContent instead of renderer()->style()->visibility(). 
2206         This takes children into account too.
2207
2208         Regression spotted by Mitz.
2209
2210         * rendering/RenderLayer.cpp:
2211         (WebCore::RenderLayer::paintLayer):
2212
2213 2007-07-18  Oliver Hunt  <oliver@apple.com>
2214
2215         Rubber stamped by maciej
2216
2217         Rollout patch from r24437.
2218
2219         * page/EventHandler.cpp:
2220         (WebCore::EventHandler::keyEvent):
2221
2222 2007-07-18  Oliver Hunt  <oliver@apple.com>
2223
2224         Reviewed by Kevin M.
2225
2226         Fix for <rdar://problem/5346167> DOM key events triggered during
2227                 IME composition differ in webkit/mac vs all windows browsers
2228
2229         We no longer send DOM key events during IME composition.  This behaviour 
2230         matches the behaviour of WebKit/Win.
2231
2232         * page/EventHandler.cpp:
2233         (WebCore::EventHandler::keyEvent):
2234
2235 2007-07-18  Sam Weinig  <sam@webkit.org>
2236
2237         Reviewed by Oliver.
2238
2239         Fix for http://bugs.webkit.org/show_bug.cgi?id=14646
2240         WebKit border radius properties are unavailable via JavaScript
2241
2242         Test: fast/dom/getComputedStyle-borderRadius.html
2243
2244         * css/CSSComputedStyleDeclaration.cpp:
2245         (WebCore::getBorderRadiusCornerValue): Helper function that returns a single value if
2246         width and the height of the corner radius are equal, and otherwise a pair.
2247         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2248
2249 2007-07-18  Anders Carlsson  <andersca@apple.com>
2250
2251         Reviewed by Darin.
2252
2253         <rdar://problem/5262136> Double form repost alert going forward on britishairways.com
2254         
2255         When checking if the request has changed and a new policy callback needs to be sent, 
2256         ignore the request headers. NSURLConnection in Leopard will always call willSendRequest,
2257         with a request that was different from the one passed to -[NSURLConnection connectionWithRequest:]
2258         (a few Accept headers are added).
2259
2260         * loader/FrameLoader.cpp:
2261         (WebCore::FrameLoader::checkNavigationPolicy):
2262         * platform/network/ResourceRequestBase.cpp:
2263         (WebCore::equalIgnoringHeaderFields):
2264         (WebCore::operator==):
2265         * platform/network/ResourceRequestBase.h:
2266
2267 2007-07-18  Anders Carlsson  <andersca@apple.com>
2268
2269         Reviewed by Darin.
2270
2271         <rdar://problem/5340098>
2272         http://bugs.webkit.org/show_bug.cgi?id=13366
2273         REGRESSION (r10935): AOL beta music player doesn't play
2274
2275         The AOL beta music player has a typo, causing it to create an <embed"> element inside of
2276         an <object> element
2277         Because of this, it will not be treated as an embed tag, so its name will not be added
2278         to the document's named item map. Furthermore, since the <object> contains a child that
2279         is not a <param>, the object's name won't be added either.
2280         
2281         The (somewhat ugly) fix is to add <object> to the named map only if it has <param> or
2282         unknown elements as children.
2283         
2284         * html/HTMLObjectElement.cpp:
2285         (WebCore::HTMLObjectElement::updateDocNamedItem):
2286
2287 2007-07-18  Timothy Hatcher  <timothy@apple.com>
2288
2289         Reviewed by Adam.
2290
2291         <rdar://problem/5343767> Should have a way to disable the Web Inspector
2292
2293         This change facilitates the ability to turn the Web Inspector on and off.
2294
2295         Makes the InspectorClient be required to create a new Page. This also means that
2296         InspectorController will never be NULL. Adds a new function on Page to test
2297         if the inspector is enabled.
2298
2299         * WebCore.exp: New symbol for the Page constructor.
2300         * WebCore.pro: Add InspectorClientGdk.cpp.
2301         * WebCoreSources.bkl: ditto.
2302         * html/HTMLDocument.cpp:
2303         (WebCore::HTMLDocument::createTokenizer):
2304         * loader/FrameLoader.cpp:
2305         (WebCore::FrameLoader::detachFromParent): Don't null check the InspectorCOntroller.
2306         (WebCore::FrameLoader::dispatchDidCommitLoad): Ditto.
2307         (WebCore::FrameLoader::dispatchAssignIdentifierToInitialRequest): Ditto.
2308         (WebCore::FrameLoader::dispatchWillSendRequest): Ditto.
2309         (WebCore::FrameLoader::dispatchDidReceiveResponse): Ditto.
2310         (WebCore::FrameLoader::dispatchDidReceiveContentLength): Ditto.
2311         (WebCore::FrameLoader::dispatchDidFinishLoading): Ditto.
2312         (WebCore::FrameLoader::dispatchDidLoadResourceFromMemoryCache): Ditto.
2313         * page/ContextMenuController.cpp:
2314         (WebCore::ContextMenuController::handleContextMenuEvent): Ask the InspectorController if it is enabled.
2315         (WebCore::ContextMenuController::contextMenuItemSelected): Ditto.
2316         * page/InspectorController.cpp:
2317         (WebCore::InspectorController::enabled): Ask the Page's settings if developer extras are enabled.
2318         (WebCore::InspectorController::inspect): Check if the InspectorController is enabled.
2319         (WebCore::InspectorController::focusNode): Ditto.
2320         (WebCore::InspectorController::highlight): Ditto.
2321         (WebCore::InspectorController::hideHighlight): Ditto.
2322         (WebCore::InspectorController::addMessageToConsole): Ditto.
2323         (WebCore::InspectorController::attachWindow): Ditto.
2324         (WebCore::InspectorController::detachWindow): Ditto.
2325         (WebCore::InspectorController::windowScriptObjectAvailable): Ditto.
2326         (WebCore::InspectorController::didCommitLoad): Ditto.
2327         (WebCore::InspectorController::frameDetachedFromParent): Ditto.
2328         (WebCore::InspectorController::didLoadResourceFromMemoryCache): Ditto.
2329         (WebCore::InspectorController::identifierForInitialRequest): Ditto.
2330         (WebCore::InspectorController::willSendRequest): Ditto.
2331         (WebCore::InspectorController::didReceiveResponse): Ditto.
2332         (WebCore::InspectorController::didReceiveContentLength): Ditto.
2333         (WebCore::InspectorController::didFinishLoading): Ditto.
2334         (WebCore::InspectorController::didFailLoading): Ditto.
2335         * page/InspectorController.h:
2336         * page/Page.cpp:
2337         (WebCore::Page::Page): Require an InspectorClient.
2338         (WebCore::Page::~Page): Always call pageDestroyed on the InspectorController.
2339         (WebCore::Page::inspectorEnabled): Check the WebCore settings if the developer extras are enabled.
2340         * page/Page.h:
2341         * page/gdk/InspectorClientGdk.cpp: Added.
2342         (WebCore::InspectorClientGdk::inspectorDestroyed): Empty stub calling notImplemented.
2343         (WebCore::InspectorClientGdk::createPage): Ditto.
2344         (WebCore::InspectorClientGdk::showWindow): Ditto.
2345         (WebCore::InspectorClientGdk::closeWindow): Ditto.
2346         (WebCore::InspectorClientGdk::attachWindow): Ditto.
2347         (WebCore::InspectorClientGdk::detachWindow): Ditto.
2348         (WebCore::InspectorClientGdk::highlight): Ditto.
2349         (WebCore::InspectorClientGdk::hideHighlight): Ditto.
2350         (WebCore::InspectorClientGdk::inspectedURLChanged): Ditto.
2351         * page/gdk/InspectorClientGdk.h: Added.
2352         * platform/graphics/svg/SVGImage.cpp:
2353         (WebCore::SVGImage::dataChanged): Pass in a dummy InspectorClient.
2354         * platform/graphics/svg/SVGImageEmptyClients.h:
2355         (WebCore::SVGEmptyInspectorClient::~SVGEmptyInspectorClient): Empty dummy implementation.
2356         (WebCore::SVGEmptyInspectorClient::inspectorDestroyed): Ditto.
2357         (WebCore::SVGEmptyInspectorClient::createPage): Ditto.
2358         (WebCore::SVGEmptyInspectorClient::showWindow): Ditto.
2359         (WebCore::SVGEmptyInspectorClient::closeWindow): Ditto.
2360         (WebCore::SVGEmptyInspectorClient::attachWindow): Ditto.
2361         (WebCore::SVGEmptyInspectorClient::detachWindow): Ditto.
2362         (WebCore::SVGEmptyInspectorClient::highlight): Ditto.
2363         (WebCore::SVGEmptyInspectorClient::hideHighlight): Ditto.
2364         (WebCore::SVGEmptyInspectorClient::inspectedURLChanged): Ditto.
2365
2366 2007-07-18  Anders Carlsson  <andersca@apple.com>
2367
2368         Make some headers private instead of project.
2369         
2370         * WebCore.xcodeproj/project.pbxproj:
2371
2372 2007-07-18  John Sullivan  <sullivan@apple.com>
2373
2374         Reviewed by Maciej and Kevin Decker
2375
2376         - fixed <rdar://problem/5315926> REGRESSION: ~.4% PLT regression from r23949 (canonicalization change)
2377
2378         * loader/mac/LoaderNSURLExtras.m:
2379         (canonicalURL):
2380         Rolled out the fix for 5249730 that caused this regression. 5249730 is addressed a different way now.
2381
2382 2007-07-18  Sam Weinig  <sam@webkit.org>
2383
2384         Build fix.
2385
2386         * WebCore.xcodeproj/project.pbxproj:
2387         * loader/gdk/FrameLoaderClientGdk.cpp:
2388         (WebCore::FrameLoaderClientGdk::objectContentType):
2389         * platform/graphics/win/ImageWin.cpp:
2390         * platform/network/cf/ResourceResponseCFNet.cpp:
2391         * platform/win/ClipboardWin.cpp:
2392         (WebCore::createGlobalImageFileDescriptor):
2393
2394 2007-07-18  Sam Weinig  <sam@webkit.org>
2395
2396         Rubber-stamped by Adam Roben.
2397
2398         Rename MimeTypeRegistry to MIMETypeRegistry and xmlhttprequest to XMLHttpRequest
2399
2400         * WebCore.exp:
2401         * WebCore.pro:
2402         * WebCore.vcproj/WebCore.vcproj:
2403         * bindings/js/JSXMLHttpRequest.cpp:
2404         * bindings/js/kjs_binding.cpp:
2405         * bindings/js/kjs_dom.cpp:
2406         * dom/Document.cpp:
2407         * html/HTMLFormElement.cpp:
2408         (WebCore::HTMLFormElement::formData):
2409         * html/HTMLObjectElement.cpp:
2410         (WebCore::HTMLObjectElement::containsJavaApplet):
2411         * loader/FrameLoader.cpp:
2412         (WebCore::FrameLoader::requestObject):
2413         * loader/mac/LoaderNSURLExtras.m:
2414         (suggestedFilenameWithMIMEType):
2415         * platform/MIMETypeRegistry.cpp: Copied from platform/MimeTypeRegistry.cpp.
2416         (WebCore::initialiseSupportedImageMIMETypes):
2417         (WebCore::initialiseMIMETypeRegistry):
2418         (WebCore::MIMETypeRegistry::getMIMETypeForPath):
2419         (WebCore::MIMETypeRegistry::isSupportedImageMIMEType):
2420         (WebCore::MIMETypeRegistry::isSupportedImageResourceMIMEType):
2421         (WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType):
2422         (WebCore::MIMETypeRegistry::isJavaAppletMIMEType):
2423         (WebCore::MIMETypeRegistry::getSupportedImageMIMETypes):
2424         (WebCore::MIMETypeRegistry::getSupportedImageResourceMIMETypes):
2425         (WebCore::MIMETypeRegistry::getSupportedNonImageMIMETypes):
2426         * platform/MIMETypeRegistry.h: Copied from platform/MimeTypeRegistry.h.
2427         * platform/MimeTypeRegistry.cpp: Removed.
2428         * platform/MimeTypeRegistry.h: Removed.
2429         * platform/gdk/MIMETypeRegistryGdk.cpp: Copied from platform/gdk/MimeTypeRegistryGdk.cpp.
2430         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
2431         * platform/gdk/MimeTypeRegistryGdk.cpp: Removed.
2432         * platform/graphics/BitmapImage.cpp:
2433         * platform/graphics/Image.cpp:
2434         (WebCore::Image::supportsType):
2435         * platform/mac/DragDataMac.mm:
2436         * platform/mac/MIMETypeRegistryMac.mm: Copied from platform/mac/MimeTypeRegistryMac.mm.
2437         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
2438         (WebCore::MIMETypeRegistry::getExtensionsForMIMEType):
2439         (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
2440         * platform/mac/MimeTypeRegistryMac.mm: Removed.
2441         * platform/mac/PasteboardMac.mm:
2442         (WebCore::Pasteboard::writeImage):
2443         * platform/qt/MIMETypeRegistryQt.cpp: Copied from platform/qt/MimeTypeRegistryQt.cpp.
2444         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
2445         * platform/qt/MimeTypeRegistryQt.cpp: Removed.
2446         * platform/win/MIMETypeRegistryWin.cpp: Copied from platform/win/MimeTypeRegistryWin.cpp.
2447         (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
2448         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
2449         * platform/win/MimeTypeRegistryWin.cpp: Removed.
2450         * rendering/RenderPartObject.cpp:
2451         (WebCore::RenderPartObject::updateWidget):
2452         * xml/xmlhttprequest.cpp: Removed.
2453         * xml/xmlhttprequest.h: Removed.
2454         * xml/XMLHttpRequest.cpp: Copied from xml/xmlhttprequest.cpp.
2455         * xml/XMLHttpRequest.h: Copied from xml/xmlhttprequest.h.
2456
2457 2007-07-18  Sam Weinig  <sam@webkit.org>
2458
2459         Rubber-stamped by Adam Roben.
2460
2461         Rename csshelper.h, csshelper.cpp, cssparser.h, cssparser.cpp,
2462         cssstyleselector.h, and cssstyleselector.cpp to be CamelCase.
2463
2464         * WebCore.pro:
2465         * WebCore.vcproj/WebCore.vcproj:
2466         * bindings/objc/DOM.mm:
2467         * bindings/objc/DOMHTML.mm:
2468         * css/CSSGrammar.y:
2469         * css/CSSMediaRule.cpp:
2470         * css/CSSMutableStyleDeclaration.cpp:
2471         * css/CSSPrimitiveValue.cpp:
2472         * css/CSSStyleSheet.cpp:
2473         * css/MediaList.cpp:
2474         * css/MediaQueryExp.cpp:
2475         * css/csshelper.cpp: Removed.
2476         * css/csshelper.h: Removed.
2477         * css/CSSHelper.cpp: Copied from css/csshelper.cpp.
2478         * css/CSSHelper.h: Copied from css/csshelper.h.
2479         * css/cssparser.cpp: Removed.
2480         * css/cssparser.h: Removed.
2481         * css/CSSParser.cpp: Copied from css/cssparser.cpp.
2482         * css/CSSParser.h: Copied from css/cssparser.h.
2483         * css/cssstyleselector.cpp: Removed.
2484         * css/cssstyleselector.h: Removed.
2485         * css/CSSStyleSelector.cpp: Copied from css/cssstyleselector.cpp.
2486         * css/CSSStyleSelector.h: Copied from css/cssstyleselector.h.
2487         * dom/Document.cpp:
2488         * dom/Element.cpp:
2489         * dom/StyledElement.cpp:
2490         * editing/ApplyStyleCommand.cpp:
2491         * editing/markup.cpp:
2492         * html/CanvasGradient.cpp:
2493         * html/CanvasRenderingContext2D.cpp:
2494         * html/CanvasStyle.cpp:
2495         * html/HTMLAnchorElement.cpp:
2496         * html/HTMLBaseElement.cpp:
2497         * html/HTMLBodyElement.cpp:
2498         * html/HTMLDocument.cpp:
2499         * html/HTMLEmbedElement.cpp:
2500         * html/HTMLFormElement.cpp:
2501         * html/HTMLFrameElementBase.cpp:
2502         * html/HTMLImageElement.cpp:
2503         * html/HTMLImageLoader.cpp:
2504         * html/HTMLLinkElement.cpp:
2505         * html/HTMLObjectElement.cpp:
2506         * html/HTMLOptGroupElement.cpp:
2507         * html/HTMLOptionElement.cpp:
2508         * html/HTMLSelectElement.cpp:
2509         * html/HTMLTableElement.cpp:
2510         * html/HTMLTablePartElement.cpp:
2511         * html/HTMLTokenizer.cpp:
2512         * ksvg2/css/SVGCSSParser.cpp:
2513         * ksvg2/css/SVGCSSStyleSelector.cpp:
2514         * ksvg2/svg/SVGAElement.cpp:
2515         * ksvg2/svg/SVGClipPathElement.cpp:
2516         * ksvg2/svg/SVGGradientElement.cpp:
2517         * ksvg2/svg/SVGLength.cpp:
2518         * ksvg2/svg/SVGMaskElement.cpp:
2519         * ksvg2/svg/SVGStyledElement.cpp:
2520         * ksvg2/svg/SVGUseElement.cpp:
2521         * page/DOMWindow.cpp:
2522         * page/mac/FrameMac.mm:
2523         * page/mac/WebCoreFrameBridge.mm:
2524         * rendering/HitTestResult.cpp:
2525         * rendering/RenderObject.cpp:
2526         * rendering/RenderStyle.cpp:
2527         * rendering/RenderThemeMac.mm:
2528
2529 2007-07-18  Brady Eidson  <beidson@apple.com>
2530
2531         Rubberstamped by Adam
2532
2533         * platform/win/SharedBufferWin.cpp:
2534         (WebCore::SharedBuffer::createWithContentsOfFile): Correct license on this newly checked in file from yesterday
2535
2536 2007-07-18  Maciej Stachowiak  <mjs@apple.com>
2537
2538         Reviewed by Oliver.
2539
2540         - fixed <rdar://problem/5340603> REGRESSION: javascript being written to the screen in Safari
2541
2542         Test Case: fast/tokenizer/badscript.html
2543         
2544         * html/HTMLTokenizer.cpp:
2545         (WebCore::HTMLTokenizer::parseTag): Don't apply our self-closing
2546         <script> quirk in cases where the / appears in a mangled attribtue
2547         value.
2548
2549 2007-07-17  Peter Kasting  <zerodpx@gmail.com>
2550
2551         Reviewed by Hyatt.
2552
2553         http://bugs.webkit.org/show_bug.cgi?id=13618
2554         Don't set link targets to "_blank" on middle-click; rely on the policy
2555         delegate to do the right thing.
2556
2557         * html/HTMLAnchorElement.cpp:
2558         (WebCore::HTMLAnchorElement::defaultEventHandler):
2559
2560 2007-07-17  Oliver Hunt  <oliver@apple.com>
2561
2562         Reviewed by Maciej.
2563
2564         Fix for <rdar://problem/4799967> Safari and other WebKit 
2565         apps sometimes crash in WebCore::FontData::platformInit
2566
2567         Always retain/release our font handle, instead of only retaining
2568         in the presence of GC.
2569
2570         * platform/mac/FontPlatformData.h:
2571         (WebCore::FontPlatformData::FontPlatformData):
2572         (WebCore::FontPlatformData::~FontPlatformData):
2573
2574 2007-07-17  Sam Weinig  <sam@webkit.org>
2575
2576         Reviewed by Geoff Garen.
2577
2578         Fix for <rdar://problem/5333957>
2579                 http://bugs.webkit.org/show_bug.cgi?id=14610
2580
2581         Original patch by Feng Qian.
2582
2583         - Clear the selection object when disconnecting a frame.
2584
2585         Test: http/tests/security/cross-frame-access-selection.html
2586
2587         * loader/FrameLoader.cpp:
2588         (WebCore::FrameLoader::clear):
2589         * page/DOMWindow.cpp:
2590         (WebCore::DOMWindow::disconnectFrame):
2591         (WebCore::DOMWindow::clear):
2592         * page/DOMWindow.h:
2593         * page/Frame.cpp:
2594         (WebCore::Frame::clearScriptProxy):
2595         (WebCore::Frame::clearDOMWindow):
2596         * page/Frame.h:
2597
2598 2007-07-17  Oliver Hunt  <oliver@apple.com>
2599
2600         Reviewed by Sam.
2601
2602         Fix for <rdar://problem/5154518> REGRESSION: Hitting return does
2603         nothing in ruby terminal at http://tryruby.hobix.com/
2604
2605         Calling event.preventDefault() during a keydown event should not 
2606         prevent the keypress event from firing.
2607
2608         * WebCore.xcodeproj/project.pbxproj:
2609         * page/EventHandler.cpp:
2610         (WebCore::EventHandler::keyEvent):
2611         (WebCore::EventHandler::defaultKeyboardEventHandler):
2612
2613 2007-07-17  Anders Carlsson  <andersca@apple.com>
2614
2615         Reviewed by Geoff.
2616
2617         <rdar://problem/4993463> 
2618         http://bugs.webkit.org/show_bug.cgi?id=12732
2619         REGRESSION: Comments fields on ircimages not showing up in nightly
2620
2621         Postpone setting the frame name to just right before we request the frame. Otherwise, 
2622         two calls to FrameTree::uniqueChildName will return the same frame name and in that case only
2623         one Frame object will actually be created and multiple iframe elements will refer to it.
2624         
2625         * html/HTMLFrameElementBase.cpp:
2626         (WebCore::HTMLFrameElementBase::openURL):
2627         (WebCore::HTMLFrameElementBase::setNameAndOpenURL):
2628         (WebCore::HTMLFrameElementBase::setNameAndOpenURLCallback):
2629         (WebCore::HTMLFrameElementBase::insertedIntoDocument):
2630         (WebCore::HTMLFrameElementBase::attach):
2631         * html/HTMLFrameElementBase.h:
2632
2633 2007-07-17  Brady Eidson  <beidson@apple.com>
2634
2635         Reviewed by Steve
2636
2637         Required for <rdar://problem/4516185> - FTP Directory Listings
2638
2639         * WebCore.vcproj/WebCore.vcproj: Added SharedBufferWin
2640         
2641         * platform/SharedBuffer.cpp: Windows doesn't get the default empty resource anymore
2642         * platform/win/SharedBufferWin.cpp: Added.
2643         (WebCore::SharedBuffer::createWithContentsOfFile):
2644
2645 2007-07-17  Brady Eidson  <beidson@apple.com>
2646
2647         Reviewed by Tim Hatcher
2648
2649         Tweak the class names we give to the icon table cell to make it easier to style
2650
2651         * loader/FTPDirectoryDocument.cpp:
2652           (WebCore::FTPDirectoryTokenizer::appendEntry): The the table cell a "IconCell" class name and
2653           either a "FileType" or "DirectoryType" class name depending on the type
2654
2655 2007-07-17  Holger Hans Peter Freyther  <zecke@selfish.org>
2656
2657         Reviewed by NOBODY.
2658
2659         Build fix after r24366 add an additional ResourceRequest parameter to
2660         the download method.
2661
2662         * loader/gdk/FrameLoaderClientGdk.cpp:
2663         (WebCore::FrameLoaderClientGdk::download):
2664         * loader/gdk/FrameLoaderClientGdk.h:
2665
2666 2007-07-17  Adam Roben  <aroben@apple.com>
2667
2668         Fix Bug 14324: Cannot remove/customize the "Inspect Element" contextual menu item
2669         http://bugs.webkit.org/show_bug.cgi?id=14324
2670
2671         Reviewed by Tim.
2672
2673         No regression test possible.
2674
2675         * page/ContextMenuController.cpp:
2676         (WebCore::ContextMenuController::handleContextMenuEvent): Add the
2677         Inspect Element item to the menu before passing it to the
2678         ContextMenuClient so that the UI delegate has a chance to
2679         modify/remove the item.
2680
2681 2007-07-17  Adam Roben  <aroben@apple.com>
2682
2683         Remove ContextMenuClient::shouldIncludeInspectElementItem
2684
2685         Reviewed by Tim.
2686
2687         No regression test possible.
2688
2689         * page/ContextMenuClient.h:
2690         * page/ContextMenuController.cpp:
2691         (WebCore::ContextMenuController::handleContextMenuEvent): Use Settings
2692         to determine whether to include the Inspect Element item.
2693         * page/gdk/ContextMenuClientGdk.cpp:
2694         * page/gdk/ContextMenuClientGdk.h:
2695         * platform/graphics/svg/SVGImageEmptyClients.h:
2696
2697 2007-07-17  Adam Roben  <aroben@apple.com>
2698
2699         Initialize ContextMenuController::m_page
2700
2701         Somehow this variable had never been initialized before.
2702
2703         Reviewed by Tim.
2704
2705         * page/ContextMenuController.cpp:
2706         (WebCore::ContextMenuController::ContextMenuController):
2707         * page/ContextMenuController.h:
2708         * page/Page.cpp:
2709         (WebCore::Page::Page):
2710
2711 2007-07-17  Adam Roben  <aroben@apple.com>
2712
2713         Add Settings::developerExtrasEnabled
2714
2715         Reviewed by Tim.
2716
2717         * WebCore.exp:
2718         * page/Settings.cpp:
2719         * page/Settings.h:
2720
2721 2007-07-17  Justin Garcia  <justin.garcia@apple.com>
2722
2723         Reviewed by Antti.
2724
2725         <rdar://problem/5206311> 
2726         Whitespace can't be removed when editing text pasted into from web page
2727         
2728         The whitespace comes from table rows that aren't being removed after they are
2729         emptied out during a deletion.
2730
2731         * editing/DeleteSelectionCommand.cpp:
2732         (WebCore::isTableCell):
2733         (WebCore::isTableRow):
2734         (WebCore::isTableCellEmpty):
2735         (WebCore::isTableRowEmpty):
2736         (WebCore::DeleteSelectionCommand::initializePositionData): Remember the table
2737         rows that contained the start and end of the selection.
2738         (WebCore::DeleteSelectionCommand::removePreviouslySelectedEmptyTableRows):
2739         Remove table rows that come before the end of the selection
2740         that was removed (except for the row that contained the start of the selection
2741         and any before that).
2742         Remove table rows that are come after the start of the selection
2743         that was removed (except for the row that contained the end of the selection
2744         and any after that).
2745         (WebCore::DeleteSelectionCommand::doApply): Call the new function.
2746         * editing/DeleteSelectionCommand.h:
2747
2748 2007-07-17  Geoffrey Garen  <ggaren@apple.com>
2749
2750         Reviewed by Kevin Decker.
2751
2752         Removed ASSERT that was breaking the pageout test. It's trivial to
2753         reproduce this ASSERT when navigating between pages that change their
2754         names, but nothing bad seems to happen.
2755
2756         * page/Page.cpp:
2757         (WebCore::Page::goToItem):
2758
2759 2007-07-17  Geoffrey Garen  <ggaren@apple.com>
2760
2761         Build fix.
2762         
2763         * plugins/win/PluginViewWin.cpp: Pass false for lockHistory like we
2764         do elsewhere.
2765
2766 2007-07-17  Holger Hans Peter Freyther  <zecke@selfish.org>
2767
2768         Reviewed by Maciej.
2769
2770         Implement the callback responsible for handling HTTP headers. This
2771         callback gets called for every header.
2772         We will add these headers to our ResourceResponse and on the 'end-of-header'
2773         indicator we will update the ResourceResponse and dispatch it.
2774
2775         This patch adds various set methods to ResourceResponse. This improves
2776         the readability of the headerCallback and avoids storing a CURL handle inside
2777         the ResourceResponse which would be needed to implement ResourceResponse::doUpdateResourceResponse
2778
2779         Add a destructor for ResourceHandleManager which would free the resources and remove
2780         a unused variable.
2781
2782         * platform/network/ResourceHandleInternal.h:
2783         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2784         * platform/network/ResourceResponse.cpp:
2785         (WebCore::ResourceResponse::setUrl):
2786         (WebCore::ResourceResponse::setMimeType):
2787         (WebCore::ResourceResponse::setExpectedContentLength):
2788         (WebCore::ResourceResponse::setTextEncodingName):
2789         (WebCore::ResourceResponse::setSuggestedFilename):
2790         * platform/network/ResourceResponse.h:
2791         * platform/network/curl/ResourceHandleCurl.cpp:
2792         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
2793         * platform/network/curl/ResourceHandleManager.cpp:
2794         (WebCore::ResourceHandleManager::~ResourceHandleManager):
2795         (WebCore::ResourceHandleManager::sharedInstance):
2796         (WebCore::headerCallback):
2797         * platform/network/curl/ResourceHandleManager.h:
2798
2799 2007-07-17  Sam Weinig  <sam@webkit.org>
2800
2801         Reviewed by Adam Roben.
2802
2803         Convert JS undefined to the empty string when calling alert, confirm, and prompt. 
2804
2805         Test: fast/dom/Window/alert-undefined.html
2806
2807         * page/DOMWindow.idl:
2808
2809 2007-07-17  Geoffrey Garen  <ggaren@apple.com>
2810
2811         Reviewed by Kevin McCulough.
2812
2813         Fixed failing layout test.
2814         
2815         Renamed "FrameLoadTypeInternal" to "FrameLoadTypeRedirectWithLockedHistory".
2816         This is almost certainly not a correct name for the original intent
2817         of this load type, but it's a correct name for its current behavior.
2818         
2819         (WebCore::FrameLoader::updateHistoryForRedirectWithLockedHistory):
2820         When history is supposed to be locked, and no current history item
2821         exists, only add a new history item if you're the top-level frame.
2822         
2823         This rule, combined with the rule that setting iframe.src should not
2824         create a history item, is pretty hackish. On the other hand, it
2825         matches WinIE and doesn't cause any test regressions. So I'm OK with
2826         it as a short-term solution until the solution described in 
2827         <rdar://problem/5339292> can be implemented.
2828
2829 2007-07-17  Tristan O'Tierney  <tristan@apple.com>
2830
2831         Reviewed by Maciej Stachowiak.
2832
2833         <rdar://problem/5294691> Source of file is misrepresented if downloaded by typing in URL in Safari address bar
2834
2835         * loader/FrameLoaderClient.h:
2836         * loader/MainResourceLoader.cpp:        
2837         (WebCore::MainResourceLoader::continueAfterContentPolicy):
2838         Added an extra request parameter, initialRequest, to the download() method
2839         by passing up the resource handle's request.
2840         
2841         * platform/graphics/svg/SVGImageEmptyClients.h:
2842         (WebCore::SVGEmptyFrameLoaderClient::download):
2843         Added an extra parameter to the empty SVG download method.
2844         
2845 2007-07-17  Antti  <antti@apple.com>
2846
2847         Reviewed by home-bradee.
2848
2849         <rdar://problem/5336372>
2850         Icon database uses too much memory
2851         
2852         XRaying Safari startup memory consumption revealed that icon database is eating quite
2853         a bit of RAM if Icon.db is large (which it probably is if it has been in use for a while, 
2854         mine used for getting figures below was 2.6MB). 
2855         
2856         Note that the wins are less impressive with smaller Icon.db.
2857         
2858         This patch addresses three separate issues
2859         
2860         - SQLite fails to free the memory used by temporary tables. Icon database uses a temporary table
2861           on startup for pruning unused page urls. This wastes around 1MB. Addressed by rewriting
2862           pruning so it does not need a temporary table. The new method is also quite a bit faster speeding
2863           up Safari launch time by around 100ms
2864         - SQLite has it's own memory cache limited by default to 3MB. Icon database does not really need that much.
2865           Dropped the cache size to 300kB saving ~1MB on startup. 
2866           Smaller cache slows down startup by ~30ms (more than compensated by faster pruning above)
2867         - Don't populate m_pageURLToIconURLMap with all urls from database on startup, instead let it get populated
2868           when urls are accessed (user opens history menu for example). This shouldn't have any real performance impact 
2869           as the accesses are icon loads that need to hit the database anyway. This saves ~700kB.
2870           
2871         All in all with this Icon.db these changes reduce allocated memory by around 2.7MB on startup. Release build
2872         Safari RPRVT (empty start page) goes from 12.4MB to 10.4MB (TCMalloc pooling probably explaining why the win 
2873         looks bit smaller here).
2874
2875         * loader/icon/IconDatabase.cpp:
2876         (WebCore::IconDatabase::IconDatabase):
2877         (WebCore::IconDatabase::open):
2878         (WebCore::IconDatabase::deleteAllPreparedStatements):
2879         (WebCore::IconDatabase::retainIconForPageURL):
2880         (WebCore::IconDatabase::releaseIconForPageURL):
2881         (WebCore::IconDatabase::establishIconIDForIconURL):
2882         (WebCore::IconDatabase::pruneUnretainedIconsOnStartup):
2883         * loader/icon/IconDatabase.h:
2884
2885 2007-07-17  Darin Adler  <darin@apple.com>
2886
2887         Reviewed by Mitz.
2888
2889         - fix http://bugs.webkit.org/show_bug.cgi?id=14569
2890           Repro crash due to saved state not being cleared when select and textarea elements
2891           are adopted by another document
2892
2893         Test: fast/forms/saved-state-adoptNode-crash.html
2894
2895         * dom/Document.h:
2896         (WebCore::Document::registerFormElementWithState): Updated parameter type to be
2897         HTMLFormControlElementWithState.
2898         (WebCore::Document::unregisterFormElementWithState): Ditto.
2899         Also removed isFormElementRegistered function and changed the type of the
2900         m_formElementsWithState ListHashSet.
2901         * dom/Document.cpp: (WebCore::Document::formElementsState): Updated to use new type,
2902         for set contents and to use new saveState() function and only save state for elements
2903         that return true.
2904
2905         * html/HTMLGenericFormElement.h: Added HTMLFormControlElementWithState class,
2906         derived from HTMLGenericFormElement, and moved down all the behavior related to
2907         saving form control element state. Also removed the unnecessary default parameter
2908         to the HTMLGenericFormElement constructor.
2909         * html/HTMLGenericFormElement.cpp:
2910         (WebCore::HTMLFormControlElementWithState::HTMLFormControlElementWithState): Added.
2911         Calls registerFormElementWithState.
2912         (WebCore::HTMLFormControlElementWithState::~HTMLFormControlElementWithState): Added.
2913         Calls unregisterFormElementWithState.
2914         (WebCore::HTMLFormControlElementWithState::willMoveToNewOwnerDocument): Added.
2915         Calls unregisterFormElementWithState.
2916         (WebCore::HTMLFormControlElementWithState::didMoveToNewOwnerDocument): Added.
2917         Calls registerFormElementWithState.
2918         (WebCore::HTMLFormControlElementWithState::closeRenderer): Moved to this class from
2919         the base class.
2920
2921         * html/HTMLInputElement.h: Updated the base class name and overrode saveState instead
2922         of stateValue.
2923         * html/HTMLInputElement.cpp: Updated the base class name.
2924         (WebCore::HTMLInputElement::init): Removed the call to registerFormElementWithState.
2925         (WebCore::HTMLInputElement::~HTMLInputElement): Removed the call to
2926         unregisterFormElementWithState. Also changed the code to only call the
2927         unregisterForDidRestoreFromCacheCallback function for type PASSWORD (consistency
2928         and efficiency).
2929         (WebCore::HTMLInputElement::setInputType): Removed calls to registerFormElementWithState
2930         and unregisterFormElementWithState; we now let the element stay registered and simply
2931         don't save or restore state for password fields.
2932         (WebCore::HTMLInputElement::saveState): Updated function name and signature to replace
2933         the old stateValue function. Returns false for password fields.
2934         (WebCore::HTMLInputElement::willMoveToNewOwnerDocument): Removed the call to
2935         unregisterFormElementWithState.
2936         (WebCore::HTMLInputElement::didMoveToNewOwnerDocument): Removed the call to
2937         registerFormElementWithState.
2938
2939         * html/HTMLSelectElement.h: Updated the base class name and overrode saveState instead
2940         of stateValue.
2941         * html/HTMLSelectElement.cpp: Updated the base class name.
2942         (WebCore::HTMLSelectElement::HTMLSelectElement): Removed the call to
2943         registerFormElementWithState.
2944         (WebCore::HTMLSelectElement::~HTMLSelectElement): Removed the call to
2945         unregisterFormElementWithState.
2946         (WebCore::HTMLSelectElement::saveState): Updated function name and signature to
2947         replace the old stateValue function.
2948         (WebCore::HTMLSelectElement::setLength): Updated to use document() instead of
2949         ownerDocument(); the latter is just a slower virtual-function way of doing the
2950         same thing in all cases except for Document and XPathNamespace.
2951
2952         * html/HTMLTextAreaElement.h: Update the base class name, overrode saveState instead
2953         of stateValue, and removed the now-unnecessary explicit destructor.
2954         * html/HTMLTextAreaElement.cpp: Updated the base class name.
2955         (WebCore::HTMLTextAreaElement::HTMLTextAreaElement): Removed the call to
2956         registerFormElementWithState.
2957         (WebCore::HTMLTextAreaElement::saveState): Updated function name and signature to replace
2958         the old stateValue function.
2959
2960 2007-07-17  Sam Weinig  <sam@webkit.org>
2961
2962         Reviewed by Darin.
2963
2964         - Make HTMLFrameOwnerElement::contentWindow() return a DOMWindow instead of a Frame
2965         - Remove the unnecessary hack in HTMLFrameElement.idl and HTMLIFrameElement.idl that
2966           converted from Frame to Window now that it is not necessary.
2967         - Remove now unused [NullCheck] extended attribute from CodeGeneratorJS.pm.
2968
2969         * bindings/scripts/CodeGeneratorJS.pm:
2970         * html/HTMLDocument.idl:
2971         * html/HTMLFrameElement.idl:
2972         * html/HTMLFrameOwnerElement.cpp:
2973         (WebCore::HTMLFrameOwnerElement::contentWindow):
2974         * html/HTMLFrameOwnerElement.h:
2975         * html/HTMLIFrameElement.idl:
2976
2977 2007-07-16  Sam Weinig  <sam@webkit.org>
2978
2979         Reviewed by Adam Roben.
2980
2981         Move self, opener, parent, top, window, and frames from kjs_window
2982         to DOMWindow and auto-generate the bindings for them.
2983
2984         * bindings/js/kjs_window.cpp:
2985         (KJS::Window::getValueProperty):
2986         * bindings/js/kjs_window.h:
2987         (KJS::Window::):
2988         * page/DOMWindow.cpp:
2989         (WebCore::DOMWindow::self):
2990         (WebCore::DOMWindow::opener):
2991         (WebCore::DOMWindow::parent):
2992         (WebCore::DOMWindow::top):
2993         * page/DOMWindow.h:
2994         (WebCore::DOMWindow::window):
2995         (WebCore::DOMWindow::frames):
2996         * page/DOMWindow.idl:
2997
2998 2007-07-16  Geoffrey Garen  <ggaren@apple.com>
2999
3000         Reviewed by Sam Weinig.
3001         
3002         Fixed <rdar://problem/5334483> REGRESSION: JavaScript-induced 
3003         window.open loads not added to back/forward list
3004         
3005         I did an audit of our history rules in loading and tried to establish
3006         some sane uniformity.
3007         
3008         The uniform rule is:
3009             - HTTP redirects and HTTP redirects simulated by <meta http-equiv>
3010             add a history item if and only if the redirect takes > 1 second.
3011             - Other navigations, including JavaScript navigations, always
3012             add a history item, except for location.replace navigations.
3013
3014         In the future, we'll want to refine the second case to be more like the
3015         first. I've filed <rdar://problem/5339292> about that.
3016
3017         * bindings/js/JSHTMLDocumentCustom.cpp:
3018         (WebCore::JSHTMLDocument::setLocation): Don't pass 'true' for 
3019         userGesture unconditionally. userGesture is used to determine popup 
3020         blocking, not history item creation.
3021
3022         * bindings/js/kjs_window.cpp: Pass 'false' for lockHistory in all loads
3023         except location.replace, which intends to lock history.
3024
3025         * loader/FrameLoader.cpp: Distinguish between lockHistory and 
3026         userGesture. The former determines whether a new history item gets
3027         created. The latter determines whether JavaScript can open popup
3028         windows. Start passing these variables in functions that used to
3029         swallow or conflate them.
3030         
3031         (WebCore::FrameLoader::requestFrame): Pass 'true' for lockHistory here
3032         because that's usually correct when setting the 'src' attribute of a
3033         child frame, and we want to avoid regressing <rdar://problem/4921797>.
3034
3035         (WebCore::FrameLoader::load): Use the lockHistory variable to determine
3036         whether to start a history-creating load. Using userGesture for this
3037         purpose is wrong, as explained above.
3038
3039         * loader/FrameLoader.h: Renamed one variant of scheduleRedirection to
3040         scheduleHTTPRedirection because the behavior there of measuring elapsed
3041         time is specific to the HTTP redirection case.
3042
3043         * page/ContextMenuController.cpp:
3044         (WebCore::ContextMenuController::contextMenuItemSelected): lockHistory
3045         can always be false here because this navigation is never the result of
3046         a redirection.
3047
3048 2007-07-16  Sam Weinig  <sam@webkit.org>
3049
3050         Reviewed by Adam and Maciej.
3051
3052         Move the frameElement attribute from kjs_window to DOMWindow and
3053         auto-generate the bindings for it. 
3054
3055         * bindings/js/kjs_window.cpp:
3056         (KJS::Window::getValueProperty):
3057         * bindings/js/kjs_window.h:
3058         (KJS::Window::):
3059         * bindings/scripts/CodeGeneratorJS.pm:
3060         * page/DOMWindow.cpp:
3061         (WebCore::DOMWindow::frameElement):
3062         (WebCore::DOMWindow::devicePixelRatio):
3063         * page/DOMWindow.h:
3064         * page/DOMWindow.idl:
3065
3066 2007-07-16  Sam Weinig  <sam@webkit.org>
3067
3068         Reviewed by Adam.
3069
3070         Move more functions from kjs_window to DOMWindow and auto-generate
3071         the bindings for them.
3072
3073         * bindings/js/kjs_window.cpp:
3074         (KJS::WindowFunc::callAsFunction):
3075         * bindings/js/kjs_window.h:
3076         (KJS::Window::):
3077         * page/DOMWindow.cpp:
3078         (WebCore::DOMWindow::print):
3079         (WebCore::DOMWindow::stop):
3080         (WebCore::DOMWindow::alert):
3081         (WebCore::DOMWindow::confirm):
3082         (WebCore::DOMWindow::prompt):
3083         (WebCore::DOMWindow::find):
3084         * page/DOMWindow.h:
3085         * page/DOMWindow.idl:
3086
3087 2007-07-17  Mark Rowe  <mrowe@apple.com>
3088
3089         Gdk build fix.
3090
3091         * platform/gdk/ChromeClientGdk.h:
3092
3093 2007-07-16  Brady Eidson  <beidson@apple.com>
3094
3095         Reviewed by Adam
3096
3097         Begin the arduous task of localizing FTP directory listings while removing a global initializer!
3098
3099         * loader/FTPDirectoryDocument.cpp:
3100         (WebCore::processFilesizeString):
3101
3102         * page/mac/WebCoreViewFactory.h:
3103
3104         * platform/LocalizedStrings.h:
3105
3106         * platform/gdk/TemporaryLinkStubs.cpp:
3107         (WebCore::unknownFileSizeText):
3108
3109         * platform/mac/LocalizedStringsMac.mm:
3110         (WebCore::unknownFileSizeText):
3111
3112         * platform/qt/Localizations.cpp:
3113         (WebCore::unknownFileSizeText):
3114
3115 2007-07-16  Sam Weinig  <sam@webkit.org>
3116
3117         Reviewed by Oliver.
3118
3119         Remove more redundant isSafeScript checks.
3120
3121         * bindings/js/kjs_window.cpp:
3122         (KJS::Window::getOwnPropertySlot):
3123
3124 2007-07-16  Sam Weinig  <sam@webkit.org>
3125
3126         Reviewed by Oliver.
3127
3128         Turn off -Wshorten-64-to-32 warning for 64-bit builds.
3129
3130         * Configurations/Base.xcconfig:
3131
3132 2007-07-16  Anders Carlsson  <andersca@apple.com>
3133
3134         Reviewed by Oliver.
3135
3136         <rdar://problem/5336276>
3137         ASSERT(cs->accessCount() > 0) when instantiating widget templates in DashCode
3138
3139         If the cache is disabled, accessCount will always be 0. Account for this in the assert.
3140         
3141         * html/HTMLTokenizer.cpp:
3142         (WebCore::HTMLTokenizer::reset):
3143         (WebCore::HTMLTokenizer::notifyFinished):
3144
3145 2007-07-16  Brady Eidson  <beidson@apple.com>
3146
3147         Reviewed by Darin.
3148
3149         Append FTP row entries to the first TBODY instead of the TABLE element itself, 
3150         as many TABLE elements end up with an implicit TBODY and that's where most people would
3151         expect it to be added.
3152
3153         * html/HTMLTableElement.h:
3154         (WebCore::HTMLTableElement::firstTBody): Added this accessor
3155
3156         * loader/FTPDirectoryDocument.cpp:
3157         (WebCore::FTPDirectoryTokenizer::appendEntry): Add to the first tbody if it exists
3158
3159 2007-07-16  Justin Garcia  <justin.garcia@apple.com>
3160
3161         Reviewed by Adele.
3162
3163         <rdar://problem/5240265> 
3164         REGRESSION: Clicking a <button> clears the selection in contenteditable areas
3165
3166         * page/FocusController.cpp:
3167         (WebCore::clearSelectionIfNeeded): Don't clear the selection if
3168         the mouse press that caused the focus shift occurred in 
3169         a -webkit-user-select: ignore region.
3170
3171 2007-07-16  David Hyatt  <hyatt@apple.com>
3172
3173         Fix for 5335829, avoid creating a pathological # of FontData objects
3174         on Windows.  The MLang service actually caches and reuses HFONTs, which
3175         means it is safe to use our FontPlatformData -> FontData cache.
3176
3177         Reviewed by olliej
3178
3179         * platform/win/FontCacheWin.cpp:
3180         (WebCore::FontCache::getFontDataForCharacters):
3181
3182 2007-07-16  Adam Roben  <aroben@apple.com>
3183
3184         Added a manual test to test calling window.print on a subframe.
3185
3186         Reviewed by Darin.
3187
3188         * manual-tests/resources/print-subframe.html: Added.
3189         * manual-tests/window-print-subframe.html: Added.
3190
3191 2007-07-16  Adam Roben  <aroben@apple.com>
3192
3193         Replace Frame::print with Chrome::print
3194
3195         This also adds a Frame* parameter to Chrome::print and
3196         ChromeClient::print so that it knows which Frame to print.
3197
3198         Reviewed by Darin.
3199
3200         All tests pass.
3201
3202         * bindings/js/kjs_window.cpp:
3203         (KJS::WindowFunc::callAsFunction): Call Chrome::print.
3204         * editing/JSEditor.cpp: Ditto.
3205
3206         * bridge/win/FrameWin.cpp: Removed Frame::print.
3207         * page/Frame.h: Ditto.
3208         * page/mac/FrameMac.mm: Ditto.
3209         * page/qt/FrameQt.cpp: Ditto.
3210         * platform/gdk/FrameGdk.cpp: Ditto.
3211         * page/mac/WebCoreFrameBridge.h: Removed -print.
3212
3213         * page/Chrome.cpp: Added Frame* parameter to Chrome::print and pass it
3214         up to the ChromeClient.
3215         * page/Chrome.h: Ditto.
3216         * page/ChromeClient.h: Ditto.
3217         * platform/gdk/TemporaryLinkStubs.cpp: Ditto.
3218         * platform/graphics/svg/SVGImageEmptyClients.h: Ditto.
3219
3220 2007-07-16  Adele Peterson  <adele@apple.com>
3221
3222         Reviewed by Brady.
3223
3224         Fix for <rdar://problem/5321490> REGRESSION: visibility:hidden property doesn't hide parts of file input element and listbox
3225         http://bugs.webkit.org/show_bug.cgi?id=14565
3226
3227         Tests:
3228         fast/forms/hidden-input-file.html
3229         fast/forms/hidden-listbox.html
3230
3231         * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::paintObject):
3232         Only paint if the control is supposed to be visible.
3233         * rendering/RenderListBox.cpp: (WebCore::RenderListBox::paintObject):
3234         ditto.  We already had checks to prevent drawing the text that considered the option's style too, but if visibility: hidden
3235         was just set on the listbox then a lot of extra work was being done, and the scrollbar was drawing too.  This change fixes that.
3236
3237 2007-07-16  David Hyatt  <hyatt@apple.com>
3238
3239         Fix for Radar 5338081, text-shadow should be reset on form controls so that
3240         it doesn't inherit in when set e.g., on the <body>.
3241
3242         Reviewed by beth
3243
3244         * css/html4.css:
3245
3246 2007-07-16  Holger Hans Peter Freyther  <zecke@selfish.org>
3247
3248         Reviewed by Niko.
3249
3250         FrameView, PlatformScrollbar and changes to the way we draw
3251
3252         Fix the lifetime of PlatformScrollbar, use a default width and
3253         height and fix drawing of the PlatformScrollbar and other widgets
3254         the following way: FrameGdk handles the expose events of the Frame
3255         and will make the frame redraw and now it will draw the childrent of
3256         the FrameView as well. This approach has the issue of honoring the
3257         z-order of elements inside the RenderTree. Honoring the z-order will
3258         be a bit more work
3259
3260         Widget can now handle Widget::setGtkWidget call where the GtkWidget
3261         has not yet a GdkWindow allocated. We will lazily set the GdkDrawable.
3262
3263         In preparation of honoring the z-order of the RenderTree for RenderWidgets
3264         it is started to store native objects inside the GraphicsContext. Doing this
3265         nicely eliminates the need of RenderThemeGdk to do any drawing to a temporary
3266         GdkPixmap. This should fix themes with rounded buttons.
3267
3268         ScrollView implement add- and removeChild to get a working PlatformScrollbar
3269
3270
3271         * platform/Widget.h:
3272         * platform/gdk/FrameGdk.cpp:
3273         (frame_gdk_expose_child): Will send the expose to all children
3274         (WebCore::FrameGdk::handleGdkEvent): Painting changes, move to mouseMoved
3275         * platform/gdk/PlatformScreenGdk.cpp:
3276         (WebCore::screenDepth): gdkDrawable
3277         * platform/gdk/PlatformScrollBarGdk.cpp:
3278         (PlatformScrollbar::PlatformScrollbar): Fix ownership
3279         (PlatformScrollbar::~PlatformScrollbar): Fix ownership
3280         (PlatformScrollbar::paint): Widget::paint will do the right thing soon
3281         * platform/gdk/RenderThemeGdk.cpp: No need for using a GdkPixmap, draw directly
3282         (WebCore::RenderThemeGdk::paintCheckbox): No need for using a GdkPixmap, draw directly
3283         (WebCore::RenderThemeGdk::paintRadio): No need for using a GdkPixmap, draw directly
3284         (WebCore::RenderThemeGdk::paintButton): No need for using a GdkPixmap, draw directly
3285         * platform/gdk/RenderThemeGdk.h: remove the copyContext call
3286         * platform/gdk/ScrollViewGdk.cpp: gdkDrawable
3287         (WebCore::ScrollView::updateView): gdkDrawable
3288         (WebCore::ScrollView::update): clear the area to fix repainting issues
3289         (WebCore::ScrollView::setGtkWidget): gdkDrawable
3290         (WebCore::ScrollView::addChild): implement
3291         (WebCore::ScrollView::removeChild): implement
3292         * platform/gdk/TemporaryLinkStubs.cpp: Not needed header removed
3293         * platform/gdk/WidgetGdk.cpp:
3294         (WebCore::Widget::gdkDrawable): Renamed from drawable
3295         (WebCore::Widget::setGtkWidget): use gdkDrawable
3296         (WebCore::Widget::setCursor): gdkDrawable
3297         (WebCore::Widget::show): gdkDrawable
3298         (WebCore::Widget::hide): gdkDrawable
3299         * platform/graphics/GraphicsContext.h: Allow to set the GdkDrawable, e.g. used inside a expose event
3300         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3301         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
3302         (WebCore::GraphicsContext::setGdkDrawable):
3303         (WebCore::GraphicsContext::gdkDrawable):
3304
3305 2007-07-16  Holger Hans Peter Freyther  <zecke@selfish.org>
3306
3307         Reviewed by Maciej.
3308
3309         Lazily update the scrollbars (e.g. on loading a page) to
3310         generate less expose events, which will lead to laying out less often
3311          and will fix http://bugs.webkit.org/show_bug.cgi?id=14020.
3312
3313         * platform/gdk/ScrollViewGdk.cpp:
3314         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
3315         (WebCore::ScrollView::update):
3316         (WebCore::ScrollView::resizeContents):
3317         (WebCore::ScrollView::updateScrollbars):
3318
3319 2007-07-16  Rob Buis  <buis@kde.org>
3320
3321         Reviewed by Maciej.
3322
3323         http://bugs.webkit.org/show_bug.cgi?id=14462
3324         non empty <style> element doesn't work
3325
3326         Return an empty sheet for empty <style> elements
3327         instead of a null sheet. Clean up StyleElement a bit.
3328
3329         * dom/StyleElement.cpp:
3330         (WebCore::StyleElement::StyleElement):
3331         (WebCore::StyleElement::sheet):
3332         (WebCore::StyleElement::childrenChanged):
3333         (WebCore::StyleElement::createSheet):
3334         * dom/StyleElement.h:
3335         (WebCore::StyleElement::setLoading):
3336         * html/HTMLStyleElement.cpp:
3337         (WebCore::HTMLStyleElement::HTMLStyleElement):
3338         (WebCore::HTMLStyleElement::sheet):
3339         * html/HTMLStyleElement.h:
3340         (WebCore::HTMLStyleElement::setLoading):
3341         * ksvg2/svg/SVGStyleElement.cpp:
3342         (WebCore::SVGStyleElement::sheet):
3343         (WebCore::SVGStyleElement::sheetLoaded):
3344         * ksvg2/svg/SVGStyleElement.h:
3345
3346 2007-07-15  Oliver Hunt  <oliver@apple.com>
3347
3348         Reviewed by Adam.
3349
3350         Fix for fix for <rdar://problem/5336602> REGRESSION: tab characters
3351                         cannot be entered into text fields
3352                         http://bugs.webkit.org/show_bug.cgi?id=14032
3353
3354         Need to use UChar not char.
3355
3356         * html/HTMLInputElement.cpp:
3357         (WebCore::HTMLInputElement::constrainValue):
3358
3359 2007-07-15  Sam Weinig  <sam@webkit.org>
3360
3361         Reviewed by Geoff Garen.
3362
3363         Remove redundant calls to isSafeScript()
3364
3365         * bindings/js/JSDOMWindowCustom.cpp:
3366         (WebCore::JSDOMWindow::customPut):
3367         * bindings/js/kjs_window.cpp:
3368         (KJS::Window::put):
3369
3370 2007-07-15  Geoffrey Garen  <ggaren@apple.com>
3371
3372         Reviewed by Maciej Stachowiak.
3373         
3374         Removed incorrect error log, seen while running layout tests.
3375         
3376         Perhaps at some point FrameLoadTypeInteral had a specific meaning
3377         that prevented it from being used in non-child frame, non-redirect
3378         situations. However, that meaning has been lost and nobody remembers
3379         how to get it back.
3380         
3381         We currently use FrameLoadTypeInternal for any load that is not
3382         initiated by a user gesture, so it's trivial to produce this error
3383         log, even though nothing has gone wrong.
3384
3385         * loader/FrameLoader.cpp:
3386         (WebCore::FrameLoader::updateHistoryForInternalLoad):
3387
3388 2007-07-15  Oliver Hunt  <oliver@apple.com>
3389
3390         Reviewed by Maciej
3391
3392         Fix for <rdar://problem/5336602> REGRESSION: tab characters cannot be entered into text fields
3393                 http://bugs.webkit.org/show_bug.cgi?id=14032
3394
3395         constrainValue attempted to block control characters from being inserted 
3396         by a simple less than ' ' check, which prevent tab characters from being
3397         inserted.  This patch adds an additional check to allow the tab character 
3398         again
3399
3400         * html/HTMLInputElement.cpp:
3401         (WebCore::HTMLInputElement::constrainValue):
3402
3403 2007-07-14  Brady Eidson  <beidson@apple.com>
3404
3405         Third shot at blind Qt/GDK build fix
3406
3407         * platform/gdk/TemporaryLinkStubs.cpp:
3408         (FTPDirectoryDocument::createTokenizer):
3409         * platform/qt/TemporaryLinkStubs.cpp:
3410         (FTPDirectoryDocument::createTokenizer):
3411
3412 2007-07-14  Brady Eidson  <beidson@apple.com>
3413
3414         Reviewed by Sam
3415
3416         Windows build fix
3417
3418         * WebCore.vcproj/WebCore.vcproj:
3419
3420 2007-07-14  Sam Weinig  <sam@webkit.org>
3421
3422         Fix Tiger build.
3423
3424         * config.h:
3425
3426 2007-07-14  Brady Eidson  <beidson@apple.com>
3427
3428         Blind attempt at (hopefully) fixing the Qt and GDK builds
3429
3430         * platform/gdk/TemporaryLinkStubs.cpp:
3431         (FTPDirectoryDocument::FTPDirectoryDocument):
3432         * platform/qt/TemporaryLinkStubs.cpp:
3433         (FTPDirectoryDocument::FTPDirectoryDocument):
3434
3435 2007-07-14  Brady Eidson  <beidson@apple.com>
3436
3437         Reviewed by Sam Weinig
3438
3439         Initial check-in for <rdar://problem/3154486> - Supporting FTP directory listings in the browser
3440
3441         Development has taken place on both Leopard and Windows (windows enabling patch will follow shortly)
3442         Support will only exist on platforms whose network layers (ie, ResourceHandle) support piping the raw
3443         FTP Directory data into the engine.  
3444
3445         This is known to include Leopard, Windows, and CURL based platforms - probably others
3446         Known incompatible platforms include Tiger.
3447
3448         The FTP listing page is built in HTML.  An external HTML document can be provided as a template for the 
3449         directory listing.  This document is parsed, and expected to have a <table> with a certain class in it.
3450         As FTP directory listings come in, each entry is added to this table as a row.
3451
3452         If no HTML template is provided to work with, a very basic empty document is hard coded that contains only 
3453         this special table.
3454
3455         Upgrades to the look and feel of the directory listings can take place largely in this HTML template which,
3456         admittedly, is conspicuously absent in this initial checkin
3457
3458         * WebCore.exp: New Settings symbols for WebKit
3459         * WebCore.xcodeproj/project.pbxproj:
3460
3461         * config.h: If BUILDING_ON_TIGER, disable FTP directory listing support
3462
3463         * dom/DOMImplementation.cpp:
3464         (WebCore::DOMImplementation::createDocument): Create an FTPDirectoryDocument if the mime type is 
3465           "application/x-ftp-directory"
3466
3467         * loader/FTPDirectoryDocument.cpp: Added.
3468         (WebCore::FTPDirectoryTokenizer::isWaitingForScripts):
3469         (WebCore::FTPDirectoryTokenizer::checkBuffer):
3470         (WebCore::FTPDirectoryTokenizer::FTPDirectoryTokenizer): Building on HTML tokenizer, this facilitates 
3471           parsing FTP Directory listings in the engine
3472         (WebCore::FTPDirectoryTokenizer::appendEntry): Add a table row for a directory listing to the document
3473         (WebCore::FTPDirectoryTokenizer::createTDForFilename): Create the TD for the filename with the anchor in it
3474
3475         (WebCore::processFilesizeString): Prettify the filesize
3476         (WebCore::wasLastDayOfMonth):
3477         (WebCore::processFileDateString): Prettify the date
3478         (WebCore::FTPDirectoryTokenizer::parseAndAppendOneLine):
3479         (WebCore::FTPDirectoryTokenizer::loadDocumentTemplate): Loads the HTML template that FTP directory listings
3480           can build on top of
3481         (WebCore::FTPDirectoryTokenizer::createBasicDocument): Creates a most basic document (body and one table) to
3482           append the rows to in case the document template is not loaded and parsed
3483         (WebCore::FTPDirectoryTokenizer::write): Add the FTP listing to the buffer and parse entries out of it
3484         (WebCore::FTPDirectoryTokenizer::finish): 
3485
3486         (WebCore::FTPDirectoryDocument::FTPDirectoryDocument): Special document-type for FTP directory listings
3487         (WebCore::FTPDirectoryDocument::createTokenizer):
3488         * loader/FTPDirectoryDocument.h: Added.
3489         (WebCore::FTPDirectoryDocument::isImageDocument):
3490         
3491         * loader/FTPDirectoryParser.cpp: Added.
3492         (WebCore::parseOneFTPLine): Adapted from ParseFTPList.cpp from Firefox - parses most known
3493           FTP directory listing styles into discrete FTP directory entries
3494         * loader/FTPDirectoryParser.h: Added.
3495         (WebCore::ListState::ListState): Maintains FTP Parser state
3496         (WebCore::ListResult::ListResult): Represents one FTP directory listing
3497         (WebCore::ListResult::clear):
3498
3499         * loader/FrameLoader.cpp:
3500         (WebCore::FrameLoader::checkContentPolicy): If the Settings say to bypass the policy check for 
3501           "application/x-ftp-directory", skip it.  This will allow people to test this feature even if their 
3502           browser/WebKit app would otherwise not allow it
3503
3504         * page/Settings.cpp:
3505         (WebCore::Settings::Settings):
3506         (WebCore::Settings::setFTPDirectoryTemplatePath): Set the path to the FTP listing document template
3507         (WebCore::Settings::setForceFTPDirectoryListings): Set to bypass the policy delegate check for mime type
3508           "application/x-ftp-directory"
3509         * page/Settings.h:
3510         (WebCore::Settings::ftpDirectoryTemplatePath):
3511         (WebCore::Settings::forceFTPDirectoryListings):
3512
3513         * platform/Logging.cpp: Add an "LogFTP" logging channel
3514         * platform/Logging.h:
3515         * platform/mac/LoggingMac.mm:
3516         (WebCore::InitializeLoggingChannelsIfNecessary):
3517
3518         * platform/MimeTypeRegistry.cpp:
3519         (WebCore::initialiseSupportedNonImageMimeTypes): Add "application/x-ftp-directory"
3520
3521         * platform/SharedBuffer.cpp:
3522         (WebCore::SharedBuffer::createWithContentsOfFile): Stub for now
3523         * platform/SharedBuffer.h:
3524
3525         * platform/mac/SharedBufferMac.mm:
3526         (WebCore::SharedBuffer::createWithContentsOfFile): Load contents of the file into an NSData, then
3527           wrap that NSData
3528
3529 2007-07-14  Alexey Proskuryakov  <ap@webkit.org>
3530
3531         Reviewed by Darin.
3532
3533         http://bugs.webkit.org/show_bug.cgi?id=14618
3534         REGRESSION(13464): drivehq.com login form doesn't work
3535
3536         Test: http/tests/misc/post-submit-button.html
3537
3538         * html/HTMLInputElement.cpp:
3539         (WebCore::HTMLInputElement::appendFormData): Append a submit even if its value is empty.
3540
3541 2007-07-13  Oliver Hunt  <oliver@apple.com>
3542
3543         Reviewed by Sam.
3544
3545         Fix for 
3546             <rdar://problem/5335265> REGRESSION: WebCore::DragController crashes if WebDragSourceActionDHTML cleared
3547             http://bugs.webkit.org/show_bug.cgi?id=13652
3548
3549         Reorder logic for drag initiation: we can always preflight the clipboard, regardless as to whether 
3550         we are performing any dhtml drag handling    
3551
3552         * page/EventHandler.cpp:
3553         (WebCore::EventHandler::handleDrag):
3554
3555 2007-07-13  Matt Lilek  <pewtermoose@gmail.com>
3556
3557         Reviewed by Tim Hatcher.
3558
3559         Bug 14401: Semi-regression: Can no longer copy anything from the inspector
3560         http://bugs.webkit.org/show_bug.cgi?id=14401
3561
3562         * page/inspector/inspector.css:
3563
3564 2007-07-13  Beth Dakin  <bdakin@apple.com>
3565
3566         Reviewed by Hyatt.
3567
3568         Fix for <rdar://problem/5304742> A hang occurs when attempting to 
3569         display web clip banner at http://www.signonsandiego.com/sports/
3570         chargers/index.html
3571
3572         Here is the actual fix. 
3573         * rendering/RenderInline.cpp:
3574         (WebCore::RenderInline::absoluteRects): Set topLevel to 
3575         false when we recurse to get our children's absoluteRects.
3576         * rendering/RenderInline.h: New boolean parameter 
3577         topLevel that defaults to true.