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