2008-02-13 Rodney Dawes <dobey@wayofthemonkey.com>
[WebKit-https.git] / WebCore / ChangeLog
1 2008-02-13  Rodney Dawes  <dobey@wayofthemonkey.com>
2
3         Fix Bug 17220: Illogical dependency between PluginView and
4         PluginDatabase
5         
6         <http://bugs.webkit.org/show_bug.cgi?id=17220>
7
8         Reviewed by Adam and Darin.
9
10         Rename PluginDatabase::createPluginView to PluginView::create, to make
11         the illogical dependency between the two, logical
12         Make PluginDatabase::findPlugin a public method
13         Update the includes in PluginView and PluginDatabase for the change
14
15         * plugins/PluginDatabase.h:
16         * plugins/PluginView.h:
17         * plugins/win/PluginDatabaseWin.cpp:
18         * plugins/win/PluginViewWin.cpp:
19
20 2008-02-13  Adam Roben  <aroben@apple.com>
21
22         Build fix
23
24         * platform/graphics/cg/GraphicsContextCG.cpp: Added missing #include.
25
26 2008-02-13  Matt Lilek  <webkit@mattlilek.com>
27
28         Not reviewed, build fix.
29
30         * platform/graphics/cg/GraphicsContextCG.cpp:
31         (WebCore::GraphicsContext::paintBuffer):
32
33 2008-02-13  Darin Adler  <darin@apple.com>
34
35         - try to fix Wx build
36
37         * platform/graphics/wx/GraphicsContextWx.cpp:
38         (WebCore::GraphicsContext::paintBuffer): Added.
39
40         * platform/graphics/cairo/GraphicsContextCairo.cpp:
41         (WebCore::GraphicsContext::paintBuffer): Added missing paintingDisabled() check.
42         * platform/graphics/cg/GraphicsContextCG.cpp:
43         (WebCore::GraphicsContext::paintBuffer): Ditto.
44         * platform/graphics/qt/GraphicsContextQt.cpp:
45         (WebCore::GraphicsContext::paintBuffer): Ditto.
46
47 2008-02-13  Darin Adler  <darin@apple.com>
48
49         - try to fix Wx build
50
51         * platform/wx/LocalizedStringsWx.cpp: Add missing include.
52
53 2008-02-11  Darin Adler  <darin@apple.com>
54
55         - roll out fix for <rdar://problem/5726016> REGRESSION: Xcode News window renders
56           incorrectly due to visibility fix
57
58         Removed the Xcode-specific quirk at the request of some folks on the Xcode team.
59
60         * WebCore.base.exp: Rolled out change.
61         * css/CSSMutableStyleDeclaration.cpp:
62         (WebCore::CSSMutableStyleDeclaration::setProperty): Ditto.
63         * page/Settings.cpp:
64         (WebCore::Settings::Settings): Ditto. But keep the initialization of
65         m_fontRenderingMode.
66         (WebCore::Settings::setNeedsXcodeVisibilityQuirk): Removed.
67         * page/Settings.h:
68         (WebCore::Settings::needsXcodeVisibilityQuirk): Removed.
69
70 2008-02-13  Alexey Proskuryakov  <ap@webkit.org>
71
72         Reviewed by Darin.
73
74         <rdar://problem/5740042> Database termination issues
75
76         Test: storage/close-during-stress-test.html
77
78         * dom/Document.cpp:
79         (WebCore::Document::databaseThread):
80         * dom/Document.h:
81         Don't re-create the database thread if it has been already terminated.
82
83         * storage/Database.h: (WebCore::Database::document): Changed m_database to a RefPtr to avoid
84         having a hanging reference.
85
86         * storage/DatabaseThread.cpp:
87         (WebCore::DatabaseThread::requestTermination):
88
89         * storage/SQLTransaction.cpp: (WebCore::SQLTransaction::~SQLTransaction): Removed logging.
90         Transactions are deleted during GC, so it's usually not importatnt to know when it happens.
91
92 2008-02-12  Bernhard Rosenkraenzer  <bero@arklinux.org>
93
94         Reviewed by Darin.
95
96         - fix http://bugs.webkit.org/show_bug.cgi?id=17340
97           WebCore/platform/Timer.cpp fails to build with gcc 4.3
98
99         * platform/Timer.cpp: Add include of <limits.h> since this file uses UINT_MAX.
100
101 2008-02-12  Timothy Hatcher  <timothy@apple.com>
102
103         Reviewed by Brady Eidson.
104
105         <rdar://problem/5652560> Can't delete database if the website that
106         uses it has been opened in this session
107
108         Close the Database on the database thread before deleting the file.
109         Tested and works on Windows and Mac.
110
111         * platform/sql/SQLiteDatabase.cpp:
112         (WebCore::SQLiteDatabase::close): Assert we are on the opening thread.
113         * storage/Database.cpp:
114         (WebCore::Database::markAsDeletedAndClose): Unschedule any pending
115         Database tasks, and start and imediate DatabaseCloseTask.
116         (WebCore::Database::close): Close the SQLDatabase.
117         * storage/Database.h: Renamed markAsDeleted to markAsDeletedAndClose.
118         * storage/DatabaseTask.cpp:
119         (WebCore::DatabaseCloseTask::DatabaseCloseTask): New task.
120         (WebCore::DatabaseCloseTask::doPerformTask): Call close on the Database.
121         (WebCore::DatabaseCloseTask::debugTaskName): Return "DatabaseCloseTask".
122         * storage/DatabaseTask.h: Add DatabaseCloseTask.
123         * storage/DatabaseTracker.cpp:
124         (WebCore::DatabaseTracker::deleteDatabaseFile): Call the renamed
125           markAsDeletedAndClose.
126
127 2008-02-12  Oliver Hunt  <oliver@apple.com>
128
129         Reviewed by NOBODY (Build fix).
130
131         Endeavour to fix qt and gtk builds
132
133         * platform/graphics/cairo/GraphicsContextCairo.cpp:
134         * platform/graphics/qt/GraphicsContextQt.cpp:
135
136 2008-02-12  Oliver Hunt  <oliver@apple.com>
137
138         Reviewed by Eric S.
139
140         Bug 17269: Deobfuscate CanvasRenderingContext2D.cpp
141         Remove ifdef's from canvas paint code
142
143         By making GraphicsContext aware of the crossplatform ImageBuffer
144         type we can migrate the ifdef-ified paint code in HTMLCanvasElement
145         into platform implementations of GraphicsContext.
146
147         * html/HTMLCanvasElement.cpp:
148         (WebCore::HTMLCanvasElement::paint):
149         * platform/graphics/GraphicsContext.h:
150         * platform/graphics/cairo/GraphicsContextCairo.cpp:
151         (WebCore::GraphicsContext::paintBuffer):
152         * platform/graphics/cg/GraphicsContextCG.cpp:
153         (WebCore::GraphicsContext::paintBuffer):
154         * platform/graphics/qt/GraphicsContextQt.cpp:
155         (WebCore::GraphicsContext::paintBuffer):
156
157 2008-02-12  Brady Eidson  <beidson@apple.com>
158
159         Reviewed by Darin Adler
160
161         Fix for <rdar://problem/5737692> - Database API needs to support SuccessCallback
162
163         Layout tests will come shortly with a mess of DRT changes
164
165         * platform/SecurityOrigin.cpp:
166         (WebCore::SecurityOrigin::SecurityOrigin): Standardize on "empty string" instead of null string
167           as different paths of constructing a SecurityOrigin were causing different hashes for the "same"
168           SecurityOrigin
169
170         * storage/Database.cpp:
171         (WebCore::Database::changeVersion): Pass in the successCallback
172         (WebCore::Database::transaction): Ditto
173
174         * storage/SQLTransaction.cpp:
175         (WebCore::SQLTransaction::SQLTransaction):
176         (WebCore::SQLTransaction::debugStepName):
177         (WebCore::SQLTransaction::performNextStep): Update ASSERTs for the new valid steps
178         (WebCore::SQLTransaction::performPendingCallback): Ditto
179         (WebCore::SQLTransaction::postflightAndCommit): Schedule the success callback if it exists - otherwise
180           skip straight to cleanupAfterSuccessCallback()
181         (WebCore::SQLTransaction::deliverSuccessCallback): Deliver success callback on the main thread, then
182           schedule cleanupAfterSuccessCallback()
183         (WebCore::SQLTransaction::cleanupAfterSuccessCallback): Cleanup and end the transaction
184         (WebCore::SQLTransaction::handleTransactionError):
185         (WebCore::SQLTransaction::deliverTransactionErrorCallback):
186         (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback):
187         * storage/SQLTransaction.h:
188
189 2008-02-12  Steve Falkenburg  <sfalken@apple.com>
190
191         Changes to support merged MIDL output.
192         
193         All COM interfaces are now generated to WebKit.h.
194         
195         Reviewed by Sam, Ada.
196
197         * bindings/scripts/CodeGeneratorCOM.pm:
198
199 2008-02-12  Dan Bernstein  <mitz@apple.com>
200
201         Reviewed by Adam Roben.
202
203         - fix http://bugs.webkit.org/show_bug.cgi?id=17041
204           <rdar://problem/5709660> Eastern Asian fonts do not display without specific box in Control Panel
205
206         Revised the system fallback font lookup logic to use MLang font linking
207         again. To avoid reintroducing bug 16548 and <rdar://problem/5280188>,
208         for CJK characters, try linking based on a single code page at a time,
209         starting with the user's default code page (if it is one of the CJK
210         code pages) followed by the other CJK code pages in a prescribed order
211         that matches what Firefox does.
212
213         * platform/graphics/win/FontCacheWin.cpp:
214         (WebCore::getCJKCodePageMasks): Added. Returns the search order for CJK
215         code pages, with the user's default code page first.
216         (WebCore::currentFontContainsCharacter): Factored out of
217         getFontDataForCharacters().
218         (WebCore::createMLangFont): Ditto.
219         (WebCore::FontCache::getFontDataForCharacters):
220
221 2008-02-12  Rodney Dawes  <dobey@wayofthemonkey.com>
222
223         Reviewed by Alp Toker.
224
225         Add -DMAEMO_CHANGES when the hildon CONFIG option is specified
226         Add hildon-1 to PKGCONFIG when hildon CONFIG option is specified
227
228         * WebCore.pro:
229
230 2008-02-12  Dan Bernstein  <mitz@apple.com>
231
232         Reviewed by Timothy Hatcher.
233
234         - <rdar://problem/5738175> Remove workaround for <rdar://problem/5539388> from post-Tiger builds
235
236         * platform/graphics/cg/GraphicsContextCG.cpp:
237         (WebCore::GraphicsContext::setShadow):
238
239 2008-02-12  Brady Eidson  <beidson@apple.com>
240
241         Release build fix
242
243         * storage/DatabaseTask.cpp:
244
245 2008-02-12  Alexey Proskuryakov <ap@webkit.org> and Brady Eidson <beidson@apple.com>
246
247         Reviewed by Brady.
248
249         http://bugs.webkit.org/show_bug.cgi?id=17177
250         <rdar://problem/5729619> Storage tasks are getting lost
251
252         <rdar://problem/5729445> REGRESSION: Cannot schedule more than one transaction at a time
253
254         <rdar://problem/5729446> Major thread safety issue in Database code
255
256         * platform/MessageQueue.h: Added a thread-safe queue abstraction.
257
258         * WebCore.vcproj/WebCore.vcproj:
259         * WebCore.xcodeproj/project.pbxproj:
260         Added MessageQueue.h.
261
262         * dom/Document.cpp:
263         (WebCore::Document::~Document): Fixed a race condition resulting in a hanging reference.
264
265         * storage/Database.idl: Fixed parameter declarations to actually match implementation
266         (which is custom, so it got out of sync).
267
268         * storage/DatabaseTask.h:
269         (WebCore::DatabaseTask::database):
270         (WebCore::DatabaseTransactionTask::transaction):
271         Changed tasks to hold more information internally. Added helpers for better debug logging.
272
273         * storage/DatabaseTask.cpp:
274         (WebCore::DatabaseTask::DatabaseTask):
275         (WebCore::DatabaseTask::performTask):
276         (WebCore::DatabaseOpenTask::DatabaseOpenTask):
277         (WebCore::DatabaseOpenTask::doPerformTask):
278         (WebCore::DatabaseOpenTask::debugTaskName):
279         (WebCore::DatabaseTransactionTask::DatabaseTransactionTask):
280         (WebCore::DatabaseTransactionTask::~DatabaseTransactionTask):
281         (WebCore::DatabaseTransactionTask::doPerformTask):
282         (WebCore::DatabaseTransactionTask::debugTaskName):
283         (WebCore::DatabaseTableNamesTask::DatabaseTableNamesTask):
284         (WebCore::DatabaseTableNamesTask::doPerformTask):
285         (WebCore::DatabaseTableNamesTask::debugTaskName):
286         Implementation for the above.
287
288         (WebCore::DatabaseTask::lockForSynchronousScheduling):
289         (WebCore::DatabaseTask::waitForSynchronousCompletion):
290         Fixed a potential race condition: if the task completed before we entered a wait, we'd never
291         wake up. There was an assertion guarding against this, but no actual guarantee that I could see.
292
293         * storage/DatabaseThread.cpp:
294         (WebCore::DatabaseThread::DatabaseThread):
295         (WebCore::DatabaseThread::requestTermination):
296         (WebCore::DatabaseThread::databaseThread):
297         (WebCore::DatabaseThread::scheduleTask):
298         (WebCore::DatabaseThread::scheduleImmediateTask):
299         (WebCore::DatabaseThread::unscheduleDatabaseTasks):
300         * storage/DatabaseThread.h:
301         Changed to use MessageQueue.
302
303         * storage/Database.cpp:
304         (WebCore::guidMutex):
305         (WebCore::guidToVersionMap):
306         (WebCore::guidToDatabaseMap):
307         (WebCore::Database::openDatabase):
308         (WebCore::Database::Database):
309         (WebCore::Database::~Database):
310         (WebCore::Database::openAndVerifyVersion):
311         (WebCore::guidForOriginAndName):
312         (WebCore::Database::changeVersion):
313         (WebCore::Database::transaction):
314         (WebCore::Database::scheduleTransaction):
315         (WebCore::Database::scheduleTransactionStep):
316         (WebCore::Database::scheduleTransactionCallback):
317         (WebCore::Database::version):
318         (WebCore::Database::deliverPendingCallback):
319         (WebCore::Database::tableNames):
320         * storage/Database.h:
321         Changed m_transactionQueue to a MessageQueue.
322         Got rid of callback tracking - these can take care of themselves.
323         Got rid of a DatabaseThread member, as the Document can be asked for it.
324         Moved private static members and helpers out of the header.
325         Lost CurrentThreadSetter debug helper on the way. We may need to re-add something like that later.
326
327         * storage/SQLTransaction.h:
328         * storage/SQLTransaction.cpp: Added a lot of debug logging.
329         (WebCore::SQLTransaction::scheduleToRunStatements): Removed "m_currentStatement = 0" assignment,
330         as it created a race condition. Everything seems to work better without it, although a real fix
331         would be to get rid of this variable - it's evil shared data that isn't even protected in any way.
332
333         * manual-tests/database-threading-stress-test-2.html: Added.
334         * manual-tests/database-threading-stress-test.html: Added.
335
336 2008-02-12  Adam Roben  <aroben@apple.com>
337
338         Fix Bug 17328: REGRESSION (r30147): Inspector is unstyled on Windows
339
340         <http://bugs.webkit.org/show_bug.cgi?id=17328>
341         <rdar://5737946>
342
343         Reviewed by Mitz.
344
345         Test: fast/loader/local-css-allowed-in-strict-mode.html
346
347         * platform/network/cf/ResourceResponseCFNet.cpp:
348         (WebCore::ResourceResponse::doUpdateResourceResponse): Add a case for
349         .css files.
350
351 2008-02-12  Anders Carlsson  <andersca@apple.com>
352
353         Build fix.
354         
355         * loader/ImageDocument.cpp:
356
357 2008-02-12  Anders Carlsson  <andersca@apple.com>
358
359         Reviewed by Mitz.
360
361         Make the code that sets the image title cross platform.
362
363         * WebCore.xcodeproj/project.pbxproj:
364         Remove ImageDocumentMac.
365         
366         * loader/ImageDocument.cpp:
367         (WebCore::ImageTokenizer::finish):
368
369         * loader/mac/ImageDocumentMac.h: Removed.
370         * loader/mac/ImageDocumentMac.mm: Removed.
371         
372         * page/mac/WebCoreFrameBridge.h:
373         * page/mac/WebCoreViewFactory.h:
374         Move imageTitleForFilename:size from the bridge to
375         the view factory.
376         
377         * platform/LocalizedStrings.h:
378         Add imageTitle.
379         
380         * platform/mac/LocalizedStringsMac.mm:
381         (WebCore::imageTitle):
382         Have imageTitle call the view factory.
383         
384         * platform/qt/Localizations.cpp:
385         (WebCore::imageTitle):
386         * platform/wx/LocalizedStringsWx.cpp:
387         (WebCore::imageTitle):
388         * platform/gtk/LocalizedStringsGtk.cpp:
389         (WebCore::imageTitle):
390         Add stubs.
391         
392 2008-02-12  Oliver Hunt  <oliver@apple.com>
393
394         Reviewed by NOBODY (Build fix).
395
396         more Qt fixes
397
398         * html/HTMLCanvasElement.cpp:
399         (WebCore::HTMLCanvasElement::paint):
400
401 2008-02-12  Oliver Hunt  <oliver@apple.com>
402
403         Reviewed by NOBODY (Build fix).
404
405         And another attempt to fixerate Qt
406
407         * html/HTMLCanvasElement.cpp:
408         (WebCore::HTMLCanvasElement::paint):
409
410 2008-02-12  Oliver Hunt  <oliver@apple.com>
411
412         Reviewed by NOBODY (Build fix).
413
414         Attempt to fix Qt build
415
416         * html/HTMLCanvasElement.h:
417
418 2008-02-11  Oliver Hunt  <oliver@apple.com>
419
420         Reviewed by Alp Toker.
421
422         Make canvas use an ImageBuffer for its backing store
423
424         In order to make the canvas implementation less platform dependent
425         (and thus reduce the current quagmire of ifdefs) we now use an 
426         ImageBuffer to provide the backing buffer, an immediate consequence
427         of this is to remove multiple ifdefs in the construction of the
428         buffer.  This patch allows us to further reduce the platform
429         dependencies in later patches.
430
431
432         * html/CanvasRenderingContext2D.cpp:
433         (WebCore::CanvasRenderingContext2D::drawImage):
434         * html/HTMLCanvasElement.cpp:
435         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
436         (WebCore::HTMLCanvasElement::~HTMLCanvasElement):
437         (WebCore::HTMLCanvasElement::reset):
438         (WebCore::HTMLCanvasElement::paint):
439         (WebCore::HTMLCanvasElement::createDrawingContext):
440         (WebCore::HTMLCanvasElement::drawingContext):
441         (WebCore::HTMLCanvasElement::createPlatformImage):
442         * html/HTMLCanvasElement.h:
443
444 2008-02-11  Dan Bernstein  <mitz@apple.com>
445
446         Reviewed by Dave Hyatt.
447
448         - fix http://bugs.webkit.org/show_bug.cgi?id=17320
449           <rdar://problem/5736953> :last-child does not set the "uses sibling rules" flag
450
451         Test: fast/css/last-child-style-sharing.html
452
453         * css/CSSGrammar.y: Changed to call setUsesSiblingRules(true) for all
454         CSS3 selectors that require it.
455
456 2008-02-11  Sam Weinig  <sam@webkit.org>
457
458         Reviewed by Darin Adler.
459
460         Make the cross-domain security model more closely match Firefox by always returning the
461         native built-in functions when accessing functions cross-domain.
462
463         Fixes for:
464         <rdar://problem/5735497> Match Firefox's cross-domain model more accurately by return the built-in version of functions even if they have been overridden
465         <rdar://problem/5735443> Crash when setting the Window objects prototype to a custom Object and then calling a method on it
466
467         Tests: fast/dom/Window/window-custom-prototype-crash.html
468                fast/dom/Window/window-function-frame-getter-precedence.html
469                http/tests/security/cross-frame-access-get-override.html
470                http/tests/security/cross-frame-access-location-get-override.html
471                http/tests/security/cross-frame-access-location-get.html
472                http/tests/security/cross-frame-access-location-put.html
473
474         * bindings/js/JSDOMWindowCustom.cpp:
475         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
476         - Return the native-built in version of an cross-domain allowed function (eg. window.focus) whether or
477           not it has been overridden, instead of undefined.
478         - When doing findEntry lookup, use the the tables directly (JSDOMWindowPrototype::info.propHashTable) 
479           instead of calling the virtual classInfo() method to avoid the unnecessary overhead.
480         - Allow access to the native toString function cross-domain.  It always returns "[object Window]".
481         - Use the new nonCachingStaticFunctionGetter when return allowed functions cross-frame so that
482           the function an overridden function is not inadvertantly returned from the PropertyMap.\
483
484         * bindings/js/JSHistoryCustom.cpp:
485         (WebCore::JSHistory::customGetOwnPropertySlot):
486         - Implement the same model as described above for the History object, always returning the
487           native built-in function cross-domain.
488         - Allow access to the native toString function cross-domain.
489         - Clean up the code to make it clear that the custom functionality is only there for cross-domain
490           access.
491
492         * bindings/js/JSLocation.cpp:
493         (WebCore::JSLocation::getOwnPropertySlot):
494         - Match the generated classes by moving all the custom logic into a separate customGetOwnPropertySlot
495           function.  This will help moving to a generated class in the future.
496         (WebCore::JSLocation::customGetOwnPropertySlot):
497         - Implement the same model as described above for the Location object, always returning the
498           native built-in function cross-domain.
499         - Clean up the code to make it clear that the custom functionality is only there for cross-domain
500           access.
501         (WebCore::JSLocation::put):
502         (WebCore::JSLocation::deleteProperty):
503         (WebCore::JSLocation::getPropertyNames):
504         * bindings/js/JSLocation.h:
505         - Clean up to match the rest of the file a little better.
506
507         * bindings/js/kjs_binding.cpp:
508         (WebCore::allowsAccessFromFrame):
509         (WebCore::printErrorMessageForFrame):
510         (WebCore::nonCachingStaticFunctionGetter):
511         (WebCore::objectToStringFunctionGetter):
512         * bindings/js/kjs_binding.h:
513         - Put common functionality related to cross-domain access here to serve as a central shared point.
514           This includes moving and augmenting the allowsAccessFromFrame method that was in both JSHistoryCustom.cpp
515           and JSLocation.cpp.
516
517         * bindings/js/kjs_dom.cpp:
518         (WebCore::checkNodeSecurity):
519         - Use the new allowsAccessFromFrame method.
520
521         * bindings/js/kjs_window.cpp:
522         (KJS::Window::childFrameGetter): Cleanup.
523         (KJS::Window::namedItemGetter): Cleanup.
524         (KJS::Window::getOwnPropertySlot):
525         - Do the prototype lookup early to match Firefox in having function lookup have a higher precedence
526           than the index or shortcut name getters.
527         - Cleanup function to make it more understandable and slightly more efficient.
528         (KJS::Window::allowsAccessFrom):
529         - Add a new variant of this method that takes a reference to a String, which, on failure, will
530           contain the error message to print out.  The caller can then pass this to printErrorMessage.
531           This allows for code to check allowsAccessFrom and act on the result without printing out the
532           error message. For convenience, a version with out the String parameter has been left which 
533           prints out the message automatically.
534         (KJS::Window::printErrorMessage):
535         * bindings/js/kjs_window.h:
536
537 2008-02-11  Darin Adler  <darin@apple.com>
538
539         Reviewed by Mitz.
540
541         - fix <rdar://problem/5726016> REGRESSION: Xcode News window renders
542           incorrectly due to visibility fix
543
544         Added an Xcode-specific quirk.
545
546         * WebCore.base.exp: Added export for new Settings function.
547         * css/CSSMutableStyleDeclaration.cpp:
548         (WebCore::CSSMutableStyleDeclaration::setProperty): Here's the crazy quirk.
549         If you try to change the visibilty on a node with the class name tab_content,
550         instead it will use display:none.
551         * page/Settings.cpp:
552         (WebCore::Settings::Settings): Initialize m_needsXcodeVisibilityQuirk. Also
553         initialize m_fontRenderingMode! This seems like it was a bug before, but we
554         probably were getting lucky and always getting 0 on Windows, which is the
555         only place the setting matters.
556         (WebCore::Settings::setNeedsXcodeVisibilityQuirk): Added.
557         * page/Settings.h:
558         (WebCore::Settings::needsXcodeVisibilityQuirk): Added.
559
560 2008-02-11  Timothy Hatcher  <timothy@apple.com>
561
562         Reviewed by Brady Eidson.
563
564         <rdar://problem/5733069> Many m_quotaMap uses do not hold the m_quotaMapGuard
565
566         * storage/DatabaseTracker.cpp:
567         (WebCore::DatabaseTracker::hasEntryForOrigin): Hold m_quotaMapGuard when using m_quotaMap.
568         (WebCore::DatabaseTracker::origins): Ditto.
569         (WebCore::DatabaseTracker::setQuota): Ditto.
570         (WebCore::DatabaseTracker::deleteAllDatabases): Call origins() and itterate over the
571         origins to call deleteOrigin().
572         (WebCore::DatabaseTracker::deleteOrigin): Hold m_quotaMapGuard when using m_quotaMap.
573
574 2008-02-11  David Hyatt  <hyatt@apple.com>
575
576         Fix for bug 17286, crash accessing a null RenderStyle.  Add a simple null check.
577
578         Reviewed by aroben
579
580         Added fast/css/empty-generated-content.html
581
582         * css/CSSStyleSelector.cpp:
583         (WebCore::CSSStyleSelector::checkOneSelector):
584
585 2008-02-11  Rob Buis  <buis@kde.org>
586
587         Reviewed by David Kilzer.
588
589         http://bugs.webkit.org/show_bug.cgi?id=17201
590         Bug 17201: Use RefPtr in CSSParser::parseFont() to get rid of goto silliness
591
592         Gets rid of goto usage in parseFont.
593
594         * css/CSSParser.cpp:
595         (WebCore::CSSParser::parseFont):
596
597 2008-02-11  David Hyatt  <hyatt@apple.com>
598
599         Fix for bug 17298, Acid3 text should be black and not red.  Make sure stylesheets with the wrong MIME type
600         are not accepted in strict mode.
601
602         Reviewed by darin
603
604         Added http/tests/misc/css-reject-in-strict-mode.html
605
606         * css/CSSImportRule.cpp:
607         (WebCore::CSSImportRule::setCSSStyleSheet):
608         * css/CSSImportRule.h:
609         * dom/Document.cpp:
610         (WebCore::Document::setCSSStyleSheet):
611         * dom/Document.h:
612         * dom/ProcessingInstruction.cpp:
613         (WebCore::ProcessingInstruction::setCSSStyleSheet):
614         * dom/ProcessingInstruction.h:
615         * html/HTMLLinkElement.cpp:
616         (WebCore::HTMLLinkElement::setCSSStyleSheet):
617         * html/HTMLLinkElement.h:
618         * html/HTMLMediaElement.cpp:
619         (WebCore::HTMLMediaElement::pickMedia):
620         * loader/CachedCSSStyleSheet.cpp:
621         (WebCore::CachedCSSStyleSheet::ref):
622         (WebCore::CachedCSSStyleSheet::checkNotify):
623         (WebCore::CachedCSSStyleSheet::canUseSheet):
624         * loader/CachedCSSStyleSheet.h:
625         (WebCore::CachedCSSStyleSheet::sheetText):
626         * loader/CachedResourceClient.h:
627         (WebCore::CachedResourceClient::setCSSStyleSheet):
628         * loader/mac/UserStyleSheetLoader.cpp:
629         (UserStyleSheetLoader::setCSSStyleSheet):
630         * loader/mac/UserStyleSheetLoader.h:
631
632 2008-02-11  Adam Roben  <aroben@apple.com>
633
634         Fix Bug 14316: Inspector's Console truncates long strings
635
636         <http://bugs.webkit.org/show_bug.cgi?id=14316>
637         <rdar://5357695>
638
639         We no longer call Object.describe to format all the output of commands
640         enetered into the Console. The ConsolePanel object now has a set of
641         formatting functions that append a formatted representation of the
642         passed-in object to the passed-in container node.
643
644         Reviewed by Sam.
645
646         * page/inspector/ConsolePanel.js:
647         (WebInspector.ConsolePanel._onEnterPressed): Updated for rename of
648         _outputToNode to _format.
649         (WebInspector.ConsolePanel._format): Renamed from _outputToNode. Use
650         Object.type to get the type of the object, then call the appropriate
651         formatting function.
652         (WebInspector.ConsolePanel._formatvalue): Added.
653         (WebInspector.ConsolePanel._formatstring): Added. This function
654         contains the actual fix for the bug, since it doesn't truncate the
655         string no matter how long it is.
656         (WebInspector.ConsolePanel._formatregexp): Added.
657         (WebInspector.ConsolePanel._formatarray): Added. This is a bit more
658         functional than Object.describe for arrays, since it recursively
659         formats each item in the array. One advantage of this is that Nodes in
660         arrays will be linkified instead of just turning into "[Object
661         HTMLBodyElement]" or similar.
662         (WebInspector.ConsolePanel._formatnode): Added.
663         (WebInspector.ConsolePanel._formatobject): Added.
664         (WebInspector.ConsolePanel.
665         * page/inspector/utilities.js:
666         (Object.type): Added. Code was pulled out of Object.describe and
667         reorganized slightly.
668         (Object.describe): Call Object.type. There should be no change in
669         behavior of this function.
670
671 2008-02-11  Alp Toker  <alp@atoker.com>
672
673         Wx build fix for breakage introduced in r30142. Spotted by Darin.
674
675         * platform/network/curl/ResourceHandleManager.cpp:
676         (WebCore::parseDataUrl):
677
678 2008-02-11  Brent Fulgham  <bfulgham@gmail.com>
679
680         Reviewed and tweaked by Darin
681
682         - http://bugs.webkit.org/show_bug.cgi?id=17299
683           a couple compilation fixes for Cairo/Win32 configuration
684
685         * platform/graphics/cairo/ImageSourceCairo.cpp:
686         (WebCore::createDecoder): Turn off XBMImageDecoder for PLATFORM(WIN) configuration.
687         * rendering/RenderThemeWin.cpp:
688         (WebCore::prepareForDrawing): Added IntRect parameter.
689         (WebCore::doneDrawing): Ditto.
690         (WebCore::RenderThemeWin::paintButton): Ditto.
691         (WebCore::RenderThemeWin::paintTextField): Ditto.
692         (WebCore::RenderThemeWin::paintMenuListButton): Ditto.
693         (WebCore::RenderThemeWin::systemFont): Added.
694
695 2008-02-11  Alp Toker  <alp@atoker.com>
696
697         Reviewed by Alexey.
698
699         Acid3 data URL parsing fix for the GTK+ port.
700
701         Avoid WebCore's base64Decode() when possible since it's not a
702         general-purpose Base64 decoder and fails on newlines.
703
704         * platform/network/curl/ResourceHandleManager.cpp:
705         (WebCore::parseDataUrl):
706
707 2008-02-11  Darin Adler  <darin@apple.com>
708
709         - another Qt build fix
710
711         * platform/qt/PopupMenuQt.cpp:
712         (WebCore::PopupMenu::PopupMenu): Added explicit RefCounted constructor.
713
714 2008-02-10  Darin Adler  <darin@apple.com>
715
716         - another Qt build fix (wish the Qt bot wouldn't stop on the first error)
717
718         * platform/qt/FileChooserQt.cpp:
719         (WebCore::FileChooser::FileChooser): Added explicit RefCounted constructor.
720
721 2008-02-10  Darin Adler  <darin@apple.com>
722
723         - another Qt build fix
724
725         * platform/graphics/qt/IconQt.cpp:
726         (WebCore::Icon::Icon): Added explicit RefCounted constructor.
727
728 2008-02-10  Alp Toker  <alp@atoker.com>
729
730         Another Win build fix for r30133 breakage.
731
732         * plugins/win/PluginPackageWin.cpp:
733         (WebCore::PluginPackage::PluginPackage):
734
735 2008-02-10  Alp Toker  <alp@atoker.com>
736
737         Build fix GTK+ and prospective build fix for Win breakage introduced
738         in r30133.
739
740         * platform/Cursor.h:
741         (WebCore::SharedCursor::SharedCursor):
742         * platform/graphics/gtk/IconGtk.cpp:
743         (WebCore::Icon::Icon):
744         * platform/gtk/FileChooserGtk.cpp:
745         (WebCore::FileChooser::FileChooser):
746         * platform/gtk/PopupMenuGtk.cpp:
747         (WebCore::PopupMenu::PopupMenu):
748
749 2008-02-10  Darin Adler  <darin@apple.com>
750
751         - try to fix Win, Qt, GTK, and WX builds
752
753         * platform/Cursor.h:
754         (WebCore::SharedCursor::SharedCursor): Added explicit RefCounted constructor.
755         * platform/graphics/win/IconWin.cpp:
756         (WebCore::Icon::Icon): Ditto.
757         * platform/win/FileChooserWin.cpp:
758         (WebCore::FileChooser::FileChooser): Ditto.
759         * platform/win/PopupMenuWin.cpp:
760         (WebCore::PopupMenu::PopupMenu): Ditto.
761         * platform/wx/TemporaryLinkStubs.cpp:
762         (FileChooser::FileChooser): Ditto.
763         (PopupMenu::PopupMenu): Ditto.
764         (Icon::Icon): Ditto.
765         * plugins/PluginStream.cpp:
766         (WebCore::PluginStream::PluginStream): Ditto.
767
768 2008-02-10  David Hyatt  <hyatt@apple.com>
769
770         Fix for bug 17082, cssRules should be live.
771
772         Reviewed by olliej
773
774         Added fast/css/live-cssrules.html
775
776         * css/CSSRuleList.cpp:
777         (WebCore::CSSRuleList::CSSRuleList):
778         (WebCore::CSSRuleList::length):
779         (WebCore::CSSRuleList::item):
780         (WebCore::CSSRuleList::deleteRule):
781         (WebCore::CSSRuleList::insertRule):
782         * css/CSSRuleList.h:
783
784 2008-02-10  David Hyatt  <hyatt@apple.com>
785
786         Fix for bug 17253.  <iframe> contents need to be reflected into the DOM as a single text node.
787
788         Reviewed by olliej
789
790         fast/frames/iframe-text-contents.html
791
792         * html/HTMLParser.cpp:
793         (WebCore::HTMLParser::getNode):
794         * html/HTMLTokenizer.cpp:
795         (WebCore::HTMLTokenizer::parseSpecial):
796         (WebCore::HTMLTokenizer::parseComment):
797         (WebCore::HTMLTokenizer::parseTag):
798         * html/HTMLTokenizer.h:
799         (WebCore::HTMLTokenizer::State::inIFrame):
800         (WebCore::HTMLTokenizer::State::setInIFrame):
801         (WebCore::HTMLTokenizer::State::inAnySpecial):
802         (WebCore::HTMLTokenizer::State::needsSpecialWriteHandling):
803         (WebCore::HTMLTokenizer::State::):
804
805 2008-02-10  Andrew Wellington  <proton@wiretapped.net>
806
807         Reviewed and tweaked by Darin.
808         
809         DOMRange.surroundContents throws wrong exception (Acid3 bug)
810         http://bugs.webkit.org/show_bug.cgi?id=16749
811         
812         Throw BAD_BOUNDARYPOINTS_ERR if attempting to split a non-text node that
813         has offsets in characters.
814
815         * dom/Range.cpp:
816         (WebCore::Range::surroundContents):
817
818 2008-02-10  Darin Adler  <darin@apple.com>
819
820         Reviewed by Eric.
821
822         - http://bugs.webkit.org/show_bug.cgi?id=17256
823           Make clients of RefCounted explicitly set the count to 0.
824
825         * bindings/js/JSSVGPODTypeWrapper.h:
826         (WebCore::JSSVGPODTypeWrapper::JSSVGPODTypeWrapper):
827         * css/CSSFontFace.h:
828         (WebCore::CSSFontFace::CSSFontFace):
829         * css/CSSRuleList.cpp:
830         (WebCore::CSSRuleList::CSSRuleList):
831         * css/CSSSegmentedFontFace.cpp:
832         (WebCore::CSSSegmentedFontFace::CSSSegmentedFontFace):
833         * css/Counter.h:
834         (WebCore::Counter::Counter):
835         * css/Pair.h:
836         (WebCore::Pair::Pair):
837         * css/Rect.h:
838         (WebCore::Rect::Rect):
839         * css/StyleBase.h:
840         (WebCore::StyleBase::StyleBase):
841         * css/StyleSheetList.cpp:
842         (WebCore::StyleSheetList::StyleSheetList):
843         * dom/Attr.cpp:
844         (WebCore::Attr::Attr):
845         * dom/Attr.h:
846         * dom/Attribute.h:
847         (WebCore::Attribute::Attribute):
848         * dom/Clipboard.cpp:
849         (WebCore::Clipboard::Clipboard):
850         * dom/DOMImplementation.h:
851         (WebCore::DOMImplementation::DOMImplementation):
852         * dom/Event.cpp:
853         (WebCore::Event::Event):
854         * dom/EventListener.h:
855         (WebCore::EventListener::EventListener):
856         * dom/ExceptionBase.cpp:
857         (WebCore::ExceptionBase::ExceptionBase):
858         * dom/NamedAttrMap.h:
859         (WebCore::NamedAttrMap::insertAttribute):
860         * dom/NamedNodeMap.h:
861         (WebCore::NamedNodeMap::NamedNodeMap):
862         * dom/NodeFilter.h:
863         (WebCore::NodeFilter::NodeFilter):
864         * dom/NodeFilterCondition.h:
865         (WebCore::NodeFilterCondition::NodeFilterCondition):
866         * dom/NodeList.h:
867         (WebCore::NodeList::NodeList):
868         * dom/QualifiedName.h:
869         (WebCore::QualifiedName::QualifiedNameImpl::QualifiedNameImpl):
870         (WebCore::QualifiedName::ref):
871         * dom/Range.cpp:
872         (WebCore::Range::Range):
873         * dom/RegisteredEventListener.cpp:
874         (WebCore::RegisteredEventListener::RegisteredEventListener):
875         * dom/StyledElement.h:
876         * dom/Traversal.cpp:
877         (WebCore::Traversal::Traversal):
878         * editing/EditCommand.cpp:
879         (WebCore::EditCommand::EditCommand):
880         * history/BackForwardList.cpp:
881         (WebCore::BackForwardList::BackForwardList):
882         * history/CachedPage.cpp:
883         (WebCore::CachedPage::CachedPage):
884         * history/HistoryItem.cpp:
885         (WebCore::HistoryItem::HistoryItem):
886         * html/CanvasGradient.cpp:
887         (WebCore::CanvasGradient::CanvasGradient):
888         * html/CanvasPattern.cpp:
889         (WebCore::CanvasPattern::CanvasPattern):
890         * html/CanvasRenderingContext2D.cpp:
891         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
892         * html/CanvasStyle.cpp:
893         (WebCore::CanvasStyle::CanvasStyle):
894         * html/HTMLCollection.cpp:
895         (WebCore::HTMLCollection::HTMLCollection):
896         * html/MediaError.h:
897         (WebCore::MediaError::MediaError):
898         * html/TimeRanges.cpp:
899         (TimeRanges::TimeRanges):
900         * html/TimeRanges.h:
901         (WebCore::TimeRanges::TimeRanges):
902         * html/VoidCallback.h:
903         (WebCore::VoidCallback::VoidCallback):
904         * loader/DocumentLoader.cpp:
905         (WebCore::DocumentLoader::DocumentLoader):
906         * loader/FormState.cpp:
907         (WebCore::FormState::FormState):
908         * loader/ResourceLoader.cpp:
909         (WebCore::ResourceLoader::ResourceLoader):
910         * loader/TextResourceDecoder.cpp:
911         (WebCore::TextResourceDecoder::TextResourceDecoder):
912         * loader/icon/IconRecord.cpp:
913         (WebCore::IconRecord::IconRecord):
914         * page/BarInfo.cpp:
915         (WebCore::BarInfo::BarInfo):
916         * page/Console.cpp:
917         (WebCore::Console::Console):
918         * page/DOMSelection.cpp:
919         (WebCore::DOMSelection::DOMSelection):
920         * page/DOMWindow.cpp:
921         (WebCore::DOMWindow::DOMWindow):
922         * page/Frame.cpp:
923         (WebCore::Frame::Frame):
924         * page/History.cpp:
925         (WebCore::History::History):
926         * page/InspectorController.cpp:
927         (WebCore::InspectorResource::InspectorResource):
928         (WebCore::InspectorDatabaseResource::InspectorDatabaseResource):
929         * page/Plugin.h:
930         (WebCore::Plugin::Plugin):
931         * page/Screen.cpp:
932         (WebCore::Screen::Screen):
933         * platform/ArrayImpl.cpp:
934         (WebCore::ArrayImpl::ArrayPrivate::ArrayPrivate):
935         * platform/DeprecatedValueListImpl.cpp:
936         (WebCore::DeprecatedValueListImpl::Private::Private):
937         * platform/ScrollBar.cpp:
938         (WebCore::Scrollbar::Scrollbar):
939         * platform/SharedBuffer.cpp:
940         (WebCore::SharedBuffer::SharedBuffer):
941         * platform/graphics/FontFallbackList.cpp:
942         (WebCore::FontFallbackList::FontFallbackList):
943         * platform/graphics/FontFamily.cpp:
944         (WebCore::FontFamily::FontFamily):
945         * platform/graphics/FontFamily.h:
946         (WebCore::FontFamily::FontFamily):
947         * platform/graphics/FontSelector.h:
948         (WebCore::FontSelector::FontSelector):
949         (WebCore::FontSelector::~FontSelector):
950         * platform/graphics/GlyphPageTreeNode.h:
951         (WebCore::GlyphPage::GlyphPage):
952         * platform/graphics/mac/IconMac.mm:
953         (WebCore::Icon::Icon):
954         * platform/mac/FileChooserMac.mm:
955         (WebCore::FileChooser::FileChooser):
956         * platform/mac/PopupMenuMac.mm:
957         (WebCore::PopupMenu::PopupMenu):
958         * platform/mac/SharedBufferMac.mm:
959         (WebCore::SharedBuffer::SharedBuffer):
960         * platform/network/FormData.cpp:
961         (WebCore::FormData::FormData):
962         * platform/network/FormData.h:
963         (WebCore::FormData::FormData):
964         * platform/network/ResourceHandle.cpp:
965         (WebCore::ResourceHandle::ResourceHandle):
966         * platform/text/CString.h:
967         (WebCore::CStringBuffer::CStringBuffer):
968         * platform/text/RegularExpression.cpp:
969         (WebCore::RegularExpression::Private::Private):
970         * rendering/RenderStyle.cpp:
971         (WebCore::StyleSurroundData::StyleSurroundData):
972         (WebCore::StyleBoxData::StyleBoxData):
973         (WebCore::StyleVisualData::StyleVisualData):
974         (WebCore::StyleBackgroundData::StyleBackgroundData):
975         (WebCore::StyleMarqueeData::StyleMarqueeData):
976         (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
977         (WebCore::StyleMultiColData::StyleMultiColData):
978         (WebCore::StyleTransformData::StyleTransformData):
979         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
980         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
981         (WebCore::StyleInheritedData::StyleInheritedData):
982         * rendering/RenderStyle.h:
983         (WebCore::TransformOperation::TransformOperation):
984         (WebCore::CursorList::CursorList):
985         * rendering/SVGCharacterLayoutInfo.h:
986         (WebCore::SVGCharOnPath::SVGCharOnPath):
987         * rendering/SVGRenderStyle.cpp:
988         (WebCore::SVGRenderStyle::SVGRenderStyle):
989         * rendering/SVGRenderStyle.h:
990         (WebCore::SVGRenderStyle::SVGRenderStyle):
991         * rendering/SVGRenderStyleDefs.cpp:
992         (StyleFillData::StyleFillData):
993         (StyleStrokeData::StyleStrokeData):
994         (StyleStopData::StyleStopData):
995         (StyleTextData::StyleTextData):
996         (StyleClipData::StyleClipData):
997         (StyleMaskData::StyleMaskData):
998         (StyleMarkerData::StyleMarkerData):
999         (StyleMiscData::StyleMiscData):
1000         * storage/SQLResultSetRowList.h:
1001         (WebCore::SQLResultSetRowList::SQLResultSetRowList):
1002         * svg/SVGAngle.cpp:
1003         (WebCore::SVGAngle::SVGAngle):
1004         * svg/SVGAnimatedTemplate.h:
1005         (WebCore::SVGAnimatedTemplate::SVGAnimatedTemplate):
1006         * svg/SVGElementInstanceList.cpp:
1007         (WebCore::SVGElementInstanceList::SVGElementInstanceList):
1008         * svg/SVGList.h:
1009         (WebCore::SVGList::SVGList):
1010         (WebCore::SVGPODListItem::SVGPODListItem):
1011         * svg/SVGPathSeg.h:
1012         (WebCore::SVGPathSeg::SVGPathSeg):
1013         * svg/SVGPreserveAspectRatio.cpp:
1014         (WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio):
1015         * svg/SVGRenderingIntent.h:
1016         (WebCore::SVGRenderingIntent::SVGRenderingIntent):
1017         * svg/SVGUnitTypes.h:
1018         (WebCore::SVGUnitTypes::SVGUnitTypes):
1019         * svg/graphics/SVGPaintServerGradient.h:
1020         (WebCore::SVGPaintServerGradient::SharedStopCache::SharedStopCache):
1021         * svg/graphics/SVGResource.cpp:
1022         (WebCore::SVGResource::SVGResource):
1023         * xml/DOMParser.h:
1024         (WebCore::DOMParser::DOMParser):
1025         * xml/XMLHttpRequest.cpp:
1026         (WebCore::XMLHttpRequest::XMLHttpRequest):
1027         * xml/XMLSerializer.h:
1028         (WebCore::XMLSerializer::XMLSerializer):
1029         * xml/XPathEvaluator.h:
1030         (WebCore::XPathEvaluator::XPathEvaluator):
1031         * xml/XPathExpression.h:
1032         (WebCore::XPathExpression::XPathExpression):
1033         * xml/XPathNSResolver.h:
1034         (WebCore::XPathNSResolver::XPathNSResolver):
1035         * xml/XPathResult.cpp:
1036         (WebCore::XPathResult::XPathResult):
1037         * xml/XPathValue.h:
1038         (WebCore::XPath::ValueData::ValueData):
1039         * xml/XSLTProcessor.h:
1040         (WebCore::XSLTProcessor::XSLTProcessor):
1041
1042 2008-02-09  Kevin Ollivier  <kevino@theolliviers.com>
1043
1044         Reviewed by Eric Seidel.
1045
1046         Calling select() when all the file descriptors are NULL
1047         stops the file download on Windows. As a result, do not
1048         call select() when there are no valid descriptors.
1049
1050         http://bugs.webkit.org/show_bug.cgi?id=17178
1051
1052         * platform/network/curl/ResourceHandleManager.cpp:
1053         (WebCore::ResourceHandleManager::downloadTimerCallback):
1054
1055 2008-02-09  Dan Bernstein  <mitz@apple.com>
1056
1057         Reviewed by Sam Weinig.
1058
1059         - fix http://bugs.webkit.org/show_bug.cgi?id=17259
1060           Element::recalcStyle() needlessly null-checks the result of styleForElement()
1061
1062         * dom/Element.cpp:
1063         (WebCore::Element::recalcStyle): Removed unneeded null checks.
1064         styleForElement() can never return null.
1065
1066 2008-02-09  David Hyatt  <hyatt@apple.com>
1067
1068         Fix for bug 17254, nth-* selectors do not work with negative coefficients.
1069
1070         Reviewed by Mitz.
1071
1072         fast/css/negative-nth-child.html
1073
1074         * css/CSSStyleSelector.cpp:
1075         (WebCore::parseNth):
1076
1077 2008-02-09  David Hyatt  <hyatt@apple.com>
1078
1079         Fix for bug 17203, high CPU usage loading HTML5 spec.  This patch significantly improves the performance
1080         of CSS3 selectors.
1081
1082         (1) Split the notion of being affected by positional rules into "forward" and "backward."  The "forward"
1083         selectors do not need to re-resolve during parsing, since children are appended on the end.  Only the
1084         "backward" selectors like last-child or nth-last-child have to re-resolve when a close tag is encountered.
1085
1086         (2) Extend childrenChanged to specify whether the children were changed by the parser or not.  This allows
1087         Element::childrenChanged to know when the parser is adding children so that it can ignore those adds when
1088         possible.
1089
1090         (3) Make sure all Elements now know whether or not their children are currently parsing.  Backwards selectors
1091         like last-child will always return false when children are still being parsed.  When an Element finishes
1092         parsing its children, finishParsingChildren() gets called and will make sure the children re-resolve properly.
1093
1094         (4) Added a beginParsingChildren method and renamed finishParsing to finishedParsingChildren.
1095
1096         (5) Eliminated one-off hacks that did the same thing in HTMLObjectElement and HTMLAppletElement.
1097
1098         (6) Patched many incorrect implementations of finishedParsingChildren that did not properly call into their
1099         base class (mostly new SVG elements that got added for SVG fonts around the time this became a requirement).
1100
1101         Reviewed by Eric
1102
1103         * css/CSSStyleSelector.cpp:
1104         (WebCore::CSSStyleSelector::checkSelector):
1105         (WebCore::CSSStyleSelector::checkOneSelector):
1106         * dom/Attr.cpp:
1107         (WebCore::Attr::childrenChanged):
1108         * dom/Attr.h:
1109         * dom/ContainerNode.cpp:
1110         (WebCore::ContainerNode::addChild):
1111         * dom/Document.cpp:
1112         (WebCore::Document::childrenChanged):
1113         * dom/Document.h:
1114         * dom/Element.cpp:
1115         (WebCore::Element::Element):
1116         (WebCore::Element::recalcStyle):
1117         (WebCore::checkFirstChildRules):
1118         (WebCore::checkLastChildRules):
1119         (WebCore::checkEmptyRules):
1120         (WebCore::checkStyleRules):
1121         (WebCore::Element::childrenChanged):
1122         (WebCore::Element::finishParsingChildren):
1123         * dom/Element.h:
1124         (WebCore::Element::finishedParsingChildren):
1125         (WebCore::Element::beginParsingChildren):
1126         * dom/Node.cpp:
1127         * dom/Node.h:
1128         (WebCore::Node::finishParsingChildren):
1129         (WebCore::Node::beginParsingChildren):
1130         (WebCore::Node::childrenChanged):
1131         * dom/StyledElement.cpp:
1132         (WebCore::StyledElement::StyledElement):
1133         * dom/StyledElement.h:
1134         * dom/XMLTokenizer.cpp:
1135         (WebCore::XMLTokenizer::startElementNs):
1136         (WebCore::XMLTokenizer::endElementNs):
1137         (WebCore::):
1138         * html/HTMLAppletElement.cpp:
1139         (WebCore::HTMLAppletElement::HTMLAppletElement):
1140         (WebCore::HTMLAppletElement::finishParsingChildren):
1141         * html/HTMLAppletElement.h:
1142         * html/HTMLElementFactory.cpp:
1143         (WebCore::objectConstructor):
1144         * html/HTMLGenericFormElement.cpp:
1145         (WebCore::HTMLFormControlElementWithState::finishParsingChildren):
1146         * html/HTMLGenericFormElement.h:
1147         * html/HTMLObjectElement.cpp:
1148         (WebCore::HTMLObjectElement::HTMLObjectElement):
1149         (WebCore::HTMLObjectElement::finishParsingChildren):
1150         (WebCore::HTMLObjectElement::childrenChanged):
1151         * html/HTMLObjectElement.h:
1152         * html/HTMLOptGroupElement.cpp:
1153         (WebCore::HTMLOptGroupElement::childrenChanged):
1154         * html/HTMLOptGroupElement.h:
1155         * html/HTMLOptionElement.cpp:
1156         (WebCore::HTMLOptionElement::childrenChanged):
1157         * html/HTMLOptionElement.h:
1158         * html/HTMLParser.cpp:
1159         (WebCore::HTMLParser::insertNode):
1160         (WebCore::HTMLParser::pushBlock):
1161         (WebCore::HTMLParser::popOneBlockCommon):
1162         * html/HTMLScriptElement.cpp:
1163         (WebCore::HTMLScriptElement::childrenChanged):
1164         (WebCore::HTMLScriptElement::finishParsingChildren):
1165         * html/HTMLScriptElement.h:
1166         * html/HTMLSelectElement.cpp:
1167         (WebCore::HTMLSelectElement::childrenChanged):
1168         * html/HTMLSelectElement.h:
1169         * html/HTMLStyleElement.cpp:
1170         (WebCore::HTMLStyleElement::finishParsingChildren):
1171         (WebCore::HTMLStyleElement::childrenChanged):
1172         * html/HTMLStyleElement.h:
1173         * html/HTMLTextAreaElement.cpp:
1174         (WebCore::HTMLTextAreaElement::childrenChanged):
1175         * html/HTMLTextAreaElement.h:
1176         * html/HTMLTitleElement.cpp:
1177         (WebCore::HTMLTitleElement::childrenChanged):
1178         * html/HTMLTitleElement.h:
1179          * rendering/RenderApplet.cpp:
1180         (WebCore::RenderApplet::createWidgetIfNecessary):
1181         * rendering/RenderPartObject.cpp:
1182         (WebCore::RenderPartObject::updateWidget):
1183         * rendering/RenderStyle.cpp:
1184         (WebCore::RenderStyle::RenderStyle):
1185         * rendering/RenderStyle.h:
1186         (WebCore::RenderStyle::childrenAffectedByForwardPositionalRules):
1187         (WebCore::RenderStyle::setChildrenAffectedByForwardPositionalRules):
1188         (WebCore::RenderStyle::childrenAffectedByBackwardPositionalRules):
1189         (WebCore::RenderStyle::setChildrenAffectedByBackwardPositionalRules):
1190         * svg/SVGAnimationElement.cpp:
1191         (WebCore::SVGAnimationElement::finishParsingChildren):
1192         * svg/SVGAnimationElement.h:
1193         * svg/SVGClipPathElement.cpp:
1194         (WebCore::SVGClipPathElement::childrenChanged):
1195         * svg/SVGClipPathElement.h:
1196         * svg/SVGDefinitionSrcElement.cpp:
1197         (WebCore::SVGDefinitionSrcElement::childrenChanged):
1198         * svg/SVGDefinitionSrcElement.h:
1199         * svg/SVGElement.cpp:
1200         (WebCore::SVGElement::finishParsingChildren):
1201         * svg/SVGElement.h:
1202         * svg/SVGFontFaceElement.cpp:
1203         (WebCore::SVGFontFaceElement::childrenChanged):
1204         * svg/SVGFontFaceElement.h:
1205         * svg/SVGFontFaceFormatElement.cpp:
1206         (WebCore::SVGFontFaceFormatElement::childrenChanged):
1207         * svg/SVGFontFaceFormatElement.h:
1208         * svg/SVGFontFaceSrcElement.cpp:
1209         (WebCore::SVGFontFaceSrcElement::childrenChanged):
1210         * svg/SVGFontFaceSrcElement.h:
1211         * svg/SVGFontFaceUriElement.cpp:
1212         (WebCore::SVGFontFaceUriElement::childrenChanged):
1213         * svg/SVGFontFaceUriElement.h:
1214         * svg/SVGGElement.cpp:
1215         (WebCore::SVGGElement::childrenChanged):
1216         * svg/SVGGElement.h:
1217         * svg/SVGGradientElement.cpp:
1218         (WebCore::SVGGradientElement::childrenChanged):
1219         * svg/SVGGradientElement.h:
1220         * svg/SVGMarkerElement.cpp:
1221         (WebCore::SVGMarkerElement::childrenChanged):
1222         * svg/SVGMarkerElement.h:
1223         * svg/SVGMaskElement.cpp:
1224         (WebCore::SVGMaskElement::childrenChanged):
1225         * svg/SVGMaskElement.h:
1226         * svg/SVGPatternElement.cpp:
1227         (WebCore::SVGPatternElement::childrenChanged):
1228         * svg/SVGPatternElement.h:
1229         * svg/SVGStyleElement.cpp:
1230         (WebCore::SVGStyleElement::finishParsingChildren):
1231         (WebCore::SVGStyleElement::childrenChanged):
1232         * svg/SVGStyleElement.h:
1233         * svg/SVGStyledElement.cpp:
1234         (WebCore::SVGStyledElement::childrenChanged):
1235         * svg/SVGStyledElement.h:
1236         * svg/SVGTitleElement.cpp:
1237         (WebCore::SVGTitleElement::childrenChanged):
1238         * svg/SVGTitleElement.h:
1239         * svg/SVGUseElement.cpp:
1240         (WebCore::SVGUseElement::childrenChanged):
1241         * svg/SVGUseElement.h:
1242         
1243 2008-02-09  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
1244
1245         Unreviewed build fix
1246
1247         Somehow the removal of adjustSliderThumbSize(RenderObject*) sneaked
1248         into the patch.
1249
1250         * platform/qt/RenderThemeQt.h:
1251
1252 2008-02-09  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
1253
1254         Reviewed by Adele.
1255
1256         paintResizeControl is dead, remove the code. This painting
1257         is done by the RenderLayer.
1258
1259         * platform/qt/RenderThemeQt.cpp:
1260         * platform/qt/RenderThemeQt.h:
1261         * rendering/RenderThemeMac.h:
1262         * rendering/RenderThemeMac.mm:
1263
1264 2008-02-07  Kevin Ollivier <kevino@theolliviers.com>
1265
1266         Reviewed by Eric Seidel, Adam Roben.
1267
1268         MSVC7 fixes.
1269         http://bugs.webkit.org/show_bug.cgi?id=17211
1270
1271         * platform/Threading.h:
1272         - On MSVC7, when the Interlocked* functions are used, the ref count gets out of sync.
1273           (MSVC8 seems not to have this problem.) Use the old implementation which works correctly.
1274         * platform/win/SharedTimerWin.cpp:
1275         - USER_TIMER_MINIMUM/MAXIMUM aren't defined in winuser.h for the MSVC 2003 Platform SDK
1276           so define them if they are not already defined.
1277
1278 2008-02-08  Brent Fulgham  <bfulgham@gmail.com>
1279
1280         Reviewed by Adam Roben.
1281
1282         Bug 17226: Fix Windows (Cairo) build of image-decoders
1283         http://bugs.webkit.org/show_bug.cgi?id=17226
1284
1285         * platform/image-decoders/gif/GIFImageDecoder.cpp:
1286         * platform/image-decoders/png/PNGImageDecoder.cpp:
1287
1288 2008-02-08  Timothy Hatcher  <timothy@apple.com>
1289
1290         Reviewed by Brady Eidson.
1291
1292         <rdar://problem/5640896> Removing database then trying
1293         to recreate it causes trouble
1294
1295         Added open Database support to DatabaseTracker. So any Database that 
1296         is deleted will be marked as deleted and will fail to open any transaction
1297         or execute any new SQL queries.
1298
1299         * storage/Database.cpp:
1300         (WebCore::Database::Database): Call DatabaseTracker::addOpenDatabase.
1301         (WebCore::Database::~Database): Call DatabaseTracker::removeOpenDatabase.
1302         (WebCore::Database::markAsDeleted): Set the m_deleted flag.
1303         (WebCore::Database::version): Return a null String if m_deleted is true.
1304         * storage/Database.h:
1305         (WebCore::Database::deleted): Return m_deleted.
1306         * storage/DatabaseTracker.cpp:
1307         (WebCore::DatabaseTracker::addOpenDatabase): Add the Database to a map of origins and names.
1308         (WebCore::DatabaseTracker::removeOpenDatabase): Remove the Database from the map.
1309         (WebCore::DatabaseTracker::deleteDatabaseFile): Call markAsDeleted on all the open Databases
1310           matching the origin/name.
1311         * storage/DatabaseTracker.h:
1312         * storage/SQLStatement.cpp:
1313         (WebCore::SQLStatement::setDatabaseDeletedError): Set the error about the user deleting the database.
1314         * storage/SQLStatement.h:
1315         * storage/SQLTransaction.cpp:
1316         (WebCore::SQLTransaction::executeSQL): If the Database is deleted, call setDatabaseDeletedError.
1317         (WebCore::SQLTransaction::openTransactionAndPreflight): Set the error about the user deleting the database
1318           if the Database was marked as deleted.
1319
1320 2008-02-08  Darin Adler  <darin@apple.com>
1321
1322         Reviewed by Eric.
1323
1324         - fix http://bugs.webkit.org/show_bug.cgi?id=15003
1325           Function.prototype.constructor should not be DontDelete/ReadOnly (Acid3 bug)
1326
1327         Test: fast/js/constructor-attributes.html
1328
1329         * bindings/scripts/CodeGeneratorJS.pm: Remove unwanted attributes from "constructor".
1330
1331 2008-02-08  Anders Carlsson  <andersca@apple.com>
1332
1333         Reviewed by Mitz.
1334
1335         <rdar://problem/5650446>
1336         http://bugs.webkit.org/show_bug.cgi?id=16102
1337         Crash in FrameLoader::stopLoadingSubframes() on IMDB page
1338
1339         Store the child frame in a RefPtr to prevent it from being deleted when the
1340         frame tree changes while calling stopAllLoaders().
1341         
1342         * loader/FrameLoader.cpp:
1343         (WebCore::FrameLoader::stopLoadingSubframes):
1344
1345 2008-02-08  Kevin Ollivier  <kevino@theolliviers.com>
1346
1347         wx port build fix. Add time.h to define time_t.
1348
1349         * platform/FileSystem.h:
1350
1351 2008-02-08  Alp Toker  <alp@atoker.com>
1352
1353         Reviewed by Adam Roben.
1354
1355         Avoid null-dereference crasher noticed in the GTK+ port and also
1356         affecting the Win debug build.
1357
1358         Covered by existing tests.
1359
1360         * dom/Document.cpp:
1361         (WebCore::Document::userStyleSheet):
1362
1363 2008-02-08  Anders Carlsson  <andersca@apple.com>
1364
1365         Reviewed by Adam.
1366
1367         <rdar://problem/5724188> 
1368         REGRESSION: PLT 0.7% slower due to 29926 (change Text::createWithLengthLimit to take a UChar pointer)
1369         
1370         Revert r29926 which caused the regression.
1371         
1372         * dom/Text.cpp:
1373         (WebCore::Text::createWithLengthLimit):
1374         * dom/Text.h:
1375         * html/HTMLParser.cpp:
1376         (WebCore::HTMLParser::parseToken):
1377         * loader/TextDocument.cpp:
1378         (WebCore::TextTokenizer::write):
1379
1380 2008-02-08  Sam Weinig  <sam@webkit.org>
1381
1382         Reviewed by Hyatt.
1383
1384         Fix for <rdar://problem/5732491>
1385         http://bugs.webkit.org/show_bug.cgi?id=17213
1386         The querySelectorAll method on an element node does not search only the element's descendants
1387
1388         Test: fast/dom/SelectorAPI/elementRoot.html
1389
1390         * dom/Node.cpp:
1391         (WebCore::Node::querySelector): Make sure to stay within the root node when traversing the tree.
1392         * dom/SelectorNodeList.cpp:
1393         (WebCore::SelectorNodeList::SelectorNodeList): ditto.
1394
1395
1396
1397 2008-02-08  David Hyatt  <hyatt@apple.com>
1398
1399         Fix for bug 16798, button should default to type=submit.
1400
1401         Reviewed by darin
1402
1403         * html/HTMLButtonElement.cpp:
1404         (WebCore::HTMLButtonElement::type):
1405         (WebCore::HTMLButtonElement::parseMappedAttribute):
1406
1407 2008-02-08  Rodney Dawes  <dobey@wayofthemonkey.com>
1408
1409         Reviewed by Jon Honeycutt.
1410
1411         Redefine some platform-specific types as cross-platform types
1412         Add pathGetFileName method to get the filename from a path string
1413         Add unloadModule method to unload a loadable module from the process
1414         Implement new methods for GTK+ and Windows
1415         Implement missing homeDirectoryPath method for GTK+
1416         Add stub methods for new and missing methods for Wx and Qt
1417
1418         * platform/FileSystem.h:
1419         * platform/gtk/FileSystemGtk.cpp:
1420         * platform/qt/FileSystemQt.cpp:
1421         * platform/win/FileSystemWin.cpp:
1422         * platform/wx/FileSystemWx.cpp:
1423
1424 2008-02-08  Adam Roben  <aroben@apple.com>
1425
1426         Windows build fix after r30088
1427
1428         * bindings/scripts/CodeGeneratorCOM.pm: Touch this to force the COM
1429         bindings to rebuild.
1430
1431 2008-02-08  Pierre-Luc Beaudoin  <pierre-luc.beaudoin@collabora.co.uk>
1432
1433         Reviewed by Alp Toker.
1434
1435         http://bugs.webkit.org/show_bug.cgi?id=17009
1436         [Gtk] Webkit strips accents from some dead-key combinations
1437
1438         KeyEvents have to go through the gtk input method.
1439
1440         Also implement the isKeypad check and make disambiguateKeyDownEvent
1441         behave more like other ports.
1442
1443         * platform/PlatformKeyboardEvent.h:
1444         * platform/gtk/KeyEventGtk.cpp:
1445         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1446         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
1447         (WebCore::PlatformKeyboardEvent::gdkEventKey):
1448
1449 2008-02-08  Darin Adler  <darin@apple.com>
1450
1451         Reviewed by Eric.
1452
1453         - fix http://bugs.webkit.org/show_bug.cgi?id=3492
1454           TreeWalker implementation needs to be fixed (affects Acid3)
1455         - fix http://bugs.webkit.org/show_bug.cgi?id=4714
1456           NodeIterator does not handle exceptions from the filter function (affects Acid3)
1457         - fix http://bugs.webkit.org/show_bug.cgi?id=4716
1458           NodeIterator will crash if the filter function removes the current node from the document
1459
1460         Test: traversal/exception-forwarding.html
1461
1462         This turned into a near-rewrite of NodeIterator and TreeWalker.
1463
1464         * bindings/js/JSNodeFilterCondition.h:
1465         * bindings/js/JSNodeFilterCondition.cpp:
1466         (WebCore::takeException): Added.
1467         (WebCore::JSNodeFilterCondition::acceptNode): Added an out parameter to return
1468         a JavaScript exception.
1469
1470         * bindings/js/JSNodeFilterCustom.cpp:
1471         (WebCore::JSNodeFilter::acceptNode): Wrote a custom binding for this that raises
1472         a JavaScript exception if the out parameter is set.
1473
1474         * bindings/js/JSNodeIteratorCustom.cpp:
1475         (WebCore::JSNodeIterator::nextNode): Wrote a custom binding for this that raises
1476         a JavaScript exception if the out parameter is set.
1477         (WebCore::JSNodeIterator::previousNode): Ditto.
1478
1479         * bindings/js/JSTreeWalkerCustom.cpp:
1480         (WebCore::JSTreeWalker::parentNode): Wrote a custom binding for this that raises
1481         a JavaScript exception if the out parameter is set.
1482         (WebCore::JSTreeWalker::firstChild): Ditto.
1483         (WebCore::JSTreeWalker::lastChild): Ditto.
1484         (WebCore::JSTreeWalker::nextSibling): Ditto.
1485         (WebCore::JSTreeWalker::previousSibling): Ditto.
1486         (WebCore::JSTreeWalker::previousNode): Ditto.
1487         (WebCore::JSTreeWalker::nextNode): Ditto.
1488
1489         * bindings/objc/DOM.mm:
1490         (WebCore::ObjCNodeFilterCondition::acceptNode): Updated to include new exception
1491         out parameter.
1492         (-[DOMDocument createNodeIterator:whatToShow:filter:expandEntityReferences:]):
1493         Use RefPtr to make object lifetimes clearer.
1494         (-[DOMDocument createTreeWalker:whatToShow:filter:expandEntityReferences:]):
1495         Ditto.
1496
1497         * bindings/scripts/CodeGeneratorJS.pm: Added include of NodeFilter.h for
1498         JSDocument.cpp.
1499
1500         * dom/Document.h:
1501         * dom/Document.cpp:
1502         (WebCore::Document::createNodeIterator): Changed to use PassRefPtr.
1503         (WebCore::Document::createTreeWalker): Ditto.
1504
1505         * dom/NodeFilter.h:
1506         * dom/NodeFilter.cpp:
1507         (WebCore::NodeFilter::NodeFilter): Changed to use PassRefPtr.
1508         (WebCore::NodeFilter::acceptNode): Added an out parameter to return
1509         a JavaScript exception.
1510         * dom/NodeFilter.idl: Custom binding for acceptNode.
1511
1512         * dom/NodeFilterCondition.h:
1513         * dom/NodeFilterCondition.cpp:
1514         (WebCore::NodeFilterCondition::acceptNode): Added an out parameter to return
1515         a JavaScript exception.
1516
1517         * dom/NodeIterator.cpp:
1518         (WebCore::NodeIterator::NodeIterator): Changed to use PassRefPtr more.
1519         Eliminated m_doc, using the root node instead, and unnecessary check for
1520         null -- rootNode must be non-null and all nodes have a non-null document.
1521         (WebCore::NodeIterator::~NodeIterator): Changed to get document from root.
1522         (WebCore::NodeIterator::nextNode): Rewrote to use a RefPtr since the
1523         acceptNode function could do anything, including removing the last
1524         reference to the current node. Also folded findNextNode into this function
1525         since it's the only one that needs to call it.
1526         (WebCore::NodeIterator::previousNode): Same thing, but the other direction.
1527         (WebCore::NodeIterator::detach): Changed to use the root node as the indication
1528         that we're detached rather than a separate boolean.
1529         (WebCore::NodeIterator::notifyBeforeNodeRemoval): Removed some unnneeded
1530         checks. Removed incorrect use of findNextNode/findPreviousNode -- those
1531         functions call acceptNode and the DOM standard is quite clear that these
1532         functions do not take that into account, allowing the current node to become
1533         one that's not accepted.
1534
1535         * dom/NodeIterator.h: Changed constructor to use PassRefPtr more. Changed
1536         nextNode and previousNode to have an out parameter with a JavaScript exception.
1537         Removed helper functions setReferenceNode, setPointerBeforeReferenceNode,
1538         detached, setDetached, document, findNextNode, and findPreviousNode. All were
1539         unnecessary. Removed data member m_doc which was just rootNode()->document().
1540
1541         * dom/NodeIterator.idl: Custom binding for nextNode and previousNode.
1542
1543         * dom/Traversal.cpp:
1544         (WebCore::Traversal::Traversal): Use PassRefPtr more.
1545         (WebCore::Traversal::acceptNode): Added out parameter for JavaScript exception.
1546         Also rearranged the function a little bit for clarity.
1547
1548         * dom/Traversal.h: Changed acceptNode to have an out parameter with a JavaScript
1549         exception and made it protected, since it's only for use by the derived classes.
1550
1551         * dom/TreeWalker.cpp:
1552         (WebCore::TreeWalker::TreeWalker): Updated to use PassRefPtr.
1553         (WebCore::TreeWalker::setCurrentNode): Updated to use PassRefPtr and deleted
1554         the overloaded version since it's not needed.
1555         (WebCore::TreeWalker::parentNode): Rewrote to propagate the exception and also
1556         to implement rules about when to check things like whether we're in the tree.
1557         The previous fix where we called isDescendantOf was not entirely correct, because
1558         the specification allows you to walk outside the tree if you get there somehow.
1559         What it doesn't allow is walking outside the tree from inside. The new
1560         implementation handles this correctly.
1561         (WebCore::TreeWalker::firstChild): Ditto.
1562         (WebCore::TreeWalker::lastChild): Ditto.
1563         (WebCore::TreeWalker::previousSibling): Ditto.
1564         (WebCore::TreeWalker::nextSibling): Ditto.
1565         (WebCore::TreeWalker::previousNode): Ditto. Because of the need to check the
1566         acceptNode function on parents, this can't use traversePreviousNode (more's the
1567         pity, because it's a bit complicated).
1568         (WebCore::TreeWalker::nextNode): Ditto.
1569
1570         * dom/TreeWalker.h: Changed constructor and setCurrentNode to use PassRefPtr
1571         more. Changed the navigation functions to have an out parameter with a JavaScript
1572         exception. Removed helper functions setCurrentNode and ancestorRejected.
1573
1574         * dom/TreeWalker.idl: Custom binding for navigation functions.
1575
1576 2008-02-08  Eric Seidel  <eric@webkit.org>
1577
1578         Reviewed by darin.
1579
1580         Add support for Text.wholeText and Text.replaceWholeText
1581         http://bugs.webkit.org/show_bug.cgi?id=17125
1582
1583         Test EntityReferences to make sure they're always treated as read-only
1584         In doing so I discovered a bug in document.adoptNode(readonlyNode) (and fixed it)
1585
1586         * dom/Document.cpp:
1587         (WebCore::Document::adoptNode): throw NO_MODIFICATION_ALLOWED_ERR when passed a readonly node
1588         * dom/Node.cpp:
1589         * dom/Node.cpp:
1590         (WebCore::Node::textContent):
1591         * dom/Text.cpp:
1592         (WebCore::earliestLogicallyAdjacentTextNode):
1593         (WebCore::latestLogicallyAdjacentTextNode):
1594         (WebCore::Text::wholeText):
1595         (WebCore::Text::replaceWholeText):
1596         * dom/Text.h:
1597         * dom/Text.idl:
1598
1599 2008-02-06  Kimmo Kinnunen  <kimmok@iki.fi>
1600
1601         Reviewed by Tim Hatcher.
1602
1603         Fixes: http://bugs.webkit.org/show_bug.cgi?id=17191
1604         HTML5: Client-side database queries should return values of type number
1605         Test: storage/sql-data-types.html
1606
1607         Make the DB queries return a value as a number if it was inserted
1608         as a number to the database.
1609         * platform/sql/SQLiteStatement.cpp:
1610         (WebCore::SQLiteStatement::getColumnValue): new member function to return SQLValues
1611         * platform/sql/SQLiteStatement.h:
1612         * storage/SQLStatement.cpp:
1613         (WebCore::SQLStatement::execute): use getColumnValue instead of getColumnText
1614
1615 2008-02-07  Ada Chan  <adachan@apple.com>
1616
1617         <rdar://problem/5292433> certificate authentication support broken in Safari 3.0
1618         Added mechanism to communicate client certificate info back to CFNetwork.
1619
1620         Reviewed by Adam.
1621
1622         * platform/network/ResourceHandle.h:
1623         * platform/network/cf/ResourceHandleCFNet.cpp:
1624         (WebCore::clientCerts): Keep a mapping of hosts to client certificates.
1625         (WebCore::makeFinalRequest): If we have a client certificate for the host, pass it
1626         to CFNetwork by setting it in the SSL properties.
1627         (WebCore::ResourceHandle::setClientCertificate): Map client certificate to the host.
1628
1629 2008-02-07  Adam Roben  <aroben@apple.com>
1630
1631         Qt build fix
1632
1633         * platform/SharedBuffer.cpp: Removed a stub implementation of
1634         createWithContentsOfFile, now that each platform has its own stub.
1635
1636 2008-02-07  Adam Roben  <aroben@apple.com>
1637
1638         Fix Bug 17138: REGRESSION: Node highlight not updated properly
1639
1640         <http://bugs.webkit.org/show_bug.cgi?id=17138>
1641         <rdar://problem/5719869>
1642
1643         Reviewed by Darin.
1644
1645         No test possible.
1646
1647         * page/InspectorController.cpp:
1648         (WebCore::InspectorController::drawNodeHighlight): Update the
1649         overlayRect after scrolling to make sure that we translate the context
1650         by the correct amount.
1651
1652 2008-02-07  Adam Roben  <aroben@apple.com>
1653
1654         Qt and GTK+ build fixes
1655
1656         * platform/gtk/FileSystemGtk.cpp: Added a missing #include.
1657         * platform/qt/FileSystemQt.cpp: Ditto.
1658
1659 2008-02-07  Adam Roben  <aroben@apple.com>
1660
1661         Some cleanup of Mac-only user stylesheet code
1662
1663         I moved UserStyleSheetLoader out of Frame.cpp into its own files, and
1664         moved some Mac-only Frame methods to FrameMac.mm.
1665
1666         Reviewed by Darin.
1667
1668         * WebCore.xcodeproj/project.pbxproj: Added new files to project.
1669         * loader/mac/UserStyleSheetLoader.cpp: Added.
1670         (UserStyleSheetLoader::UserStyleSheetLoader):
1671         (UserStyleSheetLoader::~UserStyleSheetLoader):
1672         * loader/mac/UserStyleSheetLoader.h: Added.
1673         * page/Frame.cpp: Removed setUserStyleSheet[Location]
1674         * page/mac/FrameMac.mm:
1675         (WebCore::Frame::setUserStyleSheetLocation): Moved here from
1676         Frame.cpp.
1677         (WebCore::Frame::setUserStyleSheet): Ditto.
1678
1679 2008-02-07  Adam Roben  <aroben@apple.com>
1680
1681         Fix <rdar://5555260> GMail never loads when a user stylesheet is
1682         specified
1683
1684         The fix in r29841 did not guarantee that the user stylesheet would not
1685         still be loading by the time GMail called document.write, and so was
1686         not a complete fix.
1687
1688         This change reworks the user stylesheet loading mechanism on non-Mac
1689         platforms to load the stylesheet synchronously from disk, and then
1690         keeps it in memory. This obsoletes the issue of what our behavior
1691         should be before the user stylesheet has loaded and what should happen
1692         when it finishes loading, as the user stylesheet will always be
1693         available when the Document first asks for it. Note, however, that
1694         this removes the ability to specify a non-file: URL for the user
1695         stylesheet. This change was not made for the Mac platform because it's
1696         possible that WebKit clients are relying on non-file: URLs for user
1697         stylesheets. It would also be nice to move back to an asynchronous
1698         loading model someday, but that is not currently possible since we
1699         don't have an asynchronous loading mechanism that is not tied to a
1700         particular Frame.
1701
1702         The responsibility of loading and storing the user stylesheet has
1703         moved from Frame to Page, since the user stylesheet URL is set on the
1704         Page-level Settings object.
1705
1706         Reviewed by Darin.
1707
1708         * dom/Document.cpp:
1709         (WebCore::Document::Document): Changed to call userStyleSheet().
1710         (WebCore::Document::setUserStyleSheet): Made Mac-only.
1711         (WebCore::Document::userStyleSheet): Changed to call up to Page on
1712         non-Mac platforms.
1713         (WebCore::Document::recalcStyleSelector): Changed to call
1714         userStyleSheet().
1715         * dom/Document.h:
1716             - Made setUserStyleSheet and the m_usersheet member Mac-only
1717             - Changed userStyleSheet to return a String instance instead of a
1718               String reference, since we now might return a new null String.
1719         * loader/FrameLoader.cpp:
1720         (WebCore::FrameLoader::begin): Made the call to
1721         Frame::setUserStyleSheetLocation Mac-only.
1722         * page/Frame.cpp: Made UserStyleSheetLoader and related code Mac-only.
1723         (WebCore::Frame::~Frame): Ditto.
1724         (WebCore::Frame::reapplyStyles): Made the call to
1725         setUserStyleSheet[Location] Mac-only. On non-Mac platforms the
1726         Document will pick up the new stylesheet in Document::reapplyStyles.
1727         (WebCore::FramePrivate::FramePrivate): Made m_userStyleSheetLoader
1728         Mac-only.
1729         * page/Frame.h: Made setUserStyleSheet[Location] Mac-only.
1730         * page/FramePrivate.h: Made m_userStyleSheetLoader Mac-only.
1731         * page/Page.cpp:
1732         (WebCore::Page::Page): Initialize new members.
1733         (WebCore::Page::userStyleSheetLocationChanged): Added. Does nothing on
1734         Mac. On non-Mac, resets all members relating to the user stylesheet so
1735         we'll know to load it again the next time it's asked for.
1736         (WebCore::Page::userStyleSheet): Added. Loads the user stylesheet if
1737         the user stylesheet location has changed since the last time we loaded
1738         it, or if the file has been modified since we last loaded it, then
1739         returns the contents of the user stylesheet as a String.
1740         * page/Page.h: Added new methods/members.
1741         * page/Settings.cpp:
1742         (WebCore::Settings::setUserStyleSheetLocation): Changed to call
1743         Page::userStyleSheetLocationChanged.
1744         * page/Settings.h: Changed userStyleSheetLocation to return the KURL
1745         by reference instead of making a copy.
1746         * platform/FileSystem.h: Added declaration for getFileModificationTime.
1747         * platform/KURL.h: Added declaration for fileSystemPath method.
1748         * platform/cf/KURLCFNet.cpp:
1749         (WebCore::KURL::fileSystemPath): Added.
1750         * platform/posix/FileSystemPOSIX.cpp:
1751         (WebCore::getFileModificationTime): Added.
1752         * platform/qt/KURLQt.cpp:
1753         (WebCore::KURL::fileSystemPath): Stubbed out.
1754         * platform/win/FileSystemWin.cpp:
1755         (WebCore::getFileModificationTime): Added.
1756         * platform/qt/FileSystemQt.cpp: Stubbed out getFileModificationTime.
1757         * platform/gtk/FileSystemGtk.cpp: Ditto.
1758         * platform/wx/FileSystemWx.cpp: Ditto.
1759         * platform/qt/TemporaryLinkStubs.cpp: Stubbed out
1760         SharedBuffer::createWithContentsOfFile.
1761         * platform/gtk/TemporaryLinkStubs.cpp: Ditto, along with
1762         KURL::fileSystemPath.
1763         * platform/wx/TemporaryLinkStubs.cpp: Ditto.
1764
1765 2008-02-07  Adam Roben  <aroben@apple.com>
1766
1767         Clean up FileSystemWin.cpp
1768
1769         This cleanup also makes us call _wstat64 instead of _wstat32i64. The
1770         only difference between these two functions is that _wstat64 gives
1771         64-bit time values, while _wstat32i64 only gives 32-bit time values.
1772
1773         Reviewed by Darin.
1774
1775         All tests pass.
1776
1777         * platform/win/FileSystemWin.cpp:
1778         (WebCore::statFile): New static helper that wraps _wstat64.
1779         (WebCore::getFileSize): Changed to call statFile.
1780         (WebCore::fileExists): Ditto.
1781
1782 2008-02-07  Adam Roben  <aroben@apple.com>
1783
1784         Rename fileSize to getFileSize
1785
1786         Rubberstamped by Darin.
1787
1788         * platform/FileSystem.h:
1789         * platform/gtk/FileSystemGtk.cpp:
1790         * platform/network/cf/FormDataStreamCFNet.cpp:
1791         (WebCore::setHTTPBody):
1792         * platform/network/curl/ResourceHandleManager.cpp:
1793         (WebCore::ResourceHandleManager::setupPOST):
1794         * platform/posix/FileSystemPOSIX.cpp:
1795         * platform/qt/FileSystemQt.cpp:
1796         * platform/win/FileSystemWin.cpp:
1797         * platform/wx/FileSystemWx.cpp:
1798         * storage/Database.cpp:
1799         (WebCore::Database::databaseSize):
1800         * storage/DatabaseTracker.cpp:
1801         (WebCore::DatabaseTracker::usageForDatabase):
1802         * storage/OriginUsageRecord.cpp:
1803         (WebCore::OriginUsageRecord::diskUsage):
1804
1805 2008-02-06  Adam Roben  <aroben@apple.com>
1806
1807         Make KURL::isLocalFile treat the URL's protocol case-insensitively
1808
1809         Reviewed by Darin.
1810
1811         * platform/KURL.cpp:
1812         (WebCore::KURL::isLocalFile): Use equalIgnoringCase instead of ==.
1813
1814 2008-02-07  David Hyatt  <hyatt@apple.com>
1815
1816         Fix for bug 6248, implement the nth-* CSS3 selectors.  Patch based on original KHTML work from Allan Jensen
1817         and improved upon by Nick Shanks.
1818
1819         Reviewed by Eric
1820
1821         * css/CSSGrammar.y:
1822         * css/CSSParser.cpp:
1823         (WebCore::CSSParser::lex):
1824         * css/CSSSelector.cpp:
1825         (WebCore::CSSSelector::extractPseudoType):
1826         * css/CSSSelector.h:
1827         (WebCore::CSSSelector::):
1828         * css/CSSStyleSelector.cpp:
1829         (WebCore::parseNth):
1830         (WebCore::matchNth):
1831         (WebCore::CSSStyleSelector::checkOneSelector):
1832         * css/tokenizer.flex:
1833         * rendering/RenderStyle.cpp:
1834         (WebCore::RenderStyle::RenderStyle):
1835         * rendering/RenderStyle.h:
1836         (WebCore::RenderStyle::childIndex):
1837         (WebCore::RenderStyle::setChildIndex):
1838
1839 2008-02-07  Dan Bernstein  <mitz@apple.com>
1840
1841         Reviewed by Dave Hyatt.
1842
1843         - fix <rdar://problem/5729411> REGRESSION (r29834): Float contained in relative-positioned block is painted twice
1844
1845         Test: fast/block/float/relative-painted-twice.html
1846
1847         * rendering/RenderBlock.cpp:
1848         (WebCore::RenderBlock::addOverhangingFloats): Added another case where
1849         the child should not take over painting the float: when they do not have
1850         the same enclosing layer. In that case, the float is already being
1851         painted by one of its closer ancestors.
1852
1853 2008-02-07  Dan Bernstein  <mitz@apple.com>
1854
1855         Reviewed by Darin Adler.
1856
1857         - fix http://bugs.webkit.org/show_bug.cgi?id=17194
1858           Changing text to bold changes font family
1859
1860         Test: platform/mac/fast/text/family-for-font-matched-by-name.html
1861
1862         * platform/mac/WebFontCache.mm:
1863         (+[WebFontCache internalFontWithFamily:traits:size:]): Changed to use
1864         the family of the font whose name matches the desired family if there
1865         is no exact family match.
1866
1867 2008-02-07  Beth Dakin  <bdakin@apple.com>
1868
1869         Reviewed by Geoff.
1870
1871         Fix for <rdar://problem/5697882> Traffic or Street View button on 
1872         Google Maps is sometimes not positioned correctly (17000)
1873
1874         On the Mac, timers fire in the order that they are registered. 
1875         Geoff and I discovered that this is not necessarily true on 
1876         Windows, and that turned out to be the cause of this intermittent 
1877         layout problem at Google Maps. This patch adds a new member 
1878         variable to Timer to remember the timer's insertion point into the 
1879         heap. Now when comparing timers, if two timers were registered at 
1880         the same time, their insertion orders are compared to determine 
1881         which should fire first. This code actually never runs on Debug 
1882         builds on the Mac; the system clock on the Mac is accurate enough 
1883         that it knows that the two timers were not registered at *exactly* 
1884         the same time. This is not the case on Windows. In theory, if we 
1885         sped up Javascript enough on the Mac, this code would run and would 
1886         prevent misrenderings such as the one found on Google Maps.
1887
1888         * platform/Timer.cpp:
1889         (WebCore::operator<):
1890         (WebCore::TimerBase::setNextFireTime):
1891         * platform/Timer.h:
1892
1893 2008-02-06  Justin Garcia  <justin.garcia@apple.com>
1894
1895         Reviewed by Darin Adler.
1896
1897         <rdar://problem/5195056> Huge plain text pastes are slow
1898         
1899         This was fixed in r27369 and then r29367 and r29667 caused performance to
1900         regress.
1901
1902         * editing/EditCommand.cpp:
1903         (WebCore::EditCommand::apply): Only updateLayout() for high level commands.
1904         (WebCore::EditCommand::unapply): Ditto.
1905         (WebCore::EditCommand::reapply): Ditto.
1906         * editing/Editor.cpp:
1907         (WebCore::Editor::appliedEditing): Added a note about shouldChangeSelection calls 
1908         that shouldn't be made, a bug I filed as <rdar://problem/5729315>.
1909         (WebCore::Editor::unappliedEditing): Ditto.
1910         (WebCore::Editor::reappliedEditing): Ditto.
1911         * editing/SelectionController.cpp:
1912         (WebCore::SelectionController::nodeWillBeRemoved): Don't try to test the selection
1913         base and extent with the expensive isCandidate operation if the node that will
1914         be removed is in a fragment, since such a removal is guaranteed to have no effect
1915         on a selection.  This is to speed up the paste operation, which does many removes from
1916         a fragment.
1917
1918 2008-02-06  Kevin Ollivier  <kevino@theolliviers.com>
1919
1920         Reviewed by Darin Adler.
1921
1922         Rather than directly handing scroll wheel events, use
1923         PlatformWheelEvent to send them to WebCore first, so that
1924         mouse wheel scrolling info can be retrieved via JavaScript.
1925
1926         http://bugs.webkit.org/show_bug.cgi?id=17179
1927
1928         * platform/ScrollView.h:
1929         * platform/wx/MouseWheelEventWx.cpp:
1930         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1931         * platform/wx/ScrollViewWx.cpp:
1932         (WebCore::ScrollView::ScrollViewPrivate::bindEvents):
1933         (WebCore::ScrollView::wheelEvent):
1934         (WebCore::ScrollView::maximumScroll):
1935
1936 2008-02-06  Mark Rowe  <mrowe@apple.com>
1937
1938         Fix Windows builds.
1939
1940         * WebCore.vcproj/WebCore.vcproj: Unbreak the XML of the project file.
1941
1942 2008-02-06  Mark Rowe  <mrowe@apple.com>
1943
1944         Mac build fix.  Track rename that happened in r30056.
1945
1946         * platform/graphics/mac/GraphicsContextMac.mm:
1947
1948 2008-02-06  Brent Fulgham  <bfulgham@gmail.com>
1949
1950         Reviewed by Adam Roben.
1951
1952         http://bugs.webkit.org/show_bug.cgi?id=16979
1953         Conditionalize CoreGraphics vs Cairo support in Windows port.
1954
1955         * WebCore.vcproj/WebCore.vcproj:
1956         * bridge/win/FrameCGWin.cpp: Copied from WebCore/bridge/win/FrameWin.cpp.
1957         (WebCore::imageFromSelection):
1958         * bridge/win/FrameCairoWin.cpp: Added.
1959         (WebCore::imageFromSelection):
1960         * bridge/win/FrameWin.cpp:
1961         (WebCore::computePageRectsForFrame):
1962         * platform/graphics/SimpleFontData.h:
1963         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1964         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: Copied from WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp.
1965         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
1966         (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
1967         (WebCore::GraphicsContextPlatformPrivate::beginTransparencyLayer):
1968         (WebCore::GraphicsContextPlatformPrivate::endTransparencyLayer):
1969         * platform/graphics/cg/GraphicsContextCG.cpp:
1970         (WebCore::GraphicsContext::savePlatformState):
1971         (WebCore::GraphicsContext::restorePlatformState):
1972         * platform/graphics/cg/GraphicsContextPlatformPrivate.h: Removed.
1973         * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h: Copied from WebCore/platform/graphics/cg/GraphicsContextPlatformPrivate.h.
1974         * platform/graphics/win/FontCGWin.cpp: Copied from WebCore/platform/graphics/win/FontWin.cpp.
1975         (WebCore::Font::drawGlyphs):
1976         * platform/graphics/win/FontCairoWin.cpp: Added.
1977         (WebCore::Font::drawGlyphs):
1978         * platform/graphics/win/FontWin.cpp:
1979         * platform/graphics/win/GraphicsContextCGWin.cpp: Copied from WebCore/platform/graphics/win/GraphicsContextWin.cpp.
1980         (WebCore::CGContextWithHDC):
1981         (WebCore::GraphicsContext::inTransparencyLayer):
1982         (WebCore::GraphicsContext::getWindowsContext):
1983         (WebCore::GraphicsContext::releaseWindowsContext):
1984         (WebCore::GraphicsContextPlatformPrivate::scale):
1985         (WebCore::GraphicsContextPlatformPrivate::rotate):
1986         (WebCore::GraphicsContextPlatformPrivate::translate):
1987         (WebCore::GraphicsContextPlatformPrivate::concatCTM):
1988         (WebCore::setCGStrokeColor):
1989         (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
1990         * platform/graphics/win/GraphicsContextCairoWin.cpp: Added.
1991         (WebCore::GraphicsContext::GraphicsContext):
1992         (WebCore::GraphicsContext::getWindowsContext):
1993         (WebCore::GraphicsContext::inTransparencyLayer):
1994         (WebCore::GraphicsContext::releaseWindowsContext):
1995         (WebCore::GraphicsContext::concatCTM):
1996         * platform/graphics/win/GraphicsContextWin.cpp:
1997         * platform/graphics/win/ImageCGWin.cpp: Copied from WebCore/platform/graphics/win/ImageWin.cpp.
1998         (WebCore::BitmapImage::getHBITMAPOfSize):
1999         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
2000         * platform/graphics/win/ImageCairoWin.cpp: Added.
2001         (WebCore::BitmapImage::getHBITMAPOfSize):
2002         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
2003         * platform/graphics/win/ImageWin.cpp:
2004         * platform/graphics/win/SimpleFontDataCGWin.cpp: Copied from WebCore/platform/graphics/win/SimpleFontDataWin.cpp.
2005         (WebCore::scaleEmToUnits):
2006         (WebCore::SimpleFontData::platformInit):
2007         (WebCore::SimpleFontData::platformWidthForGlyph):
2008         * platform/graphics/win/SimpleFontDataCairoWin.cpp: Added.
2009         (WebCore::SimpleFontData::platformInit):
2010         (WebCore::SimpleFontData::platformDestroy):
2011         (WebCore::SimpleFontData::platformWidthForGlyph):
2012         * platform/graphics/win/SimpleFontDataWin.cpp:
2013         (WebCore::SimpleFontData::setShouldApplyMacAscentHack):
2014         (WebCore::SimpleFontData::shouldApplyMacAscentHack):
2015         * platform/win/DragImageCGWin.cpp: Copied from WebCore/platform/win/DragImageWin.cpp.
2016         (WebCore::scaleDragImage):
2017         (WebCore::createDragImageFromImage):
2018         * platform/win/DragImageCairoWin.cpp: Added.
2019         (WebCore::scaleDragImage):
2020         (WebCore::createDragImageFromImage):
2021         * platform/win/DragImageWin.cpp:
2022
2023 2008-02-06  Anders Carlsson  <andersca@apple.com>
2024
2025         Reviewed by Darin.
2026
2027         Change httpBodyFromStream to take the request instead of the stream.
2028         
2029         * platform/network/cf/FormDataStreamCFNet.cpp:
2030         (WebCore::httpBodyFromRequest):
2031         * platform/network/cf/FormDataStreamCFNet.h:
2032         * platform/network/cf/ResourceRequestCFNet.cpp:
2033         (WebCore::ResourceRequest::doUpdateResourceRequest):
2034
2035 2008-02-06  Kevin McCullough  <kmccullough@apple.com>
2036
2037         Reviewed by Darin.
2038
2039         - Added manual tests for <rdar://problem/5556374> REGRESSION: cross-domain error when
2040         one URL uses an explicit port number and another doesn't
2041
2042         * manual-tests/Default-port-frame.html: Added.
2043         * manual-tests/resources/Default-port-frame-contents.html: Added.
2044
2045 2008-02-06  Oliver Hunt  <oliver@apple.com>
2046
2047         Reviewed by NOBODY (Build fix).
2048
2049         Fix windows build
2050
2051         * WebCore.vcproj/build-generated-files.sh:
2052
2053 2008-02-06  Kevin McCullough  <kmccullough@apple.com>
2054
2055         Rubberstamped by Darin.
2056
2057         <rdar://problem/5727708> REGRESSION (r29952): Can't send message from Yahoo Mail beta
2058         - Reverted the change that caused the regression.
2059
2060         * dom/Document.cpp:
2061         (WebCore::Document::createElement):
2062         (WebCore::Document::createElementNS):
2063         (WebCore::Document::getElementById):
2064         (WebCore::Document::parseQualifiedName):
2065         (WebCore::Document::createAttributeNS):
2066         * dom/Document.idl:
2067
2068 2008-02-06  Geoffrey Garen  <ggaren@apple.com>
2069
2070         Reviewed by Oliver Hunt.
2071         
2072         Fixed <rdar://problem/5728081> REGRESSION: Many leaks on buildbot
2073
2074         The problem was refCount underflow in NamedAttrMap.
2075         
2076         Neither our regression tests nor the stress test have yet discovered
2077         another instance of this problem.
2078
2079         * dom/NamedAttrMap.cpp:
2080         (WebCore::NamedAttrMap::addAttribute): Changed to use PassRefPtr,
2081         for fast and correct refCount management. Also, change a rediculously
2082         slow malloc to a slightly less rediculously slow realloc.
2083
2084         * dom/NamedAttrMap.h:
2085         (WebCore::NamedAttrMap::insertAttribute): Changed to use PassRefPtr,
2086         for fast and correct refCount management.
2087
2088         * html/HTMLTokenizer.cpp:
2089         (WebCore::Token::addAttribute): Use a RefPtr, to guarantee that the
2090         object starts with a refCount of 1.
2091
2092 2008-02-06  Darin Adler  <darin@apple.com>
2093
2094         Reviewed by Tim Hatcher.
2095
2096         - fix <rdar://problem/5723293> NULL-deref crash in PropertyMap::put opening web inspector
2097           with View Source window as target
2098
2099         * page/InspectorController.cpp:
2100         (WebCore::canPassNodeToJavaScript): Added. Returns false if the node is in a document with
2101         JavaScript disabled.
2102         (WebCore::InspectorController::inspect): Check canPassNodeToJavaScript and do nothing if
2103         it returns false.
2104
2105 2008-02-06  David Hyatt  <hyatt@apple.com>
2106
2107         Fix for bug 16799, object elements should return absolute URLs from .data.
2108
2109         Reviewed by Mark Rowe
2110
2111         * dom/Document.cpp:
2112         (WebCore::Document::completeURL):
2113         * html/HTMLAnchorElement.cpp:
2114         (WebCore::HTMLAnchorElement::href):
2115         * html/HTMLObjectElement.cpp:
2116         (WebCore::HTMLObjectElement::data):
2117
2118 2008-02-05  Antti Koivisto  <antti@apple.com>
2119
2120         Reviewed by Darin.
2121
2122         <rdar://problem/5726340>
2123         <video autoplay controls> left in unplayable state if navigated away, then back to, before video finished loading
2124         
2125         When moving document in and out from the page cache:
2126         - Cancel incomplete load by deleting the media player. This guarantees everything is in consistent state.
2127         - Restart the load if it was aborted in the middle.
2128
2129         * html/HTMLMediaElement.cpp:
2130         (WebCore::HTMLMediaElement::~HTMLMediaElement):
2131         (WebCore::HTMLMediaElement::load):
2132         (WebCore::HTMLMediaElement::willSaveToCache):
2133         (WebCore::HTMLMediaElement::didRestoreFromCache):
2134         * html/HTMLMediaElement.h:
2135         (WebCore::HTMLMediaElement::player):
2136
2137 2008-02-06  Darin Adler  <darin@apple.com>
2138
2139         Reviewed by Sam.
2140
2141         - replace calls to put to set up properties with calls to putDirect, to
2142           prepare for a future change where put won't take attributes any more,
2143           and for a slight performance boost
2144
2145         * bindings/js/JSAudioConstructor.cpp:
2146         (WebCore::JSAudioConstructor::JSAudioConstructor): Use putDirect instead of put.
2147         * bindings/js/JSEventTargetBase.h:
2148         (WebCore::JSEventTargetPrototype::self): Ditto.
2149         * bindings/js/JSHTMLOptionElementConstructor.cpp:
2150         (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor): Ditto.
2151         * bindings/js/JSSQLResultSetRowListCustom.cpp:
2152         (WebCore::JSSQLResultSetRowList::item): Ditto.
2153
2154 2008-02-06  Dan Bernstein  <mitz@apple.com>
2155
2156         Reviewed by Darin Adler.
2157
2158         - fix http://bugs.webkit.org/show_bug.cgi?17093
2159         'border-color' does not animate to the value of 'color' when unspecified
2160
2161         Test: fast/css/transition-color-unspecified.html
2162
2163         * page/AnimationController.cpp:
2164         (WebCore::ImplicitAnimation::animate): Changed to use the value of the
2165         'color' property in the source or destination style as the source or
2166         destination value of properties whose inital value is defined to be the
2167         computed value of 'color'.
2168
2169 2008-02-06  Dan Bernstein  <mitz@apple.com>
2170
2171         Build fix.
2172
2173         * svg/svgtags.in:
2174
2175 2008-02-05  Oliver Hunt  <oliver@apple.com>
2176
2177         Build fix -- touch generate-bindings to trigger regeneration of bindings
2178
2179         * bindings/scripts/generate-bindings.pl:
2180
2181 2008-02-05  Oliver Hunt  <oliver@apple.com>
2182
2183         RS=Eric.
2184
2185         Re-enable foreignObject by default as it is needed for a number of 
2186         non-fO related SVG tests and none of the old known crashes occur
2187         anymore.
2188
2189         * Configurations/WebCore.xcconfig:
2190         * WebCore.vcproj/WebCore.vcproj:
2191
2192 2008-02-05  Sam Weinig  <sam@webkit.org>
2193
2194         Reviewed by Anders Carlsson.
2195
2196         Fix for http://bugs.webkit.org/show_bug.cgi?id=8080
2197         NodeList (and other DOM lists) items are not enumeratable using for..in
2198
2199         - Match Firefox when enumerating DOM interfaces with indexGetters (support for 
2200           the array bracket, nodeList[0], notation) by including all the items in the
2201           list before the attributes and methods of the interface.
2202
2203         Test: fast/dom/domListEnumeration.html
2204
2205         * ForwardingHeaders/kjs/PropertyNameArray.h: Added.
2206         * bindings/js/JSDOMWindowCustom.cpp:
2207         (WebCore::JSDOMWindow::customGetPropertyNames): Use the new custom method model. 
2208         * bindings/js/JSHistoryCustom.cpp:
2209         (WebCore::JSHistory::customGetPropertyNames): ditto.
2210         * bindings/scripts/CodeGeneratorJS.pm: Instead of just adding a declaration of
2211         getProperyNames and implementing the method in the Custom.cpp, move to a the 
2212         model used by generated getOwnPropertySlot() and put() where the custom code
2213         is written in a separate customGetPropertyNames which returns a bool indicating
2214         whether to call up to the base class.  This enables adding the list indexes
2215         to the PropertyNameArray for interfaces with indexGetters automatically.
2216
2217 2008-02-05  Samuel Weinig  <sam@webkit.org>
2218
2219         Reviewed by Darin Adler.
2220
2221         Fix for <rdar://problem/5726604> 
2222         dom-checker: deleting properties of the window object cross-domain should not be allowed
2223
2224         Fix flaw found while testing with dom-checker testing tool (http://code.google.com/p/dom-checker/).
2225
2226         Test: http/tests/security/cross-frame-access-delete.html
2227
2228         * bindings/js/JSDOMWindowCustom.cpp:
2229         (WebCore::JSDOMWindow::deleteProperty): Override deleteProperty to not delete cross-domain.
2230         * bindings/js/JSHistoryCustom.cpp:
2231         (WebCore::JSHistory::deleteProperty): ditto.
2232         * bindings/js/JSLocation.cpp:
2233         (WebCore::JSLocation::deleteProperty): ditto.
2234         * bindings/js/JSLocation.h:
2235
2236         * bindings/scripts/CodeGeneratorJS.pm: Add deleteProperty declaration when CustomDeleteProperty is used.
2237         * page/DOMWindow.idl: Add CustomDeleteProperty extended attribute.
2238         * page/History.idl: ditto.
2239
2240 2008-02-05  Alp Toker  <alp@atoker.com>
2241
2242         Rubber-stamped by Mark Rowe.
2243
2244         Fix a "missing sentinel in function call" warning by using NULL
2245         instead of 0.
2246
2247         * platform/gtk/RenderThemeGtk.cpp:
2248         (WebCore::RenderThemeGtk::caretBlinkFrequency):
2249
2250 2008-02-05  Nikolas Zimmermann  <zimmermann@kde.org>
2251
2252         Reviewed by Oliver.
2253
2254         Fix dynamic updates of <circle> element's properties.
2255
2256         Added tests: svg/dynamic-updates/SVGCircleElement*
2257
2258         * svg/SVGCircleElement.cpp:
2259         (WebCore::SVGCircleElement::svgAttributeChanged): Mixed up cxAttr/xAttr etc.
2260         * svg/SVGCircleElement.h:
2261
2262 2008-02-05  Rodney Dawes  <dobey@wayofthemonkey.com>
2263
2264         Wx build fix.  Add WebCore/plugins to the include path.
2265
2266         * webcore-base.bkl:
2267
2268 2008-02-05  Mark Rowe  <mrowe@apple.com>
2269
2270         Mac build fix.  Update the Xcode project to follow a moved file,
2271         and track a rename in two files that were missed earlier.
2272
2273         * WebCore.xcodeproj/project.pbxproj:
2274         * page/mac/WebCoreFrameBridge.mm:
2275         (-[WebCoreFrameBridge canProvideDocumentSource]):
2276         * platform/mac/PlugInInfoStoreMac.mm:
2277         (WebCore::PluginInfoStore::pluginNameForMIMEType):
2278
2279 2008-02-05  Nikolas Zimmermann  <zimmermann@kde.org>
2280
2281         Reviewed by Holger.
2282
2283         Fixes: http://bugs.webkit.org/show_bug.cgi?id=17185
2284         Fix dynamic SVG DOM updates of <a> element's href property.
2285
2286         This commit also introduces a new SVG Tests framework: LayoutTests/svg/dynamic-updates
2287         Its purpose is to provide dynamic updating tests for each SVG class & property, aka.
2288         one test per property per class. As a first pass it's sufficient to add testcases for all
2289         SVG*Element classes, and their properties - and only common-used base-class properties.
2290
2291         For SVGAElement - for example - it makes most sense to test scripting its parent
2292         SVGURIReference object ('href' property) and its own property 'target'.
2293
2294         Adding tests to see - for example - if SVGAElement reacts on changes on ie. its parent
2295         SVGExternalResourcesRequired interface, should really be done in a second pass.
2296
2297         All tests within the new framework are supposed to be created using make-js-tests-wrappers.
2298
2299         Added test: svg/dynamic-updates/SVGAElement-dom-href-attr.js
2300         Added test: svg/dynamic-updates/SVGAElement-dom-target-attr.js
2301         Added test: svg/dynamic-updates/SVGAElement-svgdom-href-prop.js
2302         Added test: svg/dynamic-updates/SVGAElement-svgdom-target-prop.js
2303
2304         * svg/SVGAElement.cpp:
2305         (WebCore::SVGAElement::parseMappedAttribute): Move any setChanged() handling in svgAttributeChanged.
2306         (WebCore::SVGAElement::svgAttributeChanged):
2307         (WebCore::SVGAElement::defaultEventHandler): Use href() not getAttribute(hrefAttr) - otherwhise SVG DOM updates fail!
2308         * svg/SVGAElement.h:
2309
2310 2008-02-05  Justin Garcia  <justin.garcia@apple.com>
2311
2312         Reviewed by Alexey Proskuryakov.
2313
2314         <rdar://problem/5685601> webkit-block-placeholder class on placeholders seems unnecessary (12317)
2315
2316         * editing/CompositeEditCommand.cpp:
2317         (WebCore::createBlockPlaceholderElement): The khtml-block-placeholder class was needed
2318         when the editing code actively looked for <br>s of that type in order to handle them
2319         specially.  That is no longer the case.
2320         * editing/InsertParagraphSeparatorCommand.cpp:
2321         (WebCore::InsertParagraphSeparatorCommand::doApply): Fixed a bug where an extra block
2322         would be inserted when hitting return inside an editable root held open by a placeholder
2323         <br> or '\n'.  Added test cases for the bug and for the special case code that was incorrectly
2324         triggered to cause the bug. 
2325
2326 2008-02-05  Rodney Dawes  <dobey@wayofthemonkey.com>
2327
2328         Reviewed by Anders Carlsson.
2329
2330         Part one of http://bugs.webkit.org/show_bug.cgi?id=16924.
2331         Shared PluginDatabase, PluginInfoStore and PluginPackage implementations.
2332
2333         Remove the Win suffix on several plugin-related classes that will
2334         soon be refactored to be more portable.
2335
2336         * WebCore.vcproj/WebCore.vcproj:
2337         * bindings/js/kjs_navigator.cpp:
2338         (KJS::PluginBase::cachePluginDataIfNecessary):
2339         * bindings/js/kjs_window.cpp:
2340         * bridge/win/FrameWin.cpp:
2341         (WebCore::Frame::createScriptInstanceForWidget):
2342         * dom/Clipboard.cpp:
2343         * dom/DOMImplementation.cpp:
2344         (WebCore::DOMImplementation::createDocument):
2345         * loader/FrameLoader.cpp:
2346         (WebCore::FrameLoader::shouldUsePlugin):
2347         * page/DragController.cpp:
2348         * platform/PlugInInfoStore.h: Removed.
2349         * platform/gtk/TemporaryLinkStubs.cpp:
2350         (PluginInfoStore::createPluginInfoForPluginAtIndex):
2351         (PluginInfoStore::pluginCount):
2352         (PluginInfoStore::pluginNameForMIMEType):
2353         (WebCore::PluginInfoStore::supportsMIMEType):
2354         * platform/qt/PlugInInfoStoreQt.cpp:
2355         (WebCore::PluginInfoStore::createPluginInfoForPluginAtIndex):
2356         (WebCore::PluginInfoStore::pluginCount):
2357         (WebCore::PluginInfoStore::pluginNameForMIMEType):
2358         (WebCore::PluginInfoStore::supportsMIMEType):
2359         * platform/qt/TemporaryLinkStubs.cpp:
2360         * platform/win/SharedTimerWin.cpp:
2361         (WebCore::TimerWindowWndProc):
2362         * platform/wx/TemporaryLinkStubs.cpp:
2363         (PluginInfoStore::createPluginInfoForPluginAtIndex):
2364         (PluginInfoStore::pluginCount):
2365         (WebCore::PluginInfoStore::supportsMIMEType):
2366         (PluginInfoStore::pluginNameForMIMEType):
2367         * plugins/PluginDatabase.h: Copied from WebCore/plugins/win/PluginDatabaseWin.h.
2368         * plugins/PluginInfoStore.cpp: Copied from WebCore/plugins/win/PlugInInfoStoreWin.cpp.
2369         (WebCore::PluginInfoStore::createPluginInfoForPluginAtIndex):
2370         (WebCore::PluginInfoStore::pluginCount):
2371         (WebCore::PluginInfoStore::pluginNameForMIMEType):
2372         (WebCore::PluginInfoStore::supportsMIMEType):
2373         (WebCore::refreshPlugins):
2374         * plugins/PluginInfoStore.h: Copied from WebCore/platform/PlugInInfoStore.h.
2375         * plugins/PluginPackage.h: Copied from WebCore/plugins/win/PluginPackageWin.h.
2376         (WebCore::PluginPackageHash::hash):
2377         (WebCore::PluginPackageHash::equal):
2378         (WTF::):
2379         * plugins/PluginView.h: Copied from WebCore/plugins/win/PluginViewWin.h.
2380         (WebCore::PluginView::plugin):
2381         * plugins/npapi.cpp: Copied from WebCore/plugins/win/npapi.cpp.
2382         (pluginViewForInstance):
2383         (NPN_UserAgent):
2384         * plugins/win/PlugInInfoStoreWin.cpp: Removed.
2385         * plugins/win/PluginDatabaseWin.cpp:
2386         (WebCore::PluginDatabase::installedPlugins):
2387         (WebCore::PluginDatabase::addExtraPluginPath):
2388         (WebCore::PluginDatabase::refresh):
2389         (WebCore::PluginDatabase::plugins):
2390         (WebCore::addPluginsFromRegistry):
2391         (WebCore::PluginDatabase::getPluginsInPaths):
2392         (WebCore::PluginDatabase::defaultPluginPaths):
2393         (WebCore::PluginDatabase::isMIMETypeRegistered):
2394         (WebCore::PluginDatabase::pluginForMIMEType):
2395         (WebCore::PluginDatabase::MIMETypeForExtension):
2396         (WebCore::PluginDatabase::findPlugin):
2397         (WebCore::PluginDatabase::createPluginView):
2398         * plugins/win/PluginDatabaseWin.h: Removed.
2399         * plugins/win/PluginPackageWin.cpp:
2400         (WebCore::PluginPackage::~PluginPackage):
2401         (WebCore::PluginPackage::freeLibrarySoon):
2402         (WebCore::PluginPackage::freeLibraryTimerFired):
2403         (WebCore::PluginPackage::PluginPackage):
2404         (WebCore::PluginPackage::compareFileVersion):
2405         (WebCore::PluginPackage::storeFileVersion):
2406         (WebCore::PluginPackage::isPluginBlacklisted):
2407         (WebCore::PluginPackage::fetchInfo):
2408         (WebCore::PluginPackage::load):
2409         (WebCore::PluginPackage::unload):
2410         (WebCore::PluginPackage::unloadWithoutShutdown):
2411         (WebCore::PluginPackage::createPackage):
2412         (WebCore::PluginPackage::hash):
2413         (WebCore::PluginPackage::equal):
2414         * plugins/win/PluginPackageWin.h: Removed.
2415         * plugins/win/PluginViewWin.cpp:
2416         (WebCore::PluginRequest::PluginRequest):
2417         (WebCore::PluginMessageThrottlerWin::PluginMessageThrottlerWin):
2418         (WebCore::registerPluginView):
2419         (WebCore::PluginViewWndProc):
2420         (WebCore::PluginView::popPopupsStateTimerFired):
2421         (WebCore::PluginView::wndProc):
2422         (WebCore::PluginView::updateWindow):
2423         (WebCore::PluginView::windowClipRect):
2424         (WebCore::PluginView::setFrameGeometry):
2425         (WebCore::PluginView::geometryChanged):
2426         (WebCore::PluginView::setFocus):
2427         (WebCore::PluginView::show):
2428         (WebCore::PluginView::hide):
2429         (WebCore::PluginView::paintMissingPluginIcon):
2430         (WebCore::PluginView::dispatchNPEvent):
2431         (WebCore::PluginView::paint):
2432         (WebCore::PluginView::handleKeyboardEvent):
2433         (WebCore::PluginView::handleMouseEvent):
2434         (WebCore::PluginView::handleEvent):
2435         (WebCore::PluginView::setParent):
2436         (WebCore::PluginView::attachToWindow):
2437         (WebCore::PluginView::detachFromWindow):
2438         (WebCore::PluginView::setNPWindowRect):
2439         (WebCore::PluginView::start):
2440         (WebCore::PluginView::stop):
2441         (WebCore::PluginView::setCurrentPluginView):
2442         (WebCore::PluginView::currentPluginView):
2443         (WebCore::PluginView::performRequest):
2444         (WebCore::PluginView::requestTimerFired):
2445         (WebCore::PluginView::scheduleRequest):
2446         (WebCore::PluginView::load):
2447         (WebCore::PluginView::getURLNotify):
2448         (WebCore::PluginView::getURL):
2449         (WebCore::PluginView::handlePost):
2450         (WebCore::PluginView::postURLNotify):
2451         (WebCore::PluginView::postURL):
2452         (WebCore::PluginView::newStream):
2453         (WebCore::PluginView::write):
2454         (WebCore::PluginView::destroyStream):
2455         (WebCore::PluginView::userAgent):
2456         (WebCore::PluginView::status):
2457         (WebCore::PluginView::getValue):
2458         (WebCore::PluginView::setValue):
2459         (WebCore::PluginView::invalidateTimerFired):
2460         (WebCore::PluginView::invalidateRect):
2461         (WebCore::PluginView::invalidateRegion):
2462         (WebCore::PluginView::forceRedraw):
2463         (WebCore::PluginView::pushPopupsEnabledState):
2464         (WebCore::PluginView::popPopupsEnabledState):
2465         (WebCore::PluginView::arePopupsAllowed):
2466         (WebCore::PluginView::bindingInstance):
2467         (WebCore::PluginView::~PluginView):
2468         (WebCore::PluginView::disconnectStream):
2469         (WebCore::PluginView::determineQuirks):
2470         (WebCore::PluginView::setParameters):
2471         (WebCore::PluginView::PluginView):
2472         (WebCore::PluginView::init):
2473         (WebCore::PluginView::didReceiveResponse):
2474         (WebCore::PluginView::didReceiveData):
2475         (WebCore::PluginView::didFinishLoading):
2476         (WebCore::PluginView::didFail):
2477         (WebCore::PluginView::setCallingPlugin):
2478         (WebCore::PluginView::isCallingPlugin):
2479         * plugins/win/PluginViewWin.h: Removed.
2480         * plugins/win/npapi.cpp: Removed.
2481
2482 2008-02-05  Alexey Proskuryakov  <ap@webkit.org>
2483
2484         Reviewed by Darin.
2485
2486         http://bugs.webkit.org/show_bug.cgi?id=17158
2487         Setting innerHTML in a detached XHTML element doesn't use the right namespace
2488
2489         Test: fast/dom/innerHTML-detached-element.xhtml
2490
2491         * dom/XMLTokenizer.cpp: (WebCore::XMLTokenizer::XMLTokenizer): Take parent element namespace
2492         into account.
2493
2494 2008-02-05  Antti Koivisto  <antti@apple.com>
2495
2496         Reviewed by Geoff.
2497         
2498         Fix <rdar://problem/5698200>
2499         eBay photo uploading hangs and causes slow script warning to pop up
2500         
2501         In a case like this
2502         
2503             var f = window.parent.parentFunction;
2504             document.domain = document.domain; // this makes window.parent inaccessible
2505             f();
2506         
2507         Firefox allows parentFunction to access parents properties. Match this behavior.
2508         
2509         In a domain security check against the dynamic global object fails for the specific reason that one of 
2510         the frames has written to the document.domain property and another has not (but they match otherwise), 
2511         then recheck against the lexical global object.
2512
2513         Test: http/tests/security/cross-frame-access-callback-explicit-domain-ALLOW.html
2514               http/tests/security/cross-frame-access-callback-explicit-domain-DENY.html
2515
2516         * bindings/js/kjs_window.cpp:
2517         (KJS::Window::allowsAccessFrom):
2518         (KJS::Window::printErrorMessage):
2519         * bindings/js/kjs_window.h:
2520         * loader/FrameLoader.cpp:
2521         (WebCore::FrameLoader::shouldAllowNavigation):
2522         * platform/SecurityOrigin.cpp:
2523         (WebCore::SecurityOrigin::canAccess):
2524         * platform/SecurityOrigin.h:
2525         (WebCore::SecurityOrigin::):
2526
2527 2008-02-05  Adam Roben  <aroben@apple.com>
2528
2529         Remove an unused member from Document
2530
2531         Reviewed by Mitz.
2532
2533         * dom/Document.cpp:
2534         (WebCore::Document::recalcStyleSelector): There's no need to take
2535         m_printSheet into account anymore as it's never anything but the null
2536         string.
2537         * dom/Document.h: Removed m_printSheet and methods relating to it.
2538
2539 2008-02-05  Dan Bernstein  <mitz@apple.com>
2540
2541         Reviewed by Darin Adler.
2542
2543         - WebCore part of <rdar://problem/5724303> Should implement writing direction shortcuts
2544
2545         * WebCore.base.exp: Added Editor::setBaseWritingDirection() and
2546         Frame::baseWritingDirectionForSelectionStart().
2547         * page/mac/WebCoreFrameBridge.h: Removed
2548         -baseWritingDirectionForSelectionStart.
2549         * page/mac/WebCoreFrameBridge.mm: Ditto.
2550
2551 2008-02-05  Mark Rowe  <mrowe@apple.com>
2552
2553         Reviewed by Oliver Hunt.
2554
2555         Update versioning to support the mysterious future.
2556
2557         * Configurations/Version.xcconfig: Add SYSTEM_VERSION_PREFIX_1060.
2558
2559 2008-02-05  Mark Rowe  <mrowe@apple.com>
2560
2561         Fix the wxWidget Mac build by avoiding using ICU functions that were added after ICU 3.2.
2562
2563         * editing/SmartReplaceICU.cpp:
2564         (WebCore::addAllCodePoints): Implement a replacement for uset_addAllCodePoints.
2565         (WebCore::getSmartSet): Use addAllCodePoints instead of uset_addAllCodePoints.
2566
2567 2008-02-05  Mark Rowe  <mrowe@apple.com>
2568
2569         Rubber-stamped by Oliver Hunt.
2570
2571         30,000!
2572
2573         * ChangeLog: Point out revision 30,000.
2574
2575 2008-02-04  Mark Rowe  <mrowe@apple.com>
2576
2577         Unreviewed Gtk build fix.
2578
2579         wchar_t is only convertible to UChar on Windows.  Use WebCore's String class
2580         to get the UChars out of a C string in a portable fashion.
2581
2582         * editing/SmartReplaceICU.cpp:
2583         (WebCore::getSmartSet):
2584
2585 2008-02-04  Tony Chang  <idealisms@gmail.com>
2586
2587         Reviewed by Darin Adler.
2588
2589         Port the CoreFoundation version of WebCore::isCharacterSmartReplaceExempt
2590         for other platforms by using ICU directly.
2591
2592         * GNUmakefile.am: Add SmartReplaceICU.cpp.
2593         * WebCore.pro: Ditto.
2594         * WebCoreSources.bkl: Ditto.
2595         * editing/SmartReplace.cpp: Don't use this empty implementation when ICU is available.
2596         * editing/SmartReplaceICU.cpp:
2597         (getSmartSet):
2598         (WebCore::isCharacterSmartReplaceExempt):
2599
2600 2008-02-04  Robert Sesek  <rsesek@bluestatic.org>
2601
2602         Reviewed by Darin Adler.
2603
2604         Fix http://bugs.webkit.org/show_bug.cgi?id=17042
2605         forms without action attributes submit to the <base> href instead of the originating page
2606
2607         Test: fast/forms/missing-action.html
2608
2609         * html/HTMLFormElement.cpp:
2610         (WebCore::HTMLFormElement::submit): Submit to origin if there is no action
2611
2612 2008-02-04  Mark Rowe  <mrowe@apple.com>
2613
2614         Reviewed by Tim Hatcher.
2615
2616         Gtk build fix.  Use std::numeric_limits in place of ULLONG_MAX as
2617         some Linux machines do not have ULLONG_MAX.
2618
2619         OriginUsageRecord::unknownDiskUsage becomes a static function to avoid
2620         the global initialiser which would otherwise be generated.
2621
2622         * storage/OriginUsageRecord.cpp:
2623         (WebCore::OriginUsageRecord::unknownDiskUsage):
2624         (WebCore::OriginUsageRecord::addDatabase):
2625         (WebCore::OriginUsageRecord::removeDatabase):
2626         (WebCore::OriginUsageRecord::markDatabase):
2627         (WebCore::OriginUsageRecord::diskUsage):
2628         * storage/OriginUsageRecord.h:
2629
2630 2008-02-04  Mark Rowe  <mrowe@apple.com>
2631
2632         Speculative Gtk build fix.
2633
2634         * storage/OriginUsageRecord.cpp:
2635
2636 2008-02-04  Brady Eidson  <beidson@apple.com>
2637
2638         Attempt to fix build of all non-Mac platforms
2639
2640         * GNUmakefile.am:
2641         * WebCore.pro:
2642         * WebCore.vcproj/WebCore.vcproj:
2643         * WebCoreSources.bkl:
2644
2645 2008-02-04  Brady Eidson  <beidson@apple.com>
2646
2647         Reviewed by Darin
2648
2649         Fix for <rdar://problem/5628468> - Quotas need to be implemented per-origin, and not per-database
2650
2651         To accomplish this, we need to track the sizes of all databases in an origin to constantly keep an up to date
2652         count of the origin's total disk usage.  I've introduced the OriginQuotaManager and OriginUsageRecord classes
2653         to accomplish this.
2654
2655         Whenever a transaction is known to mutate the size of a database (tracked by the DatabaseAuthorizer), it marks
2656         that database as unknown in the OriginQuotaManager.  When a transaction later comes along to ask the 
2657         OriginQuotaManager the usage for that origin, it stat's all of the unknown databases in the origin and returns
2658         the result.
2659
2660         Since the OriginQuotaManager is interesting from both the main thread and a DatabaseThread, all accessors it 
2661         provides require it to be locked first.  ASSERTs help guarantee this is always the case.
2662
2663         Layout test will involve adding functionality to DRT on multiple platforms and will be coming up shortly
2664
2665         * WebCore.xcodeproj/project.pbxproj:
2666
2667         * platform/SecurityOrigin.h: Changed to be ThreadSafeShared instead of RefCounted
2668
2669         * storage/Database.cpp:
2670         (WebCore::Database::databaseSize): Return the current filesize of this database on disk
2671         (WebCore::Database::maximumSize): Added - calculates maximum size of this database based on quota and usage
2672         * storage/Database.h: Add databaseSize() accessor, and get rid of unused declared methods that *were* going 
2673           to be the solution for this bug.
2674
2675         * storage/DatabaseTracker.cpp:
2676         (WebCore::DatabaseTracker::originQuotaManager): Accessor to the OriginQuotaManager which is lazily created
2677         (WebCore::DatabaseTracker::canEstablishDatabase): Fetch the usage for this database slightly earlier, which
2678           will ensure that the OriginQuotaManager is primed to track this origin
2679         (WebCore::DatabaseTracker::fullPathForDatabase): Ditto
2680         (WebCore::DatabaseTracker::populateOrigins): Create the OriginQuotaManager here.
2681         (WebCore::DatabaseTracker::usageForOrigin): Use the OriginQuotaManager instead of looping through each database
2682           in the origin
2683         (WebCore::DatabaseTracker::deleteOrigin): Remove this origin from the OriginQuotaManager as it is no longer 
2684           interesting
2685         (WebCore::DatabaseTracker::deleteDatabase): Remove this database from the OriginQuotaManager as it is no longer
2686           interesting
2687         * storage/DatabaseTracker.h:
2688
2689         * storage/OriginQuotaManager.cpp: Added.
2690         (WebCore::OriginQuotaManager::OriginQuotaManager):
2691         (WebCore::OriginQuotaManager::lock):
2692         (WebCore::OriginQuotaManager::unlock):
2693         (WebCore::OriginQuotaManager::trackOrigin): Add an origin to be tracked.  Useful for when the very first database 
2694           in a new origin is still in the process of being created
2695         (WebCore::OriginQuotaManager::tracksOrigin):
2696         (WebCore::OriginQuotaManager::addDatabase):
2697         (WebCore::OriginQuotaManager::removeDatabase):
2698         (WebCore::OriginQuotaManager::removeOrigin): Removes all records in a certain origin from being tracked
2699         (WebCore::OriginQuotaManager::markDatabase): Mark a specific database as having an unknown size - called when the
2700           DatabaseAuthorizer in a SQLTransaction knows the file size might change.
2701         (WebCore::OriginQuotaManager::diskUsage): Returns the disk usage for the given origin
2702         * storage/OriginQuotaManager.h: Added.
2703
2704         * storage/OriginUsageRecord.cpp: Added.
2705         (WebCore::OriginUsageRecord::OriginUsageRecord):
2706         (WebCore::OriginUsageRecord::addDatabase): Adds an entry for the database in this origin's record
2707         (WebCore::OriginUsageRecord::removeDatabase): Removes that entry
2708         (WebCore::OriginUsageRecord::markDatabase): Marks the database as of unknown size
2709         (WebCore::OriginUsageRecord::diskUsage): Returns the cached disk usage value, or recalculates it if any databases
2710           are marked
2711         * storage/OriginUsageRecord.h: Added.
2712
2713         * storage/SQLTransaction.cpp:
2714         (WebCore::SQLTransaction::openTransactionAndPreflight): Use Database::maximumSize() instead of attributing the
2715           entire quota to each database.
2716         (WebCore::SQLTransaction::runStatements): Use Database::maximumSize() instead of attributing the entire quota
2717           to each database.
2718         (WebCore::SQLTransaction::runCurrentStatement): Mark this databases's size as unknown in the 
2719           OriginQuotaManager if this statement will change the size of the database
2720         * storage/SQLTransaction.h:
2721
2722 2008-02-04   David Harrison  <harrison@apple.com>
2723
2724         Reviewed by Darin Adler.
2725
2726         <rdar://problem/5607381> CrashTracer: [REGRESSION] 1748 crashes in Safari at com.apple.WebCore: WebCore::Image::width const + 24
2727
2728         Use an empty image when the local image file could not be loaded.
2729
2730         No test case because it would require forcing tiff load failure.
2731         
2732         * editing/DeleteButtonController.cpp:
2733         (WebCore::DeleteButtonController::createDeletionUI):
2734         Do not present the deletion UI in the (odd) event that the delete button could not be loaded.
2735         
2736         * platform/graphics/mac/ImageMac.mm:
2737         (WebCore::Image::loadPlatformResource):
2738         Return an empty image instead of 0 if the load fails.
2739
2740 2008-02-04  Darin Adler  <darin@apple.com>
2741
2742         * dom/Document.cpp:
2743         (WebCore::Document::completeURL): Fixed misleading comment.
2744
2745 2008-02-04  Jon Honeycutt  <jhoneycutt@apple.com>
2746
2747         Reviewed by Darin.
2748
2749         Blacklist Silverlight versions older than min required, not newer. 
2750
2751         * plugins/win/PluginPackageWin.cpp:
2752         (WebCore::PluginPackageWin::isPluginBlacklisted):
2753
2754 2008-02-04  David Hyatt  <hyatt@apple.com>
2755
2756         Fix for bug 16751, misparsing of html*.test in CSS.
2757
2758         Reviewed by darin
2759
2760         Added fast/css/simple-selector-chain-parsing.html
2761
2762         * css/CSSGrammar.y:
2763
2764 2008-02-04  Darin Adler  <darin@apple.com>
2765
2766         Suggested by Geoff and Maciej.
2767
2768         * bindings/js/JSCustomSQLTransactionCallback.cpp: Reworded a misleading
2769         comment to be correct.
2770
2771 2008-02-04  Jon Honeycutt  <jhoneycutt@apple.com>
2772
2773         Reviewed by Steve, Anders.
2774
2775         <rdar://problem/5211187> QuickTime and Flash plug-ins draw outside of
2776         content area when inside an iframe or div with overflow when playing a
2777         movie and scrolling the iframe/div area
2778
2779         Clip the update region to the zero rect when scrolling. Don't do this
2780         for Java, because it results in repaint problems. 
2781
2782         * plugins/PluginQuirkSet.h: Added the DontClipToZeroRectWhenScrolling
2783         quirk
2784         (WebCore::):
2785         * plugins/win/PluginViewWin.cpp:
2786         (WebCore::PluginViewWin::updateWindow): Readded the old behavior of
2787         clipping to the zero rect when updating the window during a scroll.
2788         Added plug-in quirk to ignore this behavior for Java. Swapped order of
2789         the SetWindowRgn() and MoveWindow() calls to prevent Java from painting
2790         outside of its container during a scroll.
2791         (WebCore::PluginViewWin::determineQuirks): If this is Java, add the
2792         DontClipToZeroRectWhenScrolling quirk.
2793
2794 2008-02-04  Timothy Hatcher  <timothy@apple.com>
2795
2796         Reviewed by Mark Rowe.
2797
2798         <rdar://problem/5722972> Leopard needs to statically link SQLite
2799
2800         * Configurations/Base.xcconfig: Always have a header search path for WebCoreSQLite3.
2801         * Configurations/DebugRelease.xcconfig: Ditto.
2802         * Configurations/WebCore.xcconfig: Always link against WebCoreSQLite3.
2803
2804 2008-02-04  Adam Roben  <aroben@apple.com>
2805
2806         Windows build fix
2807
2808         * bindings/scripts/CodeGeneratorCOM.pm: Touched to force a rebuild of
2809         the COM bindings.
2810
2811 2008-02-04   David Harrison  <harrison@apple.com>
2812
2813         Reviewed by Tim Hatcher.
2814
2815         - fix <rdar://problem/5715481> REGRESSION (r26499): JavaScript document.lastModified is not supported
2816
2817         Re-add attribute inadvertantly lost by r26499.
2818
2819         Test: fast/js/lastModified.html: Added.
2820
2821         * dom/Document.idl:
2822         Add lastModified.
2823
2824 2008-02-04  Darin Adler  <darin@apple.com>
2825
2826         Reviewed by Geoff.
2827
2828         - fix <rdar://problem/5713621> Threading issue when destroying database transaction callback
2829
2830         Do main-thread-only stuff on the main thread.
2831
2832         Not clear how to make a regression test for this.
2833
2834         * bindings/js/JSCustomSQLTransactionCallback.cpp:
2835         (WebCore::JSCustomSQLTransactionCallback::Data::Data): Added.
2836         (WebCore::JSCustomSQLTransactionCallback::Data::callback): Added.
2837         (WebCore::JSCustomSQLTransactionCallback::Data::frame): Added.
2838         (WebCore::JSCustomSQLTransactionCallback::JSCustomSQLTransactionCallback): Put data into a
2839         separate Data object; we'll destroy it on the main thread.
2840         (WebCore::JSCustomSQLTransactionCallback::deleteData): Added.
2841         (WebCore::JSCustomSQLTransactionCallback::~JSCustomSQLTransactionCallback): Call the
2842         deleteData function on the main thread.
2843         (WebCore::JSCustomSQLTransactionCallback::handleEvent): Updated to get at fields through the
2844         m_data object.
2845         * bindings/js/JSCustomSQLTransactionCallback.h: Declare deleteData, Data, and m_data rather
2846         than m_callback and m_frame.
2847
2848 2008-02-04  Adam Roben  <aroben@apple.com>
2849
2850         Fix the search field if the inpsected Document has overridden
2851         Document.evaluate or Document.querySelectorAll
2852
2853         Reviewed by Darin.
2854
2855         * manual-tests/inspector-document-methods-override.html: Added.
2856         * page/InspectorController.cpp:
2857         (WebCore::InspectorController::didCommitLoad): Reworded a comment to
2858         force WebCore.vcproj to build.
2859         * page/inspector/inspector.js: Call
2860         Document.prototype.{evaluate,querySelectorAll}.call instead of calling
2861         the functions directly on the inspected Document. This ensures we are
2862         calling the version of these functions we intended to.
2863
2864 2008-02-04  Darin Adler  <darin@apple.com>
2865
2866         Reviewed by Tim Hatcher.
2867
2868         - possible fix for <rdar://problem/5714030> Crash in Database::deliverAllPendingCallbacks()
2869           reloading a page quickly
2870
2871         I don't fully understand the cause of the crash, but I think this might
2872         be a helpful change.
2873
2874         * platform/sql/SQLiteTransaction.cpp:
2875         (WebCore::SQLiteTransaction::commit): If the commit fails, don't leave this
2876         transaction and database both marked as "still in progress". As far as I can
2877         tell this does no good, and also seems to do harm.
2878         (WebCore::SQLiteTransaction::rollback): Ditto.
2879
2880         * storage/Database.cpp:
2881         (WebCore::Database::performTransactionStep): Add some assertions to
2882         detect databases stuck in the "transaction in progress" state.
2883         * storage/SQLTransaction.cpp:
2884         (WebCore::SQLTransaction::openTransactionAndPreflight): Ditto.
2885         (WebCore::SQLTransaction::postflightAndCommit): Ditto.
2886         (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback): Ditto.
2887
2888 2008-02-04  Darin Adler  <darin@apple.com>
2889
2890         Reviewed by Geoff.
2891
2892         - fix <rdar://problem/5715692> REGRESSION (r28570): JavaScript window.scrollTo()
2893           calls no longer accept 'undefined' values
2894
2895         By default, we should accept non-numeric parameters and non-integral numbers for
2896         parameters that expect integers, without throwing exceptions.
2897
2898         While creating the test for this, I ran into a couple minor bugs with the
2899         functions involved, and this patch fixes those too.
2900
2901         Test: fast/dom/non-numeric-values-numeric-parameters.html
2902
2903         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
2904         (WebCore::JSHTMLOptionsCollection::add): Added. This function has unusual behavior
2905         when passed non-integral values for its second parameter, so it needs to be written
2906         by hand. I think that [Custom] is better here than inventing a new keyword.
2907
2908         * bindings/scripts/CodeGeneratorJS.pm: Changed default for "long" and "unsigned long"
2909         to ignore errors rather than failing due to type differences. Also changed a couple
2910         functions to use hashes.
2911
2912         * css/CSSStyleSheet.h:
2913         (WebCore::CSSStyleSheet::removeRule): Remove overload of removeRule without a second
2914         parameters. While we do allow this from JavaScript, it's not a true optional parameter,
2915         but rather just a case of "you can omit parameters and they are treated as undefined"
2916         combined with "undefined turns into 0 when passed to a function that takes an integer".
2917         * css/CSSStyleSheet.idl: Removed [Optional] on the index parameter for removeRule.
2918         This is not truly an optional parameter.
2919
2920         * dom/ProgressEvent.cpp:
2921         (WebCore::ProgressEvent::initProgressEvent): Updated this function to match other
2922         DOM event init functions -- important to do nothing if this is called on the an
2923         already-dispatched event and we need to respect the bubble and cancelable arguments.
2924         Also removed initProgressEventNS. We don't support namespaced events, and if we add
2925         support, it should be across all event classes, not just ProgressEvent.
2926         * dom/ProgressEvent.h: Removed initProgressEventNS.
2927         * dom/ProgressEvent.idl: Ditto.
2928
2929         * dom/Range.cpp:
2930         (WebCore::Range::createContextualFragment): Added a check for 0. This can happen
2931         if the passed-in start container is a node that's not an HTML element and also
2932         does not have a parent.
2933
2934         * html/HTMLOptionsCollection.idl: Added the [Custom] attribute to add, since the
2935         rules for processing its parameters are unusual.
2936
2937         * page/DOMSelection.cpp: Removed the version of setPosition that has only
2938         one parameter. The offset is not really optional.
2939         * page/DOMSelection.h: Ditto.
2940         * page/DOMSelection.idl: Removed the [Optional] keyword for the second parameter of
2941         setPosition. It's not a true optional parameter (see discussion of removeRule above).
2942
2943         * page/DOMWindow.cpp:
2944         (WebCore::DOMWindow::adjustWindowRect): Simplified logic for constraining the X
2945         and Y coordinates, in a way that makes them work even when the window coordinates
2946         are infinite. Also strengthened the assertion.
2947
2948 2008-02-04  Alp Toker  <alp@atoker.com>
2949
2950         Rubber-stamped by Mark Rowe.
2951
2952         Remove all trailing whitespace in the GTK+ port and related
2953         components.
2954
2955         * GNUmakefile.am:
2956         * page/gtk/DragControllerGtk.cpp:
2957         (WebCore::DragController::dragOperation):
2958         (WebCore::DragController::maxDragImageSize):
2959         * page/gtk/EventHandlerGtk.cpp:
2960         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
2961         (WebCore::EventHandler::createDraggingClipboard):
2962         * page/gtk/FrameGtk.cpp:
2963         (WebCore::Frame::dragImageForSelection):
2964         * platform/graphics/cairo/AffineTransformCairo.cpp:
2965         (WebCore::AffineTransform::mapRect):
2966         (WebCore::AffineTransform::isIdentity):
2967         (WebCore::AffineTransform::operator== ):
2968         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2969         (WebCore::GraphicsContext::drawLine):
2970         * platform/graphics/cairo/ImageBufferCairo.cpp:
2971         * platform/graphics/cairo/ImageCairo.cpp:
2972         * platform/graphics/cairo/ImageSourceCairo.cpp:
2973         (WebCore::createDecoder):
2974         * platform/graphics/gtk/FontCacheGtk.cpp:
2975         * platform/graphics/gtk/FontGtk.cpp:
2976         * platform/graphics/gtk/FontPlatformData.h:
2977         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
2978         * platform/graphics/gtk/GlyphPageTreeNodeGtk.cpp:
2979         * platform/graphics/gtk/IconGtk.cpp:
2980         * platform/graphics/gtk/ImageGtk.cpp:
2981         * platform/graphics/gtk/SimpleFontDataGtk.cpp:
2982         * platform/gtk/ClipboardGtk.h:
2983         * platform/gtk/ContextMenuItemGtk.cpp:
2984         (WebCore::ContextMenuItem::createNativeMenuItem):
2985         * platform/gtk/CursorGtk.cpp:
2986         * platform/gtk/DragDataGtk.cpp:
2987         * platform/gtk/DragImageGtk.cpp:
2988         (WebCore::createDragImageIconForCachedImage):
2989         * platform/gtk/FileChooserGtk.cpp:
2990         (WebCore::stringByAdoptingFileSystemRepresentation):
2991         * platform/gtk/FileSystemGtk.cpp:
2992         (WebCore::fileExists):
2993         (WebCore::deleteFile):
2994         (WebCore::deleteEmptyDirectory):
2995         * platform/gtk/KeyEventGtk.cpp:
2996         * platform/gtk/KeyboardCodes.h:
2997         * platform/gtk/LocalizedStringsGtk.cpp:
2998         (WebCore::inputElementAltText):
2999         (WebCore::resetButtonDefaultLabel):
3000         (WebCore::fileButtonChooseFileLabel):
3001         (WebCore::fileButtonNoFileSelectedLabel):
3002         (WebCore::contextMenuItemTagOpenImageInNewWindow):
3003         * platform/gtk/MIMETypeRegistryGtk.cpp:
3004         (WebCore::):
3005         * platform/gtk/MouseEventGtk.cpp:
3006         * platform/gtk/PasteboardGtk.cpp:
3007         (WebCore::PasteboardSelectionData::markup):
3008         (WebCore::Pasteboard::writeSelection):
3009         * platform/gtk/PasteboardHelper.h:
3010         * platform/gtk/PlatformScreenGtk.cpp:
3011         (WebCore::screenDepth):
3012         (WebCore::screenIsMonochrome):
3013         (WebCore::screenRect):
3014         (WebCore::screenAvailableRect):
3015         * platform/gtk/PlatformScrollBar.h:
3016         * platform/gtk/PlatformScrollBarGtk.cpp:
3017         (PlatformScrollbar::PlatformScrollbar):
3018         (PlatformScrollbar::updateThumbPosition):
3019         * platform/gtk/PopupMenuGtk.cpp:
3020         (WebCore::PopupMenu::updateFromElement):
3021         * platform/gtk/RenderThemeGtk.h:
3022         * platform/gtk/ScrollViewGtk.cpp:
3023         (WebCore::ScrollView::scrollBy):
3024         (WebCore::ScrollView::addChild):
3025         (WebCore::ScrollView::updateScrollbars):
3026         (WebCore::ScrollView::windowToContents):
3027         (WebCore::ScrollView::contentsToWindow):
3028         (WebCore::ScrollView::scrollbarUnderMouse):
3029         * platform/gtk/SearchPopupMenuGtk.cpp:
3030         * platform/gtk/SharedTimerGtk.cpp:
3031         * platform/gtk/SystemTimeLinux.cpp:
3032         (WebCore::currentTime):
3033         * platform/gtk/TemporaryLinkStubs.cpp:
3034         (PlugInInfoStore::pluginNameForMIMEType):
3035         * platform/gtk/ThreadingGtk.cpp:
3036         (WebCore::establishIdentifierForThread):
3037         (WebCore::threadForIdentifier):
3038         (WebCore::clearThreadForIdentifier):
3039         (WebCore::ThreadCondition::ThreadCondition):
3040         * platform/gtk/WheelEventGtk.cpp:
3041         * platform/gtk/WidgetGtk.cpp:
3042         * platform/network/curl/ResourceHandleCurl.cpp:
3043         * platform/network/curl/ResourceHandleManager.cpp:
3044         (WebCore::ResourceHandleManager::setupPOST):
3045         * platform/network/curl/ResourceHandleManager.h:
3046         * platform/network/curl/ResourceRequest.h:
3047         (WebCore::ResourceRequest::ResourceRequest):
3048         * platform/network/curl/ResourceResponse.h:
3049
3050 2008-02-03  Christian Dywan  <christian@imendio.com>
3051
3052         Reviewed by Alp Toker.
3053
3054         http://bugs.webkit.org/show_bug.cgi?id=17046
3055         [GTK] Context menu fixes and customisation suport
3056
3057         Provide standard GTK+ context menu items where appropriate.
3058
3059         Note that this change makes direct use of WebKit from WebCore which is
3060         against WebKit/GTK+ guidelines. The ContextMenu abstraction should be
3061         fixed at some point.
3062
3063         * page/ContextMenuController.cpp:
3064         (WebCore::ContextMenuController::contextMenuItemSelected):
3065         * platform/ContextMenu.cpp:
3066         (WebCore::createAndAppendInputMethodsSubMenu):
3067         (WebCore::):
3068         (WebCore::insertControlCharacter):
3069         (WebCore::createAndAppendUnicodeSubMenu):
3070         (WebCore::ContextMenu::populate):
3071         (ContextMenu::checkOrEnableIfNeeded):
3072         * platform/ContextMenuItem.h:
3073         (WebCore::):
3074         * platform/LocalizedStrings.h:
3075         * platform/gtk/ContextMenuItemGtk.cpp:
3076         (WebCore::gtkStockIDFromContextMenuAction):
3077         * platform/gtk/LocalizedStringsGtk.cpp:
3078         (WebCore::gtkStockLabel):
3079         (WebCore::contextMenuItemTagCopy):
3080         (WebCore::contextMenuItemTagDelete):
3081         (WebCore::contextMenuItemTagSelectAll):
3082         (WebCore::contextMenuItemTagUnicode):
3083         (WebCore::contextMenuItemTagInputMethods):
3084         (WebCore::contextMenuItemTagGoBack):
3085         (WebCore::contextMenuItemTagGoForward):
3086         (WebCore::contextMenuItemTagStop):
3087         (WebCore::contextMenuItemTagCut):
3088         (WebCore::contextMenuItemTagPaste):
3089         (WebCore::contextMenuItemTagBold):
3090         (WebCore::contextMenuItemTagItalic):
3091         (WebCore::contextMenuItemTagUnderline):
3092
3093 2008-02-03  Oliver Hunt  <oliver@apple.com>
3094
3095         Reviewed by Maciej.
3096
3097         Bug 17169: Support transform on Canvas
3098
3099         Nice and simple patch as the cross-platform code to apply
3100         a transform was already there.
3101
3102         Tests: fast/canvas/canvas-transform-identity.html
3103                fast/canvas/canvas-transform-infinity.html
3104                fast/canvas/canvas-transform-multiply.html
3105                fast/canvas/canvas-transform-nan.html
3106                fast/canvas/canvas-transform-skewed.html
3107
3108         * html/CanvasRenderingContext2D.cpp:
3109         (WebCore::CanvasRenderingContext2D::transform):
3110         * html/CanvasRenderingContext2D.h:
3111         * html/CanvasRenderingContext2D.idl:
3112
3113 2008-02-03  Nikolas Zimmermann  <zimmermann@kde.org>
3114
3115         Reviewed by Oliver.
3116
3117         Fix mistake in SVGImageElement, breaking "Dock" example of carto.net
3118         It was comparing against the wrong attribute names in svgAttributeChanged().
3119
3120         Added testcase: svg/custom/js-update-image.svg
3121
3122         * svg/SVGImageElement.cpp:
3123         (WebCore::SVGImageElement::svgAttributeChanged):
3124
3125 2008-02-03  Eric Seidel  <eric@webkit.org>
3126
3127         Reviewed by darin.
3128
3129         Acid3 expects textNode.localName === null
3130         http://bugs.webkit.org/show_bug.cgi?id=17060
3131
3132         Test: fast/dom/Node/initial-values.html
3133
3134         * dom/Comment.cpp: remove localName implementation
3135         * dom/Comment.h:
3136         * dom/Node.cpp: return nullAtom instead of emptyAtom
3137         * dom/Text.cpp: remove localName implementation
3138         * dom/Text.h:
3139
3140 2008-02-03  Eric Seidel  <eric@webkit.org>
3141
3142         Reviewed by darin.
3143
3144         Make createElementNS and createAttributeNS follow the (vague) DOM Core 2 spec
3145         by throwing exceptions for more types of invalid qualified names.
3146         http://bugs.webkit.org/show_bug.cgi?id=16833
3147
3148         Tests: fast/dom/Document/createAttributeNS-namespace-err.html
3149                fast/dom/Document/createElementNS-namespace-err.html
3150
3151         * dom/Document.cpp:
3152         (WebCore::Document::createElement):
3153         (WebCore::hasNamespaceError):
3154         (WebCore::Document::createElementNS):
3155         (WebCore::Document::createAttributeNS):
3156         * dom/Document.idl:
3157
3158 2008-02-03  Nikolas Zimmermann  <zimmermann@kde.org>
3159
3160         Reviewed by Eric.
3161
3162         Fixes: http://bugs.webkit.org/show_bug.cgi?id=15394
3163
3164         Dramatically improve dynamic update performance in DOM / SVG DOM.
3165
3166         The notifyAttributeChange() sledgehammer is gone now. It was implemented on quite a lot of
3167         SVG*Element classes and blindly reacted on any property change caused by DOM / SVG DOM
3168         by rebuilding style/renderer etc. without actually checking what changed. SVG used a hack
3169         for years that attributeChanged() called notifyAttributeChange() - which results in poor
3170         scripting performance and/or dynamic creation/modification of elements using SVG DOM.
3171
3172         Properly implement childrenChanged / attributeChanged in SVG with some derivation from the HTML code.
3173         Our SVG* element classes implement "svgAttributeChanged(const QualifiedName&)" instead of
3174         "attributeChanged(Attribute*...)" to be able to unify DOM / SVG DOM updates. SVG DOM classes
3175         are aware of the attribute name they belong to. So when using "rectElement.transform.baseVal.getItem(0).setRotate(45)"
3176         SVG DOM updates the <rect> element by calling svgAttributeChanged(SVGNames::transformAttr) on the corresponding
3177         SVGRectElement. So we're now able to handle fast dynamic updates in a unified way - leading to less bugs.
3178
3179         HTML dynamic updates vs. SVG dynamic updates:
3180
3181         HTML:
3182             1) setAttribute("foo", "bar") -> attributeChanged -> parseMappedAttribute -> setChanged/setNeedsLayout
3183             2) someObject.foo = "bar" -> HTML code maps to setAttribute calls, ends up taking the same route as 1)
3184             3) someObject.style.foo = "bar" -> setChanged -> recalcStyle (possible relayout)
3185
3186         SVG:
3187             1) setAttribute("foo", "bar") -> attributeChanged -> svgAttributeChanged -> parseMappedAttribute -> setChanged/setNeedsLayout
3188             2) same, currently most functions are not yet converted to this new system! (most noticeable in SVGMarkerElement::setOrientToAngle)    
3189             3) same
3190             4) someRectElement.x.baseVal.value = 100 -> svgAttributeChanged -> setChanged/setNeedsLayout (special SVG DOM updating)
3191         
3192         The new SVG DOM updating concept 4) uses the same updating logic as 1) and 2), so we're actually modelling the HTML way.
3193         SVG handles calling setChanged/setNeedsLayout in svgAttributeChanged, unlike HTML which uses parseMappedAttribute for that.
3194
3195         Only updated all elements necessary to let us pass layout tests w/o regressions. Need to crawl through
3196         all SVG*Element classes and implement svgAttributeChanged / childrenChanged anywhere needed in a follow-up patch.
3197
3198         * bindings/js/JSSVGPODTypeWrapper.h:
3199         (WebCore::JSSVGPODTypeWrapperCreatorReadWrite::commitChange):
3200         (WebCore::JSSVGPODTypeWrapperCreatorReadOnly::commitChange):
3201         (WebCore::JSSVGPODTypeWrapperCreatorForList::JSSVGPODTypeWrapperCreatorForList):
3202         (WebCore::JSSVGPODTypeWrapperCreatorForList::operator PODType):
3203         (WebCore::JSSVGPODTypeWrapperCreatorForList::commitChange):
3204         * bindings/js/JSSVGPathSegListCustom.cpp:
3205         (WebCore::JSSVGPathSegList::clear):
3206         (WebCore::JSSVGPathSegList::initialize):
3207         (WebCore::JSSVGPathSegList::insertItemBefore):
3208         (WebCore::JSSVGPathSegList::replaceItem):
3209         (WebCore::JSSVGPathSegList::removeItem):
3210         (WebCore::JSSVGPathSegList::appendItem):
3211         * bindings/js/JSSVGPointListCustom.cpp:
3212         (WebCore::JSSVGPointList::clear):
3213         (WebCore::JSSVGPointList::initialize):
3214         (WebCore::JSSVGPointList::getItem):
3215         (WebCore::JSSVGPointList::insertItemBefore):
3216         (WebCore::JSSVGPointList::replaceItem):
3217         (WebCore::JSSVGPointList::removeItem):
3218         (WebCore::JSSVGPointList::appendItem):
3219         * bindings/js/JSSVGTransformListCustom.cpp:
3220         (WebCore::JSSVGTransformList::clear):
3221         (WebCore::JSSVGTransformList::initialize):
3222         (WebCore::JSSVGTransformList::getItem):
3223         (WebCore::JSSVGTransformList::insertItemBefore):
3224         (WebCore::JSSVGTransformList::replaceItem):
3225         (WebCore::JSSVGTransformList::removeItem):
3226         (WebCore::JSSVGTransformList::appendItem):
3227         * bindings/scripts/CodeGeneratorJS.pm:
3228         * rendering/RenderSVGGradientStop.cpp:
3229         (WebCore::RenderSVGGradientStop::setStyle):
3230         * rendering/RenderSVGGradientStop.h:
3231         * svg/SVGAElement.cpp:
3232         (WebCore::SVGAElement::defaultEventHandler):
3233         * svg/SVGAElement.h:
3234         * svg/SVGAngle.cpp:
3235         * svg/SVGAngle.h:
3236         (WebCore::SVGAngle::associatedAttributeName):
3237         * svg/SVGAnimatedTemplate.h:
3238         (WebCore::SVGAnimatedTemplate::SVGAnimatedTemplate):
3239         (WebCore::SVGAnimatedTemplate::wrapperCache):
3240         (WebCore::SVGAnimatedTemplate::associatedAttributeName):
3241         (WebCore::lookupOrCreateWrapper):
3242         * svg/SVGAnimationElement.cpp:
3243         (WebCore::SVGAnimationElement::parseBeginOrEndValue):
3244         * svg/SVGAnimationElement.h:
3245         * svg/SVGCircleElement.cpp:
3246         (WebCore::SVGCircleElement::svgAttributeChanged):
3247         * svg/SVGCircleElement.h:
3248         * svg/SVGClipPathElement.cpp:
3249         (WebCore::SVGClipPathElement::svgAttributeChanged):
3250         (WebCore::SVGClipPathElement::childrenChanged):
3251         (WebCore::SVGClipPathElement::canvasResource):
3252         * svg/SVGClipPathElement.h:
3253         (WebCore::SVGClipPathElement::isValid):
3254         (WebCore::SVGClipPathElement::rendererIsNeeded):
3255         * svg/SVGComponentTransferFunctionElement.cpp:
3256         (WebCore::SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement):
3257         * svg/SVGComponentTransferFunctionElement.h:
3258         * svg/SVGCursorElement.cpp:
3259         * svg/SVGElement.cpp:
3260         (WebCore::SVGElement::insertedIntoDocument):
3261         (WebCore::SVGElement::attributeChanged):
3262         * svg/SVGElement.h:
3263         (WebCore::SVGElement::svgAttributeChanged):
3264         * svg/SVGEllipseElement.cpp:
3265         (WebCore::SVGEllipseElement::svgAttributeChanged):
3266         * svg/SVGEllipseElement.h:
3267         * svg/SVGExternalResourcesRequired.cpp:
3268         (WebCore::SVGExternalResourcesRequired::isKnownAttribute):
3269         * svg/SVGExternalResourcesRequired.h:
3270         * svg/SVGFEBlendElement.cpp:
3271         * svg/SVGFEColorMatrixElement.cpp:
3272         (WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement):
3273         * svg/SVGFEComponentTransferElement.cpp:
3274         * svg/SVGFECompositeElement.cpp:
3275         * svg/SVGFEDiffuseLightingElement.cpp:
3276         * svg/SVGFEDisplacementMapElement.cpp:
3277         * svg/SVGFEFloodElement.cpp:
3278         * svg/SVGFEGaussianBlurElement.cpp:
3279         * svg/SVGFEImageElement.cpp:
3280         * svg/SVGFELightElement.cpp:
3281         * svg/SVGFEMergeNodeElement.cpp:
3282         * svg/SVGFEOffsetElement.cpp:
3283         * svg/SVGFESpecularLightingElement.cpp:
3284         * svg/SVGFETileElement.cpp:
3285         * svg/SVGFETurbulenceElement.cpp:
3286         * svg/SVGFilterElement.cpp:
3287         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
3288         * svg/SVGFitToViewBox.cpp:
3289         (WebCore::SVGFitToViewBox::isKnownAttribute):
3290         * svg/SVGFitToViewBox.h:
3291         * svg/SVGForeignObjectElement.cpp:
3292         * svg/SVGGElement.cpp:
3293         (WebCore::SVGGElement::svgAttributeChanged):
3294         (WebCore::SVGGElement::childrenChanged):
3295         * svg/SVGGElement.h:
3296         * svg/SVGGradientElement.cpp:
3297         (WebCore::SVGGradientElement::SVGGradientElement):
3298         (WebCore::SVGGradientElement::svgAttributeChanged):
3299         (WebCore::SVGGradientElement::childrenChanged):
3300         (WebCore::SVGGradientElement::buildStops):
3301         * svg/SVGGradientElement.h:
3302         * svg/SVGImageElement.cpp:
3303         (WebCore::SVGImageElement::parseMappedAttribute):
3304         (WebCore::SVGImageElement::svgAttributeChanged):
3305         * svg/SVGImageElement.h:
3306         * svg/SVGLangSpace.cpp:
3307         (WebCore::SVGLangSpace::isKnownAttribute):
3308         * svg/SVGLangSpace.h:
3309         * svg/SVGLengthList.cpp:
3310         (WebCore::SVGLengthList::SVGLengthList):
3311         * svg/SVGLengthList.h:
3312         * svg/SVGLineElement.cpp:
3313         (WebCore::SVGLineElement::svgAttributeChanged):
3314         * svg/SVGLineElement.h:
3315         * svg/SVGLinearGradientElement.cpp:
3316         (WebCore::SVGLinearGradientElement::svgAttributeChanged):
3317         * svg/SVGLinearGradientElement.h:
3318         * svg/SVGList.h:
3319         (WebCore::SVGList::SVGList):
3320         (WebCore::SVGList::associatedAttributeName):
3321         (WebCore::SVGPODList::SVGPODList):
3322         * svg/SVGMarkerElement.cpp:
3323         (WebCore::SVGMarkerElement::svgAttributeChanged):
3324         (WebCore::SVGMarkerElement::childrenChanged):
3325         * svg/SVGMarkerElement.h:
3326         * svg/SVGMaskElement.cpp:
3327         (WebCore::SVGMaskElement::svgAttributeChanged):
3328         (WebCore::SVGMaskElement::childrenChanged):
3329         * svg/SVGMaskElement.h:
3330         * svg/SVGNumberList.cpp:
3331         (WebCore::SVGNumberList::SVGNumberList):
3332         * svg/SVGNumberList.h:
3333         * svg/SVGPathElement.cpp:
3334         (WebCore::SVGPathElement::svgAttributeChanged):
3335         (WebCore::SVGPathElement::pathSegList):
3336         * svg/SVGPathElement.h:
3337         * svg/SVGPathSeg.h:
3338         (WebCore::SVGPathSeg::associatedAttributeName):
3339         * svg/SVGPathSegList.cpp:
3340         (WebCore::SVGPathSegList::SVGPathSegList):
3341         * svg/SVGPathSegList.h:
3342         * svg/SVGPatternElement.cpp:
3343         (WebCore::SVGPatternElement::SVGPatternElement):
3344         (WebCore::SVGPatternElement::svgAttributeChanged):
3345         (WebCore::SVGPatternElement::childrenChanged):
3346         * svg/SVGPatternElement.h:
3347         * svg/SVGPointList.cpp:
3348         (WebCore::SVGPointList::SVGPointList):
3349         * svg/SVGPointList.h:
3350         * svg/SVGPolyElement.cpp:
3351         (WebCore::SVGPolyElement::SVGPolyElement):
3352         (WebCore::SVGPolyElement::points):
3353         (WebCore::SVGPolyElement::parseMappedAttribute):
3354         (WebCore::SVGPolyElement::svgAttributeChanged):
3355         * svg/SVGPolyElement.h:
3356         * svg/SVGPolygonElement.cpp:
3357         * svg/SVGPolygonElement.h:
3358         * svg/SVGPolylineElement.cpp:
3359         * svg/SVGPolylineElement.h:
3360         * svg/SVGPreserveAspectRatio.cpp:
3361         * svg/SVGPreserveAspectRatio.h:
3362         (WebCore::SVGPreserveAspectRatio::associatedAttributeName):
3363         * svg/SVGRadialGradientElement.cpp:
3364         (WebCore::SVGRadialGradientElement::svgAttributeChanged):
3365         * svg/SVGRadialGradientElement.h:
3366         * svg/SVGRectElement.cpp:
3367         (WebCore::SVGRectElement::svgAttributeChanged):
3368         * svg/SVGRectElement.h:
3369         * svg/SVGSVGElement.cpp:
3370         (WebCore::SVGSVGElement::parseMappedAttribute):
3371         (WebCore::SVGSVGElement::svgAttributeChanged):
3372         * svg/SVGSVGElement.h:
3373         * svg/SVGStopElement.cpp:
3374         (WebCore::SVGStopElement::parseMappedAttribute):
3375         (WebCore::SVGStopElement::createRenderer):
3376         * svg/SVGStopElement.h:
3377         * svg/SVGStringList.cpp:
3378         (WebCore::SVGStringList::SVGStringList):
3379         * svg/SVGStringList.h:
3380         * svg/SVGStylable.cpp:
3381         * svg/SVGStylable.h:
3382         * svg/SVGStyledElement.cpp:
3383         (WebCore::SVGStyledElement::isKnownAttribute):
3384         (WebCore::SVGStyledElement::svgAttributeChanged):
3385         (WebCore::SVGStyledElement::invalidateResourcesInAncestorChain):
3386         (WebCore::SVGStyledElement::childrenChanged):
3387         * svg/SVGStyledElement.h:
3388         * svg/SVGStyledLocatableElement.cpp:
3389         * svg/SVGStyledLocatableElement.h:
3390         * svg/SVGStyledTransformableElement.cpp:
3391         (WebCore::SVGStyledTransformableElement::SVGStyledTransformableElement):
3392         (WebCore::SVGStyledTransformableElement::parseMappedAttribute):
3393         (WebCore::SVGStyledTransformableElement::isKnownAttribute):
3394         * svg/SVGStyledTransformableElement.h:
3395         * svg/SVGTests.cpp:
3396         (WebCore::SVGTests::requiredFeatures):
3397         (WebCore::SVGTests::requiredExtensions):
3398         (WebCore::SVGTests::systemLanguage):
3399         (WebCore::SVGTests::isKnownAttribute):
3400         * svg/SVGTests.h:
3401         * svg/SVGTextContentElement.cpp:
3402         * svg/SVGTextElement.cpp:
3403         (WebCore::SVGTextElement::SVGTextElement):
3404         * svg/SVGTextElement.h:
3405         * svg/SVGTextPathElement.cpp:
3406         * svg/SVGTextPathElement.h:
3407         * svg/SVGTextPositioningElement.cpp:
3408         (WebCore::SVGTextPositioningElement::SVGTextPositioningElement):
3409         * svg/SVGTextPositioningElement.h:
3410         * svg/SVGTransformList.cpp:
3411         (SVGTransformList::SVGTransformList):
3412         * svg/SVGTransformList.h:
3413         * svg/SVGTransformable.cpp:
3414         (WebCore::SVGTransformable::isKnownAttribute):
3415         * svg/SVGTransformable.h:
3416         * svg/SVGURIReference.cpp:
3417         (WebCore::SVGURIReference::isKnownAttribute):
3418         * svg/SVGURIReference.h:
3419         * svg/SVGUseElement.cpp:
3420         (WebCore::SVGUseElement::insertedIntoDocument):
3421         (WebCore::SVGUseElement::svgAttributeChanged):
3422         (WebCore::SVGUseElement::childrenChanged):
3423         (WebCore::SVGUseElement::buildPendingResource):
3424         * svg/SVGUseElement.h:
3425         * svg/SVGViewElement.cpp:
3426         (WebCore::SVGViewElement::SVGViewElement):
3427         (WebCore::SVGViewElement::viewTarget):
3428         (WebCore::SVGViewElement::parseMappedAttribute):
3429         * svg/SVGViewElement.h:
3430         * svg/SVGViewSpec.cpp:
3431         (WebCore::SVGViewSpec::SVGViewSpec):
3432         * svg/SVGViewSpec.h:
3433         * svg/SVGZoomAndPan.cpp:
3434         (WebCore::SVGZoomAndPan::isKnownAttribute):
3435         * svg/SVGZoomAndPan.h:
3436         * svg/graphics/SVGResource.cpp:
3437         (WebCore::SVGResource::invalidate):
3438         (WebCore::SVGResource::invalidateClients):
3439         (WebCore::SVGResource::addClient):
3440         * svg/graphics/SVGResource.h:
3441         * svg/graphics/SVGResourceMasker.cpp:
3442         (WebCore::SVGResourceMasker::invalidate):
3443         * svg/graphics/cg/SVGPaintServerGradientCg.cpp:
3444         (WebCore::SVGPaintServerGradient::invalidate):
3445         * svg/graphics/filters/SVGFEImage.cpp:
3446         (WebCore::SVGFEImage::imageChanged):
3447
3448 2008-02-03  Kevin Ollivier  <kevino@theolliviers.com>
3449
3450         Build fix for last wx commit (a couple things were not committed).
3451
3452         * platform/ScrollView.h:
3453         * platform/Widget.h:
3454
3455 2008-02-03  Kevin Ollivier  <kevino@theolliviers.com>
3456
3457         Clean up overlooked coding guideline issues from last commit.
3458
3459         * platform/wx/ScrollViewWx.cpp:
3460         (WebCore::ScrollView::ScrollViewPrivate::OnScrollWinEvents):
3461         (WebCore::ScrollView::update):
3462         (WebCore::ScrollView::scrollBy):
3463         (WebCore::ScrollView::resizeContents):
3464         (WebCore::ScrollView::adjustScrollbars):
3465         (WebCore::ScrollView::setScrollbarsMode):
3466         (WebCore::ScrollView::setHScrollbarMode):
3467         (WebCore::ScrollView::setVScrollbarMode):
3468         (WebCore::ScrollView::suppressScrollbars):
3469         * platform/wx/WidgetWx.cpp:
3470         (WebCore::Widget::setCursor):
3471
3472 2008-02-03  Kevin Watters  <kevinwatters@gmail.com>
3473
3474         Reviewed by Kevin Ollivier.
3475
3476         * platform/wx/RenderThemeWx.cpp:
3477         (WebCore::RenderThemeWx::paintButton):
3478         * platform/wx/ScrollViewWx.cpp:
3479         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
3480         (WebCore::ScrollView::ScrollViewPrivate::bindEvents):
3481         (WebCore::ScrollView::ScrollViewPrivate::OnMouseWheelEvents):
3482         (WebCore::ScrollView::ScrollViewPrivate::OnScrollWinEvents):
3483         (WebCore::ScrollView::ScrollView):
3484         (WebCore::ScrollView::setNativeWindow):
3485         (WebCore::ScrollView::updateContents):
3486         (WebCore::ScrollView::update):
3487         (WebCore::ScrollView::visibleWidth):
3488         (WebCore::ScrollView::visibleHeight):
3489         (WebCore::ScrollView::setContentsPos):
3490         (WebCore::ScrollView::scrollBy):
3491         (WebCore::ScrollView::resizeContents):
3492         (WebCore::ScrollView::contentsX):
3493         (WebCore::ScrollView::contentsY):
3494         (WebCore::ScrollView::contentsWidth):
3495         (WebCore::ScrollView::contentsHeight):
3496         (WebCore::ScrollView::AdjustScrollbars):
3497         (WebCore::ScrollView::setScrollbarsMode):
3498         (WebCore::ScrollView::setHScrollbarMode):
3499         (WebCore::ScrollView::setVScrollbarMode):
3500         (WebCore::ScrollView::suppressScrollbars):
3501         (WebCore::ScrollView::inWindow):
3502         (WebCore::ScrollView::wheelEvent):
3503         (WebCore::ScrollView::addChild):
3504         (WebCore::ScrollView::removeChild):
3505         (WebCore::ScrollView::children):
3506         (WebCore::ScrollView::scrollRectIntoViewRecursively):
3507         (WebCore::ScrollView::scrollbarUnderMouse):
3508         * platform/wx/WidgetWx.cpp:
3509         (WebCore::Widget::Widget):
3510         (WebCore::Widget::~Widget):
3511         (WebCore::Widget::nativeWindow):
3512         (WebCore::Widget::setNativeWindow):
3513
3514 2008-02-02  David Hyatt  <hyatt@apple.com>
3515
3516         Fix for bug 5468, support CSS3 :only-child and :only-of-type selectors.
3517
3518         Reviewed by olliej
3519
3520         Added fast/css/only-child-pseudo-class.html, fast/css/only-of-type-pseudo-class.html
3521
3522         * css/CSSSelector.cpp:
3523         (WebCore::CSSSelector::extractPseudoType):
3524         * css/CSSSelector.h:
3525         (WebCore::CSSSelector::):
3526         * css/CSSStyleSelector.cpp:
3527         (WebCore::CSSStyleSelector::checkOneSelector):
3528
3529 2008-02-02  Darin Adler  <darin@apple.com>
3530
3531         Reviewed by Geoff Garen.
3532
3533         PLT speedup related to <rdar://problem/5659272> REGRESSION: PLT .4%
3534         slower due to r28884 (global variable symbol table optimization)
3535
3536         * history/CachedPage.cpp:
3537         (WebCore::CachedPage::CachedPage): Removed saveSymbolTable call.
3538         (WebCore::CachedPage::restore): Removed restoreSymbolTable call.
3539         (WebCore::CachedPage::clear): Removed clear of m_windowSymbolTable.
3540
3541         * history/CachedPage.h: Removed m_windowSymbolTable, since save/restoreLocalStorage
3542         now takes care of the symbol table. Also removed many unnecessary includes.
3543
3544 2008-02-02  Tony Chang  <idealisms@gmail.com>
3545
3546         Reviewed by eseidel.
3547
3548         Add an include for for <objidl.h> which isn't included
3549         by default with WIN32_LEAN_AND_MEAN.
3550         * platform/graphics/FontCache.h:
3551
3552 2008-02-02  Kevin Watters  <kevin@dotsyntax.com>