Reviewed and landed by Sam.
[WebKit-https.git] / WebCore / ChangeLog
1 2008-02-18  Darin Adler  <darin@apple.com>
2
3         Reviewed and landed by Sam.
4
5         Remove DeprecatedStringList.
6
7         * GNUmakefile.am:
8         * WebCore.pro:
9         * WebCore.vcproj/WebCore.vcproj:
10         * WebCore.xcodeproj/project.pbxproj:
11         * WebCoreSources.bkl:
12         * editing/markup.cpp:
13         * platform/DeprecatedStringList.cpp: Removed.
14         * platform/DeprecatedStringList.h: Removed.
15         * platform/mac/DeprecatedStringListMac.mm: Removed.
16
17 2008-02-18  Darin Adler  <darin@apple.com>
18
19         Reviewed by Sam.
20
21         * css/CSSPrimitiveValueMappings.h: Add default cases to all the switch statements.
22         This will ease the way some day if we decide to use an enum instead of int; otherwise
23         we'll have a ton of "unhandled enum value" warnings here.
24
25 2008-02-18  Alp Toker  <alp@atoker.com>
26
27         Build fix for GTK+ < 2.10. Fall back to simple text clipboard copy
28         with older GTK+ versions for now.
29
30         * platform/gtk/PasteboardGtk.cpp:
31         (WebCore::Pasteboard::writeSelection):
32
33 2008-02-18  Darin Adler  <darin@apple.com>
34
35         Reviewed by Sam.
36
37         * WebCore.base.exp: Export a couple of WebCore::String functions we plan to use
38         in the future in WebKit.
39
40 2008-02-18  Darin Adler  <darin@apple.com>
41
42         Reviewed by Sam.
43
44         * DerivedSources.make: Added the scripts to the ENABLE_SVG versions of the rules
45         for CSSPropertyNames.h and CSSValueKeywords.h. Somehow that got left out, so the
46         files would not be regenerated if the scripts were changed (but would if SVG was
47         disabled).
48
49 2008-02-18  Alexey Proskuryakov  <ap@webkit.org>
50
51         Suggested by Darin.
52
53         * platform/KURL.h: (WebCore::KURL::operator const String&): Added, to avoid unexpected
54         conversion via UString (as in bug 17418).
55
56 2008-02-18  Jon Honeycutt  <jhoneycutt@apple.com>
57
58         Reviewed by Darin.
59
60         <rdar://problem/5744899> Crash in Flash when clicking "Yes" to abort
61         slow script Flash 9 dialog at http://www.kidzui.com
62
63         When navigating to a new page, we stop all outstanding PluginStreams.
64         Flash hangs in the call to NPP_URLNotify. It eventually displays the
65         "slow script" dialog, which relinquishes control to the system. While
66         this dialog is running, the request we are in the process of cancelling
67         completes, and we re-enter Flash to deliver the data. When the dialog
68         is dismissed, the internal state of Flash has changed, and Flash
69         crashes with a null dereference.
70
71         To work around this, we can defer loading before entering plug-in code,
72         so that even if a plug-in yields to the system, we won't get callbacks
73         while we're handling a callback.
74
75         * plugins/PluginStream.cpp:
76         (WebCore::PluginStream::startStream): Defers loads while calling into
77         plug-in.
78         (WebCore::PluginStream::destroyStream): Same.
79         (WebCore::PluginStream::deliverData): Same.
80         (WebCore::PluginStream::didFail): Protect 'this' from deletion by
81         destroyStream. Null out m_loader only after destroyStream returns.
82         (WebCore::PluginStream::didFinishLoading): Same.
83
84 2008-02-18  Alexey Proskuryakov  <ap@webkit.org>
85
86         Reviewed by Darin.
87
88         http://bugs.webkit.org/show_bug.cgi?id=17418
89         REGRESSION: Assertion failure dragging image (JSLock::lockCount() > 0)
90
91         * platform/win/ClipboardWin.cpp:
92         (WebCore::ClipboardWin::declareAndWriteDragImage): Explicitly convert from KURL to String,
93         as an implicit conversion uses UString and thus needs a JSLock.
94
95 2008-02-17  Sam Weinig  <sam@webkit.org>
96
97         Roll out r30360.
98
99         * loader/FrameLoader.cpp:
100         (WebCore::FrameLoader::changeLocation):
101
102 2008-02-17  Sam Weinig  <sam@webkit.org>
103
104         Mac build fix.
105
106         * WebCore.xcodeproj/project.pbxproj:
107
108 2008-02-17  Alp Toker  <alp@atoker.com>
109
110         Attempt to fix the Wx build (has been broken all weekend).
111
112         Stub out some graphics functions.
113
114         * platform/graphics/wx/GraphicsContextWx.cpp:
115         (WebCore::GraphicsContext::beginPath):
116         (WebCore::GraphicsContext::addPath):
117         * platform/graphics/wx/PathWx.cpp:
118         (WebCore::Path::isEmpty):
119
120 2008-02-17  Julien Chaffraix  <julien.chaffraix@gmail.com>
121
122         Reviewed by Alexey Proskuryakov.
123
124         http://bugs.webkit.org/show_bug.cgi?id=16989
125         bug 16989 : Add send() flag checks in XmlHttpRequest
126
127         Splitted XmlHttpRequest::abort into abort (called from JavaScript) and internalAbort that
128         perform the cancellation and is called mainly from internal methods.
129
130         Tests: http/tests/xmlhttprequest/xmlhttprequest-abort-readyState-shouldDispatchEvent.html
131                http/tests/xmlhttprequest/xmlhttprequest-abort-readyState-shouldNotDispatchEvent.html
132                http/tests/xmlhttprequest/xmlhttprequest-test-send-flag.html
133
134         * xml/XMLHttpRequest.cpp:
135         (WebCore::XMLHttpRequest::open): Now call internalAbort() and moved readyState change into method
136         (WebCore::XMLHttpRequest::send): Added m_loader check
137         (WebCore::XMLHttpRequest::abort): Now update readyState and clear the request headers as specified
138         in the spec
139
140         (WebCore::XMLHttpRequest::internalAbort): Perform cancellation internal operations (no readyState update)
141         (WebCore::XMLHttpRequest::setRequestHeader): Added m_loader check
142
143         (WebCore::XMLHttpRequest::processSyncLoadResults): Now call internalAbort() instead of abort()
144         (WebCore::XMLHttpRequest::willSendRequest): Ditto
145         (WebCore::XMLHttpRequest::cancelRequests): Ditto
146         (WebCore::XMLHttpRequest::detachRequests): Ditto
147         * xml/XMLHttpRequest.h: Added the private internalAbort method
148
149 2008-02-17  Sam Weinig  <sam@webkit.org>
150
151         Reviewed by Dan Bernstein.
152
153         Fix for http://bugs.webkit.org/show_bug.cgi?id=17365
154         document.createEvent("MessageEvent") throws NOT_SUPPORTED_ERR
155
156         - Updated fast/events/event-instanceof.html to test document.createEvent("MessageEvent").
157
158         * DerivedSources.make:
159         Generate Objective-C binding for DOMProgressEvent which was missing.
160
161         * WebCore.xcodeproj/project.pbxproj:
162         Add missing DOMProgressEvent files to the project.
163
164         * bindings/js/JSEventCustom.cpp:
165         (WebCore::toJS):
166         Clean up and add case for SVGZoomEvent that was missing.
167
168         * bindings/objc/DOMEvents.mm:
169         (+[DOMEvent _wrapEvent:WebCore::]):
170         Clean up and add cases for ProgressEvent and MessageEvent that were missing.
171
172         * dom/Document.cpp:
173         (WebCore::Document::createEvent):
174         Add case for MessageEvent.
175
176 2008-02-17  Adam Treat  <treat@kde.org>
177
178         Reviewed by Eric Seidel.
179
180         http://bugs.webkit.org/show_bug.cgi?id=17008
181         Meta refresh does not work with cache turned off
182
183         Fix for issue noticed on http://adserver.vivox.com/2
184
185         * loader/FrameLoader.cpp:
186         (WebCore::FrameLoader::changeLocation):
187
188 2008-02-17  Alp Toker  <alp@atoker.com>
189
190         Reviewed by Sam Weinig.
191
192         Fix for change made in r30355. Issue noticed by İsmail Dönmez.
193
194         Verify SSL certs by default, but allow checks to be disabled with an
195         environment variable (WEBKIT_IGNORE_SSL_ERRORS) for now.
196
197         * platform/network/curl/ResourceHandleManager.cpp:
198         (WebCore::ResourceHandleManager::startJob):
199
200 2008-02-17  Bin Chen  <binary.chen@gmail.com>
201
202         Reviewed by Alp Toker.
203
204         http://bugs.webkit.org/show_bug.cgi?id=17404
205         Bug 17404: curl certification problem
206
207         Disable SSL cert verification until we have a way of distributing
208         certs and/or reporting SSL errors to the user.
209
210         * platform/network/curl/ResourceHandleManager.cpp:
211         (WebCore::ResourceHandleManager::startJob):
212
213 2008-02-17  Alp Toker  <alp@atoker.com>
214
215         Reviewed by Mark Rowe.
216
217         DevHelp fails to load local files; URL truncated by one character.
218
219         Fix a file:// URL regression introduced in KURL.cpp r30243.
220
221         * platform/KURL.cpp:
222         (WebCore::KURL::KURL):
223
224 2008-02-17  Dan Bernstein  <mitz@apple.com>
225
226         Reviewed by Darin Adler.
227
228         - fix http://bugs.webkit.org/show_bug.cgi?id=17033
229           <rdar://problem/5709315> REGRESSION: Really long <option> causes unnecessary page scroll bars to accommodate content
230
231         Test: fast/forms/control-clip-overflow.html
232
233         * rendering/RenderFlow.cpp:
234         (WebCore::RenderFlow::lowestPosition): Account for control clipping.
235         (WebCore::RenderFlow::rightmostPosition): Ditto.
236         (WebCore::RenderFlow::leftmostPosition): Ditto.
237
238 2008-02-16  Oliver Hunt  <oliver@apple.com>
239
240         Reviewed by Eric S.
241
242         Bug 17269: Deobfuscate CanvasRenderingContext2D.cpp
243
244         Use cross-platform code to determine the dirty rects for
245         fill and stroke operations
246
247         * html/CanvasRenderingContext2D.cpp:
248         (WebCore::CanvasRenderingContext2D::fill):
249         (WebCore::CanvasRenderingContext2D::stroke):
250           Added a FIXME as code inspection shows a trivial under-painting
251           bug, although we currently ignore dirty rect tracking on canvas
252           and repaint the whole thing anyway.
253         (WebCore::CanvasRenderingContext2D::fillRect):
254
255 2008-02-16  Sam Weinig  <sam@webkit.org>
256
257         Reviewed by Darin Adler.
258
259         Take another step in the direction of getting rid of DeprecatedString
260         by moving all the to{NumericType} off of it.
261
262         - Create free functions that take a UChar* buffer and length to do
263           the string-to-number conversions.  This allows us to avoid two allocations
264           if we don't already have a String and is consistent with the design we would
265           like going forward.
266         - Since the toInt (and family) functions on DeprecatedString were slightly
267           different than the ones on String (they didn't allow trailing garbage),
268           an extra set of 'Strict' toInt functions were added that have this behavior.
269
270         * platform/graphics/Color.cpp:
271         (WebCore::Color::parseHexColor):
272         * platform/text/PlatformString.h:
273         * platform/text/String.cpp:
274         (WebCore::String::percentage):
275         (WebCore::String::toIntStrict):
276         (WebCore::String::toUIntStrict):
277         (WebCore::String::toInt64Strict):
278         (WebCore::String::toUInt64Strict):
279         (WebCore::String::toUInt):
280         (WebCore::String::toDouble):
281         (WebCore::isCharacterAllowedInBase):
282         (WebCore::toIntegralType):
283         (WebCore::lengthOfCharactersAsInteger):
284         (WebCore::charactersToIntStrict):
285         (WebCore::charactersToUIntStrict):
286         (WebCore::charactersToInt64Strict):
287         (WebCore::charactersToUInt64Strict):
288         (WebCore::charactersToInt):
289         (WebCore::charactersToUInt):
290         (WebCore::charactersToInt64):
291         (WebCore::charactersToUInt64):
292         (WebCore::charactersToDouble):
293         (WebCore::charactersToFloat):
294         * platform/text/StringImpl.cpp:
295         (WebCore::parseLength):
296         (WebCore::StringImpl::toIntStrict):
297         (WebCore::StringImpl::toUIntStrict):
298         (WebCore::StringImpl::toInt64Strict):
299         (WebCore::StringImpl::toUInt64Strict):
300         (WebCore::StringImpl::toInt):
301         (WebCore::StringImpl::toUInt):
302         (WebCore::StringImpl::toInt64):
303         (WebCore::StringImpl::toUInt64):
304         (WebCore::StringImpl::toDouble):
305         (WebCore::StringImpl::toFloat):
306         * platform/text/StringImpl.h:
307         * svg/SVGAnimationElement.cpp:
308         (WebCore::SVGAnimationElement::parseClockValue):
309         * svg/SVGFETurbulenceElement.cpp:
310         (WebCore::SVGFETurbulenceElement::parseMappedAttribute):
311
312 2008-02-16  Dan Bernstein  <mitz@apple.com>
313
314         Reviewed by Sam Weinig.
315
316         - fix fixed-pitch font measurement of control characters that render
317           as zero-width space
318
319         Test: fast/text/fixed-pitch-control-characters.html
320
321         * rendering/RenderText.cpp:
322         (WebCore::RenderText::widthFromCache):
323
324 2008-02-16  Kevin Ollivier  <kevino@theolliviers.com>
325
326         wx build fix.
327
328         * platform/graphics/wx/GraphicsContextWx.cpp:
329         (WebCore::GraphicsContext::drawImage):
330
331 2008-02-16  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
332
333         Reviewed by Alp Toker.
334
335         Cross document messaging GTK+/autotools build fix.
336
337         * GNUmakefile.am:
338
339 2008-02-15  Oliver Hunt  <oliver@apple.com>
340
341         Build fix for Qt and Cairo builds
342
343         * platform/graphics/cairo/GraphicsContextCairo.cpp:
344         (WebCore::GraphicsContext::drawImage):
345         * platform/graphics/qt/GraphicsContextQt.cpp:
346
347 2008-02-15  Oliver Hunt  <oliver@apple.com>
348
349         Reviewed by Dan B.
350
351         Bug 17269: Deobfuscate CanvasRenderingContext2D.cpp
352         Refactor CanvasRenderingContext2D::drawImage(HTMLCanvasElement) to remove evil ifdefs
353
354         Add logic draw(ImageBuffer*) method to GraphicsContext to handle
355         painting the source canvas content.
356
357         * html/CanvasRenderingContext2D.cpp:
358         (WebCore::CanvasRenderingContext2D::drawImage):
359         * html/HTMLCanvasElement.cpp:
360         (WebCore::HTMLCanvasElement::buffer):
361         * html/HTMLCanvasElement.h:
362         * platform/graphics/GraphicsContext.h:
363         * platform/graphics/cairo/GraphicsContextCairo.cpp:
364         (WebCore::GraphicsContext::drawImage):
365         * platform/graphics/cg/GraphicsContextCG.cpp:
366         (WebCore::GraphicsContext::paintBuffer):
367         (WebCore::GraphicsContext::drawImage):
368         * platform/graphics/qt/GraphicsContextQt.cpp:
369         (WebCore::GraphicsContext::drawImage):
370
371 2008-02-15  Kevin Ollivier  <kevino@theolliviers.com>
372
373         Reviewed by David Hyatt.
374
375         Using GetNativeFontInfoDesc() to generate the hash value was
376         leading to duplicate entries in the HashMap. Use the font object's
377         pointer instead.
378
379         http://bugs.webkit.org/show_bug.cgi?id=17371
380
381         * platform/graphics/wx/FontPlatformData.h:
382         (WebCore::FontPlatformData::computeHash):
383
384 2008-02-15  Ada Chan  <adachan@apple.com>
385
386         When parsing url we get from a CFURLRef, we need to null terminate 
387         the string for the case when url ends with a '/'.
388
389         Reviewed by Darin.
390
391         * platform/cf/KURLCFNet.cpp:
392         (WebCore::KURL::KURL):
393
394 2008-02-15  Brady Eidson  <beidson@apple.com>
395
396         Reviewed by Darin
397
398         Fix for <rdar://problem/5727175> and <rdar://problem/5740495> - Database threads and callback scripts can run after
399         a page has closed or loaded a new document
400
401         Deciding to make the Database I/O semantic the same as loaders/XHR when a document is shut down, this patch implements
402         a policy of shutting down the databases in a document at the same time.  This includes removing all pending transactions 
403         in a database, cutting off an queued statements in the current transaction, and preventing further callbacks from being
404         made.
405
406         No new layout tests with this patch as the current layout tests were catching this issue in a plethora of ways already
407         (crashing, unexpected exceptions and output, etc)
408
409         * dom/Document.cpp:
410         (WebCore::Document::~Document): Don't actually stop the database thread here - it better have been stopped already.
411           Add an assertion to that effect.
412         (WebCore::Document::addOpenDatabase): Add a new database handle to this Document's open database set
413         (WebCore::Document::removeOpenDatabase): Remove such a handle
414         (WebCore::Document:: stopDatabases): Call "close" on all open Database handles for this document
415         * dom/Document.h:
416
417         * loader/FrameLoader.cpp:
418         (WebCore::FrameLoader::stopLoading): In addition to canceling all resource loads and XHRs, stop all database I/O
419
420         * platform/MessageQueue.h:
421         (WebCore::MessageQueue::killed): 
422
423         * platform/sql/SQLiteTransaction.cpp:
424         (WebCore::SQLiteTransaction::stop): Added.  Explicit stop to cut off a transaction so it won't try anymore SQL activity
425         * platform/sql/SQLiteTransaction.h:
426
427         * storage/Database.cpp:
428         (WebCore::Database::Database):
429         (WebCore::Database::~Database):
430         (WebCore::Database::markAsDeletedAndClose): Check if the thread has terminated before committing to waiting on the
431           thread.
432         (WebCore::Database::stop):  Stop this database, including all queued transactions and callbacks
433         * storage/Database.h:
434         (WebCore::Database::stopped):
435
436         * storage/DatabaseThread.cpp:
437         (WebCore::DatabaseThread::terminationRequested):
438         * storage/DatabaseThread.h:
439
440         * storage/SQLTransaction.cpp:
441         (WebCore::SQLTransaction::executeSQL): Throw an exception if a new executeSQL comes in after a database is closed
442         (WebCore::SQLTransaction::checkAndHandleClosedDatabase): Added.  Clears queued statements and clear the next step
443           when the database has been closed since the last step/callback was run.  Also stops the current SQLite transaction,
444           if any
445         (WebCore::SQLTransaction::performNextStep):
446         (WebCore::SQLTransaction::performPendingCallback):
447         * storage/SQLTransaction.h:
448
449 2008-02-15  Adele Peterson  <adele@apple.com>
450
451         Reviewed by Darin.
452
453         Fix for <rdar://problem/5745072> REGRESSION (r29348): Shift + Tab does not change indent level on Google Docs
454
455         The immediate cause of this bug was that we stopped sending keypress events for the tab key when it is used to advance focus.
456         We had a special case for forward-tab in designMode, where the default behavior was to insert a tab key (or respect the keypress handler behavior).
457         This change makes the shift-tab behavior match the forward-tab behavior.
458
459         If the site had put their event handler (which does the indenting) on the keydown event, then this problem would have been avoided.
460         This is something we should look into and maybe advise the site on in the future.  However, it's a low-risk change to just make tab and shift-tab uniform 
461         in this respect, so I think this is the way to go for right now.
462
463         * page/EventHandler.cpp: (WebCore::EventHandler::defaultTabEventHandler):
464
465 2008-02-15  Anders Carlsson  <andersca@apple.com>
466
467         Reviewed by Alice.
468
469         <rdar://problem/5738678>
470         REGRESSION: "Loading" status remains when uploading file to .Mac iDisk via Safari
471         
472         Use the new CFNetwork functions for setting body parts.
473         
474         * platform/network/cf/FormDataStreamCFNet.cpp:
475         (WebCore::setHTTPBody):
476         (WebCore::httpBodyFromRequest):
477
478 2008-02-15  Geoffrey Garen  <ggaren@apple.com>
479
480         Reviewed by Anders Carlsson.
481         
482         Fixed <rdar://problem/5725429> REGRESSION (r27898): Greenfield online
483         surveys no longer work due to XMLHttpRequest exceptions
484         
485         Reverted some exception throwing code from r12194.
486         
487         To comply with the W3C draft spec, we used to throw an exception when
488         trying to access responseText and responseXML at the wrong time, but
489         that turned out to be a compatibility problem.
490         
491         Now, matching Firefox and previous versions of WebKit, we never throw
492         an exception when accessing responseText or responseXML.
493         
494         See http://www.mail-archive.com/public-webapi@w3.org/msg02756.html.
495
496         * xml/XMLHttpRequest.cpp:
497         (WebCore::XMLHttpRequest::getResponseText):
498         (WebCore::XMLHttpRequest::getResponseXML):
499
500 2008-02-15  Justin Garcia  <justin.garcia@apple.com>
501
502         Reviewed by Dan Bernstein.
503
504         <rdar://problem/5738768> REGRESSION (r30062): Crash in InlineTextBox::isLineBreak() when Undoing a replace
505         
506         Rolled out <http://trac.webkit.org/projects/webkit/changeset/29667>
507
508         * editing/SelectionController.cpp:
509         (WebCore::SelectionController::nodeWillBeRemoved):
510
511 2008-02-15  Alice Liu  <alice.liu@apple.com>
512
513         Reviewed by Darin.
514
515         Fixed <rdar://problem/5741440> REGRESSION (r28496): After deactivating JavaScript, scripts embedded in the HTML page continue to run
516      
517         Before this patch, Frame::scriptProxy() would only return null in the case that javascript was 
518         disabled and if the script proxy field wasn't set (which would only be the case if the window 
519         hasn't loaded anything yet).  Not all callers of scriptProxy() always check for a non-null return 
520         value.  Those that did check would effectively be checking if javascript was enabled before proceeding.
521         This fix consists of 2 elements: first, make sure that scriptProxy() will never return null, regardless 
522         of whether javascript is disabled.  This will mean that callers who don't check for null won't crash.  
523         Second, callers who did check for null now instead check for javascript being disabled.  This means that 
524         code paths intended for preventing javascript from being run will be making the correct check.  Another
525         minor addition to this patch is that I added a function on KSJProxy to be a shortcut for checking if javascript
526         is enabled. 
527
528         * bindings/js/JSCustomSQLStatementCallback.cpp:
529         (WebCore::JSCustomSQLStatementCallback::handleEvent):
530         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
531         (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
532         * bindings/js/JSCustomSQLTransactionCallback.cpp:
533         (WebCore::JSCustomSQLTransactionCallback::handleEvent):
534         * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
535         (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
536         * bindings/js/JSCustomVoidCallback.cpp:
537         (WebCore::JSCustomVoidCallback::handleEvent):
538         * bindings/js/JSCustomXPathNSResolver.cpp:
539         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
540         * bindings/js/ScheduledAction.cpp:
541         (WebCore::ScheduledAction::execute):
542         * bindings/js/kjs_events.cpp:
543         (WebCore::JSAbstractEventListener::handleEvent):
544         (WebCore::JSLazyEventListener::parseCode):
545         * bindings/js/kjs_html.cpp:
546         (WebCore::runtimeObjectImplementsCall):
547         * bindings/js/kjs_proxy.cpp:
548         (WebCore::KJSProxy::isEnabled):
549         * bindings/js/kjs_proxy.h:
550         * bindings/js/kjs_window.cpp:
551         (KJS::Window::retrieveWindow):
552         (KJS::Window::retrieve):
553         * dom/Document.cpp:
554         (WebCore::Document::createHTMLEventListener):
555         * dom/EventTarget.cpp:
556         (WebCore::EventTarget::dispatchGenericEvent):
557         * html/HTMLPlugInElement.cpp:
558         (WebCore::HTMLPlugInElement::createNPObject):
559         * html/HTMLScriptElement.cpp:
560         (WebCore::HTMLScriptElement::evaluateScript):
561         * html/HTMLTokenizer.cpp:
562         (WebCore::HTMLTokenizer::parseTag):
563         (WebCore::HTMLTokenizer::processToken):
564         * loader/FrameLoader.cpp:
565         (WebCore::FrameLoader::executeScript):
566         (WebCore::FrameLoader::userGestureHint):
567         (WebCore::FrameLoader::open):
568         (WebCore::FrameLoader::dispatchWindowObjectAvailable):
569         (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
570         * manual-tests/disable-javascript-reload.html: Added.
571         * page/Frame.cpp:
572         (WebCore::Frame::scriptProxy):
573         (WebCore::Frame::bindingRootObject):
574         (WebCore::Frame::windowScriptNPObject):
575         * page/Frame.h:
576         * page/InspectorController.cpp:
577         (WebCore::canPassNodeToJavaScript):
578         * page/mac/FrameMac.mm:
579         (WebCore::Frame::windowScriptObject):
580         * svg/SVGDocumentExtensions.cpp:
581         (WebCore::SVGDocumentExtensions::createSVGEventListener):
582
583 2008-02-15  Dan Bernstein  <mitz@apple.com>
584
585         Reviewed by Alexey Proskuryakov.
586
587         - WebCore part of fixing http://bugs.webkit.org/show_bug.cgi?id=17360
588           <rdar://problem/5743131> REGRESSION: mp4 file downloaded from server is downloaded as html
589
590         Test: http/tests/loading/text-content-type-with-binary-extension.html
591
592         Refined the workaround for <rdar://problem/5321972> to exclude files
593         with extensions that are known to be associated with binary MIME types.
594
595         * WebCore.xcodeproj/project.pbxproj: Added WebCoreURLResponse.{h,mm}.
596         * platform/network/mac/ResourceResponseMac.mm:
597         (WebCore::ResourceResponse::doUpdateResourceResponse): Moved the
598         workaround logic into WebCoreURLResponse.
599         * platform/network/mac/WebCoreURLResponse.h: Added.
600         * platform/network/mac/WebCoreURLResponse.mm: Added.
601         (createBinaryExtensionsSet): Returns a set of extensions known to
602         belong to MIME types of binary data.
603         (-[NSURLResponse _webcore_MIMEType]):
604         (-[NSHTTPURLResponse _webcore_MIMEType]): Forces the MIME type from
605         application/octet-stream to text/plain if that is the specified
606         Content-Type, unless the extension is in the binary extensions set.
607
608 2008-02-15  Dan Bernstein  <mitz@apple.com>
609
610         Reviewed by Dave Hyatt.
611
612         - fix http://bugs.webkit.org/show_bug.cgi?id=17306
613           <rdar://problem/5737923> Transitions between styles that have different transition-* properties behave inconsistently
614
615         * manual-tests/transitions.html: Added.
616         * page/AnimationController.cpp:
617         (WebCore::CompositeImplicitAnimation::animate): Changed to use the
618         transition properties of the current style rather than the target style.
619         (WebCore::AnimationControllerPrivate::get): Changed to not create an
620         animation if the style does not have transitions.
621         (WebCore::AnimationController::updateImplicitAnimations): Added code to
622         return the target style if the current style is not animating.
623         * rendering/RenderObject.cpp:
624         (WebCore::RenderObject::setAnimatableStyle): Changed to call
625         updateImplicitAnimations() even if the current style does not have
626         transitions, because we may be animating out of a style that had them.
627
628 2008-02-15  Alexey Proskuryakov  <ap@webkit.org>
629
630         Rubber-stamped by Darin.
631
632         Remove an obsolete WebCore readme file.
633
634         * README: Removed.
635
636 2008-02-15  Sam Weinig  <sam@webkit.org>
637
638         Reviewed by Darin Adler.
639
640         Remove more uses of DeprecatedString in preparation of getting rid of it.
641
642         * bridge/mac/WebCoreScriptDebugger.mm:
643         * css/CSSCursorImageValue.cpp:
644         (WebCore::isSVGCursorIdentifier):
645         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
646         * css/CSSStyleSelector.h:
647         * dom/Element.cpp:
648         (WebCore::Element::dump):
649         (WebCore::Element::formatForDebugger):
650         * dom/Position.cpp:
651         (WebCore::Position::debugPosition):
652         (WebCore::Position::formatForDebugger):
653         * dom/Range.cpp:
654         (WebCore::Range::formatForDebugger):
655         * dom/Text.cpp:
656         (WebCore::Text::formatForDebugger):
657         * editing/Selection.cpp:
658         (WebCore::Selection::debugPosition):
659         (WebCore::Selection::formatForDebugger):
660         * editing/SelectionController.cpp:
661         (WebCore::SelectionController::debugRenderer):
662         * editing/VisiblePosition.cpp:
663         (WebCore::VisiblePosition::debugPosition):
664         * html/HTMLTokenizer.cpp:
665         (WebCore::HTMLTokenizer::scriptHandler):
666         (WebCore::HTMLTokenizer::parseTag):
667         (WebCore::HTMLTokenizer::processToken):
668         (WebCore::HTMLTokenizer::notifyFinished):
669         * svg/SVGFontFaceElement.cpp:
670         (WebCore::mapAttributeToCSSProperty):
671
672 2008-02-15  Adam Roben  <aroben@apple.com>
673
674         * bindings/scripts/CodeGenerator.pm: Touch this to force bindings to
675         regenerate.
676
677 2008-02-15  Adam Roben  <aroben@apple.com>
678
679         Try to fix Qt/GTK+ builds
680
681         * WebCore.pro: Remove MessageEvent.{idl,cpp} from the unconditional
682         parts of this file.
683
684 2008-02-15  Darin Adler  <darin@apple.com>
685
686         - another Qt build fix
687
688         * platform/qt/KURLQt.cpp:
689         (WebCore::KURL::operator QUrl): Use the characters directly, not ascii().
690         Eliminate references to urlString.
691
692 2008-02-15  Darin Adler  <darin@apple.com>
693
694         - another Qt build fix
695
696         * platform/qt/ClipboardQt.cpp:
697         (WebCore::ClipboardQt::declareAndWriteDragImage): Use KURL instead of String.
698
699 2008-02-14  Darin Adler  <darin@apple.com>
700
701         - another round of build fixes
702
703         * platform/KURL.cpp:
704         (WebCore::appendEncodedHostname): Fix spelling (strLen, not strlen).
705         * platform/network/curl/ResourceHandleManager.cpp:
706         (WebCore::parseDataUrl): Fix a ".." typo and call data instead of characters.
707
708 2008-02-14  Darin Adler  <darin@apple.com>
709
710         - added back accidentally-removed files
711
712         * platform/DeprecatedStringList.cpp: Copied from platform/DeprecatedStringList.cpp.
713         * platform/DeprecatedStringList.h: Copied from platform/DeprecatedStringList.h.
714         * platform/mac/DeprecatedStringListMac.mm: Copied from platform/mac/DeprecatedStringListMac.mm.
715
716 2008-02-14  Darin Adler  <darin@apple.com>
717
718         - more build fixes
719
720         * platform/KURL.cpp:
721         (WebCore::appendEncodedHostname): Use String to make a QString.
722         * platform/network/cf/ResourceRequest.h:
723         (WebCore::ResourceRequest::ResourceRequest): Removed a stray deprecatedString() call.
724         * platform/network/curl/ResourceHandleManager.cpp:
725         (WebCore::parseDataUrl): Updated to String rather than DeprecatedString functions.
726
727 2008-02-14  Darin Adler  <darin@apple.com>
728
729         - next Qt build fix
730
731         * platform/network/qt/ResourceRequest.h:
732         (WebCore::ResourceRequest::ResourceRequest): Removed a stray deprecatedString() call.
733
734 2008-02-14  Darin Adler  <darin@apple.com>
735
736         - another build fix
737
738         * platform/network/curl/ResourceRequest.h:
739         (WebCore::ResourceRequest::ResourceRequest): Removed a stray deprecatedString() call.
740
741 2008-02-14  Darin Adler  <darin@apple.com>
742
743         - first Qt build fix
744
745         * dom/XMLTokenizer.cpp:
746         (WebCore::XMLTokenizer::endElementNs): Added a missing string() call.
747
748 2008-02-14  Darin Adler  <darin@apple.com>
749
750         Reviewed by Eric Seidel.
751
752         Based on work by Marvin Decker <marv.decker@gmail.com>
753
754         - fix http://bugs.webkit.org/show_bug.cgi?id=16538
755           KURL should use String instead of DeprecatedString
756
757         - fix http://bugs.webkit.org/show_bug.cgi?id=16485
758           DocLoader::checkForReload will crash if the URL isNull
759           and a similar problem in IconDatabase
760
761         - fix http://bugs.webkit.org/show_bug.cgi?id=16487
762           KURL doesn't preserve isNull when constructed with a DeprecatedString
763
764         - changed completeURL and various DOM getters to return KURL, to avoid
765           conversion back and forth from KURL to String
766
767         - changed the conversion of KURL to NSURL or NSString to be automatic,
768           to ease the use of KURL in Objective C DOM bindings, and eliminated
769           the getNSURL function
770
771         - because I had to visit the DOM bindings anyway, eliminated almost all
772           the use of the KJS namespace for things in WebCore
773
774         - fixed HTMLOptionElement constructor to check for undefined rather
775           than size of the arguments array
776
777         - eliminated some other unnecessary uses of DeprecatedString
778
779         - changed String::split to take a Vector parameter instead of returning
780           a Vector, for better performance
781
782         - added a couple of missing calls to do layout in SVG image handling;
783           I was able to reproduce these only because I had broken URLs for a
784           while -- not sure how to reproduce them now but the changes are
785           clearly needed
786
787         Performance testing shows this to be at least a 1% speedup.
788
789         Added a new function protocols to efficiently compare protocols
790         without case errors and a blankURL function so we don't have to
791         code "about:blank" in multiple places in the code and don't have to
792         construct a frash KURL each time. Moved decode_string and encode_string
793         out of KURL and gave them clearer names.
794
795         Made KURL constructors explicit to highlight potentially-expensive
796         operations and the poor semantics of KURL's constructor that takes
797         a String.
798
799         * WebCore.base.exp: Updated.
800
801         * bindings/js/JSAttrCustom.cpp:
802         (WebCore::JSAttr::setValue): Use protocolIs.
803         * bindings/js/JSAudioConstructor.h: KJS namespace change.
804         * bindings/js/JSCSSRuleCustom.cpp:
805         (WebCore::toJS): Ditto.
806         * bindings/js/JSCSSValueCustom.cpp:
807         (WebCore::toJS): Ditto.
808         * bindings/js/JSDocumentCustom.cpp:
809         (WebCore::JSDocument::location): Ditto.
810         (WebCore::JSDocument::setLocation): Updated for KURL change.
811         (WebCore::toJS): KJS namespace change.
812         * bindings/js/JSElementCustom.cpp:
813         (WebCore::allowSettingSrcToJavascriptURL): Use protocolIs.
814         (WebCore::JSElement::setAttribute): KJS namespace change.
815         (WebCore::JSElement::setAttributeNode): Ditto.
816         (WebCore::JSElement::setAttributeNS): Ditto.
817         (WebCore::JSElement::setAttributeNodeNS): Ditto.
818         * bindings/js/JSHTMLFrameElementCustom.cpp:
819         (WebCore::allowSettingJavascriptURL): Use protocolIs.
820         (WebCore::JSHTMLFrameElement::setSrc): KJS namespace change.
821         (WebCore::JSHTMLFrameElement::setLocation): Ditto.
822         * bindings/js/JSHTMLIFrameElementCustom.cpp:
823         (WebCore::JSHTMLIFrameElement::setSrc): Use protocolIs.
824         * bindings/js/JSHTMLOptionElementConstructor.cpp:
825         (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor):
826         (WebCore::JSHTMLOptionElementConstructor::construct): Cleaned up the
827         structure a bit and changed checking to check for undefined rather than
828         number of arguments.
829         * bindings/js/JSHTMLOptionElementConstructor.h: KJS namespace change.
830         * bindings/js/JSLocation.cpp:
831         (WebCore::JSLocation::put): Eliminated some DeprecatedString use,
832         and use protocolIs.
833         (WebCore::jsLocationProtoFuncReplace): Ditto.
834         (WebCore::jsLocationProtoFuncReload): Ditto.
835         (WebCore::jsLocationProtoFuncAssign): Ditto.
836         * bindings/js/JSLocation.h: KJS namespace change.
837         * bindings/js/JSNamedNodeMapCustom.cpp:
838         (WebCore::JSNamedNodeMap::canGetItemsForName): Ditto.
839         (WebCore::JSNamedNodeMap::nameGetter): Ditto.
840         * bindings/js/JSNamedNodesCollection.cpp:
841         (WebCore::JSNamedNodesCollection::JSNamedNodesCollection): Ditto.
842         * bindings/js/JSNamedNodesCollection.h: Ditto.
843         * bindings/js/JSXMLHttpRequest.cpp:
844         (WebCore::jsXMLHttpRequestPrototypeFunctionOpen): Removed
845         DeprecatedString use.
846         (WebCore::jsXMLHttpRequestPrototypeFunctionSend): Ditto.
847         * bindings/js/JSXMLHttpRequest.h: Moved this class into the WebCore
848         namespace.
849         * bindings/js/JSXSLTProcessor.cpp: Namespace change.
850         * bindings/js/JSXSLTProcessor.h: Ditto.
851
852         * bindings/js/kjs_binding.cpp: Updated for namespace change.
853         (WebCore::jsStringOrNull): Added an overload for KURL to allow DOM
854         classes to return KURL even if the DOM expects a string.
855         (WebCore::jsStringOrUndefined): Ditto.
856         (WebCore::jsStringOrFalse): Ditto.
857         * bindings/js/kjs_binding.h: Moved everything into the WebCore
858         namespace.
859
860         * bindings/js/kjs_css.h: Namespace change.
861         * bindings/js/kjs_events.cpp: Removed an include.
862         * bindings/js/kjs_events.h: Namespace change.
863         * bindings/js/kjs_html.h: Namespace change.
864
865         * bindings/js/kjs_navigator.cpp: Moved everything into the
866         WebCore namespace.
867         * bindings/js/kjs_navigator.h: Ditto.
868
869         * bindings/js/kjs_window.cpp:
870         (KJS::parseModalDialogFeatures): Updated for String::split change.
871         (KJS::createWindow): Use protocolIs and removed some DeprecatedString.
872         (KJS::Window::put): Ditto.
873         (KJS::Window::allowsAccessFrom): Ditto.
874         (KJS::windowProtoFuncOpen): Ditto.
875
876         * bindings/objc/DOM.mm:
877         (-[DOMElement _getURLAttribute:]): Removed getNSURL call.
878         * bindings/objc/DOMHTML.mm:
879         (-[DOMHTMLDocument _createDocumentFragmentWithMarkupString:baseURLString:]): Ditto.
880
881         * bindings/scripts/CodeGeneratorCOM.pm: Updated includes so conversions from
882         KURL will work.
883         * bindings/scripts/CodeGeneratorJS.pm: Updated for namespace changes, and also
884         updated includes so conversions from KURL will work.
885         * bindings/scripts/CodeGeneratorObjC.pm: Updated includes so conversions from
886         KURL will work.
887
888         * bridge/mac/WebCoreAXObject.mm:
889         (-[WebCoreAXObject accessibilityAttributeValue:]): Removed getNSURL call.
890         Also streamlined the logic.
891         (AXAttributedStringAppendText): Ditto.
892
893         * bridge/mac/WebCoreScriptDebugger.mm:
894         (toNSString): Tweaked.
895         (toNSURL): Removed getNSURL call.
896
897         * css/CSSImageValue.cpp:
898         (WebCore::CSSImageValue::image): Removed DeprecatedString use.
899         * css/CSSImportRule.cpp:
900         (WebCore::CSSImportRule::insertedIntoParent): Ditto.
901         * css/CSSParser.cpp:
902         (WebCore::CSSParser::parseValue): Ditto.
903         (WebCore::CSSParser::parseContent): Ditto.
904         (WebCore::CSSParser::parseBackgroundImage): Ditto.
905         (WebCore::CSSParser::parseFontFaceSrc): Ditto.
906         (WebCore::CSSParser::parseBorderImage): Ditto.
907         * css/CSSStyleSelector.cpp:
908         (WebCore::CSSStyleSelector::setEncodedURL): Ditto.
909         (WebCore::checkPseudoState): Ditto.
910         * css/CSSStyleSelector.h: Ditto.
911
912         * css/MediaList.cpp:
913         (WebCore::MediaList::setMediaText): Updated for String::split change.
914
915         * css/StyleBase.cpp:
916         (WebCore::StyleBase::baseURL): Return KURL.
917         * css/StyleBase.h: DItto.
918
919         * dom/Document.cpp:
920         (WebCore::Document::~Document): Updated for namespace change.
921         (WebCore::Document::documentURI): Return KURL.
922         (WebCore::Document::setDocumentURI): Removed DeprecatedString use.
923         (WebCore::Document::baseURI): Return KURL.
924         (WebCore::Document::open): Updated to use blankURL.
925         (WebCore::Document::setURL): Take KURL.
926         (WebCore::Document::shouldBeAllowedToLoadLocalResources): Updated for
927         change to use KURL
928         (WebCore::Document::setBaseURL): Take KURL.
929         (WebCore::Document::elementSheet): Updated for KURL change.
930         (WebCore::Document::mappedElementSheet): Ditto.
931         (WebCore::Document::processHttpEquiv): Ditto.
932         (WebCore::Document::recalcStyleSelector): Removed use of
933         DeprecatedString -- also noticed some dead code here!
934         (WebCore::Document::setCookie): Ditto.
935         (WebCore::Document::completeURL): Return KURL.
936         * dom/Document.h: Use KURL instead of String in a few places.
937
938         * dom/DocumentType.cpp:
939         (WebCore::DocumentType::baseURI): Return KURL.
940         * dom/DocumentType.h: Ditto.
941
942         * dom/Element.cpp:
943         (WebCore::Element::baseURI): Return KURL.
944         * dom/Element.h: Ditto.
945
946         * dom/Node.cpp:
947         (WebCore::Node::setDocument): Namespace change.
948         (WebCore::Node::baseURI): Return KURL.
949         * dom/Node.h: Ditto.
950
951         * dom/ProcessingInstruction.cpp:
952         (WebCore::ProcessingInstruction::checkStyleSheet): Updated for KURL change.
953         * dom/StyleElement.cpp:
954         (WebCore::StyleElement::process): Changed to use Vector<UChar> instead of
955         String for better performance.
956         (WebCore::StyleElement::createSheet): Removed use of DeprecateString.
957         * dom/XMLTokenizer.cpp:
958         (WebCore::XMLTokenizer::endElementNs): Updated for KURL change.
959         (WebCore::XMLTokenizer::end): Ditto.
960         (WebCore::xmlDocPtrForString): Removed use of DeprecateString.
961         * dom/XMLTokenizer.h: Ditto.
962
963         * editing/markup.cpp: Moved appendString to PlatformString.h.
964         (WebCore::appendQuotedURLAttributeValue): Use protocolIs.
965         (WebCore::completeURLs): Removed DeprecatedString use.
966         (WebCore::createFragmentFromMarkup): Use blankURL.
967         (WebCore::fillContainerFromString): Removed DeprecatedString use.
968         (WebCore::createFragmentFromText): Ditto.
969
970         * history/HistoryItem.cpp:
971         (WebCore::HistoryItem::url): Removed DeprecatedString use.
972         (WebCore::HistoryItem::originalURL): Ditto.
973         * history/HistoryItem.h: Removed include.
974
975         * html/HTMLAnchorElement.cpp:
976         (WebCore::HTMLAnchorElement::defaultEventHandler): Removed use of
977         DeprecatedString.
978         (WebCore::HTMLAnchorElement::href): Return KURL.
979         (WebCore::HTMLAnchorElement::hash): Removed DeprecatedString use.
980         (WebCore::HTMLAnchorElement::host): Ditto.
981         (WebCore::HTMLAnchorElement::hostname): Ditto.
982         (WebCore::HTMLAnchorElement::pathname): Ditto.
983         (WebCore::HTMLAnchorElement::port): Ditto.
984         (WebCore::HTMLAnchorElement::protocol): Ditto.
985         (WebCore::HTMLAnchorElement::search): Ditto.
986         (WebCore::HTMLAnchorElement::toString): Ditto.
987         * html/HTMLAnchorElement.h: Ditto.
988         * html/HTMLAppletElement.cpp:
989         (WebCore::HTMLAppletElement::createRenderer): Updated for KURL change.
990         * html/HTMLAreaElement.cpp:
991         (WebCore::HTMLAreaElement::href): Return KURL.
992         * html/HTMLAreaElement.h: Ditto.
993         * html/HTMLBaseElement.cpp:
994         (WebCore::HTMLBaseElement::removedFromDocument): Updated for KURL change.
995         (WebCore::HTMLBaseElement::process): Removed DeprecatedString use.
996         * html/HTMLBodyElement.cpp:
997         (WebCore::HTMLBodyElement::parseMappedAttribute): Updated for KURL change.
998         * html/HTMLEmbedElement.cpp:
999         (WebCore::HTMLEmbedElement::parseMappedAttribute): Removed use of
1000         DeprecatedString.
1001         * html/HTMLEmbedElement.h: Removed DeprecatedString use.
1002         * html/HTMLFormElement.cpp:
1003         (WebCore::HTMLFormElement::formWouldHaveSecureSubmission): Use protocolIs.
1004         (WebCore::encodeCString): Updated for change to String::split.
1005         (WebCore::HTMLFormElement::dataEncoding): Ditto.
1006         (WebCore::HTMLFormElement::formData): Removed DeprecatedString use.
1007         (WebCore::HTMLFormElement::isMailtoForm): Use protocolIs.
1008         (WebCore::HTMLFormElement::submit): Updated for KURL change.
1009         (WebCore::HTMLFormElement::reset): Ditto.
1010         * html/HTMLFrameElementBase.cpp:
1011         (WebCore::HTMLFrameElementBase::isURLAllowed): Updated for KURL change
1012         and use equalIgnoringRef instead of doing a setRef to get the same effect.
1013         (WebCore::HTMLFrameElementBase::openURL): Use blankURL.
1014         (WebCore::HTMLFrameElementBase::location): Return KURL.
1015         (WebCore::HTMLFrameElementBase::src): Return KURL.
1016         * html/HTMLFrameElementBase.h: Ditto.
1017         * html/HTMLImageElement.cpp:
1018         (WebCore::HTMLImageElement::parseMappedAttribute): Updated for KURL change.
1019         (WebCore::HTMLImageElement::longDesc): Return KURL.
1020         (WebCore::HTMLImageElement::lowsrc): Return KURL.
1021         (WebCore::HTMLImageElement::src): Return KURL.
1022         * html/HTMLImageElement.h: Ditto. Also removed imageMap() function.
1023         * html/HTMLInputElement.cpp:
1024         (WebCore::HTMLInputElement::src): Return KURL.
1025         * html/HTMLInputElement.h: Ditto.
1026         * html/HTMLLinkElement.cpp:
1027         (WebCore::HTMLLinkElement::parseMappedAttribute): Updated for KURL change.
1028         (WebCore::HTMLLinkElement::tokenizeRelAttribute): Updated for String::split change.
1029         (WebCore::HTMLLinkElement::href): Return KURL.
1030         * html/HTMLLinkElement.h: Ditto.
1031         * html/HTMLMediaElement.cpp:
1032         (WebCore::HTMLMediaElement::src): Return KURL.
1033         (WebCore::HTMLMediaElement::pickMedia): Updated for KURL change.
1034         * html/HTMLMediaElement.h: Ditto.
1035         * html/HTMLObjectElement.cpp:
1036         (WebCore::HTMLObjectElement::isImageType): Use protocolIs.
1037         (WebCore::HTMLObjectElement::data): Return KURL.
1038         * html/HTMLObjectElement.h: Ditto.
1039         * html/HTMLOptGroupElement.cpp:
1040         (WebCore::HTMLOptGroupElement::groupLabelText): Removed DeprecatedString use.
1041         * html/HTMLParser.cpp:
1042         (WebCore::HTMLParser::reportErrorToConsole): Updated for KURL change.
1043         * html/HTMLScriptElement.cpp:
1044         (WebCore::HTMLScriptElement::insertedIntoDocument): Ditto.
1045         (WebCore::HTMLScriptElement::text): Changed to use Vector<UChar> instead of
1046         String for better performance.
1047         (WebCore::HTMLScriptElement::src): Return KURL.
1048         * html/HTMLScriptElement.h: Ditto.
1049         * html/HTMLSourceElement.cpp:
1050         (WebCore::HTMLSourceElement::src): Return KURL.
1051         * html/HTMLSourceElement.h: Ditto.
1052         * html/HTMLTableElement.cpp:
1053         (WebCore::HTMLTableElement::parseMappedAttribute): Updated for KURL change.
1054         * html/HTMLTablePartElement.cpp:
1055         (WebCore::HTMLTablePartElement::parseMappedAttribute): Updated for KURL change.
1056         * html/HTMLTextAreaElement.cpp:
1057         (WebCore::HTMLTextAreaElement::setValue): Removed DeprecatedString use.
1058         * html/HTMLTokenizer.cpp:
1059         (WebCore::HTMLTokenizer::scriptExecution): Ditto.
1060         (WebCore::HTMLTokenizer::notifyFinished): Use protocolIs.
1061         * html/HTMLVideoElement.cpp:
1062         (WebCore::HTMLVideoElement::poster): Return KURL.
1063         * html/HTMLVideoElement.h: Ditto.
1064         * html/HTMLViewSourceDocument.cpp:
1065         (WebCore::HTMLViewSourceDocument::addText): Updated for String::split change.
1066
1067         * loader/DocLoader.cpp:
1068         (WebCore::DocLoader::checkForReload): Add an explicit check for an empty URL
1069         here to avoid problems using its string as a hash table key later.
1070         (WebCore::DocLoader::requestResource): Removed DeprecatedString use.
1071
1072         * loader/FTPDirectoryDocument.cpp:
1073         (WebCore::FTPDirectoryTokenizer::createTDForFilename): Updated for KURL change.
1074         (WebCore::FTPDirectoryTokenizer::parseAndAppendOneLine): Removed use of
1075         DeprecatedString.
1076
1077         * loader/FrameLoader.cpp:
1078         (WebCore::FrameLoader::requestFrame): Use protocolIs.
1079         (WebCore::FrameLoader::loadSubframe): Use blankURL.
1080         (WebCore::FrameLoader::submitForm): Use protocolIs and removed use of
1081         DeprecatedString.
1082         (WebCore::FrameLoader::iconURL): Return KURL. Use protcolIs.
1083         (WebCore::FrameLoader::didOpenURL): Use protocolIs.
1084         (WebCore::FrameLoader::didExplicitOpen): Use blankURL.
1085         (WebCore::FrameLoader::executeIfJavaScriptURL): Use protocolIs.
1086         Update for name change to decodeURLEscapeSequences.
1087         (WebCore::FrameLoader::receivedFirstData): Updated for KURL changes.
1088         (WebCore::FrameLoader::begin): Removed DeprecatedString use.
1089         Renamed baseurl to baseURL. Updated to use KURL more.
1090         (WebCore::FrameLoader::gotoAnchor): Removed use of encodedHtmlRef
1091         function, which is no different from ref.
1092         (WebCore::FrameLoader::completeURL): Updated for KURL change.
1093         (WebCore::FrameLoader::scheduleLocationChange): Ditto.
1094         (WebCore::FrameLoader::canCachePage): Use protocolIs.
1095         (WebCore::FrameLoader::updatePolicyBaseURL): Update for KURL change.
1096         (WebCore::FrameLoader::setPolicyBaseURL): Take KURL.
1097         (WebCore::FrameLoader::startRedirectionTimer): Removed use of
1098         DeprecatedString.
1099         (WebCore::FrameLoader::load): Use protocolIs.
1100         (WebCore::FrameLoader::shouldHideReferrer): Use protocolIs.
1101         (WebCore::FrameLoader::shouldAllowNavigation): Updated for KURL change.
1102         (WebCore::FrameLoader::commitProvisionalLoad): Use blankURL.
1103         (WebCore::FrameLoader::open): Use protcolIs.
1104         (WebCore::FrameLoader::createHistoryItem): Use blankURL.
1105         (WebCore::FrameLoader::createJavaAppletWidget): Updated for KURL change.
1106         (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady): Removed
1107         DeprecatedString use.
1108         * loader/FrameLoader.h: Ditto.
1109
1110         * loader/ImageDocument.cpp:
1111         (WebCore::ImageDocument::createDocumentStructure): Updated for KURL change.
1112         * loader/PluginDocument.cpp:
1113         (WebCore::PluginTokenizer::createDocumentStructure): Ditto.
1114
1115         * loader/icon/IconDatabase.cpp:
1116         (WebCore::IconDatabase::iconForPageURL): Added a check for an empty URL
1117         before trying to use it as a hash table key.
1118
1119         * loader/icon/IconLoader.h: Tweaked includes.
1120
1121         * loader/loader.cpp:
1122         (WebCore::Loader::servePendingRequests): Use protcolIs. Also removed some
1123         code to set up a local variable that is never used (and a DeprecatedString
1124         on to boot!).
1125
1126         * loader/mac/LoaderNSURLExtras.m:
1127         (suggestedFilenameWithMIMEType): Removed unnecessary typecast.
1128
1129         * page/ContextMenuController.cpp: Removed include.
1130
1131         * page/mac/EventHandlerMac.mm:
1132         (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks):
1133         Use protocolIs.
1134
1135         * page/mac/WebCoreFrameBridge.mm:
1136         (-[WebCoreFrameBridge URLWithAttributeString:]): Removed getNSURL call.
1137         (-[WebCoreFrameBridge baseURL]): Ditto.
1138
1139         * platform/KURL.cpp:
1140         (WebCore::isSchemeFirstChar): Fixed bug in handling of values >= 0x80.
1141         (WebCore::isSchemeChar): Ditto.
1142         (WebCore::isPathSegmentEndChar): Ditto.
1143         (WebCore::hexDigitValue): Changed parameter type to UChar.
1144         (WebCore::copyASCII): Added.
1145         (WebCore::findFirstOf): Added.
1146         (WebCore::KURL::protocolIs): Added.
1147         (WebCore::KURL::KURL): Tightened logic up quite a bit. Changed parameter
1148         types from DeprecatedString to String.
1149         (WebCore::KURL::init): Changed parameter type to String. Preserved the
1150         passed-in string even if the base is invalid. Cleaned up logic to determine
1151         if the originalString should be pased in to the parse function. Simplified
1152         by calling the new parse overload that takes String in many cases.
1153         (WebCore::KURL::lastPathComponent): Return String.
1154         (WebCore::KURL::protocol): Ditto.
1155         (WebCore::KURL::host): Ditto.
1156         (WebCore::KURL::port): Changed logic to use early return for clarity.
1157         (WebCore::KURL::pass): Return String.
1158         (WebCore::KURL::user): Ditto.
1159         (WebCore::KURL::ref): Ditto.
1160         (WebCore::assertProtocolIsGood): Added.
1161         (WebCore::KURL::protocolIs): Added.
1162         (WebCore::KURL::query): Return String.
1163         (WebCore::KURL::path): Ditto.
1164         (WebCore::KURL::setProtocol): Take String.
1165         (WebCore::KURL::setHost): Ditto.
1166         (WebCore::KURL::setPort): Use String.
1167         (WebCore::KURL::setHostAndPort): Take String.
1168         (WebCore::KURL::setUser): Ditto.
1169         (WebCore::KURL::setPass): Ditto.
1170         (WebCore::KURL::setRef): Ditto.
1171         (WebCore::KURL::setQuery): Ditto.
1172         (WebCore::KURL::setPath): Ditto.
1173         (WebCore::KURL::prettyURL): Return String. Use Vector<UChar> to build it.
1174         (WebCore::decodeURLEscapeSequences): Renamed from KURL::decode_string.
1175         Return String. Use Vector<UChar> to build it.
1176         (WebCore::KURL::isLocalFile): Use protocolIs.
1177         (WebCore::KURL::parse): Added an overload that takes a String to replace
1178         the use of DeprecatedString::ascii at various call sites. Updated for
1179         name change (urlString -> m_string).
1180         (WebCore::equalIgnoringRef): Wrote a new implementation that doesn't
1181         do any allocation.
1182         (WebCore::encodeWithURLEscapeSequences): Renamed from KURL::encode_string.
1183         Return String.
1184         (WebCore::appendEncodedHostname): Added. Replaces encodeHostname and
1185         avoids the need to allocate a string.
1186         (WebCore::findHostnamesInMailToURL): Update to use findFirstOf instead of
1187         regular expressions.
1188         (WebCore::findHostnameInHierarchicalURL): Ditto.
1189         (WebCore::encodeHostnames): Use protocolIs and the other helpers above.
1190         (WebCore::encodeRelativeString): Changed to put result into a CharBuffer.
1191         (WebCore::substituteBackslashes): Updated to use String.
1192         (WebCore::KURL::copyToBuffer): Added.
1193         (WebCore::protocolIs): Added.
1194         (WebCore::blankURL): Added.
1195         (WebCore::KURL::print): Updated.
1196         * platform/KURL.h: Added a number of comments. Reorganized the header a bit.
1197         Made the string constructors explicit. Changed to use String instead of
1198         DeprecatedString. Removed encodedHTMLRef. Renamed and added a few functions.
1199
1200         * platform/cf/KURLCFNet.cpp:
1201         (WebCore::KURL::KURL): Streamlined the logic a bit.
1202         (WebCore::KURL::createCFURL): Changed to use copyToBuffer.
1203
1204         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1205         (WebCore::MediaPlayerPrivate::createQTMovie): Removed getNSURL call.
1206         Use protocolIs.
1207         * platform/mac/ClipboardMac.mm:
1208         (WebCore::ClipboardMac::declareAndWriteDragImage): Removed getNSURL call.
1209         * platform/mac/CookieJar.mm:
1210         (WebCore::cookies): Removed getNSURL call.
1211         (WebCore::setCookies): Removed getNSURL call.
1212         * platform/mac/KURLMac.mm:
1213         (WebCore::KURL::KURL): Streamlined the logic a bit.
1214         * platform/mac/PasteboardMac.mm:
1215         (WebCore::Pasteboard::writeURL): Removed getNSURL call.
1216         (WebCore::Pasteboard::writeImage): Ditto.
1217         * platform/mac/SSLKeyGeneratorMac.mm:
1218         (WebCore::signedPublicKeyAndChallengeString): Ditto.
1219
1220         * platform/network/HTTPParsers.cpp:
1221         (WebCore::filenameFromHTTPContentDisposition): Updated for String::split.
1222         * platform/network/ResourceHandle.cpp:
1223         (WebCore::ResourceHandle::portAllowed): Use protocolIs.
1224
1225         * platform/network/cf/ResourceErrorCF.cpp:
1226         (WebCore::ResourceError::operator CFErrorRef): Removed deprecatedString call.
1227         * platform/network/curl/ResourceHandleManager.cpp:
1228         (WebCore::headerCallback): Ditto.
1229         (WebCore::parseDataUrl): Use String instead of DeprecatedString.
1230         (WebCore::ResourceHandleManager::startJob): Updated for KURL changes.
1231         * platform/network/mac/ResourceErrorMac.mm:
1232         (WebCore::ResourceError::operator NSError*): Removed getNSURL call.
1233         * platform/network/mac/ResourceRequest.h:
1234         (WebCore::ResourceRequest::ResourceRequest): Removed DeprecatedString use.
1235         * platform/network/mac/ResourceRequestMac.mm:
1236         (WebCore::ResourceRequest::doUpdatePlatformRequest): Removed getNSURL call.
1237         * platform/network/mac/ResourceResponseMac.mm:
1238         (WebCore::ResourceResponse::nsURLResponse): Removed getNSURL call.
1239
1240         * platform/qt/ClipboardQt.cpp:
1241         (WebCore::ClipboardQt::writeURL): Removed deprecatedString call.
1242
1243         * platform/text/CString.h:
1244         (WebCore::CStringBuffer::length): Fixed size_t/unsigned mismatch to make it
1245         possible to compile this on Windows with higher warning level
1246
1247         * platform/text/PlatformString.h: Updated split to modify a result parameter
1248         rather than returning a Vector. Added charactersAreAllASCII and an append
1249         function that appends a String to a Vector<UChar>.
1250         * platform/text/String.cpp:
1251         (WebCore::String::split): Updated.
1252
1253         * platform/win/BString.cpp:
1254         (WebCore::BString::BString): Added conversion from KURL.
1255         * platform/win/BString.h: Ditto.
1256
1257         * platform/win/ClipboardUtilitiesWin.cpp:
1258         (WebCore::markupToCF_HTML): Removed use of deprecatedString.
1259         * platform/win/ClipboardWin.cpp:
1260         (WebCore::filesystemPathFromUrlOrTitle): Ditto.
1261         (WebCore::createGlobalHDropContent): Ditto.
1262         (WebCore::ClipboardWin::setData): Ditto.
1263         (WebCore::ClipboardWin::writeRange): Ditto.
1264         * platform/win/PasteboardWin.cpp:
1265         (WebCore::Pasteboard::writeSelection): Ditto.
1266         * plugins/PluginStream.cpp:
1267         (WebCore::PluginStream::startStream): Ditto.
1268         (WebCore::PluginStream::destroyStream): Ditto.
1269         * plugins/win/PluginViewWin.cpp:
1270         (WebCore::scriptStringIfJavaScriptURL): Ditto.
1271         (WebCore::PluginView::performRequest): Ditto.
1272         (WebCore::PluginView::PluginView): Ditto.
1273
1274         * rendering/HitTestResult.cpp:
1275         (WebCore::HitTestResult::absoluteImageURL): Removed DeprecatedString use.
1276         (WebCore::HitTestResult::absoluteLinkURL): Ditto.
1277
1278         * rendering/RenderFrameSet.cpp:
1279         (WebCore::RenderFrameSet::layOutAxis): Fixed comment wording.
1280         * rendering/RenderImage.cpp:
1281         (WebCore::RenderImage::paintReplaced): Removed use of DeperecatedString,
1282         (WebCore::RenderImage::imageMap): Changed to call useMap instead of imageMap;
1283         both do the same thing, and the first is standard DOM.
1284
1285         * rendering/RenderObject.cpp:
1286         (WebCore::RenderObject::addPDFURLRect): Rewrote and streamlined to remove
1287         DeprecatedString use.
1288         * rendering/RenderObject.h: Changed addPDFURLRect to take const IntRect&.
1289
1290         * rendering/RenderPartObject.cpp:
1291         (WebCore::isURLAllowed): Updated for KURL change and use equalIgnoringRef
1292         instead of doing a setRef to get the same effect.
1293         (WebCore::RenderPartObject::updateWidget): Updated for KURL change.
1294
1295         * rendering/RenderText.cpp:
1296         (WebCore::charactersAreAllASCII): Moved the guts to PlatformString.h.
1297
1298         * rendering/SVGRenderSupport.cpp:
1299         (WebCore::renderSubtreeToImage): Added missing call to do layout. I ran
1300         into this while doing some layout tests while URL processing was broken.
1301
1302         * rendering/SVGRenderTreeAsText.h: Removed include.
1303
1304         * svg/SVGImageLoader.cpp:
1305         (WebCore::SVGImageLoader::updateFromElement): Removed DeprecatedString use.
1306
1307         * svg/graphics/SVGImage.cpp:
1308         (WebCore::SVGImage::draw): Added missing call to do layout. I ran
1309         into this while doing some layout tests while URL processing was broken.
1310         (WebCore::SVGImage::dataChanged): Use a null URL rather than an arbitrary
1311         string for the document.
1312
1313         * xml/XMLHttpRequest.cpp:
1314         (WebCore::XMLHttpRequest::getResponseXML): Removed DeprecatedString use.
1315         (WebCore::XMLHttpRequest::urlMatchesDocumentDomain): Ditto.
1316         (WebCore::XMLHttpRequest::open): Ditto.
1317         (WebCore::XMLHttpRequest::send):  Namespace change.
1318         (WebCore::XMLHttpRequest::dropProtection): Ditto.
1319         * xml/XMLHttpRequest.h: Removed DeprecatedString use.
1320
1321         * xml/XSLImportRule.cpp:
1322         (WebCore::XSLImportRule::loadSheet): Removed DeprecatedString use.
1323         * xml/XSLStyleSheet.cpp:
1324         (WebCore::XSLStyleSheet::loadChildSheets): Ditto.
1325         (WebCore::XSLStyleSheet::loadChildSheet): Ditto.
1326         * xml/XSLStyleSheet.h: Ditto.
1327         * xml/XSLTProcessor.cpp:
1328         (WebCore::docLoaderFunc): Ditto.
1329         (WebCore::xsltStylesheetPointer): Ditto.
1330         (WebCore::xmlDocPtrFromNode): Ditto.
1331
1332 2008-02-14  Ada Chan  <adachan@apple.com>
1333
1334         <rdar://problem/5744728> Fix leaks of RegularExpression objects in Frame.cpp.
1335         
1336         Reviewed by Jon and Darin.
1337
1338         * page/Frame.cpp:
1339         (WebCore::createRegExpForLabels):
1340         (WebCore::Frame::searchForLabelsBeforeElement):
1341         (WebCore::Frame::matchLabelsAgainstElement):
1342
1343 2008-02-14  Stephanie Lewis  <slewis@apple.com>
1344
1345         Reviewed by Geoff.
1346
1347         Update order files.
1348
1349         * WebCore.order:
1350
1351 2008-02-14  Oliver Hunt  <oliver@apple.com>
1352
1353         Reviewed by Geoff G and Weinig.
1354
1355         <rdar://problem/5726608> REGRESSION (r29428): Assigning to window.status does not update status bar
1356
1357         Revert the portions of r29428 responsible for breaking the ability to
1358         set window.status
1359
1360         * page/DOMWindow.cpp:
1361         (WebCore::DOMWindow::setStatus):
1362         (WebCore::DOMWindow::defaultStatus):
1363         (WebCore::DOMWindow::setDefaultStatus):
1364         * page/DOMWindow.h:
1365         * page/DOMWindow.idl:
1366
1367 2008-02-14  Anders Carlsson  <andersca@apple.com>
1368
1369         Reviewed by Darin.
1370
1371         <rdar://problem/5721790>
1372         Crash in WebCore::DeprecatedString::operator= + 31 at news.google.com
1373         
1374         Use pointers in the cache map tables. Otherwise when we rehash, 
1375         we will end up destroying Cache objects that node lists might point to.
1376         
1377         * dom/Node.cpp:
1378         (WebCore::NodeListsNodeData::~NodeListsNodeData):
1379         (WebCore::Node::getElementsByName):
1380         (WebCore::Node::getElementsByClassName):
1381
1382 2008-02-14  Alp Toker  <alp@atoker.com>
1383
1384         Reviewed by Darin.
1385
1386         http://bugs.webkit.org/show_bug.cgi?id=17353
1387         XMLTokenizer installs global libxml2 callbacks that can break client applications
1388
1389         Patch by Mark Rowe (with a few changes).
1390
1391         The xmlRegisterInputCallbacks/xmlRegisterOutputCallbacks done at
1392         init are global so we need to make sure these callbacks only get used
1393         by XMLTokenizer and never by libxml2 calls in user applications.
1394
1395         This patch modifies the match and open functions to only apply when we
1396         are certain the caller is XMLTokenizer by checking globalDocLoader and
1397         ensuring we're on the correct thread.
1398
1399         Some possible issues remain. See the bug report for details.
1400
1401         * dom/XMLTokenizer.cpp:
1402         (WebCore::matchFunc):
1403         (WebCore::openFunc):
1404         (WebCore::createStringParser):
1405
1406 2008-02-14  Timothy Hatcher  <timothy@apple.com>
1407
1408         Reviewed by Darin Adler.
1409
1410         <rdar://problem/5743768> A deadlock during storage layout tests
1411
1412         Make sure not to hold the m_openDatabaseMapGuard mutex when calling
1413         Database::markAsDeletedAndClose(), since that can cause a deadlock
1414         during the synchronous DatabaseThread call it triggers.
1415
1416         * storage/DatabaseTracker.cpp:
1417         (WebCore::DatabaseTracker::deleteDatabaseFile):
1418
1419 2008-02-14  Adam Roben  <aroben@apple.com>
1420
1421         Turn on cross-document messaging support by default
1422
1423         Reviewed by Darin.
1424
1425         * Configurations/WebCore.xcconfig:
1426         * WebCore.pro:
1427         * WebCore.vcproj/WebCore.vcproj:
1428
1429 2008-02-14  Adam Roben  <aroben@apple.com>
1430
1431         Conditionalize cross-document messaging support
1432
1433         The cross-document messaging parts of HTML 5 are in flux and we want
1434         ports to be able to turn off the support as needed.
1435
1436         Note that the support is turned off by default right now. A subsequent
1437         commit will turn it on by default.
1438
1439         Reviewed by Darin.
1440
1441         * GNUmakefile.am:
1442         * WebCore.vcproj/build-generated-files.sh:
1443         * bindings/js/JSDOMWindowCustom.cpp:
1444         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
1445         * bindings/js/JSEventCustom.cpp:
1446         (WebCore::toJS):
1447         * dom/Event.cpp:
1448         (WebCore::Event::isMessageEvent):
1449         * dom/Event.h:
1450         * dom/MessageEvent.cpp:
1451         * dom/MessageEvent.h:
1452         * dom/MessageEvent.idl:
1453         * page/DOMWindow.cpp:
1454         (WebCore::DOMWindow::postMessage):
1455         * page/DOMWindow.h:
1456         * page/DOMWindow.idl:
1457
1458 2008-02-14  Adam Roben  <aroben@apple.com>
1459
1460         Improve the efficiency of SecurityOriginHash
1461
1462         Reviewed by Alexey.
1463
1464         * platform/SecurityOriginHash.h:
1465         (WebCore::SecurityOriginHash::hash): Now takes a const
1466         RefPtr<SecurityOrigin>& to reduce ref-count churn.
1467         (WebCore::SecurityOriginHash::equal): Ditto.
1468
1469 2008-02-13  Justin Garcia  <justin.garcia@apple.com>
1470
1471         Reviewed by Oliver Hunt.
1472
1473         Fixes the editing/deleting/5729680.html failure.  It succeeds when run by itself
1474         but fails when run with other tests because FramePrivate's m_selectionGranularity
1475         isn't reset when a Frame receives a new document.  It was also uninitialized in
1476         the constructor.
1477
1478         * loader/FrameLoader.cpp:
1479         (WebCore::FrameLoader::clear): Initialize m_selectionGranularity.
1480         * page/Frame.cpp:
1481         (WebCore::FramePrivate::FramePrivate): Ditto.
1482
1483 2008-02-13  Jon Honeycutt  <jhoneycutt@apple.com>
1484
1485         Reviewed by Anders.
1486
1487         <rdar://problem/5739282> Hangs after closing video trailer popup with
1488         VLC plugin
1489
1490         VLC hangs on NPP_Destroy if we call NPP_SetWindow with a null window
1491         handle.
1492
1493         * plugins/PluginQuirkSet.h: Added new quirk
1494         PluginQuirkDontSetNullWindowHandleOnDestroy.
1495         (WebCore::):
1496         * plugins/win/PluginViewWin.cpp:
1497         (WebCore::PluginView::stop): Selectively call NPP_SetWindow.
1498         (WebCore::PluginView::determineQuirks): Set new quirk for VLC plug-in.
1499
1500 2008-02-13  Rodney Dawes  <dobey@wayofthemonkey.com>
1501
1502         Reviewed by Alp Toker.
1503
1504         Fix non-SVG builds.
1505
1506         * css/CSSCursorImageValue.cpp:
1507
1508 2008-02-13  Justin Garcia  <justin.garcia@apple.com>
1509
1510         Reviewed by Adam Roben.
1511
1512         <rdar://problem/5729680> REGRESSION (r27873): Removing the last character of a word in Mail or Safari also removes the following space
1513         
1514         * editing/Editor.cpp:
1515         (WebCore::Editor::deleteWithDirection): Fixed a typo.
1516
1517 2008-02-13  Nikolas Zimmermann  <zimmermann@kde.org>
1518
1519         Reviewed by Oliver.
1520
1521         Actually fix the manual-tests/svg-cursor-changes.svg testcase.
1522         I only reran layout tests when fixing the last issues with the patch,
1523         instead of trying the manual-test :( Fixed.
1524
1525         * css/CSSCursorImageValue.cpp:
1526         (WebCore::CSSCursorImageValue::CSSCursorImageValue):
1527         (WebCore::CSSCursorImageValue::~CSSCursorImageValue):
1528         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
1529         * css/CSSCursorImageValue.h:
1530
1531 2008-02-13  Adam Roben  <aroben@apple.com>
1532
1533         Windows build fix
1534
1535         * css/CSSCursorImageValue.cpp: #include MathExtras.h to get roundf.
1536
1537 2008-02-13  Nikolas Zimmermann  <zimmermann@kde.org>
1538
1539         Reviewed by Darin & Eric.
1540
1541         Fixes: http://bugs.webkit.org/show_bug.cgi?id=17258 (SVG uses erroneous cursor implementation)
1542
1543         SVG cursors are not well-integrated within the CSS(3) cursor support in WebCore.
1544         SVGCursorElement duplicates CSSCursorImageValue functionality and inherits from
1545         CachedResourceClient itself, handling remote-image acquisation on its own.
1546
1547         RenderStyle's CursorData class holds "IntPoint hotSpot", "CachedImage* image"
1548         and just for SVG a 'String cursorFragmentId' (a reference to a SVG <cursor> element, by id).
1549
1550         SVG stores a reference to a SVGCursorElement, which holds a CachedImage pointer itself -
1551         instead of storing the CachedImage in the CursorData class, as it's supposed to be.
1552         Because of that several places in WebCore contain special SVG cursor handling - which
1553         is unneeded.
1554
1555         Fix all issues by integrating within CSSCursorImageValue, remove 'String cursorFragmentId'
1556         from RenderStyle, kill any special SVG cursor handling in WebCore and fix dynamic attribute
1557         changes through DOM / SVG DOM (scripting of 'x' / 'y' / 'xlink:href' attribute). Now you
1558         can script the mouse cursor location using SVG - the feature anyone has waited for.
1559
1560         Added manual test case: manual-tests/svg-cursor-changes.svg (no support for cursors in DRT)
1561
1562         * css/CSSCursorImageValue.cpp:
1563         (WebCore::isSVGCursorIdentifier):
1564         (WebCore::resourceReferencedByCursorElement):
1565         (WebCore::CSSCursorImageValue::~CSSCursorImageValue):
1566         (WebCore::CSSCursorImageValue::updateIfNeeded):
1567         (WebCore::CSSCursorImageValue::image):
1568         * css/CSSCursorImageValue.h:
1569         * css/CSSImageValue.cpp:
1570         (WebCore::CSSImageValue::image):
1571         * css/CSSImageValue.h:
1572         * css/CSSParser.cpp:
1573         (WebCore::CSSParser::parseValue):
1574         * css/CSSStyleSelector.cpp:
1575         (WebCore::CSSStyleSelector::applyProperty):
1576         * manual-tests/svg-cursor-changes.svg: Added.
1577         * page/EventHandler.cpp:
1578         (WebCore::EventHandler::selectCursor):
1579         * rendering/RenderStyle.cpp:
1580         * rendering/RenderStyle.h:
1581         (WebCore::CursorData::operator==):
1582         * svg/SVGCursorElement.cpp:
1583         (WebCore::SVGCursorElement::SVGCursorElement):
1584         (WebCore::SVGCursorElement::~SVGCursorElement):
1585         (WebCore::SVGCursorElement::parseMappedAttribute):
1586         (WebCore::SVGCursorElement::addClient):
1587         (WebCore::SVGCursorElement::removeClient):
1588         (WebCore::SVGCursorElement::svgAttributeChanged):
1589         * svg/SVGCursorElement.h:
1590         (WebCore::SVGCursorElement::isValid):
1591
1592 2008-02-13  Alp Toker  <alp@atoker.com>
1593
1594         Reviewed by Adam Roben.
1595
1596         Split out pure-cairo Font code to FontCairo.cpp.
1597
1598         Part of the ongoing work to share code with the Win port.
1599
1600         * GNUmakefile.am:
1601         * WebCore.pro:
1602         * platform/graphics/cairo/FontCairo.cpp: Added.
1603         (WebCore::Font::drawGlyphs):
1604         * platform/graphics/gtk/FontGtk.cpp:
1605
1606 2008-02-13  Kevin Ollivier <kevino@theolliviers.com>
1607
1608         Reviewed by Darin Adler.
1609
1610         Import wx/defs.h to keep windows.h from using ANSI functions
1611         (see note in file for more info) and use the 8-bit string friendly
1612         version of StringImpl::computeHash since we're passing it un UTF8
1613         string. Also, don't cache the hash result.
1614         
1615         http://bugs.webkit.org/show_bug.cgi?id=17321
1616
1617         * config.h:
1618         * platform/graphics/wx/FontPlatformData.h:
1619         (WebCore::FontPlatformData::hash):
1620         (WebCore::FontPlatformData::computeHash):
1621
1622 2008-02-13  Rodney Dawes  <dobey@wayofthemonkey.com>
1623
1624         Fix Bug 17220: Illogical dependency between PluginView and
1625         PluginDatabase
1626         
1627         <http://bugs.webkit.org/show_bug.cgi?id=17220>
1628
1629         Reviewed by Adam and Darin.
1630
1631         Rename PluginDatabase::createPluginView to PluginView::create, to make
1632         the illogical dependency between the two, logical
1633         Make PluginDatabase::findPlugin a public method
1634         Update the includes in PluginView and PluginDatabase for the change
1635
1636         * plugins/PluginDatabase.h:
1637         * plugins/PluginView.h:
1638         * plugins/win/PluginDatabaseWin.cpp:
1639         * plugins/win/PluginViewWin.cpp:
1640
1641 2008-02-13  Adam Roben  <aroben@apple.com>
1642
1643         Build fix
1644
1645         * platform/graphics/cg/GraphicsContextCG.cpp: Added missing #include.
1646
1647 2008-02-13  Matt Lilek  <webkit@mattlilek.com>
1648
1649         Not reviewed, build fix.
1650
1651         * platform/graphics/cg/GraphicsContextCG.cpp:
1652         (WebCore::GraphicsContext::paintBuffer):
1653
1654 2008-02-13  Darin Adler  <darin@apple.com>
1655
1656         - try to fix Wx build
1657
1658         * platform/graphics/wx/GraphicsContextWx.cpp:
1659         (WebCore::GraphicsContext::paintBuffer): Added.
1660
1661         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1662         (WebCore::GraphicsContext::paintBuffer): Added missing paintingDisabled() check.
1663         * platform/graphics/cg/GraphicsContextCG.cpp:
1664         (WebCore::GraphicsContext::paintBuffer): Ditto.
1665         * platform/graphics/qt/GraphicsContextQt.cpp:
1666         (WebCore::GraphicsContext::paintBuffer): Ditto.
1667
1668 2008-02-13  Darin Adler  <darin@apple.com>
1669
1670         - try to fix Wx build
1671
1672         * platform/wx/LocalizedStringsWx.cpp: Add missing include.
1673
1674 2008-02-11  Darin Adler  <darin@apple.com>
1675
1676         - roll out fix for <rdar://problem/5726016> REGRESSION: Xcode News window renders
1677           incorrectly due to visibility fix
1678
1679         Removed the Xcode-specific quirk at the request of some folks on the Xcode team.
1680
1681         * WebCore.base.exp: Rolled out change.
1682         * css/CSSMutableStyleDeclaration.cpp:
1683         (WebCore::CSSMutableStyleDeclaration::setProperty): Ditto.
1684         * page/Settings.cpp:
1685         (WebCore::Settings::Settings): Ditto. But keep the initialization of
1686         m_fontRenderingMode.
1687         (WebCore::Settings::setNeedsXcodeVisibilityQuirk): Removed.
1688         * page/Settings.h:
1689         (WebCore::Settings::needsXcodeVisibilityQuirk): Removed.
1690
1691 2008-02-13  Alexey Proskuryakov  <ap@webkit.org>
1692
1693         Reviewed by Darin.
1694
1695         <rdar://problem/5740042> Database termination issues
1696
1697         Test: storage/close-during-stress-test.html
1698
1699         * dom/Document.cpp:
1700         (WebCore::Document::databaseThread):
1701         * dom/Document.h:
1702         Don't re-create the database thread if it has been already terminated.
1703
1704         * storage/Database.h: (WebCore::Database::document): Changed m_database to a RefPtr to avoid
1705         having a hanging reference.
1706
1707         * storage/DatabaseThread.cpp:
1708         (WebCore::DatabaseThread::requestTermination):
1709
1710         * storage/SQLTransaction.cpp: (WebCore::SQLTransaction::~SQLTransaction): Removed logging.
1711         Transactions are deleted during GC, so it's usually not importatnt to know when it happens.
1712
1713 2008-02-12  Bernhard Rosenkraenzer  <bero@arklinux.org>
1714
1715         Reviewed by Darin.
1716
1717         - fix http://bugs.webkit.org/show_bug.cgi?id=17340
1718           WebCore/platform/Timer.cpp fails to build with gcc 4.3
1719
1720         * platform/Timer.cpp: Add include of <limits.h> since this file uses UINT_MAX.
1721
1722 2008-02-12  Timothy Hatcher  <timothy@apple.com>
1723
1724         Reviewed by Brady Eidson.
1725
1726         <rdar://problem/5652560> Can't delete database if the website that
1727         uses it has been opened in this session
1728
1729         Close the Database on the database thread before deleting the file.
1730         Tested and works on Windows and Mac.
1731
1732         * platform/sql/SQLiteDatabase.cpp:
1733         (WebCore::SQLiteDatabase::close): Assert we are on the opening thread.
1734         * storage/Database.cpp:
1735         (WebCore::Database::markAsDeletedAndClose): Unschedule any pending
1736         Database tasks, and start and imediate DatabaseCloseTask.
1737         (WebCore::Database::close): Close the SQLDatabase.
1738         * storage/Database.h: Renamed markAsDeleted to markAsDeletedAndClose.
1739         * storage/DatabaseTask.cpp:
1740         (WebCore::DatabaseCloseTask::DatabaseCloseTask): New task.
1741         (WebCore::DatabaseCloseTask::doPerformTask): Call close on the Database.
1742         (WebCore::DatabaseCloseTask::debugTaskName): Return "DatabaseCloseTask".
1743         * storage/DatabaseTask.h: Add DatabaseCloseTask.
1744         * storage/DatabaseTracker.cpp:
1745         (WebCore::DatabaseTracker::deleteDatabaseFile): Call the renamed
1746           markAsDeletedAndClose.
1747
1748 2008-02-12  Oliver Hunt  <oliver@apple.com>
1749
1750         Endeavour to fix qt and gtk builds
1751
1752         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1753         * platform/graphics/qt/GraphicsContextQt.cpp:
1754
1755 2008-02-12  Oliver Hunt  <oliver@apple.com>
1756
1757         Reviewed by Eric S.
1758
1759         Bug 17269: Deobfuscate CanvasRenderingContext2D.cpp
1760         Remove ifdef's from canvas paint code
1761
1762         By making GraphicsContext aware of the crossplatform ImageBuffer
1763         type we can migrate the ifdef-ified paint code in HTMLCanvasElement
1764         into platform implementations of GraphicsContext.
1765
1766         * html/HTMLCanvasElement.cpp:
1767         (WebCore::HTMLCanvasElement::paint):
1768         * platform/graphics/GraphicsContext.h:
1769         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1770         (WebCore::GraphicsContext::paintBuffer):
1771         * platform/graphics/cg/GraphicsContextCG.cpp:
1772         (WebCore::GraphicsContext::paintBuffer):
1773         * platform/graphics/qt/GraphicsContextQt.cpp:
1774         (WebCore::GraphicsContext::paintBuffer):
1775
1776 2008-02-12  Brady Eidson  <beidson@apple.com>
1777
1778         Reviewed by Darin Adler
1779
1780         Fix for <rdar://problem/5737692> - Database API needs to support SuccessCallback
1781
1782         Layout tests will come shortly with a mess of DRT changes
1783
1784         * platform/SecurityOrigin.cpp:
1785         (WebCore::SecurityOrigin::SecurityOrigin): Standardize on "empty string" instead of null string
1786           as different paths of constructing a SecurityOrigin were causing different hashes for the "same"
1787           SecurityOrigin
1788
1789         * storage/Database.cpp:
1790         (WebCore::Database::changeVersion): Pass in the successCallback
1791         (WebCore::Database::transaction): Ditto
1792
1793         * storage/SQLTransaction.cpp:
1794         (WebCore::SQLTransaction::SQLTransaction):
1795         (WebCore::SQLTransaction::debugStepName):
1796         (WebCore::SQLTransaction::performNextStep): Update ASSERTs for the new valid steps
1797         (WebCore::SQLTransaction::performPendingCallback): Ditto
1798         (WebCore::SQLTransaction::postflightAndCommit): Schedule the success callback if it exists - otherwise
1799           skip straight to cleanupAfterSuccessCallback()
1800         (WebCore::SQLTransaction::deliverSuccessCallback): Deliver success callback on the main thread, then
1801           schedule cleanupAfterSuccessCallback()
1802         (WebCore::SQLTransaction::cleanupAfterSuccessCallback): Cleanup and end the transaction
1803         (WebCore::SQLTransaction::handleTransactionError):
1804         (WebCore::SQLTransaction::deliverTransactionErrorCallback):
1805         (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback):
1806         * storage/SQLTransaction.h:
1807
1808 2008-02-12  Steve Falkenburg  <sfalken@apple.com>
1809
1810         Changes to support merged MIDL output.
1811         
1812         All COM interfaces are now generated to WebKit.h.
1813         
1814         Reviewed by Sam, Ada.
1815
1816         * bindings/scripts/CodeGeneratorCOM.pm:
1817
1818 2008-02-12  Dan Bernstein  <mitz@apple.com>
1819
1820         Reviewed by Adam Roben.
1821
1822         - fix http://bugs.webkit.org/show_bug.cgi?id=17041
1823           <rdar://problem/5709660> Eastern Asian fonts do not display without specific box in Control Panel
1824
1825         Revised the system fallback font lookup logic to use MLang font linking
1826         again. To avoid reintroducing bug 16548 and <rdar://problem/5280188>,
1827         for CJK characters, try linking based on a single code page at a time,
1828         starting with the user's default code page (if it is one of the CJK
1829         code pages) followed by the other CJK code pages in a prescribed order
1830         that matches what Firefox does.
1831
1832         * platform/graphics/win/FontCacheWin.cpp:
1833         (WebCore::getCJKCodePageMasks): Added. Returns the search order for CJK
1834         code pages, with the user's default code page first.
1835         (WebCore::currentFontContainsCharacter): Factored out of
1836         getFontDataForCharacters().
1837         (WebCore::createMLangFont): Ditto.
1838         (WebCore::FontCache::getFontDataForCharacters):
1839
1840 2008-02-12  Rodney Dawes  <dobey@wayofthemonkey.com>
1841
1842         Reviewed by Alp Toker.
1843
1844         Add -DMAEMO_CHANGES when the hildon CONFIG option is specified
1845         Add hildon-1 to PKGCONFIG when hildon CONFIG option is specified
1846
1847         * WebCore.pro:
1848
1849 2008-02-12  Dan Bernstein  <mitz@apple.com>
1850
1851         Reviewed by Timothy Hatcher.
1852
1853         - <rdar://problem/5738175> Remove workaround for <rdar://problem/5539388> from post-Tiger builds
1854
1855         * platform/graphics/cg/GraphicsContextCG.cpp:
1856         (WebCore::GraphicsContext::setShadow):
1857
1858 2008-02-12  Brady Eidson  <beidson@apple.com>
1859
1860         Release build fix
1861
1862         * storage/DatabaseTask.cpp:
1863
1864 2008-02-12  Alexey Proskuryakov <ap@webkit.org> and Brady Eidson <beidson@apple.com>
1865
1866         Reviewed by Brady.
1867
1868         http://bugs.webkit.org/show_bug.cgi?id=17177
1869         <rdar://problem/5729619> Storage tasks are getting lost
1870
1871         <rdar://problem/5729445> REGRESSION: Cannot schedule more than one transaction at a time
1872
1873         <rdar://problem/5729446> Major thread safety issue in Database code
1874
1875         * platform/MessageQueue.h: Added a thread-safe queue abstraction.
1876
1877         * WebCore.vcproj/WebCore.vcproj:
1878         * WebCore.xcodeproj/project.pbxproj:
1879         Added MessageQueue.h.
1880
1881         * dom/Document.cpp:
1882         (WebCore::Document::~Document): Fixed a race condition resulting in a hanging reference.
1883
1884         * storage/Database.idl: Fixed parameter declarations to actually match implementation
1885         (which is custom, so it got out of sync).
1886
1887         * storage/DatabaseTask.h:
1888         (WebCore::DatabaseTask::database):
1889         (WebCore::DatabaseTransactionTask::transaction):
1890         Changed tasks to hold more information internally. Added helpers for better debug logging.
1891
1892         * storage/DatabaseTask.cpp:
1893         (WebCore::DatabaseTask::DatabaseTask):
1894         (WebCore::DatabaseTask::performTask):
1895         (WebCore::DatabaseOpenTask::DatabaseOpenTask):
1896         (WebCore::DatabaseOpenTask::doPerformTask):
1897         (WebCore::DatabaseOpenTask::debugTaskName):
1898         (WebCore::DatabaseTransactionTask::DatabaseTransactionTask):
1899         (WebCore::DatabaseTransactionTask::~DatabaseTransactionTask):
1900         (WebCore::DatabaseTransactionTask::doPerformTask):
1901         (WebCore::DatabaseTransactionTask::debugTaskName):
1902         (WebCore::DatabaseTableNamesTask::DatabaseTableNamesTask):
1903         (WebCore::DatabaseTableNamesTask::doPerformTask):
1904         (WebCore::DatabaseTableNamesTask::debugTaskName):
1905         Implementation for the above.
1906
1907         (WebCore::DatabaseTask::lockForSynchronousScheduling):
1908         (WebCore::DatabaseTask::waitForSynchronousCompletion):
1909         Fixed a potential race condition: if the task completed before we entered a wait, we'd never
1910         wake up. There was an assertion guarding against this, but no actual guarantee that I could see.
1911
1912         * storage/DatabaseThread.cpp:
1913         (WebCore::DatabaseThread::DatabaseThread):
1914         (WebCore::DatabaseThread::requestTermination):
1915         (WebCore::DatabaseThread::databaseThread):
1916         (WebCore::DatabaseThread::scheduleTask):
1917         (WebCore::DatabaseThread::scheduleImmediateTask):
1918         (WebCore::DatabaseThread::unscheduleDatabaseTasks):
1919         * storage/DatabaseThread.h:
1920         Changed to use MessageQueue.
1921
1922         * storage/Database.cpp:
1923         (WebCore::guidMutex):
1924         (WebCore::guidToVersionMap):
1925         (WebCore::guidToDatabaseMap):
1926         (WebCore::Database::openDatabase):
1927         (WebCore::Database::Database):
1928         (WebCore::Database::~Database):
1929         (WebCore::Database::openAndVerifyVersion):
1930         (WebCore::guidForOriginAndName):
1931         (WebCore::Database::changeVersion):
1932         (WebCore::Database::transaction):
1933         (WebCore::Database::scheduleTransaction):
1934         (WebCore::Database::scheduleTransactionStep):
1935         (WebCore::Database::scheduleTransactionCallback):
1936         (WebCore::Database::version):
1937         (WebCore::Database::deliverPendingCallback):
1938         (WebCore::Database::tableNames):
1939         * storage/Database.h:
1940         Changed m_transactionQueue to a MessageQueue.
1941         Got rid of callback tracking - these can take care of themselves.
1942         Got rid of a DatabaseThread member, as the Document can be asked for it.
1943         Moved private static members and helpers out of the header.
1944         Lost CurrentThreadSetter debug helper on the way. We may need to re-add something like that later.
1945
1946         * storage/SQLTransaction.h:
1947         * storage/SQLTransaction.cpp: Added a lot of debug logging.
1948         (WebCore::SQLTransaction::scheduleToRunStatements): Removed "m_currentStatement = 0" assignment,
1949         as it created a race condition. Everything seems to work better without it, although a real fix
1950         would be to get rid of this variable - it's evil shared data that isn't even protected in any way.
1951
1952         * manual-tests/database-threading-stress-test-2.html: Added.
1953         * manual-tests/database-threading-stress-test.html: Added.
1954
1955 2008-02-12  Adam Roben  <aroben@apple.com>
1956
1957         Fix Bug 17328: REGRESSION (r30147): Inspector is unstyled on Windows
1958
1959         <http://bugs.webkit.org/show_bug.cgi?id=17328>
1960         <rdar://5737946>
1961
1962         Reviewed by Mitz.
1963
1964         Test: fast/loader/local-css-allowed-in-strict-mode.html
1965
1966         * platform/network/cf/ResourceResponseCFNet.cpp:
1967         (WebCore::ResourceResponse::doUpdateResourceResponse): Add a case for
1968         .css files.
1969
1970 2008-02-12  Anders Carlsson  <andersca@apple.com>
1971
1972         Build fix.
1973         
1974         * loader/ImageDocument.cpp:
1975
1976 2008-02-12  Anders Carlsson  <andersca@apple.com>
1977
1978         Reviewed by Mitz.
1979
1980         Make the code that sets the image title cross platform.
1981
1982         * WebCore.xcodeproj/project.pbxproj:
1983         Remove ImageDocumentMac.
1984         
1985         * loader/ImageDocument.cpp:
1986         (WebCore::ImageTokenizer::finish):
1987
1988         * loader/mac/ImageDocumentMac.h: Removed.
1989         * loader/mac/ImageDocumentMac.mm: Removed.
1990         
1991         * page/mac/WebCoreFrameBridge.h:
1992         * page/mac/WebCoreViewFactory.h:
1993         Move imageTitleForFilename:size from the bridge to
1994         the view factory.
1995         
1996         * platform/LocalizedStrings.h:
1997         Add imageTitle.
1998         
1999         * platform/mac/LocalizedStringsMac.mm:
2000         (WebCore::imageTitle):
2001         Have imageTitle call the view factory.
2002         
2003         * platform/qt/Localizations.cpp:
2004         (WebCore::imageTitle):
2005         * platform/wx/LocalizedStringsWx.cpp:
2006         (WebCore::imageTitle):
2007         * platform/gtk/LocalizedStringsGtk.cpp:
2008         (WebCore::imageTitle):
2009         Add stubs.
2010         
2011 2008-02-12  Oliver Hunt  <oliver@apple.com>
2012
2013         more Qt fixes
2014
2015         * html/HTMLCanvasElement.cpp:
2016         (WebCore::HTMLCanvasElement::paint):
2017
2018 2008-02-12  Oliver Hunt  <oliver@apple.com>
2019
2020         And another attempt to fixerate Qt
2021
2022         * html/HTMLCanvasElement.cpp:
2023         (WebCore::HTMLCanvasElement::paint):
2024
2025 2008-02-12  Oliver Hunt  <oliver@apple.com>
2026
2027         Attempt to fix Qt build
2028
2029         * html/HTMLCanvasElement.h:
2030
2031 2008-02-11  Oliver Hunt  <oliver@apple.com>
2032
2033         Reviewed by Alp Toker.
2034
2035         Make canvas use an ImageBuffer for its backing store
2036
2037         In order to make the canvas implementation less platform dependent
2038         (and thus reduce the current quagmire of ifdefs) we now use an 
2039         ImageBuffer to provide the backing buffer, an immediate consequence
2040         of this is to remove multiple ifdefs in the construction of the
2041         buffer.  This patch allows us to further reduce the platform
2042         dependencies in later patches.
2043
2044
2045         * html/CanvasRenderingContext2D.cpp:
2046         (WebCore::CanvasRenderingContext2D::drawImage):
2047         * html/HTMLCanvasElement.cpp:
2048         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
2049         (WebCore::HTMLCanvasElement::~HTMLCanvasElement):
2050         (WebCore::HTMLCanvasElement::reset):
2051         (WebCore::HTMLCanvasElement::paint):
2052         (WebCore::HTMLCanvasElement::createDrawingContext):
2053         (WebCore::HTMLCanvasElement::drawingContext):
2054         (WebCore::HTMLCanvasElement::createPlatformImage):
2055         * html/HTMLCanvasElement.h:
2056
2057 2008-02-11  Dan Bernstein  <mitz@apple.com>
2058
2059         Reviewed by Dave Hyatt.
2060
2061         - fix http://bugs.webkit.org/show_bug.cgi?id=17320
2062           <rdar://problem/5736953> :last-child does not set the "uses sibling rules" flag
2063
2064         Test: fast/css/last-child-style-sharing.html
2065
2066         * css/CSSGrammar.y: Changed to call setUsesSiblingRules(true) for all
2067         CSS3 selectors that require it.
2068
2069 2008-02-11  Sam Weinig  <sam@webkit.org>
2070
2071         Reviewed by Darin Adler.
2072
2073         Make the cross-domain security model more closely match Firefox by always returning the
2074         native built-in functions when accessing functions cross-domain.
2075
2076         Fixes for:
2077         <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
2078         <rdar://problem/5735443> Crash when setting the Window objects prototype to a custom Object and then calling a method on it
2079
2080         Tests: fast/dom/Window/window-custom-prototype-crash.html
2081                fast/dom/Window/window-function-frame-getter-precedence.html
2082                http/tests/security/cross-frame-access-get-override.html
2083                http/tests/security/cross-frame-access-location-get-override.html
2084                http/tests/security/cross-frame-access-location-get.html
2085                http/tests/security/cross-frame-access-location-put.html
2086
2087         * bindings/js/JSDOMWindowCustom.cpp:
2088         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
2089         - Return the native-built in version of an cross-domain allowed function (eg. window.focus) whether or
2090           not it has been overridden, instead of undefined.
2091         - When doing findEntry lookup, use the the tables directly (JSDOMWindowPrototype::info.propHashTable) 
2092           instead of calling the virtual classInfo() method to avoid the unnecessary overhead.
2093         - Allow access to the native toString function cross-domain.  It always returns "[object Window]".
2094         - Use the new nonCachingStaticFunctionGetter when return allowed functions cross-frame so that
2095           the function an overridden function is not inadvertantly returned from the PropertyMap.\
2096
2097         * bindings/js/JSHistoryCustom.cpp:
2098         (WebCore::JSHistory::customGetOwnPropertySlot):
2099         - Implement the same model as described above for the History object, always returning the
2100           native built-in function cross-domain.
2101         - Allow access to the native toString function cross-domain.
2102         - Clean up the code to make it clear that the custom functionality is only there for cross-domain
2103           access.
2104
2105         * bindings/js/JSLocation.cpp:
2106         (WebCore::JSLocation::getOwnPropertySlot):
2107         - Match the generated classes by moving all the custom logic into a separate customGetOwnPropertySlot
2108           function.  This will help moving to a generated class in the future.
2109         (WebCore::JSLocation::customGetOwnPropertySlot):
2110         - Implement the same model as described above for the Location object, always returning the
2111           native built-in function cross-domain.
2112         - Clean up the code to make it clear that the custom functionality is only there for cross-domain
2113           access.
2114         (WebCore::JSLocation::put):
2115         (WebCore::JSLocation::deleteProperty):
2116         (WebCore::JSLocation::getPropertyNames):
2117         * bindings/js/JSLocation.h:
2118         - Clean up to match the rest of the file a little better.
2119
2120         * bindings/js/kjs_binding.cpp:
2121         (WebCore::allowsAccessFromFrame):
2122         (WebCore::printErrorMessageForFrame):
2123         (WebCore::nonCachingStaticFunctionGetter):
2124         (WebCore::objectToStringFunctionGetter):
2125         * bindings/js/kjs_binding.h:
2126         - Put common functionality related to cross-domain access here to serve as a central shared point.
2127           This includes moving and augmenting the allowsAccessFromFrame method that was in both JSHistoryCustom.cpp
2128           and JSLocation.cpp.
2129
2130         * bindings/js/kjs_dom.cpp:
2131         (WebCore::checkNodeSecurity):
2132         - Use the new allowsAccessFromFrame method.
2133
2134         * bindings/js/kjs_window.cpp:
2135         (KJS::Window::childFrameGetter): Cleanup.
2136         (KJS::Window::namedItemGetter): Cleanup.
2137         (KJS::Window::getOwnPropertySlot):
2138         - Do the prototype lookup early to match Firefox in having function lookup have a higher precedence
2139           than the index or shortcut name getters.
2140         - Cleanup function to make it more understandable and slightly more efficient.
2141         (KJS::Window::allowsAccessFrom):
2142         - Add a new variant of this method that takes a reference to a String, which, on failure, will
2143           contain the error message to print out.  The caller can then pass this to printErrorMessage.
2144           This allows for code to check allowsAccessFrom and act on the result without printing out the
2145           error message. For convenience, a version with out the String parameter has been left which 
2146           prints out the message automatically.
2147         (KJS::Window::printErrorMessage):
2148         * bindings/js/kjs_window.h:
2149
2150 2008-02-11  Darin Adler  <darin@apple.com>
2151
2152         Reviewed by Mitz.
2153
2154         - fix <rdar://problem/5726016> REGRESSION: Xcode News window renders
2155           incorrectly due to visibility fix
2156
2157         Added an Xcode-specific quirk.
2158
2159         * WebCore.base.exp: Added export for new Settings function.
2160         * css/CSSMutableStyleDeclaration.cpp:
2161         (WebCore::CSSMutableStyleDeclaration::setProperty): Here's the crazy quirk.
2162         If you try to change the visibilty on a node with the class name tab_content,
2163         instead it will use display:none.
2164         * page/Settings.cpp:
2165         (WebCore::Settings::Settings): Initialize m_needsXcodeVisibilityQuirk. Also
2166         initialize m_fontRenderingMode! This seems like it was a bug before, but we
2167         probably were getting lucky and always getting 0 on Windows, which is the
2168         only place the setting matters.
2169         (WebCore::Settings::setNeedsXcodeVisibilityQuirk): Added.
2170         * page/Settings.h:
2171         (WebCore::Settings::needsXcodeVisibilityQuirk): Added.
2172
2173 2008-02-11  Timothy Hatcher  <timothy@apple.com>
2174
2175         Reviewed by Brady Eidson.
2176
2177         <rdar://problem/5733069> Many m_quotaMap uses do not hold the m_quotaMapGuard
2178
2179         * storage/DatabaseTracker.cpp:
2180         (WebCore::DatabaseTracker::hasEntryForOrigin): Hold m_quotaMapGuard when using m_quotaMap.
2181         (WebCore::DatabaseTracker::origins): Ditto.
2182         (WebCore::DatabaseTracker::setQuota): Ditto.
2183         (WebCore::DatabaseTracker::deleteAllDatabases): Call origins() and itterate over the
2184         origins to call deleteOrigin().
2185         (WebCore::DatabaseTracker::deleteOrigin): Hold m_quotaMapGuard when using m_quotaMap.
2186
2187 2008-02-11  David Hyatt  <hyatt@apple.com>
2188
2189         Fix for bug 17286, crash accessing a null RenderStyle.  Add a simple null check.
2190
2191         Reviewed by aroben
2192
2193         Added fast/css/empty-generated-content.html
2194
2195         * css/CSSStyleSelector.cpp:
2196         (WebCore::CSSStyleSelector::checkOneSelector):
2197
2198 2008-02-11  Rob Buis  <buis@kde.org>
2199
2200         Reviewed by David Kilzer.
2201
2202         http://bugs.webkit.org/show_bug.cgi?id=17201
2203         Bug 17201: Use RefPtr in CSSParser::parseFont() to get rid of goto silliness
2204
2205         Gets rid of goto usage in parseFont.
2206
2207         * css/CSSParser.cpp:
2208         (WebCore::CSSParser::parseFont):
2209
2210 2008-02-11  David Hyatt  <hyatt@apple.com>
2211
2212         Fix for bug 17298, Acid3 text should be black and not red.  Make sure stylesheets with the wrong MIME type
2213         are not accepted in strict mode.
2214
2215         Reviewed by darin
2216
2217         Added http/tests/misc/css-reject-in-strict-mode.html
2218
2219         * css/CSSImportRule.cpp:
2220         (WebCore::CSSImportRule::setCSSStyleSheet):
2221         * css/CSSImportRule.h:
2222         * dom/Document.cpp:
2223         (WebCore::Document::setCSSStyleSheet):
2224         * dom/Document.h:
2225         * dom/ProcessingInstruction.cpp:
2226         (WebCore::ProcessingInstruction::setCSSStyleSheet):
2227         * dom/ProcessingInstruction.h:
2228         * html/HTMLLinkElement.cpp:
2229         (WebCore::HTMLLinkElement::setCSSStyleSheet):
2230         * html/HTMLLinkElement.h:
2231         * html/HTMLMediaElement.cpp:
2232         (WebCore::HTMLMediaElement::pickMedia):
2233         * loader/CachedCSSStyleSheet.cpp:
2234         (WebCore::CachedCSSStyleSheet::ref):
2235         (WebCore::CachedCSSStyleSheet::checkNotify):
2236         (WebCore::CachedCSSStyleSheet::canUseSheet):
2237         * loader/CachedCSSStyleSheet.h:
2238         (WebCore::CachedCSSStyleSheet::sheetText):
2239         * loader/CachedResourceClient.h:
2240         (WebCore::CachedResourceClient::setCSSStyleSheet):
2241         * loader/mac/UserStyleSheetLoader.cpp:
2242         (UserStyleSheetLoader::setCSSStyleSheet):
2243         * loader/mac/UserStyleSheetLoader.h:
2244
2245 2008-02-11  Adam Roben  <aroben@apple.com>
2246
2247         Fix Bug 14316: Inspector's Console truncates long strings
2248
2249         <http://bugs.webkit.org/show_bug.cgi?id=14316>
2250         <rdar://5357695>
2251
2252         We no longer call Object.describe to format all the output of commands
2253         enetered into the Console. The ConsolePanel object now has a set of
2254         formatting functions that append a formatted representation of the
2255         passed-in object to the passed-in container node.
2256
2257         Reviewed by Sam.
2258
2259         * page/inspector/ConsolePanel.js:
2260         (WebInspector.ConsolePanel._onEnterPressed): Updated for rename of
2261         _outputToNode to _format.
2262         (WebInspector.ConsolePanel._format): Renamed from _outputToNode. Use
2263         Object.type to get the type of the object, then call the appropriate
2264         formatting function.
2265         (WebInspector.ConsolePanel._formatvalue): Added.
2266         (WebInspector.ConsolePanel._formatstring): Added. This function
2267         contains the actual fix for the bug, since it doesn't truncate the
2268         string no matter how long it is.
2269         (WebInspector.ConsolePanel._formatregexp): Added.
2270         (WebInspector.ConsolePanel._formatarray): Added. This is a bit more
2271         functional than Object.describe for arrays, since it recursively
2272         formats each item in the array. One advantage of this is that Nodes in
2273         arrays will be linkified instead of just turning into "[Object
2274         HTMLBodyElement]" or similar.
2275         (WebInspector.ConsolePanel._formatnode): Added.
2276         (WebInspector.ConsolePanel._formatobject): Added.
2277         (WebInspector.ConsolePanel.
2278         * page/inspector/utilities.js:
2279         (Object.type): Added. Code was pulled out of Object.describe and
2280         reorganized slightly.
2281         (Object.describe): Call Object.type. There should be no change in
2282         behavior of this function.
2283
2284 2008-02-11  Alp Toker  <alp@atoker.com>
2285
2286         Wx build fix for breakage introduced in r30142. Spotted by Darin.
2287
2288         * platform/network/curl/ResourceHandleManager.cpp:
2289         (WebCore::parseDataUrl):
2290
2291 2008-02-11  Brent Fulgham  <bfulgham@gmail.com>
2292
2293         Reviewed and tweaked by Darin
2294
2295         - http://bugs.webkit.org/show_bug.cgi?id=17299
2296           a couple compilation fixes for Cairo/Win32 configuration
2297
2298         * platform/graphics/cairo/ImageSourceCairo.cpp:
2299         (WebCore::createDecoder): Turn off XBMImageDecoder for PLATFORM(WIN) configuration.
2300         * rendering/RenderThemeWin.cpp:
2301         (WebCore::prepareForDrawing): Added IntRect parameter.
2302         (WebCore::doneDrawing): Ditto.
2303         (WebCore::RenderThemeWin::paintButton): Ditto.
2304         (WebCore::RenderThemeWin::paintTextField): Ditto.
2305         (WebCore::RenderThemeWin::paintMenuListButton): Ditto.
2306         (WebCore::RenderThemeWin::systemFont): Added.
2307
2308 2008-02-11  Alp Toker  <alp@atoker.com>
2309
2310         Reviewed by Alexey.
2311
2312         Acid3 data URL parsing fix for the GTK+ port.
2313
2314         Avoid WebCore's base64Decode() when possible since it's not a
2315         general-purpose Base64 decoder and fails on newlines.
2316
2317         * platform/network/curl/ResourceHandleManager.cpp:
2318         (WebCore::parseDataUrl):
2319
2320 2008-02-11  Darin Adler  <darin@apple.com>
2321
2322         - another Qt build fix
2323
2324         * platform/qt/PopupMenuQt.cpp:
2325         (WebCore::PopupMenu::PopupMenu): Added explicit RefCounted constructor.
2326
2327 2008-02-10  Darin Adler  <darin@apple.com>
2328
2329         - another Qt build fix (wish the Qt bot wouldn't stop on the first error)
2330
2331         * platform/qt/FileChooserQt.cpp:
2332         (WebCore::FileChooser::FileChooser): Added explicit RefCounted constructor.
2333
2334 2008-02-10  Darin Adler  <darin@apple.com>
2335
2336         - another Qt build fix
2337
2338         * platform/graphics/qt/IconQt.cpp:
2339         (WebCore::Icon::Icon): Added explicit RefCounted constructor.
2340
2341 2008-02-10  Alp Toker  <alp@atoker.com>
2342
2343         Another Win build fix for r30133 breakage.
2344
2345         * plugins/win/PluginPackageWin.cpp:
2346         (WebCore::PluginPackage::PluginPackage):
2347
2348 2008-02-10  Alp Toker  <alp@atoker.com>
2349
2350         Build fix GTK+ and prospective build fix for Win breakage introduced
2351         in r30133.
2352
2353         * platform/Cursor.h:
2354         (WebCore::SharedCursor::SharedCursor):
2355         * platform/graphics/gtk/IconGtk.cpp:
2356         (WebCore::Icon::Icon):
2357         * platform/gtk/FileChooserGtk.cpp:
2358         (WebCore::FileChooser::FileChooser):
2359         * platform/gtk/PopupMenuGtk.cpp:
2360         (WebCore::PopupMenu::PopupMenu):
2361
2362 2008-02-10  Darin Adler  <darin@apple.com>
2363
2364         - try to fix Win, Qt, GTK, and WX builds
2365
2366         * platform/Cursor.h:
2367         (WebCore::SharedCursor::SharedCursor): Added explicit RefCounted constructor.
2368         * platform/graphics/win/IconWin.cpp:
2369         (WebCore::Icon::Icon): Ditto.
2370         * platform/win/FileChooserWin.cpp:
2371         (WebCore::FileChooser::FileChooser): Ditto.
2372         * platform/win/PopupMenuWin.cpp:
2373         (WebCore::PopupMenu::PopupMenu): Ditto.
2374         * platform/wx/TemporaryLinkStubs.cpp:
2375         (FileChooser::FileChooser): Ditto.
2376         (PopupMenu::PopupMenu): Ditto.
2377         (Icon::Icon): Ditto.
2378         * plugins/PluginStream.cpp:
2379         (WebCore::PluginStream::PluginStream): Ditto.
2380
2381 2008-02-10  David Hyatt  <hyatt@apple.com>
2382
2383         Fix for bug 17082, cssRules should be live.
2384
2385         Reviewed by olliej
2386
2387         Added fast/css/live-cssrules.html
2388
2389         * css/CSSRuleList.cpp:
2390         (WebCore::CSSRuleList::CSSRuleList):
2391         (WebCore::CSSRuleList::length):
2392         (WebCore::CSSRuleList::item):
2393         (WebCore::CSSRuleList::deleteRule):
2394         (WebCore::CSSRuleList::insertRule):
2395         * css/CSSRuleList.h:
2396
2397 2008-02-10  David Hyatt  <hyatt@apple.com>
2398
2399         Fix for bug 17253.  <iframe> contents need to be reflected into the DOM as a single text node.
2400
2401         Reviewed by olliej
2402
2403         fast/frames/iframe-text-contents.html
2404
2405         * html/HTMLParser.cpp:
2406         (WebCore::HTMLParser::getNode):
2407         * html/HTMLTokenizer.cpp:
2408         (WebCore::HTMLTokenizer::parseSpecial):
2409         (WebCore::HTMLTokenizer::parseComment):
2410         (WebCore::HTMLTokenizer::parseTag):
2411         * html/HTMLTokenizer.h:
2412         (WebCore::HTMLTokenizer::State::inIFrame):
2413         (WebCore::HTMLTokenizer::State::setInIFrame):
2414         (WebCore::HTMLTokenizer::State::inAnySpecial):
2415         (WebCore::HTMLTokenizer::State::needsSpecialWriteHandling):
2416         (WebCore::HTMLTokenizer::State::):
2417
2418 2008-02-10  Andrew Wellington  <proton@wiretapped.net>
2419
2420         Reviewed and tweaked by Darin.
2421         
2422         DOMRange.surroundContents throws wrong exception (Acid3 bug)
2423         http://bugs.webkit.org/show_bug.cgi?id=16749
2424         
2425         Throw BAD_BOUNDARYPOINTS_ERR if attempting to split a non-text node that
2426         has offsets in characters.
2427
2428         * dom/Range.cpp:
2429         (WebCore::Range::surroundContents):
2430
2431 2008-02-10  Darin Adler  <darin@apple.com>
2432
2433         Reviewed by Eric.
2434
2435         - http://bugs.webkit.org/show_bug.cgi?id=17256
2436           Make clients of RefCounted explicitly set the count to 0.
2437
2438         * bindings/js/JSSVGPODTypeWrapper.h:
2439         (WebCore::JSSVGPODTypeWrapper::JSSVGPODTypeWrapper):
2440         * css/CSSFontFace.h:
2441         (WebCore::CSSFontFace::CSSFontFace):
2442         * css/CSSRuleList.cpp:
2443         (WebCore::CSSRuleList::CSSRuleList):
2444         * css/CSSSegmentedFontFace.cpp:
2445         (WebCore::CSSSegmentedFontFace::CSSSegmentedFontFace):
2446         * css/Counter.h:
2447         (WebCore::Counter::Counter):
2448         * css/Pair.h:
2449         (WebCore::Pair::Pair):
2450         * css/Rect.h:
2451         (WebCore::Rect::Rect):
2452         * css/StyleBase.h:
2453         (WebCore::StyleBase::StyleBase):
2454         * css/StyleSheetList.cpp:
2455         (WebCore::StyleSheetList::StyleSheetList):
2456         * dom/Attr.cpp:
2457         (WebCore::Attr::Attr):
2458         * dom/Attr.h:
2459         * dom/Attribute.h:
2460         (WebCore::Attribute::Attribute):
2461         * dom/Clipboard.cpp:
2462         (WebCore::Clipboard::Clipboard):
2463         * dom/DOMImplementation.h:
2464         (WebCore::DOMImplementation::DOMImplementation):
2465         * dom/Event.cpp:
2466         (WebCore::Event::Event):
2467         * dom/EventListener.h:
2468         (WebCore::EventListener::EventListener):
2469         * dom/ExceptionBase.cpp:
2470         (WebCore::ExceptionBase::ExceptionBase):
2471         * dom/NamedAttrMap.h:
2472         (WebCore::NamedAttrMap::insertAttribute):
2473         * dom/NamedNodeMap.h:
2474         (WebCore::NamedNodeMap::NamedNodeMap):
2475         * dom/NodeFilter.h:
2476         (WebCore::NodeFilter::NodeFilter):
2477         * dom/NodeFilterCondition.h:
2478         (WebCore::NodeFilterCondition::NodeFilterCondition):
2479         * dom/NodeList.h:
2480         (WebCore::NodeList::NodeList):
2481         * dom/QualifiedName.h:
2482         (WebCore::QualifiedName::QualifiedNameImpl::QualifiedNameImpl):
2483         (WebCore::QualifiedName::ref):
2484         * dom/Range.cpp:
2485         (WebCore::Range::Range):
2486         * dom/RegisteredEventListener.cpp:
2487         (WebCore::RegisteredEventListener::RegisteredEventListener):
2488         * dom/StyledElement.h:
2489         * dom/Traversal.cpp:
2490         (WebCore::Traversal::Traversal):
2491         * editing/EditCommand.cpp:
2492         (WebCore::EditCommand::EditCommand):
2493         * history/BackForwardList.cpp:
2494         (WebCore::BackForwardList::BackForwardList):
2495         * history/CachedPage.cpp:
2496         (WebCore::CachedPage::CachedPage):
2497         * history/HistoryItem.cpp:
2498         (WebCore::HistoryItem::HistoryItem):
2499         * html/CanvasGradient.cpp:
2500         (WebCore::CanvasGradient::CanvasGradient):
2501         * html/CanvasPattern.cpp:
2502         (WebCore::CanvasPattern::CanvasPattern):
2503         * html/CanvasRenderingContext2D.cpp:
2504         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
2505         * html/CanvasStyle.cpp:
2506         (WebCore::CanvasStyle::CanvasStyle):
2507         * html/HTMLCollection.cpp:
2508         (WebCore::HTMLCollection::HTMLCollection):
2509         * html/MediaError.h:
2510         (WebCore::MediaError::MediaError):
2511         * html/TimeRanges.cpp:
2512         (TimeRanges::TimeRanges):
2513         * html/TimeRanges.h:
2514         (WebCore::TimeRanges::TimeRanges):
2515         * html/VoidCallback.h:
2516         (WebCore::VoidCallback::VoidCallback):
2517         * loader/DocumentLoader.cpp:
2518         (WebCore::DocumentLoader::DocumentLoader):
2519         * loader/FormState.cpp:
2520         (WebCore::FormState::FormState):
2521         * loader/ResourceLoader.cpp:
2522         (WebCore::ResourceLoader::ResourceLoader):
2523         * loader/TextResourceDecoder.cpp:
2524         (WebCore::TextResourceDecoder::TextResourceDecoder):
2525         * loader/icon/IconRecord.cpp:
2526         (WebCore::IconRecord::IconRecord):
2527         * page/BarInfo.cpp:
2528         (WebCore::BarInfo::BarInfo):
2529         * page/Console.cpp:
2530         (WebCore::Console::Console):
2531         * page/DOMSelection.cpp:
2532         (WebCore::DOMSelection::DOMSelection):
2533         * page/DOMWindow.cpp:
2534         (WebCore::DOMWindow::DOMWindow):
2535         * page/Frame.cpp:
2536         (WebCore::Frame::Frame):
2537         * page/History.cpp:
2538         (WebCore::History::History):
2539         * page/InspectorController.cpp:
2540         (WebCore::InspectorResource::InspectorResource):
2541         (WebCore::InspectorDatabaseResource::InspectorDatabaseResource):
2542         * page/Plugin.h:
2543         (WebCore::Plugin::Plugin):
2544         * page/Screen.cpp:
2545         (WebCore::Screen::Screen):
2546         * platform/ArrayImpl.cpp:
2547         (WebCore::ArrayImpl::ArrayPrivate::ArrayPrivate):
2548         * platform/DeprecatedValueListImpl.cpp:
2549         (WebCore::DeprecatedValueListImpl::Private::Private):
2550         * platform/ScrollBar.cpp:
2551         (WebCore::Scrollbar::Scrollbar):
2552         * platform/SharedBuffer.cpp:
2553         (WebCore::SharedBuffer::SharedBuffer):
2554         * platform/graphics/FontFallbackList.cpp:
2555         (WebCore::FontFallbackList::FontFallbackList):
2556         * platform/graphics/FontFamily.cpp:
2557         (WebCore::FontFamily::FontFamily):
2558         * platform/graphics/FontFamily.h:
2559         (WebCore::FontFamily::FontFamily):
2560         * platform/graphics/FontSelector.h:
2561         (WebCore::FontSelector::FontSelector):
2562         (WebCore::FontSelector::~FontSelector):
2563         * platform/graphics/GlyphPageTreeNode.h:
2564         (WebCore::GlyphPage::GlyphPage):
2565         * platform/graphics/mac/IconMac.mm:
2566         (WebCore::Icon::Icon):
2567         * platform/mac/FileChooserMac.mm:
2568         (WebCore::FileChooser::FileChooser):
2569         * platform/mac/PopupMenuMac.mm:
2570         (WebCore::PopupMenu::PopupMenu):
2571         * platform/mac/SharedBufferMac.mm:
2572         (WebCore::SharedBuffer::SharedBuffer):
2573         * platform/network/FormData.cpp:
2574         (WebCore::FormData::FormData):
2575         * platform/network/FormData.h:
2576         (WebCore::FormData::FormData):
2577         * platform/network/ResourceHandle.cpp:
2578         (WebCore::ResourceHandle::ResourceHandle):
2579         * platform/text/CString.h:
2580         (WebCore::CStringBuffer::CStringBuffer):
2581         * platform/text/RegularExpression.cpp:
2582         (WebCore::RegularExpression::Private::Private):
2583         * rendering/RenderStyle.cpp:
2584         (WebCore::StyleSurroundData::StyleSurroundData):
2585         (WebCore::StyleBoxData::StyleBoxData):
2586         (WebCore::StyleVisualData::StyleVisualData):
2587         (WebCore::StyleBackgroundData::StyleBackgroundData):
2588         (WebCore::StyleMarqueeData::StyleMarqueeData):
2589         (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
2590         (WebCore::StyleMultiColData::StyleMultiColData):
2591         (WebCore::StyleTransformData::StyleTransformData):
2592         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2593         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
2594         (WebCore::StyleInheritedData::StyleInheritedData):
2595         * rendering/RenderStyle.h:
2596         (WebCore::TransformOperation::TransformOperation):
2597         (WebCore::CursorList::CursorList):
2598         * rendering/SVGCharacterLayoutInfo.h:
2599         (WebCore::SVGCharOnPath::SVGCharOnPath):
2600         * rendering/SVGRenderStyle.cpp:
2601         (WebCore::SVGRenderStyle::SVGRenderStyle):
2602         * rendering/SVGRenderStyle.h:
2603         (WebCore::SVGRenderStyle::SVGRenderStyle):
2604         * rendering/SVGRenderStyleDefs.cpp:
2605         (StyleFillData::StyleFillData):
2606         (StyleStrokeData::StyleStrokeData):
2607         (StyleStopData::StyleStopData):
2608         (StyleTextData::StyleTextData):
2609         (StyleClipData::StyleClipData):
2610         (StyleMaskData::StyleMaskData):
2611         (StyleMarkerData::StyleMarkerData):
2612         (StyleMiscData::StyleMiscData):
2613         * storage/SQLResultSetRowList.h:
2614         (WebCore::SQLResultSetRowList::SQLResultSetRowList):
2615         * svg/SVGAngle.cpp:
2616         (WebCore::SVGAngle::SVGAngle):
2617         * svg/SVGAnimatedTemplate.h:
2618         (WebCore::SVGAnimatedTemplate::SVGAnimatedTemplate):
2619         * svg/SVGElementInstanceList.cpp:
2620         (WebCore::SVGElementInstanceList::SVGElementInstanceList):
2621         * svg/SVGList.h:
2622         (WebCore::SVGList::SVGList):
2623         (WebCore::SVGPODListItem::SVGPODListItem):
2624         * svg/SVGPathSeg.h:
2625         (WebCore::SVGPathSeg::SVGPathSeg):
2626         * svg/SVGPreserveAspectRatio.cpp:
2627         (WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio):
2628         * svg/SVGRenderingIntent.h:
2629         (WebCore::SVGRenderingIntent::SVGRenderingIntent):
2630         * svg/SVGUnitTypes.h:
2631         (WebCore::SVGUnitTypes::SVGUnitTypes):
2632         * svg/graphics/SVGPaintServerGradient.h:
2633         (WebCore::SVGPaintServerGradient::SharedStopCache::SharedStopCache):
2634         * svg/graphics/SVGResource.cpp:
2635         (WebCore::SVGResource::SVGResource):
2636         * xml/DOMParser.h:
2637         (WebCore::DOMParser::DOMParser):
2638         * xml/XMLHttpRequest.cpp:
2639         (WebCore::XMLHttpRequest::XMLHttpRequest):
2640         * xml/XMLSerializer.h:
2641         (WebCore::XMLSerializer::XMLSerializer):
2642         * xml/XPathEvaluator.h:
2643         (WebCore::XPathEvaluator::XPathEvaluator):
2644         * xml/XPathExpression.h:
2645         (WebCore::XPathExpression::XPathExpression):
2646         * xml/XPathNSResolver.h:
2647         (WebCore::XPathNSResolver::XPathNSResolver):
2648         * xml/XPathResult.cpp:
2649         (WebCore::XPathResult::XPathResult):
2650         * xml/XPathValue.h:
2651         (WebCore::XPath::ValueData::ValueData):
2652         * xml/XSLTProcessor.h:
2653         (WebCore::XSLTProcessor::XSLTProcessor):
2654
2655 2008-02-09  Kevin Ollivier  <kevino@theolliviers.com>
2656
2657         Reviewed by Eric Seidel.
2658
2659         Calling select() when all the file descriptors are NULL
2660         stops the file download on Windows. As a result, do not
2661         call select() when there are no valid descriptors.
2662
2663         http://bugs.webkit.org/show_bug.cgi?id=17178
2664
2665         * platform/network/curl/ResourceHandleManager.cpp:
2666         (WebCore::ResourceHandleManager::downloadTimerCallback):
2667
2668 2008-02-09  Dan Bernstein  <mitz@apple.com>
2669
2670         Reviewed by Sam Weinig.
2671
2672         - fix http://bugs.webkit.org/show_bug.cgi?id=17259
2673           Element::recalcStyle() needlessly null-checks the result of styleForElement()
2674
2675         * dom/Element.cpp:
2676         (WebCore::Element::recalcStyle): Removed unneeded null checks.
2677         styleForElement() can never return null.
2678
2679 2008-02-09  David Hyatt  <hyatt@apple.com>
2680
2681         Fix for bug 17254, nth-* selectors do not work with negative coefficients.
2682
2683         Reviewed by Mitz.
2684
2685         fast/css/negative-nth-child.html
2686
2687         * css/CSSStyleSelector.cpp:
2688         (WebCore::parseNth):
2689
2690 2008-02-09  David Hyatt  <hyatt@apple.com>
2691
2692         Fix for bug 17203, high CPU usage loading HTML5 spec.  This patch significantly improves the performance
2693         of CSS3 selectors.
2694
2695         (1) Split the notion of being affected by positional rules into "forward" and "backward."  The "forward"
2696         selectors do not need to re-resolve during parsing, since children are appended on the end.  Only the
2697         "backward" selectors like last-child or nth-last-child have to re-resolve when a close tag is encountered.
2698
2699         (2) Extend childrenChanged to specify whether the children were changed by the parser or not.  This allows
2700         Element::childrenChanged to know when the parser is adding children so that it can ignore those adds when
2701         possible.
2702
2703         (3) Make sure all Elements now know whether or not their children are currently parsing.  Backwards selectors
2704         like last-child will always return false when children are still being parsed.  When an Element finishes
2705         parsing its children, finishParsingChildren() gets called and will make sure the children re-resolve properly.
2706
2707         (4) Added a beginParsingChildren method and renamed finishParsing to finishedParsingChildren.
2708
2709         (5) Eliminated one-off hacks that did the same thing in HTMLObjectElement and HTMLAppletElement.
2710
2711         (6) Patched many incorrect implementations of finishedParsingChildren that did not properly call into their
2712         base class (mostly new SVG elements that got added for SVG fonts around the time this became a requirement).
2713
2714         Reviewed by Eric
2715
2716         * css/CSSStyleSelector.cpp:
2717         (WebCore::CSSStyleSelector::checkSelector):
2718         (WebCore::CSSStyleSelector::checkOneSelector):
2719         * dom/Attr.cpp:
2720         (WebCore::Attr::childrenChanged):
2721         * dom/Attr.h:
2722         * dom/ContainerNode.cpp:
2723         (WebCore::ContainerNode::addChild):
2724         * dom/Document.cpp:
2725         (WebCore::Document::childrenChanged):
2726         * dom/Document.h:
2727         * dom/Element.cpp:
2728         (WebCore::Element::Element):
2729         (WebCore::Element::recalcStyle):
2730         (WebCore::checkFirstChildRules):
2731         (WebCore::checkLastChildRules):
2732         (WebCore::checkEmptyRules):
2733         (WebCore::checkStyleRules):
2734         (WebCore::Element::childrenChanged):
2735         (WebCore::Element::finishParsingChildren):
2736         * dom/Element.h:
2737         (WebCore::Element::finishedParsingChildren):
2738         (WebCore::Element::beginParsingChildren):
2739         * dom/Node.cpp:
2740         * dom/Node.h:
2741         (WebCore::Node::finishParsingChildren):
2742         (WebCore::Node::beginParsingChildren):
2743         (WebCore::Node::childrenChanged):
2744         * dom/StyledElement.cpp:
2745         (WebCore::StyledElement::StyledElement):
2746         * dom/StyledElement.h:
2747         * dom/XMLTokenizer.cpp:
2748         (WebCore::XMLTokenizer::startElementNs):
2749         (WebCore::XMLTokenizer::endElementNs):
2750         (WebCore::):
2751         * html/HTMLAppletElement.cpp:
2752         (WebCore::HTMLAppletElement::HTMLAppletElement):
2753         (WebCore::HTMLAppletElement::finishParsingChildren):
2754         * html/HTMLAppletElement.h:
2755         * html/HTMLElementFactory.cpp:
2756         (WebCore::objectConstructor):
2757         * html/HTMLGenericFormElement.cpp:
2758         (WebCore::HTMLFormControlElementWithState::finishParsingChildren):
2759         * html/HTMLGenericFormElement.h:
2760         * html/HTMLObjectElement.cpp:
2761         (WebCore::HTMLObjectElement::HTMLObjectElement):
2762         (WebCore::HTMLObjectElement::finishParsingChildren):
2763         (WebCore::HTMLObjectElement::childrenChanged):
2764         * html/HTMLObjectElement.h:
2765         * html/HTMLOptGroupElement.cpp:
2766         (WebCore::HTMLOptGroupElement::childrenChanged):
2767         * html/HTMLOptGroupElement.h:
2768         * html/HTMLOptionElement.cpp:
2769         (WebCore::HTMLOptionElement::childrenChanged):
2770         * html/HTMLOptionElement.h:
2771         * html/HTMLParser.cpp:
2772         (WebCore::HTMLParser::insertNode):
2773         (WebCore::HTMLParser::pushBlock):
2774         (WebCore::HTMLParser::popOneBlockCommon):
2775         * html/HTMLScriptElement.cpp:
2776         (WebCore::HTMLScriptElement::childrenChanged):
2777         (WebCore::HTMLScriptElement::finishParsingChildren):
2778         * html/HTMLScriptElement.h:
2779         * html/HTMLSelectElement.cpp:
2780         (WebCore::HTMLSelectElement::childrenChanged):
2781         * html/HTMLSelectElement.h:
2782         * html/HTMLStyleElement.cpp:
2783         (WebCore::HTMLStyleElement::finishParsingChildren):
2784         (WebCore::HTMLStyleElement::childrenChanged):
2785         * html/HTMLStyleElement.h:
2786         * html/HTMLTextAreaElement.cpp:
2787         (WebCore::HTMLTextAreaElement::childrenChanged):
2788         * html/HTMLTextAreaElement.h:
2789         * html/HTMLTitleElement.cpp:
2790         (WebCore::HTMLTitleElement::childrenChanged):
2791         * html/HTMLTitleElement.h:
2792          * rendering/RenderApplet.cpp:
2793         (WebCore::RenderApplet::createWidgetIfNecessary):
2794         * rendering/RenderPartObject.cpp:
2795         (WebCore::RenderPartObject::updateWidget):
2796         * rendering/RenderStyle.cpp:
2797         (WebCore::RenderStyle::RenderStyle):
2798         * rendering/RenderStyle.h:
2799         (WebCore::RenderStyle::childrenAffectedByForwardPositionalRules):
2800         (WebCore::RenderStyle::setChildrenAffectedByForwardPositionalRules):
2801         (WebCore::RenderStyle::childrenAffectedByBackwardPositionalRules):
2802         (WebCore::RenderStyle::setChildrenAffectedByBackwardPositionalRules):
2803         * svg/SVGAnimationElement.cpp:
2804         (WebCore::SVGAnimationElement::finishParsingChildren):
2805         * svg/SVGAnimationElement.h:
2806         * svg/SVGClipPathElement.cpp:
2807         (WebCore::SVGClipPathElement::childrenChanged):
2808         * svg/SVGClipPathElement.h:
2809         * svg/SVGDefinitionSrcElement.cpp:
2810         (WebCore::SVGDefinitionSrcElement::childrenChanged):
2811         * svg/SVGDefinitionSrcElement.h:
2812         * svg/SVGElement.cpp:
2813         (WebCore::SVGElement::finishParsingChildren):
2814         * svg/SVGElement.h:
2815         * svg/SVGFontFaceElement.cpp:
2816         (WebCore::SVGFontFaceElement::childrenChanged):
2817         * svg/SVGFontFaceElement.h:
2818         * svg/SVGFontFaceFormatElement.cpp:
2819         (WebCore::SVGFontFaceFormatElement::childrenChanged):
2820         * svg/SVGFontFaceFormatElement.h:
2821         * svg/SVGFontFaceSrcElement.cpp:
2822         (WebCore::SVGFontFaceSrcElement::childrenChanged):
2823         * svg/SVGFontFaceSrcElement.h:
2824         * svg/SVGFontFaceUriElement.cpp:
2825         (WebCore::SVGFontFaceUriElement::childrenChanged):
2826         * svg/SVGFontFaceUriElement.h:
2827         * svg/SVGGElement.cpp:
2828         (WebCore::SVGGElement::childrenChanged):
2829         * svg/SVGGElement.h:
2830         * svg/SVGGradientElement.cpp:
2831         (WebCore::SVGGradientElement::childrenChanged):
2832         * svg/SVGGradientElement.h:
2833         * svg/SVGMarkerElement.cpp:
2834         (WebCore::SVGMarkerElement::childrenChanged):
2835         * svg/SVGMarkerElement.h:
2836         * svg/SVGMaskElement.cpp:
2837         (WebCore::SVGMaskElement::childrenChanged):
2838         * svg/SVGMaskElement.h:
2839         * svg/SVGPatternElement.cpp:
2840         (WebCore::SVGPatternElement::childrenChanged):
2841         * svg/SVGPatternElement.h:
2842         * svg/SVGStyleElement.cpp:
2843         (WebCore::SVGStyleElement::finishParsingChildren):
2844         (WebCore::SVGStyleElement::childrenChanged):
2845         * svg/SVGStyleElement.h:
2846         * svg/SVGStyledElement.cpp:
2847         (WebCore::SVGStyledElement::childrenChanged):
2848         * svg/SVGStyledElement.h:
2849         * svg/SVGTitleElement.cpp:
2850         (WebCore::SVGTitleElement::childrenChanged):
2851         * svg/SVGTitleElement.h:
2852         * svg/SVGUseElement.cpp:
2853         (WebCore::SVGUseElement::childrenChanged):
2854         * svg/SVGUseElement.h:
2855         
2856 2008-02-09  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2857
2858         Unreviewed build fix
2859
2860         Somehow the removal of adjustSliderThumbSize(RenderObject*) sneaked
2861         into the patch.
2862
2863         * platform/qt/RenderThemeQt.h:
2864
2865 2008-02-09  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2866
2867         Reviewed by Adele.
2868
2869         paintResizeControl is dead, remove the code. This painting
2870         is done by the RenderLayer.
2871
2872         * platform/qt/RenderThemeQt.cpp:
2873         * platform/qt/RenderThemeQt.h:
2874         * rendering/RenderThemeMac.h:
2875         * rendering/RenderThemeMac.mm:
2876
2877 2008-02-07  Kevin Ollivier <kevino@theolliviers.com>
2878
2879         Reviewed by Eric Seidel, Adam Roben.
2880
2881         MSVC7 fixes.
2882         http://bugs.webkit.org/show_bug.cgi?id=17211
2883
2884         * platform/Threading.h:
2885         - On MSVC7, when the Interlocked* functions are used, the ref count gets out of sync.
2886           (MSVC8 seems not to have this problem.) Use the old implementation which works correctly.
2887         * platform/win/SharedTimerWin.cpp:
2888         - USER_TIMER_MINIMUM/MAXIMUM aren't defined in winuser.h for the MSVC 2003 Platform SDK
2889           so define them if they are not already defined.
2890
2891 2008-02-08  Brent Fulgham  <bfulgham@gmail.com>
2892
2893         Reviewed by Adam Roben.
2894
2895         Bug 17226: Fix Windows (Cairo) build of image-decoders
2896         http://bugs.webkit.org/show_bug.cgi?id=17226
2897
2898         * platform/image-decoders/gif/GIFImageDecoder.cpp:
2899         * platform/image-decoders/png/PNGImageDecoder.cpp:
2900
2901 2008-02-08  Timothy Hatcher  <timothy@apple.com>
2902
2903         Reviewed by Brady Eidson.
2904
2905         <rdar://problem/5640896> Removing database then trying
2906         to recreate it causes trouble
2907
2908         Added open Database support to DatabaseTracker. So any Database that 
2909         is deleted will be marked as deleted and will fail to open any transaction
2910         or execute any new SQL queries.
2911
2912         * storage/Database.cpp:
2913         (WebCore::Database::Database): Call DatabaseTracker::addOpenDatabase.
2914         (WebCore::Database::~Database): Call DatabaseTracker::removeOpenDatabase.
2915         (WebCore::Database::markAsDeleted): Set the m_deleted flag.
2916         (WebCore::Database::version): Return a null String if m_deleted is true.
2917         * storage/Database.h:
2918         (WebCore::Database::deleted): Return m_deleted.
2919         * storage/DatabaseTracker.cpp:
2920         (WebCore::DatabaseTracker::addOpenDatabase): Add the Database to a map of origins and names.
2921         (WebCore::DatabaseTracker::removeOpenDatabase): Remove the Database from the map.
2922         (WebCore::DatabaseTracker::deleteDatabaseFile): Call markAsDeleted on all the open Databases
2923           matching the origin/name.
2924         * storage/DatabaseTracker.h:
2925         * storage/SQLStatement.cpp:
2926         (WebCore::SQLStatement::setDatabaseDeletedError): Set the error about the user deleting the database.
2927         * storage/SQLStatement.h:
2928         * storage/SQLTransaction.cpp:
2929         (WebCore::SQLTransaction::executeSQL): If the Database is deleted, call setDatabaseDeletedError.
2930         (WebCore::SQLTransaction::openTransactionAndPreflight): Set the error about the user deleting the database
2931           if the Database was marked as deleted.
2932
2933 2008-02-08  Darin Adler  <darin@apple.com>
2934
2935         Reviewed by Eric.
2936
2937         - fix http://bugs.webkit.org/show_bug.cgi?id=15003
2938           Function.prototype.constructor should not be DontDelete/ReadOnly (Acid3 bug)
2939
2940         Test: fast/js/constructor-attributes.html
2941
2942         * bindings/scripts/CodeGeneratorJS.pm: Remove unwanted attributes from "constructor".
2943
2944 2008-02-08  Anders Carlsson  <andersca@apple.com>
2945
2946         Reviewed by Mitz.
2947
2948         <rdar://problem/5650446>
2949         http://bugs.webkit.org/show_bug.cgi?id=16102
2950         Crash in FrameLoader::stopLoadingSubframes() on IMDB page
2951
2952         Store the child frame in a RefPtr to prevent it from being deleted when the
2953         frame tree changes while calling stopAllLoaders().
2954         
2955         * loader/FrameLoader.cpp:
2956         (WebCore::FrameLoader::stopLoadingSubframes):
2957
2958 2008-02-08  Kevin Ollivier  <kevino@theolliviers.com>
2959
2960         wx port build fix. Add time.h to define time_t.
2961
2962         * platform/FileSystem.h:
2963
2964 2008-02-08  Alp Toker  <alp@atoker.com>
2965
2966         Reviewed by Adam Roben.
2967
2968         Avoid null-dereference crasher noticed in the GTK+ port and also
2969         affecting the Win debug build.
2970
2971         Covered by existing tests.
2972
2973         * dom/Document.cpp:
2974         (WebCore::Document::userStyleSheet):
2975
2976 2008-02-08  Anders Carlsson  <andersca@apple.com>
2977
2978         Reviewed by Adam.
2979
2980         <rdar://problem/5724188> 
2981         REGRESSION: PLT 0.7% slower due to 29926 (change Text::createWithLengthLimit to take a UChar pointer)
2982         
2983         Revert r29926 which caused the regression.
2984         
2985         * dom/Text.cpp:
2986         (WebCore::Text::createWithLengthLimit):
2987         * dom/Text.h:
2988         * html/HTMLParser.cpp:
2989         (WebCore::HTMLParser::parseToken):
2990         * loader/TextDocument.cpp:
2991         (WebCore::TextTokenizer::write):
2992
2993 2008-02-08  Sam Weinig  <sam@webkit.org>
2994
2995         Reviewed by Hyatt.
2996
2997         Fix for <rdar://problem/5732491>
2998         http://bugs.webkit.org/show_bug.cgi?id=17213
2999         The querySelectorAll method on an element node does not search only the element's descendants
3000
3001         Test: fast/dom/SelectorAPI/elementRoot.html
3002
3003         * dom/Node.cpp:
3004         (WebCore::Node::querySelector): Make sure to stay within the root node when traversing the tree.
3005         * dom/SelectorNodeList.cpp:
3006         (WebCore::SelectorNodeList::SelectorNodeList): ditto.
3007
3008
3009
3010 2008-02-08  David Hyatt  <hyatt@apple.com>
3011
3012         Fix for bug 16798, button should default to type=submit.
3013
3014         Reviewed by darin
3015
3016         * html/HTMLButtonElement.cpp:
3017         (WebCore::HTMLButtonElement::type):
3018         (WebCore::HTMLButtonElement::parseMappedAttribute):
3019
3020 2008-02-08  Rodney Dawes  <dobey@wayofthemonkey.com>
3021
3022         Reviewed by Jon Honeycutt.
3023
3024         Redefine some platform-specific types as cross-platform types
3025         Add pathGetFileName method to get the filename from a path string
3026         Add unloadModule method to unload a loadable module from the process
3027         Implement new methods for GTK+ and Windows
3028         Implement missing homeDirectoryPath method for GTK+
3029         Add stub methods for new and missing methods for Wx and Qt
3030
3031         * platform/FileSystem.h:
3032         * platform/gtk/FileSystemGtk.cpp:
3033         * platform/qt/FileSystemQt.cpp:
3034         * platform/win/FileSystemWin.cpp:
3035         * platform/wx/FileSystemWx.cpp:
3036
3037 2008-02-08  Adam Roben  <aroben@apple.com>
3038
3039         Windows build fix after r30088
3040
3041         * bindings/scripts/CodeGeneratorCOM.pm: Touch this to force the COM
3042         bindings to rebuild.
3043
3044 2008-02-08  Pierre-Luc Beaudoin  <pierre-luc.beaudoin@collabora.co.uk>
3045
3046         Reviewed by Alp Toker.
3047
3048         http://bugs.webkit.org/show_bug.cgi?id=17009
3049         [Gtk] Webkit strips accents from some dead-key combinations
3050
3051         KeyEvents have to go through the gtk input method.
3052
3053         Also implement the isKeypad check and make disambiguateKeyDownEvent
3054         behave more like other ports.
3055
3056         * platform/PlatformKeyboardEvent.h:
3057         * platform/gtk/KeyEventGtk.cpp:
3058         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
3059         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
3060         (WebCore::PlatformKeyboardEvent::gdkEventKey):
3061
3062 2008-02-08  Darin Adler  <darin@apple.com>
3063
3064         Reviewed by Eric.
3065
3066         - fix http://bugs.webkit.org/show_bug.cgi?id=3492
3067           TreeWalker implementation needs to be fixed (affects Acid3)
3068         - fix http://bugs.webkit.org/show_bug.cgi?id=4714
3069           NodeIterator does not handle exceptions from the filter function (affects Acid3)
3070         - fix http://bugs.webkit.org/show_bug.cgi?id=4716
3071           NodeIterator will crash if the filter function removes the current node from the document
3072
3073         Test: traversal/exception-forwarding.html
3074
3075         This turned into a near-rewrite of NodeIterator and TreeWalker.
3076
3077         * bindings/js/JSNodeFilterCondition.h:
3078         * bindings/js/JSNodeFilterCondition.cpp:
3079         (WebCore::takeException): Added.
3080         (WebCore::JSNodeFilterCondition::acceptNode): Added an out parameter to return
3081         a JavaScript exception.
3082
3083         * bindings/js/JSNodeFilterCustom.cpp:
3084         (WebCore::JSNodeFilter::acceptNode): Wrote a custom binding for this that raises
3085         a JavaScript exception if the out parameter is set.
3086
3087         * bindings/js/JSNodeIteratorCustom.cpp:
3088         (WebCore::JSNodeIterator::nextNode): Wrote a custom binding for this that raises
3089         a JavaScript exception if the out parameter is set.
3090         (WebCore::JSNodeIterator::previousNode): Ditto.
3091
3092         * bindings/js/JSTreeWalkerCustom.cpp:
3093         (WebCore::JSTreeWalker::parentNode): Wrote a custom binding for this that raises
3094         a JavaScript exception if the out parameter is set.
3095         (WebCore::JSTreeWalker::firstChild): Ditto.
3096         (WebCore::JSTreeWalker::lastChild): Ditto.
3097         (WebCore::JSTreeWalker::nextSibling): Ditto.
3098         (WebCore::JSTreeWalker::previousSibling): Ditto.
3099         (WebCore::JSTreeWalker::previousNode): Ditto.
3100         (WebCore::JSTreeWalker::nextNode): Ditto.
3101
3102         * bindings/objc/DOM.mm:
3103         (WebCore::ObjCNodeFilterCondition::acceptNode): Updated to include new exception
3104         out parameter.
3105         (-[DOMDocument createNodeIterator:whatToShow:filter:expandEntityReferences:]):
3106         Use RefPtr to make object lifetimes clearer.
3107         (-[DOMDocument createTreeWalker:whatToShow:filter:expandEntityReferences:]):
3108         Ditto.
3109
3110         * bindings/scripts/CodeGeneratorJS.pm: Added include of NodeFilter.h for
3111         JSDocument.cpp.
3112
3113         * dom/Document.h:
3114         * dom/Document.cpp:
3115         (WebCore::Document::createNodeIterator): Changed to use PassRefPtr.
3116         (WebCore::Document::createTreeWalker): Ditto.
3117
3118         * dom/NodeFilter.h:
3119         * dom/NodeFilter.cpp:
3120         (WebCore::NodeFilter::NodeFilter): Changed to use PassRefPtr.
3121         (WebCore::NodeFilter::acceptNode): Added an out parameter to return
3122         a JavaScript exception.
3123         * dom/NodeFilter.idl: Custom binding for acceptNode.
3124
3125         * dom/NodeFilterCondition.h:
3126         * dom/NodeFilterCondition.cpp:
3127         (WebCore::NodeFilterCondition::acceptNode): Added an out parameter to return
3128         a JavaScript exception.
3129
3130         * dom/NodeIterator.cpp:
3131         (WebCore::NodeIterator::NodeIterator): Changed to use PassRefPtr more.
3132         Eliminated m_doc, using the root node instead, and unnecessary check for
3133         null -- rootNode must be non-null and all nodes have a non-null document.
3134         (WebCore::NodeIterator::~NodeIterator): Changed to get document from root.
3135         (WebCore::NodeIterator::nextNode): Rewrote to use a RefPtr since the
3136         acceptNode function could do anything, including removing the last
3137         reference to the current node. Also folded findNextNode into this function
3138         since it's the only one that needs to call it.
3139         (WebCore::NodeIterator::previousNode): Same thing, but the other direction.
3140         (WebCore::NodeIterator::detach): Changed to use the root node as the indication
3141         that we're detached rather than a separate boolean.
3142         (WebCore::NodeIterator::notifyBeforeNodeRemoval): Removed some unnneeded
3143         checks. Removed incorrect use of findNextNode/findPreviousNode -- those
3144         functions call acceptNode and the DOM standard is quite clear that these
3145         functions do not take that into account, allowing the current node to become
3146         one that's not accepted.
3147
3148         * dom/NodeIterator.h: Changed constructor to use PassRefPtr more. Changed
3149         nextNode and previousNode to have an out parameter with a JavaScript exception.
3150         Removed helper functions setReferenceNode, setPointerBeforeReferenceNode,
3151         detached, setDetached, document, findNextNode, and findPreviousNode. All were
3152         unnecessary. Removed data member m_doc which was just rootNode()->document().
3153
3154         * dom/NodeIterator.idl: Custom binding for nextNode and previousNode.
3155
3156         * dom/Traversal.cpp:
3157         (WebCore::Traversal::Traversal): Use PassRefPtr more.
3158         (WebCore::Traversal::acceptNode): Added out parameter for JavaScript exception.
3159         Also rearranged the function a little bit for clarity.
3160
3161         * dom/Traversal.h: Changed acceptNode to have an out parameter with a JavaScript
3162         exception and made it protected, since it's only for use by the derived classes.
3163
3164         * dom/TreeWalker.cpp:
3165         (WebCore::TreeWalker::TreeWalker): Updated to use PassRefPtr.
3166         (WebCore::TreeWalker::setCurrentNode): Updated to use PassRefPtr and deleted
3167         the overloaded version since it's not needed.
3168         (WebCore::TreeWalker::parentNode): Rewrote to propagate the exception and also
3169         to implement rules about when to check things like whether we're in the tree.
3170         The previous fix where we called isDescendantOf was not entirely correct, because
3171         the specification allows you to walk outside the tree if you get there somehow.
3172         What it doesn't allow is walking outside the tree from inside. The new
3173         implementation handles this correctly.
3174         (WebCore::TreeWalker::firstChild): Ditto.
3175         (WebCore::TreeWalker::lastChild): Ditto.
3176         (WebCore::TreeWalker::previousSibling): Ditto.
3177         (WebCore::TreeWalker::nextSibling): Ditto.
3178         (WebCore::TreeWalker::previousNode): Ditto. Because of the need to check the
3179         acceptNode function on parents, this can't use traversePreviousNode (more's the
3180         pity, because it's a bit complicated).
3181         (WebCore::TreeWalker::nextNode): Ditto.
3182
3183         * dom/TreeWalker.h: Changed constructor and setCurrentNode to use PassRefPtr
3184         more. Changed the navigation functions to have an out parameter with a JavaScript
3185         exception. Removed helper functions setCurrentNode and ancestorRejected.
3186
3187         * dom/TreeWalker.idl: Custom binding for navigation functions.
3188
3189 2008-02-08  Eric Seidel  <eric@webkit.org>
3190
3191         Reviewed by darin.
3192
3193         Add support for Text.wholeText and Text.replaceWholeText
3194         http://bugs.webkit.org/show_bug.cgi?id=17125
3195
3196         Test EntityReferences to make sure they're always treated as read-only
3197         In doing so I discovered a bug in document.adoptNode(readonlyNode) (and fixed it)
3198
3199         * dom/Document.cpp:
3200         (WebCore::Document::adoptNode): throw NO_MODIFICATION_ALLOWED_ERR when passed a readonly node
3201         * dom/Node.cpp:
3202         * dom/Node.cpp:
3203         (WebCore::Node::textContent):
3204         * dom/Text.cpp:
3205         (WebCore::earliestLogicallyAdjacentTextNode):
3206         (WebCore::latestLogicallyAdjacentTextNode):
3207         (WebCore::Text::wholeText):
3208         (WebCore::Text::replaceWholeText):
3209         * dom/Text.h:
3210         * dom/Text.idl:
3211
3212 2008-02-06  Kimmo Kinnunen  <kimmok@iki.fi>
3213
3214         Reviewed by Tim Hatcher.
3215
3216         Fixes: http://bugs.webkit.org/show_bug.cgi?id=17191
3217         HTML5: Client-side database queries should return values of type number
3218         Test: storage/sql-data-types.html
3219
3220         Make the DB queries return a value as a number if it was inserted
3221         as a number to the database.
3222         * platform/sql/SQLiteStatement.cpp:
3223         (WebCore::SQLiteStatement::getColumnValue): new member function to return SQLValues
3224         * platform/sql/SQLiteStatement.h:
3225         * storage/SQLStatement.cpp:
3226         (WebCore::SQLStatement::execute): use getColumnValue instead of getColumnText
3227
3228 2008-02-07  Ada Chan  <adachan@apple.com>
3229
3230         <rdar://problem/5292433> certificate authentication support broken in Safari 3.0
3231         Added mechanism to communicate client certificate info back to CFNetwork.
3232
3233         Reviewed by Adam.
3234
3235         * platform/network/ResourceHandle.h:
3236         * platform/network/cf/ResourceHandleCFNet.cpp:
3237         (WebCore::clientCerts): Keep a mapping of hosts to client certificates.
3238         (WebCore::makeFinalRequest): If we have a client certificate for the host, pass it
3239         to CFNetwork by setting it in the SSL properties.
3240         (WebCore::ResourceHandle::setClientCertificate): Map client certificate to the host.
3241
3242 2008-02-07  Adam Roben  <aroben@apple.com>
3243
3244         Qt build fix
3245
3246         * platform/SharedBuffer.cpp: Removed a stub implementation of
3247         createWithContentsOfFile, now that each platform has its own stub.
3248
3249 2008-02-07  Adam Roben  <aroben@apple.com>
3250
3251         Fix Bug 17138: REGRESSION: Node highlight not updated properly
3252
3253         <http://bugs.webkit.org/show_bug.cgi?id=17138>
3254         <rdar://problem/5719869>
3255
3256         Reviewed by Darin.
3257
3258         No test possible.
3259
3260         * page/InspectorController.cpp:
3261         (WebCore::InspectorController::drawNodeHighlight): Update the
3262         overlayRect after scrolling to make sure that we translate the context
3263         by the correct amount.
3264
3265 2008-02-07  Adam Roben  <aroben@apple.com>
3266
3267         Qt and GTK+ build fixes
3268
3269         * platform/gtk/FileSystemGtk.cpp: Added a missing #include.
3270         * platform/qt/FileSystemQt.cpp: Ditto.
3271
3272 2008-02-07  Adam Roben  <aroben@apple.com>
3273
3274         Some cleanup of Mac-only user stylesheet code
3275
3276         I moved UserStyleSheetLoader out of Frame.cpp into its own files, and
3277         moved some Mac-only Frame methods to FrameMac.mm.
3278
3279         Reviewed by Darin.
3280
3281         * WebCore.xcodeproj/project.pbxproj: Added new files to project.
3282         * loader/mac/UserStyleSheetLoader.cpp: Added.
3283         (UserStyleSheetLoader::UserStyleSheetLoader):
3284         (UserStyleSheetLoader::~UserStyleSheetLoader):
3285         * loader/mac/UserStyleSheetLoader.h: Added.
3286         * page/Frame.cpp: Removed setUserStyleSheet[Location]
3287         * page/mac/FrameMac.mm:
3288         (WebCore::Frame::setUserStyleSheetLocation): Moved here from
3289         Frame.cpp.
3290         (WebCore::Frame::setUserStyleSheet): Ditto.
3291
3292 2008-02-07  Adam Roben  <aroben@apple.com>
3293
3294         Fix <rdar://5555260> GMail never loads when a user stylesheet is
3295         specified
3296
3297         The fix in r29841 did not guarantee that the user stylesheet would not
3298         still be loading by the time GMail called document.write, and so was
3299         not a complete fix.
3300
3301         This change reworks the user stylesheet loading mechanism on non-Mac
3302         platforms to load the stylesheet synchronously from disk, and then
3303         keeps it in memory. This obsoletes the issue of what our behavior
3304         should be before the user stylesheet has loaded and what should happen
3305         when it finishes loading, as the user stylesheet will always be
3306         available when the Document first asks for it. Note, however, that
3307         this removes the ability to specify a non-file: URL for the user
3308         stylesheet. This change was not made for the Mac platform because it's
3309         possible that WebKit clients are relying on non-file: URLs for user
3310         stylesheets. It would also be nice to move back to an asynchronous
3311         loading model someday, but that is not currently possible since we
3312         don't have an asynchronous loading mechanism that is not tied to a
3313         particular Frame.
3314
3315         The responsibility of loading and storing the user stylesheet has
3316         moved from Frame to Page, since the user stylesheet URL is set on the
3317         Page-level Settings object.
3318
3319         Reviewed by Darin.
3320
3321         * dom/Document.cpp:
3322         (WebCore::Document::Document): Changed to call userStyleSheet().
3323         (WebCore::Document::setUserStyleSheet): Made Mac-only.
3324         (WebCore::Document::userStyleSheet): Changed to call up to Page on
3325         non-Mac platforms.
3326         (WebCore::Document::recalcStyleSelector): Changed to call
3327         userStyleSheet().
3328         * dom/Document.h:
3329             - Made setUserStyleSheet and the m_usersheet member Mac-only
3330             - Changed userStyleSheet to return a String instance instead of a
3331               String reference, since we now might return a new null String.
3332         * loader/FrameLoader.cpp:
3333         (WebCore::FrameLoader::begin): Made the call to
3334         Frame::setUserStyleSheetLocation Mac-only.
3335         * page/Frame.cpp: Made UserStyleSheetLoader and related code Mac-only.
3336         (WebCore::Frame::~Frame): Ditto.
3337         (WebCore::Frame::reapplyStyles): Made the call to
3338         setUserStyleSheet[Location] Mac-only. On non-Mac platforms the
3339         Document will pick up the new stylesheet in Document::reapplyStyles.
3340         (WebCore::FramePrivate::FramePrivate): Made m_userStyleSheetLoader
3341         Mac-only.
3342         * page/Frame.h: Made setUserStyleSheet[Location] Mac-only.
3343         * page/FramePrivate.h: Made m_userStyleSheetLoader Mac-only.
3344         * page/Page.cpp:
3345         (WebCore::Page::Page): Initialize new members.
3346         (WebCore::Page::userStyleSheetLocationChanged): Added. Does nothing on
3347         Mac. On non-Mac, resets all members relating to the user stylesheet so
3348         we'll know to load it again the next time it's asked for.
3349         (WebCore::Page::userStyleSheet): Added. Loads the user stylesheet if
3350         the user stylesheet location has changed since the last time we loaded
3351         it, or if the file has been modified since we last loaded it, then
3352         returns the contents of the user stylesheet as a String.
3353         * page/Page.h: Added new methods/members.
3354         * page/Settings.cpp:
3355         (WebCore::Settings::setUserStyleSheetLocation): Changed to call
3356         Page::userStyleSheetLocationChanged.
3357         * page/Settings.h: Changed userStyleSheetLocation to return the KURL
3358         by reference instead of making a copy.
3359         * platform/FileSystem.h: Added declaration for getFileModificationTime.
3360         * platform/KURL.h: Added declaration for fileSystemPath method.
3361         * platform/cf/KURLCFNet.cpp:
3362         (WebCore::KURL::fileSystemPath): Added.
3363         * platform/posix/FileSystemPOSIX.cpp:
3364         (WebCore::getFileModificationTime): Added.
3365         * platform/qt/KURLQt.cpp:
3366         (WebCore::KURL::fileSystemPath): Stubbed out.
3367         * platform/win/FileSystemWin.cpp:
3368         (WebCore::getFileModificationTime): Added.
3369         * platform/qt/FileSystemQt.cpp: Stubbed out getFileModificationTime.
3370         * platform/gtk/FileSystemGtk.cpp: Ditto.
3371         * platform/wx/FileSystemWx.cpp: Ditto.
3372         * platform/qt/TemporaryLinkStubs.cpp: Stubbed out
3373         SharedBuffer::createWithContentsOfFile.
3374         * platform/gtk/TemporaryLinkStubs.cpp: Ditto, along with
3375         KURL::fileSystemPath.
3376         * platform/wx/TemporaryLinkStubs.cpp: Ditto.
3377
3378 2008-02-07  Adam Roben  <aroben@apple.com>
3379
3380         Clean up FileSystemWin.cpp
3381
3382         This cleanup also makes us call _wstat64 instead of _wstat32i64. The
3383         only difference between these two functions is that _wstat64 gives
3384         64-bit time values, while _wstat32i64 only gives 32-bit time values.
3385
3386         Reviewed by Darin.
3387
3388         All tests pass.
3389
3390         * platform/win/FileSystemWin.cpp:
3391         (WebCore::statFile): New static helper that wraps _wstat64.
3392         (WebCore::getFileSize): Changed to call statFile.
3393         (WebCore::fileExists): Ditto.
3394
3395 2008-02-07  Adam Roben  <aroben@apple.com>
3396
3397         Rename fileSize to getFileSize
3398
3399         Rubberstamped by Darin.
3400
3401         * platform/FileSystem.h:
3402         * platform/gtk/FileSystemGtk.cpp:
3403         * platform/network/cf/FormDataStreamCFNet.cpp:
3404         (WebCore::setHTTPBody):
3405         * platform/network/curl/ResourceHandleManager.cpp:
3406         (WebCore::ResourceHandleManager::setupPOST):
3407         * platform/posix/FileSystemPOSIX.cpp:
3408         * platform/qt/FileSystemQt.cpp:
3409         * platform/win/FileSystemWin.cpp:
3410         * platform/wx/FileSystemWx.cpp:
3411         * storage/Database.cpp:
3412         (WebCore::Database::databaseSize):
3413         * storage/DatabaseTracker.cpp:
3414         (WebCore::DatabaseTracker::usageForDatabase):
3415         * storage/OriginUsageRecord.cpp:
3416         (WebCore::OriginUsageRecord::diskUsage):
3417
3418 2008-02-06  Adam Roben  <aroben@apple.com>
3419
3420         Make KURL::isLocalFile treat the URL's protocol case-insensitively
3421
3422         Reviewed by Darin.
3423
3424         * platform/KURL.cpp:
3425         (WebCore::KURL::isLocalFile): Use equalIgnoringCase instead of ==.
3426
3427 2008-02-07  David Hyatt  <hyatt@apple.com>
3428
3429         Fix for bug 6248, implement the nth-* CSS3 selectors.  Patch based on original KHTML work from Allan Jensen
3430         and improved upon by Nick Shanks.
3431
3432         Reviewed by Eric
3433
3434         * css/CSSGrammar.y:
3435         * css/CSSParser.cpp:
3436         (WebCore::CSSParser::lex):
3437         * css/CSSSelector.cpp:
3438         (WebCore::CSSSelector::extractPseudoType):
3439         * css/CSSSelector.h:
3440         (WebCore::CSSSelector::):
3441         * css/CSSStyleSelector.cpp:
3442         (WebCore::parseNth):
3443         (WebCore::matchNth):
3444         (WebCore::CSSStyleSelector::checkOneSelector):
3445         * css/tokenizer.flex:
3446         * rendering/RenderStyle.cpp:
3447         (WebCore::RenderStyle::RenderStyle):
3448         * rendering/RenderStyle.h:
3449         (WebCore::RenderStyle::childIndex):
3450         (WebCore::RenderStyle::setChildIndex):
3451
3452 2008-02-07  Dan Bernstein  <mitz@apple.com>
3453
3454         Reviewed by Dave Hyatt.
3455
3456         - fix <rdar://problem/5729411> REGRESSION (r29834): Float contained in relative-positioned block is painted twice
3457
3458         Test: fast/block/float/relative-painted-twice.html
3459
3460         * rendering/RenderBlock.cpp:
3461         (WebCore::RenderBlock::addOverhangingFloats): Added another case where
3462         the child should not take over painting the float: when they do not have
3463         the same enclosing layer. In that case, the float is already being
3464         painted by one of its closer ancestors.
3465
3466 2008-02-07  Dan Bernstein  <mitz@apple.com>
3467
3468         Reviewed by Darin Adler.
3469
3470         - fix http://bugs.webkit.org/show_bug.cgi?id=17194
3471           Changing text to bold changes font family
3472
3473         Test: platform/mac/fast/text/family-for-font-matched-by-name.html
3474
3475         * platform/mac/WebFontCache.mm:
3476         (+[WebFontCache internalFontWithFamily:traits:size:]): Changed to use
3477         the family of the font whose name matches the desired family if there
3478         is no exact family match.
3479
3480 2008-02-07  Beth Dakin  <bdakin@apple.com>
3481
3482         Reviewed by Geoff.
3483
3484         Fix for <rdar://problem/5697882> Traffic or Street View button on 
3485         Google Maps is sometimes not positioned correctly (17000)
3486
3487         On the Mac, timers fire in the order that they are registered. 
3488         Geoff and I discovered that this is not necessarily true on 
3489         Windows, and that turned out to be the cause of this intermittent 
3490         layout problem at Google Maps. This patch adds a new member 
3491         variable to Timer to remember the timer's insertion point into the 
3492         heap. Now when comparing timers, if two timers were registered at 
3493         the same time, their insertion orders are compared to determine 
3494         which should fire first. This code actually never runs on Debug 
3495         builds on the Mac; the system clock on the Mac is accurate enough 
3496         that it knows that the two timers were not registered at *exactly* 
3497         the same time. This is not the case on Windows. In theory, if we 
3498         sped up Javascript enough on the Mac, this code would run and would 
3499         prevent misrenderings such as the one found on Google Maps.
3500
3501         * platform/Timer.cpp:
3502         (WebCore::operator<):
3503         (WebCore::TimerBase::setNextFireTime):
3504         * platform/Timer.h:
3505
3506 2008-02-06  Justin Garcia  <justin.garcia@apple.com>
3507
3508         Reviewed by Darin Adler.
3509
3510         <rdar://problem/5195056> Huge plain text pastes are slow
3511         
3512         This was fixed in r27369 and then r29367 and r29667 caused performance to
3513         regress.
3514
3515         * editing/EditCommand.cpp:
3516         (WebCore::EditCommand::apply): Only updateLayout() for high level commands.
3517         (WebCore::EditCommand::unapply): Ditto.
3518         (WebCore::EditCommand::reapply): Ditto.
3519         * editing/Editor.cpp:
3520         (WebCore::Editor::appliedEditing): Added a note about shouldChangeSelection calls 
3521         that shouldn't be made, a bug I filed as <rdar://problem/5729315>.
3522         (WebCore::Editor::unappliedEditing): Ditto.
3523         (WebCore::Editor::reappliedEditing): Ditto.
3524         * editing/SelectionController.cpp:
3525         (WebCore::SelectionController::nodeWillBeRemoved): Don't try to test the selection
3526         base and extent with the expensive isCandidate operation if the node that will
3527         be removed is in a fragment, since such a removal is guaranteed to have no effect
3528         on a selection.  This is to speed up the paste operation, which does many removes from
3529         a fragment.
3530
3531 2008-02-06  Kevin Ollivier  <kevino@theolliviers.com>
3532
3533         Reviewed by Darin Adler.
3534
3535         Rather than directly handing scroll wheel events, use
3536         PlatformWheelEvent to send them to WebCore first, so that
3537         mouse wheel scrolling info can be retrieved via JavaScript.
3538
3539         http://bugs.webkit.org/show_bug.cgi?id=17179
3540
3541         * platform/ScrollView.h:
3542         * platform/wx/MouseWheelEventWx.cpp:
3543         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
3544         * platform/wx/ScrollViewWx.cpp:
3545         (WebCore::ScrollView::ScrollViewPrivate::bindEvents):
3546         (WebCore::ScrollView::wheelEvent):
3547         (WebCore::ScrollView::maximumScroll):
3548
3549 2008-02-06  Mark Rowe  <mrowe@apple.com>
3550
3551         Fix Windows builds.