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