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