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