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