1 2009-10-01 Adam Barth <abarth@webkit.org>
3 Reviewed by Darin Adler.
5 Move RedirectScheduler to its own file
6 https://bugs.webkit.org/show_bug.cgi?id=29952
8 This change is purely code motion.
15 * WebCore.vcproj/WebCore.vcproj:
16 * WebCore.xcodeproj/project.pbxproj:
18 * loader/FrameLoader.cpp:
19 * loader/FrameLoader.h:
20 * loader/RedirectScheduler.cpp: Added.
21 (WebCore::ScheduledRedirection::):
22 (WebCore::ScheduledRedirection::ScheduledRedirection):
23 (WebCore::RedirectScheduler::RedirectScheduler):
24 (WebCore::RedirectScheduler::~RedirectScheduler):
25 (WebCore::RedirectScheduler::redirectScheduledDuringLoad):
26 (WebCore::RedirectScheduler::clear):
27 (WebCore::RedirectScheduler::scheduleRedirect):
28 (WebCore::RedirectScheduler::mustLockBackForwardList):
29 (WebCore::RedirectScheduler::scheduleLocationChange):
30 (WebCore::RedirectScheduler::scheduleFormSubmission):
31 (WebCore::RedirectScheduler::scheduleRefresh):
32 (WebCore::RedirectScheduler::locationChangePending):
33 (WebCore::RedirectScheduler::scheduleHistoryNavigation):
34 (WebCore::RedirectScheduler::timerFired):
35 (WebCore::RedirectScheduler::schedule):
36 (WebCore::RedirectScheduler::startTimer):
37 (WebCore::RedirectScheduler::cancel):
38 * loader/RedirectScheduler.h: Added.
40 2009-10-02 Dave MacLachlan <dmaclach@gmail.com>
42 Reviewed by David Levin.
44 Clean up warnings in WebCore/bindings/v8/npruntime.cpp
45 https://bugs.webkit.org/show_bug.cgi?id=29971
47 Gets rid of warnings on gcc about using anonymous namespaces
48 warning: 'StringKeyHashTraits' has a base
49 'WTF::GenericHashTraits<<unnamed>::StringKey>'
50 whose type uses the anonymous namespace
52 warning: 'WTF::PairHashTraits<StringKeyHashTraits,
53 WTF::HashTraits<PrivateIdentifier*> >' has a base
54 'WTF::GenericHashTraits<std::pair<<unnamed>::StringKey,
55 PrivateIdentifier*> >' whose type uses the anonymous namespace
59 * bindings/v8/npruntime.cpp:
61 2009-10-01 Mark Rowe <mrowe@apple.com>
63 Fix the Tiger build. Don't unconditionally enable 3D canvas as it is not supported on Tiger.
65 * Configurations/FeatureDefines.xcconfig:
67 2009-10-01 Chris Marrin <cmarrin@apple.com>
69 Reviewed by Oliver Hunt.
71 Turn on ENABLE_3D_CANVAS in TOT
72 https://bugs.webkit.org/show_bug.cgi?id=29906
74 Fixed a bug found when running tests with flag on
76 * Configurations/FeatureDefines.xcconfig:
78 * bindings/js/JSCanvasArrayBufferConstructor.h:
80 * html/HTMLCanvasElement.cpp:
81 (WebCore::HTMLCanvasElement::getContext):
82 * html/canvas/CanvasArray.cpp:
83 (WebCore::CanvasArray::CanvasArray):
84 * html/canvas/CanvasByteArray.cpp:
85 (WebCore::CanvasByteArray::create):
86 * html/canvas/CanvasFloatArray.cpp:
87 (WebCore::CanvasFloatArray::create):
88 * html/canvas/CanvasIntArray.cpp:
89 (WebCore::CanvasIntArray::create):
90 * html/canvas/CanvasShortArray.cpp:
91 (WebCore::CanvasShortArray::create):
92 * html/canvas/CanvasUnsignedByteArray.cpp:
93 (WebCore::CanvasUnsignedByteArray::create):
94 * html/canvas/CanvasUnsignedIntArray.cpp:
95 (WebCore::CanvasUnsignedIntArray::create):
96 * html/canvas/CanvasUnsignedShortArray.cpp:
97 (WebCore::CanvasUnsignedShortArray::create):
99 (WebCore::Settings::Settings):
100 (WebCore::Settings::setWebGLEnabled):
102 (WebCore::Settings::webGLEnabled):
104 2009-10-01 Beth Dakin <bdakin@apple.com>
106 Reviewed by Dan Bernstein.
108 Fix for <rdar://problem/7264725> Re-add a vendor prefix to box-
111 https://bugs.webkit.org/show_bug.cgi?id=29927
113 * css/CSSComputedStyleDeclaration.cpp:
115 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
117 (WebCore::CSSParser::parseValue):
118 (WebCore::ShadowParseContext::ShadowParseContext):
119 (WebCore::ShadowParseContext::commitValue):
120 (WebCore::ShadowParseContext::commitLength):
121 (WebCore::ShadowParseContext::commitColor):
122 (WebCore::cssPropertyID):
123 * css/CSSPropertyNames.in:
124 * css/CSSStyleSelector.cpp:
125 (WebCore::CSSStyleSelector::applyProperty):
126 * page/animation/AnimationBase.cpp:
127 (WebCore::ensurePropertyMap):
129 2009-10-01 Beth Dakin <bdakin@apple.com>
131 Rubber-stamped by Sam Weinig.
133 At bad merge at some point in the development of my patch must have
134 put TextRenderMode.h in a weird spot in the xcodeproj. Moving it
135 back where it belongs!
137 * WebCore.xcodeproj/project.pbxproj:
139 2009-09-30 Adam Barth <abarth@webkit.org>
141 Reviewed by Darin Adler.
143 Remove FrameLoader::schedule* APIs
144 https://bugs.webkit.org/show_bug.cgi?id=29950
146 Change clients of FrameLoader::schedule* to call redirectScheduler
151 * bindings/js/JSDOMWindowCustom.cpp:
152 (WebCore::JSDOMWindow::setLocation):
153 (WebCore::createWindow):
154 (WebCore::JSDOMWindow::open):
155 * bindings/js/JSDocumentCustom.cpp:
156 (WebCore::JSDocument::setLocation):
157 * bindings/js/JSLocationCustom.cpp:
158 (WebCore::navigateIfAllowed):
159 (WebCore::JSLocation::reload):
160 * bindings/v8/V8Utilities.cpp:
161 (WebCore::navigateIfAllowed):
162 * bindings/v8/custom/V8DOMWindowCustom.cpp:
163 (WebCore::createWindow):
164 (WebCore::CALLBACK_FUNC_DECL):
165 * bindings/v8/custom/V8LocationCustom.cpp:
166 (WebCore::CALLBACK_FUNC_DECL):
168 (WebCore::Document::implicitClose):
169 (WebCore::Document::processHttpEquiv):
170 * html/HTMLTokenizer.cpp:
171 (WebCore::HTMLTokenizer::write):
172 * loader/FrameLoader.cpp:
173 (WebCore::FrameLoader::requestFrame):
174 (WebCore::FrameLoader::submitForm):
175 (WebCore::FrameLoader::receivedFirstData):
176 * loader/FrameLoader.h:
177 * loader/appcache/ApplicationCacheGroup.cpp:
178 (WebCore::ApplicationCacheGroup::selectCache):
180 (WebCore::History::back):
181 (WebCore::History::forward):
182 (WebCore::History::go):
184 2009-10-01 Beth Dakin <bdakin@apple.com>
186 Just removing a comment I accidentally committed earlier.
188 * platform/graphics/mac/SimpleFontDataMac.mm:
189 (WebCore::SimpleFontData::getCFStringAttributes):
191 2009-09-30 Jeremy Orlow <jorlow@chromium.org>
193 Reviewed by Darin Adler.
195 Clean up use of const and mutable in StorageMap
196 https://bugs.webkit.org/show_bug.cgi?id=29933
198 What's the point of having every single member variable be mutable and nearly
199 every method be const? Let's clean it up.
201 * storage/StorageMap.cpp:
202 (WebCore::StorageMap::setIteratorToIndex):
203 (WebCore::StorageMap::key):
204 (WebCore::StorageMap::importItem):
205 * storage/StorageMap.h:
207 2009-10-01 Beth Dakin <bdakin@apple.com>
209 Reviewed by Dave Hyatt.
211 Fix for <rdar://problem/6934421> Support CSS for Text Kerning and
214 https://bugs.webkit.org/show_bug.cgi?id=6136
216 This patch makes the SVG CSS property text-rendering work with any
217 HTML, much like it does in Firefox. It accepts four possible input
218 values: auto, optimizeSpeed, optimizeLegibility, and
219 geometricPrecision. Right now, in this implementation, here is what
220 those values correspond to:
222 auto = optimizeSpeed = what we normally when the value's not set
223 optimizeLegibility = geometricPrecision = ligatures + kerning
225 Add new file TextRenderingMode.h to the project files.
226 * WebCore.vcproj/WebCore.vcproj:
227 * WebCore.xcodeproj/project.pbxproj:
229 CSS support for the new CSSPropertyTextRendering
230 * css/CSSComputedStyleDeclaration.cpp:
232 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
234 (WebCore::CSSParser::parseValue):
235 * css/CSSPrimitiveValueMappings.h:
236 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
237 (WebCore::CSSPrimitiveValue::operator TextRenderingMode):
238 * css/CSSPropertyNames.in:
239 * css/CSSStyleSelector.cpp:
240 (WebCore::CSSStyleSelector::applyProperty):
241 * css/CSSValueKeywords.in:
243 All the old SVG CSS support for this property can go away. When
244 it's used in SVG, it will just fall into the normal HTML case.
245 * css/SVGCSSComputedStyleDeclaration.cpp:
246 (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue):
247 * css/SVGCSSParser.cpp:
248 (WebCore::CSSParser::parseSVGValue):
249 * css/SVGCSSPropertyNames.in:
250 * css/SVGCSSStyleSelector.cpp:
251 (WebCore::CSSStyleSelector::applySVGProperty):
252 * css/SVGCSSValueKeywords.in:
254 FontDescription stores the m_textRendering bit.
255 * platform/graphics/FontDescription.h:
256 (WebCore::FontDescription::FontDescription):
257 (WebCore::FontDescription::textRenderingMode):
258 (WebCore::FontDescription::setTextRenderingMode):
259 (WebCore::FontDescription::operator==):
261 We want to fall into the complex text rendering code path if
262 kerning and ligatures have been enabled with this property.
263 * platform/graphics/FontFastPath.cpp:
264 (WebCore::Font::canUseGlyphCache):
266 Now takes a TextRenderingMode as a parameter.
267 * platform/graphics/SimpleFontData.h:
269 New header for the enum.
270 * platform/graphics/TextRenderingMode.h: Added.
273 getCFStringAttributes() now takes a TextRenderingMode as an
275 * platform/graphics/mac/CoreTextController.cpp:
276 (WebCore::CoreTextController::collectCoreTextRunsForCharacters):
278 Enable kerning and ligatures whenever the TextRenderingMode is
279 OptimizeLegibility or GeometricPrecision
280 * platform/graphics/mac/FontMacATSUI.mm:
281 (WebCore::disableLigatures):
282 (WebCore::initializeATSUStyle):
283 (WebCore::ATSULayoutParameters::initialize):
284 * platform/graphics/mac/SimpleFontDataMac.mm:
285 (WebCore::SimpleFontData::getCFStringAttributes):
287 More SVG CSS stuff that isn't needed anymore since SVG will use the
288 new HTML CSS implementation.
289 * rendering/style/SVGRenderStyle.h:
290 (WebCore::SVGRenderStyle::InheritedFlags::operator==):
291 (WebCore::SVGRenderStyle::setBitDefaults):
292 * rendering/style/SVGRenderStyleDefs.h:
294 2009-10-01 Yury Semikhatsky <yurys@chromium.org>
296 Reviewed by Timothy Hatcher.
298 Use isClosure property of scope proxy to decide whether the
301 https://bugs.webkit.org/show_bug.cgi?id=29965
303 * inspector/front-end/ScopeChainSidebarPane.js:
304 (WebInspector.ScopeChainSidebarPane.prototype.update):
306 2009-10-01 Simon Fraser <simon.fraser@apple.com>
308 Reviewed by Dave Hyatt.
310 Odd color transitions on anchors with transition-property: all
311 https://bugs.webkit.org/show_bug.cgi?id=29911
313 When transitioning maybe-invalid colors, if the source and destination
314 color are both invalid, then don't animate.
316 This fixes an issue where a child element of an element running a color
317 transition, with -webkit-transition-property:all, would show a color change.
318 This happened because the "maybe invalid color" logic copied the color style
319 into -webkit-text-fill-color for both endpoints, causing -webkit-text-fill-color
320 to animate while the transition ran, and to then to disappear when the transition
323 Test: transitions/color-transition-all.html
325 * page/animation/AnimationBase.cpp:
326 (WebCore::PropertyWrapperMaybeInvalidColor::equals):
327 (WebCore::PropertyWrapperMaybeInvalidColor::blend):
329 2009-10-01 Victor Wang <victorw@chromium.org>
331 Reviewed by Oliver Hunt.
333 Allow dragging a node who has child nodes.
335 https://bugs.webkit.org/show_bug.cgi?id=28632
337 Test: fast/events/drag-parent-node.html
339 * page/EventHandler.cpp:
340 (WebCore::EventHandler::shouldDragAutoNode):
342 2009-10-01 Philippe Normand <pnormand@igalia.com>
344 Reviewed by Gustavo Noronha.
346 [GTK] media player: better mute support
347 https://bugs.webkit.org/show_bug.cgi?id=29960
349 Handle volume and mute state with the two corresponding properties
352 * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
353 (WebCore::MediaPlayerPrivate::setMuted):
354 (WebCore::MediaPlayerPrivate::setVolume):
356 2009-10-01 Philippe Normand <pnormand@igalia.com>
358 Reviewed by Gustavo Noronha.
360 [GTK] video sink pad template colorspace is wrong
361 https://bugs.webkit.org/show_bug.cgi?id=29953
363 Set sink pad template colorspace depending on byte order.
365 * platform/graphics/gtk/VideoSinkGStreamer.cpp:
366 (webkit_video_sink_idle_func):
368 2009-10-01 Vitaly Repeshko <vitalyr@chromium.org>
370 Reviewed by Dimitri Glazkov.
372 [V8] Refactored V8 event listeners:
373 (This change should fix http://crbug.com/21079 and
374 https://bugs.webkit.org/show_bug.cgi?id=29093.)
375 o All listeners use weak handles to JS objects to avoid creating
376 cycles and leaking memory.
377 o "Object" variants of listeners removed.
378 o All event accessor callbacks are generated.
379 o Custom event accessors removed.
380 o All wrappers have hidden dependencies on their listeners to
381 prevent listeners from being collected.
382 o All variats of getEventListener function grouped in V8DOMWrapper.
383 o Pointers to C++ EventListener wrappers are stored in JS objects
384 instead of event listener lists.
385 https://bugs.webkit.org/show_bug.cgi?id=29825
387 * WebCore.gypi: Removed "Object" listeners.
388 * bindings/scripts/CodeGeneratorV8.pm: Now handles event accessors.
389 * bindings/v8/DOMObjectsInclude.h:
391 V8AbstractEventListener manages weak JS handle:
392 * bindings/v8/V8AbstractEventListener.cpp:
393 (WebCore::weakEventListenerCallback):
394 (WebCore::V8AbstractEventListener::V8AbstractEventListener):
395 (WebCore::V8AbstractEventListener::~V8AbstractEventListener):
396 (WebCore::V8AbstractEventListener::handleEvent):
397 (WebCore::V8AbstractEventListener::disposeListenerObject):
398 (WebCore::V8AbstractEventListener::setListenerObject):
399 * bindings/v8/V8AbstractEventListener.h:
400 (WebCore::V8AbstractEventListener::cast):
401 (WebCore::V8AbstractEventListener::isLazy):
402 (WebCore::V8AbstractEventListener::getListenerObject):
403 (WebCore::V8AbstractEventListener::getExistingListenerObject):
404 (WebCore::V8AbstractEventListener::hasExistingListenerObject):
405 (WebCore::V8AbstractEventListener::disconnectFrame):
406 (WebCore::V8AbstractEventListener::disconnected):
407 (WebCore::V8AbstractEventListener::prepareListenerObject):
408 (WebCore::V8AbstractEventListener::lineNumber):
409 (WebCore::V8AbstractEventListener::virtualisAttribute):
411 Grouped getEventListener functions:
412 * bindings/v8/V8DOMWrapper.cpp:
413 (WebCore::V8DOMWrapper::getTemplate):
414 (WebCore::V8DOMWrapper::getEventListener):
415 * bindings/v8/V8DOMWrapper.h:
417 Removed most event listener objects bookkeeping:
418 * bindings/v8/V8EventListenerList.cpp:
419 * bindings/v8/V8EventListenerList.h:
420 (WebCore::V8EventListenerList::findWrapper):
421 (WebCore::V8EventListenerList::clearWrapper):
422 (WebCore::V8EventListenerList::doFindWrapper):
423 (WebCore::V8EventListenerList::getHiddenProperty):
424 (WebCore::V8EventListenerList::findOrCreateWrapper):
426 Added hidden properties for storing EventListener wrappers:
427 * bindings/v8/V8HiddenPropertyName.cpp:
428 (WebCore::V8HiddenPropertyName::listener):
429 (WebCore::V8HiddenPropertyName::attributeListener):
430 * bindings/v8/V8HiddenPropertyName.h:
432 * bindings/v8/V8LazyEventListener.cpp:
433 (WebCore::V8LazyEventListener::V8LazyEventListener):
434 (WebCore::V8LazyEventListener::callListenerFunction):
435 (WebCore::V8LazyEventListener::prepareListenerObject):
436 * bindings/v8/V8LazyEventListener.h:
437 (WebCore::V8LazyEventListener::isLazy):
438 * bindings/v8/V8ObjectEventListener.cpp: Removed.
439 * bindings/v8/V8ObjectEventListener.h: Removed.
440 * bindings/v8/V8Proxy.cpp:
441 (WebCore::V8Proxy::disconnectFrame):
442 (WebCore::V8Proxy::disconnectEventListeners):
443 * bindings/v8/V8Proxy.h:
444 * bindings/v8/V8WorkerContextEventListener.cpp:
445 (WebCore::V8WorkerContextEventListener::reportError):
446 (WebCore::V8WorkerContextEventListener::getReceiverObject):
447 * bindings/v8/V8WorkerContextEventListener.h:
448 * bindings/v8/V8WorkerContextObjectEventListener.cpp: Removed.
449 * bindings/v8/V8WorkerContextObjectEventListener.h: Removed.
450 * bindings/v8/WorkerContextExecutionProxy.cpp:
451 (WebCore::WorkerContextExecutionProxy::dispose):
452 (WebCore::WorkerContextExecutionProxy::initContextIfNeeded):
453 (WebCore::WorkerContextExecutionProxy::findOrCreateEventListener):
454 * bindings/v8/WorkerContextExecutionProxy.h:
455 * bindings/v8/custom/V8AbstractWorkerCustom.cpp:
456 (WebCore::CALLBACK_FUNC_DECL):
457 * bindings/v8/custom/V8CustomBinding.h:
458 * bindings/v8/custom/V8CustomEventListener.cpp:
459 (WebCore::V8EventListener::V8EventListener):
460 (WebCore::V8EventListener::getListenerFunction):
461 (WebCore::V8EventListener::callListenerFunction):
462 * bindings/v8/custom/V8CustomEventListener.h:
463 * bindings/v8/custom/V8DOMApplicationCacheCustom.cpp:
464 (WebCore::CALLBACK_FUNC_DECL):
465 * bindings/v8/custom/V8DOMWindowCustom.cpp:
466 (WebCore::CALLBACK_FUNC_DECL):
467 * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
468 * bindings/v8/custom/V8MessagePortCustom.cpp:
469 (WebCore::getEventListener):
470 (WebCore::CALLBACK_FUNC_DECL):
471 * bindings/v8/custom/V8NodeCustom.cpp:
472 (WebCore::CALLBACK_FUNC_DECL):
473 * bindings/v8/custom/V8NotificationCenterCustom.cpp:
474 (WebCore::CALLBACK_FUNC_DECL):
475 * bindings/v8/custom/V8SVGElementInstanceCustom.cpp:
476 (WebCore::CALLBACK_FUNC_DECL):
477 * bindings/v8/custom/V8WebSocketCustom.cpp:
478 * bindings/v8/custom/V8WorkerContextCustom.cpp:
479 (WebCore::CALLBACK_FUNC_DECL):
480 * bindings/v8/custom/V8WorkerCustom.cpp:
481 * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
482 * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
483 (WebCore::CALLBACK_FUNC_DECL):
484 * bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp:
486 2009-10-01 Alexis Menard <alexis.menard@nokia.com>
488 Reviewed by Tor Arne Vestbø.
490 Rename QWebGraphicsItem to QGraphicsWebView
494 2009-10-01 Dumitru Daniliuc <dumi@chromium.org>
496 Reviewed by Dimitri Glazkov.
498 Read-only transactions do not change file sizes and therefore
499 should not trigger quota updates.
501 https://bugs.webkit.org/show_bug.cgi?id=29945
503 * storage/SQLTransaction.cpp:
504 (WebCore::SQLTransaction::openTransactionAndPreflight):
505 (WebCore::SQLTransaction::runStatements):
507 2009-09-30 Timothy Hatcher <timothy@apple.com>
509 Fix list box scrolling by correctly overriding the scroll()
510 function on RenderBox.
512 <rdar://problem/7255440> REGRESSION (r48683): Mousewheel scrolling
513 of listboxes is broken (29756)
515 Reviewed by Dan Bernstein.
517 * rendering/RenderListBox.cpp:
518 (WebCore::RenderListBox::scroll):
519 * rendering/RenderListBox.h:
520 * rendering/RenderTextControlSingleLine.cpp:
521 (WebCore::RenderTextControlSingleLine::scroll):
522 * rendering/RenderTextControlSingleLine.h:
524 2009-10-01 Yury Semikhatsky <yurys@chromium.org>
526 Reviewed by Timothy Hatcher.
528 Make a copy of listeners array before dispatching an event in
529 WebInspector.Object.prototype.dispatchEventToListeners. Otherwise if current
530 listener removes itself from the array next listener will be skipped.
532 https://bugs.webkit.org/show_bug.cgi?id=29920
534 * inspector/front-end/Object.js:
535 (WebInspector.Object.prototype.dispatchEventToListeners): make a copy of listeners array before dispatching an event
537 2009-10-01 Martin Robinson <martin.james.robinson@gmail.com>
539 Reviewed by Xan Lopez.
541 [GTK] GtkIMContext filtering interferes with DOM key events
542 https://bugs.webkit.org/show_bug.cgi?id=28733
544 Ensure that keyboard events filtered by the GtkIMContext still create
545 the proper DOM events.
547 No tests added. Instead previously skipped tests have been enabled.
549 * platform/gtk/KeyEventGtk.cpp:
550 (WebCore::keyIdentifierForGdkKeyCode):
551 (WebCore::singleCharacterString):
553 2009-10-01 Philippe Normand <pnormand@igalia.com>
555 Reviewed by Xan Lopez.
557 [GTK] data: uri support in media player
558 https://bugs.webkit.org/show_bug.cgi?id=29842
560 New GStreamer element to handle data: uris. For now only base64
561 encoded data is supported. Decoded data is handed over to
565 * platform/graphics/gtk/DataSourceGStreamer.cpp: Added.
567 (webkit_data_src_base_init):
568 (webkit_data_src_class_init):
569 (webkit_data_src_reset):
570 (webkit_data_src_init):
571 (webkit_data_src_finalize):
572 (webkit_data_src_uri_get_type):
573 (webkit_data_src_uri_get_protocols):
574 (webkit_data_src_uri_get_uri):
575 (webkit_data_src_uri_set_uri):
576 (webkit_data_src_uri_handler_init):
577 * platform/graphics/gtk/DataSourceGStreamer.h: Added.
578 * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
579 (WebCore::do_gst_init):
580 (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
581 (WebCore::MediaPlayerPrivate::mimeTypeCache):
583 2009-09-30 Daniel Bates <dbates@webkit.org>
585 Reviewed by Adam Barth.
587 https://bugs.webkit.org/show_bug.cgi?id=29944
589 Reduces false positives in the XSSAuditor by explicitly allowing requests
590 that do not contain illegal URI characters.
592 As a side effect of this change, the tests property-inject.html,
593 property-escape-noquotes.html, and property-escape-noquotes-tab-slash-chars.html
594 fail because these attacks do not contain any illegal URI characters and
595 thus are now allowed by the XSSAuditor, where previously they weren't. A future
596 change may reinstate this functionality.
598 Tests: http/tests/security/xssAuditor/script-tag-safe2.html
599 http/tests/security/xssAuditor/script-tag-safe3.html
601 * page/XSSAuditor.cpp:
602 (WebCore::isIllegalURICharacter): Added method.
603 (WebCore::XSSAuditor::canEvaluate):
604 (WebCore::XSSAuditor::canCreateInlineEventListener):
605 (WebCore::XSSAuditor::findInRequest): Added parameter
606 allowRequestIfNoIllegalURICharacters.
609 2009-09-30 Oliver Hunt <oliver@apple.com>
611 Reviewed by Maciej Stachowiak.
613 reproducible freeze and crash on closing form popup at bosch-home.nl
614 https://bugs.webkit.org/show_bug.cgi?id=28948
616 showModalDialog calls getDirect on what is actually a window shell,
617 so ends up not getting a value (since no value can ever be placed
618 directly on the shell), which leads to incorrect behaviour.
620 We use a manual test rather than automatic as it was not
621 possible to get a modal run loop to work inside DRT.
623 * bindings/js/JSDOMWindowCustom.cpp:
624 (WebCore::JSDOMWindow::showModalDialog):
625 * manual-tests/showModalDialog-returnValue.html: manual testcase.
627 2009-09-30 Kent Tamura <tkent@chromium.org>
629 Reviewed by Darin Adler.
631 Adds ValidityState.tooLong support for <input> and <textarea>.
633 Introduces tooLong() in HTMLFormControlElement and it always returns false.
634 HTMLInputElement and HTMLTextAreaElement overrides it and checks the text
635 length and maxLength. tooLong() should work only for `dirty' values.
636 So, introduces m_isDirty flag for HTMLTextAreaElement, and
637 !m_data.value().isNull() works as a dirty flag for HTMLInputElement.
639 Renames parameter names of setMaxLength().
641 https://bugs.webkit.org/show_bug.cgi?id=27454
643 Tests: fast/forms/ValidityState-tooLong-input.html
644 fast/forms/ValidityState-tooLong-textarea.html
646 * html/HTMLFormControlElement.h:
647 (WebCore::HTMLFormControlElement::tooLong):
648 * html/HTMLInputElement.cpp:
649 (WebCore::HTMLInputElement::tooLong):
650 (WebCore::HTMLInputElement::setMaxLength):
651 * html/HTMLInputElement.h:
652 * html/HTMLTextAreaElement.cpp:
653 (WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
654 (WebCore::HTMLTextAreaElement::reset):
655 (WebCore::HTMLTextAreaElement::updateValue):
656 (WebCore::HTMLTextAreaElement::setMaxLength):
657 (WebCore::HTMLTextAreaElement::tooLong):
658 * html/HTMLTextAreaElement.h:
659 * html/ValidityState.h:
660 (WebCore::ValidityState::tooLong):
662 2009-09-30 Adam Barth <abarth@webkit.org>
664 Reviewed by Maciej Stachowiak.
666 Factor RedirectScheduler out of FrameLoader
667 https://bugs.webkit.org/show_bug.cgi?id=29948
669 This change introduces a new sub-object of Frame, redirectScheduler.
670 The redirectScheduler is responsible for scheduling redirects.
672 This change leaves the code for the redirectScheduler in
673 FrameLoader.cpp. A future change will move the class into its own
676 No behavior change (hopefully!).
678 * loader/FrameLoader.cpp:
679 (WebCore::RedirectScheduler::RedirectScheduler):
680 (WebCore::RedirectScheduler::~RedirectScheduler):
681 (WebCore::RedirectScheduler::redirectScheduledDuringLoad):
682 (WebCore::RedirectScheduler::clear):
683 (WebCore::FrameLoader::FrameLoader):
684 (WebCore::FrameLoader::setDefersLoading):
685 (WebCore::FrameLoader::stopLoading):
686 (WebCore::FrameLoader::didOpenURL):
687 (WebCore::FrameLoader::didExplicitOpen):
688 (WebCore::FrameLoader::cancelAndClear):
689 (WebCore::FrameLoader::clear):
690 (WebCore::FrameLoader::checkCompleted):
691 (WebCore::FrameLoader::isScheduledLocationChangePending):
692 (WebCore::FrameLoader::scheduleHTTPRedirection):
693 (WebCore::RedirectScheduler::scheduleRedirect):
694 (WebCore::RedirectScheduler::mustLockBackForwardList):
695 (WebCore::FrameLoader::scheduleLocationChange):
696 (WebCore::RedirectScheduler::scheduleLocationChange):
697 (WebCore::FrameLoader::scheduleFormSubmission):
698 (WebCore::RedirectScheduler::scheduleFormSubmission):
699 (WebCore::FrameLoader::scheduleRefresh):
700 (WebCore::RedirectScheduler::scheduleRefresh):
701 (WebCore::RedirectScheduler::locationChangePending):
702 (WebCore::FrameLoader::scheduleHistoryNavigation):
703 (WebCore::RedirectScheduler::scheduleHistoryNavigation):
704 (WebCore::RedirectScheduler::timerFired):
705 (WebCore::FrameLoader::provisionalLoadStarted):
706 (WebCore::RedirectScheduler::schedule):
707 (WebCore::RedirectScheduler::startTimer):
708 (WebCore::RedirectScheduler::cancel):
709 (WebCore::FrameLoader::completed):
710 (WebCore::FrameLoader::open):
711 * loader/FrameLoader.h:
712 (WebCore::FrameLoader::committedFirstRealDocumentLoad):
714 (WebCore::Frame::Frame):
715 (WebCore::Frame::redirectScheduler):
718 2009-09-30 Maciej Stachowiak <mjs@apple.com>
720 Build fix, not reviewed.
722 More Windows build fixes for https://bugs.webkit.org/show_bug.cgi?id=29943
724 * platform/network/cf/ResourceHandleCFNet.cpp:
725 (WebCore::willSendRequest):
727 2009-09-30 Maciej Stachowiak <mjs@apple.com>
729 Build fix, not reviewed.
731 Fix windows build for fix for https://bugs.webkit.org/show_bug.cgi?id=29943
733 * platform/network/cf/ResourceHandleCFNet.cpp:
734 (WebCore::willSendRequest):
736 2009-09-30 Dimitri Glazkov <dglazkov@chromium.org>
738 Reviewed by Darin Fisher.
740 [V8] HTMLAudioElement, HTMLImageElement, and HTMLOptionElement are constructable, but they shouldn't be.
741 Only Audio, Image, and Option should be constructable.
742 https://bugs.webkit.org/show_bug.cgi?id=29940
744 Test: fast/dom/dom-constructor.html
746 * WebCore.gypi: Added new files to project.
747 * bindings/scripts/CodeGeneratorV8.pm: Modified to generate custom constructors.
748 * bindings/v8/V8DOMWrapper.cpp:
749 (WebCore::V8DOMWrapper::getTemplate): Removed handling of HTMLImageElement, HTMLOptionElement
750 and HTMLAudioElement construction.
751 * bindings/v8/V8HTMLAudioElementConstructor.h: Added.
752 * bindings/v8/V8HTMLImageElementConstructor.h: Added.
753 * bindings/v8/V8HTMLOptionElementConstructor.h: Added.
754 * bindings/v8/V8Index.cpp: Added new headers.
755 * bindings/v8/V8Index.h: Added Audio, Image and Option decls.
756 * bindings/v8/custom/V8CustomBinding.h: Ditto.
757 * bindings/v8/custom/V8DOMWindowCustom.cpp:
758 (WebCore::ACCESSOR_GETTER): Added custom constructors.
759 * bindings/v8/custom/V8HTMLAudioElementConstructor.cpp:
760 (WebCore::V8HTMLImageElementConstructor::GetTemplate): Added custom template creator.
761 * bindings/v8/custom/V8HTMLOptionElementConstructor.cpp:
762 (WebCore::V8HTMLOptionElementConstructor::GetTemplate): Ditto.
763 * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
764 (WebCore::V8HTMLImageElementConstructor::GetTemplate): Ditto.
766 2009-09-30 Maciej Stachowiak <mjs@apple.com>
768 Reviewed by Brady Eidson.
770 307 redirects should pass along http body and Content-Type header
771 https://bugs.webkit.org/show_bug.cgi?id=29943
774 <rdar://problem/3802660> SAP: 307 (Temporary Redirect) responses should use POST, not GET
776 Test: http/tests/loading/resources/redirect-methods-result.php
778 * platform/network/cf/ResourceHandleCFNet.cpp:
779 (WebCore::willSendRequest): Pass along http body and Content-Type header.
780 * platform/network/mac/ResourceHandleMac.mm:
781 (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]): ditto
783 2009-09-30 Geoffrey Garen <ggaren@apple.com>
785 Reviewed by Mark Rowe.
787 Fixed https://bugs.webkit.org/show_bug.cgi?id=29941
788 REGRESSION (r48882-r48888): Many memory leaks on SnowLeopard leaks bot
790 Forgot to implement a destructor for JSDOMWindowBaseData, so it was
791 leaking its RefPtr data member.
793 * bindings/js/JSDOMWindowBase.cpp:
794 (WebCore::JSDOMWindowBase::destroyJSDOMWindowBaseData):
795 * bindings/js/JSDOMWindowBase.h:
796 (WebCore::JSDOMWindowBase::JSDOMWindowBaseData::JSDOMWindowBaseData::JSDOMWindowBaseData):
798 2009-09-30 Dave Hyatt <hyatt@apple.com>
800 Reviewed by Tim Hatcher.
802 Make sure the removal of user stylesheets results in all of the WebViews being updated to
805 * page/PageGroup.cpp:
806 (WebCore::PageGroup::removeUserContentWithURLForWorld):
807 (WebCore::PageGroup::removeUserContentForWorld):
809 2009-09-30 Dan Bernstein <mitz@apple.com>
811 Reviewed by Sam Weinig.
813 REGRESSION(r47440): drop down menus at americanexpress.com disappear on mouse out
814 https://bugs.webkit.org/show_bug.cgi?id=29209
816 Test: fast/inline/relative-positioned-overflow.html
818 * rendering/InlineFlowBox.cpp:
819 (WebCore::InlineFlowBox::computeVerticalOverflow): Add self-painting
820 inlines to overflow to ensure that they are included in hit-testing.
822 2009-09-30 Simon Fraser <simon.fraser@apple.com>
824 Reviewed by Mark Rowe.
826 transforms/3d tests are not run in Release builds
827 https://bugs.webkit.org/show_bug.cgi?id=29827
829 Make sure we export the WebCoreHas3DRendering symbol in Release builds,
830 because this symbols is used by run-webkit-tests (via 'nm') to detect whether
831 WebCore was built with ENABLE_3D_RENDERING turned on.
833 * DerivedSources.make:
834 * WebCore.3DRendering.exp: Added.
835 * WebCore.xcodeproj/project.pbxproj:
837 2009-09-30 Jeremy Orlow <jorlow@chromium.org>
839 Build fix for QT. Didn't know WebCore.pro existed.
843 2009-09-30 Dave Hyatt <hyatt@apple.com>
845 Reviewed by Adam Roben.
847 Add a method for removal of user scripts and stylesheets by URL from a specific world.
849 * page/PageGroup.cpp:
850 (WebCore::PageGroup::removeUserContentURLForWorld):
853 2009-09-30 Chris Hawk <hawk@chromium.org>
855 Reviewed by Dimitri Glazkov.
857 Fix for conditionals in the WebCore gyp file, which contained two separate
858 'conditions' values for the webcore target. The first entry was ignored,
859 resulting in some missine defines.
860 https://bugs.webkit.org/show_bug.cgi?id=29907
862 * WebCore.gyp/WebCore.gyp:
864 2009-09-21 Jeremy Orlow <jorlow@chromium.org>
866 Reviewed by Adam Barth.
868 DOM Storage needs to be more careful about where "ThreadSafe" objects are destroyed.
869 https://bugs.webkit.org/show_bug.cgi?id=29265
871 DOM Storage needs to be more careful about where "ThreadSafe" objects are
872 destroyed. With the current code, there actually isn't a race condition, but
873 it sure would be easy for someone to introduce one. A bunch of
874 ThreadSafeShared objects have RefPtrs to objects that are NOT ThreadSafeShared
875 objects. If it were possible any of these objects' destructors to be fired off
876 the main thread, then the you'd have a race condition. The code should be more
877 clear and self-documenting about how things related to each other.
879 Since the lifetime of a LocalStorageTask is bounded by the LocalStorageThread
880 which is bounded by the StorageSyncManager, StorageAreaImpl, and
881 StorageAreaSync, there's no reason for LocalStorageTask to store anything other
882 than pointers. By breaking this dependency, we can eliminate the risk.
884 Note that we _could_ have LocalStorageThread's task queue just store
885 LocalStorageTask*'s rather than RefPtr<LocalStorageTask>s but then we'd need to
886 manually take care of deleting. It'd probably also be possible to change
887 LocalStorageThread around so that it needn't hold onto a reference of itself
888 and have a more deterministic shutdown, but my initial attempts to do so
889 failed, and I decided it wasn't worth changing. The queue is killed before
890 hand, so the thread is 100% impotent before the main thread continues anyway.
892 The constructors and destructors of StorageSyncManager, StorageAreaImpl, and
893 StorageAreaSync now have ASSERTs to verify they're running on the main thread.
894 I'm fairly positive that it'd be impossible to hit these asserts and the fact
895 that these classes are no longer ThreadSafeShared should make it clear how
896 they're meant to be used, but I think it's worth it to be extra sure. Of
897 course, ideally, we'd have such an assert every time a ref is incremented or
900 Behavior should be unchanged and this is just an internal code cleanup, so no
903 * storage/LocalStorageTask.cpp:
904 (WebCore::LocalStorageTask::LocalStorageTask):
905 (WebCore::LocalStorageTask::performTask):
906 * storage/LocalStorageTask.h:
907 (WebCore::LocalStorageTask::createImport):
908 (WebCore::LocalStorageTask::createSync):
909 (WebCore::LocalStorageTask::createTerminate):
910 * storage/LocalStorageThread.cpp:
911 (WebCore::LocalStorageThread::scheduleImport):
912 (WebCore::LocalStorageThread::scheduleSync):
913 * storage/LocalStorageThread.h:
914 * storage/StorageArea.h:
915 * storage/StorageAreaImpl.cpp:
916 (WebCore::StorageAreaImpl::~StorageAreaImpl):
917 (WebCore::StorageAreaImpl::StorageAreaImpl):
918 * storage/StorageAreaSync.cpp:
919 (WebCore::StorageAreaSync::StorageAreaSync):
920 (WebCore::StorageAreaSync::~StorageAreaSync):
921 * storage/StorageSyncManager.cpp:
922 (WebCore::StorageSyncManager::StorageSyncManager):
923 (WebCore::StorageSyncManager::~StorageSyncManager):
924 (WebCore::StorageSyncManager::scheduleImport):
925 (WebCore::StorageSyncManager::scheduleSync):
926 * storage/StorageSyncManager.h:
928 2009-09-28 Jeremy Orlow <jorlow@chromium.org>
930 Reviewed by Darin Fisher.
932 Chromium needs to be able to override the way storage events are delivered
933 https://bugs.webkit.org/show_bug.cgi?id=29655
935 Chromium needs to be able to override the way storage events are delivered.
936 This replaced https://bugs.webkit.org/show_bug.cgi?id=29257 because it'll be
937 faster (no vtables and extra allocation) and somewhat cleaner (no dependency
938 injection). This is necessary because Chromium needs to transport events across
939 a process barrier and then dispatch them without use of a Frame*.
941 Behavior should not change with this, so no updates to tests.
945 * WebCore.vcproj/WebCore.vcproj:
946 * WebCore.xcodeproj/project.pbxproj:
947 * WebCoreSources.bkl:
948 * storage/StorageAreaImpl.cpp:
949 (WebCore::StorageAreaImpl::setItem):
950 (WebCore::StorageAreaImpl::removeItem):
951 (WebCore::StorageAreaImpl::clear):
952 * storage/StorageAreaImpl.h:
953 * storage/StorageEventDispatcher.cpp: Copied from WebCore/storage/StorageAreaImpl.cpp.
954 (WebCore::StorageEventDispatcher::dispatch):
955 * storage/StorageEventDispatcher.h: Added. (Well, technically in the other half of this patch.)
957 2009-09-30 Jian Li <jianli@chromium.org>
959 Reviewed by Darin Adler.
961 Need to check NULL frame in EventHandler::updateDragAndDrop.
962 https://bugs.webkit.org/show_bug.cgi?id=29929
964 Test: http/tests/misc/drag-over-iframe-invalid-source-crash.html
966 * page/EventHandler.cpp:
967 (WebCore::EventHandler::updateDragAndDrop):
969 2009-09-29 Simon Fraser <simon.fraser@apple.com>
971 Reviewed by Dan Bernstein.
973 ASSERTION FAILED: !repaintContainer || repaintContainer == this
974 https://bugs.webkit.org/show_bug.cgi?id=29755
976 Generalize the fix for this bug to account for cases where there may be multiple
977 containing blocks between the repaint container, and the container of the element
980 Test: compositing/repaint/opacity-between-absolute2.html
982 * rendering/RenderBox.cpp:
983 (WebCore::RenderBox::mapLocalToContainer):
984 Call offsetFromAncestorContainer() to get the correct offset.
986 (WebCore::RenderBox::computeRectForRepaint): Ditto
987 * rendering/RenderInline.cpp:
988 (WebCore::RenderInline::computeRectForRepaint): Ditto.
990 * rendering/RenderObject.h:
991 * rendering/RenderObject.cpp:
992 (WebCore::RenderObject::offsetFromAncestorContainer):
993 New method that computes an offset from some object in the ancestor container() chain.
995 2009-09-30 Andras Becsi <becsi.andras@stud.u-szeged.hu>
997 Reviewed by Simon Hausmann.
999 [Qt] Fix TextCodecQt::decode method after r48752 to return a non-null string if the length of the input is 0.
1000 This fixes https://bugs.webkit.org/show_bug.cgi?id=29736.
1002 * platform/text/qt/TextCodecQt.cpp:
1003 (WebCore::TextCodecQt::decode):
1005 2009-09-29 Dave Hyatt <hyatt@apple.com>
1007 Reviewed by Jon Honeycutt.
1009 Fix a couple of bugs with patterns. Move the setting of the document URL to before the style
1010 selector gets constructed so that pattern match testing gets the correct URL.
1012 * loader/FrameLoader.cpp:
1013 (WebCore::FrameLoader::begin):
1014 * page/UserContentURLPattern.cpp:
1015 (WebCore::UserContentURLPattern::parse):
1017 2009-09-29 Alexey Proskuryakov <ap@apple.com>
1019 Rubber-stamped by Brady Eidson.
1021 Assertion failure in http/tests/xmlhttprequest/failed-auth.html.
1023 I couldn't find out why this only started to happen now, but it was incorrect to check
1024 persistence of a credential returned by CredentialStorage::get() without checking that it
1025 was non-null. When there is no credential for the protection space in storage, get()
1026 returns a new object, and Credentil constructor doesn't initialize m_persistence.
1028 * platform/network/mac/ResourceHandleMac.mm:
1029 (-[WebCoreSynchronousLoader connection:didReceiveAuthenticationChallenge:]): Moved the
1030 assertion after credential null check.
1031 (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Added the same persistence
1032 assertion, matching sync code (and CF one, as well).
1034 2009-09-29 Yong Li <yong.li@torchmobile.com>
1036 Reviewed by Darin Adler.
1038 Add an ASSERT for UTF8Encoding().isValid()
1039 https://bugs.webkit.org/show_bug.cgi?id=29908
1041 * platform/text/TextEncoding.cpp:
1042 (WebCore::UTF8Encoding):
1044 2009-09-29 Dave Hyatt <hyatt@apple.com>
1046 Reviewed by Jon Honeycutt.
1048 https://bugs.webkit.org/show_bug.cgi?id=29892
1049 Add support for whitelist patterns to control conditional injection of user scripts and
1052 No new tests. Not testable until WebKit portion is added in followup patch.
1057 * WebCore.vcproj/WebCore.vcproj:
1058 * WebCore.xcodeproj/project.pbxproj:
1060 (WebCore::Document::pageGroupUserSheets):
1062 (WebCore::Frame::injectUserScriptsForWorld):
1063 * page/UserContentURLPattern.cpp: Added.
1064 (WebCore::UserContentURLPattern::matchesPatterns):
1065 (WebCore::UserContentURLPattern::parse):
1066 (WebCore::UserContentURLPattern::matches):
1067 (WebCore::UserContentURLPattern::matchesHost):
1068 (WebCore::MatchTester::MatchTester):
1069 (WebCore::MatchTester::testStringFinished):
1070 (WebCore::MatchTester::patternStringFinished):
1071 (WebCore::MatchTester::eatWildcard):
1072 (WebCore::MatchTester::eatSameChars):
1073 (WebCore::MatchTester::test):
1074 (WebCore::UserContentURLPattern::matchesPath):
1075 * page/UserContentURLPattern.h: Added.
1076 (WebCore::UserContentURLPattern::UserContentURLPattern):
1077 (WebCore::UserContentURLPattern::scheme):
1078 (WebCore::UserContentURLPattern::host):
1079 (WebCore::UserContentURLPattern::path):
1080 (WebCore::UserContentURLPattern::matchSubdomains):
1082 2009-09-29 Enrica Casucci <enrica@apple.com>
1084 Reviewed by Adele Peterson.
1086 Reproducible crash pressing return inside quoted content
1087 at WebCore::BreakBlockquoteCommand::doApply.
1088 <rdar://problem/7085453>
1089 In some case, like the one provided in the test case, m_downStreamEnd
1090 refers to a node that gets deleted when executing the DeleteSelectionCommand.
1091 We shouldn't use m_downStreamEnd to recalculate the new m_endPosition when
1092 pruning is needed, because it may be point to a node that has been deleted, but
1093 rather rely on removeNode in CompositeEditCommand to update m_endPosition correctly.
1095 Test: editing/selection/blockquote-crash.html
1097 * editing/BreakBlockquoteCommand.cpp:
1098 (WebCore::BreakBlockquoteCommand::doApply): Added check for invalid position
1099 to avoid dereferencing a null node pointer.
1100 * editing/DeleteSelectionCommand.cpp:
1101 (WebCore::DeleteSelectionCommand::mergeParagraphs): Don't reset m_endPosition
1102 using the value in m_downStreamEnd when it is necessary to prune the start block.
1104 2009-09-29 Alexey Proskuryakov <ap@apple.com>
1106 Reviewed by Brady Eidson.
1108 Basic authentication credentials are not sent automatically to top resources
1109 https://bugs.webkit.org/show_bug.cgi?id=29901
1111 No new tests - I don't want to pollute root directory of http tests to check for this rather
1114 * platform/network/CredentialStorage.cpp:
1115 (WebCore::CredentialStorage::set): Changed to always preserve leading slash.
1116 (WebCore::CredentialStorage::getDefaultAuthenticationCredential): Made breaking out of the
1119 2009-09-29 Pavel Feldman <pfeldman@chromium.org>
1121 Reviewed by Oliver Hunt.
1123 Web Inspector REGRESSION(r47820-r47822): Profiles aren't
1124 added to the inspector unless the inspector is already open
1125 when the profile completes.
1127 https://bugs.webkit.org/show_bug.cgi?id=29897
1129 * inspector/front-end/ProfilesPanel.js:
1130 (WebInspector.ProfilesPanel.prototype._populateProfiles):
1132 2009-09-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
1134 Rubberstamped by David Hyatt.
1136 Fix to logic of earlier commit 48902.
1138 When merging two if's before committing, I forgot to invert the
1141 * platform/network/qt/QNetworkReplyHandler.cpp:
1142 (WebCore::ignoreHttpError):
1144 2009-09-29 Stephen White <senorblanco@chromium.org>
1146 Unreviewed, build fix.
1148 Fixing Chromium build, following r48884.
1150 [https://bugs.webkit.org/show_bug.cgi?id=29894]
1152 * bindings/v8/V8AbstractEventListener.cpp:
1153 (WebCore::V8AbstractEventListener::handleEvent):
1154 * bindings/v8/V8AbstractEventListener.h:
1155 * bindings/v8/V8WorkerContextEventListener.cpp:
1156 (WebCore::V8WorkerContextEventListener::handleEvent):
1157 * bindings/v8/V8WorkerContextEventListener.h:
1159 2009-09-29 Kent Tamura <tkent@chromium.org>
1161 Reviewed by Darin Adler.
1163 Follows HTML5's maxLength change in September 2009.
1164 - Change HTMLTextAreaElement.maxLength type to signed.
1165 - HTMLTextAreaElement.maxLength returns -1 if maxlength= attribute is missing.
1166 - HTMLTextAreaElement.maxLength and HTMLInputElement.maxLength
1167 throw INDEX_SIZE_ERR for setting negative values.
1168 https://bugs.webkit.org/show_bug.cgi?id=29796
1170 * html/HTMLInputElement.cpp:
1171 (WebCore::HTMLInputElement::setMaxLength):
1172 * html/HTMLInputElement.h:
1173 * html/HTMLInputElement.idl:
1174 * html/HTMLTextAreaElement.cpp:
1175 (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
1176 (WebCore::HTMLTextAreaElement::maxLength):
1177 (WebCore::HTMLTextAreaElement::setMaxLength):
1178 * html/HTMLTextAreaElement.h:
1179 * html/HTMLTextAreaElement.idl:
1181 2009-09-29 Dimitri Glazkov <dglazkov@chromium.org>
1183 No review, rolling out r48894, because review discussion was not complete.
1184 http://trac.webkit.org/changeset/48894
1186 * platform/sql/SQLiteTransaction.cpp:
1187 (WebCore::SQLiteTransaction::begin):
1189 2009-09-29 Dirk Schulze <krit@webkit.org>
1191 Reviewed by Nikolas Zimmermann.
1193 SVG Filter feComposite implementation is missing
1194 [https://bugs.webkit.org/show_bug.cgi?id=28362]
1196 feComposite implementation for SVG.
1198 Test: svg/filters/feComposite.svg
1200 * platform/graphics/filters/FEComposite.cpp:
1201 (WebCore::arithmetic):
1202 (WebCore::FEComposite::apply):
1204 2009-09-29 Dumitru Daniliuc <dumi@chromium.org>
1206 Reviewed by Dimitri Glazkov.
1208 Starting all read-only transactions with an explicit BEGIN
1209 DEFERRED command instead of BEGIN, since some ports (chromium)
1210 might compile their own SQLite library and set BEGIN to BEGIN
1211 IMMEDIATE by default; which would result in a deadlock in case of
1212 two concurrent read-only transactions on the same DB, and would
1213 unnecessarily delay other potential transactions to the same DB.
1215 https://bugs.webkit.org/show_bug.cgi?id=29729
1217 * platform/sql/SQLiteTransaction.cpp:
1218 (WebCore::SQLiteTransaction::begin):
1220 2009-09-29 Kenneth Russell <kbr@google.com>
1222 Reviewed by Dimitri Glazkov.
1224 Add support for run-time flag for 3D canvas
1225 https://bugs.webkit.org/show_bug.cgi?id=29826
1227 * html/HTMLCanvasElement.cpp:
1228 (WebCore::HTMLCanvasElement::getContext): Check page settings for
1229 experimental WebGL flag before returning 3D graphics context.
1230 * page/Settings.cpp:
1231 (WebCore::Settings::Settings): Initialize new flag to false.
1232 (WebCore::Settings::setExperimentalWebGLEnabled):
1233 * page/Settings.h: Set new flag.
1234 (WebCore::Settings::experimentalWebGLEnabled): Return new flag.
1236 2009-09-29 Jeremy Orlow <jorlow@chromium.org>
1238 Reviewed by Darin Fisher.
1240 Chromium needs to be able to override the way storage events are delivered - part 1
1241 https://bugs.webkit.org/show_bug.cgi?id=29889
1243 Chromium needs to be able to override the way storage events are delivered.
1244 This replaced https://bugs.webkit.org/show_bug.cgi?id=29257 because it'll be
1245 faster (no vtables and extra allocation) and somewhat cleaner (no dependency
1246 injection). This is necessary because Chromium needs to transport events across
1247 a process barrier and then dispatch them without use of a Frame*.
1249 This patch should be a no-op for all ports other than Chromium.
1252 * storage/StorageEventDispatcher.h: Added.
1254 2009-09-29 Oliver Hunt <oliver@apple.com>
1256 Reviewed by NOBODY (missed file).
1258 Adding file missed in previous commit.
1260 * manual-tests/gtk/resources/long_cell.cur: Copied from WebCore/dom/PositionCreationFunctions.h.
1262 2009-09-29 Dimitri Glazkov <dglazkov@chromium.org>
1264 Reviewed by Darin Fisher.
1266 [V8] Correct an issue with XMLHttpRequest attribute event listeners never being cleared.
1267 https://bugs.webkit.org/show_bug.cgi?id=29888
1269 Test: LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-abort-readyState-shouldDispatchEvent.html
1271 * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
1272 (WebCore::getEventListener): Added isAttribute parameter.
1273 (WebCore::ACCESSOR_SETTER): Made all event listener setters create attribute listeners.
1274 (WebCore::CALLBACK_FUNC_DECL): Made addEventListener create object listener.
1276 2009-09-22 Martin Robinson <martin.james.robinson@gmail.com>
1278 Reviewed by Eric Seidel.
1280 Fix corruption for non-square images.
1282 [GTK] REGRESSION: BitmapImage::getGdkPixbuf fails for non-square images
1283 https://bugs.webkit.org/show_bug.cgi?id=29654
1285 Added an additional manual-test for this issue to the existing Gtk
1288 * manual-tests/gtk/cursor-image.html:
1289 * manual-tests/gtk/resources/long_cell.cur: Added.
1290 * platform/graphics/gtk/ImageGtk.cpp:
1291 (WebCore::BitmapImage::getGdkPixbuf):
1293 2009-09-29 Alexey Proskuryakov <ap@apple.com>
1295 Reviewed by Timothy Hatcher.
1297 Build fix - pass a proper ScriptExecutipnContext to getEventListenerHandlerBody()
1299 * bindings/js/ScriptEventListener.cpp:
1300 (WebCore::getEventListenerHandlerBody):
1301 * bindings/js/ScriptEventListener.h:
1302 * bindings/v8/ScriptEventListener.cpp:
1303 (WebCore::getEventListenerHandlerBody):
1304 * bindings/v8/ScriptEventListener.h:
1305 * inspector/InspectorDOMAgent.cpp:
1306 (WebCore::InspectorDOMAgent::buildObjectForEventListener):
1308 2009-09-29 Nate Chapin <japhet@chromium.org>
1310 Reviewed by Eric Seidel.
1312 Ensure that we don't scroll lock to an anchor node after a
1313 user-initiated scroll, even if that scroll doesn't propagate
1314 all the way up to FrameView.
1316 Test: fast/events/node-event-anchor-lock.html
1318 * page/EventHandler.cpp: Call setFrameWasScrolledByUser() when a scroll is handled by a node rather than a frame.
1319 (WebCore::EventHandler::scrollOverflow):
1320 (WebCore::EventHandler::handleWheelEvent):
1321 (WebCore::EventHandler::sendScrollEvent): Use setFrameWasScrolledByUser();
1322 (WebCore::EventHandler::setFrameWasScrolledByUser): Split out of sendScrollEvent();
1323 (WebCore::EventHandler::passMousePressEventToScrollbar):
1324 * page/EventHandler.h: Declare setFrameWasScrolledByUser().
1326 2009-09-28 Alexey Proskuryakov <ap@apple.com>
1328 Reviewed by Darin Adler and Sam Weinig.
1330 Onclick not fired for an element copied with cloneContents() or cloneNode()
1331 https://bugs.webkit.org/show_bug.cgi?id=25130
1333 The change here is that JS event listeners don't keep a reference to a global object from
1334 where they were created, and instead take it as a parameter when parsing source code. Also,
1335 the listener creation won't fail just because it happens for an element in a frameless
1337 Thus, moving nodes between documents no longer results in having incorrect registered
1338 lazy event listeners on them.
1340 Tests: fast/events/attribute-listener-cloned-from-frameless-doc-context-2.html
1341 fast/events/attribute-listener-cloned-from-frameless-doc-context.html
1342 fast/events/attribute-listener-cloned-from-frameless-doc.xhtml
1343 fast/events/attribute-listener-extracted-from-frameless-doc-context-2.html
1344 fast/events/attribute-listener-extracted-from-frameless-doc-context.html
1346 * bindings/js/JSEventListener.cpp:
1347 (WebCore::JSEventListener::JSEventListener): Don't take a reference to JSDOMGlobalObject.
1348 (WebCore::JSEventListener::jsFunction): Take ScriptExecutionContext as a parameter for
1349 getting to JSDOMGlobalObject. It's not used in base class, but is in JSLazyEventListner.
1350 (WebCore::JSEventListener::markJSFunction): Don't mark the global object.
1351 (WebCore::JSEventListener::handleEvent): Get global object from ScriptExecutionContext.
1352 (WebCore::JSEventListener::reportError): Ditto.
1354 * bindings/js/JSEventListener.h: (WebCore::JSEventListener::create): Don't keep a reference
1355 to JSDOMGlobalObject.
1357 * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::parseCode): Listener
1358 creation was split between this function and ScriptEventListener; moved it here, as JS
1359 global object can be different now.
1361 * bindings/js/JSLazyEventListener.h: (WebCore::JSLazyEventListener::create): Keep source URL,
1362 which can not be determined at parsing time.
1364 * bindings/js/ScriptEventListener.cpp: (WebCore::createAttributeEventListener): Moved code
1365 for listener creation to JSLazyEventListener. XSSAuditor code remains here, because tests
1366 expect that errors are logged at document parsing time, and because I don't know what other
1367 side effects moving it vould have.
1369 * dom/EventListener.h: handleEvent() and reportError() now take ScriptExecutionContext,
1370 because JSC needs a global context here.
1372 * bindings/js/JSAbstractWorkerCustom.cpp:
1373 (WebCore::JSAbstractWorker::addEventListener):
1374 (WebCore::JSAbstractWorker::removeEventListener):
1375 * bindings/js/JSDOMApplicationCacheCustom.cpp:
1376 (WebCore::JSDOMApplicationCache::addEventListener):
1377 (WebCore::JSDOMApplicationCache::removeEventListener):
1378 * bindings/js/JSDOMGlobalObject.cpp:
1379 (WebCore::JSDOMGlobalObject::createJSAttributeEventListener):
1380 * bindings/js/JSDOMWindowCustom.cpp:
1381 (WebCore::JSDOMWindow::addEventListener):
1382 (WebCore::JSDOMWindow::removeEventListener):
1383 * bindings/js/JSEventSourceCustom.cpp:
1384 (WebCore::JSEventSource::addEventListener):
1385 (WebCore::JSEventSource::removeEventListener):
1386 * bindings/js/JSMessagePortCustom.cpp:
1387 (WebCore::JSMessagePort::addEventListener):
1388 (WebCore::JSMessagePort::removeEventListener):
1389 * bindings/js/JSNodeCustom.cpp:
1390 (WebCore::JSNode::addEventListener):
1391 (WebCore::JSNode::removeEventListener):
1392 * bindings/js/JSSVGElementInstanceCustom.cpp:
1393 (WebCore::JSSVGElementInstance::addEventListener):
1394 (WebCore::JSSVGElementInstance::removeEventListener):
1395 * bindings/js/JSWorkerContextCustom.cpp:
1396 (WebCore::JSWorkerContext::addEventListener):
1397 (WebCore::JSWorkerContext::removeEventListener):
1398 * bindings/js/JSXMLHttpRequestCustom.cpp:
1399 (WebCore::JSXMLHttpRequest::addEventListener):
1400 (WebCore::JSXMLHttpRequest::removeEventListener):
1401 * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
1402 (WebCore::JSXMLHttpRequestUpload::addEventListener):
1403 (WebCore::JSXMLHttpRequestUpload::removeEventListener):
1404 * bindings/objc/ObjCEventListener.h:
1405 * bindings/objc/ObjCEventListener.mm:
1406 (WebCore::ObjCEventListener::handleEvent):
1407 * bindings/scripts/CodeGeneratorJS.pm:
1408 * dom/EventTarget.cpp:
1409 (WebCore::EventTarget::fireEventListeners):
1410 * inspector/InspectorDOMAgent.cpp:
1411 (WebCore::InspectorDOMAgent::handleEvent):
1412 * inspector/InspectorDOMAgent.h:
1413 * inspector/InspectorDOMStorageResource.cpp:
1414 (WebCore::InspectorDOMStorageResource::handleEvent):
1415 * inspector/InspectorDOMStorageResource.h:
1416 * loader/ImageDocument.cpp:
1417 (WebCore::ImageEventListener::handleEvent):
1418 * svg/animation/SVGSMILElement.cpp:
1419 (WebCore::ConditionEventListener::handleEvent):
1420 * workers/WorkerContext.cpp:
1421 (WebCore::WorkerContext::reportException):
1422 Don't pass global object to JSEventListener::create(), which no longer needs it.
1423 Note that some of these functions still have an early return for null global object, which
1424 can probably be removed in a later patch.
1425 Pass ScriptExecutionContext to EventListener methods that now need it.
1427 * bindings/scripts/CodeGeneratorCOM.pm: Don't force EventTarget implementation on Node -
1428 it doesn't work yet (it didn't quite work before this patch, too, because it assumed that
1429 any object implementing EventTarget COM interface originated from WebCore).
1431 * dom/EventListener.idl: Just like in ObjC, EventListener should be a pure interface in
1434 2009-09-28 Geoffrey Garen <ggaren@apple.com>
1436 Reviewed by Sam Weinig.
1438 Removed virtual destructor from JSGlobalObjectData to eliminate pointer
1439 fix-ups when accessing JSGlobalObject::d.
1441 Replaced with an explicit destructor function pointer.
1443 * bindings/js/JSDOMGlobalObject.cpp:
1444 (WebCore::JSDOMGlobalObject::destroyJSDOMGlobalObjectData):
1445 * bindings/js/JSDOMGlobalObject.h:
1446 (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
1448 2009-09-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
1450 Reviewed by Simon Hausmann.
1452 Don't rely on QNetworkReply::NetworkError codes, but
1453 on HTTP error codes instead.
1455 * platform/network/qt/QNetworkReplyHandler.cpp:
1456 (WebCore::ignoreHttpError):
1457 (WebCore::QNetworkReplyHandler::finish):
1459 2009-09-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
1461 Reviewed by Simon Hausmann.
1463 Use const references when using Qt's foreach.
1465 * platform/network/qt/QNetworkReplyHandler.cpp:
1466 (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
1468 2009-09-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
1470 Reviewed by Simon Hausmann.
1472 Fix handling of QNetworkReply errors.
1474 In the QNetworkReplyHandler::finish() a response was sent even when
1475 the reply contained an error. This resulted in a sendResponseIfNeeded()
1476 calling didReceiveResponse on the client, leading to the destruction
1477 of the m_resourceHandle, discontinuing further processing in finish(),
1478 and thus not calling didFail on the client.
1480 Instead it continued as everything went fine, and
1481 FrameLoaderClientQt::dispatchDecidePolicyForMIMEType() changed the
1482 policy to PolicyDownload due to not being able to show the non existing
1483 MIMEType. As the download also obviously fails, it ended up with a
1484 policy change error.
1486 * platform/network/qt/QNetworkReplyHandler.cpp:
1487 (WebCore::QNetworkReplyHandler::finish):
1489 2009-09-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
1491 Reviewed by Simon Hausmann.
1493 The code for showing error pages when the response was
1494 a 401/403/404, was not actually doing so. This patch
1497 * platform/network/qt/QNetworkReplyHandler.cpp:
1498 (WebCore::QNetworkReplyHandler::finish):
1500 2009-09-28 Alexey Proskuryakov <ap@apple.com>
1502 Reviewed by Brady Eidson.
1504 <rdar://problem/7259965> REGRESSION: http/tests/xmlhttprequest/cross-origin-authorization.html
1505 is failing/crashing intermittently
1506 https://bugs.webkit.org/show_bug.cgi?id=29322
1508 This was caused by CStringBuffer::encodeBase64() returning a buffer that wasn't zero terminated.
1509 The code had other issues as well, so I removed it altogether:
1510 - it claimed to avoid some buffer copies, but it didn't;
1511 - and I don't think that base64 encoding should be part of CString interface.
1513 * platform/network/mac/ResourceHandleMac.mm:
1514 (WebCore::encodeBasicAuthorization): Encode username and password using Base64.h directly.
1515 (WebCore::ResourceHandle::start): Use encodeBasicAuthorization().
1516 (+[WebCoreSynchronousLoader loadRequest:allowStoredCredentials:returningResponse:error:]): Ditto.
1517 (-[WebCoreSynchronousLoader connection:willSendRequest:redirectResponse:]): Extended logging
1518 to synchronous case.
1519 (-[WebCoreSynchronousLoader connectionShouldUseCredentialStorage:]): Ditto.
1520 (-[WebCoreSynchronousLoader connection:didReceiveAuthenticationChallenge:]): Ditto.
1521 (-[WebCoreSynchronousLoader connection:didReceiveResponse:]): Ditto.
1522 (-[WebCoreSynchronousLoader connection:didReceiveData:]): Ditto.
1523 (-[WebCoreSynchronousLoader connectionDidFinishLoading:]): Ditto.
1524 (-[WebCoreSynchronousLoader connection:didFailWithError:]): Ditto.
1526 * platform/network/cf/ResourceHandleCFNet.cpp: Matched Mac changes.
1528 * platform/text/CString.cpp:
1529 * platform/text/CString.h:
1530 (WebCore::CStringBuffer::create):
1531 (WebCore::CStringBuffer::CStringBuffer):
1532 Removed code that was added for Base64 in r48363.
1534 2009-09-29 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
1536 Reviewed by Simon Hausmann.
1538 Fix typo in Localizations.cpp
1540 https://bugs.webkit.org/show_bug.cgi?id=29872
1542 * platform/qt/Localizations.cpp:
1543 (WebCore::localizedMediaControlElementHelpText):
1545 2009-09-29 Simon Hausmann <simon.hausmann@nokia.com>
1547 Reviewed by Tor Arne Vestbø.
1549 Make the XSLT conditional in DOMWindow.idl's xsltProcessor
1550 attribute conditional in the generated files, similar to
1553 * page/DOMWindow.idl:
1555 2009-09-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
1557 Reviewed by Simon Hausmann and Tor Arne Vestbø.
1559 Use the ResourceError as it is supposed to and handle
1560 not HTTP errors from QNetworkReply.
1562 Thanks to Adam Roben for his input.
1564 * platform/network/qt/QNetworkReplyHandler.cpp:
1565 (WebCore::QNetworkReplyHandler::finish):
1567 009-09-29 Pavel Feldman <pfeldman@chromium.org>
1569 Reviewed by Timothy Hatcher.
1571 Web Inspector: Encapsulate JS listeners specifics into ScriptEventListener.
1573 https://bugs.webkit.org/show_bug.cgi?id=29816
1575 * bindings/js/ScriptEventListener.cpp:
1576 (WebCore::getEventListenerHandlerBody):
1577 * bindings/js/ScriptEventListener.h:
1578 * bindings/v8/ScriptEventListener.cpp:
1579 (WebCore::getEventListenerHandlerBody):
1580 * bindings/v8/ScriptEventListener.h:
1581 * inspector/InspectorDOMAgent.cpp:
1582 (WebCore::InspectorDOMAgent::buildObjectForEventListener):
1584 2009-09-29 Xan Lopez <xlopez@igalia.com>
1586 Unreviewed attempt to fix the build.
1588 * page/Settings.cpp:
1589 (WebCore::Settings::Settings):
1591 2009-09-28 Fumitoshi Ukai <ukai@chromium.org>
1593 Reviewed by Eric Seidel.
1595 Add experimentalWebSocketsEnabled in Settings.
1596 https://bugs.webkit.org/show_bug.cgi?id=28941
1599 * bindings/js/JSDOMWindowCustom.cpp:
1600 (WebCore::JSDOMWindow::webSocket):
1601 * bindings/v8/V8DOMWrapper.cpp:
1602 (WebCore::V8DOMWrapper::getConstructor):
1603 * bindings/v8/custom/V8WebSocketCustom.cpp:
1604 * page/Settings.cpp:
1605 (WebCore::Settings::Settings):
1606 (WebCore::Settings::setExperimentalWebSocketsEnabled):
1608 (WebCore::Settings::experimentalWebSocketsEnabled):
1610 2009-09-11 Fumitoshi Ukai <ukai@chromium.org>
1612 Reviewed by Adam Barth.
1614 Add platform code to support WebSocket for chromium.
1615 https://bugs.webkit.org/show_bug.cgi?id=29171
1617 To build within chromium tree, it requires a patch in bug 29174.
1618 Real implementation will be landed in chromium tree.
1621 * platform/network/chromium/SocketStreamError.h: Added.
1622 (WebCore::SocketStreamError::SocketStreamError):
1623 * platform/network/chromium/SocketStreamHandle.h: Added.
1624 (WebCore::SocketStreamHandle::create):
1626 2009-09-28 Dan Bernstein <mitz@apple.com>
1628 Reviewed by Sam Weinig.
1630 <rdar://problem/7157288> Crash in RenderStyle::computedLineHeight()
1631 when Times New Roman is not installed
1633 * platform/graphics/win/FontCacheWin.cpp:
1634 (WebCore::FontCache::getLastResortFallbackFont): If Times New Roman is
1635 not available, use the Windows default GUI font.
1637 2009-09-28 Jian Li <jianli@chromium.org>
1639 Reviewed by David Levin.
1641 Do not add platform-specific methods to cross-platform header
1642 FileSystem.h per Darin's feedback for 29109.
1643 https://bugs.webkit.org/show_bug.cgi?id=29830
1645 * platform/FileSystem.h:
1646 * platform/chromium/DragDataChromium.cpp:
1647 (WebCore::DragData::asURL):
1648 * platform/chromium/FileSystemChromium.cpp:
1650 2009-09-28 Dumitru Daniliuc <dumi@chromium.org>
1652 Reviewed by Dimitri Glazkov.
1654 Register Chromium's VFSs with a proper sqlite3_io_methods
1655 finder. This should only affect the POSIX implementation. The
1656 Windows change is included for consistency and in case sqlite
1657 starts using something similar in its Windows VFS in the future.
1659 https://bugs.webkit.org/show_bug.cgi?id=29743
1661 * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp:
1662 (WebCore::SQLiteFileSystem::registerSQLiteVFS):
1663 * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp:
1664 (WebCore::SQLiteFileSystem::registerSQLiteVFS):
1666 2009-09-28 Nate Chapin <japhet@chromium.org>
1668 Reviewed by Adam Barth.
1670 Change the V8 bindings' handling of window.toString(),
1671 so we return [object DOMWindow] (like JSC), not [object global].
1673 https://bugs.webkit.org/show_bug.cgi?id=29742
1675 This will fix a couple of Chromium port test failures and enable us to
1676 use the default expectations for a bunch more.
1678 * bindings/v8/custom/V8DOMWindowCustom.cpp: Use the DOMWindow wrapper instead
1679 of the global object wrapper when it's available in the DOMWindow toString callback.
1681 2009-09-28 Nate Chapin <japhet@chromium.org>
1683 Rubber stamped by David Levin.
1685 Chromium build fix, add back in #include of V8Proxy.h in V8WebKitPointConstructor.cpp.
1687 * bindings/v8/custom/V8WebKitPointConstructor.cpp: Re-include V8Proxy.h.
1689 2009-09-28 Geoffrey Garen <ggaren@apple.com>
1691 Reviewed by Darin Adler.
1693 NotNullPassRefPtr: smart pointer optimized for passing references that are not null
1694 https://bugs.webkit.org/show_bug.cgi?id=29822
1696 Added NotNullPassRefPtr, and deployed it in all places that initialize
1699 * bindings/js/DOMObjectWithSVGContext.h:
1700 (WebCore::DOMObjectWithSVGContext::DOMObjectWithSVGContext):
1701 * bindings/js/JSDOMBinding.cpp:
1702 (WebCore::cacheDOMStructure):
1703 * bindings/js/JSDOMBinding.h:
1704 (WebCore::DOMObject::DOMObject):
1705 (WebCore::DOMObjectWithGlobalPointer::DOMObjectWithGlobalPointer):
1706 (WebCore::DOMConstructorObject::DOMConstructorObject):
1707 (WebCore::DOMConstructorWithDocument::DOMConstructorWithDocument):
1708 * bindings/js/JSDOMGlobalObject.cpp:
1709 (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
1710 * bindings/js/JSDOMGlobalObject.h:
1711 * bindings/js/JSDOMWindowBase.cpp:
1712 (WebCore::JSDOMWindowBase::JSDOMWindowBase):
1713 * bindings/js/JSDOMWindowBase.h:
1714 * bindings/js/JSHTMLAllCollection.h:
1715 (WebCore::JSHTMLAllCollection::JSHTMLAllCollection):
1716 * bindings/js/JSInspectedObjectWrapper.cpp:
1717 (WebCore::JSInspectedObjectWrapper::JSInspectedObjectWrapper):
1718 * bindings/js/JSInspectedObjectWrapper.h:
1719 * bindings/js/JSInspectorCallbackWrapper.cpp:
1720 (WebCore::JSInspectorCallbackWrapper::JSInspectorCallbackWrapper):
1721 * bindings/js/JSInspectorCallbackWrapper.h:
1722 * bindings/js/JSQuarantinedObjectWrapper.cpp:
1723 (WebCore::JSQuarantinedObjectWrapper::JSQuarantinedObjectWrapper):
1724 * bindings/js/JSQuarantinedObjectWrapper.h:
1725 * bindings/js/JSWorkerContextBase.cpp:
1726 (WebCore::JSWorkerContextBase::JSWorkerContextBase):
1727 * bindings/js/JSWorkerContextBase.h:
1728 * bindings/scripts/CodeGeneratorJS.pm:
1729 * bridge/runtime_object.cpp:
1730 (JSC::RuntimeObjectImp::RuntimeObjectImp):
1731 * bridge/runtime_object.h:
1733 2009-09-28 Nate Chapin <japhet@chromium.org>
1735 Reviewed by Dimitri Glazkov.
1737 Allow V8 to handle x/y parameters in a WebKitPoint constructor.
1738 https://bugs.webkit.org/show_bug.cgi?id=29823
1740 Fixes V8's handling of LayoutTests/fast/dom/Window/webkitConvertPoint.html
1742 * bindings/v8/custom/V8WebKitPointConstructor.cpp: Allow for x/y parameters in constructor.
1744 2009-09-28 Mark Rowe <mrowe@apple.com>
1746 Fix the build by doing something approximating reasonableness in the Xcode project.
1748 * WebCore.xcodeproj/project.pbxproj:
1750 2009-09-28 Simon Hausmann <hausmann@webkit.org>
1752 Prospective Tiger build fix.
1754 * WebCore.xcodeproj/project.pbxproj: Try to use unique IDs for the new files.
1756 2009-09-28 Pavel Feldman <pfeldman@chromium.org>
1758 Reviewed by Timothy Hatcher.
1760 Web Inspector: Add explicit frontend event for commit load.
1762 https://bugs.webkit.org/show_bug.cgi?id=29814
1764 * inspector/InspectorController.cpp:
1765 (WebCore::InspectorController::didCommitLoad):
1766 * inspector/InspectorFrontend.cpp:
1767 (WebCore::InspectorFrontend::didCommitLoad):
1768 * inspector/InspectorFrontend.h:
1769 * inspector/front-end/DOMAgent.js:
1770 (WebInspector.DOMAgent.prototype._setDocument):
1771 * inspector/front-end/inspector.js:
1772 (WebInspector.addResource):
1773 (WebInspector.didCommitLoad):
1775 2009-09-28 Yaar Schnitman <yaar@chromium.org>
1777 Reviewed by Dimitri Glazkov.
1779 Chromium port - recognize we are being built independently
1780 of chromium and look for dependencies under webkit/chromium rather
1783 https://bugs.webkit.org/show_bug.cgi?id=29722
1785 * WebCore.gyp/WebCore.gyp: See above. Also removed a few files from
1786 the sources list, since they are not supposed to be built here.
1788 2009-09-28 Jakub Wieczorek <faw217@gmail.com>
1790 Reviewed by Simon Hausmann.
1792 [Qt] Implement XSLT support with QtXmlPatterns.
1793 https://bugs.webkit.org/show_bug.cgi?id=28303
1798 * WebCore.vcproj/WebCore.vcproj:
1799 * WebCoreSources.bkl:
1801 (WebCore::Document::Document):
1802 (WebCore::Document::~Document):
1803 (WebCore::Document::setTransformSource):
1805 (WebCore::Document::transformSource):
1806 * dom/TransformSource.h: Added.
1807 (WebCore::TransformSource::platformSource):
1808 * dom/TransformSourceLibxslt.cpp: Added.
1809 (WebCore::TransformSource::TransformSource): Wraps a libxml2 document.
1810 (WebCore::TransformSource::~TransformSource):
1811 * dom/TransformSourceQt.cpp: Added.
1812 (WebCore::TransformSource::TransformSource): Wraps a plain string.
1813 (WebCore::TransformSource::~TransformSource):
1814 * dom/XMLTokenizerLibxml2.cpp:
1815 (WebCore::XMLTokenizer::doEnd):
1816 * dom/XMLTokenizerQt.cpp:
1817 (WebCore::XMLTokenizer::doEnd):
1818 (WebCore::XMLTokenizer::parseProcessingInstruction):
1819 * xml/XSLStyleSheet.h:
1820 (WebCore::XSLStyleSheet::sheetString):
1821 * xml/XSLStyleSheetLibxslt.cpp:
1822 (WebCore::XSLStyleSheet::document):
1823 * xml/XSLStyleSheetQt.cpp: Added.
1824 * xml/XSLTProcessor.h:
1825 * xml/XSLTProcessorLibxslt.cpp:
1826 (WebCore::xmlDocPtrFromNode):
1827 * xml/XSLTProcessorQt.cpp: Added.
1828 (WebCore::XSLTMessageHandler::XSLTMessageHandler): A subclass of QAbstractMessageHandler.
1829 (WebCore::XSLTMessageHandler::handleMessage): Forwards all processor messages to the Console.
1830 (WebCore::XSLTProcessor::transformToString): Uses QXmlQuery.
1832 2009-09-28 Andrew Scherkus <scherkus@chromium.org>
1834 Reviewed by Eric Carlson.
1836 Delegate implementation of rendererIsNeeded() for media control elements to RenderTheme.
1838 https://bugs.webkit.org/show_bug.cgi?id=28689
1840 Covered by LayoutTests/media/video-no-audio.html
1842 * rendering/MediaControlElements.cpp: Removed subclass implementations of rendererIsNeeded().
1843 (WebCore::MediaControlElement::rendererIsNeeded): Include calling shouldRenderMediaControlPart().
1844 (WebCore::MediaControlInputElement::rendererIsNeeded): Include calling shouldRenderMediaControlPart().
1845 * rendering/MediaControlElements.h:
1846 * rendering/RenderTheme.cpp:
1847 (WebCore::RenderTheme::shouldRenderMediaControlPart): New method. Contains logic moved from subclass implementations of rendererIsNeeded().
1848 * rendering/RenderTheme.h:
1849 * rendering/RenderThemeChromiumSkia.cpp:
1850 (WebCore::RenderThemeChromiumSkia::shouldRenderMediaControlPart): Override to always render mute button.
1851 * rendering/RenderThemeChromiumSkia.h:
1853 2009-09-28 Jian Li <jianli@chromium.org>
1855 Reviewed by David Levin.
1857 [chromium] DragData::asURL should return file URL.
1858 https://bugs.webkit.org/show_bug.cgi?id=29109
1860 Tested by LayoutTests/fast/events/drag-to-navigate.html.
1862 * platform/FileSystem.h:
1863 * platform/chromium/ChromiumBridge.h:
1864 * platform/chromium/DragDataChromium.cpp:
1865 (WebCore::DragData::asURL):
1866 * platform/chromium/FileSystemChromium.cpp:
1867 (WebCore::getAbsolutePath):
1868 (WebCore::isDirectory):
1869 (WebCore::filePathToURL):
1871 2009-09-28 Dimitri Glazkov <dglazkov@chromium.org>
1873 Reviewed by David Levin.
1875 [V8] Add a special case to handle index arguments, because we need to be
1876 able to see if they're < 0.
1877 https://bugs.webkit.org/show_bug.cgi?id=29810
1879 Test: LayoutTests/dom/html/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative.html
1881 * bindings/scripts/CodeGeneratorV8.pm: Added special case (matching CodeGeneratorJS.pm)
1882 for index arguments.
1884 2009-09-28 Dan Bernstein <mitz@apple.com>
1886 Reviewed by Darin Adler.
1888 Extend the MediaWiki/KHTMLFixes.css workaround to cover older MediaWiki versions
1889 https://bugs.webkit.org/show_bug.cgi?id=29792
1891 * html/HTMLLinkElement.cpp:
1892 (WebCore::HTMLLinkElement::setCSSStyleSheet): If site specific hacks are
1893 enabled, check if the linked style sheet is one of two versions of the
1894 MediaWiki KHTMLFixes.css. If so, remove the offending rule.
1896 2009-09-28 Dimitri Glazkov <dglazkov@chromium.org>
1898 Reviewed by Adam Barth.
1900 [V8] Fix an error in type logic in CodeGeneratorV8.pm, where
1901 unsigned ints are accidentally used as signed.
1902 https://bugs.webkit.org/show_bug.cgi?id=29810
1904 Test: LayoutTests/fast/forms/textarea-maxlength.html
1906 * bindings/scripts/CodeGeneratorV8.pm: Made sure "unsigned long" in IDL is
1907 properly generates on "unsigned" return value.
1909 2009-09-28 Jakub Wieczorek <faw217@gmail.com>
1911 Reviewed by Simon Hausmann.
1913 Rename XSLStyleSheet.cpp to XSLStyleSheetLibxslt.cpp.
1914 https://bugs.webkit.org/show_bug.cgi?id=28303
1916 In preparation for adding XSLT support with QtXmlPatterns to the Qt
1917 port, rename XSLStyleSheet.cpp to XSLStyleSheetLibxslt.cpp as we will
1918 have our own implementation which most likely will not share any code
1919 with the current one.
1921 Additionally, fix some coding style issues.
1925 * WebCore.vcproj/WebCore.vcproj:
1926 * WebCore.xcodeproj/project.pbxproj:
1927 * WebCoreSources.bkl:
1928 * xml/XSLStyleSheet.cpp: Renamed to XSLStyleSheetLibxslt.cpp.
1929 * xml/XSLStyleSheetLibxslt.cpp: Added.
1931 2009-09-28 Simon Hausmann <simon.hausmann@nokia.com>
1933 Prospective build fix for r48812.
1935 Forgot to remove the inline reset() implementation when reverting the indentation
1936 changes in the file.
1938 * xml/XSLTProcessor.h:
1940 2009-09-28 Pavel Feldman <pfeldman@chromium.org>
1942 Reviewed by nobody (trivial follow up fix), Joseph Pecoraro LGTM-ed.
1944 Web Inspector: Follow up to r48809.
1945 InspectorController.wrapObject should only be called on the inspectable page side.
1947 https://bugs.webkit.org/show_bug.cgi?id=17429
1949 * inspector/front-end/EventListenersSidebarPane.js:
1950 (WebInspector.EventListenersSidebarPane.prototype.update.callback):
1951 (WebInspector.EventListenersSidebarPane.prototype.update):
1952 (WebInspector.EventListenersSection):
1953 (WebInspector.EventListenersSection.prototype.update):
1954 (WebInspector.EventListenerBar):
1955 (WebInspector.EventListenerBar.prototype.update):
1957 2009-09-28 Jakub Wieczorek <faw217@gmail.com>
1959 Reviewed by Simon Hausmann.
1961 Move the libxslt specific part of XSLTProcessor to a separate file.
1962 https://bugs.webkit.org/show_bug.cgi?id=28303
1964 In preparation for adding XSLT support with QtXmlPatterns to the Qt
1965 port, move the libxslt part of the XSLTProcessor implementation into
1966 another file and leave the part that can be reused and shared.
1968 Additionally, fix some coding style issues.
1972 * WebCore.vcproj/WebCore.vcproj:
1973 * WebCore.xcodeproj/project.pbxproj:
1974 * WebCoreSources.bkl:
1975 * xml/XSLTProcessor.cpp:
1976 (WebCore::XSLTProcessor::createDocumentFromSource): Remove trailing whitespaces.
1977 (WebCore::createFragmentFromSource): Remove trailing whitespaces.
1978 (WebCore::XSLTProcessor::transformToFragment): Remove trailing whitespaces.
1979 (WebCore::XSLTProcessor::reset): Moved out of the class definition.
1980 * xml/XSLTProcessorLibxslt.cpp: Added.
1981 (WebCore::XSLTProcessor::genericErrorFunc): Moved.
1982 (WebCore::XSLTProcessor::parseErrorFunc): Moved.
1983 (WebCore::docLoaderFunc): Moved.
1984 (WebCore::setXSLTLoadCallBack): Moved.
1985 (WebCore::writeToVector): Moved.
1986 (WebCore::saveResultToString): Moved.
1987 (WebCore::xsltParamArrayFromParameterMap): Moved.
1988 (WebCore::freeXsltParamArray): Moved.
1989 (WebCore::xsltStylesheetPointer): Moved.
1990 (WebCore::xmlDocPtrFromNode): Moved.
1991 (WebCore::resultMIMEType): Moved.
1992 (WebCore::XSLTProcessor::transformToString): Moved.
1994 2009-09-28 Charles Wei <charles.wei@torchmobile.com.cn>
1996 Reviewed by Nikolas Zimmermann.
1998 Fix the crash of SVG that crashes when use a non-exist symbol
1999 https://bugs.webkit.org/show_bug.cgi?id=27693
2001 Test: svg/custom/use-non-existing-symbol-crash.svg
2003 * svg/SVGUseElement.cpp:
2004 (WebCore::shadowTreeContainsChangedNodes):
2006 2009-09-28 Joseph Pecoraro <joepeck@webkit.org>
2008 Reviewed by Timothy Hatcher.
2010 Inspector Should Show Event Listeners/Handlers Registered on each Node
2011 https://bugs.webkit.org/show_bug.cgi?id=17429
2013 Extracted a method from dispatchEvent to get the event ancestor chain
2016 (WebCore::Node::eventAncestors): the extracted method
2017 (WebCore::Node::dispatchGenericEvent): use eventAncestors
2020 Asynchronous Flow For the Inspector, Backend -> DOM Agent -> Frontend
2021 The DOMAgent's getEventListenersForNode handles the logic of finding
2022 all the relevant listeners in the event flow.
2024 * inspector/InspectorBackend.cpp:
2025 (WebCore::InspectorBackend::getEventListenersForNode):
2026 * inspector/InspectorBackend.h:
2027 * inspector/InspectorBackend.idl:
2028 * inspector/InspectorDOMAgent.cpp:
2029 (WebCore::InspectorDOMAgent::getEventListenersForNode):
2030 (WebCore::InspectorDOMAgent::buildObjectForEventListener):
2031 (WebCore::InspectorDOMAgent::buildObjectForNode): added localName
2032 * inspector/InspectorDOMAgent.h:
2033 (WebCore::EventListenerInfo::EventListenerInfo):
2034 * inspector/InspectorFrontend.cpp:
2035 (WebCore::InspectorFrontend::didGetEventListenersForNode):
2036 * inspector/InspectorFrontend.h:
2037 (WebCore::InspectorFrontend::scriptState):
2038 * inspector/front-end/DOMAgent.js: added localName to WebInspector.DOMNode from payload
2039 (WebInspector.EventListeners.getEventListenersForNodeAsync.mycallback):
2040 (WebInspector.EventListeners.getEventListenersForNodeAsync):
2042 New Sidebar Pane in the Element's Panel
2043 Includes Gear Menu for filtering the Event Listeners on the
2044 "Selected Node Only" or "All Nodes"
2046 * inspector/front-end/ElementsPanel.js: Handles refreshing the Pane when necessary
2047 (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
2048 (WebInspector.ElementsPanel):
2049 (WebInspector.ElementsPanel.prototype.updateEventListeners):
2050 * inspector/front-end/EventListenersSidebarPane.js: Added.
2051 (WebInspector.EventListenersSidebarPane): The 1st level in the Pane
2052 (WebInspector.EventListenersSidebarPane.prototype.update.callback):
2053 (WebInspector.EventListenersSidebarPane.prototype.update):
2054 (WebInspector.EventListenersSection): The 2nd level in the Pane
2055 (WebInspector.EventListenersSection.prototype.update): filters on Preference
2056 (WebInspector.EventListenersSection.prototype.addListener):
2057 (WebInspector.EventListenerBar): The 3rd level in the Pane
2058 (WebInspector.EventListenerBar.prototype._getNodeDisplayName):
2059 (WebInspector.EventListenerBar.prototype._getFunctionDisplayName):
2060 (WebInspector.EventListenersSidebarPane.prototype._changeSetting): For the Gear Menu
2062 Consolidated "appropriateSelectorForNode"
2064 * inspector/front-end/StylesSidebarPane.js:
2065 * inspector/front-end/utilities.js:
2067 Miscellaneous Updates
2069 * English.lproj/localizedStrings.js: "Event Listeners", "No Event Listeners", "Selected Node Only", "All Nodes"
2070 * WebCore.gypi: included the new inspector files
2071 * WebCore.vcproj/WebCore.vcproj: included source files that were missing
2072 * inspector/front-end/Images/grayConnectorPoint.png: Added. Thanks to Timothy Hatcher.
2073 * inspector/front-end/Images/whiteConnectorPoint.png: Added. Thanks to Timothy Hatcher.
2074 * inspector/front-end/inspector.js: Preferences for the Gear Menu Event Listeners filter
2075 * inspector/front-end/inspector.css: reused as much as possible
2076 * inspector/front-end/inspector.html: include the new script
2077 * inspector/front-end/WebKit.qrc: included the new inspector files
2079 2009-09-27 Sam Weinig <sam@webkit.org>
2081 Reviewed by Dan Bernstein.
2083 Fix for https://bugs.webkit.org/show_bug.cgi?id=29760
2084 Implement CSSOM Range.getClientRects/getBoundingClientRect
2086 Tests: fast/dom/Range/getBoundingClientRect-getClientRects-relative-to-viewport.html
2087 fast/dom/Range/getBoundingClientRect.html
2088 fast/dom/Range/getClientRects.html
2091 (WebCore::Range::getClientRects):
2092 (WebCore::Range::getBoundingClientRect):
2093 (WebCore::adjustFloatQuadsForScrollAndAbsoluteZoom):
2094 (WebCore::Range::getBorderAndTextQuads):
2097 Implement Range.getClientRects/getBoundingClientRect.
2100 * rendering/RenderObject.h:
2101 (WebCore::adjustForAbsoluteZoom):
2102 (WebCore::adjustIntRectForAbsoluteZoom):
2103 (WebCore::adjustFloatPointForAbsoluteZoom):
2104 (WebCore::adjustFloatQuadForAbsoluteZoom):
2105 Move point/quad adjustment methods from Element.cpp to RenderObject.h
2106 so that Range.cpp can use them as well.
2108 2009-09-27 Simon Hausmann <hausmann@webkit.org>
2110 Unreviewed fix for WebInspector with Qt build.
2112 Simply re-generate the Qt resource file by running
2113 WebKitTools/Scripts/generate-qt-inspector-resource
2115 * inspector/front-end/WebKit.qrc:
2117 2009-09-27 Pavel Feldman <pfeldman@chromium.org>
2119 Reviewed by nobody (trivial ChangeLog fix).
2121 Restore WebCore/ChangeLog truncated in r48778.
2123 2009-09-27 Pavel Feldman <pfeldman@chromium.org>
2125 Reviewed by Timothy Hatcher.
2127 Web Inspector: DOM store is being unbound twice, leading to assertion failure.
2129 https://bugs.webkit.org/show_bug.cgi?id=29770
2131 * inspector/InspectorController.cpp:
2132 (WebCore::InspectorController::didOpenDatabase):
2133 (WebCore::InspectorController::didUseDOMStorage):
2134 * inspector/InspectorDOMStorageResource.cpp:
2135 (WebCore::InspectorDOMStorageResource::unbind):
2137 2009-09-26 Pavel Feldman <pfeldman@chromium.org>
2139 Reviewed by Timothy Hatcher.
2141 Web Inspector: Do not track DOM changes while inspector window is closed.
2143 https://bugs.webkit.org/show_bug.cgi?id=29769
2145 * inspector/InspectorController.cpp:
2146 (WebCore::InspectorController::inspectedWindowScriptObjectCleared):
2147 (WebCore::InspectorController::populateScriptObjects):
2148 (WebCore::InspectorController::resetScriptObjects):
2149 (WebCore::InspectorController::didCommitLoad):
2150 * inspector/InspectorController.h:
2151 * inspector/InspectorDOMAgent.cpp:
2152 (WebCore::InspectorDOMAgent::setDocument):
2153 * inspector/InspectorDOMAgent.h:
2154 * loader/FrameLoader.cpp:
2155 (WebCore::FrameLoader::dispatchWindowObjectAvailable):
2156 * page/android/InspectorControllerAndroid.cpp:
2157 (WebCore::InspectorController::inspectedWindowScriptObjectCleared):
2159 2009-09-26 Pavel Feldman <pfeldman@chromium.org>
2161 Reviewed by Timothy Hatcher.
2163 Web Inspector: [REGRESSION] Double Clicking Resources Fails to Open in New Window
2165 https://bugs.webkit.org/show_bug.cgi?id=29762
2167 * inspector/front-end/InjectedScript.js:
2168 (InjectedScript.setStyleText):
2169 (InjectedScript.openInInspectedWindow):
2170 * inspector/front-end/InjectedScriptAccess.js:
2171 * inspector/front-end/ResourcesPanel.js:
2172 (WebInspector.ResourceSidebarTreeElement.prototype.ondblclick):
2174 2009-09-26 David Kilzer <ddkilzer@apple.com>
2176 Part 2 of 2: <http://webkit.org/b/29753> DerivedSources.make broken for non-Mac targets
2178 Reviewed by Darin Adler.
2180 Fix ENABLE_ORIENTATION_EVENTS for non-Mac platforms.
2182 * DerivedSources.make: Moved Platform.h check for
2183 ENABLE_ORIENTATION_EVENTS into Mac-only section and added
2184 default of ENABLE_ORIENTATION_EVENTS = 0 to non-Mac section.
2185 Added ifndef test to make it possible to override both
2186 ENABLE_DASHBOARD_SUPPORT and ENABLE_ORIENTATION_EVENTS external
2187 to the makefile. Moved addition of ENABLE_ORIENTATION_EVENTS to
2188 ADDITIONAL_IDL_DEFINES to common section.
2189 * GNUmakefile.am: Added support for ENABLE_ORIENTATION_EVENTS if
2191 * WebCore.pro: Ditto.
2193 2009-09-26 Kent Tamura <tkent@chromium.org>
2195 Reviewed by David Kilzer.
2197 Move placeholder-related code to HTMLTextFormControlElement from
2198 HTMLInputElement, WMLInputElement, InputElement, and
2199 HTMLTextAreaElement.
2200 https://bugs.webkit.org/show_bug.cgi?id=28703
2202 * dom/InputElement.cpp:
2203 (WebCore::InputElement::dispatchFocusEvent):
2204 (WebCore::InputElement::dispatchBlurEvent):
2205 (WebCore::InputElement::setValueFromRenderer):
2206 * dom/InputElement.h:
2207 * html/HTMLFormControlElement.cpp:
2208 (WebCore::HTMLTextFormControlElement::HTMLTextFormControlElement):
2209 (WebCore::HTMLTextFormControlElement::~HTMLTextFormControlElement):
2210 (WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
2211 (WebCore::HTMLTextFormControlElement::dispatchBlurEvent):
2212 (WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible):
2213 (WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility):
2214 * html/HTMLFormControlElement.h:
2215 (WebCore::HTMLTextFormControlElement::handleFocusEvent):
2216 (WebCore::HTMLTextFormControlElement::handleBlurEvent):
2217 * html/HTMLInputElement.cpp:
2218 (WebCore::HTMLInputElement::HTMLInputElement):
2219 (WebCore::HTMLInputElement::handleFocusEvent):
2220 (WebCore::HTMLInputElement::handleBlurEvent):
2221 (WebCore::HTMLInputElement::parseMappedAttribute):
2222 (WebCore::HTMLInputElement::createRenderer):
2223 (WebCore::HTMLInputElement::setValue):
2224 (WebCore::HTMLInputElement::setValueFromRenderer):
2225 * html/HTMLInputElement.h:
2226 (WebCore::HTMLInputElement::supportsPlaceholder):
2227 (WebCore::HTMLInputElement::isEmptyValue):
2228 * html/HTMLIsIndexElement.cpp:
2229 (WebCore::HTMLIsIndexElement::parseMappedAttribute):
2230 * html/HTMLTextAreaElement.cpp:
2231 (WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
2232 (WebCore::HTMLTextAreaElement::createRenderer):
2233 * html/HTMLTextAreaElement.h:
2234 (WebCore::HTMLTextAreaElement::supportsPlaceholder):
2235 (WebCore::HTMLTextAreaElement::isEmptyValue):
2236 * rendering/RenderTextControl.cpp:
2237 (WebCore::RenderTextControl::RenderTextControl):
2238 * rendering/RenderTextControl.h:
2239 * rendering/RenderTextControlMultiLine.cpp:
2240 (WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine):
2241 * rendering/RenderTextControlMultiLine.h:
2242 * rendering/RenderTextControlSingleLine.cpp:
2243 (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
2244 (WebCore::RenderTextControlSingleLine::updateFromElement):
2245 * rendering/RenderTextControlSingleLine.h:
2246 * wml/WMLInputElement.cpp:
2247 (WebCore::WMLInputElement::setValue):
2248 (WebCore::WMLInputElement::createRenderer):
2249 * wml/WMLInputElement.h:
2251 2009-09-26 Shu Chang <Chang.Shu@nokia.com>
2253 Reviewed by Alexey Proskuryakov.
2255 Optimize the code so only the text from start to end is scanned.
2256 https://bugs.webkit.org/show_bug.cgi?id=29092
2258 On a platform with webkit+Qt+Symbian, the parsing time for a 600K text
2259 file improved from 400ms to 40ms (10x faster).
2262 (WebCore::Text::createWithLengthLimit):
2264 2009-09-26 Xiaomei Ji <xji@chromium.org>
2266 Reviewed by Eric Seidel.
2268 This Patch fixes [chromium] the drop-down is always left-aligned even
2270 https://bugs.webkit.org/show_bug.cgi?id=29612
2272 For auto-complete, the items in drop-down should be right-aligned if
2273 the directionality of <input> field is RTL.
2274 For <select><option>, the items in drop-down should be right-aligned
2275 if the directionality of <select> is RTL.
2277 No automatic test is possible. Manual tests are added.
2279 * manual-tests/autofill_alignment.html: Added.
2280 * manual-tests/select_alignment.html: Added.
2281 * platform/chromium/PopupMenuChromium.cpp:
2282 (WebCore::PopupListBox::paintRow): Adjust the starting x-axis of text to
2283 be paint if it should be right-aligned.
2285 2009-09-25 Dan Bernstein <mitz@apple.com>
2287 Reviewed by Sam Weinig.
2289 REGRESSION (r48775) FontList.plist written by TOT WebKit causes Safari 4
2291 https://bugs.webkit.org/show_bug.cgi?id=29759
2293 * platform/graphics/win/FontDatabase.cpp:
2294 (WebCore::writeFontDatabaseToPlist): Reverted to saving the CG font DB
2295 property list at the root of FontList.plist, but with an additional
2296 key for the last value of the Fonts registry key.
2297 (WebCore::populateFontDatabase): Pass the FontList.plist in its entirety
2298 to populatFontDatabaseFromPlist.
2300 2009-09-25 Kevin Ollivier <kevino@theolliviers.com>
2302 Build fix. Adding missing header files.
2304 * bindings/js/JSNamedNodeMapCustom.cpp:
2306 2009-09-25 David Kilzer <ddkilzer@apple.com>
2308 Part 1 of 2: <http://webkit.org/b/29753> DerivedSources.make broken for non-Mac targets
2310 Reviewed by Darin Adler.
2312 * DerivedSources.make: Move tests for ENABLE_CONTEXT_MENUS,
2313 ENABLE_DRAG_SUPPORT and ENABLE_INSPECTOR into Mac-only section.
2315 2009-09-25 Adam Barth <abarth@webkit.org>
2317 Reviewed by Darin Adler.
2319 Load blocks during unload should not affect targeted loads
2320 https://bugs.webkit.org/show_bug.cgi?id=29747
2322 Move the check of the unload state after checking for targeted links.
2324 Test: fast/loader/unload-hyperlink-targeted.html
2326 * loader/FrameLoader.cpp:
2327 (WebCore::FrameLoader::loadURL):
2329 2009-09-25 Kenneth Russell <kbr@google.com>
2331 Reviewed by Dimitri Glazkov.
2333 [Chromium] Add initial V8 bindings for WebGL
2334 https://bugs.webkit.org/show_bug.cgi?id=29664
2337 * bindings/scripts/CodeGeneratorV8.pm:
2338 * bindings/v8/DOMObjectsInclude.h:
2339 * bindings/v8/DerivedSourcesAllInOne.cpp:
2340 * bindings/v8/V8DOMWrapper.cpp:
2341 (WebCore::V8DOMWrapper::getTemplate):
2342 * bindings/v8/V8Index.cpp:
2343 * bindings/v8/V8Index.h:
2344 * bindings/v8/custom/V8CanvasArrayBufferCustom.cpp: Added.
2345 (WebCore::CALLBACK_FUNC_DECL):
2346 * bindings/v8/custom/V8CanvasArrayCustom.h: Added.
2347 (WebCore::constructCanvasArray):
2348 * bindings/v8/custom/V8CanvasByteArrayCustom.cpp: Added.
2349 (WebCore::CALLBACK_FUNC_DECL):
2350 (WebCore::INDEXED_PROPERTY_GETTER):
2351 (WebCore::INDEXED_PROPERTY_SETTER):
2352 * bindings/v8/custom/V8CanvasFloatArrayCustom.cpp: Added.
2353 (WebCore::CALLBACK_FUNC_DECL):
2354 (WebCore::INDEXED_PROPERTY_GETTER):
2355 (WebCore::INDEXED_PROPERTY_SETTER):
2356 * bindings/v8/custom/V8CanvasIntArrayCustom.cpp: Added.
2357 (WebCore::CALLBACK_FUNC_DECL):
2358 (WebCore::INDEXED_PROPERTY_GETTER):
2359 (WebCore::INDEXED_PROPERTY_SETTER):
2360 * bindings/v8/custom/V8CanvasRenderingContext3DCustom.cpp: Added.
2361 (WebCore::jsArrayToFloatArray):
2362 (WebCore::jsArrayToIntArray):
2363 (WebCore::CALLBACK_FUNC_DECL):
2365 (WebCore::vertexAttribAndUniformHelperf):
2366 (WebCore::uniformHelperi):
2367 (WebCore::uniformMatrixHelper):
2368 * bindings/v8/custom/V8CanvasShortArrayCustom.cpp: Added.
2369 (WebCore::CALLBACK_FUNC_DECL):
2370 (WebCore::INDEXED_PROPERTY_GETTER):
2371 (WebCore::INDEXED_PROPERTY_SETTER):
2372 * bindings/v8/custom/V8CanvasUnsignedByteArrayCustom.cpp: Added.
2373 (WebCore::CALLBACK_FUNC_DECL):
2374 (WebCore::INDEXED_PROPERTY_GETTER):
2375 (WebCore::INDEXED_PROPERTY_SETTER):
2376 * bindings/v8/custom/V8CanvasUnsignedIntArrayCustom.cpp: Added.
2377 (WebCore::CALLBACK_FUNC_DECL):
2378 (WebCore::INDEXED_PROPERTY_GETTER):
2379 (WebCore::INDEXED_PROPERTY_SETTER):
2380 * bindings/v8/custom/V8CanvasUnsignedShortArrayCustom.cpp: Added.
2381 (WebCore::CALLBACK_FUNC_DECL):
2382 (WebCore::INDEXED_PROPERTY_GETTER):
2383 (WebCore::INDEXED_PROPERTY_SETTER):
2384 * bindings/v8/custom/V8CustomBinding.h:
2385 * bindings/v8/custom/V8DocumentCustom.cpp:
2386 (WebCore::CALLBACK_FUNC_DECL):
2387 * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
2388 (WebCore::CALLBACK_FUNC_DECL):
2389 * platform/graphics/GraphicsContext3D.h:
2391 2009-09-25 Jeremy Orlow <jorlow@chromium.org>
2393 This is breaking Chromium try bots, so I'm counting this as a build fix.
2395 Add more svn:ignore exceptions. On different platforms, these files are
2396 generated with different case for WebCore.
2398 * WebCore.gyp: Changed property svn:ignore.
2400 2009-09-25 Alexey Proskuryakov <ap@apple.com>
2402 Reverting r48767, as it broke Windows build in a non-trivial way.
2404 * bindings/js/JSAbstractWorkerCustom.cpp:
2405 (WebCore::JSAbstractWorker::addEventListener):
2406 (WebCore::JSAbstractWorker::removeEventListener):
2407 * bindings/js/JSDOMApplicationCacheCustom.cpp:
2408 (WebCore::JSDOMApplicationCache::addEventListener):
2409 (WebCore::JSDOMApplicationCache::removeEventListener):
2410 * bindings/js/JSDOMGlobalObject.cpp:
2411 (WebCore::JSDOMGlobalObject::createJSAttributeEventListener):
2412 * bindings/js/JSDOMWindowCustom.cpp:
2413 (WebCore::JSDOMWindow::addEventListener):
2414 (WebCore::JSDOMWindow::removeEventListener):
2415 * bindings/js/JSEventListener.cpp:
2416 (WebCore::JSEventListener::JSEventListener):
2417 (WebCore::JSEventListener::jsFunction):
2418 (WebCore::JSEventListener::markJSFunction):
2419 (WebCore::JSEventListener::handleEvent):
2420 (WebCore::JSEventListener::reportError):
2421 * bindings/js/JSEventListener.h:
2422 (WebCore::JSEventListener::create):
2423 * bindings/js/JSEventSourceCustom.cpp:
2424 (WebCore::JSEventSource::addEventListener):
2425 (WebCore::JSEventSource::removeEventListener):
2426 * bindings/js/JSLazyEventListener.cpp:
2427 (WebCore::JSLazyEventListener::JSLazyEventListener):
2428 (WebCore::JSLazyEventListener::jsFunction):
2429 (WebCore::JSLazyEventListener::parseCode):
2430 * bindings/js/JSLazyEventListener.h:
2431 (WebCore::JSLazyEventListener::create):
2432 * bindings/js/JSMessagePortCustom.cpp:
2433 (WebCore::JSMessagePort::addEventListener):
2434 (WebCore::JSMessagePort::removeEventListener):
2435 * bindings/js/JSNodeCustom.cpp:
2436 (WebCore::JSNode::addEventListener):
2437 (WebCore::JSNode::removeEventListener):
2438 * bindings/js/JSSVGElementInstanceCustom.cpp:
2439 (WebCore::JSSVGElementInstance::addEventListener):
2440 (WebCore::JSSVGElementInstance::removeEventListener):
2441 * bindings/js/JSWorkerContextCustom.cpp:
2442 (WebCore::JSWorkerContext::addEventListener):
2443 (WebCore::JSWorkerContext::removeEventListener):
2444 * bindings/js/JSXMLHttpRequestCustom.cpp:
2445 (WebCore::JSXMLHttpRequest::addEventListener):
2446 (WebCore::JSXMLHttpRequest::removeEventListener):
2447 * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
2448 (WebCore::JSXMLHttpRequestUpload::addEventListener):
2449 (WebCore::JSXMLHttpRequestUpload::removeEventListener):
2450 * bindings/js/ScriptEventListener.cpp:
2451 (WebCore::createAttributeEventListener):
2452 * bindings/objc/ObjCEventListener.h:
2453 * bindings/objc/ObjCEventListener.mm:
2454 (WebCore::ObjCEventListener::handleEvent):
2455 * bindings/scripts/CodeGeneratorJS.pm:
2456 * dom/EventListener.h:
2457 (WebCore::EventListener::reportError):
2458 (WebCore::EventListener::jsFunction):
2459 * dom/EventTarget.cpp:
2460 (WebCore::EventTarget::fireEventListeners):
2461 * inspector/InspectorDOMAgent.cpp:
2462 (WebCore::InspectorDOMAgent::handleEvent):
2463 * inspector/InspectorDOMAgent.h:
2464 * inspector/InspectorDOMStorageResource.cpp:
2465 (WebCore::InspectorDOMStorageResource::handleEvent):
2466 * inspector/InspectorDOMStorageResource.h:
2467 * loader/ImageDocument.cpp:
2468 (WebCore::ImageEventListener::handleEvent):
2469 * svg/animation/SVGSMILElement.cpp:
2470 (WebCore::ConditionEventListener::handleEvent):
2471 * workers/WorkerContext.cpp:
2472 (WebCore::WorkerContext::reportException):
2474 2009-09-24 Tony Chang <tony@chromium.org>
2476 Reviewed by David Levin.
2478 Add a gyp variable to allow building a debug webcore without debug
2479 symbols. This allows for faster compile, link, and gdb times.
2481 https://bugs.webkit.org/show_bug.cgi?id=29721
2483 No new tests, build config change.
2485 * WebCore.gyp/WebCore.gyp:
2487 2009-09-25 Darin Fisher <darin@chromium.org>
2489 Reviewed by Dimitri Glazkov.
2491 Declare RegisteredEventListener as a class instead of a struct.
2492 This fixes a warning in the Chromium build.
2494 * dom/RegisteredEventListener.h:
2496 2009-09-25 Dan Bernstein <mitz@apple.com>
2498 Reviewed by Jon Honeycutt.
2501 <rdar://problem/7211635> 2 byte characters are displayed as garbaged
2502 <rdar://problem/7212626> garbled/gibberish text (off-by-one)
2504 When the Windows Fonts directory contains more than one font file for a
2505 given font name, which of the fonts gets assigned to the name in the
2506 Core Graphics font database was determined arbitrarily and did not
2507 always match the font GDI used for the same font name. The mismatch
2508 caused character-to-glyph mapping to use one font and glyph rendering to
2511 The fix is to update the Core Graphics font database from the registry
2512 entries (that reflect the name-to-font mapping that GDI uses) after
2513 populating it with the result of scanning the Fonts directory. As a
2514 consequence, the directory needs to be scanned at startup every time the
2515 registry key changes, so the last value of the registry key is kept
2516 in the property list on disk so that it could be compared to the current
2519 * platform/graphics/win/FontDatabase.cpp:
2520 (WebCore::populateFontDatabaseFromPlist): Now takes a property list as
2521 a parameter and avoids round-tripping through XML by calling
2522 wkAddFontsFromPlist() instead of wkAddFontsFromPlistRepresentation().
2523 (WebCore::fontFilenamesFromRegistryKey):
2524 (WebCore::cgFontDBKey):
2525 (WebCore::writeFontDatabaseToPlist): Now takes the CG font DB property
2526 list and a property list with the font filenames from the registry and
2527 writes a dictionary with those property lists as values.
2528 (WebCore::fontFilenamesFromRegistry): Added. Returns an array with the
2529 values in the HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts
2531 (WebCore::populateFontDatabase): Changed to read the contents of the
2532 Fonts registry key and compare it with the last-saved value from the
2533 property list, and to call wkAddFontsFromRegistry() after populating the
2534 CG font DB from the file system. Uses wkCreateFontsPlist() instead of
2535 wkCreateFontsPlistRepresentation() to avoid round-tripping through XML.
2537 2009-09-25 Geoffrey Garen <ggaren@apple.com>
2539 Reviewed by Darin Adler.
2541 Inlined some object creation code, including lexicalGlobalObject access
2542 https://bugs.webkit.org/show_bug.cgi?id=29750
2544 * bindings/js/JSInspectorBackendCustom.cpp:
2545 (WebCore::JSInspectorBackend::currentCallFrame):
2546 * inspector/JavaScriptDebugServer.cpp:
2547 (WebCore::JavaScriptDebugServer::hasBreakpoint): Updated for JavaScriptCore
2550 2009-09-25 Dave Hyatt <hyatt@apple.com>
2552 Reviewed by Anders Carlsson.
2554 https://bugs.webkit.org/show_bug.cgi?id=24399
2555 Make @import work in user stylesheets. The first bug was that the URL wasn't being set on the
2556 user sheets themselves, so relative @import URLs couldn't resolve properly. The second bug
2557 was that the loads would be denied. This is fixed by using the requestUserCSSStyleSheet method
2558 instead of the normal request method. In order to know when to do this, CSSStyleSheets now have
2559 a propagated boolean, m_isUserStyleSheet, that lets them know if they are user stylesheets or not.
2561 * css/CSSImportRule.cpp:
2562 (WebCore::CSSImportRule::insertedIntoParent):
2563 * css/CSSStyleSheet.cpp:
2564 (WebCore::CSSStyleSheet::CSSStyleSheet):
2565 * css/CSSStyleSheet.h:
2566 (WebCore::CSSStyleSheet::setIsUserStyleSheet):
2567 (WebCore::CSSStyleSheet::isUserStyleSheet):
2569 (WebCore::Document::pageUserSheet):
2570 (WebCore::Document::pageGroupUserSheets):
2572 2009-09-25 Simon Fraser <simon.fraser@apple.com>
2574 Reviewed by Darin Adler.
2576 ASSERTION FAILED: !repaintContainer || repaintContainer == this
2577 https://bugs.webkit.org/show_bug.cgi?id=29755
2579 It's possible for RenderObject::container() to return an object that is higher
2580 in the hierarchy than the repaintContainer that is being used to repaint an
2581 object. For example, this can happen when running an accelerated opacity
2582 transition on an element with a position:absolute parent, and a position:absolute child.
2584 In this case we need to detect when RenderObject::container() will skip over
2585 repaintContainer, and in that case adjust the coords to shift into repaintContainer's space.
2587 Test: compositing/repaint/opacity-between-absolute.html
2589 * rendering/RenderBox.cpp:
2590 (WebCore::RenderBox::mapLocalToContainer):
2591 (WebCore::RenderBox::computeRectForRepaint):
2592 * rendering/RenderInline.cpp:
2593 (WebCore::RenderInline::computeRectForRepaint):
2594 * rendering/RenderObject.cpp:
2595 (WebCore::RenderObject::container):
2596 * rendering/RenderObject.h:
2598 2009-09-25 Simon Fraser <simon.fraser@apple.com>
2600 Reviewed by Darin Adler.
2602 Crash with hardware accelerated rotation of a PDF image in a data URL
2603 <rdar://problem/7250378>
2605 PDF images don't return a color space from CGImageGetColorSpace(),
2606 so we need to null-check the return value before use.
2608 Test: compositing/color-matching/pdf-image-match.html
2610 * platform/graphics/mac/GraphicsLayerCA.mm:
2611 (WebCore::GraphicsLayerCA::setContentsToImage):
2613 2009-09-25 Darin Adler <darin@apple.com>
2615 Reviewed by Geoffrey Garen.
2617 Null-deref when first access to an Attr node is after its Element is destroyed
2618 https://bugs.webkit.org/show_bug.cgi?id=29748
2620 Test: fast/dom/Attr/access-after-element-destruction.html
2622 * bindings/js/JSAttrCustom.cpp:
2623 (WebCore::JSAttr::markChildren): Added. Keeps the ownerElement alive as
2624 long as the Attr is alive.
2626 * bindings/js/JSNamedNodeMapCustom.cpp:
2627 (WebCore::JSNamedNodeMap::markChildren): Added. Keeps the Element alive as
2628 long as the NamedNodeMap is alive.
2630 * dom/Attr.idl: Added CustomMarkFunction attribute.
2632 * dom/NamedAttrMap.cpp:
2633 (WebCore::NamedNodeMap::getAttributeItem): Tweaked formatting.
2634 (WebCore::NamedNodeMap::detachFromElement): Call clearAttributes so we don't
2635 have attributes hanging around that might need an Attr node created; that way
2636 we won't crash with a null-dereference trying to deal with one of them. This
2637 can't happen when working with JavaScript since the Element will be kept
2638 alive due to the change above.
2639 (WebCore::NamedNodeMap::addAttribute): Fix function name in comment.
2640 (WebCore::NamedNodeMap::removeAttribute): Removed unneeded "+ 1" and added
2643 * dom/NamedAttrMap.h: Made the element function public so it can be used by
2644 the JavaScript binding to keep the Element alive.
2646 * dom/NamedNodeMap.idl: Added CustomMarkFunction attribute.
2648 2009-09-24 Alexey Proskuryakov <ap@apple.com>
2650 Reviewed by Darin Adler and Sam Weinig.
2652 Onclick not fired for an element copied with cloneContents() or cloneNode()
2653 https://bugs.webkit.org/show_bug.cgi?id=25130
2655 The change here is that JS event listeners don't keep a reference to a global object from
2656 where they were created, and instead take it as a parameter when parsing source code. Also,
2657 the listener creation won't fail just because it happens for an element in a frameless
2659 Thus, moving nodes between documents no longer results in having incorrect registered
2660 lazy event listeners on them.
2662 Tests: fast/events/attribute-listener-cloned-from-frameless-doc-context-2.html
2663 fast/events/attribute-listener-cloned-from-frameless-doc-context.html
2664 fast/events/attribute-listener-cloned-from-frameless-doc.xhtml
2665 fast/events/attribute-listener-extracted-from-frameless-doc-context-2.html
2666 fast/events/attribute-listener-extracted-from-frameless-doc-context.html
2668 * bindings/js/JSEventListener.cpp:
2669 (WebCore::JSEventListener::JSEventListener): Don't take a reference to JSDOMGlobalObject.
2670 (WebCore::JSEventListener::jsFunction): Take ScriptExecutionContext as a parameter for
2671 getting to JSDOMGlobalObject. It's not used in base class, but is in JSLazyEventListner.
2672 (WebCore::JSEventListener::markJSFunction): Don't mark the global object.
2673 (WebCore::JSEventListener::handleEvent): Get global object from ScriptExecutionContext.
2674 (WebCore::JSEventListener::reportError): Ditto.
2676 * bindings/js/JSEventListener.h: (WebCore::JSEventListener::create): Don't keep a reference
2677 to JSDOMGlobalObject.
2679 * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::parseCode): Listener
2680 creation was split between this function and ScriptEventListener; moved it here, as JS
2681 global object can be different now.
2683 * bindings/js/JSLazyEventListener.h: (WebCore::JSLazyEventListener::create): Keep source URL,
2684 which can not be determined at parsing time.
2686 * bindings/js/ScriptEventListener.cpp: (WebCore::createAttributeEventListener): Moved code
2687 for listener creation to JSLazyEventListener. XSSAuditor code remains here, because tests
2688 expect that errors are logged at document parsing time, and because I don't know what other
2689 side effects moving it vould have.
2691 * dom/EventListener.h: handleEvent() and reportError() now take ScriptExecutionContext,
2692 because JSC needs a global context here.
2694 * bindings/js/JSAbstractWorkerCustom.cpp:
2695 (WebCore::JSAbstractWorker::addEventListener):
2696 (WebCore::JSAbstractWorker::removeEventListener):
2697 * bindings/js/JSDOMApplicationCacheCustom.cpp:
2698 (WebCore::JSDOMApplicationCache::addEventListener):
2699 (WebCore::JSDOMApplicationCache::removeEventListener):
2700 * bindings/js/JSDOMGlobalObject.cpp:
2701 (WebCore::JSDOMGlobalObject::createJSAttributeEventListener):
2702 * bindings/js/JSDOMWindowCustom.cpp:
2703 (WebCore::JSDOMWindow::addEventListener):
2704 (WebCore::JSDOMWindow::removeEventListener):
2705 * bindings/js/JSEventSourceCustom.cpp:
2706 (WebCore::JSEventSource::addEventListener):
2707 (WebCore::JSEventSource::removeEventListener):
2708 * bindings/js/JSMessagePortCustom.cpp:
2709 (WebCore::JSMessagePort::addEventListener):
2710 (WebCore::JSMessagePort::removeEventListener):
2711 * bindings/js/JSNodeCustom.cpp:
2712 (WebCore::JSNode::addEventListener):
2713 (WebCore::JSNode::removeEventListener):
2714 * bindings/js/JSSVGElementInstanceCustom.cpp:
2715 (WebCore::JSSVGElementInstance::addEventListener):
2716 (WebCore::JSSVGElementInstance::removeEventListener):
2717 * bindings/js/JSWorkerContextCustom.cpp:
2718 (WebCore::JSWorkerContext::addEventListener):
2719 (WebCore::JSWorkerContext::removeEventListener):
2720 * bindings/js/JSXMLHttpRequestCustom.cpp:
2721 (WebCore::JSXMLHttpRequest::addEventListener):
2722 (WebCore::JSXMLHttpRequest::removeEventListener):
2723 * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
2724 (WebCore::JSXMLHttpRequestUpload::addEventListener):
2725 (WebCore::JSXMLHttpRequestUpload::removeEventListener):
2726 * bindings/objc/ObjCEventListener.h:
2727 * bindings/objc/ObjCEventListener.mm:
2728 (WebCore::ObjCEventListener::handleEvent):
2729 * bindings/scripts/CodeGeneratorJS.pm:
2730 * dom/EventTarget.cpp:
2731 (WebCore::EventTarget::fireEventListeners):
2732 * inspector/InspectorDOMAgent.cpp:
2733 (WebCore::InspectorDOMAgent::handleEvent):
2734 * inspector/InspectorDOMAgent.h:
2735 * inspector/InspectorDOMStorageResource.cpp:
2736 (WebCore::InspectorDOMStorageResource::handleEvent):
2737 * inspector/InspectorDOMStorageResource.h:
2738 * loader/ImageDocument.cpp:
2739 (WebCore::ImageEventListener::handleEvent):
2740 * svg/animation/SVGSMILElement.cpp:
2741 (WebCore::ConditionEventListener::handleEvent):
2742 * workers/WorkerContext.cpp:
2743 (WebCore::WorkerContext::reportException):
2744 Don't pass global object to JSEventListener::create(), which no longer needs it.
2745 Note that some of these functions still have an early return for null global object, which
2746 can probably be removed in a later patch.
2747 Pass ScriptExecutionContext to EventListener methods that now need it.
2749 2009-09-25 Enrica Casucci <enrica@apple.com>
2751 Reviewed by Darin Adler, Dan Bernstein, Adele Peterson, and others.
2753 Fix for https://bugs.webkit.org/show_bug.cgi?id=29740
2754 <rdar://problem/7168738> Gmail: After changing a foreground text color, pressing return doesn't apply background to new line
2756 Change the way style is preserved when inserting a new paragraph.
2757 The original code handled insertion at the beginning and at the end of a paragraph as special
2758 cases. The newly created paragraph contained a set of nodes generated starting from the
2759 computed style of the insertion node. This approach has two problems:
2760 1. if the insertion node has a non opaque background color and one of the parent element did have
2761 a solid background color the new paragraph did not have the element with the solid color in the tree.
2762 2. in some circumstances it generated more markup than the original paragraph had (a span with bold, italic,
2763 background color and some font attribute was being reproduced as span + bold + italic + font as separate tags.
2764 The new approach is to recreate in the new paragraph the same hierarchy of nodes found in the
2765 paragraph where the insertion point is.
2767 Test: editing/inserting/insert-bg-font.html
2769 * editing/InsertParagraphSeparatorCommand.cpp:
2770 (WebCore::InsertParagraphSeparatorCommand::getAncestorsInsideBlock): retrieves the list of all the ancestors
2771 between the insert node and the outer block.
2772 (WebCore::InsertParagraphSeparatorCommand::cloneHierarchyUnderNewBlock): uses the list of ancestors to recreate
2773 in the new paragraph the same element hierarchy present in the starting paragraph.
2774 (WebCore::InsertParagraphSeparatorCommand::doApply): changed the code to handle the general case of insertion
2775 in the middle of the paragraph to use the new methods. Changed the handling of the insertion at the beginning and
2776 at the end of the paragraph to use the new methods instead of applying the calculated style.
2777 * editing/InsertParagraphSeparatorCommand.h: added methods getAncestorsInsideBlock and cloneHierarchyUnderNewBlock.
2779 2009-09-25 Patrick Mueller <Patrick_Mueller@us.ibm.com>
2781 Reviewed by Timothy Hatcher.
2783 Content-type parameters not taken into account when building form-data
2784 https://bugs.webkit.org/show_bug.cgi?id=28970
2786 existing manual test case extended with new tests
2788 * English.lproj/localizedStrings.js:
2789 * inspector/front-end/ResourceView.js:
2790 (WebInspector.ResourceView.prototype._refreshFormData):
2791 (WebInspector.ResourceView.prototype._refreshParms):
2792 * manual-tests/inspector/display-form-data.html:
2794 2009-09-25 Yuan Song <song.yuan@ericsson.com>
2796 Reviewed by Darin Adler.
2798 https://bugs.webkit.org/show_bug.cgi?id=14566
2800 Raise SECURITY_ERR exception if an attempt is made to change document.domain to an invalid value.
2802 Test: fast/js/invalid-domain-change-throws-exception.html
2805 (WebCore::Document::setDomain):
2809 2009-09-25 Adam Barth <abarth@webkit.org>
2811 Reviewed by Dimitri Glazkov.
2813 [V8] Teach ScheduledAction::execute about isolated worlds
2814 https://bugs.webkit.org/show_bug.cgi?id=27703
2816 When setTimeout is called with a string argument in an isolated
2817 world, we now compile the string in the isolated world.
2819 Last time we tried this change, we got a lot of crashes. This
2820 time we're using a fresh local handle as our context to avoid
2821 trouble if the peristent handle gets disposed before we leave
2824 Test: fast/dom/timer-clear-interval-in-handler-and-generate-error.html
2826 * bindings/v8/ScheduledAction.cpp:
2827 (WebCore::ScheduledAction::execute):
2829 2009-09-25 Paul Godavari <paul@chromium.org>
2831 Reviewed by Darin Fisher.
2833 Fix a regression in Mac Chromium popup menus, where the user's
2834 selection was ignored and the popup became unresponsive.
2835 https://bugs.webkit.org/show_bug.cgi?id=29726
2837 The fix is to notify the popup's client that the popup was hidden,
2838 even if the popup has no parent.
2840 * platform/chromium/PopupMenuChromium.cpp:
2841 (WebCore::PopupListBox::hidePopup):
2843 2009-09-25 Alexander Pavlov <apavlov@chromium.org>
2845 Reviewed by Dan Bernstein.
2847 Enable Pasteboard::writePlainText for Chromium and fix code style nits.
2848 https://bugs.webkit.org/show_bug.cgi?id=29734
2850 * platform/chromium/PasteboardChromium.cpp:
2851 (WebCore::Pasteboard::writePlainText):
2852 * platform/gtk/PasteboardGtk.cpp:
2853 (WebCore::Pasteboard::writePlainText):
2854 (WebCore::Pasteboard::writeURL):
2855 * platform/mac/PasteboardMac.mm:
2856 (WebCore::Pasteboard::writeSelection):
2857 (WebCore::Pasteboard::writePlainText):
2858 (WebCore::Pasteboard::writeURL):
2859 * platform/qt/PasteboardQt.cpp:
2860 (WebCore::Pasteboard::writePlainText):
2862 2009-09-25 Yongjun Zhang <yongjun.zhang@nokia.com>
2864 Reviewed by Ariya Hidayat.
2866 https://bugs.webkit.org/show_bug.cgi?id=28876
2867 [Qt] reduce peak memory consumption of text decoding.
2869 Chop large input buffer into small buffers to reduce peak memory
2872 * platform/text/qt/TextCodecQt.cpp:
2873 (WebCore::TextCodecQt::decode):
2875 2009-09-24 Jon Honeycutt <jhoneycutt@apple.com>
2877 Add a mechanism for automatically halting plug-ins.
2879 Reviewed by Oliver Hunt and Alice Liu.
2884 Update export of Page constructor.
2890 * WebCore.vcproj/WebCore.vcproj:
2891 Add PluginHalter.{h,cpp}, PluginHalterClient.h, and
2894 * WebCore.xcodeproj/project.pbxproj:
2895 Add files to Mac project.
2897 * loader/EmptyClients.h:
2898 Added an empty PluginHalterClient.
2899 (WebCore::EmptyPluginHalterClient::shouldHaltPlugin):
2902 * page/PluginHalter.cpp: Added.
2903 (WebCore::PluginHalter::PluginHalter):
2904 (WebCore::PluginHalter::didStartPlugin):
2905 Add the object to the plug-in set. If this is the only item in the set,
2906 set m_oldestStartTime to this object's time, and start the timer.
2907 (WebCore::PluginHalter::didStopPlugin):
2908 Remove the plug-in from the set.
2909 (WebCore::PluginHalter::timerFired):
2910 Find the cut-off time as the current time minus the allowed run time;
2911 plug-ins older than this may be halted. Iterate over the plug-ins. Find
2912 the object with the oldest start time that is too young to be halted;
2913 we'll use its start time to set the timer's next fire time. For all
2914 plug-ins that are candidates to be halted, call the
2915 PluginHalterClient's shouldHaltPlugin(). If this function returns true,
2916 call the plug-in's halt() function. Remove these objects from the set
2917 of tracked plug-ins. Call startTimerIfNecessary() to restart the timer.
2918 (WebCore::PluginHalter::startTimerIfNecessary):
2919 If the timer is set to fire, or the set of tracked plug-ins is empty,
2920 return early. Set the timer to fire after the oldest plug-in has run
2921 for the allowed run time.
2923 * page/PluginHalter.h: Added.
2924 (WebCore::PluginHalter::setPluginAllowedRunTime):
2926 * page/PluginHalterClient.h: Added.
2927 (WebCore::PluginHalterClient::~PluginHalterClient):
2930 (WebCore::Page::Page):
2931 Initialize m_pluginHalterClient. Call pluginHalterEnabledStateChanged()
2932 to create the PluginHalter if necessary.
2933 (WebCore::Page::pluginHalterEnabledStateChanged):
2934 If plug-in halting is enabled, create the PluginHalter. If it is
2936 (WebCore::Page::pluginAllowedRunTimeChanged):
2937 If there is a plug-in halter, call its setPluginAllowedRunTime().
2938 (WebCore::Page::didStartPlugin):
2939 If there is a plug-in halter, call its didStartPlugin().
2940 (WebCore::Page::didStopPlugin):
2941 If there is a plug-in halter, call its didStopPlugin().
2944 Add a parameter to the Page constructor for the PluginHalterClient.
2945 Added declarations for didStartPlugin() and didStopPlugin(), which are
2946 called when HaltablePlugins are added to or removed from the page. Adds
2947 pluginAllowedRunTimeChanged() and pluginHalterEnabledStateChanged() to
2948 notify the Page when these settings are changed. Added members to hold
2949 the PluginHalter and the PluginHalterClient.
2951 * page/Settings.cpp:
2952 (WebCore::Settings::Settings):
2953 (WebCore::Settings::setPluginHalterEnabled):
2954 If the enabled state has changed, call the Page's
2955 pluginHalterEnabledStateChanged().
2956 (WebCore::Settings::setPluginAllowedRunTime):
2957 Call the Page's pluginAllowedRunTimeChanged().
2960 (WebCore::Settings::pluginHalterEnabled):
2961 (WebCore::Settings::pluginAllowedRunTime):
2963 * page/HaltablePlugin.h: Added. Defines an interface for plug-ins that
2964 can be automatically halted.
2965 (WebCore::HaltablePlugin::~HaltablePlugin):
2967 * svg/graphics/SVGImage.cpp:
2968 (WebCore::SVGImage::dataChanged):
2969 Pass a dummy PluginHalterClient.
2971 2009-09-24 Simon Fraser <simon.fraser@apple.com>
2973 Reviewed by Dan Bernstein.
2975 REGRESSION: webkit-transform scale no longer works properly in nightly build
2976 https://bugs.webkit.org/show_bug.cgi?id=29730
2978 When the initial or final state of a scale animation does not specify a transform,
2979 use a default scale of 1, rather than zero.
2981 Test: compositing/transitions/scale-transition-no-start.html
2983 * platform/graphics/mac/GraphicsLayerCA.mm:
2984 (WebCore::getTransformFunctionValue):
2986 2009-09-24 John Gregg <johnnyg@google.com>
2988 Reviewed by Eric Seidel.
2990 isEnabled switch for notifications (experimental) in Page Settings
2991 https://bugs.webkit.org/show_bug.cgi?id=28930
2993 Adds a run-time flag in Settings object that controls whether
2994 to expose desktop notifications.
2996 No new test, but test code also modified to set this preference.
2998 * page/DOMWindow.cpp:
2999 (WebCore::DOMWindow::webkitNotifications): check preference before returning notifications object
3000 * page/Settings.cpp:
3001 (WebCore::Settings::Settings):
3002 (WebCore::Settings::setExperimentalNotificationsEnabled):
3004 (WebCore::Settings::experimentalNotificationsEnabled):
3006 2009-09-24 Dan Bernstein <mitz@apple.com>
3008 Reviewed by Sam Weinig.
3010 Fix <rdar://problem/7162000> Crash while trying to
3011 calculate the horizontal position of image
3013 Test: fast/inline-block/relative-positioned-rtl-crash.html
3015 * rendering/RenderBox.cpp:
3016 (WebCore::RenderBox::calcAbsoluteHorizontalReplaced): Corrected an
3017 isInline() test to isRenderInline(). This is similar to r41259.
3019 2009-09-24 Jessie Berlin <jberlin@webkit.org>
3021 Reviewed by Timothy Hatcher.
3023 Fix expanding profile call stacks being broken after sorting.
3024 https://bugs.webkit.org/show_bug.cgi?id=26423
3026 * inspector/front-end/ProfileDataGridTree.js:
3027 (WebInspector.ProfileDataGridNode.prototype.sort):
3028 Set shouldRefreshChildren to true on collapsed nodes with children so that expanding it
3029 causes the children to be placed in the right positions.
3031 2009-09-24 Geoffrey Garen <ggaren@apple.com>
3033 Reviewed by Stephanie Lewis.
3035 Fixed sudden termination console spew due to too many calls to
3036 enableSuddenTermination.
3038 <rdar://problem/7063125> 10A410: Safari logging enableSuddenTermination errors
3040 * page/DOMWindow.cpp:
3041 (WebCore::removeUnloadEventListener):
3042 (WebCore::removeAllUnloadEventListeners):
3043 (WebCore::removeBeforeUnloadEventListener):
3044 (WebCore::removeAllBeforeUnloadEventListeners): Only
3045 enableSuddenTermination if the set of listeners is empty *and* this
3046 window was in the set. Otherwise, a no-op will cause us to enableSuddenTermination.
3048 2009-09-24 Carol Szabo <carol.szabo@nokia.com>
3050 Reviewed by Alexey Proskuryakov.
3052 WebKit returns "" instead of null when getting
3053 inexistent, forbidden or invalidly named headers.
3054 https://bugs.webkit.org/show_bug.cgi?id=29140
3056 * xml/XMLHttpRequest.cpp:
3057 (WebCore::XMLHttpRequest::getResponseHeader):
3058 Changed to return null as it should according to the spec.
3060 2009-09-24 Jeremy Orlow <jorlow@chromium.org>
3062 Reviewed by Dimitri Glazkov.
3064 Add GYP generated files to svn:ignore
3065 https://bugs.webkit.org/show_bug.cgi?id=29724
3067 Adding the following files to the svn:ignore list (all in the
3068 WebCore/WebCore.gyp directory)
3074 WebCore_Release.rules
3075 WebCore_Release - no tcmalloc.rules
3076 WebCore_Purify.rules
3078 WebCore_Debug_rules.mk
3079 WebCore_Release_rules.mk
3080 WebCore_Release - no tcmalloc_rules.mk
3081 WebCore_Purify_rules.mk
3085 * WebCore.gyp: Changed property svn:ignore.
3087 2009-09-24 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
3089 Unreviewed. Mac build fix.
3091 * page/EventHandler.cpp:
3092 (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal):
3093 remove unused parameter from function signature;
3095 2009-09-24 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
3097 Reviewed by Oliver Hunt.
3099 Implement correct horizontal scrollbar behavior for GTK+ also on
3102 https://bugs.webkit.org/show_bug.cgi?id=29348
3103 [Gtk] Scrollwheel on horizontal scrollbars should slide horizontally
3105 Test: platform/gtk/scrollbars/overflow-scrollbar-horizontal-wheel-scroll.html
3107 * page/EventHandler.cpp:
3108 (WebCore::EventHandler::handleWheelEvent): on GTK+, when using the
3109 wheel with the pointer on the horizontal scrollbar, scroll
3111 * platform/PlatformWheelEvent.h:
3112 * platform/gtk/WheelEventGtk.cpp:
3113 (WebCore::PlatformWheelEvent::swapOrientation): allow adding a
3114 vertical scroll to the horizontal one;
3116 2009-09-24 Jeremy Orlow <jorlow@chromium.org>
3118 Reviewed by Eric Seidel.
3120 StorageNamespace::storageArea() should take in a PassRefPtr<StorageOrigin>
3121 https://bugs.webkit.org/show_bug.cgi?id=29290
3123 Modified StorageNamespace::storageArea() to take in a PassRefPtr<StorageOrigin>
3124 per http://webkit.org/coding/RefPtr.html
3126 No behavior change, so no tests.
3128 * storage/StorageNamespace.h:
3129 * storage/StorageNamespaceImpl.cpp:
3130 (WebCore::StorageNamespaceImpl::storageArea):
3131 * storage/StorageNamespaceImpl.h:
3133 2009-09-24 Geoffrey Garen <ggaren@apple.com>
3135 Reviewed by Sam Weinig.
3137 Added back enable/disableSuddenTermination() functionality I accidentally
3138 removed in my last patch.
3140 * page/DOMWindow.cpp:
3141 (WebCore::addUnloadEventListener):
3142 (WebCore::removeUnloadEventListener):
3143 (WebCore::removeAllUnloadEventListeners):
3144 (WebCore::addBeforeUnloadEventListener):
3145 (WebCore::removeBeforeUnloadEventListener):
3146 (WebCore::removeAllBeforeUnloadEventListeners):
3147 (WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
3148 (WebCore::DOMWindow::~DOMWindow):
3149 (WebCore::DOMWindow::addEventListener):
3150 (WebCore::DOMWindow::removeEventListener):
3151 (WebCore::DOMWindow::removeAllEventListeners):
3153 2009-09-24 Sam Weinig <sam@webkit.org>
3155 Reviewed by Steve Falkenburg and Mark Rowe.
3157 Don't pass -F to GCC on non-mac platforms since it is an darwin only.
3159 * DerivedSources.make:
3161 2009-09-24 Sam Weinig <sam@webkit.org>
3167 2009-09-23 Stephen White <senorblanco@chromium.org>
3169 Reviewed by Eric Seidel.
3171 Revert the relevant parts of r47925, and implement an alternate
3172 fix (localize the coordinate check to GraphicsContext::clipPath()).
3173 This fixes http://crbug.com/21174.
3175 Covered by LayoutTests/svg/dynamic-updates/SVGClipPathElement-dom-clipPathUnits-attr.html.
3177 * platform/graphics/skia/GraphicsContextSkia.cpp:
3178 (WebCore::GraphicsContext::clipPath):
3179 * platform/graphics/skia/PlatformContextSkia.cpp:
3180 (PlatformContextSkia::currentPathInLocalCoordinates):
3182 2009-09-24 Brady Eidson <beidson@apple.com>
3184 Reviewed by Sam Weinig.
3186 Merge changes from Mozilla's FTP directory parser.
3187 <rdar://problem/7227620> and https://bugs.webkit.org/show_bug.cgi?id=29294
3189 FTP layout tests not possible at this time.
3190 https://bugs.webkit.org/show_bug.cgi?id=29719 tracks making them possible.
3192 * loader/FTPDirectoryParser.cpp:
3193 (WebCore::ParsingFailed):
3194 (WebCore::parseOneFTPLine):
3196 2009-09-24 Philippe Normand <pnormand@igalia.com>
3198 Reviewed by Gustavo Noronha.
3200 [GTK] re-enable some media tests
3201 https://bugs.webkit.org/show_bug.cgi?id=29716
3203 make canPlayType() return "probably" if mime-type is known
3204 and codecs string is not empty. If codecs is empty return
3207 * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
3208 (WebCore::MediaPlayerPrivate::supportsType):
3210 2009-09-24 Sam Weinig <sam@webkit.org>
3212 Reviewed by Dan Bernstein.
3214 Fix for https://bugs.webkit.org/show_bug.cgi?id=29703
3215 Add a function to element to check whether it matches a CSS selector
3217 Implement Element.webkitMatchesSelector.
3219 * css/CSSSelectorList.cpp:
3220 (WebCore::forEachTagSelector):
3221 (WebCore::forEachSelector):
3222 (WebCore::SelectorNeedsNamespaceResolutionFunctor::operator()):
3223 (WebCore::CSSSelectorList::selectorsNeedNamespaceResolution):
3224 * css/CSSSelectorList.h:
3225 Moved code to iterate the CSSSelectorList and determine if any
3226 selectors need namespace resolution from a static function in
3227 Node.cpp to CSSSelectorList so that it can be used by webkitMatchesSelector
3228 as well as querySelector/querySelectorAll.
3231 (WebCore::Element::webkitMatchesSelector):
3234 Implement the new function. Handles exceptional cases identically to
3235 querySelector/querySelectorAll.
3238 (WebCore::Node::querySelector):
3239 (WebCore::Node::querySelectorAll):
3240 Moved selectorsNeedNamespaceResolution to CSSSelectorList from here.
3242 2009-09-24 Vitaly Repeshko <vitalyr@chromium.org>
3244 Reviewed by Dimitri Glazkov.
3246 [V8] Fixed bindings build after http://trac.webkit.org/changeset/48701
3247 https://bugs.webkit.org/show_bug.cgi?id=29713
3249 Got rid of isWindowEvent in function signatures:
3250 * bindings/v8/V8AbstractEventListener.cpp:
3251 (WebCore::V8AbstractEventListener::invokeEventHandler):
3252 (WebCore::V8AbstractEventListener::handleEvent):
3253 (WebCore::V8AbstractEventListener::getReceiverObject):
3254 * bindings/v8/V8AbstractEventListener.h:
3255 * bindings/v8/V8LazyEventListener.cpp:
3256 (WebCore::V8LazyEventListener::callListenerFunction):
3257 * bindings/v8/V8LazyEventListener.h:
3258 * bindings/v8/V8WorkerContextEventListener.cpp:
3259 (WebCore::V8WorkerContextEventListener::handleEvent):
3260 (WebCore::V8WorkerContextEventListener::callListenerFunction):
3261 (WebCore::V8WorkerContextEventListener::getReceiverObject):
3262 * bindings/v8/V8WorkerContextEventListener.h:
3263 * bindings/v8/custom/V8CustomEventListener.cpp:
3264 (WebCore::V8EventListener::callListenerFunction):
3265 * bindings/v8/custom/V8CustomEventListener.h:
3267 Switched to EventTarget methods of adding/removing listeners:
3268 * bindings/v8/custom/V8DOMApplicationCacheCustom.cpp:
3269 (WebCore::toEventID):
3270 (WebCore::ACCESSOR_SETTER):
3272 * dom/EventTarget.h: Some functions were incorrectly marked
3275 2009-09-24 Pavel Feldman <pfeldman@chromium.org>
3277 Reviewed by Timothy Hatcher.
3279 Web Inspector: Color-code watch expression errors with red.
3281 https://bugs.webkit.org/show_bug.cgi?id=29707
3283 * inspector/front-end/WatchExpressionsSidebarPane.js:
3284 (WebInspector.WatchExpressionsSection.prototype.update):
3285 (WebInspector.WatchExpressionTreeElement.prototype.update):
3286 * inspector/front-end/inspector.css:
3288 2009-09-24 Pavel Feldman <pfeldman@chromium.org>
3290 Reviewed by Timothy Hatcher.
3292 Web Inspector: Fix formatting for messages derived from resource warnings,
3293 couple of drive-by formatting fixes.
3295 https://bugs.webkit.org/show_bug.cgi?id=29705
3297 * inspector/InspectorFrontend.cpp:
3298 (WebCore::InspectorFrontend::addMessageToConsole):
3299 * inspector/front-end/ConsoleView.js:
3300 * inspector/front-end/InjectedScript.js:
3301 (InjectedScript._evaluateAndWrap):
3302 * inspector/front-end/WatchExpressionsSidebarPane.js:
3303 (WebInspector.WatchExpressionsSection.prototype.update):
3305 2009-09-22 Pavel Feldman <pfeldman@chromium.org>
3307 Reviewed by Timothy Hatcher.
3309 WebInspector: Implement InspectorController::copyNode(id).
3311 https://bugs.webkit.org/show_bug.cgi?id=28357
3313 * inspector/InspectorBackend.cpp:
3314 (WebCore::InspectorBackend::copyNode):
3315 * inspector/InspectorBackend.h:
3316 * inspector/InspectorBackend.idl:
3317 * inspector/front-end/ElementsPanel.js:
3318 (WebInspector.ElementsPanel.prototype.handleCopyEvent):
3320 2009-09-24 Oliver Hunt <oliver@apple.com>
3322 Reviewed by NOBODY(rollout)
3324 Roll out r48712 as it is incorrect.
3326 Overriding getPropertyNames is incorrect.
3328 * bridge/runtime_array.cpp:
3329 * bridge/runtime_array.h:
3331 2009-09-24 Xan Lopez <xlopez@igalia.com>
3333 Revert r48697, since it broke key handling notification to GTK+.
3335 * platform/gtk/KeyEventGtk.cpp:
3336 (WebCore::keyIdentifierForGdkKeyCode):
3337 (WebCore::singleCharacterString):
3339 2009-09-24 Philippe Normand <pnormand@igalia.com>
3341 Reviewed by Xan Lopez.
3343 [GTK] GStreamer MediaPlayer is unable to correctly querry duration
3344 https://bugs.webkit.org/show_bug.cgi?id=24639
3346 check duration returned by gst_element_query_duration() only
3347 when using GStreamer < 0.10.23.
3349 * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
3350 (WebCore::MediaPlayerPrivate::duration):
3352 2009-09-24 Benjamin Poulain <benjamin.poulain@nokia.com>
3354 Reviewed by Eric Seidel.
3356 The indices of RuntimeArray should be enumerated like for a regular array.
3357 https://bugs.webkit.org/show_bug.cgi?id=29005
3359 * bridge/runtime_array.cpp:
3360 (JSC::RuntimeArray::getPropertyNames):
3361 * bridge/runtime_array.h:
3363 2009-09-23 Alexander Pavlov <apavlov@chromium.org>
3365 Reviewed by Eric Seidel.
3367 Introduce Pasteboard::writePlaintext(const String&) so that copying
3368 of the inspected elements HTML will be possible in WebInspector.
3369 https://bugs.webkit.org/show_bug.cgi?id=29634
3371 * platform/Pasteboard.h:
3372 * platform/android/TemporaryLinkStubs.cpp:
3373 (Pasteboard::writePlainText):
3374 * platform/chromium/ChromiumBridge.h:
3375 * platform/chromium/PasteboardChromium.cpp:
3376 (WebCore::Pasteboard::writePlainText):
3377 * platform/gtk/PasteboardGtk.cpp:
3378 (WebCore::Pasteboard::writePlainText):
3379 * platform/haiku/PasteboardHaiku.cpp:
3380 (WebCore::Pasteboard::writePlainText):
3381 * platform/mac/PasteboardMac.mm:
3382 (WebCore::Pasteboard::writePlainText):
3383 * platform/qt/PasteboardQt.cpp:
3384 (WebCore::Pasteboard::writePlainText):
3385 * platform/win/PasteboardWin.cpp:
3386 (WebCore::Pasteboard::writeSelection):
3387 (WebCore::Pasteboard::writePlainText):
3388 * platform/wince/PasteboardWince.cpp:
3389 (WebCore::Pasteboard::writePlainText):
3390 * platform/wx/PasteboardWx.cpp:
3391 (WebCore::Pasteboard::writeSelection):
3392 (WebCore::Pasteboard::writePlainText):
3393 (WebCore::Pasteboard::writeURL):
3395 2009-09-24 Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
3397 Reviewed by Simon Hausmann.
3399 Fix QApp::translate() calls to provide the correct class name without
3402 * platform/qt/Localizations.cpp:
3403 (WebCore::localizedMediaTimeDescription):
3405 2009-09-24 Geoffrey Garen <ggaren@apple.com>
3407 More build fix: Removed JSSharedWorkerContextCustom.cpp from project
3408 files, since it no longer exists in the repository.
3413 * WebCore.vcproj/WebCore.vcproj:
3415 2009-09-24 Geoffrey Garen <ggaren@apple.com>
3417 Windows build fix: Declare set/unsetPendingActivity public, so
3418 SharedWorkerScriptLoader can call them.
3420 * dom/ActiveDOMObject.h:
3422 2009-09-24 Geoffrey Garen <ggaren@apple.com>
3424 Fixed a bit of the Windows build.
3426 * workers/SharedWorker.idl: Declare a custom mark function. (I accidentally
3427 removed this in my last patch.)
3428 * WebCore.xcodeproj/project.pbxproj: Added JSSharedWorkerCustom.cpp back
3429 to the build. (I accidentally removed this in my last patch.)
3431 2009-09-23 Geoffrey Garen <ggaren@apple.com>
3433 32-bit build fix: restore previous cast that I thought was unnecessary.
3435 * xml/XMLHttpRequest.cpp:
3436 (WebCore::XMLHttpRequest::didSendData):
3437 (WebCore::XMLHttpRequest::didReceiveData):
3439 2009-09-23 Geoffrey Garen <ggaren@apple.com>
3441 Reviewed by Sam Weinig.
3443 Bring a little sanity to this crazy EventTarget world of ours
3444 https://bugs.webkit.org/show_bug.cgi?id=29701
3446 Lots of EventTarget refactoring to achieve a single shared implementation
3447 that fixes some of the performance and correctness bugs of the many individual
3448 implementations, and makes reasoning about EventTargets and EventListeners
3451 The basic design is this:
3452 - EventTarget manages a set of EventListeners.
3453 - onXXX EventListener attributes forward to standard EventTarget APIs.
3454 - Since the onXXX code is repetitive, it is usually done with macros
3455 of the form DEFINE_ATTRIBUTE_EVENT_LISTENER(attributeName).
3456 - EventTarget provides a shared implementation of dispatchEvent,
3457 which subclasses with special event dispatch rules, like Node, override.
3458 - To support Node, which lazily instantiates its EventTarget data,
3459 EventTarget has no data members, and instead makes a virtual call
3460 to get its data from wherever its subclass chose to store it.
3462 Code that used to call dispatchEvent, passing an ExceptionCode paratmeter,
3463 even though no exception could be thrown, has been changed not to do so,
3464 to improve clarity and performance.
3466 Code that used to call a special dispatchXXXEvent function, which just
3467 turned around and called dispatchEvent, has been changed to call
3468 dispatchEvent, to improve clarity and performance.
3471 * WebCore.xcodeproj/project.pbxproj: Another day in the life of a WebKit
3474 * bindings/js/JSDOMBinding.cpp:
3475 (WebCore::isObservableThroughDOM): Updated for Node API change. Added
3476 "is not in the document but is firing event listeners" as a condition
3477 that makes a Node observable in the DOM, so that event listeners firing
3478 on removed nodes are not destroyed midstream. (This was a long-standing
3479 bug that was somewhat hidden by the old implementation's habit of
3480 copying the RegisteredEventListener vector before firing events, which
3481 would keep almost all the relevant objects from being destroyed.)
3483 * bindings/js/JSEventListener.cpp:
3484 (WebCore::JSEventListener::handleEvent): Removed the isWindowEvent flag
3485 because it was one of the most elaborately planned no-ops in the history
3486 of software crime, and one of the reasons clients thought they needed more
3487 than one dispatchEvent function even though they didn't.
3488 * bindings/js/JSEventListener.h:
3490 * bindings/js/JSDOMWindowCustom.cpp:
3491 (WebCore::JSDOMWindow::markChildren):
3492 (WebCore::JSMessagePort::markChildren):
3493 * bindings/js/JSNodeCustom.cpp:
3494 (WebCore::JSNode::markChildren):
3495 * bindings/js/JSAbstractWorkerCustom.cpp:
3496 * bindings/js/JSDOMApplicationCacheCustom.cpp:
3497 * bindings/js/JSDedicatedWorkerContextCustom.cpp:
3498 * bindings/js/JSEventSourceCustom.cpp:
3499 * bindings/js/JSMessagePortCustom.cpp:
3500 * bindings/js/JSSharedWorkerContextCustom.cpp: Removed.
3501 * bindings/js/JSWebSocketCustom.cpp:
3502 * bindings/js/JSWorkerContextCustom.cpp:
3503 (WebCore::JSWorkerContext::markChildren):
3504 * bindings/js/JSWorkerCustom.cpp:
3505 * bindings/js/JSXMLHttpRequestCustom.cpp:
3506 (WebCore::JSXMLHttpRequest::markChildren):
3507 * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
3508 (WebCore::JSXMLHttpRequestUpload::markChildren): EventListener marking is
3509 now autogenerated. Classes that still have custom mark functions for other
3510 reasons now call a shared EventTarget API to mark their EventListeners.
3512 * bindings/objc/ObjCEventListener.h:
3513 * bindings/objc/ObjCEventListener.mm:
3514 (WebCore::ObjCEventListener::handleEvent): Bye bye isWindowEvent.
3516 * bindings/scripts/CodeGeneratorJS.pm: Autogeneration support for
3517 marking and invalidating event listeners.
3519 * dom/CharacterData.cpp:
3520 (WebCore::CharacterData::dispatchModifiedEvent):
3521 * dom/ContainerNode.cpp:
3522 (WebCore::ContainerNode::insertBefore):
3523 (WebCore::ContainerNode::replaceChild):
3524 (WebCore::willRemoveChild):
3525 (WebCore::ContainerNode::appendChild):
3526 (WebCore::dispatchChildInsertionEvents):
3527 (WebCore::dispatchChildRemovalEvents):
3529 (WebCore::Document::removeAllEventListeners):
3530 (WebCore::Document::implicitClose):
3531 (WebCore::Document::setFocusedNode):
3532 (WebCore::Document::dispatchWindowEvent):
3533 (WebCore::Document::dispatchWindowLoadEvent):
3534 (WebCore::Document::finishedParsing):
3535 * dom/Document.h: Use dispatchEvent directly.
3537 * dom/Element.h: Moved a few event listener attributes down from Node,
3538 since they don't apply to all Nodes, only Elements.
3540 * dom/EventListener.h: Removed isWindowEvent parameter.
3542 * dom/EventNames.h: Added the "display" event name, so it works correctly
3543 with attribute macros, and for performance.
3545 * dom/EventTarget.cpp:
3546 (WebCore::forbidEventDispatch):
3547 (WebCore::allowEventDispatch):
3548 (WebCore::eventDispatchForbidden): Made this code (embarrasingly) thread
3549 safe, since it's now called on multiple threads. (Currently, we only forbid
3550 event dispatch on the main thread. If we ever want to forbid event dispatch
3551 on secondary threads, we can improve it then.)
3553 (WebCore::EventTarget::addEventListener):
3554 (WebCore::EventTarget::removeEventListener):
3555 (WebCore::EventTarget::setAttributeEventListener):
3556 (WebCore::EventTarget::getAttributeEventListener):
3557 (WebCore::EventTarget::clearAttributeEventListener):
3558 (WebCore::EventTarget::dispatchEvent):
3559 (WebCore::EventTarget::fireEventListeners):
3560 (WebCore::EventTarget::getEventListeners):
3561 (WebCore::EventTarget::removeAllEventListeners):
3562 * dom/EventTarget.h:
3563 (WebCore::FiringEventEndIterator::FiringEventEndIterator):
3564 (WebCore::EventTarget::ref):
3565 (WebCore::EventTarget::deref):
3566 (WebCore::EventTarget::markEventListeners):
3567 (WebCore::EventTarget::invalidateEventListeners):
3568 (WebCore::EventTarget::isFiringEventListeners):
3569 (WebCore::EventTarget::hasEventListeners): The ONE TRUE IMPLEMENTATION of
3570 EventTarget APIs, crafted from an amalgam of all the different versions
3571 we used to have. The most significant change here is that we no longer
3572 make a copy of an EventListener vector before firing the events in the
3573 vector -- instead, we use a reference to the original vector, along with
3574 a notification mechanism for the unlikely case when an EventListener is
3575 removed from the vector. This substantially reduces malloc, copying, and
3576 refcount overhead, and complexity.
3578 * dom/InputElement.cpp:
3579 (WebCore::InputElement::setValueFromRenderer):
3580 * dom/MessageEvent.h:
3581 (WebCore::MessageEvent::create): Use dispatchEvent directly.
3583 * dom/MessagePort.cpp:
3584 (WebCore::MessagePort::dispatchMessages):
3585 (WebCore::MessagePort::eventTargetData):
3586 (WebCore::MessagePort::ensureEventTargetData):
3587 * dom/MessagePort.h:
3588 (WebCore::MessagePort::setOnmessage):
3589 (WebCore::MessagePort::onmessage):
3590 * dom/MessagePort.idl: Removed custom EventTarget implementation.
3592 * dom/MutationEvent.h:
3593 (WebCore::MutationEvent::create): Added some default values so callers
3594 can construct MutationEvents more easily, without calling a custom dispatch
3598 (WebCore::Node::addEventListener):
3599 (WebCore::Node::removeEventListener):
3600 (WebCore::Node::eventTargetData):
3601 (WebCore::Node::ensureEventTargetData):
3602 (WebCore::Node::handleLocalEvents):
3603 (WebCore::Node::dispatchEvent):
3604 (WebCore::Node::dispatchGenericEvent):
3605 (WebCore::Node::dispatchSubtreeModifiedEvent):
3606 (WebCore::Node::dispatchUIEvent):
3607 (WebCore::Node::dispatchKeyEvent):
3608 (WebCore::Node::dispatchMouseEvent):
3609 (WebCore::Node::dispatchWheelEvent):
3610 (WebCore::Node::dispatchFocusEvent):
3611 (WebCore::Node::dispatchBlurEvent):
3613 (WebCore::Node::preDispatchEventHandler):
3614 (WebCore::Node::postDispatchEventHandler):
3616 * dom/NodeRareData.h:
3617 (WebCore::NodeRareData::eventTargetData):
3618 (WebCore::NodeRareData::ensureEventTargetData): Use the shared EventTarget
3619 interface, and call dispatchEvent directly instead of custom dispatchXXXEvent
3620 functions that just forwarded to dispatchEvent.
3622 * dom/RegisteredEventListener.cpp:
3623 * dom/RegisteredEventListener.h:
3624 (WebCore::RegisteredEventListener::RegisteredEventListener):
3625 (WebCore::operator==): This is just a simple struct now, since we no longer
3626 do a complicated copy / refCount / isRemoved dance just to honor the rule
3627 that an EventListener can be removed during event dispatch.
3629 * history/CachedFrame.cpp:
3630 (WebCore::CachedFrameBase::restore): Removed another custom dispatchEvent.
3632 * html/HTMLBodyElement.cpp:
3633 * html/HTMLBodyElement.h: Use the shared EventTarget API.
3635 * html/HTMLFormControlElement.cpp:
3636 (WebCore::HTMLFormControlElement::dispatchFormControlChangeEvent):
3637 (WebCore::HTMLFormControlElement::checkValidity):
3638 * html/HTMLFormElement.cpp:
3639 (WebCore::HTMLFormElement::handleLocalEvents):
3640 (WebCore::HTMLFormElement::prepareSubmit):
3641 (WebCore::HTMLFormElement::reset):
3642 * html/HTMLFormElement.h: Use the standard dispatchEvent API.
3644 * html/HTMLFrameSetElement.cpp:
3645 * html/HTMLFrameSetElement.h: Use the shared EventTarget API.
3647 * html/HTMLImageLoader.cpp:
3648 (WebCore::HTMLImageLoader::dispatchLoadEvent):
3649 * html/HTMLInputElement.cpp:
3650 (WebCore::HTMLInputElement::onSearch):
3651 * html/HTMLMediaElement.cpp:
3652 (WebCore::HTMLMediaElement::loadInternal):
3653 * html/HTMLScriptElement.cpp:
3654 (WebCore::HTMLScriptElement::dispatchLoadEvent):
3655 (WebCore::HTMLScriptElement::dispatchErrorEvent):
3656 * html/HTMLSourceElement.cpp:
3657 (WebCore::HTMLSourceElement::errorEventTimerFired):
3658 * html/HTMLTokenizer.cpp:
3659 (WebCore::HTMLTokenizer::notifyFinished): Use the standard dispatchEvent API.
3661 * inspector/InspectorDOMAgent.cpp:
3662 (WebCore::InspectorDOMAgent::handleEvent):
3663 * inspector/InspectorDOMAgent.h:
3664 * inspector/InspectorDOMStorageResource.cpp:
3665 (WebCore::InspectorDOMStorageResource::handleEvent):
3666 * inspector/InspectorDOMStorageResource.h:
3667 * loader/FrameLoader.cpp:
3668 (WebCore::FrameLoader::stopLoading):
3669 (WebCore::FrameLoader::canCachePageContainingThisFrame):
3670 (WebCore::FrameLoader::logCanCacheFrameDecision):
3671 (WebCore::HashChangeEventTask::performTask):
3672 (WebCore::FrameLoader::pageHidden): No more isWindowEvent.
3674 * loader/ImageDocument.cpp:
3675 (WebCore::ImageEventListener::handleEvent):
3676 * loader/appcache/ApplicationCacheGroup.cpp:
3677 (WebCore::CallCacheListenerTask::performTask):
3678 * loader/appcache/ApplicationCacheHost.cpp:
3679 (WebCore::ApplicationCacheHost::notifyDOMApplicationCache):
3680 * loader/appcache/ApplicationCacheHost.h:
3681 * loader/appcache/DOMApplicationCache.cpp:
3682 (WebCore::DOMApplicationCache::eventTargetData):
3683 (WebCore::DOMApplicationCache::ensureEventTargetData):
3684 * loader/appcache/DOMApplicationCache.h:
3685 * loader/appcache/DOMApplicationCache.idl: Switched to the standard
3686 EventTarget API. As a part of this, I switched this class from using a
3687 custom internal event name enumeration to using the standard EventNames.
3689 * notifications/Notification.cpp:
3690 (WebCore::Notification::eventTargetData):
3691 (WebCore::Notification::ensureEventTargetData):
3692 * notifications/Notification.h:
3693 (WebCore::Notification::scriptExecutionContext):
3694 * notifications/Notification.idl: Switched to the standard EventTarget API.
3696 * page/DOMWindow.cpp:
3697 (WebCore::PostMessageTimer::event):
3698 (WebCore::windowsWithUnloadEventListeners):
3699 (WebCore::windowsWithBeforeUnloadEventListeners):
3700 (WebCore::allowsBeforeUnloadListeners):
3701 (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
3702 (WebCore::DOMWindow::pendingUnloadEventListeners):
3703 (WebCore::DOMWindow::dispatchAllPendingUnloadEvents): Changed the "pending"
3704 unload / beforeunload listener tracker just to track which windows had
3705 such listeners, instead of actually keeping a copy of the listeners. Now,
3706 this code can use the standard EventTarget API.
3708 (WebCore::DOMWindow::~DOMWindow):
3709 (WebCore::DOMWindow::postMessageTimerFired):
3710 (WebCore::DOMWindow::addEventListener):
3711 (WebCore::DOMWindow::removeEventListener):
3712 (WebCore::DOMWindow::dispatchLoadEvent):
3713 (WebCore::DOMWindow::dispatchEvent):
3714 (WebCore::DOMWindow::removeAllEventListeners):
3715 (WebCore::DOMWindow::captureEvents):
3716 (WebCore::DOMWindow::releaseEvents):
3717 (WebCore::DOMWindow::eventTargetData):
3718 (WebCore::DOMWindow::ensureEventTargetData):
3720 * page/DOMWindow.idl: Use the standard EventTarget APIs.
3722 * page/EventHandler.cpp:
3723 (WebCore::EventHandler::canMouseDownStartSelect):
3724 (WebCore::EventHandler::canMouseDragExtendSelect):
3725 (WebCore::EventHandler::sendResizeEvent):
3726 (WebCore::EventHandler::sendScrollEvent): Use dispatchEvent directly.
3728 * page/EventSource.cpp:
3729 (WebCore::EventSource::endRequest):
3730 (WebCore::EventSource::didReceiveResponse):
3731 (WebCore::EventSource::parseEventStreamLine):
3732 (WebCore::EventSource::stop):
3733 (WebCore::EventSource::createMessageEvent):
3734 (WebCore::EventSource::eventTargetData):
3735 (WebCore::EventSource::ensureEventTargetData):
3736 * page/EventSource.h:
3737 * page/EventSource.idl: Use the standard EventTarget APIs.
3739 * page/FocusController.cpp:
3740 (WebCore::dispatchEventsOnWindowAndFocusedNode):
3741 (WebCore::FocusController::setFocusedFrame):
3743 (WebCore::Frame::shouldClose):
3746 (WebCore::networkStateChanged):
3747 * page/animation/AnimationController.cpp:
3748 (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
3749 * rendering/RenderListBox.cpp:
3750 (WebCore::RenderListBox::valueChanged):
3751 * rendering/RenderTextControl.cpp:
3752 (WebCore::RenderTextControl::selectionChanged):
3753 * rendering/RenderTextControlMultiLine.cpp:
3754 (WebCore::RenderTextControlMultiLine::subtreeHasChanged): Use dispatchEvent.
3756 * svg/SVGElement.cpp:
3757 (WebCore::hasLoadListener): Rewritten for new EventTarget API.
3759 * svg/SVGElementInstance.cpp:
3760 (WebCore::dummyEventTargetData):
3761 (WebCore::SVGElementInstance::addEventListener):
3762 (WebCore::SVGElementInstance::removeEventListener):
3763 (WebCore::SVGElementInstance::removeAllEventListeners):
3764 (WebCore::SVGElementInstance::dispatchEvent):
3765 (WebCore::SVGElementInstance::eventTargetData):
3766 (WebCore::SVGElementInstance::ensureEventTargetData): Use the EventTarget API.
3768 * svg/SVGElementInstance.h:
3769 * svg/SVGImageLoader.cpp:
3770 (WebCore::SVGImageLoader::dispatchLoadEvent):
3771 * svg/SVGScriptElement.cpp:
3772 (WebCore::SVGScriptElement::dispatchErrorEvent): Use dispatchEvent directly.
3774 * svg/SVGUseElement.cpp:
3775 (WebCore::SVGUseElement::transferEventListenersToShadowTree): Updated for
3776 new EventTarget API.
3778 * svg/animation/SVGSMILElement.cpp:
3779 (WebCore::ConditionEventListener::handleEvent): No more isWindowEvent.
3781 * websockets/WebSocket.cpp:
3782 (WebCore::ProcessWebSocketEventTask::create):
3783 (WebCore::ProcessWebSocketEventTask::performTask):
3784 (WebCore::ProcessWebSocketEventTask::ProcessWebSocketEventTask):
3785 (WebCore::WebSocket::didConnect):
3786 (WebCore::WebSocket::didReceiveMessage):
3787 (WebCore::WebSocket::didClose):
3788 (WebCore::WebSocket::eventTargetData):
3789 (WebCore::WebSocket::ensureEventTargetData):
3790 * websockets/WebSocket.h:
3791 * websockets/WebSocket.idl:
3792 * workers/AbstractWorker.cpp:
3793 (WebCore::AbstractWorker::eventTargetData):
3794 (WebCore::AbstractWorker::ensureEventTargetData):
3795 * workers/AbstractWorker.h:
3796 * workers/AbstractWorker.idl:
3797 * workers/DedicatedWorkerContext.cpp:
3798 * workers/DedicatedWorkerContext.h:
3799 * workers/DedicatedWorkerContext.idl:
3800 * workers/DefaultSharedWorkerRepository.cpp:
3801 (WebCore::SharedWorkerConnectTask::performTask):
3802 (WebCore::SharedWorkerScriptLoader::load):
3803 (WebCore::SharedWorkerScriptLoader::notifyFinished):
3804 * workers/SharedWorker.idl:
3805 * workers/SharedWorkerContext.cpp:
3806 (WebCore::createConnectEvent):
3807 * workers/SharedWorkerContext.h:
3808 * workers/SharedWorkerContext.idl:
3809 * workers/Worker.cpp:
3810 (WebCore::Worker::notifyFinished):
3812 * workers/Worker.idl:
3813 * workers/WorkerContext.cpp:
3814 (WebCore::WorkerContext::eventTargetData):
3815 (WebCore::WorkerContext::ensureEventTargetData):
3816 * workers/WorkerContext.h:
3817 * workers/WorkerContext.idl:
3818 * workers/WorkerMessagingProxy.cpp:
3819 (WebCore::MessageWorkerContextTask::performTask):
3820 (WebCore::MessageWorkerTask::performTask):
3821 (WebCore::WorkerExceptionTask::performTask):
3822 * xml/XMLHttpRequest.cpp:
3823 (WebCore::XMLHttpRequest::callReadyStateChangeListener):
3824 (WebCore::XMLHttpRequest::createRequest):
3825 (WebCore::XMLHttpRequest::abort):
3826 (WebCore::XMLHttpRequest::networkError):
3827 (WebCore::XMLHttpRequest::abortError):
3828 (WebCore::XMLHttpRequest::didSendData):
3829 (WebCore::XMLHttpRequest::didReceiveData):
3830 (WebCore::XMLHttpRequest::eventTargetData):
3831 (WebCore::XMLHttpRequest::ensureEventTargetData):
3832 * xml/XMLHttpRequest.h:
3833 * xml/XMLHttpRequest.idl:
3834 * xml/XMLHttpRequestProgressEvent.h:
3835 (WebCore::XMLHttpRequestProgressEvent::create):
3836 * xml/XMLHttpRequestUpload.cpp:
3837 (WebCore::XMLHttpRequestUpload::eventTargetData):
3838 (WebCore::XMLHttpRequestUpload::ensureEventTargetData):
3839 * xml/XMLHttpRequestUpload.h:
3840 * xml/XMLHttpRequestUpload.idl: Use new EventTarget API.
3842 2009-09-23 Kent Tamura <tkent@chromium.org>
3844 Reviewed by Darin Adler.
3846 - Support for maxLength of <textarea>
3847 - Move numGraphemeClusters() and numCharactersInGraphemeClusters() from InputElement to String.
3848 https://bugs.webkit.org/show_bug.cgi?id=29292
3850 Test: fast/forms/textarea-maxlength.html
3852 * dom/InputElement.cpp:
3853 (WebCore::InputElement::sanitizeUserInputValue):
3854 (WebCore::InputElement::handleBeforeTextInsertedEvent):
3855 * html/HTMLTextAreaElement.cpp:
3856 (WebCore::HTMLTextAreaElement::defaultEventHandler):
3857 (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
3858 (WebCore::HTMLTextAreaElement::sanitizeUserInputValue):
3859 (WebCore::HTMLTextAreaElement::maxLength):
3860 (WebCore::HTMLTextAreaElement::setMaxLength):
3861 * html/HTMLTextAreaElement.h:
3862 * html/HTMLTextAreaElement.idl:
3863 * platform/text/PlatformString.h:
3864 * platform/text/String.cpp:
3865 (WebCore::String::numGraphemeClusters):
3866 (WebCore::String::numCharactersInGraphemeClusters):
3868 2009-09-23 Martin Robinson <martin.james.robinson@gmail.com>
3870 Reviewed by Xan Lopez.
3872 [GTK] REGRESSION: BitmapImage::getGdkPixbuf fails for non-square images
3873 https://bugs.webkit.org/show_bug.cgi?id=29654
3875 Give GDK_Backspace key events the proper text properties.
3877 Instead of adding new tests, this change removes existing tests
3878 from Gtk's skipped list.
3880 * platform/gtk/KeyEventGtk.cpp:
3881 (WebCore::keyIdentifierForGdkKeyCode):
3882 (WebCore::singleCharacterString):
3884 2009-09-23 Sam Weinig <sam@webkit.org>
3886 Reviewed by Adam Barth.
3888 Fix for https://bugs.webkit.org/show_bug.cgi?id=26989
3889 Should allow navigation of top-level openers
3890 <rdar://problem/7034025>
3892 Allow navigation of cross-origin window.opener if it is top-level frame.
3894 Test: http/tests/security/frameNavigation/cross-origin-opener.html
3896 * loader/FrameLoader.cpp:
3897 (WebCore::FrameLoader::shouldAllowNavigation):
3899 2009-09-23 Marshall Culpepper <mculpepper@appcelerator.com>
3901 Reviewed by Eric Seidel.
3903 Added $(WebKitLibrariesDir)/include/cairo so cairo.h is found by
3904 default when the necessary dependencies are extracted into the
3906 https://bugs.webkit.org/show_bug.cgi?id=29661
3908 * WebCore.vcproj/WebCoreCairo.vsprops:
3910 2009-09-23 Darin Adler <darin@apple.com>
3912 Reviewed by Sam Weinig.
3914 Crash when website does a history.back() followed by an alert()
3915 https://bugs.webkit.org/show_bug.cgi?id=29686
3916 rdar://problem/6984996
3918 When loading is deferred, we need to defer timer-based loads
3919 too, not just networking-driven loads. Otherwise we can get
3920 syncronouse navigation while running a script, which leads to
3921 crashes and other badness.
3923 This patch includes a manual test; an automated test may be
3924 possible some time in the future.
3927 (WebCore::Document::processHttpEquiv): Use scheduleLocationChange
3928 instead of scheduleHTTPRedirection to implement the navigation
3929 needed for x-frame-options.
3931 * loader/FrameLoader.cpp:
3932 (WebCore::FrameLoader::FrameLoader): Updated for data members with
3933 new names and new data members.
3934 (WebCore::FrameLoader::setDefersLoading): When turning deferral
3935 off, call startRedirectionTimer and startCheckCompleteTimer, since
3936 either of them might have been fired and ignored while defersLoading
3938 (WebCore::FrameLoader::clear): Updated for replacement of the
3939 m_checkCompletedTimer and m_checkLoadCompleteTimer timers.
3940 (WebCore::FrameLoader::allAncestorsAreComplete): Added.
3941 (WebCore::FrameLoader::checkCompleted): Added code to set
3942 m_shouldCallCheckCompleted to false. Changed code that calls
3943 startRedirectionTimer to call it unconditionally, since that
3944 function now knows when to do work and doesn't expect callers
3945 to handle that any more.
3946 (WebCore::FrameLoader::checkTimerFired): Added. Replaces the old
3947 timer fired callbacks. Calls checkCompleted and checkLoadComplete
3948 as appropriate, but not when defersLoading is true.
3949 (WebCore::FrameLoader::startCheckCompleteTimer): Added. Replaces
3950 the two different calls to start timers before. Only starts the
3951 timers if they are needed.
3952 (WebCore::FrameLoader::scheduleCheckCompleted): Changed to call
3953 startCheckCompleteTimer after setting boolean.
3954 (WebCore::FrameLoader::scheduleCheckLoadComplete): Ditto.
3955 (WebCore::FrameLoader::scheduleHistoryNavigation): Removed
3956 canGoBackOrForward check. The logic works more naturally when
3957 we don't do anything until the timer fires.
3958 (WebCore::FrameLoader::redirectionTimerFired): Do nothing if
3959 defersLoading is true. Also moved canGoBackOrForward check here.
3960 (WebCore::FrameLoader::scheduleRedirection): Changed code that
3961 calls startRedirectionTimer to do so unconditionally. That
3962 function now handles the rules about when to start the timer
3963 rather than expecting the caller to do so.
3964 (WebCore::FrameLoader::startRedirectionTimer): Added code to
3965 handle the case where there is no redirection scheduled,
3966 where the timer is already active, or where this is a classic
3967 redirection and there is an ancestor that has not yet completed
3969 (WebCore::FrameLoader::completed): Call startRedirectionTimer
3970 here directly instead of calling a cover named parentCompleted.
3971 Hooray! One less function in the giant FrameLoader class!
3972 (WebCore::FrameLoader::checkLoadComplete): Added code to set
3973 m_shouldCallCheckLoadComplete to false.
3975 * loader/FrameLoader.h: Replaced the two functions
3976 checkCompletedTimerFired and checkLoadCompleteTimerFired with
3977 one function, checkTimerFired. Removed the parentCompleted
3978 function. Added the startCheckCompleteTimer and
3979 allAncestorsAreComplete functions. Replaced the
3980 m_checkCompletedTimer and m_checkLoadCompleteTimer data
3981 members with m_checkTimer, m_shouldCallCheckCompleted, and
3982 m_shouldCallCheckLoadComplete.
3984 * manual-tests/go-back-after-alert.html: Added.
3985 * manual-tests/resources/alert-and-go-back.html: Added.
3987 2009-09-23 David Kilzer <ddkilzer@apple.com>
3989 <http://webkit.org/b/29660> Move "Generate 64-bit Export File" build phase script into DerivedSources.make
3991 Reviewed by Mark Rowe.
3993 The "Generate 64-bit Export File" build phase script generated
3994 the WebCore.LP64.exp export file used to link 64-bit WebCore.
3995 Instead of having a separate build phase script, move its
3996 generation into DerivedSources.make where WebCore.exp is
3999 * DerivedSources.make: Added a rule to make WebCore.LP64.exp.
4000 Added code to append WebCore.PluginHostProcess.exp to
4001 $(WEBCORE_EXPORT_DEPENDENCIES) when WTF_USE_PLUGIN_HOST_PROCESS
4003 * WebCore.PluginHostProcess.exp: Renamed from WebCore/WebCore.LP64.exp.
4004 * WebCore.xcodeproj/project.pbxproj: Removed the "Generate
4005 64-bit Export File" build phase script. Renamed WebCore.LP64.exp
4006 to WebCore.PluginHostProcess.exp.
4008 2009-09-23 Peter Kasting <pkasting@google.com>
4010 Reviewed by Dimitri Glazkov.
4012 https://bugs.webkit.org/show_bug.cgi?id=29694
4013 [Chromium] Eliminate dependency on gfx::Rect from ImageSkia.
4015 * platform/graphics/skia/ImageSkia.cpp:
4016 (WebCore::drawResampledBitmap):
4018 2009-09-22 Timothy Hatcher <timothy@apple.com>
4020 Prevent scrolling multiple elements during latched wheel events.
4022 Reviewed by Anders Carlsson.
4024 * page/EventHandler.cpp:
4025 (WebCore::scrollAndAcceptEvent):
4026 (WebCore::EventHandler::clear):
4027 (WebCore::EventHandler::handleWheelEvent):
4028 * page/EventHandler.h:
4029 * rendering/RenderBox.cpp:
4030 (WebCore::RenderBox::scroll):
4031 * rendering/RenderBox.h:
4033 2009-09-23 Daniel Bates <dbates@webkit.org>
4035 Reviewed by Adam Barth.
4037 https://bugs.webkit.org/show_bug.cgi?id=29523
4039 Fixes an issue where a JavaScript URL that was URL-encoded twice can bypass the
4042 The method FrameLoader::executeIfJavaScriptURL decodes the URL escape
4043 sequences in a JavaScript URL before it is eventually passed to the XSSAuditor.
4044 Because the XSSAuditor also decodes the URL escape sequences as part of its
4045 canonicalization, the double decoding of a JavaScript URL would
4046 not match the canonicalization of the input parameters.
4048 Tests: http/tests/security/xssAuditor/iframe-javascript-url-url-encoded.html
4049 http/tests/security/xssAuditor/javascript-link-url-encoded.html
4051 * bindings/js/ScriptController.cpp:
4052 (WebCore::ScriptController::evaluate): Moved call to
4053 XSSAuditor::canEvaluateJavaScriptURL into FrameLoader::executeIfJavaScriptURL.
4054 * bindings/v8/ScriptController.cpp:
4055 (WebCore::ScriptController::evaluate): Ditto.
4056 * loader/FrameLoader.cpp:
4057 (WebCore::FrameLoader::executeIfJavaScriptURL): Modified to call
4058 XSSAuditor::canEvaluateJavaScriptURL on the JavaScript URL before it is
4061 2009-09-22 Dave Hyatt <hyatt@apple.com>
4063 Reviewed by John Sullivan.
4065 https://bugs.webkit.org/show_bug.cgi?id=29657
4066 Columns don't break properly in positioned elements with a fixed height. Make sure that
4067 a block is still considered to have columns even when the column count is 1 if the column
4070 Added fast/multicol/positioned-with-constrained-height.html
4072 * rendering/RenderBlock.cpp:
4073 (WebCore::RenderBlock::setDesiredColumnCountAndWidth):
4075 2009-09-23 Holger Hans Peter Freyther <zecke@selfish.org>
4077 Rubber-stamped by Simon Hausmann.
4079 Add a null check for the Document*. In the mirror benchmarking
4080 application a crash from a call from JavaScript was observed.
4082 I was not able to come up with a test case for this issue.
4084 * platform/qt/CookieJarQt.cpp:
4085 (WebCore::cookieJar):
4087 2009-09-23 Simon Hausmann <simon.hausmann@nokia.com>
4089 Reviewed by Tor Arne Vestbø.
4091 Fix the Qt/Windows build, after the introduction of
4094 * plugins/win/PluginViewWin.cpp:
4095 (windowHandleForPageClient):
4096 (WebCore::PluginView::getValue):
4097 (WebCore::PluginView::forceRedraw):
4098 (WebCore::PluginView::platformStart):
4100 2009-09-23 Gustavo Noronha Silva <gns@gnome.org>
4102 Reviewed by Xan Lopez.
4104 [GTK] media tests failing after their rework
4105 https://bugs.webkit.org/show_bug.cgi?id=29532
4107 Correctly advertise the mime types used by the common formats used
4110 Tests that regressed, and will pass again:
4112 media/video-canvas-source.html
4113 media/video-controls.html
4114 media/video-currentTime-set2.html
4115 media/video-dom-autoplay.html
4116 media/video-dom-src.html
4117 media/video-error-abort.html
4118 media/video-load-networkState.html
4119 media/video-load-readyState.html
4120 media/video-muted.html
4121 media/video-no-autoplay.html
4122 media/video-pause-empty-events.html
4123 media/video-play-empty-events.html
4124 media/video-seekable.html
4125 media/video-seeking.html
4126 media/video-size.html
4127 media/video-source-type-params.html
4128 media/video-source-type.html
4129 media/video-source.html
4130 media/video-src-change.html
4131 media/video-src-invalid-remove.html
4132 media/video-src-remove.html
4133 media/video-src-set.html
4134 media/video-src-source.html
4135 media/video-src.html
4136 media/video-timeupdate-during-playback.html
4137 media/video-volume.html
4139 * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
4140 (WebCore::mimeTypeCache):
4142 2009-09-22 Charles Wei <charles.wei@torchmobile.com.cn>
4144 Reviewed by Eric Seidel.
4146 Fix the crash problem with absolte positioned children in foreignobject
4147 htts://bugs.webkit.org/show_bug.cgi?id=26342
4149 Test: svg/custom/foreignobject-crash-with-absolute-positioned-children.svg
4151 * rendering/RenderForeignObject.h:
4152 (WebCore::RenderForeignObject::isSVGForeignObject):
4153 * rendering/RenderObject.cpp:
4154 (WebCore::RenderObject::containingBlock):
4155 * rendering/RenderObject.h:
4156 (WebCore::RenderObject::isSVGForeignObject):
4158 2009-09-22 Drew Wilson <atwilson@google.com>
4160 Reviewed by David Levin.
4162 SharedWorkers "name" attribute is now optional.
4163 https://bugs.webkit.org/show_bug.cgi?id=28897
4165 Test: fast/workers/shared-worker-name.html
4167 * bindings/js/JSSharedWorkerConstructor.cpp:
4168 (WebCore::constructSharedWorker):
4169 Default 'name' attribute to empty string if it is not provided.
4170 * bindings/v8/custom/V8SharedWorkerCustom.cpp:
4171 (WebCore::CALLBACK_FUNC_DECL):
4172 Default 'name' attribute to empty string if it is not provided.
4173 * workers/DefaultSharedWorkerRepository.cpp:
4174 (WebCore::SharedWorkerProxy::matches):
4175 Now matches URLs if names are empty strings.
4176 (WebCore::DefaultSharedWorkerRepository::getProxy):
4177 Pass URL in to SharedWorkerProxy::matches().
4179 2009-09-22 Dimitri Glazkov <dglazkov@chromium.org>
4181 Unreviewed, another build fix.
4183 [Chromium] Add another missing include.
4184 https://bugs.webkit.org/show_bug.cgi?id=29536
4186 * inspector/InspectorController.cpp: Added DOMWindow.h include.
4188 2009-09-22 Dimitri Glazkov <dglazkov@chromium.org>
4190 Unreviewed, build fix.
4192 [Chromium] Add missing include.
4193 https://bugs.webkit.org/show_bug.cgi?id=29536
4195 * inspector/InspectorDOMStorageResource.cpp: Added DOMWindow.h include.
4197 2009-09-22 Darin Adler <darin@apple.com>
4199 Reviewed by Sam Weinig.
4201 Tighten up the ScheduledRedirection machinery to prepare for a bug fix
4202 https://bugs.webkit.org/show_bug.cgi?id=29663
4204 * loader/FrameLoader.cpp:
4205 (WebCore::ScheduledRedirection::ScheduledRedirection): Added a boolean,
4206 initialized to false, to keep track if the redirection has been
4207 communicated to the client.
4208 (WebCore::FrameLoader::stopLoading): Tweaked a comment.
4209 (WebCore::FrameLoader::cancelRedirection): Removed code to clear
4210 m_scheduledRedirection.clear since stopRedirectionTimer does that now.
4211 (WebCore::FrameLoader::allChildrenAreComplete): Added.
4212 (WebCore::FrameLoader::checkCompleted): Use allChildrenAreComplete
4213 function for clarity.
4214 (WebCore::FrameLoader::checkCallImplicitClose): Ditto.
4215 (WebCore::FrameLoader::scheduleRedirection): Changed to take a PassOwnPtr.
4216 (WebCore::FrameLoader::startRedirectionTimer): Added code to set the
4217 toldClient flag and not call clientRedirected a second time if it is set.
4218 (WebCore::FrameLoader::stopRedirectionTimer): Changed so this can be safely
4219 called multiple times and it will call clientRedirectCancelledOrFinished