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