Reviewed by Darin.
[WebKit-https.git] / WebCore / ChangeLog
1 2007-10-25  Alexey Proskuryakov  <ap@webkit.org>
2
3         Reviewed by Darin.
4
5         http://bugs.webkit.org/show_bug.cgi?id=15650
6         XML attribute nodes are not importable
7
8         Tests: fast/dom/import-attribute-node.html
9                fast/dom/import-document-fragment.html
10
11         * dom/Document.cpp:
12         (WebCore::Document::importNode): Implemented for Attribute and DocumentFragment nodes.
13
14 2007-10-25  Dan Bernstein  <mitz@apple.com>
15
16         Reviewed by Dave Hyatt.
17
18         - fix http://bugs.webkit.org/show_bug.cgi?id=15362
19           <rdar://problem/5558715> Safari Crashes when opening a JS TreeGrid widget
20
21         Test: fast/dynamic/insert-before-table-part-in-continuation.html
22
23         * rendering/RenderFlow.cpp:
24         (WebCore::RenderFlow::addChildWithContinuation): If beforeChild's
25         parent is an anonymous table part, let the table figure out where to
26         insert the new child.
27
28 2007-10-25  Alp Toker  <alp@atoker.com>
29
30         Reviewed by Brady.
31
32         http://bugs.webkit.org/show_bug.cgi?id=15686
33         GtkLauncher aborts on launch due to uninitialized threading subsystem
34
35         Re-enable database support in the GTK+ port, with a fix.
36
37         * WebCore.pro:
38
39 2007-10-25  Jon Honeycutt  <jhoneycutt@apple.com>
40
41         Reviewed by Steve.
42
43         <rdar://5548217>: [NTS] Java 6 update 3 crashes Safari when loading a 
44         java page
45
46         Previous patch erroneously compared a path and a
47         path-including-filename. This corrects that. It also caches the result
48         of safariPluginsPath() and uses shell API funcs for determining filename
49         and parent directory from a full path.
50
51         * ChangeLog:
52         * plugins/win/PluginDatabaseWin.cpp:
53         (WebCore::safariPluginsPath): Cache return value. Use API functions to
54         build the path
55         (WebCore::PluginDatabaseWin::pluginForMIMEType): Compare again plugin's
56         parent directory, not full path
57         (WebCore::PluginDatabaseWin::pluginForExtension): Same
58         * plugins/win/PluginPackageWin.cpp:
59         (WebCore::PluginPackageWin::PluginPackageWin): Store parent directory
60         * plugins/win/PluginPackageWin.h:
61         (WebCore::PluginPackageWin::parentDirectory):
62         * plugins/win/PluginStreamWin.cpp:
63         (WebCore::PluginStreamWin::didReceiveData):
64
65 2007-10-25  Alp Toker  <alp@atoker.com>
66
67         Unreviewed fix to make the GTK+ port run.
68
69         http://bugs.webkit.org/show_bug.cgi?id=15686
70         GtkLauncher aborts on launch due to uninitialized threading subsystem
71
72         Disable database support until #15686 is fixed.
73
74         * WebCore.pro:
75
76 2007-10-25  Simon Hausmann  <hausmann@kde.org>
77
78         Reviewed by Lars.
79
80         Fixed a crash in the Qt 4.4 based text iterators when they're called with a null string.
81
82         * platform/qt/TextBreakIteratorQt.cpp:
83         (WebCore::wordBreakIterator):
84         (WebCore::characterBreakIterator):
85         (WebCore::lineBreakIterator):
86         (WebCore::sentenceBreakIterator):
87
88 2007-10-25  Holger Freyther  <zecke@selfish.org>
89
90         Reviewed by Simon Hausmann <hausmann@kde.org>.
91
92         * We need to set a != 0 status code for the fast/loader/xmlhttprequest-missing-file-exception.html
93         * libxml2 has the semantic that when writing an empty string and finishing it will report an error. For QXmlStreamReader this is valid.
94         * This is causing some regressions...
95         
96
97         * dom/XMLTokenizer.cpp:
98         (WebCore::XMLTokenizer::XMLTokenizer):
99         (WebCore::XMLTokenizer::write):
100         (WebCore::XMLTokenizer::end):
101         * dom/XMLTokenizer.h:
102
103 2007-10-25  Holger Freyther  <zecke@selfish.org>
104
105         Reviewed by Simon Hausmann <hausmann@kde.org>.
106
107         * fast/dom/onerror-img.html regressed due checking the JobStates because in case of error (e.g. not being able to connect) the job will no be started.
108         * Use the error message from Qt. It might or might not be translated.
109         
110
111         WARNING: NO TEST CASES ADDED OR CHANGED
112
113         * platform/network/qt/ResourceHandleQt.cpp:
114         (WebCore::WebCoreSynchronousLoader::didFail):
115
116 2007-10-25  Holger Freyther  <zecke@selfish.org>
117
118         Reviewed by Simon Hausmann <hausmann@kde.org>.
119
120         * Implement our own queuing of network jobs to allow special handling of synchronous jobs. This makes us pass the fast/dom/xmlhttprequest-html-response-encoding.html test without a crash. Sync jobs will get a special treatment over the normals ones and in theory more than one sync job is supported.
121         * This should be thread-safe besides QWebNetworkJob::{ref,deref}
122         
123
124         * platform/network/qt/ResourceHandleQt.cpp:
125         (WebCore::ResourceHandle::loadResourceSynchronously):
126
127 2007-10-25  Alp Toker  <alp@atoker.com>
128
129         Reviewed by Mark Rowe.
130
131         Add support for list box theme colors and styled menu list buttons.
132
133         Remove obsolete FIXMEs.
134
135         * platform/gtk/RenderThemeGtk.cpp:
136         (WebCore::RenderThemeGtk::RenderThemeGtk):
137         (WebCore::RenderThemeGtk::paintCheckbox):
138         (WebCore::RenderThemeGtk::paintRadio):
139         (WebCore::RenderThemeGtk::paintButton):
140         (WebCore::RenderThemeGtk::adjustMenuListStyle):
141         (WebCore::RenderThemeGtk::paintMenuList):
142         (WebCore::RenderThemeGtk::activeListBoxSelectionBackgroundColor):
143         (WebCore::RenderThemeGtk::inactiveListBoxSelectionBackgroundColor):
144         (WebCore::RenderThemeGtk::activeListBoxSelectionForegroundColor):
145         (WebCore::RenderThemeGtk::inactiveListBoxSelectionForegroundColor):
146         (WebCore::RenderThemeGtk::gtkTreeView):
147         * platform/gtk/RenderThemeGtk.h:
148
149 2007-10-25  Eric Seidel  <eric@webkit.org>
150
151         Reviewed by Geoff.
152
153         * bindings/js/kjs_window.h: fix bogus comment, s/DOMNode/DOMObject/
154
155 2007-10-24  Eric Seidel  <eric@webkit.org>
156
157         Reviewed by Maciej.
158         
159         Make Window subclass from JSGlobalObject (for a .5% win in Sunspider)
160         http://bugs.webkit.org/show_bug.cgi?id=15681
161
162         No test cases necessary, no functional changes.
163
164         * WebCore.xcodeproj/project.pbxproj:
165         * bindings/js/kjs_binding.cpp:
166         (KJS::ScriptInterpreter::ScriptInterpreter):
167         * bindings/js/kjs_binding.h:
168         * bindings/js/kjs_proxy.cpp:
169         (WebCore::KJSProxy::initScriptIfNeeded):
170         * bindings/js/kjs_window.cpp:
171         (KJS::Window::Window):
172         * bindings/js/kjs_window.h:
173         * bindings/objc/WebScriptObject.mm:
174         (_didExecute):
175         * bridge/mac/WebCoreScriptDebugger.mm:
176
177 2007-10-24  Adam Roben  <aroben@apple.com>
178
179         Add font database initialization code to WebCore
180
181         Reviewed by Ada.
182
183         * WebCore.vcproj/WebCore.vcproj: Added FontDatabase.{cpp,h}.
184         * platform/win/FontDatabase.cpp: Added.
185         (WebCore::systemFontsDirectory):
186         (WebCore::fontsPlistPath):
187         (WebCore::systemHasFontsNewerThanFontsPlist):
188         (WebCore::readFontPlist):
189         (WebCore::populateFontDatabaseFromPlist):
190         (WebCore::populateFontDatabaseFromFileSystem):
191         (WebCore::writeFontDatabaseToPlist):
192         (WebCore::populateFontDatabase): This is the only function callable
193         from outside this file. It populates the font database once, either
194         from the fonts plist, or from the filesystem (and then saves a new
195         fonts plist).
196         * platform/win/FontDatabase.h: Added.
197
198 2007-10-24  Justin Garcia  <justin.garcia@apple.com>
199
200         Reviewed by Darin Adler.
201
202         Correcting the fix for:
203         <rdar://problem/5544856> 
204         REGRESSION: After typing 2-byte text, undo only undoes one keystroke at a time
205         
206         Made removal of the previous composition part of the current Undo step in the 
207         case where the new composition is the empty string, too.
208
209         * editing/Editor.cpp:
210         (WebCore::Editor::confirmComposition): Call the new TypingCommand::deleteSelection,
211         which either has the currently open typing command delete the current selection, or
212         opens a new typing command (of type DeleteSelection) if one is not already open.
213         (WebCore::Editor::setComposition): Ditto.
214         * editing/TypingCommand.cpp:
215         (WebCore::TypingCommand::deleteSelection): Added.
216         (WebCore::TypingCommand::doApply): Handle DeleteSelection.
217         (WebCore::TypingCommand::deleteKeyPressed): Clarified which deleteSelection
218         is called.
219         (WebCore::TypingCommand::forwardDeleteKeyPressed): Ditto.
220         (WebCore::TypingCommand::preservesTypingStyle): Handle DeleteSelection.
221         * editing/TypingCommand.h:
222
223 2007-10-24  Sam Weinig  <sam@webkit.org>
224
225         Build fix.
226
227         * WebCore.vcproj/WebCore.vcproj:
228
229 >>>>>>> .r27047
230 2007-10-24  Alice Liu  <alice.liu@apple.com>
231
232         Reviewed by Oliver.
233
234         Fix <rdar://5410959>  editing/selection/drag-to-contenteditable-iframe.html fails on Windows
235         
236         * page/win/EventHandlerWin.cpp:
237         (WebCore::EventHandler::passMouseMoveEventToSubframe):
238         Some mouse move events are actually drags, which on mac return early from this function.
239         Adding the same logic to its Windows equivalent.  
240
241 2007-10-24  Brady Eidson  <beidson@apple.com>
242
243         Reviewed by Anders
244
245         <rdar://5554130> DatabaseTracker.o has a global initializer
246
247         Since DatabaseTracker is a singleton, it makes much more sense to keep the database path as a member variable.
248         Now constructing the shared DatabaseTracker no longer implicitly opens it - It is only opened when the databases 
249         path is set.
250         
251         * WebCore.vcproj/WebCore.vcproj: Copy WebCore/storage headers for WebKit build
252         
253         * storage/Database.cpp:
254         (WebCore::Database::~Database): Remove bogus assertion
255         
256         * storage/DatabaseTracker.cpp:
257         (WebCore::DatabaseTracker::DatabaseTracker): Does nothing now!  Move this code to openTrackerDatabase
258         (WebCore::DatabaseTracker::setDatabasePath): Set the member variable, also closing/opening the database if needed
259         (WebCore::DatabaseTracker::databasePath):
260         (WebCore::DatabaseTracker::openTrackerDatabase): To open and validate the Databases db, moved from the c'tor
261         (WebCore::DatabaseTracker::fullPathForDatabase): Return the member variable
262         * storage/DatabaseTracker.h:
263
264 >>>>>>> .r27005
265 2007-10-24  David Hyatt  <hyatt@apple.com>
266
267         Don't try to gap fill transformed selections.  Fix the invalidation of selection to use the clip to visible content
268         code path so that it works with multi-column layouts and transforms.
269
270         Reviewed by aroben
271
272         * rendering/RenderBlock.cpp:
273         (WebCore::RenderBlock::isSelectionRoot):
274         (WebCore::RenderBlock::fillSelectionGaps):
275         * rendering/RenderView.cpp:
276         (WebCore::RenderView::setSelection):
277
278 2007-10-24  Eric Seidel  <eric@webkit.org>
279
280         No review, I want to tickle the CIA bot to test changes,
281         and took this as an opportunity to clean up some old change logs.
282
283         * ChangeLog-2005-08-23: update email address
284         * ChangeLog-2006-12-31: fix spelling mistakes
285
286 2007-10-24  Dan Bernstein  <mitz@apple.com>
287
288         Reviewed by Oliver Hunt.
289
290         - add "(anonymous)" to the renderName of anonymous table cells, rows and sections
291
292         * rendering/RenderTableCell.h:
293         (WebCore::RenderTableCell::renderName):
294         * rendering/RenderTableRow.h:
295         (WebCore::RenderTableRow::renderName):
296         * rendering/RenderTableSection.h:
297         (WebCore::RenderTableSection::renderName):
298
299 2007-10-24  Timothy Hatcher  <timothy@apple.com>
300
301         Reviewed by Adam.
302
303         Bug 15476: DOM tree fully expands some elements when arrowing up
304         http://bugs.webkit.org/show_bug.cgi?id=15476
305
306         Add a new expandTreeElementsWhenArrowing option to TreeOutline. This option
307         is used only for the sidebar and search results.
308
309         * page/inspector/inspector.js: Opt-in for the sidebar and search results.
310         * page/inspector/treeoutline.js: Add expandTreeElementsWhenArrowing and pass
311           this option to traverseNextTreeElement and traversePreviousTreeElement.
312
313 2007-10-24  Anders Carlsson  <andersca@apple.com>
314
315         Reviewed by Geoff and Mitz.
316
317         <rdar://problem/5493833>
318         REGRESSION: ~5MB of image data leaked @ cuteoverload.com (often seen while browsing other sites, too)
319
320         * bindings/js/kjs_binding.cpp:
321         (KJS::ScriptInterpreter::markDOMNodesForDocument):
322         If an image element that is currently loading an image is not in the document,
323         it should still be marked.
324         
325         * bindings/js/kjs_html.cpp:
326         (WebCore::ImageConstructorImp::construct):
327         Force the document wrapper to be created.
328         
329         * html/HTMLImageElement.h:
330         (WebCore::HTMLImageElement::haveFiredLoadEvent):
331         New method which calls down to the image loader.
332         
333         * html/HTMLImageLoader.cpp:
334         (WebCore::HTMLImageLoader::HTMLImageLoader):
335         (WebCore::HTMLImageLoader::~HTMLImageLoader):
336         (WebCore::HTMLImageLoader::setLoadingImage):
337         (WebCore::HTMLImageLoader::dispatchLoadEvent):
338         Remove code that's not needed anymore.
339         
340         * html/HTMLImageLoader.h:
341         (WebCore::HTMLImageLoader::haveFiredLoadEvent):
342         Make this public.
343
344 2007-10-23  Adam Roben  <aroben@apple.com>
345
346         Move Windows safe file creation code into WebCore from WebPreferences
347
348         Reviewed by Brady.
349
350         * platform/FileSystem.h:
351         * platform/win/FileSystemWin.cpp:
352         (WebCore::safeCreateFile): Moved here from WebKit/win/WebPreferences.cpp.
353
354 2007-10-23  Adam Roben  <aroben@apple.com>
355
356         Add methods to FileSystemWin to get some user profile directories
357
358         These directories are used to hold things like preferences, caches,
359         etc.
360
361         Reviewed by Brady.
362
363         * platform/FileSystem.h: Added new method declarations for Windows
364         only.
365         * platform/win/FileSystemWin.cpp:
366         (WebCore::bundleName): Added.
367         (WebCore::storageDirectory): Added.
368         (WebCore::cachedStorageDirectory): Added.
369         (WebCore::localUserSpecificStorageDirectory): Added. Returns the
370         directory where WebKit should store any user-specific data that should
371         stay local to the current machine (i.e., shouldn't be stored in a
372         roaming profile).
373         (WebCore::roamingUserSpecificStorageDirectory): Added. Returns the
374         directory where WebKit should store any user-specific data that should
375         move with the user from machine to machine (i.e., should be stored in
376         a roaming profile).
377
378 2007-10-24  Alp Toker  <alp@atoker.com>
379
380         Reviewed by Mark Rowe.
381
382         http://bugs.webkit.org/show_bug.cgi?id=15659
383         InlineTextBox does not setStrokeStyle() as needed
384
385         GraphicsContextCairo workaround to support a GraphicsContextCG quirk:
386
387         Save and restore the StrokeStyle manually.
388
389         * platform/graphics/cairo/GraphicsContextCairo.cpp:
390         (WebCore::GraphicsContext::drawLineForText):
391
392 2007-10-24  Julien Chaffraix  <julien.chaffraix@gmail.com>
393
394         Reviewed by Darin.
395
396         Patch for http://bugs.webkit.org/show_bug.cgi?id=15356
397         Bug 15356: getResponseHeader and getAllResponseHeaders do not throw exceptions
398
399         - getAllResponseHeaders and getResponseHeader throws INVALID_STATE_ERR exception as specified in the specification
400
401         - Add the check to field-name production in getResponseHeader (call to isValidToken) and returns an empty string if the header is not valid (Opera and IE behaviour)
402
403         - Updated XMLHttpRequest::responseMIMEType() to keep its behaviour
404
405         Tests: http/tests/xmlhttprequest/xmlhttprequest-InvalidStateException-getAllRequestHeaders.html
406                http/tests/xmlhttprequest/xmlhttprequest-InvalidStateException-getRequestHeader.html
407                http/tests/xmlhttprequest/xmlhttprequest-invalidHeader-getRequestHeader.html
408
409         * bindings/js/JSXMLHttpRequest.cpp:
410         (KJS::JSXMLHttpRequestPrototypeFunction::callAsFunction):
411         * xml/XMLHttpRequest.cpp:
412         (WebCore::XMLHttpRequest::getAllResponseHeaders):
413         (WebCore::XMLHttpRequest::getResponseHeader):
414         (WebCore::XMLHttpRequest::responseMIMEType):
415         * xml/XMLHttpRequest.h:
416
417 2007-10-24  Lars Knoll  <lars@trolltech.com>
418
419         Reviewed by Simon.
420
421         implement most of DragData.
422
423         WARNING: NO TEST CASES ADDED OR CHANGED
424
425         * platform/qt/DragDataQt.cpp:
426         (WebCore::DragData::containsColor):
427         (WebCore::DragData::containsFiles):
428         (WebCore::DragData::asFilenames):
429         (WebCore::DragData::containsPlainText):
430         (WebCore::DragData::asPlainText):
431         (WebCore::DragData::asColor):
432         (WebCore::DragData::containsCompatibleContent):
433         (WebCore::DragData::containsURL):
434
435 2007-10-24  Lars Knoll  <lars@trolltech.com>
436
437         Reviewed by Simon.
438
439         remove a stupid notImplemented() warning and implement PasteBoad::clear().
440
441         WARNING: NO TEST CASES ADDED OR CHANGED
442
443         * platform/qt/PasteboardQt.cpp:
444
445 2007-10-24  Lars Knoll  <lars@trolltech.com>
446
447         Reviewed by Simon.
448
449         implement Pasteboard::documentFragment(), and fix a mem leak.
450
451         WARNING: NO TEST CASES ADDED OR CHANGED
452
453         * platform/qt/PasteboardQt.cpp:
454         (WebCore::Pasteboard::generalPasteboard):
455         (WebCore::Pasteboard::documentFragment):
456
457 2007-10-24  Lars Knoll  <lars@trolltech.com>
458
459         Reviewed by Simon.
460
461         Simplify the PlatformKeyEvent constructor. No need to have an extra boolean for isKeyUp in there, as the QKeyEvent has the information.
462
463         WARNING: NO TEST CASES ADDED OR CHANGED
464
465         * platform/PlatformKeyboardEvent.h:
466         * platform/qt/PlatformKeyboardEventQt.cpp:
467         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
468
469 2007-10-24  Lars Knoll  <lars@trolltech.com>
470
471         Reviewed by Simon.
472
473         use the new QTextBoundaryFinder class in Qt.
474
475         WARNING: NO TEST CASES ADDED OR CHANGED
476
477         * platform/qt/TextBoundaries.cpp:
478         (WebCore::findNextWordFromIndex):
479         (WebCore::findWordBoundary):
480         * platform/qt/TextBreakIteratorQt.cpp:
481         (WebCore::wordBreakIterator):
482         (WebCore::characterBreakIterator):
483         (WebCore::lineBreakIterator):
484         (WebCore::sentenceBreakIterator):
485         (WebCore::textBreakFirst):
486         (WebCore::textBreakNext):
487         (WebCore::textBreakPreceding):
488         (WebCore::textBreakFollowing):
489         (WebCore::textBreakCurrent):
490         (WebCore::isTextBreak):
491
492 2007-10-24  Darin Adler  <darin@apple.com>
493
494         Reviewed by Maciej.
495
496         - http://bugs.webkit.org/show_bug.cgi?id=15657
497           change static hash tables to use powers of two for speed
498
499         * bindings/scripts/CodeGeneratorJS.pm: Updated to generate new format.
500
501 2007-10-24  Simon Hausmann  <hausmann@kde.org>
502
503         Reviewed by Lars.
504
505         Make the implementation of pathByAppendingComponent use QDir.
506
507         * platform/qt/FileSystemQt.cpp:
508
509 2007-10-24  David Hyatt  <hyatt@apple.com>
510
511         Make repainting work with transforms.
512
513         Reviewed by John Sullivan
514
515         * rendering/RenderBox.cpp:
516         (WebCore::RenderBox::computeAbsoluteRepaintRect):
517
518 2007-10-23  Alp Toker  <alp@atoker.com>
519
520         Reviewed by Maciej.
521
522         http://bugs.webkit.org/show_bug.cgi?id=14412
523         [GDK] Clipboard support
524
525         Initial clipboard implementation for the GTK+ port.
526
527         * platform/gtk/ClipboardGtk.cpp:
528         (WebCore::Editor::newGeneralClipboard):
529         * platform/gtk/PasteboardGtk.cpp:
530         (WebCore::Pasteboard::generalPasteboard):
531         (WebCore::Pasteboard::Pasteboard):
532         (WebCore::Pasteboard::~Pasteboard):
533         (WebCore::Pasteboard::writeSelection):
534         (WebCore::Pasteboard::writeImage):
535         (WebCore::Pasteboard::clear):
536         (WebCore::Pasteboard::plainText):
537         * platform/gtk/TemporaryLinkStubs.cpp:
538
539 2007-10-23  Timothy Hatcher  <timothy@apple.com>
540
541         Reviewed by Adam.
542
543         Fixes the Network panel so that it refreshes as needed.
544
545         * page/inspector/ConsolePanel.js: Call the base class show() and hide() first.
546         * page/inspector/NetworkPanel.js: Add refreshNeeded and refreshIfNeeded back. Ditto.
547
548 2007-10-23  Justin Garcia  <justin.garcia@apple.com>
549
550         Reviewed by Oliver Hunt.
551
552         <rdar://problem/5544856> 
553         REGRESSION: After typing 2-byte text, undo only undoes one keystroke at a time
554         
555         No layout test for now because I'm having trouble getting Undo during a layout
556         test to only undo the last Undo step, and I want to write a test that fails
557         without the code change.
558
559         * editing/Editor.cpp:
560         (WebCore::Editor::confirmComposition): When we replace the previous composition,
561         delete it with a sub-command of the command used to insert the new composition,
562         instead of with a separate command.  No new code was added because insertText
563         already deletes the current selection.
564         (WebCore::Editor::setComposition): Ditto.
565
566 2007-10-23  Adam Roben  <aroben@apple.com>
567
568         Fix the behavior of pathByAppendingComponent when path is empty
569
570         We now use the Windows Shell API function PathAppendW instead of
571         rolling our own broken implementation.
572
573         Reviewed by Anders.
574
575         * platform/win/FileSystemWin.cpp:
576         (WebCore::pathByAppendingComponent):
577
578 2007-10-23  Adele Peterson  <adele@apple.com>
579
580         Reviewed by Darin.
581
582         Fix for <rdar://problem/5543228> CrashTracer: [USER] 2 crashes in Safari at com.apple.WebCore: WebCore::HTMLInputElement::defaultEventHandler + 872
583
584         Test: fast/forms/textfield-onchange-deletion.html
585
586         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler):
587           Refetch the renderer since arbitrary JS code run during onchange can do anything, including destroying it.
588
589 2007-10-23  Timothy Hatcher  <timothy@apple.com>
590
591         Reviewed by Sam Weinig.
592
593         - Made seperate files for the various classes in ResourcePanel.js.
594         - Broke up ResourcePanel.js and created seperate panel classes for different resource types.
595         - Moved View code down to the Panel base-class.
596         - Reduced code duplication in DatabasePanel.js by sub-classing from the new ResourcePanel.
597
598         * page/inspector/DatabasePanel.js:
599         * page/inspector/DocumentPanel.js: Added.
600         * page/inspector/FontPanel.js: Added.
601         * page/inspector/ImagePanel.js: Added.
602         * page/inspector/Panel.js: Added.
603         * page/inspector/PropertiesSection.js: Added.
604         * page/inspector/Resource.js:
605         * page/inspector/ResourcePanel.js:
606         * page/inspector/SidebarPane.js: Added.
607         * page/inspector/SourcePanel.js: Added.
608         * page/inspector/inspector.css:
609         * page/inspector/inspector.html:
610         * page/inspector/inspector.js:
611
612 2007-10-23  Anders Carlsson  <andersca@apple.com>
613
614         Correct the version #if check.
615         
616         * platform/sql/SQLDatabase.cpp:
617         (WebCore::SQLDatabase::authorizerFunction):
618
619 2007-10-23  Jon Honeycutt  <jhoneycutt@apple.com>
620
621         Reviewed by Anders.
622
623         <rdar://5548217>: [NTS] Java 6 update 3 crashes Safari when loading a 
624         java page
625
626         It is possible to load Mozilla's Java plugin instead of our own, which
627         can lead to a crash. The fix is to prefer plugins in our own Plugins
628         directory when searching for a plugin.
629
630         * plugins/win/PluginDatabaseWin.cpp:
631         (WebCore::safariPluginsPath): Return the path to our own Plugins
632         directory
633         (WebCore::PluginDatabaseWin::defaultPluginPaths): Use new method
634         safariPluginsPath()
635         (WebCore::PluginDatabaseWin::pluginForMIMEType): If the plugin's path is
636         our Plugins path, return this plugin. Otherwise, continue scanning the
637         list of plugins
638         (WebCore::PluginDatabaseWin::pluginForExtension): Same
639         * plugins/win/PluginPackageWin.h:
640         (WebCore::PluginPackageWin::path): Return this plugin's path
641
642 2007-10-23  Jasper Bryant-Greene  <m@ni.ac.nz>
643
644         Reviewed by Darin.
645
646         http://bugs.webkit.org/show_bug.cgi?id=15058
647         Precedence fault in KeyEventGdk causes shift, control, alt etc to work incorrectly
648
649         Corrected precendence fault which was causing Shift, Alt, Control and
650         Meta to behave incorrectly on GTK.
651
652         Coding style fix by Alp.
653
654         * platform/gtk/KeyEventGtk.cpp:
655         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
656
657 2007-10-23  Sam Weinig  <sam@webkit.org>
658
659         Reviewed by Tim Hatcher.
660
661         Add resizing of the DOM view right sidebar.  This allows us to actually see the values now.
662
663         * page/inspector/ResourcePanel.js:
664         * page/inspector/inspector.css:
665         * page/inspector/inspector.js:
666         * page/inspector/utilities.js:
667
668 2007-10-23  David Hyatt  <hyatt@apple.com>
669
670         Get basic hit testing right for transforms.
671
672         Reviewed by ollliej
673
674         * platform/graphics/AffineTransform.cpp:
675         (WebCore::AffineTransform::mapPoint):
676         * platform/graphics/AffineTransform.h:
677         * rendering/InlineBox.cpp:
678         (WebCore::InlineBox::nodeAtPoint):
679         * rendering/RenderBlock.cpp:
680         (WebCore::RenderBlock::nodeAtPoint):
681         * rendering/RenderLayer.cpp:
682         (WebCore::RenderLayer::paintLayer):
683         (WebCore::RenderLayer::hitTest):
684         (WebCore::RenderLayer::hitTestLayer):
685         * rendering/RenderLayer.h:
686         * rendering/RenderObject.cpp:
687         (WebCore::RenderObject::hitTest):
688         * rendering/RenderObject.h:
689
690 2007-10-23  Eric Seidel  <eric@webkit.org>
691
692         Reviewed by Mark Rowe.
693
694         Fix leaks seen on TOT from new font-face code.
695
696         * ksvg2/svg/SVGFontFaceElement.cpp:
697         (WebCore::SVGFontFaceElement::rebuildFontFace): use a stack allocated CSSProperty instead of mallocing
698
699 2007-10-23  Eric Seidel  <eric@webkit.org>
700
701         Build fix only, no review.
702
703         Sacrifice three virgin hours upon the altar of the heathen XCode gods
704         and pray that our build troubles are finally over. :(
705
706         * DerivedSources.make: add DOMSVGException.h
707         * WebCore.xcodeproj/project.pbxproj: Remove DOMSVG*Interal.h files from "Copy Generated Headers" phase. Why?  Who knows.
708
709 2007-10-22  Steve Falkenburg  <sfalken@apple.com>
710
711         Fix build.
712
713         * plugins/win/PluginViewWin.cpp:
714
715 2007-10-22  Eric Seidel  <eric@webkit.org>
716
717         Build fix only, no review.
718
719         * WebCore.xcodeproj/project.pbxproj: re-add all DOMSVG headers to copy-files phase to make sure.
720
721 2007-10-22  Eric Seidel  <eric@webkit.org>
722
723         Build fix only, no review.
724
725         * WebCore.xcodeproj/project.pbxproj: make sure DOMSVGAnimateElement.h is copied into headers.
726
727 2007-10-22  Eric Seidel  <eric@webkit.org>
728
729         Reviewed by Maciej.
730
731         Fix build by properly exposing SVG font-face dom bindings.
732
733         * DerivedSources.make:
734         * WebCore.vcproj/WebCore.vcproj: add font-face files to build
735         * WebCore.xcodeproj/project.pbxproj: add missing DOM bindings files
736         * bindings/js/JSSVGElementWrapperFactory.cpp:
737         * bindings/objc/DOM.mm:
738         (WebCore::createElementClassMap):
739         * bindings/objc/DOMSVG.h:
740         * ksvg2/svg/SVGDefinitionSrcElement.idl: inherit from SVGElement
741
742 2007-10-22  Mark Rowe  <mrowe@apple.com>
743
744         Gtk build fix.
745
746         * WebCore.pro:
747
748 2007-10-22  Darin Adler  <darin@apple.com>
749
750         - a first cut at fixing the Qt and GTK builds
751
752         * WebCore.pro: Add new .idl and .cpp files.
753         * DerivedSources.make: Re-sorted.
754
755 2007-10-22  Eric Seidel  <eric@webkit.org>
756
757         Reviewed by hyatt.
758
759         Implement <font-face> and friends for SVG.
760         http://bugs.webkit.org/show_bug.cgi?id=10652
761
762         * DerivedSources.make:
763         * WebCore.xcodeproj/project.pbxproj:
764         * bindings/js/JSSVGElementWrapperFactory.cpp:
765         * dom/Document.cpp:
766         (WebCore::Document::mappedElementSheet):
767         (WebCore::Document::recalcStyleSelector):
768         * dom/Document.h:
769         * ksvg2/scripts/make_names.pl:
770         * ksvg2/svg/SVGDefinitionSrcElement.cpp: Added.
771         (WebCore::SVGDefinitionSrcElement::SVGDefinitionSrcElement):
772         (WebCore::SVGDefinitionSrcElement::~SVGDefinitionSrcElement):
773         (WebCore::SVGDefinitionSrcElement::childrenChanged):
774         * ksvg2/svg/SVGDefinitionSrcElement.h: Added.
775         * ksvg2/svg/SVGDefinitionSrcElement.idl: Added.
776         * ksvg2/svg/SVGFontFaceElement.cpp: Added.
777         (WebCore::SVGFontFaceElement::SVGFontFaceElement):
778         (WebCore::SVGFontFaceElement::~SVGFontFaceElement):
779         (WebCore::cssPropertyIdForName):
780         (WebCore::mapAttributeToCSSProperty):
781         (WebCore::cssPropertyIdForSVGAttributeName):
782         (WebCore::SVGFontFaceElement::parseMappedAttribute):
783         (WebCore::SVGFontFaceElement::rebuildFontFace):
784         (WebCore::SVGFontFaceElement::childrenChanged):
785         * ksvg2/svg/SVGFontFaceElement.h: Added.
786         * ksvg2/svg/SVGFontFaceElement.idl: Added.
787         * ksvg2/svg/SVGFontFaceFormatElement.cpp: Added.
788         (WebCore::SVGFontFaceFormatElement::SVGFontFaceFormatElement):
789         (WebCore::SVGFontFaceFormatElement::~SVGFontFaceFormatElement):
790         (WebCore::SVGFontFaceFormatElement::childrenChanged):
791         * ksvg2/svg/SVGFontFaceFormatElement.h: Added.
792         * ksvg2/svg/SVGFontFaceFormatElement.idl: Added.
793         * ksvg2/svg/SVGFontFaceNameElement.cpp: Added.
794         (WebCore::SVGFontFaceNameElement::SVGFontFaceNameElement):
795         (WebCore::SVGFontFaceNameElement::~SVGFontFaceNameElement):
796         (WebCore::SVGFontFaceNameElement::srcValue):
797         * ksvg2/svg/SVGFontFaceNameElement.h: Added.
798         * ksvg2/svg/SVGFontFaceNameElement.idl: Added.
799         * ksvg2/svg/SVGFontFaceSrcElement.cpp: Added.
800         (WebCore::SVGFontFaceSrcElement::SVGFontFaceSrcElement):
801         (WebCore::SVGFontFaceSrcElement::~SVGFontFaceSrcElement):
802         (WebCore::SVGFontFaceSrcElement::srcValue):
803         (WebCore::SVGFontFaceSrcElement::childrenChanged):
804         * ksvg2/svg/SVGFontFaceSrcElement.h: Added.
805         * ksvg2/svg/SVGFontFaceSrcElement.idl: Added.
806         * ksvg2/svg/SVGFontFaceUriElement.cpp: Added.
807         (WebCore::SVGFontFaceUriElement::SVGFontFaceUriElement):
808         (WebCore::SVGFontFaceUriElement::~SVGFontFaceUriElement):
809         (WebCore::SVGFontFaceUriElement::srcValue):
810         (WebCore::SVGFontFaceUriElement::childrenChanged):
811         * ksvg2/svg/SVGFontFaceUriElement.h: Added.
812         * ksvg2/svg/SVGFontFaceUriElement.idl: Added.
813         * ksvg2/svg/svgtags.in:
814
815 2007-10-22  Jon Honeycutt  <jhoneycutt@apple.com>
816
817         Reviewed by Anders.
818
819         <rdar://5548217>: [NTS] Java 6 update 3 crashes Safari when loading a 
820         java page
821
822         We purposefully do not destroy our Java VM when its reference count
823         reaches 0, but we were unloading our JavaPlugin.dll when its reference
824         count reached 0, which lost the reference to the VM. This led to our
825         process trying to create a new VM the next time a page using Java was
826         loaded, and the JNI spec states that a single process is not allowed to
827         create more than one VM. The fix is to avoid unloading the Java plugin
828         via our PluginQuirkDontUnloadPlugin. 
829
830         * plugins/win/PluginViewWin.cpp:
831         (WebCore::PluginViewWin::determineQuirks):
832
833 2007-10-22  David Hyatt  <hyatt@apple.com>
834
835         Fix for bug 15624, make transforms work properly with opacity.
836
837         Make sure a unitless 0 is allowed as an angle argument to rotation/skew.
838
839         Reviewed by Mitz Pettel
840
841         fast/transforms/transforms-with-opacity.html
842         fast/transforms/skew-with-unitless-zero.html
843
844         * css/CSSParser.cpp:
845         (WebCore::CSSParser::validUnit):
846         * rendering/RenderLayer.cpp:
847         (WebCore::transparencyClipBox):
848         (WebCore::RenderLayer::beginTransparencyLayers):
849         (WebCore::RenderLayer::paintLayer):
850         (WebCore::RenderLayer::calculateClipRects):
851         * rendering/RenderLayer.h:
852         (WebCore::RenderLayer::transform):
853
854 2007-10-22  Adam Roben  <aroben@apple.com>
855
856         Windows build fix
857
858         Reviewed by NOBODY.
859
860         * WebCore.vcproj/WebCore.vcproj: Copy header files from platform/sql.
861         * page/Page.cpp: Touched to force the header files to be copied.
862
863 2007-10-22  Nikolas Zimmermann  <zimmermann@kde.org>
864
865         Reviewed by Simon.
866
867         Move textPath related SVGChar data in it's own structure SVGCharOnPath.
868         Store a pointer to that datastructure inside SVGChar, instead of 4 floats & one bool.
869
870         Saves space for the common case. And allows me to add more data (another float) to support
871         glyph-orientation-* on textPath later on...
872
873         * rendering/SVGCharacterLayoutInfo.cpp:
874         (WebCore::SVGChar::characterTransform):
875         * rendering/SVGCharacterLayoutInfo.h:
876         * rendering/SVGRootInlineBox.cpp:
877         (WebCore::SVGRootInlineBoxPaintWalker::chunkPortionCallback):
878         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
879
880 2007-10-22  Alp Toker  <alp@atoker.com>
881
882         Reviewed by Nikolas Zimmermann.
883
884         Implement more GraphicsContextCairo stubs.
885
886         Remove a hack "to work around no current point bug" that was breaking
887         canvas tests.
888
889         Fix warnings.
890
891         * platform/graphics/cairo/CairoPath.h:
892         (WebCore::CairoPath::CairoPath):
893         * platform/graphics/cairo/GraphicsContextCairo.cpp:
894         (WebCore::GraphicsContext::addInnerRoundedRectClip):
895         (WebCore::GraphicsContext::strokeRect):
896         * platform/graphics/cairo/PathCairo.cpp:
897         (WebCore::Path::isEmpty):
898         * platform/graphics/svg/cairo/SVGPaintServerGradientCairo.cpp:
899         (WebCore::SVGPaintServerGradient::setup):
900         * platform/graphics/svg/cairo/SVGPaintServerSolidCairo.cpp:
901         (WebCore::SVGPaintServerSolid::setup):
902
903 2007-10-22  Simon Hausmann  <hausmann@kde.org>
904
905         Reviewed by Nikolas.
906
907         Fix compilation from a clean build with the database feature disabled.
908         JSCustomVersionChangeCallback.cpp doesn't actually need the SQL header file, just ScriptInterpreter.
909
910         * bindings/js/JSCustomVersionChangeCallback.cpp:
911         * page/InspectorController.cpp:
912
913 2007-10-22  Andrew Wellington  <proton@wiretapped.net>
914
915         Reviewed by Mark Rowe.
916
917         Fix for local database support after r26879
918         Ensure that ENABLE_DATABASE and ENABLE_ICONDATABASE are correctly set
919
920         * Configurations/WebCore.xcconfig:
921         * WebCore.pro:
922         * WebCore.vcproj/build-generated-files.sh:
923
924 2007-10-22  Simon Hausmann  <hausmann@kde.org>
925
926         Reviewed by Lars.
927
928         Disable the Database feature for the qmake build for now.
929
930         * WebCore.pro:
931
932 2007-10-22  Simon Hausmann  <hausmann@kde.org>
933
934         Reviewed by Lars.
935
936         Make disabling the database feature (ENABLE_DATABASE=0) work by
937         placing various #ifdefs into the code and making the compilation of
938         some files optional.
939
940         * WebCore.pro:
941         * dom/Document.cpp:
942         (WebCore::Document::~Document):
943         (WebCore::Document::defaultEventHandler):
944         * dom/Document.h:
945         * page/DOMWindow.cpp:
946         * page/DOMWindow.h:
947         * page/DOMWindow.idl:
948         * page/InspectorController.cpp:
949         (WebCore::InspectorController::windowScriptObjectAvailable):
950         (WebCore::InspectorController::populateScriptResources):
951         (WebCore::InspectorController::clearDatabaseScriptResources):
952         (WebCore::InspectorController::didCommitLoad):
953         * page/InspectorController.h:
954
955 2007-10-22  Alp Toker  <alp@atoker.com>
956
957         Reviewed by Mark Rowe.
958
959         http://bugs.webkit.org/show_bug.cgi?id=15611
960         [GTK] Text selection behaviour different in Debug and Release builds
961
962         http://bugs.webkit.org/show_bug.cgi?id=15578
963         [GTK] Text editor caret does not blink
964
965         Never allow control to reach the end of non-void functions.
966
967         Return more sensible values, or in some cases, nulls.
968
969         * page/gtk/EventHandlerGtk.cpp:
970         (WebCore::isKeyboardOptionTab):
971         (WebCore::EventHandler::tabsToAllControls):
972         (WebCore::EventHandler::eventActivatedView):
973
974 2007-10-22  Holger Freyther  <zecke@selfish.org>
975
976         Reviewed by Simon Hausmann <hausmann@kde.org>.
977
978         Implement ResourceHandle::loadResourceSynchronously using ResourceHandle and a special ResourceHandleClient. This approach has the possible danger of reentrancy.
979
980         * platform/network/qt/ResourceHandleQt.cpp:
981         (WebCore::WebCoreSynchronousLoader::resourceResponse):
982         (WebCore::WebCoreSynchronousLoader::resourceError):
983         (WebCore::WebCoreSynchronousLoader::data):
984         (WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader):
985         (WebCore::WebCoreSynchronousLoader::didReceiveResponse):
986         (WebCore::WebCoreSynchronousLoader::didReceiveData):
987         (WebCore::WebCoreSynchronousLoader::didFinishLoading):
988         (WebCore::WebCoreSynchronousLoader::didFail):
989         (WebCore::WebCoreSynchronousLoader::waitForCompletion):
990         (WebCore::ResourceHandle::loadResourceSynchronously):
991
992 2007-10-22  Holger Hans Peter Freyther <zecke@selfish.org>
993
994         Reviewed by Lars Knoll <lars@trolltech.com>.
995
996         Style fix. It is allowed to attempt to delete 0.
997
998         * platform/qt/ClipboardQt.cpp:
999
1000 2007-10-22  Holger Hans Peter Freyther <zecke@selfish.org>
1001
1002         Reviewed by Lars Knoll <lars@trolltech.com>.
1003
1004         Make it actually localizable....
1005
1006         * platform/qt/Localizations.cpp:
1007         (WebCore::submitButtonDefaultLabel):
1008         (WebCore::inputElementAltText):
1009         (WebCore::searchableIndexIntroduction):
1010         (WebCore::fileButtonChooseFileLabel):
1011         (WebCore::fileButtonNoFileSelectedLabel):
1012         (WebCore::contextMenuItemTagOpenLinkInNewWindow):
1013         (WebCore::contextMenuItemTagDownloadLinkToDisk):
1014         (WebCore::contextMenuItemTagCopyLinkToClipboard):
1015         (WebCore::contextMenuItemTagOpenImageInNewWindow):
1016         (WebCore::contextMenuItemTagDownloadImageToDisk):
1017         (WebCore::contextMenuItemTagCopyImageToClipboard):
1018         (WebCore::contextMenuItemTagOpenFrameInNewWindow):
1019         (WebCore::contextMenuItemTagCopy):
1020         (WebCore::contextMenuItemTagGoBack):
1021         (WebCore::contextMenuItemTagGoForward):
1022         (WebCore::contextMenuItemTagStop):
1023         (WebCore::contextMenuItemTagReload):
1024         (WebCore::contextMenuItemTagCut):
1025         (WebCore::contextMenuItemTagPaste):
1026         (WebCore::contextMenuItemTagNoGuessesFound):
1027         (WebCore::contextMenuItemTagIgnoreSpelling):
1028         (WebCore::contextMenuItemTagLearnSpelling):
1029         (WebCore::contextMenuItemTagSearchWeb):
1030         (WebCore::contextMenuItemTagLookUpInDictionary):
1031         (WebCore::contextMenuItemTagOpenLink):
1032         (WebCore::contextMenuItemTagIgnoreGrammar):
1033         (WebCore::contextMenuItemTagSpellingMenu):
1034         (WebCore::contextMenuItemTagShowSpellingPanel):
1035         (WebCore::contextMenuItemTagCheckSpelling):
1036         (WebCore::contextMenuItemTagCheckSpellingWhileTyping):
1037         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
1038         (WebCore::contextMenuItemTagFontMenu):
1039         (WebCore::contextMenuItemTagBold):
1040         (WebCore::contextMenuItemTagItalic):
1041         (WebCore::contextMenuItemTagUnderline):
1042         (WebCore::contextMenuItemTagOutline):
1043         (WebCore::contextMenuItemTagWritingDirectionMenu):
1044         (WebCore::contextMenuItemTagDefaultDirection):
1045         (WebCore::contextMenuItemTagLeftToRight):
1046         (WebCore::contextMenuItemTagRightToLeft):
1047         (WebCore::contextMenuItemTagInspectElement):
1048         (WebCore::searchMenuNoRecentSearchesText):
1049         (WebCore::searchMenuRecentSearchesText):
1050
1051 2007-10-22  Holger Hans Peter Freyther <zecke@selfish.org>
1052
1053         Reviewed by Lars Knoll <lars@trolltech.com>.
1054
1055         Adjust the code to obey the Coding Style.
1056
1057         * platform/qt/Localizations.cpp:
1058         (WebCore::submitButtonDefaultLabel):
1059         (WebCore::inputElementAltText):
1060         (WebCore::resetButtonDefaultLabel):
1061         (WebCore::defaultLanguage):
1062         (WebCore::searchableIndexIntroduction):
1063         (WebCore::fileButtonChooseFileLabel):
1064         (WebCore::fileButtonNoFileSelectedLabel):
1065         (WebCore::contextMenuItemTagOpenLinkInNewWindow):
1066         (WebCore::contextMenuItemTagDownloadLinkToDisk):
1067         (WebCore::contextMenuItemTagCopyLinkToClipboard):
1068         (WebCore::contextMenuItemTagOpenImageInNewWindow):
1069         (WebCore::contextMenuItemTagDownloadImageToDisk):
1070         (WebCore::contextMenuItemTagCopyImageToClipboard):
1071         (WebCore::contextMenuItemTagOpenFrameInNewWindow):
1072         (WebCore::contextMenuItemTagCopy):
1073         (WebCore::contextMenuItemTagGoBack):
1074         (WebCore::contextMenuItemTagGoForward):
1075         (WebCore::contextMenuItemTagStop):
1076         (WebCore::contextMenuItemTagReload):
1077         (WebCore::contextMenuItemTagCut):
1078         (WebCore::contextMenuItemTagPaste):
1079         (WebCore::contextMenuItemTagNoGuessesFound):
1080         (WebCore::contextMenuItemTagIgnoreSpelling):
1081         (WebCore::contextMenuItemTagLearnSpelling):
1082         (WebCore::contextMenuItemTagSearchWeb):
1083         (WebCore::contextMenuItemTagLookUpInDictionary):
1084         (WebCore::contextMenuItemTagOpenLink):
1085         (WebCore::contextMenuItemTagIgnoreGrammar):
1086         (WebCore::contextMenuItemTagSpellingMenu):
1087         (WebCore::contextMenuItemTagShowSpellingPanel):
1088         (WebCore::contextMenuItemTagCheckSpelling):
1089         (WebCore::contextMenuItemTagCheckSpellingWhileTyping):
1090         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
1091         (WebCore::contextMenuItemTagFontMenu):
1092         (WebCore::contextMenuItemTagBold):
1093         (WebCore::contextMenuItemTagItalic):
1094         (WebCore::contextMenuItemTagUnderline):
1095         (WebCore::contextMenuItemTagOutline):
1096         (WebCore::contextMenuItemTagWritingDirectionMenu):
1097         (WebCore::contextMenuItemTagDefaultDirection):
1098         (WebCore::contextMenuItemTagLeftToRight):
1099         (WebCore::contextMenuItemTagRightToLeft):
1100         (WebCore::contextMenuItemTagInspectElement):
1101         (WebCore::searchMenuNoRecentSearchesText):
1102         (WebCore::searchMenuRecentSearchesText):
1103         (WebCore::searchMenuClearRecentSearchesText):
1104         (WebCore::AXWebAreaText):
1105         (WebCore::AXLinkText):
1106         (WebCore::AXListMarkerText):
1107         (WebCore::AXImageMapText):
1108         (WebCore::AXHeadingText):
1109         (WebCore::unknownFileSizeText):
1110
1111 2007-10-22 Holger Hans Peter Freyther <zecke@selfish.org>
1112
1113         Reviewed by Lars Knoll <lars@trolltech.com>.
1114
1115         Return a non empty string in more functions.
1116
1117         * platform/qt/Localizations.cpp:
1118         (WebCore::contextMenuItemTagShowSpellingPanel):
1119
1120 2007-10-22  Holger Hans Peter Freyther <zecke@selfish.org>
1121
1122         Reviewed by Lars Knoll <lars@trolltech.com>.
1123
1124         Shrink the TemporaryLinkStubs and move the
1125         Frame::setNeedsReapplyStyles stub to FrameQt.cpp
1126
1127         * page/qt/FrameQt.cpp:
1128         (WebCore::Frame::setNeedsReapplyStyles):
1129         * platform/qt/TemporaryLinkStubs.cpp:
1130
1131 2007-10-22  Holger Freyther  <zecke@selfish.org>
1132
1133         Reviewed by Lars Knoll <lars@trolltech.com>.
1134
1135         Implement the WebCore::fileSize function. The
1136         implementation assumes that QFileInfo will cache
1137         the result of the stat so that info.size() and
1138         info.exists() use the same stat result.
1139
1140         * platform/qt/FileSystemQt.cpp:
1141         (WebCore::deleteFile):
1142         * platform/qt/TemporaryLinkStubs.cpp:
1143
1144 2007-10-21  Alp Toker  <alp@atoker.com>
1145
1146         Reviewed by Mark Rowe.
1147
1148         Use the portable GLib time function.
1149
1150         Use event timestamps rather than the current time where available.
1151
1152         Rename SharedTimerLinux.cpp since it isn't Linux-specific.
1153
1154         * WebCore.pro:
1155         * platform/gtk/MouseEventGtk.cpp:
1156         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
1157         * platform/gtk/SystemTimeGtk.cpp: Added.
1158         (WebCore::currentTime):
1159         * platform/gtk/SharedTimerGtk.cpp: Copied from platform/gtk/SharedTimerLinux.cpp.
1160         * platform/gtk/SharedTimerLinux.cpp: Removed.
1161
1162 2007-10-22  David Hyatt  <hyatt@apple.com>
1163
1164         Fix for 15596, regression from my transform changes.  Preserve null checks on the clip rects calls for parent(),
1165         since the method is called on orphaned layers.  This is not very well understood.
1166
1167         Reviewed by eric
1168
1169         * rendering/RenderLayer.cpp:
1170         (WebCore::RenderLayer::calculateClipRects):
1171         (WebCore::RenderLayer::calculateRects):
1172
1173 2007-10-21  Mark Rowe  <mrowe@apple.com>
1174
1175         Reviewed by Alp.
1176
1177         http://bugs.webkit.org/show_bug.cgi?id=15575
1178         Bug 15575: [GTK] Implement threading using GThread
1179
1180         * WebCore.pro: Remove ThreadingPthreads.cpp from the Gtk build and link against libgthreads.
1181         * loader/icon/IconDatabase.cpp: Initialize threading before the mutex is created to be compatible with gthreads.
1182         (WebCore::iconDatabase):
1183         (WebCore::IconDatabase::open):
1184         * platform/Threading.h:
1185         * platform/gtk/ThreadingGtk.cpp: Threading implementation in terms of GThread, based heavily on the pthreads implementation.
1186         (WebCore::initializeThreading):
1187         (WebCore::threadMapMutex):
1188         (WebCore::threadMap):
1189         (WebCore::establishIdentifierForThread):
1190         (WebCore::threadForIdentifier):
1191         (WebCore::clearThreadForIdentifier):
1192         (WebCore::createThread):
1193         (WebCore::waitForThreadCompletion):
1194         (WebCore::detachThread):
1195         (WebCore::Mutex::Mutex):
1196         (WebCore::Mutex::~Mutex):
1197         (WebCore::Mutex::lock):
1198         (WebCore::Mutex::tryLock):
1199         (WebCore::Mutex::unlock):
1200         (WebCore::ThreadCondition::ThreadCondition):
1201         (WebCore::ThreadCondition::~ThreadCondition):
1202         (WebCore::ThreadCondition::wait):
1203         (WebCore::ThreadCondition::signal):
1204         (WebCore::ThreadCondition::broadcast):
1205         * storage/Database.cpp:
1206         (WebCore::Database::Database): Initialize threading when Database is used so that it will be initialized even
1207         if the icon database is compiled out
1208
1209 2007-10-21  Mark Rowe  <mrowe@apple.com>
1210
1211         Build fix.
1212
1213         * ksvg2/css/SVGCSSStyleSelector.cpp: Use fabsf when dealing with a float to prevent the
1214         implicit conversion warning.
1215
1216 2007-10-21  Alp Toker  <alp@atoker.com>
1217
1218         Reviewed by Mark Rowe.
1219
1220         Implement spelling and grammar mistake underlining with Pango/Cairo.
1221
1222         This change does not add any actual support for spelling or grammar
1223         checking to any port.
1224
1225         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1226         (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
1227
1228 2007-10-21  Alp Toker  <alp@atoker.com>
1229
1230         Reviewed by Mark Rowe.
1231
1232         Cairo canvas fixes:
1233
1234         Fix a refcounting issue leading to leaks and crashes on canvas
1235         content.
1236
1237         Delegate memory management of canvas images to Cairo.
1238
1239         Mark unhandled conditions with notImplemented() instead of silently
1240         ignoring them.
1241
1242         * html/CanvasRenderingContext2D.cpp:
1243         (WebCore::CanvasRenderingContext2D::drawImage):
1244         * html/CanvasStyle.cpp:
1245         (WebCore::CanvasStyle::applyStrokeColor):
1246         * html/CanvasStyle.h:
1247         * html/HTMLCanvasElement.cpp:
1248         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
1249         (WebCore::HTMLCanvasElement::~HTMLCanvasElement):
1250         (WebCore::HTMLCanvasElement::reset):
1251         (WebCore::HTMLCanvasElement::paint):
1252         (WebCore::HTMLCanvasElement::createDrawingContext):
1253         (WebCore::HTMLCanvasElement::createPlatformImage):
1254
1255 2007-10-21  Nikolas Zimmermann  <zimmermann@kde.org>
1256
1257         Reviewed by Eric.
1258
1259         Handle glyph-orientation-vertical / glyph-orientation-horizontal SVG CSS properties.
1260
1261         The SVG layouting code itself doesn't handle these properties yet,
1262         it's just about recognizing them in the SVG CSS engine.
1263
1264         * ksvg2/css/SVGCSSComputedStyleDeclaration.cpp:
1265         (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue):
1266         * ksvg2/css/SVGCSSParser.cpp:
1267         (WebCore::CSSParser::parseSVGValue):
1268         * ksvg2/css/SVGCSSStyleSelector.cpp:
1269         (WebCore::CSSStyleSelector::applySVGProperty):
1270         * ksvg2/css/SVGRenderStyle.h:
1271         (WebCore::SVGRenderStyle::InheritedFlags::operator==):
1272         (WebCore::SVGRenderStyle::InheritedFlags::operator!=):
1273         (WebCore::SVGRenderStyle::setBitDefaults):
1274         * ksvg2/css/SVGRenderStyleDefs.h:
1275
1276 2007-10-21  Christian Dywan  <christian@twotoasts.de>
1277
1278         Reviewed by Alp.
1279
1280         http://bugs.webkit.org/show_bug.cgi?id=15589
1281         Use glib's path separator on gtk
1282
1283         * platform/gtk/FileSystemGtk.cpp:
1284         (WebCore::pathByAppendingComponent):
1285
1286 2007-10-21  Dan Bernstein  <mitz@apple.com>
1287
1288         Reviewed by Dave Hyatt.
1289
1290         - fix http://bugs.webkit.org/show_bug.cgi?id=15259
1291           <rdar://problem/5499902> REGRESSION: Text overflows when using word spacing and centering (affects myspace.com music videos page)
1292
1293         Test: fast/text/word-space.html
1294
1295         * rendering/RenderBlock.cpp:
1296         (WebCore::stripTrailingSpace): Added word-spacing to the width of the
1297         space being stripped out.
1298         * rendering/RenderText.cpp:
1299         (WebCore::RenderText::trimmedPrefWidths): Changed handling of
1300         leading space. Since Font::width includes leading space width but not
1301         leading word spacing, this method needs to either remove the width of a
1302         space character or add word spacing,
1303         depending on stripFrontSpaces. 
1304         (WebCore::RenderText::calcPrefWidths): Corrected the check for adding
1305         trailing word spacing so that it would work in the case where the last
1306         space is ignored.
1307         * rendering/bidi.cpp:
1308         (WebCore::RenderBlock::computeHorizontalPositionsForLine): Changed to
1309         actually add word spacing to the total width.
1310
1311 2007-10-20  David Hyatt  <hyatt@apple.com>
1312
1313         Land support for the transform CSS property.  Basic painting now works properly. There are many open issues
1314         that will have to be covered by individual bugs.
1315
1316         Reviewed by olliej
1317
1318         * css/CSSParser.cpp:
1319         (WebCore::CSSParser::validUnit):
1320         (WebCore::CSSParser::parseTransform):
1321         * rendering/RenderLayer.cpp:
1322         (WebCore::RenderLayer::RenderLayer):
1323         (WebCore::RenderLayer::~RenderLayer):
1324         (WebCore::RenderLayer::updateLayerPositions):
1325         (WebCore::RenderLayer::updateTransform):
1326         (WebCore::transparencyClipBox):
1327         (WebCore::RenderLayer::beginTransparencyLayers):
1328         (WebCore::RenderLayer::paintLayer):
1329         (WebCore::RenderLayer::calculateClipRects):
1330         (WebCore::RenderLayer::calculateRects):
1331         (WebCore::RenderLayer::childrenClipRect):
1332         (WebCore::RenderLayer::selfClipRect):
1333         (WebCore::RenderLayer::intersectsDamageRect):
1334         (WebCore::RenderLayer::boundingBox):
1335         * rendering/RenderLayer.h:
1336         * rendering/RenderObject.cpp:
1337         (WebCore::RenderObject::containingBlock):
1338         (WebCore::RenderObject::container):
1339         * rendering/RenderStyle.cpp:
1340         (WebCore::RenderStyle::applyTransform):
1341         * rendering/RenderStyle.h:
1342         (WebCore::TransformOperation::isScaleOperation):
1343         (WebCore::TransformOperation::isRotateOperation):
1344         (WebCore::TransformOperation::isSkewOperation):
1345         (WebCore::TransformOperation::isTranslateOperation):
1346         (WebCore::TransformOperation::isMatrixOperation):
1347         (WebCore::ScaleTransformOperation::isScaleOperation):
1348         (WebCore::RotateTransformOperation::isRotateOperation):
1349         (WebCore::SkewTransformOperation::isSkewOperation):
1350         (WebCore::TranslateTransformOperation::isTranslateOperation):
1351         (WebCore::MatrixTransformOperation::isMatrixOperation):
1352         * rendering/RenderTableRow.h:
1353         (WebCore::RenderTableRow::requiresLayer):
1354         * rendering/RenderTreeAsText.cpp:
1355         (WebCore::writeLayers):
1356
1357 2007-10-20  Timothy Hatcher  <timothy@apple.com>
1358
1359         Reviewed by Adam.
1360
1361         Add basic @font-face to the Web Inspector.
1362
1363         * page/InspectorController.cpp:
1364         (WebCore::InspectorResource::type): Check for CachedResource::FontResource.
1365         * page/inspector/Resource.js: Add support for Font types and font preview in the icon.
1366         * page/inspector/ResourcePanel.js: Show a font preview for font resources.
1367         * page/inspector/inspector.css: Style for the font preview and font icon.
1368         * page/inspector/inspector.js: Add font mime types.
1369
1370 2007-10-20  Sam Weinig  <sam@webkit.org>
1371
1372         Reviewed by Mark Rowe.
1373
1374         Fixes:
1375             - http://bugs.webkit.org/show_bug.cgi?id=14393
1376               Column on the left side of the Web Inspector should have a smaller minimum width for resizing
1377             - http://bugs.webkit.org/show_bug.cgi?id=14394
1378               Left pane of the Web Inspector "shakes" when resizing it to maximum width
1379
1380         * page/inspector/inspector.js: Change the constraint logic to only enforce a 100px min-width
1381           and window.innerWidth - 100 max-width for the sidebar.  The change also makes the viewbuttons
1382           move with the sidebar.
1383
1384 2007-10-20  Dan Bernstein  <mitz@apple.com>
1385
1386         Reviewed by Dave Hyatt.
1387
1388         - fix http://bugs.webkit.org/show_bug.cgi?id=15208
1389           display:table causes the collapsed text to show at a different position when expanded
1390
1391         Test: fast/table/insert-before-anonymous-ancestors.html
1392
1393         * rendering/RenderTable.cpp:
1394         (WebCore::RenderTable::addChild): Rolled out r11579. I think whatever
1395         that change was supposed to accomplish has since been done in other
1396         places in the code.
1397
1398 2007-10-20  Mark Rowe  <mrowe@apple.com>
1399
1400         Reviewed by Dave Hyatt.
1401
1402         Fix http://bugs.webkit.org/show_bug.cgi?id=15584
1403         Bug 15584: REGRESSION(r26696): GtkLauncher segfaults on WebCore::WidthIterator::advance
1404
1405         * platform/Font.cpp:
1406         (WebCore::Font::glyphDataForCharacter): If the fallback page exists but does not have a
1407         glyph for the character, fall back to the missing glyph data rather than returning an
1408         invalid GlyphData.
1409
1410 2007-10-20  Jasper Bryant-Greene  <m@ni.ac.nz>
1411
1412         Reviewed by Maciej.
1413
1414         Changed the hard-coded scroll delta in WheelEventGtk from 120 to 0.25,
1415         as suggested by George Wright in #15108 (which this patch will
1416         resolve).
1417
1418         This gives a more sane scrolling behaviour, rather than the
1419         jumping to the end or start of the document as occurred previously.
1420
1421         * platform/gtk/WheelEventGtk.cpp:
1422         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1423
1424 2007-10-20  Alp Toker  <alp@atoker.com>
1425
1426         Reviewed by Eric.
1427
1428         Support text boundary detection.
1429         Move TextBoundariesWin.cpp to platform/ since it's portable and useful.
1430         Split out and implement some TemporaryLinkStubs.
1431
1432         * WebCore.pro:
1433         * WebCore.vcproj/WebCore.vcproj:
1434         * platform/TextBoundariesICU.cpp: Copied from WebCore/platform/win/TextBoundariesWin.cpp.
1435         * platform/gtk/Language.cpp: Added.
1436         (WebCore::defaultLanguage):
1437         * platform/gtk/TemporaryLinkStubs.cpp:
1438         * platform/gtk/TextBreakIteratorInternalICUGtk.cpp: Added.
1439         (WebCore::currentTextBreakLocaleID):
1440         * platform/win/TextBoundariesWin.cpp: Removed.
1441
1442 2007-10-20  Mark Rowe  <mrowe@apple.com>
1443
1444         Reviewed by Tim Hatcher.
1445
1446         Workaround for http://bugs.webkit.org/show_bug.cgi?id=15574
1447         Bug 15574: Web Inspector doesn't work with the new Database feature
1448
1449         The executeSql callback is executed in the security domain of the web page that owns the database,
1450         while the inspector's window object is in the callback functions scope chain.  This is leading to a
1451         security violation when the callback attempts to access "document".  We can work around this by
1452         ensuring that "document" can be found in the scope chain before the window object.
1453
1454         * page/inspector/DatabasePanel.js:
1455
1456 2007-10-20  Darin Adler  <darin@apple.com>
1457
1458         Reviewed by Maciej.
1459
1460         - http://bugs.webkit.org/show_bug.cgi?id=15567
1461           speed up hashing const char* by removing call to strlen
1462
1463         This includes one other fix as well. Both were from a day where I did some
1464         profiling to find hot spots when running the page load test.
1465
1466         * platform/StringImpl.cpp:
1467         (WebCore::StringImpl::computeHash): Compute the hash without calling strlen.
1468         Also change the argument names to not confusingly use m_ prefixes.
1469         (WebCore::StringImpl::createStrippingNull): Added a faster case for strings that
1470         don't have null.
1471
1472 2007-10-20  Mark Rowe  <mrowe@apple.com>
1473
1474         Reviewed by Alp.
1475
1476         Gtk changes needed to enable HTML 5 client-side database storage.
1477
1478         * WebCore.pro: Have Gtk use ThreadingPthreads.cpp.
1479         * platform/pthreads/ThreadingPthreads.cpp: Include errno so that EDEADLK and EBUSY are available.
1480
1481 2007-10-20  Mark Rowe  <mrowe@apple.com>
1482
1483         Reviewed by Alp.
1484
1485         Implement callOnMainThread for Gtk+ via a one-shot zero-delay timer that will be dispatched
1486         from the main event loop.
1487
1488         * WebCore.pro:
1489         * platform/gtk/TemporaryLinkStubs.cpp:
1490         * platform/gtk/ThreadingGtk.cpp: Added.
1491         (WebCore::callFunctionOnMainThread):
1492         (WebCore::callOnMainThread):
1493
1494 2007-10-20  Nikolas Zimmermann  <zimmermann@kde.org>
1495
1496         Reviewed by Eric.
1497
1498         Fix non-functional display="inline" / display="none" for SVG text.
1499
1500         Fixes: svg/W3C-SVG-1.1/animate-elem-39-t.svg (display="inline" support)
1501         Fixes: svg/batik/text/textProperties2.svg (display="inline/none" support)
1502         Fixes: svg/carto.net/tabgroup.svg (display="none" support, stray content before layouting)
1503         
1504         * css/svg.css: Remove "important" flag on text/foreignObject display: block property
1505         * rendering/RenderSVGBlock.cpp:
1506         (WebCore::RenderSVGBlock::setStyle):
1507
1508 2007-10-20  Mark Rowe  <mrowe@apple.com>
1509
1510         Reviewed by Alp.
1511
1512         Replace #ifdef'd code with the appropriate use of a forwarding header.
1513
1514         * ForwardingHeaders/kjs/array_instance.h: Added.
1515         * bindings/js/JSDatabaseCustom.cpp:
1516
1517 2007-10-20  Nikolas Zimmermann  <zimmermann@kde.org>
1518
1519         Reviewed by Oliver.
1520
1521         Add support for 'kerning' property in SVG text layout code.
1522         Support all textLength/lengthAdjust modes on normal text & textPaths.
1523
1524         Support letter & word spacing on textPath.
1525         Fix text selection when any spacing (letter/word/kerning) is involved.
1526
1527         Fixes: http://bugs.webkit.org/show_bug.cgi?id=15571
1528         Fixes: svg/batik/text/textOnPathSpaces.svg (spacing)
1529                svg/batik/text/textLayout.svg (kerning support)
1530                svg/text/text-spacing-01-b.svg (text selection)
1531
1532         * platform/Font.cpp:
1533         (WebCore::WidthIterator::advance):
1534         * platform/TextStyle.h:
1535         (WebCore::TextStyle::TextStyle):
1536         (WebCore::TextStyle::spacingDisabled):
1537         (WebCore::TextStyle::disableSpacing):
1538         * rendering/SVGCharacterLayoutInfo.cpp:
1539         (WebCore::SVGCharacterLayoutInfo::SVGCharacterLayoutInfo):
1540         (WebCore::SVGCharacterLayoutInfo::nextPathLayoutPointAndAngle):
1541         (WebCore::SVGCharacterLayoutInfo::setInPathLayout):
1542         (WebCore::SVGCharacterLayoutInfo::addLayoutInformation):
1543         (WebCore::SVGChar::characterTransform):
1544         * rendering/SVGCharacterLayoutInfo.h:
1545         (WebCore::SVGTextChunkLayoutInfo::SVGTextChunkLayoutInfo):
1546         * rendering/SVGRootInlineBox.cpp:
1547         (WebCore::closeTextChunk):
1548         (WebCore::calculateKerning):
1549         (WebCore::SVGRootInlineBox::placeBoxesHorizontally):
1550         (WebCore::svgTextStyleForInlineTextBox):
1551         (WebCore::calculateTextAnchorShiftForTextChunk):
1552         (WebCore::applyTextAnchorToTextChunk):
1553         (WebCore::calculateTextLengthCorrectionForTextChunk):
1554         (WebCore::applyTextLengthCorrectionToTextChunk):
1555         (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
1556         (WebCore::SVGRootInlineBox::buildLayoutInformation):
1557         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
1558         (WebCore::SVGRootInlineBox::buildTextChunks):
1559         (WebCore::SVGRootInlineBox::layoutTextChunks):
1560         * rendering/SVGRootInlineBox.h:
1561
1562 2007-10-20  Rodney Dawes  <dobey@wayofthemonkey.com>
1563
1564         Reviewd by Darin.
1565
1566         http://bugs.webkit.org/show_bug.cgi?id=15563
1567         Fix conflict with X11 Window type in WebCore
1568
1569         * WebCore/bindings/js/JSDocumentCustom.cpp:
1570         * WebCore/bindings/js/JSHTMLDocumentCustom.cpp:
1571         * WebCore/bindings/js/JSHTMLFrameSetElementCustom.cpp:
1572         * WebCore/bindings/js/kjs_dom.cpp:
1573         * WebCore/bindings/js/kjs_events.cpp:
1574         * WebCore/bindings/js/kjs_proxy.cpp:
1575         * WebCore/history/CachedPage.cpp:
1576         * WebCore/page/Chrome.cpp:
1577         * WebCore/page/Frame.cpp:
1578
1579 2007-10-20  Simon Hausmann  <hausmann@kde.org>
1580
1581         Build fix, not reviewed.
1582
1583         Fix the Qt build by adding the two missing FileSystem functions.
1584
1585         * platform/qt/FileSystemQt.cpp:
1586         (WebCore::makeAllDirectories):
1587         (WebCore::pathByAppendingComponent):
1588
1589 2007-10-19  Alp Toker  <alp@atoker.com>
1590
1591         Reviewed by Oliver.
1592
1593         GTK+ build fix enabling the new local database storage feature.
1594         There is also a prospective Qt build fix.
1595
1596         * WebCore.pro:
1597         * bindings/js/JSDatabaseCustom.cpp:
1598         * platform/gtk/FileSystemGtk.cpp:
1599         (WebCore::pathByAppendingComponent):
1600         (WebCore::makeAllDirectories):
1601
1602 2007-10-19  Andrew Wellington  <proton@wiretapped.net>
1603
1604         Reviewed by Brady Eidson.
1605
1606         Mac build fix.
1607
1608         * WebCore.xcodeproj/project.pbxproj:
1609
1610 2007-10-19  Alp Toker  <alp@atoker.com>
1611
1612         Reviewed by Oliver.
1613
1614         Use platform colors for text selection.
1615         Update the cache when the GTK style is changed.
1616
1617         * platform/gtk/RenderThemeGtk.cpp:
1618         (WebCore::RenderThemeGtk::platformActiveSelectionBackgroundColor):
1619         (WebCore::RenderThemeGtk::platformInactiveSelectionBackgroundColor):
1620         (WebCore::RenderThemeGtk::platformActiveSelectionForegroundColor):
1621         (WebCore::RenderThemeGtk::platformInactiveSelectionForegroundColor):
1622         (WebCore::RenderThemeGtk::gtkStyleSet):
1623         (WebCore::RenderThemeGtk::gtkEntry):
1624         * platform/gtk/RenderThemeGtk.h:
1625
1626 2007-10-19  Adele Peterson  <adele@apple.com>
1627
1628         Reviewed by Beth.
1629
1630         Fix for: <rdar://problem/5518461> REGRESSION (2.0.4-3): Popup arrows are missing in small popups at homedepot.com
1631
1632         Test: fast/forms/menulist-no-overflow.html
1633
1634         * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::setStyle): Don't allow overflow on menu lists.
1635
1636 2007-10-19  Anders Carlsson  <andersca@apple.com>
1637
1638         Reviewed by Brady.
1639
1640         Move some SQL-related classes to platform/sql.
1641         
1642         * WebCore.vcproj/WebCore.vcproj:
1643         * WebCore.xcodeproj/project.pbxproj:
1644         * loader/icon/SQLDatabase.cpp: Removed.
1645         * loader/icon/SQLDatabase.h: Removed.
1646         * loader/icon/SQLStatement.cpp: Removed.
1647         * loader/icon/SQLStatement.h: Removed.
1648         * loader/icon/SQLTransaction.cpp: Removed.
1649         * loader/icon/SQLTransaction.h: Removed.
1650         * platform/sql/SQLDatabase.cpp: Copied from loader/icon/SQLDatabase.cpp.
1651         * platform/sql/SQLDatabase.h: Copied from loader/icon/SQLDatabase.h.
1652         * platform/sql/SQLStatement.cpp: Copied from loader/icon/SQLStatement.cpp.
1653         * platform/sql/SQLStatement.h: Copied from loader/icon/SQLStatement.h.
1654         * platform/sql/SQLTransaction.cpp: Copied from loader/icon/SQLTransaction.cpp.
1655         * platform/sql/SQLTransaction.h: Copied from loader/icon/SQLTransaction.h.
1656
1657 2007-10-19  Anders Carlsson  <andersca@apple.com>
1658
1659         Reviewed by Adam.
1660
1661         Update to match the latest version of the spec. Now, executeSQL takes an array
1662         of SQL parameters instead of them being passed as arguments.
1663         
1664         * bindings/js/JSDatabaseCustom.cpp:
1665         (WebCore::JSDatabase::executeSql):
1666         * page/inspector/DatabasePanel.js:
1667         * storage/Database.idl:
1668
1669 2007-10-19  Brady Eidson  <beidson@apple.com>
1670
1671         Reviewed by Tim
1672
1673         Tiger's SQLite doesn't support CREATE TABLE IF NOT EXISTS :(
1674
1675         * storage/Database.cpp:
1676         (WebCore::Database::performOpenAndVerify):
1677         * storage/DatabaseTracker.cpp:
1678         (WebCore::DatabaseTracker::DatabaseTracker):
1679
1680 2007-10-19  Anders Carlsson  <andersca@apple.com>
1681
1682         Release build fix.
1683         
1684         * WebCore.vcproj/WebCore.vcproj:
1685
1686 2007-10-19  Brady Eidson  <beidson@apple.com>
1687
1688         Remove stray printfs
1689
1690         * dom/Document.cpp:
1691         (WebCore::Document::Document):
1692         (WebCore::Document::~Document):
1693
1694 2007-10-19  Anders Carlsson  <andersca@apple.com>
1695
1696         Reviewed by Brady.
1697
1698         Apparently the Win32 pthreads impl we use does not allow unlocking a mutex that has not
1699         already been locked, so lock the mutex first.
1700         
1701         * storage/DatabaseThread.cpp:
1702         (WebCore::DatabaseThread::databaseThread):
1703
1704 2007-10-19  Brady Eidson  <beidson@apple.com>
1705
1706         Better build fix
1707
1708         * loader/icon/SQLDatabase.cpp:
1709         (WebCore::SQLDatabase::authorizerFunction):  Definite works by 3.3.13
1710
1711 2007-10-19  Brady Eidson  <beidson@apple.com>
1712
1713         Build fix
1714
1715         * loader/icon/SQLDatabase.cpp:
1716         (WebCore::SQLDatabase::authorizerFunction): I don't know *when* these constants were
1717           added to SQLite, but I know they were by 3.4.0
1718
1719 2007-10-19  Brady Eidson  <beidson@apple.com>
1720         Reviewed by Anders
1721
1722         Windows specific changes, as well as renaming Queue -> Deque
1723
1724         * ForwardingHeaders/wtf/Deque.h: Added.
1725         * ForwardingHeaders/wtf/Queue.h: Removed.
1726         * platform/win/FileSystemWin.cpp:
1727         (WebCore::fileSize):
1728         (WebCore::fileExists):
1729         (WebCore::deleteFile):
1730         (WebCore::pathByAppendingComponent):
1731         (WebCore::fileSystemRepresentation):
1732         (WebCore::makeAllDirectories):
1733         (WebCore::homeDirectoryPath):
1734         * storage/Database.h:
1735         * storage/DatabaseThread.cpp:
1736         (WebCore::DatabaseThread::documentGoingAway):
1737         (WebCore::DatabaseThread::databaseGoingAway):
1738         (WebCore::DatabaseThread::dispatchNextTaskIdentifier):
1739         (WebCore::DatabaseThread::scheduleTask):
1740         (WebCore::DatabaseThread::scheduleImmediateTask):
1741         * storage/DatabaseThread.h:
1742
1743 2007-10-19  Brady Eidson <beidson@apple.com>
1744
1745         Reviewed by Tim and Anders
1746
1747         Preliminary support for HTML5 local database storage (http://www.whatwg.org/specs/web-apps/current-work/)
1748
1749         The specification is still in flux but the fundamentals are pretty solid and we can start using and testing 
1750         this implementation even while filing bugs to track changes in the spec as it becomes more final
1751
1752         There are some implementation details in this patch that seem unused or useless, but they remain in place 
1753         while the spec is in flux and might go one way or another.
1754
1755         * platform/Logging.cpp: Add StorageAPI logging channel
1756         * platform/Logging.h:
1757
1758         * storage/Database.cpp: Added.
1759         (WebCore::Database::databaseInfoTableName):
1760         (WebCore::databaseVersionKey):
1761         (WebCore::Database::openDatabase): C++ version of the window.openDatabase() javascript API
1762         (WebCore::Database::Database):
1763         (WebCore::Database::~Database):
1764         (WebCore::Database::openAndVerifyVersion):
1765         (WebCore::retrieveTextResultFromDatabase):
1766         (WebCore::Database::getVersionFromDatabase):
1767         (WebCore::setTextValueInDatabase):
1768         (WebCore::Database::setVersionInDatabase):
1769         (WebCore::Database::databaseThreadGoingAway): May be removed in the future
1770         (WebCore::Database::disableAuthorizer): For internal (WebInspector) use to get around the authorizer's restrictions
1771         (WebCore::Database::enableAuthorizer):
1772         (WebCore::Database::guidForOriginAndName): Candidate for refactoring and/or moving to the database tracker.  
1773           The GUID for each database identifier is currently for tracking the database version, but might be rescoped in the future
1774         (WebCore::Database::resetAuthorizer):
1775         (WebCore::Database::performPolicyChecks): Currently, the only post-executeSql policy check planned is the origin size usage 
1776         (WebCore::Database::scheduleDatabaseCallback):
1777         (WebCore::Database::performOpenAndVerify): 
1778         (WebCore::Database::performChangeVersion):
1779         (WebCore::Database::performExecuteSql):
1780         (WebCore::Database::performCloseTransaction):
1781         (WebCore::Database::performGetTableNames):
1782         (WebCore::Database::version): C++ version of the javascript API
1783         (WebCore::Database::changeVersion): Ditto
1784         (WebCore::Database::executeSql): Ditto
1785         (WebCore::Database::closeTransaction): Ditto
1786         (WebCore::Database::tableNames): For internal (WebInspector) use
1787         (WebCore::Database::deliverAllPendingCallbacks):
1788         (WebCore::Database::deliverPendingCallbacks):
1789         * storage/Database.h: Added.
1790         (WebCore::Database::databaseDebugName): For debug logging purposes
1791         * storage/Database.idl: Added.
1792
1793         * storage/DatabaseAuthorizer.cpp: Added.
1794           The DatabaseAuthorizer is used to both prevent the script from doing "illegal" things in sql as well as
1795           tracking when effects certain sql statements might have (such as increasing the size of the database)
1796         (WebCore::DatabaseAuthorizer::DatabaseAuthorizer):
1797         (WebCore::DatabaseAuthorizer::reset):
1798         (WebCore::DatabaseAuthorizer::createTable):
1799         (WebCore::DatabaseAuthorizer::createTempTable):
1800         (WebCore::DatabaseAuthorizer::dropTable):
1801         (WebCore::DatabaseAuthorizer::dropTempTable):
1802         (WebCore::DatabaseAuthorizer::allowAlterTable):
1803         (WebCore::DatabaseAuthorizer::createIndex):
1804         (WebCore::DatabaseAuthorizer::createTempIndex):
1805         (WebCore::DatabaseAuthorizer::dropIndex):
1806         (WebCore::DatabaseAuthorizer::dropTempIndex):
1807         (WebCore::DatabaseAuthorizer::createTrigger):
1808         (WebCore::DatabaseAuthorizer::createTempTrigger):
1809         (WebCore::DatabaseAuthorizer::dropTrigger):
1810         (WebCore::DatabaseAuthorizer::dropTempTrigger):
1811         (WebCore::DatabaseAuthorizer::createVTable):
1812         (WebCore::DatabaseAuthorizer::dropVTable):
1813         (WebCore::DatabaseAuthorizer::allowDelete):
1814         (WebCore::DatabaseAuthorizer::allowInsert):
1815         (WebCore::DatabaseAuthorizer::allowUpdate):
1816         (WebCore::DatabaseAuthorizer::allowRead):
1817         (WebCore::DatabaseAuthorizer::allowAnalyze):
1818         (WebCore::DatabaseAuthorizer::allowPragma):
1819         (WebCore::DatabaseAuthorizer::allowAttach):
1820         (WebCore::DatabaseAuthorizer::allowDetach):
1821         (WebCore::DatabaseAuthorizer::allowFunction):
1822         (WebCore::DatabaseAuthorizer::disable):
1823         (WebCore::DatabaseAuthorizer::enable):
1824         (WebCore::DatabaseAuthorizer::denyBasedOnTableName): Don't allow access to the __WebKit meta info table as
1825           it should be invisible to scripts
1826         * storage/DatabaseAuthorizer.h: Added.
1827         (WebCore::DatabaseAuthorizer::lastActionWasInsert):
1828         (WebCore::DatabaseAuthorizer::lastActionIncreasedSize):
1829
1830         * storage/DatabaseCallback.cpp: Added.
1831           Generic item to queue up for callbacks on the main thread for database activities that take place on 
1832           a secondary thread
1833         (WebCore::DatabaseChangeVersionCallback::DatabaseChangeVersionCallback):
1834         (WebCore::DatabaseChangeVersionCallback::performCallback):
1835         (WebCore::DatabaseExecuteSqlCallback::DatabaseExecuteSqlCallback):
1836         (WebCore::DatabaseExecuteSqlCallback::performCallback):
1837         * storage/DatabaseCallback.h: Added.
1838         (WebCore::DatabaseCallback::~DatabaseCallback):
1839         (WebCore::DatabaseChangeVersionCallback::~DatabaseChangeVersionCallback):
1840         (WebCore::DatabaseExecuteSqlCallback::~DatabaseExecuteSqlCallback):
1841
1842         * storage/DatabaseTask.h: Added.
1843           Generic work-item to be queued up on the background database thread
1844         (WebCore::DatabaseTask::isComplete):
1845         (WebCore::DatabaseOpenTask::exceptionCode):
1846         (WebCore::DatabaseOpenTask::openSuccessful):
1847         (WebCore::DatabaseTableNamesTask::tableNames):
1848         * storage/DatabaseTask.cpp: Added.
1849         (WebCore::DatabaseTask::DatabaseTask):
1850         (WebCore::DatabaseTask::~DatabaseTask):
1851         (WebCore::DatabaseTask::performTask):
1852         (WebCore::DatabaseTask::lockForSynchronousScheduling): Used when the main thread needs this task accomplished 
1853           synchronously
1854         (WebCore::DatabaseTask::waitForSynchronousCompletion):
1855
1856         (WebCore::DatabaseOpenTask::DatabaseOpenTask):
1857         (WebCore::DatabaseOpenTask::doPerformTask):
1858
1859         (WebCore::DatabaseExecuteSqlTask::DatabaseExecuteSqlTask):
1860         (WebCore::DatabaseExecuteSqlTask::doPerformTask):
1861
1862         (WebCore::DatabaseChangeVersionTask::DatabaseChangeVersionTask):
1863         (WebCore::DatabaseChangeVersionTask::doPerformTask):
1864
1865         (WebCore::DatabaseTableNamesTask::DatabaseTableNamesTask):
1866         (WebCore::DatabaseTableNamesTask::doPerformTask):
1867
1868         * storage/DatabaseThread.cpp: Added.
1869           The current design is that each Document will have its own DatabaseThread.  This makes scripts on each
1870           individual document more response at the cost of adding more threads and potentially creating concurrency
1871           issues when the same database is open twice from two different documents
1872         (WebCore::DatabaseThread::DatabaseThread):
1873         (WebCore::DatabaseThread::~DatabaseThread):
1874         (WebCore::DatabaseThread::start):
1875         (WebCore::DatabaseThread::documentGoingAway): Called to shut the thread down when the document is destroyed
1876         (WebCore::DatabaseThread::databaseGoingAway): Remove all pending tasks for this database
1877         (WebCore::DatabaseThread::databaseThreadStart):
1878         (WebCore::DatabaseThread::databaseThread):
1879         (WebCore::DatabaseThread::dispatchNextTaskIdentifier):
1880         (WebCore::DatabaseThread::scheduleTask):
1881         (WebCore::DatabaseThread::scheduleImmediateTask): Schedule a task that gets to "cut to the front of the line" when
1882           the main thread requires a task be performed synchronously
1883         (WebCore::DatabaseThread::wakeWorkThread):
1884         * storage/DatabaseThread.h: Added.
1885
1886         * storage/DatabaseTracker.cpp: Added.
1887           The DatabaseTracker is the master management of all databases.  It will keep track of the filename for a given
1888           unique database, keep track of the total disk usage per-origin, and policys per database/origin
1889         (WebCore::DatabaseTracker::setDatabasePath):
1890         (WebCore::DatabaseTracker::databasePath):
1891         (WebCore::DatabaseTracker::tracker):
1892         (WebCore::DatabaseTracker::DatabaseTracker):
1893         (WebCore::DatabaseTracker::fullPathForDatabase):
1894         (WebCore::DatabaseTracker::populateOrigins):
1895         (WebCore::DatabaseTracker::origins):
1896         (WebCore::DatabaseTracker::databaseNamesForOrigin):
1897         (WebCore::DatabaseTracker::addDatabase):
1898         (WebCore::DatabaseTracker::deleteAllDatabases):
1899         (WebCore::DatabaseTracker::deleteAllDatabasesForOrigin):
1900         * storage/DatabaseTracker.h: Added.
1901
1902         * storage/SQLCallback.h: Added. C++ version of the javascript executeSql() callback
1903         (WebCore::SQLCallback::~SQLCallback):
1904         * storage/SQLCallback.idl: Added.
1905
1906         * storage/SQLResultSet.cpp: Added. C++ version of the javascript SQLResultSet object
1907         (WebCore::SQLResultSet::SQLResultSet):
1908         (WebCore::SQLResultSet::insertId):
1909         (WebCore::SQLResultSet::rowsAffected):
1910         (WebCore::SQLResultSet::errorCode):
1911         (WebCore::SQLResultSet::error):
1912         (WebCore::SQLResultSet::rows):
1913         (WebCore::SQLResultSet::setInsertId):
1914         (WebCore::SQLResultSet::setRowsAffected):
1915         (WebCore::SQLResultSet::setErrorCode):
1916         (WebCore::SQLResultSet::setErrorMessage):
1917         * storage/SQLResultSet.h: Added.
1918         * storage/SQLResultSet.idl: Added.
1919
1920         * storage/SQLResultSetRowList.cpp: Added. C++ version of the javascript SQLResultSetRowList object
1921         (WebCore::SQLResultSetRowList::length):
1922         * storage/SQLResultSetRowList.h: Added.
1923         (WebCore::SQLResultSetRowList::columnNames):
1924         (WebCore::SQLResultSetRowList::values):
1925         (WebCore::SQLResultSetRowList::addColumn):
1926         (WebCore::SQLResultSetRowList::addResult):
1927         * storage/SQLResultSetRowList.idl: Added.
1928
1929         * storage/VersionChangeCallback.h: Added. C++ version of the javascript changeVersion() callback
1930         (WebCore::VersionChangeCallback::~VersionChangeCallback):
1931         * storage/VersionChangeCallback.idl: Added.
1932
1933 2007-10-19  Brady Eidson <beidson@apple.com>
1934
1935         Reviewed by Oliver + Same
1936
1937         Forwarding header for the new wtf/Queue.h
1938
1939         * ForwardingHeaders/wtf/Queue.h: Added.
1940
1941 2007-10-19  Anders Carlsson <beidson@apple.com>
1942
1943         Reviewed by Sam Weinig
1944
1945         Most of the Javascript binding support for the Storage API
1946
1947         * bindings/js/JSCustomSQLCallback.cpp: Added.
1948         (WebCore::JSCustomSQLCallback::JSCustomSQLCallback):
1949         (WebCore::JSCustomSQLCallback::handleEvent):
1950         * bindings/js/JSCustomSQLCallback.h: Added.
1951                 Add JSCustomSQLCallback which is an SQLCallback implementation that dispatches
1952                 handleEvent to a JS function or a JS object with a handleEvent function.
1953
1954         * bindings/js/JSCustomVersionChangeCallback.cpp: Added.
1955         (WebCore::JSCustomVersionChangeCallback::JSCustomVersionChangeCallback):
1956         (WebCore::JSCustomVersionChangeCallback::handleEvent):
1957         * bindings/js/JSCustomVersionChangeCallback.h: Added.
1958                 Add JSCustomSQLCallback which is an SQLCallback implementation that dispatches
1959                 handleEvent to a JS function or a JS object with a handleEvent function.
1960
1961         * bindings/js/JSDatabaseCustom.cpp: Added.
1962         (WebCore::JSDatabase::executeSql):
1963                 Custom implementation of executeSql that takes an array of parameters.
1964                 
1965         (WebCore::JSDatabase::changeVersion):
1966                 Custom implementation of changeVersion.
1967                 
1968         * bindings/js/JSSQLResultSetRowListCustom.cpp: Added.
1969         (WebCore::JSSQLResultSetRowList::item):
1970                 Custom method that returns a JS object that corresponds to a given row in the database.
1971
1972         * bindings/scripts/CodeGeneratorJS.pm:
1973
1974         * page/DOMWindow.cpp:
1975         (WebCore::DOMWindow::openDatabase):
1976         * page/DOMWindow.h:
1977         * page/DOMWindow.idl:
1978                 Add openDatabase implementation.
1979
1980 2007-10-19  Brady Eidson <beidson@apple.com>
1981
1982         Reviewed by Oliver
1983
1984         Added tons of utility to the FileSystem abstractions, including moving
1985         some stuff over from IconDatabase
1986
1987         * platform/FileSystem.h:
1988
1989         * platform/cf/FileSystemCF.cpp: Added.
1990         (WebCore::fileSystemRepresentation):
1991
1992         * platform/mac/FileSystemMac.mm:
1993
1994         * platform/posix/FileSystemPOSIX.cpp: Added.
1995         (WebCore::fileExists):
1996         (WebCore::deleteFile):
1997         (WebCore::fileSize):
1998         (WebCore::pathByAppendingComponent):
1999         (WebCore::makeAllDirectories):
2000
2001 2007-10-19  Timothy Hatcher  <timothy@apple.com>
2002
2003         Reviewed by Adam Roben
2004
2005         Preliminary Web Inspector support for the Storage API
2006         (This patch does not include the support artwork)
2007
2008         * page/InspectorController.cpp:
2009         (WebCore::InspectorDatabaseResource::InspectorDatabaseResource):
2010         (WebCore::InspectorDatabaseResource::setScriptObject):
2011         (WebCore::databaseTableNames): Return the table names for a Database object.
2012         (WebCore::InspectorController::setWindowVisible):
2013         (WebCore::InspectorController::windowScriptObjectAvailable):
2014         (WebCore::InspectorController::populateScriptResources):
2015         (WebCore::InspectorController::addDatabaseScriptResource): Add the script object for the database.
2016         (WebCore::InspectorController::removeDatabaseScriptResource): Remove the script object for the database.
2017         (WebCore::InspectorController::clearDatabaseScriptResources): Remove all the database resources.
2018         (WebCore::InspectorController::didCommitLoad): Call clearDatabaseScriptResources().
2019         (WebCore::InspectorController::didOpenDatabase): Make a new InspectorDatabaseResource and add it to m_databaseResources.
2020         * page/InspectorController.h:
2021         * page/inspector/Database.js: Added.
2022         * page/inspector/DatabasePanel.js: Added.
2023         * page/inspector/ResourceCategory.js: Make resource categories assume less about the resource.
2024         * page/inspector/inspector.css: Add styles for the database panel.
2025         * page/inspector/inspector.html: Include DatabasePanel.js
2026         * page/inspector/inspector.js: Support for adding and removing Database resources.
2027
2028 2007-10-19  Brady Eidson <beidson@apple.com>
2029
2030         Reviewed by Tim Hatcher
2031
2032         Added support for Chrome prompts required by the Storage API
2033
2034         * page/Chrome.cpp:
2035         (WebCore::Chrome::runDatabaseSizeLimitPrompt):
2036         * page/Chrome.h:
2037         * page/ChromeClient.h:
2038         * platform/graphics/svg/SVGImageEmptyClients.h:
2039
2040 2007-10-19  Brady Eidson <beidson@apple.com>
2041
2042         Contributions and Review by Anders
2043
2044         Various SQLite tweaks in preparation for the storage API
2045
2046         * loader/icon/SQLDatabase.cpp:
2047         (WebCore::SQLDatabase::~SQLDatabase):
2048         (WebCore::SQLDatabase::authorizerFunction): Static callback from sqlite for authorizer functions
2049         (WebCore::SQLDatabase::setAuthorizer):
2050         (WebCore::SQLDatabase::lock):
2051         (WebCore::SQLDatabase::unlock):
2052         * loader/icon/SQLDatabase.h:
2053
2054         * loader/icon/SQLStatement.cpp:
2055         (WebCore::SQLStatement::prepare): Switch to prepare16_v2
2056         (WebCore::SQLStatement::bindDouble): Added
2057         (WebCore::SQLStatement::bindValue): Bind a wrapped SQLValue object (described later)
2058         (WebCore::SQLStatement::bindParameterCount): Accessor to the sqlite3 API for validating statements
2059         * loader/icon/SQLStatement.h:
2060         (WebCore::SQLStatement::isPrepared):
2061
2062         * platform/sql/SQLAuthorizer.cpp: Added.  Fully virtual interface to implement your own SQLite authorizer
2063         * platform/sql/SQLAuthorizer.h: Added.
2064         (WebCore::SQLAuthorizer::~SQLAuthorizer):
2065         (WebCore::SQLAuthorizer::createTable):
2066         (WebCore::SQLAuthorizer::createTempTable):
2067         (WebCore::SQLAuthorizer::dropTable):
2068         (WebCore::SQLAuthorizer::dropTempTable):
2069         (WebCore::SQLAuthorizer::allowAlterTable):
2070         (WebCore::SQLAuthorizer::createIndex):
2071         (WebCore::SQLAuthorizer::createTempIndex):
2072         (WebCore::SQLAuthorizer::dropIndex):
2073         (WebCore::SQLAuthorizer::dropTempIndex):
2074         (WebCore::SQLAuthorizer::createTrigger):
2075         (WebCore::SQLAuthorizer::createTempTrigger):
2076         (WebCore::SQLAuthorizer::dropTrigger):
2077         (WebCore::SQLAuthorizer::dropTempTrigger):
2078         (WebCore::SQLAuthorizer::createView):
2079         (WebCore::SQLAuthorizer::createTempView):
2080         (WebCore::SQLAuthorizer::dropView):
2081         (WebCore::SQLAuthorizer::dropTempView):
2082         (WebCore::SQLAuthorizer::createVTable):
2083         (WebCore::SQLAuthorizer::dropVTable):
2084         (WebCore::SQLAuthorizer::allowDelete):
2085         (WebCore::SQLAuthorizer::allowInsert):
2086         (WebCore::SQLAuthorizer::allowUpdate):
2087         (WebCore::SQLAuthorizer::allowTransaction):
2088         (WebCore::SQLAuthorizer::allowSelect):
2089         (WebCore::SQLAuthorizer::allowRead):
2090         (WebCore::SQLAuthorizer::allowAttach):
2091         (WebCore::SQLAuthorizer::allowDetach):
2092         (WebCore::SQLAuthorizer::allowReindex):
2093         (WebCore::SQLAuthorizer::allowAnalyze):
2094         (WebCore::SQLAuthorizer::allowFunction):
2095
2096         * platform/sql/SQLValue.cpp: Added.  Contains a value for a SQLite database that can be one of a few types.  
2097           For now, just a String or a double
2098         (WebCore::SQLValue::SQLValue):
2099         (WebCore::SQLValue::string):
2100         (WebCore::SQLValue::number):
2101         * platform/sql/SQLValue.h: Added.
2102         (WebCore::SQLValue::):
2103         (WebCore::SQLValue::SQLValue):
2104         (WebCore::SQLValue::type):
2105
2106 2007-10-19  Brady Eidson <beidson@apple.com>
2107
2108         Reviewed by Maciej
2109
2110         Changed IconDatabase over to use new FileSystem apis
2111
2112         * loader/icon/IconDatabase.cpp:
2113         (WebCore::IconDatabase::open):
2114
2115 2007-10-19  David Hyatt  <hyatt@apple.com>
2116
2117         Fix for ebay parser crash.
2118
2119         Reviewed by Beth
2120
2121         fast/invalid/table-residual-style-crash.html added as a test
2122
2123         * html/HTMLParser.cpp:
2124         (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks):
2125
2126 2007-10-19  Sam Weinig  <sam@webkit.org>
2127
2128         Fix Windows, Qt and GTK builds.
2129
2130         * WebCore.pro:
2131         * WebCore.vcproj/WebCore.vcproj:
2132
2133 2007-10-19  Sam Weinig  <sam@webkit.org>
2134
2135         Reviewed by Darin.
2136
2137         Encapsulate the same origin check into the new SecurityOrigin class.
2138
2139         * WebCore.xcodeproj/project.pbxproj:
2140         * bindings/js/kjs_window.cpp:
2141         (KJS::Window::isSafeScript):
2142         * dom/Document.cpp:
2143         (WebCore::Document::Document):
2144         (WebCore::Document::defaultEventHandler):
2145         * dom/Document.h:
2146         (WebCore::Document::securityOrigin):
2147         * loader/FrameLoader.cpp:
2148         (WebCore::FrameLoader::begin):
2149         (WebCore::FrameLoader::setOpener):
2150         * loader/FrameLoader.h:
2151         * platform/SecurityOrigin.cpp: Added.
2152         (WebCore::SecurityOrigin::SecurityOrigin):
2153         (WebCore::SecurityOrigin::clear):
2154         (WebCore::SecurityOrigin::isEmpty):
2155         (WebCore::SecurityOrigin::setForFrame):
2156         (WebCore::SecurityOrigin::setDomainFromDOM):
2157         (WebCore::SecurityOrigin::allowsAccessFrom):
2158         (WebCore::SecurityOrigin::isSecureTransitionTo):
2159         * platform/SecurityOrigin.h: Added.
2160
2161 2007-10-19  Simon Hausmann  <hausmann@kde.org>
2162
2163         Fix the Qt/Windows build: Added missing FontSelector.h include.
2164
2165         * platform/qt/FontQt.cpp:
2166
2167 2007-10-19  Simon Hausmann  <hausmann@kde.org>
2168
2169         Reviewed by Lars.
2170
2171         Qt/Windows build fix: Threading.h uses int32_t but doesn't include stdint.h.
2172
2173         * platform/Threading.h:
2174
2175 2007-10-19  Simon Hausmann  <hausmann@kde.org>
2176
2177         Reviewed by Lars.
2178
2179         Fix the Qt/Windows build, don't use cat but use the perl print trick
2180         instead.
2181
2182         * WebCore.pro:
2183
2184 2007-10-18  Justin Garcia  <justin.garcia@apple.com>
2185
2186         Reviewed by Kevin McCullough.
2187
2188         <rdar://problem/5483526> 
2189         GoogleDocs: A hang occurs when applying list styling to a selection containing a table and line breaks
2190
2191         * editing/TextIterator.cpp:
2192         (WebCore::TextIterator::exitNode): For selection preservation, we must emit a character
2193         between every VisiblePosition.  We weren't emitting a space after some tables, because
2194         we won't try to emit a space if shouldEmitNewlineAFterNode is true, even if no newline
2195         was emitted.
2196
2197 2007-10-18  Dan Bernstein  <dan.bernstein@apple.com>
2198
2199         Reviewed by Adam Roben.
2200
2201         - fix <rdar://problem/5313523>
2202         REGRESSION(Leopard): http/tests/incremental/slow-utf8-text.pl fails on Leopard
2203
2204         * platform/network/mac/ResourceResponseMac.mm:
2205         (WebCore::ResourceResponse::doUpdateResourceResponse): Work around
2206         <rdar://problem/5321972> by testing for the case of a response
2207         with a MIME type of application/octet-stream and a Content-Type header
2208         starting with text/plain and setting the MIME type to text/plain in
2209         that case.
2210
2211 2007-10-18  Mark Rowe  <mrowe@apple.com>
2212
2213         Fix the no-SVG build.
2214
2215         * css/CSSPrimitiveValueMappings.h: Move the CSSPrimitiveValue implementations for
2216         LineCap, LineJoin and WindRule inside #if ENABLE(SVG).
2217
2218 2007-10-18  Darin Adler  <darin@apple.com>
2219
2220         Reviewed by Anders.
2221
2222         - some small tweaks to the threading implementation
2223
2224         I had trouble building on Windows. Either the problem went away by itself
2225         or one of these changes fixed it.
2226
2227         * platform/Threading.h: Eliminated the use of friend, and shared a single
2228         declaration for the initializeThreading function.
2229
2230         * platform/pthreads/ThreadingPthreads.cpp: (WebCore::ThreadCondition::wait):
2231         Call impl() here.
2232
2233         * platform/win/ThreadingWin.cpp: Got rid of two globals here with static
2234         constructors. Also added a typedef for the type of the function queue.
2235         (WebCore::functionQueueMutex): Added function.
2236         (WebCore::functionQueue): Ditto.
2237         (WebCore::callFunctionsOnMainThread): Use functions instead of using the
2238         globals directly.
2239         (WebCore::callOnMainThread): Ditto.
2240
2241         * css/CSSParser.cpp: Had to touch this file to make things build.
2242
2243 2007-10-18  Adam Roben  <aroben@apple.com>
2244
2245         Fix <rdar://5547462> Need to copy Inspector resources in Production builds
2246
2247         I also added an excludes file for the xcopy command to avoid copying
2248         .svn folders.
2249
2250         Reviewed by Geoff.
2251
2252         * WebCore.vcproj/WebCore.make: Make sure we copy the Inspector
2253         resources.
2254         * WebCore.vcproj/WebCore.vcproj: Pass /exclude:xcopy.excludes to
2255         xcopy.
2256         * WebCore.vcproj/xcopy.excludes: Added.
2257
2258 2007-10-18  Darin Adler  <darin@apple.com>
2259
2260         Reviewed by Sam.
2261
2262         - fix http://bugs.webkit.org/show_bug.cgi?id=15541
2263           REGRESSION (r26616): prompt with one argument uses the literal "undefined" as default reply
2264
2265         * page/DOMWindow.idl: Add ConvertUndefinedOrNullToNullString back for defaultValue.
2266
2267 2007-10-18  Nikolas Zimmermann  <zimmermann@kde.org>
2268
2269         Build fix. Not reviewed.
2270
2271         Hopefully fix win build by including wtf/MathExtras.h.
2272
2273         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
2274
2275 2007-10-18  Dan Bernstein  <dan.bernstein@apple.com>
2276
2277         Reviewed by Nikolas Zimmermann.
2278
2279         - fix http://bugs.webkit.org/show_bug.cgi?id=15367
2280           Assertion failure inspecting a document including soft hyphen code (0xad)
2281
2282         Test: fast/text/word-break-soft-hyphen.html
2283
2284         * rendering/RenderText.cpp:
2285         (WebCore::RenderText::calcPrefWidths): Changed to treat soft hyphens as 
2286         word boundaries. This fixes the bug and is consistent with the fact that
2287         run rounding does occur at soft hyphens.
2288
2289 2007-10-18  Nikolas Zimmermann  <zimmermann@kde.org>
2290
2291         Reviewed by Anders.
2292
2293         Fix last layout test failure seen on buildbot "trunk-mac-ppc-release".
2294         Problem: "svg/custom/mask-excessive-malloc.svg -> crashed"
2295
2296         Clamp any ImageBuffer allocation within SVG to the RenderView's visibleSize
2297         to avoid excessive mallocs (in the testcase above 1000000x1000000)
2298
2299         * ksvg2/svg/SVGMaskElement.cpp:
2300         (WebCore::SVGMaskElement::drawMaskerContent):
2301         * ksvg2/svg/SVGPatternElement.cpp:
2302         (WebCore::SVGPatternElement::buildPattern):
2303         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
2304         (WebCore::SVGPaintServerGradient::teardown):
2305         (WebCore::SVGPaintServerGradient::setup):
2306         * platform/graphics/svg/cg/SVGResourceMaskerCg.mm:
2307         (WebCore::SVGResourceMasker::applyMask):
2308         * rendering/SVGRenderSupport.cpp:
2309         (WebCore::clampImageBufferSizeToViewport):
2310         * rendering/SVGRenderSupport.h:
2311
2312 2007-10-18  Alexey Proskuryakov  <ap@webkit.org>
2313
2314         Windows build fix.
2315
2316         * css/CSSStyleSelector.cpp:
2317         (WebCore::CSSStyleSelector::applyProperty): Add braces around cases that have local variables now.
2318
2319 2007-10-18  Alexey Proskuryakov  <ap@webkit.org>
2320
2321         Release build fix.
2322
2323         * css/CSSStyleSelector.cpp:
2324         (WebCore::CSSStyleSelector::applyProperty): 
2325
2326 2007-10-18  Alexey Proskuryakov  <ap@webkit.org>
2327
2328         Reviewed by Darin.
2329
2330         Split most of CSSPrimitiveValue enum mapping out of CSSComputedStyleDeclaration::getPropertyCSSValue()
2331         and CSSStyleSelector::applyProperty() (and their SVG counterparts). This should make the code more readable.
2332
2333         * WebCore.xcodeproj/project.pbxproj:
2334         * css/CSSComputedStyleDeclaration.cpp:
2335         (WebCore::getPositionOffsetValue):
2336         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2337         * css/CSSPrimitiveValue.cpp:
2338         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2339         (WebCore::CSSPrimitiveValue::init):
2340         * css/CSSPrimitiveValue.h:
2341         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2342         * css/CSSPrimitiveValueMappings.h: Added.
2343         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2344         (WebCore::CSSPrimitiveValue::operator EBorderStyle):
2345         (WebCore::CSSPrimitiveValue::operator CompositeOperator):
2346         (WebCore::CSSPrimitiveValue::operator EAppearance):
2347         (WebCore::CSSPrimitiveValue::operator EBackgroundBox):
2348         (WebCore::CSSPrimitiveValue::operator EBackgroundRepeat):
2349         (WebCore::CSSPrimitiveValue::operator EBoxAlignment):
2350         (WebCore::CSSPrimitiveValue::operator EBoxDirection):
2351         (WebCore::CSSPrimitiveValue::operator EBoxLines):
2352         (WebCore::CSSPrimitiveValue::operator EBoxOrient):
2353         (WebCore::CSSPrimitiveValue::operator ECaptionSide):
2354         (WebCore::CSSPrimitiveValue::operator EClear):
2355         (WebCore::CSSPrimitiveValue::operator ECursor):
2356         (WebCore::CSSPrimitiveValue::operator EDisplay):
2357         (WebCore::CSSPrimitiveValue::operator EEmptyCell):
2358         (WebCore::CSSPrimitiveValue::operator EFloat):
2359         (WebCore::CSSPrimitiveValue::operator EKHTMLLineBreak):
2360         (WebCore::CSSPrimitiveValue::operator EListStylePosition):
2361         (WebCore::CSSPrimitiveValue::operator EListStyleType):
2362         (WebCore::CSSPrimitiveValue::operator EMarginCollapse):
2363         (WebCore::CSSPrimitiveValue::operator EMarqueeBehavior):
2364         (WebCore::CSSPrimitiveValue::operator EMarqueeDirection):
2365         (WebCore::CSSPrimitiveValue::operator EMatchNearestMailBlockquoteColor):
2366         (WebCore::CSSPrimitiveValue::operator ENBSPMode):
2367         (WebCore::CSSPrimitiveValue::operator EOverflow):
2368         (WebCore::CSSPrimitiveValue::operator EPageBreak):
2369         (WebCore::CSSPrimitiveValue::operator EPosition):
2370         (WebCore::CSSPrimitiveValue::operator EResize):
2371         (WebCore::CSSPrimitiveValue::operator ETableLayout):
2372         (WebCore::CSSPrimitiveValue::operator ETextAlign):
2373         (WebCore::CSSPrimitiveValue::operator ETextSecurity):
2374         (WebCore::CSSPrimitiveValue::operator ETextTransform):
2375         (WebCore::CSSPrimitiveValue::operator EUnicodeBidi):
2376         (WebCore::CSSPrimitiveValue::operator EUserDrag):
2377         (WebCore::CSSPrimitiveValue::operator EUserModify):
2378         (WebCore::CSSPrimitiveValue::operator EUserSelect):
2379         (WebCore::CSSPrimitiveValue::operator EVisibility):
2380         (WebCore::CSSPrimitiveValue::operator EWhiteSpace):
2381         (WebCore::CSSPrimitiveValue::operator EWordBreak):
2382         (WebCore::CSSPrimitiveValue::operator EWordWrap):
2383         (WebCore::CSSPrimitiveValue::operator LineCap):
2384         (WebCore::CSSPrimitiveValue::operator LineJoin):
2385         (WebCore::CSSPrimitiveValue::operator TextDirection):
2386         (WebCore::CSSPrimitiveValue::operator WindRule):
2387         (WebCore::CSSPrimitiveValue::operator EAlignmentBaseline):
2388         (WebCore::CSSPrimitiveValue::operator EColorInterpolation):
2389         (WebCore::CSSPrimitiveValue::operator EColorRendering):
2390         (WebCore::CSSPrimitiveValue::operator EDominantBaseline):
2391         (WebCore::CSSPrimitiveValue::operator EImageRendering):
2392         (WebCore::CSSPrimitiveValue::operator EPointerEvents):
2393         (WebCore::CSSPrimitiveValue::operator EShapeRendering):
2394         (WebCore::CSSPrimitiveValue::operator ETextAnchor):
2395         (WebCore::CSSPrimitiveValue::operator ETextRendering):
2396         (WebCore::CSSPrimitiveValue::operator EWritingMode):
2397         * css/CSSStyleSelector.cpp:
2398         (WebCore::CSSStyleSelector::checkSelector):
2399         (WebCore::CSSStyleSelector::checkOneSelector):
2400         (WebCore::CSSRuleSet::addRulesFromSheet):
2401         (WebCore::convertToLength):
2402         (WebCore::CSSStyleSelector::applyDeclarations):
2403         (WebCore::CSSStyleSelector::applyProperty):
2404         (WebCore::CSSStyleSelector::mapBackgroundAttachment):
2405         (WebCore::CSSStyleSelector::mapBackgroundClip):
2406         (WebCore::CSSStyleSelector::mapBackgroundComposite):
2407         (WebCore::CSSStyleSelector::mapBackgroundOrigin):
2408         (WebCore::CSSStyleSelector::mapBackgroundRepeat):
2409         (WebCore::CSSStyleSelector::mapBackgroundXPosition):
2410         (WebCore::CSSStyleSelector::mapBackgroundYPosition):
2411         * ksvg2/css/SVGCSSComputedStyleDeclaration.cpp:
2412         (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue):
2413         * ksvg2/css/SVGCSSStyleSelector.cpp:
2414         (WebCore::CSSStyleSelector::applySVGProperty):
2415
2416 2007-10-18  Eric Seidel  <eric@webkit.org>
2417
2418         Reviewed by Maciej.
2419
2420         Fix crashers in SVGViewSpec::parseViewSpec
2421         http://bugs.webkit.org/show_bug.cgi?id=15504
2422
2423         Test is blocked by bug 15503, landed as:
2424         * svg/dom/viewspec-parser.html-disabled
2425
2426         * bindings/scripts/CodeGeneratorObjC.pm: support classes where all parents are interfaces
2427         * ksvg2/svg/SVGViewSpec.cpp:
2428         (WebCore::SVGViewSpec::parseViewSpec):
2429         * ksvg2/svg/SVGViewSpec.idl: Added.
2430
2431 2007-10-17  Rob Buis  <buis@kde.org>
2432
2433         Reviewed by Darin, Adam, and Maciej.
2434
2435         http://bugs.webkit.org/show_bug.cgi?id=12988
2436         First element (in document order) is not returned when other duplicate ID-ed elements were created first
2437
2438         Reset the element id cache when an id is added and there is a duplicate for that id.
2439
2440         * dom/Document.cpp:
2441         (WebCore::Document::addElementById):
2442
2443 2007-10-17  Mark Rowe  <mrowe@apple.com>
2444
2445         Mac build fix.
2446
2447         * Configurations/WebCore.xcconfig:  Make it possible to include CoreGraphics header files.
2448
2449 2007-10-17  Adam Roben  <aroben@apple.com>
2450
2451         Fix an ASSERT on launch on Windows
2452
2453         Fix dictated to me by Brady.
2454
2455         * loader/icon/IconDatabase.cpp:
2456         (WebCore::IconDatabase::syncThreadMainLoop): Make sure we hold
2457         m_syncLock before going into the loop.
2458
2459 2007-10-17  Adam Roben  <aroben@apple.com>
2460
2461         Windows build fix
2462
2463         Reviewed by NOBODY.
2464
2465         * platform/graphics/AffineTransform.h: Don't #include
2466         ApplicationServices.h.
2467         * platform/graphics/cg/GraphicsContextCG.cpp: Add an #include that's
2468         needed now that we're not #including ApplicationServices.h.
2469
2470 2007-10-17  Mark Rowe  <mrowe@apple.com>
2471
2472         Gtk build fix.  Move non-pthread stubs from Threading.h to ThreadingNone.cpp to prevent
2473         multiple-definition link errors.
2474
2475         * WebCore.pro:
2476         * platform/Threading.h:
2477         * platform/ThreadingNone.cpp: Added.
2478         (WebCore::createThread):
2479         (WebCore::waitForThreadCompletion):
2480         (WebCore::detachThread):
2481         (WebCore::Mutex::Mutex):
2482         (WebCore::Mutex::~Mutex):
2483         (WebCore::Mutex::lock):
2484         (WebCore::Mutex::tryLock):
2485         (WebCore::Mutex::unlock):
2486         (WebCore::ThreadCondition::ThreadCondition):
2487
2488 2007-10-17  Anders Carlsson  <andersca@apple.com>
2489
2490         Reviewed by Oliver.
2491
2492         * WebCore.xcodeproj/project.pbxproj:
2493         * WebCore.vcproj/WebCore.vcproj:
2494         
2495         * config.h:
2496         #define USE_PTHREADS on Windows.
2497         
2498         * loader/icon/IconDatabase.cpp:
2499         (WebCore::IconDatabase::getOrCreateIconRecord):
2500         (WebCore::IconDatabase::getOrCreatePageURLRecord):
2501         Update for mutex changes.
2502         
2503         * platform/Threading.h:
2504         (WebCore::):
2505         (WebCore::ThreadSafeShared::ThreadSafeShared):
2506         (WebCore::ThreadSafeShared::ref):
2507         (WebCore::ThreadSafeShared::deref):
2508         (WebCore::ThreadSafeShared::hasOneRef):
2509         (WebCore::ThreadSafeShared::refCount):
2510         (WebCore::ThreadSafeShared::isThreadSafe):
2511         Add a new Shared base class that uses a mutex to manage its refcount.
2512         
2513         (WebCore::createThread):
2514         (WebCore::waitForThreadCompletion):
2515         (WebCore::detachThread):
2516         New functions for thread creation.
2517         
2518         (WebCore::Mutex::Mutex):
2519         (WebCore::Mutex::~Mutex):
2520         (WebCore::Mutex::lock):
2521         (WebCore::Mutex::tryLock):
2522         (WebCore::Mutex::unlock):
2523         Move the definitions to ThreadingPthreads.cpp
2524         
2525         (WebCore::ThreadCondition::ThreadCondition):
2526         (WebCore::ThreadCondition::~ThreadCondition):
2527         (WebCore::ThreadCondition::wait):
2528         (WebCore::ThreadCondition::signal):
2529         (WebCore::ThreadCondition::broadcast):
2530         Move the definitions to ThreadingPthreads.cpp
2531         
2532         * platform/pthreads: Added.
2533         * platform/pthreads/ThreadingPthreads.cpp: Added.
2534         Add pthread specific implementation of the thread creation functions, Mutex and ThreadCondition.
2535
2536 2007-10-17  David Hyatt  <hyatt@apple.com>
2537
2538         Add support for creating a layer when a transform is in effect.  Add support to RenderStyle for
2539         handing back a computed AffineTransform.
2540
2541         Reviewed by Mitz Pettel
2542
2543         * css/CSSStyleSelector.cpp:
2544         (WebCore::CSSStyleSelector::adjustRenderStyle):
2545         * rendering/RenderBox.cpp:
2546         (WebCore::RenderBox::setStyle):
2547         * rendering/RenderObject.cpp:
2548         (WebCore::RenderObject::RenderObject):
2549         (WebCore::RenderObject::requiresLayer):
2550         (WebCore::RenderObject::setStyle):
2551         * rendering/RenderObject.h:
2552         (WebCore::RenderObject::hasTransform):
2553         (WebCore::RenderObject::setHasTransform):
2554         * rendering/RenderStyle.cpp:
2555         (WebCore::RenderStyle::applyTransform):
2556         * rendering/RenderStyle.h:
2557         (WebCore::RenderStyle::hasTransform):
2558         * rendering/RenderTableCell.cpp:
2559         (WebCore::RenderTableCell::requiresLayer):
2560         * rendering/RenderTableRow.h:
2561         (WebCore::RenderTableRow::requiresLayer):
2562
2563 2007-10-17  David Hyatt  <hyatt@apple.com>
2564
2565         Add support for mapping of the transform CSS property into RenderStyles.  Everything is now ready for the front
2566         end to use.
2567
2568         Reviewed by Mitz Pettel
2569
2570         * WebCore.xcodeproj/project.pbxproj:
2571         * css/CSSStyleSelector.cpp:
2572         (WebCore::CSSStyleSelector::applyProperty):
2573         * css/CSSTransformValue.h:
2574         (WebCore::CSSTransformValue::type):
2575         (WebCore::CSSTransformValue::values):
2576         * platform/graphics/AffineTransform.cpp:
2577         (WebCore::AffineTransform::skew):
2578         * platform/graphics/AffineTransform.h:
2579         * rendering/RenderStyle.cpp:
2580         (WebCore::StyleTransformData::StyleTransformData):
2581         (WebCore::StyleTransformData::operator==):
2582         (WebCore::StyleTransformData::transformDataEquivalent):
2583         * rendering/RenderStyle.h:
2584         (WebCore::TransformOperation::~TransformOperation):
2585         (WebCore::TransformOperation::operator!=):
2586         (WebCore::TransformOperation::isScaleOperation):
2587         (WebCore::TransformOperation::isRotateOperation):
2588         (WebCore::TransformOperation::isSkewOperation):
2589         (WebCore::TransformOperation::isTranslateOperation):
2590         (WebCore::TransformOperation::isMatrixOperation):
2591         (WebCore::ScaleTransformOperation::ScaleTransformOperation):
2592         (WebCore::ScaleTransformOperation::isScaleOperation):
2593         (WebCore::ScaleTransformOperation::operator==):
2594         (WebCore::ScaleTransformOperation::apply):
2595         (WebCore::RotateTransformOperation::RotateTransformOperation):
2596         (WebCore::RotateTransformOperation::isRotateOperation):
2597         (WebCore::RotateTransformOperation::operator==):
2598         (WebCore::RotateTransformOperation::apply):
2599         (WebCore::SkewTransformOperation::SkewTransformOperation):
2600         (WebCore::SkewTransformOperation::isSkewOperation):
2601         (WebCore::SkewTransformOperation::operator==):
2602         (WebCore::SkewTransformOperation::apply):
2603         (WebCore::TranslateTransformOperation::TranslateTransformOperation):
2604         (WebCore::TranslateTransformOperation::isTranslateOperation):
2605         (WebCore::TranslateTransformOperation::operator==):
2606         (WebCore::TranslateTransformOperation::apply):
2607         (WebCore::MatrixTransformOperation::MatrixTransformOperation):
2608         (WebCore::MatrixTransformOperation::isMatrixOperation):
2609         (WebCore::MatrixTransformOperation::operator==):
2610         (WebCore::MatrixTransformOperation::apply):
2611         (WebCore::StyleTransformData::operator!=):
2612         (WebCore::RenderStyle::transform):
2613         (WebCore::RenderStyle::setTransform):
2614         (WebCore::RenderStyle::initialTransform):
2615
2616 2007-10-17  Adam Roben  <aroben@apple.com>
2617
2618         * page/Frame.cpp: I had to touch this file when fixing the Windows
2619         build. Checking it in in case it helps others, too.
2620
2621 2007-10-17  Eric Seidel  <eric@webkit.org>
2622
2623         Reviewed by Mark Rowe.
2624         
2625         Remove a couple more uses of svg_dynamic_cast.
2626
2627         No functional changes, no tests.
2628
2629         * ksvg2/svg/SVGPatternElement.cpp:
2630         (WebCore::SVGPatternElement::buildPattern):
2631
2632 2007-10-17  Mark Rowe  <mrowe@apple.com>
2633
2634         Reviewed by Eric and Geoff.
2635
2636         <rdar://problem/5453743> Repro ASSERT in CachedResource::setEncodedSize() loading image in background tab
2637         http://bugs.webkit.org/show_bug.cgi?id=15191
2638
2639         * loader/DocLoader.cpp:
2640         (WebCore::DocLoader::setAutoLoadImages): Don't start a load if the CachedImage is already loading.
2641
2642 2007-10-17  Justin Garcia  <justin.garcia@apple.com>
2643
2644         Reviewed by Harrison.
2645         
2646         <rdar://problem/5481523> 
2647         GoogleDocs: Safari hangs when indenting a particular table twice
2648         
2649         Fixed by fixing problems with the selection preservation done by IndentOutdentCommand.
2650         It is now more difficult to create selections that cause hangs.  Those are covered by:
2651         <rdar://problem/5543472>
2652
2653         * editing/IndentOutdentCommand.cpp:
2654         (WebCore::indexForVisiblePosition): Compute indices from the first VisiblePosition
2655         in the document, instead of the first Position.
2656         Use rangeCompliantEquivalents when creating the Range that we pass to rangeLength.
2657         Tell TextIterator::rangeLength that we're doing selection preservation, so that it
2658         will emit characters between all VisiblePositions.
2659         (WebCore::IndentOutdentCommand::indentRegion): Fixed a bug where the range and location
2660         passed to rangeFromLocationAndLength were reversed.
2661         Tell rangeFromLocationAndLength that we're doing doing selection preservation, as
2662         above.
2663         * editing/TextIterator.cpp:
2664         (WebCore::CharacterIterator::CharacterIterator): 
2665         (WebCore::TextIterator::rangeLength): Rename emitSpacesForReplacedElements
2666         to forSelectionPreservation, to match the name of the boolean inside TextIterator and
2667         to match its meaning after r25522.
2668         (WebCore::TextIterator::rangeFromLocationAndLength): Ditto.
2669
2670 2007-10-16  Darin Adler  <darin@apple.com>
2671
2672         Reviewed by Mitz.
2673
2674         - fix http://bugs.webkit.org/show_bug.cgi?id=15536
2675           need to cache missing glyph so we're not slow on pages that show missing glyphs
2676
2677         - <rdar://problem/5404359> UI thread stall (>60sec) in MLANG running stress test
2678           (related to font data caching)
2679
2680         * platform/Font.cpp: (WebCore::Font::glyphDataForCharacter): Check for a null value
2681         for fontData rather than for glyph to detect non-cached entries in the glyph data.
2682
2683         * platform/gtk/GlyphPageTreeNodeGtk.cpp: (WebCore::GlyphPage::fill):
2684         * platform/mac/GlyphPageTreeNodeMac.cpp: (WebCore::GlyphPage::fill):
2685         * platform/win/GlyphPageTreeNodeWin.cpp: (WebCore::GlyphPage::fill):
2686         Set fontData to 0 for missing glyph entries. Also fixed the Windows and GTK versions
2687         to return the proper value for haveGlyphs.
2688
2689 2007-10-16  Mark Rowe  <mrowe@apple.com>
2690
2691         Gtk build fix.  Replace use of assert with ASSERT_NOT_REACHED.
2692
2693         * platform/gtk/FontCacheGtk.cpp:
2694         (WebCore::FontCache::platformInit):
2695
2696 2007-10-16  Darin Adler  <darin@apple.com>
2697
2698         Reviewed by Adam.
2699
2700         - fix http://bugs.webkit.org/show_bug.cgi?id=15534
2701           WebScriptObject.h has some formatting and editorial mistakes
2702
2703         * bindings/objc/WebScriptObject.h: Fix wording and formatting.
2704
2705 2007-10-16  Darin Adler  <darin@apple.com>
2706
2707         - try to fix the Qt build
2708
2709         * config.h: Don't use DisallowCType.h, since it's incompatible with some C++ headers
2710         that are used in some Qt-specific source files.
2711
2712 2007-10-16  Darin Adler  <darin@apple.com>
2713
2714         Reviewed by Adele.
2715
2716         - fix http://bugs.webkit.org/show_bug.cgi?id=15525
2717           transpose (control-T) should do the last two characters on a line if at end of line
2718         - remove unused CommandByName class
2719         - move transpose command implementation here from Mac OS X WebKit
2720
2721         * editing/Editor.h:
2722         * editing/Editor.cpp:
2723         (WebCore::execTranspose): Added.
2724         (WebCore::Editor::transpose): Added. This has the transpose implementation from
2725         WebCoreFrameBridge and WebHTMLView, translated into WebCore-style C++ and with
2726         a special case for the end of a paragraph.
2727
2728         * page/Frame.h: Removed unused command() function member.
2729         * page/FramePrivate.h: Removed unused m_command data member.
2730         * page/Frame.cpp: Ditto.
2731
2732         * page/mac/WebCoreFrameBridge.h: Removed rangeOfCharactersAroundCaret method.
2733         * page/mac/WebCoreFrameBridge.mm: Ditto.
2734
2735         * WebCore.pro: Removed CommandByName.h/cpp.
2736         * WebCore.vcproj/WebCore.vcproj: Ditto.
2737         * WebCore.xcodeproj/project.pbxproj: Ditto.
2738
2739         * editing/CommandByName.cpp: Removed.
2740         * editing/CommandByName.h: Removed.
2741
2742 2007-10-16  Darin Adler  <darin@apple.com>
2743
2744         Reviewed by Maciej and Geoff (and looked over by Eric).
2745
2746         - http://bugs.webkit.org/show_bug.cgi?id=15519
2747           eliminate use of <ctype.h> for processing ASCII
2748
2749         * ForwardingHeaders/wtf/ASCIICType.h: Added.
2750         * ForwardingHeaders/wtf/DisallowCType.h: Added.
2751
2752         * WebCorePrefix.h: Get rid of inclusion of <ctype.h>.
2753         * config.h: Include DisallowCType.h.
2754
2755         * css/CSSParser.cpp:
2756         (WebCore::ParseString::lower):
2757         * css/CSSPrimitiveValue.cpp:
2758         (WebCore::isCSSTokenizerIdentifier):
2759         * css/CSSStyleDeclaration.cpp:
2760         (WebCore::propertyID):
2761         * html/HTMLSelectElement.cpp:
2762         (WebCore::stripLeadingWhiteSpace):
2763         * html/HTMLTokenizer.cpp:
2764         (WebCore::tagMatch):
2765         * loader/FTPDirectoryParser.cpp:
2766         (WebCore::parseOneFTPLine):
2767         * loader/TextResourceDecoder.cpp:
2768         (WebCore::TextResourceDecoder::checkForHeadCharset):
2769         * platform/DeprecatedCString.cpp:
2770         (WebCore::DeprecatedCString::lower):
2771         (WebCore::DeprecatedCString::upper):
2772         (WebCore::DeprecatedCString::find):
2773         (WebCore::DeprecatedCString::contains):
2774         * platform/DeprecatedString.cpp:
2775         (WebCore::equalCaseInsensitive):
2776         (WebCore::isCharacterAllowedInBase):
2777         (WebCore::DeprecatedString::find):
2778         (WebCore::DeprecatedString::contains):
2779         (WebCore::toIntegralType):
2780         * platform/DeprecatedString.h:
2781         (WebCore::DeprecatedChar::isSpace):
2782         (WebCore::DeprecatedChar::lower):
2783         (WebCore::DeprecatedChar::upper):
2784         * platform/KURL.cpp:
2785         (WebCore::KURL::parse):
2786         * platform/StringImpl.cpp:
2787         (WebCore::isSpace):
2788         (WebCore::StringImpl::containsOnlyWhitespace):
2789         (WebCore::StringImpl::isLower):
2790         (WebCore::StringImpl::lower):
2791         (WebCore::StringImpl::find):
2792         (WebCore::StringImpl::reverseFind):
2793         (WebCore::equalIgnoringCase):
2794         * platform/TextEncodingRegistry.cpp:
2795         (WebCore::TextEncodingNameHash::equal):
2796         (WebCore::TextEncodingNameHash::hash):
2797         (WebCore::atomicCanonicalTextEncodingName):
2798         * platform/mac/KeyEventMac.mm:
2799         (WebCore::keyIdentifierForKeyEvent):
2800         * platform/win/KeyEventWin.cpp:
2801         (WebCore::keyIdentifierForWindowsKeyCode):
2802         * platform/win/PopupMenuWin.cpp:
2803         (WebCore::isASCIIPrintable):
2804         (WebCore::PopupWndProc):
2805         * plugins/win/PluginViewWin.cpp:
2806         (WebCore::capitalizeRFC822HeaderFieldName):
2807         * rendering/RenderText.cpp:
2808         (WebCore::RenderText::widthFromCache):
2809         Use ASCIICType.h functions instead of ctype.h ones.
2810
2811 2007-10-16  Mitz Pettel  <mitz@webkit.org>
2812
2813         Reviewed by Dave Hyatt.
2814
2815         - fix http://bugs.webkit.org/show_bug.cgi?id=15296
2816           REGRESSION (r19716-r19719): width not specified for <marquee> tag is causing the alignment issue.
2817
2818         Test: fast/block/float/marquee-shrink-to-avoid-floats.html
2819
2820         * rendering/RenderObject.cpp:
2821         (WebCore::RenderObject::shrinkToAvoidFloats): Changed to return 'true' for <marquee>s with auto width.
2822
2823 2007-10-16  Beth Dakin  <bdakin@apple.com>
2824
2825         Reviewed by Darin.
2826
2827         Fix for <rdar://problem/5517118> REGRESSION: 9A570 - Safari renders 
2828         Amazon seller page way too small
2829
2830         The font size at Amazon was way too small because the calls to 
2831         getComputedStyle and getPropertyValue did not cause the div to 
2832         attach because there was a pending stylesheet. The fix is to call 
2833         updateLayoutIgnorePendingStylesheets() instead of just 
2834         updateLayout().
2835
2836         * css/CSSComputedStyleDeclaration.cpp:
2837         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2838
2839 2007-10-16  David Hyatt  <hyatt@apple.com>
2840
2841         Get transform-origin(x/y) mapped into the front end RenderStyle.  Adds a new StyleTransformData struct that
2842         holds transform-origin (and that will also eventually hold the parsed transform operations as well).
2843
2844         Reviewed by Beth
2845
2846         * css/CSSStyleSelector.cpp:
2847         (WebCore::CSSStyleSelector::applyProperty):
2848         * rendering/RenderStyle.cpp:
2849         (WebCore::StyleTransformData::StyleTransformData):
2850         (WebCore::StyleTransformData::operator==):
2851         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2852         (WebCore::StyleRareNonInheritedData::operator==):
2853         (WebCore::RenderStyle::RenderStyle):
2854         (WebCore::RenderStyle::diff):
2855         * rendering/RenderStyle.h:
2856         (WebCore::StyleTransformData::operator!=):
2857         (WebCore::RenderStyle::transformOriginX):
2858         (WebCore::RenderStyle::transformOriginY):
2859         (WebCore::RenderStyle::setTransformOriginX):
2860         (WebCore::RenderStyle::setTransformOriginY):
2861         (WebCore::RenderStyle::initialTransformOriginX):
2862         (WebCore::RenderStyle::initialTransformOriginY):
2863
2864 2007-10-16  Adele Peterson  <adele@apple.com>
2865
2866         Reviewed by Alice.
2867
2868         Fix for <rdar://problem/5538793> REGRESSION: Failing layout test: fast/forms/select-change-listbox-to-popup.html (due to landing feature branch)
2869
2870         * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::parseMappedAttribute):  When switching between types of select elements, call setRecalcListItems
2871           since recalcListItems updates the default selection in different ways for the different controls. 
2872
2873 2007-10-16  Alice Liu  <alice.liu@apple.com>
2874
2875         rubber-stamped by Darin.
2876
2877         flipping my previous fix around so that mac is special-cased instead of win.
2878
2879         * dom/Document.cpp:
2880         (WebCore::Document::defaultEventHandler):
2881
2882 2007-10-16  David Hyatt  <hyatt@apple.com>
2883
2884         Clean up transform parsing.  Fix a crash, ditch the extra parse context class, and use RefPtr/PassRefPtr more
2885         to simplify the code.
2886
2887         Reviewed by aroben
2888
2889         * css/CSSParser.cpp:
2890         (WebCore::CSSParser::parseValue):
2891         (WebCore::CSSParser::parseTransform):
2892         * css/CSSParser.h:
2893
2894 2007-10-16  Alice Liu  <alice.liu@apple.com>
2895
2896         Reviewed by Adele.
2897
2898         fixed <rdar://5085596> Accesskeys don't work
2899         
2900         * dom/Document.cpp:
2901         (WebCore::Document::defaultEventHandler):
2902         accesskey modifier is platform-depedent.
2903
2904 2007-10-15  Mark Rowe  <mrowe@apple.com>
2905
2906         Reviewed by John.
2907
2908         <rdar://problem/5494040> Reproducible assertion failure in WebCore::IconDatabase::iconForPageURL
2909
2910         A race condition between icon database import and Safari asking for an icon for the empty URL
2911         was resulting in a PageURLRecord being created for a URL that can never be retained.  By enforcing
2912         that PageURLRecord's cannot be created for the empty URL we can prevent the assertion from failing.
2913
2914         * loader/icon/IconDatabase.cpp:
2915         (WebCore::IconDatabase::iconForPageURL):
2916         (WebCore::IconDatabase::getOrCreatePageURLRecord): Bail out early if the URL is empty.
2917         (WebCore::IconDatabase::performURLImport): Don't create the PageURLRecord if the URL is empty.
2918
2919 2007-10-15  Jon Honeycutt  <jhoneycutt@apple.com>
2920
2921         Reviewed by Ollie.
2922
2923         Use OwnPtr for m_deliveryData, and fix a bug where we were memmove()ing
2924         over m_deliveryData instead of its data buffer
2925
2926         * plugins/win/PluginStreamWin.cpp:
2927         (WebCore::PluginStreamWin::~PluginStreamWin): Don't delete
2928         m_deliveryData
2929         (WebCore::PluginStreamWin::deliverData): Fix memmove() call
2930         (WebCore::PluginStreamWin::didReceiveData): Assign using OwnPtr::set()
2931         * plugins/win/PluginStreamWin.h: Use OwnPtr
2932
2933 2007-10-15  Steve Falkenburg  <sfalken@apple.com>
2934
2935         Reviewed by Oliver.
2936
2937         Add missing null check.
2938
2939         * platform/network/cf/AuthenticationCF.cpp:
2940         (WebCore::core):
2941
2942 2007-10-15  Mark Rowe  <mrowe@apple.com>
2943
2944         Fix the no-SVG build again.  Add new transform CSS properties to the switch statements.
2945
2946         * css/CSSComputedStyleDeclaration.cpp:
2947         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2948         * css/CSSStyleSelector.cpp:
2949         (WebCore::CSSStyleSelector::applyProperty):
2950
2951 2007-10-15  Darin Adler  <darin@apple.com>
2952
2953         Reviewed by Mitz.
2954
2955         - http://bugs.webkit.org/show_bug.cgi?id=15518
2956           Remove the unused attemptFontSubstitution feature and do some
2957           cleanup of glyphDataForCharacter.
2958
2959         * platform/Font.h:
2960         * platform/Font.cpp:
2961         (WebCore::WidthIterator::advance): Eliminated uneeded attemptFontSubstitution
2962         and cluster parameters to the glyphDataForCharacter function.
2963         (WebCore::Font::glyphDataForCharacter): Removed the cluster parameter and
2964         attemptFontSubstitution parameter. Removed the isUpper check before calling
2965         toUpper in the small caps code path. Split up the inner loop into separate
2966         copies for non-small-caps and small caps. Broke out the system fallback
2967         page handling so it's not inside the loop. Changed system fallback so it uses
2968         the character and breaks it up into UTF-16 as needed, instead of using a
2969         passed-in "character cluster".
2970
2971         * platform/TextStyle.h:
2972         (WebCore::TextStyle::TextStyle): Removed attemptFontSubstitution.
2973         (WebCore::TextStyle::applyWordRounding): Ditto.
2974
2975 2007-10-15  Jon Honeycutt  <jhoneycutt@apple.com>
2976
2977         Reviewed by Ollie.
2978
2979         Remove an operator precedence warning on Windows
2980
2981         * editing/markup.cpp:
2982         (WebCore::escapeContentText): Use (a) | (b)
2983         (WebCore::appendEscapedContent): Use (a) | (b)
2984
2985 2007-10-15  Kevin McCullough  <kmccullough@apple.com>
2986
2987         Reviewed by Darin.
2988
2989         - <rdar://problem/5238818> window.resizeTo doesn't restrict the resized window to the size of the screen
2990         - Now we take the doc into account when resizing.
2991         - Also I found an issue where we would resize to outside the window, because
2992           the resize would be smaller than the window size but the location of the
2993           window would make the resize go off-screen. Now we move the window back into the screen.
2994
2995         * bindings/js/kjs_window.cpp:
2996         (KJS::adjustWindowRect):
2997         (KJS::WindowFunc::callAsFunction):
2998
2999 2007-10-15  Jon Honeycutt  <jhoneycutt@apple.com>
3000
3001         Reviewed by Anders.
3002
3003         <rdar://5510700> Repro crash loading embedded Windows Media Player
3004         content
3005
3006         Anders noticed that the older Windows Media Player plugin (npdsplay.dll)
3007         will crash if it receives its resource requests out of order, whereas we
3008         were immediately fulfilling untargeted, non-JavaScript requests and
3009         scheduling targeted or JavaScript resource requests. Implement his
3010         suggested fix, which is to schedule PluginRequests for all resource
3011         requests 
3012
3013         * plugins/win/PluginViewWin.cpp:
3014         (WebCore::getString):
3015         (WebCore::PluginViewWin::performRequest): If this non-JavaScript request
3016         has no target, create a stream for it
3017         (WebCore::PluginViewWin::load): Schedule PluginRequests for all resource
3018         requests
3019
3020 2007-10-15  Mark Rowe  <mrowe@apple.com>
3021
3022         Gtk and Qt build fix.  Add new .cpp file to project.
3023
3024         * WebCore.pro:
3025
3026 2007-10-15  John Sullivan  <sullivan@apple.com>
3027
3028         * platform/mac/FontDataMac.mm:
3029         D'oh! Added missing #import to fix build
3030
3031 2007-10-15  John Sullivan  <sullivan@apple.com>
3032
3033         Reviewed by Geoff
3034
3035         * platform/mac/FontDataMac.mm:
3036         (WebCore::FontData::smallCapsFontData):
3037         replace NS_DURING/NS_HANDLER with WebCore-style BEGIN/END_BLOCK_OBJC_EXCEPTIONS
3038
3039 2007-10-15  David Hyatt  <hyatt@apple.com>
3040
3041         The CSS WG has been discussing the concept of rotation.  In the latest draft specification, two properties
3042         have been introduced: rotation and rotation-point.  I believe these properties should be generalized to
3043         allow for arbitrary transformations (e.g., translation, skew, rotate, scale).
3044
3045         This patch adds support for the back-end parsing of two new CSS properties: transform and transform-origin.
3046         They are directly analogous to the properties specified by the CSS WG, except that they are designed to allow
3047         for arbitrary affine transforms rather than just rotation.
3048
3049         Reviewed by Beth Dakin
3050
3051         * WebCore.xcodeproj/project.pbxproj:
3052         * WebCore.vcproj/WebCore.vcproj:
3053         * css/CSSComputedStyleDeclaration.cpp:
3054         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3055         * css/CSSParser.cpp:
3056         (WebCore::CSSParser::parseValue):
3057         (WebCore::TransformParseContext:::m_list):
3058         (WebCore::TransformParseContext::list):
3059         (WebCore::TransformParseContext::failed):
3060         (WebCore::TransformParseContext::addValue):
3061         (WebCore::TransformOperationInfo::TransformOperationInfo):
3062         (WebCore::TransformOperationInfo::type):
3063         (WebCore::TransformOperationInfo::argCount):
3064         (WebCore::TransformOperationInfo::unit):
3065         (WebCore::TransformOperationInfo::unknown):
3066         (WebCore::TransformOperationInfo::hasCorrectArgCount):
3067         (WebCore::CSSParser::parseTransform):
3068         (WebCore::CSSParser::parseTransformOrigin):
3069         * css/CSSParser.h:
3070         * css/CSSPropertyNames.in:
3071         * css/CSSTransformValue.cpp: Added.
3072         (WebCore::CSSTransformValue::CSSTransformValue):
3073         (WebCore::CSSTransformValue::~CSSTransformValue):
3074         (WebCore::CSSTransformValue::addValue):
3075         (WebCore::CSSTransformValue::cssText):
3076         * css/CSSTransformValue.h: Added.
3077         (WebCore::CSSTransformValue::):
3078
3079 2007-10-15  Mark Rowe  <mrowe@apple.com>
3080
3081         Reviewed by Oliver.
3082
3083         Fix the no-SVG build.
3084
3085         * DerivedSources.make: Use the correct file as input to generate CSSPropertyNames.h.
3086         * rendering/RenderObject.cpp:
3087         (WebCore::objectIsRelayoutBoundary):
3088
3089 2007-10-15  Darin Adler  <darin@apple.com>
3090
3091         Reviewed by Sam.
3092
3093         - fix http://bugs.webkit.org/show_bug.cgi?id=15520
3094           alert(undefined) should say "undefined" in the alert
3095
3096         Test: fast/dom/Window/alert-undefined.html
3097
3098         * page/DOMWindow.idl: Remove ConvertUndefinedOrNullToNullString from alert, confirm, and prompt.
3099         It turns out that the default behavior is what the other browsers do (browsers tested: IE 7,
3100         Firefox 2).
3101
3102 2007-10-15  Adele Peterson  <adele@apple.com>
3103
3104         Reviewed by Darin.
3105
3106         Fix for http://bugs.webkit.org/show_bug.cgi?id=15252
3107         <rdar://problem/5498184> REGRESSION: <select multiple> doesn't scroll to top when old options are removed and new ones are added, leaving listbox empty-looking
3108
3109         * rendering/RenderListBox.cpp: (WebCore::RenderListBox::calcHeight): If the scrollbar is disabled, make sure the scroll offset gets reset to 0.  In general,
3110           we don't want to unnecessarily adjust the scroll offset, but in this case, there won't be an obvious way for the user to adjust the scroller position once it's disabled.
3111
3112 2007-10-15  Jon Honeycutt  <jhoneycutt@apple.com>
3113
3114         Reviewed by Maciej.
3115
3116         Return a more appropriate error from NPN_RequestRange, which is
3117         currently unimplemented
3118
3119         * plugins/win/npapi.cpp: return NPERR_STREAM_NOT_SEEKABLE 
3120         (NPN_RequestRead):
3121
3122 2007-10-15  Jon Honeycutt  <jhoneycutt@apple.com>
3123
3124         Reviewed by Maciej.
3125
3126         Add a missing function pointer to the m_browserFuncs structure
3127
3128         * plugins/win/PluginPackageWin.cpp:
3129         (WebCore::PluginPackageWin::load):
3130
3131 2007-10-15  Simon Hausmann  <hausmann@kde.org>
3132
3133         Reviewed by Lars.
3134
3135         Fix the compilation of the Font code in the Qt port by adding the necessary stubs to support downloadable fonts through the @font-face rules.
3136
3137         * WebCore.pro:
3138         * loader/CachedFont.cpp:
3139         * platform/qt/FontCacheQt.cpp: Removed.
3140         * platform/qt/FontCustomPlatformData.cpp: Removed.
3141         * platform/qt/FontCustomPlatformData.h: Removed.
3142         * platform/qt/FontDataQt.cpp: Removed.
3143         * platform/qt/FontPlatformData.h: Removed.
3144         * platform/qt/FontQt.cpp:
3145         * platform/qt/GlyphPageTreeNodeQt.cpp: Removed.
3146
3147 2007-10-15  Simon Hausmann  <hausmann@kde.org>
3148
3149         Reviewed by Lars.
3150
3151         Adapt to the latest API changes in the SVG API/Code.
3152
3153         * platform/graphics/svg/qt/RenderPathQt.cpp:
3154         (WebCore::RenderPath::strokeContains):
3155         (WebCore::getPathStroke):
3156         * platform/graphics/svg/qt/SVGPaintServerQt.cpp:
3157         (WebCore::SVGPaintServer::setPenProperties):
3158         * platform/graphics/svg/qt/SVGResourceMaskerQt.cpp:
3159
3160 2007-10-14  Nikolas Zimmermann  <zimmermann@kde.org>
3161
3162         Reviewed by Eric.
3163
3164         Fix bad abstraction in ImageBuffer class.
3165         While the class itself is platform-aware and thus it's location in platform/graphics
3166         is fine, it contains the "renderSubtreeToImage" method which operates on RenderObject.
3167
3168         As it's SVG specific I decided to move this method into SVGRenderSupport, to avoid
3169         implicit platform/ <-> rendering/ dependencies.
3170
3171         * WebCore.pro:
3172         * WebCore.vcproj/WebCore.vcproj:
3173         * WebCore.xcodeproj/project.pbxproj:
3174         * ksvg2/svg/SVGMaskElement.cpp:
3175         (WebCore::SVGMaskElement::drawMaskerContent):
3176         * ksvg2/svg/SVGPatternElement.cpp:
3177         (WebCore::SVGPatternElement::buildPattern):
3178         * platform/graphics/ImageBuffer.cpp: Removed.
3179         * platform/graphics/ImageBuffer.h:
3180         (WebCore::ImageBuffer::size):
3181         * platform/graphics/svg/SVGImage.cpp:
3182         (WebCore::SVGImage::nativeImageForCurrentFrame):
3183         * rendering/SVGRenderSupport.cpp:
3184         (WebCore::renderSubtreeToImage):
3185         * rendering/SVGRenderSupport.h:
3186
3187 2007-10-14  Peter Kasting  <zerodpx@gmail.com>
3188
3189         Reviewed by Maciej.
3190
3191         http://bugs.webkit.org/show_bug.cgi?id=15210
3192         Draw the image outline even for broken images.
3193
3194         * rendering/RenderImage.cpp:
3195         (WebCore::RenderImage::paint):
3196
3197 2007-10-14  Kevin Ollivier  <kevino@theolliviers.com>
3198
3199         Reviewed by Adam.
3200
3201         Add support for MSVC7, and fix cases where PLATFORM(WIN) should
3202         be PLATFORM(WIN_OS) for other ports building on Windows.
3203
3204         * dom/XMLTokenizer.cpp:
3205         * page/FrameTree.cpp:
3206         * platform/StaticConstructors.h:
3207         * platform/String.cpp:
3208
3209 2007-10-14  Maxime Britto  <mbritto@pleyo.com>
3210
3211         Reviewed by Mitz.
3212
3213         Fix an error in the goBackOrForward() function : confusion between forwardListCount and backListCount.
3214         http://bugs.webkit.org/show_bug.cgi?id=15212
3215
3216         * loader/FrameLoader.cpp:
3217         (WebCore::FrameLoader::goBackOrForward):
3218
3219 2007-10-14  Mitz Pettel  <mitz@webkit.org>
3220
3221         Reviewed by Darin.
3222
3223         - fix http://bugs.webkit.org/show_bug.cgi?id=15181
3224           text-transform: uppercase not working in input (submit, reset, button) elements
3225           <rdar://problem/5474647>
3226
3227         Test: fast/forms/button-text-transform.html
3228
3229         Text transformations require access to the original text. The button's inner
3230         text was an anonymous RenderText, meaning it did not have a node to retrieve
3231         the original text from. The patch fixes this by changing the inner text into a
3232         RenderTextFragment, which stores its own original text.
3233
3234         * rendering/RenderButton.cpp:
3235         (WebCore::RenderButton::setText):
3236         * rendering/RenderButton.h:
3237
3238 2007-10-14  Eric Seidel  <eric@webkit.org>
3239
3240         Reviewed by Maciej.
3241
3242         REGRESSION: Javascript bug in getElementsByName
3243         http://bugs.webkit.org/show_bug.cgi?id=15274
3244
3245         Test: fast/dom/getelementbyname-invalidation.html
3246
3247         * dom/NameNodeList.h: remove empty rootNodeChildrenChanged override
3248
3249 2007-10-14  Mitz Pettel  <mitz@webkit.org>
3250
3251         Reviewed by Maciej.
3252
3253         - http://bugs.webkit.org/show_bug.cgi?id=15303
3254           Remove now-redundant code to restore dialog arguments after clear
3255
3256         This patch reverts the kjs_window.* parts of r25576 because following
3257         r25783, window properties, including dialog arguments, are not cleared
3258         when the newly created modal dialog transitions to the document.
3259
3260         * bindings/js/kjs_window.cpp:
3261         (KJS::WindowPrivate::WindowPrivate):
3262         (KJS::createWindow):
3263         (KJS::showModalDialog):
3264         (KJS::Window::clear):
3265         (KJS::WindowFunc::callAsFunction):
3266         (KJS::Window::setReturnValueSlot):
3267         * bindings/js/kjs_window.h:
3268
3269 2007-10-14  Mitz Pettel  <mitz@webkit.org>
3270
3271         Reviewed by Dave Hyatt.
3272
3273         - fix http://bugs.webkit.org/show_bug.cgi?id=15309
3274           <rdar://problem/5512020> Crash due to infinite recursion in RenderTable::addChild
3275
3276         Test: fast/table/generated-caption.html
3277
3278         * rendering/RenderTable.cpp:
3279         (WebCore::RenderTable::addChild): Changed to make sure that the child is
3280         not added into generated after content. Also made adding a child before
3281         a table caption work correctly instead of adding the child after the caption.
3282
3283 2007-10-14  Peter Kasting  <zerodpx@gmail.com>
3284
3285         Reviewed by Maciej.
3286
3287         http://bugs.webkit.org/show_bug.cgi?id=15141
3288         Feed GIF reader data from the point in the stream it expects.  Also,
3289         mirror the reader's failure state up to the wrapping decoder.
3290
3291         * platform/image-decoders/gif/GIFImageReader.cpp:
3292         (GIFImageReader::read):
3293
3294 2007-10-14  Peter Kasting  <zerodpx@gmail.com>
3295
3296         Reviewed by Maciej.
3297
3298         http://bugs.webkit.org/show_bug.cgi?id=15142
3299         Return correct frame count in GIFImageDecoder::frameBufferAtIndex(),
3300         even if more data has arrived since the last decoding pass.
3301
3302         * platform/image-decoders/gif/GIFImageDecoder.cpp:
3303         (WebCore::GIFImageDecoder::frameBufferAtIndex):
3304
3305 == Rolled over to ChangeLog-2007-10-14 ==