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