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