1 2009-10-02 Adam Barth <abarth@webkit.org>
3 Unreviewed build fix. Actually add the new files.
5 * loader/RedirectScheduler.cpp: Added.
6 (WebCore::ScheduledRedirection::):
7 (WebCore::ScheduledRedirection::ScheduledRedirection):
8 (WebCore::RedirectScheduler::RedirectScheduler):
9 (WebCore::RedirectScheduler::~RedirectScheduler):
10 (WebCore::RedirectScheduler::redirectScheduledDuringLoad):
11 (WebCore::RedirectScheduler::clear):
12 (WebCore::RedirectScheduler::scheduleRedirect):
13 (WebCore::RedirectScheduler::mustLockBackForwardList):
14 (WebCore::RedirectScheduler::scheduleLocationChange):
15 (WebCore::RedirectScheduler::scheduleFormSubmission):
16 (WebCore::RedirectScheduler::scheduleRefresh):
17 (WebCore::RedirectScheduler::locationChangePending):
18 (WebCore::RedirectScheduler::scheduleHistoryNavigation):
19 (WebCore::RedirectScheduler::timerFired):
20 (WebCore::RedirectScheduler::schedule):
21 (WebCore::RedirectScheduler::startTimer):
22 (WebCore::RedirectScheduler::cancel):
23 * loader/RedirectScheduler.h: Added.
25 2009-10-01 Adam Barth <abarth@webkit.org>
27 Reviewed by Darin Adler.
29 Move RedirectScheduler to its own file
30 https://bugs.webkit.org/show_bug.cgi?id=29952
32 This change is purely code motion.
39 * WebCore.vcproj/WebCore.vcproj:
40 * WebCore.xcodeproj/project.pbxproj:
42 * loader/FrameLoader.cpp:
43 * loader/FrameLoader.h:
44 * loader/RedirectScheduler.cpp: Added.
45 (WebCore::ScheduledRedirection::):
46 (WebCore::ScheduledRedirection::ScheduledRedirection):
47 (WebCore::RedirectScheduler::RedirectScheduler):
48 (WebCore::RedirectScheduler::~RedirectScheduler):
49 (WebCore::RedirectScheduler::redirectScheduledDuringLoad):
50 (WebCore::RedirectScheduler::clear):
51 (WebCore::RedirectScheduler::scheduleRedirect):
52 (WebCore::RedirectScheduler::mustLockBackForwardList):
53 (WebCore::RedirectScheduler::scheduleLocationChange):
54 (WebCore::RedirectScheduler::scheduleFormSubmission):
55 (WebCore::RedirectScheduler::scheduleRefresh):
56 (WebCore::RedirectScheduler::locationChangePending):
57 (WebCore::RedirectScheduler::scheduleHistoryNavigation):
58 (WebCore::RedirectScheduler::timerFired):
59 (WebCore::RedirectScheduler::schedule):
60 (WebCore::RedirectScheduler::startTimer):
61 (WebCore::RedirectScheduler::cancel):
62 * loader/RedirectScheduler.h: Added.
64 2009-10-02 Dave MacLachlan <dmaclach@gmail.com>
66 Reviewed by David Levin.
68 Clean up warnings in WebCore/bindings/v8/npruntime.cpp
69 https://bugs.webkit.org/show_bug.cgi?id=29971
71 Gets rid of warnings on gcc about using anonymous namespaces
72 warning: 'StringKeyHashTraits' has a base
73 'WTF::GenericHashTraits<<unnamed>::StringKey>'
74 whose type uses the anonymous namespace
76 warning: 'WTF::PairHashTraits<StringKeyHashTraits,
77 WTF::HashTraits<PrivateIdentifier*> >' has a base
78 'WTF::GenericHashTraits<std::pair<<unnamed>::StringKey,
79 PrivateIdentifier*> >' whose type uses the anonymous namespace
83 * bindings/v8/npruntime.cpp:
85 2009-10-01 Mark Rowe <mrowe@apple.com>
87 Fix the Tiger build. Don't unconditionally enable 3D canvas as it is not supported on Tiger.
89 * Configurations/FeatureDefines.xcconfig:
91 2009-10-01 Chris Marrin <cmarrin@apple.com>
93 Reviewed by Oliver Hunt.
95 Turn on ENABLE_3D_CANVAS in TOT
96 https://bugs.webkit.org/show_bug.cgi?id=29906
98 Fixed a bug found when running tests with flag on
100 * Configurations/FeatureDefines.xcconfig:
102 * bindings/js/JSCanvasArrayBufferConstructor.h:
103 (WebCore::construct):
104 * html/HTMLCanvasElement.cpp:
105 (WebCore::HTMLCanvasElement::getContext):
106 * html/canvas/CanvasArray.cpp:
107 (WebCore::CanvasArray::CanvasArray):
108 * html/canvas/CanvasByteArray.cpp:
109 (WebCore::CanvasByteArray::create):
110 * html/canvas/CanvasFloatArray.cpp:
111 (WebCore::CanvasFloatArray::create):
112 * html/canvas/CanvasIntArray.cpp:
113 (WebCore::CanvasIntArray::create):
114 * html/canvas/CanvasShortArray.cpp:
115 (WebCore::CanvasShortArray::create):
116 * html/canvas/CanvasUnsignedByteArray.cpp:
117 (WebCore::CanvasUnsignedByteArray::create):
118 * html/canvas/CanvasUnsignedIntArray.cpp:
119 (WebCore::CanvasUnsignedIntArray::create):
120 * html/canvas/CanvasUnsignedShortArray.cpp:
121 (WebCore::CanvasUnsignedShortArray::create):
123 (WebCore::Settings::Settings):
124 (WebCore::Settings::setWebGLEnabled):
126 (WebCore::Settings::webGLEnabled):
128 2009-10-01 Beth Dakin <bdakin@apple.com>
130 Reviewed by Dan Bernstein.
132 Fix for <rdar://problem/7264725> Re-add a vendor prefix to box-
135 https://bugs.webkit.org/show_bug.cgi?id=29927
137 * css/CSSComputedStyleDeclaration.cpp:
139 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
141 (WebCore::CSSParser::parseValue):
142 (WebCore::ShadowParseContext::ShadowParseContext):
143 (WebCore::ShadowParseContext::commitValue):
144 (WebCore::ShadowParseContext::commitLength):
145 (WebCore::ShadowParseContext::commitColor):
146 (WebCore::cssPropertyID):
147 * css/CSSPropertyNames.in:
148 * css/CSSStyleSelector.cpp:
149 (WebCore::CSSStyleSelector::applyProperty):
150 * page/animation/AnimationBase.cpp:
151 (WebCore::ensurePropertyMap):
153 2009-10-01 Beth Dakin <bdakin@apple.com>
155 Rubber-stamped by Sam Weinig.
157 At bad merge at some point in the development of my patch must have
158 put TextRenderMode.h in a weird spot in the xcodeproj. Moving it
159 back where it belongs!
161 * WebCore.xcodeproj/project.pbxproj:
163 2009-09-30 Adam Barth <abarth@webkit.org>
165 Reviewed by Darin Adler.
167 Remove FrameLoader::schedule* APIs
168 https://bugs.webkit.org/show_bug.cgi?id=29950
170 Change clients of FrameLoader::schedule* to call redirectScheduler
175 * bindings/js/JSDOMWindowCustom.cpp:
176 (WebCore::JSDOMWindow::setLocation):
177 (WebCore::createWindow):
178 (WebCore::JSDOMWindow::open):
179 * bindings/js/JSDocumentCustom.cpp:
180 (WebCore::JSDocument::setLocation):
181 * bindings/js/JSLocationCustom.cpp:
182 (WebCore::navigateIfAllowed):
183 (WebCore::JSLocation::reload):
184 * bindings/v8/V8Utilities.cpp:
185 (WebCore::navigateIfAllowed):
186 * bindings/v8/custom/V8DOMWindowCustom.cpp:
187 (WebCore::createWindow):
188 (WebCore::CALLBACK_FUNC_DECL):
189 * bindings/v8/custom/V8LocationCustom.cpp:
190 (WebCore::CALLBACK_FUNC_DECL):
192 (WebCore::Document::implicitClose):
193 (WebCore::Document::processHttpEquiv):
194 * html/HTMLTokenizer.cpp:
195 (WebCore::HTMLTokenizer::write):
196 * loader/FrameLoader.cpp:
197 (WebCore::FrameLoader::requestFrame):
198 (WebCore::FrameLoader::submitForm):
199 (WebCore::FrameLoader::receivedFirstData):
200 * loader/FrameLoader.h:
201 * loader/appcache/ApplicationCacheGroup.cpp:
202 (WebCore::ApplicationCacheGroup::selectCache):
204 (WebCore::History::back):
205 (WebCore::History::forward):
206 (WebCore::History::go):
208 2009-10-01 Beth Dakin <bdakin@apple.com>
210 Just removing a comment I accidentally committed earlier.
212 * platform/graphics/mac/SimpleFontDataMac.mm:
213 (WebCore::SimpleFontData::getCFStringAttributes):
215 2009-09-30 Jeremy Orlow <jorlow@chromium.org>
217 Reviewed by Darin Adler.
219 Clean up use of const and mutable in StorageMap
220 https://bugs.webkit.org/show_bug.cgi?id=29933
222 What's the point of having every single member variable be mutable and nearly
223 every method be const? Let's clean it up.
225 * storage/StorageMap.cpp:
226 (WebCore::StorageMap::setIteratorToIndex):
227 (WebCore::StorageMap::key):
228 (WebCore::StorageMap::importItem):
229 * storage/StorageMap.h:
231 2009-10-01 Beth Dakin <bdakin@apple.com>
233 Reviewed by Dave Hyatt.
235 Fix for <rdar://problem/6934421> Support CSS for Text Kerning and
238 https://bugs.webkit.org/show_bug.cgi?id=6136
240 This patch makes the SVG CSS property text-rendering work with any
241 HTML, much like it does in Firefox. It accepts four possible input
242 values: auto, optimizeSpeed, optimizeLegibility, and
243 geometricPrecision. Right now, in this implementation, here is what
244 those values correspond to:
246 auto = optimizeSpeed = what we normally when the value's not set
247 optimizeLegibility = geometricPrecision = ligatures + kerning
249 Add new file TextRenderingMode.h to the project files.
250 * WebCore.vcproj/WebCore.vcproj:
251 * WebCore.xcodeproj/project.pbxproj:
253 CSS support for the new CSSPropertyTextRendering
254 * css/CSSComputedStyleDeclaration.cpp:
256 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
258 (WebCore::CSSParser::parseValue):
259 * css/CSSPrimitiveValueMappings.h:
260 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
261 (WebCore::CSSPrimitiveValue::operator TextRenderingMode):
262 * css/CSSPropertyNames.in:
263 * css/CSSStyleSelector.cpp:
264 (WebCore::CSSStyleSelector::applyProperty):
265 * css/CSSValueKeywords.in:
267 All the old SVG CSS support for this property can go away. When
268 it's used in SVG, it will just fall into the normal HTML case.
269 * css/SVGCSSComputedStyleDeclaration.cpp:
270 (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue):
271 * css/SVGCSSParser.cpp:
272 (WebCore::CSSParser::parseSVGValue):
273 * css/SVGCSSPropertyNames.in:
274 * css/SVGCSSStyleSelector.cpp:
275 (WebCore::CSSStyleSelector::applySVGProperty):
276 * css/SVGCSSValueKeywords.in:
278 FontDescription stores the m_textRendering bit.
279 * platform/graphics/FontDescription.h:
280 (WebCore::FontDescription::FontDescription):
281 (WebCore::FontDescription::textRenderingMode):
282 (WebCore::FontDescription::setTextRenderingMode):
283 (WebCore::FontDescription::operator==):
285 We want to fall into the complex text rendering code path if
286 kerning and ligatures have been enabled with this property.
287 * platform/graphics/FontFastPath.cpp:
288 (WebCore::Font::canUseGlyphCache):
290 Now takes a TextRenderingMode as a parameter.
291 * platform/graphics/SimpleFontData.h:
293 New header for the enum.
294 * platform/graphics/TextRenderingMode.h: Added.
297 getCFStringAttributes() now takes a TextRenderingMode as an
299 * platform/graphics/mac/CoreTextController.cpp:
300 (WebCore::CoreTextController::collectCoreTextRunsForCharacters):
302 Enable kerning and ligatures whenever the TextRenderingMode is
303 OptimizeLegibility or GeometricPrecision
304 * platform/graphics/mac/FontMacATSUI.mm:
305 (WebCore::disableLigatures):
306 (WebCore::initializeATSUStyle):
307 (WebCore::ATSULayoutParameters::initialize):
308 * platform/graphics/mac/SimpleFontDataMac.mm:
309 (WebCore::SimpleFontData::getCFStringAttributes):
311 More SVG CSS stuff that isn't needed anymore since SVG will use the
312 new HTML CSS implementation.
313 * rendering/style/SVGRenderStyle.h:
314 (WebCore::SVGRenderStyle::InheritedFlags::operator==):
315 (WebCore::SVGRenderStyle::setBitDefaults):
316 * rendering/style/SVGRenderStyleDefs.h:
318 2009-10-01 Yury Semikhatsky <yurys@chromium.org>
320 Reviewed by Timothy Hatcher.
322 Use isClosure property of scope proxy to decide whether the
325 https://bugs.webkit.org/show_bug.cgi?id=29965
327 * inspector/front-end/ScopeChainSidebarPane.js:
328 (WebInspector.ScopeChainSidebarPane.prototype.update):
330 2009-10-01 Simon Fraser <simon.fraser@apple.com>
332 Reviewed by Dave Hyatt.
334 Odd color transitions on anchors with transition-property: all
335 https://bugs.webkit.org/show_bug.cgi?id=29911
337 When transitioning maybe-invalid colors, if the source and destination
338 color are both invalid, then don't animate.
340 This fixes an issue where a child element of an element running a color
341 transition, with -webkit-transition-property:all, would show a color change.
342 This happened because the "maybe invalid color" logic copied the color style
343 into -webkit-text-fill-color for both endpoints, causing -webkit-text-fill-color
344 to animate while the transition ran, and to then to disappear when the transition
347 Test: transitions/color-transition-all.html
349 * page/animation/AnimationBase.cpp:
350 (WebCore::PropertyWrapperMaybeInvalidColor::equals):
351 (WebCore::PropertyWrapperMaybeInvalidColor::blend):
353 2009-10-01 Victor Wang <victorw@chromium.org>
355 Reviewed by Oliver Hunt.
357 Allow dragging a node who has child nodes.
359 https://bugs.webkit.org/show_bug.cgi?id=28632
361 Test: fast/events/drag-parent-node.html
363 * page/EventHandler.cpp:
364 (WebCore::EventHandler::shouldDragAutoNode):
366 2009-10-01 Philippe Normand <pnormand@igalia.com>
368 Reviewed by Gustavo Noronha.
370 [GTK] media player: better mute support
371 https://bugs.webkit.org/show_bug.cgi?id=29960
373 Handle volume and mute state with the two corresponding properties
376 * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
377 (WebCore::MediaPlayerPrivate::setMuted):
378 (WebCore::MediaPlayerPrivate::setVolume):
380 2009-10-01 Philippe Normand <pnormand@igalia.com>
382 Reviewed by Gustavo Noronha.
384 [GTK] video sink pad template colorspace is wrong
385 https://bugs.webkit.org/show_bug.cgi?id=29953
387 Set sink pad template colorspace depending on byte order.
389 * platform/graphics/gtk/VideoSinkGStreamer.cpp:
390 (webkit_video_sink_idle_func):
392 2009-10-01 Vitaly Repeshko <vitalyr@chromium.org>
394 Reviewed by Dimitri Glazkov.
396 [V8] Refactored V8 event listeners:
397 (This change should fix http://crbug.com/21079 and
398 https://bugs.webkit.org/show_bug.cgi?id=29093.)
399 o All listeners use weak handles to JS objects to avoid creating
400 cycles and leaking memory.
401 o "Object" variants of listeners removed.
402 o All event accessor callbacks are generated.
403 o Custom event accessors removed.
404 o All wrappers have hidden dependencies on their listeners to
405 prevent listeners from being collected.
406 o All variats of getEventListener function grouped in V8DOMWrapper.
407 o Pointers to C++ EventListener wrappers are stored in JS objects
408 instead of event listener lists.
409 https://bugs.webkit.org/show_bug.cgi?id=29825
411 * WebCore.gypi: Removed "Object" listeners.
412 * bindings/scripts/CodeGeneratorV8.pm: Now handles event accessors.
413 * bindings/v8/DOMObjectsInclude.h:
415 V8AbstractEventListener manages weak JS handle:
416 * bindings/v8/V8AbstractEventListener.cpp:
417 (WebCore::weakEventListenerCallback):
418 (WebCore::V8AbstractEventListener::V8AbstractEventListener):
419 (WebCore::V8AbstractEventListener::~V8AbstractEventListener):
420 (WebCore::V8AbstractEventListener::handleEvent):
421 (WebCore::V8AbstractEventListener::disposeListenerObject):
422 (WebCore::V8AbstractEventListener::setListenerObject):
423 * bindings/v8/V8AbstractEventListener.h:
424 (WebCore::V8AbstractEventListener::cast):
425 (WebCore::V8AbstractEventListener::isLazy):
426 (WebCore::V8AbstractEventListener::getListenerObject):
427 (WebCore::V8AbstractEventListener::getExistingListenerObject):
428 (WebCore::V8AbstractEventListener::hasExistingListenerObject):
429 (WebCore::V8AbstractEventListener::disconnectFrame):
430 (WebCore::V8AbstractEventListener::disconnected):
431 (WebCore::V8AbstractEventListener::prepareListenerObject):
432 (WebCore::V8AbstractEventListener::lineNumber):
433 (WebCore::V8AbstractEventListener::virtualisAttribute):
435 Grouped getEventListener functions:
436 * bindings/v8/V8DOMWrapper.cpp:
437 (WebCore::V8DOMWrapper::getTemplate):
438 (WebCore::V8DOMWrapper::getEventListener):
439 * bindings/v8/V8DOMWrapper.h:
441 Removed most event listener objects bookkeeping:
442 * bindings/v8/V8EventListenerList.cpp:
443 * bindings/v8/V8EventListenerList.h:
444 (WebCore::V8EventListenerList::findWrapper):
445 (WebCore::V8EventListenerList::clearWrapper):
446 (WebCore::V8EventListenerList::doFindWrapper):
447 (WebCore::V8EventListenerList::getHiddenProperty):
448 (WebCore::V8EventListenerList::findOrCreateWrapper):
450 Added hidden properties for storing EventListener wrappers:
451 * bindings/v8/V8HiddenPropertyName.cpp:
452 (WebCore::V8HiddenPropertyName::listener):
453 (WebCore::V8HiddenPropertyName::attributeListener):
454 * bindings/v8/V8HiddenPropertyName.h:
456 * bindings/v8/V8LazyEventListener.cpp:
457 (WebCore::V8LazyEventListener::V8LazyEventListener):
458 (WebCore::V8LazyEventListener::callListenerFunction):
459 (WebCore::V8LazyEventListener::prepareListenerObject):
460 * bindings/v8/V8LazyEventListener.h:
461 (WebCore::V8LazyEventListener::isLazy):
462 * bindings/v8/V8ObjectEventListener.cpp: Removed.
463 * bindings/v8/V8ObjectEventListener.h: Removed.
464 * bindings/v8/V8Proxy.cpp:
465 (WebCore::V8Proxy::disconnectFrame):
466 (WebCore::V8Proxy::disconnectEventListeners):
467 * bindings/v8/V8Proxy.h:
468 * bindings/v8/V8WorkerContextEventListener.cpp:
469 (WebCore::V8WorkerContextEventListener::reportError):
470 (WebCore::V8WorkerContextEventListener::getReceiverObject):
471 * bindings/v8/V8WorkerContextEventListener.h:
472 * bindings/v8/V8WorkerContextObjectEventListener.cpp: Removed.
473 * bindings/v8/V8WorkerContextObjectEventListener.h: Removed.
474 * bindings/v8/WorkerContextExecutionProxy.cpp:
475 (WebCore::WorkerContextExecutionProxy::dispose):
476 (WebCore::WorkerContextExecutionProxy::initContextIfNeeded):
477 (WebCore::WorkerContextExecutionProxy::findOrCreateEventListener):
478 * bindings/v8/WorkerContextExecutionProxy.h:
479 * bindings/v8/custom/V8AbstractWorkerCustom.cpp:
480 (WebCore::CALLBACK_FUNC_DECL):
481 * bindings/v8/custom/V8CustomBinding.h:
482 * bindings/v8/custom/V8CustomEventListener.cpp:
483 (WebCore::V8EventListener::V8EventListener):
484 (WebCore::V8EventListener::getListenerFunction):
485 (WebCore::V8EventListener::callListenerFunction):
486 * bindings/v8/custom/V8CustomEventListener.h:
487 * bindings/v8/custom/V8DOMApplicationCacheCustom.cpp:
488 (WebCore::CALLBACK_FUNC_DECL):
489 * bindings/v8/custom/V8DOMWindowCustom.cpp:
490 (WebCore::CALLBACK_FUNC_DECL):
491 * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
492 * bindings/v8/custom/V8MessagePortCustom.cpp:
493 (WebCore::getEventListener):
494 (WebCore::CALLBACK_FUNC_DECL):
495 * bindings/v8/custom/V8NodeCustom.cpp:
496 (WebCore::CALLBACK_FUNC_DECL):
497 * bindings/v8/custom/V8NotificationCenterCustom.cpp:
498 (WebCore::CALLBACK_FUNC_DECL):
499 * bindings/v8/custom/V8SVGElementInstanceCustom.cpp:
500 (WebCore::CALLBACK_FUNC_DECL):
501 * bindings/v8/custom/V8WebSocketCustom.cpp:
502 * bindings/v8/custom/V8WorkerContextCustom.cpp:
503 (WebCore::CALLBACK_FUNC_DECL):
504 * bindings/v8/custom/V8WorkerCustom.cpp:
505 * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
506 * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
507 (WebCore::CALLBACK_FUNC_DECL):
508 * bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp:
510 2009-10-01 Alexis Menard <alexis.menard@nokia.com>
512 Reviewed by Tor Arne Vestbø.
514 Rename QWebGraphicsItem to QGraphicsWebView
518 2009-10-01 Dumitru Daniliuc <dumi@chromium.org>
520 Reviewed by Dimitri Glazkov.
522 Read-only transactions do not change file sizes and therefore
523 should not trigger quota updates.
525 https://bugs.webkit.org/show_bug.cgi?id=29945
527 * storage/SQLTransaction.cpp:
528 (WebCore::SQLTransaction::openTransactionAndPreflight):
529 (WebCore::SQLTransaction::runStatements):
531 2009-09-30 Timothy Hatcher <timothy@apple.com>
533 Fix list box scrolling by correctly overriding the scroll()
534 function on RenderBox.
536 <rdar://problem/7255440> REGRESSION (r48683): Mousewheel scrolling
537 of listboxes is broken (29756)
539 Reviewed by Dan Bernstein.
541 * rendering/RenderListBox.cpp:
542 (WebCore::RenderListBox::scroll):
543 * rendering/RenderListBox.h:
544 * rendering/RenderTextControlSingleLine.cpp:
545 (WebCore::RenderTextControlSingleLine::scroll):
546 * rendering/RenderTextControlSingleLine.h:
548 2009-10-01 Yury Semikhatsky <yurys@chromium.org>
550 Reviewed by Timothy Hatcher.
552 Make a copy of listeners array before dispatching an event in
553 WebInspector.Object.prototype.dispatchEventToListeners. Otherwise if current
554 listener removes itself from the array next listener will be skipped.
556 https://bugs.webkit.org/show_bug.cgi?id=29920
558 * inspector/front-end/Object.js:
559 (WebInspector.Object.prototype.dispatchEventToListeners): make a copy of listeners array before dispatching an event
561 2009-10-01 Martin Robinson <martin.james.robinson@gmail.com>
563 Reviewed by Xan Lopez.
565 [GTK] GtkIMContext filtering interferes with DOM key events
566 https://bugs.webkit.org/show_bug.cgi?id=28733
568 Ensure that keyboard events filtered by the GtkIMContext still create
569 the proper DOM events.
571 No tests added. Instead previously skipped tests have been enabled.
573 * platform/gtk/KeyEventGtk.cpp:
574 (WebCore::keyIdentifierForGdkKeyCode):
575 (WebCore::singleCharacterString):
577 2009-10-01 Philippe Normand <pnormand@igalia.com>
579 Reviewed by Xan Lopez.
581 [GTK] data: uri support in media player
582 https://bugs.webkit.org/show_bug.cgi?id=29842
584 New GStreamer element to handle data: uris. For now only base64
585 encoded data is supported. Decoded data is handed over to
589 * platform/graphics/gtk/DataSourceGStreamer.cpp: Added.
591 (webkit_data_src_base_init):
592 (webkit_data_src_class_init):
593 (webkit_data_src_reset):
594 (webkit_data_src_init):
595 (webkit_data_src_finalize):
596 (webkit_data_src_uri_get_type):
597 (webkit_data_src_uri_get_protocols):
598 (webkit_data_src_uri_get_uri):
599 (webkit_data_src_uri_set_uri):
600 (webkit_data_src_uri_handler_init):
601 * platform/graphics/gtk/DataSourceGStreamer.h: Added.
602 * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
603 (WebCore::do_gst_init):
604 (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
605 (WebCore::MediaPlayerPrivate::mimeTypeCache):
607 2009-09-30 Daniel Bates <dbates@webkit.org>
609 Reviewed by Adam Barth.
611 https://bugs.webkit.org/show_bug.cgi?id=29944
613 Reduces false positives in the XSSAuditor by explicitly allowing requests
614 that do not contain illegal URI characters.
616 As a side effect of this change, the tests property-inject.html,
617 property-escape-noquotes.html, and property-escape-noquotes-tab-slash-chars.html
618 fail because these attacks do not contain any illegal URI characters and
619 thus are now allowed by the XSSAuditor, where previously they weren't. A future
620 change may reinstate this functionality.
622 Tests: http/tests/security/xssAuditor/script-tag-safe2.html
623 http/tests/security/xssAuditor/script-tag-safe3.html
625 * page/XSSAuditor.cpp:
626 (WebCore::isIllegalURICharacter): Added method.
627 (WebCore::XSSAuditor::canEvaluate):
628 (WebCore::XSSAuditor::canCreateInlineEventListener):
629 (WebCore::XSSAuditor::findInRequest): Added parameter
630 allowRequestIfNoIllegalURICharacters.
633 2009-09-30 Oliver Hunt <oliver@apple.com>
635 Reviewed by Maciej Stachowiak.
637 reproducible freeze and crash on closing form popup at bosch-home.nl
638 https://bugs.webkit.org/show_bug.cgi?id=28948
640 showModalDialog calls getDirect on what is actually a window shell,
641 so ends up not getting a value (since no value can ever be placed
642 directly on the shell), which leads to incorrect behaviour.
644 We use a manual test rather than automatic as it was not
645 possible to get a modal run loop to work inside DRT.
647 * bindings/js/JSDOMWindowCustom.cpp:
648 (WebCore::JSDOMWindow::showModalDialog):
649 * manual-tests/showModalDialog-returnValue.html: manual testcase.
651 2009-09-30 Kent Tamura <tkent@chromium.org>
653 Reviewed by Darin Adler.
655 Adds ValidityState.tooLong support for <input> and <textarea>.
657 Introduces tooLong() in HTMLFormControlElement and it always returns false.
658 HTMLInputElement and HTMLTextAreaElement overrides it and checks the text
659 length and maxLength. tooLong() should work only for `dirty' values.
660 So, introduces m_isDirty flag for HTMLTextAreaElement, and
661 !m_data.value().isNull() works as a dirty flag for HTMLInputElement.
663 Renames parameter names of setMaxLength().
665 https://bugs.webkit.org/show_bug.cgi?id=27454
667 Tests: fast/forms/ValidityState-tooLong-input.html
668 fast/forms/ValidityState-tooLong-textarea.html
670 * html/HTMLFormControlElement.h:
671 (WebCore::HTMLFormControlElement::tooLong):
672 * html/HTMLInputElement.cpp:
673 (WebCore::HTMLInputElement::tooLong):
674 (WebCore::HTMLInputElement::setMaxLength):
675 * html/HTMLInputElement.h:
676 * html/HTMLTextAreaElement.cpp:
677 (WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
678 (WebCore::HTMLTextAreaElement::reset):
679 (WebCore::HTMLTextAreaElement::updateValue):
680 (WebCore::HTMLTextAreaElement::setMaxLength):
681 (WebCore::HTMLTextAreaElement::tooLong):
682 * html/HTMLTextAreaElement.h:
683 * html/ValidityState.h:
684 (WebCore::ValidityState::tooLong):
686 2009-09-30 Adam Barth <abarth@webkit.org>
688 Reviewed by Maciej Stachowiak.
690 Factor RedirectScheduler out of FrameLoader
691 https://bugs.webkit.org/show_bug.cgi?id=29948
693 This change introduces a new sub-object of Frame, redirectScheduler.
694 The redirectScheduler is responsible for scheduling redirects.
696 This change leaves the code for the redirectScheduler in
697 FrameLoader.cpp. A future change will move the class into its own
700 No behavior change (hopefully!).
702 * loader/FrameLoader.cpp:
703 (WebCore::RedirectScheduler::RedirectScheduler):
704 (WebCore::RedirectScheduler::~RedirectScheduler):
705 (WebCore::RedirectScheduler::redirectScheduledDuringLoad):
706 (WebCore::RedirectScheduler::clear):
707 (WebCore::FrameLoader::FrameLoader):
708 (WebCore::FrameLoader::setDefersLoading):
709 (WebCore::FrameLoader::stopLoading):
710 (WebCore::FrameLoader::didOpenURL):
711 (WebCore::FrameLoader::didExplicitOpen):
712 (WebCore::FrameLoader::cancelAndClear):
713 (WebCore::FrameLoader::clear):
714 (WebCore::FrameLoader::checkCompleted):
715 (WebCore::FrameLoader::isScheduledLocationChangePending):
716 (WebCore::FrameLoader::scheduleHTTPRedirection):
717 (WebCore::RedirectScheduler::scheduleRedirect):
718 (WebCore::RedirectScheduler::mustLockBackForwardList):
719 (WebCore::FrameLoader::scheduleLocationChange):
720 (WebCore::RedirectScheduler::scheduleLocationChange):
721 (WebCore::FrameLoader::scheduleFormSubmission):
722 (WebCore::RedirectScheduler::scheduleFormSubmission):
723 (WebCore::FrameLoader::scheduleRefresh):
724 (WebCore::RedirectScheduler::scheduleRefresh):
725 (WebCore::RedirectScheduler::locationChangePending):
726 (WebCore::FrameLoader::scheduleHistoryNavigation):
727 (WebCore::RedirectScheduler::scheduleHistoryNavigation):
728 (WebCore::RedirectScheduler::timerFired):
729 (WebCore::FrameLoader::provisionalLoadStarted):
730 (WebCore::RedirectScheduler::schedule):
731 (WebCore::RedirectScheduler::startTimer):
732 (WebCore::RedirectScheduler::cancel):
733 (WebCore::FrameLoader::completed):
734 (WebCore::FrameLoader::open):
735 * loader/FrameLoader.h:
736 (WebCore::FrameLoader::committedFirstRealDocumentLoad):
738 (WebCore::Frame::Frame):
739 (WebCore::Frame::redirectScheduler):
742 2009-09-30 Maciej Stachowiak <mjs@apple.com>
744 Build fix, not reviewed.
746 More Windows build fixes for https://bugs.webkit.org/show_bug.cgi?id=29943
748 * platform/network/cf/ResourceHandleCFNet.cpp:
749 (WebCore::willSendRequest):
751 2009-09-30 Maciej Stachowiak <mjs@apple.com>
753 Build fix, not reviewed.
755 Fix windows build for fix for https://bugs.webkit.org/show_bug.cgi?id=29943
757 * platform/network/cf/ResourceHandleCFNet.cpp:
758 (WebCore::willSendRequest):
760 2009-09-30 Dimitri Glazkov <dglazkov@chromium.org>
762 Reviewed by Darin Fisher.
764 [V8] HTMLAudioElement, HTMLImageElement, and HTMLOptionElement are constructable, but they shouldn't be.
765 Only Audio, Image, and Option should be constructable.
766 https://bugs.webkit.org/show_bug.cgi?id=29940
768 Test: fast/dom/dom-constructor.html
770 * WebCore.gypi: Added new files to project.
771 * bindings/scripts/CodeGeneratorV8.pm: Modified to generate custom constructors.
772 * bindings/v8/V8DOMWrapper.cpp:
773 (WebCore::V8DOMWrapper::getTemplate): Removed handling of HTMLImageElement, HTMLOptionElement
774 and HTMLAudioElement construction.
775 * bindings/v8/V8HTMLAudioElementConstructor.h: Added.
776 * bindings/v8/V8HTMLImageElementConstructor.h: Added.
777 * bindings/v8/V8HTMLOptionElementConstructor.h: Added.
778 * bindings/v8/V8Index.cpp: Added new headers.
779 * bindings/v8/V8Index.h: Added Audio, Image and Option decls.
780 * bindings/v8/custom/V8CustomBinding.h: Ditto.
781 * bindings/v8/custom/V8DOMWindowCustom.cpp:
782 (WebCore::ACCESSOR_GETTER): Added custom constructors.
783 * bindings/v8/custom/V8HTMLAudioElementConstructor.cpp:
784 (WebCore::V8HTMLImageElementConstructor::GetTemplate): Added custom template creator.
785 * bindings/v8/custom/V8HTMLOptionElementConstructor.cpp:
786 (WebCore::V8HTMLOptionElementConstructor::GetTemplate): Ditto.
787 * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
788 (WebCore::V8HTMLImageElementConstructor::GetTemplate): Ditto.
790 2009-09-30 Maciej Stachowiak <mjs@apple.com>
792 Reviewed by Brady Eidson.
794 307 redirects should pass along http body and Content-Type header
795 https://bugs.webkit.org/show_bug.cgi?id=29943
798 <rdar://problem/3802660> SAP: 307 (Temporary Redirect) responses should use POST, not GET
800 Test: http/tests/loading/resources/redirect-methods-result.php
802 * platform/network/cf/ResourceHandleCFNet.cpp:
803 (WebCore::willSendRequest): Pass along http body and Content-Type header.
804 * platform/network/mac/ResourceHandleMac.mm:
805 (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]): ditto
807 2009-09-30 Geoffrey Garen <ggaren@apple.com>
809 Reviewed by Mark Rowe.
811 Fixed https://bugs.webkit.org/show_bug.cgi?id=29941
812 REGRESSION (r48882-r48888): Many memory leaks on SnowLeopard leaks bot
814 Forgot to implement a destructor for JSDOMWindowBaseData, so it was
815 leaking its RefPtr data member.
817 * bindings/js/JSDOMWindowBase.cpp:
818 (WebCore::JSDOMWindowBase::destroyJSDOMWindowBaseData):
819 * bindings/js/JSDOMWindowBase.h:
820 (WebCore::JSDOMWindowBase::JSDOMWindowBaseData::JSDOMWindowBaseData::JSDOMWindowBaseData):
822 2009-09-30 Dave Hyatt <hyatt@apple.com>
824 Reviewed by Tim Hatcher.
826 Make sure the removal of user stylesheets results in all of the WebViews being updated to
829 * page/PageGroup.cpp:
830 (WebCore::PageGroup::removeUserContentWithURLForWorld):
831 (WebCore::PageGroup::removeUserContentForWorld):
833 2009-09-30 Dan Bernstein <mitz@apple.com>
835 Reviewed by Sam Weinig.
837 REGRESSION(r47440): drop down menus at americanexpress.com disappear on mouse out
838 https://bugs.webkit.org/show_bug.cgi?id=29209
840 Test: fast/inline/relative-positioned-overflow.html
842 * rendering/InlineFlowBox.cpp:
843 (WebCore::InlineFlowBox::computeVerticalOverflow): Add self-painting
844 inlines to overflow to ensure that they are included in hit-testing.
846 2009-09-30 Simon Fraser <simon.fraser@apple.com>
848 Reviewed by Mark Rowe.
850 transforms/3d tests are not run in Release builds
851 https://bugs.webkit.org/show_bug.cgi?id=29827
853 Make sure we export the WebCoreHas3DRendering symbol in Release builds,
854 because this symbols is used by run-webkit-tests (via 'nm') to detect whether
855 WebCore was built with ENABLE_3D_RENDERING turned on.
857 * DerivedSources.make:
858 * WebCore.3DRendering.exp: Added.
859 * WebCore.xcodeproj/project.pbxproj:
861 2009-09-30 Jeremy Orlow <jorlow@chromium.org>
863 Build fix for QT. Didn't know WebCore.pro existed.
867 2009-09-30 Dave Hyatt <hyatt@apple.com>
869 Reviewed by Adam Roben.
871 Add a method for removal of user scripts and stylesheets by URL from a specific world.
873 * page/PageGroup.cpp:
874 (WebCore::PageGroup::removeUserContentURLForWorld):
877 2009-09-30 Chris Hawk <hawk@chromium.org>
879 Reviewed by Dimitri Glazkov.
881 Fix for conditionals in the WebCore gyp file, which contained two separate
882 'conditions' values for the webcore target. The first entry was ignored,
883 resulting in some missine defines.
884 https://bugs.webkit.org/show_bug.cgi?id=29907
886 * WebCore.gyp/WebCore.gyp:
888 2009-09-21 Jeremy Orlow <jorlow@chromium.org>
890 Reviewed by Adam Barth.
892 DOM Storage needs to be more careful about where "ThreadSafe" objects are destroyed.
893 https://bugs.webkit.org/show_bug.cgi?id=29265
895 DOM Storage needs to be more careful about where "ThreadSafe" objects are
896 destroyed. With the current code, there actually isn't a race condition, but
897 it sure would be easy for someone to introduce one. A bunch of
898 ThreadSafeShared objects have RefPtrs to objects that are NOT ThreadSafeShared
899 objects. If it were possible any of these objects' destructors to be fired off
900 the main thread, then the you'd have a race condition. The code should be more
901 clear and self-documenting about how things related to each other.
903 Since the lifetime of a LocalStorageTask is bounded by the LocalStorageThread
904 which is bounded by the StorageSyncManager, StorageAreaImpl, and
905 StorageAreaSync, there's no reason for LocalStorageTask to store anything other
906 than pointers. By breaking this dependency, we can eliminate the risk.
908 Note that we _could_ have LocalStorageThread's task queue just store
909 LocalStorageTask*'s rather than RefPtr<LocalStorageTask>s but then we'd need to
910 manually take care of deleting. It'd probably also be possible to change
911 LocalStorageThread around so that it needn't hold onto a reference of itself
912 and have a more deterministic shutdown, but my initial attempts to do so
913 failed, and I decided it wasn't worth changing. The queue is killed before
914 hand, so the thread is 100% impotent before the main thread continues anyway.
916 The constructors and destructors of StorageSyncManager, StorageAreaImpl, and
917 StorageAreaSync now have ASSERTs to verify they're running on the main thread.
918 I'm fairly positive that it'd be impossible to hit these asserts and the fact
919 that these classes are no longer ThreadSafeShared should make it clear how
920 they're meant to be used, but I think it's worth it to be extra sure. Of
921 course, ideally, we'd have such an assert every time a ref is incremented or
924 Behavior should be unchanged and this is just an internal code cleanup, so no
927 * storage/LocalStorageTask.cpp:
928 (WebCore::LocalStorageTask::LocalStorageTask):
929 (WebCore::LocalStorageTask::performTask):
930 * storage/LocalStorageTask.h:
931 (WebCore::LocalStorageTask::createImport):
932 (WebCore::LocalStorageTask::createSync):
933 (WebCore::LocalStorageTask::createTerminate):
934 * storage/LocalStorageThread.cpp:
935 (WebCore::LocalStorageThread::scheduleImport):
936 (WebCore::LocalStorageThread::scheduleSync):
937 * storage/LocalStorageThread.h:
938 * storage/StorageArea.h:
939 * storage/StorageAreaImpl.cpp:
940 (WebCore::StorageAreaImpl::~StorageAreaImpl):
941 (WebCore::StorageAreaImpl::StorageAreaImpl):
942 * storage/StorageAreaSync.cpp:
943 (WebCore::StorageAreaSync::StorageAreaSync):
944 (WebCore::StorageAreaSync::~StorageAreaSync):
945 * storage/StorageSyncManager.cpp:
946 (WebCore::StorageSyncManager::StorageSyncManager):
947 (WebCore::StorageSyncManager::~StorageSyncManager):
948 (WebCore::StorageSyncManager::scheduleImport):
949 (WebCore::StorageSyncManager::scheduleSync):
950 * storage/StorageSyncManager.h:
952 2009-09-28 Jeremy Orlow <jorlow@chromium.org>
954 Reviewed by Darin Fisher.
956 Chromium needs to be able to override the way storage events are delivered
957 https://bugs.webkit.org/show_bug.cgi?id=29655
959 Chromium needs to be able to override the way storage events are delivered.
960 This replaced https://bugs.webkit.org/show_bug.cgi?id=29257 because it'll be
961 faster (no vtables and extra allocation) and somewhat cleaner (no dependency
962 injection). This is necessary because Chromium needs to transport events across
963 a process barrier and then dispatch them without use of a Frame*.
965 Behavior should not change with this, so no updates to tests.
969 * WebCore.vcproj/WebCore.vcproj:
970 * WebCore.xcodeproj/project.pbxproj:
971 * WebCoreSources.bkl:
972 * storage/StorageAreaImpl.cpp:
973 (WebCore::StorageAreaImpl::setItem):
974 (WebCore::StorageAreaImpl::removeItem):
975 (WebCore::StorageAreaImpl::clear):
976 * storage/StorageAreaImpl.h:
977 * storage/StorageEventDispatcher.cpp: Copied from WebCore/storage/StorageAreaImpl.cpp.
978 (WebCore::StorageEventDispatcher::dispatch):
979 * storage/StorageEventDispatcher.h: Added. (Well, technically in the other half of this patch.)
981 2009-09-30 Jian Li <jianli@chromium.org>
983 Reviewed by Darin Adler.
985 Need to check NULL frame in EventHandler::updateDragAndDrop.
986 https://bugs.webkit.org/show_bug.cgi?id=29929
988 Test: http/tests/misc/drag-over-iframe-invalid-source-crash.html
990 * page/EventHandler.cpp:
991 (WebCore::EventHandler::updateDragAndDrop):
993 2009-09-29 Simon Fraser <simon.fraser@apple.com>
995 Reviewed by Dan Bernstein.
997 ASSERTION FAILED: !repaintContainer || repaintContainer == this
998 https://bugs.webkit.org/show_bug.cgi?id=29755
1000 Generalize the fix for this bug to account for cases where there may be multiple
1001 containing blocks between the repaint container, and the container of the element
1004 Test: compositing/repaint/opacity-between-absolute2.html
1006 * rendering/RenderBox.cpp:
1007 (WebCore::RenderBox::mapLocalToContainer):
1008 Call offsetFromAncestorContainer() to get the correct offset.
1010 (WebCore::RenderBox::computeRectForRepaint): Ditto
1011 * rendering/RenderInline.cpp:
1012 (WebCore::RenderInline::computeRectForRepaint): Ditto.
1014 * rendering/RenderObject.h:
1015 * rendering/RenderObject.cpp:
1016 (WebCore::RenderObject::offsetFromAncestorContainer):
1017 New method that computes an offset from some object in the ancestor container() chain.
1019 2009-09-30 Andras Becsi <becsi.andras@stud.u-szeged.hu>
1021 Reviewed by Simon Hausmann.
1023 [Qt] Fix TextCodecQt::decode method after r48752 to return a non-null string if the length of the input is 0.
1024 This fixes https://bugs.webkit.org/show_bug.cgi?id=29736.
1026 * platform/text/qt/TextCodecQt.cpp:
1027 (WebCore::TextCodecQt::decode):
1029 2009-09-29 Dave Hyatt <hyatt@apple.com>
1031 Reviewed by Jon Honeycutt.
1033 Fix a couple of bugs with patterns. Move the setting of the document URL to before the style
1034 selector gets constructed so that pattern match testing gets the correct URL.
1036 * loader/FrameLoader.cpp:
1037 (WebCore::FrameLoader::begin):
1038 * page/UserContentURLPattern.cpp:
1039 (WebCore::UserContentURLPattern::parse):
1041 2009-09-29 Alexey Proskuryakov <ap@apple.com>
1043 Rubber-stamped by Brady Eidson.
1045 Assertion failure in http/tests/xmlhttprequest/failed-auth.html.
1047 I couldn't find out why this only started to happen now, but it was incorrect to check
1048 persistence of a credential returned by CredentialStorage::get() without checking that it
1049 was non-null. When there is no credential for the protection space in storage, get()
1050 returns a new object, and Credentil constructor doesn't initialize m_persistence.
1052 * platform/network/mac/ResourceHandleMac.mm:
1053 (-[WebCoreSynchronousLoader connection:didReceiveAuthenticationChallenge:]): Moved the
1054 assertion after credential null check.
1055 (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Added the same persistence
1056 assertion, matching sync code (and CF one, as well).
1058 2009-09-29 Yong Li <yong.li@torchmobile.com>
1060 Reviewed by Darin Adler.
1062 Add an ASSERT for UTF8Encoding().isValid()
1063 https://bugs.webkit.org/show_bug.cgi?id=29908
1065 * platform/text/TextEncoding.cpp:
1066 (WebCore::UTF8Encoding):
1068 2009-09-29 Dave Hyatt <hyatt@apple.com>
1070 Reviewed by Jon Honeycutt.
1072 https://bugs.webkit.org/show_bug.cgi?id=29892
1073 Add support for whitelist patterns to control conditional injection of user scripts and
1076 No new tests. Not testable until WebKit portion is added in followup patch.
1081 * WebCore.vcproj/WebCore.vcproj:
1082 * WebCore.xcodeproj/project.pbxproj:
1084 (WebCore::Document::pageGroupUserSheets):
1086 (WebCore::Frame::injectUserScriptsForWorld):
1087 * page/UserContentURLPattern.cpp: Added.
1088 (WebCore::UserContentURLPattern::matchesPatterns):
1089 (WebCore::UserContentURLPattern::parse):
1090 (WebCore::UserContentURLPattern::matches):
1091 (WebCore::UserContentURLPattern::matchesHost):
1092 (WebCore::MatchTester::MatchTester):
1093 (WebCore::MatchTester::testStringFinished):
1094 (WebCore::MatchTester::patternStringFinished):
1095 (WebCore::MatchTester::eatWildcard):
1096 (WebCore::MatchTester::eatSameChars):
1097 (WebCore::MatchTester::test):
1098 (WebCore::UserContentURLPattern::matchesPath):
1099 * page/UserContentURLPattern.h: Added.
1100 (WebCore::UserContentURLPattern::UserContentURLPattern):
1101 (WebCore::UserContentURLPattern::scheme):
1102 (WebCore::UserContentURLPattern::host):
1103 (WebCore::UserContentURLPattern::path):
1104 (WebCore::UserContentURLPattern::matchSubdomains):
1106 2009-09-29 Enrica Casucci <enrica@apple.com>
1108 Reviewed by Adele Peterson.
1110 Reproducible crash pressing return inside quoted content
1111 at WebCore::BreakBlockquoteCommand::doApply.
1112 <rdar://problem/7085453>
1113 In some case, like the one provided in the test case, m_downStreamEnd
1114 refers to a node that gets deleted when executing the DeleteSelectionCommand.
1115 We shouldn't use m_downStreamEnd to recalculate the new m_endPosition when
1116 pruning is needed, because it may be point to a node that has been deleted, but
1117 rather rely on removeNode in CompositeEditCommand to update m_endPosition correctly.
1119 Test: editing/selection/blockquote-crash.html
1121 * editing/BreakBlockquoteCommand.cpp:
1122 (WebCore::BreakBlockquoteCommand::doApply): Added check for invalid position
1123 to avoid dereferencing a null node pointer.
1124 * editing/DeleteSelectionCommand.cpp:
1125 (WebCore::DeleteSelectionCommand::mergeParagraphs): Don't reset m_endPosition
1126 using the value in m_downStreamEnd when it is necessary to prune the start block.
1128 2009-09-29 Alexey Proskuryakov <ap@apple.com>
1130 Reviewed by Brady Eidson.
1132 Basic authentication credentials are not sent automatically to top resources
1133 https://bugs.webkit.org/show_bug.cgi?id=29901
1135 No new tests - I don't want to pollute root directory of http tests to check for this rather
1138 * platform/network/CredentialStorage.cpp:
1139 (WebCore::CredentialStorage::set): Changed to always preserve leading slash.
1140 (WebCore::CredentialStorage::getDefaultAuthenticationCredential): Made breaking out of the
1143 2009-09-29 Pavel Feldman <pfeldman@chromium.org>
1145 Reviewed by Oliver Hunt.
1147 Web Inspector REGRESSION(r47820-r47822): Profiles aren't
1148 added to the inspector unless the inspector is already open
1149 when the profile completes.
1151 https://bugs.webkit.org/show_bug.cgi?id=29897
1153 * inspector/front-end/ProfilesPanel.js:
1154 (WebInspector.ProfilesPanel.prototype._populateProfiles):
1156 2009-09-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
1158 Rubberstamped by David Hyatt.
1160 Fix to logic of earlier commit 48902.
1162 When merging two if's before committing, I forgot to invert the
1165 * platform/network/qt/QNetworkReplyHandler.cpp:
1166 (WebCore::ignoreHttpError):
1168 2009-09-29 Stephen White <senorblanco@chromium.org>
1170 Unreviewed, build fix.
1172 Fixing Chromium build, following r48884.
1174 [https://bugs.webkit.org/show_bug.cgi?id=29894]
1176 * bindings/v8/V8AbstractEventListener.cpp:
1177 (WebCore::V8AbstractEventListener::handleEvent):
1178 * bindings/v8/V8AbstractEventListener.h:
1179 * bindings/v8/V8WorkerContextEventListener.cpp:
1180 (WebCore::V8WorkerContextEventListener::handleEvent):
1181 * bindings/v8/V8WorkerContextEventListener.h:
1183 2009-09-29 Kent Tamura <tkent@chromium.org>
1185 Reviewed by Darin Adler.
1187 Follows HTML5's maxLength change in September 2009.
1188 - Change HTMLTextAreaElement.maxLength type to signed.
1189 - HTMLTextAreaElement.maxLength returns -1 if maxlength= attribute is missing.
1190 - HTMLTextAreaElement.maxLength and HTMLInputElement.maxLength
1191 throw INDEX_SIZE_ERR for setting negative values.
1192 https://bugs.webkit.org/show_bug.cgi?id=29796
1194 * html/HTMLInputElement.cpp:
1195 (WebCore::HTMLInputElement::setMaxLength):
1196 * html/HTMLInputElement.h:
1197 * html/HTMLInputElement.idl:
1198 * html/HTMLTextAreaElement.cpp:
1199 (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
1200 (WebCore::HTMLTextAreaElement::maxLength):
1201 (WebCore::HTMLTextAreaElement::setMaxLength):
1202 * html/HTMLTextAreaElement.h:
1203 * html/HTMLTextAreaElement.idl:
1205 2009-09-29 Dimitri Glazkov <dglazkov@chromium.org>
1207 No review, rolling out r48894, because review discussion was not complete.
1208 http://trac.webkit.org/changeset/48894
1210 * platform/sql/SQLiteTransaction.cpp:
1211 (WebCore::SQLiteTransaction::begin):
1213 2009-09-29 Dirk Schulze <krit@webkit.org>
1215 Reviewed by Nikolas Zimmermann.
1217 SVG Filter feComposite implementation is missing
1218 [https://bugs.webkit.org/show_bug.cgi?id=28362]
1220 feComposite implementation for SVG.
1222 Test: svg/filters/feComposite.svg
1224 * platform/graphics/filters/FEComposite.cpp:
1225 (WebCore::arithmetic):
1226 (WebCore::FEComposite::apply):
1228 2009-09-29 Dumitru Daniliuc <dumi@chromium.org>
1230 Reviewed by Dimitri Glazkov.
1232 Starting all read-only transactions with an explicit BEGIN
1233 DEFERRED command instead of BEGIN, since some ports (chromium)
1234 might compile their own SQLite library and set BEGIN to BEGIN
1235 IMMEDIATE by default; which would result in a deadlock in case of
1236 two concurrent read-only transactions on the same DB, and would
1237 unnecessarily delay other potential transactions to the same DB.
1239 https://bugs.webkit.org/show_bug.cgi?id=29729
1241 * platform/sql/SQLiteTransaction.cpp:
1242 (WebCore::SQLiteTransaction::begin):
1244 2009-09-29 Kenneth Russell <kbr@google.com>
1246 Reviewed by Dimitri Glazkov.
1248 Add support for run-time flag for 3D canvas
1249 https://bugs.webkit.org/show_bug.cgi?id=29826
1251 * html/HTMLCanvasElement.cpp:
1252 (WebCore::HTMLCanvasElement::getContext): Check page settings for
1253 experimental WebGL flag before returning 3D graphics context.
1254 * page/Settings.cpp:
1255 (WebCore::Settings::Settings): Initialize new flag to false.
1256 (WebCore::Settings::setExperimentalWebGLEnabled):
1257 * page/Settings.h: Set new flag.
1258 (WebCore::Settings::experimentalWebGLEnabled): Return new flag.
1260 2009-09-29 Jeremy Orlow <jorlow@chromium.org>
1262 Reviewed by Darin Fisher.
1264 Chromium needs to be able to override the way storage events are delivered - part 1
1265 https://bugs.webkit.org/show_bug.cgi?id=29889
1267 Chromium needs to be able to override the way storage events are delivered.
1268 This replaced https://bugs.webkit.org/show_bug.cgi?id=29257 because it'll be
1269 faster (no vtables and extra allocation) and somewhat cleaner (no dependency
1270 injection). This is necessary because Chromium needs to transport events across
1271 a process barrier and then dispatch them without use of a Frame*.
1273 This patch should be a no-op for all ports other than Chromium.
1276 * storage/StorageEventDispatcher.h: Added.
1278 2009-09-29 Oliver Hunt <oliver@apple.com>
1280 Reviewed by NOBODY (missed file).
1282 Adding file missed in previous commit.
1284 * manual-tests/gtk/resources/long_cell.cur: Copied from WebCore/dom/PositionCreationFunctions.h.
1286 2009-09-29 Dimitri Glazkov <dglazkov@chromium.org>
1288 Reviewed by Darin Fisher.
1290 [V8] Correct an issue with XMLHttpRequest attribute event listeners never being cleared.
1291 https://bugs.webkit.org/show_bug.cgi?id=29888
1293 Test: LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-abort-readyState-shouldDispatchEvent.html
1295 * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
1296 (WebCore::getEventListener): Added isAttribute parameter.
1297 (WebCore::ACCESSOR_SETTER): Made all event listener setters create attribute listeners.
1298 (WebCore::CALLBACK_FUNC_DECL): Made addEventListener create object listener.
1300 2009-09-22 Martin Robinson <martin.james.robinson@gmail.com>
1302 Reviewed by Eric Seidel.
1304 Fix corruption for non-square images.
1306 [GTK] REGRESSION: BitmapImage::getGdkPixbuf fails for non-square images
1307 https://bugs.webkit.org/show_bug.cgi?id=29654
1309 Added an additional manual-test for this issue to the existing Gtk
1312 * manual-tests/gtk/cursor-image.html:
1313 * manual-tests/gtk/resources/long_cell.cur: Added.
1314 * platform/graphics/gtk/ImageGtk.cpp:
1315 (WebCore::BitmapImage::getGdkPixbuf):
1317 2009-09-29 Alexey Proskuryakov <ap@apple.com>
1319 Reviewed by Timothy Hatcher.
1321 Build fix - pass a proper ScriptExecutipnContext to getEventListenerHandlerBody()
1323 * bindings/js/ScriptEventListener.cpp:
1324 (WebCore::getEventListenerHandlerBody):
1325 * bindings/js/ScriptEventListener.h:
1326 * bindings/v8/ScriptEventListener.cpp:
1327 (WebCore::getEventListenerHandlerBody):
1328 * bindings/v8/ScriptEventListener.h:
1329 * inspector/InspectorDOMAgent.cpp:
1330 (WebCore::InspectorDOMAgent::buildObjectForEventListener):
1332 2009-09-29 Nate Chapin <japhet@chromium.org>
1334 Reviewed by Eric Seidel.
1336 Ensure that we don't scroll lock to an anchor node after a
1337 user-initiated scroll, even if that scroll doesn't propagate
1338 all the way up to FrameView.
1340 Test: fast/events/node-event-anchor-lock.html
1342 * page/EventHandler.cpp: Call setFrameWasScrolledByUser() when a scroll is handled by a node rather than a frame.
1343 (WebCore::EventHandler::scrollOverflow):
1344 (WebCore::EventHandler::handleWheelEvent):
1345 (WebCore::EventHandler::sendScrollEvent): Use setFrameWasScrolledByUser();
1346 (WebCore::EventHandler::setFrameWasScrolledByUser): Split out of sendScrollEvent();
1347 (WebCore::EventHandler::passMousePressEventToScrollbar):
1348 * page/EventHandler.h: Declare setFrameWasScrolledByUser().
1350 2009-09-28 Alexey Proskuryakov <ap@apple.com>
1352 Reviewed by Darin Adler and Sam Weinig.
1354 Onclick not fired for an element copied with cloneContents() or cloneNode()
1355 https://bugs.webkit.org/show_bug.cgi?id=25130
1357 The change here is that JS event listeners don't keep a reference to a global object from
1358 where they were created, and instead take it as a parameter when parsing source code. Also,
1359 the listener creation won't fail just because it happens for an element in a frameless
1361 Thus, moving nodes between documents no longer results in having incorrect registered
1362 lazy event listeners on them.
1364 Tests: fast/events/attribute-listener-cloned-from-frameless-doc-context-2.html
1365 fast/events/attribute-listener-cloned-from-frameless-doc-context.html
1366 fast/events/attribute-listener-cloned-from-frameless-doc.xhtml
1367 fast/events/attribute-listener-extracted-from-frameless-doc-context-2.html
1368 fast/events/attribute-listener-extracted-from-frameless-doc-context.html
1370 * bindings/js/JSEventListener.cpp:
1371 (WebCore::JSEventListener::JSEventListener): Don't take a reference to JSDOMGlobalObject.
1372 (WebCore::JSEventListener::jsFunction): Take ScriptExecutionContext as a parameter for
1373 getting to JSDOMGlobalObject. It's not used in base class, but is in JSLazyEventListner.
1374 (WebCore::JSEventListener::markJSFunction): Don't mark the global object.
1375 (WebCore::JSEventListener::handleEvent): Get global object from ScriptExecutionContext.
1376 (WebCore::JSEventListener::reportError): Ditto.
1378 * bindings/js/JSEventListener.h: (WebCore::JSEventListener::create): Don't keep a reference
1379 to JSDOMGlobalObject.
1381 * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::parseCode): Listener
1382 creation was split between this function and ScriptEventListener; moved it here, as JS
1383 global object can be different now.
1385 * bindings/js/JSLazyEventListener.h: (WebCore::JSLazyEventListener::create): Keep source URL,
1386 which can not be determined at parsing time.
1388 * bindings/js/ScriptEventListener.cpp: (WebCore::createAttributeEventListener): Moved code
1389 for listener creation to JSLazyEventListener. XSSAuditor code remains here, because tests
1390 expect that errors are logged at document parsing time, and because I don't know what other
1391 side effects moving it vould have.
1393 * dom/EventListener.h: handleEvent() and reportError() now take ScriptExecutionContext,
1394 because JSC needs a global context here.
1396 * bindings/js/JSAbstractWorkerCustom.cpp:
1397 (WebCore::JSAbstractWorker::addEventListener):
1398 (WebCore::JSAbstractWorker::removeEventListener):
1399 * bindings/js/JSDOMApplicationCacheCustom.cpp:
1400 (WebCore::JSDOMApplicationCache::addEventListener):
1401 (WebCore::JSDOMApplicationCache::removeEventListener):
1402 * bindings/js/JSDOMGlobalObject.cpp:
1403 (WebCore::JSDOMGlobalObject::createJSAttributeEventListener):
1404 * bindings/js/JSDOMWindowCustom.cpp:
1405 (WebCore::JSDOMWindow::addEventListener):
1406 (WebCore::JSDOMWindow::removeEventListener):
1407 * bindings/js/JSEventSourceCustom.cpp:
1408 (WebCore::JSEventSource::addEventListener):
1409 (WebCore::JSEventSource::removeEventListener):
1410 * bindings/js/JSMessagePortCustom.cpp:
1411 (WebCore::JSMessagePort::addEventListener):
1412 (WebCore::JSMessagePort::removeEventListener):
1413 * bindings/js/JSNodeCustom.cpp:
1414 (WebCore::JSNode::addEventListener):
1415 (WebCore::JSNode::removeEventListener):
1416 * bindings/js/JSSVGElementInstanceCustom.cpp:
1417 (WebCore::JSSVGElementInstance::addEventListener):
1418 (WebCore::JSSVGElementInstance::removeEventListener):
1419 * bindings/js/JSWorkerContextCustom.cpp:
1420 (WebCore::JSWorkerContext::addEventListener):
1421 (WebCore::JSWorkerContext::removeEventListener):
1422 * bindings/js/JSXMLHttpRequestCustom.cpp:
1423 (WebCore::JSXMLHttpRequest::addEventListener):
1424 (WebCore::JSXMLHttpRequest::removeEventListener):
1425 * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
1426 (WebCore::JSXMLHttpRequestUpload::addEventListener):
1427 (WebCore::JSXMLHttpRequestUpload::removeEventListener):
1428 * bindings/objc/ObjCEventListener.h:
1429 * bindings/objc/ObjCEventListener.mm:
1430 (WebCore::ObjCEventListener::handleEvent):
1431 * bindings/scripts/CodeGeneratorJS.pm:
1432 * dom/EventTarget.cpp:
1433 (WebCore::EventTarget::fireEventListeners):
1434 * inspector/InspectorDOMAgent.cpp:
1435 (WebCore::InspectorDOMAgent::handleEvent):
1436 * inspector/InspectorDOMAgent.h:
1437 * inspector/InspectorDOMStorageResource.cpp:
1438 (WebCore::InspectorDOMStorageResource::handleEvent):
1439 * inspector/InspectorDOMStorageResource.h:
1440 * loader/ImageDocument.cpp:
1441 (WebCore::ImageEventListener::handleEvent):
1442 * svg/animation/SVGSMILElement.cpp:
1443 (WebCore::ConditionEventListener::handleEvent):
1444 * workers/WorkerContext.cpp:
1445 (WebCore::WorkerContext::reportException):
1446 Don't pass global object to JSEventListener::create(), which no longer needs it.
1447 Note that some of these functions still have an early return for null global object, which
1448 can probably be removed in a later patch.
1449 Pass ScriptExecutionContext to EventListener methods that now need it.
1451 * bindings/scripts/CodeGeneratorCOM.pm: Don't force EventTarget implementation on Node -
1452 it doesn't work yet (it didn't quite work before this patch, too, because it assumed that
1453 any object implementing EventTarget COM interface originated from WebCore).
1455 * dom/EventListener.idl: Just like in ObjC, EventListener should be a pure interface in
1458 2009-09-28 Geoffrey Garen <ggaren@apple.com>
1460 Reviewed by Sam Weinig.
1462 Removed virtual destructor from JSGlobalObjectData to eliminate pointer
1463 fix-ups when accessing JSGlobalObject::d.
1465 Replaced with an explicit destructor function pointer.
1467 * bindings/js/JSDOMGlobalObject.cpp:
1468 (WebCore::JSDOMGlobalObject::destroyJSDOMGlobalObjectData):
1469 * bindings/js/JSDOMGlobalObject.h:
1470 (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
1472 2009-09-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
1474 Reviewed by Simon Hausmann.
1476 Don't rely on QNetworkReply::NetworkError codes, but
1477 on HTTP error codes instead.
1479 * platform/network/qt/QNetworkReplyHandler.cpp:
1480 (WebCore::ignoreHttpError):
1481 (WebCore::QNetworkReplyHandler::finish):
1483 2009-09-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
1485 Reviewed by Simon Hausmann.
1487 Use const references when using Qt's foreach.
1489 * platform/network/qt/QNetworkReplyHandler.cpp:
1490 (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
1492 2009-09-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
1494 Reviewed by Simon Hausmann.
1496 Fix handling of QNetworkReply errors.
1498 In the QNetworkReplyHandler::finish() a response was sent even when
1499 the reply contained an error. This resulted in a sendResponseIfNeeded()
1500 calling didReceiveResponse on the client, leading to the destruction
1501 of the m_resourceHandle, discontinuing further processing in finish(),
1502 and thus not calling didFail on the client.
1504 Instead it continued as everything went fine, and
1505 FrameLoaderClientQt::dispatchDecidePolicyForMIMEType() changed the
1506 policy to PolicyDownload due to not being able to show the non existing
1507 MIMEType. As the download also obviously fails, it ended up with a
1508 policy change error.
1510 * platform/network/qt/QNetworkReplyHandler.cpp:
1511 (WebCore::QNetworkReplyHandler::finish):
1513 2009-09-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
1515 Reviewed by Simon Hausmann.
1517 The code for showing error pages when the response was
1518 a 401/403/404, was not actually doing so. This patch
1521 * platform/network/qt/QNetworkReplyHandler.cpp:
1522 (WebCore::QNetworkReplyHandler::finish):
1524 2009-09-28 Alexey Proskuryakov <ap@apple.com>
1526 Reviewed by Brady Eidson.
1528 <rdar://problem/7259965> REGRESSION: http/tests/xmlhttprequest/cross-origin-authorization.html
1529 is failing/crashing intermittently
1530 https://bugs.webkit.org/show_bug.cgi?id=29322
1532 This was caused by CStringBuffer::encodeBase64() returning a buffer that wasn't zero terminated.
1533 The code had other issues as well, so I removed it altogether:
1534 - it claimed to avoid some buffer copies, but it didn't;
1535 - and I don't think that base64 encoding should be part of CString interface.
1537 * platform/network/mac/ResourceHandleMac.mm:
1538 (WebCore::encodeBasicAuthorization): Encode username and password using Base64.h directly.
1539 (WebCore::ResourceHandle::start): Use encodeBasicAuthorization().
1540 (+[WebCoreSynchronousLoader loadRequest:allowStoredCredentials:returningResponse:error:]): Ditto.
1541 (-[WebCoreSynchronousLoader connection:willSendRequest:redirectResponse:]): Extended logging
1542 to synchronous case.
1543 (-[WebCoreSynchronousLoader connectionShouldUseCredentialStorage:]): Ditto.
1544 (-[WebCoreSynchronousLoader connection:didReceiveAuthenticationChallenge:]): Ditto.
1545 (-[WebCoreSynchronousLoader connection:didReceiveResponse:]): Ditto.
1546 (-[WebCoreSynchronousLoader connection:didReceiveData:]): Ditto.
1547 (-[WebCoreSynchronousLoader connectionDidFinishLoading:]): Ditto.
1548 (-[WebCoreSynchronousLoader connection:didFailWithError:]): Ditto.
1550 * platform/network/cf/ResourceHandleCFNet.cpp: Matched Mac changes.
1552 * platform/text/CString.cpp:
1553 * platform/text/CString.h:
1554 (WebCore::CStringBuffer::create):
1555 (WebCore::CStringBuffer::CStringBuffer):
1556 Removed code that was added for Base64 in r48363.
1558 2009-09-29 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
1560 Reviewed by Simon Hausmann.
1562 Fix typo in Localizations.cpp
1564 https://bugs.webkit.org/show_bug.cgi?id=29872
1566 * platform/qt/Localizations.cpp:
1567 (WebCore::localizedMediaControlElementHelpText):
1569 2009-09-29 Simon Hausmann <simon.hausmann@nokia.com>
1571 Reviewed by Tor Arne Vestbø.
1573 Make the XSLT conditional in DOMWindow.idl's xsltProcessor
1574 attribute conditional in the generated files, similar to
1577 * page/DOMWindow.idl:
1579 2009-09-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
1581 Reviewed by Simon Hausmann and Tor Arne Vestbø.
1583 Use the ResourceError as it is supposed to and handle
1584 not HTTP errors from QNetworkReply.
1586 Thanks to Adam Roben for his input.
1588 * platform/network/qt/QNetworkReplyHandler.cpp:
1589 (WebCore::QNetworkReplyHandler::finish):
1591 009-09-29 Pavel Feldman <pfeldman@chromium.org>
1593 Reviewed by Timothy Hatcher.
1595 Web Inspector: Encapsulate JS listeners specifics into ScriptEventListener.
1597 https://bugs.webkit.org/show_bug.cgi?id=29816
1599 * bindings/js/ScriptEventListener.cpp:
1600 (WebCore::getEventListenerHandlerBody):
1601 * bindings/js/ScriptEventListener.h:
1602 * bindings/v8/ScriptEventListener.cpp:
1603 (WebCore::getEventListenerHandlerBody):
1604 * bindings/v8/ScriptEventListener.h:
1605 * inspector/InspectorDOMAgent.cpp:
1606 (WebCore::InspectorDOMAgent::buildObjectForEventListener):
1608 2009-09-29 Xan Lopez <xlopez@igalia.com>
1610 Unreviewed attempt to fix the build.
1612 * page/Settings.cpp:
1613 (WebCore::Settings::Settings):
1615 2009-09-28 Fumitoshi Ukai <ukai@chromium.org>
1617 Reviewed by Eric Seidel.
1619 Add experimentalWebSocketsEnabled in Settings.
1620 https://bugs.webkit.org/show_bug.cgi?id=28941
1623 * bindings/js/JSDOMWindowCustom.cpp:
1624 (WebCore::JSDOMWindow::webSocket):
1625 * bindings/v8/V8DOMWrapper.cpp:
1626 (WebCore::V8DOMWrapper::getConstructor):
1627 * bindings/v8/custom/V8WebSocketCustom.cpp:
1628 * page/Settings.cpp:
1629 (WebCore::Settings::Settings):
1630 (WebCore::Settings::setExperimentalWebSocketsEnabled):
1632 (WebCore::Settings::experimentalWebSocketsEnabled):
1634 2009-09-11 Fumitoshi Ukai <ukai@chromium.org>
1636 Reviewed by Adam Barth.
1638 Add platform code to support WebSocket for chromium.
1639 https://bugs.webkit.org/show_bug.cgi?id=29171
1641 To build within chromium tree, it requires a patch in bug 29174.
1642 Real implementation will be landed in chromium tree.
1645 * platform/network/chromium/SocketStreamError.h: Added.
1646 (WebCore::SocketStreamError::SocketStreamError):
1647 * platform/network/chromium/SocketStreamHandle.h: Added.
1648 (WebCore::SocketStreamHandle::create):
1650 2009-09-28 Dan Bernstein <mitz@apple.com>
1652 Reviewed by Sam Weinig.
1654 <rdar://problem/7157288> Crash in RenderStyle::computedLineHeight()
1655 when Times New Roman is not installed
1657 * platform/graphics/win/FontCacheWin.cpp:
1658 (WebCore::FontCache::getLastResortFallbackFont): If Times New Roman is
1659 not available, use the Windows default GUI font.
1661 2009-09-28 Jian Li <jianli@chromium.org>
1663 Reviewed by David Levin.
1665 Do not add platform-specific methods to cross-platform header
1666 FileSystem.h per Darin's feedback for 29109.
1667 https://bugs.webkit.org/show_bug.cgi?id=29830
1669 * platform/FileSystem.h:
1670 * platform/chromium/DragDataChromium.cpp:
1671 (WebCore::DragData::asURL):
1672 * platform/chromium/FileSystemChromium.cpp:
1674 2009-09-28 Dumitru Daniliuc <dumi@chromium.org>
1676 Reviewed by Dimitri Glazkov.
1678 Register Chromium's VFSs with a proper sqlite3_io_methods
1679 finder. This should only affect the POSIX implementation. The
1680 Windows change is included for consistency and in case sqlite
1681 starts using something similar in its Windows VFS in the future.
1683 https://bugs.webkit.org/show_bug.cgi?id=29743
1685 * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp:
1686 (WebCore::SQLiteFileSystem::registerSQLiteVFS):
1687 * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp:
1688 (WebCore::SQLiteFileSystem::registerSQLiteVFS):
1690 2009-09-28 Nate Chapin <japhet@chromium.org>
1692 Reviewed by Adam Barth.
1694 Change the V8 bindings' handling of window.toString(),
1695 so we return [object DOMWindow] (like JSC), not [object global].
1697 https://bugs.webkit.org/show_bug.cgi?id=29742
1699 This will fix a couple of Chromium port test failures and enable us to
1700 use the default expectations for a bunch more.
1702 * bindings/v8/custom/V8DOMWindowCustom.cpp: Use the DOMWindow wrapper instead
1703 of the global object wrapper when it's available in the DOMWindow toString callback.
1705 2009-09-28 Nate Chapin <japhet@chromium.org>
1707 Rubber stamped by David Levin.
1709 Chromium build fix, add back in #include of V8Proxy.h in V8WebKitPointConstructor.cpp.
1711 * bindings/v8/custom/V8WebKitPointConstructor.cpp: Re-include V8Proxy.h.
1713 2009-09-28 Geoffrey Garen <ggaren@apple.com>
1715 Reviewed by Darin Adler.
1717 NotNullPassRefPtr: smart pointer optimized for passing references that are not null
1718 https://bugs.webkit.org/show_bug.cgi?id=29822
1720 Added NotNullPassRefPtr, and deployed it in all places that initialize
1723 * bindings/js/DOMObjectWithSVGContext.h:
1724 (WebCore::DOMObjectWithSVGContext::DOMObjectWithSVGContext):
1725 * bindings/js/JSDOMBinding.cpp:
1726 (WebCore::cacheDOMStructure):
1727 * bindings/js/JSDOMBinding.h:
1728 (WebCore::DOMObject::DOMObject):
1729 (WebCore::DOMObjectWithGlobalPointer::DOMObjectWithGlobalPointer):
1730 (WebCore::DOMConstructorObject::DOMConstructorObject):
1731 (WebCore::DOMConstructorWithDocument::DOMConstructorWithDocument):
1732 * bindings/js/JSDOMGlobalObject.cpp:
1733 (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
1734 * bindings/js/JSDOMGlobalObject.h:
1735 * bindings/js/JSDOMWindowBase.cpp:
1736 (WebCore::JSDOMWindowBase::JSDOMWindowBase):
1737 * bindings/js/JSDOMWindowBase.h:
1738 * bindings/js/JSHTMLAllCollection.h:
1739 (WebCore::JSHTMLAllCollection::JSHTMLAllCollection):
1740 * bindings/js/JSInspectedObjectWrapper.cpp:
1741 (WebCore::JSInspectedObjectWrapper::JSInspectedObjectWrapper):
1742 * bindings/js/JSInspectedObjectWrapper.h:
1743 * bindings/js/JSInspectorCallbackWrapper.cpp:
1744 (WebCore::JSInspectorCallbackWrapper::JSInspectorCallbackWrapper):
1745 * bindings/js/JSInspectorCallbackWrapper.h:
1746 * bindings/js/JSQuarantinedObjectWrapper.cpp:
1747 (WebCore::JSQuarantinedObjectWrapper::JSQuarantinedObjectWrapper):
1748 * bindings/js/JSQuarantinedObjectWrapper.h:
1749 * bindings/js/JSWorkerContextBase.cpp:
1750 (WebCore::JSWorkerContextBase::JSWorkerContextBase):
1751 * bindings/js/JSWorkerContextBase.h:
1752 * bindings/scripts/CodeGeneratorJS.pm:
1753 * bridge/runtime_object.cpp:
1754 (JSC::RuntimeObjectImp::RuntimeObjectImp):
1755 * bridge/runtime_object.h:
1757 2009-09-28 Nate Chapin <japhet@chromium.org>
1759 Reviewed by Dimitri Glazkov.
1761 Allow V8 to handle x/y parameters in a WebKitPoint constructor.
1762 https://bugs.webkit.org/show_bug.cgi?id=29823
1764 Fixes V8's handling of LayoutTests/fast/dom/Window/webkitConvertPoint.html
1766 * bindings/v8/custom/V8WebKitPointConstructor.cpp: Allow for x/y parameters in constructor.
1768 2009-09-28 Mark Rowe <mrowe@apple.com>
1770 Fix the build by doing something approximating reasonableness in the Xcode project.
1772 * WebCore.xcodeproj/project.pbxproj:
1774 2009-09-28 Simon Hausmann <hausmann@webkit.org>
1776 Prospective Tiger build fix.
1778 * WebCore.xcodeproj/project.pbxproj: Try to use unique IDs for the new files.
1780 2009-09-28 Pavel Feldman <pfeldman@chromium.org>
1782 Reviewed by Timothy Hatcher.
1784 Web Inspector: Add explicit frontend event for commit load.
1786 https://bugs.webkit.org/show_bug.cgi?id=29814
1788 * inspector/InspectorController.cpp:
1789 (WebCore::InspectorController::didCommitLoad):
1790 * inspector/InspectorFrontend.cpp:
1791 (WebCore::InspectorFrontend::didCommitLoad):
1792 * inspector/InspectorFrontend.h:
1793 * inspector/front-end/DOMAgent.js:
1794 (WebInspector.DOMAgent.prototype._setDocument):
1795 * inspector/front-end/inspector.js:
1796 (WebInspector.addResource):
1797 (WebInspector.didCommitLoad):
1799 2009-09-28 Yaar Schnitman <yaar@chromium.org>
1801 Reviewed by Dimitri Glazkov.
1803 Chromium port - recognize we are being built independently
1804 of chromium and look for dependencies under webkit/chromium rather
1807 https://bugs.webkit.org/show_bug.cgi?id=29722
1809 * WebCore.gyp/WebCore.gyp: See above. Also removed a few files from
1810 the sources list, since they are not supposed to be built here.
1812 2009-09-28 Jakub Wieczorek <faw217@gmail.com>
1814 Reviewed by Simon Hausmann.
1816 [Qt] Implement XSLT support with QtXmlPatterns.
1817 https://bugs.webkit.org/show_bug.cgi?id=28303
1822 * WebCore.vcproj/WebCore.vcproj:
1823 * WebCoreSources.bkl:
1825 (WebCore::Document::Document):
1826 (WebCore::Document::~Document):
1827 (WebCore::Document::setTransformSource):
1829 (WebCore::Document::transformSource):
1830 * dom/TransformSource.h: Added.
1831 (WebCore::TransformSource::platformSource):
1832 * dom/TransformSourceLibxslt.cpp: Added.
1833 (WebCore::TransformSource::TransformSource): Wraps a libxml2 document.
1834 (WebCore::TransformSource::~TransformSource):
1835 * dom/TransformSourceQt.cpp: Added.
1836 (WebCore::TransformSource::TransformSource): Wraps a plain string.
1837 (WebCore::TransformSource::~TransformSource):
1838 * dom/XMLTokenizerLibxml2.cpp:
1839 (WebCore::XMLTokenizer::doEnd):
1840 * dom/XMLTokenizerQt.cpp:
1841 (WebCore::XMLTokenizer::doEnd):
1842 (WebCore::XMLTokenizer::parseProcessingInstruction):
1843 * xml/XSLStyleSheet.h:
1844 (WebCore::XSLStyleSheet::sheetString):
1845 * xml/XSLStyleSheetLibxslt.cpp:
1846 (WebCore::XSLStyleSheet::document):
1847 * xml/XSLStyleSheetQt.cpp: Added.
1848 * xml/XSLTProcessor.h:
1849 * xml/XSLTProcessorLibxslt.cpp:
1850 (WebCore::xmlDocPtrFromNode):
1851 * xml/XSLTProcessorQt.cpp: Added.
1852 (WebCore::XSLTMessageHandler::XSLTMessageHandler): A subclass of QAbstractMessageHandler.
1853 (WebCore::XSLTMessageHandler::handleMessage): Forwards all processor messages to the Console.
1854 (WebCore::XSLTProcessor::transformToString): Uses QXmlQuery.
1856 2009-09-28 Andrew Scherkus <scherkus@chromium.org>
1858 Reviewed by Eric Carlson.
1860 Delegate implementation of rendererIsNeeded() for media control elements to RenderTheme.
1862 https://bugs.webkit.org/show_bug.cgi?id=28689
1864 Covered by LayoutTests/media/video-no-audio.html
1866 * rendering/MediaControlElements.cpp: Removed subclass implementations of rendererIsNeeded().
1867 (WebCore::MediaControlElement::rendererIsNeeded): Include calling shouldRenderMediaControlPart().
1868 (WebCore::MediaControlInputElement::rendererIsNeeded): Include calling shouldRenderMediaControlPart().
1869 * rendering/MediaControlElements.h:
1870 * rendering/RenderTheme.cpp:
1871 (WebCore::RenderTheme::shouldRenderMediaControlPart): New method. Contains logic moved from subclass implementations of rendererIsNeeded().
1872 * rendering/RenderTheme.h:
1873 * rendering/RenderThemeChromiumSkia.cpp:
1874 (WebCore::RenderThemeChromiumSkia::shouldRenderMediaControlPart): Override to always render mute button.
1875 * rendering/RenderThemeChromiumSkia.h:
1877 2009-09-28 Jian Li <jianli@chromium.org>
1879 Reviewed by David Levin.
1881 [chromium] DragData::asURL should return file URL.
1882 https://bugs.webkit.org/show_bug.cgi?id=29109
1884 Tested by LayoutTests/fast/events/drag-to-navigate.html.
1886 * platform/FileSystem.h:
1887 * platform/chromium/ChromiumBridge.h:
1888 * platform/chromium/DragDataChromium.cpp:
1889 (WebCore::DragData::asURL):
1890 * platform/chromium/FileSystemChromium.cpp:
1891 (WebCore::getAbsolutePath):
1892 (WebCore::isDirectory):
1893 (WebCore::filePathToURL):
1895 2009-09-28 Dimitri Glazkov <dglazkov@chromium.org>
1897 Reviewed by David Levin.
1899 [V8] Add a special case to handle index arguments, because we need to be
1900 able to see if they're < 0.
1901 https://bugs.webkit.org/show_bug.cgi?id=29810
1903 Test: LayoutTests/dom/html/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative.html
1905 * bindings/scripts/CodeGeneratorV8.pm: Added special case (matching CodeGeneratorJS.pm)
1906 for index arguments.
1908 2009-09-28 Dan Bernstein <mitz@apple.com>
1910 Reviewed by Darin Adler.
1912 Extend the MediaWiki/KHTMLFixes.css workaround to cover older MediaWiki versions
1913 https://bugs.webkit.org/show_bug.cgi?id=29792
1915 * html/HTMLLinkElement.cpp:
1916 (WebCore::HTMLLinkElement::setCSSStyleSheet): If site specific hacks are
1917 enabled, check if the linked style sheet is one of two versions of the
1918 MediaWiki KHTMLFixes.css. If so, remove the offending rule.
1920 2009-09-28 Dimitri Glazkov <dglazkov@chromium.org>
1922 Reviewed by Adam Barth.
1924 [V8] Fix an error in type logic in CodeGeneratorV8.pm, where
1925 unsigned ints are accidentally used as signed.
1926 https://bugs.webkit.org/show_bug.cgi?id=29810
1928 Test: LayoutTests/fast/forms/textarea-maxlength.html
1930 * bindings/scripts/CodeGeneratorV8.pm: Made sure "unsigned long" in IDL is
1931 properly generates on "unsigned" return value.
1933 2009-09-28 Jakub Wieczorek <faw217@gmail.com>
1935 Reviewed by Simon Hausmann.
1937 Rename XSLStyleSheet.cpp to XSLStyleSheetLibxslt.cpp.
1938 https://bugs.webkit.org/show_bug.cgi?id=28303
1940 In preparation for adding XSLT support with QtXmlPatterns to the Qt
1941 port, rename XSLStyleSheet.cpp to XSLStyleSheetLibxslt.cpp as we will
1942 have our own implementation which most likely will not share any code
1943 with the current one.
1945 Additionally, fix some coding style issues.
1949 * WebCore.vcproj/WebCore.vcproj:
1950 * WebCore.xcodeproj/project.pbxproj:
1951 * WebCoreSources.bkl:
1952 * xml/XSLStyleSheet.cpp: Renamed to XSLStyleSheetLibxslt.cpp.
1953 * xml/XSLStyleSheetLibxslt.cpp: Added.
1955 2009-09-28 Simon Hausmann <simon.hausmann@nokia.com>
1957 Prospective build fix for r48812.
1959 Forgot to remove the inline reset() implementation when reverting the indentation
1960 changes in the file.
1962 * xml/XSLTProcessor.h:
1964 2009-09-28 Pavel Feldman <pfeldman@chromium.org>
1966 Reviewed by nobody (trivial follow up fix), Joseph Pecoraro LGTM-ed.
1968 Web Inspector: Follow up to r48809.
1969 InspectorController.wrapObject should only be called on the inspectable page side.
1971 https://bugs.webkit.org/show_bug.cgi?id=17429
1973 * inspector/front-end/EventListenersSidebarPane.js:
1974 (WebInspector.EventListenersSidebarPane.prototype.update.callback):
1975 (WebInspector.EventListenersSidebarPane.prototype.update):
1976 (WebInspector.EventListenersSection):
1977 (WebInspector.EventListenersSection.prototype.update):
1978 (WebInspector.EventListenerBar):
1979 (WebInspector.EventListenerBar.prototype.update):
1981 2009-09-28 Jakub Wieczorek <faw217@gmail.com>
1983 Reviewed by Simon Hausmann.
1985 Move the libxslt specific part of XSLTProcessor to a separate file.
1986 https://bugs.webkit.org/show_bug.cgi?id=28303
1988 In preparation for adding XSLT support with QtXmlPatterns to the Qt
1989 port, move the libxslt part of the XSLTProcessor implementation into
1990 another file and leave the part that can be reused and shared.
1992 Additionally, fix some coding style issues.
1996 * WebCore.vcproj/WebCore.vcproj:
1997 * WebCore.xcodeproj/project.pbxproj:
1998 * WebCoreSources.bkl:
1999 * xml/XSLTProcessor.cpp:
2000 (WebCore::XSLTProcessor::createDocumentFromSource): Remove trailing whitespaces.
2001 (WebCore::createFragmentFromSource): Remove trailing whitespaces.
2002 (WebCore::XSLTProcessor::transformToFragment): Remove trailing whitespaces.
2003 (WebCore::XSLTProcessor::reset): Moved out of the class definition.
2004 * xml/XSLTProcessorLibxslt.cpp: Added.
2005 (WebCore::XSLTProcessor::genericErrorFunc): Moved.
2006 (WebCore::XSLTProcessor::parseErrorFunc): Moved.
2007 (WebCore::docLoaderFunc): Moved.
2008 (WebCore::setXSLTLoadCallBack): Moved.
2009 (WebCore::writeToVector): Moved.
2010 (WebCore::saveResultToString): Moved.
2011 (WebCore::xsltParamArrayFromParameterMap): Moved.
2012 (WebCore::freeXsltParamArray): Moved.
2013 (WebCore::xsltStylesheetPointer): Moved.
2014 (WebCore::xmlDocPtrFromNode): Moved.
2015 (WebCore::resultMIMEType): Moved.
2016 (WebCore::XSLTProcessor::transformToString): Moved.
2018 2009-09-28 Charles Wei <charles.wei@torchmobile.com.cn>
2020 Reviewed by Nikolas Zimmermann.
2022 Fix the crash of SVG that crashes when use a non-exist symbol
2023 https://bugs.webkit.org/show_bug.cgi?id=27693
2025 Test: svg/custom/use-non-existing-symbol-crash.svg
2027 * svg/SVGUseElement.cpp:
2028 (WebCore::shadowTreeContainsChangedNodes):
2030 2009-09-28 Joseph Pecoraro <joepeck@webkit.org>
2032 Reviewed by Timothy Hatcher.
2034 Inspector Should Show Event Listeners/Handlers Registered on each Node
2035 https://bugs.webkit.org/show_bug.cgi?id=17429
2037 Extracted a method from dispatchEvent to get the event ancestor chain
2040 (WebCore::Node::eventAncestors): the extracted method
2041 (WebCore::Node::dispatchGenericEvent): use eventAncestors
2044 Asynchronous Flow For the Inspector, Backend -> DOM Agent -> Frontend
2045 The DOMAgent's getEventListenersForNode handles the logic of finding
2046 all the relevant listeners in the event flow.
2048 * inspector/InspectorBackend.cpp:
2049 (WebCore::InspectorBackend::getEventListenersForNode):
2050 * inspector/InspectorBackend.h:
2051 * inspector/InspectorBackend.idl:
2052 * inspector/InspectorDOMAgent.cpp:
2053 (WebCore::InspectorDOMAgent::getEventListenersForNode):
2054 (WebCore::InspectorDOMAgent::buildObjectForEventListener):
2055 (WebCore::InspectorDOMAgent::buildObjectForNode): added localName
2056 * inspector/InspectorDOMAgent.h:
2057 (WebCore::EventListenerInfo::EventListenerInfo):
2058 * inspector/InspectorFrontend.cpp:
2059 (WebCore::InspectorFrontend::didGetEventListenersForNode):
2060 * inspector/InspectorFrontend.h:
2061 (WebCore::InspectorFrontend::scriptState):
2062 * inspector/front-end/DOMAgent.js: added localName to WebInspector.DOMNode from payload
2063 (WebInspector.EventListeners.getEventListenersForNodeAsync.mycallback):
2064 (WebInspector.EventListeners.getEventListenersForNodeAsync):
2066 New Sidebar Pane in the Element's Panel
2067 Includes Gear Menu for filtering the Event Listeners on the
2068 "Selected Node Only" or "All Nodes"
2070 * inspector/front-end/ElementsPanel.js: Handles refreshing the Pane when necessary
2071 (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
2072 (WebInspector.ElementsPanel):
2073 (WebInspector.ElementsPanel.prototype.updateEventListeners):
2074 * inspector/front-end/EventListenersSidebarPane.js: Added.
2075 (WebInspector.EventListenersSidebarPane): The 1st level in the Pane
2076 (WebInspector.EventListenersSidebarPane.prototype.update.callback):
2077 (WebInspector.EventListenersSidebarPane.prototype.update):
2078 (WebInspector.EventListenersSection): The 2nd level in the Pane
2079 (WebInspector.EventListenersSection.prototype.update): filters on Preference
2080 (WebInspector.EventListenersSection.prototype.addListener):
2081 (WebInspector.EventListenerBar): The 3rd level in the Pane
2082 (WebInspector.EventListenerBar.prototype._getNodeDisplayName):
2083 (WebInspector.EventListenerBar.prototype._getFunctionDisplayName):
2084 (WebInspector.EventListenersSidebarPane.prototype._changeSetting): For the Gear Menu
2086 Consolidated "appropriateSelectorForNode"
2088 * inspector/front-end/StylesSidebarPane.js:
2089 * inspector/front-end/utilities.js:
2091 Miscellaneous Updates
2093 * English.lproj/localizedStrings.js: "Event Listeners", "No Event Listeners", "Selected Node Only", "All Nodes"
2094 * WebCore.gypi: included the new inspector files
2095 * WebCore.vcproj/WebCore.vcproj: included source files that were missing
2096 * inspector/front-end/Images/grayConnectorPoint.png: Added. Thanks to Timothy Hatcher.
2097 * inspector/front-end/Images/whiteConnectorPoint.png: Added. Thanks to Timothy Hatcher.
2098 * inspector/front-end/inspector.js: Preferences for the Gear Menu Event Listeners filter
2099 * inspector/front-end/inspector.css: reused as much as possible
2100 * inspector/front-end/inspector.html: include the new script
2101 * inspector/front-end/WebKit.qrc: included the new inspector files
2103 2009-09-27 Sam Weinig <sam@webkit.org>
2105 Reviewed by Dan Bernstein.
2107 Fix for https://bugs.webkit.org/show_bug.cgi?id=29760
2108 Implement CSSOM Range.getClientRects/getBoundingClientRect
2110 Tests: fast/dom/Range/getBoundingClientRect-getClientRects-relative-to-viewport.html
2111 fast/dom/Range/getBoundingClientRect.html
2112 fast/dom/Range/getClientRects.html
2115 (WebCore::Range::getClientRects):
2116 (WebCore::Range::getBoundingClientRect):
2117 (WebCore::adjustFloatQuadsForScrollAndAbsoluteZoom):
2118 (WebCore::Range::getBorderAndTextQuads):
2121 Implement Range.getClientRects/getBoundingClientRect.
2124 * rendering/RenderObject.h:
2125 (WebCore::adjustForAbsoluteZoom):
2126 (WebCore::adjustIntRectForAbsoluteZoom):
2127 (WebCore::adjustFloatPointForAbsoluteZoom):
2128 (WebCore::adjustFloatQuadForAbsoluteZoom):
2129 Move point/quad adjustment methods from Element.cpp to RenderObject.h
2130 so that Range.cpp can use them as well.
2132 2009-09-27 Simon Hausmann <hausmann@webkit.org>
2134 Unreviewed fix for WebInspector with Qt build.
2136 Simply re-generate the Qt resource file by running
2137 WebKitTools/Scripts/generate-qt-inspector-resource
2139 * inspector/front-end/WebKit.qrc:
2141 2009-09-27 Pavel Feldman <pfeldman@chromium.org>
2143 Reviewed by nobody (trivial ChangeLog fix).
2145 Restore WebCore/ChangeLog truncated in r48778.
2147 2009-09-27 Pavel Feldman <pfeldman@chromium.org>
2149 Reviewed by Timothy Hatcher.
2151 Web Inspector: DOM store is being unbound twice, leading to assertion failure.
2153 https://bugs.webkit.org/show_bug.cgi?id=29770
2155 * inspector/InspectorController.cpp:
2156 (WebCore::InspectorController::didOpenDatabase):
2157 (WebCore::InspectorController::didUseDOMStorage):
2158 * inspector/InspectorDOMStorageResource.cpp:
2159 (WebCore::InspectorDOMStorageResource::unbind):
2161 2009-09-26 Pavel Feldman <pfeldman@chromium.org>
2163 Reviewed by Timothy Hatcher.
2165 Web Inspector: Do not track DOM changes while inspector window is closed.
2167 https://bugs.webkit.org/show_bug.cgi?id=29769
2169 * inspector/InspectorController.cpp:
2170 (WebCore::InspectorController::inspectedWindowScriptObjectCleared):
2171 (WebCore::InspectorController::populateScriptObjects):
2172 (WebCore::InspectorController::resetScriptObjects):
2173 (WebCore::InspectorController::didCommitLoad):
2174 * inspector/InspectorController.h:
2175 * inspector/InspectorDOMAgent.cpp:
2176 (WebCore::InspectorDOMAgent::setDocument):
2177 * inspector/InspectorDOMAgent.h:
2178 * loader/FrameLoader.cpp:
2179 (WebCore::FrameLoader::dispatchWindowObjectAvailable):
2180 * page/android/InspectorControllerAndroid.cpp:
2181 (WebCore::InspectorController::inspectedWindowScriptObjectCleared):
2183 2009-09-26 Pavel Feldman <pfeldman@chromium.org>
2185 Reviewed by Timothy Hatcher.
2187 Web Inspector: [REGRESSION] Double Clicking Resources Fails to Open in New Window
2189 https://bugs.webkit.org/show_bug.cgi?id=29762
2191 * inspector/front-end/InjectedScript.js:
2192 (InjectedScript.setStyleText):
2193 (InjectedScript.openInInspectedWindow):
2194 * inspector/front-end/InjectedScriptAccess.js:
2195 * inspector/front-end/ResourcesPanel.js:
2196 (WebInspector.ResourceSidebarTreeElement.prototype.ondblclick):
2198 2009-09-26 David Kilzer <ddkilzer@apple.com>
2200 Part 2 of 2: <http://webkit.org/b/29753> DerivedSources.make broken for non-Mac targets
2202 Reviewed by Darin Adler.
2204 Fix ENABLE_ORIENTATION_EVENTS for non-Mac platforms.
2206 * DerivedSources.make: Moved Platform.h check for
2207 ENABLE_ORIENTATION_EVENTS into Mac-only section and added
2208 default of ENABLE_ORIENTATION_EVENTS = 0 to non-Mac section.
2209 Added ifndef test to make it possible to override both
2210 ENABLE_DASHBOARD_SUPPORT and ENABLE_ORIENTATION_EVENTS external
2211 to the makefile. Moved addition of ENABLE_ORIENTATION_EVENTS to
2212 ADDITIONAL_IDL_DEFINES to common section.
2213 * GNUmakefile.am: Added support for ENABLE_ORIENTATION_EVENTS if
2215 * WebCore.pro: Ditto.
2217 2009-09-26 Kent Tamura <tkent@chromium.org>
2219 Reviewed by David Kilzer.
2221 Move placeholder-related code to HTMLTextFormControlElement from
2222 HTMLInputElement, WMLInputElement, InputElement, and
2223 HTMLTextAreaElement.
2224 https://bugs.webkit.org/show_bug.cgi?id=28703
2226 * dom/InputElement.cpp:
2227 (WebCore::InputElement::dispatchFocusEvent):
2228 (WebCore::InputElement::dispatchBlurEvent):
2229 (WebCore::InputElement::setValueFromRenderer):
2230 * dom/InputElement.h:
2231 * html/HTMLFormControlElement.cpp:
2232 (WebCore::HTMLTextFormControlElement::HTMLTextFormControlElement):
2233 (WebCore::HTMLTextFormControlElement::~HTMLTextFormControlElement):
2234 (WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
2235 (WebCore::HTMLTextFormControlElement::dispatchBlurEvent):
2236 (WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible):
2237 (WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility):
2238 * html/HTMLFormControlElement.h:
2239 (WebCore::HTMLTextFormControlElement::handleFocusEvent):
2240 (WebCore::HTMLTextFormControlElement::handleBlurEvent):
2241 * html/HTMLInputElement.cpp:
2242 (WebCore::HTMLInputElement::HTMLInputElement):
2243 (WebCore::HTMLInputElement::handleFocusEvent):
2244 (WebCore::HTMLInputElement::handleBlurEvent):
2245 (WebCore::HTMLInputElement::parseMappedAttribute):
2246 (WebCore::HTMLInputElement::createRenderer):
2247 (WebCore::HTMLInputElement::setValue):
2248 (WebCore::HTMLInputElement::setValueFromRenderer):
2249 * html/HTMLInputElement.h:
2250 (WebCore::HTMLInputElement::supportsPlaceholder):
2251 (WebCore::HTMLInputElement::isEmptyValue):
2252 * html/HTMLIsIndexElement.cpp:
2253 (WebCore::HTMLIsIndexElement::parseMappedAttribute):
2254 * html/HTMLTextAreaElement.cpp:
2255 (WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
2256 (WebCore::HTMLTextAreaElement::createRenderer):
2257 * html/HTMLTextAreaElement.h:
2258 (WebCore::HTMLTextAreaElement::supportsPlaceholder):
2259 (WebCore::HTMLTextAreaElement::isEmptyValue):
2260 * rendering/RenderTextControl.cpp:
2261 (WebCore::RenderTextControl::RenderTextControl):
2262 * rendering/RenderTextControl.h:
2263 * rendering/RenderTextControlMultiLine.cpp:
2264 (WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine):
2265 * rendering/RenderTextControlMultiLine.h:
2266 * rendering/RenderTextControlSingleLine.cpp:
2267 (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
2268 (WebCore::RenderTextControlSingleLine::updateFromElement):
2269 * rendering/RenderTextControlSingleLine.h:
2270 * wml/WMLInputElement.cpp:
2271 (WebCore::WMLInputElement::setValue):
2272 (WebCore::WMLInputElement::createRenderer):
2273 * wml/WMLInputElement.h:
2275 2009-09-26 Shu Chang <Chang.Shu@nokia.com>
2277 Reviewed by Alexey Proskuryakov.
2279 Optimize the code so only the text from start to end is scanned.
2280 https://bugs.webkit.org/show_bug.cgi?id=29092
2282 On a platform with webkit+Qt+Symbian, the parsing time for a 600K text
2283 file improved from 400ms to 40ms (10x faster).
2286 (WebCore::Text::createWithLengthLimit):
2288 2009-09-26 Xiaomei Ji <xji@chromium.org>
2290 Reviewed by Eric Seidel.
2292 This Patch fixes [chromium] the drop-down is always left-aligned even
2294 https://bugs.webkit.org/show_bug.cgi?id=29612
2296 For auto-complete, the items in drop-down should be right-aligned if
2297 the directionality of <input> field is RTL.
2298 For <select><option>, the items in drop-down should be right-aligned
2299 if the directionality of <select> is RTL.
2301 No automatic test is possible. Manual tests are added.
2303 * manual-tests/autofill_alignment.html: Added.
2304 * manual-tests/select_alignment.html: Added.
2305 * platform/chromium/PopupMenuChromium.cpp:
2306 (WebCore::PopupListBox::paintRow): Adjust the starting x-axis of text to
2307 be paint if it should be right-aligned.
2309 2009-09-25 Dan Bernstein <mitz@apple.com>
2311 Reviewed by Sam Weinig.
2313 REGRESSION (r48775) FontList.plist written by TOT WebKit causes Safari 4
2315 https://bugs.webkit.org/show_bug.cgi?id=29759
2317 * platform/graphics/win/FontDatabase.cpp:
2318 (WebCore::writeFontDatabaseToPlist): Reverted to saving the CG font DB
2319 property list at the root of FontList.plist, but with an additional
2320 key for the last value of the Fonts registry key.
2321 (WebCore::populateFontDatabase): Pass the FontList.plist in its entirety
2322 to populatFontDatabaseFromPlist.
2324 2009-09-25 Kevin Ollivier <kevino@theolliviers.com>
2326 Build fix. Adding missing header files.
2328 * bindings/js/JSNamedNodeMapCustom.cpp:
2330 2009-09-25 David Kilzer <ddkilzer@apple.com>
2332 Part 1 of 2: <http://webkit.org/b/29753> DerivedSources.make broken for non-Mac targets
2334 Reviewed by Darin Adler.
2336 * DerivedSources.make: Move tests for ENABLE_CONTEXT_MENUS,
2337 ENABLE_DRAG_SUPPORT and ENABLE_INSPECTOR into Mac-only section.
2339 2009-09-25 Adam Barth <abarth@webkit.org>
2341 Reviewed by Darin Adler.
2343 Load blocks during unload should not affect targeted loads
2344 https://bugs.webkit.org/show_bug.cgi?id=29747
2346 Move the check of the unload state after checking for targeted links.
2348 Test: fast/loader/unload-hyperlink-targeted.html
2350 * loader/FrameLoader.cpp:
2351 (WebCore::FrameLoader::loadURL):
2353 2009-09-25 Kenneth Russell <kbr@google.com>
2355 Reviewed by Dimitri Glazkov.
2357 [Chromium] Add initial V8 bindings for WebGL
2358 https://bugs.webkit.org/show_bug.cgi?id=29664
2361 * bindings/scripts/CodeGeneratorV8.pm:
2362 * bindings/v8/DOMObjectsInclude.h:
2363 * bindings/v8/DerivedSourcesAllInOne.cpp:
2364 * bindings/v8/V8DOMWrapper.cpp:
2365 (WebCore::V8DOMWrapper::getTemplate):
2366 * bindings/v8/V8Index.cpp:
2367 * bindings/v8/V8Index.h:
2368 * bindings/v8/custom/V8CanvasArrayBufferCustom.cpp: Added.
2369 (WebCore::CALLBACK_FUNC_DECL):
2370 * bindings/v8/custom/V8CanvasArrayCustom.h: Added.
2371 (WebCore::constructCanvasArray):
2372 * bindings/v8/custom/V8CanvasByteArrayCustom.cpp: Added.
2373 (WebCore::CALLBACK_FUNC_DECL):
2374 (WebCore::INDEXED_PROPERTY_GETTER):
2375 (WebCore::INDEXED_PROPERTY_SETTER):
2376 * bindings/v8/custom/V8CanvasFloatArrayCustom.cpp: Added.
2377 (WebCore::CALLBACK_FUNC_DECL):
2378 (WebCore::INDEXED_PROPERTY_GETTER):
2379 (WebCore::INDEXED_PROPERTY_SETTER):
2380 * bindings/v8/custom/V8CanvasIntArrayCustom.cpp: Added.
2381 (WebCore::CALLBACK_FUNC_DECL):
2382 (WebCore::INDEXED_PROPERTY_GETTER):
2383 (WebCore::INDEXED_PROPERTY_SETTER):
2384 * bindings/v8/custom/V8CanvasRenderingContext3DCustom.cpp: Added.
2385 (WebCore::jsArrayToFloatArray):
2386 (WebCore::jsArrayToIntArray):
2387 (WebCore::CALLBACK_FUNC_DECL):
2389 (WebCore::vertexAttribAndUniformHelperf):
2390 (WebCore::uniformHelperi):
2391 (WebCore::uniformMatrixHelper):
2392 * bindings/v8/custom/V8CanvasShortArrayCustom.cpp: Added.
2393 (WebCore::CALLBACK_FUNC_DECL):
2394 (WebCore::INDEXED_PROPERTY_GETTER):
2395 (WebCore::INDEXED_PROPERTY_SETTER):
2396 * bindings/v8/custom/V8CanvasUnsignedByteArrayCustom.cpp: Added.
2397 (WebCore::CALLBACK_FUNC_DECL):
2398 (WebCore::INDEXED_PROPERTY_GETTER):
2399 (WebCore::INDEXED_PROPERTY_SETTER):
2400 * bindings/v8/custom/V8CanvasUnsignedIntArrayCustom.cpp: Added.
2401 (WebCore::CALLBACK_FUNC_DECL):
2402 (WebCore::INDEXED_PROPERTY_GETTER):
2403 (WebCore::INDEXED_PROPERTY_SETTER):
2404 * bindings/v8/custom/V8CanvasUnsignedShortArrayCustom.cpp: Added.
2405 (WebCore::CALLBACK_FUNC_DECL):
2406 (WebCore::INDEXED_PROPERTY_GETTER):
2407 (WebCore::INDEXED_PROPERTY_SETTER):
2408 * bindings/v8/custom/V8CustomBinding.h:
2409 * bindings/v8/custom/V8DocumentCustom.cpp:
2410 (WebCore::CALLBACK_FUNC_DECL):
2411 * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
2412 (WebCore::CALLBACK_FUNC_DECL):
2413 * platform/graphics/GraphicsContext3D.h:
2415 2009-09-25 Jeremy Orlow <jorlow@chromium.org>
2417 This is breaking Chromium try bots, so I'm counting this as a build fix.
2419 Add more svn:ignore exceptions. On different platforms, these files are
2420 generated with different case for WebCore.
2422 * WebCore.gyp: Changed property svn:ignore.
2424 2009-09-25 Alexey Proskuryakov <ap@apple.com>
2426 Reverting r48767, as it broke Windows build in a non-trivial way.
2428 * bindings/js/JSAbstractWorkerCustom.cpp:
2429 (WebCore::JSAbstractWorker::addEventListener):
2430 (WebCore::JSAbstractWorker::removeEventListener):
2431 * bindings/js/JSDOMApplicationCacheCustom.cpp:
2432 (WebCore::JSDOMApplicationCache::addEventListener):
2433 (WebCore::JSDOMApplicationCache::removeEventListener):
2434 * bindings/js/JSDOMGlobalObject.cpp:
2435 (WebCore::JSDOMGlobalObject::createJSAttributeEventListener):
2436 * bindings/js/JSDOMWindowCustom.cpp:
2437 (WebCore::JSDOMWindow::addEventListener):
2438 (WebCore::JSDOMWindow::removeEventListener):
2439 * bindings/js/JSEventListener.cpp:
2440 (WebCore::JSEventListener::JSEventListener):
2441 (WebCore::JSEventListener::jsFunction):
2442 (WebCore::JSEventListener::markJSFunction):
2443 (WebCore::JSEventListener::handleEvent):
2444 (WebCore::JSEventListener::reportError):
2445 * bindings/js/JSEventListener.h:
2446 (WebCore::JSEventListener::create):
2447 * bindings/js/JSEventSourceCustom.cpp:
2448 (WebCore::JSEventSource::addEventListener):
2449 (WebCore::JSEventSource::removeEventListener):
2450 * bindings/js/JSLazyEventListener.cpp:
2451 (WebCore::JSLazyEventListener::JSLazyEventListener):
2452 (WebCore::JSLazyEventListener::jsFunction):
2453 (WebCore::JSLazyEventListener::parseCode):
2454 * bindings/js/JSLazyEventListener.h:
2455 (WebCore::JSLazyEventListener::create):
2456 * bindings/js/JSMessagePortCustom.cpp:
2457 (WebCore::JSMessagePort::addEventListener):
2458 (WebCore::JSMessagePort::removeEventListener):
2459 * bindings/js/JSNodeCustom.cpp:
2460 (WebCore::JSNode::addEventListener):
2461 (WebCore::JSNode::removeEventListener):
2462 * bindings/js/JSSVGElementInstanceCustom.cpp:
2463 (WebCore::JSSVGElementInstance::addEventListener):
2464 (WebCore::JSSVGElementInstance::removeEventListener):
2465 * bindings/js/JSWorkerContextCustom.cpp:
2466 (WebCore::JSWorkerContext::addEventListener):
2467 (WebCore::JSWorkerContext::removeEventListener):
2468 * bindings/js/JSXMLHttpRequestCustom.cpp:
2469 (WebCore::JSXMLHttpRequest::addEventListener):
2470 (WebCore::JSXMLHttpRequest::removeEventListener):
2471 * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
2472 (WebCore::JSXMLHttpRequestUpload::addEventListener):
2473 (WebCore::JSXMLHttpRequestUpload::removeEventListener):
2474 * bindings/js/ScriptEventListener.cpp:
2475 (WebCore::createAttributeEventListener):
2476 * bindings/objc/ObjCEventListener.h:
2477 * bindings/objc/ObjCEventListener.mm:
2478 (WebCore::ObjCEventListener::handleEvent):
2479 * bindings/scripts/CodeGeneratorJS.pm:
2480 * dom/EventListener.h:
2481 (WebCore::EventListener::reportError):
2482 (WebCore::EventListener::jsFunction):
2483 * dom/EventTarget.cpp:
2484 (WebCore::EventTarget::fireEventListeners):
2485 * inspector/InspectorDOMAgent.cpp:
2486 (WebCore::InspectorDOMAgent::handleEvent):
2487 * inspector/InspectorDOMAgent.h:
2488 * inspector/InspectorDOMStorageResource.cpp:
2489 (WebCore::InspectorDOMStorageResource::handleEvent):
2490 * inspector/InspectorDOMStorageResource.h:
2491 * loader/ImageDocument.cpp:
2492 (WebCore::ImageEventListener::handleEvent):
2493 * svg/animation/SVGSMILElement.cpp:
2494 (WebCore::ConditionEventListener::handleEvent):
2495 * workers/WorkerContext.cpp:
2496 (WebCore::WorkerContext::reportException):
2498 2009-09-24 Tony Chang <tony@chromium.org>
2500 Reviewed by David Levin.
2502 Add a gyp variable to allow building a debug webcore without debug
2503 symbols. This allows for faster compile, link, and gdb times.
2505 https://bugs.webkit.org/show_bug.cgi?id=29721
2507 No new tests, build config change.
2509 * WebCore.gyp/WebCore.gyp:
2511 2009-09-25 Darin Fisher <darin@chromium.org>
2513 Reviewed by Dimitri Glazkov.
2515 Declare RegisteredEventListener as a class instead of a struct.
2516 This fixes a warning in the Chromium build.
2518 * dom/RegisteredEventListener.h:
2520 2009-09-25 Dan Bernstein <mitz@apple.com>
2522 Reviewed by Jon Honeycutt.
2525 <rdar://problem/7211635> 2 byte characters are displayed as garbaged
2526 <rdar://problem/7212626> garbled/gibberish text (off-by-one)
2528 When the Windows Fonts directory contains more than one font file for a
2529 given font name, which of the fonts gets assigned to the name in the
2530 Core Graphics font database was determined arbitrarily and did not
2531 always match the font GDI used for the same font name. The mismatch
2532 caused character-to-glyph mapping to use one font and glyph rendering to
2535 The fix is to update the Core Graphics font database from the registry
2536 entries (that reflect the name-to-font mapping that GDI uses) after
2537 populating it with the result of scanning the Fonts directory. As a
2538 consequence, the directory needs to be scanned at startup every time the
2539 registry key changes, so the last value of the registry key is kept
2540 in the property list on disk so that it could be compared to the current
2543 * platform/graphics/win/FontDatabase.cpp:
2544 (WebCore::populateFontDatabaseFromPlist): Now takes a property list as
2545 a parameter and avoids round-tripping through XML by calling
2546 wkAddFontsFromPlist() instead of wkAddFontsFromPlistRepresentation().
2547 (WebCore::fontFilenamesFromRegistryKey):
2548 (WebCore::cgFontDBKey):
2549 (WebCore::writeFontDatabaseToPlist): Now takes the CG font DB property
2550 list and a property list with the font filenames from the registry and
2551 writes a dictionary with those property lists as values.
2552 (WebCore::fontFilenamesFromRegistry): Added. Returns an array with the
2553 values in the HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts
2555 (WebCore::populateFontDatabase): Changed to read the contents of the
2556 Fonts registry key and compare it with the last-saved value from the
2557 property list, and to call wkAddFontsFromRegistry() after populating the
2558 CG font DB from the file system. Uses wkCreateFontsPlist() instead of
2559 wkCreateFontsPlistRepresentation() to avoid round-tripping through XML.
2561 2009-09-25 Geoffrey Garen <ggaren@apple.com>
2563 Reviewed by Darin Adler.
2565 Inlined some object creation code, including lexicalGlobalObject access
2566 https://bugs.webkit.org/show_bug.cgi?id=29750
2568 * bindings/js/JSInspectorBackendCustom.cpp:
2569 (WebCore::JSInspectorBackend::currentCallFrame):
2570 * inspector/JavaScriptDebugServer.cpp:
2571 (WebCore::JavaScriptDebugServer::hasBreakpoint): Updated for JavaScriptCore
2574 2009-09-25 Dave Hyatt <hyatt@apple.com>
2576 Reviewed by Anders Carlsson.
2578 https://bugs.webkit.org/show_bug.cgi?id=24399
2579 Make @import work in user stylesheets. The first bug was that the URL wasn't being set on the
2580 user sheets themselves, so relative @import URLs couldn't resolve properly. The second bug
2581 was that the loads would be denied. This is fixed by using the requestUserCSSStyleSheet method
2582 instead of the normal request method. In order to know when to do this, CSSStyleSheets now have
2583 a propagated boolean, m_isUserStyleSheet, that lets them know if they are user stylesheets or not.
2585 * css/CSSImportRule.cpp:
2586 (WebCore::CSSImportRule::insertedIntoParent):
2587 * css/CSSStyleSheet.cpp:
2588 (WebCore::CSSStyleSheet::CSSStyleSheet):
2589 * css/CSSStyleSheet.h:
2590 (WebCore::CSSStyleSheet::setIsUserStyleSheet):
2591 (WebCore::CSSStyleSheet::isUserStyleSheet):
2593 (WebCore::Document::pageUserSheet):
2594 (WebCore::Document::pageGroupUserSheets):
2596 2009-09-25 Simon Fraser <simon.fraser@apple.com>
2598 Reviewed by Darin Adler.
2600 ASSERTION FAILED: !repaintContainer || repaintContainer == this
2601 https://bugs.webkit.org/show_bug.cgi?id=29755
2603 It's possible for RenderObject::container() to return an object that is higher
2604 in the hierarchy than the repaintContainer that is being used to repaint an
2605 object. For example, this can happen when running an accelerated opacity
2606 transition on an element with a position:absolute parent, and a position:absolute child.
2608 In this case we need to detect when RenderObject::container() will skip over
2609 repaintContainer, and in that case adjust the coords to shift into repaintContainer's space.
2611 Test: compositing/repaint/opacity-between-absolute.html
2613 * rendering/RenderBox.cpp:
2614 (WebCore::RenderBox::mapLocalToContainer):
2615 (WebCore::RenderBox::computeRectForRepaint):
2616 * rendering/RenderInline.cpp:
2617 (WebCore::RenderInline::computeRectForRepaint):
2618 * rendering/RenderObject.cpp:
2619 (WebCore::RenderObject::container):
2620 * rendering/RenderObject.h:
2622 2009-09-25 Simon Fraser <simon.fraser@apple.com>
2624 Reviewed by Darin Adler.
2626 Crash with hardware accelerated rotation of a PDF image in a data URL
2627 <rdar://problem/7250378>
2629 PDF images don't return a color space from CGImageGetColorSpace(),
2630 so we need to null-check the return value before use.
2632 Test: compositing/color-matching/pdf-image-match.html
2634 * platform/graphics/mac/GraphicsLayerCA.mm:
2635 (WebCore::GraphicsLayerCA::setContentsToImage):
2637 2009-09-25 Darin Adler <darin@apple.com>
2639 Reviewed by Geoffrey Garen.
2641 Null-deref when first access to an Attr node is after its Element is destroyed
2642 https://bugs.webkit.org/show_bug.cgi?id=29748
2644 Test: fast/dom/Attr/access-after-element-destruction.html
2646 * bindings/js/JSAttrCustom.cpp:
2647 (WebCore::JSAttr::markChildren): Added. Keeps the ownerElement alive as
2648 long as the Attr is alive.
2650 * bindings/js/JSNamedNodeMapCustom.cpp:
2651 (WebCore::JSNamedNodeMap::markChildren): Added. Keeps the Element alive as
2652 long as the NamedNodeMap is alive.
2654 * dom/Attr.idl: Added CustomMarkFunction attribute.
2656 * dom/NamedAttrMap.cpp:
2657 (WebCore::NamedNodeMap::getAttributeItem): Tweaked formatting.
2658 (WebCore::NamedNodeMap::detachFromElement): Call clearAttributes so we don't
2659 have attributes hanging around that might need an Attr node created; that way
2660 we won't crash with a null-dereference trying to deal with one of them. This
2661 can't happen when working with JavaScript since the Element will be kept
2662 alive due to the change above.
2663 (WebCore::NamedNodeMap::addAttribute): Fix function name in comment.
2664 (WebCore::NamedNodeMap::removeAttribute): Removed unneeded "+ 1" and added
2667 * dom/NamedAttrMap.h: Made the element function public so it can be used by
2668 the JavaScript binding to keep the Element alive.
2670 * dom/NamedNodeMap.idl: Added CustomMarkFunction attribute.
2672 2009-09-24 Alexey Proskuryakov <ap@apple.com>
2674 Reviewed by Darin Adler and Sam Weinig.
2676 Onclick not fired for an element copied with cloneContents() or cloneNode()
2677 https://bugs.webkit.org/show_bug.cgi?id=25130
2679 The change here is that JS event listeners don't keep a reference to a global object from
2680 where they were created, and instead take it as a parameter when parsing source code. Also,
2681 the listener creation won't fail just because it happens for an element in a frameless
2683 Thus, moving nodes between documents no longer results in having incorrect registered
2684 lazy event listeners on them.
2686 Tests: fast/events/attribute-listener-cloned-from-frameless-doc-context-2.html
2687 fast/events/attribute-listener-cloned-from-frameless-doc-context.html
2688 fast/events/attribute-listener-cloned-from-frameless-doc.xhtml
2689 fast/events/attribute-listener-extracted-from-frameless-doc-context-2.html
2690 fast/events/attribute-listener-extracted-from-frameless-doc-context.html
2692 * bindings/js/JSEventListener.cpp:
2693 (WebCore::JSEventListener::JSEventListener): Don't take a reference to JSDOMGlobalObject.
2694 (WebCore::JSEventListener::jsFunction): Take ScriptExecutionContext as a parameter for
2695 getting to JSDOMGlobalObject. It's not used in base class, but is in JSLazyEventListner.
2696 (WebCore::JSEventListener::markJSFunction): Don't mark the global object.
2697 (WebCore::JSEventListener::handleEvent): Get global object from ScriptExecutionContext.
2698 (WebCore::JSEventListener::reportError): Ditto.
2700 * bindings/js/JSEventListener.h: (WebCore::JSEventListener::create): Don't keep a reference
2701 to JSDOMGlobalObject.
2703 * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::parseCode): Listener
2704 creation was split between this function and ScriptEventListener; moved it here, as JS
2705 global object can be different now.
2707 * bindings/js/JSLazyEventListener.h: (WebCore::JSLazyEventListener::create): Keep source URL,
2708 which can not be determined at parsing time.
2710 * bindings/js/ScriptEventListener.cpp: (WebCore::createAttributeEventListener): Moved code
2711 for listener creation to JSLazyEventListener. XSSAuditor code remains here, because tests
2712 expect that errors are logged at document parsing time, and because I don't know what other
2713 side effects moving it vould have.
2715 * dom/EventListener.h: handleEvent() and reportError() now take ScriptExecutionContext,
2716 because JSC needs a global context here.
2718 * bindings/js/JSAbstractWorkerCustom.cpp:
2719 (WebCore::JSAbstractWorker::addEventListener):
2720 (WebCore::JSAbstractWorker::removeEventListener):
2721 * bindings/js/JSDOMApplicationCacheCustom.cpp:
2722 (WebCore::JSDOMApplicationCache::addEventListener):
2723 (WebCore::JSDOMApplicationCache::removeEventListener):
2724 * bindings/js/JSDOMGlobalObject.cpp:
2725 (WebCore::JSDOMGlobalObject::createJSAttributeEventListener):
2726 * bindings/js/JSDOMWindowCustom.cpp:
2727 (WebCore::JSDOMWindow::addEventListener):
2728 (WebCore::JSDOMWindow::removeEventListener):
2729 * bindings/js/JSEventSourceCustom.cpp:
2730 (WebCore::JSEventSource::addEventListener):
2731 (WebCore::JSEventSource::removeEventListener):
2732 * bindings/js/JSMessagePortCustom.cpp:
2733 (WebCore::JSMessagePort::addEventListener):
2734 (WebCore::JSMessagePort::removeEventListener):
2735 * bindings/js/JSNodeCustom.cpp:
2736 (WebCore::JSNode::addEventListener):
2737 (WebCore::JSNode::removeEventListener):
2738 * bindings/js/JSSVGElementInstanceCustom.cpp:
2739 (WebCore::JSSVGElementInstance::addEventListener):
2740 (WebCore::JSSVGElementInstance::removeEventListener):
2741 * bindings/js/JSWorkerContextCustom.cpp:
2742 (WebCore::JSWorkerContext::addEventListener):
2743 (WebCore::JSWorkerContext::removeEventListener):
2744 * bindings/js/JSXMLHttpRequestCustom.cpp:
2745 (WebCore::JSXMLHttpRequest::addEventListener):
2746 (WebCore::JSXMLHttpRequest::removeEventListener):
2747 * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
2748 (WebCore::JSXMLHttpRequestUpload::addEventListener):
2749 (WebCore::JSXMLHttpRequestUpload::removeEventListener):
2750 * bindings/objc/ObjCEventListener.h:
2751 * bindings/objc/ObjCEventListener.mm:
2752 (WebCore::ObjCEventListener::handleEvent):
2753 * bindings/scripts/CodeGeneratorJS.pm:
2754 * dom/EventTarget.cpp:
2755 (WebCore::EventTarget::fireEventListeners):
2756 * inspector/InspectorDOMAgent.cpp:
2757 (WebCore::InspectorDOMAgent::handleEvent):
2758 * inspector/InspectorDOMAgent.h:
2759 * inspector/InspectorDOMStorageResource.cpp:
2760 (WebCore::InspectorDOMStorageResource::handleEvent):
2761 * inspector/InspectorDOMStorageResource.h:
2762 * loader/ImageDocument.cpp:
2763 (WebCore::ImageEventListener::handleEvent):
2764 * svg/animation/SVGSMILElement.cpp:
2765 (WebCore::ConditionEventListener::handleEvent):
2766 * workers/WorkerContext.cpp:
2767 (WebCore::WorkerContext::reportException):
2768 Don't pass global object to JSEventListener::create(), which no longer needs it.
2769 Note that some of these functions still have an early return for null global object, which
2770 can probably be removed in a later patch.
2771 Pass ScriptExecutionContext to EventListener methods that now need it.
2773 2009-09-25 Enrica Casucci <enrica@apple.com>
2775 Reviewed by Darin Adler, Dan Bernstein, Adele Peterson, and others.
2777 Fix for https://bugs.webkit.org/show_bug.cgi?id=29740
2778 <rdar://problem/7168738> Gmail: After changing a foreground text color, pressing return doesn't apply background to new line
2780 Change the way style is preserved when inserting a new paragraph.
2781 The original code handled insertion at the beginning and at the end of a paragraph as special
2782 cases. The newly created paragraph contained a set of nodes generated starting from the
2783 computed style of the insertion node. This approach has two problems:
2784 1. if the insertion node has a non opaque background color and one of the parent element did have
2785 a solid background color the new paragraph did not have the element with the solid color in the tree.
2786 2. in some circumstances it generated more markup than the original paragraph had (a span with bold, italic,
2787 background color and some font attribute was being reproduced as span + bold + italic + font as separate tags.
2788 The new approach is to recreate in the new paragraph the same hierarchy of nodes found in the
2789 paragraph where the insertion point is.
2791 Test: editing/inserting/insert-bg-font.html
2793 * editing/InsertParagraphSeparatorCommand.cpp:
2794 (WebCore::InsertParagraphSeparatorCommand::getAncestorsInsideBlock): retrieves the list of all the ancestors
2795 between the insert node and the outer block.
2796 (WebCore::InsertParagraphSeparatorCommand::cloneHierarchyUnderNewBlock): uses the list of ancestors to recreate
2797 in the new paragraph the same element hierarchy present in the starting paragraph.
2798 (WebCore::InsertParagraphSeparatorCommand::doApply): changed the code to handle the general case of insertion
2799 in the middle of the paragraph to use the new methods. Changed the handling of the insertion at the beginning and
2800 at the end of the paragraph to use the new methods instead of applying the calculated style.
2801 * editing/InsertParagraphSeparatorCommand.h: added methods getAncestorsInsideBlock and cloneHierarchyUnderNewBlock.
2803 2009-09-25 Patrick Mueller <Patrick_Mueller@us.ibm.com>
2805 Reviewed by Timothy Hatcher.
2807 Content-type parameters not taken into account when building form-data
2808 https://bugs.webkit.org/show_bug.cgi?id=28970
2810 existing manual test case extended with new tests
2812 * English.lproj/localizedStrings.js:
2813 * inspector/front-end/ResourceView.js:
2814 (WebInspector.ResourceView.prototype._refreshFormData):
2815 (WebInspector.ResourceView.prototype._refreshParms):
2816 * manual-tests/inspector/display-form-data.html:
2818 2009-09-25 Yuan Song <song.yuan@ericsson.com>
2820 Reviewed by Darin Adler.
2822 https://bugs.webkit.org/show_bug.cgi?id=14566
2824 Raise SECURITY_ERR exception if an attempt is made to change document.domain to an invalid value.
2826 Test: fast/js/invalid-domain-change-throws-exception.html
2829 (WebCore::Document::setDomain):
2833 2009-09-25 Adam Barth <abarth@webkit.org>
2835 Reviewed by Dimitri Glazkov.
2837 [V8] Teach ScheduledAction::execute about isolated worlds
2838 https://bugs.webkit.org/show_bug.cgi?id=27703
2840 When setTimeout is called with a string argument in an isolated
2841 world, we now compile the string in the isolated world.
2843 Last time we tried this change, we got a lot of crashes. This
2844 time we're using a fresh local handle as our context to avoid
2845 trouble if the peristent handle gets disposed before we leave
2848 Test: fast/dom/timer-clear-interval-in-handler-and-generate-error.html
2850 * bindings/v8/ScheduledAction.cpp:
2851 (WebCore::ScheduledAction::execute):
2853 2009-09-25 Paul Godavari <paul@chromium.org>
2855 Reviewed by Darin Fisher.
2857 Fix a regression in Mac Chromium popup menus, where the user's
2858 selection was ignored and the popup became unresponsive.
2859 https://bugs.webkit.org/show_bug.cgi?id=29726
2861 The fix is to notify the popup's client that the popup was hidden,
2862 even if the popup has no parent.
2864 * platform/chromium/PopupMenuChromium.cpp:
2865 (WebCore::PopupListBox::hidePopup):
2867 2009-09-25 Alexander Pavlov <apavlov@chromium.org>
2869 Reviewed by Dan Bernstein.
2871 Enable Pasteboard::writePlainText for Chromium and fix code style nits.
2872 https://bugs.webkit.org/show_bug.cgi?id=29734
2874 * platform/chromium/PasteboardChromium.cpp:
2875 (WebCore::Pasteboard::writePlainText):
2876 * platform/gtk/PasteboardGtk.cpp:
2877 (WebCore::Pasteboard::writePlainText):
2878 (WebCore::Pasteboard::writeURL):
2879 * platform/mac/PasteboardMac.mm:
2880 (WebCore::Pasteboard::writeSelection):
2881 (WebCore::Pasteboard::writePlainText):
2882 (WebCore::Pasteboard::writeURL):
2883 * platform/qt/PasteboardQt.cpp:
2884 (WebCore::Pasteboard::writePlainText):
2886 2009-09-25 Yongjun Zhang <yongjun.zhang@nokia.com>
2888 Reviewed by Ariya Hidayat.
2890 https://bugs.webkit.org/show_bug.cgi?id=28876
2891 [Qt] reduce peak memory consumption of text decoding.
2893 Chop large input buffer into small buffers to reduce peak memory
2896 * platform/text/qt/TextCodecQt.cpp:
2897 (WebCore::TextCodecQt::decode):
2899 2009-09-24 Jon Honeycutt <jhoneycutt@apple.com>
2901 Add a mechanism for automatically halting plug-ins.
2903 Reviewed by Oliver Hunt and Alice Liu.
2908 Update export of Page constructor.
2914 * WebCore.vcproj/WebCore.vcproj:
2915 Add PluginHalter.{h,cpp}, PluginHalterClient.h, and
2918 * WebCore.xcodeproj/project.pbxproj:
2919 Add files to Mac project.
2921 * loader/EmptyClients.h:
2922 Added an empty PluginHalterClient.
2923 (WebCore::EmptyPluginHalterClient::shouldHaltPlugin):
2926 * page/PluginHalter.cpp: Added.
2927 (WebCore::PluginHalter::PluginHalter):
2928 (WebCore::PluginHalter::didStartPlugin):
2929 Add the object to the plug-in set. If this is the only item in the set,
2930 set m_oldestStartTime to this object's time, and start the timer.
2931 (WebCore::PluginHalter::didStopPlugin):
2932 Remove the plug-in from the set.
2933 (WebCore::PluginHalter::timerFired):
2934 Find the cut-off time as the current time minus the allowed run time;
2935 plug-ins older than this may be halted. Iterate over the plug-ins. Find
2936 the object with the oldest start time that is too young to be halted;
2937 we'll use its start time to set the timer's next fire time. For all
2938 plug-ins that are candidates to be halted, call the
2939 PluginHalterClient's shouldHaltPlugin(). If this function returns true,
2940 call the plug-in's halt() function. Remove these objects from the set
2941 of tracked plug-ins. Call startTimerIfNecessary() to restart the timer.
2942 (WebCore::PluginHalter::startTimerIfNecessary):
2943 If the timer is set to fire, or the set of tracked plug-ins is empty,
2944 return early. Set the timer to fire after the oldest plug-in has run
2945 for the allowed run time.
2947 * page/PluginHalter.h: Added.
2948 (WebCore::PluginHalter::setPluginAllowedRunTime):
2950 * page/PluginHalterClient.h: Added.
2951 (WebCore::PluginHalterClient::~PluginHalterClient):
2954 (WebCore::Page::Page):
2955 Initialize m_pluginHalterClient. Call pluginHalterEnabledStateChanged()
2956 to create the PluginHalter if necessary.
2957 (WebCore::Page::pluginHalterEnabledStateChanged):
2958 If plug-in halting is enabled, create the PluginHalter. If it is
2960 (WebCore::Page::pluginAllowedRunTimeChanged):
2961 If there is a plug-in halter, call its setPluginAllowedRunTime().
2962 (WebCore::Page::didStartPlugin):
2963 If there is a plug-in halter, call its didStartPlugin().
2964 (WebCore::Page::didStopPlugin):
2965 If there is a plug-in halter, call its didStopPlugin().
2968 Add a parameter to the Page constructor for the PluginHalterClient.
2969 Added declarations for didStartPlugin() and didStopPlugin(), which are
2970 called when HaltablePlugins are added to or removed from the page. Adds
2971 pluginAllowedRunTimeChanged() and pluginHalterEnabledStateChanged() to
2972 notify the Page when these settings are changed. Added members to hold
2973 the PluginHalter and the PluginHalterClient.
2975 * page/Settings.cpp:
2976 (WebCore::Settings::Settings):
2977 (WebCore::Settings::setPluginHalterEnabled):
2978 If the enabled state has changed, call the Page's
2979 pluginHalterEnabledStateChanged().
2980 (WebCore::Settings::setPluginAllowedRunTime):
2981 Call the Page's pluginAllowedRunTimeChanged().
2984 (WebCore::Settings::pluginHalterEnabled):
2985 (WebCore::Settings::pluginAllowedRunTime):
2987 * page/HaltablePlugin.h: Added. Defines an interface for plug-ins that
2988 can be automatically halted.
2989 (WebCore::HaltablePlugin::~HaltablePlugin):
2991 * svg/graphics/SVGImage.cpp:
2992 (WebCore::SVGImage::dataChanged):
2993 Pass a dummy PluginHalterClient.
2995 2009-09-24 Simon Fraser <simon.fraser@apple.com>
2997 Reviewed by Dan Bernstein.
2999 REGRESSION: webkit-transform scale no longer works properly in nightly build
3000 https://bugs.webkit.org/show_bug.cgi?id=29730
3002 When the initial or final state of a scale animation does not specify a transform,
3003 use a default scale of 1, rather than zero.
3005 Test: compositing/transitions/scale-transition-no-start.html
3007 * platform/graphics/mac/GraphicsLayerCA.mm:
3008 (WebCore::getTransformFunctionValue):
3010 2009-09-24 John Gregg <johnnyg@google.com>
3012 Reviewed by Eric Seidel.
3014 isEnabled switch for notifications (experimental) in Page Settings
3015 https://bugs.webkit.org/show_bug.cgi?id=28930
3017 Adds a run-time flag in Settings object that controls whether
3018 to expose desktop notifications.
3020 No new test, but test code also modified to set this preference.
3022 * page/DOMWindow.cpp:
3023 (WebCore::DOMWindow::webkitNotifications): check preference before returning notifications object
3024 * page/Settings.cpp:
3025 (WebCore::Settings::Settings):
3026 (WebCore::Settings::setExperimentalNotificationsEnabled):
3028 (WebCore::Settings::experimentalNotificationsEnabled):
3030 2009-09-24 Dan Bernstein <mitz@apple.com>
3032 Reviewed by Sam Weinig.
3034 Fix <rdar://problem/7162000> Crash while trying to
3035 calculate the horizontal position of image
3037 Test: fast/inline-block/relative-positioned-rtl-crash.html
3039 * rendering/RenderBox.cpp:
3040 (WebCore::RenderBox::calcAbsoluteHorizontalReplaced): Corrected an
3041 isInline() test to isRenderInline(). This is similar to r41259.
3043 2009-09-24 Jessie Berlin <jberlin@webkit.org>
3045 Reviewed by Timothy Hatcher.
3047 Fix expanding profile call stacks being broken after sorting.
3048 https://bugs.webkit.org/show_bug.cgi?id=26423
3050 * inspector/front-end/ProfileDataGridTree.js:
3051 (WebInspector.ProfileDataGridNode.prototype.sort):
3052 Set shouldRefreshChildren to true on collapsed nodes with children so that expanding it
3053 causes the children to be placed in the right positions.
3055 2009-09-24 Geoffrey Garen <ggaren@apple.com>
3057 Reviewed by Stephanie Lewis.
3059 Fixed sudden termination console spew due to too many calls to
3060 enableSuddenTermination.
3062 <rdar://problem/7063125> 10A410: Safari logging enableSuddenTermination errors
3064 * page/DOMWindow.cpp:
3065 (WebCore::removeUnloadEventListener):
3066 (WebCore::removeAllUnloadEventListeners):
3067 (WebCore::removeBeforeUnloadEventListener):
3068 (WebCore::removeAllBeforeUnloadEventListeners): Only
3069 enableSuddenTermination if the set of listeners is empty *and* this
3070 window was in the set. Otherwise, a no-op will cause us to enableSuddenTermination.
3072 2009-09-24 Carol Szabo <carol.szabo@nokia.com>
3074 Reviewed by Alexey Proskuryakov.
3076 WebKit returns "" instead of null when getting
3077 inexistent, forbidden or invalidly named headers.
3078 https://bugs.webkit.org/show_bug.cgi?id=29140
3080 * xml/XMLHttpRequest.cpp:
3081 (WebCore::XMLHttpRequest::getResponseHeader):
3082 Changed to return null as it should according to the spec.
3084 2009-09-24 Jeremy Orlow <jorlow@chromium.org>
3086 Reviewed by Dimitri Glazkov.
3088 Add GYP generated files to svn:ignore
3089 https://bugs.webkit.org/show_bug.cgi?id=29724
3091 Adding the following files to the svn:ignore list (all in the
3092 WebCore/WebCore.gyp directory)
3098 WebCore_Release.rules
3099 WebCore_Release - no tcmalloc.rules
3100 WebCore_Purify.rules
3102 WebCore_Debug_rules.mk
3103 WebCore_Release_rules.mk
3104 WebCore_Release - no tcmalloc_rules.mk
3105 WebCore_Purify_rules.mk
3109 * WebCore.gyp: Changed property svn:ignore.
3111 2009-09-24 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
3113 Unreviewed. Mac build fix.
3115 * page/EventHandler.cpp:
3116 (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal):
3117 remove unused parameter from function signature;
3119 2009-09-24 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
3121 Reviewed by Oliver Hunt.
3123 Implement correct horizontal scrollbar behavior for GTK+ also on
3126 https://bugs.webkit.org/show_bug.cgi?id=29348
3127 [Gtk] Scrollwheel on horizontal scrollbars should slide horizontally
3129 Test: platform/gtk/scrollbars/overflow-scrollbar-horizontal-wheel-scroll.html
3131 * page/EventHandler.cpp:
3132 (WebCore::EventHandler::handleWheelEvent): on GTK+, when using the
3133 wheel with the pointer on the horizontal scrollbar, scroll
3135 * platform/PlatformWheelEvent.h:
3136 * platform/gtk/WheelEventGtk.cpp:
3137 (WebCore::PlatformWheelEvent::swapOrientation): allow adding a
3138 vertical scroll to the horizontal one;
3140 2009-09-24 Jeremy Orlow <jorlow@chromium.org>
3142 Reviewed by Eric Seidel.
3144 StorageNamespace::storageArea() should take in a PassRefPtr<StorageOrigin>
3145 https://bugs.webkit.org/show_bug.cgi?id=29290
3147 Modified StorageNamespace::storageArea() to take in a PassRefPtr<StorageOrigin>
3148 per http://webkit.org/coding/RefPtr.html
3150 No behavior change, so no tests.
3152 * storage/StorageNamespace.h:
3153 * storage/StorageNamespaceImpl.cpp:
3154 (WebCore::StorageNamespaceImpl::storageArea):
3155 * storage/StorageNamespaceImpl.h:
3157 2009-09-24 Geoffrey Garen <ggaren@apple.com>
3159 Reviewed by Sam Weinig.
3161 Added back enable/disableSuddenTermination() functionality I accidentally
3162 removed in my last patch.
3164 * page/DOMWindow.cpp:
3165 (WebCore::addUnloadEventListener):
3166 (WebCore::removeUnloadEventListener):
3167 (WebCore::removeAllUnloadEventListeners):
3168 (WebCore::addBeforeUnloadEventListener):
3169 (WebCore::removeBeforeUnloadEventListener):
3170 (WebCore::removeAllBeforeUnloadEventListeners):
3171 (WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
3172 (WebCore::DOMWindow::~DOMWindow):
3173 (WebCore::DOMWindow::addEventListener):
3174 (WebCore::DOMWindow::removeEventListener):
3175 (WebCore::DOMWindow::removeAllEventListeners):
3177 2009-09-24 Sam Weinig <sam@webkit.org>
3179 Reviewed by Steve Falkenburg and Mark Rowe.
3181 Don't pass -F to GCC on non-mac platforms since it is an darwin only.
3183 * DerivedSources.make:
3185 2009-09-24 Sam Weinig <sam@webkit.org>
3191 2009-09-23 Stephen White <senorblanco@chromium.org>
3193 Reviewed by Eric Seidel.
3195 Revert the relevant parts of r47925, and implement an alternate
3196 fix (localize the coordinate check to GraphicsContext::clipPath()).
3197 This fixes http://crbug.com/21174.
3199 Covered by LayoutTests/svg/dynamic-updates/SVGClipPathElement-dom-clipPathUnits-attr.html.
3201 * platform/graphics/skia/GraphicsContextSkia.cpp:
3202 (WebCore::GraphicsContext::clipPath):
3203 * platform/graphics/skia/PlatformContextSkia.cpp:
3204 (PlatformContextSkia::currentPathInLocalCoordinates):
3206 2009-09-24 Brady Eidson <beidson@apple.com>
3208 Reviewed by Sam Weinig.
3210 Merge changes from Mozilla's FTP directory parser.
3211 <rdar://problem/7227620> and https://bugs.webkit.org/show_bug.cgi?id=29294
3213 FTP layout tests not possible at this time.
3214 https://bugs.webkit.org/show_bug.cgi?id=29719 tracks making them possible.
3216 * loader/FTPDirectoryParser.cpp:
3217 (WebCore::ParsingFailed):
3218 (WebCore::parseOneFTPLine):
3220 2009-09-24 Philippe Normand <pnormand@igalia.com>
3222 Reviewed by Gustavo Noronha.
3224 [GTK] re-enable some media tests
3225 https://bugs.webkit.org/show_bug.cgi?id=29716
3227 make canPlayType() return "probably" if mime-type is known
3228 and codecs string is not empty. If codecs is empty return
3231 * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
3232 (WebCore::MediaPlayerPrivate::supportsType):
3234 2009-09-24 Sam Weinig <sam@webkit.org>
3236 Reviewed by Dan Bernstein.
3238 Fix for https://bugs.webkit.org/show_bug.cgi?id=29703
3239 Add a function to element to check whether it matches a CSS selector
3241 Implement Element.webkitMatchesSelector.
3243 * css/CSSSelectorList.cpp:
3244 (WebCore::forEachTagSelector):
3245 (WebCore::forEachSelector):
3246 (WebCore::SelectorNeedsNamespaceResolutionFunctor::operator()):
3247 (WebCore::CSSSelectorList::selectorsNeedNamespaceResolution):
3248 * css/CSSSelectorList.h:
3249 Moved code to iterate the CSSSelectorList and determine if any
3250 selectors need namespace resolution from a static function in
3251 Node.cpp to CSSSelectorList so that it can be used by webkitMatchesSelector
3252 as well as querySelector/querySelectorAll.
3255 (WebCore::Element::webkitMatchesSelector):
3258 Implement the new function. Handles exceptional cases identically to
3259 querySelector/querySelectorAll.
3262 (WebCore::Node::querySelector):
3263 (WebCore::Node::querySelectorAll):
3264 Moved selectorsNeedNamespaceResolution to CSSSelectorList from here.
3266 2009-09-24 Vitaly Repeshko <vitalyr@chromium.org>
3268 Reviewed by Dimitri Glazkov.
3270 [V8] Fixed bindings build after http://trac.webkit.org/changeset/48701
3271 https://bugs.webkit.org/show_bug.cgi?id=29713
3273 Got rid of isWindowEvent in function signatures:
3274 * bindings/v8/V8AbstractEventListener.cpp:
3275 (WebCore::V8AbstractEventListener::invokeEventHandler):
3276 (WebCore::V8AbstractEventListener::handleEvent):
3277 (WebCore::V8AbstractEventListener::getReceiverObject):
3278 * bindings/v8/V8AbstractEventListener.h:
3279 * bindings/v8/V8LazyEventListener.cpp:
3280 (WebCore::V8LazyEventListener::callListenerFunction):
3281 * bindings/v8/V8LazyEventListener.h:
3282 * bindings/v8/V8WorkerContextEventListener.cpp:
3283 (WebCore::V8WorkerContextEventListener::handleEvent):
3284 (WebCore::V8WorkerContextEventListener::callListenerFunction):
3285 (WebCore::V8WorkerContextEventListener::getReceiverObject):
3286 * bindings/v8/V8WorkerContextEventListener.h:
3287 * bindings/v8/custom/V8CustomEventListener.cpp:
3288 (WebCore::V8EventListener::callListenerFunction):
3289 * bindings/v8/custom/V8CustomEventListener.h:
3291 Switched to EventTarget methods of adding/removing listeners:
3292 * bindings/v8/custom/V8DOMApplicationCacheCustom.cpp:
3293 (WebCore::toEventID):
3294 (WebCore::ACCESSOR_SETTER):
3296 * dom/EventTarget.h: Some functions were incorrectly marked
3299 2009-09-24 Pavel Feldman <pfeldman@chromium.org>
3301 Reviewed by Timothy Hatcher.
3303 Web Inspector: Color-code watch expression errors with red.
3305 https://bugs.webkit.org/show_bug.cgi?id=29707
3307 * inspector/front-end/WatchExpressionsSidebarPane.js:
3308 (WebInspector.WatchExpressionsSection.prototype.update):
3309 (WebInspector.WatchExpressionTreeElement.prototype.update):
3310 * inspector/front-end/inspector.css:
3312 2009-09-24 Pavel Feldman <pfeldman@chromium.org>
3314 Reviewed by Timothy Hatcher.
3316 Web Inspector: Fix formatting for messages derived from resource warnings,
3317 couple of drive-by formatting fixes.
3319 https://bugs.webkit.org/show_bug.cgi?id=29705
3321 * inspector/InspectorFrontend.cpp:
3322 (WebCore::InspectorFrontend::addMessageToConsole):
3323 * inspector/front-end/ConsoleView.js:
3324 * inspector/front-end/InjectedScript.js:
3325 (InjectedScript._evaluateAndWrap):
3326 * inspector/front-end/WatchExpressionsSidebarPane.js:
3327 (WebInspector.WatchExpressionsSection.prototype.update):
3329 2009-09-22 Pavel Feldman <pfeldman@chromium.org>
3331 Reviewed by Timothy Hatcher.
3333 WebInspector: Implement InspectorController::copyNode(id).
3335 https://bugs.webkit.org/show_bug.cgi?id=28357
3337 * inspector/InspectorBackend.cpp:
3338 (WebCore::InspectorBackend::copyNode):
3339 * inspector/InspectorBackend.h:
3340 * inspector/InspectorBackend.idl:
3341 * inspector/front-end/ElementsPanel.js:
3342 (WebInspector.ElementsPanel.prototype.handleCopyEvent):
3344 2009-09-24 Oliver Hunt <oliver@apple.com>
3346 Reviewed by NOBODY(rollout)
3348 Roll out r48712 as it is incorrect.
3350 Overriding getPropertyNames is incorrect.
3352 * bridge/runtime_array.cpp:
3353 * bridge/runtime_array.h:
3355 2009-09-24 Xan Lopez <xlopez@igalia.com>
3357 Revert r48697, since it broke key handling notification to GTK+.
3359 * platform/gtk/KeyEventGtk.cpp:
3360 (WebCore::keyIdentifierForGdkKeyCode):
3361 (WebCore::singleCharacterString):
3363 2009-09-24 Philippe Normand <pnormand@igalia.com>
3365 Reviewed by Xan Lopez.
3367 [GTK] GStreamer MediaPlayer is unable to correctly querry duration
3368 https://bugs.webkit.org/show_bug.cgi?id=24639
3370 check duration returned by gst_element_query_duration() only
3371 when using GStreamer < 0.10.23.
3373 * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
3374 (WebCore::MediaPlayerPrivate::duration):
3376 2009-09-24 Benjamin Poulain <benjamin.poulain@nokia.com>
3378 Reviewed by Eric Seidel.
3380 The indices of RuntimeArray should be enumerated like for a regular array.
3381 https://bugs.webkit.org/show_bug.cgi?id=29005
3383 * bridge/runtime_array.cpp:
3384 (JSC::RuntimeArray::getPropertyNames):
3385 * bridge/runtime_array.h:
3387 2009-09-23 Alexander Pavlov <apavlov@chromium.org>
3389 Reviewed by Eric Seidel.
3391 Introduce Pasteboard::writePlaintext(const String&) so that copying
3392 of the inspected elements HTML will be possible in WebInspector.
3393 https://bugs.webkit.org/show_bug.cgi?id=29634
3395 * platform/Pasteboard.h:
3396 * platform/android/TemporaryLinkStubs.cpp:
3397 (Pasteboard::writePlainText):
3398 * platform/chromium/ChromiumBridge.h:
3399 * platform/chromium/PasteboardChromium.cpp:
3400 (WebCore::Pasteboard::writePlainText):
3401 * platform/gtk/PasteboardGtk.cpp:
3402 (WebCore::Pasteboard::writePlainText):
3403 * platform/haiku/PasteboardHaiku.cpp:
3404 (WebCore::Pasteboard::writePlainText):
3405 * platform/mac/PasteboardMac.mm:
3406 (WebCore::Pasteboard::writePlainText):
3407 * platform/qt/PasteboardQt.cpp:
3408 (WebCore::Pasteboard::writePlainText):
3409 * platform/win/PasteboardWin.cpp:
3410 (WebCore::Pasteboard::writeSelection):
3411 (WebCore::Pasteboard::writePlainText):
3412 * platform/wince/PasteboardWince.cpp:
3413 (WebCore::Pasteboard::writePlainText):
3414 * platform/wx/PasteboardWx.cpp:
3415 (WebCore::Pasteboard::writeSelection):
3416 (WebCore::Pasteboard::writePlainText):
3417 (WebCore::Pasteboard::writeURL):
3419 2009-09-24 Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
3421 Reviewed by Simon Hausmann.
3423 Fix QApp::translate() calls to provide the correct class name without
3426 * platform/qt/Localizations.cpp:
3427 (WebCore::localizedMediaTimeDescription):
3429 2009-09-24 Geoffrey Garen <ggaren@apple.com>
3431 More build fix: Removed JSSharedWorkerContextCustom.cpp from project
3432 files, since it no longer exists in the repository.
3437 * WebCore.vcproj/WebCore.vcproj:
3439 2009-09-24 Geoffrey Garen <ggaren@apple.com>
3441 Windows build fix: Declare set/unsetPendingActivity public, so
3442 SharedWorkerScriptLoader can call them.
3444 * dom/ActiveDOMObject.h:
3446 2009-09-24 Geoffrey Garen <ggaren@apple.com>
3448 Fixed a bit of the Windows build.
3450 * workers/SharedWorker.idl: Declare a custom mark function. (I accidentally
3451 removed this in my last patch.)
3452 * WebCore.xcodeproj/project.pbxproj: Added JSSharedWorkerCustom.cpp back
3453 to the build. (I accidentally removed this in my last patch.)
3455 2009-09-23 Geoffrey Garen <ggaren@apple.com>
3457 32-bit build fix: restore previous cast that I thought was unnecessary.
3459 * xml/XMLHttpRequest.cpp:
3460 (WebCore::XMLHttpRequest::didSendData):
3461 (WebCore::XMLHttpRequest::didReceiveData):
3463 2009-09-23 Geoffrey Garen <ggaren@apple.com>
3465 Reviewed by Sam Weinig.
3467 Bring a little sanity to this crazy EventTarget world of ours
3468 https://bugs.webkit.org/show_bug.cgi?id=29701
3470 Lots of EventTarget refactoring to achieve a single shared implementation
3471 that fixes some of the performance and correctness bugs of the many individual
3472 implementations, and makes reasoning about EventTargets and EventListeners
3475 The basic design is this:
3476 - EventTarget manages a set of EventListeners.
3477 - onXXX EventListener attributes forward to standard EventTarget APIs.
3478 - Since the onXXX code is repetitive, it is usually done with macros
3479 of the form DEFINE_ATTRIBUTE_EVENT_LISTENER(attributeName).
3480 - EventTarget provides a shared implementation of dispatchEvent,
3481 which subclasses with special event dispatch rules, like Node, override.
3482 - To support Node, which lazily instantiates its EventTarget data,
3483 EventTarget has no data members, and instead makes a virtual call
3484 to get its data from wherever its subclass chose to store it.
3486 Code that used to call dispatchEvent, passing an ExceptionCode paratmeter,
3487 even though no exception could be thrown, has been changed not to do so,
3488 to improve clarity and performance.
3490 Code that used to call a special dispatchXXXEvent function, which just
3491 turned around and called dispatchEvent, has been changed to call
3492 dispatchEvent, to improve clarity and performance.
3495 * WebCore.xcodeproj/project.pbxproj: Another day in the life of a WebKit
3498 * bindings/js/JSDOMBinding.cpp:
3499 (WebCore::isObservableThroughDOM): Updated for Node API change. Added
3500 "is not in the document but is firing event listeners" as a condition
3501 that makes a Node observable in the DOM, so that event listeners firing
3502 on removed nodes are not destroyed midstream. (This was a long-standing
3503 bug that was somewhat hidden by the old implementation's habit of
3504 copying the RegisteredEventListener vector before firing events, which
3505 would keep almost all the relevant objects from being destroyed.)
3507 * bindings/js/JSEventListener.cpp:
3508 (WebCore::JSEventListener::handleEvent): Removed the isWindowEvent flag
3509 because it was one of the most elaborately planned no-ops in the history
3510 of software crime, and one of the reasons clients thought they needed more
3511 than one dispatchEvent function even though they didn't.
3512 * bindings/js/JSEventListener.h:
3514 * bindings/js/JSDOMWindowCustom.cpp:
3515 (WebCore::JSDOMWindow::markChildren):
3516 (WebCore::JSMessagePort::markChildren):
3517 * bindings/js/JSNodeCustom.cpp:
3518 (WebCore::JSNode::markChildren):
3519 * bindings/js/JSAbstractWorkerCustom.cpp:
3520 * bindings/js/JSDOMApplicationCacheCustom.cpp:
3521 * bindings/js/JSDedicatedWorkerContextCustom.cpp:
3522 * bindings/js/JSEventSourceCustom.cpp:
3523 * bindings/js/JSMessagePortCustom.cpp:
3524 * bindings/js/JSSharedWorkerContextCustom.cpp: Removed.
3525 * bindings/js/JSWebSocketCustom.cpp:
3526 * bindings/js/JSWorkerContextCustom.cpp:
3527 (WebCore::JSWorkerContext::markChildren):
3528 * bindings/js/JSWorkerCustom.cpp:
3529 * bindings/js/JSXMLHttpRequestCustom.cpp:
3530 (WebCore::JSXMLHttpRequest::markChildren):
3531 * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
3532 (WebCore::JSXMLHttpRequestUpload::markChildren): EventListener marking is
3533 now autogenerated. Classes that still have custom mark functions for other
3534 reasons now call a shared EventTarget API to mark their EventListeners.
3536 * bindings/objc/ObjCEventListener.h:
3537 * bindings/objc/ObjCEventListener.mm:
3538 (WebCore::ObjCEventListener::handleEvent): Bye bye isWindowEvent.
3540 * bindings/scripts/CodeGeneratorJS.pm: Autogeneration support for
3541 marking and invalidating event listeners.
3543 * dom/CharacterData.cpp:
3544 (WebCore::CharacterData::dispatchModifiedEvent):
3545 * dom/ContainerNode.cpp:
3546 (WebCore::ContainerNode::insertBefore):
3547 (WebCore::ContainerNode::replaceChild):
3548 (WebCore::willRemoveChild):
3549 (WebCore::ContainerNode::appendChild):
3550 (WebCore::dispatchChildInsertionEvents):
3551 (WebCore::dispatchChildRemovalEvents):
3553 (WebCore::Document::removeAllEventListeners):
3554 (WebCore::Document::implicitClose):
3555 (WebCore::Document::setFocusedNode):
3556 (WebCore::Document::dispatchWindowEvent):
3557 (WebCore::Document::dispatchWindowLoadEvent):
3558 (WebCore::Document::finishedParsing):
3559 * dom/Document.h: Use dispatchEvent directly.
3561 * dom/Element.h: Moved a few event listener attributes down from Node,
3562 since they don't apply to all Nodes, only Elements.
3564 * dom/EventListener.h: Removed isWindowEvent parameter.
3566 * dom/EventNames.h: Added the "display" event name, so it works correctly
3567 with attribute macros, and for performance.
3569 * dom/EventTarget.cpp:
3570 (WebCore::forbidEventDispatch):
3571 (WebCore::allowEventDispatch):
3572 (WebCore::eventDispatchForbidden): Made this code (embarrasingly) thread
3573 safe, since it's now called on multiple threads. (Currently, we only forbid
3574 event dispatch on the main thread. If we ever want to forbid event dispatch
3575 on secondary threads, we can improve it then.)
3577 (WebCore::EventTarget::addEventListener):
3578 (WebCore::EventTarget::removeEventListener):
3579 (WebCore::EventTarget::setAttributeEventListener):
3580 (WebCore::EventTarget::getAttributeEventListener):
3581 (WebCore::EventTarget::clearAttributeEventListener):
3582 (WebCore::EventTarget::dispatchEvent):
3583 (WebCore::EventTarget::fireEventListeners):
3584 (WebCore::EventTarget::getEventListeners):
3585 (WebCore::EventTarget::removeAllEventListeners):
3586 * dom/EventTarget.h:
3587 (WebCore::FiringEventEndIterator::FiringEventEndIterator):