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