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