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