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