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