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