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