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