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