2009-09-29 Simon Fraser <simon.fraser@apple.com>
[WebKit.git] / WebCore / ChangeLog
1 2009-09-29  Simon Fraser  <simon.fraser@apple.com>
2
3         Reviewed by Dan Bernstein.
4
5         ASSERTION FAILED: !repaintContainer || repaintContainer == this
6         https://bugs.webkit.org/show_bug.cgi?id=29755
7         
8         Generalize the fix for this bug to account for cases where there may be multiple
9         containing blocks between the repaint container, and the container of the element
10         being repainted.
11
12         Test: compositing/repaint/opacity-between-absolute2.html
13
14         * rendering/RenderBox.cpp:
15         (WebCore::RenderBox::mapLocalToContainer):
16         Call offsetFromAncestorContainer() to get the correct offset.
17         
18         (WebCore::RenderBox::computeRectForRepaint): Ditto
19         * rendering/RenderInline.cpp:
20         (WebCore::RenderInline::computeRectForRepaint): Ditto.
21         
22         * rendering/RenderObject.h:
23         * rendering/RenderObject.cpp:
24         (WebCore::RenderObject::offsetFromAncestorContainer):
25         New method that computes an offset from some object in the ancestor container() chain.
26
27 2009-09-30  Andras Becsi  <becsi.andras@stud.u-szeged.hu>
28
29         Reviewed by Simon Hausmann.
30
31         [Qt] Fix TextCodecQt::decode method after r48752 to return a non-null string if the length of the input is 0.
32         This fixes https://bugs.webkit.org/show_bug.cgi?id=29736.
33
34         * platform/text/qt/TextCodecQt.cpp:
35         (WebCore::TextCodecQt::decode):
36
37 2009-09-29  Dave Hyatt  <hyatt@apple.com>
38
39         Reviewed by Jon Honeycutt.
40
41         Fix a couple of bugs with patterns.  Move the setting of the document URL to before the style
42         selector gets constructed so that pattern match testing gets the correct URL.
43
44         * loader/FrameLoader.cpp:
45         (WebCore::FrameLoader::begin):
46         * page/UserContentURLPattern.cpp:
47         (WebCore::UserContentURLPattern::parse):
48
49 2009-09-29  Alexey Proskuryakov  <ap@apple.com>
50
51         Rubber-stamped by Brady Eidson.
52
53         Assertion failure in http/tests/xmlhttprequest/failed-auth.html.
54
55         I couldn't find out why this only started to happen now, but it was incorrect to check
56         persistence of a credential returned by CredentialStorage::get() without checking that it
57         was non-null. When there is no credential for the protection space in storage, get()
58         returns a new object, and Credentil constructor doesn't initialize m_persistence.
59
60         * platform/network/mac/ResourceHandleMac.mm:
61         (-[WebCoreSynchronousLoader connection:didReceiveAuthenticationChallenge:]): Moved the
62         assertion after credential null check.
63         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Added the same persistence
64         assertion, matching sync code (and CF one, as well).
65
66 2009-09-29  Yong Li  <yong.li@torchmobile.com>
67
68         Reviewed by Darin Adler.
69
70         Add an ASSERT for UTF8Encoding().isValid()
71         https://bugs.webkit.org/show_bug.cgi?id=29908
72
73         * platform/text/TextEncoding.cpp:
74         (WebCore::UTF8Encoding):
75
76 2009-09-29  Dave Hyatt  <hyatt@apple.com>
77
78         Reviewed by Jon Honeycutt.
79
80         https://bugs.webkit.org/show_bug.cgi?id=29892
81         Add support for whitelist patterns to control conditional injection of user scripts and
82         user stylesheets.
83
84         No new tests. Not testable until WebKit portion is added in followup patch.
85
86         * GNUmakefile.am:
87         * WebCore.gypi:
88         * WebCore.pro:
89         * WebCore.vcproj/WebCore.vcproj:
90         * WebCore.xcodeproj/project.pbxproj:
91         * dom/Document.cpp:
92         (WebCore::Document::pageGroupUserSheets):
93         * page/Frame.cpp:
94         (WebCore::Frame::injectUserScriptsForWorld):
95         * page/UserContentURLPattern.cpp: Added.
96         (WebCore::UserContentURLPattern::matchesPatterns):
97         (WebCore::UserContentURLPattern::parse):
98         (WebCore::UserContentURLPattern::matches):
99         (WebCore::UserContentURLPattern::matchesHost):
100         (WebCore::MatchTester::MatchTester):
101         (WebCore::MatchTester::testStringFinished):
102         (WebCore::MatchTester::patternStringFinished):
103         (WebCore::MatchTester::eatWildcard):
104         (WebCore::MatchTester::eatSameChars):
105         (WebCore::MatchTester::test):
106         (WebCore::UserContentURLPattern::matchesPath):
107         * page/UserContentURLPattern.h: Added.
108         (WebCore::UserContentURLPattern::UserContentURLPattern):
109         (WebCore::UserContentURLPattern::scheme):
110         (WebCore::UserContentURLPattern::host):
111         (WebCore::UserContentURLPattern::path):
112         (WebCore::UserContentURLPattern::matchSubdomains):
113
114 2009-09-29  Enrica Casucci  <enrica@apple.com>
115
116         Reviewed by Adele Peterson.
117
118         Reproducible crash pressing return inside quoted content
119         at WebCore::BreakBlockquoteCommand::doApply.
120         <rdar://problem/7085453>
121         In some case, like the one provided in the test case, m_downStreamEnd
122         refers to a node that gets deleted when executing the DeleteSelectionCommand.
123         We shouldn't use m_downStreamEnd to recalculate the new m_endPosition when
124         pruning is needed, because it may be point to a node that has been deleted, but
125         rather rely on removeNode in CompositeEditCommand to update m_endPosition correctly.
126
127         Test: editing/selection/blockquote-crash.html
128
129         * editing/BreakBlockquoteCommand.cpp:
130         (WebCore::BreakBlockquoteCommand::doApply): Added check for invalid position
131         to avoid dereferencing a null node pointer.
132         * editing/DeleteSelectionCommand.cpp:
133         (WebCore::DeleteSelectionCommand::mergeParagraphs): Don't reset m_endPosition
134         using the value in m_downStreamEnd when it is necessary to prune the start block.
135         
136 2009-09-29  Alexey Proskuryakov  <ap@apple.com>
137
138         Reviewed by Brady Eidson.
139
140         Basic authentication credentials are not sent automatically to top resources
141         https://bugs.webkit.org/show_bug.cgi?id=29901
142
143         No new tests - I don't want to pollute root directory of http tests to check for this rather
144         minor issue.
145
146         * platform/network/CredentialStorage.cpp:
147         (WebCore::CredentialStorage::set): Changed to always preserve leading slash.
148         (WebCore::CredentialStorage::getDefaultAuthenticationCredential): Made breaking out of the
149         loop more explicit.
150
151 2009-09-29  Pavel Feldman  <pfeldman@chromium.org>
152
153         Reviewed by Oliver Hunt.
154
155         Web Inspector REGRESSION(r47820-r47822): Profiles aren't
156         added to the inspector unless the inspector is already open
157         when the profile completes.
158
159         https://bugs.webkit.org/show_bug.cgi?id=29897
160
161         * inspector/front-end/ProfilesPanel.js:
162         (WebInspector.ProfilesPanel.prototype._populateProfiles):
163
164 2009-09-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>
165
166         Rubberstamped by David Hyatt.
167
168         Fix to logic of earlier commit 48902.
169
170         When merging two if's before committing, I forgot to invert the
171         bool check.
172
173         * platform/network/qt/QNetworkReplyHandler.cpp:
174         (WebCore::ignoreHttpError):
175
176 2009-09-29  Stephen White  <senorblanco@chromium.org>
177
178         Unreviewed, build fix.
179
180         Fixing Chromium build, following r48884.
181
182         [https://bugs.webkit.org/show_bug.cgi?id=29894]
183
184         * bindings/v8/V8AbstractEventListener.cpp:
185         (WebCore::V8AbstractEventListener::handleEvent):
186         * bindings/v8/V8AbstractEventListener.h:
187         * bindings/v8/V8WorkerContextEventListener.cpp:
188         (WebCore::V8WorkerContextEventListener::handleEvent):
189         * bindings/v8/V8WorkerContextEventListener.h:
190
191 2009-09-29  Kent Tamura  <tkent@chromium.org>
192
193         Reviewed by Darin Adler.
194
195         Follows HTML5's maxLength change in September 2009.
196         - Change HTMLTextAreaElement.maxLength type to signed.
197         - HTMLTextAreaElement.maxLength returns -1 if maxlength= attribute is missing.
198         - HTMLTextAreaElement.maxLength and HTMLInputElement.maxLength
199           throw INDEX_SIZE_ERR for setting negative values.
200         https://bugs.webkit.org/show_bug.cgi?id=29796
201
202         * html/HTMLInputElement.cpp:
203         (WebCore::HTMLInputElement::setMaxLength):
204         * html/HTMLInputElement.h:
205         * html/HTMLInputElement.idl:
206         * html/HTMLTextAreaElement.cpp:
207         (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
208         (WebCore::HTMLTextAreaElement::maxLength):
209         (WebCore::HTMLTextAreaElement::setMaxLength):
210         * html/HTMLTextAreaElement.h:
211         * html/HTMLTextAreaElement.idl:
212
213 2009-09-29  Dimitri Glazkov  <dglazkov@chromium.org>
214
215         No review, rolling out r48894, because review discussion was not complete.
216         http://trac.webkit.org/changeset/48894
217
218         * platform/sql/SQLiteTransaction.cpp:
219         (WebCore::SQLiteTransaction::begin):
220
221 2009-09-29  Dirk Schulze  <krit@webkit.org>
222
223         Reviewed by Nikolas Zimmermann.
224
225         SVG Filter feComposite implementation is missing
226         [https://bugs.webkit.org/show_bug.cgi?id=28362]
227
228         feComposite implementation for SVG.
229
230         Test: svg/filters/feComposite.svg
231
232         * platform/graphics/filters/FEComposite.cpp:
233         (WebCore::arithmetic):
234         (WebCore::FEComposite::apply):
235
236 2009-09-29  Dumitru Daniliuc  <dumi@chromium.org>
237
238         Reviewed by Dimitri Glazkov.
239
240         Starting all read-only transactions with an explicit BEGIN
241         DEFERRED command instead of BEGIN, since some ports (chromium)
242         might compile their own SQLite library and set BEGIN to BEGIN
243         IMMEDIATE by default; which would result in a deadlock in case of
244         two concurrent read-only transactions on the same DB, and would
245         unnecessarily delay other potential transactions to the same DB.
246
247         https://bugs.webkit.org/show_bug.cgi?id=29729
248
249         * platform/sql/SQLiteTransaction.cpp:
250         (WebCore::SQLiteTransaction::begin):
251
252 2009-09-29  Kenneth Russell  <kbr@google.com>
253
254         Reviewed by Dimitri Glazkov.
255
256         Add support for run-time flag for 3D canvas
257         https://bugs.webkit.org/show_bug.cgi?id=29826
258
259         * html/HTMLCanvasElement.cpp:
260         (WebCore::HTMLCanvasElement::getContext): Check page settings for
261         experimental WebGL flag before returning 3D graphics context.
262         * page/Settings.cpp:
263         (WebCore::Settings::Settings): Initialize new flag to false.
264         (WebCore::Settings::setExperimentalWebGLEnabled):
265         * page/Settings.h: Set new flag.
266         (WebCore::Settings::experimentalWebGLEnabled): Return new flag.
267
268 2009-09-29  Jeremy Orlow  <jorlow@chromium.org>
269
270         Reviewed by Darin Fisher.
271
272         Chromium needs to be able to override the way storage events are delivered - part 1
273         https://bugs.webkit.org/show_bug.cgi?id=29889
274
275         Chromium needs to be able to override the way storage events are delivered.
276         This replaced https://bugs.webkit.org/show_bug.cgi?id=29257 because it'll be
277         faster (no vtables and extra allocation) and somewhat cleaner (no dependency
278         injection).  This is necessary because Chromium needs to transport events across
279         a process barrier and then dispatch them without use of a Frame*.
280
281         This patch should be a no-op for all ports other than Chromium.
282
283         * WebCore.gypi:
284         * storage/StorageEventDispatcher.h: Added.
285
286 2009-09-29  Oliver Hunt  <oliver@apple.com>
287
288         Reviewed by NOBODY (missed file).
289
290         Adding file missed in previous commit.
291
292         * manual-tests/gtk/resources/long_cell.cur: Copied from WebCore/dom/PositionCreationFunctions.h.
293
294 2009-09-29  Dimitri Glazkov  <dglazkov@chromium.org>
295
296         Reviewed by Darin Fisher.
297
298         [V8] Correct an issue with XMLHttpRequest attribute event listeners never being cleared.
299         https://bugs.webkit.org/show_bug.cgi?id=29888
300
301         Test: LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-abort-readyState-shouldDispatchEvent.html
302
303         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
304         (WebCore::getEventListener): Added isAttribute parameter.
305         (WebCore::ACCESSOR_SETTER): Made all event listener setters create attribute listeners.
306         (WebCore::CALLBACK_FUNC_DECL): Made addEventListener create object listener.
307
308 2009-09-22  Martin Robinson  <martin.james.robinson@gmail.com>
309
310         Reviewed by Eric Seidel.
311
312         Fix corruption for non-square images.
313
314         [GTK] REGRESSION: BitmapImage::getGdkPixbuf fails for non-square images
315         https://bugs.webkit.org/show_bug.cgi?id=29654
316
317         Added an additional manual-test for this issue to the existing Gtk
318         cursor image test.
319
320         * manual-tests/gtk/cursor-image.html:
321         * manual-tests/gtk/resources/long_cell.cur: Added.
322         * platform/graphics/gtk/ImageGtk.cpp:
323         (WebCore::BitmapImage::getGdkPixbuf):
324
325 2009-09-29  Alexey Proskuryakov  <ap@apple.com>
326
327         Reviewed by Timothy Hatcher.
328
329         Build fix - pass a proper ScriptExecutipnContext to getEventListenerHandlerBody()
330
331         * bindings/js/ScriptEventListener.cpp:
332         (WebCore::getEventListenerHandlerBody):
333         * bindings/js/ScriptEventListener.h:
334         * bindings/v8/ScriptEventListener.cpp:
335         (WebCore::getEventListenerHandlerBody):
336         * bindings/v8/ScriptEventListener.h:
337         * inspector/InspectorDOMAgent.cpp:
338         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
339
340 2009-09-29  Nate Chapin  <japhet@chromium.org>
341
342         Reviewed by Eric Seidel.
343
344         Ensure that we don't scroll lock to an anchor node after a
345         user-initiated scroll, even if that scroll doesn't propagate
346         all the way up to FrameView.
347
348         Test: fast/events/node-event-anchor-lock.html
349
350         * page/EventHandler.cpp: Call setFrameWasScrolledByUser() when a scroll is handled by a node rather than a frame.
351         (WebCore::EventHandler::scrollOverflow):
352         (WebCore::EventHandler::handleWheelEvent):
353         (WebCore::EventHandler::sendScrollEvent): Use setFrameWasScrolledByUser();
354         (WebCore::EventHandler::setFrameWasScrolledByUser): Split out of sendScrollEvent();
355         (WebCore::EventHandler::passMousePressEventToScrollbar):
356         * page/EventHandler.h: Declare setFrameWasScrolledByUser().
357
358 2009-09-28  Alexey Proskuryakov  <ap@apple.com>
359
360         Reviewed by Darin Adler and Sam Weinig.
361
362         Onclick not fired for an element copied with cloneContents() or cloneNode()
363         https://bugs.webkit.org/show_bug.cgi?id=25130
364
365         The change here is that JS event listeners don't keep a reference to a global object from
366         where they were created, and instead take it as a parameter when parsing source code. Also,
367         the listener creation won't fail just because it happens for an element in a frameless
368         document.
369         Thus, moving nodes between documents no longer results in having incorrect registered
370         lazy event listeners on them.
371
372         Tests: fast/events/attribute-listener-cloned-from-frameless-doc-context-2.html
373                fast/events/attribute-listener-cloned-from-frameless-doc-context.html
374                fast/events/attribute-listener-cloned-from-frameless-doc.xhtml
375                fast/events/attribute-listener-extracted-from-frameless-doc-context-2.html
376                fast/events/attribute-listener-extracted-from-frameless-doc-context.html
377
378         * bindings/js/JSEventListener.cpp:
379         (WebCore::JSEventListener::JSEventListener): Don't take a reference to JSDOMGlobalObject.
380         (WebCore::JSEventListener::jsFunction): Take ScriptExecutionContext as a parameter for
381         getting to JSDOMGlobalObject. It's not used in base class, but is in JSLazyEventListner.
382         (WebCore::JSEventListener::markJSFunction): Don't mark the global object.
383         (WebCore::JSEventListener::handleEvent): Get global object from ScriptExecutionContext.
384         (WebCore::JSEventListener::reportError): Ditto.
385
386         * bindings/js/JSEventListener.h: (WebCore::JSEventListener::create): Don't keep a reference
387         to JSDOMGlobalObject.
388
389         * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::parseCode): Listener
390         creation was split between this function and ScriptEventListener; moved it here, as JS
391         global object can be different now.
392
393         * bindings/js/JSLazyEventListener.h: (WebCore::JSLazyEventListener::create): Keep source URL,
394         which can not be determined at parsing time.
395
396         * bindings/js/ScriptEventListener.cpp: (WebCore::createAttributeEventListener): Moved code
397         for listener creation to JSLazyEventListener. XSSAuditor code remains here, because tests
398         expect that errors are logged at document parsing time, and because I don't know what other
399         side effects moving it vould have.
400
401         * dom/EventListener.h: handleEvent() and reportError() now take ScriptExecutionContext,
402         because JSC needs a global context here.
403
404         * bindings/js/JSAbstractWorkerCustom.cpp:
405         (WebCore::JSAbstractWorker::addEventListener):
406         (WebCore::JSAbstractWorker::removeEventListener):
407         * bindings/js/JSDOMApplicationCacheCustom.cpp:
408         (WebCore::JSDOMApplicationCache::addEventListener):
409         (WebCore::JSDOMApplicationCache::removeEventListener):
410         * bindings/js/JSDOMGlobalObject.cpp:
411         (WebCore::JSDOMGlobalObject::createJSAttributeEventListener):
412         * bindings/js/JSDOMWindowCustom.cpp:
413         (WebCore::JSDOMWindow::addEventListener):
414         (WebCore::JSDOMWindow::removeEventListener):
415         * bindings/js/JSEventSourceCustom.cpp:
416         (WebCore::JSEventSource::addEventListener):
417         (WebCore::JSEventSource::removeEventListener):
418         * bindings/js/JSMessagePortCustom.cpp:
419         (WebCore::JSMessagePort::addEventListener):
420         (WebCore::JSMessagePort::removeEventListener):
421         * bindings/js/JSNodeCustom.cpp:
422         (WebCore::JSNode::addEventListener):
423         (WebCore::JSNode::removeEventListener):
424         * bindings/js/JSSVGElementInstanceCustom.cpp:
425         (WebCore::JSSVGElementInstance::addEventListener):
426         (WebCore::JSSVGElementInstance::removeEventListener):
427         * bindings/js/JSWorkerContextCustom.cpp:
428         (WebCore::JSWorkerContext::addEventListener):
429         (WebCore::JSWorkerContext::removeEventListener):
430         * bindings/js/JSXMLHttpRequestCustom.cpp:
431         (WebCore::JSXMLHttpRequest::addEventListener):
432         (WebCore::JSXMLHttpRequest::removeEventListener):
433         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
434         (WebCore::JSXMLHttpRequestUpload::addEventListener):
435         (WebCore::JSXMLHttpRequestUpload::removeEventListener):
436         * bindings/objc/ObjCEventListener.h:
437         * bindings/objc/ObjCEventListener.mm:
438         (WebCore::ObjCEventListener::handleEvent):
439         * bindings/scripts/CodeGeneratorJS.pm:
440         * dom/EventTarget.cpp:
441         (WebCore::EventTarget::fireEventListeners):
442         * inspector/InspectorDOMAgent.cpp:
443         (WebCore::InspectorDOMAgent::handleEvent):
444         * inspector/InspectorDOMAgent.h:
445         * inspector/InspectorDOMStorageResource.cpp:
446         (WebCore::InspectorDOMStorageResource::handleEvent):
447         * inspector/InspectorDOMStorageResource.h:
448         * loader/ImageDocument.cpp:
449         (WebCore::ImageEventListener::handleEvent):
450         * svg/animation/SVGSMILElement.cpp:
451         (WebCore::ConditionEventListener::handleEvent):
452         * workers/WorkerContext.cpp:
453         (WebCore::WorkerContext::reportException):
454         Don't pass global object to JSEventListener::create(), which no longer needs it.
455         Note that some of these functions still have an early return for null global object, which
456         can probably be removed in a later patch.
457         Pass ScriptExecutionContext to EventListener methods that now need it.
458
459         * bindings/scripts/CodeGeneratorCOM.pm: Don't force EventTarget implementation on Node -
460         it doesn't work yet (it didn't quite work before this patch, too, because it assumed that
461         any object implementing EventTarget COM interface originated from WebCore).
462
463         * dom/EventListener.idl: Just like in ObjC, EventListener should be a pure interface in
464         COM bindings.
465
466 2009-09-28  Geoffrey Garen  <ggaren@apple.com>
467
468         Reviewed by Sam Weinig.
469
470         Removed virtual destructor from JSGlobalObjectData to eliminate pointer
471         fix-ups when accessing JSGlobalObject::d.
472         
473         Replaced with an explicit destructor function pointer.
474
475         * bindings/js/JSDOMGlobalObject.cpp:
476         (WebCore::JSDOMGlobalObject::destroyJSDOMGlobalObjectData):
477         * bindings/js/JSDOMGlobalObject.h:
478         (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
479
480 2009-09-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>
481
482         Reviewed by Simon Hausmann.
483
484         Don't rely on QNetworkReply::NetworkError codes, but
485         on HTTP error codes instead.
486
487         * platform/network/qt/QNetworkReplyHandler.cpp:
488         (WebCore::ignoreHttpError):
489         (WebCore::QNetworkReplyHandler::finish):
490
491 2009-09-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>
492
493         Reviewed by Simon Hausmann.
494
495         Use const references when using Qt's foreach.
496
497         * platform/network/qt/QNetworkReplyHandler.cpp:
498         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
499
500 2009-09-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>
501
502         Reviewed by Simon Hausmann.
503
504         Fix handling of QNetworkReply errors.
505
506         In the QNetworkReplyHandler::finish() a response was sent even when
507         the reply contained an error. This resulted in a sendResponseIfNeeded()
508         calling didReceiveResponse on the client, leading to the destruction
509         of the m_resourceHandle, discontinuing further processing in finish(),
510         and thus not calling didFail on the client.
511
512         Instead it continued as everything went fine, and
513         FrameLoaderClientQt::dispatchDecidePolicyForMIMEType() changed the
514         policy to PolicyDownload due to not being able to show the non existing
515         MIMEType. As the download also obviously fails, it ended up with a
516         policy change error.
517
518         * platform/network/qt/QNetworkReplyHandler.cpp:
519         (WebCore::QNetworkReplyHandler::finish):
520
521 2009-09-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>
522
523         Reviewed by Simon Hausmann.
524
525         The code for showing error pages when the response was
526         a 401/403/404, was not actually doing so. This patch
527         fixes that.
528
529         * platform/network/qt/QNetworkReplyHandler.cpp:
530         (WebCore::QNetworkReplyHandler::finish):
531
532 2009-09-28  Alexey Proskuryakov  <ap@apple.com>
533
534         Reviewed by Brady Eidson.
535
536         <rdar://problem/7259965> REGRESSION: http/tests/xmlhttprequest/cross-origin-authorization.html
537         is failing/crashing intermittently
538         https://bugs.webkit.org/show_bug.cgi?id=29322
539
540         This was caused by CStringBuffer::encodeBase64() returning a buffer that wasn't zero terminated.
541         The code had other issues as well, so I removed it altogether:
542         - it claimed to avoid some buffer copies, but it didn't;
543         - and I don't think that base64 encoding should be part of CString interface.
544
545         * platform/network/mac/ResourceHandleMac.mm:
546         (WebCore::encodeBasicAuthorization): Encode username and password using Base64.h directly.
547         (WebCore::ResourceHandle::start): Use encodeBasicAuthorization().
548         (+[WebCoreSynchronousLoader loadRequest:allowStoredCredentials:returningResponse:error:]): Ditto.
549         (-[WebCoreSynchronousLoader connection:willSendRequest:redirectResponse:]): Extended logging
550         to synchronous case.
551         (-[WebCoreSynchronousLoader connectionShouldUseCredentialStorage:]): Ditto.
552         (-[WebCoreSynchronousLoader connection:didReceiveAuthenticationChallenge:]): Ditto.
553         (-[WebCoreSynchronousLoader connection:didReceiveResponse:]): Ditto.
554         (-[WebCoreSynchronousLoader connection:didReceiveData:]): Ditto.
555         (-[WebCoreSynchronousLoader connectionDidFinishLoading:]): Ditto.
556         (-[WebCoreSynchronousLoader connection:didFailWithError:]): Ditto.
557
558         * platform/network/cf/ResourceHandleCFNet.cpp: Matched Mac changes.
559
560         * platform/text/CString.cpp:
561         * platform/text/CString.h:
562         (WebCore::CStringBuffer::create):
563         (WebCore::CStringBuffer::CStringBuffer):
564         Removed code that was added for Base64 in r48363.
565
566 2009-09-29  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
567
568         Reviewed by Simon Hausmann.
569
570         Fix typo in Localizations.cpp
571
572         https://bugs.webkit.org/show_bug.cgi?id=29872
573
574         * platform/qt/Localizations.cpp:
575         (WebCore::localizedMediaControlElementHelpText):
576
577 2009-09-29  Simon Hausmann  <simon.hausmann@nokia.com>
578
579         Reviewed by Tor Arne Vestbø.
580
581         Make the XSLT conditional in DOMWindow.idl's xsltProcessor
582         attribute conditional in the generated files, similar to
583         r44116.
584
585         * page/DOMWindow.idl:
586
587 2009-09-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>
588
589         Reviewed by Simon Hausmann and Tor Arne Vestbø.
590
591         Use the ResourceError as it is supposed to and handle
592         not HTTP errors from QNetworkReply.
593
594         Thanks to Adam Roben for his input.
595
596         * platform/network/qt/QNetworkReplyHandler.cpp:
597         (WebCore::QNetworkReplyHandler::finish):
598
599 009-09-29  Pavel Feldman  <pfeldman@chromium.org>
600
601         Reviewed by Timothy Hatcher.
602
603         Web Inspector: Encapsulate JS listeners specifics into ScriptEventListener.
604
605         https://bugs.webkit.org/show_bug.cgi?id=29816
606
607         * bindings/js/ScriptEventListener.cpp:
608         (WebCore::getEventListenerHandlerBody):
609         * bindings/js/ScriptEventListener.h:
610         * bindings/v8/ScriptEventListener.cpp:
611         (WebCore::getEventListenerHandlerBody):
612         * bindings/v8/ScriptEventListener.h:
613         * inspector/InspectorDOMAgent.cpp:
614         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
615
616 2009-09-29  Xan Lopez  <xlopez@igalia.com>
617
618         Unreviewed attempt to fix the build.
619
620         * page/Settings.cpp:
621         (WebCore::Settings::Settings):
622
623 2009-09-28  Fumitoshi Ukai  <ukai@chromium.org>
624
625         Reviewed by Eric Seidel.
626
627         Add experimentalWebSocketsEnabled in Settings.
628         https://bugs.webkit.org/show_bug.cgi?id=28941
629
630         * WebCore.base.exp:
631         * bindings/js/JSDOMWindowCustom.cpp:
632         (WebCore::JSDOMWindow::webSocket):
633         * bindings/v8/V8DOMWrapper.cpp:
634         (WebCore::V8DOMWrapper::getConstructor):
635         * bindings/v8/custom/V8WebSocketCustom.cpp:
636         * page/Settings.cpp:
637         (WebCore::Settings::Settings):
638         (WebCore::Settings::setExperimentalWebSocketsEnabled):
639         * page/Settings.h:
640         (WebCore::Settings::experimentalWebSocketsEnabled):
641         
642 2009-09-11  Fumitoshi Ukai  <ukai@chromium.org>
643
644         Reviewed by Adam Barth.
645
646         Add platform code to support WebSocket for chromium.
647         https://bugs.webkit.org/show_bug.cgi?id=29171
648
649         To build within chromium tree, it requires a patch in bug 29174.
650         Real implementation will be landed in chromium tree.
651
652         * WebCore.gypi:
653         * platform/network/chromium/SocketStreamError.h: Added.
654         (WebCore::SocketStreamError::SocketStreamError):
655         * platform/network/chromium/SocketStreamHandle.h: Added.
656         (WebCore::SocketStreamHandle::create):
657
658 2009-09-28  Dan Bernstein  <mitz@apple.com>
659
660         Reviewed by Sam Weinig.
661
662         <rdar://problem/7157288> Crash in RenderStyle::computedLineHeight()
663         when Times New Roman is not installed
664
665         * platform/graphics/win/FontCacheWin.cpp:
666         (WebCore::FontCache::getLastResortFallbackFont): If Times New Roman is
667         not available, use the Windows default GUI font.
668
669 2009-09-28  Jian Li  <jianli@chromium.org>
670
671         Reviewed by David Levin.
672
673         Do not add platform-specific methods to cross-platform header
674         FileSystem.h per Darin's feedback for 29109.
675         https://bugs.webkit.org/show_bug.cgi?id=29830
676
677         * platform/FileSystem.h:
678         * platform/chromium/DragDataChromium.cpp:
679         (WebCore::DragData::asURL):
680         * platform/chromium/FileSystemChromium.cpp:
681
682 2009-09-28  Dumitru Daniliuc  <dumi@chromium.org>
683
684         Reviewed by Dimitri Glazkov.
685
686         Register Chromium's VFSs with a proper sqlite3_io_methods
687         finder. This should only affect the POSIX implementation. The
688         Windows change is included for consistency and in case sqlite
689         starts using something similar in its Windows VFS in the future.
690
691         https://bugs.webkit.org/show_bug.cgi?id=29743
692
693         * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp:
694         (WebCore::SQLiteFileSystem::registerSQLiteVFS):
695         * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp:
696         (WebCore::SQLiteFileSystem::registerSQLiteVFS):
697
698 2009-09-28  Nate Chapin  <japhet@chromium.org>
699
700         Reviewed by Adam Barth.
701
702         Change the V8 bindings' handling of window.toString(),
703         so we return [object DOMWindow] (like JSC), not [object global].
704
705         https://bugs.webkit.org/show_bug.cgi?id=29742
706
707         This will fix a couple of Chromium port test failures and enable us to
708         use the default expectations for a bunch more.
709
710         * bindings/v8/custom/V8DOMWindowCustom.cpp: Use the DOMWindow wrapper instead
711         of the global object wrapper when it's available in the DOMWindow toString callback.
712
713 2009-09-28  Nate Chapin  <japhet@chromium.org>
714
715         Rubber stamped by David Levin.
716
717         Chromium build fix, add back in #include of V8Proxy.h in V8WebKitPointConstructor.cpp.
718
719         * bindings/v8/custom/V8WebKitPointConstructor.cpp: Re-include V8Proxy.h.
720
721 2009-09-28  Geoffrey Garen  <ggaren@apple.com>
722
723         Reviewed by Darin Adler.
724
725         NotNullPassRefPtr: smart pointer optimized for passing references that are not null
726         https://bugs.webkit.org/show_bug.cgi?id=29822
727         
728         Added NotNullPassRefPtr, and deployed it in all places that initialize
729         JavaScript objects.
730
731         * bindings/js/DOMObjectWithSVGContext.h:
732         (WebCore::DOMObjectWithSVGContext::DOMObjectWithSVGContext):
733         * bindings/js/JSDOMBinding.cpp:
734         (WebCore::cacheDOMStructure):
735         * bindings/js/JSDOMBinding.h:
736         (WebCore::DOMObject::DOMObject):
737         (WebCore::DOMObjectWithGlobalPointer::DOMObjectWithGlobalPointer):
738         (WebCore::DOMConstructorObject::DOMConstructorObject):
739         (WebCore::DOMConstructorWithDocument::DOMConstructorWithDocument):
740         * bindings/js/JSDOMGlobalObject.cpp:
741         (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
742         * bindings/js/JSDOMGlobalObject.h:
743         * bindings/js/JSDOMWindowBase.cpp:
744         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
745         * bindings/js/JSDOMWindowBase.h:
746         * bindings/js/JSHTMLAllCollection.h:
747         (WebCore::JSHTMLAllCollection::JSHTMLAllCollection):
748         * bindings/js/JSInspectedObjectWrapper.cpp:
749         (WebCore::JSInspectedObjectWrapper::JSInspectedObjectWrapper):
750         * bindings/js/JSInspectedObjectWrapper.h:
751         * bindings/js/JSInspectorCallbackWrapper.cpp:
752         (WebCore::JSInspectorCallbackWrapper::JSInspectorCallbackWrapper):
753         * bindings/js/JSInspectorCallbackWrapper.h:
754         * bindings/js/JSQuarantinedObjectWrapper.cpp:
755         (WebCore::JSQuarantinedObjectWrapper::JSQuarantinedObjectWrapper):
756         * bindings/js/JSQuarantinedObjectWrapper.h:
757         * bindings/js/JSWorkerContextBase.cpp:
758         (WebCore::JSWorkerContextBase::JSWorkerContextBase):
759         * bindings/js/JSWorkerContextBase.h:
760         * bindings/scripts/CodeGeneratorJS.pm:
761         * bridge/runtime_object.cpp:
762         (JSC::RuntimeObjectImp::RuntimeObjectImp):
763         * bridge/runtime_object.h:
764
765 2009-09-28  Nate Chapin  <japhet@chromium.org>
766
767         Reviewed by Dimitri Glazkov.
768
769         Allow V8 to handle x/y parameters in a WebKitPoint constructor.
770         https://bugs.webkit.org/show_bug.cgi?id=29823
771
772         Fixes V8's handling of LayoutTests/fast/dom/Window/webkitConvertPoint.html
773
774         * bindings/v8/custom/V8WebKitPointConstructor.cpp: Allow for x/y parameters in constructor.
775
776 2009-09-28  Mark Rowe  <mrowe@apple.com>
777
778         Fix the build by doing something approximating reasonableness in the Xcode project.
779
780         * WebCore.xcodeproj/project.pbxproj:
781
782 2009-09-28  Simon Hausmann  <hausmann@webkit.org>
783
784         Prospective Tiger build fix.
785
786         * WebCore.xcodeproj/project.pbxproj: Try to use unique IDs for the new files.
787
788 2009-09-28  Pavel Feldman  <pfeldman@chromium.org>
789
790         Reviewed by Timothy Hatcher.
791
792         Web Inspector: Add explicit frontend event for commit load.
793
794         https://bugs.webkit.org/show_bug.cgi?id=29814
795
796         * inspector/InspectorController.cpp:
797         (WebCore::InspectorController::didCommitLoad):
798         * inspector/InspectorFrontend.cpp:
799         (WebCore::InspectorFrontend::didCommitLoad):
800         * inspector/InspectorFrontend.h:
801         * inspector/front-end/DOMAgent.js:
802         (WebInspector.DOMAgent.prototype._setDocument):
803         * inspector/front-end/inspector.js:
804         (WebInspector.addResource):
805         (WebInspector.didCommitLoad):
806
807 2009-09-28  Yaar Schnitman  <yaar@chromium.org>
808
809         Reviewed by Dimitri Glazkov.
810
811         Chromium port - recognize we are being built independently
812         of chromium and look for dependencies under webkit/chromium rather
813         than chromium/src.
814
815         https://bugs.webkit.org/show_bug.cgi?id=29722
816
817         * WebCore.gyp/WebCore.gyp: See above. Also removed a few files from
818           the sources list, since they are not supposed to be built here.
819
820 2009-09-28  Jakub Wieczorek  <faw217@gmail.com>
821
822         Reviewed by Simon Hausmann.
823
824         [Qt] Implement XSLT support with QtXmlPatterns.
825         https://bugs.webkit.org/show_bug.cgi?id=28303
826
827         * GNUmakefile.am:
828         * WebCore.gypi:
829         * WebCore.pro:
830         * WebCore.vcproj/WebCore.vcproj:
831         * WebCoreSources.bkl:
832         * dom/Document.cpp:
833         (WebCore::Document::Document):
834         (WebCore::Document::~Document):
835         (WebCore::Document::setTransformSource):
836         * dom/Document.h:
837         (WebCore::Document::transformSource):
838         * dom/TransformSource.h: Added.
839         (WebCore::TransformSource::platformSource):
840         * dom/TransformSourceLibxslt.cpp: Added.
841         (WebCore::TransformSource::TransformSource): Wraps a libxml2 document.
842         (WebCore::TransformSource::~TransformSource):
843         * dom/TransformSourceQt.cpp: Added.
844         (WebCore::TransformSource::TransformSource): Wraps a plain string.
845         (WebCore::TransformSource::~TransformSource):
846         * dom/XMLTokenizerLibxml2.cpp:
847         (WebCore::XMLTokenizer::doEnd):
848         * dom/XMLTokenizerQt.cpp:
849         (WebCore::XMLTokenizer::doEnd):
850         (WebCore::XMLTokenizer::parseProcessingInstruction):
851         * xml/XSLStyleSheet.h:
852         (WebCore::XSLStyleSheet::sheetString):
853         * xml/XSLStyleSheetLibxslt.cpp:
854         (WebCore::XSLStyleSheet::document):
855         * xml/XSLStyleSheetQt.cpp: Added.
856         * xml/XSLTProcessor.h:
857         * xml/XSLTProcessorLibxslt.cpp:
858         (WebCore::xmlDocPtrFromNode):
859         * xml/XSLTProcessorQt.cpp: Added.
860         (WebCore::XSLTMessageHandler::XSLTMessageHandler): A subclass of QAbstractMessageHandler.
861         (WebCore::XSLTMessageHandler::handleMessage): Forwards all processor messages to the Console.
862         (WebCore::XSLTProcessor::transformToString): Uses QXmlQuery.
863
864 2009-09-28  Andrew Scherkus  <scherkus@chromium.org>
865
866         Reviewed by Eric Carlson.
867
868         Delegate implementation of rendererIsNeeded() for media control elements to RenderTheme.
869
870         https://bugs.webkit.org/show_bug.cgi?id=28689
871
872         Covered by LayoutTests/media/video-no-audio.html
873
874         * rendering/MediaControlElements.cpp: Removed subclass implementations of rendererIsNeeded().
875         (WebCore::MediaControlElement::rendererIsNeeded): Include calling shouldRenderMediaControlPart().
876         (WebCore::MediaControlInputElement::rendererIsNeeded): Include calling shouldRenderMediaControlPart().
877         * rendering/MediaControlElements.h:
878         * rendering/RenderTheme.cpp:
879         (WebCore::RenderTheme::shouldRenderMediaControlPart): New method.  Contains logic moved from subclass implementations of rendererIsNeeded().
880         * rendering/RenderTheme.h:
881         * rendering/RenderThemeChromiumSkia.cpp:
882         (WebCore::RenderThemeChromiumSkia::shouldRenderMediaControlPart): Override to always render mute button.
883         * rendering/RenderThemeChromiumSkia.h:
884
885 2009-09-28  Jian Li  <jianli@chromium.org>
886
887         Reviewed by David Levin.
888
889         [chromium] DragData::asURL should return file URL.
890         https://bugs.webkit.org/show_bug.cgi?id=29109
891
892         Tested by LayoutTests/fast/events/drag-to-navigate.html.
893
894         * platform/FileSystem.h:
895         * platform/chromium/ChromiumBridge.h:
896         * platform/chromium/DragDataChromium.cpp:
897         (WebCore::DragData::asURL):
898         * platform/chromium/FileSystemChromium.cpp:
899         (WebCore::getAbsolutePath):
900         (WebCore::isDirectory):
901         (WebCore::filePathToURL):
902
903 2009-09-28  Dimitri Glazkov  <dglazkov@chromium.org>
904
905         Reviewed by David Levin.
906
907         [V8] Add a special case to handle index arguments, because we need to be
908         able to see if they're < 0.
909         https://bugs.webkit.org/show_bug.cgi?id=29810
910
911         Test: LayoutTests/dom/html/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative.html
912
913         * bindings/scripts/CodeGeneratorV8.pm: Added special case (matching CodeGeneratorJS.pm)
914           for index arguments.
915
916 2009-09-28  Dan Bernstein  <mitz@apple.com>
917
918         Reviewed by Darin Adler.
919
920         Extend the MediaWiki/KHTMLFixes.css workaround to cover older MediaWiki versions
921         https://bugs.webkit.org/show_bug.cgi?id=29792
922
923         * html/HTMLLinkElement.cpp:
924         (WebCore::HTMLLinkElement::setCSSStyleSheet): If site specific hacks are
925         enabled, check if the linked style sheet is one of two versions of the
926         MediaWiki KHTMLFixes.css. If so, remove the offending rule.
927
928 2009-09-28  Dimitri Glazkov  <dglazkov@chromium.org>
929
930         Reviewed by Adam Barth.
931
932         [V8] Fix an error in type logic in CodeGeneratorV8.pm, where
933         unsigned ints are accidentally used as signed.
934         https://bugs.webkit.org/show_bug.cgi?id=29810
935
936         Test: LayoutTests/fast/forms/textarea-maxlength.html
937
938         * bindings/scripts/CodeGeneratorV8.pm: Made sure "unsigned long" in IDL is
939           properly generates on "unsigned" return value.
940
941 2009-09-28  Jakub Wieczorek  <faw217@gmail.com>
942
943         Reviewed by Simon Hausmann.
944
945         Rename XSLStyleSheet.cpp to XSLStyleSheetLibxslt.cpp.
946         https://bugs.webkit.org/show_bug.cgi?id=28303
947
948         In preparation for adding XSLT support with QtXmlPatterns to the Qt
949         port, rename XSLStyleSheet.cpp to XSLStyleSheetLibxslt.cpp as we will
950         have our own implementation which most likely will not share any code
951         with the current one.
952
953         Additionally, fix some coding style issues.
954
955         * GNUmakefile.am:
956         * WebCore.gypi:
957         * WebCore.vcproj/WebCore.vcproj:
958         * WebCore.xcodeproj/project.pbxproj:
959         * WebCoreSources.bkl:
960         * xml/XSLStyleSheet.cpp: Renamed to XSLStyleSheetLibxslt.cpp.
961         * xml/XSLStyleSheetLibxslt.cpp: Added.
962
963 2009-09-28  Simon Hausmann  <simon.hausmann@nokia.com>
964
965         Prospective build fix for r48812.
966
967         Forgot to remove the inline reset() implementation when reverting the indentation
968         changes in the file.
969
970         * xml/XSLTProcessor.h:
971
972 2009-09-28  Pavel Feldman  <pfeldman@chromium.org>
973
974         Reviewed by nobody (trivial follow up fix), Joseph Pecoraro LGTM-ed.
975
976         Web Inspector: Follow up to r48809.
977         InspectorController.wrapObject should only be called on the inspectable page side.
978
979         https://bugs.webkit.org/show_bug.cgi?id=17429
980
981         * inspector/front-end/EventListenersSidebarPane.js:
982         (WebInspector.EventListenersSidebarPane.prototype.update.callback):
983         (WebInspector.EventListenersSidebarPane.prototype.update):
984         (WebInspector.EventListenersSection):
985         (WebInspector.EventListenersSection.prototype.update):
986         (WebInspector.EventListenerBar):
987         (WebInspector.EventListenerBar.prototype.update):
988
989 2009-09-28  Jakub Wieczorek  <faw217@gmail.com>
990
991         Reviewed by Simon Hausmann.
992
993         Move the libxslt specific part of XSLTProcessor to a separate file.
994         https://bugs.webkit.org/show_bug.cgi?id=28303
995
996         In preparation for adding XSLT support with QtXmlPatterns to the Qt
997         port, move the libxslt part of the XSLTProcessor implementation into
998         another file and leave the part that can be reused and shared.
999
1000         Additionally, fix some coding style issues.
1001
1002         * GNUmakefile.am:
1003         * WebCore.gypi:
1004         * WebCore.vcproj/WebCore.vcproj:
1005         * WebCore.xcodeproj/project.pbxproj:
1006         * WebCoreSources.bkl:
1007         * xml/XSLTProcessor.cpp:
1008         (WebCore::XSLTProcessor::createDocumentFromSource): Remove trailing whitespaces.
1009         (WebCore::createFragmentFromSource): Remove trailing whitespaces.
1010         (WebCore::XSLTProcessor::transformToFragment): Remove trailing whitespaces.
1011         (WebCore::XSLTProcessor::reset): Moved out of the class definition.
1012         * xml/XSLTProcessorLibxslt.cpp: Added.
1013         (WebCore::XSLTProcessor::genericErrorFunc): Moved.
1014         (WebCore::XSLTProcessor::parseErrorFunc): Moved.
1015         (WebCore::docLoaderFunc): Moved.
1016         (WebCore::setXSLTLoadCallBack): Moved.
1017         (WebCore::writeToVector): Moved.
1018         (WebCore::saveResultToString): Moved.
1019         (WebCore::xsltParamArrayFromParameterMap): Moved.
1020         (WebCore::freeXsltParamArray): Moved.
1021         (WebCore::xsltStylesheetPointer): Moved.
1022         (WebCore::xmlDocPtrFromNode): Moved.
1023         (WebCore::resultMIMEType): Moved.
1024         (WebCore::XSLTProcessor::transformToString): Moved.
1025
1026 2009-09-28  Charles Wei  <charles.wei@torchmobile.com.cn>
1027
1028         Reviewed by Nikolas Zimmermann.
1029
1030         Fix the crash of SVG that crashes when use a non-exist symbol
1031         https://bugs.webkit.org/show_bug.cgi?id=27693
1032
1033         Test: svg/custom/use-non-existing-symbol-crash.svg
1034
1035         * svg/SVGUseElement.cpp:
1036         (WebCore::shadowTreeContainsChangedNodes):
1037
1038 2009-09-28  Joseph Pecoraro  <joepeck@webkit.org>
1039
1040         Reviewed by Timothy Hatcher.
1041
1042         Inspector Should Show Event Listeners/Handlers Registered on each Node
1043         https://bugs.webkit.org/show_bug.cgi?id=17429
1044         
1045           Extracted a method from dispatchEvent to get the event ancestor chain
1046         
1047         * dom/Node.cpp:
1048         (WebCore::Node::eventAncestors): the extracted method
1049         (WebCore::Node::dispatchGenericEvent): use eventAncestors
1050         * dom/Node.h:
1051
1052           Asynchronous Flow For the Inspector, Backend -> DOM Agent -> Frontend
1053           The DOMAgent's getEventListenersForNode handles the logic of finding
1054           all the relevant listeners in the event flow.
1055
1056         * inspector/InspectorBackend.cpp:
1057         (WebCore::InspectorBackend::getEventListenersForNode):
1058         * inspector/InspectorBackend.h:
1059         * inspector/InspectorBackend.idl:
1060         * inspector/InspectorDOMAgent.cpp:
1061         (WebCore::InspectorDOMAgent::getEventListenersForNode):
1062         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
1063         (WebCore::InspectorDOMAgent::buildObjectForNode): added localName
1064         * inspector/InspectorDOMAgent.h:
1065         (WebCore::EventListenerInfo::EventListenerInfo):
1066         * inspector/InspectorFrontend.cpp:
1067         (WebCore::InspectorFrontend::didGetEventListenersForNode):
1068         * inspector/InspectorFrontend.h:
1069         (WebCore::InspectorFrontend::scriptState):
1070         * inspector/front-end/DOMAgent.js: added localName to WebInspector.DOMNode from payload
1071         (WebInspector.EventListeners.getEventListenersForNodeAsync.mycallback):
1072         (WebInspector.EventListeners.getEventListenersForNodeAsync):
1073
1074           New Sidebar Pane in the Element's Panel
1075           Includes Gear Menu for filtering the Event Listeners on the
1076           "Selected Node Only" or "All Nodes"
1077
1078         * inspector/front-end/ElementsPanel.js: Handles refreshing the Pane when necessary
1079         (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
1080         (WebInspector.ElementsPanel):
1081         (WebInspector.ElementsPanel.prototype.updateEventListeners):
1082         * inspector/front-end/EventListenersSidebarPane.js: Added. 
1083         (WebInspector.EventListenersSidebarPane): The 1st level in the Pane
1084         (WebInspector.EventListenersSidebarPane.prototype.update.callback):
1085         (WebInspector.EventListenersSidebarPane.prototype.update):
1086         (WebInspector.EventListenersSection): The 2nd level in the Pane
1087         (WebInspector.EventListenersSection.prototype.update): filters on Preference
1088         (WebInspector.EventListenersSection.prototype.addListener):
1089         (WebInspector.EventListenerBar): The 3rd level in the Pane
1090         (WebInspector.EventListenerBar.prototype._getNodeDisplayName):
1091         (WebInspector.EventListenerBar.prototype._getFunctionDisplayName):
1092         (WebInspector.EventListenersSidebarPane.prototype._changeSetting): For the Gear Menu
1093         
1094           Consolidated "appropriateSelectorForNode"
1095
1096         * inspector/front-end/StylesSidebarPane.js:
1097         * inspector/front-end/utilities.js:
1098
1099           Miscellaneous Updates
1100
1101         * English.lproj/localizedStrings.js: "Event Listeners", "No Event Listeners", "Selected Node Only", "All Nodes"
1102         * WebCore.gypi: included the new inspector files
1103         * WebCore.vcproj/WebCore.vcproj: included source files that were missing
1104         * inspector/front-end/Images/grayConnectorPoint.png: Added. Thanks to Timothy Hatcher.
1105         * inspector/front-end/Images/whiteConnectorPoint.png: Added. Thanks to Timothy Hatcher.
1106         * inspector/front-end/inspector.js: Preferences for the Gear Menu Event Listeners filter
1107         * inspector/front-end/inspector.css: reused as much as possible
1108         * inspector/front-end/inspector.html: include the new script
1109         * inspector/front-end/WebKit.qrc: included the new inspector files
1110
1111 2009-09-27  Sam Weinig  <sam@webkit.org>
1112
1113         Reviewed by Dan Bernstein.
1114
1115         Fix for https://bugs.webkit.org/show_bug.cgi?id=29760
1116         Implement CSSOM Range.getClientRects/getBoundingClientRect 
1117
1118         Tests: fast/dom/Range/getBoundingClientRect-getClientRects-relative-to-viewport.html
1119                fast/dom/Range/getBoundingClientRect.html
1120                fast/dom/Range/getClientRects.html
1121
1122         * dom/Range.cpp:
1123         (WebCore::Range::getClientRects):
1124         (WebCore::Range::getBoundingClientRect):
1125         (WebCore::adjustFloatQuadsForScrollAndAbsoluteZoom):
1126         (WebCore::Range::getBorderAndTextQuads):
1127         * dom/Range.h:
1128         * dom/Range.idl:
1129         Implement Range.getClientRects/getBoundingClientRect.
1130
1131         * dom/Element.cpp:
1132         * rendering/RenderObject.h: 
1133         (WebCore::adjustForAbsoluteZoom):
1134         (WebCore::adjustIntRectForAbsoluteZoom):
1135         (WebCore::adjustFloatPointForAbsoluteZoom):
1136         (WebCore::adjustFloatQuadForAbsoluteZoom):
1137         Move point/quad adjustment methods from Element.cpp to RenderObject.h
1138         so that Range.cpp can use them as well.
1139
1140 2009-09-27  Simon Hausmann  <hausmann@webkit.org>
1141
1142         Unreviewed fix for WebInspector with Qt build.
1143
1144         Simply re-generate the Qt resource file by running
1145         WebKitTools/Scripts/generate-qt-inspector-resource
1146
1147         * inspector/front-end/WebKit.qrc:
1148
1149 2009-09-27  Pavel Feldman  <pfeldman@chromium.org>
1150
1151         Reviewed by nobody (trivial ChangeLog fix).
1152
1153         Restore WebCore/ChangeLog truncated in r48778.
1154
1155 2009-09-27  Pavel Feldman  <pfeldman@chromium.org>
1156
1157         Reviewed by Timothy Hatcher.
1158
1159         Web Inspector: DOM store is being unbound twice, leading to assertion failure.
1160
1161         https://bugs.webkit.org/show_bug.cgi?id=29770
1162
1163         * inspector/InspectorController.cpp:
1164         (WebCore::InspectorController::didOpenDatabase):
1165         (WebCore::InspectorController::didUseDOMStorage):
1166         * inspector/InspectorDOMStorageResource.cpp:
1167         (WebCore::InspectorDOMStorageResource::unbind):
1168
1169 2009-09-26  Pavel Feldman  <pfeldman@chromium.org>
1170
1171         Reviewed by Timothy Hatcher.
1172
1173         Web Inspector: Do not track DOM changes while inspector window is closed.
1174
1175         https://bugs.webkit.org/show_bug.cgi?id=29769
1176
1177         * inspector/InspectorController.cpp:
1178         (WebCore::InspectorController::inspectedWindowScriptObjectCleared):
1179         (WebCore::InspectorController::populateScriptObjects):
1180         (WebCore::InspectorController::resetScriptObjects):
1181         (WebCore::InspectorController::didCommitLoad):
1182         * inspector/InspectorController.h:
1183         * inspector/InspectorDOMAgent.cpp:
1184         (WebCore::InspectorDOMAgent::setDocument):
1185         * inspector/InspectorDOMAgent.h:
1186         * loader/FrameLoader.cpp:
1187         (WebCore::FrameLoader::dispatchWindowObjectAvailable):
1188         * page/android/InspectorControllerAndroid.cpp:
1189         (WebCore::InspectorController::inspectedWindowScriptObjectCleared):
1190
1191 2009-09-26  Pavel Feldman  <pfeldman@chromium.org>
1192
1193         Reviewed by Timothy Hatcher.
1194
1195         Web Inspector: [REGRESSION] Double Clicking Resources Fails to Open in New Window
1196
1197         https://bugs.webkit.org/show_bug.cgi?id=29762
1198
1199         * inspector/front-end/InjectedScript.js:
1200         (InjectedScript.setStyleText):
1201         (InjectedScript.openInInspectedWindow):
1202         * inspector/front-end/InjectedScriptAccess.js:
1203         * inspector/front-end/ResourcesPanel.js:
1204         (WebInspector.ResourceSidebarTreeElement.prototype.ondblclick):
1205
1206 2009-09-26  David Kilzer  <ddkilzer@apple.com>
1207
1208         Part 2 of 2: <http://webkit.org/b/29753> DerivedSources.make broken for non-Mac targets
1209
1210         Reviewed by Darin Adler.
1211
1212         Fix ENABLE_ORIENTATION_EVENTS for non-Mac platforms.
1213
1214         * DerivedSources.make: Moved Platform.h check for
1215         ENABLE_ORIENTATION_EVENTS into Mac-only section and added
1216         default of ENABLE_ORIENTATION_EVENTS = 0 to non-Mac section.
1217         Added ifndef test to make it possible to override both
1218         ENABLE_DASHBOARD_SUPPORT and ENABLE_ORIENTATION_EVENTS external
1219         to the makefile.  Moved addition of ENABLE_ORIENTATION_EVENTS to
1220         ADDITIONAL_IDL_DEFINES to common section.
1221         * GNUmakefile.am: Added support for ENABLE_ORIENTATION_EVENTS if
1222         it is ever used.
1223         * WebCore.pro: Ditto.
1224
1225 2009-09-26  Kent Tamura  <tkent@chromium.org>
1226
1227         Reviewed by David Kilzer.
1228
1229         Move placeholder-related code to HTMLTextFormControlElement from
1230         HTMLInputElement, WMLInputElement, InputElement, and
1231         HTMLTextAreaElement.
1232         https://bugs.webkit.org/show_bug.cgi?id=28703
1233
1234         * dom/InputElement.cpp:
1235         (WebCore::InputElement::dispatchFocusEvent):
1236         (WebCore::InputElement::dispatchBlurEvent):
1237         (WebCore::InputElement::setValueFromRenderer):
1238         * dom/InputElement.h:
1239         * html/HTMLFormControlElement.cpp:
1240         (WebCore::HTMLTextFormControlElement::HTMLTextFormControlElement):
1241         (WebCore::HTMLTextFormControlElement::~HTMLTextFormControlElement):
1242         (WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
1243         (WebCore::HTMLTextFormControlElement::dispatchBlurEvent):
1244         (WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible):
1245         (WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility):
1246         * html/HTMLFormControlElement.h:
1247         (WebCore::HTMLTextFormControlElement::handleFocusEvent):
1248         (WebCore::HTMLTextFormControlElement::handleBlurEvent):
1249         * html/HTMLInputElement.cpp:
1250         (WebCore::HTMLInputElement::HTMLInputElement):
1251         (WebCore::HTMLInputElement::handleFocusEvent):
1252         (WebCore::HTMLInputElement::handleBlurEvent):
1253         (WebCore::HTMLInputElement::parseMappedAttribute):
1254         (WebCore::HTMLInputElement::createRenderer):
1255         (WebCore::HTMLInputElement::setValue):
1256         (WebCore::HTMLInputElement::setValueFromRenderer):
1257         * html/HTMLInputElement.h:
1258         (WebCore::HTMLInputElement::supportsPlaceholder):
1259         (WebCore::HTMLInputElement::isEmptyValue):
1260         * html/HTMLIsIndexElement.cpp:
1261         (WebCore::HTMLIsIndexElement::parseMappedAttribute):
1262         * html/HTMLTextAreaElement.cpp:
1263         (WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
1264         (WebCore::HTMLTextAreaElement::createRenderer):
1265         * html/HTMLTextAreaElement.h:
1266         (WebCore::HTMLTextAreaElement::supportsPlaceholder):
1267         (WebCore::HTMLTextAreaElement::isEmptyValue):
1268         * rendering/RenderTextControl.cpp:
1269         (WebCore::RenderTextControl::RenderTextControl):
1270         * rendering/RenderTextControl.h:
1271         * rendering/RenderTextControlMultiLine.cpp:
1272         (WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine):
1273         * rendering/RenderTextControlMultiLine.h:
1274         * rendering/RenderTextControlSingleLine.cpp:
1275         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
1276         (WebCore::RenderTextControlSingleLine::updateFromElement):
1277         * rendering/RenderTextControlSingleLine.h:
1278         * wml/WMLInputElement.cpp:
1279         (WebCore::WMLInputElement::setValue):
1280         (WebCore::WMLInputElement::createRenderer):
1281         * wml/WMLInputElement.h:
1282
1283 2009-09-26  Shu Chang  <Chang.Shu@nokia.com>
1284
1285         Reviewed by Alexey Proskuryakov.
1286
1287         Optimize the code so only the text from start to end is scanned.
1288         https://bugs.webkit.org/show_bug.cgi?id=29092
1289
1290         On a platform with webkit+Qt+Symbian, the parsing time for a 600K text
1291         file improved from 400ms to 40ms (10x faster).
1292
1293         * dom/Text.cpp:
1294         (WebCore::Text::createWithLengthLimit):
1295
1296 2009-09-26  Xiaomei Ji  <xji@chromium.org>
1297
1298         Reviewed by Eric Seidel.
1299
1300         This Patch fixes [chromium] the drop-down is always left-aligned even
1301         for RTL element.
1302         https://bugs.webkit.org/show_bug.cgi?id=29612
1303
1304         For auto-complete, the items in drop-down should be right-aligned if
1305         the directionality of <input> field is RTL.
1306         For <select><option>, the items in drop-down should be right-aligned
1307         if the directionality of <select> is RTL.
1308
1309         No automatic test is possible. Manual tests are added.
1310
1311         * manual-tests/autofill_alignment.html: Added.
1312         * manual-tests/select_alignment.html: Added.
1313         * platform/chromium/PopupMenuChromium.cpp:
1314         (WebCore::PopupListBox::paintRow): Adjust the starting x-axis of text to
1315         be paint if it should be right-aligned.
1316
1317 2009-09-25  Dan Bernstein  <mitz@apple.com>
1318
1319         Reviewed by Sam Weinig.
1320
1321         REGRESSION (r48775) FontList.plist written by TOT WebKit causes Safari 4
1322         to crash on launch
1323         https://bugs.webkit.org/show_bug.cgi?id=29759
1324
1325         * platform/graphics/win/FontDatabase.cpp:
1326         (WebCore::writeFontDatabaseToPlist): Reverted to saving the CG font DB
1327         property list at the root of FontList.plist, but with an additional
1328         key for the last value of the Fonts registry key.
1329         (WebCore::populateFontDatabase): Pass the FontList.plist in its entirety
1330         to populatFontDatabaseFromPlist.
1331
1332 2009-09-25  Kevin Ollivier  <kevino@theolliviers.com>
1333
1334         Build fix. Adding missing header files.
1335
1336         * bindings/js/JSNamedNodeMapCustom.cpp:
1337
1338 2009-09-25  David Kilzer  <ddkilzer@apple.com>
1339
1340         Part 1 of 2: <http://webkit.org/b/29753> DerivedSources.make broken for non-Mac targets
1341
1342         Reviewed by Darin Adler.
1343
1344         * DerivedSources.make: Move tests for ENABLE_CONTEXT_MENUS,
1345         ENABLE_DRAG_SUPPORT and ENABLE_INSPECTOR into Mac-only section.
1346
1347 2009-09-25  Adam Barth  <abarth@webkit.org>
1348
1349         Reviewed by Darin Adler.
1350
1351         Load blocks during unload should not affect targeted loads
1352         https://bugs.webkit.org/show_bug.cgi?id=29747
1353
1354         Move the check of the unload state after checking for targeted links.
1355
1356         Test: fast/loader/unload-hyperlink-targeted.html
1357
1358         * loader/FrameLoader.cpp:
1359         (WebCore::FrameLoader::loadURL):
1360
1361 2009-09-25  Kenneth Russell  <kbr@google.com>
1362
1363         Reviewed by Dimitri Glazkov.
1364
1365         [Chromium] Add initial V8 bindings for WebGL
1366         https://bugs.webkit.org/show_bug.cgi?id=29664
1367
1368         * WebCore.gypi:
1369         * bindings/scripts/CodeGeneratorV8.pm:
1370         * bindings/v8/DOMObjectsInclude.h:
1371         * bindings/v8/DerivedSourcesAllInOne.cpp:
1372         * bindings/v8/V8DOMWrapper.cpp:
1373         (WebCore::V8DOMWrapper::getTemplate):
1374         * bindings/v8/V8Index.cpp:
1375         * bindings/v8/V8Index.h:
1376         * bindings/v8/custom/V8CanvasArrayBufferCustom.cpp: Added.
1377         (WebCore::CALLBACK_FUNC_DECL):
1378         * bindings/v8/custom/V8CanvasArrayCustom.h: Added.
1379         (WebCore::constructCanvasArray):
1380         * bindings/v8/custom/V8CanvasByteArrayCustom.cpp: Added.
1381         (WebCore::CALLBACK_FUNC_DECL):
1382         (WebCore::INDEXED_PROPERTY_GETTER):
1383         (WebCore::INDEXED_PROPERTY_SETTER):
1384         * bindings/v8/custom/V8CanvasFloatArrayCustom.cpp: Added.
1385         (WebCore::CALLBACK_FUNC_DECL):
1386         (WebCore::INDEXED_PROPERTY_GETTER):
1387         (WebCore::INDEXED_PROPERTY_SETTER):
1388         * bindings/v8/custom/V8CanvasIntArrayCustom.cpp: Added.
1389         (WebCore::CALLBACK_FUNC_DECL):
1390         (WebCore::INDEXED_PROPERTY_GETTER):
1391         (WebCore::INDEXED_PROPERTY_SETTER):
1392         * bindings/v8/custom/V8CanvasRenderingContext3DCustom.cpp: Added.
1393         (WebCore::jsArrayToFloatArray):
1394         (WebCore::jsArrayToIntArray):
1395         (WebCore::CALLBACK_FUNC_DECL):
1396         (WebCore::):
1397         (WebCore::vertexAttribAndUniformHelperf):
1398         (WebCore::uniformHelperi):
1399         (WebCore::uniformMatrixHelper):
1400         * bindings/v8/custom/V8CanvasShortArrayCustom.cpp: Added.
1401         (WebCore::CALLBACK_FUNC_DECL):
1402         (WebCore::INDEXED_PROPERTY_GETTER):
1403         (WebCore::INDEXED_PROPERTY_SETTER):
1404         * bindings/v8/custom/V8CanvasUnsignedByteArrayCustom.cpp: Added.
1405         (WebCore::CALLBACK_FUNC_DECL):
1406         (WebCore::INDEXED_PROPERTY_GETTER):
1407         (WebCore::INDEXED_PROPERTY_SETTER):
1408         * bindings/v8/custom/V8CanvasUnsignedIntArrayCustom.cpp: Added.
1409         (WebCore::CALLBACK_FUNC_DECL):
1410         (WebCore::INDEXED_PROPERTY_GETTER):
1411         (WebCore::INDEXED_PROPERTY_SETTER):
1412         * bindings/v8/custom/V8CanvasUnsignedShortArrayCustom.cpp: Added.
1413         (WebCore::CALLBACK_FUNC_DECL):
1414         (WebCore::INDEXED_PROPERTY_GETTER):
1415         (WebCore::INDEXED_PROPERTY_SETTER):
1416         * bindings/v8/custom/V8CustomBinding.h:
1417         * bindings/v8/custom/V8DocumentCustom.cpp:
1418         (WebCore::CALLBACK_FUNC_DECL):
1419         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
1420         (WebCore::CALLBACK_FUNC_DECL):
1421         * platform/graphics/GraphicsContext3D.h:
1422
1423 2009-09-25  Jeremy Orlow  <jorlow@chromium.org>
1424
1425         This is breaking Chromium try bots, so I'm counting this as a build fix.
1426
1427         Add more svn:ignore exceptions.  On different platforms, these files are
1428         generated with different case for WebCore.
1429
1430         * WebCore.gyp: Changed property svn:ignore.
1431
1432 2009-09-25  Alexey Proskuryakov  <ap@apple.com>
1433
1434         Reverting r48767, as it broke Windows build in a non-trivial way.
1435
1436         * bindings/js/JSAbstractWorkerCustom.cpp:
1437         (WebCore::JSAbstractWorker::addEventListener):
1438         (WebCore::JSAbstractWorker::removeEventListener):
1439         * bindings/js/JSDOMApplicationCacheCustom.cpp:
1440         (WebCore::JSDOMApplicationCache::addEventListener):
1441         (WebCore::JSDOMApplicationCache::removeEventListener):
1442         * bindings/js/JSDOMGlobalObject.cpp:
1443         (WebCore::JSDOMGlobalObject::createJSAttributeEventListener):
1444         * bindings/js/JSDOMWindowCustom.cpp:
1445         (WebCore::JSDOMWindow::addEventListener):
1446         (WebCore::JSDOMWindow::removeEventListener):
1447         * bindings/js/JSEventListener.cpp:
1448         (WebCore::JSEventListener::JSEventListener):
1449         (WebCore::JSEventListener::jsFunction):
1450         (WebCore::JSEventListener::markJSFunction):
1451         (WebCore::JSEventListener::handleEvent):
1452         (WebCore::JSEventListener::reportError):
1453         * bindings/js/JSEventListener.h:
1454         (WebCore::JSEventListener::create):
1455         * bindings/js/JSEventSourceCustom.cpp:
1456         (WebCore::JSEventSource::addEventListener):
1457         (WebCore::JSEventSource::removeEventListener):
1458         * bindings/js/JSLazyEventListener.cpp:
1459         (WebCore::JSLazyEventListener::JSLazyEventListener):
1460         (WebCore::JSLazyEventListener::jsFunction):
1461         (WebCore::JSLazyEventListener::parseCode):
1462         * bindings/js/JSLazyEventListener.h:
1463         (WebCore::JSLazyEventListener::create):
1464         * bindings/js/JSMessagePortCustom.cpp:
1465         (WebCore::JSMessagePort::addEventListener):
1466         (WebCore::JSMessagePort::removeEventListener):
1467         * bindings/js/JSNodeCustom.cpp:
1468         (WebCore::JSNode::addEventListener):
1469         (WebCore::JSNode::removeEventListener):
1470         * bindings/js/JSSVGElementInstanceCustom.cpp:
1471         (WebCore::JSSVGElementInstance::addEventListener):
1472         (WebCore::JSSVGElementInstance::removeEventListener):
1473         * bindings/js/JSWorkerContextCustom.cpp:
1474         (WebCore::JSWorkerContext::addEventListener):
1475         (WebCore::JSWorkerContext::removeEventListener):
1476         * bindings/js/JSXMLHttpRequestCustom.cpp:
1477         (WebCore::JSXMLHttpRequest::addEventListener):
1478         (WebCore::JSXMLHttpRequest::removeEventListener):
1479         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
1480         (WebCore::JSXMLHttpRequestUpload::addEventListener):
1481         (WebCore::JSXMLHttpRequestUpload::removeEventListener):
1482         * bindings/js/ScriptEventListener.cpp:
1483         (WebCore::createAttributeEventListener):
1484         * bindings/objc/ObjCEventListener.h:
1485         * bindings/objc/ObjCEventListener.mm:
1486         (WebCore::ObjCEventListener::handleEvent):
1487         * bindings/scripts/CodeGeneratorJS.pm:
1488         * dom/EventListener.h:
1489         (WebCore::EventListener::reportError):
1490         (WebCore::EventListener::jsFunction):
1491         * dom/EventTarget.cpp:
1492         (WebCore::EventTarget::fireEventListeners):
1493         * inspector/InspectorDOMAgent.cpp:
1494         (WebCore::InspectorDOMAgent::handleEvent):
1495         * inspector/InspectorDOMAgent.h:
1496         * inspector/InspectorDOMStorageResource.cpp:
1497         (WebCore::InspectorDOMStorageResource::handleEvent):
1498         * inspector/InspectorDOMStorageResource.h:
1499         * loader/ImageDocument.cpp:
1500         (WebCore::ImageEventListener::handleEvent):
1501         * svg/animation/SVGSMILElement.cpp:
1502         (WebCore::ConditionEventListener::handleEvent):
1503         * workers/WorkerContext.cpp:
1504         (WebCore::WorkerContext::reportException):
1505
1506 2009-09-24  Tony Chang  <tony@chromium.org>
1507
1508         Reviewed by David Levin.
1509
1510         Add a gyp variable to allow building a debug webcore without debug
1511         symbols.  This allows for faster compile, link, and gdb times.
1512
1513         https://bugs.webkit.org/show_bug.cgi?id=29721
1514
1515         No new tests, build config change.
1516
1517         * WebCore.gyp/WebCore.gyp:
1518
1519 2009-09-25  Darin Fisher  <darin@chromium.org>
1520
1521         Reviewed by Dimitri Glazkov.
1522
1523         Declare RegisteredEventListener as a class instead of a struct.
1524         This fixes a warning in the Chromium build.
1525
1526         * dom/RegisteredEventListener.h:
1527
1528 2009-09-25  Dan Bernstein  <mitz@apple.com>
1529
1530         Reviewed by Jon Honeycutt.
1531
1532         WebCore part of
1533         <rdar://problem/7211635> 2 byte characters are displayed as garbaged
1534         <rdar://problem/7212626> garbled/gibberish text (off-by-one)
1535
1536         When the Windows Fonts directory contains more than one font file for a
1537         given font name, which of the fonts gets assigned to the name in the
1538         Core Graphics font database was determined arbitrarily and did not
1539         always match the font GDI used for the same font name. The mismatch
1540         caused character-to-glyph mapping to use one font and glyph rendering to
1541         use another.
1542
1543         The fix is to update the Core Graphics font database from the registry
1544         entries (that reflect the name-to-font mapping that GDI uses) after
1545         populating it with the result of scanning the Fonts directory. As a
1546         consequence, the directory needs to be scanned at startup every time the
1547         registry key changes, so the last value of the registry key is kept
1548         in the property list on disk so that it could be compared to the current
1549         value on startup.
1550
1551         * platform/graphics/win/FontDatabase.cpp:
1552         (WebCore::populateFontDatabaseFromPlist): Now takes a property list as
1553         a parameter and avoids round-tripping through XML by calling
1554         wkAddFontsFromPlist() instead of wkAddFontsFromPlistRepresentation().
1555         (WebCore::fontFilenamesFromRegistryKey):
1556         (WebCore::cgFontDBKey):
1557         (WebCore::writeFontDatabaseToPlist): Now takes the CG font DB property
1558         list and a property list with the font filenames from the registry and
1559         writes a dictionary with those property lists as values.
1560         (WebCore::fontFilenamesFromRegistry): Added. Returns an array with the
1561         values in the HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts
1562         registry key.
1563         (WebCore::populateFontDatabase): Changed to read the contents of the
1564         Fonts registry key and compare it with the last-saved value from the
1565         property list, and to call wkAddFontsFromRegistry() after populating the
1566         CG font DB from the file system. Uses wkCreateFontsPlist() instead of
1567         wkCreateFontsPlistRepresentation() to avoid round-tripping through XML.
1568
1569 2009-09-25  Geoffrey Garen  <ggaren@apple.com>
1570
1571         Reviewed by Darin Adler.
1572
1573         Inlined some object creation code, including lexicalGlobalObject access
1574         https://bugs.webkit.org/show_bug.cgi?id=29750
1575
1576         * bindings/js/JSInspectorBackendCustom.cpp:
1577         (WebCore::JSInspectorBackend::currentCallFrame):
1578         * inspector/JavaScriptDebugServer.cpp:
1579         (WebCore::JavaScriptDebugServer::hasBreakpoint): Updated for JavaScriptCore
1580         API changes.
1581
1582 2009-09-25  Dave Hyatt  <hyatt@apple.com>
1583
1584         Reviewed by Anders Carlsson.
1585
1586         https://bugs.webkit.org/show_bug.cgi?id=24399
1587         Make @import work in user stylesheets.  The first bug was that the URL wasn't being set on the
1588         user sheets themselves, so relative @import URLs couldn't resolve properly.  The second bug
1589         was that the loads would be denied.  This is fixed by using the requestUserCSSStyleSheet method
1590         instead of the normal request method.  In order to know when to do this, CSSStyleSheets now have
1591         a propagated boolean, m_isUserStyleSheet, that lets them know if they are user stylesheets or not.
1592
1593         * css/CSSImportRule.cpp:
1594         (WebCore::CSSImportRule::insertedIntoParent):
1595         * css/CSSStyleSheet.cpp:
1596         (WebCore::CSSStyleSheet::CSSStyleSheet):
1597         * css/CSSStyleSheet.h:
1598         (WebCore::CSSStyleSheet::setIsUserStyleSheet):
1599         (WebCore::CSSStyleSheet::isUserStyleSheet):
1600         * dom/Document.cpp:
1601         (WebCore::Document::pageUserSheet):
1602         (WebCore::Document::pageGroupUserSheets):
1603
1604 2009-09-25  Simon Fraser  <simon.fraser@apple.com>
1605
1606         Reviewed by Darin Adler.
1607
1608         ASSERTION FAILED: !repaintContainer || repaintContainer == this
1609         https://bugs.webkit.org/show_bug.cgi?id=29755
1610         
1611         It's possible for RenderObject::container() to return an object that is higher
1612         in the hierarchy than the repaintContainer that is being used to repaint an
1613         object. For example, this can happen when running an accelerated opacity
1614         transition on an element with a position:absolute parent, and a position:absolute child.
1615         
1616         In this case we need to detect when RenderObject::container() will skip over
1617         repaintContainer, and in that case adjust the coords to shift into repaintContainer's space.
1618
1619         Test: compositing/repaint/opacity-between-absolute.html
1620
1621         * rendering/RenderBox.cpp:
1622         (WebCore::RenderBox::mapLocalToContainer):
1623         (WebCore::RenderBox::computeRectForRepaint):
1624         * rendering/RenderInline.cpp:
1625         (WebCore::RenderInline::computeRectForRepaint):
1626         * rendering/RenderObject.cpp:
1627         (WebCore::RenderObject::container):
1628         * rendering/RenderObject.h:
1629
1630 2009-09-25  Simon Fraser  <simon.fraser@apple.com>
1631
1632         Reviewed by Darin Adler.
1633
1634         Crash with hardware accelerated rotation of a PDF image in a data URL
1635         <rdar://problem/7250378>
1636         
1637         PDF images don't return a color space from CGImageGetColorSpace(),
1638         so we need to null-check the return value before use.
1639
1640         Test: compositing/color-matching/pdf-image-match.html
1641
1642         * platform/graphics/mac/GraphicsLayerCA.mm:
1643         (WebCore::GraphicsLayerCA::setContentsToImage):
1644
1645 2009-09-25  Darin Adler  <darin@apple.com>
1646
1647         Reviewed by Geoffrey Garen.
1648
1649         Null-deref when first access to an Attr node is after its Element is destroyed
1650         https://bugs.webkit.org/show_bug.cgi?id=29748
1651
1652         Test: fast/dom/Attr/access-after-element-destruction.html
1653
1654         * bindings/js/JSAttrCustom.cpp:
1655         (WebCore::JSAttr::markChildren): Added. Keeps the ownerElement alive as
1656         long as the Attr is alive.
1657
1658         * bindings/js/JSNamedNodeMapCustom.cpp:
1659         (WebCore::JSNamedNodeMap::markChildren): Added. Keeps the Element alive as
1660         long as the NamedNodeMap is alive.
1661
1662         * dom/Attr.idl: Added CustomMarkFunction attribute.
1663
1664         * dom/NamedAttrMap.cpp:
1665         (WebCore::NamedNodeMap::getAttributeItem): Tweaked formatting.
1666         (WebCore::NamedNodeMap::detachFromElement): Call clearAttributes so we don't
1667         have attributes hanging around that might need an Attr node created; that way
1668         we won't crash with a null-dereference trying to deal with one of them. This
1669         can't happen when working with JavaScript since the Element will be kept
1670         alive due to the change above.
1671         (WebCore::NamedNodeMap::addAttribute): Fix function name in comment.
1672         (WebCore::NamedNodeMap::removeAttribute): Removed unneeded "+ 1" and added
1673         missing braces.
1674
1675         * dom/NamedAttrMap.h: Made the element function public so it can be used by
1676         the JavaScript binding to keep the Element alive.
1677
1678         * dom/NamedNodeMap.idl: Added CustomMarkFunction attribute.
1679
1680 2009-09-24  Alexey Proskuryakov  <ap@apple.com>
1681
1682         Reviewed by Darin Adler and Sam Weinig.
1683
1684         Onclick not fired for an element copied with cloneContents() or cloneNode()
1685         https://bugs.webkit.org/show_bug.cgi?id=25130
1686
1687         The change here is that JS event listeners don't keep a reference to a global object from
1688         where they were created, and instead take it as a parameter when parsing source code. Also,
1689         the listener creation won't fail just because it happens for an element in a frameless
1690         document.
1691         Thus, moving nodes between documents no longer results in having incorrect registered
1692         lazy event listeners on them.
1693
1694         Tests: fast/events/attribute-listener-cloned-from-frameless-doc-context-2.html
1695                fast/events/attribute-listener-cloned-from-frameless-doc-context.html
1696                fast/events/attribute-listener-cloned-from-frameless-doc.xhtml
1697                fast/events/attribute-listener-extracted-from-frameless-doc-context-2.html
1698                fast/events/attribute-listener-extracted-from-frameless-doc-context.html
1699
1700         * bindings/js/JSEventListener.cpp:
1701         (WebCore::JSEventListener::JSEventListener): Don't take a reference to JSDOMGlobalObject.
1702         (WebCore::JSEventListener::jsFunction): Take ScriptExecutionContext as a parameter for
1703         getting to JSDOMGlobalObject. It's not used in base class, but is in JSLazyEventListner.
1704         (WebCore::JSEventListener::markJSFunction): Don't mark the global object.
1705         (WebCore::JSEventListener::handleEvent): Get global object from ScriptExecutionContext.
1706         (WebCore::JSEventListener::reportError): Ditto.
1707
1708         * bindings/js/JSEventListener.h: (WebCore::JSEventListener::create): Don't keep a reference
1709         to JSDOMGlobalObject.
1710
1711         * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::parseCode): Listener
1712         creation was split between this function and ScriptEventListener; moved it here, as JS
1713         global object can be different now.
1714
1715         * bindings/js/JSLazyEventListener.h: (WebCore::JSLazyEventListener::create): Keep source URL,
1716         which can not be determined at parsing time.
1717
1718         * bindings/js/ScriptEventListener.cpp: (WebCore::createAttributeEventListener): Moved code
1719         for listener creation to JSLazyEventListener. XSSAuditor code remains here, because tests
1720         expect that errors are logged at document parsing time, and because I don't know what other
1721         side effects moving it vould have.
1722
1723         * dom/EventListener.h: handleEvent() and reportError() now take ScriptExecutionContext,
1724         because JSC needs a global context here.
1725
1726         * bindings/js/JSAbstractWorkerCustom.cpp:
1727         (WebCore::JSAbstractWorker::addEventListener):
1728         (WebCore::JSAbstractWorker::removeEventListener):
1729         * bindings/js/JSDOMApplicationCacheCustom.cpp:
1730         (WebCore::JSDOMApplicationCache::addEventListener):
1731         (WebCore::JSDOMApplicationCache::removeEventListener):
1732         * bindings/js/JSDOMGlobalObject.cpp:
1733         (WebCore::JSDOMGlobalObject::createJSAttributeEventListener):
1734         * bindings/js/JSDOMWindowCustom.cpp:
1735         (WebCore::JSDOMWindow::addEventListener):
1736         (WebCore::JSDOMWindow::removeEventListener):
1737         * bindings/js/JSEventSourceCustom.cpp:
1738         (WebCore::JSEventSource::addEventListener):
1739         (WebCore::JSEventSource::removeEventListener):
1740         * bindings/js/JSMessagePortCustom.cpp:
1741         (WebCore::JSMessagePort::addEventListener):
1742         (WebCore::JSMessagePort::removeEventListener):
1743         * bindings/js/JSNodeCustom.cpp:
1744         (WebCore::JSNode::addEventListener):
1745         (WebCore::JSNode::removeEventListener):
1746         * bindings/js/JSSVGElementInstanceCustom.cpp:
1747         (WebCore::JSSVGElementInstance::addEventListener):
1748         (WebCore::JSSVGElementInstance::removeEventListener):
1749         * bindings/js/JSWorkerContextCustom.cpp:
1750         (WebCore::JSWorkerContext::addEventListener):
1751         (WebCore::JSWorkerContext::removeEventListener):
1752         * bindings/js/JSXMLHttpRequestCustom.cpp:
1753         (WebCore::JSXMLHttpRequest::addEventListener):
1754         (WebCore::JSXMLHttpRequest::removeEventListener):
1755         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
1756         (WebCore::JSXMLHttpRequestUpload::addEventListener):
1757         (WebCore::JSXMLHttpRequestUpload::removeEventListener):
1758         * bindings/objc/ObjCEventListener.h:
1759         * bindings/objc/ObjCEventListener.mm:
1760         (WebCore::ObjCEventListener::handleEvent):
1761         * bindings/scripts/CodeGeneratorJS.pm:
1762         * dom/EventTarget.cpp:
1763         (WebCore::EventTarget::fireEventListeners):
1764         * inspector/InspectorDOMAgent.cpp:
1765         (WebCore::InspectorDOMAgent::handleEvent):
1766         * inspector/InspectorDOMAgent.h:
1767         * inspector/InspectorDOMStorageResource.cpp:
1768         (WebCore::InspectorDOMStorageResource::handleEvent):
1769         * inspector/InspectorDOMStorageResource.h:
1770         * loader/ImageDocument.cpp:
1771         (WebCore::ImageEventListener::handleEvent):
1772         * svg/animation/SVGSMILElement.cpp:
1773         (WebCore::ConditionEventListener::handleEvent):
1774         * workers/WorkerContext.cpp:
1775         (WebCore::WorkerContext::reportException):
1776         Don't pass global object to JSEventListener::create(), which no longer needs it.
1777         Note that some of these functions still have an early return for null global object, which
1778         can probably be removed in a later patch.
1779         Pass ScriptExecutionContext to EventListener methods that now need it.
1780
1781 2009-09-25  Enrica Casucci  <enrica@apple.com>
1782
1783         Reviewed by Darin Adler, Dan Bernstein, Adele Peterson, and others.
1784
1785         Fix for https://bugs.webkit.org/show_bug.cgi?id=29740
1786         <rdar://problem/7168738> Gmail: After changing a foreground text color, pressing return doesn't apply background to new line
1787
1788         Change the way style is preserved when inserting a new paragraph.
1789         The original code handled insertion at the beginning and at the end of a paragraph as special
1790         cases. The newly created paragraph contained a set of nodes generated starting from the
1791         computed style of the insertion node. This approach has two problems:
1792         1. if the insertion node has a non opaque background color and one of the parent element did have
1793         a solid background color the new paragraph did not have the element with the solid color in the tree.
1794         2. in some circumstances it generated more markup than the original paragraph had (a span with bold, italic,
1795         background color and some font attribute was being reproduced as span + bold + italic + font as separate tags.
1796         The new approach is to recreate in the new paragraph the same hierarchy of nodes found in the
1797         paragraph where the insertion point is.
1798
1799         Test: editing/inserting/insert-bg-font.html
1800
1801         * editing/InsertParagraphSeparatorCommand.cpp:
1802         (WebCore::InsertParagraphSeparatorCommand::getAncestorsInsideBlock): retrieves the list of all the ancestors
1803         between the insert node and the outer block.
1804         (WebCore::InsertParagraphSeparatorCommand::cloneHierarchyUnderNewBlock): uses the list of ancestors to recreate
1805         in the new paragraph the same element hierarchy present in the starting paragraph.
1806         (WebCore::InsertParagraphSeparatorCommand::doApply): changed the code to handle the general case of insertion
1807         in the middle of the paragraph to use the new methods. Changed the handling of the insertion at the beginning and
1808         at the end of the paragraph to use the new methods instead of applying the calculated style.
1809         * editing/InsertParagraphSeparatorCommand.h: added methods getAncestorsInsideBlock and cloneHierarchyUnderNewBlock.
1810
1811 2009-09-25  Patrick Mueller  <Patrick_Mueller@us.ibm.com>
1812
1813         Reviewed by Timothy Hatcher.
1814
1815         Content-type parameters not taken into account when building form-data
1816         https://bugs.webkit.org/show_bug.cgi?id=28970
1817
1818         existing manual test case extended with new tests
1819
1820         * English.lproj/localizedStrings.js:
1821         * inspector/front-end/ResourceView.js:
1822         (WebInspector.ResourceView.prototype._refreshFormData):
1823         (WebInspector.ResourceView.prototype._refreshParms):
1824         * manual-tests/inspector/display-form-data.html:
1825
1826 2009-09-25  Yuan Song  <song.yuan@ericsson.com>
1827
1828         Reviewed by Darin Adler.
1829
1830         https://bugs.webkit.org/show_bug.cgi?id=14566
1831
1832         Raise SECURITY_ERR exception if an attempt is made to change document.domain to an invalid value.
1833
1834         Test: fast/js/invalid-domain-change-throws-exception.html
1835
1836         * dom/Document.cpp:
1837         (WebCore::Document::setDomain):
1838         * dom/Document.h:
1839         * dom/Document.idl:
1840
1841 2009-09-25  Adam Barth  <abarth@webkit.org>
1842
1843         Reviewed by Dimitri Glazkov.
1844
1845         [V8] Teach ScheduledAction::execute about isolated worlds
1846         https://bugs.webkit.org/show_bug.cgi?id=27703
1847
1848         When setTimeout is called with a string argument in an isolated
1849         world, we now compile the string in the isolated world.
1850
1851         Last time we tried this change, we got a lot of crashes.  This
1852         time we're using a fresh local handle as our context to avoid
1853         trouble if the peristent handle gets disposed before we leave
1854         the context.
1855
1856         Test: fast/dom/timer-clear-interval-in-handler-and-generate-error.html
1857
1858         * bindings/v8/ScheduledAction.cpp:
1859         (WebCore::ScheduledAction::execute):
1860
1861 2009-09-25  Paul Godavari  <paul@chromium.org>
1862
1863         Reviewed by Darin Fisher.
1864
1865         Fix a regression in Mac Chromium popup menus, where the user's
1866         selection was ignored and the popup became unresponsive.
1867         https://bugs.webkit.org/show_bug.cgi?id=29726
1868
1869         The fix is to notify the popup's client that the popup was hidden,
1870         even if the popup has no parent.
1871
1872         * platform/chromium/PopupMenuChromium.cpp:
1873         (WebCore::PopupListBox::hidePopup):
1874
1875 2009-09-25  Alexander Pavlov  <apavlov@chromium.org>
1876
1877         Reviewed by Dan Bernstein.
1878
1879         Enable Pasteboard::writePlainText for Chromium and fix code style nits.
1880         https://bugs.webkit.org/show_bug.cgi?id=29734
1881
1882         * platform/chromium/PasteboardChromium.cpp:
1883         (WebCore::Pasteboard::writePlainText):
1884         * platform/gtk/PasteboardGtk.cpp:
1885         (WebCore::Pasteboard::writePlainText):
1886         (WebCore::Pasteboard::writeURL):
1887         * platform/mac/PasteboardMac.mm:
1888         (WebCore::Pasteboard::writeSelection):
1889         (WebCore::Pasteboard::writePlainText):
1890         (WebCore::Pasteboard::writeURL):
1891         * platform/qt/PasteboardQt.cpp:
1892         (WebCore::Pasteboard::writePlainText):
1893
1894 2009-09-25  Yongjun Zhang  <yongjun.zhang@nokia.com>
1895
1896         Reviewed by Ariya Hidayat.
1897
1898         https://bugs.webkit.org/show_bug.cgi?id=28876
1899         [Qt] reduce peak memory consumption of text decoding.
1900
1901         Chop large input buffer into small buffers to reduce peak memory
1902         during decoding.
1903
1904         * platform/text/qt/TextCodecQt.cpp:
1905         (WebCore::TextCodecQt::decode):
1906
1907 2009-09-24  Jon Honeycutt  <jhoneycutt@apple.com>
1908
1909         Add a mechanism for automatically halting plug-ins.
1910
1911         Reviewed by Oliver Hunt and Alice Liu.
1912
1913         * GNUmakefile.am:
1914
1915         * WebCore.base.exp:
1916         Update export of Page constructor.
1917
1918         * WebCore.gypi:
1919
1920         * WebCore.pro:
1921
1922         * WebCore.vcproj/WebCore.vcproj:
1923         Add PluginHalter.{h,cpp}, PluginHalterClient.h, and
1924         HaltablePlugin.h.
1925
1926         * WebCore.xcodeproj/project.pbxproj:
1927         Add files to Mac project.
1928
1929         * loader/EmptyClients.h:
1930         Added an empty PluginHalterClient.
1931         (WebCore::EmptyPluginHalterClient::shouldHaltPlugin):
1932         Return false.
1933
1934         * page/PluginHalter.cpp: Added.
1935         (WebCore::PluginHalter::PluginHalter):
1936         (WebCore::PluginHalter::didStartPlugin):
1937         Add the object to the plug-in set. If this is the only item in the set,
1938         set m_oldestStartTime to this object's time, and start the timer.
1939         (WebCore::PluginHalter::didStopPlugin):
1940         Remove the plug-in from the set.
1941         (WebCore::PluginHalter::timerFired):
1942         Find the cut-off time as the current time minus the allowed run time;
1943         plug-ins older than this may be halted. Iterate over the plug-ins. Find
1944         the object with the oldest start time that is too young to be halted;
1945         we'll use its start time to set the timer's next fire time. For all
1946         plug-ins that are candidates to be halted, call the
1947         PluginHalterClient's shouldHaltPlugin(). If this function returns true,
1948         call the plug-in's halt() function. Remove these objects from the set
1949         of tracked plug-ins. Call startTimerIfNecessary() to restart the timer.
1950         (WebCore::PluginHalter::startTimerIfNecessary):
1951         If the timer is set to fire, or the set of tracked plug-ins is empty,
1952         return early. Set the timer to fire after the oldest plug-in has run
1953         for the allowed run time.
1954
1955         * page/PluginHalter.h: Added.
1956         (WebCore::PluginHalter::setPluginAllowedRunTime):
1957
1958         * page/PluginHalterClient.h: Added.
1959         (WebCore::PluginHalterClient::~PluginHalterClient):
1960
1961         * page/Page.cpp:
1962         (WebCore::Page::Page):
1963         Initialize m_pluginHalterClient. Call pluginHalterEnabledStateChanged()
1964         to create the PluginHalter if necessary.
1965         (WebCore::Page::pluginHalterEnabledStateChanged):
1966         If plug-in halting is enabled, create the PluginHalter. If it is
1967         disabled, clear it.
1968         (WebCore::Page::pluginAllowedRunTimeChanged):
1969         If there is a plug-in halter, call its setPluginAllowedRunTime().
1970         (WebCore::Page::didStartPlugin):
1971         If there is a plug-in halter, call its didStartPlugin().
1972         (WebCore::Page::didStopPlugin):
1973         If there is a plug-in halter, call its didStopPlugin().
1974
1975         * page/Page.h:
1976         Add a parameter to the Page constructor for the PluginHalterClient.
1977         Added declarations for didStartPlugin() and didStopPlugin(), which are
1978         called when HaltablePlugins are added to or removed from the page. Adds
1979         pluginAllowedRunTimeChanged() and pluginHalterEnabledStateChanged() to
1980         notify the Page when these settings are changed. Added members to hold
1981         the PluginHalter and the PluginHalterClient.
1982
1983         * page/Settings.cpp:
1984         (WebCore::Settings::Settings):
1985         (WebCore::Settings::setPluginHalterEnabled):
1986         If the enabled state has changed, call the Page's
1987         pluginHalterEnabledStateChanged().
1988         (WebCore::Settings::setPluginAllowedRunTime):
1989         Call the Page's pluginAllowedRunTimeChanged().
1990
1991         * page/Settings.h:
1992         (WebCore::Settings::pluginHalterEnabled):
1993         (WebCore::Settings::pluginAllowedRunTime):
1994
1995         * page/HaltablePlugin.h: Added. Defines an interface for plug-ins that
1996         can be automatically halted.
1997         (WebCore::HaltablePlugin::~HaltablePlugin):
1998
1999         * svg/graphics/SVGImage.cpp:
2000         (WebCore::SVGImage::dataChanged):
2001         Pass a dummy PluginHalterClient.
2002
2003 2009-09-24  Simon Fraser  <simon.fraser@apple.com>
2004
2005         Reviewed by Dan Bernstein.
2006
2007         REGRESSION: webkit-transform scale no longer works properly in nightly build
2008         https://bugs.webkit.org/show_bug.cgi?id=29730
2009         
2010         When the initial or final state of a scale animation does not specify a transform,
2011         use a default scale of 1, rather than zero.
2012
2013         Test: compositing/transitions/scale-transition-no-start.html
2014
2015         * platform/graphics/mac/GraphicsLayerCA.mm:
2016         (WebCore::getTransformFunctionValue):
2017
2018 2009-09-24  John Gregg  <johnnyg@google.com>
2019
2020         Reviewed by Eric Seidel.
2021
2022         isEnabled switch for notifications (experimental) in Page Settings
2023         https://bugs.webkit.org/show_bug.cgi?id=28930
2024
2025         Adds a run-time flag in Settings object that controls whether
2026         to expose desktop notifications.
2027
2028         No new test, but test code also modified to set this preference.
2029
2030         * page/DOMWindow.cpp:
2031         (WebCore::DOMWindow::webkitNotifications): check preference before returning notifications object
2032         * page/Settings.cpp:
2033         (WebCore::Settings::Settings):
2034         (WebCore::Settings::setExperimentalNotificationsEnabled):
2035         * page/Settings.h:
2036         (WebCore::Settings::experimentalNotificationsEnabled):
2037
2038 2009-09-24  Dan Bernstein  <mitz@apple.com>
2039
2040         Reviewed by Sam Weinig.
2041
2042         Fix <rdar://problem/7162000> Crash while trying to
2043         calculate the horizontal position of image
2044
2045         Test: fast/inline-block/relative-positioned-rtl-crash.html
2046
2047         * rendering/RenderBox.cpp:
2048         (WebCore::RenderBox::calcAbsoluteHorizontalReplaced): Corrected an
2049         isInline() test to isRenderInline(). This is similar to r41259.
2050
2051 2009-09-24  Jessie Berlin  <jberlin@webkit.org>
2052
2053         Reviewed by Timothy Hatcher.
2054
2055         Fix expanding profile call stacks being broken after sorting.
2056         https://bugs.webkit.org/show_bug.cgi?id=26423
2057
2058         * inspector/front-end/ProfileDataGridTree.js:
2059         (WebInspector.ProfileDataGridNode.prototype.sort):
2060         Set shouldRefreshChildren to true on collapsed nodes with children so that expanding it
2061         causes the children to be placed in the right positions.
2062
2063 2009-09-24  Geoffrey Garen  <ggaren@apple.com>
2064
2065         Reviewed by Stephanie Lewis.
2066
2067         Fixed sudden termination console spew due to too many calls to
2068         enableSuddenTermination.
2069         
2070         <rdar://problem/7063125> 10A410: Safari logging enableSuddenTermination errors
2071
2072         * page/DOMWindow.cpp:
2073         (WebCore::removeUnloadEventListener):
2074         (WebCore::removeAllUnloadEventListeners):
2075         (WebCore::removeBeforeUnloadEventListener):
2076         (WebCore::removeAllBeforeUnloadEventListeners): Only
2077         enableSuddenTermination if the set of listeners is empty *and* this
2078         window was in the set. Otherwise, a no-op will cause us to enableSuddenTermination.
2079
2080 2009-09-24  Carol Szabo  <carol.szabo@nokia.com>
2081
2082         Reviewed by Alexey Proskuryakov.
2083
2084         WebKit returns "" instead of null when getting
2085         inexistent, forbidden or invalidly named headers.
2086         https://bugs.webkit.org/show_bug.cgi?id=29140
2087
2088         * xml/XMLHttpRequest.cpp:
2089         (WebCore::XMLHttpRequest::getResponseHeader):
2090         Changed to return null as it should according to the spec.
2091
2092 2009-09-24  Jeremy Orlow  <jorlow@chromium.org>
2093
2094         Reviewed by Dimitri Glazkov.
2095
2096         Add GYP generated files to svn:ignore
2097         https://bugs.webkit.org/show_bug.cgi?id=29724
2098
2099         Adding the following files to the svn:ignore list (all in the
2100         WebCore/WebCore.gyp directory)
2101
2102         WebCore.xcodeproj
2103         WebCore.sln
2104         WebCore.vcproj
2105         WebCore_Debug.rules
2106         WebCore_Release.rules
2107         WebCore_Release - no tcmalloc.rules
2108         WebCore_Purify.rules
2109         WebCore.mk
2110         WebCore_Debug_rules.mk
2111         WebCore_Release_rules.mk
2112         WebCore_Release - no tcmalloc_rules.mk
2113         WebCore_Purify_rules.mk
2114         WebCore.scons
2115         WebCore_main.scons
2116
2117         * WebCore.gyp: Changed property svn:ignore.
2118
2119 2009-09-24  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
2120
2121         Unreviewed. Mac build fix.
2122
2123         * page/EventHandler.cpp:
2124         (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal):
2125         remove unused parameter from function signature;
2126
2127 2009-09-24  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
2128
2129         Reviewed by Oliver Hunt.
2130
2131         Implement correct horizontal scrollbar behavior for GTK+ also on
2132         styled scrollbars.
2133
2134         https://bugs.webkit.org/show_bug.cgi?id=29348
2135         [Gtk] Scrollwheel on horizontal scrollbars should slide horizontally
2136
2137         Test: platform/gtk/scrollbars/overflow-scrollbar-horizontal-wheel-scroll.html
2138
2139         * page/EventHandler.cpp:
2140         (WebCore::EventHandler::handleWheelEvent): on GTK+, when using the
2141         wheel with the pointer on the horizontal scrollbar, scroll
2142         horizontally;
2143         * platform/PlatformWheelEvent.h:
2144         * platform/gtk/WheelEventGtk.cpp:
2145         (WebCore::PlatformWheelEvent::swapOrientation): allow adding a
2146         vertical scroll to the horizontal one;
2147
2148 2009-09-24  Jeremy Orlow  <jorlow@chromium.org>
2149
2150         Reviewed by Eric Seidel.
2151
2152         StorageNamespace::storageArea() should take in a PassRefPtr<StorageOrigin>
2153         https://bugs.webkit.org/show_bug.cgi?id=29290
2154
2155         Modified StorageNamespace::storageArea() to take in a PassRefPtr<StorageOrigin>
2156         per http://webkit.org/coding/RefPtr.html
2157
2158         No behavior change, so no tests.
2159
2160         * storage/StorageNamespace.h:
2161         * storage/StorageNamespaceImpl.cpp:
2162         (WebCore::StorageNamespaceImpl::storageArea):
2163         * storage/StorageNamespaceImpl.h:
2164
2165 2009-09-24  Geoffrey Garen  <ggaren@apple.com>
2166
2167         Reviewed by Sam Weinig.
2168
2169         Added back enable/disableSuddenTermination() functionality I accidentally
2170         removed in my last patch.
2171
2172         * page/DOMWindow.cpp:
2173         (WebCore::addUnloadEventListener):
2174         (WebCore::removeUnloadEventListener):
2175         (WebCore::removeAllUnloadEventListeners):
2176         (WebCore::addBeforeUnloadEventListener):
2177         (WebCore::removeBeforeUnloadEventListener):
2178         (WebCore::removeAllBeforeUnloadEventListeners):
2179         (WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
2180         (WebCore::DOMWindow::~DOMWindow):
2181         (WebCore::DOMWindow::addEventListener):
2182         (WebCore::DOMWindow::removeEventListener):
2183         (WebCore::DOMWindow::removeAllEventListeners):
2184
2185 2009-09-24  Sam Weinig  <sam@webkit.org>
2186
2187         Reviewed by Steve Falkenburg and Mark Rowe.
2188
2189         Don't pass -F to GCC on non-mac platforms since it is an darwin only.
2190
2191         * DerivedSources.make:
2192
2193 2009-09-24  Sam Weinig  <sam@webkit.org>
2194
2195         Fix windows build.
2196
2197         * dom/Element.idl:
2198
2199 2009-09-23  Stephen White  <senorblanco@chromium.org>
2200
2201         Reviewed by Eric Seidel.
2202
2203         Revert the relevant parts of r47925, and implement an alternate
2204         fix (localize the coordinate check to GraphicsContext::clipPath()).
2205         This fixes http://crbug.com/21174.
2206
2207         Covered by LayoutTests/svg/dynamic-updates/SVGClipPathElement-dom-clipPathUnits-attr.html.
2208
2209         * platform/graphics/skia/GraphicsContextSkia.cpp:
2210         (WebCore::GraphicsContext::clipPath):
2211         * platform/graphics/skia/PlatformContextSkia.cpp:
2212         (PlatformContextSkia::currentPathInLocalCoordinates):
2213
2214 2009-09-24  Brady Eidson  <beidson@apple.com>
2215
2216         Reviewed by Sam Weinig.
2217
2218         Merge changes from Mozilla's FTP directory parser.
2219         <rdar://problem/7227620> and https://bugs.webkit.org/show_bug.cgi?id=29294
2220
2221         FTP layout tests not possible at this time.
2222         https://bugs.webkit.org/show_bug.cgi?id=29719 tracks making them possible.
2223
2224         * loader/FTPDirectoryParser.cpp:
2225         (WebCore::ParsingFailed):
2226         (WebCore::parseOneFTPLine):
2227
2228 2009-09-24  Philippe Normand  <pnormand@igalia.com>
2229
2230         Reviewed by Gustavo Noronha.
2231
2232         [GTK] re-enable some media tests
2233         https://bugs.webkit.org/show_bug.cgi?id=29716
2234
2235         make canPlayType() return "probably" if mime-type is known
2236         and codecs string is not empty. If codecs is empty return
2237         "maybe".
2238
2239         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
2240         (WebCore::MediaPlayerPrivate::supportsType):
2241
2242 2009-09-24  Sam Weinig  <sam@webkit.org>
2243
2244         Reviewed by Dan Bernstein.
2245
2246         Fix for https://bugs.webkit.org/show_bug.cgi?id=29703
2247         Add a function to element to check whether it matches a CSS selector
2248
2249         Implement Element.webkitMatchesSelector.
2250
2251         * css/CSSSelectorList.cpp:
2252         (WebCore::forEachTagSelector):
2253         (WebCore::forEachSelector):
2254         (WebCore::SelectorNeedsNamespaceResolutionFunctor::operator()):
2255         (WebCore::CSSSelectorList::selectorsNeedNamespaceResolution):
2256         * css/CSSSelectorList.h:
2257         Moved code to iterate the CSSSelectorList and determine if any
2258         selectors need namespace resolution from a static function in
2259         Node.cpp to CSSSelectorList so that it can be used by webkitMatchesSelector
2260         as well as querySelector/querySelectorAll.
2261
2262         * dom/Element.cpp:
2263         (WebCore::Element::webkitMatchesSelector):
2264         * dom/Element.h: 
2265         * dom/Element.idl:
2266         Implement the new function. Handles exceptional cases identically to
2267         querySelector/querySelectorAll.
2268
2269         * dom/Node.cpp:
2270         (WebCore::Node::querySelector):
2271         (WebCore::Node::querySelectorAll):
2272         Moved selectorsNeedNamespaceResolution to CSSSelectorList from here.
2273
2274 2009-09-24  Vitaly Repeshko  <vitalyr@chromium.org>
2275
2276         Reviewed by Dimitri Glazkov.
2277
2278         [V8] Fixed bindings build after http://trac.webkit.org/changeset/48701
2279         https://bugs.webkit.org/show_bug.cgi?id=29713
2280
2281         Got rid of isWindowEvent in function signatures:
2282         * bindings/v8/V8AbstractEventListener.cpp:
2283         (WebCore::V8AbstractEventListener::invokeEventHandler):
2284         (WebCore::V8AbstractEventListener::handleEvent):
2285         (WebCore::V8AbstractEventListener::getReceiverObject):
2286         * bindings/v8/V8AbstractEventListener.h:
2287         * bindings/v8/V8LazyEventListener.cpp:
2288         (WebCore::V8LazyEventListener::callListenerFunction):
2289         * bindings/v8/V8LazyEventListener.h:
2290         * bindings/v8/V8WorkerContextEventListener.cpp:
2291         (WebCore::V8WorkerContextEventListener::handleEvent):
2292         (WebCore::V8WorkerContextEventListener::callListenerFunction):
2293         (WebCore::V8WorkerContextEventListener::getReceiverObject):
2294         * bindings/v8/V8WorkerContextEventListener.h:
2295         * bindings/v8/custom/V8CustomEventListener.cpp:
2296         (WebCore::V8EventListener::callListenerFunction):
2297         * bindings/v8/custom/V8CustomEventListener.h:
2298
2299         Switched to EventTarget methods of adding/removing listeners:
2300         * bindings/v8/custom/V8DOMApplicationCacheCustom.cpp:
2301         (WebCore::toEventID):
2302         (WebCore::ACCESSOR_SETTER):
2303
2304         * dom/EventTarget.h: Some functions were incorrectly marked
2305         as JSC-specific.
2306
2307 2009-09-24  Pavel Feldman  <pfeldman@chromium.org>
2308
2309         Reviewed by Timothy Hatcher.
2310
2311         Web Inspector: Color-code watch expression errors with red.
2312
2313         https://bugs.webkit.org/show_bug.cgi?id=29707
2314
2315         * inspector/front-end/WatchExpressionsSidebarPane.js:
2316         (WebInspector.WatchExpressionsSection.prototype.update):
2317         (WebInspector.WatchExpressionTreeElement.prototype.update):
2318         * inspector/front-end/inspector.css:
2319
2320 2009-09-24  Pavel Feldman  <pfeldman@chromium.org>
2321
2322         Reviewed by Timothy Hatcher.
2323
2324         Web Inspector: Fix formatting for messages derived from resource warnings,
2325         couple of drive-by formatting fixes.
2326
2327         https://bugs.webkit.org/show_bug.cgi?id=29705
2328
2329         * inspector/InspectorFrontend.cpp:
2330         (WebCore::InspectorFrontend::addMessageToConsole):
2331         * inspector/front-end/ConsoleView.js:
2332         * inspector/front-end/InjectedScript.js:
2333         (InjectedScript._evaluateAndWrap):
2334         * inspector/front-end/WatchExpressionsSidebarPane.js:
2335         (WebInspector.WatchExpressionsSection.prototype.update):
2336
2337 2009-09-22  Pavel Feldman  <pfeldman@chromium.org>
2338
2339         Reviewed by Timothy Hatcher.
2340
2341         WebInspector: Implement InspectorController::copyNode(id).
2342
2343         https://bugs.webkit.org/show_bug.cgi?id=28357
2344
2345         * inspector/InspectorBackend.cpp:
2346         (WebCore::InspectorBackend::copyNode):
2347         * inspector/InspectorBackend.h:
2348         * inspector/InspectorBackend.idl:
2349         * inspector/front-end/ElementsPanel.js:
2350         (WebInspector.ElementsPanel.prototype.handleCopyEvent):
2351
2352 2009-09-24  Oliver Hunt  <oliver@apple.com>
2353
2354         Reviewed by NOBODY(rollout)
2355
2356         Roll out r48712 as it is incorrect.
2357
2358         Overriding getPropertyNames is incorrect.
2359
2360         * bridge/runtime_array.cpp:
2361         * bridge/runtime_array.h:
2362
2363 2009-09-24  Xan Lopez  <xlopez@igalia.com>
2364
2365         Revert r48697, since it broke key handling notification to GTK+.
2366
2367         * platform/gtk/KeyEventGtk.cpp:
2368         (WebCore::keyIdentifierForGdkKeyCode):
2369         (WebCore::singleCharacterString):
2370
2371 2009-09-24  Philippe Normand  <pnormand@igalia.com>
2372
2373         Reviewed by Xan Lopez.
2374
2375         [GTK] GStreamer MediaPlayer is unable to correctly querry duration
2376         https://bugs.webkit.org/show_bug.cgi?id=24639
2377
2378         check duration returned by gst_element_query_duration() only
2379         when using GStreamer < 0.10.23.
2380
2381         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
2382         (WebCore::MediaPlayerPrivate::duration):
2383
2384 2009-09-24  Benjamin Poulain  <benjamin.poulain@nokia.com>
2385
2386         Reviewed by Eric Seidel.
2387
2388         The indices of RuntimeArray should be enumerated like for a regular array.
2389         https://bugs.webkit.org/show_bug.cgi?id=29005
2390
2391         * bridge/runtime_array.cpp:
2392         (JSC::RuntimeArray::getPropertyNames):
2393         * bridge/runtime_array.h:
2394
2395 2009-09-23  Alexander Pavlov  <apavlov@chromium.org>
2396
2397         Reviewed by Eric Seidel.
2398
2399         Introduce Pasteboard::writePlaintext(const String&) so that copying
2400         of the inspected elements HTML will be possible in WebInspector.
2401         https://bugs.webkit.org/show_bug.cgi?id=29634
2402
2403         * platform/Pasteboard.h:
2404         * platform/android/TemporaryLinkStubs.cpp:
2405         (Pasteboard::writePlainText):
2406         * platform/chromium/ChromiumBridge.h:
2407         * platform/chromium/PasteboardChromium.cpp:
2408         (WebCore::Pasteboard::writePlainText):
2409         * platform/gtk/PasteboardGtk.cpp:
2410         (WebCore::Pasteboard::writePlainText):
2411         * platform/haiku/PasteboardHaiku.cpp:
2412         (WebCore::Pasteboard::writePlainText):
2413         * platform/mac/PasteboardMac.mm:
2414         (WebCore::Pasteboard::writePlainText):
2415         * platform/qt/PasteboardQt.cpp:
2416         (WebCore::Pasteboard::writePlainText):
2417         * platform/win/PasteboardWin.cpp:
2418         (WebCore::Pasteboard::writeSelection):
2419         (WebCore::Pasteboard::writePlainText):
2420         * platform/wince/PasteboardWince.cpp:
2421         (WebCore::Pasteboard::writePlainText):
2422         * platform/wx/PasteboardWx.cpp:
2423         (WebCore::Pasteboard::writeSelection):
2424         (WebCore::Pasteboard::writePlainText):
2425         (WebCore::Pasteboard::writeURL):
2426
2427 2009-09-24  Oswald Buddenhagen  <oswald.buddenhagen@nokia.com>
2428
2429         Reviewed by Simon Hausmann.
2430
2431         Fix QApp::translate() calls to provide the correct class name without
2432         a trailing comma.
2433
2434         * platform/qt/Localizations.cpp:
2435         (WebCore::localizedMediaTimeDescription):
2436
2437 2009-09-24  Geoffrey Garen  <ggaren@apple.com>
2438
2439         More build fix: Removed JSSharedWorkerContextCustom.cpp from project
2440         files, since it no longer exists in the repository.
2441
2442         * GNUmakefile.am:
2443         * WebCore.gypi:
2444         * WebCore.pro:
2445         * WebCore.vcproj/WebCore.vcproj:
2446
2447 2009-09-24  Geoffrey Garen  <ggaren@apple.com>
2448
2449         Windows build fix: Declare set/unsetPendingActivity public, so
2450         SharedWorkerScriptLoader can call them.
2451
2452         * dom/ActiveDOMObject.h:
2453
2454 2009-09-24  Geoffrey Garen  <ggaren@apple.com>
2455
2456         Fixed a bit of the Windows build.
2457
2458         * workers/SharedWorker.idl: Declare a custom mark function. (I accidentally
2459         removed this in my last patch.)
2460         * WebCore.xcodeproj/project.pbxproj: Added JSSharedWorkerCustom.cpp back
2461         to the build. (I accidentally removed this in my last patch.)
2462
2463 2009-09-23  Geoffrey Garen  <ggaren@apple.com>
2464
2465         32-bit build fix: restore previous cast that I thought was unnecessary.
2466
2467         * xml/XMLHttpRequest.cpp:
2468         (WebCore::XMLHttpRequest::didSendData):
2469         (WebCore::XMLHttpRequest::didReceiveData):
2470
2471 2009-09-23  Geoffrey Garen  <ggaren@apple.com>
2472
2473         Reviewed by Sam Weinig.
2474
2475         Bring a little sanity to this crazy EventTarget world of ours
2476         https://bugs.webkit.org/show_bug.cgi?id=29701
2477
2478         Lots of EventTarget refactoring to achieve a single shared implementation
2479         that fixes some of the performance and correctness bugs of the many individual
2480         implementations, and makes reasoning about EventTargets and EventListeners
2481         much easier.
2482         
2483         The basic design is this:
2484             - EventTarget manages a set of EventListeners.
2485             - onXXX EventListener attributes forward to standard EventTarget APIs.
2486             - Since the onXXX code is repetitive, it is usually done with macros
2487               of the form DEFINE_ATTRIBUTE_EVENT_LISTENER(attributeName).
2488             - EventTarget provides a shared implementation of dispatchEvent,
2489               which subclasses with special event dispatch rules, like Node, override.
2490             - To support Node, which lazily instantiates its EventTarget data,
2491               EventTarget has no data members, and instead makes a virtual call
2492               to get its data from wherever its subclass chose to store it.
2493               
2494         Code that used to call dispatchEvent, passing an ExceptionCode paratmeter,
2495         even though no exception could be thrown, has been changed not to do so,
2496         to improve clarity and performance.
2497         
2498         Code that used to call a special dispatchXXXEvent function, which just
2499         turned around and called dispatchEvent, has been changed to call
2500         dispatchEvent, to improve clarity and performance.
2501
2502         * WebCore.base.exp:
2503         * WebCore.xcodeproj/project.pbxproj: Another day in the life of a WebKit
2504         engineer.
2505
2506         * bindings/js/JSDOMBinding.cpp:
2507         (WebCore::isObservableThroughDOM): Updated for Node API change. Added
2508         "is not in the document but is firing event listeners" as a condition
2509         that makes a Node observable in the DOM, so that event listeners firing
2510         on removed nodes are not destroyed midstream. (This was a long-standing
2511         bug that was somewhat hidden by the old implementation's habit of
2512         copying the RegisteredEventListener vector before firing events, which
2513         would keep almost all the relevant objects from being destroyed.)
2514
2515         * bindings/js/JSEventListener.cpp:
2516         (WebCore::JSEventListener::handleEvent): Removed the isWindowEvent flag
2517         because it was one of the most elaborately planned no-ops in the history
2518         of software crime, and one of the reasons clients thought they needed more
2519         than one dispatchEvent function even though they didn't.
2520         * bindings/js/JSEventListener.h:
2521
2522         * bindings/js/JSDOMWindowCustom.cpp:
2523         (WebCore::JSDOMWindow::markChildren):
2524         (WebCore::JSMessagePort::markChildren):
2525         * bindings/js/JSNodeCustom.cpp:
2526         (WebCore::JSNode::markChildren):
2527         * bindings/js/JSAbstractWorkerCustom.cpp:
2528         * bindings/js/JSDOMApplicationCacheCustom.cpp:
2529         * bindings/js/JSDedicatedWorkerContextCustom.cpp:
2530         * bindings/js/JSEventSourceCustom.cpp:
2531         * bindings/js/JSMessagePortCustom.cpp:
2532         * bindings/js/JSSharedWorkerContextCustom.cpp: Removed.
2533         * bindings/js/JSWebSocketCustom.cpp:
2534         * bindings/js/JSWorkerContextCustom.cpp:
2535         (WebCore::JSWorkerContext::markChildren):
2536         * bindings/js/JSWorkerCustom.cpp:
2537         * bindings/js/JSXMLHttpRequestCustom.cpp:
2538         (WebCore::JSXMLHttpRequest::markChildren):
2539         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
2540         (WebCore::JSXMLHttpRequestUpload::markChildren): EventListener marking is
2541         now autogenerated. Classes that still have custom mark functions for other
2542         reasons now call a shared EventTarget API to mark their EventListeners.
2543
2544         * bindings/objc/ObjCEventListener.h:
2545         * bindings/objc/ObjCEventListener.mm:
2546         (WebCore::ObjCEventListener::handleEvent): Bye bye isWindowEvent.
2547
2548         * bindings/scripts/CodeGeneratorJS.pm: Autogeneration support for
2549         marking and invalidating event listeners.
2550
2551         * dom/CharacterData.cpp:
2552         (WebCore::CharacterData::dispatchModifiedEvent):
2553         * dom/ContainerNode.cpp:
2554         (WebCore::ContainerNode::insertBefore):
2555         (WebCore::ContainerNode::replaceChild):
2556         (WebCore::willRemoveChild):
2557         (WebCore::ContainerNode::appendChild):
2558         (WebCore::dispatchChildInsertionEvents):
2559         (WebCore::dispatchChildRemovalEvents):
2560         * dom/Document.cpp:
2561         (WebCore::Document::removeAllEventListeners):
2562         (WebCore::Document::implicitClose):
2563         (WebCore::Document::setFocusedNode):
2564         (WebCore::Document::dispatchWindowEvent):
2565         (WebCore::Document::dispatchWindowLoadEvent):
2566         (WebCore::Document::finishedParsing):
2567         * dom/Document.h: Use dispatchEvent directly.
2568
2569         * dom/Element.h: Moved a few event listener attributes down from Node,
2570         since they don't apply to all Nodes, only Elements.
2571
2572         * dom/EventListener.h: Removed isWindowEvent parameter.
2573
2574         * dom/EventNames.h: Added the "display" event name, so it works correctly
2575         with attribute macros, and for performance.
2576
2577         * dom/EventTarget.cpp:
2578         (WebCore::forbidEventDispatch):
2579         (WebCore::allowEventDispatch):
2580         (WebCore::eventDispatchForbidden): Made this code (embarrasingly) thread
2581         safe, since it's now called on multiple threads. (Currently, we only forbid
2582         event dispatch on the main thread. If we ever want to forbid event dispatch
2583         on secondary threads, we can improve it then.)
2584
2585         (WebCore::EventTarget::addEventListener):
2586         (WebCore::EventTarget::removeEventListener):
2587         (WebCore::EventTarget::setAttributeEventListener):
2588         (WebCore::EventTarget::getAttributeEventListener):
2589         (WebCore::EventTarget::clearAttributeEventListener):
2590         (WebCore::EventTarget::dispatchEvent):
2591         (WebCore::EventTarget::fireEventListeners):
2592         (WebCore::EventTarget::getEventListeners):
2593         (WebCore::EventTarget::removeAllEventListeners):
2594         * dom/EventTarget.h:
2595         (WebCore::FiringEventEndIterator::FiringEventEndIterator):
2596         (WebCore::EventTarget::ref):
2597         (WebCore::EventTarget::deref):
2598         (WebCore::EventTarget::markEventListeners):
2599         (WebCore::EventTarget::invalidateEventListeners):
2600         (WebCore::EventTarget::isFiringEventListeners):
2601         (WebCore::EventTarget::hasEventListeners): The ONE TRUE IMPLEMENTATION of
2602         EventTarget APIs, crafted from an amalgam of all the different versions
2603         we used to have. The most significant change here is that we no longer
2604         make a copy of an EventListener vector before firing the events in the
2605         vector -- instead, we use a reference to the original vector, along with
2606         a notification mechanism for the unlikely case when an EventListener is
2607         removed from the vector. This substantially reduces malloc, copying, and
2608         refcount overhead, and complexity.
2609
2610         * dom/InputElement.cpp:
2611         (WebCore::InputElement::setValueFromRenderer):
2612         * dom/MessageEvent.h:
2613         (WebCore::MessageEvent::create): Use dispatchEvent directly.
2614
2615         * dom/MessagePort.cpp:
2616         (WebCore::MessagePort::dispatchMessages):
2617         (WebCore::MessagePort::eventTargetData):
2618         (WebCore::MessagePort::ensureEventTargetData):
2619         * dom/MessagePort.h:
2620         (WebCore::MessagePort::setOnmessage):
2621         (WebCore::MessagePort::onmessage):
2622         * dom/MessagePort.idl: Removed custom EventTarget implementation.
2623
2624         * dom/MutationEvent.h:
2625         (WebCore::MutationEvent::create): Added some default values so callers
2626         can construct MutationEvents more easily, without calling a custom dispatch
2627         function.
2628
2629         * dom/Node.cpp:
2630         (WebCore::Node::addEventListener):
2631         (WebCore::Node::removeEventListener):
2632         (WebCore::Node::eventTargetData):
2633         (WebCore::Node::ensureEventTargetData):
2634         (WebCore::Node::handleLocalEvents):
2635         (WebCore::Node::dispatchEvent):
2636         (WebCore::Node::dispatchGenericEvent):
2637         (WebCore::Node::dispatchSubtreeModifiedEvent):
2638         (WebCore::Node::dispatchUIEvent):
2639         (WebCore::Node::dispatchKeyEvent):
2640         (WebCore::Node::dispatchMouseEvent):
2641         (WebCore::Node::dispatchWheelEvent):
2642         (WebCore::Node::dispatchFocusEvent):
2643         (WebCore::Node::dispatchBlurEvent):
2644         * dom/Node.h:
2645         (WebCore::Node::preDispatchEventHandler):
2646         (WebCore::Node::postDispatchEventHandler):
2647         * dom/Node.idl:
2648         * dom/NodeRareData.h:
2649         (WebCore::NodeRareData::eventTargetData):
2650         (WebCore::NodeRareData::ensureEventTargetData): Use the shared EventTarget
2651         interface, and call dispatchEvent directly instead of custom dispatchXXXEvent
2652         functions that just forwarded to dispatchEvent.
2653
2654         * dom/RegisteredEventListener.cpp:
2655         * dom/RegisteredEventListener.h:
2656         (WebCore::RegisteredEventListener::RegisteredEventListener):
2657         (WebCore::operator==): This is just a simple struct now, since we no longer
2658         do a complicated copy / refCount / isRemoved dance just to honor the rule
2659         that an EventListener can be removed during event dispatch.
2660
2661         * history/CachedFrame.cpp:
2662         (WebCore::CachedFrameBase::restore): Removed another custom dispatchEvent.
2663
2664         * html/HTMLBodyElement.cpp:
2665         * html/HTMLBodyElement.h: Use the shared EventTarget API.
2666
2667         * html/HTMLFormControlElement.cpp:
2668         (WebCore::HTMLFormControlElement::dispatchFormControlChangeEvent):
2669         (WebCore::HTMLFormControlElement::checkValidity):
2670         * html/HTMLFormElement.cpp:
2671         (WebCore::HTMLFormElement::handleLocalEvents):
2672         (WebCore::HTMLFormElement::prepareSubmit):
2673         (WebCore::HTMLFormElement::reset):
2674         * html/HTMLFormElement.h: Use the standard dispatchEvent API.
2675
2676         * html/HTMLFrameSetElement.cpp:
2677         * html/HTMLFrameSetElement.h: Use the shared EventTarget API.
2678
2679         * html/HTMLImageLoader.cpp:
2680         (WebCore::HTMLImageLoader::dispatchLoadEvent):
2681         * html/HTMLInputElement.cpp:
2682         (WebCore::HTMLInputElement::onSearch):
2683         * html/HTMLMediaElement.cpp:
2684         (WebCore::HTMLMediaElement::loadInternal):
2685         * html/HTMLScriptElement.cpp:
2686         (WebCore::HTMLScriptElement::dispatchLoadEvent):
2687         (WebCore::HTMLScriptElement::dispatchErrorEvent):
2688         * html/HTMLSourceElement.cpp:
2689         (WebCore::HTMLSourceElement::errorEventTimerFired):
2690         * html/HTMLTokenizer.cpp:
2691         (WebCore::HTMLTokenizer::notifyFinished): Use the standard dispatchEvent API.
2692
2693         * inspector/InspectorDOMAgent.cpp:
2694         (WebCore::InspectorDOMAgent::handleEvent):
2695         * inspector/InspectorDOMAgent.h:
2696         * inspector/InspectorDOMStorageResource.cpp:
2697         (WebCore::InspectorDOMStorageResource::handleEvent):
2698         * inspector/InspectorDOMStorageResource.h:
2699         * loader/FrameLoader.cpp:
2700         (WebCore::FrameLoader::stopLoading):
2701         (WebCore::FrameLoader::canCachePageContainingThisFrame):
2702         (WebCore::FrameLoader::logCanCacheFrameDecision):
2703         (WebCore::HashChangeEventTask::performTask):
2704         (WebCore::FrameLoader::pageHidden): No more isWindowEvent.
2705
2706         * loader/ImageDocument.cpp:
2707         (WebCore::ImageEventListener::handleEvent):
2708         * loader/appcache/ApplicationCacheGroup.cpp:
2709         (WebCore::CallCacheListenerTask::performTask):
2710         * loader/appcache/ApplicationCacheHost.cpp:
2711         (WebCore::ApplicationCacheHost::notifyDOMApplicationCache):
2712         * loader/appcache/ApplicationCacheHost.h:
2713         * loader/appcache/DOMApplicationCache.cpp:
2714         (WebCore::DOMApplicationCache::eventTargetData):
2715         (WebCore::DOMApplicationCache::ensureEventTargetData):
2716         * loader/appcache/DOMApplicationCache.h:
2717         * loader/appcache/DOMApplicationCache.idl: Switched to the standard
2718         EventTarget API. As a part of this, I switched this class from using a
2719         custom internal event name enumeration to using the standard EventNames.
2720
2721         * notifications/Notification.cpp:
2722         (WebCore::Notification::eventTargetData):
2723         (WebCore::Notification::ensureEventTargetData):
2724         * notifications/Notification.h:
2725         (WebCore::Notification::scriptExecutionContext):
2726         * notifications/Notification.idl: Switched to the standard EventTarget API.
2727
2728         * page/DOMWindow.cpp:
2729         (WebCore::PostMessageTimer::event):
2730         (WebCore::windowsWithUnloadEventListeners):
2731         (WebCore::windowsWithBeforeUnloadEventListeners):
2732         (WebCore::allowsBeforeUnloadListeners):
2733         (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
2734         (WebCore::DOMWindow::pendingUnloadEventListeners):
2735         (WebCore::DOMWindow::dispatchAllPendingUnloadEvents): Changed the "pending"
2736         unload / beforeunload listener tracker just to track which windows had
2737         such listeners, instead of actually keeping a copy of the listeners. Now,
2738         this code can use the standard EventTarget API.
2739
2740         (WebCore::DOMWindow::~DOMWindow):
2741         (WebCore::DOMWindow::postMessageTimerFired):
2742         (WebCore::DOMWindow::addEventListener):
2743         (WebCore::DOMWindow::removeEventListener):
2744         (WebCore::DOMWindow::dispatchLoadEvent):
2745         (WebCore::DOMWindow::dispatchEvent):
2746         (WebCore::DOMWindow::removeAllEventListeners):
2747         (WebCore::DOMWindow::captureEvents):
2748         (WebCore::DOMWindow::releaseEvents):
2749         (WebCore::DOMWindow::eventTargetData):
2750         (WebCore::DOMWindow::ensureEventTargetData):
2751         * page/DOMWindow.h:
2752         * page/DOMWindow.idl: Use the standard EventTarget APIs.
2753
2754         * page/EventHandler.cpp:
2755         (WebCore::EventHandler::canMouseDownStartSelect):
2756         (WebCore::EventHandler::canMouseDragExtendSelect):
2757         (WebCore::EventHandler::sendResizeEvent):
2758         (WebCore::EventHandler::sendScrollEvent): Use dispatchEvent directly.
2759
2760         * page/EventSource.cpp:
2761         (WebCore::EventSource::endRequest):
2762         (WebCore::EventSource::didReceiveResponse):
2763         (WebCore::EventSource::parseEventStreamLine):
2764         (WebCore::EventSource::stop):
2765         (WebCore::EventSource::createMessageEvent):
2766         (WebCore::EventSource::eventTargetData):
2767         (WebCore::EventSource::ensureEventTargetData):
2768         * page/EventSource.h:
2769         * page/EventSource.idl: Use the standard EventTarget APIs.
2770
2771         * page/FocusController.cpp:
2772         (WebCore::dispatchEventsOnWindowAndFocusedNode):
2773         (WebCore::FocusController::setFocusedFrame):
2774         * page/Frame.cpp:
2775         (WebCore::Frame::shouldClose):
2776         * page/Frame.h:
2777         * page/Page.cpp:
2778         (WebCore::networkStateChanged):
2779         * page/animation/AnimationController.cpp:
2780         (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
2781         * rendering/RenderListBox.cpp:
2782         (WebCore::RenderListBox::valueChanged):
2783         * rendering/RenderTextControl.cpp:
2784         (WebCore::RenderTextControl::selectionChanged):
2785         * rendering/RenderTextControlMultiLine.cpp:
2786         (WebCore::RenderTextControlMultiLine::subtreeHasChanged): Use dispatchEvent.
2787
2788         * svg/SVGElement.cpp:
2789         (WebCore::hasLoadListener): Rewritten for new EventTarget API.
2790
2791         * svg/SVGElementInstance.cpp:
2792         (WebCore::dummyEventTargetData):
2793         (WebCore::SVGElementInstance::addEventListener):
2794         (WebCore::SVGElementInstance::removeEventListener):
2795         (WebCore::SVGElementInstance::removeAllEventListeners):
2796         (WebCore::SVGElementInstance::dispatchEvent):
2797         (WebCore::SVGElementInstance::eventTargetData):
2798         (WebCore::SVGElementInstance::ensureEventTargetData): Use the EventTarget API.
2799
2800         * svg/SVGElementInstance.h:
2801         * svg/SVGImageLoader.cpp:
2802         (WebCore::SVGImageLoader::dispatchLoadEvent):
2803         * svg/SVGScriptElement.cpp:
2804         (WebCore::SVGScriptElement::dispatchErrorEvent): Use dispatchEvent directly.
2805
2806         * svg/SVGUseElement.cpp:
2807         (WebCore::SVGUseElement::transferEventListenersToShadowTree): Updated for
2808         new EventTarget API.
2809
2810         * svg/animation/SVGSMILElement.cpp:
2811         (WebCore::ConditionEventListener::handleEvent): No more isWindowEvent.
2812
2813         * websockets/WebSocket.cpp:
2814         (WebCore::ProcessWebSocketEventTask::create):
2815         (WebCore::ProcessWebSocketEventTask::performTask):
2816         (WebCore::ProcessWebSocketEventTask::ProcessWebSocketEventTask):
2817         (WebCore::WebSocket::didConnect):
2818         (WebCore::WebSocket::didReceiveMessage):
2819         (WebCore::WebSocket::didClose):
2820         (WebCore::WebSocket::eventTargetData):
2821         (WebCore::WebSocket::ensureEventTargetData):
2822         * websockets/WebSocket.h:
2823         * websockets/WebSocket.idl:
2824         * workers/AbstractWorker.cpp:
2825         (WebCore::AbstractWorker::eventTargetData):
2826         (WebCore::AbstractWorker::ensureEventTargetData):
2827         * workers/AbstractWorker.h:
2828         * workers/AbstractWorker.idl:
2829         * workers/DedicatedWorkerContext.cpp:
2830         * workers/DedicatedWorkerContext.h:
2831         * workers/DedicatedWorkerContext.idl:
2832         * workers/DefaultSharedWorkerRepository.cpp:
2833         (WebCore::SharedWorkerConnectTask::performTask):
2834         (WebCore::SharedWorkerScriptLoader::load):
2835         (WebCore::SharedWorkerScriptLoader::notifyFinished):
2836         * workers/SharedWorker.idl:
2837         * workers/SharedWorkerContext.cpp:
2838         (WebCore::createConnectEvent):
2839         * workers/SharedWorkerContext.h:
2840         * workers/SharedWorkerContext.idl:
2841         * workers/Worker.cpp:
2842         (WebCore::Worker::notifyFinished):
2843         * workers/Worker.h:
2844         * workers/Worker.idl:
2845         * workers/WorkerContext.cpp:
2846         (WebCore::WorkerContext::eventTargetData):
2847         (WebCore::WorkerContext::ensureEventTargetData):
2848         * workers/WorkerContext.h:
2849         * workers/WorkerContext.idl:
2850         * workers/WorkerMessagingProxy.cpp:
2851         (WebCore::MessageWorkerContextTask::performTask):
2852         (WebCore::MessageWorkerTask::performTask):
2853         (WebCore::WorkerExceptionTask::performTask):
2854         * xml/XMLHttpRequest.cpp:
2855         (WebCore::XMLHttpRequest::callReadyStateChangeListener):
2856         (WebCore::XMLHttpRequest::createRequest):
2857         (WebCore::XMLHttpRequest::abort):
2858         (WebCore::XMLHttpRequest::networkError):
2859         (WebCore::XMLHttpRequest::abortError):
2860         (WebCore::XMLHttpRequest::didSendData):
2861         (WebCore::XMLHttpRequest::didReceiveData):
2862         (WebCore::XMLHttpRequest::eventTargetData):
2863         (WebCore::XMLHttpRequest::ensureEventTargetData):
2864         * xml/XMLHttpRequest.h:
2865         * xml/XMLHttpRequest.idl:
2866         * xml/XMLHttpRequestProgressEvent.h:
2867         (WebCore::XMLHttpRequestProgressEvent::create):
2868         * xml/XMLHttpRequestUpload.cpp:
2869         (WebCore::XMLHttpRequestUpload::eventTargetData):
2870         (WebCore::XMLHttpRequestUpload::ensureEventTargetData):
2871         * xml/XMLHttpRequestUpload.h:
2872         * xml/XMLHttpRequestUpload.idl: Use new EventTarget API.
2873
2874 2009-09-23  Kent Tamura  <tkent@chromium.org>
2875
2876         Reviewed by Darin Adler.
2877
2878         - Support for maxLength of <textarea>
2879         - Move numGraphemeClusters() and numCharactersInGraphemeClusters() from InputElement to String.
2880         https://bugs.webkit.org/show_bug.cgi?id=29292
2881
2882         Test: fast/forms/textarea-maxlength.html
2883
2884         * dom/InputElement.cpp:
2885         (WebCore::InputElement::sanitizeUserInputValue):
2886         (WebCore::InputElement::handleBeforeTextInsertedEvent):
2887         * html/HTMLTextAreaElement.cpp:
2888         (WebCore::HTMLTextAreaElement::defaultEventHandler):
2889         (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
2890         (WebCore::HTMLTextAreaElement::sanitizeUserInputValue):
2891         (WebCore::HTMLTextAreaElement::maxLength):
2892         (WebCore::HTMLTextAreaElement::setMaxLength):
2893         * html/HTMLTextAreaElement.h:
2894         * html/HTMLTextAreaElement.idl:
2895         * platform/text/PlatformString.h:
2896         * platform/text/String.cpp:
2897         (WebCore::String::numGraphemeClusters):
2898         (WebCore::String::numCharactersInGraphemeClusters):
2899
2900 2009-09-23  Martin Robinson  <martin.james.robinson@gmail.com>
2901
2902         Reviewed by Xan Lopez.
2903
2904         [GTK] REGRESSION: BitmapImage::getGdkPixbuf fails for non-square images
2905         https://bugs.webkit.org/show_bug.cgi?id=29654
2906
2907         Give GDK_Backspace key events the proper text properties.
2908
2909         Instead of adding new tests, this change removes existing tests
2910         from Gtk's skipped list.
2911
2912         * platform/gtk/KeyEventGtk.cpp:
2913         (WebCore::keyIdentifierForGdkKeyCode):
2914         (WebCore::singleCharacterString):
2915
2916 2009-09-23  Sam Weinig  <sam@webkit.org>
2917
2918         Reviewed by Adam Barth.
2919
2920         Fix for https://bugs.webkit.org/show_bug.cgi?id=26989
2921         Should allow navigation of top-level openers
2922         <rdar://problem/7034025>
2923
2924         Allow navigation of cross-origin window.opener if it is top-level frame.
2925
2926         Test: http/tests/security/frameNavigation/cross-origin-opener.html
2927
2928         * loader/FrameLoader.cpp:
2929         (WebCore::FrameLoader::shouldAllowNavigation):
2930
2931 2009-09-23  Marshall Culpepper  <mculpepper@appcelerator.com>
2932
2933         Reviewed by Eric Seidel.
2934
2935         Added $(WebKitLibrariesDir)/include/cairo so cairo.h is found by
2936         default when the necessary dependencies are extracted into the
2937         WebKitLibrariesDir.
2938         https://bugs.webkit.org/show_bug.cgi?id=29661
2939
2940         * WebCore.vcproj/WebCoreCairo.vsprops:
2941
2942 2009-09-23  Darin Adler  <darin@apple.com>
2943
2944         Reviewed by Sam Weinig.
2945
2946         Crash when website does a history.back() followed by an alert()
2947         https://bugs.webkit.org/show_bug.cgi?id=29686
2948         rdar://problem/6984996
2949
2950         When loading is deferred, we need to defer timer-based loads
2951         too, not just networking-driven loads. Otherwise we can get
2952         syncronouse navigation while running a script, which leads to
2953         crashes and other badness.
2954
2955         This patch includes a manual test; an automated test may be
2956         possible some time in the future.
2957
2958         * dom/Document.cpp:
2959         (WebCore::Document::processHttpEquiv): Use scheduleLocationChange
2960         instead of scheduleHTTPRedirection to implement the navigation
2961         needed for x-frame-options.
2962
2963         * loader/FrameLoader.cpp:
2964         (WebCore::FrameLoader::FrameLoader): Updated for data members with
2965         new names and new data members.
2966         (WebCore::FrameLoader::setDefersLoading): When turning deferral
2967         off, call startRedirectionTimer and startCheckCompleteTimer, since
2968         either of them might have been fired and ignored while defersLoading
2969         was true.
2970         (WebCore::FrameLoader::clear): Updated for replacement of the
2971         m_checkCompletedTimer and m_checkLoadCompleteTimer timers.
2972         (WebCore::FrameLoader::allAncestorsAreComplete): Added.
2973         (WebCore::FrameLoader::checkCompleted): Added code to set
2974         m_shouldCallCheckCompleted to false. Changed code that calls
2975         startRedirectionTimer to call it unconditionally, since that
2976         function now knows when to do work and doesn't expect callers
2977         to handle that any more.
2978         (WebCore::FrameLoader::checkTimerFired): Added. Replaces the old
2979         timer fired callbacks. Calls checkCompleted and checkLoadComplete
2980         as appropriate, but not when defersLoading is true.
2981         (WebCore::FrameLoader::startCheckCompleteTimer): Added. Replaces
2982         the two different calls to start timers before. Only starts the
2983         timers if they are needed.
2984         (WebCore::FrameLoader::scheduleCheckCompleted): Changed to call
2985         startCheckCompleteTimer after setting boolean.
2986         (WebCore::FrameLoader::scheduleCheckLoadComplete): Ditto.
2987         (WebCore::FrameLoader::scheduleHistoryNavigation): Removed
2988         canGoBackOrForward check. The logic works more naturally when
2989         we don't do anything until the timer fires.
2990         (WebCore::FrameLoader::redirectionTimerFired): Do nothing if
2991         defersLoading is true. Also moved canGoBackOrForward check here.
2992         (WebCore::FrameLoader::scheduleRedirection): Changed code that
2993         calls startRedirectionTimer to do so unconditionally. That
2994         function now handles the rules about when to start the timer
2995         rather than expecting the caller to do so.
2996         (WebCore::FrameLoader::startRedirectionTimer): Added code to
2997         handle the case where there is no redirection scheduled,
2998         where the timer is already active, or where this is a classic
2999         redirection and there is an ancestor that has not yet completed
3000         loading.
3001         (WebCore::FrameLoader::completed): Call startRedirectionTimer
3002         here directly instead of calling a cover named parentCompleted.
3003         Hooray! One less function in the giant FrameLoader class!
3004         (WebCore::FrameLoader::checkLoadComplete): Added code to set
3005         m_shouldCallCheckLoadComplete to false.
3006
3007         * loader/FrameLoader.h: Replaced the two functions
3008         checkCompletedTimerFired and checkLoadCompleteTimerFired with
3009         one function, checkTimerFired. Removed the parentCompleted
3010         function. Added the startCheckCompleteTimer and
3011         allAncestorsAreComplete functions. Replaced the
3012         m_checkCompletedTimer and m_checkLoadCompleteTimer data
3013         members with m_checkTimer, m_shouldCallCheckCompleted, and
3014         m_shouldCallCheckLoadComplete.
3015
3016         * manual-tests/go-back-after-alert.html: Added.
3017         * manual-tests/resources/alert-and-go-back.html: Added.
3018
3019 2009-09-23  David Kilzer  <ddkilzer@apple.com>
3020
3021         <http://webkit.org/b/29660> Move "Generate 64-bit Export File" build phase script into DerivedSources.make
3022
3023         Reviewed by Mark Rowe.
3024
3025         The "Generate 64-bit Export File" build phase script generated
3026         the WebCore.LP64.exp export file used to link 64-bit WebCore.
3027         Instead of having a separate build phase script, move its
3028         generation into DerivedSources.make where WebCore.exp is
3029         generated.
3030
3031         * DerivedSources.make: Added a rule to make WebCore.LP64.exp.
3032         Added code to append WebCore.PluginHostProcess.exp to
3033         $(WEBCORE_EXPORT_DEPENDENCIES) when WTF_USE_PLUGIN_HOST_PROCESS
3034         is set to 1.
3035         * WebCore.PluginHostProcess.exp: Renamed from WebCore/WebCore.LP64.exp.
3036         * WebCore.xcodeproj/project.pbxproj: Removed the "Generate
3037         64-bit Export File" build phase script. Renamed WebCore.LP64.exp
3038         to WebCore.PluginHostProcess.exp.
3039
3040 2009-09-23  Peter Kasting  <pkasting@google.com>
3041
3042         Reviewed by Dimitri Glazkov.
3043
3044         https://bugs.webkit.org/show_bug.cgi?id=29694
3045         [Chromium] Eliminate dependency on gfx::Rect from ImageSkia.
3046
3047         * platform/graphics/skia/ImageSkia.cpp:
3048         (WebCore::drawResampledBitmap):
3049
3050 2009-09-22  Timothy Hatcher  <timothy@apple.com>
3051
3052         Prevent scrolling multiple elements during latched wheel events.
3053
3054         Reviewed by Anders Carlsson.
3055
3056         * page/EventHandler.cpp:
3057         (WebCore::scrollAndAcceptEvent):
3058         (WebCore::EventHandler::clear):
3059         (WebCore::EventHandler::handleWheelEvent):
3060         * page/EventHandler.h:
3061         * rendering/RenderBox.cpp:
3062         (WebCore::RenderBox::scroll):
3063         * rendering/RenderBox.h:
3064
3065 2009-09-23  Daniel Bates  <dbates@webkit.org>
3066
3067         Reviewed by Adam Barth.
3068
3069         https://bugs.webkit.org/show_bug.cgi?id=29523
3070         
3071         Fixes an issue where a JavaScript URL that was URL-encoded twice can bypass the
3072         XSSAuditor.
3073         
3074         The method FrameLoader::executeIfJavaScriptURL decodes the URL escape 
3075         sequences in a JavaScript URL before it is eventually passed to the XSSAuditor.
3076         Because the XSSAuditor also decodes the URL escape sequences as part of its
3077         canonicalization, the double decoding of a JavaScript URL would
3078         not match the canonicalization of the input parameters.
3079
3080         Tests: http/tests/security/xssAuditor/iframe-javascript-url-url-encoded.html
3081                http/tests/security/xssAuditor/javascript-link-url-encoded.html
3082
3083         * bindings/js/ScriptController.cpp:
3084         (WebCore::ScriptController::evaluate): Moved call to 
3085         XSSAuditor::canEvaluateJavaScriptURL into FrameLoader::executeIfJavaScriptURL.
3086         * bindings/v8/ScriptController.cpp:
3087         (WebCore::ScriptController::evaluate): Ditto.
3088         * loader/FrameLoader.cpp:
3089         (WebCore::FrameLoader::executeIfJavaScriptURL): Modified to call 
3090         XSSAuditor::canEvaluateJavaScriptURL on the JavaScript URL before it is
3091         decoded.
3092
3093 2009-09-22  Dave Hyatt  <hyatt@apple.com>
3094
3095         Reviewed by John Sullivan.
3096
3097         https://bugs.webkit.org/show_bug.cgi?id=29657
3098         Columns don't break properly in positioned elements with a fixed height.  Make sure that
3099         a block is still considered to have columns even when the column count is 1 if the column
3100         width is non-auto.
3101     
3102         Added fast/multicol/positioned-with-constrained-height.html
3103
3104         * rendering/RenderBlock.cpp:
3105         (WebCore::RenderBlock::setDesiredColumnCountAndWidth):
3106
3107 2009-09-23  Holger Hans Peter Freyther  <zecke@selfish.org>
3108
3109         Rubber-stamped by Simon Hausmann.
3110
3111         Add a null check for the Document*. In the mirror benchmarking
3112         application a crash from a call from JavaScript was observed.
3113
3114         I was not able to come up with a test case for this issue.
3115
3116         * platform/qt/CookieJarQt.cpp:
3117         (WebCore::cookieJar):
3118
3119 2009-09-23  Simon Hausmann  <simon.hausmann@nokia.com>
3120
3121         Reviewed by Tor Arne Vestbø.
3122
3123         Fix the Qt/Windows build, after the introduction of
3124         the page client.
3125
3126         * plugins/win/PluginViewWin.cpp:
3127         (windowHandleForPageClient):
3128         (WebCore::PluginView::getValue):
3129         (WebCore::PluginView::forceRedraw):
3130         (WebCore::PluginView::platformStart):
3131
3132 2009-09-23  Gustavo Noronha Silva  <gns@gnome.org>
3133
3134         Reviewed by Xan Lopez.
3135
3136         [GTK] media tests failing after their rework
3137         https://bugs.webkit.org/show_bug.cgi?id=29532
3138
3139         Correctly advertise the mime types used by the common formats used
3140         in the tests.
3141
3142         Tests that regressed, and will pass again:
3143
3144            media/video-canvas-source.html
3145            media/video-controls.html
3146            media/video-currentTime-set2.html
3147            media/video-dom-autoplay.html
3148            media/video-dom-src.html
3149            media/video-error-abort.html
3150            media/video-load-networkState.html
3151            media/video-load-readyState.html
3152            media/video-muted.html
3153            media/video-no-autoplay.html
3154            media/video-pause-empty-events.html
3155            media/video-play-empty-events.html
3156            media/video-seekable.html
3157            media/video-seeking.html
3158            media/video-size.html
3159            media/video-source-type-params.html
3160            media/video-source-type.html
3161            media/video-source.html
3162            media/video-src-change.html
3163            media/video-src-invalid-remove.html
3164            media/video-src-remove.html
3165            media/video-src-set.html
3166            media/video-src-source.html
3167            media/video-src.html
3168            media/video-timeupdate-during-playback.html
3169            media/video-volume.html
3170
3171         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
3172         (WebCore::mimeTypeCache):
3173
3174 2009-09-22  Charles Wei  <charles.wei@torchmobile.com.cn>
3175
3176         Reviewed by Eric Seidel.
3177
3178         Fix the crash problem with absolte positioned children in foreignobject
3179         htts://bugs.webkit.org/show_bug.cgi?id=26342
3180
3181         Test: svg/custom/foreignobject-crash-with-absolute-positioned-children.svg
3182
3183         * rendering/RenderForeignObject.h:
3184         (WebCore::RenderForeignObject::isSVGForeignObject):
3185         * rendering/RenderObject.cpp:
3186         (WebCore::RenderObject::containingBlock):
3187         * rendering/RenderObject.h:
3188         (WebCore::RenderObject::isSVGForeignObject):
3189
3190 2009-09-22  Drew Wilson  <atwilson@google.com>
3191
3192         Reviewed by David Levin.
3193
3194         SharedWorkers "name" attribute is now optional.
3195         https://bugs.webkit.org/show_bug.cgi?id=28897
3196
3197         Test: fast/workers/shared-worker-name.html
3198
3199         * bindings/js/JSSharedWorkerConstructor.cpp:
3200         (WebCore::constructSharedWorker):
3201         Default 'name' attribute to empty string if it is not provided.
3202         * bindings/v8/custom/V8SharedWorkerCustom.cpp:
3203         (WebCore::CALLBACK_FUNC_DECL):
3204         Default 'name' attribute to empty string if it is not provided.
3205         * workers/DefaultSharedWorkerRepository.cpp:
3206         (WebCore::SharedWorkerProxy::matches):
3207         Now matches URLs if names are empty strings.
3208         (WebCore::DefaultSharedWorkerRepository::getProxy):
3209         Pass URL in to SharedWorkerProxy::matches().
3210
3211 2009-09-22  Dimitri Glazkov  <dglazkov@chromium.org>
3212
3213         Unreviewed, another build fix.
3214
3215         [Chromium] Add another missing include.
3216         https://bugs.webkit.org/show_bug.cgi?id=29536
3217
3218         * inspector/InspectorController.cpp: Added DOMWindow.h include.
3219
3220 2009-09-22  Dimitri Glazkov  <dglazkov@chromium.org>
3221
3222         Unreviewed, build fix.
3223
3224         [Chromium] Add missing include.
3225         https://bugs.webkit.org/show_bug.cgi?id=29536
3226
3227         * inspector/InspectorDOMStorageResource.cpp: Added DOMWindow.h include.
3228
3229 2009-09-22  Darin Adler  <darin@apple.com>
3230
3231         Reviewed by Sam Weinig.
3232
3233         Tighten up the ScheduledRedirection machinery to prepare for a bug fix
3234         https://bugs.webkit.org/show_bug.cgi?id=29663
3235
3236         * loader/FrameLoader.cpp:
3237         (WebCore::ScheduledRedirection::ScheduledRedirection): Added a boolean,
3238         initialized to false, to keep track if the redirection has been
3239         communicated to the client.
3240         (WebCore::FrameLoader::stopLoading): Tweaked a comment.
3241         (WebCore::FrameLoader::cancelRedirection): Removed code to clear
3242         m_scheduledRedirection.clear since stopRedirectionTimer does that now.
3243         (WebCore::FrameLoader::allChildrenAreComplete): Added.
3244         (WebCore::FrameLoader::checkCompleted): Use allChildrenAreComplete
3245         function for clarity.
3246         (WebCore::FrameLoader::checkCallImplicitClose): Ditto.
3247         (WebCore::FrameLoader::scheduleRedirection): Changed to take a PassOwnPtr.
3248         (WebCore::FrameLoader::startRedirectionTimer): Added code to set the
3249         toldClient flag and not call clientRedirected a second time if it is set.
3250         (WebCore::FrameLoader::stopRedirectionTimer): Changed so this can be safely
3251         called multiple times and it will call clientRedirectCancelledOrFinished
3252         only once.
3253
3254         * loader/FrameLoader.h: Changed scheduleRedirection to be a PassOwnPtr.
3255         Added allChildrenAreComplete function.
3256
3257 2009-09-22  Yury Semikhatsky  <yurys@chromium.org>
3258
3259         Reviewed by Timothy Hatcher.
3260
3261         WebInspector: Migrate Databases tab to InjectedScript /
3262         serialized interaction.
3263
3264         DOMStorage interaction is now serialized into JSON messages
3265         and doesn't require quarantined objects.
3266         
3267         https://bugs.webkit.org/show_bug.cgi?id=28873
3268
3269         * dom/EventListener.h:
3270         (WebCore::EventListener::):
3271         * inspector/InspectorBackend.cpp:
3272         (WebCore::InspectorBackend::selectDOMStorage):
3273         (WebCore::InspectorBackend::getDOMStorageEntries):
3274         (WebCore::InspectorBackend::setDOMStorageItem):
3275         (WebCore::InspectorBackend::removeDOMStorageItem):
3276         * inspector/InspectorBackend.h:
3277         * inspector/InspectorBackend.idl:
3278         * inspector/InspectorController.cpp:
3279         (WebCore::InspectorController::didCommitLoad):
3280         (WebCore::InspectorController::selectDOMStorage):
3281         (WebCore::InspectorController::getDOMStorageEntries):
3282         (WebCore::InspectorController::setDOMStorageItem):
3283         (WebCore::InspectorController::removeDOMStorageItem):
3284         (WebCore::InspectorController::getDOMStorageResourceForId):
3285         * inspector/InspectorController.h:
3286         * inspector/InspectorDOMStorageResource.cpp:
3287         (WebCore::InspectorDOMStorageResource::InspectorDOMStorageResource):
3288         (WebCore::InspectorDOMStorageResource::bind):
3289         (WebCore::InspectorDOMStorageResource::unbind):
3290         (WebCore::InspectorDOMStorageResource::startReportingChangesToFrontend):
3291         (WebCore::InspectorDOMStorageResource::handleEvent):
3292         (WebCore::InspectorDOMStorageResource::operator==):
3293         * inspector/InspectorDOMStorageResource.h:
3294         (WebCore::InspectorDOMStorageResource::cast):
3295         (WebCore::InspectorDOMStorageResource::id):
3296         (WebCore::InspectorDOMStorageResource::domStorage):
3297         * inspector/InspectorFrontend.cpp:
3298         (WebCore::InspectorFrontend::selectDOMStorage):
3299         (WebCore::InspectorFrontend::didGetDOMStorageEntries):
3300         (WebCore::InspectorFrontend::didSetDOMStorageItem):
3301         (WebCore::InspectorFrontend::didRemoveDOMStorageItem):
3302         (WebCore::InspectorFrontend::updateDOMStorage):
3303         * inspector/InspectorFrontend.h:
3304         * inspector/front-end/DOMStorage.js:
3305         (WebInspector.DOMStorage):
3306         (WebInspector.DOMStorage.prototype.get id):
3307         (WebInspector.DOMStorage.prototype.get domStorage):
3308         (WebInspector.DOMStorage.prototype.get isLocalStorage):
3309         (WebInspector.DOMStorage.prototype.getEntriesAsync):
3310         (WebInspector.DOMStorage.prototype.setItemAsync):
3311         (WebInspector.DOMStorage.prototype.removeItemAsync):
3312         * inspector/front-end/DOMStorageDataGrid.js:
3313         (WebInspector.DOMStorageDataGrid):
3314         (WebInspector.DOMStorageDataGrid.prototype._startEditingColumnOfDataGridNode):
3315         (WebInspector.DOMStorageDataGrid.prototype._startEditing):
3316         (WebInspector.DOMStorageDataGrid.prototype._editingCommitted):
3317         (WebInspector.DOMStorageDataGrid.prototype._editingCancelled):
3318         (WebInspector.DOMStorageDataGrid.prototype.deleteSelectedRow):
3319         * inspector/front-end/DOMStorageItemsView.js:
3320         (WebInspector.DOMStorageItemsView.prototype.update):
3321         (WebInspector.DOMStorageItemsView.prototype._showDOMStorageEntries):
3322         (WebInspector.DOMStorageItemsView.prototype._dataGridForDOMStorageEntries):
3323         * inspector/front-end/StoragePanel.js:
3324         (WebInspector.StoragePanel.prototype.show):
3325         (WebInspector.StoragePanel.prototype.reset):
3326         (WebInspector.StoragePanel.prototype.selectDOMStorage):
3327         (WebInspector.StoragePanel.prototype.updateDOMStorage):
3328         (WebInspector.StoragePanel.prototype._domStorageForId):
3329         * inspector/front-end/inspector.js:
3330         (WebInspector.addDOMStorage):
3331         (WebInspector.updateDOMStorage):
3332
3333 2009-09-22  Sam Weinig  <sam@webkit.org>
3334
3335         Reviewed by Alexey Proskuryakov.
3336
3337         Fix for XMLHttpRequest.abort() should destroy the response text.
3338         https://bugs.webkit.org/show_bug.cgi?id=29658
3339         <rdar://problem/5301430>
3340
3341         Clearing the response text after calling XMLHttpRequest.abort() is necessary
3342         per spec and matches Firefox. It is also a potential memory win.
3343
3344         Test: http/tests/xmlhttprequest/abort-should-destroy-responseText.html
3345
3346         * xml/XMLHttpRequest.cpp:
3347         (WebCore::XMLHttpRequest::abort): Clear the response text making sure to
3348         keep the actual ResourceReponse around so that the response status and response
3349         status text are kept around.
3350
3351 2009-09-22  Dimitri Glazkov  <dglazkov@chromium.org>
3352
3353         No review, rolling out r48639.
3354         http://trac.webkit.org/changeset/48639
3355
3356         * bindings/v8/V8GCController.cpp:
3357         (WebCore::ObjectGrouperVisitor::visitDOMWrapper):
3358
3359 2009-09-22  Dumitru Daniliuc  <dumi@chromium.org>
3360
3361         Reviewed by Dimitri Glazkov.
3362
3363         Changing the transaction coordinator to (re-)allow multiple read
3364         transactions on the same database to run concurrently (without
3365         risking a deadlock this time).
3366
3367         https://bugs.webkit.org/show_bug.cgi?id=29115
3368
3369         Tests: storage/read-and-write-transactions-dont-run-together.html
3370                storage/read-transactions-running-concurrently.html
3371
3372         * storage/SQLTransaction.h:
3373         (WebCore::SQLTransaction::isReadOnly): Returns the type of the
3374         transaction.
3375         * storage/SQLTransactionCoordinator.cpp:
3376         (WebCore::SQLTransactionCoordinator::acquireLock): Changed to
3377         allow multiple read transactions on the same DB to run
3378         concurrently.
3379         (WebCore::SQLTransactionCoordinator::releaseLock): Changed to
3380         allow multiple read transactions on the same DB to run
3381         concurrently.
3382         (WebCore::SQLTransactionCoordinator::shutdown): Renamed the map.
3383         * storage/SQLTransactionCoordinator.h:
3384
3385 2009-09-22  Peter Kasting  <pkasting@google.com>
3386
3387         Reviewed by David Levin.
3388
3389         https://bugs.webkit.org/show_bug.cgi?id=29652
3390         Support true system colors for CSS system colors in Chromium/Win.
3391
3392         * rendering/RenderThemeChromiumWin.cpp:
3393         (WebCore::cssValueIdToSysColorIndex):
3394         (WebCore::RenderThemeChromiumWin::systemColor):
3395         * rendering/RenderThemeChromiumWin.h:
3396
3397 2009-09-22  Beth Dakin  <bdakin@apple.com>
3398
3399         Reviewed by Dave Hyatt.
3400
3401         Fix for <rdar://problem/6925121> SAP: Wrong width calculation in 
3402         table with fixed layout
3403         -and corresponding-
3404         https://bugs.webkit.org/show_bug.cgi?id=29501
3405
3406         New Tests:
3407         * fast/table/fixed-table-with-percent-inside-percent-table.html: Added.
3408         * fast/table/fixed-table-with-percent-width-inside-auto-table.html: Added.
3409         * fast/table/fixed-table-with-percent-width-inside-div.html: Added.
3410         * fast/table/fixed-table-with-percent-width-inside-extra-large-div.html: Added.
3411         * fast/table/fixed-table-with-percent-width-inside-fixed-width-table.html: Added.
3412         * fast/table/fixed-table-with-small-percent-width.html: Added.
3413
3414         This new quirk is very similar to an existing one that was 
3415         implemented in revision 4316.
3416         * rendering/FixedTableLayout.cpp:
3417         (WebCore::FixedTableLayout::calcPrefWidths):
3418
3419 2009-09-22  Brian Weinstein  <bweinstein@apple.com>
3420
3421         Reviewed by Timothy Hatcher.
3422
3423         List HTTP status code with response headers in resources tab of Web Inspector.
3424         http://webkit.org/b/19945
3425
3426         This patch adds a new top level list in the resources tab, HTTP Information, that 
3427         for now, contains the Request Method (GET, POST, etc.) and the Status Code (200, 404, etc.).
3428         Additionally, it adds a colored dot next to the requested URL to show the status 
3429         (green for success, orange for redirect, red for error).
3430
3431         * English.lproj/localizedStrings.js:
3432         * inspector/front-end/ImageView.js:
3433         (WebInspector.ImageView):
3434         * inspector/front-end/Images/errorRedDot.png: Added.
3435         * inspector/front-end/Images/successGreenDot.png: Added.
3436         * inspector/front-end/Images/warningOrangeDot.png: Added.
3437         * inspector/front-end/Resource.js:
3438         (WebInspector.Resource.StatusTextForCode):
3439         * inspector/front-end/ResourceView.js:
3440         (WebInspector.ResourceView):
3441         (WebInspector.ResourceView.prototype._refreshURL):
3442         (WebInspector.ResourceView.prototype._refreshHTTPInformation):
3443         * inspector/front-end/inspector.css:
3444
3445 2009-09-22  Brady Eidson  <beidson@apple.com>
3446
3447         Reviewed by Darin Adler.
3448
3449         Back list isn't properly updated for fragment changes after a redirect.
3450         <rdar://problem/6142803> and https://bugs.webkit.org/show_bug.cgi?id=20355
3451
3452         Test: fast/loader/fragment-after-redirect-gets-back-entry.html
3453
3454         * loader/FrameLoader.cpp:
3455         (WebCore::FrameLoader::loadURL): Properly reset the policy FrameLoadType before
3456           consulting the policy delegate for fragment scrolling.
3457
3458 2009-09-22  Darin Fisher  <darin@chromium.org>
3459
3460         Reviewed by Dimitri Glazkov.
3461
3462         Drop down selects get stuck in the non-visible state and cannot be opened.
3463         https://bugs.webkit.org/show_bug.cgi?id=29645
3464
3465         All paths that lead to hiding the popup menu must call popupDidHide on
3466         the PopupMenuClient.  This change makes it so by moving all of the
3467         hiding logic to PopupListBox::hidePopup.
3468
3469         * platform/chromium/PopupMenuChromium.cpp:
3470         (WebCore::PopupContainer::hidePopup):
3471         (WebCore::PopupListBox::hidePopup):
3472         * platform/chromium/PopupMenuChromium.h:
3473
3474 2009-09-22  Patrick Mueller  <Patrick_Mueller@us.ibm.com>
3475
3476         Reviewed by Timothy Hatcher.
3477
3478         WebInspector.log() function not protected if console not yet created
3479         https://bugs.webkit.org/show_bug.cgi?id=29336
3480         
3481         No new tests.  Only affects Web Inspector developers adding logging
3482         to their code during development.
3483
3484         * inspector/front-end/inspector.js:
3485         (WebInspector.log.isLogAvailable):
3486         (WebInspector.log.flushQueue):
3487         (WebInspector.log.flushQueueIfAvailable):
3488         (WebInspector.log.logMessage):
3489         (WebInspector.log):
3490
3491 2009-09-22  Yaar Schnitman  <yaar@chromium.org>
3492
3493         Reviewed by David Levin.
3494
3495         Ported chromium.org's webcore.gyp for the webkit chromium port.
3496
3497         https://bugs.webkit.org/show_bug.cgi?id=29617
3498
3499         * WebCore.gyp/WebCore.gyp: Added.
3500
3501 2009-09-22  Christian Plesner Hansen  <christian.plesner.hansen@gmail.com>
3502
3503         Reviewed by Adam Barth.
3504
3505         [v8] Don't keep clean wrappers artificially alive        
3506         We currently keep all DOM node wrappers alive, even when there are
3507         no more references to them from JS, in case they have properties
3508         that we need to keep around if new JS references are created.
3509         This changes the policy to only keep wrappers artificially alive
3510         if they have changed since they were created. Empty wrappers are
3511         discarded and recreated as needed.
3512         https://bugs.webkit.org/show_bug.cgi?id=29330
3513
3514         * bindings/v8/V8GCController.cpp:
3515         (WebCore::ObjectGrouperVisitor::visitDOMWrapper):
3516
3517 2009-09-22  Pavel Feldman  <pfeldman@chromium.org>
3518
3519         Reviewed by Timothy Hatcher.
3520
3521         Web Inspector: console.count and console.timeEnd
3522         crash when inspector is opened.
3523
3524         https://bugs.webkit.org/show_bug.cgi?id=29632
3525
3526         * inspector/InspectorFrontend.cpp:
3527         (WebCore::InspectorFrontend::addMessageToConsole):
3528
3529 2009-09-22  Adam Barth  <abarth@webkit.org>
3530
3531         Unreviewed.
3532
3533         Fix bogus build fix I did last night.
3534
3535         * bindings/v8/custom/V8DOMWindowCustom.cpp:
3536         (WebCore::V8Custom::WindowSetTimeoutImpl):
3537
3538 2009-09-22  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
3539
3540         Reviewed by Simon Hausmann.
3541
3542         NPAPI/Mac: Don't paint plugins if we don't have a CGContextRef
3543
3544         * plugins/mac/PluginViewMac.cpp:
3545
3546 2009-09-22  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
3547
3548         Reivewed by Simon Hausmann.
3549
3550         Fix the Qt/Mac build after r48604 (Implement new QWebPageClient class)
3551
3552         There's no QWidget::x11Info() on Mac, and setPlatformPluginWidget()
3553         takes a QWidget*, not a QWebPageClient*
3554
3555         * plugins/mac/PluginViewMac.cpp:
3556         (WebCore::PluginView::platformStart):
3557
3558 2009-09-21  Adam Barth  <abarth@webkit.org>
3559
3560         Attempted fix for the V8 build.
3561
3562         * bindings/v8/custom/V8DOMWindowCustom.cpp:
3563         (WebCore::V8Custom::WindowSetTimeoutImpl):
3564
3565 2009-09-21  Adam Barth  <abarth@webkit.org>
3566
3567         Reviewed by Sam Weinig.
3568
3569         Don't re-enter JavaScript after performing access checks
3570         https://bugs.webkit.org/show_bug.cgi?id=29531
3571
3572         Moved the access check slightly later in this functions to avoid
3573         re-entering the JavaScript interpreter (typically via toString)
3574         after performing the access check.
3575
3576         I can't really think of a meaningful test for this change.  It's more
3577         security hygiene.
3578
3579         * bindings/js/JSDOMWindowCustom.cpp:
3580         (WebCore::JSDOMWindow::setLocation):
3581         (WebCore::JSDOMWindow::open):
3582         (WebCore::JSDOMWindow::showModalDialog):
3583         * bindings/js/JSLocationCustom.cpp:
3584         (WebCore::JSLocation::setHref):
3585         (WebCore::JSLocation::replace):
3586         (WebCore::JSLocation::assign):
3587         * bindings/v8/custom/V8DOMWindowCustom.cpp:
3588         (WebCore::V8Custom::WindowSetTimeoutImpl):
3589         (WebCore::if):
3590         (CALLBACK_FUNC_DECL):
3591         (V8Custom::WindowSetLocation):
3592         (V8Custom::ClearTimeoutImpl):
3593         * bindings/v8/custom/V8LocationCustom.cpp:
3594         (WebCore::ACCESSOR_SETTER):
3595         (WebCore::CALLBACK_FUNC_DECL):
3596
3597 2009-09-21  Dumitru Daniliuc  <dumi@chromium.org>
3598
3599         Reviewed by Eric Seidel.
3600
3601         Make all write transaction start with a BEGIN IMMEDIATE command
3602         instead of BEGIN.
3603
3604         We cannot test this change in a layout test, because in order to
3605         test it we need to spawn two database threads and execute
3606         transaction steps on these two threads in a very specific order,
3607         which seems impossible to do when they share the same main thread
3608         (as they would in a layout test). The SQLite docs and the case
3609         described in the bug though should be enough proof that we do have
3610         a problem here and that this patch will fix it.
3611
3612         Relevant SQLite documentation:
3613         http://www.sqlite.org/lang_transaction.html
3614         http://www.sqlite.org/lockingv3.html#locking
3615
3616         https://bugs.webkit.org/show_bug.cgi?id=29218
3617
3618         * platform/sql/SQLiteTransaction.cpp:
3619         (WebCore::SQLiteTransaction::SQLiteTransaction): Added a readOnly
3620         parameter.
3621         (WebCore::SQLiteTransaction::begin): Changed to BEGIN IMMEDIATE
3622         for write transactions.
3623         * platform/sql/SQLiteTransaction.h:
3624         * storage/SQLTransaction.cpp:
3625         (WebCore::SQLTransaction::openTransactionAndPreflight): Passing
3626         the read-only flag to the SQLiteTransaction instance.
3627
3628 2009-09-21  Brady Eidson  <beidson@apple.com>
3629
3630         Rubberstamped by Mark Rowe.
3631
3632         * DerivedSources.make: Fix the Xcode build on SnowLeopard.
3633
3634 2009-09-15  John Abd-El-Malek  <jam@chromium.org>
3635
3636         Reviewed by Darin Fisher.
3637
3638         Prevent sleeps in unload handlers.
3639         https://bugs.webkit.org/show_bug.cgi?id=29193
3640
3641         Test: fast/dom/Window/slow_unload_handler.html
3642
3643         * WebCore.gypi:
3644         * bindings/v8/DateExtension.cpp: Added.
3645         (WebCore::DateExtension::DateExtension):
3646         (WebCore::DateExtension::get):
3647         (WebCore::DateExtension::setAllowSleep):
3648         (WebCore::DateExtension::GetNativeFunction):
3649         (WebCore::DateExtension::weakCallback):
3650         (WebCore::DateExtension::GiveEnableSleepDetectionFunction):
3651         (WebCore::DateExtension::OnSleepDetected):
3652         * bindings/v8/DateExtension.h: Added.
3653         * bindings/v8/V8AbstractEventListener.cpp:
3654         (WebCore::V8AbstractEventListener::invokeEventHandler):
3655         * bindings/v8/V8Proxy.cpp: