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