1 2009-09-25 Geoffrey Garen <ggaren@apple.com>
3 Reviewed by Darin Adler.
5 Inlined some object creation code, including lexicalGlobalObject access
6 https://bugs.webkit.org/show_bug.cgi?id=29750
8 * bindings/js/JSInspectorBackendCustom.cpp:
9 (WebCore::JSInspectorBackend::currentCallFrame):
10 * inspector/JavaScriptDebugServer.cpp:
11 (WebCore::JavaScriptDebugServer::hasBreakpoint): Updated for JavaScriptCore
14 2009-09-25 Dave Hyatt <hyatt@apple.com>
16 Reviewed by Anders Carlsson.
18 https://bugs.webkit.org/show_bug.cgi?id=24399
19 Make @import work in user stylesheets. The first bug was that the URL wasn't being set on the
20 user sheets themselves, so relative @import URLs couldn't resolve properly. The second bug
21 was that the loads would be denied. This is fixed by using the requestUserCSSStyleSheet method
22 instead of the normal request method. In order to know when to do this, CSSStyleSheets now have
23 a propagated boolean, m_isUserStyleSheet, that lets them know if they are user stylesheets or not.
25 * css/CSSImportRule.cpp:
26 (WebCore::CSSImportRule::insertedIntoParent):
27 * css/CSSStyleSheet.cpp:
28 (WebCore::CSSStyleSheet::CSSStyleSheet):
29 * css/CSSStyleSheet.h:
30 (WebCore::CSSStyleSheet::setIsUserStyleSheet):
31 (WebCore::CSSStyleSheet::isUserStyleSheet):
33 (WebCore::Document::pageUserSheet):
34 (WebCore::Document::pageGroupUserSheets):
36 2009-09-25 Simon Fraser <simon.fraser@apple.com>
38 Reviewed by Darin Adler.
40 Crash with hardware accelerated rotation of a PDF image in a data URL
41 <rdar://problem/7250378>
43 PDF images don't return a color space from CGImageGetColorSpace(),
44 so we need to null-check the return value before use.
46 Test: compositing/color-matching/pdf-image-match.html
48 * platform/graphics/mac/GraphicsLayerCA.mm:
49 (WebCore::GraphicsLayerCA::setContentsToImage):
51 2009-09-25 Darin Adler <darin@apple.com>
53 Reviewed by Geoffrey Garen.
55 Null-deref when first access to an Attr node is after its Element is destroyed
56 https://bugs.webkit.org/show_bug.cgi?id=29748
58 Test: fast/dom/Attr/access-after-element-destruction.html
60 * bindings/js/JSAttrCustom.cpp:
61 (WebCore::JSAttr::markChildren): Added. Keeps the ownerElement alive as
62 long as the Attr is alive.
64 * bindings/js/JSNamedNodeMapCustom.cpp:
65 (WebCore::JSNamedNodeMap::markChildren): Added. Keeps the Element alive as
66 long as the NamedNodeMap is alive.
68 * dom/Attr.idl: Added CustomMarkFunction attribute.
70 * dom/NamedAttrMap.cpp:
71 (WebCore::NamedNodeMap::getAttributeItem): Tweaked formatting.
72 (WebCore::NamedNodeMap::detachFromElement): Call clearAttributes so we don't
73 have attributes hanging around that might need an Attr node created; that way
74 we won't crash with a null-dereference trying to deal with one of them. This
75 can't happen when working with JavaScript since the Element will be kept
76 alive due to the change above.
77 (WebCore::NamedNodeMap::addAttribute): Fix function name in comment.
78 (WebCore::NamedNodeMap::removeAttribute): Removed unneeded "+ 1" and added
81 * dom/NamedAttrMap.h: Made the element function public so it can be used by
82 the JavaScript binding to keep the Element alive.
84 * dom/NamedNodeMap.idl: Added CustomMarkFunction attribute.
86 2009-09-24 Alexey Proskuryakov <ap@apple.com>
88 Reviewed by Darin Adler and Sam Weinig.
90 Onclick not fired for an element copied with cloneContents() or cloneNode()
91 https://bugs.webkit.org/show_bug.cgi?id=25130
93 The change here is that JS event listeners don't keep a reference to a global object from
94 where they were created, and instead take it as a parameter when parsing source code. Also,
95 the listener creation won't fail just because it happens for an element in a frameless
97 Thus, moving nodes between documents no longer results in having incorrect registered
98 lazy event listeners on them.
100 Tests: fast/events/attribute-listener-cloned-from-frameless-doc-context-2.html
101 fast/events/attribute-listener-cloned-from-frameless-doc-context.html
102 fast/events/attribute-listener-cloned-from-frameless-doc.xhtml
103 fast/events/attribute-listener-extracted-from-frameless-doc-context-2.html
104 fast/events/attribute-listener-extracted-from-frameless-doc-context.html
106 * bindings/js/JSEventListener.cpp:
107 (WebCore::JSEventListener::JSEventListener): Don't take a reference to JSDOMGlobalObject.
108 (WebCore::JSEventListener::jsFunction): Take ScriptExecutionContext as a parameter for
109 getting to JSDOMGlobalObject. It's not used in base class, but is in JSLazyEventListner.
110 (WebCore::JSEventListener::markJSFunction): Don't mark the global object.
111 (WebCore::JSEventListener::handleEvent): Get global object from ScriptExecutionContext.
112 (WebCore::JSEventListener::reportError): Ditto.
114 * bindings/js/JSEventListener.h: (WebCore::JSEventListener::create): Don't keep a reference
115 to JSDOMGlobalObject.
117 * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::parseCode): Listener
118 creation was split between this function and ScriptEventListener; moved it here, as JS
119 global object can be different now.
121 * bindings/js/JSLazyEventListener.h: (WebCore::JSLazyEventListener::create): Keep source URL,
122 which can not be determined at parsing time.
124 * bindings/js/ScriptEventListener.cpp: (WebCore::createAttributeEventListener): Moved code
125 for listener creation to JSLazyEventListener. XSSAuditor code remains here, because tests
126 expect that errors are logged at document parsing time, and because I don't know what other
127 side effects moving it vould have.
129 * dom/EventListener.h: handleEvent() and reportError() now take ScriptExecutionContext,
130 because JSC needs a global context here.
132 * bindings/js/JSAbstractWorkerCustom.cpp:
133 (WebCore::JSAbstractWorker::addEventListener):
134 (WebCore::JSAbstractWorker::removeEventListener):
135 * bindings/js/JSDOMApplicationCacheCustom.cpp:
136 (WebCore::JSDOMApplicationCache::addEventListener):
137 (WebCore::JSDOMApplicationCache::removeEventListener):
138 * bindings/js/JSDOMGlobalObject.cpp:
139 (WebCore::JSDOMGlobalObject::createJSAttributeEventListener):
140 * bindings/js/JSDOMWindowCustom.cpp:
141 (WebCore::JSDOMWindow::addEventListener):
142 (WebCore::JSDOMWindow::removeEventListener):
143 * bindings/js/JSEventSourceCustom.cpp:
144 (WebCore::JSEventSource::addEventListener):
145 (WebCore::JSEventSource::removeEventListener):
146 * bindings/js/JSMessagePortCustom.cpp:
147 (WebCore::JSMessagePort::addEventListener):
148 (WebCore::JSMessagePort::removeEventListener):
149 * bindings/js/JSNodeCustom.cpp:
150 (WebCore::JSNode::addEventListener):
151 (WebCore::JSNode::removeEventListener):
152 * bindings/js/JSSVGElementInstanceCustom.cpp:
153 (WebCore::JSSVGElementInstance::addEventListener):
154 (WebCore::JSSVGElementInstance::removeEventListener):
155 * bindings/js/JSWorkerContextCustom.cpp:
156 (WebCore::JSWorkerContext::addEventListener):
157 (WebCore::JSWorkerContext::removeEventListener):
158 * bindings/js/JSXMLHttpRequestCustom.cpp:
159 (WebCore::JSXMLHttpRequest::addEventListener):
160 (WebCore::JSXMLHttpRequest::removeEventListener):
161 * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
162 (WebCore::JSXMLHttpRequestUpload::addEventListener):
163 (WebCore::JSXMLHttpRequestUpload::removeEventListener):
164 * bindings/objc/ObjCEventListener.h:
165 * bindings/objc/ObjCEventListener.mm:
166 (WebCore::ObjCEventListener::handleEvent):
167 * bindings/scripts/CodeGeneratorJS.pm:
168 * dom/EventTarget.cpp:
169 (WebCore::EventTarget::fireEventListeners):
170 * inspector/InspectorDOMAgent.cpp:
171 (WebCore::InspectorDOMAgent::handleEvent):
172 * inspector/InspectorDOMAgent.h:
173 * inspector/InspectorDOMStorageResource.cpp:
174 (WebCore::InspectorDOMStorageResource::handleEvent):
175 * inspector/InspectorDOMStorageResource.h:
176 * loader/ImageDocument.cpp:
177 (WebCore::ImageEventListener::handleEvent):
178 * svg/animation/SVGSMILElement.cpp:
179 (WebCore::ConditionEventListener::handleEvent):
180 * workers/WorkerContext.cpp:
181 (WebCore::WorkerContext::reportException):
182 Don't pass global object to JSEventListener::create(), which no longer needs it.
183 Note that some of these functions still have an early return for null global object, which
184 can probably be removed in a later patch.
185 Pass ScriptExecutionContext to EventListener methods that now need it.
187 2009-09-25 Enrica Casucci <enrica@apple.com>
189 Reviewed by Darin Adler, Dan Bernstein, Adele Peterson, and others.
191 Fix for https://bugs.webkit.org/show_bug.cgi?id=29740
192 <rdar://problem/7168738> Gmail: After changing a foreground text color, pressing return doesn't apply background to new line
194 Change the way style is preserved when inserting a new paragraph.
195 The original code handled insertion at the beginning and at the end of a paragraph as special
196 cases. The newly created paragraph contained a set of nodes generated starting from the
197 computed style of the insertion node. This approach has two problems:
198 1. if the insertion node has a non opaque background color and one of the parent element did have
199 a solid background color the new paragraph did not have the element with the solid color in the tree.
200 2. in some circumstances it generated more markup than the original paragraph had (a span with bold, italic,
201 background color and some font attribute was being reproduced as span + bold + italic + font as separate tags.
202 The new approach is to recreate in the new paragraph the same hierarchy of nodes found in the
203 paragraph where the insertion point is.
205 Test: editing/inserting/insert-bg-font.html
207 * editing/InsertParagraphSeparatorCommand.cpp:
208 (WebCore::InsertParagraphSeparatorCommand::getAncestorsInsideBlock): retrieves the list of all the ancestors
209 between the insert node and the outer block.
210 (WebCore::InsertParagraphSeparatorCommand::cloneHierarchyUnderNewBlock): uses the list of ancestors to recreate
211 in the new paragraph the same element hierarchy present in the starting paragraph.
212 (WebCore::InsertParagraphSeparatorCommand::doApply): changed the code to handle the general case of insertion
213 in the middle of the paragraph to use the new methods. Changed the handling of the insertion at the beginning and
214 at the end of the paragraph to use the new methods instead of applying the calculated style.
215 * editing/InsertParagraphSeparatorCommand.h: added methods getAncestorsInsideBlock and cloneHierarchyUnderNewBlock.
217 2009-09-25 Patrick Mueller <Patrick_Mueller@us.ibm.com>
219 Reviewed by Timothy Hatcher.
221 Content-type parameters not taken into account when building form-data
222 https://bugs.webkit.org/show_bug.cgi?id=28970
224 existing manual test case extended with new tests
226 * English.lproj/localizedStrings.js:
227 * inspector/front-end/ResourceView.js:
228 (WebInspector.ResourceView.prototype._refreshFormData):
229 (WebInspector.ResourceView.prototype._refreshParms):
230 * manual-tests/inspector/display-form-data.html:
232 2009-09-25 Yuan Song <song.yuan@ericsson.com>
234 Reviewed by Darin Adler.
236 https://bugs.webkit.org/show_bug.cgi?id=14566
238 Raise SECURITY_ERR exception if an attempt is made to change document.domain to an invalid value.
240 Test: fast/js/invalid-domain-change-throws-exception.html
243 (WebCore::Document::setDomain):
247 2009-09-25 Adam Barth <abarth@webkit.org>
249 Reviewed by Dimitri Glazkov.
251 [V8] Teach ScheduledAction::execute about isolated worlds
252 https://bugs.webkit.org/show_bug.cgi?id=27703
254 When setTimeout is called with a string argument in an isolated
255 world, we now compile the string in the isolated world.
257 Last time we tried this change, we got a lot of crashes. This
258 time we're using a fresh local handle as our context to avoid
259 trouble if the peristent handle gets disposed before we leave
262 Test: fast/dom/timer-clear-interval-in-handler-and-generate-error.html
264 * bindings/v8/ScheduledAction.cpp:
265 (WebCore::ScheduledAction::execute):
267 2009-09-25 Paul Godavari <paul@chromium.org>
269 Reviewed by Darin Fisher.
271 Fix a regression in Mac Chromium popup menus, where the user's
272 selection was ignored and the popup became unresponsive.
273 https://bugs.webkit.org/show_bug.cgi?id=29726
275 The fix is to notify the popup's client that the popup was hidden,
276 even if the popup has no parent.
278 * platform/chromium/PopupMenuChromium.cpp:
279 (WebCore::PopupListBox::hidePopup):
281 2009-09-25 Alexander Pavlov <apavlov@chromium.org>
283 Reviewed by Dan Bernstein.
285 Enable Pasteboard::writePlainText for Chromium and fix code style nits.
286 https://bugs.webkit.org/show_bug.cgi?id=29734
288 * platform/chromium/PasteboardChromium.cpp:
289 (WebCore::Pasteboard::writePlainText):
290 * platform/gtk/PasteboardGtk.cpp:
291 (WebCore::Pasteboard::writePlainText):
292 (WebCore::Pasteboard::writeURL):
293 * platform/mac/PasteboardMac.mm:
294 (WebCore::Pasteboard::writeSelection):
295 (WebCore::Pasteboard::writePlainText):
296 (WebCore::Pasteboard::writeURL):
297 * platform/qt/PasteboardQt.cpp:
298 (WebCore::Pasteboard::writePlainText):
300 2009-09-25 Yongjun Zhang <yongjun.zhang@nokia.com>
302 Reviewed by Ariya Hidayat.
304 https://bugs.webkit.org/show_bug.cgi?id=28876
305 [Qt] reduce peak memory consumption of text decoding.
307 Chop large input buffer into small buffers to reduce peak memory
310 * platform/text/qt/TextCodecQt.cpp:
311 (WebCore::TextCodecQt::decode):
313 2009-09-24 Jon Honeycutt <jhoneycutt@apple.com>
315 Add a mechanism for automatically halting plug-ins.
317 Reviewed by Oliver Hunt and Alice Liu.
322 Update export of Page constructor.
328 * WebCore.vcproj/WebCore.vcproj:
329 Add PluginHalter.{h,cpp}, PluginHalterClient.h, and
332 * WebCore.xcodeproj/project.pbxproj:
333 Add files to Mac project.
335 * loader/EmptyClients.h:
336 Added an empty PluginHalterClient.
337 (WebCore::EmptyPluginHalterClient::shouldHaltPlugin):
340 * page/PluginHalter.cpp: Added.
341 (WebCore::PluginHalter::PluginHalter):
342 (WebCore::PluginHalter::didStartPlugin):
343 Add the object to the plug-in set. If this is the only item in the set,
344 set m_oldestStartTime to this object's time, and start the timer.
345 (WebCore::PluginHalter::didStopPlugin):
346 Remove the plug-in from the set.
347 (WebCore::PluginHalter::timerFired):
348 Find the cut-off time as the current time minus the allowed run time;
349 plug-ins older than this may be halted. Iterate over the plug-ins. Find
350 the object with the oldest start time that is too young to be halted;
351 we'll use its start time to set the timer's next fire time. For all
352 plug-ins that are candidates to be halted, call the
353 PluginHalterClient's shouldHaltPlugin(). If this function returns true,
354 call the plug-in's halt() function. Remove these objects from the set
355 of tracked plug-ins. Call startTimerIfNecessary() to restart the timer.
356 (WebCore::PluginHalter::startTimerIfNecessary):
357 If the timer is set to fire, or the set of tracked plug-ins is empty,
358 return early. Set the timer to fire after the oldest plug-in has run
359 for the allowed run time.
361 * page/PluginHalter.h: Added.
362 (WebCore::PluginHalter::setPluginAllowedRunTime):
364 * page/PluginHalterClient.h: Added.
365 (WebCore::PluginHalterClient::~PluginHalterClient):
368 (WebCore::Page::Page):
369 Initialize m_pluginHalterClient. Call pluginHalterEnabledStateChanged()
370 to create the PluginHalter if necessary.
371 (WebCore::Page::pluginHalterEnabledStateChanged):
372 If plug-in halting is enabled, create the PluginHalter. If it is
374 (WebCore::Page::pluginAllowedRunTimeChanged):
375 If there is a plug-in halter, call its setPluginAllowedRunTime().
376 (WebCore::Page::didStartPlugin):
377 If there is a plug-in halter, call its didStartPlugin().
378 (WebCore::Page::didStopPlugin):
379 If there is a plug-in halter, call its didStopPlugin().
382 Add a parameter to the Page constructor for the PluginHalterClient.
383 Added declarations for didStartPlugin() and didStopPlugin(), which are
384 called when HaltablePlugins are added to or removed from the page. Adds
385 pluginAllowedRunTimeChanged() and pluginHalterEnabledStateChanged() to
386 notify the Page when these settings are changed. Added members to hold
387 the PluginHalter and the PluginHalterClient.
390 (WebCore::Settings::Settings):
391 (WebCore::Settings::setPluginHalterEnabled):
392 If the enabled state has changed, call the Page's
393 pluginHalterEnabledStateChanged().
394 (WebCore::Settings::setPluginAllowedRunTime):
395 Call the Page's pluginAllowedRunTimeChanged().
398 (WebCore::Settings::pluginHalterEnabled):
399 (WebCore::Settings::pluginAllowedRunTime):
401 * page/HaltablePlugin.h: Added. Defines an interface for plug-ins that
402 can be automatically halted.
403 (WebCore::HaltablePlugin::~HaltablePlugin):
405 * svg/graphics/SVGImage.cpp:
406 (WebCore::SVGImage::dataChanged):
407 Pass a dummy PluginHalterClient.
409 2009-09-24 Simon Fraser <simon.fraser@apple.com>
411 Reviewed by Dan Bernstein.
413 REGRESSION: webkit-transform scale no longer works properly in nightly build
414 https://bugs.webkit.org/show_bug.cgi?id=29730
416 When the initial or final state of a scale animation does not specify a transform,
417 use a default scale of 1, rather than zero.
419 Test: compositing/transitions/scale-transition-no-start.html
421 * platform/graphics/mac/GraphicsLayerCA.mm:
422 (WebCore::getTransformFunctionValue):
424 2009-09-24 John Gregg <johnnyg@google.com>
426 Reviewed by Eric Seidel.
428 isEnabled switch for notifications (experimental) in Page Settings
429 https://bugs.webkit.org/show_bug.cgi?id=28930
431 Adds a run-time flag in Settings object that controls whether
432 to expose desktop notifications.
434 No new test, but test code also modified to set this preference.
436 * page/DOMWindow.cpp:
437 (WebCore::DOMWindow::webkitNotifications): check preference before returning notifications object
439 (WebCore::Settings::Settings):
440 (WebCore::Settings::setExperimentalNotificationsEnabled):
442 (WebCore::Settings::experimentalNotificationsEnabled):
444 2009-09-24 Dan Bernstein <mitz@apple.com>
446 Reviewed by Sam Weinig.
448 Fix <rdar://problem/7162000> Crash while trying to
449 calculate the horizontal position of image
451 Test: fast/inline-block/relative-positioned-rtl-crash.html
453 * rendering/RenderBox.cpp:
454 (WebCore::RenderBox::calcAbsoluteHorizontalReplaced): Corrected an
455 isInline() test to isRenderInline(). This is similar to r41259.
457 2009-09-24 Jessie Berlin <jberlin@webkit.org>
459 Reviewed by Timothy Hatcher.
461 Fix expanding profile call stacks being broken after sorting.
462 https://bugs.webkit.org/show_bug.cgi?id=26423
464 * inspector/front-end/ProfileDataGridTree.js:
465 (WebInspector.ProfileDataGridNode.prototype.sort):
466 Set shouldRefreshChildren to true on collapsed nodes with children so that expanding it
467 causes the children to be placed in the right positions.
469 2009-09-24 Geoffrey Garen <ggaren@apple.com>
471 Reviewed by Stephanie Lewis.
473 Fixed sudden termination console spew due to too many calls to
474 enableSuddenTermination.
476 <rdar://problem/7063125> 10A410: Safari logging enableSuddenTermination errors
478 * page/DOMWindow.cpp:
479 (WebCore::removeUnloadEventListener):
480 (WebCore::removeAllUnloadEventListeners):
481 (WebCore::removeBeforeUnloadEventListener):
482 (WebCore::removeAllBeforeUnloadEventListeners): Only
483 enableSuddenTermination if the set of listeners is empty *and* this
484 window was in the set. Otherwise, a no-op will cause us to enableSuddenTermination.
486 2009-09-24 Carol Szabo <carol.szabo@nokia.com>
488 Reviewed by Alexey Proskuryakov.
490 WebKit returns "" instead of null when getting
491 inexistent, forbidden or invalidly named headers.
492 https://bugs.webkit.org/show_bug.cgi?id=29140
494 * xml/XMLHttpRequest.cpp:
495 (WebCore::XMLHttpRequest::getResponseHeader):
496 Changed to return null as it should according to the spec.
498 2009-09-24 Jeremy Orlow <jorlow@chromium.org>
500 Reviewed by Dimitri Glazkov.
502 Add GYP generated files to svn:ignore
503 https://bugs.webkit.org/show_bug.cgi?id=29724
505 Adding the following files to the svn:ignore list (all in the
506 WebCore/WebCore.gyp directory)
512 WebCore_Release.rules
513 WebCore_Release - no tcmalloc.rules
516 WebCore_Debug_rules.mk
517 WebCore_Release_rules.mk
518 WebCore_Release - no tcmalloc_rules.mk
519 WebCore_Purify_rules.mk
523 * WebCore.gyp: Changed property svn:ignore.
525 2009-09-24 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
527 Unreviewed. Mac build fix.
529 * page/EventHandler.cpp:
530 (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal):
531 remove unused parameter from function signature;
533 2009-09-24 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
535 Reviewed by Oliver Hunt.
537 Implement correct horizontal scrollbar behavior for GTK+ also on
540 https://bugs.webkit.org/show_bug.cgi?id=29348
541 [Gtk] Scrollwheel on horizontal scrollbars should slide horizontally
543 Test: platform/gtk/scrollbars/overflow-scrollbar-horizontal-wheel-scroll.html
545 * page/EventHandler.cpp:
546 (WebCore::EventHandler::handleWheelEvent): on GTK+, when using the
547 wheel with the pointer on the horizontal scrollbar, scroll
549 * platform/PlatformWheelEvent.h:
550 * platform/gtk/WheelEventGtk.cpp:
551 (WebCore::PlatformWheelEvent::swapOrientation): allow adding a
552 vertical scroll to the horizontal one;
554 2009-09-24 Jeremy Orlow <jorlow@chromium.org>
556 Reviewed by Eric Seidel.
558 StorageNamespace::storageArea() should take in a PassRefPtr<StorageOrigin>
559 https://bugs.webkit.org/show_bug.cgi?id=29290
561 Modified StorageNamespace::storageArea() to take in a PassRefPtr<StorageOrigin>
562 per http://webkit.org/coding/RefPtr.html
564 No behavior change, so no tests.
566 * storage/StorageNamespace.h:
567 * storage/StorageNamespaceImpl.cpp:
568 (WebCore::StorageNamespaceImpl::storageArea):
569 * storage/StorageNamespaceImpl.h:
571 2009-09-24 Geoffrey Garen <ggaren@apple.com>
573 Reviewed by Sam Weinig.
575 Added back enable/disableSuddenTermination() functionality I accidentally
576 removed in my last patch.
578 * page/DOMWindow.cpp:
579 (WebCore::addUnloadEventListener):
580 (WebCore::removeUnloadEventListener):
581 (WebCore::removeAllUnloadEventListeners):
582 (WebCore::addBeforeUnloadEventListener):
583 (WebCore::removeBeforeUnloadEventListener):
584 (WebCore::removeAllBeforeUnloadEventListeners):
585 (WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
586 (WebCore::DOMWindow::~DOMWindow):
587 (WebCore::DOMWindow::addEventListener):
588 (WebCore::DOMWindow::removeEventListener):
589 (WebCore::DOMWindow::removeAllEventListeners):
591 2009-09-24 Sam Weinig <sam@webkit.org>
593 Reviewed by Steve Falkenburg and Mark Rowe.
595 Don't pass -F to GCC on non-mac platforms since it is an darwin only.
597 * DerivedSources.make:
599 2009-09-24 Sam Weinig <sam@webkit.org>
605 2009-09-23 Stephen White <senorblanco@chromium.org>
607 Reviewed by Eric Seidel.
609 Revert the relevant parts of r47925, and implement an alternate
610 fix (localize the coordinate check to GraphicsContext::clipPath()).
611 This fixes http://crbug.com/21174.
613 Covered by LayoutTests/svg/dynamic-updates/SVGClipPathElement-dom-clipPathUnits-attr.html.
615 * platform/graphics/skia/GraphicsContextSkia.cpp:
616 (WebCore::GraphicsContext::clipPath):
617 * platform/graphics/skia/PlatformContextSkia.cpp:
618 (PlatformContextSkia::currentPathInLocalCoordinates):
620 2009-09-24 Brady Eidson <beidson@apple.com>
622 Reviewed by Sam Weinig.
624 Merge changes from Mozilla's FTP directory parser.
625 <rdar://problem/7227620> and https://bugs.webkit.org/show_bug.cgi?id=29294
627 FTP layout tests not possible at this time.
628 https://bugs.webkit.org/show_bug.cgi?id=29719 tracks making them possible.
630 * loader/FTPDirectoryParser.cpp:
631 (WebCore::ParsingFailed):
632 (WebCore::parseOneFTPLine):
634 2009-09-24 Philippe Normand <pnormand@igalia.com>
636 Reviewed by Gustavo Noronha.
638 [GTK] re-enable some media tests
639 https://bugs.webkit.org/show_bug.cgi?id=29716
641 make canPlayType() return "probably" if mime-type is known
642 and codecs string is not empty. If codecs is empty return
645 * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
646 (WebCore::MediaPlayerPrivate::supportsType):
648 2009-09-24 Sam Weinig <sam@webkit.org>
650 Reviewed by Dan Bernstein.
652 Fix for https://bugs.webkit.org/show_bug.cgi?id=29703
653 Add a function to element to check whether it matches a CSS selector
655 Implement Element.webkitMatchesSelector.
657 * css/CSSSelectorList.cpp:
658 (WebCore::forEachTagSelector):
659 (WebCore::forEachSelector):
660 (WebCore::SelectorNeedsNamespaceResolutionFunctor::operator()):
661 (WebCore::CSSSelectorList::selectorsNeedNamespaceResolution):
662 * css/CSSSelectorList.h:
663 Moved code to iterate the CSSSelectorList and determine if any
664 selectors need namespace resolution from a static function in
665 Node.cpp to CSSSelectorList so that it can be used by webkitMatchesSelector
666 as well as querySelector/querySelectorAll.
669 (WebCore::Element::webkitMatchesSelector):
672 Implement the new function. Handles exceptional cases identically to
673 querySelector/querySelectorAll.
676 (WebCore::Node::querySelector):
677 (WebCore::Node::querySelectorAll):
678 Moved selectorsNeedNamespaceResolution to CSSSelectorList from here.
680 2009-09-24 Vitaly Repeshko <vitalyr@chromium.org>
682 Reviewed by Dimitri Glazkov.
684 [V8] Fixed bindings build after http://trac.webkit.org/changeset/48701
685 https://bugs.webkit.org/show_bug.cgi?id=29713
687 Got rid of isWindowEvent in function signatures:
688 * bindings/v8/V8AbstractEventListener.cpp:
689 (WebCore::V8AbstractEventListener::invokeEventHandler):
690 (WebCore::V8AbstractEventListener::handleEvent):
691 (WebCore::V8AbstractEventListener::getReceiverObject):
692 * bindings/v8/V8AbstractEventListener.h:
693 * bindings/v8/V8LazyEventListener.cpp:
694 (WebCore::V8LazyEventListener::callListenerFunction):
695 * bindings/v8/V8LazyEventListener.h:
696 * bindings/v8/V8WorkerContextEventListener.cpp:
697 (WebCore::V8WorkerContextEventListener::handleEvent):
698 (WebCore::V8WorkerContextEventListener::callListenerFunction):
699 (WebCore::V8WorkerContextEventListener::getReceiverObject):
700 * bindings/v8/V8WorkerContextEventListener.h:
701 * bindings/v8/custom/V8CustomEventListener.cpp:
702 (WebCore::V8EventListener::callListenerFunction):
703 * bindings/v8/custom/V8CustomEventListener.h:
705 Switched to EventTarget methods of adding/removing listeners:
706 * bindings/v8/custom/V8DOMApplicationCacheCustom.cpp:
707 (WebCore::toEventID):
708 (WebCore::ACCESSOR_SETTER):
710 * dom/EventTarget.h: Some functions were incorrectly marked
713 2009-09-24 Pavel Feldman <pfeldman@chromium.org>
715 Reviewed by Timothy Hatcher.
717 Web Inspector: Color-code watch expression errors with red.
719 https://bugs.webkit.org/show_bug.cgi?id=29707
721 * inspector/front-end/WatchExpressionsSidebarPane.js:
722 (WebInspector.WatchExpressionsSection.prototype.update):
723 (WebInspector.WatchExpressionTreeElement.prototype.update):
724 * inspector/front-end/inspector.css:
726 2009-09-24 Pavel Feldman <pfeldman@chromium.org>
728 Reviewed by Timothy Hatcher.
730 Web Inspector: Fix formatting for messages derived from resource warnings,
731 couple of drive-by formatting fixes.
733 https://bugs.webkit.org/show_bug.cgi?id=29705
735 * inspector/InspectorFrontend.cpp:
736 (WebCore::InspectorFrontend::addMessageToConsole):
737 * inspector/front-end/ConsoleView.js:
738 * inspector/front-end/InjectedScript.js:
739 (InjectedScript._evaluateAndWrap):
740 * inspector/front-end/WatchExpressionsSidebarPane.js:
741 (WebInspector.WatchExpressionsSection.prototype.update):
743 2009-09-22 Pavel Feldman <pfeldman@chromium.org>
745 Reviewed by Timothy Hatcher.
747 WebInspector: Implement InspectorController::copyNode(id).
749 https://bugs.webkit.org/show_bug.cgi?id=28357
751 * inspector/InspectorBackend.cpp:
752 (WebCore::InspectorBackend::copyNode):
753 * inspector/InspectorBackend.h:
754 * inspector/InspectorBackend.idl:
755 * inspector/front-end/ElementsPanel.js:
756 (WebInspector.ElementsPanel.prototype.handleCopyEvent):
758 2009-09-24 Oliver Hunt <oliver@apple.com>
760 Reviewed by NOBODY(rollout)
762 Roll out r48712 as it is incorrect.
764 Overriding getPropertyNames is incorrect.
766 * bridge/runtime_array.cpp:
767 * bridge/runtime_array.h:
769 2009-09-24 Xan Lopez <xlopez@igalia.com>
771 Revert r48697, since it broke key handling notification to GTK+.
773 * platform/gtk/KeyEventGtk.cpp:
774 (WebCore::keyIdentifierForGdkKeyCode):
775 (WebCore::singleCharacterString):
777 2009-09-24 Philippe Normand <pnormand@igalia.com>
779 Reviewed by Xan Lopez.
781 [GTK] GStreamer MediaPlayer is unable to correctly querry duration
782 https://bugs.webkit.org/show_bug.cgi?id=24639
784 check duration returned by gst_element_query_duration() only
785 when using GStreamer < 0.10.23.
787 * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
788 (WebCore::MediaPlayerPrivate::duration):
790 2009-09-24 Benjamin Poulain <benjamin.poulain@nokia.com>
792 Reviewed by Eric Seidel.
794 The indices of RuntimeArray should be enumerated like for a regular array.
795 https://bugs.webkit.org/show_bug.cgi?id=29005
797 * bridge/runtime_array.cpp:
798 (JSC::RuntimeArray::getPropertyNames):
799 * bridge/runtime_array.h:
801 2009-09-23 Alexander Pavlov <apavlov@chromium.org>
803 Reviewed by Eric Seidel.
805 Introduce Pasteboard::writePlaintext(const String&) so that copying
806 of the inspected elements HTML will be possible in WebInspector.
807 https://bugs.webkit.org/show_bug.cgi?id=29634
809 * platform/Pasteboard.h:
810 * platform/android/TemporaryLinkStubs.cpp:
811 (Pasteboard::writePlainText):
812 * platform/chromium/ChromiumBridge.h:
813 * platform/chromium/PasteboardChromium.cpp:
814 (WebCore::Pasteboard::writePlainText):
815 * platform/gtk/PasteboardGtk.cpp:
816 (WebCore::Pasteboard::writePlainText):
817 * platform/haiku/PasteboardHaiku.cpp:
818 (WebCore::Pasteboard::writePlainText):
819 * platform/mac/PasteboardMac.mm:
820 (WebCore::Pasteboard::writePlainText):
821 * platform/qt/PasteboardQt.cpp:
822 (WebCore::Pasteboard::writePlainText):
823 * platform/win/PasteboardWin.cpp:
824 (WebCore::Pasteboard::writeSelection):
825 (WebCore::Pasteboard::writePlainText):
826 * platform/wince/PasteboardWince.cpp:
827 (WebCore::Pasteboard::writePlainText):
828 * platform/wx/PasteboardWx.cpp:
829 (WebCore::Pasteboard::writeSelection):
830 (WebCore::Pasteboard::writePlainText):
831 (WebCore::Pasteboard::writeURL):
833 2009-09-24 Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
835 Reviewed by Simon Hausmann.
837 Fix QApp::translate() calls to provide the correct class name without
840 * platform/qt/Localizations.cpp:
841 (WebCore::localizedMediaTimeDescription):
843 2009-09-24 Geoffrey Garen <ggaren@apple.com>
845 More build fix: Removed JSSharedWorkerContextCustom.cpp from project
846 files, since it no longer exists in the repository.
851 * WebCore.vcproj/WebCore.vcproj:
853 2009-09-24 Geoffrey Garen <ggaren@apple.com>
855 Windows build fix: Declare set/unsetPendingActivity public, so
856 SharedWorkerScriptLoader can call them.
858 * dom/ActiveDOMObject.h:
860 2009-09-24 Geoffrey Garen <ggaren@apple.com>
862 Fixed a bit of the Windows build.
864 * workers/SharedWorker.idl: Declare a custom mark function. (I accidentally
865 removed this in my last patch.)
866 * WebCore.xcodeproj/project.pbxproj: Added JSSharedWorkerCustom.cpp back
867 to the build. (I accidentally removed this in my last patch.)
869 2009-09-23 Geoffrey Garen <ggaren@apple.com>
871 32-bit build fix: restore previous cast that I thought was unnecessary.
873 * xml/XMLHttpRequest.cpp:
874 (WebCore::XMLHttpRequest::didSendData):
875 (WebCore::XMLHttpRequest::didReceiveData):
877 2009-09-23 Geoffrey Garen <ggaren@apple.com>
879 Reviewed by Sam Weinig.
881 Bring a little sanity to this crazy EventTarget world of ours
882 https://bugs.webkit.org/show_bug.cgi?id=29701
884 Lots of EventTarget refactoring to achieve a single shared implementation
885 that fixes some of the performance and correctness bugs of the many individual
886 implementations, and makes reasoning about EventTargets and EventListeners
889 The basic design is this:
890 - EventTarget manages a set of EventListeners.
891 - onXXX EventListener attributes forward to standard EventTarget APIs.
892 - Since the onXXX code is repetitive, it is usually done with macros
893 of the form DEFINE_ATTRIBUTE_EVENT_LISTENER(attributeName).
894 - EventTarget provides a shared implementation of dispatchEvent,
895 which subclasses with special event dispatch rules, like Node, override.
896 - To support Node, which lazily instantiates its EventTarget data,
897 EventTarget has no data members, and instead makes a virtual call
898 to get its data from wherever its subclass chose to store it.
900 Code that used to call dispatchEvent, passing an ExceptionCode paratmeter,
901 even though no exception could be thrown, has been changed not to do so,
902 to improve clarity and performance.
904 Code that used to call a special dispatchXXXEvent function, which just
905 turned around and called dispatchEvent, has been changed to call
906 dispatchEvent, to improve clarity and performance.
909 * WebCore.xcodeproj/project.pbxproj: Another day in the life of a WebKit
912 * bindings/js/JSDOMBinding.cpp:
913 (WebCore::isObservableThroughDOM): Updated for Node API change. Added
914 "is not in the document but is firing event listeners" as a condition
915 that makes a Node observable in the DOM, so that event listeners firing
916 on removed nodes are not destroyed midstream. (This was a long-standing
917 bug that was somewhat hidden by the old implementation's habit of
918 copying the RegisteredEventListener vector before firing events, which
919 would keep almost all the relevant objects from being destroyed.)
921 * bindings/js/JSEventListener.cpp:
922 (WebCore::JSEventListener::handleEvent): Removed the isWindowEvent flag
923 because it was one of the most elaborately planned no-ops in the history
924 of software crime, and one of the reasons clients thought they needed more
925 than one dispatchEvent function even though they didn't.
926 * bindings/js/JSEventListener.h:
928 * bindings/js/JSDOMWindowCustom.cpp:
929 (WebCore::JSDOMWindow::markChildren):
930 (WebCore::JSMessagePort::markChildren):
931 * bindings/js/JSNodeCustom.cpp:
932 (WebCore::JSNode::markChildren):
933 * bindings/js/JSAbstractWorkerCustom.cpp:
934 * bindings/js/JSDOMApplicationCacheCustom.cpp:
935 * bindings/js/JSDedicatedWorkerContextCustom.cpp:
936 * bindings/js/JSEventSourceCustom.cpp:
937 * bindings/js/JSMessagePortCustom.cpp:
938 * bindings/js/JSSharedWorkerContextCustom.cpp: Removed.
939 * bindings/js/JSWebSocketCustom.cpp:
940 * bindings/js/JSWorkerContextCustom.cpp:
941 (WebCore::JSWorkerContext::markChildren):
942 * bindings/js/JSWorkerCustom.cpp:
943 * bindings/js/JSXMLHttpRequestCustom.cpp:
944 (WebCore::JSXMLHttpRequest::markChildren):
945 * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
946 (WebCore::JSXMLHttpRequestUpload::markChildren): EventListener marking is
947 now autogenerated. Classes that still have custom mark functions for other
948 reasons now call a shared EventTarget API to mark their EventListeners.
950 * bindings/objc/ObjCEventListener.h:
951 * bindings/objc/ObjCEventListener.mm:
952 (WebCore::ObjCEventListener::handleEvent): Bye bye isWindowEvent.
954 * bindings/scripts/CodeGeneratorJS.pm: Autogeneration support for
955 marking and invalidating event listeners.
957 * dom/CharacterData.cpp:
958 (WebCore::CharacterData::dispatchModifiedEvent):
959 * dom/ContainerNode.cpp:
960 (WebCore::ContainerNode::insertBefore):
961 (WebCore::ContainerNode::replaceChild):
962 (WebCore::willRemoveChild):
963 (WebCore::ContainerNode::appendChild):
964 (WebCore::dispatchChildInsertionEvents):
965 (WebCore::dispatchChildRemovalEvents):
967 (WebCore::Document::removeAllEventListeners):
968 (WebCore::Document::implicitClose):
969 (WebCore::Document::setFocusedNode):
970 (WebCore::Document::dispatchWindowEvent):
971 (WebCore::Document::dispatchWindowLoadEvent):
972 (WebCore::Document::finishedParsing):
973 * dom/Document.h: Use dispatchEvent directly.
975 * dom/Element.h: Moved a few event listener attributes down from Node,
976 since they don't apply to all Nodes, only Elements.
978 * dom/EventListener.h: Removed isWindowEvent parameter.
980 * dom/EventNames.h: Added the "display" event name, so it works correctly
981 with attribute macros, and for performance.
983 * dom/EventTarget.cpp:
984 (WebCore::forbidEventDispatch):
985 (WebCore::allowEventDispatch):
986 (WebCore::eventDispatchForbidden): Made this code (embarrasingly) thread
987 safe, since it's now called on multiple threads. (Currently, we only forbid
988 event dispatch on the main thread. If we ever want to forbid event dispatch
989 on secondary threads, we can improve it then.)
991 (WebCore::EventTarget::addEventListener):
992 (WebCore::EventTarget::removeEventListener):
993 (WebCore::EventTarget::setAttributeEventListener):
994 (WebCore::EventTarget::getAttributeEventListener):
995 (WebCore::EventTarget::clearAttributeEventListener):
996 (WebCore::EventTarget::dispatchEvent):
997 (WebCore::EventTarget::fireEventListeners):
998 (WebCore::EventTarget::getEventListeners):
999 (WebCore::EventTarget::removeAllEventListeners):
1000 * dom/EventTarget.h:
1001 (WebCore::FiringEventEndIterator::FiringEventEndIterator):
1002 (WebCore::EventTarget::ref):
1003 (WebCore::EventTarget::deref):
1004 (WebCore::EventTarget::markEventListeners):
1005 (WebCore::EventTarget::invalidateEventListeners):
1006 (WebCore::EventTarget::isFiringEventListeners):
1007 (WebCore::EventTarget::hasEventListeners): The ONE TRUE IMPLEMENTATION of
1008 EventTarget APIs, crafted from an amalgam of all the different versions
1009 we used to have. The most significant change here is that we no longer
1010 make a copy of an EventListener vector before firing the events in the
1011 vector -- instead, we use a reference to the original vector, along with
1012 a notification mechanism for the unlikely case when an EventListener is
1013 removed from the vector. This substantially reduces malloc, copying, and
1014 refcount overhead, and complexity.
1016 * dom/InputElement.cpp:
1017 (WebCore::InputElement::setValueFromRenderer):
1018 * dom/MessageEvent.h:
1019 (WebCore::MessageEvent::create): Use dispatchEvent directly.
1021 * dom/MessagePort.cpp:
1022 (WebCore::MessagePort::dispatchMessages):
1023 (WebCore::MessagePort::eventTargetData):
1024 (WebCore::MessagePort::ensureEventTargetData):
1025 * dom/MessagePort.h:
1026 (WebCore::MessagePort::setOnmessage):
1027 (WebCore::MessagePort::onmessage):
1028 * dom/MessagePort.idl: Removed custom EventTarget implementation.
1030 * dom/MutationEvent.h:
1031 (WebCore::MutationEvent::create): Added some default values so callers
1032 can construct MutationEvents more easily, without calling a custom dispatch
1036 (WebCore::Node::addEventListener):
1037 (WebCore::Node::removeEventListener):
1038 (WebCore::Node::eventTargetData):
1039 (WebCore::Node::ensureEventTargetData):
1040 (WebCore::Node::handleLocalEvents):
1041 (WebCore::Node::dispatchEvent):
1042 (WebCore::Node::dispatchGenericEvent):
1043 (WebCore::Node::dispatchSubtreeModifiedEvent):
1044 (WebCore::Node::dispatchUIEvent):
1045 (WebCore::Node::dispatchKeyEvent):
1046 (WebCore::Node::dispatchMouseEvent):
1047 (WebCore::Node::dispatchWheelEvent):
1048 (WebCore::Node::dispatchFocusEvent):
1049 (WebCore::Node::dispatchBlurEvent):
1051 (WebCore::Node::preDispatchEventHandler):
1052 (WebCore::Node::postDispatchEventHandler):
1054 * dom/NodeRareData.h:
1055 (WebCore::NodeRareData::eventTargetData):
1056 (WebCore::NodeRareData::ensureEventTargetData): Use the shared EventTarget
1057 interface, and call dispatchEvent directly instead of custom dispatchXXXEvent
1058 functions that just forwarded to dispatchEvent.
1060 * dom/RegisteredEventListener.cpp:
1061 * dom/RegisteredEventListener.h:
1062 (WebCore::RegisteredEventListener::RegisteredEventListener):
1063 (WebCore::operator==): This is just a simple struct now, since we no longer
1064 do a complicated copy / refCount / isRemoved dance just to honor the rule
1065 that an EventListener can be removed during event dispatch.
1067 * history/CachedFrame.cpp:
1068 (WebCore::CachedFrameBase::restore): Removed another custom dispatchEvent.
1070 * html/HTMLBodyElement.cpp:
1071 * html/HTMLBodyElement.h: Use the shared EventTarget API.
1073 * html/HTMLFormControlElement.cpp:
1074 (WebCore::HTMLFormControlElement::dispatchFormControlChangeEvent):
1075 (WebCore::HTMLFormControlElement::checkValidity):
1076 * html/HTMLFormElement.cpp:
1077 (WebCore::HTMLFormElement::handleLocalEvents):
1078 (WebCore::HTMLFormElement::prepareSubmit):
1079 (WebCore::HTMLFormElement::reset):
1080 * html/HTMLFormElement.h: Use the standard dispatchEvent API.
1082 * html/HTMLFrameSetElement.cpp:
1083 * html/HTMLFrameSetElement.h: Use the shared EventTarget API.
1085 * html/HTMLImageLoader.cpp:
1086 (WebCore::HTMLImageLoader::dispatchLoadEvent):
1087 * html/HTMLInputElement.cpp:
1088 (WebCore::HTMLInputElement::onSearch):
1089 * html/HTMLMediaElement.cpp:
1090 (WebCore::HTMLMediaElement::loadInternal):
1091 * html/HTMLScriptElement.cpp:
1092 (WebCore::HTMLScriptElement::dispatchLoadEvent):
1093 (WebCore::HTMLScriptElement::dispatchErrorEvent):
1094 * html/HTMLSourceElement.cpp:
1095 (WebCore::HTMLSourceElement::errorEventTimerFired):
1096 * html/HTMLTokenizer.cpp:
1097 (WebCore::HTMLTokenizer::notifyFinished): Use the standard dispatchEvent API.
1099 * inspector/InspectorDOMAgent.cpp:
1100 (WebCore::InspectorDOMAgent::handleEvent):
1101 * inspector/InspectorDOMAgent.h:
1102 * inspector/InspectorDOMStorageResource.cpp:
1103 (WebCore::InspectorDOMStorageResource::handleEvent):
1104 * inspector/InspectorDOMStorageResource.h:
1105 * loader/FrameLoader.cpp:
1106 (WebCore::FrameLoader::stopLoading):
1107 (WebCore::FrameLoader::canCachePageContainingThisFrame):
1108 (WebCore::FrameLoader::logCanCacheFrameDecision):
1109 (WebCore::HashChangeEventTask::performTask):
1110 (WebCore::FrameLoader::pageHidden): No more isWindowEvent.
1112 * loader/ImageDocument.cpp:
1113 (WebCore::ImageEventListener::handleEvent):
1114 * loader/appcache/ApplicationCacheGroup.cpp:
1115 (WebCore::CallCacheListenerTask::performTask):
1116 * loader/appcache/ApplicationCacheHost.cpp:
1117 (WebCore::ApplicationCacheHost::notifyDOMApplicationCache):
1118 * loader/appcache/ApplicationCacheHost.h:
1119 * loader/appcache/DOMApplicationCache.cpp:
1120 (WebCore::DOMApplicationCache::eventTargetData):
1121 (WebCore::DOMApplicationCache::ensureEventTargetData):
1122 * loader/appcache/DOMApplicationCache.h:
1123 * loader/appcache/DOMApplicationCache.idl: Switched to the standard
1124 EventTarget API. As a part of this, I switched this class from using a
1125 custom internal event name enumeration to using the standard EventNames.
1127 * notifications/Notification.cpp:
1128 (WebCore::Notification::eventTargetData):
1129 (WebCore::Notification::ensureEventTargetData):
1130 * notifications/Notification.h:
1131 (WebCore::Notification::scriptExecutionContext):
1132 * notifications/Notification.idl: Switched to the standard EventTarget API.
1134 * page/DOMWindow.cpp:
1135 (WebCore::PostMessageTimer::event):
1136 (WebCore::windowsWithUnloadEventListeners):
1137 (WebCore::windowsWithBeforeUnloadEventListeners):
1138 (WebCore::allowsBeforeUnloadListeners):
1139 (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
1140 (WebCore::DOMWindow::pendingUnloadEventListeners):
1141 (WebCore::DOMWindow::dispatchAllPendingUnloadEvents): Changed the "pending"
1142 unload / beforeunload listener tracker just to track which windows had
1143 such listeners, instead of actually keeping a copy of the listeners. Now,
1144 this code can use the standard EventTarget API.
1146 (WebCore::DOMWindow::~DOMWindow):
1147 (WebCore::DOMWindow::postMessageTimerFired):
1148 (WebCore::DOMWindow::addEventListener):
1149 (WebCore::DOMWindow::removeEventListener):
1150 (WebCore::DOMWindow::dispatchLoadEvent):
1151 (WebCore::DOMWindow::dispatchEvent):
1152 (WebCore::DOMWindow::removeAllEventListeners):
1153 (WebCore::DOMWindow::captureEvents):
1154 (WebCore::DOMWindow::releaseEvents):
1155 (WebCore::DOMWindow::eventTargetData):
1156 (WebCore::DOMWindow::ensureEventTargetData):
1158 * page/DOMWindow.idl: Use the standard EventTarget APIs.
1160 * page/EventHandler.cpp:
1161 (WebCore::EventHandler::canMouseDownStartSelect):
1162 (WebCore::EventHandler::canMouseDragExtendSelect):
1163 (WebCore::EventHandler::sendResizeEvent):
1164 (WebCore::EventHandler::sendScrollEvent): Use dispatchEvent directly.
1166 * page/EventSource.cpp:
1167 (WebCore::EventSource::endRequest):
1168 (WebCore::EventSource::didReceiveResponse):
1169 (WebCore::EventSource::parseEventStreamLine):
1170 (WebCore::EventSource::stop):
1171 (WebCore::EventSource::createMessageEvent):
1172 (WebCore::EventSource::eventTargetData):
1173 (WebCore::EventSource::ensureEventTargetData):
1174 * page/EventSource.h:
1175 * page/EventSource.idl: Use the standard EventTarget APIs.
1177 * page/FocusController.cpp:
1178 (WebCore::dispatchEventsOnWindowAndFocusedNode):
1179 (WebCore::FocusController::setFocusedFrame):
1181 (WebCore::Frame::shouldClose):
1184 (WebCore::networkStateChanged):
1185 * page/animation/AnimationController.cpp:
1186 (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
1187 * rendering/RenderListBox.cpp:
1188 (WebCore::RenderListBox::valueChanged):
1189 * rendering/RenderTextControl.cpp:
1190 (WebCore::RenderTextControl::selectionChanged):
1191 * rendering/RenderTextControlMultiLine.cpp:
1192 (WebCore::RenderTextControlMultiLine::subtreeHasChanged): Use dispatchEvent.
1194 * svg/SVGElement.cpp:
1195 (WebCore::hasLoadListener): Rewritten for new EventTarget API.
1197 * svg/SVGElementInstance.cpp:
1198 (WebCore::dummyEventTargetData):
1199 (WebCore::SVGElementInstance::addEventListener):
1200 (WebCore::SVGElementInstance::removeEventListener):
1201 (WebCore::SVGElementInstance::removeAllEventListeners):
1202 (WebCore::SVGElementInstance::dispatchEvent):
1203 (WebCore::SVGElementInstance::eventTargetData):
1204 (WebCore::SVGElementInstance::ensureEventTargetData): Use the EventTarget API.
1206 * svg/SVGElementInstance.h:
1207 * svg/SVGImageLoader.cpp:
1208 (WebCore::SVGImageLoader::dispatchLoadEvent):
1209 * svg/SVGScriptElement.cpp:
1210 (WebCore::SVGScriptElement::dispatchErrorEvent): Use dispatchEvent directly.
1212 * svg/SVGUseElement.cpp:
1213 (WebCore::SVGUseElement::transferEventListenersToShadowTree): Updated for
1214 new EventTarget API.
1216 * svg/animation/SVGSMILElement.cpp:
1217 (WebCore::ConditionEventListener::handleEvent): No more isWindowEvent.
1219 * websockets/WebSocket.cpp:
1220 (WebCore::ProcessWebSocketEventTask::create):
1221 (WebCore::ProcessWebSocketEventTask::performTask):
1222 (WebCore::ProcessWebSocketEventTask::ProcessWebSocketEventTask):
1223 (WebCore::WebSocket::didConnect):
1224 (WebCore::WebSocket::didReceiveMessage):
1225 (WebCore::WebSocket::didClose):
1226 (WebCore::WebSocket::eventTargetData):
1227 (WebCore::WebSocket::ensureEventTargetData):
1228 * websockets/WebSocket.h:
1229 * websockets/WebSocket.idl:
1230 * workers/AbstractWorker.cpp:
1231 (WebCore::AbstractWorker::eventTargetData):
1232 (WebCore::AbstractWorker::ensureEventTargetData):
1233 * workers/AbstractWorker.h:
1234 * workers/AbstractWorker.idl:
1235 * workers/DedicatedWorkerContext.cpp:
1236 * workers/DedicatedWorkerContext.h:
1237 * workers/DedicatedWorkerContext.idl:
1238 * workers/DefaultSharedWorkerRepository.cpp:
1239 (WebCore::SharedWorkerConnectTask::performTask):
1240 (WebCore::SharedWorkerScriptLoader::load):
1241 (WebCore::SharedWorkerScriptLoader::notifyFinished):
1242 * workers/SharedWorker.idl:
1243 * workers/SharedWorkerContext.cpp:
1244 (WebCore::createConnectEvent):
1245 * workers/SharedWorkerContext.h:
1246 * workers/SharedWorkerContext.idl:
1247 * workers/Worker.cpp:
1248 (WebCore::Worker::notifyFinished):
1250 * workers/Worker.idl:
1251 * workers/WorkerContext.cpp:
1252 (WebCore::WorkerContext::eventTargetData):
1253 (WebCore::WorkerContext::ensureEventTargetData):
1254 * workers/WorkerContext.h:
1255 * workers/WorkerContext.idl:
1256 * workers/WorkerMessagingProxy.cpp:
1257 (WebCore::MessageWorkerContextTask::performTask):
1258 (WebCore::MessageWorkerTask::performTask):
1259 (WebCore::WorkerExceptionTask::performTask):
1260 * xml/XMLHttpRequest.cpp:
1261 (WebCore::XMLHttpRequest::callReadyStateChangeListener):
1262 (WebCore::XMLHttpRequest::createRequest):
1263 (WebCore::XMLHttpRequest::abort):
1264 (WebCore::XMLHttpRequest::networkError):
1265 (WebCore::XMLHttpRequest::abortError):
1266 (WebCore::XMLHttpRequest::didSendData):
1267 (WebCore::XMLHttpRequest::didReceiveData):
1268 (WebCore::XMLHttpRequest::eventTargetData):
1269 (WebCore::XMLHttpRequest::ensureEventTargetData):
1270 * xml/XMLHttpRequest.h:
1271 * xml/XMLHttpRequest.idl:
1272 * xml/XMLHttpRequestProgressEvent.h:
1273 (WebCore::XMLHttpRequestProgressEvent::create):
1274 * xml/XMLHttpRequestUpload.cpp:
1275 (WebCore::XMLHttpRequestUpload::eventTargetData):
1276 (WebCore::XMLHttpRequestUpload::ensureEventTargetData):
1277 * xml/XMLHttpRequestUpload.h:
1278 * xml/XMLHttpRequestUpload.idl: Use new EventTarget API.
1280 2009-09-23 Kent Tamura <tkent@chromium.org>
1282 Reviewed by Darin Adler.
1284 - Support for maxLength of <textarea>
1285 - Move numGraphemeClusters() and numCharactersInGraphemeClusters() from InputElement to String.
1286 https://bugs.webkit.org/show_bug.cgi?id=29292
1288 Test: fast/forms/textarea-maxlength.html
1290 * dom/InputElement.cpp:
1291 (WebCore::InputElement::sanitizeUserInputValue):
1292 (WebCore::InputElement::handleBeforeTextInsertedEvent):
1293 * html/HTMLTextAreaElement.cpp:
1294 (WebCore::HTMLTextAreaElement::defaultEventHandler):
1295 (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
1296 (WebCore::HTMLTextAreaElement::sanitizeUserInputValue):
1297 (WebCore::HTMLTextAreaElement::maxLength):
1298 (WebCore::HTMLTextAreaElement::setMaxLength):
1299 * html/HTMLTextAreaElement.h:
1300 * html/HTMLTextAreaElement.idl:
1301 * platform/text/PlatformString.h:
1302 * platform/text/String.cpp:
1303 (WebCore::String::numGraphemeClusters):
1304 (WebCore::String::numCharactersInGraphemeClusters):
1306 2009-09-23 Martin Robinson <martin.james.robinson@gmail.com>
1308 Reviewed by Xan Lopez.
1310 [GTK] REGRESSION: BitmapImage::getGdkPixbuf fails for non-square images
1311 https://bugs.webkit.org/show_bug.cgi?id=29654
1313 Give GDK_Backspace key events the proper text properties.
1315 Instead of adding new tests, this change removes existing tests
1316 from Gtk's skipped list.
1318 * platform/gtk/KeyEventGtk.cpp:
1319 (WebCore::keyIdentifierForGdkKeyCode):
1320 (WebCore::singleCharacterString):
1322 2009-09-23 Sam Weinig <sam@webkit.org>
1324 Reviewed by Adam Barth.
1326 Fix for https://bugs.webkit.org/show_bug.cgi?id=26989
1327 Should allow navigation of top-level openers
1328 <rdar://problem/7034025>
1330 Allow navigation of cross-origin window.opener if it is top-level frame.
1332 Test: http/tests/security/frameNavigation/cross-origin-opener.html
1334 * loader/FrameLoader.cpp:
1335 (WebCore::FrameLoader::shouldAllowNavigation):
1337 2009-09-23 Marshall Culpepper <mculpepper@appcelerator.com>
1339 Reviewed by Eric Seidel.
1341 Added $(WebKitLibrariesDir)/include/cairo so cairo.h is found by
1342 default when the necessary dependencies are extracted into the
1344 https://bugs.webkit.org/show_bug.cgi?id=29661
1346 * WebCore.vcproj/WebCoreCairo.vsprops:
1348 2009-09-23 Darin Adler <darin@apple.com>
1350 Reviewed by Sam Weinig.
1352 Crash when website does a history.back() followed by an alert()
1353 https://bugs.webkit.org/show_bug.cgi?id=29686
1354 rdar://problem/6984996
1356 When loading is deferred, we need to defer timer-based loads
1357 too, not just networking-driven loads. Otherwise we can get
1358 syncronouse navigation while running a script, which leads to
1359 crashes and other badness.
1361 This patch includes a manual test; an automated test may be
1362 possible some time in the future.
1365 (WebCore::Document::processHttpEquiv): Use scheduleLocationChange
1366 instead of scheduleHTTPRedirection to implement the navigation
1367 needed for x-frame-options.
1369 * loader/FrameLoader.cpp:
1370 (WebCore::FrameLoader::FrameLoader): Updated for data members with
1371 new names and new data members.
1372 (WebCore::FrameLoader::setDefersLoading): When turning deferral
1373 off, call startRedirectionTimer and startCheckCompleteTimer, since
1374 either of them might have been fired and ignored while defersLoading
1376 (WebCore::FrameLoader::clear): Updated for replacement of the
1377 m_checkCompletedTimer and m_checkLoadCompleteTimer timers.
1378 (WebCore::FrameLoader::allAncestorsAreComplete): Added.
1379 (WebCore::FrameLoader::checkCompleted): Added code to set
1380 m_shouldCallCheckCompleted to false. Changed code that calls
1381 startRedirectionTimer to call it unconditionally, since that
1382 function now knows when to do work and doesn't expect callers
1383 to handle that any more.
1384 (WebCore::FrameLoader::checkTimerFired): Added. Replaces the old
1385 timer fired callbacks. Calls checkCompleted and checkLoadComplete
1386 as appropriate, but not when defersLoading is true.
1387 (WebCore::FrameLoader::startCheckCompleteTimer): Added. Replaces
1388 the two different calls to start timers before. Only starts the
1389 timers if they are needed.
1390 (WebCore::FrameLoader::scheduleCheckCompleted): Changed to call
1391 startCheckCompleteTimer after setting boolean.
1392 (WebCore::FrameLoader::scheduleCheckLoadComplete): Ditto.
1393 (WebCore::FrameLoader::scheduleHistoryNavigation): Removed
1394 canGoBackOrForward check. The logic works more naturally when
1395 we don't do anything until the timer fires.
1396 (WebCore::FrameLoader::redirectionTimerFired): Do nothing if
1397 defersLoading is true. Also moved canGoBackOrForward check here.
1398 (WebCore::FrameLoader::scheduleRedirection): Changed code that
1399 calls startRedirectionTimer to do so unconditionally. That
1400 function now handles the rules about when to start the timer
1401 rather than expecting the caller to do so.
1402 (WebCore::FrameLoader::startRedirectionTimer): Added code to
1403 handle the case where there is no redirection scheduled,
1404 where the timer is already active, or where this is a classic
1405 redirection and there is an ancestor that has not yet completed
1407 (WebCore::FrameLoader::completed): Call startRedirectionTimer
1408 here directly instead of calling a cover named parentCompleted.
1409 Hooray! One less function in the giant FrameLoader class!
1410 (WebCore::FrameLoader::checkLoadComplete): Added code to set
1411 m_shouldCallCheckLoadComplete to false.
1413 * loader/FrameLoader.h: Replaced the two functions
1414 checkCompletedTimerFired and checkLoadCompleteTimerFired with
1415 one function, checkTimerFired. Removed the parentCompleted
1416 function. Added the startCheckCompleteTimer and
1417 allAncestorsAreComplete functions. Replaced the
1418 m_checkCompletedTimer and m_checkLoadCompleteTimer data
1419 members with m_checkTimer, m_shouldCallCheckCompleted, and
1420 m_shouldCallCheckLoadComplete.
1422 * manual-tests/go-back-after-alert.html: Added.
1423 * manual-tests/resources/alert-and-go-back.html: Added.
1425 2009-09-23 David Kilzer <ddkilzer@apple.com>
1427 <http://webkit.org/b/29660> Move "Generate 64-bit Export File" build phase script into DerivedSources.make
1429 Reviewed by Mark Rowe.
1431 The "Generate 64-bit Export File" build phase script generated
1432 the WebCore.LP64.exp export file used to link 64-bit WebCore.
1433 Instead of having a separate build phase script, move its
1434 generation into DerivedSources.make where WebCore.exp is
1437 * DerivedSources.make: Added a rule to make WebCore.LP64.exp.
1438 Added code to append WebCore.PluginHostProcess.exp to
1439 $(WEBCORE_EXPORT_DEPENDENCIES) when WTF_USE_PLUGIN_HOST_PROCESS
1441 * WebCore.PluginHostProcess.exp: Renamed from WebCore/WebCore.LP64.exp.
1442 * WebCore.xcodeproj/project.pbxproj: Removed the "Generate
1443 64-bit Export File" build phase script. Renamed WebCore.LP64.exp
1444 to WebCore.PluginHostProcess.exp.
1446 2009-09-23 Peter Kasting <pkasting@google.com>
1448 Reviewed by Dimitri Glazkov.
1450 https://bugs.webkit.org/show_bug.cgi?id=29694
1451 [Chromium] Eliminate dependency on gfx::Rect from ImageSkia.
1453 * platform/graphics/skia/ImageSkia.cpp:
1454 (WebCore::drawResampledBitmap):
1456 2009-09-22 Timothy Hatcher <timothy@apple.com>
1458 Prevent scrolling multiple elements during latched wheel events.
1460 Reviewed by Anders Carlsson.
1462 * page/EventHandler.cpp:
1463 (WebCore::scrollAndAcceptEvent):
1464 (WebCore::EventHandler::clear):
1465 (WebCore::EventHandler::handleWheelEvent):
1466 * page/EventHandler.h:
1467 * rendering/RenderBox.cpp:
1468 (WebCore::RenderBox::scroll):
1469 * rendering/RenderBox.h:
1471 2009-09-23 Daniel Bates <dbates@webkit.org>
1473 Reviewed by Adam Barth.
1475 https://bugs.webkit.org/show_bug.cgi?id=29523
1477 Fixes an issue where a JavaScript URL that was URL-encoded twice can bypass the
1480 The method FrameLoader::executeIfJavaScriptURL decodes the URL escape
1481 sequences in a JavaScript URL before it is eventually passed to the XSSAuditor.
1482 Because the XSSAuditor also decodes the URL escape sequences as part of its
1483 canonicalization, the double decoding of a JavaScript URL would
1484 not match the canonicalization of the input parameters.
1486 Tests: http/tests/security/xssAuditor/iframe-javascript-url-url-encoded.html
1487 http/tests/security/xssAuditor/javascript-link-url-encoded.html
1489 * bindings/js/ScriptController.cpp:
1490 (WebCore::ScriptController::evaluate): Moved call to
1491 XSSAuditor::canEvaluateJavaScriptURL into FrameLoader::executeIfJavaScriptURL.
1492 * bindings/v8/ScriptController.cpp:
1493 (WebCore::ScriptController::evaluate): Ditto.
1494 * loader/FrameLoader.cpp:
1495 (WebCore::FrameLoader::executeIfJavaScriptURL): Modified to call
1496 XSSAuditor::canEvaluateJavaScriptURL on the JavaScript URL before it is
1499 2009-09-22 Dave Hyatt <hyatt@apple.com>
1501 Reviewed by John Sullivan.
1503 https://bugs.webkit.org/show_bug.cgi?id=29657
1504 Columns don't break properly in positioned elements with a fixed height. Make sure that
1505 a block is still considered to have columns even when the column count is 1 if the column
1508 Added fast/multicol/positioned-with-constrained-height.html
1510 * rendering/RenderBlock.cpp:
1511 (WebCore::RenderBlock::setDesiredColumnCountAndWidth):
1513 2009-09-23 Holger Hans Peter Freyther <zecke@selfish.org>
1515 Rubber-stamped by Simon Hausmann.
1517 Add a null check for the Document*. In the mirror benchmarking
1518 application a crash from a call from JavaScript was observed.
1520 I was not able to come up with a test case for this issue.
1522 * platform/qt/CookieJarQt.cpp:
1523 (WebCore::cookieJar):
1525 2009-09-23 Simon Hausmann <simon.hausmann@nokia.com>
1527 Reviewed by Tor Arne Vestbø.
1529 Fix the Qt/Windows build, after the introduction of
1532 * plugins/win/PluginViewWin.cpp:
1533 (windowHandleForPageClient):
1534 (WebCore::PluginView::getValue):
1535 (WebCore::PluginView::forceRedraw):
1536 (WebCore::PluginView::platformStart):
1538 2009-09-23 Gustavo Noronha Silva <gns@gnome.org>
1540 Reviewed by Xan Lopez.
1542 [GTK] media tests failing after their rework
1543 https://bugs.webkit.org/show_bug.cgi?id=29532
1545 Correctly advertise the mime types used by the common formats used
1548 Tests that regressed, and will pass again:
1550 media/video-canvas-source.html
1551 media/video-controls.html
1552 media/video-currentTime-set2.html
1553 media/video-dom-autoplay.html
1554 media/video-dom-src.html
1555 media/video-error-abort.html
1556 media/video-load-networkState.html
1557 media/video-load-readyState.html
1558 media/video-muted.html
1559 media/video-no-autoplay.html
1560 media/video-pause-empty-events.html
1561 media/video-play-empty-events.html
1562 media/video-seekable.html
1563 media/video-seeking.html
1564 media/video-size.html
1565 media/video-source-type-params.html
1566 media/video-source-type.html
1567 media/video-source.html
1568 media/video-src-change.html
1569 media/video-src-invalid-remove.html
1570 media/video-src-remove.html
1571 media/video-src-set.html
1572 media/video-src-source.html
1573 media/video-src.html
1574 media/video-timeupdate-during-playback.html
1575 media/video-volume.html
1577 * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
1578 (WebCore::mimeTypeCache):
1580 2009-09-22 Charles Wei <charles.wei@torchmobile.com.cn>
1582 Reviewed by Eric Seidel.
1584 Fix the crash problem with absolte positioned children in foreignobject
1585 htts://bugs.webkit.org/show_bug.cgi?id=26342
1587 Test: svg/custom/foreignobject-crash-with-absolute-positioned-children.svg
1589 * rendering/RenderForeignObject.h:
1590 (WebCore::RenderForeignObject::isSVGForeignObject):
1591 * rendering/RenderObject.cpp:
1592 (WebCore::RenderObject::containingBlock):
1593 * rendering/RenderObject.h:
1594 (WebCore::RenderObject::isSVGForeignObject):
1596 2009-09-22 Drew Wilson <atwilson@google.com>
1598 Reviewed by David Levin.
1600 SharedWorkers "name" attribute is now optional.
1601 https://bugs.webkit.org/show_bug.cgi?id=28897
1603 Test: fast/workers/shared-worker-name.html
1605 * bindings/js/JSSharedWorkerConstructor.cpp:
1606 (WebCore::constructSharedWorker):
1607 Default 'name' attribute to empty string if it is not provided.
1608 * bindings/v8/custom/V8SharedWorkerCustom.cpp:
1609 (WebCore::CALLBACK_FUNC_DECL):
1610 Default 'name' attribute to empty string if it is not provided.
1611 * workers/DefaultSharedWorkerRepository.cpp:
1612 (WebCore::SharedWorkerProxy::matches):
1613 Now matches URLs if names are empty strings.
1614 (WebCore::DefaultSharedWorkerRepository::getProxy):
1615 Pass URL in to SharedWorkerProxy::matches().
1617 2009-09-22 Dimitri Glazkov <dglazkov@chromium.org>
1619 Unreviewed, another build fix.
1621 [Chromium] Add another missing include.
1622 https://bugs.webkit.org/show_bug.cgi?id=29536
1624 * inspector/InspectorController.cpp: Added DOMWindow.h include.
1626 2009-09-22 Dimitri Glazkov <dglazkov@chromium.org>
1628 Unreviewed, build fix.
1630 [Chromium] Add missing include.
1631 https://bugs.webkit.org/show_bug.cgi?id=29536
1633 * inspector/InspectorDOMStorageResource.cpp: Added DOMWindow.h include.
1635 2009-09-22 Darin Adler <darin@apple.com>
1637 Reviewed by Sam Weinig.
1639 Tighten up the ScheduledRedirection machinery to prepare for a bug fix
1640 https://bugs.webkit.org/show_bug.cgi?id=29663
1642 * loader/FrameLoader.cpp:
1643 (WebCore::ScheduledRedirection::ScheduledRedirection): Added a boolean,
1644 initialized to false, to keep track if the redirection has been
1645 communicated to the client.
1646 (WebCore::FrameLoader::stopLoading): Tweaked a comment.
1647 (WebCore::FrameLoader::cancelRedirection): Removed code to clear
1648 m_scheduledRedirection.clear since stopRedirectionTimer does that now.
1649 (WebCore::FrameLoader::allChildrenAreComplete): Added.
1650 (WebCore::FrameLoader::checkCompleted): Use allChildrenAreComplete
1651 function for clarity.
1652 (WebCore::FrameLoader::checkCallImplicitClose): Ditto.
1653 (WebCore::FrameLoader::scheduleRedirection): Changed to take a PassOwnPtr.
1654 (WebCore::FrameLoader::startRedirectionTimer): Added code to set the
1655 toldClient flag and not call clientRedirected a second time if it is set.
1656 (WebCore::FrameLoader::stopRedirectionTimer): Changed so this can be safely
1657 called multiple times and it will call clientRedirectCancelledOrFinished
1660 * loader/FrameLoader.h: Changed scheduleRedirection to be a PassOwnPtr.
1661 Added allChildrenAreComplete function.
1663 2009-09-22 Yury Semikhatsky <yurys@chromium.org>
1665 Reviewed by Timothy Hatcher.
1667 WebInspector: Migrate Databases tab to InjectedScript /
1668 serialized interaction.
1670 DOMStorage interaction is now serialized into JSON messages
1671 and doesn't require quarantined objects.
1673 https://bugs.webkit.org/show_bug.cgi?id=28873
1675 * dom/EventListener.h:
1676 (WebCore::EventListener::):
1677 * inspector/InspectorBackend.cpp:
1678 (WebCore::InspectorBackend::selectDOMStorage):
1679 (WebCore::InspectorBackend::getDOMStorageEntries):
1680 (WebCore::InspectorBackend::setDOMStorageItem):
1681 (WebCore::InspectorBackend::removeDOMStorageItem):
1682 * inspector/InspectorBackend.h:
1683 * inspector/InspectorBackend.idl:
1684 * inspector/InspectorController.cpp:
1685 (WebCore::InspectorController::didCommitLoad):
1686 (WebCore::InspectorController::selectDOMStorage):
1687 (WebCore::InspectorController::getDOMStorageEntries):
1688 (WebCore::InspectorController::setDOMStorageItem):
1689 (WebCore::InspectorController::removeDOMStorageItem):
1690 (WebCore::InspectorController::getDOMStorageResourceForId):
1691 * inspector/InspectorController.h:
1692 * inspector/InspectorDOMStorageResource.cpp:
1693 (WebCore::InspectorDOMStorageResource::InspectorDOMStorageResource):
1694 (WebCore::InspectorDOMStorageResource::bind):
1695 (WebCore::InspectorDOMStorageResource::unbind):
1696 (WebCore::InspectorDOMStorageResource::startReportingChangesToFrontend):
1697 (WebCore::InspectorDOMStorageResource::handleEvent):
1698 (WebCore::InspectorDOMStorageResource::operator==):
1699 * inspector/InspectorDOMStorageResource.h:
1700 (WebCore::InspectorDOMStorageResource::cast):
1701 (WebCore::InspectorDOMStorageResource::id):
1702 (WebCore::InspectorDOMStorageResource::domStorage):
1703 * inspector/InspectorFrontend.cpp:
1704 (WebCore::InspectorFrontend::selectDOMStorage):
1705 (WebCore::InspectorFrontend::didGetDOMStorageEntries):
1706 (WebCore::InspectorFrontend::didSetDOMStorageItem):
1707 (WebCore::InspectorFrontend::didRemoveDOMStorageItem):
1708 (WebCore::InspectorFrontend::updateDOMStorage):
1709 * inspector/InspectorFrontend.h:
1710 * inspector/front-end/DOMStorage.js:
1711 (WebInspector.DOMStorage):
1712 (WebInspector.DOMStorage.prototype.get id):
1713 (WebInspector.DOMStorage.prototype.get domStorage):
1714 (WebInspector.DOMStorage.prototype.get isLocalStorage):
1715 (WebInspector.DOMStorage.prototype.getEntriesAsync):
1716 (WebInspector.DOMStorage.prototype.setItemAsync):
1717 (WebInspector.DOMStorage.prototype.removeItemAsync):
1718 * inspector/front-end/DOMStorageDataGrid.js:
1719 (WebInspector.DOMStorageDataGrid):
1720 (WebInspector.DOMStorageDataGrid.prototype._startEditingColumnOfDataGridNode):
1721 (WebInspector.DOMStorageDataGrid.prototype._startEditing):
1722 (WebInspector.DOMStorageDataGrid.prototype._editingCommitted):
1723 (WebInspector.DOMStorageDataGrid.prototype._editingCancelled):
1724 (WebInspector.DOMStorageDataGrid.prototype.deleteSelectedRow):
1725 * inspector/front-end/DOMStorageItemsView.js:
1726 (WebInspector.DOMStorageItemsView.prototype.update):
1727 (WebInspector.DOMStorageItemsView.prototype._showDOMStorageEntries):
1728 (WebInspector.DOMStorageItemsView.prototype._dataGridForDOMStorageEntries):
1729 * inspector/front-end/StoragePanel.js:
1730 (WebInspector.StoragePanel.prototype.show):
1731 (WebInspector.StoragePanel.prototype.reset):
1732 (WebInspector.StoragePanel.prototype.selectDOMStorage):
1733 (WebInspector.StoragePanel.prototype.updateDOMStorage):
1734 (WebInspector.StoragePanel.prototype._domStorageForId):
1735 * inspector/front-end/inspector.js:
1736 (WebInspector.addDOMStorage):
1737 (WebInspector.updateDOMStorage):
1739 2009-09-22 Sam Weinig <sam@webkit.org>
1741 Reviewed by Alexey Proskuryakov.
1743 Fix for XMLHttpRequest.abort() should destroy the response text.
1744 https://bugs.webkit.org/show_bug.cgi?id=29658
1745 <rdar://problem/5301430>
1747 Clearing the response text after calling XMLHttpRequest.abort() is necessary
1748 per spec and matches Firefox. It is also a potential memory win.
1750 Test: http/tests/xmlhttprequest/abort-should-destroy-responseText.html
1752 * xml/XMLHttpRequest.cpp:
1753 (WebCore::XMLHttpRequest::abort): Clear the response text making sure to
1754 keep the actual ResourceReponse around so that the response status and response
1755 status text are kept around.
1757 2009-09-22 Dimitri Glazkov <dglazkov@chromium.org>
1759 No review, rolling out r48639.
1760 http://trac.webkit.org/changeset/48639
1762 * bindings/v8/V8GCController.cpp:
1763 (WebCore::ObjectGrouperVisitor::visitDOMWrapper):
1765 2009-09-22 Dumitru Daniliuc <dumi@chromium.org>
1767 Reviewed by Dimitri Glazkov.
1769 Changing the transaction coordinator to (re-)allow multiple read
1770 transactions on the same database to run concurrently (without
1771 risking a deadlock this time).
1773 https://bugs.webkit.org/show_bug.cgi?id=29115
1775 Tests: storage/read-and-write-transactions-dont-run-together.html
1776 storage/read-transactions-running-concurrently.html
1778 * storage/SQLTransaction.h:
1779 (WebCore::SQLTransaction::isReadOnly): Returns the type of the
1781 * storage/SQLTransactionCoordinator.cpp:
1782 (WebCore::SQLTransactionCoordinator::acquireLock): Changed to
1783 allow multiple read transactions on the same DB to run
1785 (WebCore::SQLTransactionCoordinator::releaseLock): Changed to
1786 allow multiple read transactions on the same DB to run
1788 (WebCore::SQLTransactionCoordinator::shutdown): Renamed the map.
1789 * storage/SQLTransactionCoordinator.h:
1791 2009-09-22 Peter Kasting <pkasting@google.com>
1793 Reviewed by David Levin.
1795 https://bugs.webkit.org/show_bug.cgi?id=29652
1796 Support true system colors for CSS system colors in Chromium/Win.
1798 * rendering/RenderThemeChromiumWin.cpp:
1799 (WebCore::cssValueIdToSysColorIndex):
1800 (WebCore::RenderThemeChromiumWin::systemColor):
1801 * rendering/RenderThemeChromiumWin.h:
1803 2009-09-22 Beth Dakin <bdakin@apple.com>
1805 Reviewed by Dave Hyatt.
1807 Fix for <rdar://problem/6925121> SAP: Wrong width calculation in
1808 table with fixed layout
1810 https://bugs.webkit.org/show_bug.cgi?id=29501
1813 * fast/table/fixed-table-with-percent-inside-percent-table.html: Added.
1814 * fast/table/fixed-table-with-percent-width-inside-auto-table.html: Added.
1815 * fast/table/fixed-table-with-percent-width-inside-div.html: Added.
1816 * fast/table/fixed-table-with-percent-width-inside-extra-large-div.html: Added.
1817 * fast/table/fixed-table-with-percent-width-inside-fixed-width-table.html: Added.
1818 * fast/table/fixed-table-with-small-percent-width.html: Added.
1820 This new quirk is very similar to an existing one that was
1821 implemented in revision 4316.
1822 * rendering/FixedTableLayout.cpp:
1823 (WebCore::FixedTableLayout::calcPrefWidths):
1825 2009-09-22 Brian Weinstein <bweinstein@apple.com>
1827 Reviewed by Timothy Hatcher.
1829 List HTTP status code with response headers in resources tab of Web Inspector.
1830 http://webkit.org/b/19945
1832 This patch adds a new top level list in the resources tab, HTTP Information, that
1833 for now, contains the Request Method (GET, POST, etc.) and the Status Code (200, 404, etc.).
1834 Additionally, it adds a colored dot next to the requested URL to show the status
1835 (green for success, orange for redirect, red for error).
1837 * English.lproj/localizedStrings.js:
1838 * inspector/front-end/ImageView.js:
1839 (WebInspector.ImageView):
1840 * inspector/front-end/Images/errorRedDot.png: Added.
1841 * inspector/front-end/Images/successGreenDot.png: Added.
1842 * inspector/front-end/Images/warningOrangeDot.png: Added.
1843 * inspector/front-end/Resource.js:
1844 (WebInspector.Resource.StatusTextForCode):
1845 * inspector/front-end/ResourceView.js:
1846 (WebInspector.ResourceView):
1847 (WebInspector.ResourceView.prototype._refreshURL):
1848 (WebInspector.ResourceView.prototype._refreshHTTPInformation):
1849 * inspector/front-end/inspector.css:
1851 2009-09-22 Brady Eidson <beidson@apple.com>
1853 Reviewed by Darin Adler.
1855 Back list isn't properly updated for fragment changes after a redirect.
1856 <rdar://problem/6142803> and https://bugs.webkit.org/show_bug.cgi?id=20355
1858 Test: fast/loader/fragment-after-redirect-gets-back-entry.html
1860 * loader/FrameLoader.cpp:
1861 (WebCore::FrameLoader::loadURL): Properly reset the policy FrameLoadType before
1862 consulting the policy delegate for fragment scrolling.
1864 2009-09-22 Darin Fisher <darin@chromium.org>
1866 Reviewed by Dimitri Glazkov.
1868 Drop down selects get stuck in the non-visible state and cannot be opened.
1869 https://bugs.webkit.org/show_bug.cgi?id=29645
1871 All paths that lead to hiding the popup menu must call popupDidHide on
1872 the PopupMenuClient. This change makes it so by moving all of the
1873 hiding logic to PopupListBox::hidePopup.
1875 * platform/chromium/PopupMenuChromium.cpp:
1876 (WebCore::PopupContainer::hidePopup):
1877 (WebCore::PopupListBox::hidePopup):
1878 * platform/chromium/PopupMenuChromium.h:
1880 2009-09-22 Patrick Mueller <Patrick_Mueller@us.ibm.com>
1882 Reviewed by Timothy Hatcher.
1884 WebInspector.log() function not protected if console not yet created
1885 https://bugs.webkit.org/show_bug.cgi?id=29336
1887 No new tests. Only affects Web Inspector developers adding logging
1888 to their code during development.
1890 * inspector/front-end/inspector.js:
1891 (WebInspector.log.isLogAvailable):
1892 (WebInspector.log.flushQueue):
1893 (WebInspector.log.flushQueueIfAvailable):
1894 (WebInspector.log.logMessage):
1897 2009-09-22 Yaar Schnitman <yaar@chromium.org>
1899 Reviewed by David Levin.
1901 Ported chromium.org's webcore.gyp for the webkit chromium port.
1903 https://bugs.webkit.org/show_bug.cgi?id=29617
1905 * WebCore.gyp/WebCore.gyp: Added.
1907 2009-09-22 Christian Plesner Hansen <christian.plesner.hansen@gmail.com>
1909 Reviewed by Adam Barth.
1911 [v8] Don't keep clean wrappers artificially alive
1912 We currently keep all DOM node wrappers alive, even when there are
1913 no more references to them from JS, in case they have properties
1914 that we need to keep around if new JS references are created.
1915 This changes the policy to only keep wrappers artificially alive
1916 if they have changed since they were created. Empty wrappers are
1917 discarded and recreated as needed.
1918 https://bugs.webkit.org/show_bug.cgi?id=29330
1920 * bindings/v8/V8GCController.cpp:
1921 (WebCore::ObjectGrouperVisitor::visitDOMWrapper):
1923 2009-09-22 Pavel Feldman <pfeldman@chromium.org>
1925 Reviewed by Timothy Hatcher.
1927 Web Inspector: console.count and console.timeEnd
1928 crash when inspector is opened.
1930 https://bugs.webkit.org/show_bug.cgi?id=29632
1932 * inspector/InspectorFrontend.cpp:
1933 (WebCore::InspectorFrontend::addMessageToConsole):
1935 2009-09-22 Adam Barth <abarth@webkit.org>
1939 Fix bogus build fix I did last night.
1941 * bindings/v8/custom/V8DOMWindowCustom.cpp:
1942 (WebCore::V8Custom::WindowSetTimeoutImpl):
1944 2009-09-22 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
1946 Reviewed by Simon Hausmann.
1948 NPAPI/Mac: Don't paint plugins if we don't have a CGContextRef
1950 * plugins/mac/PluginViewMac.cpp:
1952 2009-09-22 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
1954 Reivewed by Simon Hausmann.
1956 Fix the Qt/Mac build after r48604 (Implement new QWebPageClient class)
1958 There's no QWidget::x11Info() on Mac, and setPlatformPluginWidget()
1959 takes a QWidget*, not a QWebPageClient*
1961 * plugins/mac/PluginViewMac.cpp:
1962 (WebCore::PluginView::platformStart):
1964 2009-09-21 Adam Barth <abarth@webkit.org>
1966 Attempted fix for the V8 build.
1968 * bindings/v8/custom/V8DOMWindowCustom.cpp:
1969 (WebCore::V8Custom::WindowSetTimeoutImpl):
1971 2009-09-21 Adam Barth <abarth@webkit.org>
1973 Reviewed by Sam Weinig.
1975 Don't re-enter JavaScript after performing access checks
1976 https://bugs.webkit.org/show_bug.cgi?id=29531
1978 Moved the access check slightly later in this functions to avoid
1979 re-entering the JavaScript interpreter (typically via toString)
1980 after performing the access check.
1982 I can't really think of a meaningful test for this change. It's more
1985 * bindings/js/JSDOMWindowCustom.cpp:
1986 (WebCore::JSDOMWindow::setLocation):
1987 (WebCore::JSDOMWindow::open):
1988 (WebCore::JSDOMWindow::showModalDialog):
1989 * bindings/js/JSLocationCustom.cpp:
1990 (WebCore::JSLocation::setHref):
1991 (WebCore::JSLocation::replace):
1992 (WebCore::JSLocation::assign):
1993 * bindings/v8/custom/V8DOMWindowCustom.cpp:
1994 (WebCore::V8Custom::WindowSetTimeoutImpl):
1996 (CALLBACK_FUNC_DECL):
1997 (V8Custom::WindowSetLocation):
1998 (V8Custom::ClearTimeoutImpl):
1999 * bindings/v8/custom/V8LocationCustom.cpp:
2000 (WebCore::ACCESSOR_SETTER):
2001 (WebCore::CALLBACK_FUNC_DECL):
2003 2009-09-21 Dumitru Daniliuc <dumi@chromium.org>
2005 Reviewed by Eric Seidel.
2007 Make all write transaction start with a BEGIN IMMEDIATE command
2010 We cannot test this change in a layout test, because in order to
2011 test it we need to spawn two database threads and execute
2012 transaction steps on these two threads in a very specific order,
2013 which seems impossible to do when they share the same main thread
2014 (as they would in a layout test). The SQLite docs and the case
2015 described in the bug though should be enough proof that we do have
2016 a problem here and that this patch will fix it.
2018 Relevant SQLite documentation:
2019 http://www.sqlite.org/lang_transaction.html
2020 http://www.sqlite.org/lockingv3.html#locking
2022 https://bugs.webkit.org/show_bug.cgi?id=29218
2024 * platform/sql/SQLiteTransaction.cpp:
2025 (WebCore::SQLiteTransaction::SQLiteTransaction): Added a readOnly
2027 (WebCore::SQLiteTransaction::begin): Changed to BEGIN IMMEDIATE
2028 for write transactions.
2029 * platform/sql/SQLiteTransaction.h:
2030 * storage/SQLTransaction.cpp:
2031 (WebCore::SQLTransaction::openTransactionAndPreflight): Passing
2032 the read-only flag to the SQLiteTransaction instance.
2034 2009-09-21 Brady Eidson <beidson@apple.com>
2036 Rubberstamped by Mark Rowe.
2038 * DerivedSources.make: Fix the Xcode build on SnowLeopard.
2040 2009-09-15 John Abd-El-Malek <jam@chromium.org>
2042 Reviewed by Darin Fisher.
2044 Prevent sleeps in unload handlers.
2045 https://bugs.webkit.org/show_bug.cgi?id=29193
2047 Test: fast/dom/Window/slow_unload_handler.html
2050 * bindings/v8/DateExtension.cpp: Added.
2051 (WebCore::DateExtension::DateExtension):
2052 (WebCore::DateExtension::get):
2053 (WebCore::DateExtension::setAllowSleep):
2054 (WebCore::DateExtension::GetNativeFunction):
2055 (WebCore::DateExtension::weakCallback):
2056 (WebCore::DateExtension::GiveEnableSleepDetectionFunction):
2057 (WebCore::DateExtension::OnSleepDetected):
2058 * bindings/v8/DateExtension.h: Added.
2059 * bindings/v8/V8AbstractEventListener.cpp:
2060 (WebCore::V8AbstractEventListener::invokeEventHandler):
2061 * bindings/v8/V8Proxy.cpp:
2062 (WebCore::V8Proxy::createNewContext):
2063 (WebCore::V8Proxy::registerExtensionWithV8):
2064 (WebCore::V8Proxy::registeredExtensionWithV8):
2065 * bindings/v8/V8Proxy.h:
2067 2009-09-21 Jian Li <jianli@chromium.org>
2069 Reviewed by David Levin.
2071 [V8] Run-time exception in onmessage handler is not forwarded to the
2073 https://bugs.webkit.org/show_bug.cgi?id=28980
2075 The previous fix was partially reverted due to a reliability build break
2076 in chromium. The break happens when an exception is thrown without
2077 setting a message. We need to check for this scenario and handle it.
2079 Tested by worker-close.html.
2081 * bindings/v8/V8AbstractEventListener.cpp:
2082 (WebCore::V8AbstractEventListener::invokeEventHandler):
2083 * bindings/v8/V8Utilities.cpp:
2084 (WebCore::reportException):
2086 2009-09-21 Greg Bolsinga <bolsinga@apple.com>
2088 Reviewed by Simon Fraser & Sam Weinig.
2090 Add ENABLE(ORIENTATION_EVENTS)
2091 https://bugs.webkit.org/show_bug.cgi?id=29508
2093 See documentation here:
2094 http://developer.apple.com/safari/library/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html#//apple_ref/doc/uid/TP40006511-SW16
2096 * DerivedSources.make: Use new WebCore.OrientationEvents.exp file if ENABLE_ORIENTATION_EVENTS.
2097 Add ENABLE_ORIENTATION_EVENTS to the new ADDITIONAL_IDL_DEFINES variable that is passed to the IDL
2098 code generator. This is because ENABLE_ORIENTATION_EVENTS is not in FEATURE_DEFINES.
2099 * WebCore.OrientationEvents.exp: Added.
2100 * WebCore.xcodeproj/project.pbxproj: Add WebCore.OrientationEvents.exp.
2101 * dom/EventNames.h: Add onorientationchange.
2102 * html/HTMLAttributeNames.in: Ditto.
2103 * html/HTMLBodyElement.cpp: Handle onorientationchange properly.
2104 (WebCore::HTMLBodyElement::parseMappedAttribute):
2105 (WebCore::HTMLBodyElement::onorientationchange):
2106 (WebCore::HTMLBodyElement::setOnorientationchange):
2107 * html/HTMLBodyElement.h: Ditto.
2108 * html/HTMLBodyElement.idl: Ditto.
2109 * html/HTMLFrameSetElement.cpp: Ditto.
2110 (WebCore::HTMLFrameSetElement::parseMappedAttribute):
2111 (WebCore::HTMLFrameSetElement::onorientationchange):
2112 (WebCore::HTMLFrameSetElement::setOnorientationchange):
2113 * html/HTMLFrameSetElement.h: Ditto.
2114 * html/HTMLFrameSetElement.idl: Ditto.
2115 * page/DOMWindow.cpp: Ditto.
2116 (WebCore::DOMWindow::orientation): Calls up the to the Frame for the orientation value.
2117 (WebCore::DOMWindow::onorientationchange):
2118 (WebCore::DOMWindow::setOnorientationchange):
2119 * page/DOMWindow.h: Handle onorientationchange properly.
2120 * page/DOMWindow.idl: Ditto.
2121 * page/Frame.cpp: Ditto.
2122 (WebCore::Frame::Frame):
2123 (WebCore::Frame::sendOrientationChangeEvent):
2124 * page/Frame.h: Ditto.
2125 (WebCore::Frame::orientation):
2127 2009-09-18 Anders Carlsson <andersca@apple.com>
2129 Try fixing the build again.
2131 * platform/win/PopupMenuWin.cpp:
2132 (WebCore::PopupMenu::wndProc):
2134 2009-09-21 Pavel Feldman <pfeldman@chromium.org>
2136 Reviewed by Timothy Hatcher.
2138 Web Inspector: completions are always evaluated against
2139 window (discarding call frames).
2141 https://bugs.webkit.org/show_bug.cgi?id=29616
2143 * inspector/front-end/ConsoleView.js:
2144 (WebInspector.ConsoleView.prototype.completions):
2145 * inspector/front-end/InjectedScript.js:
2146 (InjectedScript.getCompletions):
2147 * inspector/front-end/ScriptsPanel.js:
2148 (WebInspector.ScriptsPanel.prototype.selectedCallFrameId):
2150 2009-09-21 Brent Fulgham <bfulgham@webkit.org>
2152 Unreviewed build fix for Windows (Cairo) target.
2154 Add stubs for SocketStream classes added in @r47788, which
2155 broke the WinCairo build.
2157 No new tests. (Build failure).
2159 * WebCore.vcproj/WebCore.vcproj: Add references to new files
2160 to Cairo build, exclude from standard Apple build.
2161 * platform/network/curl/SocketStreamError.h: Added.
2162 * platform/network/curl/SocketStreamHandle.h: Added.
2163 * platform/network/curl/SocketStreamHandleCurl.cpp: Added.
2165 2009-09-21 Pavel Feldman <pfeldman@chromium.org>
2167 Reviewed by Timothy Hatcher.
2169 Web Inspector: Expose InspectorResource fields.
2171 https://bugs.webkit.org/show_bug.cgi?id=29537
2173 * inspector/InspectorResource.cpp:
2174 (WebCore::InspectorResource::sourceString):
2175 (WebCore::InspectorResource::resourceData):
2176 * inspector/InspectorResource.h:
2177 (WebCore::InspectorResource::requestHeaderFields):
2178 (WebCore::InspectorResource::responseHeaderFields):
2179 (WebCore::InspectorResource::responseStatusCode):
2180 (WebCore::InspectorResource::requestMethod):
2181 (WebCore::InspectorResource::requestFormData):
2183 2009-09-21 Pavel Feldman <pfeldman@chromium.org>
2185 Reviewed by Timothy Hatcher.
2187 Web Inspector: JS error drilling down childless node.
2188 No need to dispatch double click twice - it is already handled
2189 in TreeElement.treeElementDoubleClicked.
2191 https://bugs.webkit.org/show_bug.cgi?id=22144
2193 * inspector/front-end/ElementsTreeOutline.js:
2194 (WebInspector.ElementsTreeOutline):
2196 2009-09-21 Kenneth Rohde Christiansen <kenneth@webkit.org>
2198 Reviewed by Simon Hausmann.
2200 Implement new QWebPageClient class and let our classes
2201 QWebViewPrivate and QWebGraphicsItemPrivate inherit from it.
2203 For Qt, platformPageClient() will now return a class derived from
2204 the QWebPageClient, so the patch adapts our Qt hooks to go though
2205 this class and not depend on the QWebView.
2208 * platform/Widget.h:
2209 * platform/qt/PlatformScreenQt.cpp:
2210 (WebCore::screenDepth):
2211 (WebCore::screenDepthPerComponent):
2212 (WebCore::screenIsMonochrome):
2213 (WebCore::screenRect):
2214 (WebCore::screenAvailableRect):
2215 * platform/qt/PopupMenuQt.cpp:
2216 (WebCore::PopupMenu::show):
2217 * platform/qt/QWebPageClient.h: Added.
2218 * platform/qt/WidgetQt.cpp:
2219 (WebCore::Widget::setCursor):
2220 * plugins/qt/PluginViewQt.cpp:
2221 (WebCore::PluginView::handleKeyboardEvent):
2222 (WebCore::PluginView::getValue):
2223 (WebCore::PluginView::platformStart):
2225 2009-09-21 Pavel Feldman <pfeldman@chromium.org>
2227 Reviewed by Timothy Hatcher.
2229 Web Inspector: Evaluating on call frame always returns "undefined".
2231 https://bugs.webkit.org/show_bug.cgi?id=29613
2233 * inspector/front-end/InjectedScript.js:
2234 (InjectedScript.evaluate):
2235 (InjectedScript._evaluateAndWrap):
2236 (InjectedScript._evaluateOn):
2237 (InjectedScript.evaluateInCallFrame):
2239 2009-09-21 Pavel Feldman <pfeldman@chromium.org>
2241 Reviewed by Timothy Hatcher.
2243 Web Inspector: Exception formatting is broken in console.
2245 https://bugs.webkit.org/show_bug.cgi?id=29608
2247 * inspector/front-end/ConsoleView.js:
2248 (WebInspector.ConsoleCommandResult):
2249 * inspector/front-end/InjectedScript.js:
2250 (InjectedScript.evaluate):
2251 (InjectedScript.createProxyObject):
2253 2009-09-21 Pavel Feldman <pfeldman@chromium.org>
2255 Reviewed by Timothy Hatcher.
2257 Web Inspector: Console object formatting is broken.
2259 https://bugs.webkit.org/show_bug.cgi?id=29607
2261 * inspector/front-end/ConsoleView.js:
2262 (WebInspector.ConsoleMessage.prototype._format):
2263 * inspector/front-end/ObjectProxy.js:
2264 (WebInspector.ObjectProxy.wrapPrimitiveValue):
2266 2009-09-21 Pavel Feldman <pfeldman@chromium.org>
2268 Reviewed by Timothy Hatcher.
2270 Web Inspector: Crash When Logging an Element Before Opening Inspector
2272 https://bugs.webkit.org/show_bug.cgi?id=29514
2274 * inspector/InspectorController.cpp:
2275 (WebCore::InspectorController::populateScriptObjects):
2277 2009-09-21 Simon Fraser <simon.fraser@apple.com>
2279 Reviewed by Dan Bernstein.
2281 Incorrect clipping with accelerated compositing content, and position:fixed
2282 https://bugs.webkit.org/show_bug.cgi?id=29347
2284 Fix the compositing clipping logic to behave correctly when position:fixed
2285 elements clip, by using the new backgroundClipRect() method to determine
2286 when we need to clip, and to compute the clipping layer position.
2288 Test: compositing/overflow/fixed-position-ancestor-clip.html
2290 * rendering/RenderLayerBacking.cpp:
2291 (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2292 * rendering/RenderLayerCompositor.cpp:
2293 (WebCore::RenderLayerCompositor::clippedByAncestor):
2295 2009-09-21 Nate Chapin <japhet@chromium.org>
2297 Reviewed by Adam Barth.
2299 Add back in a special case for window.top in the V8 bindings.
2301 https://bugs.webkit.org/show_bug.cgi?id=29605
2303 Fixes LayoutTests/fast/dom/Window/window-property-shadowing.html in the Chromium port.
2305 * bindings/scripts/CodeGeneratorV8.pm: Ensure window.top is not marked as read only, as this breaks the shadowing disabling.
2307 2009-09-21 Eric Carlson <eric.carlson@apple.com>
2309 Reviewed by Brady Eidson.
2311 HTMLMediaElement: media file should not reload when page comes out of page cache
2312 https://bugs.webkit.org/show_bug.cgi?id=29604
2314 Test: media/restore-from-page-cache.html
2316 * html/HTMLMediaElement.cpp:
2317 (WebCore::HTMLMediaElement::userCancelledLoad): Do nothing unless the element
2318 is still loading. Only fire an 'emptied' event if the readyState is HAVE_NOTHING,
2319 otherwise set the network state to NETWORK_IDLE.
2321 2009-09-21 Sam Weinig <sam@webkit.org>
2323 Reviewed by Geoffrey "Sean/Shawn/Shaun" Garen.
2327 * bindings/js/JSHTMLCollectionCustom.cpp:
2328 (WebCore::getNamedItems):
2329 * bindings/js/JSHTMLFormElementCustom.cpp:
2330 (WebCore::JSHTMLFormElement::nameGetter):
2332 2009-09-21 Darin Fisher <darin@chromium.org>
2334 Reviewed by Dimitri Glazkov.
2336 Drop down selects fail to close when a value is selected
2337 https://bugs.webkit.org/show_bug.cgi?id=29582
2339 Implement PopupListBox::hidePopup, which was previously
2340 declared but unimplemented. Removes the declaration of
2341 showPopup since that method is not implemented.
2343 PopupListBox::hidePopup takes care of hiding the popup,
2344 by invoking hidePopup on its parent PopupContainer, and
2345 then informs the PopupMenuClient that popupDidHide.
2346 This mimics the old behavior prior to r48370.
2348 * platform/chromium/PopupMenuChromium.cpp:
2349 (WebCore::PopupListBox::handleKeyEvent):
2350 (WebCore::PopupListBox::abandon):
2351 (WebCore::PopupListBox::acceptIndex):
2352 (WebCore::PopupListBox::hidePopup):
2354 2009-09-21 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
2356 Rubber-stamped by Simon Hausmann.
2358 [Qt] Windows build fix.
2359 https://bugs.webkit.org/show_bug.cgi?id=29535
2361 * platform/network/qt/DnsPrefetchHelper.cpp: Missing #include "config.h" added.
2363 2009-09-21 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
2365 Unreviewed make dist build fix. Missing files.
2369 2009-09-20 Adam Barth <abarth@webkit.org>
2371 Reviewed by Maciej Stachowiak.
2373 Crash when clicking link in unload handler
2374 https://bugs.webkit.org/show_bug.cgi?id=29525
2376 Test that the first navigation always wins when the page tries to start
2377 a new navigation in an unload handler.
2379 Tests: fast/loader/unload-form-about-blank.html
2380 fast/loader/unload-form-post-about-blank.html
2381 fast/loader/unload-form-post.html
2382 fast/loader/unload-form.html
2383 fast/loader/unload-hyperlink.html
2384 fast/loader/unload-javascript-url.html
2385 fast/loader/unload-reload.html
2386 fast/loader/unload-window-location.html
2388 * loader/FrameLoader.cpp:
2389 (WebCore::FrameLoader::loadURL):
2390 (WebCore::FrameLoader::loadWithDocumentLoader):
2392 2009-09-18 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
2394 Reviewed by Xan Lopez.
2396 [GTK] Sometimes crashes when a page is destroyed/loads another URL while playing video
2397 https://bugs.webkit.org/show_bug.cgi?id=29496
2399 Protect the video sink object, and destroy it in an idle callback
2400 to hopefully avoid a race condition that leads to a crash.
2402 This is already tested by media/video-seekable.html
2404 * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
2405 (WebCore::idleUnref):
2406 (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
2407 (WebCore::MediaPlayerPrivate::createGSTPlayBin):
2409 2009-09-19 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
2411 Unreviewed build fix for GTK+ and a blind one for Qt after r48566.
2416 2009-09-19 Sam Weinig <sam@webkit.org>
2418 Reviewed by Oliver Hunt.
2420 Fix for https://bugs.webkit.org/show_bug.cgi?id=29519
2421 Remove JSNameNodeCollection and just use StaticNodeList
2423 * WebCore.vcproj/WebCore.vcproj:
2424 * WebCore.xcodeproj/project.pbxproj:
2425 * WebCoreSources.bkl:
2426 * bindings/js/JSHTMLCollectionCustom.cpp:
2427 (WebCore::getNamedItems):
2428 * bindings/js/JSHTMLFormElementCustom.cpp:
2429 (WebCore::JSHTMLFormElement::nameGetter):
2430 * bindings/js/JSNamedNodesCollection.cpp: Removed.
2431 * bindings/js/JSNamedNodesCollection.h: Removed.
2433 2009-09-19 Daniel Bates <dbates@webkit.org>
2435 Reviewed by Adam Barth.
2437 https://bugs.webkit.org/show_bug.cgi?id=29511
2439 Fixes an issue where script code that contains non-ASCII characters may bypass the
2442 Before performing a comparison between the script source code and input parameters, we
2443 remove all non-ASCII characters, including non-printable ASCII characters from the
2444 script source code and input parameters.
2446 Tests: http/tests/security/xssAuditor/img-onerror-non-ASCII-char.html
2447 http/tests/security/xssAuditor/img-onerror-non-ASCII-char-default-encoding.html
2448 http/tests/security/xssAuditor/img-onerror-non-ASCII-char2-default-encoding.html
2449 http/tests/security/xssAuditor/img-onerror-non-ASCII-char2.html
2451 * page/XSSAuditor.cpp:
2452 (WebCore::isNonCanonicalCharacter): Modified to remove all non-ASCII characters,
2453 including non-printable ASCII characters.
2455 2009-09-19 Simon Fraser <simon.fraser@apple.com>
2457 Reviewed by Dan Bernstein.
2459 Incorrect animation with scale(0) transform (singular matrix)
2460 https://bugs.webkit.org/show_bug.cgi?id=29465
2462 Make accelerated scale() and translate() animations go through the component animation
2463 path (rather than just matrix animation) to avoid problems with singular scale matrices,
2464 and be slightly more efficient.
2466 Test: compositing/transitions/singular-scale-transition.html
2468 * platform/graphics/mac/GraphicsLayerCA.mm:
2469 (WebCore::getTransformFunctionValue):
2470 (WebCore::getValueFunctionNameForTransformOperation):
2472 2009-09-19 Alex Milowski <alex@milowski.com>
2474 Reviewed by Maciej Stachowiak.
2476 Adds CSS styling and basic DOM element support for MathML
2478 * DerivedSources.make:
2479 Added user stylesheet and tag factory generation
2481 * WebCore.xcodeproj/project.pbxproj:
2482 Added new DOM element code
2484 * css/CSSParser.cpp:
2485 (WebCore::CSSParser::parseAttr):
2486 Added check for document since stylesheet can be added before there is a document
2488 * css/CSSStyleSelector.cpp:
2489 (WebCore::CSSStyleSelector::styleForElement):
2490 Added check to add MathML user agent stylesheet
2492 * css/mathml.css: Added.
2493 MathML user agent stylesheet
2496 (WebCore::Document::createElement):
2497 Added support for creation of MathML DOM objects
2500 (WebCore::Node::isMathMLElement):
2501 Added check method for whether the node is a MathML node
2504 * mathml/MathMLElement.cpp: Added.
2505 (WebCore::MathMLElement::MathMLElement):
2506 (WebCore::MathMLElement::create):
2507 (WebCore::MathMLElement::createRenderer):
2508 * mathml/MathMLElement.h: Added.
2509 (WebCore::MathMLElement::isMathMLElement):
2510 MathML DOM base class
2513 * mathml/MathMLInlineContainerElement.cpp: Added.
2514 (WebCore::MathMLInlineContainerElement::MathMLInlineContainerElement):
2515 (WebCore::MathMLInlineContainerElement::create):
2516 (WebCore::MathMLInlineContainerElement::createRenderer):
2517 * mathml/MathMLInlineContainerElement.h: Added.
2518 Base class for non-text containers
2520 * mathml/MathMLMathElement.cpp: Added.
2521 (WebCore::MathMLMathElement::MathMLMathElement):
2522 (WebCore::MathMLMathElement::create):
2523 * mathml/MathMLMathElement.h: Added.
2526 * mathml/mathtags.in: Added.
2527 Element list mappings
2530 (WebCore::Frame::Frame):
2531 Added MathML name initialization
2532 2009-09-19 Adam Barth <abarth@webkit.org>
2534 Reviewed by Oliver Hunt.
2536 Canvas drawn with data URL image raises SECURITY_ERR when toDataUrl() called.
2537 https://bugs.webkit.org/show_bug.cgi?id=29305
2539 We need to special-case data URLs when tainting a canvas because we
2540 treat data URLs has having no security origin, unlike other
2541 browsers. The reason we do this is to help sites avoid XSS via data
2542 URLs, but that consideration doesn't apply to canvas taint.
2544 Also, we were previously incorrectly taking document.domain state
2545 into account when tainting canvas.
2547 Tests: http/tests/security/canvas-remote-read-data-url-image.html
2548 http/tests/security/canvas-remote-read-data-url-svg-image.html
2549 http/tests/security/canvas-remote-read-remote-image-document-domain.html
2551 * html/canvas/CanvasRenderingContext2D.cpp:
2552 (WebCore::CanvasRenderingContext2D::checkOrigin):
2553 (WebCore::CanvasRenderingContext2D::createPattern):
2554 * page/SecurityOrigin.cpp:
2555 (WebCore::SecurityOrigin::taintsCanvas):
2556 * page/SecurityOrigin.h:
2558 2009-09-18 Simon Fraser <simon.fraser@apple.com>
2560 Fix stylistic issue raised in code review for previous commit.
2562 * rendering/RenderLayerBacking.cpp:
2563 (WebCore::hasNonZeroTransformOrigin):
2565 2009-09-18 Simon Fraser <simon.fraser@apple.com>
2567 Reviewed by Dan Bernstein.
2569 Element is misplaced during opacity transition with certain configuration of transform-origin and clipping
2570 https://bugs.webkit.org/show_bug.cgi?id=29495
2572 If an element has zero size, but has a transform origin with absolute values,
2573 then the transform origin would not be applied because it is implemented via
2574 anchorPoint, which is expressed as a fraction of the layer size.
2576 Work around this by artificially inflating the size of the backing store when we need to.
2578 Test: compositing/geometry/transfrom-origin-on-zero-size-layer.html
2580 * rendering/RenderLayerBacking.h:
2581 * rendering/RenderLayerBacking.cpp:
2582 (WebCore::RenderLayerBacking::RenderLayerBacking):
2583 Init m_artificiallyInflatedBounds to false.
2585 (WebCore::hasNonZeroTransformOrigin):
2586 Utility function that describes whether the transform-origin contains non-percentage
2589 (WebCore::RenderLayerBacking::updateCompositedBounds):
2590 New wrapper method around setCompositedBounds() that applies the size inflation
2591 when necessary, setting the m_artificiallyInflatedBounds as appropriate.
2593 (WebCore::RenderLayerBacking::updateAfterLayout): Call updateCompositedBounds().
2594 (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Ditto
2596 * rendering/RenderLayerCompositor.cpp:
2597 (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): Ditto
2598 (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry): Ditto
2600 2009-09-18 Antti Koivisto <antti@apple.com>
2602 Reviewed by Maciej Stachowiak.
2604 https://bugs.webkit.org/show_bug.cgi?id=29512
2605 Don't recalculate style when restoring from the page cache
2607 FrameLoaderClient::forceLayout() also forces style recalc. Instead call FrameView::forceLayout()
2608 directly to update the scrollbars while keeping the existing style.
2610 Makes back/forward really fast on complex pages (in cases where page cache works).
2612 * loader/FrameLoader.cpp:
2613 (WebCore::FrameLoader::commitProvisionalLoad):
2615 2009-09-18 Oliver Hunt <oliver@apple.com>
2617 Reviewed by Geoff Garen.
2619 Implement ES5 Object.defineProperty function
2620 https://bugs.webkit.org/show_bug.cgi?id=29503
2622 Override defineOwnProperty on JSDOMWindowShell to forward appropriately,
2623 and then override defineOwnProperty on JSDOMWindow to disallow cross origin
2624 defineOwnProperty usage. We also override defineOwnProperty on QuarantinedObjectWrapper
2625 to ensure correct wrapping semantics of quarantined objects.
2627 One major caveat in this patch is that it currently disallows the use
2628 of Object.defineProperty on DOMObjects other than the window due to
2629 the significant work involved in correctly propagating attributes and
2630 ensuring correct semantics on dom objects.
2632 Tests: fast/js/Object-defineProperty.html
2633 http/tests/security/xss-DENIED-defineProperty.html
2635 * bindings/js/JSDOMBinding.cpp:
2636 (WebCore::DOMObject::defineOwnProperty):
2637 * bindings/js/JSDOMBinding.h:
2638 * bindings/js/JSDOMWindowCustom.cpp:
2639 (WebCore::JSDOMWindow::defineGetter):
2640 (WebCore::JSDOMWindow::defineSetter):
2641 (WebCore::JSDOMWindow::defineOwnProperty):
2642 * bindings/js/JSDOMWindowShell.cpp:
2643 (WebCore::JSDOMWindowShell::defineOwnProperty):
2644 (WebCore::JSDOMWindowShell::defineGetter):
2645 (WebCore::JSDOMWindowShell::defineSetter):
2646 * bindings/js/JSDOMWindowShell.h:
2647 * bindings/js/JSLocationCustom.cpp:
2648 (WebCore::JSLocation::defineGetter):
2649 (WebCore::JSLocationPrototype::defineGetter):
2650 * bindings/js/JSQuarantinedObjectWrapper.cpp:
2651 (WebCore::JSQuarantinedObjectWrapper::getOwnPropertyDescriptor):
2652 (WebCore::JSQuarantinedObjectWrapper::defineOwnProperty):
2653 * bindings/js/JSQuarantinedObjectWrapper.h:
2654 * bindings/scripts/CodeGeneratorJS.pm:
2656 2009-09-18 Alexey Proskuryakov <ap@apple.com>
2658 Reviewed by Darin Adler.
2660 https://bugs.webkit.org/show_bug.cgi?id=29510
2661 Active DOM objects should be suspended while a modal dialog is displayed
2663 * manual-tests/js-timers-beneath-modal-dialog.html: Added a test for JS timers.
2665 * page/PageGroupLoadDeferrer.cpp:
2666 (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
2667 (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
2668 Match other platforms, and make Mac also suspend active DOM objects. Since a page that
2669 currently displays a modal dialog cannot go into page cache, there is no danger of suspending
2672 2009-09-18 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
2674 Reviewed by Eric Seidel.
2676 [Qt] Buildfix caused by http://trac.webkit.org/changeset/48513
2677 https://bugs.webkit.org/show_bug.cgi?id=29351
2679 * bridge/qt/qt_instance.h: createRuntimeObject method renamed to newRuntimeObject.
2680 * bridge/runtime.h: Visibility of newRuntimeObject method modified to protected.
2682 2009-09-18 Yury Semikhatsky <yurys@chromium.org>
2684 Reviewed by Timothy Hatcher.
2686 Fix parameter substitutions in console.log().
2688 https://bugs.webkit.org/show_bug.cgi?id=29366
2690 * inspector/front-end/ConsoleView.js:
2691 (WebInspector.ConsoleMessage.prototype._format):
2692 * inspector/front-end/InjectedScript.js:
2693 (InjectedScript.getPrototypes):
2694 (InjectedScript.CallFrameProxy.prototype._wrapScopeChain):
2695 * inspector/front-end/utilities.js:
2698 2009-09-18 Sam Weinig <sam@webkit.org>
2700 Reviewed by Geoffrey Garen and Brady Eidson.
2702 Temporarily remove an assertion that was getting hit when going
2703 back to a page in the page cache while a banner in Safari was visible.
2704 We should re-enable this once that is fixed. See <rdar://problem/7218118>
2706 * page/FrameView.cpp:
2707 (WebCore::FrameView::scheduleRelayout):
2709 2009-09-18 Anders Carlsson <andersca@apple.com>
2711 Try fixing the build again.
2713 * platform/win/PopupMenuWin.cpp:
2714 (WebCore::PopupMenu::wndProc):
2716 2009-09-18 Anders Carlsson <andersca@apple.com>
2720 * platform/win/PopupMenuWin.cpp:
2722 2009-09-18 Sam Weinig <sam@webkit.org>
2724 Reviewed by Gavin 'BearClaw' Barraclough.
2726 Convert another callback type object to store the global object
2727 instead of the frame.
2729 * bindings/js/JSCustomXPathNSResolver.cpp:
2730 (WebCore::JSCustomXPathNSResolver::create):
2731 (WebCore::JSCustomXPathNSResolver::JSCustomXPathNSResolver):
2732 (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
2733 * bindings/js/JSCustomXPathNSResolver.h:
2735 2009-09-18 Anders Carlsson <andersca@apple.com>
2737 Reviewed by Sam Weinig.
2739 https://bugs.webkit.org/show_bug.cgi?id=29332
2740 <rdar://problem/7231652>
2741 REGRESSION (r48446): While a <select> popup menu is open, the
2742 rest of the WebView doesn't respond to mouse move events.
2744 * platform/win/PopupMenuWin.cpp:
2745 (WebCore::translatePoint):
2746 New helper function that translates a point between HWND coordinates.
2748 (WebCore::PopupMenu::show):
2749 Protect the PopupMenu if someone removes the <select> in response to a mouse
2750 event. Handle WM_HOST_WINDOW_MOUSEMOVE events.
2752 (WebCore::PopupMenu::wndProc):
2753 in the WM_MOUSEMOVE handler, if the mouse is not over the popup, post a
2754 WM_HOST_WINDOW_MOUSEMOVE event so that the host window (the WebView) gets the
2757 2009-09-18 Simon Fraser <simon.fraser@apple.com>
2759 Reviewed by Dave Hyatt.
2761 Compositing layers are incorrectly positioned after scrolling with position:fixed
2762 https://bugs.webkit.org/show_bug.cgi?id=29262
2764 When scrolling a page with compositing layers inside a position:fixed element,
2765 we need to update the compositing layer positions when the scroll position changes.
2767 Test: compositing/geometry/fixed-position.html
2770 Export FrameView::scrollPositionChanged()
2773 * page/FrameView.cpp:
2774 (WebCore::FrameView::scrollPositionChanged):
2775 New method that sends the scroll event, and updates compositing layers positions if necessary.
2777 2009-09-18 Simon Fraser <simon.fraser@apple.com>
2779 Reviewed by Dave Hyatt.
2781 Transformed elements inside position:fixed container are clipped incorrectly
2782 https://bugs.webkit.org/show_bug.cgi?id=29346
2784 Fix clipping and hit testing on transformed elements inside a position:fixed element.
2785 Previously, the code used the overflowClipRect of the parent clip rects, but
2786 this is not correct for fixed postion elements. Instead, share code that is
2787 already present in calculateRects() to get the correct rect.
2789 Test: fast/overflow/position-fixed-transform-clipping.html
2791 * rendering/RenderLayer.h:
2792 * rendering/RenderLayer.cpp:
2793 (WebCore::RenderLayer::paintLayer):
2794 (WebCore::RenderLayer::hitTestLayer):
2795 Call the new backgroundClipRect() to get the correct clipRect.
2797 (WebCore::RenderLayer::backgroundClipRect):
2798 New method, factored out of calculateRects(), that computes the clip rect,
2799 doing the right thing for fixed position elements.
2801 (WebCore::RenderLayer::calculateRects):
2802 Call the new backgroundClipRect() method.
2804 2009-09-18 Dan Bernstein <mitz@apple.com>
2806 Reviewed by Darin Adler.
2808 Fix <rdar://problem/7050773> REGRESSION (r40098) Crash at
2809 WebCore::RenderBlock::layoutBlock()
2810 https://bugs.webkit.org/show_bug.cgi?id=29498
2812 Test: accessibility/nested-layout-crash.html
2814 * accessibility/AccessibilityRenderObject.cpp:
2815 (WebCore::AccessibilityRenderObject::updateBackingStore): Changed to
2816 call Document::updateLayoutIgnorePendingStylesheets() instead of
2817 calling RenderObject::layoutIfNeeded(). The latter requires that
2818 there be no pending style recalc, which allows methods that call
2819 Document::updateLayout() to be called during layout without risking
2820 re-entry into layout.
2821 * accessibility/mac/AccessibilityObjectWrapper.mm:
2822 (-[AccessibilityObjectWrapper accessibilityActionNames]): Null-check
2823 m_object after calling updateBackingStore(), since style recalc may
2824 destroy the renderer, which destroys the accessibility object and
2825 detaches it from the wrapper.
2826 (-[AccessibilityObjectWrapper accessibilityAttributeNames]): Ditto.
2827 (-[AccessibilityObjectWrapper accessibilityAttributeValue:]): Ditto.
2828 (-[AccessibilityObjectWrapper accessibilityFocusedUIElement]): Ditto.
2829 (-[AccessibilityObjectWrapper accessibilityHitTest:]): Ditto.
2830 (-[AccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
2832 (-[AccessibilityObjectWrapper accessibilityIsIgnored]): Ditto.
2833 (-[AccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
2835 (-[AccessibilityObjectWrapper accessibilityPerformPressAction]): Ditto.
2836 (-[AccessibilityObjectWrapper accessibilityPerformIncrementAction]):
2838 (-[AccessibilityObjectWrapper accessibilityPerformDecrementAction]):
2840 (-[AccessibilityObjectWrapper accessibilityPerformAction:]): Ditto.
2841 (-[AccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
2843 (-[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
2845 (-[AccessibilityObjectWrapper accessibilityIndexOfChild:]): Ditto.
2846 (-[AccessibilityObjectWrapper accessibilityArrayAttributeCount:]):
2848 (-[AccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]):
2851 2009-09-18 Fumitoshi Ukai <ukai@chromium.org>
2853 Reviewed by Simon Hausmann.
2855 Update Qt build system for Web Socket.
2856 https://bugs.webkit.org/show_bug.cgi?id=29270
2859 * platform/network/qt/SocketStreamError.h: Added.
2860 * platform/network/qt/SocketStreamHandle.h: Added.
2861 * platform/network/qt/SocketStreamHandleSoup.cpp: Added.
2863 2009-09-18 Eric Carlson <eric.carlson@apple.com>
2865 Reviewed by Darin Adler.
2867 NULL check HTMLMediaElement::m_playedTimeRanges.
2868 Fix for https://bugs.webkit.org/show_bug.cgi?id=29494
2870 * html/HTMLMediaElement.cpp:
2871 (WebCore::HTMLMediaElement::addPlayedRange): New. Create m_playedTimeRanges if
2872 necessary, add range specified.
2873 (WebCore::HTMLMediaElement::seek): Use addPlayedRange.
2874 (WebCore::HTMLMediaElement::played): Use addPlayedRange. Change time comparison
2875 to be more readable.
2876 (WebCore::HTMLMediaElement::updatePlayState): Ditto.
2877 * html/HTMLMediaElement.h:
2879 2009-09-18 Sam Weinig <sam@webkit.org>
2881 Reviewed by Adele Peterson.
2883 Follow up fix for https://bugs.webkit.org/show_bug.cgi?id=29276
2884 REGRESSION(r48334): WebKit crashes on file select by drag
2886 Don't use Document.elementFromPoint since it returns null if the point
2887 is outside the viewport. Instead, just hit test ourselves.
2889 Test: fast/events/drag-file-crash.html
2891 * page/DragController.cpp:
2892 (WebCore::elementUnderMouse):
2893 (WebCore::DragController::tryDocumentDrag):
2894 (WebCore::DragController::concludeEditDrag):
2896 2009-09-18 Darin Adler <darin@apple.com>
2898 Reviewed by Sam Weinig.
2900 Each wrapped Objective-C object should use a single RuntimeObjectImp
2901 https://bugs.webkit.org/show_bug.cgi?id=29351
2902 rdar://problem/7142294
2904 * WebCore.base.exp: Added a newly-needed exported symbol.
2906 * bindings/objc/DOMInternal.h: Eliminated unused
2907 createWrapperCacheWithIntegerKeys; it has not been needed since the
2908 RGBColor wrappers were reworked.
2909 * bindings/objc/DOMInternal.mm: Ditto.
2911 * bridge/objc/objc_instance.h: Made the create function non-inline.
2912 * bridge/objc/objc_instance.mm:
2913 (createInstanceWrapperCache): Added. Creates an appropriate map table.
2914 (ObjcInstance::create): Moved here from header. Uses NSMapGet and
2915 NSMapInsert to cache the instance in a map table.
2916 (ObjcInstance::~ObjcInstance): Added a call to NSMapRemove to remove
2917 the instance from the map table.
2919 * bridge/qt/qt_instance.cpp:
2920 (JSC::Bindings::QtInstance::~QtInstance): Remove unneeded code to remove
2921 the instance from cachedObjects, which no longer exists.
2922 (JSC::Bindings::QtInstance::newRuntimeObject): Renamed to overload new
2923 bottleneck. Caching is now handled by the base class.
2925 * bridge/runtime.cpp:
2926 (JSC::Bindings::Instance::Instance): Initialize m_runtimeObject to 0.
2927 (JSC::Bindings::Instance::~Instance): Assert m_runtimeObject is 0.
2928 (JSC::Bindings::Instance::createRuntimeObject): Use m_runtimeObject
2929 if it's already set. Set m_runtimeObject and call addRuntimeObject
2931 (JSC::Bindings::Instance::newRuntimeObject): Added. Virtual function,
2932 used only by createRuntimeObject.
2933 (JSC::Bindings::Instance::willDestroyRuntimeObject): Added.
2934 Calls removeRuntimeObject and then clears m_runtimeObject.
2935 (JSC::Bindings::Instance::willInvalidateRuntimeObject): Added.
2936 Clears m_runtimeObject.
2938 * bridge/runtime.h: Made createRuntimeObject non-virtual. Added
2939 willDestroyRuntimeObject, willInvalidateRuntimeObject,
2940 newRuntimeObject, and m_runtimeObject.
2942 * bridge/runtime_object.cpp:
2943 (JSC::RuntimeObjectImp::RuntimeObjectImp): Removed addRuntimeObject
2944 call, now handled by caller.
2945 (JSC::RuntimeObjectImp::~RuntimeObjectImp): Replaced removeRuntimeObject
2946 call with willDestroyRuntimeObject call; the latter nows calls
2947 removeRuntimeObject.
2948 (JSC::RuntimeObjectImp::invalidate): Added willInvalidateRuntimeObject
2951 * bridge/runtime_object.h: Made invalidate non-virtual.
2953 2009-09-18 Kenneth Rohde Christiansen <kenneth@webkit.org>
2955 Reviewed by Simon Hausmann.
2957 Make PlatformWindow return something else than PlatformWidget
2958 https://bugs.webkit.org/show_bug.cgi?id=29085
2960 Make platformWindow return a PlatformPageClient
2961 (for now typedef'ed to PlatformWidget)
2963 Also, change the name of platformWindow to platformPageClient()
2965 * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
2966 (getPangoLayoutForAtk):
2967 * accessibility/win/AXObjectCacheWin.cpp:
2968 (WebCore::AXObjectCache::postPlatformNotification):
2969 (WebCore::AXObjectCache::handleFocusedUIElementChanged):
2970 * loader/EmptyClients.h:
2971 (WebCore::EmptyChromeClient::platformPageClient):
2973 (WebCore::Chrome::platformPageClient):
2975 * page/ChromeClient.h:
2976 * page/mac/EventHandlerMac.mm:
2977 (WebCore::EventHandler::wheelEvent):
2978 (WebCore::EventHandler::currentPlatformMouseEvent):
2979 (WebCore::EventHandler::sendContextMenuEvent):
2980 (WebCore::EventHandler::eventMayStartDrag):
2981 * platform/HostWindow.h:
2982 * platform/Widget.h:
2983 * platform/gtk/PlatformScreenGtk.cpp:
2984 (WebCore::getVisual):
2985 (WebCore::screenRect):
2986 (WebCore::screenAvailableRect):
2987 * platform/gtk/PopupMenuGtk.cpp:
2988 (WebCore::PopupMenu::show):
2989 * platform/gtk/ScrollViewGtk.cpp:
2990 (WebCore::ScrollView::platformAddChild):
2991 (WebCore::ScrollView::platformRemoveChild):
2992 (WebCore::ScrollView::visibleContentRect):
2993 * platform/gtk/WidgetGtk.cpp:
2994 (WebCore::Widget::setFocus):
2995 (WebCore::Widget::setCursor):
2996 * platform/qt/PlatformScreenQt.cpp:
2997 (WebCore::screenDepth):
2998 (WebCore::screenDepthPerComponent):
2999 (WebCore::screenIsMonochrome):
3000 (WebCore::screenRect):
3001 (WebCore::screenAvailableRect):
3002 * platform/qt/PopupMenuQt.cpp:
3003 (WebCore::PopupMenu::show):
3004 * platform/qt/WidgetQt.cpp:
3005 (WebCore::Widget::setCursor):
3006 * platform/win/PlatformScreenWin.cpp:
3007 (WebCore::monitorInfoForWidget):
3008 * platform/win/PopupMenuWin.cpp:
3009 (WebCore::PopupMenu::show):
3010 (WebCore::PopupMenu::calculatePositionAndSize):
3011 (WebCore::PopupMenu::wndProc):
3012 * platform/wx/RenderThemeWx.cpp:
3013 (WebCore::nativeWindowForRenderObject):
3014 * platform/wx/ScrollbarThemeWx.cpp:
3015 (WebCore::ScrollbarThemeWx::paint):
3016 * plugins/gtk/PluginViewGtk.cpp:
3017 (WebCore::PluginView::getValue):
3018 (WebCore::PluginView::forceRedraw):
3019 (WebCore::PluginView::platformStart):
3020 * plugins/mac/PluginViewMac.cpp:
3021 (WebCore::PluginView::platformStart):
3022 * plugins/qt/PluginViewQt.cpp:
3023 (WebCore::PluginView::handleKeyboardEvent):
3024 (WebCore::PluginView::getValue):
3025 (WebCore::PluginView::platformStart):
3026 * plugins/win/PluginViewWin.cpp:
3027 (WebCore::PluginView::getValue):
3028 (WebCore::PluginView::forceRedraw):
3029 (WebCore::PluginView::platformStart):
3031 2009-09-18 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
3033 Reviewed by Simon Hausmann.
3035 [Qt] Web inspector UI adjustments specific to the Qt platform:
3036 - Hide the close button
3037 - Hide the dock button
3038 - Disable the draggable toolbar
3040 https://bugs.webkit.org/show_bug.cgi?id=29384
3042 * inspector/front-end/inspector.css:
3043 * inspector/front-end/inspector.js:
3044 (WebInspector.toolbarDragStart):
3046 2009-09-18 Joerg Bornemann <joerg.bornemann@nokia.com>
3048 Reviewed by Simon Hausmann.
3050 QtWebKit Windows CE compile fixes
3052 Exclude certain pure-WINCE specific code paths from the Qt build.
3054 * platform/graphics/BitmapImage.h:
3055 * platform/graphics/FontCache.h:
3056 * platform/graphics/MediaPlayer.cpp:
3057 * platform/text/TextEncodingRegistry.cpp:
3058 (WebCore::buildBaseTextCodecMaps):
3059 (WebCore::extendTextCodecMaps):
3060 * plugins/PluginView.cpp:
3061 (WebCore::PluginView::stop): Guard this code block with NETSCAPE_PLUGIN_API as
3062 the corresponding PluginViewWndProc has the same guard in the header file.
3064 2009-09-18 Steve Block <steveblock@google.com>
3066 Reviewed by Dimitri Glazkov.
3068 Geolocation does not correctly handle Infinity for PositionOptions properties.
3069 https://bugs.webkit.org/show_bug.cgi?id=29099
3071 * bindings/js/JSGeolocationCustom.cpp: Modified.
3072 (WebCore::createPositionOptions): Modified. If timeout or maximumAge is positive infinity, applies these values as a special case.
3073 * page/PositionOptions.h: Modified.
3074 (WebCore::PositionOptions::hasMaximumAge): Added. Determines whether the object has a maximum age.
3075 (WebCore::PositionOptions::maximumAge): Modified. Asserts that the object has a maximum age.
3076 (WebCore::PositionOptions::clearMaximumAge): Added. Clears the maximum age.
3077 (WebCore::PositionOptions::setMaximumAge): Modified. Registers that the maximum age has been set.
3078 (WebCore::PositionOptions::PositionOptions): Modified. Registers that the maximum age has been set.
3080 2009-09-17 Sam Weinig <sam@webkit.org>
3082 Reviewed by Adele Peterson.
3084 Fix for https://bugs.webkit.org/show_bug.cgi?id=29276
3085 REGRESSION(r48334): WebKit crashes on file select by drag
3087 Document.elementFromPoint now takes point in client space, not page space.
3089 * page/DragController.cpp:
3090 (WebCore::DragController::tryDocumentDrag):
3091 (WebCore::DragController::concludeEditDrag):
3093 2009-09-17 Albert J. Wong <ajwong@chromium.org>
3095 Reviewed by David Levin.
3097 Reimplement default media UI for Mac Chromium to match the style
3098 of the Windows and Linux versions. Also breaks the dependency
3099 on the internal wk* functions that were previously used to
3100 render the media controller widgets.
3101 https://bugs.webkit.org/show_bug.cgi?id=29161
3103 No media layout tests are currently enabled in Mac Chromium, so
3104 nothing needs rebaselineing, etc.
3106 This is a recommit of r48438 with a compile fix and merges of
3107 recent changes to the file.
3109 * css/mediaControlsChromium.css:
3110 * rendering/RenderThemeChromiumMac.h:
3111 * rendering/RenderThemeChromiumMac.mm:
3112 (WebCore::mediaElementParent):
3113 (WebCore::RenderThemeChromiumMac::extraMediaControlsStyleSheet):
3114 (WebCore::mediaSliderThumbImage):
3115 (WebCore::mediaVolumeSliderThumbImage):
3116 (WebCore::RenderThemeChromiumMac::paintSliderTrack):
3117 (WebCore::RenderThemeChromiumMac::adjustSliderThumbSize):
3118 (WebCore::RenderThemeChromiumMac::paintMediaButtonInternal):
3119 (WebCore::RenderThemeChromiumMac::paintMediaPlayButton):
3120 (WebCore::RenderThemeChromiumMac::paintMediaMuteButton):
3121 (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack):
3122 (WebCore::RenderThemeChromiumMac::paintMediaVolumeSliderTrack):
3123 (WebCore::RenderThemeChromiumMac::paintMediaSliderThumb):
3124 (WebCore::RenderThemeChromiumMac::paintMediaVolumeSliderThumb):
3125 (WebCore::RenderThemeChromiumMac::paintMediaControlsBackground):
3126 * rendering/RenderThemeChromiumSkia.cpp:
3127 (WebCore::RenderThemeChromiumSkia::adjustSliderThumbSize):
3129 2009-09-17 Brian Weinstein <bweinstein@apple.com>
3131 Reviewed by Timothy Hatcher.
3133 The Console scope bar should have a divider between All and the other possible
3134 values (Errors, Warnings, Logs). It will look something like:
3136 All | Errors Warnings Logs.
3138 * inspector/front-end/ConsoleView.js:
3139 (WebInspector.ConsoleView.createDividerElement):
3140 (WebInspector.ConsoleView):
3141 * inspector/front-end/inspector.css:
3143 2009-09-17 Sam Weinig <sam@webkit.org>
3145 Reviewed by Mark Rowe.
3147 Remove additional references to JSVoidCallback which no longer exists.
3149 * DerivedSources.cpp:
3150 * WebCore.vcproj/WebCore.vcproj:
3152 2009-09-17 Sam Weinig <sam@webkit.org>
3154 Reviewed by Brady Eidson.
3156 Remove commented out onhashchange attribute now that it is implemented.
3158 * page/DOMWindow.idl:
3160 2009-09-17 Anders Carlsson <andersca@apple.com>
3162 Reviewed by Oliver Hunt.
3164 <rdar://problem/7007541>
3165 CrashTracer: 4800+ crashes in Safari at com.apple.WebKit • WTF::HashTableIterator...
3167 Make RuntimeObjectImp more robust against m_instance being a null (which can happen if an OOP plug-in
3168 crashes while we're calling into it).
3170 * bridge/runtime_object.cpp:
3171 (JSC::RuntimeObjectImp::RuntimeObjectImp):
3172 (JSC::RuntimeObjectImp::~RuntimeObjectImp):
3173 (JSC::RuntimeObjectImp::invalidate):
3174 (JSC::RuntimeObjectImp::fallbackObjectGetter):
3175 (JSC::RuntimeObjectImp::fieldGetter):
3176 (JSC::RuntimeObjectImp::methodGetter):
3177 (JSC::RuntimeObjectImp::getOwnPropertySlot):
3178 (JSC::RuntimeObjectImp::getOwnPropertyDescriptor):
3179 (JSC::RuntimeObjectImp::put):
3180 (JSC::RuntimeObjectImp::defaultValue):
3181 (JSC::RuntimeObjectImp::getCallData):
3182 (JSC::RuntimeObjectImp::getConstructData):
3183 (JSC::RuntimeObjectImp::getPropertyNames):
3184 * bridge/runtime_object.h:
3185 (JSC::RuntimeObjectImp::getInternalInstance):
3187 2009-09-17 Yury Semikhatsky <yurys@chromium.org>
3189 Reviewed by Timothy Hatcher.
3191 Wrap primitive values (as objects) in InspectorController::wrap.
3193 https://bugs.webkit.org/show_bug.cgi?id=28983
3195 * inspector/InspectorController.cpp:
3196 (WebCore::InspectorController::wrapObject): objects of any type will be wrapped into proxies,
3197 only object proxies will have objectId.
3198 * inspector/front-end/ConsoleView.js:
3199 (WebInspector.ConsoleView.prototype.completions): there is InjectedScript.getCompletionsi
3200 that accepts an expression and returns possible completions. This way we don't need to wrap
3201 and unwrap the completions result into a proxy object.
3202 * inspector/front-end/InjectedScript.js:
3203 (InjectedScript.getCompletions):
3204 (InjectedScript.evaluate):
3205 (InjectedScript._evaluateOn):
3206 (InjectedScript.createProxyObject):
3207 * inspector/front-end/InjectedScriptAccess.js:
3209 2009-09-17 Nate Chapin <japhet@chromium.org>
3211 Reviewed by Dimitri Glazkov.
3213 Wrap PageTransitionEvents properly for V8's use.
3215 https://bugs.webkit.org/show_bug.cgi?id=29340
3217 Fixes Chromium's failures for LayoutTests/fast/events/pageshow-pagehide.html.
3219 * bindings/v8/V8DOMWrapper.cpp:
3220 (WebCore::V8DOMWrapper::convertEventToV8Object): Wrap PageTransitionEvents properly.
3222 2009-09-17 Simon Fraser <simon.fraser@apple.com>
3224 Reviewed by Dave Hyatt.
3226 Hardware-accelerated opacity transition on inline asserts
3227 https://bugs.webkit.org/show_bug.cgi?id=29342
3229 Remove an erroneous toRenderBox() that could be called on a RenderInline; we can just
3230 pass an empty size, because the box size is only required for transform animations.
3232 Test: compositing/transitions/opacity-on-inline.html
3234 * rendering/RenderLayerBacking.cpp:
3235 (WebCore::RenderLayerBacking::startTransition):
3237 2009-09-17 Adam Barth <abarth@webkit.org>
3239 Reviewed by Eric Seidel.
3241 [V8] OwnHandle might get a weak callback after destruction
3242 https://bugs.webkit.org/show_bug.cgi?id=29172
3244 Be sure to clear out weak reference so we don't get a weak callback
3245 after we've destructed ourselves. Also, removed some tricky methods
3246 that had no clients.
3248 * bindings/v8/OwnHandle.h:
3249 (WebCore::OwnHandle::clear):
3251 2009-09-17 Dimitri Glazkov <dglazkov@chromium.org>
3253 Unreviewed, build fix.
3255 [V8] Partial roll out of http://trac.webkit.org/changeset/48455 to
3256 fix crashes that started happening in V8Proxy::getEnteredContext().
3258 * bindings/v8/ScheduledAction.cpp:
3259 (WebCore::ScheduledAction::execute):
3261 2009-09-17 Chris Fleizach <cfleizach@apple.com>
3263 Reviewed by Beth Dakin.
3265 AX: labels of checkboxes should, when hit-tested, return the checkbox
3266 https://bugs.webkit.org/show_bug.cgi?id=29335
3268 When an accessibility hit test is done and it hits the label of a control element,
3269 the control element should be returned instead of nothing, since the label
3270 itself is usually ignored.
3272 Test: accessibility/label-for-control-hittest.html
3274 * accessibility/AccessibilityObject.h:
3275 (WebCore::AccessibilityObject::correspondingControlForLabelElement):
3276 * accessibility/AccessibilityRenderObject.cpp:
3277 (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
3278 (WebCore::AccessibilityRenderObject::doAccessibilityHitTest):
3279 (WebCore::AccessibilityRenderObject::correspondingControlForLabelElement):
3280 * accessibility/AccessibilityRenderObject.h:
3282 2009-09-17 Avi Drissman <avi@chromium.org>
3284 Reviewed by Dimitri Glazkov, build fix.
3286 Change to make RenderThemeChromiumMac compile inside of non PLATFORM(MAC).
3287 https://bugs.webkit.org/show_bug.cgi?id=29243
3289 Covered by existing tests.
3291 * rendering/RenderThemeChromiumMac.mm:
3292 (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack):
3294 2009-09-17 Dimitri Glazkov <dglazkov@chromium.org>
3296 Reviewed by Eric Seidel.
3298 [V8] Accessing properties/methods of an object, created with document.implementation.createDocumentType
3299 creates nodes that have no document (ScriptExecutionContext), which in turn produces NULL-ref crashes.
3300 https://bugs.webkit.org/show_bug.cgi?id=26402
3302 Test: fast/dom/DOMImplementation/detached-doctype.html
3303 fast/dom/doctype-event-listener-crash.html
3305 * bindings/v8/V8DOMWrapper.cpp:
3306 (WebCore::V8DOMWrapper::getEventListener): Added an extra NULL-check.
3308 2009-09-17 Dan Bernstein <mitz@apple.com>
3310 Reviewed by Simon Fraser.
3312 FontDescription.h includes RenderStyleConstants.h, which violates layering
3313 https://bugs.webkit.org/show_bug.cgi?id=29327
3315 * GNUmakefile.am: Added FontSmoothingMode.h.
3316 * WebCore.gypi: Added FontSmoothingMode.h.
3317 * WebCore.vcproj/WebCore.vcproj: Added FontSmoothingMode.h.
3318 * WebCore.xcodeproj/project.pbxproj: Added FontSmoothingMode.h and made
3319 it a private header.
3320 * css/CSSComputedStyleDeclaration.cpp:
3321 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Get the
3322 font smoothing mode via the font description.
3323 * css/CSSPrimitiveValueMappings.h: Include FontSmoothingMode.h
3324 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Updated for the rename
3325 of FontSmoothing to FontSmoothingMode.
3326 (WebCore::CSSPrimitiveValue::operator FontSmoothingMode): Ditto.
3327 * css/CSSStyleSelector.cpp:
3328 (WebCore::CSSStyleSelector::applyProperty): Get the font smoothing mode
3329 via the font description.
3330 * platform/graphics/FontDescription.h: Do not include
3331 RenderStyleConstants.h.
3332 (WebCore::FontDescription::fontSmoothing): Updated for the rename of
3333 FontSmoothing to FontSmoothingMode.
3334 (WebCore::FontDescription::setFontSmoothing): Ditto.
3335 * platform/graphics/FontSmoothingMode.h: Added.
3336 (WebCore::FontSmoothingMode): Moved the FontSmoothing enum from
3337 RenderStyleConstants here and renamed it to this.
3338 * rendering/style/RenderStyle.h:
3339 (WebCore::InheritedFlags::fontSmoothing): Removed this getter, since
3340 this can be accessed via the font description.
3341 * rendering/style/RenderStyleConstants.h: Moved the FontSmoothing enum
3342 from here to FontSmoothingMode.h.
3344 2009-09-17 Kevin Ollivier <kevino@theolliviers.com>
3348 * platform/wx/wxcode/gtk/scrollbar_render.cpp:
3349 (wxGetGdkWindowForDC):
3351 2009-09-16 Simon Fraser <simon.fraser@apple.com>
3353 Reviewed by Dan Bernstein.
3355 Elements appear behind <video> when they should be in front sometimes
3356 https://bugs.webkit.org/show_bug.cgi?id=29314
3358 r45598 added logic that tests for overlap with <video> to determine when to throw
3359 a layer into compositing mode. That logic was incorrect in some cases, and this patch
3360 fixes it. When testing overlap, the layer needs to be composited iff some previous layer
3361 is composited (which adds a rect to the overlay map), and there is overlap.
3363 Test: compositing/geometry/video-opacity-overlay.html
3365 * rendering/RenderLayerCompositor.cpp:
3366 (WebCore::CompositingState::CompositingState):
3367 (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3369 2009-09-17 Avi Drissman <avi@google.com>
3371 Reviewed by Darin Fisher.
3373 Update the Chromium Mac theming files (RenderTheme and Theme) to be
3376 https://bugs.webkit.org/show_bug.cgi?id=29243
3377 http://crbug.com/19604
3379 Covered by existing tests.
3382 * platform/chromium/ThemeChromiumMac.h: Added.
3383 (WebCore::ThemeChromiumMac::ThemeChromiumMac):
3384 (WebCore::ThemeChromiumMac::~ThemeChromiumMac):
3385 (WebCore::ThemeChromiumMac::controlRequiresPreWhiteSpace):
3386 * platform/chromium/ThemeChromiumMac.mm: Added.
3388 (WebCore::platformTheme):
3389 (WebCore::controlSizeForFont):
3390 (WebCore::sizeFromFont):
3391 (WebCore::setControlSize):
3392 (WebCore::updateStates):
3393 (WebCore::inflateRect):
3394 (WebCore::checkboxSizes):
3395 (WebCore::checkboxMargins):
3396 (WebCore::checkboxSize):
3397 (WebCore::checkbox):
3398 (WebCore::paintCheckbox):
3399 (WebCore::radioSizes):
3400 (WebCore::radioMargins):
3401 (WebCore::radioSize):
3403 (WebCore::paintRadio):
3404 (WebCore::buttonSizes):
3405 (WebCore::buttonMargins):
3407 (WebCore::paintButton):
3408 (WebCore::ThemeChromiumMac::baselinePositionAdjustment):
3409 (WebCore::ThemeChromiumMac::controlFont):
3410 (WebCore::ThemeChromiumMac::controlSize):
3411 (WebCore::ThemeChromiumMac::minimumControlSize):
3412 (WebCore::ThemeChromiumMac::controlBorder):
3413 (WebCore::ThemeChromiumMac::controlPadding):
3414 (WebCore::ThemeChromiumMac::inflateControlPaintRect):
3415 (WebCore::ThemeChromiumMac::paint):
3416 * platform/graphics/FloatPoint.h:
3417 * platform/graphics/FloatRect.h:
3418 * platform/graphics/FloatSize.h:
3419 * platform/graphics/IntRect.h:
3420 * rendering/RenderThemeChromiumMac.h:
3421 (WebCore::RenderThemeChromiumMac::supportsControlTints):
3422 (WebCore::RenderThemeChromiumMac::scrollbarControlSizeForPart):
3423 (WebCore::RenderThemeChromiumMac::supportsSelectionForegroundColors):
3424 * rendering/RenderThemeChromiumMac.mm:
3425 (-[WebCoreRenderThemeNotificationObserver systemColorsDidChange:]):
3426 (-[RTCMFlippedView isFlipped]):
3427 (-[RTCMFlippedView currentEditor]):
3429 (WebCore::FlippedView):
3430 (WebCore::RenderTheme::themeForPage):
3431 (WebCore::RenderThemeChromiumMac::platformActiveListBoxSelectionForegroundColor):
3432 (WebCore::RenderThemeChromiumMac::platformInactiveListBoxSelectionForegroundColor):
3433 (WebCore::RenderThemeChromiumMac::platformInactiveListBoxSelectionBackgroundColor):
3434 (WebCore::RenderThemeChromiumMac::systemFont):
3435 (WebCore::convertNSColorToColor):
3436 (WebCore::menuBackgroundColor):
3437 (WebCore::RenderThemeChromiumMac::systemColor):
3438 (WebCore::RenderThemeChromiumMac::isControlStyled):
3439 (WebCore::RenderThemeChromiumMac::adjustRepaintRect):
3440 (WebCore::RenderThemeChromiumMac::inflateRect):
3441 (WebCore::RenderThemeChromiumMac::convertToPaintingRect):
3442 (WebCore::RenderThemeChromiumMac::setFontFromControlSize):
3443 (WebCore::RenderThemeChromiumMac::paintTextField):
3444 (WebCore::RenderThemeChromiumMac::paintCapsLockIndicator):
3445 (WebCore::RenderThemeChromiumMac::paintTextArea):
3446 (WebCore::RenderThemeChromiumMac::paintMenuList):
3447 (WebCore::TopGradientInterpolate):
3448 (WebCore::BottomGradientInterpolate):
3449 (WebCore::MainGradientInterpolate):
3450 (WebCore::TrackGradientInterpolate):
3451 (WebCore::RenderThemeChromiumMac::paintMenuListButtonGradients):
3452 (WebCore::RenderThemeChromiumMac::paintMenuListButton):
3453 (WebCore::RenderThemeChromiumMac::popupInternalPaddingLeft):
3454 (WebCore::RenderThemeChromiumMac::popupInternalPaddingRight):
3455 (WebCore::RenderThemeChromiumMac::popupInternalPaddingTop):
3456 (WebCore::RenderThemeChromiumMac::popupInternalPaddingBottom):
3457 (WebCore::RenderThemeChromiumMac::adjustMenuListButtonStyle):
3458 (WebCore::RenderThemeChromiumMac::adjustSliderTrackStyle):
3459 (WebCore::RenderThemeChromiumMac::adjustSliderThumbStyle):
3460 (WebCore::RenderThemeChromiumMac::paintSliderThumb):
3461 (WebCore::RenderThemeChromiumMac::paintSearchField):
3462 (WebCore::RenderThemeChromiumMac::setSearchCellState):
3463 (WebCore::RenderThemeChromiumMac::adjustSearchFieldStyle):
3464 (WebCore::RenderThemeChromiumMac::paintSearchFieldCancelButton):
3465 (WebCore::RenderThemeChromiumMac::adjustSearchFieldCancelButtonStyle):
3466 (WebCore::RenderThemeChromiumMac::adjustSearchFieldDecorationStyle):
3467 (WebCore::RenderThemeChromiumMac::paintSearchFieldDecoration):
3468 (WebCore::RenderThemeChromiumMac::adjustSearchFieldResultsDecorationStyle):
3469 (WebCore::RenderThemeChromiumMac::paintSearchFieldResultsDecoration):
3470 (WebCore::RenderThemeChromiumMac::adjustSearchFieldResultsButtonStyle):
3471 (WebCore::RenderThemeChromiumMac::paintSearchFieldResultsButton):
3472 (WebCore::mediaControllerTheme):
3473 (WebCore::RenderThemeChromiumMac::adjustSliderThumbSize):
3474 (WebCore::getMediaUIPartStateFlags):
3475 (WebCore::getUnzoomedRectAndAdjustCurrentContext):
3476 (WebCore::RenderThemeChromiumMac::paintMediaFullscreenButton):
3477 (WebCore::RenderThemeChromiumMac::paintMediaMuteButton):
3478 (WebCore::RenderThemeChromiumMac::paintMediaPlayButton):
3479 (WebCore::RenderThemeChromiumMac::paintMediaSeekBackButton):
3480 (WebCore::RenderThemeChromiumMac::paintMediaSeekForwardButton):
3481 (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack):
3482 (WebCore::RenderThemeChromiumMac::paintMediaSliderThumb):
3483 (WebCore::RenderThemeChromiumMac::paintMediaRewindButton):
3484 (WebCore::RenderThemeChromiumMac::paintMediaReturnToRealtimeButton):
3485 (WebCore::RenderThemeChromiumMac::paintMediaControlsBackground):
3486 (WebCore::RenderThemeChromiumMac::paintMediaCurrentTime):
3487 (WebCore::RenderThemeChromiumMac::paintMediaTimeRemaining):
3488 (WebCore::RenderThemeChromiumMac::extraMediaControlsStyleSheet):
3490 2009-09-16 Daniel Bates <dbates@webkit.org>
3492 Reviewed by Darin Adler.
3494 https://bugs.webkit.org/show_bug.cgi?id=29306
3496 Fixes an issue where an attack that contains accented characters can
3497 bypass the XSSAuditor.
3499 XSSAuditor::decodeURL used the wrong length for the input string.
3500 When the input string was decoded, the decoded result was truncated.
3501 Hence, XSSAuditor was comparing the source code of the script to the
3502 truncated input parameters.
3504 Test: http/tests/security/xssAuditor/img-onerror-accented-char.html
3506 * page/XSSAuditor.cpp:
3507 (WebCore::XSSAuditor::decodeURL):
3509 2009-09-16 Brady Eidson <beidson@apple.com>
3511 Reviewed by Sam Weinig.
3513 Explore allowing pages with unload handlers into the Page Cache
3514 https://bugs.webkit.org/show_bug.cgi?id=29021
3516 No new tests. (All previous tests continue to pass)
3518 * loader/FrameLoader.cpp:
3519 (WebCore::FrameLoader::stopLoading): If the document is in the page cache, don't fire the unload event.
3521 2009-09-16 Adam Barth <abarth@webkit.org>
3523 Reviewed by Dimitri Glazkov.
3525 [V8] Teach ScheduledAction::execute about isolated worlds
3526 https://bugs.webkit.org/show_bug.cgi?id=27703
3528 We now save a handle to the original context. We use that handle to
3529 call the timeout in the right context / world.
3531 Tests: http/tests/security/isolatedWorld/window-setTimeout-function.html
3532 http/tests/security/isolatedWorld/window-setTimeout-string.html
3534 * bindings/v8/ScheduledAction.cpp:
3535 (WebCore::ScheduledAction::ScheduledAction):
3536 (WebCore::ScheduledAction::execute):
3537 * bindings/v8/ScheduledAction.h:
3538 (WebCore::ScheduledAction::ScheduledAction):
3539 * bindings/v8/custom/V8DOMWindowCustom.cpp:
3540 (WebCore::V8Custom::WindowSetTimeoutImpl):
3541 * bindings/v8/custom/V8WorkerContextCustom.cpp:
3542 (WebCore::SetTimeoutOrInterval):
3544 2009-09-16 Adam Barth <abarth@webkit.org>
3546 Reviewed by Dimitri Glazkov.
3548 [V8] Teach ScheduledAction::execute about isolated worlds
3549 https://bugs.webkit.org/show_bug.cgi?id=27703
3551 We now save a handle to the original context. We use that handle to
3552 call the timeout in the right context / world.
3554 Tests: http/tests/security/isolatedWorld/window-setTimeout-function.html
3555 http/tests/security/isolatedWorld/window-setTimeout-string.html
3557 * bindings/v8/ScheduledAction.cpp:
3558 (WebCore::ScheduledAction::ScheduledAction):
3559 (WebCore::ScheduledAction::execute):
3560 * bindings/v8/ScheduledAction.h:
3561 (WebCore::ScheduledAction::ScheduledAction):
3562 * bindings/v8/custom/V8DOMWindowCustom.cpp:
3563 (WebCore::V8Custom::WindowSetTimeoutImpl):
3564 * bindings/v8/custom/V8WorkerContextCustom.cpp:
3565 (WebCore::SetTimeoutOrInterval):
3567 2009-09-16 Sam Weinig <sam@webkit.org>
3569 Reviewed by Anders Carlsson.
3571 Add some groups to the xcode project to make the bindings/js/ group
3574 * WebCore.xcodeproj/project.pbxproj:
3576 2009-09-16 Sam Weinig <sam@webkit.org>
3578 Reviewed by Anders Carlsson.
3580 Fix for https://bugs.webkit.org/show_bug.cgi?id=29320
3581 JS callback objects should store the global object
3583 This just changes the callback objects to store the global object instead
3584 of the frame. A follow up patch will change them to store the 'current'
3585 global object instead of the lexical or dynamic.
3587 * DerivedSources.make: Remove unused VoidCallback.
3588 * WebCore.xcodeproj/project.pbxproj: Ditto.
3589 * bindings/js/JSCustomPositionCallback.cpp:
3590 (WebCore::JSCustomPositionCallback::JSCustomPositionCallback):
3591 (WebCore::JSCustomPositionCallback::handleEvent):
3592 * bindings/js/JSCustomPositionCallback.h:
3593 (WebCore::JSCustomPositionCallback::create):
3594 * bindings/js/JSCustomPositionErrorCallback.cpp:
3595 (WebCore::JSCustomPositionErrorCallback::JSCustomPositionErrorCallback):
3596 (WebCore::JSCustomPositionErrorCallback::handleEvent):
3597 * bindings/js/JSCustomPositionErrorCallback.h:
3598 (WebCore::JSCustomPositionErrorCallback::create):
3599 * bindings/js/JSCustomSQLStatementCallback.cpp:
3600 (WebCore::JSCustomSQLStatementCallback::JSCustomSQLStatementCallback):
3601 (WebCore::JSCustomSQLStatementCallback::handleEvent):
3602 * bindings/js/JSCustomSQLStatementCallback.h:
3603 (WebCore::JSCustomSQLStatementCallback::create):
3604 * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
3605 (WebCore::JSCustomSQLStatementErrorCallback::JSCustomSQLStatementErrorCallback):
3606 (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
3607 * bindings/js/JSCustomSQLStatementErrorCallback.h:
3608 (WebCore::JSCustomSQLStatementErrorCallback::create):
3609 * bindings/js/JSCustomSQLTransactionCallback.cpp:
3610 (WebCore::JSCustomSQLTransactionCallback::Data::Data):
3611 (WebCore::JSCustomSQLTransactionCallback::Data::globalObject):
3612 (WebCore::JSCustomSQLTransactionCallback::JSCustomSQLTransactionCallback):
3613 (WebCore::JSCustomSQLTransactionCallback::handleEvent):
3614 * bindings/js/JSCustomSQLTransactionCallback.h:
3615 (WebCore::JSCustomSQLTransactionCallback::create):
3616 * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
3617 (WebCore::JSCustomSQLTransactionErrorCallback::JSCustomSQLTransactionErrorCallback):
3618 (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
3619 * bindings/js/JSCustomSQLTransactionErrorCallback.h:
3620 (WebCore::JSCustomSQLTransactionErrorCallback::create):
3621 * bindings/js/JSCustomVoidCallback.cpp:
3622 (WebCore::JSCustomVoidCallback::JSCustomVoidCallback):
3623 (WebCore::JSCustomVoidCallback::handleEvent):
3624 * bindings/js/JSCustomVoidCallback.h:
3625 (WebCore::JSCustomVoidCallback::create):
3626 * bindings/js/JSDatabaseCustom.cpp:
3627 (WebCore::JSDatabase::changeVersion):
3628 (WebCore::createTransaction):
3629 (WebCore::JSDatabase::transaction):
3630 (WebCore::JSDatabase::readTransaction):
3631 * bindings/js/JSGeolocationCustom.cpp:
3632 (WebCore::createPositionCallback):
3633 (WebCore::createPositionErrorCallback):
3634 (WebCore::JSGeolocation::getCurrentPosition):
3635 (WebCore::JSGeolocation::watchPosition):
3636 * bindings/js/JSSQLTransactionCustom.cpp:
3637 (WebCore::JSSQLTransaction::executeSql):
3639 2009-09-15 Kent Tamura <tkent@chromium.org>
3641 Reviewed by Eric Seidel.
3643 <input maxlength=> should restrict only values specified by users.
3644 https://bugs.webkit.org/show_bug.cgi?id=21271
3646 * dom/InputElement.cpp:
3647 (WebCore::InputElement::setValueFromRenderer):
3648 (WebCore::InputElement::sanitizeValue):
3649 (WebCore::InputElement::sanitizeUserInputValue): Rename from constrainValue().
3650 (WebCore::InputElement::handleBeforeTextInsertedEvent):
3651 (WebCore::InputElement::updateValueIfNeeded):
3652 * dom/InputElement.h:
3653 * html/HTMLInputElement.cpp:
3654 (WebCore::HTMLInputElement::setInputType):
3655 (WebCore::HTMLInputElement::value):
3656 (WebCore::HTMLInputElement::setValue):
3657 (WebCore::HTMLInputElement::sanitizeValue):
3658 * html/HTMLInputElement.h:
3659 * rendering/RenderTextControlSingleLine.cpp:
3660 (WebCore::RenderTextControlSingleLine::subtreeHasChanged):
3661 * wml/WMLInputElement.cpp:
3662 (WebCore::WMLInputElement::constrainValue):
3663 * wml/WMLInputElement.h:
3664 (WebCore::WMLInputElement::sanitizeValue):
3666 2009-09-16 Enrica Casucci <enrica@apple.com>
3668 Reviewed by Eric Seidel.
3670 Reorganizing helper functions in htmlediting.h to group them by type of object they return/operate upon.
3671 https://bugs.webkit.org/show_bug.cgi?id=29319
3673 * editing/IndentOutdentCommand.cpp:
3674 Removed implementation of isAtUnsplittableElement.
3676 * editing/IndentOutdentCommand.h:
3677 Removed member function isAtUnsplittableElement, because it was not class specific and belonged logically among the helper functions.
3679 * editing/htmlediting.cpp:
3680 (WebCore::isAtUnsplittableElement): added. The code was taken from IndentOutdentCommand.
3682 * editing/htmlediting.h:
3683 Reordered functions to group them by type of object returned or operate upon.
3685 Added isAtUnsplittableElement declaration.
3687 2009-09-16 Geoffrey Garen <ggaren@apple.com>
3689 Reviewed by Sam Weinig and Anders Carlsson.
3691 Removed some vestigial and potentially crashy code that makes consolidating
3692 event listeners hard.
3695 (WebCore::Node::addEventListener): No need to limit when event listeners
3696 can be added. Other EventTargets don't do this.
3698 Also, check for null when accessing document(). Technically, the JS bindings
3699 do this check for us, but let's not rely on that.
3701 2009-09-16 Anders Carlsson <andersca@apple.com>
3703 Reviewed by Adam Roben.
3705 <rdar://problem/7155710>
3706 HTML selects on windows cause containing window to become inactive when opened
3708 Redo the way we handle events when a popup menu is shown, based on
3709 http://blogs.msdn.com/oldnewthing/archive/2004/08/20/217684.aspx
3711 Since a non-active window can't capture the mouse, we use the owning window
3712 (the WebView) as the capture window. We then run a recursive message pump that
3713 forwards all mouse and keyboard events to the popup menu.
3715 * platform/PopupMenu.h:
3716 * platform/win/PopupMenuWin.cpp:
3717 (WebCore::PopupMenu::PopupMenu):
3718 (WebCore::PopupMenu::show):
3719 (WebCore::PopupMenu::hide):
3720 (WebCore::PopupMenu::wndProc):
3722 2009-09-16 Dan Bernstein <mitz@apple.com>
3724 Reviewed by Ada Chan.
3727 <rdar://problem/6937089> Crashes at RenderWidget::destroy()
3729 * rendering/RenderWidget.cpp:
3730 (WebCore::RenderWidget::destroy): Avoid calling renderArena() if node()
3731 is null. Add two assertions that can help determine how this crash
3732 happens (in particular, whether node() becomes null during destroy() or
3733 it is null before destroy() is called).
3735 2009-09-16 Beth Dakin <bdakin@apple.com>
3737 Speculative build fix.
3739 * css/CSSStyleSelector.cpp:
3740 (WebCore::CSSStyleSelector::applyProperty):
3742 2009-09-16 Beth Dakin <bdakin@apple.com>
3744 Reviewed by Darin Adler.
3746 Fix for <rdar://problem/7083741> Implement a CSS extension to
3747 adjust sub-pixel anti-aliasing for text
3749 https://bugs.webkit.org/show_bug.cgi?id=29291
3752 * fast/css/font-smoothing.html: Added.
3753 * fast/css/parsing-webkit-font-smoothing.html: Added.
3755 This patch adds a new CSS property called -webkit-font-smoothing
3756 that accepts the following as valid input: auto | none |
3757 antialiased | subpixel-antialiased
3759 Return appropriate computed style for -webkit-font-smoothing
3760 * css/CSSComputedStyleDeclaration.cpp:
3762 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3764 Add a case for CSSPropertyWebkitFontSmoothing, and accept valid
3766 * css/CSSParser.cpp:
3767 (WebCore::CSSParser::parseValue):
3769 Add mappings for FontSmoothing to the right CSS values.
3770 * css/CSSPrimitiveValueMappings.h:
3771 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3772 (WebCore::CSSPrimitiveValue::operator FontSmoothing):
3774 Add -webkit-font-smoothing
3775 * css/CSSPropertyNames.in:
3777 Set fontSmoothing on the FontDescription.
3778 * css/CSSStyleSelector.cpp:
3779 (WebCore::CSSStyleSelector::applyProperty):
3781 Add antialiased and subpixel-antialiased as possible new CSS
3783 * css/CSSValueKeywords.in:
3784 Store the font smoothing CSS value in the FontDescription.
3785 * platform/graphics/FontDescription.h:
3786 (WebCore::FontDescription::FontDescription):
3787 (WebCore::FontDescription::fontSmoothing):
3788 (WebCore::FontDescription::setFontSmoothing):
3789 (WebCore::FontDescription::operator==):
3791 Call setShouldAntialias() and setShouldUseSmoothing() appropriately
3792 based on the CSS fontSmoothing() value.
3793 * platform/graphics/mac/FontMac.mm:
3794 (WebCore::Font::drawGlyphs):
3795 * platform/graphics/win/FontCGWin.cpp:
3796 (WebCore::Font::drawGlyphs):
3798 New function fontSmoothing()
3799 * rendering/style/RenderStyle.h:
3800 (WebCore::InheritedFlags::fontSmoothing):
3802 New enum FontSmoothing.
3803 * rendering/style/RenderStyleConstants.h:
3806 2009-09-16 Yury Semikhatsky <yurys@chromium.org>
3808 Reviewed by Timothy Hatcher.
3810 Remove style property if empty string is entered.
3812 https://bugs.webkit.org/show_bug.cgi?id=29163
3814 * inspector/front-end/ElementsTreeOutline.js:
3815 (WebInspector.ElementsTreeOutline.prototype._onmouseout): fixed null pointer exception
3816 * inspector/front-end/InjectedScript.js:
3817 (InjectedScript.applyStyleText): if styletext to apply is empty it will return an array to confirm the property removal
3818 * inspector/front-end/StylesSidebarPane.js:
3819 (WebInspector.StylePropertyTreeElement.prototype.):
3820 (WebInspector.StylePropertyTreeElement.prototype):
3822 2009-09-16 Yury Semikhatsky <yurys@chromium.org>
3824 Reviewed by Timothy Hatcher.
3826 Always reset m_implicitShorthand to false after parsing
3827 background-repeat style property otherwise properties
3828 following after it may be erroneously marked as implicit.
3830 https://bugs.webkit.org/show_bug.cgi?id=28972
3831 https://bugs.webkit.org/show_bug.cgi?id=28973
3833 Test: fast/backgrounds/repeat/margin-shorthand.html
3835 * css/CSSParser.cpp:
3836 (WebCore::CSSParser::parseValue):
3838 2009-09-16 Carol Szabo <carol.szabo@nokia.com>
3840 Reviewed by Alexey Proskuryakov.
3842 Incorrect behavior of XMLHttpRequest::getAllResponseHeaders and
3843 XMLHttpRequest::getResponseHeader in the
3844 HEADERS_RECEIVED readyState.
3845 https://bugs.webkit.org/show_bug.cgi?id=29121
3847 Tests: http/tests/xmlhttprequest/getAllResponseHeaders.html
3848 http/tests/xmlhttprequest/getResponseHeader.html
3850 * xml/XMLHttpRequest.cpp:
3851 (WebCore::XMLHttpRequest::getAllResponseHeaders):
3852 (WebCore::XMLHttpRequest::getResponseHeader):
3853 Changed the minimum valid state from LOADING to HEADERS_RECEIVED.
3855 2009-09-16 Vitaly Repeshko <vitalyr@chromium.org>
3857 Reviewed by Dimitri Glazkov.
3859 [V8] Fix style violation in V8AbstractEventListener.
3860 https://bugs.webkit.org/show_bug.cgi?id=29303
3862 * bindings/v8/V8AbstractEventListener.h:
3863 (WebCore::V8AbstractEventListener::operator==):
3865 2009-09-16 Patrick Mueller <Patrick_Mueller@us.ibm.com>
3867 Reviewed by Timothy Hatcher.
3869 Add Watch Expression support to inspector
3870 https://bugs.webkit.org/show_bug.cgi?id=27514
3874 * English.lproj/localizedStrings.js:
3876 * WebCore.vcproj/WebCore.vcproj:
3877 * inspector/front-end/ConsoleView.js:
3878 (WebInspector.ConsoleView.prototype.completions):
3879 (WebInspector.ConsoleView.prototype.evalInInspectedWindow):
3880 (WebInspector.ConsoleView.prototype._enterKeyPressed):
3881 * inspector/front-end/ObjectPropertiesSection.js:
3882 (WebInspector.ObjectPropertiesSection.prototype.update.callback):
3883 (WebInspector.ObjectPropertiesSection.prototype.update):
3884 (WebInspector.ObjectPropertiesSection.prototype.updateProperties):
3885 (WebInspector.ObjectPropertiesSection.CompareProperties):
3886 (WebInspector.ObjectPropertyTreeElement.prototype.onpopulate.callback):
3887 (WebInspector.ObjectPropertyTreeElement.prototype.onpopulate):
3888 (WebInspector.ObjectPropertyTreeElement.prototype.update):
3889 * inspector/front-end/ScriptsPanel.js:
3890 (WebInspector.ScriptsPanel):
3891 (WebInspector.ScriptsPanel.prototype.reset):
3892 (WebInspector.ScriptsPanel.prototype._callFrameSelected):
3893 * inspector/front-end/WatchExpressionsSidebarPane.js: Added.
3894 (WebInspector.WatchExpressionsSidebarPane):
3895 (WebInspector.WatchExpressionsSidebarPane.prototype.refreshExpressions):
3896 (WebInspector.WatchExpressionsSection):
3897 (WebInspector.WatchExpressionsSection.prototype.update):
3898 (WebInspector.WatchExpressionsSection.prototype.addExpression):
3899 (WebInspector.WatchExpressionsSection.prototype.updateExpression):
3900 (WebInspector.WatchExpressionsSection.prototype.findAddedTreeElement):
3901 (WebInspector.WatchExpressionsSection.prototype.loadSavedExpressions):
3902 (WebInspector.WatchExpressionsSection.prototype.saveExpressions):
3903 (WebInspector.WatchExpressionsSection.CompareProperties):
3904 (WebInspector.WatchExpressionTreeElement):
3905 (WebInspector.WatchExpressionTreeElement.prototype.update):
3906 (WebInspector.WatchExpressionTreeElement.prototype._deleteButtonClicked):
3907 (WebInspector.WatchExpressionTreeElement.prototype.startEditing):
3908 (WebInspector.WatchExpressionTreeElement.prototype.editingCancelled):
3909 (WebInspector.WatchExpressionTreeElement.prototype.applyExpression):
3910 * inspector/front-end/WebKit.qrc:
3911 * inspector/front-end/inspector.css:
3912 * inspector/front-end/inspector.html:
3913 * manual-tests/inspector/debugger-watch-expressions.html: Added.
3915 2009-09-16 Greg Bolsinga <bolsinga@apple.com>
3917 Add ENABLE(INSPECTOR)
3918 https://bugs.webkit.org/show_bug.cgi?id=29260
3920 Reviewed by David Kilzer.
3922 No new tests. (No change in default behavior.)
3924 * DerivedSources.make: Use new WebCore.Inspector.exp file if ENABLE_DRAG_SUPPORT.
3925 * WebCore.base.exp: Move Inspector only exports to WebCore.Inspector.exp.
3926 * WebCore.xcodeproj/project.pbxproj: Add WebCore.Inspector.exp.
3927 * bindings/js/JSDOMWindowBase.cpp: Use ENABLE(INSPECTOR) where applicable.
3928 (WebCore::JSDOMWindowBase::supportsProfiling):
3929 * bindings/js/JSInspectedObjectWrapper.cpp: Wrap entire file in ENABLE(INSPECTOR).
3930 * bindings/js/JSInspectorBackendCustom.cpp: Ditto.
3931 * bindings/js/JSInspectorCallbackWrapper.cpp: Ditto.
3932 * bindings/js/ScriptObject.cpp: Use ENABLE(INSPECTOR) where applicable.
3933 * bindings/js/ScriptObject.h: Ditto.
3934 * bindings/js/ScriptObjectQuarantine.cpp: Wrap entire file in ENABLE(INSPECTOR).
3935 * dom/Document.cpp: Use ENABLE(INSPECTOR) where applicable.
3936 (WebCore::Document::recalcStyle):
3937 (WebCore::Document::addMessage):
3938 (WebCore::Document::resourceRetrievedByXMLHttpRequest):
3939 (WebCore::Document::scriptImported):
3940 * dom/Document.h: Ditto.
3941 * dom/Node.cpp: Ditto.
3942 (WebCore::Node::dispatchGenericEvent):
3943 * dom/ScriptExecutionContext.h: Ditto.
3945 * html/HTMLDocument.cpp: Ditto.
3946 (WebCore::HTMLDocument::createTokenizer):
3947 * html/HTMLTokenizer.cpp: Ditto.
3948 (WebCore::HTMLTokenizer::write):
3949 * inspector/ConsoleMessage.cpp: Ditto.
3950 (WebCore::ConsoleMessage::ConsoleMessage):
3951 (WebCore::ConsoleMessage::isEqual):
3952 * inspector/ConsoleMessage.h: Ditto.
3953 * inspector/DOMDispatchTimelineItem.cpp: Wrap entire file in ENABLE(INSPECTOR).
3954 * inspector/InspectorBackend.cpp: Ditto.
3955 * inspector/InspectorController.cpp: Ditto.
3956 * inspector/InspectorDOMAgent.cpp: Ditto.
3957 * inspector/InspectorDOMStorageResource.cpp: Ditto.
3958 * inspector/InspectorDatabaseResource.cpp: Ditto.
3959 * inspector/InspectorFrontend.cpp: Ditto.
3960 * inspector/InspectorResource.cpp: Ditto.
3961 * inspector/InspectorTimelineAgent.cpp: Ditto.
3962 * inspector/TimelineItem.cpp: Ditto.
3963 * loader/FrameLoader.cpp: Use ENABLE(INSPECTOR) where applicable.
3964 (WebCore::FrameLoader::detachFromParent):
3965 (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
3966 (WebCore::FrameLoader::loadedResourceFromMemoryCache):
3967 (WebCore::FrameLoader::dispatchWindowObjectAvailable):
3968 (WebCore::FrameLoader::dispatchDidCommitLoad):
3969 (WebCore::FrameLoader::dispatchAssignIdentifierToInitialRequest):
3970 (WebCore::FrameLoader::dispatchWillSendRequest):
3971 (WebCore::FrameLoader::dispatchDidReceiveResponse):
3972 (WebCore::FrameLoader::dispatchDidReceiveContentLength):
3973 (WebCore::FrameLoader::dispatchDidFinishLoading):
3974 * page/Chrome.cpp: Ditto.
3975 (WebCore::Chrome::mouseDidMoveOverElement):
3976 * page/Console.cpp: Ditto.
3977 (WebCore::Console::addMessage):
3978 (WebCore::Console::count):
3979 (WebCore::Console::profile):
3980 (WebCore::Console::profileEnd):
3981 (WebCore::Console::time):
3982 (WebCore::Console::timeEnd):
3983 (WebCore::Console::group):
3984 (WebCore::Console::groupEnd):
3985 * page/ContextMenuController.cpp: Ditto.
3986 (WebCore::ContextMenuController::handleContextMenuEvent):
3987 (WebCore::ContextMenuController::contextMenuItemSelected):
3988 * page/DOMWindow.cpp: Ditto.
3989 (WebCore::DOMWindow::sessionStorage):
3990 (WebCore::DOMWindow::localStorage):
3991 * page/EventHandler.cpp: Ditto.
3992 (WebCore::EventHandler::handleMousePressEvent):
3993 * page/FrameView.cpp: Ditto.
3994 (WebCore::FrameView::layout):
3995 (WebCore::FrameView::paintContents):
3996 * page/FrameView.h: Ditto.
3997 * page/Page.cpp: Ditto.
3998 (WebCore::Page::Page):
3999 (WebCore::Page::~Page):
4000 * page/Page.h: Ditto.
4001 * platform/ContextMenu.cpp: Ditto.
4002 (WebCore::ContextMenu::checkOrEnableIfNeeded):
4003 * platform/ContextMenuItem.h: Ditto.
4005 * storage/Database.cpp: Ditto.
4006 (WebCore::Database::openDatabase):
4007 * workers/WorkerContext.cpp: Ditto.
4008 (WebCore::WorkerContext::importScripts):
4009 * xml/XMLHttpRequest.cpp: Ditto.
4010 (WebCore::XMLHttpRequest::didFinishLoading):
4012 2009-09-16 Greg Bolsinga <bolsinga@apple.com>
4014 Add ENABLE(CONTEXT_MENUS)
4015 https://bugs.webkit.org/show_bug.cgi?id=29225
4017 Reviewed by David Kilzer.
4019 No new tests. (No change in default behavior.)
4021 * DerivedSources.make: Use new WebCore.ContextMenus.exp file if ENABLE_CONTEXT_MENUS.
4022 * WebCore.base.exp: Move ContextMenu only exports to WebCore.ContextMenus.exp.
4023 * WebCore.xcodeproj/project.pbxproj: Add WebCore.ContextMenus.exp.
4024 * dom/Node.cpp: Use ENABLE(CONTEXT_MENUS) where applicable.
4025 (WebCore::Node::defaultEventHandler):
4026 * loader/EmptyClients.h: Ditto.
4027 * page/ContextMenuController.cpp: Wrap entire file in ENABLE(CONTEXT_MENUS).
4028 * page/EventHandler.cpp: Use ENABLE(CONTEXT_MENUS) where applicable.
4029 * page/EventHandler.h: Ditto.
4030 * page/Page.cpp: Ditto.
4031 (WebCore::Page::Page):
4032 * page/Page.h: Ditto.
4033 * page/mac/EventHandlerMac.mm: Ditto.
4034 * page/mac/WebCoreViewFactory.h: Ditto.
4035 * platform/ContextMenu.cpp: Wrap entire file in ENABLE(CONTEXT_MENUS).
4036 * platform/LocalizedStrings.h: Use ENABLE(CONTEXT_MENUS) where applicable.
4037 * platform/mac/ContextMenuItemMac.mm: Wrap entire file in ENABLE(CONTEXT_MENUS).
4038 * platform/mac/ContextMenuMac.mm: Ditto.
4039 * platform/mac/LocalizedStringsMac.mm: Use ENABLE(CONTEXT_MENUS) where applicable.
4040 * svg/graphics/SVGImage.cpp: Ditto.
4041 (WebCore::SVGImage::dataChanged):
4043 2009-09-16 Dave Hyatt <hyatt@apple.com>
4045 Reviewed by Adam Roben.
4047 Clean up invalidation for repainting. Hoist the dirty rect intersection test in ScrollViewMac up
4048 into ScrollView so that all platforms do it.
4050 Patch deferred repaints in FrameView::repaintContentRectangle to only add the visible portion of
4051 the rectangle for repainting.
4053 * page/FrameView.cpp:
4054 (WebCore::FrameView::repaintContentRectangle):
4055 * platform/ScrollView.cpp:
4056 (WebCore::ScrollView::repaintContentRectangle):
4057 * platform/mac/ScrollViewMac.mm:
4058 (WebCore::ScrollView::platformRepaintContentRectangle):
4060 2009-09-16 Greg Bolsinga <bolsinga@apple.com>
4062 Add ENABLE(DRAG_SUPPORT)
4063 https://bugs.webkit.org/show_bug.cgi?id=29233
4065 Reviewed by David Kilzer.
4067 No new tests. (No change in default behavior.)
4069 * DerivedSources.make: Use new WebCore.DragSupport.exp file if ENABLE_DRAG_SUPPORT.
4070 * WebCore.base.exp: Move Drag Support only exports to WebCore.DragSupport.exp.
4071 * WebCore.xcodeproj/project.pbxproj: Add WebCore.DragSupport.exp.
4072 * dom/Clipboard.h: Use ENABLE(DRAG_SUPPORT) where applicable.
4073 * loader/EmptyClients.h: Ditto.
4074 * page/DragController.cpp: Wrap entire file in ENABLE(DRAG_SUPPORT).
4075 * page/EventHandler.cpp: Use ENABLE(DRAG_SUPPORT) where applicable.
4076 (WebCore::EventHandler::EventHandler):
4077 (WebCore::EventHandler::clear):
4078 (WebCore::EventHandler::handleMousePressEvent):
4079 (WebCore::EventHandler::handleMouseReleaseEvent):
4080 (WebCore::EventHandler::handleMouseMoveEvent):
4081 * page/EventHandler.h: Ditto.
4082 * page/Page.cpp: Ditto.
4083 (WebCore::Page::Page):
4084 * page/Page.h: Ditto.
4085 * page/mac/DragControllerMac.mm: Wrap entire file in ENABLE(DRAG_SUPPORT).
4086 * page/mac/EventHandlerMac.mm: Use ENABLE(DRAG_SUPPORT) where applicable.
4087 (WebCore::EventHandler::passSubframeEventToSubframe):
4088 * platform/DragData.cpp: Wrap entire file in ENABLE(DRAG_SUPPORT).
4089 * platform/DragImage.cpp: Wrap entire file in ENABLE(DRAG_SUPPORT).
4090 * platform/mac/ClipboardMac.h: Use ENABLE(DRAG_SUPPORT) where applicable.
4091 * platform/mac/ClipboardMac.mm: Ditto.
4092 * platform/mac/DragDataMac.mm: Wrap entire file in ENABLE(DRAG_SUPPORT).
4093 * platform/mac/DragImageMac.mm: Wrap entire file in ENABLE(DRAG_SUPPORT).
4094 * rendering/RenderLayer.cpp: Use ENABLE(DRAG_SUPPORT) where applicable.
4095 (WebCore::RenderLayer::autoscroll):
4096 * rendering/RenderObject.cpp: Ditto.
4097 * rendering/RenderObject.h: Ditto.
4098 * svg/graphics/SVGImage.cpp: Ditto.
4099 (WebCore::SVGImage::dataChanged):
4101 2009-09-16 Kevin Ollivier <kevino@theolliviers.com>
4103 wxMSW build fix after adding support for high resolution times in Win.
4105 * page/Settings.cpp:
4108 2009-09-16 Vitaly Repeshko <vitalyr@chromium.org>
4110 Reviewed by Dimitri Glazkov.
4112 [V8] Added operator==() to event listeners. This fixes V8 bindings
4113 build broken in http://trac.webkit.org/changeset/48402.
4114 https://bugs.webkit.org/show_bug.cgi?id=29298
4116 * bindings/v8/V8AbstractEventListener.cpp:
4117 (WebCore::V8AbstractEventListener::V8AbstractEventListener): Now
4118 uses JSEventListenerType.
4119 * bindings/v8/V8AbstractEventListener.h:
4120 (WebCore::V8AbstractEventListener::operator==): Only compares
4121 pointers since we create at most one wrapper for a JS object.
4123 2009-09-16 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
4125 Reviewed by Xan Lopez.
4127 [GTK] Crash when visiting http://flipper.googlelabs.com/
4128 https://bugs.webkit.org/show_bug.cgi?id=29293
4130 Check type for being null or empty before looking it up in the
4131 hash of supported types.
4133 Tested by http/tests/loading/redirect-with-no-location-crash.html
4135 * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
4136 (WebCore::MediaPlayerPrivate::supportsType):
4138 2009-09-15 Geoffrey Garen <ggaren@apple.com>
4140 Reviewed by Sam Weinig.
4142 Removed the notion of "disconnected nodes with event listeners" because
4143 it was vestigial. The reference cycle it tried to solve was solved another
4144 way in https://bugs.webkit.org/show_bug.cgi?id=21260.
4147 (WebCore::Document::removeAllEventListeners):
4150 (WebCore::Node::~Node):
4151 (WebCore::Node::insertedIntoDocument):
4152 (WebCore::Node::removedFromDocument):
4153 (WebCore::Node::willMoveToNewOwnerDocument):
4154 (WebCore::Node::didMoveToNewOwnerDocument):
4155 (WebCore::Node::addEventListener):
4156 (WebCore::Node::removeEventListener):
4157 (WebCore::Node::clearAttributeEventListener):
4159 2009-09-15 Chris Fleizach <cfleizach@apple.com>
4161 Reviewed by Beth Dakin.
4163 WAI-ARIA: add support for ranges, including the progressbar, slider, and spinbutton roles
4164 https://bugs.webkit.org/show_bug.cgi?id=28841
4166 Allow certain ARIA roles to change value with AXIncrement and AXDecrement.
4167 Consolidate increment/decrement/changeValue methods.
4169 Test: accessibility/aria-slider-value-change.html
4171 * accessibility/AccessibilityObject.cpp:
4172 * accessibility/AccessibilityRenderObject.cpp:
4173 (WebCore::AccessibilityRenderObject::increment):
4174 (WebCore::AccessibilityRenderObject::decrement):
4175 (WebCore::AccessibilityRenderObject::changeValueByPercent):
4176 (WebCore::AccessibilityRenderObject::setValue):
4177 (WebCore::AccessibilityRenderObject::canSetFocusAttribute):
4178 * accessibility/AccessibilityRenderObject.h:
4179 * accessibility/AccessibilitySlider.cpp:
4180 * accessibility/AccessibilitySlider.h:
4182 (WebCore::Element::updateAfterAttributeChanged):
4184 2009-09-15 Geoffrey Garen <ggaren@apple.com>
4186 Reviewed by Sam Weinig.
4188 Removed the jsEventListeners set from JSDOMGlobalObject, to simplify
4189 creation and destruction of JSDOMGlobalObject and event listeners.
4191 Added an abstract operator==() to EventListener, to replace the
4192 jsEventListeners set's role in determining if two event listeners are
4193 equal from the DOM's perspective.
4195 Added a type field to EventListener, and casting operations, to support
4196 operator==() and other abstract operations.
4198 * WebCore.xcodeproj/project.pbxproj:
4199 * bindings/js/JSAbstractWorkerCustom.cpp:
4200 (WebCore::JSAbstractWorker::addEventListener):
4201 (WebCore::JSAbstractWorker::removeEventListener):
4202 * bindings/js/JSDOMApplicationCacheCustom.cpp:
4203 (WebCore::JSDOMApplicationCache::addEventListener):
4204 (WebCore::JSDOMApplicationCache::removeEventListener):
4205 * bindings/js/JSDOMGlobalObject.cpp:
4206 * bindings/js/JSDOMGlobalObject.h:
4207 * bindings/js/JSDOMWindowCustom.cpp:
4208 (WebCore::JSDOMWindow::addEventListener):
4209 (WebCore::JSDOMWindow::removeEventListener):
4210 * bindings/js/JSDesktopNotificationsCustom.cpp:
4211 (WebCore::JSNotification::addEventListener):
4213 * bindings/js/JSEventListener.cpp:
4214 (WebCore::JSEventListener::JSEventListener):
4215 (WebCore::JSEventListener::~JSEventListener):
4216 (WebCore::JSEventListener::markJSFunction):
4217 (WebCore::JSEventListener::handleEvent):
4218 (WebCore::JSEventListener::reportError):
4219 (WebCore::JSEventListener::operator==):
4220 * bindings/js/JSEventListener.h:
4221 (WebCore::JSEventListener::cast):