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