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