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