WebCore:
[WebKit-https.git] / WebCore / ChangeLog
1 2007-10-20  Dan Bernstein  <mitz@apple.com>
2
3         Reviewed by Dave Hyatt.
4
5         - fix http://bugs.webkit.org/show_bug.cgi?id=15208
6           display:table causes the collapsed text to show at a different position when expanded
7
8         Test: fast/table/insert-before-anonymous-ancestors.html
9
10         * rendering/RenderTable.cpp:
11         (WebCore::RenderTable::addChild): Rolled out r11579. I think whatever
12         that change was supposed to accomplish has since been done in other
13         places in the code.
14
15 2007-10-20  Mark Rowe  <mrowe@apple.com>
16
17         Reviewed by Dave Hyatt.
18
19         Fix http://bugs.webkit.org/show_bug.cgi?id=15584
20         Bug 15584: REGRESSION(r26696): GtkLauncher segfaults on WebCore::WidthIterator::advance
21
22         * platform/Font.cpp:
23         (WebCore::Font::glyphDataForCharacter): If the fallback page exists but does not have a
24         glyph for the character, fall back to the missing glyph data rather than returning an
25         invalid GlyphData.
26
27 2007-10-20  Jasper Bryant-Greene  <m@ni.ac.nz>
28
29         Reviewed by Maciej.
30
31         Changed the hard-coded scroll delta in WheelEventGtk from 120 to 0.25,
32         as suggested by George Wright in #15108 (which this patch will
33         resolve).
34
35         This gives a more sane scrolling behaviour, rather than the
36         jumping to the end or start of the document as occurred previously.
37
38         * platform/gtk/WheelEventGtk.cpp:
39         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
40
41 2007-10-20  Alp Toker  <alp@atoker.com>
42
43         Reviewed by Eric.
44
45         Support text boundary detection.
46         Move TextBoundariesWin.cpp to platform/ since it's portable and useful.
47         Split out and implement some TemporaryLinkStubs.
48
49         * WebCore.pro:
50         * WebCore.vcproj/WebCore.vcproj:
51         * platform/TextBoundariesICU.cpp: Copied from WebCore/platform/win/TextBoundariesWin.cpp.
52         * platform/gtk/Language.cpp: Added.
53         (WebCore::defaultLanguage):
54         * platform/gtk/TemporaryLinkStubs.cpp:
55         * platform/gtk/TextBreakIteratorInternalICUGtk.cpp: Added.
56         (WebCore::currentTextBreakLocaleID):
57         * platform/win/TextBoundariesWin.cpp: Removed.
58
59 2007-10-20  Mark Rowe  <mrowe@apple.com>
60
61         Reviewed by Tim Hatcher.
62
63         Workaround for http://bugs.webkit.org/show_bug.cgi?id=15574
64         Bug 15574: Web Inspector doesn't work with the new Database feature
65
66         The executeSql callback is executed in the security domain of the web page that owns the database,
67         while the inspector's window object is in the callback functions scope chain.  This is leading to a
68         security violation when the callback attempts to access "document".  We can work around this by
69         ensuring that "document" can be found in the scope chain before the window object.
70
71         * page/inspector/DatabasePanel.js:
72
73 2007-10-20  Darin Adler  <darin@apple.com>
74
75         Reviewed by Maciej.
76
77         - http://bugs.webkit.org/show_bug.cgi?id=15567
78           speed up hashing const char* by removing call to strlen
79
80         This includes one other fix as well. Both were from a day where I did some
81         profiling to find hot spots when running the page load test.
82
83         * platform/StringImpl.cpp:
84         (WebCore::StringImpl::computeHash): Compute the hash without calling strlen.
85         Also change the argument names to not confusingly use m_ prefixes.
86         (WebCore::StringImpl::createStrippingNull): Added a faster case for strings that
87         don't have null.
88
89 2007-10-20  Mark Rowe  <mrowe@apple.com>
90
91         Reviewed by Alp.
92
93         Gtk changes needed to enable HTML 5 client-side database storage.
94
95         * WebCore.pro: Have Gtk use ThreadingPthreads.cpp.
96         * platform/pthreads/ThreadingPthreads.cpp: Include errno so that EDEADLK and EBUSY are available.
97
98 2007-10-20  Mark Rowe  <mrowe@apple.com>
99
100         Reviewed by Alp.
101
102         Implement callOnMainThread for Gtk+ via a one-shot zero-delay timer that will be dispatched
103         from the main event loop.
104
105         * WebCore.pro:
106         * platform/gtk/TemporaryLinkStubs.cpp:
107         * platform/gtk/ThreadingGtk.cpp: Added.
108         (WebCore::callFunctionOnMainThread):
109         (WebCore::callOnMainThread):
110
111 2007-10-20  Nikolas Zimmermann  <zimmermann@kde.org>
112
113         Reviewed by Eric.
114
115         Fix non-functional display="inline" / display="none" for SVG text.
116
117         Fixes: svg/W3C-SVG-1.1/animate-elem-39-t.svg (display="inline" support)
118         Fixes: svg/batik/text/textProperties2.svg (display="inline/none" support)
119         Fixes: svg/carto.net/tabgroup.svg (display="none" support, stray content before layouting)
120         
121         * css/svg.css: Remove "important" flag on text/foreignObject display: block property
122         * rendering/RenderSVGBlock.cpp:
123         (WebCore::RenderSVGBlock::setStyle):
124
125 2007-10-20  Mark Rowe  <mrowe@apple.com>
126
127         Reviewed by Alp.
128
129         Replace #ifdef'd code with the appropriate use of a forwarding header.
130
131         * ForwardingHeaders/kjs/array_instance.h: Added.
132         * bindings/js/JSDatabaseCustom.cpp:
133
134 2007-10-20  Nikolas Zimmermann  <zimmermann@kde.org>
135
136         Reviewed by Oliver.
137
138         Add support for 'kerning' property in SVG text layout code.
139         Support all textLength/lengthAdjust modes on normal text & textPaths.
140
141         Support letter & word spacing on textPath.
142         Fix text selection when any spacing (letter/word/kerning) is involved.
143
144         Fixes: http://bugs.webkit.org/show_bug.cgi?id=15571
145         Fixes: svg/batik/text/textOnPathSpaces.svg (spacing)
146                svg/batik/text/textLayout.svg (kerning support)
147                svg/text/text-spacing-01-b.svg (text selection)
148
149         * platform/Font.cpp:
150         (WebCore::WidthIterator::advance):
151         * platform/TextStyle.h:
152         (WebCore::TextStyle::TextStyle):
153         (WebCore::TextStyle::spacingDisabled):
154         (WebCore::TextStyle::disableSpacing):
155         * rendering/SVGCharacterLayoutInfo.cpp:
156         (WebCore::SVGCharacterLayoutInfo::SVGCharacterLayoutInfo):
157         (WebCore::SVGCharacterLayoutInfo::nextPathLayoutPointAndAngle):
158         (WebCore::SVGCharacterLayoutInfo::setInPathLayout):
159         (WebCore::SVGCharacterLayoutInfo::addLayoutInformation):
160         (WebCore::SVGChar::characterTransform):
161         * rendering/SVGCharacterLayoutInfo.h:
162         (WebCore::SVGTextChunkLayoutInfo::SVGTextChunkLayoutInfo):
163         * rendering/SVGRootInlineBox.cpp:
164         (WebCore::closeTextChunk):
165         (WebCore::calculateKerning):
166         (WebCore::SVGRootInlineBox::placeBoxesHorizontally):
167         (WebCore::svgTextStyleForInlineTextBox):
168         (WebCore::calculateTextAnchorShiftForTextChunk):
169         (WebCore::applyTextAnchorToTextChunk):
170         (WebCore::calculateTextLengthCorrectionForTextChunk):
171         (WebCore::applyTextLengthCorrectionToTextChunk):
172         (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
173         (WebCore::SVGRootInlineBox::buildLayoutInformation):
174         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
175         (WebCore::SVGRootInlineBox::buildTextChunks):
176         (WebCore::SVGRootInlineBox::layoutTextChunks):
177         * rendering/SVGRootInlineBox.h:
178
179 2007-10-20  Rodney Dawes  <dobey@wayofthemonkey.com>
180
181         Reviewd by Darin.
182
183         http://bugs.webkit.org/show_bug.cgi?id=15563
184         Fix conflict with X11 Window type in WebCore
185
186         * WebCore/bindings/js/JSDocumentCustom.cpp:
187         * WebCore/bindings/js/JSHTMLDocumentCustom.cpp:
188         * WebCore/bindings/js/JSHTMLFrameSetElementCustom.cpp:
189         * WebCore/bindings/js/kjs_dom.cpp:
190         * WebCore/bindings/js/kjs_events.cpp:
191         * WebCore/bindings/js/kjs_proxy.cpp:
192         * WebCore/history/CachedPage.cpp:
193         * WebCore/page/Chrome.cpp:
194         * WebCore/page/Frame.cpp:
195
196 2007-10-20  Simon Hausmann  <hausmann@kde.org>
197
198         Build fix, not reviewed.
199
200         Fix the Qt build by adding the two missing FileSystem functions.
201
202         * platform/qt/FileSystemQt.cpp:
203         (WebCore::makeAllDirectories):
204         (WebCore::pathByAppendingComponent):
205
206 2007-10-19  Alp Toker  <alp@atoker.com>
207
208         Reviewed by Oliver.
209
210         GTK+ build fix enabling the new local database storage feature.
211         There is also a prospective Qt build fix.
212
213         * WebCore.pro:
214         * bindings/js/JSDatabaseCustom.cpp:
215         * platform/gtk/FileSystemGtk.cpp:
216         (WebCore::pathByAppendingComponent):
217         (WebCore::makeAllDirectories):
218
219 2007-10-19  Andrew Wellington  <proton@wiretapped.net>
220
221         Reviewed by Brady Eidson.
222
223         Mac build fix.
224
225         * WebCore.xcodeproj/project.pbxproj:
226
227 2007-10-19  Alp Toker  <alp@atoker.com>
228
229         Reviewed by Oliver.
230
231         Use platform colors for text selection.
232         Update the cache when the GTK style is changed.
233
234         * platform/gtk/RenderThemeGtk.cpp:
235         (WebCore::RenderThemeGtk::platformActiveSelectionBackgroundColor):
236         (WebCore::RenderThemeGtk::platformInactiveSelectionBackgroundColor):
237         (WebCore::RenderThemeGtk::platformActiveSelectionForegroundColor):
238         (WebCore::RenderThemeGtk::platformInactiveSelectionForegroundColor):
239         (WebCore::RenderThemeGtk::gtkStyleSet):
240         (WebCore::RenderThemeGtk::gtkEntry):
241         * platform/gtk/RenderThemeGtk.h:
242
243 2007-10-19  Adele Peterson  <adele@apple.com>
244
245         Reviewed by Beth.
246
247         Fix for: <rdar://problem/5518461> REGRESSION (2.0.4-3): Popup arrows are missing in small popups at homedepot.com
248
249         Test: fast/forms/menulist-no-overflow.html
250
251         * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::setStyle): Don't allow overflow on menu lists.
252
253 2007-10-19  Anders Carlsson  <andersca@apple.com>
254
255         Reviewed by Brady.
256
257         Move some SQL-related classes to platform/sql.
258         
259         * WebCore.vcproj/WebCore.vcproj:
260         * WebCore.xcodeproj/project.pbxproj:
261         * loader/icon/SQLDatabase.cpp: Removed.
262         * loader/icon/SQLDatabase.h: Removed.
263         * loader/icon/SQLStatement.cpp: Removed.
264         * loader/icon/SQLStatement.h: Removed.
265         * loader/icon/SQLTransaction.cpp: Removed.
266         * loader/icon/SQLTransaction.h: Removed.
267         * platform/sql/SQLDatabase.cpp: Copied from loader/icon/SQLDatabase.cpp.
268         * platform/sql/SQLDatabase.h: Copied from loader/icon/SQLDatabase.h.
269         * platform/sql/SQLStatement.cpp: Copied from loader/icon/SQLStatement.cpp.
270         * platform/sql/SQLStatement.h: Copied from loader/icon/SQLStatement.h.
271         * platform/sql/SQLTransaction.cpp: Copied from loader/icon/SQLTransaction.cpp.
272         * platform/sql/SQLTransaction.h: Copied from loader/icon/SQLTransaction.h.
273
274 2007-10-19  Anders Carlsson  <andersca@apple.com>
275
276         Reviewed by Adam.
277
278         Update to match the latest version of the spec. Now, executeSQL takes an array
279         of SQL parameters instead of them being passed as arguments.
280         
281         * bindings/js/JSDatabaseCustom.cpp:
282         (WebCore::JSDatabase::executeSql):
283         * page/inspector/DatabasePanel.js:
284         * storage/Database.idl:
285
286 2007-10-19  Brady Eidson  <beidson@apple.com>
287
288         Reviewed by Tim
289
290         Tiger's SQLite doesn't support CREATE TABLE IF NOT EXISTS :(
291
292         * storage/Database.cpp:
293         (WebCore::Database::performOpenAndVerify):
294         * storage/DatabaseTracker.cpp:
295         (WebCore::DatabaseTracker::DatabaseTracker):
296
297 2007-10-19  Anders Carlsson  <andersca@apple.com>
298
299         Release build fix.
300         
301         * WebCore.vcproj/WebCore.vcproj:
302
303 2007-10-19  Brady Eidson  <beidson@apple.com>
304
305         Remove stray printfs
306
307         * dom/Document.cpp:
308         (WebCore::Document::Document):
309         (WebCore::Document::~Document):
310
311 2007-10-19  Anders Carlsson  <andersca@apple.com>
312
313         Reviewed by Brady.
314
315         Apparently the Win32 pthreads impl we use does not allow unlocking a mutex that has not
316         already been locked, so lock the mutex first.
317         
318         * storage/DatabaseThread.cpp:
319         (WebCore::DatabaseThread::databaseThread):
320
321 2007-10-19  Brady Eidson  <beidson@apple.com>
322
323         Better build fix
324
325         * loader/icon/SQLDatabase.cpp:
326         (WebCore::SQLDatabase::authorizerFunction):  Definite works by 3.3.13
327
328 2007-10-19  Brady Eidson  <beidson@apple.com>
329
330         Build fix
331
332         * loader/icon/SQLDatabase.cpp:
333         (WebCore::SQLDatabase::authorizerFunction): I don't know *when* these constants were
334           added to SQLite, but I know they were by 3.4.0
335
336 2007-10-19  Brady Eidson  <beidson@apple.com>
337         Reviewed by Anders
338
339         Windows specific changes, as well as renaming Queue -> Deque
340
341         * ForwardingHeaders/wtf/Deque.h: Added.
342         * ForwardingHeaders/wtf/Queue.h: Removed.
343         * platform/win/FileSystemWin.cpp:
344         (WebCore::fileSize):
345         (WebCore::fileExists):
346         (WebCore::deleteFile):
347         (WebCore::pathByAppendingComponent):
348         (WebCore::fileSystemRepresentation):
349         (WebCore::makeAllDirectories):
350         (WebCore::homeDirectoryPath):
351         * storage/Database.h:
352         * storage/DatabaseThread.cpp:
353         (WebCore::DatabaseThread::documentGoingAway):
354         (WebCore::DatabaseThread::databaseGoingAway):
355         (WebCore::DatabaseThread::dispatchNextTaskIdentifier):
356         (WebCore::DatabaseThread::scheduleTask):
357         (WebCore::DatabaseThread::scheduleImmediateTask):
358         * storage/DatabaseThread.h:
359
360 2007-10-19  Brady Eidson <beidson@apple.com>
361
362         Reviewed by Tim and Anders
363
364         Preliminary support for HTML5 local database storage (http://www.whatwg.org/specs/web-apps/current-work/)
365
366         The specification is still in flux but the fundamentals are pretty solid and we can start using and testing 
367         this implementation even while filing bugs to track changes in the spec as it becomes more final
368
369         There are some implementation details in this patch that seem unused or useless, but they remain in place 
370         while the spec is in flux and might go one way or another.
371
372         * platform/Logging.cpp: Add StorageAPI logging channel
373         * platform/Logging.h:
374
375         * storage/Database.cpp: Added.
376         (WebCore::Database::databaseInfoTableName):
377         (WebCore::databaseVersionKey):
378         (WebCore::Database::openDatabase): C++ version of the window.openDatabase() javascript API
379         (WebCore::Database::Database):
380         (WebCore::Database::~Database):
381         (WebCore::Database::openAndVerifyVersion):
382         (WebCore::retrieveTextResultFromDatabase):
383         (WebCore::Database::getVersionFromDatabase):
384         (WebCore::setTextValueInDatabase):
385         (WebCore::Database::setVersionInDatabase):
386         (WebCore::Database::databaseThreadGoingAway): May be removed in the future
387         (WebCore::Database::disableAuthorizer): For internal (WebInspector) use to get around the authorizer's restrictions
388         (WebCore::Database::enableAuthorizer):
389         (WebCore::Database::guidForOriginAndName): Candidate for refactoring and/or moving to the database tracker.  
390           The GUID for each database identifier is currently for tracking the database version, but might be rescoped in the future
391         (WebCore::Database::resetAuthorizer):
392         (WebCore::Database::performPolicyChecks): Currently, the only post-executeSql policy check planned is the origin size usage 
393         (WebCore::Database::scheduleDatabaseCallback):
394         (WebCore::Database::performOpenAndVerify): 
395         (WebCore::Database::performChangeVersion):
396         (WebCore::Database::performExecuteSql):
397         (WebCore::Database::performCloseTransaction):
398         (WebCore::Database::performGetTableNames):
399         (WebCore::Database::version): C++ version of the javascript API
400         (WebCore::Database::changeVersion): Ditto
401         (WebCore::Database::executeSql): Ditto
402         (WebCore::Database::closeTransaction): Ditto
403         (WebCore::Database::tableNames): For internal (WebInspector) use
404         (WebCore::Database::deliverAllPendingCallbacks):
405         (WebCore::Database::deliverPendingCallbacks):
406         * storage/Database.h: Added.
407         (WebCore::Database::databaseDebugName): For debug logging purposes
408         * storage/Database.idl: Added.
409
410         * storage/DatabaseAuthorizer.cpp: Added.
411           The DatabaseAuthorizer is used to both prevent the script from doing "illegal" things in sql as well as
412           tracking when effects certain sql statements might have (such as increasing the size of the database)
413         (WebCore::DatabaseAuthorizer::DatabaseAuthorizer):
414         (WebCore::DatabaseAuthorizer::reset):
415         (WebCore::DatabaseAuthorizer::createTable):
416         (WebCore::DatabaseAuthorizer::createTempTable):
417         (WebCore::DatabaseAuthorizer::dropTable):
418         (WebCore::DatabaseAuthorizer::dropTempTable):
419         (WebCore::DatabaseAuthorizer::allowAlterTable):
420         (WebCore::DatabaseAuthorizer::createIndex):
421         (WebCore::DatabaseAuthorizer::createTempIndex):
422         (WebCore::DatabaseAuthorizer::dropIndex):
423         (WebCore::DatabaseAuthorizer::dropTempIndex):
424         (WebCore::DatabaseAuthorizer::createTrigger):
425         (WebCore::DatabaseAuthorizer::createTempTrigger):
426         (WebCore::DatabaseAuthorizer::dropTrigger):
427         (WebCore::DatabaseAuthorizer::dropTempTrigger):
428         (WebCore::DatabaseAuthorizer::createVTable):
429         (WebCore::DatabaseAuthorizer::dropVTable):
430         (WebCore::DatabaseAuthorizer::allowDelete):
431         (WebCore::DatabaseAuthorizer::allowInsert):
432         (WebCore::DatabaseAuthorizer::allowUpdate):
433         (WebCore::DatabaseAuthorizer::allowRead):
434         (WebCore::DatabaseAuthorizer::allowAnalyze):
435         (WebCore::DatabaseAuthorizer::allowPragma):
436         (WebCore::DatabaseAuthorizer::allowAttach):
437         (WebCore::DatabaseAuthorizer::allowDetach):
438         (WebCore::DatabaseAuthorizer::allowFunction):
439         (WebCore::DatabaseAuthorizer::disable):
440         (WebCore::DatabaseAuthorizer::enable):
441         (WebCore::DatabaseAuthorizer::denyBasedOnTableName): Don't allow access to the __WebKit meta info table as
442           it should be invisible to scripts
443         * storage/DatabaseAuthorizer.h: Added.
444         (WebCore::DatabaseAuthorizer::lastActionWasInsert):
445         (WebCore::DatabaseAuthorizer::lastActionIncreasedSize):
446
447         * storage/DatabaseCallback.cpp: Added.
448           Generic item to queue up for callbacks on the main thread for database activities that take place on 
449           a secondary thread
450         (WebCore::DatabaseChangeVersionCallback::DatabaseChangeVersionCallback):
451         (WebCore::DatabaseChangeVersionCallback::performCallback):
452         (WebCore::DatabaseExecuteSqlCallback::DatabaseExecuteSqlCallback):
453         (WebCore::DatabaseExecuteSqlCallback::performCallback):
454         * storage/DatabaseCallback.h: Added.
455         (WebCore::DatabaseCallback::~DatabaseCallback):
456         (WebCore::DatabaseChangeVersionCallback::~DatabaseChangeVersionCallback):
457         (WebCore::DatabaseExecuteSqlCallback::~DatabaseExecuteSqlCallback):
458
459         * storage/DatabaseTask.h: Added.
460           Generic work-item to be queued up on the background database thread
461         (WebCore::DatabaseTask::isComplete):
462         (WebCore::DatabaseOpenTask::exceptionCode):
463         (WebCore::DatabaseOpenTask::openSuccessful):
464         (WebCore::DatabaseTableNamesTask::tableNames):
465         * storage/DatabaseTask.cpp: Added.
466         (WebCore::DatabaseTask::DatabaseTask):
467         (WebCore::DatabaseTask::~DatabaseTask):
468         (WebCore::DatabaseTask::performTask):
469         (WebCore::DatabaseTask::lockForSynchronousScheduling): Used when the main thread needs this task accomplished 
470           synchronously
471         (WebCore::DatabaseTask::waitForSynchronousCompletion):
472
473         (WebCore::DatabaseOpenTask::DatabaseOpenTask):
474         (WebCore::DatabaseOpenTask::doPerformTask):
475
476         (WebCore::DatabaseExecuteSqlTask::DatabaseExecuteSqlTask):
477         (WebCore::DatabaseExecuteSqlTask::doPerformTask):
478
479         (WebCore::DatabaseChangeVersionTask::DatabaseChangeVersionTask):
480         (WebCore::DatabaseChangeVersionTask::doPerformTask):
481
482         (WebCore::DatabaseTableNamesTask::DatabaseTableNamesTask):
483         (WebCore::DatabaseTableNamesTask::doPerformTask):
484
485         * storage/DatabaseThread.cpp: Added.
486           The current design is that each Document will have its own DatabaseThread.  This makes scripts on each
487           individual document more response at the cost of adding more threads and potentially creating concurrency
488           issues when the same database is open twice from two different documents
489         (WebCore::DatabaseThread::DatabaseThread):
490         (WebCore::DatabaseThread::~DatabaseThread):
491         (WebCore::DatabaseThread::start):
492         (WebCore::DatabaseThread::documentGoingAway): Called to shut the thread down when the document is destroyed
493         (WebCore::DatabaseThread::databaseGoingAway): Remove all pending tasks for this database
494         (WebCore::DatabaseThread::databaseThreadStart):
495         (WebCore::DatabaseThread::databaseThread):
496         (WebCore::DatabaseThread::dispatchNextTaskIdentifier):
497         (WebCore::DatabaseThread::scheduleTask):
498         (WebCore::DatabaseThread::scheduleImmediateTask): Schedule a task that gets to "cut to the front of the line" when
499           the main thread requires a task be performed synchronously
500         (WebCore::DatabaseThread::wakeWorkThread):
501         * storage/DatabaseThread.h: Added.
502
503         * storage/DatabaseTracker.cpp: Added.
504           The DatabaseTracker is the master management of all databases.  It will keep track of the filename for a given
505           unique database, keep track of the total disk usage per-origin, and policys per database/origin
506         (WebCore::DatabaseTracker::setDatabasePath):
507         (WebCore::DatabaseTracker::databasePath):
508         (WebCore::DatabaseTracker::tracker):
509         (WebCore::DatabaseTracker::DatabaseTracker):
510         (WebCore::DatabaseTracker::fullPathForDatabase):
511         (WebCore::DatabaseTracker::populateOrigins):
512         (WebCore::DatabaseTracker::origins):
513         (WebCore::DatabaseTracker::databaseNamesForOrigin):
514         (WebCore::DatabaseTracker::addDatabase):
515         (WebCore::DatabaseTracker::deleteAllDatabases):
516         (WebCore::DatabaseTracker::deleteAllDatabasesForOrigin):
517         * storage/DatabaseTracker.h: Added.
518
519         * storage/SQLCallback.h: Added. C++ version of the javascript executeSql() callback
520         (WebCore::SQLCallback::~SQLCallback):
521         * storage/SQLCallback.idl: Added.
522
523         * storage/SQLResultSet.cpp: Added. C++ version of the javascript SQLResultSet object
524         (WebCore::SQLResultSet::SQLResultSet):
525         (WebCore::SQLResultSet::insertId):
526         (WebCore::SQLResultSet::rowsAffected):
527         (WebCore::SQLResultSet::errorCode):
528         (WebCore::SQLResultSet::error):
529         (WebCore::SQLResultSet::rows):
530         (WebCore::SQLResultSet::setInsertId):
531         (WebCore::SQLResultSet::setRowsAffected):
532         (WebCore::SQLResultSet::setErrorCode):
533         (WebCore::SQLResultSet::setErrorMessage):
534         * storage/SQLResultSet.h: Added.
535         * storage/SQLResultSet.idl: Added.
536
537         * storage/SQLResultSetRowList.cpp: Added. C++ version of the javascript SQLResultSetRowList object
538         (WebCore::SQLResultSetRowList::length):
539         * storage/SQLResultSetRowList.h: Added.
540         (WebCore::SQLResultSetRowList::columnNames):
541         (WebCore::SQLResultSetRowList::values):
542         (WebCore::SQLResultSetRowList::addColumn):
543         (WebCore::SQLResultSetRowList::addResult):
544         * storage/SQLResultSetRowList.idl: Added.
545
546         * storage/VersionChangeCallback.h: Added. C++ version of the javascript changeVersion() callback
547         (WebCore::VersionChangeCallback::~VersionChangeCallback):
548         * storage/VersionChangeCallback.idl: Added.
549
550 2007-10-19  Brady Eidson <beidson@apple.com>
551
552         Reviewed by Oliver + Same
553
554         Forwarding header for the new wtf/Queue.h
555
556         * ForwardingHeaders/wtf/Queue.h: Added.
557
558 2007-10-19  Anders Carlsson <beidson@apple.com>
559
560         Reviewed by Sam Weinig
561
562         Most of the Javascript binding support for the Storage API
563
564         * bindings/js/JSCustomSQLCallback.cpp: Added.
565         (WebCore::JSCustomSQLCallback::JSCustomSQLCallback):
566         (WebCore::JSCustomSQLCallback::handleEvent):
567         * bindings/js/JSCustomSQLCallback.h: Added.
568                 Add JSCustomSQLCallback which is an SQLCallback implementation that dispatches
569                 handleEvent to a JS function or a JS object with a handleEvent function.
570
571         * bindings/js/JSCustomVersionChangeCallback.cpp: Added.
572         (WebCore::JSCustomVersionChangeCallback::JSCustomVersionChangeCallback):
573         (WebCore::JSCustomVersionChangeCallback::handleEvent):
574         * bindings/js/JSCustomVersionChangeCallback.h: Added.
575                 Add JSCustomSQLCallback which is an SQLCallback implementation that dispatches
576                 handleEvent to a JS function or a JS object with a handleEvent function.
577
578         * bindings/js/JSDatabaseCustom.cpp: Added.
579         (WebCore::JSDatabase::executeSql):
580                 Custom implementation of executeSql that takes an array of parameters.
581                 
582         (WebCore::JSDatabase::changeVersion):
583                 Custom implementation of changeVersion.
584                 
585         * bindings/js/JSSQLResultSetRowListCustom.cpp: Added.
586         (WebCore::JSSQLResultSetRowList::item):
587                 Custom method that returns a JS object that corresponds to a given row in the database.
588
589         * bindings/scripts/CodeGeneratorJS.pm:
590
591         * page/DOMWindow.cpp:
592         (WebCore::DOMWindow::openDatabase):
593         * page/DOMWindow.h:
594         * page/DOMWindow.idl:
595                 Add openDatabase implementation.
596
597 2007-10-19  Brady Eidson <beidson@apple.com>
598
599         Reviewed by Oliver
600
601         Added tons of utility to the FileSystem abstractions, including moving
602         some stuff over from IconDatabase
603
604         * platform/FileSystem.h:
605
606         * platform/cf/FileSystemCF.cpp: Added.
607         (WebCore::fileSystemRepresentation):
608
609         * platform/mac/FileSystemMac.mm:
610
611         * platform/posix/FileSystemPOSIX.cpp: Added.
612         (WebCore::fileExists):
613         (WebCore::deleteFile):
614         (WebCore::fileSize):
615         (WebCore::pathByAppendingComponent):
616         (WebCore::makeAllDirectories):
617
618 2007-10-19  Timothy Hatcher  <timothy@apple.com>
619
620         Reviewed by Adam Roben
621
622         Preliminary Web Inspector support for the Storage API
623         (This patch does not include the support artwork)
624
625         * page/InspectorController.cpp:
626         (WebCore::InspectorDatabaseResource::InspectorDatabaseResource):
627         (WebCore::InspectorDatabaseResource::setScriptObject):
628         (WebCore::databaseTableNames): Return the table names for a Database object.
629         (WebCore::InspectorController::setWindowVisible):
630         (WebCore::InspectorController::windowScriptObjectAvailable):
631         (WebCore::InspectorController::populateScriptResources):
632         (WebCore::InspectorController::addDatabaseScriptResource): Add the script object for the database.
633         (WebCore::InspectorController::removeDatabaseScriptResource): Remove the script object for the database.
634         (WebCore::InspectorController::clearDatabaseScriptResources): Remove all the database resources.
635         (WebCore::InspectorController::didCommitLoad): Call clearDatabaseScriptResources().
636         (WebCore::InspectorController::didOpenDatabase): Make a new InspectorDatabaseResource and add it to m_databaseResources.
637         * page/InspectorController.h:
638         * page/inspector/Database.js: Added.
639         * page/inspector/DatabasePanel.js: Added.
640         * page/inspector/ResourceCategory.js: Make resource categories assume less about the resource.
641         * page/inspector/inspector.css: Add styles for the database panel.
642         * page/inspector/inspector.html: Include DatabasePanel.js
643         * page/inspector/inspector.js: Support for adding and removing Database resources.
644
645 2007-10-19  Brady Eidson <beidson@apple.com>
646
647         Reviewed by Tim Hatcher
648
649         Added support for Chrome prompts required by the Storage API
650
651         * page/Chrome.cpp:
652         (WebCore::Chrome::runDatabaseSizeLimitPrompt):
653         * page/Chrome.h:
654         * page/ChromeClient.h:
655         * platform/graphics/svg/SVGImageEmptyClients.h:
656
657 2007-10-19  Brady Eidson <beidson@apple.com>
658
659         Contributions and Review by Anders
660
661         Various SQLite tweaks in preparation for the storage API
662
663         * loader/icon/SQLDatabase.cpp:
664         (WebCore::SQLDatabase::~SQLDatabase):
665         (WebCore::SQLDatabase::authorizerFunction): Static callback from sqlite for authorizer functions
666         (WebCore::SQLDatabase::setAuthorizer):
667         (WebCore::SQLDatabase::lock):
668         (WebCore::SQLDatabase::unlock):
669         * loader/icon/SQLDatabase.h:
670
671         * loader/icon/SQLStatement.cpp:
672         (WebCore::SQLStatement::prepare): Switch to prepare16_v2
673         (WebCore::SQLStatement::bindDouble): Added
674         (WebCore::SQLStatement::bindValue): Bind a wrapped SQLValue object (described later)
675         (WebCore::SQLStatement::bindParameterCount): Accessor to the sqlite3 API for validating statements
676         * loader/icon/SQLStatement.h:
677         (WebCore::SQLStatement::isPrepared):
678
679         * platform/sql/SQLAuthorizer.cpp: Added.  Fully virtual interface to implement your own SQLite authorizer
680         * platform/sql/SQLAuthorizer.h: Added.
681         (WebCore::SQLAuthorizer::~SQLAuthorizer):
682         (WebCore::SQLAuthorizer::createTable):
683         (WebCore::SQLAuthorizer::createTempTable):
684         (WebCore::SQLAuthorizer::dropTable):
685         (WebCore::SQLAuthorizer::dropTempTable):
686         (WebCore::SQLAuthorizer::allowAlterTable):
687         (WebCore::SQLAuthorizer::createIndex):
688         (WebCore::SQLAuthorizer::createTempIndex):
689         (WebCore::SQLAuthorizer::dropIndex):
690         (WebCore::SQLAuthorizer::dropTempIndex):
691         (WebCore::SQLAuthorizer::createTrigger):
692         (WebCore::SQLAuthorizer::createTempTrigger):
693         (WebCore::SQLAuthorizer::dropTrigger):
694         (WebCore::SQLAuthorizer::dropTempTrigger):
695         (WebCore::SQLAuthorizer::createView):
696         (WebCore::SQLAuthorizer::createTempView):
697         (WebCore::SQLAuthorizer::dropView):
698         (WebCore::SQLAuthorizer::dropTempView):
699         (WebCore::SQLAuthorizer::createVTable):
700         (WebCore::SQLAuthorizer::dropVTable):
701         (WebCore::SQLAuthorizer::allowDelete):
702         (WebCore::SQLAuthorizer::allowInsert):
703         (WebCore::SQLAuthorizer::allowUpdate):
704         (WebCore::SQLAuthorizer::allowTransaction):
705         (WebCore::SQLAuthorizer::allowSelect):
706         (WebCore::SQLAuthorizer::allowRead):
707         (WebCore::SQLAuthorizer::allowAttach):
708         (WebCore::SQLAuthorizer::allowDetach):
709         (WebCore::SQLAuthorizer::allowReindex):
710         (WebCore::SQLAuthorizer::allowAnalyze):
711         (WebCore::SQLAuthorizer::allowFunction):
712
713         * platform/sql/SQLValue.cpp: Added.  Contains a value for a SQLite database that can be one of a few types.  
714           For now, just a String or a double
715         (WebCore::SQLValue::SQLValue):
716         (WebCore::SQLValue::string):
717         (WebCore::SQLValue::number):
718         * platform/sql/SQLValue.h: Added.
719         (WebCore::SQLValue::):
720         (WebCore::SQLValue::SQLValue):
721         (WebCore::SQLValue::type):
722
723 2007-10-19  Brady Eidson <beidson@apple.com>
724
725         Reviewed by Maciej
726
727         Changed IconDatabase over to use new FileSystem apis
728
729         * loader/icon/IconDatabase.cpp:
730         (WebCore::IconDatabase::open):
731
732 2007-10-19  David Hyatt  <hyatt@apple.com>
733
734         Fix for ebay parser crash.
735
736         Reviewed by Beth
737
738         fast/invalid/table-residual-style-crash.html added as a test
739
740         * html/HTMLParser.cpp:
741         (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks):
742
743 2007-10-19  Sam Weinig  <sam@webkit.org>
744
745         Fix Windows, Qt and GTK builds.
746
747         * WebCore.pro:
748         * WebCore.vcproj/WebCore.vcproj:
749
750 2007-10-19  Sam Weinig  <sam@webkit.org>
751
752         Reviewed by Darin.
753
754         Encapsulate the same origin check into the new SecurityOrigin class.
755
756         * WebCore.xcodeproj/project.pbxproj:
757         * bindings/js/kjs_window.cpp:
758         (KJS::Window::isSafeScript):
759         * dom/Document.cpp:
760         (WebCore::Document::Document):
761         (WebCore::Document::defaultEventHandler):
762         * dom/Document.h:
763         (WebCore::Document::securityOrigin):
764         * loader/FrameLoader.cpp:
765         (WebCore::FrameLoader::begin):
766         (WebCore::FrameLoader::setOpener):
767         * loader/FrameLoader.h:
768         * platform/SecurityOrigin.cpp: Added.
769         (WebCore::SecurityOrigin::SecurityOrigin):
770         (WebCore::SecurityOrigin::clear):
771         (WebCore::SecurityOrigin::isEmpty):
772         (WebCore::SecurityOrigin::setForFrame):
773         (WebCore::SecurityOrigin::setDomainFromDOM):
774         (WebCore::SecurityOrigin::allowsAccessFrom):
775         (WebCore::SecurityOrigin::isSecureTransitionTo):
776         * platform/SecurityOrigin.h: Added.
777
778 2007-10-19  Simon Hausmann  <hausmann@kde.org>
779
780         Fix the Qt/Windows build: Added missing FontSelector.h include.
781
782         * platform/qt/FontQt.cpp:
783
784 2007-10-19  Simon Hausmann  <hausmann@kde.org>
785
786         Reviewed by Lars.
787
788         Qt/Windows build fix: Threading.h uses int32_t but doesn't include stdint.h.
789
790         * platform/Threading.h:
791
792 2007-10-19  Simon Hausmann  <hausmann@kde.org>
793
794         Reviewed by Lars.
795
796         Fix the Qt/Windows build, don't use cat but use the perl print trick
797         instead.
798
799         * WebCore.pro:
800
801 2007-10-18  Justin Garcia  <justin.garcia@apple.com>
802
803         Reviewed by Kevin McCullough.
804
805         <rdar://problem/5483526> 
806         GoogleDocs: A hang occurs when applying list styling to a selection containing a table and line breaks
807
808         * editing/TextIterator.cpp:
809         (WebCore::TextIterator::exitNode): For selection preservation, we must emit a character
810         between every VisiblePosition.  We weren't emitting a space after some tables, because
811         we won't try to emit a space if shouldEmitNewlineAFterNode is true, even if no newline
812         was emitted.
813
814 2007-10-18  Dan Bernstein  <dan.bernstein@apple.com>
815
816         Reviewed by Adam Roben.
817
818         - fix <rdar://problem/5313523>
819         REGRESSION(Leopard): http/tests/incremental/slow-utf8-text.pl fails on Leopard
820
821         * platform/network/mac/ResourceResponseMac.mm:
822         (WebCore::ResourceResponse::doUpdateResourceResponse): Work around
823         <rdar://problem/5321972> by testing for the case of a response
824         with a MIME type of application/octet-stream and a Content-Type header
825         starting with text/plain and setting the MIME type to text/plain in
826         that case.
827
828 2007-10-18  Mark Rowe  <mrowe@apple.com>
829
830         Fix the no-SVG build.
831
832         * css/CSSPrimitiveValueMappings.h: Move the CSSPrimitiveValue implementations for
833         LineCap, LineJoin and WindRule inside #if ENABLE(SVG).
834
835 2007-10-18  Darin Adler  <darin@apple.com>
836
837         Reviewed by Anders.
838
839         - some small tweaks to the threading implementation
840
841         I had trouble building on Windows. Either the problem went away by itself
842         or one of these changes fixed it.
843
844         * platform/Threading.h: Eliminated the use of friend, and shared a single
845         declaration for the initializeThreading function.
846
847         * platform/pthreads/ThreadingPthreads.cpp: (WebCore::ThreadCondition::wait):
848         Call impl() here.
849
850         * platform/win/ThreadingWin.cpp: Got rid of two globals here with static
851         constructors. Also added a typedef for the type of the function queue.
852         (WebCore::functionQueueMutex): Added function.
853         (WebCore::functionQueue): Ditto.
854         (WebCore::callFunctionsOnMainThread): Use functions instead of using the
855         globals directly.
856         (WebCore::callOnMainThread): Ditto.
857
858         * css/CSSParser.cpp: Had to touch this file to make things build.
859
860 2007-10-18  Adam Roben  <aroben@apple.com>
861
862         Fix <rdar://5547462> Need to copy Inspector resources in Production builds
863
864         I also added an excludes file for the xcopy command to avoid copying
865         .svn folders.
866
867         Reviewed by Geoff.
868
869         * WebCore.vcproj/WebCore.make: Make sure we copy the Inspector
870         resources.
871         * WebCore.vcproj/WebCore.vcproj: Pass /exclude:xcopy.excludes to
872         xcopy.
873         * WebCore.vcproj/xcopy.excludes: Added.
874
875 2007-10-18  Darin Adler  <darin@apple.com>
876
877         Reviewed by Sam.
878
879         - fix http://bugs.webkit.org/show_bug.cgi?id=15541
880           REGRESSION (r26616): prompt with one argument uses the literal "undefined" as default reply
881
882         * page/DOMWindow.idl: Add ConvertUndefinedOrNullToNullString back for defaultValue.
883
884 2007-10-18  Nikolas Zimmermann  <zimmermann@kde.org>
885
886         Build fix. Not reviewed.
887
888         Hopefully fix win build by including wtf/MathExtras.h.
889
890         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
891
892 2007-10-18  Dan Bernstein  <dan.bernstein@apple.com>
893
894         Reviewed by Nikolas Zimmermann.
895
896         - fix http://bugs.webkit.org/show_bug.cgi?id=15367
897           Assertion failure inspecting a document including soft hyphen code (0xad)
898
899         Test: fast/text/word-break-soft-hyphen.html
900
901         * rendering/RenderText.cpp:
902         (WebCore::RenderText::calcPrefWidths): Changed to treat soft hyphens as 
903         word boundaries. This fixes the bug and is consistent with the fact that
904         run rounding does occur at soft hyphens.
905
906 2007-10-18  Nikolas Zimmermann  <zimmermann@kde.org>
907
908         Reviewed by Anders.
909
910         Fix last layout test failure seen on buildbot "trunk-mac-ppc-release".
911         Problem: "svg/custom/mask-excessive-malloc.svg -> crashed"
912
913         Clamp any ImageBuffer allocation within SVG to the RenderView's visibleSize
914         to avoid excessive mallocs (in the testcase above 1000000x1000000)
915
916         * ksvg2/svg/SVGMaskElement.cpp:
917         (WebCore::SVGMaskElement::drawMaskerContent):
918         * ksvg2/svg/SVGPatternElement.cpp:
919         (WebCore::SVGPatternElement::buildPattern):
920         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
921         (WebCore::SVGPaintServerGradient::teardown):
922         (WebCore::SVGPaintServerGradient::setup):
923         * platform/graphics/svg/cg/SVGResourceMaskerCg.mm:
924         (WebCore::SVGResourceMasker::applyMask):
925         * rendering/SVGRenderSupport.cpp:
926         (WebCore::clampImageBufferSizeToViewport):
927         * rendering/SVGRenderSupport.h:
928
929 2007-10-18  Alexey Proskuryakov  <ap@webkit.org>
930
931         Windows build fix.
932
933         * css/CSSStyleSelector.cpp:
934         (WebCore::CSSStyleSelector::applyProperty): Add braces around cases that have local variables now.
935
936 2007-10-18  Alexey Proskuryakov  <ap@webkit.org>
937
938         Release build fix.
939
940         * css/CSSStyleSelector.cpp:
941         (WebCore::CSSStyleSelector::applyProperty): 
942
943 2007-10-18  Alexey Proskuryakov  <ap@webkit.org>
944
945         Reviewed by Darin.
946
947         Split most of CSSPrimitiveValue enum mapping out of CSSComputedStyleDeclaration::getPropertyCSSValue()
948         and CSSStyleSelector::applyProperty() (and their SVG counterparts). This should make the code more readable.
949
950         * WebCore.xcodeproj/project.pbxproj:
951         * css/CSSComputedStyleDeclaration.cpp:
952         (WebCore::getPositionOffsetValue):
953         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
954         * css/CSSPrimitiveValue.cpp:
955         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
956         (WebCore::CSSPrimitiveValue::init):
957         * css/CSSPrimitiveValue.h:
958         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
959         * css/CSSPrimitiveValueMappings.h: Added.
960         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
961         (WebCore::CSSPrimitiveValue::operator EBorderStyle):
962         (WebCore::CSSPrimitiveValue::operator CompositeOperator):
963         (WebCore::CSSPrimitiveValue::operator EAppearance):
964         (WebCore::CSSPrimitiveValue::operator EBackgroundBox):
965         (WebCore::CSSPrimitiveValue::operator EBackgroundRepeat):
966         (WebCore::CSSPrimitiveValue::operator EBoxAlignment):
967         (WebCore::CSSPrimitiveValue::operator EBoxDirection):
968         (WebCore::CSSPrimitiveValue::operator EBoxLines):
969         (WebCore::CSSPrimitiveValue::operator EBoxOrient):
970         (WebCore::CSSPrimitiveValue::operator ECaptionSide):
971         (WebCore::CSSPrimitiveValue::operator EClear):
972         (WebCore::CSSPrimitiveValue::operator ECursor):
973         (WebCore::CSSPrimitiveValue::operator EDisplay):
974         (WebCore::CSSPrimitiveValue::operator EEmptyCell):
975         (WebCore::CSSPrimitiveValue::operator EFloat):
976         (WebCore::CSSPrimitiveValue::operator EKHTMLLineBreak):
977         (WebCore::CSSPrimitiveValue::operator EListStylePosition):
978         (WebCore::CSSPrimitiveValue::operator EListStyleType):
979         (WebCore::CSSPrimitiveValue::operator EMarginCollapse):
980         (WebCore::CSSPrimitiveValue::operator EMarqueeBehavior):
981         (WebCore::CSSPrimitiveValue::operator EMarqueeDirection):
982         (WebCore::CSSPrimitiveValue::operator EMatchNearestMailBlockquoteColor):
983         (WebCore::CSSPrimitiveValue::operator ENBSPMode):
984         (WebCore::CSSPrimitiveValue::operator EOverflow):
985         (WebCore::CSSPrimitiveValue::operator EPageBreak):
986         (WebCore::CSSPrimitiveValue::operator EPosition):
987         (WebCore::CSSPrimitiveValue::operator EResize):
988         (WebCore::CSSPrimitiveValue::operator ETableLayout):
989         (WebCore::CSSPrimitiveValue::operator ETextAlign):
990         (WebCore::CSSPrimitiveValue::operator ETextSecurity):
991         (WebCore::CSSPrimitiveValue::operator ETextTransform):
992         (WebCore::CSSPrimitiveValue::operator EUnicodeBidi):
993         (WebCore::CSSPrimitiveValue::operator EUserDrag):
994         (WebCore::CSSPrimitiveValue::operator EUserModify):
995         (WebCore::CSSPrimitiveValue::operator EUserSelect):
996         (WebCore::CSSPrimitiveValue::operator EVisibility):
997         (WebCore::CSSPrimitiveValue::operator EWhiteSpace):
998         (WebCore::CSSPrimitiveValue::operator EWordBreak):
999         (WebCore::CSSPrimitiveValue::operator EWordWrap):
1000         (WebCore::CSSPrimitiveValue::operator LineCap):
1001         (WebCore::CSSPrimitiveValue::operator LineJoin):
1002         (WebCore::CSSPrimitiveValue::operator TextDirection):
1003         (WebCore::CSSPrimitiveValue::operator WindRule):
1004         (WebCore::CSSPrimitiveValue::operator EAlignmentBaseline):
1005         (WebCore::CSSPrimitiveValue::operator EColorInterpolation):
1006         (WebCore::CSSPrimitiveValue::operator EColorRendering):
1007         (WebCore::CSSPrimitiveValue::operator EDominantBaseline):
1008         (WebCore::CSSPrimitiveValue::operator EImageRendering):
1009         (WebCore::CSSPrimitiveValue::operator EPointerEvents):
1010         (WebCore::CSSPrimitiveValue::operator EShapeRendering):
1011         (WebCore::CSSPrimitiveValue::operator ETextAnchor):
1012         (WebCore::CSSPrimitiveValue::operator ETextRendering):
1013         (WebCore::CSSPrimitiveValue::operator EWritingMode):
1014         * css/CSSStyleSelector.cpp:
1015         (WebCore::CSSStyleSelector::checkSelector):
1016         (WebCore::CSSStyleSelector::checkOneSelector):
1017         (WebCore::CSSRuleSet::addRulesFromSheet):
1018         (WebCore::convertToLength):
1019         (WebCore::CSSStyleSelector::applyDeclarations):
1020         (WebCore::CSSStyleSelector::applyProperty):
1021         (WebCore::CSSStyleSelector::mapBackgroundAttachment):
1022         (WebCore::CSSStyleSelector::mapBackgroundClip):
1023         (WebCore::CSSStyleSelector::mapBackgroundComposite):
1024         (WebCore::CSSStyleSelector::mapBackgroundOrigin):
1025         (WebCore::CSSStyleSelector::mapBackgroundRepeat):
1026         (WebCore::CSSStyleSelector::mapBackgroundXPosition):
1027         (WebCore::CSSStyleSelector::mapBackgroundYPosition):
1028         * ksvg2/css/SVGCSSComputedStyleDeclaration.cpp:
1029         (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue):
1030         * ksvg2/css/SVGCSSStyleSelector.cpp:
1031         (WebCore::CSSStyleSelector::applySVGProperty):
1032
1033 2007-10-18  Eric Seidel  <eric@webkit.org>
1034
1035         Reviewed by Maciej.
1036
1037         Fix crashers in SVGViewSpec::parseViewSpec
1038         http://bugs.webkit.org/show_bug.cgi?id=15504
1039
1040         Test is blocked by bug 15503, landed as:
1041         * svg/dom/viewspec-parser.html-disabled
1042
1043         * bindings/scripts/CodeGeneratorObjC.pm: support classes where all parents are interfaces
1044         * ksvg2/svg/SVGViewSpec.cpp:
1045         (WebCore::SVGViewSpec::parseViewSpec):
1046         * ksvg2/svg/SVGViewSpec.idl: Added.
1047
1048 2007-10-17  Rob Buis  <buis@kde.org>
1049
1050         Reviewed by Darin, Adam, and Maciej.
1051
1052         http://bugs.webkit.org/show_bug.cgi?id=12988
1053         First element (in document order) is not returned when other duplicate ID-ed elements were created first
1054
1055         Reset the element id cache when an id is added and there is a duplicate for that id.
1056
1057         * dom/Document.cpp:
1058         (WebCore::Document::addElementById):
1059
1060 2007-10-17  Mark Rowe  <mrowe@apple.com>
1061
1062         Mac build fix.
1063
1064         * Configurations/WebCore.xcconfig:  Make it possible to include CoreGraphics header files.
1065
1066 2007-10-17  Adam Roben  <aroben@apple.com>
1067
1068         Fix an ASSERT on launch on Windows
1069
1070         Fix dictated to me by Brady.
1071
1072         * loader/icon/IconDatabase.cpp:
1073         (WebCore::IconDatabase::syncThreadMainLoop): Make sure we hold
1074         m_syncLock before going into the loop.
1075
1076 2007-10-17  Adam Roben  <aroben@apple.com>
1077
1078         Windows build fix
1079
1080         Reviewed by NOBODY.
1081
1082         * platform/graphics/AffineTransform.h: Don't #include
1083         ApplicationServices.h.
1084         * platform/graphics/cg/GraphicsContextCG.cpp: Add an #include that's
1085         needed now that we're not #including ApplicationServices.h.
1086
1087 2007-10-17  Mark Rowe  <mrowe@apple.com>
1088
1089         Gtk build fix.  Move non-pthread stubs from Threading.h to ThreadingNone.cpp to prevent
1090         multiple-definition link errors.
1091
1092         * WebCore.pro:
1093         * platform/Threading.h:
1094         * platform/ThreadingNone.cpp: Added.
1095         (WebCore::createThread):
1096         (WebCore::waitForThreadCompletion):
1097         (WebCore::detachThread):
1098         (WebCore::Mutex::Mutex):
1099         (WebCore::Mutex::~Mutex):
1100         (WebCore::Mutex::lock):
1101         (WebCore::Mutex::tryLock):
1102         (WebCore::Mutex::unlock):
1103         (WebCore::ThreadCondition::ThreadCondition):
1104
1105 2007-10-17  Anders Carlsson  <andersca@apple.com>
1106
1107         Reviewed by Oliver.
1108
1109         * WebCore.xcodeproj/project.pbxproj:
1110         * WebCore.vcproj/WebCore.vcproj:
1111         
1112         * config.h:
1113         #define USE_PTHREADS on Windows.
1114         
1115         * loader/icon/IconDatabase.cpp:
1116         (WebCore::IconDatabase::getOrCreateIconRecord):
1117         (WebCore::IconDatabase::getOrCreatePageURLRecord):
1118         Update for mutex changes.
1119         
1120         * platform/Threading.h:
1121         (WebCore::):
1122         (WebCore::ThreadSafeShared::ThreadSafeShared):
1123         (WebCore::ThreadSafeShared::ref):
1124         (WebCore::ThreadSafeShared::deref):
1125         (WebCore::ThreadSafeShared::hasOneRef):
1126         (WebCore::ThreadSafeShared::refCount):
1127         (WebCore::ThreadSafeShared::isThreadSafe):
1128         Add a new Shared base class that uses a mutex to manage its refcount.
1129         
1130         (WebCore::createThread):
1131         (WebCore::waitForThreadCompletion):
1132         (WebCore::detachThread):
1133         New functions for thread creation.
1134         
1135         (WebCore::Mutex::Mutex):
1136         (WebCore::Mutex::~Mutex):
1137         (WebCore::Mutex::lock):
1138         (WebCore::Mutex::tryLock):
1139         (WebCore::Mutex::unlock):
1140         Move the definitions to ThreadingPthreads.cpp
1141         
1142         (WebCore::ThreadCondition::ThreadCondition):
1143         (WebCore::ThreadCondition::~ThreadCondition):
1144         (WebCore::ThreadCondition::wait):
1145         (WebCore::ThreadCondition::signal):
1146         (WebCore::ThreadCondition::broadcast):
1147         Move the definitions to ThreadingPthreads.cpp
1148         
1149         * platform/pthreads: Added.
1150         * platform/pthreads/ThreadingPthreads.cpp: Added.
1151         Add pthread specific implementation of the thread creation functions, Mutex and ThreadCondition.
1152
1153 2007-10-17  David Hyatt  <hyatt@apple.com>
1154
1155         Add support for creating a layer when a transform is in effect.  Add support to RenderStyle for
1156         handing back a computed AffineTransform.
1157
1158         Reviewed by Mitz Pettel
1159
1160         * css/CSSStyleSelector.cpp:
1161         (WebCore::CSSStyleSelector::adjustRenderStyle):
1162         * rendering/RenderBox.cpp:
1163         (WebCore::RenderBox::setStyle):
1164         * rendering/RenderObject.cpp:
1165         (WebCore::RenderObject::RenderObject):
1166         (WebCore::RenderObject::requiresLayer):
1167         (WebCore::RenderObject::setStyle):
1168         * rendering/RenderObject.h:
1169         (WebCore::RenderObject::hasTransform):
1170         (WebCore::RenderObject::setHasTransform):
1171         * rendering/RenderStyle.cpp:
1172         (WebCore::RenderStyle::applyTransform):
1173         * rendering/RenderStyle.h:
1174         (WebCore::RenderStyle::hasTransform):
1175         * rendering/RenderTableCell.cpp:
1176         (WebCore::RenderTableCell::requiresLayer):
1177         * rendering/RenderTableRow.h:
1178         (WebCore::RenderTableRow::requiresLayer):
1179
1180 2007-10-17  David Hyatt  <hyatt@apple.com>
1181
1182         Add support for mapping of the transform CSS property into RenderStyles.  Everything is now ready for the front
1183         end to use.
1184
1185         Reviewed by Mitz Pettel
1186
1187         * WebCore.xcodeproj/project.pbxproj:
1188         * css/CSSStyleSelector.cpp:
1189         (WebCore::CSSStyleSelector::applyProperty):
1190         * css/CSSTransformValue.h:
1191         (WebCore::CSSTransformValue::type):
1192         (WebCore::CSSTransformValue::values):
1193         * platform/graphics/AffineTransform.cpp:
1194         (WebCore::AffineTransform::skew):
1195         * platform/graphics/AffineTransform.h:
1196         * rendering/RenderStyle.cpp:
1197         (WebCore::StyleTransformData::StyleTransformData):
1198         (WebCore::StyleTransformData::operator==):
1199         (WebCore::StyleTransformData::transformDataEquivalent):
1200         * rendering/RenderStyle.h:
1201         (WebCore::TransformOperation::~TransformOperation):
1202         (WebCore::TransformOperation::operator!=):
1203         (WebCore::TransformOperation::isScaleOperation):
1204         (WebCore::TransformOperation::isRotateOperation):
1205         (WebCore::TransformOperation::isSkewOperation):
1206         (WebCore::TransformOperation::isTranslateOperation):
1207         (WebCore::TransformOperation::isMatrixOperation):
1208         (WebCore::ScaleTransformOperation::ScaleTransformOperation):
1209         (WebCore::ScaleTransformOperation::isScaleOperation):
1210         (WebCore::ScaleTransformOperation::operator==):
1211         (WebCore::ScaleTransformOperation::apply):
1212         (WebCore::RotateTransformOperation::RotateTransformOperation):
1213         (WebCore::RotateTransformOperation::isRotateOperation):
1214         (WebCore::RotateTransformOperation::operator==):
1215         (WebCore::RotateTransformOperation::apply):
1216         (WebCore::SkewTransformOperation::SkewTransformOperation):
1217         (WebCore::SkewTransformOperation::isSkewOperation):
1218         (WebCore::SkewTransformOperation::operator==):
1219         (WebCore::SkewTransformOperation::apply):
1220         (WebCore::TranslateTransformOperation::TranslateTransformOperation):
1221         (WebCore::TranslateTransformOperation::isTranslateOperation):
1222         (WebCore::TranslateTransformOperation::operator==):
1223         (WebCore::TranslateTransformOperation::apply):
1224         (WebCore::MatrixTransformOperation::MatrixTransformOperation):
1225         (WebCore::MatrixTransformOperation::isMatrixOperation):
1226         (WebCore::MatrixTransformOperation::operator==):
1227         (WebCore::MatrixTransformOperation::apply):
1228         (WebCore::StyleTransformData::operator!=):
1229         (WebCore::RenderStyle::transform):
1230         (WebCore::RenderStyle::setTransform):
1231         (WebCore::RenderStyle::initialTransform):
1232
1233 2007-10-17  Adam Roben  <aroben@apple.com>
1234
1235         * page/Frame.cpp: I had to touch this file when fixing the Windows
1236         build. Checking it in in case it helps others, too.
1237
1238 2007-10-17  Eric Seidel  <eric@webkit.org>
1239
1240         Reviewed by Mark Rowe.
1241         
1242         Remove a couple more uses of svg_dynamic_cast.
1243
1244         No functional changes, no tests.
1245
1246         * ksvg2/svg/SVGPatternElement.cpp:
1247         (WebCore::SVGPatternElement::buildPattern):
1248
1249 2007-10-17  Mark Rowe  <mrowe@apple.com>
1250
1251         Reviewed by Eric and Geoff.
1252
1253         <rdar://problem/5453743> Repro ASSERT in CachedResource::setEncodedSize() loading image in background tab
1254         http://bugs.webkit.org/show_bug.cgi?id=15191
1255
1256         * loader/DocLoader.cpp:
1257         (WebCore::DocLoader::setAutoLoadImages): Don't start a load if the CachedImage is already loading.
1258
1259 2007-10-17  Justin Garcia  <justin.garcia@apple.com>
1260
1261         Reviewed by Harrison.
1262         
1263         <rdar://problem/5481523> 
1264         GoogleDocs: Safari hangs when indenting a particular table twice
1265         
1266         Fixed by fixing problems with the selection preservation done by IndentOutdentCommand.
1267         It is now more difficult to create selections that cause hangs.  Those are covered by:
1268         <rdar://problem/5543472>
1269
1270         * editing/IndentOutdentCommand.cpp:
1271         (WebCore::indexForVisiblePosition): Compute indices from the first VisiblePosition
1272         in the document, instead of the first Position.
1273         Use rangeCompliantEquivalents when creating the Range that we pass to rangeLength.
1274         Tell TextIterator::rangeLength that we're doing selection preservation, so that it
1275         will emit characters between all VisiblePositions.
1276         (WebCore::IndentOutdentCommand::indentRegion): Fixed a bug where the range and location
1277         passed to rangeFromLocationAndLength were reversed.
1278         Tell rangeFromLocationAndLength that we're doing doing selection preservation, as
1279         above.
1280         * editing/TextIterator.cpp:
1281         (WebCore::CharacterIterator::CharacterIterator): 
1282         (WebCore::TextIterator::rangeLength): Rename emitSpacesForReplacedElements
1283         to forSelectionPreservation, to match the name of the boolean inside TextIterator and
1284         to match its meaning after r25522.
1285         (WebCore::TextIterator::rangeFromLocationAndLength): Ditto.
1286
1287 2007-10-16  Darin Adler  <darin@apple.com>
1288
1289         Reviewed by Mitz.
1290
1291         - fix http://bugs.webkit.org/show_bug.cgi?id=15536
1292           need to cache missing glyph so we're not slow on pages that show missing glyphs
1293
1294         - <rdar://problem/5404359> UI thread stall (>60sec) in MLANG running stress test
1295           (related to font data caching)
1296
1297         * platform/Font.cpp: (WebCore::Font::glyphDataForCharacter): Check for a null value
1298         for fontData rather than for glyph to detect non-cached entries in the glyph data.
1299
1300         * platform/gtk/GlyphPageTreeNodeGtk.cpp: (WebCore::GlyphPage::fill):
1301         * platform/mac/GlyphPageTreeNodeMac.cpp: (WebCore::GlyphPage::fill):
1302         * platform/win/GlyphPageTreeNodeWin.cpp: (WebCore::GlyphPage::fill):
1303         Set fontData to 0 for missing glyph entries. Also fixed the Windows and GTK versions
1304         to return the proper value for haveGlyphs.
1305
1306 2007-10-16  Mark Rowe  <mrowe@apple.com>
1307
1308         Gtk build fix.  Replace use of assert with ASSERT_NOT_REACHED.
1309
1310         * platform/gtk/FontCacheGtk.cpp:
1311         (WebCore::FontCache::platformInit):
1312
1313 2007-10-16  Darin Adler  <darin@apple.com>
1314
1315         Reviewed by Adam.
1316
1317         - fix http://bugs.webkit.org/show_bug.cgi?id=15534
1318           WebScriptObject.h has some formatting and editorial mistakes
1319
1320         * bindings/objc/WebScriptObject.h: Fix wording and formatting.
1321
1322 2007-10-16  Darin Adler  <darin@apple.com>
1323
1324         - try to fix the Qt build
1325
1326         * config.h: Don't use DisallowCType.h, since it's incompatible with some C++ headers
1327         that are used in some Qt-specific source files.
1328
1329 2007-10-16  Darin Adler  <darin@apple.com>
1330
1331         Reviewed by Adele.
1332
1333         - fix http://bugs.webkit.org/show_bug.cgi?id=15525
1334           transpose (control-T) should do the last two characters on a line if at end of line
1335         - remove unused CommandByName class
1336         - move transpose command implementation here from Mac OS X WebKit
1337
1338         * editing/Editor.h:
1339         * editing/Editor.cpp:
1340         (WebCore::execTranspose): Added.
1341         (WebCore::Editor::transpose): Added. This has the transpose implementation from
1342         WebCoreFrameBridge and WebHTMLView, translated into WebCore-style C++ and with
1343         a special case for the end of a paragraph.
1344
1345         * page/Frame.h: Removed unused command() function member.
1346         * page/FramePrivate.h: Removed unused m_command data member.
1347         * page/Frame.cpp: Ditto.
1348
1349         * page/mac/WebCoreFrameBridge.h: Removed rangeOfCharactersAroundCaret method.
1350         * page/mac/WebCoreFrameBridge.mm: Ditto.
1351
1352         * WebCore.pro: Removed CommandByName.h/cpp.
1353         * WebCore.vcproj/WebCore.vcproj: Ditto.
1354         * WebCore.xcodeproj/project.pbxproj: Ditto.
1355
1356         * editing/CommandByName.cpp: Removed.
1357         * editing/CommandByName.h: Removed.
1358
1359 2007-10-16  Darin Adler  <darin@apple.com>
1360
1361         Reviewed by Maciej and Geoff (and looked over by Eric).
1362
1363         - http://bugs.webkit.org/show_bug.cgi?id=15519
1364           eliminate use of <ctype.h> for processing ASCII
1365
1366         * ForwardingHeaders/wtf/ASCIICType.h: Added.
1367         * ForwardingHeaders/wtf/DisallowCType.h: Added.
1368
1369         * WebCorePrefix.h: Get rid of inclusion of <ctype.h>.
1370         * config.h: Include DisallowCType.h.
1371
1372         * css/CSSParser.cpp:
1373         (WebCore::ParseString::lower):
1374         * css/CSSPrimitiveValue.cpp:
1375         (WebCore::isCSSTokenizerIdentifier):
1376         * css/CSSStyleDeclaration.cpp:
1377         (WebCore::propertyID):
1378         * html/HTMLSelectElement.cpp:
1379         (WebCore::stripLeadingWhiteSpace):
1380         * html/HTMLTokenizer.cpp:
1381         (WebCore::tagMatch):
1382         * loader/FTPDirectoryParser.cpp:
1383         (WebCore::parseOneFTPLine):
1384         * loader/TextResourceDecoder.cpp:
1385         (WebCore::TextResourceDecoder::checkForHeadCharset):
1386         * platform/DeprecatedCString.cpp:
1387         (WebCore::DeprecatedCString::lower):
1388         (WebCore::DeprecatedCString::upper):
1389         (WebCore::DeprecatedCString::find):
1390         (WebCore::DeprecatedCString::contains):
1391         * platform/DeprecatedString.cpp:
1392         (WebCore::equalCaseInsensitive):
1393         (WebCore::isCharacterAllowedInBase):
1394         (WebCore::DeprecatedString::find):
1395         (WebCore::DeprecatedString::contains):
1396         (WebCore::toIntegralType):
1397         * platform/DeprecatedString.h:
1398         (WebCore::DeprecatedChar::isSpace):
1399         (WebCore::DeprecatedChar::lower):
1400         (WebCore::DeprecatedChar::upper):
1401         * platform/KURL.cpp:
1402         (WebCore::KURL::parse):
1403         * platform/StringImpl.cpp:
1404         (WebCore::isSpace):
1405         (WebCore::StringImpl::containsOnlyWhitespace):
1406         (WebCore::StringImpl::isLower):
1407         (WebCore::StringImpl::lower):
1408         (WebCore::StringImpl::find):
1409         (WebCore::StringImpl::reverseFind):
1410         (WebCore::equalIgnoringCase):
1411         * platform/TextEncodingRegistry.cpp:
1412         (WebCore::TextEncodingNameHash::equal):
1413         (WebCore::TextEncodingNameHash::hash):
1414         (WebCore::atomicCanonicalTextEncodingName):
1415         * platform/mac/KeyEventMac.mm:
1416         (WebCore::keyIdentifierForKeyEvent):
1417         * platform/win/KeyEventWin.cpp:
1418         (WebCore::keyIdentifierForWindowsKeyCode):
1419         * platform/win/PopupMenuWin.cpp:
1420         (WebCore::isASCIIPrintable):
1421         (WebCore::PopupWndProc):
1422         * plugins/win/PluginViewWin.cpp:
1423         (WebCore::capitalizeRFC822HeaderFieldName):
1424         * rendering/RenderText.cpp:
1425         (WebCore::RenderText::widthFromCache):
1426         Use ASCIICType.h functions instead of ctype.h ones.
1427
1428 2007-10-16  Mitz Pettel  <mitz@webkit.org>
1429
1430         Reviewed by Dave Hyatt.
1431
1432         - fix http://bugs.webkit.org/show_bug.cgi?id=15296
1433           REGRESSION (r19716-r19719): width not specified for <marquee> tag is causing the alignment issue.
1434
1435         Test: fast/block/float/marquee-shrink-to-avoid-floats.html
1436
1437         * rendering/RenderObject.cpp:
1438         (WebCore::RenderObject::shrinkToAvoidFloats): Changed to return 'true' for <marquee>s with auto width.
1439
1440 2007-10-16  Beth Dakin  <bdakin@apple.com>
1441
1442         Reviewed by Darin.
1443
1444         Fix for <rdar://problem/5517118> REGRESSION: 9A570 - Safari renders 
1445         Amazon seller page way too small
1446
1447         The font size at Amazon was way too small because the calls to 
1448         getComputedStyle and getPropertyValue did not cause the div to 
1449         attach because there was a pending stylesheet. The fix is to call 
1450         updateLayoutIgnorePendingStylesheets() instead of just 
1451         updateLayout().
1452
1453         * css/CSSComputedStyleDeclaration.cpp:
1454         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1455
1456 2007-10-16  David Hyatt  <hyatt@apple.com>
1457
1458         Get transform-origin(x/y) mapped into the front end RenderStyle.  Adds a new StyleTransformData struct that
1459         holds transform-origin (and that will also eventually hold the parsed transform operations as well).
1460
1461         Reviewed by Beth
1462
1463         * css/CSSStyleSelector.cpp:
1464         (WebCore::CSSStyleSelector::applyProperty):
1465         * rendering/RenderStyle.cpp:
1466         (WebCore::StyleTransformData::StyleTransformData):
1467         (WebCore::StyleTransformData::operator==):
1468         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1469         (WebCore::StyleRareNonInheritedData::operator==):
1470         (WebCore::RenderStyle::RenderStyle):
1471         (WebCore::RenderStyle::diff):
1472         * rendering/RenderStyle.h:
1473         (WebCore::StyleTransformData::operator!=):
1474         (WebCore::RenderStyle::transformOriginX):
1475         (WebCore::RenderStyle::transformOriginY):
1476         (WebCore::RenderStyle::setTransformOriginX):
1477         (WebCore::RenderStyle::setTransformOriginY):
1478         (WebCore::RenderStyle::initialTransformOriginX):
1479         (WebCore::RenderStyle::initialTransformOriginY):
1480
1481 2007-10-16  Adele Peterson  <adele@apple.com>
1482
1483         Reviewed by Alice.
1484
1485         Fix for <rdar://problem/5538793> REGRESSION: Failing layout test: fast/forms/select-change-listbox-to-popup.html (due to landing feature branch)
1486
1487         * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::parseMappedAttribute):  When switching between types of select elements, call setRecalcListItems
1488           since recalcListItems updates the default selection in different ways for the different controls. 
1489
1490 2007-10-16  Alice Liu  <alice.liu@apple.com>
1491
1492         rubber-stamped by Darin.
1493
1494         flipping my previous fix around so that mac is special-cased instead of win.
1495
1496         * dom/Document.cpp:
1497         (WebCore::Document::defaultEventHandler):
1498
1499 2007-10-16  David Hyatt  <hyatt@apple.com>
1500
1501         Clean up transform parsing.  Fix a crash, ditch the extra parse context class, and use RefPtr/PassRefPtr more
1502         to simplify the code.
1503
1504         Reviewed by aroben
1505
1506         * css/CSSParser.cpp:
1507         (WebCore::CSSParser::parseValue):
1508         (WebCore::CSSParser::parseTransform):
1509         * css/CSSParser.h:
1510
1511 2007-10-16  Alice Liu  <alice.liu@apple.com>
1512
1513         Reviewed by Adele.
1514
1515         fixed <rdar://5085596> Accesskeys don't work
1516         
1517         * dom/Document.cpp:
1518         (WebCore::Document::defaultEventHandler):
1519         accesskey modifier is platform-depedent.
1520
1521 2007-10-15  Mark Rowe  <mrowe@apple.com>
1522
1523         Reviewed by John.
1524
1525         <rdar://problem/5494040> Reproducible assertion failure in WebCore::IconDatabase::iconForPageURL
1526
1527         A race condition between icon database import and Safari asking for an icon for the empty URL
1528         was resulting in a PageURLRecord being created for a URL that can never be retained.  By enforcing
1529         that PageURLRecord's cannot be created for the empty URL we can prevent the assertion from failing.
1530
1531         * loader/icon/IconDatabase.cpp:
1532         (WebCore::IconDatabase::iconForPageURL):
1533         (WebCore::IconDatabase::getOrCreatePageURLRecord): Bail out early if the URL is empty.
1534         (WebCore::IconDatabase::performURLImport): Don't create the PageURLRecord if the URL is empty.
1535
1536 2007-10-15  Jon Honeycutt  <jhoneycutt@apple.com>
1537
1538         Reviewed by Ollie.
1539
1540         Use OwnPtr for m_deliveryData, and fix a bug where we were memmove()ing
1541         over m_deliveryData instead of its data buffer
1542
1543         * plugins/win/PluginStreamWin.cpp:
1544         (WebCore::PluginStreamWin::~PluginStreamWin): Don't delete
1545         m_deliveryData
1546         (WebCore::PluginStreamWin::deliverData): Fix memmove() call
1547         (WebCore::PluginStreamWin::didReceiveData): Assign using OwnPtr::set()
1548         * plugins/win/PluginStreamWin.h: Use OwnPtr
1549
1550 2007-10-15  Steve Falkenburg  <sfalken@apple.com>
1551
1552         Reviewed by Oliver.
1553
1554         Add missing null check.
1555
1556         * platform/network/cf/AuthenticationCF.cpp:
1557         (WebCore::core):
1558
1559 2007-10-15  Mark Rowe  <mrowe@apple.com>
1560
1561         Fix the no-SVG build again.  Add new transform CSS properties to the switch statements.
1562
1563         * css/CSSComputedStyleDeclaration.cpp:
1564         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1565         * css/CSSStyleSelector.cpp:
1566         (WebCore::CSSStyleSelector::applyProperty):
1567
1568 2007-10-15  Darin Adler  <darin@apple.com>
1569
1570         Reviewed by Mitz.
1571
1572         - http://bugs.webkit.org/show_bug.cgi?id=15518
1573           Remove the unused attemptFontSubstitution feature and do some
1574           cleanup of glyphDataForCharacter.
1575
1576         * platform/Font.h:
1577         * platform/Font.cpp:
1578         (WebCore::WidthIterator::advance): Eliminated uneeded attemptFontSubstitution
1579         and cluster parameters to the glyphDataForCharacter function.
1580         (WebCore::Font::glyphDataForCharacter): Removed the cluster parameter and
1581         attemptFontSubstitution parameter. Removed the isUpper check before calling
1582         toUpper in the small caps code path. Split up the inner loop into separate
1583         copies for non-small-caps and small caps. Broke out the system fallback
1584         page handling so it's not inside the loop. Changed system fallback so it uses
1585         the character and breaks it up into UTF-16 as needed, instead of using a
1586         passed-in "character cluster".
1587
1588         * platform/TextStyle.h:
1589         (WebCore::TextStyle::TextStyle): Removed attemptFontSubstitution.
1590         (WebCore::TextStyle::applyWordRounding): Ditto.
1591
1592 2007-10-15  Jon Honeycutt  <jhoneycutt@apple.com>
1593
1594         Reviewed by Ollie.
1595
1596         Remove an operator precedence warning on Windows
1597
1598         * editing/markup.cpp:
1599         (WebCore::escapeContentText): Use (a) | (b)
1600         (WebCore::appendEscapedContent): Use (a) | (b)
1601
1602 2007-10-15  Kevin McCullough  <kmccullough@apple.com>
1603
1604         Reviewed by Darin.
1605
1606         - <rdar://problem/5238818> window.resizeTo doesn't restrict the resized window to the size of the screen
1607         - Now we take the doc into account when resizing.
1608         - Also I found an issue where we would resize to outside the window, because
1609           the resize would be smaller than the window size but the location of the
1610           window would make the resize go off-screen. Now we move the window back into the screen.
1611
1612         * bindings/js/kjs_window.cpp:
1613         (KJS::adjustWindowRect):
1614         (KJS::WindowFunc::callAsFunction):
1615
1616 2007-10-15  Jon Honeycutt  <jhoneycutt@apple.com>
1617
1618         Reviewed by Anders.
1619
1620         <rdar://5510700> Repro crash loading embedded Windows Media Player
1621         content
1622
1623         Anders noticed that the older Windows Media Player plugin (npdsplay.dll)
1624         will crash if it receives its resource requests out of order, whereas we
1625         were immediately fulfilling untargeted, non-JavaScript requests and
1626         scheduling targeted or JavaScript resource requests. Implement his
1627         suggested fix, which is to schedule PluginRequests for all resource
1628         requests 
1629
1630         * plugins/win/PluginViewWin.cpp:
1631         (WebCore::getString):
1632         (WebCore::PluginViewWin::performRequest): If this non-JavaScript request
1633         has no target, create a stream for it
1634         (WebCore::PluginViewWin::load): Schedule PluginRequests for all resource
1635         requests
1636
1637 2007-10-15  Mark Rowe  <mrowe@apple.com>
1638
1639         Gtk and Qt build fix.  Add new .cpp file to project.
1640
1641         * WebCore.pro:
1642
1643 2007-10-15  John Sullivan  <sullivan@apple.com>
1644
1645         * platform/mac/FontDataMac.mm:
1646         D'oh! Added missing #import to fix build
1647
1648 2007-10-15  John Sullivan  <sullivan@apple.com>
1649
1650         Reviewed by Geoff
1651
1652         * platform/mac/FontDataMac.mm:
1653         (WebCore::FontData::smallCapsFontData):
1654         replace NS_DURING/NS_HANDLER with WebCore-style BEGIN/END_BLOCK_OBJC_EXCEPTIONS
1655
1656 2007-10-15  David Hyatt  <hyatt@apple.com>
1657
1658         The CSS WG has been discussing the concept of rotation.  In the latest draft specification, two properties
1659         have been introduced: rotation and rotation-point.  I believe these properties should be generalized to
1660         allow for arbitrary transformations (e.g., translation, skew, rotate, scale).
1661
1662         This patch adds support for the back-end parsing of two new CSS properties: transform and transform-origin.
1663         They are directly analogous to the properties specified by the CSS WG, except that they are designed to allow
1664         for arbitrary affine transforms rather than just rotation.
1665
1666         Reviewed by Beth Dakin
1667
1668         * WebCore.xcodeproj/project.pbxproj:
1669         * WebCore.vcproj/WebCore.vcproj:
1670         * css/CSSComputedStyleDeclaration.cpp:
1671         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1672         * css/CSSParser.cpp:
1673         (WebCore::CSSParser::parseValue):
1674         (WebCore::TransformParseContext:::m_list):
1675         (WebCore::TransformParseContext::list):
1676         (WebCore::TransformParseContext::failed):
1677         (WebCore::TransformParseContext::addValue):
1678         (WebCore::TransformOperationInfo::TransformOperationInfo):
1679         (WebCore::TransformOperationInfo::type):
1680         (WebCore::TransformOperationInfo::argCount):
1681         (WebCore::TransformOperationInfo::unit):
1682         (WebCore::TransformOperationInfo::unknown):
1683         (WebCore::TransformOperationInfo::hasCorrectArgCount):
1684         (WebCore::CSSParser::parseTransform):
1685         (WebCore::CSSParser::parseTransformOrigin):
1686         * css/CSSParser.h:
1687         * css/CSSPropertyNames.in:
1688         * css/CSSTransformValue.cpp: Added.
1689         (WebCore::CSSTransformValue::CSSTransformValue):
1690         (WebCore::CSSTransformValue::~CSSTransformValue):
1691         (WebCore::CSSTransformValue::addValue):
1692         (WebCore::CSSTransformValue::cssText):
1693         * css/CSSTransformValue.h: Added.
1694         (WebCore::CSSTransformValue::):
1695
1696 2007-10-15  Mark Rowe  <mrowe@apple.com>
1697
1698         Reviewed by Oliver.
1699
1700         Fix the no-SVG build.
1701
1702         * DerivedSources.make: Use the correct file as input to generate CSSPropertyNames.h.
1703         * rendering/RenderObject.cpp:
1704         (WebCore::objectIsRelayoutBoundary):
1705
1706 2007-10-15  Darin Adler  <darin@apple.com>
1707
1708         Reviewed by Sam.
1709
1710         - fix http://bugs.webkit.org/show_bug.cgi?id=15520
1711           alert(undefined) should say "undefined" in the alert
1712
1713         Test: fast/dom/Window/alert-undefined.html
1714
1715         * page/DOMWindow.idl: Remove ConvertUndefinedOrNullToNullString from alert, confirm, and prompt.
1716         It turns out that the default behavior is what the other browsers do (browsers tested: IE 7,
1717         Firefox 2).
1718
1719 2007-10-15  Adele Peterson  <adele@apple.com>
1720
1721         Reviewed by Darin.
1722
1723         Fix for http://bugs.webkit.org/show_bug.cgi?id=15252
1724         <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
1725
1726         * rendering/RenderListBox.cpp: (WebCore::RenderListBox::calcHeight): If the scrollbar is disabled, make sure the scroll offset gets reset to 0.  In general,
1727           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.
1728
1729 2007-10-15  Jon Honeycutt  <jhoneycutt@apple.com>
1730
1731         Reviewed by Maciej.
1732
1733         Return a more appropriate error from NPN_RequestRange, which is
1734         currently unimplemented
1735
1736         * plugins/win/npapi.cpp: return NPERR_STREAM_NOT_SEEKABLE 
1737         (NPN_RequestRead):
1738
1739 2007-10-15  Jon Honeycutt  <jhoneycutt@apple.com>
1740
1741         Reviewed by Maciej.
1742
1743         Add a missing function pointer to the m_browserFuncs structure
1744
1745         * plugins/win/PluginPackageWin.cpp:
1746         (WebCore::PluginPackageWin::load):
1747
1748 2007-10-15  Simon Hausmann  <hausmann@kde.org>
1749
1750         Reviewed by Lars.
1751
1752         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.
1753
1754         * WebCore.pro:
1755         * loader/CachedFont.cpp:
1756         * platform/qt/FontCacheQt.cpp: Removed.
1757         * platform/qt/FontCustomPlatformData.cpp: Removed.
1758         * platform/qt/FontCustomPlatformData.h: Removed.
1759         * platform/qt/FontDataQt.cpp: Removed.
1760         * platform/qt/FontPlatformData.h: Removed.
1761         * platform/qt/FontQt.cpp:
1762         * platform/qt/GlyphPageTreeNodeQt.cpp: Removed.
1763
1764 2007-10-15  Simon Hausmann  <hausmann@kde.org>
1765
1766         Reviewed by Lars.
1767
1768         Adapt to the latest API changes in the SVG API/Code.
1769
1770         * platform/graphics/svg/qt/RenderPathQt.cpp:
1771         (WebCore::RenderPath::strokeContains):
1772         (WebCore::getPathStroke):
1773         * platform/graphics/svg/qt/SVGPaintServerQt.cpp:
1774         (WebCore::SVGPaintServer::setPenProperties):
1775         * platform/graphics/svg/qt/SVGResourceMaskerQt.cpp:
1776
1777 2007-10-14  Nikolas Zimmermann  <zimmermann@kde.org>
1778
1779         Reviewed by Eric.
1780
1781         Fix bad abstraction in ImageBuffer class.
1782         While the class itself is platform-aware and thus it's location in platform/graphics
1783         is fine, it contains the "renderSubtreeToImage" method which operates on RenderObject.
1784
1785         As it's SVG specific I decided to move this method into SVGRenderSupport, to avoid
1786         implicit platform/ <-> rendering/ dependencies.
1787
1788         * WebCore.pro:
1789         * WebCore.vcproj/WebCore.vcproj:
1790         * WebCore.xcodeproj/project.pbxproj:
1791         * ksvg2/svg/SVGMaskElement.cpp:
1792         (WebCore::SVGMaskElement::drawMaskerContent):
1793         * ksvg2/svg/SVGPatternElement.cpp:
1794         (WebCore::SVGPatternElement::buildPattern):
1795         * platform/graphics/ImageBuffer.cpp: Removed.
1796         * platform/graphics/ImageBuffer.h:
1797         (WebCore::ImageBuffer::size):
1798         * platform/graphics/svg/SVGImage.cpp:
1799         (WebCore::SVGImage::nativeImageForCurrentFrame):
1800         * rendering/SVGRenderSupport.cpp:
1801         (WebCore::renderSubtreeToImage):
1802         * rendering/SVGRenderSupport.h:
1803
1804 2007-10-14  Peter Kasting  <zerodpx@gmail.com>
1805
1806         Reviewed by Maciej.
1807
1808         http://bugs.webkit.org/show_bug.cgi?id=15210
1809         Draw the image outline even for broken images.
1810
1811         * rendering/RenderImage.cpp:
1812         (WebCore::RenderImage::paint):
1813
1814 2007-10-14  Kevin Ollivier  <kevino@theolliviers.com>
1815
1816         Reviewed by Adam.
1817
1818         Add support for MSVC7, and fix cases where PLATFORM(WIN) should
1819         be PLATFORM(WIN_OS) for other ports building on Windows.
1820
1821         * dom/XMLTokenizer.cpp:
1822         * page/FrameTree.cpp:
1823         * platform/StaticConstructors.h:
1824         * platform/String.cpp:
1825
1826 2007-10-14  Maxime Britto  <mbritto@pleyo.com>
1827
1828         Reviewed by Mitz.
1829
1830         Fix an error in the goBackOrForward() function : confusion between forwardListCount and backListCount.
1831         http://bugs.webkit.org/show_bug.cgi?id=15212
1832
1833         * loader/FrameLoader.cpp:
1834         (WebCore::FrameLoader::goBackOrForward):
1835
1836 2007-10-14  Mitz Pettel  <mitz@webkit.org>
1837
1838         Reviewed by Darin.
1839
1840         - fix http://bugs.webkit.org/show_bug.cgi?id=15181
1841           text-transform: uppercase not working in input (submit, reset, button) elements
1842           <rdar://problem/5474647>
1843
1844         Test: fast/forms/button-text-transform.html
1845
1846         Text transformations require access to the original text. The button's inner
1847         text was an anonymous RenderText, meaning it did not have a node to retrieve
1848         the original text from. The patch fixes this by changing the inner text into a
1849         RenderTextFragment, which stores its own original text.
1850
1851         * rendering/RenderButton.cpp:
1852         (WebCore::RenderButton::setText):
1853         * rendering/RenderButton.h:
1854
1855 2007-10-14  Eric Seidel  <eric@webkit.org>
1856
1857         Reviewed by Maciej.
1858
1859         REGRESSION: Javascript bug in getElementsByName
1860         http://bugs.webkit.org/show_bug.cgi?id=15274
1861
1862         Test: fast/dom/getelementbyname-invalidation.html
1863
1864         * dom/NameNodeList.h: remove empty rootNodeChildrenChanged override
1865
1866 2007-10-14  Mitz Pettel  <mitz@webkit.org>
1867
1868         Reviewed by Maciej.
1869
1870         - http://bugs.webkit.org/show_bug.cgi?id=15303
1871           Remove now-redundant code to restore dialog arguments after clear
1872
1873         This patch reverts the kjs_window.* parts of r25576 because following
1874         r25783, window properties, including dialog arguments, are not cleared
1875         when the newly created modal dialog transitions to the document.
1876
1877         * bindings/js/kjs_window.cpp:
1878         (KJS::WindowPrivate::WindowPrivate):
1879         (KJS::createWindow):
1880         (KJS::showModalDialog):
1881         (KJS::Window::clear):
1882         (KJS::WindowFunc::callAsFunction):
1883         (KJS::Window::setReturnValueSlot):
1884         * bindings/js/kjs_window.h:
1885
1886 2007-10-14  Mitz Pettel  <mitz@webkit.org>
1887
1888         Reviewed by Dave Hyatt.
1889
1890         - fix http://bugs.webkit.org/show_bug.cgi?id=15309
1891           <rdar://problem/5512020> Crash due to infinite recursion in RenderTable::addChild
1892
1893         Test: fast/table/generated-caption.html
1894
1895         * rendering/RenderTable.cpp:
1896         (WebCore::RenderTable::addChild): Changed to make sure that the child is
1897         not added into generated after content. Also made adding a child before
1898         a table caption work correctly instead of adding the child after the caption.
1899
1900 2007-10-14  Peter Kasting  <zerodpx@gmail.com>
1901
1902         Reviewed by Maciej.
1903
1904         http://bugs.webkit.org/show_bug.cgi?id=15141
1905         Feed GIF reader data from the point in the stream it expects.  Also,
1906         mirror the reader's failure state up to the wrapping decoder.
1907
1908         * platform/image-decoders/gif/GIFImageReader.cpp:
1909         (GIFImageReader::read):
1910
1911 2007-10-14  Peter Kasting  <zerodpx@gmail.com>
1912
1913         Reviewed by Maciej.
1914
1915         http://bugs.webkit.org/show_bug.cgi?id=15142
1916         Return correct frame count in GIFImageDecoder::frameBufferAtIndex(),
1917         even if more data has arrived since the last decoding pass.
1918
1919         * platform/image-decoders/gif/GIFImageDecoder.cpp:
1920         (WebCore::GIFImageDecoder::frameBufferAtIndex):
1921
1922 == Rolled over to ChangeLog-2007-10-14 ==