1 2009-09-25 Dan Bernstein <mitz@apple.com>
3 Reviewed by Jon Honeycutt.
6 <rdar://problem/7211635> 2 byte characters are displayed as garbaged
7 <rdar://problem/7212626> garbled/gibberish text (off-by-one)
9 When the Windows Fonts directory contains more than one font file for a
10 given font name, which of the fonts gets assigned to the name in the
11 Core Graphics font database was determined arbitrarily and did not
12 always match the font GDI used for the same font name. The mismatch
13 caused character-to-glyph mapping to use one font and glyph rendering to
16 The fix is to update the Core Graphics font database from the registry
17 entries (that reflect the name-to-font mapping that GDI uses) after
18 populating it with the result of scanning the Fonts directory. As a
19 consequence, the directory needs to be scanned at startup every time the
20 registry key changes, so the last value of the registry key is kept
21 in the property list on disk so that it could be compared to the current
24 * platform/graphics/win/FontDatabase.cpp:
25 (WebCore::populateFontDatabaseFromPlist): Now takes a property list as
26 a parameter and avoids round-tripping through XML by calling
27 wkAddFontsFromPlist() instead of wkAddFontsFromPlistRepresentation().
28 (WebCore::fontFilenamesFromRegistryKey):
29 (WebCore::cgFontDBKey):
30 (WebCore::writeFontDatabaseToPlist): Now takes the CG font DB property
31 list and a property list with the font filenames from the registry and
32 writes a dictionary with those property lists as values.
33 (WebCore::fontFilenamesFromRegistry): Added. Returns an array with the
34 values in the HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts
36 (WebCore::populateFontDatabase): Changed to read the contents of the
37 Fonts registry key and compare it with the last-saved value from the
38 property list, and to call wkAddFontsFromRegistry() after populating the
39 CG font DB from the file system. Uses wkCreateFontsPlist() instead of
40 wkCreateFontsPlistRepresentation() to avoid round-tripping through XML.
42 2009-09-25 Geoffrey Garen <ggaren@apple.com>
44 Reviewed by Darin Adler.
46 Inlined some object creation code, including lexicalGlobalObject access
47 https://bugs.webkit.org/show_bug.cgi?id=29750
49 * bindings/js/JSInspectorBackendCustom.cpp:
50 (WebCore::JSInspectorBackend::currentCallFrame):
51 * inspector/JavaScriptDebugServer.cpp:
52 (WebCore::JavaScriptDebugServer::hasBreakpoint): Updated for JavaScriptCore
55 2009-09-25 Dave Hyatt <hyatt@apple.com>
57 Reviewed by Anders Carlsson.
59 https://bugs.webkit.org/show_bug.cgi?id=24399
60 Make @import work in user stylesheets. The first bug was that the URL wasn't being set on the
61 user sheets themselves, so relative @import URLs couldn't resolve properly. The second bug
62 was that the loads would be denied. This is fixed by using the requestUserCSSStyleSheet method
63 instead of the normal request method. In order to know when to do this, CSSStyleSheets now have
64 a propagated boolean, m_isUserStyleSheet, that lets them know if they are user stylesheets or not.
66 * css/CSSImportRule.cpp:
67 (WebCore::CSSImportRule::insertedIntoParent):
68 * css/CSSStyleSheet.cpp:
69 (WebCore::CSSStyleSheet::CSSStyleSheet):
70 * css/CSSStyleSheet.h:
71 (WebCore::CSSStyleSheet::setIsUserStyleSheet):
72 (WebCore::CSSStyleSheet::isUserStyleSheet):
74 (WebCore::Document::pageUserSheet):
75 (WebCore::Document::pageGroupUserSheets):
77 2009-09-25 Simon Fraser <simon.fraser@apple.com>
79 Reviewed by Darin Adler.
81 Crash with hardware accelerated rotation of a PDF image in a data URL
82 <rdar://problem/7250378>
84 PDF images don't return a color space from CGImageGetColorSpace(),
85 so we need to null-check the return value before use.
87 Test: compositing/color-matching/pdf-image-match.html
89 * platform/graphics/mac/GraphicsLayerCA.mm:
90 (WebCore::GraphicsLayerCA::setContentsToImage):
92 2009-09-25 Darin Adler <darin@apple.com>
94 Reviewed by Geoffrey Garen.
96 Null-deref when first access to an Attr node is after its Element is destroyed
97 https://bugs.webkit.org/show_bug.cgi?id=29748
99 Test: fast/dom/Attr/access-after-element-destruction.html
101 * bindings/js/JSAttrCustom.cpp:
102 (WebCore::JSAttr::markChildren): Added. Keeps the ownerElement alive as
103 long as the Attr is alive.
105 * bindings/js/JSNamedNodeMapCustom.cpp:
106 (WebCore::JSNamedNodeMap::markChildren): Added. Keeps the Element alive as
107 long as the NamedNodeMap is alive.
109 * dom/Attr.idl: Added CustomMarkFunction attribute.
111 * dom/NamedAttrMap.cpp:
112 (WebCore::NamedNodeMap::getAttributeItem): Tweaked formatting.
113 (WebCore::NamedNodeMap::detachFromElement): Call clearAttributes so we don't
114 have attributes hanging around that might need an Attr node created; that way
115 we won't crash with a null-dereference trying to deal with one of them. This
116 can't happen when working with JavaScript since the Element will be kept
117 alive due to the change above.
118 (WebCore::NamedNodeMap::addAttribute): Fix function name in comment.
119 (WebCore::NamedNodeMap::removeAttribute): Removed unneeded "+ 1" and added
122 * dom/NamedAttrMap.h: Made the element function public so it can be used by
123 the JavaScript binding to keep the Element alive.
125 * dom/NamedNodeMap.idl: Added CustomMarkFunction attribute.
127 2009-09-24 Alexey Proskuryakov <ap@apple.com>
129 Reviewed by Darin Adler and Sam Weinig.
131 Onclick not fired for an element copied with cloneContents() or cloneNode()
132 https://bugs.webkit.org/show_bug.cgi?id=25130
134 The change here is that JS event listeners don't keep a reference to a global object from
135 where they were created, and instead take it as a parameter when parsing source code. Also,
136 the listener creation won't fail just because it happens for an element in a frameless
138 Thus, moving nodes between documents no longer results in having incorrect registered
139 lazy event listeners on them.
141 Tests: fast/events/attribute-listener-cloned-from-frameless-doc-context-2.html
142 fast/events/attribute-listener-cloned-from-frameless-doc-context.html
143 fast/events/attribute-listener-cloned-from-frameless-doc.xhtml
144 fast/events/attribute-listener-extracted-from-frameless-doc-context-2.html
145 fast/events/attribute-listener-extracted-from-frameless-doc-context.html
147 * bindings/js/JSEventListener.cpp:
148 (WebCore::JSEventListener::JSEventListener): Don't take a reference to JSDOMGlobalObject.
149 (WebCore::JSEventListener::jsFunction): Take ScriptExecutionContext as a parameter for
150 getting to JSDOMGlobalObject. It's not used in base class, but is in JSLazyEventListner.
151 (WebCore::JSEventListener::markJSFunction): Don't mark the global object.
152 (WebCore::JSEventListener::handleEvent): Get global object from ScriptExecutionContext.
153 (WebCore::JSEventListener::reportError): Ditto.
155 * bindings/js/JSEventListener.h: (WebCore::JSEventListener::create): Don't keep a reference
156 to JSDOMGlobalObject.
158 * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::parseCode): Listener
159 creation was split between this function and ScriptEventListener; moved it here, as JS
160 global object can be different now.
162 * bindings/js/JSLazyEventListener.h: (WebCore::JSLazyEventListener::create): Keep source URL,
163 which can not be determined at parsing time.
165 * bindings/js/ScriptEventListener.cpp: (WebCore::createAttributeEventListener): Moved code
166 for listener creation to JSLazyEventListener. XSSAuditor code remains here, because tests
167 expect that errors are logged at document parsing time, and because I don't know what other
168 side effects moving it vould have.
170 * dom/EventListener.h: handleEvent() and reportError() now take ScriptExecutionContext,
171 because JSC needs a global context here.
173 * bindings/js/JSAbstractWorkerCustom.cpp:
174 (WebCore::JSAbstractWorker::addEventListener):
175 (WebCore::JSAbstractWorker::removeEventListener):
176 * bindings/js/JSDOMApplicationCacheCustom.cpp:
177 (WebCore::JSDOMApplicationCache::addEventListener):
178 (WebCore::JSDOMApplicationCache::removeEventListener):
179 * bindings/js/JSDOMGlobalObject.cpp:
180 (WebCore::JSDOMGlobalObject::createJSAttributeEventListener):
181 * bindings/js/JSDOMWindowCustom.cpp:
182 (WebCore::JSDOMWindow::addEventListener):
183 (WebCore::JSDOMWindow::removeEventListener):
184 * bindings/js/JSEventSourceCustom.cpp:
185 (WebCore::JSEventSource::addEventListener):
186 (WebCore::JSEventSource::removeEventListener):
187 * bindings/js/JSMessagePortCustom.cpp:
188 (WebCore::JSMessagePort::addEventListener):
189 (WebCore::JSMessagePort::removeEventListener):
190 * bindings/js/JSNodeCustom.cpp:
191 (WebCore::JSNode::addEventListener):
192 (WebCore::JSNode::removeEventListener):
193 * bindings/js/JSSVGElementInstanceCustom.cpp:
194 (WebCore::JSSVGElementInstance::addEventListener):
195 (WebCore::JSSVGElementInstance::removeEventListener):
196 * bindings/js/JSWorkerContextCustom.cpp:
197 (WebCore::JSWorkerContext::addEventListener):
198 (WebCore::JSWorkerContext::removeEventListener):
199 * bindings/js/JSXMLHttpRequestCustom.cpp:
200 (WebCore::JSXMLHttpRequest::addEventListener):
201 (WebCore::JSXMLHttpRequest::removeEventListener):
202 * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
203 (WebCore::JSXMLHttpRequestUpload::addEventListener):
204 (WebCore::JSXMLHttpRequestUpload::removeEventListener):
205 * bindings/objc/ObjCEventListener.h:
206 * bindings/objc/ObjCEventListener.mm:
207 (WebCore::ObjCEventListener::handleEvent):
208 * bindings/scripts/CodeGeneratorJS.pm:
209 * dom/EventTarget.cpp:
210 (WebCore::EventTarget::fireEventListeners):
211 * inspector/InspectorDOMAgent.cpp:
212 (WebCore::InspectorDOMAgent::handleEvent):
213 * inspector/InspectorDOMAgent.h:
214 * inspector/InspectorDOMStorageResource.cpp:
215 (WebCore::InspectorDOMStorageResource::handleEvent):
216 * inspector/InspectorDOMStorageResource.h:
217 * loader/ImageDocument.cpp:
218 (WebCore::ImageEventListener::handleEvent):
219 * svg/animation/SVGSMILElement.cpp:
220 (WebCore::ConditionEventListener::handleEvent):
221 * workers/WorkerContext.cpp:
222 (WebCore::WorkerContext::reportException):
223 Don't pass global object to JSEventListener::create(), which no longer needs it.
224 Note that some of these functions still have an early return for null global object, which
225 can probably be removed in a later patch.
226 Pass ScriptExecutionContext to EventListener methods that now need it.
228 2009-09-25 Enrica Casucci <enrica@apple.com>
230 Reviewed by Darin Adler, Dan Bernstein, Adele Peterson, and others.
232 Fix for https://bugs.webkit.org/show_bug.cgi?id=29740
233 <rdar://problem/7168738> Gmail: After changing a foreground text color, pressing return doesn't apply background to new line
235 Change the way style is preserved when inserting a new paragraph.
236 The original code handled insertion at the beginning and at the end of a paragraph as special
237 cases. The newly created paragraph contained a set of nodes generated starting from the
238 computed style of the insertion node. This approach has two problems:
239 1. if the insertion node has a non opaque background color and one of the parent element did have
240 a solid background color the new paragraph did not have the element with the solid color in the tree.
241 2. in some circumstances it generated more markup than the original paragraph had (a span with bold, italic,
242 background color and some font attribute was being reproduced as span + bold + italic + font as separate tags.
243 The new approach is to recreate in the new paragraph the same hierarchy of nodes found in the
244 paragraph where the insertion point is.
246 Test: editing/inserting/insert-bg-font.html
248 * editing/InsertParagraphSeparatorCommand.cpp:
249 (WebCore::InsertParagraphSeparatorCommand::getAncestorsInsideBlock): retrieves the list of all the ancestors
250 between the insert node and the outer block.
251 (WebCore::InsertParagraphSeparatorCommand::cloneHierarchyUnderNewBlock): uses the list of ancestors to recreate
252 in the new paragraph the same element hierarchy present in the starting paragraph.
253 (WebCore::InsertParagraphSeparatorCommand::doApply): changed the code to handle the general case of insertion
254 in the middle of the paragraph to use the new methods. Changed the handling of the insertion at the beginning and
255 at the end of the paragraph to use the new methods instead of applying the calculated style.
256 * editing/InsertParagraphSeparatorCommand.h: added methods getAncestorsInsideBlock and cloneHierarchyUnderNewBlock.
258 2009-09-25 Patrick Mueller <Patrick_Mueller@us.ibm.com>
260 Reviewed by Timothy Hatcher.
262 Content-type parameters not taken into account when building form-data
263 https://bugs.webkit.org/show_bug.cgi?id=28970
265 existing manual test case extended with new tests
267 * English.lproj/localizedStrings.js:
268 * inspector/front-end/ResourceView.js:
269 (WebInspector.ResourceView.prototype._refreshFormData):
270 (WebInspector.ResourceView.prototype._refreshParms):
271 * manual-tests/inspector/display-form-data.html:
273 2009-09-25 Yuan Song <song.yuan@ericsson.com>
275 Reviewed by Darin Adler.
277 https://bugs.webkit.org/show_bug.cgi?id=14566
279 Raise SECURITY_ERR exception if an attempt is made to change document.domain to an invalid value.
281 Test: fast/js/invalid-domain-change-throws-exception.html
284 (WebCore::Document::setDomain):
288 2009-09-25 Adam Barth <abarth@webkit.org>
290 Reviewed by Dimitri Glazkov.
292 [V8] Teach ScheduledAction::execute about isolated worlds
293 https://bugs.webkit.org/show_bug.cgi?id=27703
295 When setTimeout is called with a string argument in an isolated
296 world, we now compile the string in the isolated world.
298 Last time we tried this change, we got a lot of crashes. This
299 time we're using a fresh local handle as our context to avoid
300 trouble if the peristent handle gets disposed before we leave
303 Test: fast/dom/timer-clear-interval-in-handler-and-generate-error.html
305 * bindings/v8/ScheduledAction.cpp:
306 (WebCore::ScheduledAction::execute):
308 2009-09-25 Paul Godavari <paul@chromium.org>
310 Reviewed by Darin Fisher.
312 Fix a regression in Mac Chromium popup menus, where the user's
313 selection was ignored and the popup became unresponsive.
314 https://bugs.webkit.org/show_bug.cgi?id=29726
316 The fix is to notify the popup's client that the popup was hidden,
317 even if the popup has no parent.
319 * platform/chromium/PopupMenuChromium.cpp:
320 (WebCore::PopupListBox::hidePopup):
322 2009-09-25 Alexander Pavlov <apavlov@chromium.org>
324 Reviewed by Dan Bernstein.
326 Enable Pasteboard::writePlainText for Chromium and fix code style nits.
327 https://bugs.webkit.org/show_bug.cgi?id=29734
329 * platform/chromium/PasteboardChromium.cpp:
330 (WebCore::Pasteboard::writePlainText):
331 * platform/gtk/PasteboardGtk.cpp:
332 (WebCore::Pasteboard::writePlainText):
333 (WebCore::Pasteboard::writeURL):
334 * platform/mac/PasteboardMac.mm:
335 (WebCore::Pasteboard::writeSelection):
336 (WebCore::Pasteboard::writePlainText):
337 (WebCore::Pasteboard::writeURL):
338 * platform/qt/PasteboardQt.cpp:
339 (WebCore::Pasteboard::writePlainText):
341 2009-09-25 Yongjun Zhang <yongjun.zhang@nokia.com>
343 Reviewed by Ariya Hidayat.
345 https://bugs.webkit.org/show_bug.cgi?id=28876
346 [Qt] reduce peak memory consumption of text decoding.
348 Chop large input buffer into small buffers to reduce peak memory
351 * platform/text/qt/TextCodecQt.cpp:
352 (WebCore::TextCodecQt::decode):
354 2009-09-24 Jon Honeycutt <jhoneycutt@apple.com>
356 Add a mechanism for automatically halting plug-ins.
358 Reviewed by Oliver Hunt and Alice Liu.
363 Update export of Page constructor.
369 * WebCore.vcproj/WebCore.vcproj:
370 Add PluginHalter.{h,cpp}, PluginHalterClient.h, and
373 * WebCore.xcodeproj/project.pbxproj:
374 Add files to Mac project.
376 * loader/EmptyClients.h:
377 Added an empty PluginHalterClient.
378 (WebCore::EmptyPluginHalterClient::shouldHaltPlugin):
381 * page/PluginHalter.cpp: Added.
382 (WebCore::PluginHalter::PluginHalter):
383 (WebCore::PluginHalter::didStartPlugin):
384 Add the object to the plug-in set. If this is the only item in the set,
385 set m_oldestStartTime to this object's time, and start the timer.
386 (WebCore::PluginHalter::didStopPlugin):
387 Remove the plug-in from the set.
388 (WebCore::PluginHalter::timerFired):
389 Find the cut-off time as the current time minus the allowed run time;
390 plug-ins older than this may be halted. Iterate over the plug-ins. Find
391 the object with the oldest start time that is too young to be halted;
392 we'll use its start time to set the timer's next fire time. For all
393 plug-ins that are candidates to be halted, call the
394 PluginHalterClient's shouldHaltPlugin(). If this function returns true,
395 call the plug-in's halt() function. Remove these objects from the set
396 of tracked plug-ins. Call startTimerIfNecessary() to restart the timer.
397 (WebCore::PluginHalter::startTimerIfNecessary):
398 If the timer is set to fire, or the set of tracked plug-ins is empty,
399 return early. Set the timer to fire after the oldest plug-in has run
400 for the allowed run time.
402 * page/PluginHalter.h: Added.
403 (WebCore::PluginHalter::setPluginAllowedRunTime):
405 * page/PluginHalterClient.h: Added.
406 (WebCore::PluginHalterClient::~PluginHalterClient):
409 (WebCore::Page::Page):
410 Initialize m_pluginHalterClient. Call pluginHalterEnabledStateChanged()
411 to create the PluginHalter if necessary.
412 (WebCore::Page::pluginHalterEnabledStateChanged):
413 If plug-in halting is enabled, create the PluginHalter. If it is
415 (WebCore::Page::pluginAllowedRunTimeChanged):
416 If there is a plug-in halter, call its setPluginAllowedRunTime().
417 (WebCore::Page::didStartPlugin):
418 If there is a plug-in halter, call its didStartPlugin().
419 (WebCore::Page::didStopPlugin):
420 If there is a plug-in halter, call its didStopPlugin().
423 Add a parameter to the Page constructor for the PluginHalterClient.
424 Added declarations for didStartPlugin() and didStopPlugin(), which are
425 called when HaltablePlugins are added to or removed from the page. Adds
426 pluginAllowedRunTimeChanged() and pluginHalterEnabledStateChanged() to
427 notify the Page when these settings are changed. Added members to hold
428 the PluginHalter and the PluginHalterClient.
431 (WebCore::Settings::Settings):
432 (WebCore::Settings::setPluginHalterEnabled):
433 If the enabled state has changed, call the Page's
434 pluginHalterEnabledStateChanged().
435 (WebCore::Settings::setPluginAllowedRunTime):
436 Call the Page's pluginAllowedRunTimeChanged().
439 (WebCore::Settings::pluginHalterEnabled):
440 (WebCore::Settings::pluginAllowedRunTime):
442 * page/HaltablePlugin.h: Added. Defines an interface for plug-ins that
443 can be automatically halted.
444 (WebCore::HaltablePlugin::~HaltablePlugin):
446 * svg/graphics/SVGImage.cpp:
447 (WebCore::SVGImage::dataChanged):
448 Pass a dummy PluginHalterClient.
450 2009-09-24 Simon Fraser <simon.fraser@apple.com>
452 Reviewed by Dan Bernstein.
454 REGRESSION: webkit-transform scale no longer works properly in nightly build
455 https://bugs.webkit.org/show_bug.cgi?id=29730
457 When the initial or final state of a scale animation does not specify a transform,
458 use a default scale of 1, rather than zero.
460 Test: compositing/transitions/scale-transition-no-start.html
462 * platform/graphics/mac/GraphicsLayerCA.mm:
463 (WebCore::getTransformFunctionValue):
465 2009-09-24 John Gregg <johnnyg@google.com>
467 Reviewed by Eric Seidel.
469 isEnabled switch for notifications (experimental) in Page Settings
470 https://bugs.webkit.org/show_bug.cgi?id=28930
472 Adds a run-time flag in Settings object that controls whether
473 to expose desktop notifications.
475 No new test, but test code also modified to set this preference.
477 * page/DOMWindow.cpp:
478 (WebCore::DOMWindow::webkitNotifications): check preference before returning notifications object
480 (WebCore::Settings::Settings):
481 (WebCore::Settings::setExperimentalNotificationsEnabled):
483 (WebCore::Settings::experimentalNotificationsEnabled):
485 2009-09-24 Dan Bernstein <mitz@apple.com>
487 Reviewed by Sam Weinig.
489 Fix <rdar://problem/7162000> Crash while trying to
490 calculate the horizontal position of image
492 Test: fast/inline-block/relative-positioned-rtl-crash.html
494 * rendering/RenderBox.cpp:
495 (WebCore::RenderBox::calcAbsoluteHorizontalReplaced): Corrected an
496 isInline() test to isRenderInline(). This is similar to r41259.
498 2009-09-24 Jessie Berlin <jberlin@webkit.org>
500 Reviewed by Timothy Hatcher.
502 Fix expanding profile call stacks being broken after sorting.
503 https://bugs.webkit.org/show_bug.cgi?id=26423
505 * inspector/front-end/ProfileDataGridTree.js:
506 (WebInspector.ProfileDataGridNode.prototype.sort):
507 Set shouldRefreshChildren to true on collapsed nodes with children so that expanding it
508 causes the children to be placed in the right positions.
510 2009-09-24 Geoffrey Garen <ggaren@apple.com>
512 Reviewed by Stephanie Lewis.
514 Fixed sudden termination console spew due to too many calls to
515 enableSuddenTermination.
517 <rdar://problem/7063125> 10A410: Safari logging enableSuddenTermination errors
519 * page/DOMWindow.cpp:
520 (WebCore::removeUnloadEventListener):
521 (WebCore::removeAllUnloadEventListeners):
522 (WebCore::removeBeforeUnloadEventListener):
523 (WebCore::removeAllBeforeUnloadEventListeners): Only
524 enableSuddenTermination if the set of listeners is empty *and* this
525 window was in the set. Otherwise, a no-op will cause us to enableSuddenTermination.
527 2009-09-24 Carol Szabo <carol.szabo@nokia.com>
529 Reviewed by Alexey Proskuryakov.
531 WebKit returns "" instead of null when getting
532 inexistent, forbidden or invalidly named headers.
533 https://bugs.webkit.org/show_bug.cgi?id=29140
535 * xml/XMLHttpRequest.cpp:
536 (WebCore::XMLHttpRequest::getResponseHeader):
537 Changed to return null as it should according to the spec.
539 2009-09-24 Jeremy Orlow <jorlow@chromium.org>
541 Reviewed by Dimitri Glazkov.
543 Add GYP generated files to svn:ignore
544 https://bugs.webkit.org/show_bug.cgi?id=29724
546 Adding the following files to the svn:ignore list (all in the
547 WebCore/WebCore.gyp directory)
553 WebCore_Release.rules
554 WebCore_Release - no tcmalloc.rules
557 WebCore_Debug_rules.mk
558 WebCore_Release_rules.mk
559 WebCore_Release - no tcmalloc_rules.mk
560 WebCore_Purify_rules.mk
564 * WebCore.gyp: Changed property svn:ignore.
566 2009-09-24 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
568 Unreviewed. Mac build fix.
570 * page/EventHandler.cpp:
571 (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal):
572 remove unused parameter from function signature;
574 2009-09-24 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
576 Reviewed by Oliver Hunt.
578 Implement correct horizontal scrollbar behavior for GTK+ also on
581 https://bugs.webkit.org/show_bug.cgi?id=29348
582 [Gtk] Scrollwheel on horizontal scrollbars should slide horizontally
584 Test: platform/gtk/scrollbars/overflow-scrollbar-horizontal-wheel-scroll.html
586 * page/EventHandler.cpp:
587 (WebCore::EventHandler::handleWheelEvent): on GTK+, when using the
588 wheel with the pointer on the horizontal scrollbar, scroll
590 * platform/PlatformWheelEvent.h:
591 * platform/gtk/WheelEventGtk.cpp:
592 (WebCore::PlatformWheelEvent::swapOrientation): allow adding a
593 vertical scroll to the horizontal one;
595 2009-09-24 Jeremy Orlow <jorlow@chromium.org>
597 Reviewed by Eric Seidel.
599 StorageNamespace::storageArea() should take in a PassRefPtr<StorageOrigin>
600 https://bugs.webkit.org/show_bug.cgi?id=29290
602 Modified StorageNamespace::storageArea() to take in a PassRefPtr<StorageOrigin>
603 per http://webkit.org/coding/RefPtr.html
605 No behavior change, so no tests.
607 * storage/StorageNamespace.h:
608 * storage/StorageNamespaceImpl.cpp:
609 (WebCore::StorageNamespaceImpl::storageArea):
610 * storage/StorageNamespaceImpl.h:
612 2009-09-24 Geoffrey Garen <ggaren@apple.com>
614 Reviewed by Sam Weinig.
616 Added back enable/disableSuddenTermination() functionality I accidentally
617 removed in my last patch.
619 * page/DOMWindow.cpp:
620 (WebCore::addUnloadEventListener):
621 (WebCore::removeUnloadEventListener):
622 (WebCore::removeAllUnloadEventListeners):
623 (WebCore::addBeforeUnloadEventListener):
624 (WebCore::removeBeforeUnloadEventListener):
625 (WebCore::removeAllBeforeUnloadEventListeners):
626 (WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
627 (WebCore::DOMWindow::~DOMWindow):
628 (WebCore::DOMWindow::addEventListener):
629 (WebCore::DOMWindow::removeEventListener):
630 (WebCore::DOMWindow::removeAllEventListeners):
632 2009-09-24 Sam Weinig <sam@webkit.org>
634 Reviewed by Steve Falkenburg and Mark Rowe.
636 Don't pass -F to GCC on non-mac platforms since it is an darwin only.
638 * DerivedSources.make:
640 2009-09-24 Sam Weinig <sam@webkit.org>
646 2009-09-23 Stephen White <senorblanco@chromium.org>
648 Reviewed by Eric Seidel.
650 Revert the relevant parts of r47925, and implement an alternate
651 fix (localize the coordinate check to GraphicsContext::clipPath()).
652 This fixes http://crbug.com/21174.
654 Covered by LayoutTests/svg/dynamic-updates/SVGClipPathElement-dom-clipPathUnits-attr.html.
656 * platform/graphics/skia/GraphicsContextSkia.cpp:
657 (WebCore::GraphicsContext::clipPath):
658 * platform/graphics/skia/PlatformContextSkia.cpp:
659 (PlatformContextSkia::currentPathInLocalCoordinates):
661 2009-09-24 Brady Eidson <beidson@apple.com>
663 Reviewed by Sam Weinig.
665 Merge changes from Mozilla's FTP directory parser.
666 <rdar://problem/7227620> and https://bugs.webkit.org/show_bug.cgi?id=29294
668 FTP layout tests not possible at this time.
669 https://bugs.webkit.org/show_bug.cgi?id=29719 tracks making them possible.
671 * loader/FTPDirectoryParser.cpp:
672 (WebCore::ParsingFailed):
673 (WebCore::parseOneFTPLine):
675 2009-09-24 Philippe Normand <pnormand@igalia.com>
677 Reviewed by Gustavo Noronha.
679 [GTK] re-enable some media tests
680 https://bugs.webkit.org/show_bug.cgi?id=29716
682 make canPlayType() return "probably" if mime-type is known
683 and codecs string is not empty. If codecs is empty return
686 * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
687 (WebCore::MediaPlayerPrivate::supportsType):
689 2009-09-24 Sam Weinig <sam@webkit.org>
691 Reviewed by Dan Bernstein.
693 Fix for https://bugs.webkit.org/show_bug.cgi?id=29703
694 Add a function to element to check whether it matches a CSS selector
696 Implement Element.webkitMatchesSelector.
698 * css/CSSSelectorList.cpp:
699 (WebCore::forEachTagSelector):
700 (WebCore::forEachSelector):
701 (WebCore::SelectorNeedsNamespaceResolutionFunctor::operator()):
702 (WebCore::CSSSelectorList::selectorsNeedNamespaceResolution):
703 * css/CSSSelectorList.h:
704 Moved code to iterate the CSSSelectorList and determine if any
705 selectors need namespace resolution from a static function in
706 Node.cpp to CSSSelectorList so that it can be used by webkitMatchesSelector
707 as well as querySelector/querySelectorAll.
710 (WebCore::Element::webkitMatchesSelector):
713 Implement the new function. Handles exceptional cases identically to
714 querySelector/querySelectorAll.
717 (WebCore::Node::querySelector):
718 (WebCore::Node::querySelectorAll):
719 Moved selectorsNeedNamespaceResolution to CSSSelectorList from here.
721 2009-09-24 Vitaly Repeshko <vitalyr@chromium.org>
723 Reviewed by Dimitri Glazkov.
725 [V8] Fixed bindings build after http://trac.webkit.org/changeset/48701
726 https://bugs.webkit.org/show_bug.cgi?id=29713
728 Got rid of isWindowEvent in function signatures:
729 * bindings/v8/V8AbstractEventListener.cpp:
730 (WebCore::V8AbstractEventListener::invokeEventHandler):
731 (WebCore::V8AbstractEventListener::handleEvent):
732 (WebCore::V8AbstractEventListener::getReceiverObject):
733 * bindings/v8/V8AbstractEventListener.h:
734 * bindings/v8/V8LazyEventListener.cpp:
735 (WebCore::V8LazyEventListener::callListenerFunction):
736 * bindings/v8/V8LazyEventListener.h:
737 * bindings/v8/V8WorkerContextEventListener.cpp:
738 (WebCore::V8WorkerContextEventListener::handleEvent):
739 (WebCore::V8WorkerContextEventListener::callListenerFunction):
740 (WebCore::V8WorkerContextEventListener::getReceiverObject):
741 * bindings/v8/V8WorkerContextEventListener.h:
742 * bindings/v8/custom/V8CustomEventListener.cpp:
743 (WebCore::V8EventListener::callListenerFunction):
744 * bindings/v8/custom/V8CustomEventListener.h:
746 Switched to EventTarget methods of adding/removing listeners:
747 * bindings/v8/custom/V8DOMApplicationCacheCustom.cpp:
748 (WebCore::toEventID):
749 (WebCore::ACCESSOR_SETTER):
751 * dom/EventTarget.h: Some functions were incorrectly marked
754 2009-09-24 Pavel Feldman <pfeldman@chromium.org>
756 Reviewed by Timothy Hatcher.
758 Web Inspector: Color-code watch expression errors with red.
760 https://bugs.webkit.org/show_bug.cgi?id=29707
762 * inspector/front-end/WatchExpressionsSidebarPane.js:
763 (WebInspector.WatchExpressionsSection.prototype.update):
764 (WebInspector.WatchExpressionTreeElement.prototype.update):
765 * inspector/front-end/inspector.css:
767 2009-09-24 Pavel Feldman <pfeldman@chromium.org>
769 Reviewed by Timothy Hatcher.
771 Web Inspector: Fix formatting for messages derived from resource warnings,
772 couple of drive-by formatting fixes.
774 https://bugs.webkit.org/show_bug.cgi?id=29705
776 * inspector/InspectorFrontend.cpp:
777 (WebCore::InspectorFrontend::addMessageToConsole):
778 * inspector/front-end/ConsoleView.js:
779 * inspector/front-end/InjectedScript.js:
780 (InjectedScript._evaluateAndWrap):
781 * inspector/front-end/WatchExpressionsSidebarPane.js:
782 (WebInspector.WatchExpressionsSection.prototype.update):
784 2009-09-22 Pavel Feldman <pfeldman@chromium.org>
786 Reviewed by Timothy Hatcher.
788 WebInspector: Implement InspectorController::copyNode(id).
790 https://bugs.webkit.org/show_bug.cgi?id=28357
792 * inspector/InspectorBackend.cpp:
793 (WebCore::InspectorBackend::copyNode):
794 * inspector/InspectorBackend.h:
795 * inspector/InspectorBackend.idl:
796 * inspector/front-end/ElementsPanel.js:
797 (WebInspector.ElementsPanel.prototype.handleCopyEvent):
799 2009-09-24 Oliver Hunt <oliver@apple.com>
801 Reviewed by NOBODY(rollout)
803 Roll out r48712 as it is incorrect.
805 Overriding getPropertyNames is incorrect.
807 * bridge/runtime_array.cpp:
808 * bridge/runtime_array.h:
810 2009-09-24 Xan Lopez <xlopez@igalia.com>
812 Revert r48697, since it broke key handling notification to GTK+.
814 * platform/gtk/KeyEventGtk.cpp:
815 (WebCore::keyIdentifierForGdkKeyCode):
816 (WebCore::singleCharacterString):
818 2009-09-24 Philippe Normand <pnormand@igalia.com>
820 Reviewed by Xan Lopez.
822 [GTK] GStreamer MediaPlayer is unable to correctly querry duration
823 https://bugs.webkit.org/show_bug.cgi?id=24639
825 check duration returned by gst_element_query_duration() only
826 when using GStreamer < 0.10.23.
828 * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
829 (WebCore::MediaPlayerPrivate::duration):
831 2009-09-24 Benjamin Poulain <benjamin.poulain@nokia.com>
833 Reviewed by Eric Seidel.
835 The indices of RuntimeArray should be enumerated like for a regular array.
836 https://bugs.webkit.org/show_bug.cgi?id=29005
838 * bridge/runtime_array.cpp:
839 (JSC::RuntimeArray::getPropertyNames):
840 * bridge/runtime_array.h:
842 2009-09-23 Alexander Pavlov <apavlov@chromium.org>
844 Reviewed by Eric Seidel.
846 Introduce Pasteboard::writePlaintext(const String&) so that copying
847 of the inspected elements HTML will be possible in WebInspector.
848 https://bugs.webkit.org/show_bug.cgi?id=29634
850 * platform/Pasteboard.h:
851 * platform/android/TemporaryLinkStubs.cpp:
852 (Pasteboard::writePlainText):
853 * platform/chromium/ChromiumBridge.h:
854 * platform/chromium/PasteboardChromium.cpp:
855 (WebCore::Pasteboard::writePlainText):
856 * platform/gtk/PasteboardGtk.cpp:
857 (WebCore::Pasteboard::writePlainText):
858 * platform/haiku/PasteboardHaiku.cpp:
859 (WebCore::Pasteboard::writePlainText):
860 * platform/mac/PasteboardMac.mm:
861 (WebCore::Pasteboard::writePlainText):
862 * platform/qt/PasteboardQt.cpp:
863 (WebCore::Pasteboard::writePlainText):
864 * platform/win/PasteboardWin.cpp:
865 (WebCore::Pasteboard::writeSelection):
866 (WebCore::Pasteboard::writePlainText):
867 * platform/wince/PasteboardWince.cpp:
868 (WebCore::Pasteboard::writePlainText):
869 * platform/wx/PasteboardWx.cpp:
870 (WebCore::Pasteboard::writeSelection):
871 (WebCore::Pasteboard::writePlainText):
872 (WebCore::Pasteboard::writeURL):
874 2009-09-24 Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
876 Reviewed by Simon Hausmann.
878 Fix QApp::translate() calls to provide the correct class name without
881 * platform/qt/Localizations.cpp:
882 (WebCore::localizedMediaTimeDescription):
884 2009-09-24 Geoffrey Garen <ggaren@apple.com>
886 More build fix: Removed JSSharedWorkerContextCustom.cpp from project
887 files, since it no longer exists in the repository.
892 * WebCore.vcproj/WebCore.vcproj:
894 2009-09-24 Geoffrey Garen <ggaren@apple.com>
896 Windows build fix: Declare set/unsetPendingActivity public, so
897 SharedWorkerScriptLoader can call them.
899 * dom/ActiveDOMObject.h:
901 2009-09-24 Geoffrey Garen <ggaren@apple.com>
903 Fixed a bit of the Windows build.
905 * workers/SharedWorker.idl: Declare a custom mark function. (I accidentally
906 removed this in my last patch.)
907 * WebCore.xcodeproj/project.pbxproj: Added JSSharedWorkerCustom.cpp back
908 to the build. (I accidentally removed this in my last patch.)
910 2009-09-23 Geoffrey Garen <ggaren@apple.com>
912 32-bit build fix: restore previous cast that I thought was unnecessary.
914 * xml/XMLHttpRequest.cpp:
915 (WebCore::XMLHttpRequest::didSendData):
916 (WebCore::XMLHttpRequest::didReceiveData):
918 2009-09-23 Geoffrey Garen <ggaren@apple.com>
920 Reviewed by Sam Weinig.
922 Bring a little sanity to this crazy EventTarget world of ours
923 https://bugs.webkit.org/show_bug.cgi?id=29701
925 Lots of EventTarget refactoring to achieve a single shared implementation
926 that fixes some of the performance and correctness bugs of the many individual
927 implementations, and makes reasoning about EventTargets and EventListeners
930 The basic design is this:
931 - EventTarget manages a set of EventListeners.
932 - onXXX EventListener attributes forward to standard EventTarget APIs.
933 - Since the onXXX code is repetitive, it is usually done with macros
934 of the form DEFINE_ATTRIBUTE_EVENT_LISTENER(attributeName).
935 - EventTarget provides a shared implementation of dispatchEvent,
936 which subclasses with special event dispatch rules, like Node, override.
937 - To support Node, which lazily instantiates its EventTarget data,
938 EventTarget has no data members, and instead makes a virtual call
939 to get its data from wherever its subclass chose to store it.
941 Code that used to call dispatchEvent, passing an ExceptionCode paratmeter,
942 even though no exception could be thrown, has been changed not to do so,
943 to improve clarity and performance.
945 Code that used to call a special dispatchXXXEvent function, which just
946 turned around and called dispatchEvent, has been changed to call
947 dispatchEvent, to improve clarity and performance.
950 * WebCore.xcodeproj/project.pbxproj: Another day in the life of a WebKit
953 * bindings/js/JSDOMBinding.cpp:
954 (WebCore::isObservableThroughDOM): Updated for Node API change. Added
955 "is not in the document but is firing event listeners" as a condition
956 that makes a Node observable in the DOM, so that event listeners firing
957 on removed nodes are not destroyed midstream. (This was a long-standing
958 bug that was somewhat hidden by the old implementation's habit of
959 copying the RegisteredEventListener vector before firing events, which
960 would keep almost all the relevant objects from being destroyed.)
962 * bindings/js/JSEventListener.cpp:
963 (WebCore::JSEventListener::handleEvent): Removed the isWindowEvent flag
964 because it was one of the most elaborately planned no-ops in the history
965 of software crime, and one of the reasons clients thought they needed more
966 than one dispatchEvent function even though they didn't.
967 * bindings/js/JSEventListener.h:
969 * bindings/js/JSDOMWindowCustom.cpp:
970 (WebCore::JSDOMWindow::markChildren):
971 (WebCore::JSMessagePort::markChildren):
972 * bindings/js/JSNodeCustom.cpp:
973 (WebCore::JSNode::markChildren):
974 * bindings/js/JSAbstractWorkerCustom.cpp:
975 * bindings/js/JSDOMApplicationCacheCustom.cpp:
976 * bindings/js/JSDedicatedWorkerContextCustom.cpp:
977 * bindings/js/JSEventSourceCustom.cpp:
978 * bindings/js/JSMessagePortCustom.cpp:
979 * bindings/js/JSSharedWorkerContextCustom.cpp: Removed.
980 * bindings/js/JSWebSocketCustom.cpp:
981 * bindings/js/JSWorkerContextCustom.cpp:
982 (WebCore::JSWorkerContext::markChildren):
983 * bindings/js/JSWorkerCustom.cpp:
984 * bindings/js/JSXMLHttpRequestCustom.cpp:
985 (WebCore::JSXMLHttpRequest::markChildren):
986 * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
987 (WebCore::JSXMLHttpRequestUpload::markChildren): EventListener marking is
988 now autogenerated. Classes that still have custom mark functions for other
989 reasons now call a shared EventTarget API to mark their EventListeners.
991 * bindings/objc/ObjCEventListener.h:
992 * bindings/objc/ObjCEventListener.mm:
993 (WebCore::ObjCEventListener::handleEvent): Bye bye isWindowEvent.
995 * bindings/scripts/CodeGeneratorJS.pm: Autogeneration support for
996 marking and invalidating event listeners.
998 * dom/CharacterData.cpp:
999 (WebCore::CharacterData::dispatchModifiedEvent):
1000 * dom/ContainerNode.cpp:
1001 (WebCore::ContainerNode::insertBefore):
1002 (WebCore::ContainerNode::replaceChild):
1003 (WebCore::willRemoveChild):
1004 (WebCore::ContainerNode::appendChild):
1005 (WebCore::dispatchChildInsertionEvents):
1006 (WebCore::dispatchChildRemovalEvents):
1008 (WebCore::Document::removeAllEventListeners):
1009 (WebCore::Document::implicitClose):
1010 (WebCore::Document::setFocusedNode):
1011 (WebCore::Document::dispatchWindowEvent):
1012 (WebCore::Document::dispatchWindowLoadEvent):
1013 (WebCore::Document::finishedParsing):
1014 * dom/Document.h: Use dispatchEvent directly.
1016 * dom/Element.h: Moved a few event listener attributes down from Node,
1017 since they don't apply to all Nodes, only Elements.
1019 * dom/EventListener.h: Removed isWindowEvent parameter.
1021 * dom/EventNames.h: Added the "display" event name, so it works correctly
1022 with attribute macros, and for performance.
1024 * dom/EventTarget.cpp:
1025 (WebCore::forbidEventDispatch):
1026 (WebCore::allowEventDispatch):
1027 (WebCore::eventDispatchForbidden): Made this code (embarrasingly) thread
1028 safe, since it's now called on multiple threads. (Currently, we only forbid
1029 event dispatch on the main thread. If we ever want to forbid event dispatch
1030 on secondary threads, we can improve it then.)
1032 (WebCore::EventTarget::addEventListener):
1033 (WebCore::EventTarget::removeEventListener):
1034 (WebCore::EventTarget::setAttributeEventListener):
1035 (WebCore::EventTarget::getAttributeEventListener):
1036 (WebCore::EventTarget::clearAttributeEventListener):
1037 (WebCore::EventTarget::dispatchEvent):
1038 (WebCore::EventTarget::fireEventListeners):
1039 (WebCore::EventTarget::getEventListeners):
1040 (WebCore::EventTarget::removeAllEventListeners):
1041 * dom/EventTarget.h:
1042 (WebCore::FiringEventEndIterator::FiringEventEndIterator):
1043 (WebCore::EventTarget::ref):
1044 (WebCore::EventTarget::deref):
1045 (WebCore::EventTarget::markEventListeners):
1046 (WebCore::EventTarget::invalidateEventListeners):
1047 (WebCore::EventTarget::isFiringEventListeners):
1048 (WebCore::EventTarget::hasEventListeners): The ONE TRUE IMPLEMENTATION of
1049 EventTarget APIs, crafted from an amalgam of all the different versions
1050 we used to have. The most significant change here is that we no longer
1051 make a copy of an EventListener vector before firing the events in the
1052 vector -- instead, we use a reference to the original vector, along with
1053 a notification mechanism for the unlikely case when an EventListener is
1054 removed from the vector. This substantially reduces malloc, copying, and
1055 refcount overhead, and complexity.
1057 * dom/InputElement.cpp:
1058 (WebCore::InputElement::setValueFromRenderer):
1059 * dom/MessageEvent.h:
1060 (WebCore::MessageEvent::create): Use dispatchEvent directly.
1062 * dom/MessagePort.cpp:
1063 (WebCore::MessagePort::dispatchMessages):
1064 (WebCore::MessagePort::eventTargetData):
1065 (WebCore::MessagePort::ensureEventTargetData):
1066 * dom/MessagePort.h:
1067 (WebCore::MessagePort::setOnmessage):
1068 (WebCore::MessagePort::onmessage):
1069 * dom/MessagePort.idl: Removed custom EventTarget implementation.
1071 * dom/MutationEvent.h:
1072 (WebCore::MutationEvent::create): Added some default values so callers
1073 can construct MutationEvents more easily, without calling a custom dispatch
1077 (WebCore::Node::addEventListener):
1078 (WebCore::Node::removeEventListener):
1079 (WebCore::Node::eventTargetData):
1080 (WebCore::Node::ensureEventTargetData):
1081 (WebCore::Node::handleLocalEvents):
1082 (WebCore::Node::dispatchEvent):
1083 (WebCore::Node::dispatchGenericEvent):
1084 (WebCore::Node::dispatchSubtreeModifiedEvent):
1085 (WebCore::Node::dispatchUIEvent):
1086 (WebCore::Node::dispatchKeyEvent):
1087 (WebCore::Node::dispatchMouseEvent):
1088 (WebCore::Node::dispatchWheelEvent):
1089 (WebCore::Node::dispatchFocusEvent):
1090 (WebCore::Node::dispatchBlurEvent):
1092 (WebCore::Node::preDispatchEventHandler):
1093 (WebCore::Node::postDispatchEventHandler):
1095 * dom/NodeRareData.h:
1096 (WebCore::NodeRareData::eventTargetData):
1097 (WebCore::NodeRareData::ensureEventTargetData): Use the shared EventTarget
1098 interface, and call dispatchEvent directly instead of custom dispatchXXXEvent
1099 functions that just forwarded to dispatchEvent.
1101 * dom/RegisteredEventListener.cpp:
1102 * dom/RegisteredEventListener.h:
1103 (WebCore::RegisteredEventListener::RegisteredEventListener):
1104 (WebCore::operator==): This is just a simple struct now, since we no longer
1105 do a complicated copy / refCount / isRemoved dance just to honor the rule
1106 that an EventListener can be removed during event dispatch.
1108 * history/CachedFrame.cpp:
1109 (WebCore::CachedFrameBase::restore): Removed another custom dispatchEvent.
1111 * html/HTMLBodyElement.cpp:
1112 * html/HTMLBodyElement.h: Use the shared EventTarget API.
1114 * html/HTMLFormControlElement.cpp:
1115 (WebCore::HTMLFormControlElement::dispatchFormControlChangeEvent):
1116 (WebCore::HTMLFormControlElement::checkValidity):
1117 * html/HTMLFormElement.cpp:
1118 (WebCore::HTMLFormElement::handleLocalEvents):
1119 (WebCore::HTMLFormElement::prepareSubmit):
1120 (WebCore::HTMLFormElement::reset):
1121 * html/HTMLFormElement.h: Use the standard dispatchEvent API.
1123 * html/HTMLFrameSetElement.cpp:
1124 * html/HTMLFrameSetElement.h: Use the shared EventTarget API.
1126 * html/HTMLImageLoader.cpp:
1127 (WebCore::HTMLImageLoader::dispatchLoadEvent):
1128 * html/HTMLInputElement.cpp:
1129 (WebCore::HTMLInputElement::onSearch):
1130 * html/HTMLMediaElement.cpp:
1131 (WebCore::HTMLMediaElement::loadInternal):
1132 * html/HTMLScriptElement.cpp:
1133 (WebCore::HTMLScriptElement::dispatchLoadEvent):
1134 (WebCore::HTMLScriptElement::dispatchErrorEvent):
1135 * html/HTMLSourceElement.cpp:
1136 (WebCore::HTMLSourceElement::errorEventTimerFired):
1137 * html/HTMLTokenizer.cpp:
1138 (WebCore::HTMLTokenizer::notifyFinished): Use the standard dispatchEvent API.
1140 * inspector/InspectorDOMAgent.cpp:
1141 (WebCore::InspectorDOMAgent::handleEvent):
1142 * inspector/InspectorDOMAgent.h:
1143 * inspector/InspectorDOMStorageResource.cpp:
1144 (WebCore::InspectorDOMStorageResource::handleEvent):
1145 * inspector/InspectorDOMStorageResource.h:
1146 * loader/FrameLoader.cpp:
1147 (WebCore::FrameLoader::stopLoading):
1148 (WebCore::FrameLoader::canCachePageContainingThisFrame):
1149 (WebCore::FrameLoader::logCanCacheFrameDecision):
1150 (WebCore::HashChangeEventTask::performTask):
1151 (WebCore::FrameLoader::pageHidden): No more isWindowEvent.
1153 * loader/ImageDocument.cpp:
1154 (WebCore::ImageEventListener::handleEvent):
1155 * loader/appcache/ApplicationCacheGroup.cpp:
1156 (WebCore::CallCacheListenerTask::performTask):
1157 * loader/appcache/ApplicationCacheHost.cpp:
1158 (WebCore::ApplicationCacheHost::notifyDOMApplicationCache):
1159 * loader/appcache/ApplicationCacheHost.h:
1160 * loader/appcache/DOMApplicationCache.cpp:
1161 (WebCore::DOMApplicationCache::eventTargetData):
1162 (WebCore::DOMApplicationCache::ensureEventTargetData):
1163 * loader/appcache/DOMApplicationCache.h:
1164 * loader/appcache/DOMApplicationCache.idl: Switched to the standard
1165 EventTarget API. As a part of this, I switched this class from using a
1166 custom internal event name enumeration to using the standard EventNames.
1168 * notifications/Notification.cpp:
1169 (WebCore::Notification::eventTargetData):
1170 (WebCore::Notification::ensureEventTargetData):
1171 * notifications/Notification.h:
1172 (WebCore::Notification::scriptExecutionContext):
1173 * notifications/Notification.idl: Switched to the standard EventTarget API.
1175 * page/DOMWindow.cpp:
1176 (WebCore::PostMessageTimer::event):
1177 (WebCore::windowsWithUnloadEventListeners):
1178 (WebCore::windowsWithBeforeUnloadEventListeners):
1179 (WebCore::allowsBeforeUnloadListeners):
1180 (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
1181 (WebCore::DOMWindow::pendingUnloadEventListeners):
1182 (WebCore::DOMWindow::dispatchAllPendingUnloadEvents): Changed the "pending"
1183 unload / beforeunload listener tracker just to track which windows had
1184 such listeners, instead of actually keeping a copy of the listeners. Now,
1185 this code can use the standard EventTarget API.
1187 (WebCore::DOMWindow::~DOMWindow):
1188 (WebCore::DOMWindow::postMessageTimerFired):
1189 (WebCore::DOMWindow::addEventListener):
1190 (WebCore::DOMWindow::removeEventListener):
1191 (WebCore::DOMWindow::dispatchLoadEvent):
1192 (WebCore::DOMWindow::dispatchEvent):
1193 (WebCore::DOMWindow::removeAllEventListeners):
1194 (WebCore::DOMWindow::captureEvents):
1195 (WebCore::DOMWindow::releaseEvents):
1196 (WebCore::DOMWindow::eventTargetData):
1197 (WebCore::DOMWindow::ensureEventTargetData):
1199 * page/DOMWindow.idl: Use the standard EventTarget APIs.
1201 * page/EventHandler.cpp:
1202 (WebCore::EventHandler::canMouseDownStartSelect):
1203 (WebCore::EventHandler::canMouseDragExtendSelect):
1204 (WebCore::EventHandler::sendResizeEvent):
1205 (WebCore::EventHandler::sendScrollEvent): Use dispatchEvent directly.
1207 * page/EventSource.cpp:
1208 (WebCore::EventSource::endRequest):
1209 (WebCore::EventSource::didReceiveResponse):
1210 (WebCore::EventSource::parseEventStreamLine):
1211 (WebCore::EventSource::stop):
1212 (WebCore::EventSource::createMessageEvent):
1213 (WebCore::EventSource::eventTargetData):
1214 (WebCore::EventSource::ensureEventTargetData):
1215 * page/EventSource.h:
1216 * page/EventSource.idl: Use the standard EventTarget APIs.
1218 * page/FocusController.cpp:
1219 (WebCore::dispatchEventsOnWindowAndFocusedNode):
1220 (WebCore::FocusController::setFocusedFrame):
1222 (WebCore::Frame::shouldClose):
1225 (WebCore::networkStateChanged):
1226 * page/animation/AnimationController.cpp:
1227 (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
1228 * rendering/RenderListBox.cpp:
1229 (WebCore::RenderListBox::valueChanged):
1230 * rendering/RenderTextControl.cpp:
1231 (WebCore::RenderTextControl::selectionChanged):
1232 * rendering/RenderTextControlMultiLine.cpp:
1233 (WebCore::RenderTextControlMultiLine::subtreeHasChanged): Use dispatchEvent.
1235 * svg/SVGElement.cpp:
1236 (WebCore::hasLoadListener): Rewritten for new EventTarget API.
1238 * svg/SVGElementInstance.cpp:
1239 (WebCore::dummyEventTargetData):
1240 (WebCore::SVGElementInstance::addEventListener):
1241 (WebCore::SVGElementInstance::removeEventListener):
1242 (WebCore::SVGElementInstance::removeAllEventListeners):
1243 (WebCore::SVGElementInstance::dispatchEvent):
1244 (WebCore::SVGElementInstance::eventTargetData):
1245 (WebCore::SVGElementInstance::ensureEventTargetData): Use the EventTarget API.
1247 * svg/SVGElementInstance.h:
1248 * svg/SVGImageLoader.cpp:
1249 (WebCore::SVGImageLoader::dispatchLoadEvent):
1250 * svg/SVGScriptElement.cpp:
1251 (WebCore::SVGScriptElement::dispatchErrorEvent): Use dispatchEvent directly.
1253 * svg/SVGUseElement.cpp:
1254 (WebCore::SVGUseElement::transferEventListenersToShadowTree): Updated for
1255 new EventTarget API.
1257 * svg/animation/SVGSMILElement.cpp:
1258 (WebCore::ConditionEventListener::handleEvent): No more isWindowEvent.
1260 * websockets/WebSocket.cpp:
1261 (WebCore::ProcessWebSocketEventTask::create):
1262 (WebCore::ProcessWebSocketEventTask::performTask):
1263 (WebCore::ProcessWebSocketEventTask::ProcessWebSocketEventTask):
1264 (WebCore::WebSocket::didConnect):
1265 (WebCore::WebSocket::didReceiveMessage):
1266 (WebCore::WebSocket::didClose):
1267 (WebCore::WebSocket::eventTargetData):
1268 (WebCore::WebSocket::ensureEventTargetData):
1269 * websockets/WebSocket.h:
1270 * websockets/WebSocket.idl:
1271 * workers/AbstractWorker.cpp:
1272 (WebCore::AbstractWorker::eventTargetData):
1273 (WebCore::AbstractWorker::ensureEventTargetData):
1274 * workers/AbstractWorker.h:
1275 * workers/AbstractWorker.idl:
1276 * workers/DedicatedWorkerContext.cpp:
1277 * workers/DedicatedWorkerContext.h:
1278 * workers/DedicatedWorkerContext.idl:
1279 * workers/DefaultSharedWorkerRepository.cpp:
1280 (WebCore::SharedWorkerConnectTask::performTask):
1281 (WebCore::SharedWorkerScriptLoader::load):
1282 (WebCore::SharedWorkerScriptLoader::notifyFinished):
1283 * workers/SharedWorker.idl:
1284 * workers/SharedWorkerContext.cpp:
1285 (WebCore::createConnectEvent):
1286 * workers/SharedWorkerContext.h:
1287 * workers/SharedWorkerContext.idl:
1288 * workers/Worker.cpp:
1289 (WebCore::Worker::notifyFinished):
1291 * workers/Worker.idl:
1292 * workers/WorkerContext.cpp:
1293 (WebCore::WorkerContext::eventTargetData):
1294 (WebCore::WorkerContext::ensureEventTargetData):
1295 * workers/WorkerContext.h:
1296 * workers/WorkerContext.idl:
1297 * workers/WorkerMessagingProxy.cpp:
1298 (WebCore::MessageWorkerContextTask::performTask):
1299 (WebCore::MessageWorkerTask::performTask):
1300 (WebCore::WorkerExceptionTask::performTask):
1301 * xml/XMLHttpRequest.cpp:
1302 (WebCore::XMLHttpRequest::callReadyStateChangeListener):
1303 (WebCore::XMLHttpRequest::createRequest):
1304 (WebCore::XMLHttpRequest::abort):
1305 (WebCore::XMLHttpRequest::networkError):
1306 (WebCore::XMLHttpRequest::abortError):
1307 (WebCore::XMLHttpRequest::didSendData):
1308 (WebCore::XMLHttpRequest::didReceiveData):
1309 (WebCore::XMLHttpRequest::eventTargetData):
1310 (WebCore::XMLHttpRequest::ensureEventTargetData):
1311 * xml/XMLHttpRequest.h:
1312 * xml/XMLHttpRequest.idl:
1313 * xml/XMLHttpRequestProgressEvent.h:
1314 (WebCore::XMLHttpRequestProgressEvent::create):
1315 * xml/XMLHttpRequestUpload.cpp:
1316 (WebCore::XMLHttpRequestUpload::eventTargetData):
1317 (WebCore::XMLHttpRequestUpload::ensureEventTargetData):
1318 * xml/XMLHttpRequestUpload.h:
1319 * xml/XMLHttpRequestUpload.idl: Use new EventTarget API.
1321 2009-09-23 Kent Tamura <tkent@chromium.org>
1323 Reviewed by Darin Adler.
1325 - Support for maxLength of <textarea>
1326 - Move numGraphemeClusters() and numCharactersInGraphemeClusters() from InputElement to String.
1327 https://bugs.webkit.org/show_bug.cgi?id=29292
1329 Test: fast/forms/textarea-maxlength.html
1331 * dom/InputElement.cpp:
1332 (WebCore::InputElement::sanitizeUserInputValue):
1333 (WebCore::InputElement::handleBeforeTextInsertedEvent):
1334 * html/HTMLTextAreaElement.cpp:
1335 (WebCore::HTMLTextAreaElement::defaultEventHandler):
1336 (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
1337 (WebCore::HTMLTextAreaElement::sanitizeUserInputValue):
1338 (WebCore::HTMLTextAreaElement::maxLength):
1339 (WebCore::HTMLTextAreaElement::setMaxLength):
1340 * html/HTMLTextAreaElement.h:
1341 * html/HTMLTextAreaElement.idl:
1342 * platform/text/PlatformString.h:
1343 * platform/text/String.cpp:
1344 (WebCore::String::numGraphemeClusters):
1345 (WebCore::String::numCharactersInGraphemeClusters):
1347 2009-09-23 Martin Robinson <martin.james.robinson@gmail.com>
1349 Reviewed by Xan Lopez.
1351 [GTK] REGRESSION: BitmapImage::getGdkPixbuf fails for non-square images
1352 https://bugs.webkit.org/show_bug.cgi?id=29654
1354 Give GDK_Backspace key events the proper text properties.
1356 Instead of adding new tests, this change removes existing tests
1357 from Gtk's skipped list.
1359 * platform/gtk/KeyEventGtk.cpp:
1360 (WebCore::keyIdentifierForGdkKeyCode):
1361 (WebCore::singleCharacterString):
1363 2009-09-23 Sam Weinig <sam@webkit.org>
1365 Reviewed by Adam Barth.
1367 Fix for https://bugs.webkit.org/show_bug.cgi?id=26989
1368 Should allow navigation of top-level openers
1369 <rdar://problem/7034025>
1371 Allow navigation of cross-origin window.opener if it is top-level frame.
1373 Test: http/tests/security/frameNavigation/cross-origin-opener.html
1375 * loader/FrameLoader.cpp:
1376 (WebCore::FrameLoader::shouldAllowNavigation):
1378 2009-09-23 Marshall Culpepper <mculpepper@appcelerator.com>
1380 Reviewed by Eric Seidel.
1382 Added $(WebKitLibrariesDir)/include/cairo so cairo.h is found by
1383 default when the necessary dependencies are extracted into the
1385 https://bugs.webkit.org/show_bug.cgi?id=29661
1387 * WebCore.vcproj/WebCoreCairo.vsprops:
1389 2009-09-23 Darin Adler <darin@apple.com>
1391 Reviewed by Sam Weinig.
1393 Crash when website does a history.back() followed by an alert()
1394 https://bugs.webkit.org/show_bug.cgi?id=29686
1395 rdar://problem/6984996
1397 When loading is deferred, we need to defer timer-based loads
1398 too, not just networking-driven loads. Otherwise we can get
1399 syncronouse navigation while running a script, which leads to
1400 crashes and other badness.
1402 This patch includes a manual test; an automated test may be
1403 possible some time in the future.
1406 (WebCore::Document::processHttpEquiv): Use scheduleLocationChange
1407 instead of scheduleHTTPRedirection to implement the navigation
1408 needed for x-frame-options.
1410 * loader/FrameLoader.cpp:
1411 (WebCore::FrameLoader::FrameLoader): Updated for data members with
1412 new names and new data members.
1413 (WebCore::FrameLoader::setDefersLoading): When turning deferral
1414 off, call startRedirectionTimer and startCheckCompleteTimer, since
1415 either of them might have been fired and ignored while defersLoading
1417 (WebCore::FrameLoader::clear): Updated for replacement of the
1418 m_checkCompletedTimer and m_checkLoadCompleteTimer timers.
1419 (WebCore::FrameLoader::allAncestorsAreComplete): Added.
1420 (WebCore::FrameLoader::checkCompleted): Added code to set
1421 m_shouldCallCheckCompleted to false. Changed code that calls
1422 startRedirectionTimer to call it unconditionally, since that
1423 function now knows when to do work and doesn't expect callers
1424 to handle that any more.
1425 (WebCore::FrameLoader::checkTimerFired): Added. Replaces the old
1426 timer fired callbacks. Calls checkCompleted and checkLoadComplete
1427 as appropriate, but not when defersLoading is true.
1428 (WebCore::FrameLoader::startCheckCompleteTimer): Added. Replaces
1429 the two different calls to start timers before. Only starts the
1430 timers if they are needed.
1431 (WebCore::FrameLoader::scheduleCheckCompleted): Changed to call
1432 startCheckCompleteTimer after setting boolean.
1433 (WebCore::FrameLoader::scheduleCheckLoadComplete): Ditto.
1434 (WebCore::FrameLoader::scheduleHistoryNavigation): Removed
1435 canGoBackOrForward check. The logic works more naturally when
1436 we don't do anything until the timer fires.
1437 (WebCore::FrameLoader::redirectionTimerFired): Do nothing if
1438 defersLoading is true. Also moved canGoBackOrForward check here.
1439 (WebCore::FrameLoader::scheduleRedirection): Changed code that
1440 calls startRedirectionTimer to do so unconditionally. That
1441 function now handles the rules about when to start the timer
1442 rather than expecting the caller to do so.
1443 (WebCore::FrameLoader::startRedirectionTimer): Added code to
1444 handle the case where there is no redirection scheduled,
1445 where the timer is already active, or where this is a classic
1446 redirection and there is an ancestor that has not yet completed
1448 (WebCore::FrameLoader::completed): Call startRedirectionTimer
1449 here directly instead of calling a cover named parentCompleted.
1450 Hooray! One less function in the giant FrameLoader class!
1451 (WebCore::FrameLoader::checkLoadComplete): Added code to set
1452 m_shouldCallCheckLoadComplete to false.
1454 * loader/FrameLoader.h: Replaced the two functions
1455 checkCompletedTimerFired and checkLoadCompleteTimerFired with
1456 one function, checkTimerFired. Removed the parentCompleted
1457 function. Added the startCheckCompleteTimer and
1458 allAncestorsAreComplete functions. Replaced the
1459 m_checkCompletedTimer and m_checkLoadCompleteTimer data
1460 members with m_checkTimer, m_shouldCallCheckCompleted, and
1461 m_shouldCallCheckLoadComplete.
1463 * manual-tests/go-back-after-alert.html: Added.
1464 * manual-tests/resources/alert-and-go-back.html: Added.
1466 2009-09-23 David Kilzer <ddkilzer@apple.com>
1468 <http://webkit.org/b/29660> Move "Generate 64-bit Export File" build phase script into DerivedSources.make
1470 Reviewed by Mark Rowe.
1472 The "Generate 64-bit Export File" build phase script generated
1473 the WebCore.LP64.exp export file used to link 64-bit WebCore.
1474 Instead of having a separate build phase script, move its
1475 generation into DerivedSources.make where WebCore.exp is
1478 * DerivedSources.make: Added a rule to make WebCore.LP64.exp.
1479 Added code to append WebCore.PluginHostProcess.exp to
1480 $(WEBCORE_EXPORT_DEPENDENCIES) when WTF_USE_PLUGIN_HOST_PROCESS
1482 * WebCore.PluginHostProcess.exp: Renamed from WebCore/WebCore.LP64.exp.
1483 * WebCore.xcodeproj/project.pbxproj: Removed the "Generate
1484 64-bit Export File" build phase script. Renamed WebCore.LP64.exp
1485 to WebCore.PluginHostProcess.exp.
1487 2009-09-23 Peter Kasting <pkasting@google.com>
1489 Reviewed by Dimitri Glazkov.
1491 https://bugs.webkit.org/show_bug.cgi?id=29694
1492 [Chromium] Eliminate dependency on gfx::Rect from ImageSkia.
1494 * platform/graphics/skia/ImageSkia.cpp:
1495 (WebCore::drawResampledBitmap):
1497 2009-09-22 Timothy Hatcher <timothy@apple.com>
1499 Prevent scrolling multiple elements during latched wheel events.
1501 Reviewed by Anders Carlsson.
1503 * page/EventHandler.cpp:
1504 (WebCore::scrollAndAcceptEvent):
1505 (WebCore::EventHandler::clear):
1506 (WebCore::EventHandler::handleWheelEvent):
1507 * page/EventHandler.h:
1508 * rendering/RenderBox.cpp:
1509 (WebCore::RenderBox::scroll):
1510 * rendering/RenderBox.h:
1512 2009-09-23 Daniel Bates <dbates@webkit.org>
1514 Reviewed by Adam Barth.
1516 https://bugs.webkit.org/show_bug.cgi?id=29523
1518 Fixes an issue where a JavaScript URL that was URL-encoded twice can bypass the
1521 The method FrameLoader::executeIfJavaScriptURL decodes the URL escape
1522 sequences in a JavaScript URL before it is eventually passed to the XSSAuditor.
1523 Because the XSSAuditor also decodes the URL escape sequences as part of its
1524 canonicalization, the double decoding of a JavaScript URL would
1525 not match the canonicalization of the input parameters.
1527 Tests: http/tests/security/xssAuditor/iframe-javascript-url-url-encoded.html
1528 http/tests/security/xssAuditor/javascript-link-url-encoded.html
1530 * bindings/js/ScriptController.cpp:
1531 (WebCore::ScriptController::evaluate): Moved call to
1532 XSSAuditor::canEvaluateJavaScriptURL into FrameLoader::executeIfJavaScriptURL.
1533 * bindings/v8/ScriptController.cpp:
1534 (WebCore::ScriptController::evaluate): Ditto.
1535 * loader/FrameLoader.cpp:
1536 (WebCore::FrameLoader::executeIfJavaScriptURL): Modified to call
1537 XSSAuditor::canEvaluateJavaScriptURL on the JavaScript URL before it is
1540 2009-09-22 Dave Hyatt <hyatt@apple.com>
1542 Reviewed by John Sullivan.
1544 https://bugs.webkit.org/show_bug.cgi?id=29657
1545 Columns don't break properly in positioned elements with a fixed height. Make sure that
1546 a block is still considered to have columns even when the column count is 1 if the column
1549 Added fast/multicol/positioned-with-constrained-height.html
1551 * rendering/RenderBlock.cpp:
1552 (WebCore::RenderBlock::setDesiredColumnCountAndWidth):
1554 2009-09-23 Holger Hans Peter Freyther <zecke@selfish.org>
1556 Rubber-stamped by Simon Hausmann.
1558 Add a null check for the Document*. In the mirror benchmarking
1559 application a crash from a call from JavaScript was observed.
1561 I was not able to come up with a test case for this issue.
1563 * platform/qt/CookieJarQt.cpp:
1564 (WebCore::cookieJar):
1566 2009-09-23 Simon Hausmann <simon.hausmann@nokia.com>
1568 Reviewed by Tor Arne Vestbø.
1570 Fix the Qt/Windows build, after the introduction of
1573 * plugins/win/PluginViewWin.cpp:
1574 (windowHandleForPageClient):
1575 (WebCore::PluginView::getValue):
1576 (WebCore::PluginView::forceRedraw):
1577 (WebCore::PluginView::platformStart):
1579 2009-09-23 Gustavo Noronha Silva <gns@gnome.org>
1581 Reviewed by Xan Lopez.
1583 [GTK] media tests failing after their rework
1584 https://bugs.webkit.org/show_bug.cgi?id=29532
1586 Correctly advertise the mime types used by the common formats used
1589 Tests that regressed, and will pass again:
1591 media/video-canvas-source.html
1592 media/video-controls.html
1593 media/video-currentTime-set2.html
1594 media/video-dom-autoplay.html
1595 media/video-dom-src.html
1596 media/video-error-abort.html
1597 media/video-load-networkState.html
1598 media/video-load-readyState.html
1599 media/video-muted.html
1600 media/video-no-autoplay.html
1601 media/video-pause-empty-events.html
1602 media/video-play-empty-events.html
1603 media/video-seekable.html
1604 media/video-seeking.html
1605 media/video-size.html
1606 media/video-source-type-params.html
1607 media/video-source-type.html
1608 media/video-source.html
1609 media/video-src-change.html
1610 media/video-src-invalid-remove.html
1611 media/video-src-remove.html
1612 media/video-src-set.html
1613 media/video-src-source.html
1614 media/video-src.html
1615 media/video-timeupdate-during-playback.html
1616 media/video-volume.html
1618 * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
1619 (WebCore::mimeTypeCache):
1621 2009-09-22 Charles Wei <charles.wei@torchmobile.com.cn>
1623 Reviewed by Eric Seidel.
1625 Fix the crash problem with absolte positioned children in foreignobject
1626 htts://bugs.webkit.org/show_bug.cgi?id=26342
1628 Test: svg/custom/foreignobject-crash-with-absolute-positioned-children.svg
1630 * rendering/RenderForeignObject.h:
1631 (WebCore::RenderForeignObject::isSVGForeignObject):
1632 * rendering/RenderObject.cpp:
1633 (WebCore::RenderObject::containingBlock):
1634 * rendering/RenderObject.h:
1635 (WebCore::RenderObject::isSVGForeignObject):
1637 2009-09-22 Drew Wilson <atwilson@google.com>
1639 Reviewed by David Levin.
1641 SharedWorkers "name" attribute is now optional.
1642 https://bugs.webkit.org/show_bug.cgi?id=28897
1644 Test: fast/workers/shared-worker-name.html
1646 * bindings/js/JSSharedWorkerConstructor.cpp:
1647 (WebCore::constructSharedWorker):
1648 Default 'name' attribute to empty string if it is not provided.
1649 * bindings/v8/custom/V8SharedWorkerCustom.cpp:
1650 (WebCore::CALLBACK_FUNC_DECL):
1651 Default 'name' attribute to empty string if it is not provided.
1652 * workers/DefaultSharedWorkerRepository.cpp:
1653 (WebCore::SharedWorkerProxy::matches):
1654 Now matches URLs if names are empty strings.
1655 (WebCore::DefaultSharedWorkerRepository::getProxy):
1656 Pass URL in to SharedWorkerProxy::matches().
1658 2009-09-22 Dimitri Glazkov <dglazkov@chromium.org>
1660 Unreviewed, another build fix.
1662 [Chromium] Add another missing include.
1663 https://bugs.webkit.org/show_bug.cgi?id=29536
1665 * inspector/InspectorController.cpp: Added DOMWindow.h include.
1667 2009-09-22 Dimitri Glazkov <dglazkov@chromium.org>
1669 Unreviewed, build fix.
1671 [Chromium] Add missing include.
1672 https://bugs.webkit.org/show_bug.cgi?id=29536
1674 * inspector/InspectorDOMStorageResource.cpp: Added DOMWindow.h include.
1676 2009-09-22 Darin Adler <darin@apple.com>
1678 Reviewed by Sam Weinig.
1680 Tighten up the ScheduledRedirection machinery to prepare for a bug fix
1681 https://bugs.webkit.org/show_bug.cgi?id=29663
1683 * loader/FrameLoader.cpp:
1684 (WebCore::ScheduledRedirection::ScheduledRedirection): Added a boolean,
1685 initialized to false, to keep track if the redirection has been
1686 communicated to the client.
1687 (WebCore::FrameLoader::stopLoading): Tweaked a comment.
1688 (WebCore::FrameLoader::cancelRedirection): Removed code to clear
1689 m_scheduledRedirection.clear since stopRedirectionTimer does that now.
1690 (WebCore::FrameLoader::allChildrenAreComplete): Added.
1691 (WebCore::FrameLoader::checkCompleted): Use allChildrenAreComplete
1692 function for clarity.
1693 (WebCore::FrameLoader::checkCallImplicitClose): Ditto.
1694 (WebCore::FrameLoader::scheduleRedirection): Changed to take a PassOwnPtr.
1695 (WebCore::FrameLoader::startRedirectionTimer): Added code to set the
1696 toldClient flag and not call clientRedirected a second time if it is set.
1697 (WebCore::FrameLoader::stopRedirectionTimer): Changed so this can be safely
1698 called multiple times and it will call clientRedirectCancelledOrFinished
1701 * loader/FrameLoader.h: Changed scheduleRedirection to be a PassOwnPtr.
1702 Added allChildrenAreComplete function.
1704 2009-09-22 Yury Semikhatsky <yurys@chromium.org>
1706 Reviewed by Timothy Hatcher.
1708 WebInspector: Migrate Databases tab to InjectedScript /
1709 serialized interaction.
1711 DOMStorage interaction is now serialized into JSON messages
1712 and doesn't require quarantined objects.
1714 https://bugs.webkit.org/show_bug.cgi?id=28873
1716 * dom/EventListener.h:
1717 (WebCore::EventListener::):
1718 * inspector/InspectorBackend.cpp:
1719 (WebCore::InspectorBackend::selectDOMStorage):
1720 (WebCore::InspectorBackend::getDOMStorageEntries):
1721 (WebCore::InspectorBackend::setDOMStorageItem):
1722 (WebCore::InspectorBackend::removeDOMStorageItem):
1723 * inspector/InspectorBackend.h:
1724 * inspector/InspectorBackend.idl:
1725 * inspector/InspectorController.cpp:
1726 (WebCore::InspectorController::didCommitLoad):
1727 (WebCore::InspectorController::selectDOMStorage):
1728 (WebCore::InspectorController::getDOMStorageEntries):
1729 (WebCore::InspectorController::setDOMStorageItem):
1730 (WebCore::InspectorController::removeDOMStorageItem):
1731 (WebCore::InspectorController::getDOMStorageResourceForId):
1732 * inspector/InspectorController.h:
1733 * inspector/InspectorDOMStorageResource.cpp:
1734 (WebCore::InspectorDOMStorageResource::InspectorDOMStorageResource):
1735 (WebCore::InspectorDOMStorageResource::bind):
1736 (WebCore::InspectorDOMStorageResource::unbind):
1737 (WebCore::InspectorDOMStorageResource::startReportingChangesToFrontend):
1738 (WebCore::InspectorDOMStorageResource::handleEvent):
1739 (WebCore::InspectorDOMStorageResource::operator==):
1740 * inspector/InspectorDOMStorageResource.h:
1741 (WebCore::InspectorDOMStorageResource::cast):
1742 (WebCore::InspectorDOMStorageResource::id):
1743 (WebCore::InspectorDOMStorageResource::domStorage):
1744 * inspector/InspectorFrontend.cpp:
1745 (WebCore::InspectorFrontend::selectDOMStorage):
1746 (WebCore::InspectorFrontend::didGetDOMStorageEntries):
1747 (WebCore::InspectorFrontend::didSetDOMStorageItem):
1748 (WebCore::InspectorFrontend::didRemoveDOMStorageItem):
1749 (WebCore::InspectorFrontend::updateDOMStorage):
1750 * inspector/InspectorFrontend.h:
1751 * inspector/front-end/DOMStorage.js:
1752 (WebInspector.DOMStorage):
1753 (WebInspector.DOMStorage.prototype.get id):
1754 (WebInspector.DOMStorage.prototype.get domStorage):
1755 (WebInspector.DOMStorage.prototype.get isLocalStorage):
1756 (WebInspector.DOMStorage.prototype.getEntriesAsync):
1757 (WebInspector.DOMStorage.prototype.setItemAsync):
1758 (WebInspector.DOMStorage.prototype.removeItemAsync):
1759 * inspector/front-end/DOMStorageDataGrid.js:
1760 (WebInspector.DOMStorageDataGrid):
1761 (WebInspector.DOMStorageDataGrid.prototype._startEditingColumnOfDataGridNode):
1762 (WebInspector.DOMStorageDataGrid.prototype._startEditing):
1763 (WebInspector.DOMStorageDataGrid.prototype._editingCommitted):
1764 (WebInspector.DOMStorageDataGrid.prototype._editingCancelled):
1765 (WebInspector.DOMStorageDataGrid.prototype.deleteSelectedRow):
1766 * inspector/front-end/DOMStorageItemsView.js:
1767 (WebInspector.DOMStorageItemsView.prototype.update):
1768 (WebInspector.DOMStorageItemsView.prototype._showDOMStorageEntries):
1769 (WebInspector.DOMStorageItemsView.prototype._dataGridForDOMStorageEntries):
1770 * inspector/front-end/StoragePanel.js:
1771 (WebInspector.StoragePanel.prototype.show):
1772 (WebInspector.StoragePanel.prototype.reset):
1773 (WebInspector.StoragePanel.prototype.selectDOMStorage):
1774 (WebInspector.StoragePanel.prototype.updateDOMStorage):
1775 (WebInspector.StoragePanel.prototype._domStorageForId):
1776 * inspector/front-end/inspector.js:
1777 (WebInspector.addDOMStorage):
1778 (WebInspector.updateDOMStorage):
1780 2009-09-22 Sam Weinig <sam@webkit.org>
1782 Reviewed by Alexey Proskuryakov.
1784 Fix for XMLHttpRequest.abort() should destroy the response text.
1785 https://bugs.webkit.org/show_bug.cgi?id=29658
1786 <rdar://problem/5301430>
1788 Clearing the response text after calling XMLHttpRequest.abort() is necessary
1789 per spec and matches Firefox. It is also a potential memory win.
1791 Test: http/tests/xmlhttprequest/abort-should-destroy-responseText.html
1793 * xml/XMLHttpRequest.cpp:
1794 (WebCore::XMLHttpRequest::abort): Clear the response text making sure to
1795 keep the actual ResourceReponse around so that the response status and response
1796 status text are kept around.
1798 2009-09-22 Dimitri Glazkov <dglazkov@chromium.org>
1800 No review, rolling out r48639.
1801 http://trac.webkit.org/changeset/48639
1803 * bindings/v8/V8GCController.cpp:
1804 (WebCore::ObjectGrouperVisitor::visitDOMWrapper):
1806 2009-09-22 Dumitru Daniliuc <dumi@chromium.org>
1808 Reviewed by Dimitri Glazkov.
1810 Changing the transaction coordinator to (re-)allow multiple read
1811 transactions on the same database to run concurrently (without
1812 risking a deadlock this time).
1814 https://bugs.webkit.org/show_bug.cgi?id=29115
1816 Tests: storage/read-and-write-transactions-dont-run-together.html
1817 storage/read-transactions-running-concurrently.html
1819 * storage/SQLTransaction.h:
1820 (WebCore::SQLTransaction::isReadOnly): Returns the type of the
1822 * storage/SQLTransactionCoordinator.cpp:
1823 (WebCore::SQLTransactionCoordinator::acquireLock): Changed to
1824 allow multiple read transactions on the same DB to run
1826 (WebCore::SQLTransactionCoordinator::releaseLock): Changed to
1827 allow multiple read transactions on the same DB to run
1829 (WebCore::SQLTransactionCoordinator::shutdown): Renamed the map.
1830 * storage/SQLTransactionCoordinator.h:
1832 2009-09-22 Peter Kasting <pkasting@google.com>
1834 Reviewed by David Levin.
1836 https://bugs.webkit.org/show_bug.cgi?id=29652
1837 Support true system colors for CSS system colors in Chromium/Win.
1839 * rendering/RenderThemeChromiumWin.cpp:
1840 (WebCore::cssValueIdToSysColorIndex):
1841 (WebCore::RenderThemeChromiumWin::systemColor):
1842 * rendering/RenderThemeChromiumWin.h:
1844 2009-09-22 Beth Dakin <bdakin@apple.com>
1846 Reviewed by Dave Hyatt.
1848 Fix for <rdar://problem/6925121> SAP: Wrong width calculation in
1849 table with fixed layout
1851 https://bugs.webkit.org/show_bug.cgi?id=29501
1854 * fast/table/fixed-table-with-percent-inside-percent-table.html: Added.
1855 * fast/table/fixed-table-with-percent-width-inside-auto-table.html: Added.
1856 * fast/table/fixed-table-with-percent-width-inside-div.html: Added.
1857 * fast/table/fixed-table-with-percent-width-inside-extra-large-div.html: Added.
1858 * fast/table/fixed-table-with-percent-width-inside-fixed-width-table.html: Added.
1859 * fast/table/fixed-table-with-small-percent-width.html: Added.
1861 This new quirk is very similar to an existing one that was
1862 implemented in revision 4316.
1863 * rendering/FixedTableLayout.cpp:
1864 (WebCore::FixedTableLayout::calcPrefWidths):
1866 2009-09-22 Brian Weinstein <bweinstein@apple.com>
1868 Reviewed by Timothy Hatcher.
1870 List HTTP status code with response headers in resources tab of Web Inspector.
1871 http://webkit.org/b/19945
1873 This patch adds a new top level list in the resources tab, HTTP Information, that
1874 for now, contains the Request Method (GET, POST, etc.) and the Status Code (200, 404, etc.).
1875 Additionally, it adds a colored dot next to the requested URL to show the status
1876 (green for success, orange for redirect, red for error).
1878 * English.lproj/localizedStrings.js:
1879 * inspector/front-end/ImageView.js:
1880 (WebInspector.ImageView):
1881 * inspector/front-end/Images/errorRedDot.png: Added.
1882 * inspector/front-end/Images/successGreenDot.png: Added.
1883 * inspector/front-end/Images/warningOrangeDot.png: Added.
1884 * inspector/front-end/Resource.js:
1885 (WebInspector.Resource.StatusTextForCode):
1886 * inspector/front-end/ResourceView.js:
1887 (WebInspector.ResourceView):
1888 (WebInspector.ResourceView.prototype._refreshURL):
1889 (WebInspector.ResourceView.prototype._refreshHTTPInformation):
1890 * inspector/front-end/inspector.css:
1892 2009-09-22 Brady Eidson <beidson@apple.com>
1894 Reviewed by Darin Adler.
1896 Back list isn't properly updated for fragment changes after a redirect.
1897 <rdar://problem/6142803> and https://bugs.webkit.org/show_bug.cgi?id=20355
1899 Test: fast/loader/fragment-after-redirect-gets-back-entry.html
1901 * loader/FrameLoader.cpp:
1902 (WebCore::FrameLoader::loadURL): Properly reset the policy FrameLoadType before
1903 consulting the policy delegate for fragment scrolling.
1905 2009-09-22 Darin Fisher <darin@chromium.org>
1907 Reviewed by Dimitri Glazkov.
1909 Drop down selects get stuck in the non-visible state and cannot be opened.
1910 https://bugs.webkit.org/show_bug.cgi?id=29645
1912 All paths that lead to hiding the popup menu must call popupDidHide on
1913 the PopupMenuClient. This change makes it so by moving all of the
1914 hiding logic to PopupListBox::hidePopup.
1916 * platform/chromium/PopupMenuChromium.cpp:
1917 (WebCore::PopupContainer::hidePopup):
1918 (WebCore::PopupListBox::hidePopup):
1919 * platform/chromium/PopupMenuChromium.h:
1921 2009-09-22 Patrick Mueller <Patrick_Mueller@us.ibm.com>
1923 Reviewed by Timothy Hatcher.
1925 WebInspector.log() function not protected if console not yet created
1926 https://bugs.webkit.org/show_bug.cgi?id=29336
1928 No new tests. Only affects Web Inspector developers adding logging
1929 to their code during development.
1931 * inspector/front-end/inspector.js:
1932 (WebInspector.log.isLogAvailable):
1933 (WebInspector.log.flushQueue):
1934 (WebInspector.log.flushQueueIfAvailable):
1935 (WebInspector.log.logMessage):
1938 2009-09-22 Yaar Schnitman <yaar@chromium.org>
1940 Reviewed by David Levin.
1942 Ported chromium.org's webcore.gyp for the webkit chromium port.
1944 https://bugs.webkit.org/show_bug.cgi?id=29617
1946 * WebCore.gyp/WebCore.gyp: Added.
1948 2009-09-22 Christian Plesner Hansen <christian.plesner.hansen@gmail.com>
1950 Reviewed by Adam Barth.
1952 [v8] Don't keep clean wrappers artificially alive
1953 We currently keep all DOM node wrappers alive, even when there are
1954 no more references to them from JS, in case they have properties
1955 that we need to keep around if new JS references are created.
1956 This changes the policy to only keep wrappers artificially alive
1957 if they have changed since they were created. Empty wrappers are
1958 discarded and recreated as needed.
1959 https://bugs.webkit.org/show_bug.cgi?id=29330
1961 * bindings/v8/V8GCController.cpp:
1962 (WebCore::ObjectGrouperVisitor::visitDOMWrapper):
1964 2009-09-22 Pavel Feldman <pfeldman@chromium.org>
1966 Reviewed by Timothy Hatcher.
1968 Web Inspector: console.count and console.timeEnd
1969 crash when inspector is opened.
1971 https://bugs.webkit.org/show_bug.cgi?id=29632
1973 * inspector/InspectorFrontend.cpp:
1974 (WebCore::InspectorFrontend::addMessageToConsole):
1976 2009-09-22 Adam Barth <abarth@webkit.org>
1980 Fix bogus build fix I did last night.
1982 * bindings/v8/custom/V8DOMWindowCustom.cpp:
1983 (WebCore::V8Custom::WindowSetTimeoutImpl):
1985 2009-09-22 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
1987 Reviewed by Simon Hausmann.
1989 NPAPI/Mac: Don't paint plugins if we don't have a CGContextRef
1991 * plugins/mac/PluginViewMac.cpp:
1993 2009-09-22 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
1995 Reivewed by Simon Hausmann.
1997 Fix the Qt/Mac build after r48604 (Implement new QWebPageClient class)
1999 There's no QWidget::x11Info() on Mac, and setPlatformPluginWidget()
2000 takes a QWidget*, not a QWebPageClient*
2002 * plugins/mac/PluginViewMac.cpp:
2003 (WebCore::PluginView::platformStart):
2005 2009-09-21 Adam Barth <abarth@webkit.org>
2007 Attempted fix for the V8 build.
2009 * bindings/v8/custom/V8DOMWindowCustom.cpp:
2010 (WebCore::V8Custom::WindowSetTimeoutImpl):
2012 2009-09-21 Adam Barth <abarth@webkit.org>
2014 Reviewed by Sam Weinig.
2016 Don't re-enter JavaScript after performing access checks
2017 https://bugs.webkit.org/show_bug.cgi?id=29531
2019 Moved the access check slightly later in this functions to avoid
2020 re-entering the JavaScript interpreter (typically via toString)
2021 after performing the access check.
2023 I can't really think of a meaningful test for this change. It's more
2026 * bindings/js/JSDOMWindowCustom.cpp:
2027 (WebCore::JSDOMWindow::setLocation):
2028 (WebCore::JSDOMWindow::open):
2029 (WebCore::JSDOMWindow::showModalDialog):
2030 * bindings/js/JSLocationCustom.cpp:
2031 (WebCore::JSLocation::setHref):
2032 (WebCore::JSLocation::replace):
2033 (WebCore::JSLocation::assign):
2034 * bindings/v8/custom/V8DOMWindowCustom.cpp:
2035 (WebCore::V8Custom::WindowSetTimeoutImpl):
2037 (CALLBACK_FUNC_DECL):
2038 (V8Custom::WindowSetLocation):
2039 (V8Custom::ClearTimeoutImpl):
2040 * bindings/v8/custom/V8LocationCustom.cpp:
2041 (WebCore::ACCESSOR_SETTER):
2042 (WebCore::CALLBACK_FUNC_DECL):
2044 2009-09-21 Dumitru Daniliuc <dumi@chromium.org>
2046 Reviewed by Eric Seidel.
2048 Make all write transaction start with a BEGIN IMMEDIATE command
2051 We cannot test this change in a layout test, because in order to
2052 test it we need to spawn two database threads and execute
2053 transaction steps on these two threads in a very specific order,
2054 which seems impossible to do when they share the same main thread
2055 (as they would in a layout test). The SQLite docs and the case
2056 described in the bug though should be enough proof that we do have
2057 a problem here and that this patch will fix it.
2059 Relevant SQLite documentation:
2060 http://www.sqlite.org/lang_transaction.html
2061 http://www.sqlite.org/lockingv3.html#locking
2063 https://bugs.webkit.org/show_bug.cgi?id=29218
2065 * platform/sql/SQLiteTransaction.cpp:
2066 (WebCore::SQLiteTransaction::SQLiteTransaction): Added a readOnly
2068 (WebCore::SQLiteTransaction::begin): Changed to BEGIN IMMEDIATE
2069 for write transactions.
2070 * platform/sql/SQLiteTransaction.h:
2071 * storage/SQLTransaction.cpp:
2072 (WebCore::SQLTransaction::openTransactionAndPreflight): Passing
2073 the read-only flag to the SQLiteTransaction instance.
2075 2009-09-21 Brady Eidson <beidson@apple.com>
2077 Rubberstamped by Mark Rowe.
2079 * DerivedSources.make: Fix the Xcode build on SnowLeopard.
2081 2009-09-15 John Abd-El-Malek <jam@chromium.org>
2083 Reviewed by Darin Fisher.
2085 Prevent sleeps in unload handlers.
2086 https://bugs.webkit.org/show_bug.cgi?id=29193
2088 Test: fast/dom/Window/slow_unload_handler.html
2091 * bindings/v8/DateExtension.cpp: Added.
2092 (WebCore::DateExtension::DateExtension):
2093 (WebCore::DateExtension::get):
2094 (WebCore::DateExtension::setAllowSleep):
2095 (WebCore::DateExtension::GetNativeFunction):
2096 (WebCore::DateExtension::weakCallback):
2097 (WebCore::DateExtension::GiveEnableSleepDetectionFunction):
2098 (WebCore::DateExtension::OnSleepDetected):
2099 * bindings/v8/DateExtension.h: Added.
2100 * bindings/v8/V8AbstractEventListener.cpp:
2101 (WebCore::V8AbstractEventListener::invokeEventHandler):
2102 * bindings/v8/V8Proxy.cpp:
2103 (WebCore::V8Proxy::createNewContext):
2104 (WebCore::V8Proxy::registerExtensionWithV8):
2105 (WebCore::V8Proxy::registeredExtensionWithV8):
2106 * bindings/v8/V8Proxy.h:
2108 2009-09-21 Jian Li <jianli@chromium.org>
2110 Reviewed by David Levin.
2112 [V8] Run-time exception in onmessage handler is not forwarded to the
2114 https://bugs.webkit.org/show_bug.cgi?id=28980
2116 The previous fix was partially reverted due to a reliability build break
2117 in chromium. The break happens when an exception is thrown without
2118 setting a message. We need to check for this scenario and handle it.
2120 Tested by worker-close.html.
2122 * bindings/v8/V8AbstractEventListener.cpp:
2123 (WebCore::V8AbstractEventListener::invokeEventHandler):
2124 * bindings/v8/V8Utilities.cpp:
2125 (WebCore::reportException):
2127 2009-09-21 Greg Bolsinga <bolsinga@apple.com>
2129 Reviewed by Simon Fraser & Sam Weinig.
2131 Add ENABLE(ORIENTATION_EVENTS)
2132 https://bugs.webkit.org/show_bug.cgi?id=29508
2134 See documentation here:
2135 http://developer.apple.com/safari/library/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html#//apple_ref/doc/uid/TP40006511-SW16
2137 * DerivedSources.make: Use new WebCore.OrientationEvents.exp file if ENABLE_ORIENTATION_EVENTS.
2138 Add ENABLE_ORIENTATION_EVENTS to the new ADDITIONAL_IDL_DEFINES variable that is passed to the IDL
2139 code generator. This is because ENABLE_ORIENTATION_EVENTS is not in FEATURE_DEFINES.
2140 * WebCore.OrientationEvents.exp: Added.
2141 * WebCore.xcodeproj/project.pbxproj: Add WebCore.OrientationEvents.exp.
2142 * dom/EventNames.h: Add onorientationchange.
2143 * html/HTMLAttributeNames.in: Ditto.
2144 * html/HTMLBodyElement.cpp: Handle onorientationchange properly.
2145 (WebCore::HTMLBodyElement::parseMappedAttribute):
2146 (WebCore::HTMLBodyElement::onorientationchange):
2147 (WebCore::HTMLBodyElement::setOnorientationchange):
2148 * html/HTMLBodyElement.h: Ditto.
2149 * html/HTMLBodyElement.idl: Ditto.
2150 * html/HTMLFrameSetElement.cpp: Ditto.
2151 (WebCore::HTMLFrameSetElement::parseMappedAttribute):
2152 (WebCore::HTMLFrameSetElement::onorientationchange):
2153 (WebCore::HTMLFrameSetElement::setOnorientationchange):
2154 * html/HTMLFrameSetElement.h: Ditto.
2155 * html/HTMLFrameSetElement.idl: Ditto.
2156 * page/DOMWindow.cpp: Ditto.
2157 (WebCore::DOMWindow::orientation): Calls up the to the Frame for the orientation value.
2158 (WebCore::DOMWindow::onorientationchange):
2159 (WebCore::DOMWindow::setOnorientationchange):
2160 * page/DOMWindow.h: Handle onorientationchange properly.
2161 * page/DOMWindow.idl: Ditto.
2162 * page/Frame.cpp: Ditto.
2163 (WebCore::Frame::Frame):
2164 (WebCore::Frame::sendOrientationChangeEvent):
2165 * page/Frame.h: Ditto.
2166 (WebCore::Frame::orientation):
2168 2009-09-18 Anders Carlsson <andersca@apple.com>
2170 Try fixing the build again.
2172 * platform/win/PopupMenuWin.cpp:
2173 (WebCore::PopupMenu::wndProc):
2175 2009-09-21 Pavel Feldman <pfeldman@chromium.org>
2177 Reviewed by Timothy Hatcher.
2179 Web Inspector: completions are always evaluated against
2180 window (discarding call frames).
2182 https://bugs.webkit.org/show_bug.cgi?id=29616
2184 * inspector/front-end/ConsoleView.js:
2185 (WebInspector.ConsoleView.prototype.completions):
2186 * inspector/front-end/InjectedScript.js:
2187 (InjectedScript.getCompletions):
2188 * inspector/front-end/ScriptsPanel.js:
2189 (WebInspector.ScriptsPanel.prototype.selectedCallFrameId):
2191 2009-09-21 Brent Fulgham <bfulgham@webkit.org>
2193 Unreviewed build fix for Windows (Cairo) target.
2195 Add stubs for SocketStream classes added in @r47788, which
2196 broke the WinCairo build.
2198 No new tests. (Build failure).
2200 * WebCore.vcproj/WebCore.vcproj: Add references to new files
2201 to Cairo build, exclude from standard Apple build.
2202 * platform/network/curl/SocketStreamError.h: Added.
2203 * platform/network/curl/SocketStreamHandle.h: Added.
2204 * platform/network/curl/SocketStreamHandleCurl.cpp: Added.
2206 2009-09-21 Pavel Feldman <pfeldman@chromium.org>
2208 Reviewed by Timothy Hatcher.
2210 Web Inspector: Expose InspectorResource fields.
2212 https://bugs.webkit.org/show_bug.cgi?id=29537
2214 * inspector/InspectorResource.cpp:
2215 (WebCore::InspectorResource::sourceString):
2216 (WebCore::InspectorResource::resourceData):
2217 * inspector/InspectorResource.h:
2218 (WebCore::InspectorResource::requestHeaderFields):
2219 (WebCore::InspectorResource::responseHeaderFields):
2220 (WebCore::InspectorResource::responseStatusCode):
2221 (WebCore::InspectorResource::requestMethod):
2222 (WebCore::InspectorResource::requestFormData):
2224 2009-09-21 Pavel Feldman <pfeldman@chromium.org>
2226 Reviewed by Timothy Hatcher.
2228 Web Inspector: JS error drilling down childless node.
2229 No need to dispatch double click twice - it is already handled
2230 in TreeElement.treeElementDoubleClicked.
2232 https://bugs.webkit.org/show_bug.cgi?id=22144
2234 * inspector/front-end/ElementsTreeOutline.js:
2235 (WebInspector.ElementsTreeOutline):
2237 2009-09-21 Kenneth Rohde Christiansen <kenneth@webkit.org>
2239 Reviewed by Simon Hausmann.
2241 Implement new QWebPageClient class and let our classes
2242 QWebViewPrivate and QWebGraphicsItemPrivate inherit from it.
2244 For Qt, platformPageClient() will now return a class derived from
2245 the QWebPageClient, so the patch adapts our Qt hooks to go though
2246 this class and not depend on the QWebView.
2249 * platform/Widget.h:
2250 * platform/qt/PlatformScreenQt.cpp:
2251 (WebCore::screenDepth):
2252 (WebCore::screenDepthPerComponent):
2253 (WebCore::screenIsMonochrome):
2254 (WebCore::screenRect):
2255 (WebCore::screenAvailableRect):
2256 * platform/qt/PopupMenuQt.cpp:
2257 (WebCore::PopupMenu::show):
2258 * platform/qt/QWebPageClient.h: Added.
2259 * platform/qt/WidgetQt.cpp:
2260 (WebCore::Widget::setCursor):
2261 * plugins/qt/PluginViewQt.cpp:
2262 (WebCore::PluginView::handleKeyboardEvent):
2263 (WebCore::PluginView::getValue):
2264 (WebCore::PluginView::platformStart):
2266 2009-09-21 Pavel Feldman <pfeldman@chromium.org>
2268 Reviewed by Timothy Hatcher.
2270 Web Inspector: Evaluating on call frame always returns "undefined".
2272 https://bugs.webkit.org/show_bug.cgi?id=29613
2274 * inspector/front-end/InjectedScript.js:
2275 (InjectedScript.evaluate):
2276 (InjectedScript._evaluateAndWrap):
2277 (InjectedScript._evaluateOn):
2278 (InjectedScript.evaluateInCallFrame):
2280 2009-09-21 Pavel Feldman <pfeldman@chromium.org>
2282 Reviewed by Timothy Hatcher.
2284 Web Inspector: Exception formatting is broken in console.
2286 https://bugs.webkit.org/show_bug.cgi?id=29608
2288 * inspector/front-end/ConsoleView.js:
2289 (WebInspector.ConsoleCommandResult):
2290 * inspector/front-end/InjectedScript.js:
2291 (InjectedScript.evaluate):
2292 (InjectedScript.createProxyObject):
2294 2009-09-21 Pavel Feldman <pfeldman@chromium.org>
2296 Reviewed by Timothy Hatcher.
2298 Web Inspector: Console object formatting is broken.
2300 https://bugs.webkit.org/show_bug.cgi?id=29607
2302 * inspector/front-end/ConsoleView.js:
2303 (WebInspector.ConsoleMessage.prototype._format):
2304 * inspector/front-end/ObjectProxy.js:
2305 (WebInspector.ObjectProxy.wrapPrimitiveValue):
2307 2009-09-21 Pavel Feldman <pfeldman@chromium.org>
2309 Reviewed by Timothy Hatcher.
2311 Web Inspector: Crash When Logging an Element Before Opening Inspector
2313 https://bugs.webkit.org/show_bug.cgi?id=29514
2315 * inspector/InspectorController.cpp:
2316 (WebCore::InspectorController::populateScriptObjects):
2318 2009-09-21 Simon Fraser <simon.fraser@apple.com>
2320 Reviewed by Dan Bernstein.
2322 Incorrect clipping with accelerated compositing content, and position:fixed
2323 https://bugs.webkit.org/show_bug.cgi?id=29347
2325 Fix the compositing clipping logic to behave correctly when position:fixed
2326 elements clip, by using the new backgroundClipRect() method to determine
2327 when we need to clip, and to compute the clipping layer position.
2329 Test: compositing/overflow/fixed-position-ancestor-clip.html
2331 * rendering/RenderLayerBacking.cpp:
2332 (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2333 * rendering/RenderLayerCompositor.cpp:
2334 (WebCore::RenderLayerCompositor::clippedByAncestor):
2336 2009-09-21 Nate Chapin <japhet@chromium.org>
2338 Reviewed by Adam Barth.
2340 Add back in a special case for window.top in the V8 bindings.
2342 https://bugs.webkit.org/show_bug.cgi?id=29605
2344 Fixes LayoutTests/fast/dom/Window/window-property-shadowing.html in the Chromium port.
2346 * bindings/scripts/CodeGeneratorV8.pm: Ensure window.top is not marked as read only, as this breaks the shadowing disabling.
2348 2009-09-21 Eric Carlson <eric.carlson@apple.com>
2350 Reviewed by Brady Eidson.
2352 HTMLMediaElement: media file should not reload when page comes out of page cache
2353 https://bugs.webkit.org/show_bug.cgi?id=29604
2355 Test: media/restore-from-page-cache.html
2357 * html/HTMLMediaElement.cpp:
2358 (WebCore::HTMLMediaElement::userCancelledLoad): Do nothing unless the element
2359 is still loading. Only fire an 'emptied' event if the readyState is HAVE_NOTHING,
2360 otherwise set the network state to NETWORK_IDLE.
2362 2009-09-21 Sam Weinig <sam@webkit.org>
2364 Reviewed by Geoffrey "Sean/Shawn/Shaun" Garen.
2368 * bindings/js/JSHTMLCollectionCustom.cpp:
2369 (WebCore::getNamedItems):
2370 * bindings/js/JSHTMLFormElementCustom.cpp:
2371 (WebCore::JSHTMLFormElement::nameGetter):
2373 2009-09-21 Darin Fisher <darin@chromium.org>
2375 Reviewed by Dimitri Glazkov.
2377 Drop down selects fail to close when a value is selected
2378 https://bugs.webkit.org/show_bug.cgi?id=29582
2380 Implement PopupListBox::hidePopup, which was previously
2381 declared but unimplemented. Removes the declaration of
2382 showPopup since that method is not implemented.
2384 PopupListBox::hidePopup takes care of hiding the popup,
2385 by invoking hidePopup on its parent PopupContainer, and
2386 then informs the PopupMenuClient that popupDidHide.
2387 This mimics the old behavior prior to r48370.
2389 * platform/chromium/PopupMenuChromium.cpp:
2390 (WebCore::PopupListBox::handleKeyEvent):
2391 (WebCore::PopupListBox::abandon):
2392 (WebCore::PopupListBox::acceptIndex):
2393 (WebCore::PopupListBox::hidePopup):
2395 2009-09-21 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
2397 Rubber-stamped by Simon Hausmann.
2399 [Qt] Windows build fix.
2400 https://bugs.webkit.org/show_bug.cgi?id=29535
2402 * platform/network/qt/DnsPrefetchHelper.cpp: Missing #include "config.h" added.
2404 2009-09-21 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
2406 Unreviewed make dist build fix. Missing files.
2410 2009-09-20 Adam Barth <abarth@webkit.org>
2412 Reviewed by Maciej Stachowiak.
2414 Crash when clicking link in unload handler
2415 https://bugs.webkit.org/show_bug.cgi?id=29525
2417 Test that the first navigation always wins when the page tries to start
2418 a new navigation in an unload handler.
2420 Tests: fast/loader/unload-form-about-blank.html
2421 fast/loader/unload-form-post-about-blank.html
2422 fast/loader/unload-form-post.html
2423 fast/loader/unload-form.html
2424 fast/loader/unload-hyperlink.html
2425 fast/loader/unload-javascript-url.html
2426 fast/loader/unload-reload.html
2427 fast/loader/unload-window-location.html
2429 * loader/FrameLoader.cpp:
2430 (WebCore::FrameLoader::loadURL):
2431 (WebCore::FrameLoader::loadWithDocumentLoader):
2433 2009-09-18 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
2435 Reviewed by Xan Lopez.
2437 [GTK] Sometimes crashes when a page is destroyed/loads another URL while playing video
2438 https://bugs.webkit.org/show_bug.cgi?id=29496
2440 Protect the video sink object, and destroy it in an idle callback
2441 to hopefully avoid a race condition that leads to a crash.
2443 This is already tested by media/video-seekable.html
2445 * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
2446 (WebCore::idleUnref):
2447 (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
2448 (WebCore::MediaPlayerPrivate::createGSTPlayBin):
2450 2009-09-19 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
2452 Unreviewed build fix for GTK+ and a blind one for Qt after r48566.
2457 2009-09-19 Sam Weinig <sam@webkit.org>
2459 Reviewed by Oliver Hunt.
2461 Fix for https://bugs.webkit.org/show_bug.cgi?id=29519
2462 Remove JSNameNodeCollection and just use StaticNodeList
2464 * WebCore.vcproj/WebCore.vcproj:
2465 * WebCore.xcodeproj/project.pbxproj:
2466 * WebCoreSources.bkl:
2467 * bindings/js/JSHTMLCollectionCustom.cpp:
2468 (WebCore::getNamedItems):
2469 * bindings/js/JSHTMLFormElementCustom.cpp:
2470 (WebCore::JSHTMLFormElement::nameGetter):
2471 * bindings/js/JSNamedNodesCollection.cpp: Removed.
2472 * bindings/js/JSNamedNodesCollection.h: Removed.
2474 2009-09-19 Daniel Bates <dbates@webkit.org>
2476 Reviewed by Adam Barth.
2478 https://bugs.webkit.org/show_bug.cgi?id=29511
2480 Fixes an issue where script code that contains non-ASCII characters may bypass the
2483 Before performing a comparison between the script source code and input parameters, we
2484 remove all non-ASCII characters, including non-printable ASCII characters from the
2485 script source code and input parameters.
2487 Tests: http/tests/security/xssAuditor/img-onerror-non-ASCII-char.html
2488 http/tests/security/xssAuditor/img-onerror-non-ASCII-char-default-encoding.html
2489 http/tests/security/xssAuditor/img-onerror-non-ASCII-char2-default-encoding.html
2490 http/tests/security/xssAuditor/img-onerror-non-ASCII-char2.html
2492 * page/XSSAuditor.cpp:
2493 (WebCore::isNonCanonicalCharacter): Modified to remove all non-ASCII characters,
2494 including non-printable ASCII characters.
2496 2009-09-19 Simon Fraser <simon.fraser@apple.com>
2498 Reviewed by Dan Bernstein.
2500 Incorrect animation with scale(0) transform (singular matrix)
2501 https://bugs.webkit.org/show_bug.cgi?id=29465
2503 Make accelerated scale() and translate() animations go through the component animation
2504 path (rather than just matrix animation) to avoid problems with singular scale matrices,
2505 and be slightly more efficient.
2507 Test: compositing/transitions/singular-scale-transition.html
2509 * platform/graphics/mac/GraphicsLayerCA.mm:
2510 (WebCore::getTransformFunctionValue):
2511 (WebCore::getValueFunctionNameForTransformOperation):
2513 2009-09-19 Alex Milowski <alex@milowski.com>
2515 Reviewed by Maciej Stachowiak.
2517 Adds CSS styling and basic DOM element support for MathML
2519 * DerivedSources.make:
2520 Added user stylesheet and tag factory generation
2522 * WebCore.xcodeproj/project.pbxproj:
2523 Added new DOM element code
2525 * css/CSSParser.cpp:
2526 (WebCore::CSSParser::parseAttr):
2527 Added check for document since stylesheet can be added before there is a document
2529 * css/CSSStyleSelector.cpp:
2530 (WebCore::CSSStyleSelector::styleForElement):
2531 Added check to add MathML user agent stylesheet
2533 * css/mathml.css: Added.
2534 MathML user agent stylesheet
2537 (WebCore::Document::createElement):
2538 Added support for creation of MathML DOM objects
2541 (WebCore::Node::isMathMLElement):
2542 Added check method for whether the node is a MathML node
2545 * mathml/MathMLElement.cpp: Added.
2546 (WebCore::MathMLElement::MathMLElement):
2547 (WebCore::MathMLElement::create):
2548 (WebCore::MathMLElement::createRenderer):
2549 * mathml/MathMLElement.h: Added.
2550 (WebCore::MathMLElement::isMathMLElement):
2551 MathML DOM base class
2554 * mathml/MathMLInlineContainerElement.cpp: Added.
2555 (WebCore::MathMLInlineContainerElement::MathMLInlineContainerElement):
2556 (WebCore::MathMLInlineContainerElement::create):
2557 (WebCore::MathMLInlineContainerElement::createRenderer):
2558 * mathml/MathMLInlineContainerElement.h: Added.
2559 Base class for non-text containers
2561 * mathml/MathMLMathElement.cpp: Added.
2562 (WebCore::MathMLMathElement::MathMLMathElement):
2563 (WebCore::MathMLMathElement::create):
2564 * mathml/MathMLMathElement.h: Added.
2567 * mathml/mathtags.in: Added.
2568 Element list mappings
2571 (WebCore::Frame::Frame):
2572 Added MathML name initialization
2573 2009-09-19 Adam Barth <abarth@webkit.org>
2575 Reviewed by Oliver Hunt.
2577 Canvas drawn with data URL image raises SECURITY_ERR when toDataUrl() called.
2578 https://bugs.webkit.org/show_bug.cgi?id=29305
2580 We need to special-case data URLs when tainting a canvas because we
2581 treat data URLs has having no security origin, unlike other
2582 browsers. The reason we do this is to help sites avoid XSS via data
2583 URLs, but that consideration doesn't apply to canvas taint.
2585 Also, we were previously incorrectly taking document.domain state
2586 into account when tainting canvas.
2588 Tests: http/tests/security/canvas-remote-read-data-url-image.html
2589 http/tests/security/canvas-remote-read-data-url-svg-image.html
2590 http/tests/security/canvas-remote-read-remote-image-document-domain.html
2592 * html/canvas/CanvasRenderingContext2D.cpp:
2593 (WebCore::CanvasRenderingContext2D::checkOrigin):
2594 (WebCore::CanvasRenderingContext2D::createPattern):
2595 * page/SecurityOrigin.cpp:
2596 (WebCore::SecurityOrigin::taintsCanvas):
2597 * page/SecurityOrigin.h:
2599 2009-09-18 Simon Fraser <simon.fraser@apple.com>
2601 Fix stylistic issue raised in code review for previous commit.
2603 * rendering/RenderLayerBacking.cpp:
2604 (WebCore::hasNonZeroTransformOrigin):
2606 2009-09-18 Simon Fraser <simon.fraser@apple.com>
2608 Reviewed by Dan Bernstein.
2610 Element is misplaced during opacity transition with certain configuration of transform-origin and clipping
2611 https://bugs.webkit.org/show_bug.cgi?id=29495
2613 If an element has zero size, but has a transform origin with absolute values,
2614 then the transform origin would not be applied because it is implemented via
2615 anchorPoint, which is expressed as a fraction of the layer size.
2617 Work around this by artificially inflating the size of the backing store when we need to.
2619 Test: compositing/geometry/transfrom-origin-on-zero-size-layer.html
2621 * rendering/RenderLayerBacking.h:
2622 * rendering/RenderLayerBacking.cpp:
2623 (WebCore::RenderLayerBacking::RenderLayerBacking):
2624 Init m_artificiallyInflatedBounds to false.
2626 (WebCore::hasNonZeroTransformOrigin):
2627 Utility function that describes whether the transform-origin contains non-percentage
2630 (WebCore::RenderLayerBacking::updateCompositedBounds):
2631 New wrapper method around setCompositedBounds() that applies the size inflation
2632 when necessary, setting the m_artificiallyInflatedBounds as appropriate.
2634 (WebCore::RenderLayerBacking::updateAfterLayout): Call updateCompositedBounds().
2635 (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Ditto
2637 * rendering/RenderLayerCompositor.cpp:
2638 (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): Ditto
2639 (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry): Ditto
2641 2009-09-18 Antti Koivisto <antti@apple.com>
2643 Reviewed by Maciej Stachowiak.
2645 https://bugs.webkit.org/show_bug.cgi?id=29512
2646 Don't recalculate style when restoring from the page cache
2648 FrameLoaderClient::forceLayout() also forces style recalc. Instead call FrameView::forceLayout()
2649 directly to update the scrollbars while keeping the existing style.
2651 Makes back/forward really fast on complex pages (in cases where page cache works).
2653 * loader/FrameLoader.cpp:
2654 (WebCore::FrameLoader::commitProvisionalLoad):
2656 2009-09-18 Oliver Hunt <oliver@apple.com>
2658 Reviewed by Geoff Garen.
2660 Implement ES5 Object.defineProperty function
2661 https://bugs.webkit.org/show_bug.cgi?id=29503
2663 Override defineOwnProperty on JSDOMWindowShell to forward appropriately,
2664 and then override defineOwnProperty on JSDOMWindow to disallow cross origin
2665 defineOwnProperty usage. We also override defineOwnProperty on QuarantinedObjectWrapper
2666 to ensure correct wrapping semantics of quarantined objects.
2668 One major caveat in this patch is that it currently disallows the use
2669 of Object.defineProperty on DOMObjects other than the window due to
2670 the significant work involved in correctly propagating attributes and
2671 ensuring correct semantics on dom objects.
2673 Tests: fast/js/Object-defineProperty.html
2674 http/tests/security/xss-DENIED-defineProperty.html
2676 * bindings/js/JSDOMBinding.cpp:
2677 (WebCore::DOMObject::defineOwnProperty):
2678 * bindings/js/JSDOMBinding.h:
2679 * bindings/js/JSDOMWindowCustom.cpp:
2680 (WebCore::JSDOMWindow::defineGetter):
2681 (WebCore::JSDOMWindow::defineSetter):
2682 (WebCore::JSDOMWindow::defineOwnProperty):
2683 * bindings/js/JSDOMWindowShell.cpp:
2684 (WebCore::JSDOMWindowShell::defineOwnProperty):
2685 (WebCore::JSDOMWindowShell::defineGetter):
2686 (WebCore::JSDOMWindowShell::defineSetter):
2687 * bindings/js/JSDOMWindowShell.h:
2688 * bindings/js/JSLocationCustom.cpp:
2689 (WebCore::JSLocation::defineGetter):
2690 (WebCore::JSLocationPrototype::defineGetter):
2691 * bindings/js/JSQuarantinedObjectWrapper.cpp:
2692 (WebCore::JSQuarantinedObjectWrapper::getOwnPropertyDescriptor):
2693 (WebCore::JSQuarantinedObjectWrapper::defineOwnProperty):
2694 * bindings/js/JSQuarantinedObjectWrapper.h:
2695 * bindings/scripts/CodeGeneratorJS.pm:
2697 2009-09-18 Alexey Proskuryakov <ap@apple.com>
2699 Reviewed by Darin Adler.
2701 https://bugs.webkit.org/show_bug.cgi?id=29510
2702 Active DOM objects should be suspended while a modal dialog is displayed
2704 * manual-tests/js-timers-beneath-modal-dialog.html: Added a test for JS timers.
2706 * page/PageGroupLoadDeferrer.cpp:
2707 (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
2708 (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
2709 Match other platforms, and make Mac also suspend active DOM objects. Since a page that
2710 currently displays a modal dialog cannot go into page cache, there is no danger of suspending
2713 2009-09-18 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
2715 Reviewed by Eric Seidel.
2717 [Qt] Buildfix caused by http://trac.webkit.org/changeset/48513
2718 https://bugs.webkit.org/show_bug.cgi?id=29351
2720 * bridge/qt/qt_instance.h: createRuntimeObject method renamed to newRuntimeObject.
2721 * bridge/runtime.h: Visibility of newRuntimeObject method modified to protected.
2723 2009-09-18 Yury Semikhatsky <yurys@chromium.org>
2725 Reviewed by Timothy Hatcher.
2727 Fix parameter substitutions in console.log().
2729 https://bugs.webkit.org/show_bug.cgi?id=29366
2731 * inspector/front-end/ConsoleView.js:
2732 (WebInspector.ConsoleMessage.prototype._format):
2733 * inspector/front-end/InjectedScript.js:
2734 (InjectedScript.getPrototypes):
2735 (InjectedScript.CallFrameProxy.prototype._wrapScopeChain):
2736 * inspector/front-end/utilities.js:
2739 2009-09-18 Sam Weinig <sam@webkit.org>
2741 Reviewed by Geoffrey Garen and Brady Eidson.
2743 Temporarily remove an assertion that was getting hit when going
2744 back to a page in the page cache while a banner in Safari was visible.
2745 We should re-enable this once that is fixed. See <rdar://problem/7218118>
2747 * page/FrameView.cpp:
2748 (WebCore::FrameView::scheduleRelayout):
2750 2009-09-18 Anders Carlsson <andersca@apple.com>
2752 Try fixing the build again.
2754 * platform/win/PopupMenuWin.cpp:
2755 (WebCore::PopupMenu::wndProc):
2757 2009-09-18 Anders Carlsson <andersca@apple.com>
2761 * platform/win/PopupMenuWin.cpp:
2763 2009-09-18 Sam Weinig <sam@webkit.org>
2765 Reviewed by Gavin 'BearClaw' Barraclough.
2767 Convert another callback type object to store the global object
2768 instead of the frame.
2770 * bindings/js/JSCustomXPathNSResolver.cpp:
2771 (WebCore::JSCustomXPathNSResolver::create):
2772 (WebCore::JSCustomXPathNSResolver::JSCustomXPathNSResolver):
2773 (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
2774 * bindings/js/JSCustomXPathNSResolver.h:
2776 2009-09-18 Anders Carlsson <andersca@apple.com>
2778 Reviewed by Sam Weinig.
2780 https://bugs.webkit.org/show_bug.cgi?id=29332
2781 <rdar://problem/7231652>
2782 REGRESSION (r48446): While a <select> popup menu is open, the
2783 rest of the WebView doesn't respond to mouse move events.
2785 * platform/win/PopupMenuWin.cpp:
2786 (WebCore::translatePoint):
2787 New helper function that translates a point between HWND coordinates.
2789 (WebCore::PopupMenu::show):
2790 Protect the PopupMenu if someone removes the <select> in response to a mouse
2791 event. Handle WM_HOST_WINDOW_MOUSEMOVE events.
2793 (WebCore::PopupMenu::wndProc):
2794 in the WM_MOUSEMOVE handler, if the mouse is not over the popup, post a
2795 WM_HOST_WINDOW_MOUSEMOVE event so that the host window (the WebView) gets the
2798 2009-09-18 Simon Fraser <simon.fraser@apple.com>
2800 Reviewed by Dave Hyatt.
2802 Compositing layers are incorrectly positioned after scrolling with position:fixed
2803 https://bugs.webkit.org/show_bug.cgi?id=29262
2805 When scrolling a page with compositing layers inside a position:fixed element,
2806 we need to update the compositing layer positions when the scroll position changes.
2808 Test: compositing/geometry/fixed-position.html
2811 Export FrameView::scrollPositionChanged()
2814 * page/FrameView.cpp:
2815 (WebCore::FrameView::scrollPositionChanged):
2816 New method that sends the scroll event, and updates compositing layers positions if necessary.
2818 2009-09-18 Simon Fraser <simon.fraser@apple.com>
2820 Reviewed by Dave Hyatt.
2822 Transformed elements inside position:fixed container are clipped incorrectly
2823 https://bugs.webkit.org/show_bug.cgi?id=29346
2825 Fix clipping and hit testing on transformed elements inside a position:fixed element.
2826 Previously, the code used the overflowClipRect of the parent clip rects, but
2827 this is not correct for fixed postion elements. Instead, share code that is
2828 already present in calculateRects() to get the correct rect.
2830 Test: fast/overflow/position-fixed-transform-clipping.html
2832 * rendering/RenderLayer.h:
2833 * rendering/RenderLayer.cpp:
2834 (WebCore::RenderLayer::paintLayer):
2835 (WebCore::RenderLayer::hitTestLayer):
2836 Call the new backgroundClipRect() to get the correct clipRect.
2838 (WebCore::RenderLayer::backgroundClipRect):
2839 New method, factored out of calculateRects(), that computes the clip rect,
2840 doing the right thing for fixed position elements.
2842 (WebCore::RenderLayer::calculateRects):
2843 Call the new backgroundClipRect() method.
2845 2009-09-18 Dan Bernstein <mitz@apple.com>
2847 Reviewed by Darin Adler.
2849 Fix <rdar://problem/7050773> REGRESSION (r40098) Crash at
2850 WebCore::RenderBlock::layoutBlock()
2851 https://bugs.webkit.org/show_bug.cgi?id=29498
2853 Test: accessibility/nested-layout-crash.html
2855 * accessibility/AccessibilityRenderObject.cpp:
2856 (WebCore::AccessibilityRenderObject::updateBackingStore): Changed to
2857 call Document::updateLayoutIgnorePendingStylesheets() instead of
2858 calling RenderObject::layoutIfNeeded(). The latter requires that
2859 there be no pending style recalc, which allows methods that call
2860 Document::updateLayout() to be called during layout without risking
2861 re-entry into layout.
2862 * accessibility/mac/AccessibilityObjectWrapper.mm:
2863 (-[AccessibilityObjectWrapper accessibilityActionNames]): Null-check
2864 m_object after calling updateBackingStore(), since style recalc may
2865 destroy the renderer, which destroys the accessibility object and
2866 detaches it from the wrapper.
2867 (-[AccessibilityObjectWrapper accessibilityAttributeNames]): Ditto.
2868 (-[AccessibilityObjectWrapper accessibilityAttributeValue:]): Ditto.
2869 (-[AccessibilityObjectWrapper accessibilityFocusedUIElement]): Ditto.
2870 (-[AccessibilityObjectWrapper accessibilityHitTest:]): Ditto.
2871 (-[AccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
2873 (-[AccessibilityObjectWrapper accessibilityIsIgnored]): Ditto.
2874 (-[AccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
2876 (-[AccessibilityObjectWrapper accessibilityPerformPressAction]): Ditto.
2877 (-[AccessibilityObjectWrapper accessibilityPerformIncrementAction]):
2879 (-[AccessibilityObjectWrapper accessibilityPerformDecrementAction]):
2881 (-[AccessibilityObjectWrapper accessibilityPerformAction:]): Ditto.
2882 (-[AccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
2884 (-[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
2886 (-[AccessibilityObjectWrapper accessibilityIndexOfChild:]): Ditto.
2887 (-[AccessibilityObjectWrapper accessibilityArrayAttributeCount:]):
2889 (-[AccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]):
2892 2009-09-18 Fumitoshi Ukai <ukai@chromium.org>
2894 Reviewed by Simon Hausmann.
2896 Update Qt build system for Web Socket.
2897 https://bugs.webkit.org/show_bug.cgi?id=29270
2900 * platform/network/qt/SocketStreamError.h: Added.
2901 * platform/network/qt/SocketStreamHandle.h: Added.
2902 * platform/network/qt/SocketStreamHandleSoup.cpp: Added.
2904 2009-09-18 Eric Carlson <eric.carlson@apple.com>
2906 Reviewed by Darin Adler.
2908 NULL check HTMLMediaElement::m_playedTimeRanges.
2909 Fix for https://bugs.webkit.org/show_bug.cgi?id=29494
2911 * html/HTMLMediaElement.cpp:
2912 (WebCore::HTMLMediaElement::addPlayedRange): New. Create m_playedTimeRanges if
2913 necessary, add range specified.
2914 (WebCore::HTMLMediaElement::seek): Use addPlayedRange.
2915 (WebCore::HTMLMediaElement::played): Use addPlayedRange. Change time comparison
2916 to be more readable.
2917 (WebCore::HTMLMediaElement::updatePlayState): Ditto.
2918 * html/HTMLMediaElement.h:
2920 2009-09-18 Sam Weinig <sam@webkit.org>
2922 Reviewed by Adele Peterson.
2924 Follow up fix for https://bugs.webkit.org/show_bug.cgi?id=29276
2925 REGRESSION(r48334): WebKit crashes on file select by drag
2927 Don't use Document.elementFromPoint since it returns null if the point
2928 is outside the viewport. Instead, just hit test ourselves.
2930 Test: fast/events/drag-file-crash.html
2932 * page/DragController.cpp:
2933 (WebCore::elementUnderMouse):
2934 (WebCore::DragController::tryDocumentDrag):
2935 (WebCore::DragController::concludeEditDrag):
2937 2009-09-18 Darin Adler <darin@apple.com>
2939 Reviewed by Sam Weinig.
2941 Each wrapped Objective-C object should use a single RuntimeObjectImp
2942 https://bugs.webkit.org/show_bug.cgi?id=29351
2943 rdar://problem/7142294
2945 * WebCore.base.exp: Added a newly-needed exported symbol.
2947 * bindings/objc/DOMInternal.h: Eliminated unused
2948 createWrapperCacheWithIntegerKeys; it has not been needed since the
2949 RGBColor wrappers were reworked.
2950 * bindings/objc/DOMInternal.mm: Ditto.
2952 * bridge/objc/objc_instance.h: Made the create function non-inline.
2953 * bridge/objc/objc_instance.mm:
2954 (createInstanceWrapperCache): Added. Creates an appropriate map table.
2955 (ObjcInstance::create): Moved here from header. Uses NSMapGet and
2956 NSMapInsert to cache the instance in a map table.
2957 (ObjcInstance::~ObjcInstance): Added a call to NSMapRemove to remove
2958 the instance from the map table.
2960 * bridge/qt/qt_instance.cpp:
2961 (JSC::Bindings::QtInstance::~QtInstance): Remove unneeded code to remove
2962 the instance from cachedObjects, which no longer exists.
2963 (JSC::Bindings::QtInstance::newRuntimeObject): Renamed to overload new
2964 bottleneck. Caching is now handled by the base class.
2966 * bridge/runtime.cpp:
2967 (JSC::Bindings::Instance::Instance): Initialize m_runtimeObject to 0.
2968 (JSC::Bindings::Instance::~Instance): Assert m_runtimeObject is 0.
2969 (JSC::Bindings::Instance::createRuntimeObject): Use m_runtimeObject
2970 if it's already set. Set m_runtimeObject and call addRuntimeObject
2972 (JSC::Bindings::Instance::newRuntimeObject): Added. Virtual function,
2973 used only by createRuntimeObject.
2974 (JSC::Bindings::Instance::willDestroyRuntimeObject): Added.
2975 Calls removeRuntimeObject and then clears m_runtimeObject.
2976 (JSC::Bindings::Instance::willInvalidateRuntimeObject): Added.
2977 Clears m_runtimeObject.
2979 * bridge/runtime.h: Made createRuntimeObject non-virtual. Added
2980 willDestroyRuntimeObject, willInvalidateRuntimeObject,
2981 newRuntimeObject, and m_runtimeObject.
2983 * bridge/runtime_object.cpp:
2984 (JSC::RuntimeObjectImp::RuntimeObjectImp): Removed addRuntimeObject
2985 call, now handled by caller.
2986 (JSC::RuntimeObjectImp::~RuntimeObjectImp): Replaced removeRuntimeObject
2987 call with willDestroyRuntimeObject call; the latter nows calls
2988 removeRuntimeObject.
2989 (JSC::RuntimeObjectImp::invalidate): Added willInvalidateRuntimeObject
2992 * bridge/runtime_object.h: Made invalidate non-virtual.
2994 2009-09-18 Kenneth Rohde Christiansen <kenneth@webkit.org>
2996 Reviewed by Simon Hausmann.
2998 Make PlatformWindow return something else than PlatformWidget
2999 https://bugs.webkit.org/show_bug.cgi?id=29085
3001 Make platformWindow return a PlatformPageClient
3002 (for now typedef'ed to PlatformWidget)
3004 Also, change the name of platformWindow to platformPageClient()
3006 * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
3007 (getPangoLayoutForAtk):
3008 * accessibility/win/AXObjectCacheWin.cpp:
3009 (WebCore::AXObjectCache::postPlatformNotification):
3010 (WebCore::AXObjectCache::handleFocusedUIElementChanged):
3011 * loader/EmptyClients.h:
3012 (WebCore::EmptyChromeClient::platformPageClient):
3014 (WebCore::Chrome::platformPageClient):
3016 * page/ChromeClient.h:
3017 * page/mac/EventHandlerMac.mm:
3018 (WebCore::EventHandler::wheelEvent):
3019 (WebCore::EventHandler::currentPlatformMouseEvent):
3020 (WebCore::EventHandler::sendContextMenuEvent):
3021 (WebCore::EventHandler::eventMayStartDrag):
3022 * platform/HostWindow.h:
3023 * platform/Widget.h:
3024 * platform/gtk/PlatformScreenGtk.cpp:
3025 (WebCore::getVisual):
3026 (WebCore::screenRect):
3027 (WebCore::screenAvailableRect):
3028 * platform/gtk/PopupMenuGtk.cpp:
3029 (WebCore::PopupMenu::show):
3030 * platform/gtk/ScrollViewGtk.cpp:
3031 (WebCore::ScrollView::platformAddChild):
3032 (WebCore::ScrollView::platformRemoveChild):
3033 (WebCore::ScrollView::visibleContentRect):
3034 * platform/gtk/WidgetGtk.cpp:
3035 (WebCore::Widget::setFocus):
3036 (WebCore::Widget::setCursor):
3037 * platform/qt/PlatformScreenQt.cpp:
3038 (WebCore::screenDepth):
3039 (WebCore::screenDepthPerComponent):
3040 (WebCore::screenIsMonochrome):
3041 (WebCore::screenRect):
3042 (WebCore::screenAvailableRect):
3043 * platform/qt/PopupMenuQt.cpp:
3044 (WebCore::PopupMenu::show):
3045 * platform/qt/WidgetQt.cpp:
3046 (WebCore::Widget::setCursor):
3047 * platform/win/PlatformScreenWin.cpp:
3048 (WebCore::monitorInfoForWidget):
3049 * platform/win/PopupMenuWin.cpp:
3050 (WebCore::PopupMenu::show):
3051 (WebCore::PopupMenu::calculatePositionAndSize):
3052 (WebCore::PopupMenu::wndProc):
3053 * platform/wx/RenderThemeWx.cpp:
3054 (WebCore::nativeWindowForRenderObject):
3055 * platform/wx/ScrollbarThemeWx.cpp:
3056 (WebCore::ScrollbarThemeWx::paint):
3057 * plugins/gtk/PluginViewGtk.cpp:
3058 (WebCore::PluginView::getValue):
3059 (WebCore::PluginView::forceRedraw):
3060 (WebCore::PluginView::platformStart):
3061 * plugins/mac/PluginViewMac.cpp:
3062 (WebCore::PluginView::platformStart):
3063 * plugins/qt/PluginViewQt.cpp:
3064 (WebCore::PluginView::handleKeyboardEvent):
3065 (WebCore::PluginView::getValue):
3066 (WebCore::PluginView::platformStart):
3067 * plugins/win/PluginViewWin.cpp:
3068 (WebCore::PluginView::getValue):
3069 (WebCore::PluginView::forceRedraw):
3070 (WebCore::PluginView::platformStart):
3072 2009-09-18 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
3074 Reviewed by Simon Hausmann.
3076 [Qt] Web inspector UI adjustments specific to the Qt platform:
3077 - Hide the close button
3078 - Hide the dock button
3079 - Disable the draggable toolbar
3081 https://bugs.webkit.org/show_bug.cgi?id=29384
3083 * inspector/front-end/inspector.css:
3084 * inspector/front-end/inspector.js:
3085 (WebInspector.toolbarDragStart):
3087 2009-09-18 Joerg Bornemann <joerg.bornemann@nokia.com>
3089 Reviewed by Simon Hausmann.
3091 QtWebKit Windows CE compile fixes
3093 Exclude certain pure-WINCE specific code paths from the Qt build.
3095 * platform/graphics/BitmapImage.h:
3096 * platform/graphics/FontCache.h:
3097 * platform/graphics/MediaPlayer.cpp:
3098 * platform/text/TextEncodingRegistry.cpp:
3099 (WebCore::buildBaseTextCodecMaps):
3100 (WebCore::extendTextCodecMaps):
3101 * plugins/PluginView.cpp:
3102 (WebCore::PluginView::stop): Guard this code block with NETSCAPE_PLUGIN_API as
3103 the corresponding PluginViewWndProc has the same guard in the header file.
3105 2009-09-18 Steve Block <steveblock@google.com>
3107 Reviewed by Dimitri Glazkov.
3109 Geolocation does not correctly handle Infinity for PositionOptions properties.
3110 https://bugs.webkit.org/show_bug.cgi?id=29099
3112 * bindings/js/JSGeolocationCustom.cpp: Modified.
3113 (WebCore::createPositionOptions): Modified. If timeout or maximumAge is positive infinity, applies these values as a special case.
3114 * page/PositionOptions.h: Modified.
3115 (WebCore::PositionOptions::hasMaximumAge): Added. Determines whether the object has a maximum age.
3116 (WebCore::PositionOptions::maximumAge): Modified. Asserts that the object has a maximum age.
3117 (WebCore::PositionOptions::clearMaximumAge): Added. Clears the maximum age.
3118 (WebCore::PositionOptions::setMaximumAge): Modified. Registers that the maximum age has been set.
3119 (WebCore::PositionOptions::PositionOptions): Modified. Registers that the maximum age has been set.
3121 2009-09-17 Sam Weinig <sam@webkit.org>
3123 Reviewed by Adele Peterson.
3125 Fix for https://bugs.webkit.org/show_bug.cgi?id=29276
3126 REGRESSION(r48334): WebKit crashes on file select by drag
3128 Document.elementFromPoint now takes point in client space, not page space.
3130 * page/DragController.cpp:
3131 (WebCore::DragController::tryDocumentDrag):
3132 (WebCore::DragController::concludeEditDrag):
3134 2009-09-17 Albert J. Wong <ajwong@chromium.org>
3136 Reviewed by David Levin.
3138 Reimplement default media UI for Mac Chromium to match the style
3139 of the Windows and Linux versions. Also breaks the dependency
3140 on the internal wk* functions that were previously used to
3141 render the media controller widgets.
3142 https://bugs.webkit.org/show_bug.cgi?id=29161
3144 No media layout tests are currently enabled in Mac Chromium, so
3145 nothing needs rebaselineing, etc.
3147 This is a recommit of r48438 with a compile fix and merges of
3148 recent changes to the file.
3150 * css/mediaControlsChromium.css:
3151 * rendering/RenderThemeChromiumMac.h:
3152 * rendering/RenderThemeChromiumMac.mm:
3153 (WebCore::mediaElementParent):
3154 (WebCore::RenderThemeChromiumMac::extraMediaControlsStyleSheet):
3155 (WebCore::mediaSliderThumbImage):
3156 (WebCore::mediaVolumeSliderThumbImage):
3157 (WebCore::RenderThemeChromiumMac::paintSliderTrack):
3158 (WebCore::RenderThemeChromiumMac::adjustSliderThumbSize):
3159 (WebCore::RenderThemeChromiumMac::paintMediaButtonInternal):
3160 (WebCore::RenderThemeChromiumMac::paintMediaPlayButton):
3161 (WebCore::RenderThemeChromiumMac::paintMediaMuteButton):
3162 (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack):
3163 (WebCore::RenderThemeChromiumMac::paintMediaVolumeSliderTrack):
3164 (WebCore::RenderThemeChromiumMac::paintMediaSliderThumb):
3165 (WebCore::RenderThemeChromiumMac::paintMediaVolumeSliderThumb):
3166 (WebCore::RenderThemeChromiumMac::paintMediaControlsBackground):
3167 * rendering/RenderThemeChromiumSkia.cpp:
3168 (WebCore::RenderThemeChromiumSkia::adjustSliderThumbSize):
3170 2009-09-17 Brian Weinstein <bweinstein@apple.com>
3172 Reviewed by Timothy Hatcher.
3174 The Console scope bar should have a divider between All and the other possible
3175 values (Errors, Warnings, Logs). It will look something like:
3177 All | Errors Warnings Logs.
3179 * inspector/front-end/ConsoleView.js:
3180 (WebInspector.ConsoleView.createDividerElement):
3181 (WebInspector.ConsoleView):
3182 * inspector/front-end/inspector.css:
3184 2009-09-17 Sam Weinig <sam@webkit.org>
3186 Reviewed by Mark Rowe.
3188 Remove additional references to JSVoidCallback which no longer exists.
3190 * DerivedSources.cpp:
3191 * WebCore.vcproj/WebCore.vcproj:
3193 2009-09-17 Sam Weinig <sam@webkit.org>
3195 Reviewed by Brady Eidson.
3197 Remove commented out onhashchange attribute now that it is implemented.
3199 * page/DOMWindow.idl:
3201 2009-09-17 Anders Carlsson <andersca@apple.com>
3203 Reviewed by Oliver Hunt.
3205 <rdar://problem/7007541>
3206 CrashTracer: 4800+ crashes in Safari at com.apple.WebKit • WTF::HashTableIterator...
3208 Make RuntimeObjectImp more robust against m_instance being a null (which can happen if an OOP plug-in
3209 crashes while we're calling into it).
3211 * bridge/runtime_object.cpp:
3212 (JSC::RuntimeObjectImp::RuntimeObjectImp):
3213 (JSC::RuntimeObjectImp::~RuntimeObjectImp):
3214 (JSC::RuntimeObjectImp::invalidate):
3215 (JSC::RuntimeObjectImp::fallbackObjectGetter):
3216 (JSC::RuntimeObjectImp::fieldGetter):
3217 (JSC::RuntimeObjectImp::methodGetter):
3218 (JSC::RuntimeObjectImp::getOwnPropertySlot):
3219 (JSC::RuntimeObjectImp::getOwnPropertyDescriptor):
3220 (JSC::RuntimeObjectImp::put):
3221 (JSC::RuntimeObjectImp::defaultValue):
3222 (JSC::RuntimeObjectImp::getCallData):
3223 (JSC::RuntimeObjectImp::getConstructData):
3224 (JSC::RuntimeObjectImp::getPropertyNames):
3225 * bridge/runtime_object.h:
3226 (JSC::RuntimeObjectImp::getInternalInstance):
3228 2009-09-17 Yury Semikhatsky <yurys@chromium.org>
3230 Reviewed by Timothy Hatcher.
3232 Wrap primitive values (as objects) in InspectorController::wrap.
3234 https://bugs.webkit.org/show_bug.cgi?id=28983
3236 * inspector/InspectorController.cpp:
3237 (WebCore::InspectorController::wrapObject): objects of any type will be wrapped into proxies,
3238 only object proxies will have objectId.
3239 * inspector/front-end/ConsoleView.js:
3240 (WebInspector.ConsoleView.prototype.completions): there is InjectedScript.getCompletionsi
3241 that accepts an expression and returns possible completions. This way we don't need to wrap
3242 and unwrap the completions result into a proxy object.
3243 * inspector/front-end/InjectedScript.js:
3244 (InjectedScript.getCompletions):
3245 (InjectedScript.evaluate):
3246 (InjectedScript._evaluateOn):
3247 (InjectedScript.createProxyObject):
3248 * inspector/front-end/InjectedScriptAccess.js:
3250 2009-09-17 Nate Chapin <japhet@chromium.org>
3252 Reviewed by Dimitri Glazkov.
3254 Wrap PageTransitionEvents properly for V8's use.
3256 https://bugs.webkit.org/show_bug.cgi?id=29340
3258 Fixes Chromium's failures for LayoutTests/fast/events/pageshow-pagehide.html.
3260 * bindings/v8/V8DOMWrapper.cpp:
3261 (WebCore::V8DOMWrapper::convertEventToV8Object): Wrap PageTransitionEvents properly.
3263 2009-09-17 Simon Fraser <simon.fraser@apple.com>
3265 Reviewed by Dave Hyatt.
3267 Hardware-accelerated opacity transition on inline asserts
3268 https://bugs.webkit.org/show_bug.cgi?id=29342
3270 Remove an erroneous toRenderBox() that could be called on a RenderInline; we can just
3271 pass an empty size, because the box size is only required for transform animations.
3273 Test: compositing/transitions/opacity-on-inline.html
3275 * rendering/RenderLayerBacking.cpp:
3276 (WebCore::RenderLayerBacking::startTransition):
3278 2009-09-17 Adam Barth <abarth@webkit.org>
3280 Reviewed by Eric Seidel.
3282 [V8] OwnHandle might get a weak callback after destruction
3283 https://bugs.webkit.org/show_bug.cgi?id=29172
3285 Be sure to clear out weak reference so we don't get a weak callback
3286 after we've destructed ourselves. Also, removed some tricky methods
3287 that had no clients.
3289 * bindings/v8/OwnHandle.h:
3290 (WebCore::OwnHandle::clear):
3292 2009-09-17 Dimitri Glazkov <dglazkov@chromium.org>
3294 Unreviewed, build fix.
3296 [V8] Partial roll out of http://trac.webkit.org/changeset/48455 to
3297 fix crashes that started happening in V8Proxy::getEnteredContext().
3299 * bindings/v8/ScheduledAction.cpp:
3300 (WebCore::ScheduledAction::execute):
3302 2009-09-17 Chris Fleizach <cfleizach@apple.com>
3304 Reviewed by Beth Dakin.
3306 AX: labels of checkboxes should, when hit-tested, return the checkbox
3307 https://bugs.webkit.org/show_bug.cgi?id=29335
3309 When an accessibility hit test is done and it hits the label of a control element,
3310 the control element should be returned instead of nothing, since the label
3311 itself is usually ignored.
3313 Test: accessibility/label-for-control-hittest.html
3315 * accessibility/AccessibilityObject.h:
3316 (WebCore::AccessibilityObject::correspondingControlForLabelElement):
3317 * accessibility/AccessibilityRenderObject.cpp:
3318 (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
3319 (WebCore::AccessibilityRenderObject::doAccessibilityHitTest):
3320 (WebCore::AccessibilityRenderObject::correspondingControlForLabelElement):
3321 * accessibility/AccessibilityRenderObject.h:
3323 2009-09-17 Avi Drissman <avi@chromium.org>
3325 Reviewed by Dimitri Glazkov, build fix.
3327 Change to make RenderThemeChromiumMac compile inside of non PLATFORM(MAC).
3328 https://bugs.webkit.org/show_bug.cgi?id=29243
3330 Covered by existing tests.
3332 * rendering/RenderThemeChromiumMac.mm:
3333 (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack):
3335 2009-09-17 Dimitri Glazkov <dglazkov@chromium.org>
3337 Reviewed by Eric Seidel.
3339 [V8] Accessing properties/methods of an object, created with document.implementation.createDocumentType
3340 creates nodes that have no document (ScriptExecutionContext), which in turn produces NULL-ref crashes.
3341 https://bugs.webkit.org/show_bug.cgi?id=26402
3343 Test: fast/dom/DOMImplementation/detached-doctype.html
3344 fast/dom/doctype-event-listener-crash.html
3346 * bindings/v8/V8DOMWrapper.cpp:
3347 (WebCore::V8DOMWrapper::getEventListener): Added an extra NULL-check.
3349 2009-09-17 Dan Bernstein <mitz@apple.com>
3351 Reviewed by Simon Fraser.
3353 FontDescription.h includes RenderStyleConstants.h, which violates layering
3354 https://bugs.webkit.org/show_bug.cgi?id=29327
3356 * GNUmakefile.am: Added FontSmoothingMode.h.
3357 * WebCore.gypi: Added FontSmoothingMode.h.
3358 * WebCore.vcproj/WebCore.vcproj: Added FontSmoothingMode.h.
3359 * WebCore.xcodeproj/project.pbxproj: Added FontSmoothingMode.h and made
3360 it a private header.
3361 * css/CSSComputedStyleDeclaration.cpp:
3362 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Get the
3363 font smoothing mode via the font description.
3364 * css/CSSPrimitiveValueMappings.h: Include FontSmoothingMode.h
3365 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Updated for the rename
3366 of FontSmoothing to FontSmoothingMode.
3367 (WebCore::CSSPrimitiveValue::operator FontSmoothingMode): Ditto.
3368 * css/CSSStyleSelector.cpp:
3369 (WebCore::CSSStyleSelector::applyProperty): Get the font smoothing mode
3370 via the font description.
3371 * platform/graphics/FontDescription.h: Do not include
3372 RenderStyleConstants.h.
3373 (WebCore::FontDescription::fontSmoothing): Updated for the rename of
3374 FontSmoothing to FontSmoothingMode.
3375 (WebCore::FontDescription::setFontSmoothing): Ditto.
3376 * platform/graphics/FontSmoothingMode.h: Added.
3377 (WebCore::FontSmoothingMode): Moved the FontSmoothing enum from
3378 RenderStyleConstants here and renamed it to this.
3379 * rendering/style/RenderStyle.h:
3380 (WebCore::InheritedFlags::fontSmoothing): Removed this getter, since
3381 this can be accessed via the font description.
3382 * rendering/style/RenderStyleConstants.h: Moved the FontSmoothing enum
3383 from here to FontSmoothingMode.h.
3385 2009-09-17 Kevin Ollivier <kevino@theolliviers.com>
3389 * platform/wx/wxcode/gtk/scrollbar_render.cpp:
3390 (wxGetGdkWindowForDC):
3392 2009-09-16 Simon Fraser <simon.fraser@apple.com>
3394 Reviewed by Dan Bernstein.
3396 Elements appear behind <video> when they should be in front sometimes
3397 https://bugs.webkit.org/show_bug.cgi?id=29314
3399 r45598 added logic that tests for overlap with <video> to determine when to throw
3400 a layer into compositing mode. That logic was incorrect in some cases, and this patch
3401 fixes it. When testing overlap, the layer needs to be composited iff some previous layer
3402 is composited (which adds a rect to the overlay map), and there is overlap.
3404 Test: compositing/geometry/video-opacity-overlay.html
3406 * rendering/RenderLayerCompositor.cpp:
3407 (WebCore::CompositingState::CompositingState):
3408 (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3410 2009-09-17 Avi Drissman <avi@google.com>
3412 Reviewed by Darin Fisher.
3414 Update the Chromium Mac theming files (RenderTheme and Theme) to be
3417 https://bugs.webkit.org/show_bug.cgi?id=29243
3418 http://crbug.com/19604
3420 Covered by existing tests.
3423 * platform/chromium/ThemeChromiumMac.h: Added.
3424 (WebCore::ThemeChromiumMac::ThemeChromiumMac):
3425 (WebCore::ThemeChromiumMac::~ThemeChromiumMac):
3426 (WebCore::ThemeChromiumMac::controlRequiresPreWhiteSpace):
3427 * platform/chromium/ThemeChromiumMac.mm: Added.
3429 (WebCore::platformTheme):
3430 (WebCore::controlSizeForFont):
3431 (WebCore::sizeFromFont):
3432 (WebCore::setControlSize):
3433 (WebCore::updateStates):
3434 (WebCore::inflateRect):
3435 (WebCore::checkboxSizes):
3436 (WebCore::checkboxMargins):
3437 (WebCore::checkboxSize):
3438 (WebCore::checkbox):
3439 (WebCore::paintCheckbox):
3440 (WebCore::radioSizes):
3441 (WebCore::radioMargins):
3442 (WebCore::radioSize):
3444 (WebCore::paintRadio):
3445 (WebCore::buttonSizes):
3446 (WebCore::buttonMargins):
3448 (WebCore::paintButton):
3449 (WebCore::ThemeChromiumMac::baselinePositionAdjustment):
3450 (WebCore::ThemeChromiumMac::controlFont):
3451 (WebCore::ThemeChromiumMac::controlSize):
3452 (WebCore::ThemeChromiumMac::minimumControlSize):
3453 (WebCore::ThemeChromiumMac::controlBorder):
3454 (WebCore::ThemeChromiumMac::controlPadding):
3455 (WebCore::ThemeChromiumMac::inflateControlPaintRect):
3456 (WebCore::ThemeChromiumMac::paint):
3457 * platform/graphics/FloatPoint.h:
3458 * platform/graphics/FloatRect.h:
3459 * platform/graphics/FloatSize.h:
3460 * platform/graphics/IntRect.h:
3461 * rendering/RenderThemeChromiumMac.h:
3462 (WebCore::RenderThemeChromiumMac::supportsControlTints):
3463 (WebCore::RenderThemeChromiumMac::scrollbarControlSizeForPart):
3464 (WebCore::RenderThemeChromiumMac::supportsSelectionForegroundColors):
3465 * rendering/RenderThemeChromiumMac.mm:
3466 (-[WebCoreRenderThemeNotificationObserver systemColorsDidChange:]):
3467 (-[RTCMFlippedView isFlipped]):
3468 (-[RTCMFlippedView currentEditor]):
3470 (WebCore::FlippedView):
3471 (WebCore::RenderTheme::themeForPage):
3472 (WebCore::RenderThemeChromiumMac::platformActiveListBoxSelectionForegroundColor):
3473 (WebCore::RenderThemeChromiumMac::platformInactiveListBoxSelectionForegroundColor):
3474 (WebCore::RenderThemeChromiumMac::platformInactiveListBoxSelectionBackgroundColor):
3475 (WebCore::RenderThemeChromiumMac::systemFont):
3476 (WebCore::convertNSColorToColor):
3477 (WebCore::menuBackgroundColor):
3478 (WebCore::RenderThemeChromiumMac::systemColor):
3479 (WebCore::RenderThemeChromiumMac::isControlStyled):
3480 (WebCore::RenderThemeChromiumMac::adjustRepaintRect):
3481 (WebCore::RenderThemeChromiumMac::inflateRect):
3482 (WebCore::RenderThemeChromiumMac::convertToPaintingRect):
3483 (WebCore::RenderThemeChromiumMac::setFontFromControlSize):
3484 (WebCore::RenderThemeChromiumMac::paintTextField):
3485 (WebCore::RenderThemeChromiumMac::paintCapsLockIndicator):
3486 (WebCore::RenderThemeChromiumMac::paintTextArea):
3487 (WebCore::RenderThemeChromiumMac::paintMenuList):
3488 (WebCore::TopGradientInterpolate):
3489 (WebCore::BottomGradientInterpolate):
3490 (WebCore::MainGradientInterpolate):
3491 (WebCore::TrackGradientInterpolate):
3492 (WebCore::RenderThemeChromiumMac::paintMenuListButtonGradients):
3493 (WebCore::RenderThemeChromiumMac::paintMenuListButton):
3494 (WebCore::RenderThemeChromiumMac::popupInternalPaddingLeft):
3495 (WebCore::RenderThemeChromiumMac::popupInternalPaddingRight):
3496 (WebCore::RenderThemeChromiumMac::popupInternalPaddingTop):
3497 (WebCore::RenderThemeChromiumMac::popupInternalPaddingBottom):
3498 (WebCore::RenderThemeChromiumMac::adjustMenuListButtonStyle):
3499 (WebCore::RenderThemeChromiumMac::adjustSliderTrackStyle):
3500 (WebCore::RenderThemeChromiumMac::adjustSliderThumbStyle):
3501 (WebCore::RenderThemeChromiumMac::paintSliderThumb):
3502 (WebCore::RenderThemeChromiumMac::paintSearchField):
3503 (WebCore::RenderThemeChromiumMac::setSearchCellState):
3504 (WebCore::RenderThemeChromiumMac::adjustSearchFieldStyle):
3505 (WebCore::RenderThemeChromiumMac::paintSearchFieldCancelButton):
3506 (WebCore::RenderThemeChromiumMac::adjustSearchFieldCancelButtonStyle):
3507 (WebCore::RenderThemeChromiumMac::adjustSearchFieldDecorationStyle):
3508 (WebCore::RenderThemeChromiumMac::paintSearchFieldDecoration):
3509 (WebCore::RenderThemeChromiumMac::adjustSearchFieldResultsDecorationStyle):
3510 (WebCore::RenderThemeChromiumMac::paintSearchFieldResultsDecoration):
3511 (WebCore::RenderThemeChromiumMac::adjustSearchFieldResultsButtonStyle):
3512 (WebCore::RenderThemeChromiumMac::paintSearchFieldResultsButton):
3513 (WebCore::mediaControllerTheme):
3514 (WebCore::RenderThemeChromiumMac::adjustSliderThumbSize):
3515 (WebCore::getMediaUIPartStateFlags):
3516 (WebCore::getUnzoomedRectAndAdjustCurrentContext):
3517 (WebCore::RenderThemeChromiumMac::paintMediaFullscreenButton):
3518 (WebCore::RenderThemeChromiumMac::paintMediaMuteButton):
3519 (WebCore::RenderThemeChromiumMac::paintMediaPlayButton):
3520 (WebCore::RenderThemeChromiumMac::paintMediaSeekBackButton):
3521 (WebCore::RenderThemeChromiumMac::paintMediaSeekForwardButton):
3522 (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack):
3523 (WebCore::RenderThemeChromiumMac::paintMediaSliderThumb):
3524 (WebCore::RenderThemeChromiumMac::paintMediaRewindButton):
3525 (WebCore::RenderThemeChromiumMac::paintMediaReturnToRealtimeButton):
3526 (WebCore::RenderThemeChromiumMac::paintMediaControlsBackground):
3527 (WebCore::RenderThemeChromiumMac::paintMediaCurrentTime):
3528 (WebCore::RenderThemeChromiumMac::paintMediaTimeRemaining):
3529 (WebCore::RenderThemeChromiumMac::extraMediaControlsStyleSheet):
3531 2009-09-16 Daniel Bates <dbates@webkit.org>
3533 Reviewed by Darin Adler.
3535 https://bugs.webkit.org/show_bug.cgi?id=29306
3537 Fixes an issue where an attack that contains accented characters can
3538 bypass the XSSAuditor.
3540 XSSAuditor::decodeURL used the wrong length for the input string.
3541 When the input string was decoded, the decoded result was truncated.
3542 Hence, XSSAuditor was comparing the source code of the script to the
3543 truncated input parameters.
3545 Test: http/tests/security/xssAuditor/img-onerror-accented-char.html
3547 * page/XSSAuditor.cpp:
3548 (WebCore::XSSAuditor::decodeURL):
3550 2009-09-16 Brady Eidson <beidson@apple.com>
3552 Reviewed by Sam Weinig.
3554 Explore allowing pages with unload handlers into the Page Cache
3555 https://bugs.webkit.org/show_bug.cgi?id=29021
3557 No new tests. (All previous tests continue to pass)
3559 * loader/FrameLoader.cpp:
3560 (WebCore::FrameLoader::stopLoading): If the document is in the page cache, don't fire the unload event.
3562 2009-09-16 Adam Barth <abarth@webkit.org>
3564 Reviewed by Dimitri Glazkov.
3566 [V8] Teach ScheduledAction::execute about isolated worlds
3567 https://bugs.webkit.org/show_bug.cgi?id=27703
3569 We now save a handle to the original context. We use that handle to
3570 call the timeout in the right context / world.
3572 Tests: http/tests/security/isolatedWorld/window-setTimeout-function.html
3573 http/tests/security/isolatedWorld/window-setTimeout-string.html
3575 * bindings/v8/ScheduledAction.cpp:
3576 (WebCore::ScheduledAction::ScheduledAction):
3577 (WebCore::ScheduledAction::execute):
3578 * bindings/v8/ScheduledAction.h:
3579 (WebCore::ScheduledAction::ScheduledAction):
3580 * bindings/v8/custom/V8DOMWindowCustom.cpp: