2009-04-22 Sam Weinig <sam@webkit.org>
[WebKit-https.git] / WebCore / ChangeLog
1 2009-04-22  Sam Weinig  <sam@webkit.org>
2
3         Reviewed by Anders Carlsson.
4
5         Autogenerate the XMLHttpRequest constructor getter/setter for the
6         WorkerContext and remove the now no longer needed JSWorkerContextBase.lut.h
7         file.
8
9         * DerivedSources.make: Remove JSWorkerContextBase.lut.h
10         * WebCore.xcodeproj/project.pbxproj: Ditto.
11
12         * bindings/js/JSWorkerContextBase.cpp:
13         * bindings/js/JSWorkerContextBase.h: Remove code to support hand written
14         code for XMLHttpRequest constructor lookup and shadowing.
15
16         * bindings/js/JSWorkerContextCustom.cpp:
17         (WebCore::JSWorkerContext::customGetOwnPropertySlot): Remove JSC prefixes.
18         (WebCore::JSWorkerContext::xmlHttpRequest): Added. Custom implementation of
19         cached constructor lookup.
20         * workers/WorkerContext.idl: Make the XMLHttpRequestConstructor accessor not
21         V8 specific.
22
23 2009-04-22  Darin Adler  <darin@apple.com>
24
25         * page/Navigator.idl: Touch this file to fix build since Geolocation
26         configuration was recently turned off.
27
28 2009-04-22  Justin Garcia  <justin.garcia@apple.com>
29
30         Reviewed by Darin Adler.
31
32         https://bugs.webkit.org/show_bug.cgi?id=25322
33         Can't delete empty paragraph after a block image
34         
35         Empty paragraph removal would have been handled by mergeParagraphs, but we stopped short
36         because of some code that avoided problems that would arise from Positions that would go
37         bad during deletion.  
38         
39         We have several checks that prevent us from using bad Positions, this one in particular
40         was added to avoid bad Positions that result from text removal.  So, I removed the check
41         and started correctly updating m_downstreamEnd during text removal so that it doesn't go
42         bad.  m_upstreamStart doesn't need to be updated during text removal, since only text
43         after it will ever be removed.
44
45         * editing/DeleteSelectionCommand.cpp:
46         (WebCore::DeleteSelectionCommand::deleteTextFromNode):
47         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
48         (WebCore::DeleteSelectionCommand::mergeParagraphs):
49
50 2009-04-22  Oliver Hunt  <oliver@apple.com>
51
52         Reviewed by Darin Adler.
53
54         <rdar://problem/6757346> SAP: Prevent default on mouseDown does not stop iframe from capturing subsequent mouse moves
55
56         Make mouseUp target the correct frame when the original
57         mousedown made the drag non-capturing.
58
59         * page/mac/EventHandlerMac.mm:
60         (WebCore::EventHandler::passSubframeEventToSubframe):
61
62 2009-04-22  Oliver Hunt  <oliver@apple.com>
63
64         Reviewed by Darin Adler.
65
66         <rdar://problem/6757346> SAP: Prevent default on mouseDown does not stop iframe from capturing subsequent mouse moves
67
68         This is the first step of allowing drag events to match the behaviour
69         of mouse move events when the default action of the initial mouse down
70         is prevented.  Remaining issue is that the final mouse up event still
71         targets the original root frame.
72
73         Test: fast/events/mouse-drag-from-frame-to-other-frame.html
74
75         * page/mac/EventHandlerMac.mm:
76         (WebCore::EventHandler::passSubframeEventToSubframe):
77
78 2009-04-22  Simon Fraser  <simon.fraser@apple.com>
79
80         Reviewed by Adele Peterson
81         
82         <rdar://problem/6702882> QT movie's video fails to be displayed after switching between tabs
83         <rdar://problem/6754957> Resizing Web browser window and hitting play will cause video blocks and artifacting
84
85         When in a media document, MediaPlayerPrivateQTKit uses a QTMovieView which may get
86         layer backing under some circumstances. However, drawing the view via
87         displayRectIgnoringOpacity:inContext: bypasses any layer setup that AppKit normally performs.
88         So when in the media document, we draw via displayRectIgnoringOpacity:.
89
90         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
91         (WebCore::MediaPlayerPrivate::paint):
92
93 2009-04-22  Timothy Hatcher  <timothy@apple.com>
94
95         Fix a crash in Mail when forwarding a specific HTML email.
96         Caused by the fix for <rdar://problem/6512520> (r42096).
97         Unable to create a test case that works outside of Mail.
98
99         <rdar://problem/6796069>
100
101         Reviewed by Ada Chan.
102
103         * editing/markup.cpp:
104         (WebCore::createMarkup): Null check pastEnd before trying to
105         call Range::compareBoundaryPoints.
106
107 2009-04-22  Sam Weinig  <sam@webkit.org>
108
109         Rubber-stamped by Darin Adler.
110
111         Fix for <rdar://problem/6816957>
112         Turn off Geolocation by default
113
114         * Configurations/FeatureDefines.xcconfig:
115
116 2009-04-22  Eric Seidel  <eric@webkit.org>
117
118         Rubber-stamped by David Hyatt.
119
120         Change RenderSVGImage to dump as RenderSVGImage instead of RenderImage
121
122         * rendering/RenderSVGImage.h:
123         (WebCore::RenderSVGImage::renderName):
124
125 2009-04-21  Timothy Hatcher  <timothy@apple.com>
126
127         Fix a crash on Gmail when they remove a "before unload" event listener when
128         it was never added to the pending map in the first place.
129
130         <rdar://problem/6814144>
131
132         Reviewed by Darin Adler.
133
134         * page/DOMWindow.cpp:
135         (WebCore::allowsPendingBeforeUnloadListeners): Renamed from shouldAddPendingBeforeUnloadListener.
136         (WebCore::DOMWindow::addEventListener): Call allowsPendingBeforeUnloadListeners now.
137         (WebCore::DOMWindow::removeEventListener): Call allowsPendingBeforeUnloadListeners before
138         removing the before unload listener.
139         (WebCore::DOMWindow::clearAttributeEventListener): Ditto.
140
141 2009-04-22  Kenneth Rohde Christiansen  <kenneth.christiansen@openbossa.org>
142
143         Reviewed by Ariya Hidayat.
144
145         Made windowed plugins move/resize synchronized with the painting, so
146         that windowed plugins are not moved before the rest of the parent
147         frame during scrolling.
148
149         * plugins/qt/PluginContainerQt.cpp:
150         (PluginContainerQt::PluginContainerQt):
151         (PluginContainerQt::requestGeometry):
152         (PluginContainerQt::adjustGeometry):
153         * plugins/qt/PluginContainerQt.h:
154         * plugins/qt/PluginViewQt.cpp:
155         (WebCore::PluginView::updatePluginWidget):
156         (WebCore::PluginView::paint):
157
158 2009-04-22  Simon Hausmann  <simon.hausmann@nokia.com>
159
160         Reviewed by Ariya Hidayat.
161
162         Fix various bugs in the X11 Qt plugin focus handling.
163
164         Notify the focus controller on activation/deactivation of the plugin and
165         set focus on the plugin's element when it receives the window system
166         focus.
167
168         * WebCore.pro: Added PluginContainerQt to the Qt build.
169         * plugins/PluginView.cpp:
170         (WebCore::PluginView::focusPluginElement): New helper function, moved from PluginViewWin.
171         * plugins/PluginView.h:
172         (WebCore::PluginView::parentFrame): Added parent frame accessor.
173         * plugins/qt/PluginContainerQt.cpp: Added.
174         (PluginContainerQt::PluginContainerQt):
175         (PluginContainerQt::focusInEvent): Set the focus controller active on focus in events.
176         (PluginContainerQt::focusOutEvent): Deactivate the focus controller when loosing the focus.
177         * plugins/qt/PluginContainerQt.h: Added.
178         * plugins/qt/PluginViewQt.cpp:
179         (WebCore::PluginView::init): Allocate a PluginContainerQt instead of QX11EmbedContainer.
180         * plugins/win/PluginViewWin.cpp:
181         (WebCore::PluginView::handleMouseEvent): Moved the code to set focus on the plugin element
182         to PluginView::focusPluginElement.
183
184 2009-04-22  Tamas Szirbucz  <szirbucz.tamas@stud.u-szeged.hu>
185
186         Reviewed by Ariya Hidayat.
187
188         https://bugs.webkit.org/show_bug.cgi?id=25023
189         Delete reply in QNetworkReplyHandler::abort() to avoid leak.
190
191         * platform/network/qt/QNetworkReplyHandler.cpp:
192         (WebCore::QNetworkReplyHandler::abort):
193
194 2009-04-21  Jon Honeycutt  <jhoneycutt@apple.com>
195
196         Allow the UI delegate to control cursor-setting.
197
198         Reviewed by Ada Chan.
199
200         * page/Chrome.cpp:
201         (WebCore::Chrome::setCursor):
202         Pass the call to the client.
203
204         * page/Chrome.h:
205
206         * page/ChromeClient.h:
207         (WebCore::ChromeClient::setCursor):
208         Stubbed; returns false.
209
210         * platform/Cursor.h:
211         Define PlatformCursorHandle for each platform.
212
213         * platform/win/WidgetWin.cpp:
214         Reordered some includes. Added an include of Page.h.
215         (WebCore::Widget::setCursor):
216         Fixed a typo in the comment about ignoreNextSetCursor. Get the Page, and
217         call its Chrome's setCursor() method with the passed cursor. Fall back
218         to SetCursor() if the Page is not available.
219
220         * plugins/win/PluginViewWin.cpp:
221         (WebCore::PluginView::handleMouseEvent):
222         Remove an unused variable. Cleaned up some whitespace.
223
224 2009-04-21  John Abd-El-Malek  <jam@google.com>
225
226         Reviewed by Dimitri Glazkov.
227
228         Add a method to purge the Chromium plugin list cache.
229         https://bugs.webkit.org/show_bug.cgi?id=25318
230
231         * plugins/chromium/PluginDataChromium.cpp:
232         (WebCore::resetChromiumPluginCache):
233
234 2009-04-21  Mark Rowe  <mrowe@apple.com>
235
236         Reviewed by Darin Adler.
237
238         Fix <https://bugs.webkit.org/show_bug.cgi?id=25164> / <rdar://problem/6786319>.
239
240         We need to ensure that XMLTokenizer sets the current DocLoader before calling in to
241         any libxml2 methods that may trigger a load.  The presence of a DocLoader indicates
242         that the load was originated by WebCore's use of libxml2 and that we should enforce
243         the same-origin policy on it.  XMLTokenizer::initializeParserContext,
244         XMLTokenizer::doWrite and XMLTokenizer::doEnd were three methods that were not setting
245         the current DocLoader when they should have.
246
247         The XMLTokenizerScope class is introduced to simplify the pattern of saving, setting and
248         restoring the current DocLoader and libxml2 error handlers.  The DocLoader and error handlers
249         are saved and set when the scope is allocated, and restored to their previous values when
250         the scope is exited.
251
252         Test: http/tests/security/xss-DENIED-xml-external-entity.xhtml
253
254         * GNUmakefile.am:
255         * WebCore.pro:
256         * WebCore.scons:
257         * WebCore.vcproj/WebCore.vcproj:
258         * WebCore.xcodeproj/project.pbxproj:
259         * dom/XMLTokenizer.cpp:
260         * dom/XMLTokenizer.h:
261         * dom/XMLTokenizerLibxml2.cpp:
262         (WebCore::matchFunc):
263         (WebCore::shouldAllowExternalLoad):
264         (WebCore::openFunc):
265         (WebCore::XMLTokenizer::doWrite):
266         (WebCore::XMLTokenizer::initializeParserContext):
267         (WebCore::XMLTokenizer::doEnd):
268         (WebCore::xmlDocPtrForString):
269         * dom/XMLTokenizerScope.cpp:
270         (WebCore::XMLTokenizerScope::XMLTokenizerScope):
271         (WebCore::XMLTokenizerScope::~XMLTokenizerScope):
272         * dom/XMLTokenizerScope.h:
273         * xml/XSLStyleSheet.cpp:
274         (WebCore::XSLStyleSheet::parseString):
275         * xml/XSLTProcessor.cpp:
276
277 2009-04-21  Sam Weinig  <sam@webkit.org>
278
279         Reviewed by Dan Bernstein.
280
281         Fix for <rdar://problem/5874009>
282         Add port 3659 (apple-sasl / PasswordServer) to the list of blocked ports.
283
284         * platform/network/ResourceHandle.cpp:
285         (WebCore::portAllowed):
286
287 2009-04-21  Justin Garcia  <justin.garcia@apple.com>
288
289         Reviewed by Dan Bernstein.
290
291         https://bugs.webkit.org/show_bug.cgi?id=25320
292         Crash when changing block styles in a root that contains no visible content (but contains nodes with renderers)
293
294         * editing/CompositeEditCommand.cpp:
295         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): If the enclosing block is the 
296         root editable element and it contains no visible content, create a new block but don't try and move 
297         content into it, since there's nothing for moveParagraphs to move.
298         
299
300 2009-04-21  Darin Adler  <darin@apple.com>
301
302         Reviewed by Dan Bernstein.
303
304         Bug 25162: REGRESSION (r41176-r41242): Drag-selection above/below the line does not select to beginning/end
305         https://bugs.webkit.org/show_bug.cgi?id=25162
306         rdar://problem/6764354
307
308         * page/Settings.cpp:
309         (WebCore::Settings::Settings): Initialize editing behavior to Mac-style for PLATFORM(MAC).
310         Later we may want to change this default to encompass other versions running on Mac.
311
312         * page/Settings.h: Added EditingBehavior, setEditingBehavior, editingBehavior, and
313         m_editingBehavior. Also moved m_maximumDecodedImageSize out of the middle of all
314         the bit fields.
315
316         * platform/graphics/IntPoint.h: Added a constructor to turn an IntSize into an IntPoint.
317         I'm not sure the distinction here is serving us well at the moment. When converting from
318         global to local coordinates you want to do IntPoint - IntPoint and have the result be
319         another IntPoint, not an IntSize. And so on.
320
321         * rendering/RenderBlock.cpp:
322         (WebCore::positionForPointRespectingEditingBoundaries): Changed to use pointers more and
323         separate coordinates less.
324         (WebCore::RenderBlock::positionForPointWithInlineChildren): Turned into a member function.
325         Added separate cases to support the Mac and Windows behavior.
326         (WebCore::RenderBlock::positionForPoint): Updated for the change above. Also moved the
327         computation of pointInContents closer to the place it's used.
328
329         * rendering/RenderBlock.h: Updated for the new private member function.
330
331 2009-04-17  Timothy Hatcher  <timothy@apple.com>
332
333         Change pending unload and beforeunload counts to store the listeners
334         in a single data structure that can be quickly iterated for dispatch.
335
336         <rdar://problem/6383352&6383379&6383940>
337
338         Reviewed by Darin Adler.
339
340         * WebCore.base.exp: Change what symbols are exported.
341         * loader/FrameLoader.cpp:
342         (WebCore::FrameLoader::stopLoading): Remove count updating code
343         and move an if inside a block already checking m_frame->document().
344         * page/Chrome.cpp: Remove disableSuddenTermination/enableSuddenTermination.
345         * page/Chrome.h: Ditto.
346         * page/ChromeClient.h: Ditto.
347         * page/DOMWindow.cpp:
348         (WebCore::pendingUnloadEventListenerMap): Create a static map.
349         (WebCore::pendingBeforeUnloadEventListenerMap): Ditto.
350         (WebCore::addPendingEventListener): Add the event listener to the map.
351         (WebCore::removePendingEventListener): Remove the event listener from the map.
352         (WebCore::removePendingEventListeners): Remove all listeners for the window.
353         (WebCore::dispatchWindowEventToListeners): Dispatch the event to the given listeners.
354         (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents): Send the beforeunload event.
355         (WebCore::DOMWindow::pendingUnloadEventListeners): Return a count of pending listeners.
356         (WebCore::DOMWindow::dispatchAllPendingUnloadEvents): Send the unload event.
357         (WebCore::DOMWindow::~DOMWindow): Remove the window from both event listener maps.
358         (WebCore::DOMWindow::addEventListener): Call addPendingEventListener when needed.
359         (WebCore::DOMWindow::removeEventListener): Call removePendingEventListener when needed.
360         (WebCore::DOMWindow::removeAllEventListeners): Call removePendingEventListeners.
361         (WebCore::DOMWindow::removeInlineEventListenerForType): Call removePendingEventListener when needed.
362         * page/DOMWindow.h:
363         (WebCore::DOMWindow::frame): Changed to be const.
364         * page/EventHandler.cpp:
365         (WebCore::EventHandler::EventHandler): Remove count tracking code.
366         * page/EventHandler.h: Ditto.
367         * page/Page.cpp:
368         (WebCore::Page::Page): Ditto.
369         * page/Page.h: Ditto.
370
371 2009-04-21  Justin Garcia  <justin.garcia@apple.com>
372
373         Reviewed by Darin Adler.
374
375         https://bugs.webkit.org/show_bug.cgi?id=19644
376         Text copied with Select All pastes with a indent but shouldn't
377         <rdar://problem/6102483> 
378         Pasting the content of an HTML message in Mail causes addition nested <div> elements to be added
379         
380         To improve selectall/copy/paste fidelity of certain pages, we began wrapping copied content with
381         a div that held properties and attributes from the fully selected body.  To fix the above issues, 
382         only do this if if the body has certain properties or attributes.  We'll begin adding to this list as 
383         necessary.  For now it's just background colors and images.  Tested copy/paste of nytimes, wired,
384         arstechnica, and several others.
385         
386         Massive nesting can still happen, it will just be much less common.
387
388         * editing/markup.cpp:
389         (WebCore::createMarkup): 
390
391 2009-04-21  Peter Kasting  <pkasting@google.com>
392
393         Reviewed by David Hyatt.
394
395         https://bugs.webkit.org/show_bug.cgi?id=25250
396         Allow platforms to snap the scroll thumb back to the drag origin
397         during a drag.  Implement functions for Safari/Win and Chromium/Win
398         to do this snapping at distances approximating the native ones.
399
400         * platform/Scrollbar.cpp:
401         (WebCore::Scrollbar::Scrollbar):
402         (WebCore::Scrollbar::setValue):
403         (WebCore::Scrollbar::scroll):
404         (WebCore::Scrollbar::moveThumb):
405         (WebCore::Scrollbar::setCurrentPos):
406         (WebCore::Scrollbar::mouseMoved):
407         (WebCore::Scrollbar::mouseDown):
408         * platform/Scrollbar.h:
409         * platform/ScrollbarTheme.h:
410         (WebCore::ScrollbarTheme::shouldSnapBackToDragOrigin):
411         * platform/chromium/ScrollbarThemeChromium.h:
412         * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
413         (WebCore::ScrollbarThemeChromium::shouldSnapBackToDragOrigin):
414         * platform/chromium/ScrollbarThemeChromiumWin.cpp:
415         (WebCore::ScrollbarThemeChromium::shouldSnapBackToDragOrigin):
416         * platform/win/ScrollbarThemeWin.cpp:
417         (WebCore::ScrollbarThemeWin::shouldCenterOnThumb):
418         (WebCore::ScrollbarThemeWin::shouldSnapBackToDragOrigin):
419         * platform/win/ScrollbarThemeWin.h:
420
421 2009-04-21  Adam Roben  <aroben@apple.com>
422
423         Windows build fix
424
425         * bindings/js/JSLazyEventListener.cpp:
426         (WebCore::eventParameterName): Remove unreachable code when SVG is
427         enabled.
428
429 2009-04-21  Kevin Ollivier  <kevino@theolliviers.com>
430
431         !ENABLE(SVG) build fix.
432         
433         * bindings/js/JSLazyEventListener.cpp:
434         (WebCore::eventParameterName):
435
436 2009-04-21  Dave Moore  <davemoore@google.com>
437
438         Reviewed by Dimitri Glazkov.
439
440         https://bugs.webkit.org/show_bug.cgi?id=25309
441         Better use AtomicStrings when calling from the V8
442         bindings into WebCore code.
443
444         * bindings/v8/custom/V8DOMWindowCustom.cpp:
445         * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
446         * bindings/v8/custom/V8HTMLFormElementCustom.cpp:
447         * bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp:
448
449 2009-04-21  Chris Fleizach  <cfleizach@apple.com>
450
451         Reviewed by Darin Adler.
452  
453         Bug 25304: AX: Safari not identifying a secure text field
454         https://bugs.webkit.org/show_bug.cgi?id=25304
455
456         Secure text fields need to be able to return AXTitleUIElements.
457
458         Test: accessibility/secure-textfield-title-ui.html
459
460         * page/mac/AccessibilityObjectWrapper.mm:
461         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
462
463 2009-04-21  Dan Bernstein  <mitz@apple.com>
464
465         - fix the Tiger build
466
467         * page/mac/EventHandlerMac.mm:
468         (method_setImplementation):
469
470 2009-04-21   Laszlo Gombos  <laszlo.1.gombos@nokia.com>
471
472         Reviewed by Sam Weinig.
473
474         https://bugs.webkit.org/show_bug.cgi?id=25271
475
476         Fix the build with disabled DOM storage or disabled database support.
477
478         * bindings/js/ScriptObjectQuarantine.cpp:
479         * bindings/js/ScriptObjectQuarantine.h:
480
481 2009-04-21  Holger Hans Peter Freyther  <zecke@selfish.org>
482
483         Unreviewed build fix.
484
485         Compile fix for r42633. const qualifier does not work
486         on a static method.
487
488         * dom/Document.h:
489         (WebCore::Document::isSVGDocument):
490
491 2009-04-21  Dan Bernstein  <mitz@apple.com>
492
493         Reviewed by Darin Adler and John Sullivan.
494
495         - fix <rdar://problem/5914146> Crash at -[NSScrollView scrollWheel:]
496
497         -[NSScrollView scrollWheel:] runs a nested event-tracking run loop
498         in a mode that allows WebCore timers to fire and NSURLConnection
499         callbacks to be dispatched, which can release the NSScrollView and
500         cause it to be deallocated (one example is a DOM timer callback that
501         removes a subframe from the document). This leads to a crash in
502         -scrollView:.
503
504         The fix is to replace the implementation of -[NSScrollView scrollWheel:]
505         with one that optionally retains the receiver for the duration of the
506         call.
507
508         * page/mac/EventHandlerMac.mm:
509         (WebCore::nsScrollViewScrollWheelShouldRetainSelf): Added.
510         (WebCore::setNSScrollViewScrollWheelShouldRetainSelf): Added. Replaces
511         the implementation of -[NSScrollView scrollWheel:] with the
512         self-retaining one, and sets a static boolean that tells it whether to
513         retain the receiver around the call to the original implementation.
514         (WebCore::selfRetainingNSScrollViewScrollWheel): Added. If
515         setNSScrollViewScrollWheelShouldRetainSelf(true) was called and this
516         function is executing on the main thread, it retains the NSScrollView,
517         invokes the original -[NSScrollView scrollWheel:], then releases the
518         view. Otherwise it just calls through to the original implementation.
519         (WebCore::EventHandler::passWheelEventToWidget): Added calls to
520         setNSScrollViewScrollWheelShouldRetainSelf() around the call to
521         -scrollWheel:.
522
523 2009-04-21  Geoffrey Garen  <ggaren@apple.com>
524
525         Reviewed by Mark Rowe.
526
527         Tiger crash fix: Put VM tags in their own header file, and fixed up the
528         #ifdefs so they're not used on Tiger.
529
530         * ForwardingHeaders/wtf/VMTags.h: Copied from WebCore/ForwardingHeaders/wtf/HashTraits.h.
531
532 2009-04-21  Xan Lopez  <xlopez@igalia.com>
533
534         Reviewed by Gustavo Noronha.
535
536         https://bugs.webkit.org/show_bug.cgi?id=21546
537         [GTK] ATK accessibility enhancements
538
539         Based on a patch by Alp Toker.
540
541         Implement AtkComponent interface.
542
543         * page/gtk/AccessibilityObjectWrapperAtk.cpp:
544         (core):
545
546 2009-04-21  Xan Lopez  <xlopez@igalia.com>
547
548         Reviewed by Gustavo Noronha.
549
550         https://bugs.webkit.org/show_bug.cgi?id=21546
551         [GTK] ATK accessibility enhancements
552
553         Only implement AtkAction interface if we actually have an action.
554
555         * page/gtk/AccessibilityObjectWrapperAtk.cpp:
556
557 2009-04-20  Alexey Proskuryakov  <ap@webkit.org>
558
559         Reviewed by Darin Adler.
560
561         https://bugs.webkit.org/show_bug.cgi?id=25290
562         REGRESSION(r41732): Crash when constructing XMLHttpRequest in a detached document
563
564         Test: fast/dom/xmlhttprequest-constructor-in-detached-document.html
565
566         * bindings/js/JSAudioConstructor.cpp:
567         (WebCore::JSAudioConstructor::JSAudioConstructor):
568         * bindings/js/JSAudioConstructor.h:
569         * bindings/js/JSDOMGlobalObject.h:
570         (WebCore::getDOMConstructor):
571         * bindings/js/JSImageConstructor.cpp:
572         (WebCore::JSImageConstructor::JSImageConstructor):
573         * bindings/js/JSImageConstructor.h:
574         * bindings/js/JSMessageChannelConstructor.cpp:
575         (WebCore::JSMessageChannelConstructor::JSMessageChannelConstructor):
576         * bindings/js/JSMessageChannelConstructor.h:
577         * bindings/js/JSOptionConstructor.cpp:
578         (WebCore::JSOptionConstructor::JSOptionConstructor):
579         * bindings/js/JSOptionConstructor.h:
580         * bindings/js/JSXMLHttpRequestConstructor.cpp:
581         (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor):
582         * bindings/js/JSXMLHttpRequestConstructor.h:
583         Avoid accessing JSDOMGlobalObject via ScriptExecutionContext, since it may not
584         work during frame teardown.
585
586 2009-04-20  Geoffrey Garen  <ggaren@apple.com>
587
588         Rubber stamped by Darin Adler and Sam Weinig.
589
590         Renamed "*InlineEventListener*" => "*AttributeEventListener*", and
591         "isInline" => "isAttribute".
592
593         * bindings/js/JSDOMGlobalObject.cpp:
594         (WebCore::JSDOMGlobalObject::createJSAttributeEventListener):
595         * bindings/js/JSEventListener.cpp:
596         (WebCore::JSEventListener::JSEventListener):
597         (WebCore::JSEventListener::~JSEventListener):
598         (WebCore::JSEventListener::handleEvent):
599         (WebCore::JSEventListener::virtualisAttribute):
600         * bindings/js/JSEventListener.h:
601         (WebCore::JSEventListener::create):
602         (WebCore::JSEventListener::isAttribute):
603         * bindings/js/JSLazyEventListener.cpp:
604         (WebCore::createAttributeEventListener):
605         * bindings/js/JSLazyEventListener.h:
606         * bindings/scripts/CodeGeneratorJS.pm:
607         * dom/Element.cpp:
608         (WebCore::Element::setWindowAttributeEventListener):
609         * dom/Element.h:
610         * dom/EventListener.h:
611         (WebCore::EventListener::isAttribute):
612         (WebCore::EventListener::virtualisAttribute):
613         * dom/Node.cpp:
614         (WebCore::Node::clearAttributeEventListener):
615         (WebCore::Node::setAttributeEventListener):
616         (WebCore::Node::getAttributeEventListener):
617         (WebCore::Node::onabort):
618         (WebCore::Node::setOnabort):
619         (WebCore::Node::onblur):
620         (WebCore::Node::setOnblur):
621         (WebCore::Node::onchange):
622         (WebCore::Node::setOnchange):
623         (WebCore::Node::onclick):
624         (WebCore::Node::setOnclick):
625         (WebCore::Node::oncontextmenu):
626         (WebCore::Node::setOncontextmenu):
627         (WebCore::Node::ondblclick):
628         (WebCore::Node::setOndblclick):
629         (WebCore::Node::onerror):
630         (WebCore::Node::setOnerror):
631         (WebCore::Node::onfocus):
632         (WebCore::Node::setOnfocus):
633         (WebCore::Node::oninput):
634         (WebCore::Node::setOninput):
635         (WebCore::Node::onkeydown):
636         (WebCore::Node::setOnkeydown):
637         (WebCore::Node::onkeypress):
638         (WebCore::Node::setOnkeypress):
639         (WebCore::Node::onkeyup):
640         (WebCore::Node::setOnkeyup):
641         (WebCore::Node::onload):
642         (WebCore::Node::setOnload):
643         (WebCore::Node::onmousedown):
644         (WebCore::Node::setOnmousedown):
645         (WebCore::Node::onmousemove):
646         (WebCore::Node::setOnmousemove):
647         (WebCore::Node::onmouseout):
648         (WebCore::Node::setOnmouseout):
649         (WebCore::Node::onmouseover):
650         (WebCore::Node::setOnmouseover):
651         (WebCore::Node::onmouseup):
652         (WebCore::Node::setOnmouseup):
653         (WebCore::Node::onmousewheel):
654         (WebCore::Node::setOnmousewheel):
655         (WebCore::Node::onbeforecut):
656         (WebCore::Node::setOnbeforecut):
657         (WebCore::Node::oncut):
658         (WebCore::Node::setOncut):
659         (WebCore::Node::onbeforecopy):
660         (WebCore::Node::setOnbeforecopy):
661         (WebCore::Node::oncopy):
662         (WebCore::Node::setOncopy):
663         (WebCore::Node::onbeforepaste):
664         (WebCore::Node::setOnbeforepaste):
665         (WebCore::Node::onpaste):
666         (WebCore::Node::setOnpaste):
667         (WebCore::Node::ondragenter):
668         (WebCore::Node::setOndragenter):
669         (WebCore::Node::ondragover):
670         (WebCore::Node::setOndragover):
671         (WebCore::Node::ondragleave):
672         (WebCore::Node::setOndragleave):
673         (WebCore::Node::ondrop):
674         (WebCore::Node::setOndrop):
675         (WebCore::Node::ondragstart):
676         (WebCore::Node::setOndragstart):
677         (WebCore::Node::ondrag):
678         (WebCore::Node::setOndrag):
679         (WebCore::Node::ondragend):
680         (WebCore::Node::setOndragend):
681         (WebCore::Node::onreset):
682         (WebCore::Node::setOnreset):
683         (WebCore::Node::onresize):
684         (WebCore::Node::setOnresize):
685         (WebCore::Node::onscroll):
686         (WebCore::Node::setOnscroll):
687         (WebCore::Node::onsearch):
688         (WebCore::Node::setOnsearch):
689         (WebCore::Node::onselect):
690         (WebCore::Node::setOnselect):
691         (WebCore::Node::onselectstart):
692         (WebCore::Node::setOnselectstart):
693         (WebCore::Node::onsubmit):
694         (WebCore::Node::setOnsubmit):
695         (WebCore::Node::onunload):
696         (WebCore::Node::setOnunload):
697         * dom/Node.h:
698         * editing/ReplaceSelectionCommand.cpp:
699         (WebCore::ReplacementFragment::ReplacementFragment):
700         * html/HTMLBodyElement.cpp:
701         (WebCore::HTMLBodyElement::parseMappedAttribute):
702         * html/HTMLButtonElement.cpp:
703         (WebCore::HTMLButtonElement::parseMappedAttribute):
704         * html/HTMLElement.cpp:
705         (WebCore::HTMLElement::parseMappedAttribute):
706         * html/HTMLFormElement.cpp:
707         (WebCore::HTMLFormElement::parseMappedAttribute):
708         * html/HTMLFrameElementBase.cpp:
709         (WebCore::HTMLFrameElementBase::parseMappedAttribute):
710         * html/HTMLFrameSetElement.cpp:
711         (WebCore::HTMLFrameSetElement::parseMappedAttribute):
712         * html/HTMLImageElement.cpp:
713         (WebCore::HTMLImageElement::parseMappedAttribute):
714         * html/HTMLInputElement.cpp:
715         (WebCore::HTMLInputElement::parseMappedAttribute):
716         * html/HTMLObjectElement.cpp:
717         (WebCore::HTMLObjectElement::parseMappedAttribute):
718         * html/HTMLScriptElement.cpp:
719         (WebCore::HTMLScriptElement::parseMappedAttribute):
720         * html/HTMLSelectElement.cpp:
721         (WebCore::HTMLSelectElement::parseMappedAttribute):
722         * html/HTMLTextAreaElement.cpp:
723         (WebCore::HTMLTextAreaElement::parseMappedAttribute):
724         * page/AccessibilityRenderObject.cpp:
725         (WebCore::AccessibilityRenderObject::mouseButtonListener):
726         * page/DOMWindow.cpp:
727         (WebCore::DOMWindow::setAttributeEventListener):
728         (WebCore::DOMWindow::clearAttributeEventListener):
729         (WebCore::DOMWindow::getAttributeEventListener):
730         (WebCore::DOMWindow::onabort):
731         (WebCore::DOMWindow::setOnabort):
732         (WebCore::DOMWindow::onblur):
733         (WebCore::DOMWindow::setOnblur):
734         (WebCore::DOMWindow::onchange):
735         (WebCore::DOMWindow::setOnchange):
736         (WebCore::DOMWindow::onclick):
737         (WebCore::DOMWindow::setOnclick):
738         (WebCore::DOMWindow::ondblclick):
739         (WebCore::DOMWindow::setOndblclick):
740         (WebCore::DOMWindow::onerror):
741         (WebCore::DOMWindow::setOnerror):
742         (WebCore::DOMWindow::onfocus):
743         (WebCore::DOMWindow::setOnfocus):
744         (WebCore::DOMWindow::onkeydown):
745         (WebCore::DOMWindow::setOnkeydown):
746         (WebCore::DOMWindow::onkeypress):
747         (WebCore::DOMWindow::setOnkeypress):
748         (WebCore::DOMWindow::onkeyup):
749         (WebCore::DOMWindow::setOnkeyup):
750         (WebCore::DOMWindow::onload):
751         (WebCore::DOMWindow::setOnload):
752         (WebCore::DOMWindow::onmousedown):
753         (WebCore::DOMWindow::setOnmousedown):
754         (WebCore::DOMWindow::onmousemove):
755         (WebCore::DOMWindow::setOnmousemove):
756         (WebCore::DOMWindow::onmouseout):
757         (WebCore::DOMWindow::setOnmouseout):
758         (WebCore::DOMWindow::onmouseover):
759         (WebCore::DOMWindow::setOnmouseover):
760         (WebCore::DOMWindow::onmouseup):
761         (WebCore::DOMWindow::setOnmouseup):
762         (WebCore::DOMWindow::onmousewheel):
763         (WebCore::DOMWindow::setOnmousewheel):
764         (WebCore::DOMWindow::onreset):
765         (WebCore::DOMWindow::setOnreset):
766         (WebCore::DOMWindow::onresize):
767         (WebCore::DOMWindow::setOnresize):
768         (WebCore::DOMWindow::onscroll):
769         (WebCore::DOMWindow::setOnscroll):
770         (WebCore::DOMWindow::onsearch):
771         (WebCore::DOMWindow::setOnsearch):
772         (WebCore::DOMWindow::onselect):
773         (WebCore::DOMWindow::setOnselect):
774         (WebCore::DOMWindow::onsubmit):
775         (WebCore::DOMWindow::setOnsubmit):
776         (WebCore::DOMWindow::onunload):
777         (WebCore::DOMWindow::setOnunload):
778         (WebCore::DOMWindow::onbeforeunload):
779         (WebCore::DOMWindow::setOnbeforeunload):
780         (WebCore::DOMWindow::onwebkitanimationstart):
781         (WebCore::DOMWindow::setOnwebkitanimationstart):
782         (WebCore::DOMWindow::onwebkitanimationiteration):
783         (WebCore::DOMWindow::setOnwebkitanimationiteration):
784         (WebCore::DOMWindow::onwebkitanimationend):
785         (WebCore::DOMWindow::setOnwebkitanimationend):
786         (WebCore::DOMWindow::onwebkittransitionend):
787         (WebCore::DOMWindow::setOnwebkittransitionend):
788         * page/DOMWindow.h:
789         * svg/SVGElement.cpp:
790         (WebCore::SVGElement::parseMappedAttribute):
791         * svg/SVGElementInstance.cpp:
792         (WebCore::SVGElementInstance::onabort):
793         (WebCore::SVGElementInstance::setOnabort):
794         (WebCore::SVGElementInstance::onblur):
795         (WebCore::SVGElementInstance::setOnblur):
796         (WebCore::SVGElementInstance::onchange):
797         (WebCore::SVGElementInstance::setOnchange):
798         (WebCore::SVGElementInstance::onclick):
799         (WebCore::SVGElementInstance::setOnclick):
800         (WebCore::SVGElementInstance::oncontextmenu):
801         (WebCore::SVGElementInstance::setOncontextmenu):
802         (WebCore::SVGElementInstance::ondblclick):
803         (WebCore::SVGElementInstance::setOndblclick):
804         (WebCore::SVGElementInstance::onerror):
805         (WebCore::SVGElementInstance::setOnerror):
806         (WebCore::SVGElementInstance::onfocus):
807         (WebCore::SVGElementInstance::setOnfocus):
808         (WebCore::SVGElementInstance::oninput):
809         (WebCore::SVGElementInstance::setOninput):
810         (WebCore::SVGElementInstance::onkeydown):
811         (WebCore::SVGElementInstance::setOnkeydown):
812         (WebCore::SVGElementInstance::onkeypress):
813         (WebCore::SVGElementInstance::setOnkeypress):
814         (WebCore::SVGElementInstance::onkeyup):
815         (WebCore::SVGElementInstance::setOnkeyup):
816         (WebCore::SVGElementInstance::onload):
817         (WebCore::SVGElementInstance::setOnload):
818         (WebCore::SVGElementInstance::onmousedown):
819         (WebCore::SVGElementInstance::setOnmousedown):
820         (WebCore::SVGElementInstance::onmousemove):
821         (WebCore::SVGElementInstance::setOnmousemove):
822         (WebCore::SVGElementInstance::onmouseout):
823         (WebCore::SVGElementInstance::setOnmouseout):
824         (WebCore::SVGElementInstance::onmouseover):
825         (WebCore::SVGElementInstance::setOnmouseover):
826         (WebCore::SVGElementInstance::onmouseup):
827         (WebCore::SVGElementInstance::setOnmouseup):
828         (WebCore::SVGElementInstance::onmousewheel):
829         (WebCore::SVGElementInstance::setOnmousewheel):
830         (WebCore::SVGElementInstance::onbeforecut):
831         (WebCore::SVGElementInstance::setOnbeforecut):
832         (WebCore::SVGElementInstance::oncut):
833         (WebCore::SVGElementInstance::setOncut):
834         (WebCore::SVGElementInstance::onbeforecopy):
835         (WebCore::SVGElementInstance::setOnbeforecopy):
836         (WebCore::SVGElementInstance::oncopy):
837         (WebCore::SVGElementInstance::setOncopy):
838         (WebCore::SVGElementInstance::onbeforepaste):
839         (WebCore::SVGElementInstance::setOnbeforepaste):
840         (WebCore::SVGElementInstance::onpaste):
841         (WebCore::SVGElementInstance::setOnpaste):
842         (WebCore::SVGElementInstance::ondragenter):
843         (WebCore::SVGElementInstance::setOndragenter):
844         (WebCore::SVGElementInstance::ondragover):
845         (WebCore::SVGElementInstance::setOndragover):
846         (WebCore::SVGElementInstance::ondragleave):
847         (WebCore::SVGElementInstance::setOndragleave):
848         (WebCore::SVGElementInstance::ondrop):
849         (WebCore::SVGElementInstance::setOndrop):
850         (WebCore::SVGElementInstance::ondragstart):
851         (WebCore::SVGElementInstance::setOndragstart):
852         (WebCore::SVGElementInstance::ondrag):
853         (WebCore::SVGElementInstance::setOndrag):
854         (WebCore::SVGElementInstance::ondragend):
855         (WebCore::SVGElementInstance::setOndragend):
856         (WebCore::SVGElementInstance::onreset):
857         (WebCore::SVGElementInstance::setOnreset):
858         (WebCore::SVGElementInstance::onresize):
859         (WebCore::SVGElementInstance::setOnresize):
860         (WebCore::SVGElementInstance::onscroll):
861         (WebCore::SVGElementInstance::setOnscroll):
862         (WebCore::SVGElementInstance::onsearch):
863         (WebCore::SVGElementInstance::setOnsearch):
864         (WebCore::SVGElementInstance::onselect):
865         (WebCore::SVGElementInstance::setOnselect):
866         (WebCore::SVGElementInstance::onselectstart):
867         (WebCore::SVGElementInstance::setOnselectstart):
868         (WebCore::SVGElementInstance::onsubmit):
869         (WebCore::SVGElementInstance::setOnsubmit):
870         (WebCore::SVGElementInstance::onunload):
871         (WebCore::SVGElementInstance::setOnunload):
872         * svg/SVGSVGElement.cpp:
873         (WebCore::SVGSVGElement::parseMappedAttribute):
874
875 2009-04-20  Geoffrey Garen  <ggaren@apple.com>
876
877         Approved by Mark Rowe, Cameron Zwarich, Oliver Hunt, and Ojan Vafai.
878         
879         Used svn merge to roll out revisions 42678, 42690, 42694, 42697 because
880         they broke the Tiger and Windows buildbots.
881
882         * css/html4.css:
883         * css/themeWin.css:
884         * platform/graphics/SimpleFontData.cpp:
885         * platform/graphics/SimpleFontData.h:
886         * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
887         * platform/graphics/chromium/SimpleFontDataLinux.cpp:
888         * platform/graphics/gtk/SimpleFontDataGtk.cpp:
889         * platform/graphics/gtk/SimpleFontDataPango.cpp:
890         * platform/graphics/mac/SimpleFontDataMac.mm:
891         * platform/graphics/qt/SimpleFontDataQt.cpp:
892         * platform/graphics/win/SimpleFontDataCGWin.cpp:
893         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
894         * platform/graphics/win/SimpleFontDataWin.cpp:
895         * platform/graphics/wx/SimpleFontDataWx.cpp:
896         * rendering/RenderTextControl.cpp:
897         * rendering/RenderTextControlMultiLine.cpp:
898         * rendering/RenderTextControlSingleLine.cpp:
899
900 2009-04-20  Geoffrey Garen  <ggaren@apple.com>
901
902         Reviewed by Adam Roben.
903
904         One last loose end, discovered using COLLECT_ON_EVERY_ALLOCATION, for
905         https://bugs.webkit.org/show_bug.cgi?id=21260
906         Unbounded memory growth when churning elements with anonymous event handler functions
907         
908         * bindings/js/JSSVGElementInstanceCustom.cpp:
909         (WebCore::JSSVGElementInstance::mark): Don't ASSERT that an ElementInstance's
910         correspondingElement has a JS wrapper. If a GC falls exactly between the
911         allocation of the ElementInstance wrapper and the correspondingElement
912         wrapper, the correspondingElement won't have a wrapper at the time we
913         mark the ElementInstance's wrapper.
914
915 2009-04-20  Brady Eidson  <beidson@apple.com>
916
917         Rubberstamped by Mark Rowe
918
919         Clean builds are broken on case-sensitive filesystems.  Let's fix, shall we?
920
921         * platform/graphics/SimpleFontData.cpp: Remove "String.h" include.  Ojan probably intended to include
922           "PlatformString.h" which was unnecessary because it is pulled in through other headers.  This wasn't a 
923           build failure on case-insensitive file systems because those systems would find the system <string.h>, averting
924           the warning.
925
926 2009-04-20  Geoffrey Garen  <ggaren@apple.com>
927
928         Reviewed by Darin Adler.
929
930         Last patch for https://bugs.webkit.org/show_bug.cgi?id=21260
931         Unbounded memory growth when churning elements with anonymous event handler functions
932         
933         Converted "lazy" event listeners to be unprotected, just like all the others.
934
935         * bindings/js/JSEventListener.cpp:
936         (WebCore::JSEventListener::JSEventListener):
937         (WebCore::JSEventListener::~JSEventListener):
938         (WebCore::JSEventListener::jsFunction):
939         (WebCore::JSEventListener::markJSFunction):
940         (WebCore::JSEventListener::handleEvent):
941         (WebCore::JSEventListener::virtualIsInline):
942         * bindings/js/JSEventListener.h:
943         (WebCore::JSEventListener::isInline): Merged JSAbstractEventListener
944         into JSEventListener. Now that the only difference between JSEventListener
945         and JSLazyEventListener is that JSLazyEventListener compiles lazily,
946         there's no need for an abstract base class.
947
948         * bindings/js/JSLazyEventListener.cpp: Converted JSLazyEventListener to
949         inherit from JSEventListener and match its un-GC-protected behavior.
950         (WebCore::JSLazyEventListener::JSLazyEventListener): ditto
951         (WebCore::JSLazyEventListener::parseCode): ditto
952         (WebCore::createInlineEventListener): When creating a lazy event listener,
953         ensure that the related node has a JS wrapper to mark the listener. Since
954         the parser makes these listeners, it's possible that no JS reference has
955         been made to the node yet.
956         * bindings/js/JSLazyEventListener.h: ditto
957
958         * dom/EventListener.h:
959         (WebCore::EventListener::clearJSFunction): Removed an usused function.
960
961 2009-04-20  Justin Garcia  <justin.garcia@apple.com>
962
963         Reviewed by Dan Bernstein.
964
965         https://bugs.webkit.org/show_bug.cgi?id=25299
966         Don't bound caret to root line box if it is still inside its containing block
967         
968         Can't yet write tests for behavior of non-standard caret widths.
969
970         * rendering/RenderText.cpp:
971         (WebCore::RenderText::localCaretRect):
972
973 2009-04-20  Steve Falkenburg  <sfalken@apple.com>
974
975         Separate JavaScriptCore.dll from WebKit.dll.
976         Slight performance improvement or no change on benchmarks.
977         
978         Allows us to break a circular dependency between CFNetwork and WebKit on Windows,
979         and simplifies standalone JavaScriptCore builds.
980
981         Reviewed by Oliver Hunt.
982
983         * config.h: Specify __declspec(dllexport/dllimport) appropriately when exporting data.
984
985 2009-04-20  Anders Carlsson  <andersca@apple.com>
986
987         Reviewed by Sam Weinig.
988
989         <rdar://problem/6722845> In the Cocoa event model, NPWindow's window field should be null
990
991         * bridge/npapi.h:
992         (_NPCocoaEvent::):
993         Add a CGContextRef member to the draw struct. Add an NPCoordinateSpace enum.
994         
995         * plugins/npfunctions.h:
996         Add a prototype for NPN_ConvertPoint.
997
998 2009-04-10  Ojan Vafai  <ojan@chromium.org>
999
1000         Reviewed by Dan Bernstein.
1001
1002         Make textarea and text input metrics more closely match IEs.
1003         https://bugs.webkit.org/show_bug.cgi?id=15312
1004
1005         This involves:
1006         -set text input width to size*avgCharWidth + maxCharWidth - avgCharWidth
1007         -set textarea width to cols*avgCharWidth
1008         -Make default CSS match IEs
1009         -Correctly initializing m_avgCharWidth and m_maxCharWidth for each platform and SVG.
1010
1011         Those values for textarea and inputs were derived by doing a ton of manual
1012         testing of IE's width values for various textareas and fonts.
1013
1014         To get the average and max character width of a font, we do the following
1015         for each platform:
1016         -Win: TextMetrics expose avgCharWidth and maxCharWidth
1017         -SVG: avgCharWidth = width of an '0', fallback on width of a space glyph, then m_xHeight
1018             maxCharWidth = width of a 'W' for roman fonts, fallback on m_ascent
1019         -Linux: avgCharWidth = width of an '0', fallback on m_xHeight
1020             maxCharWidth = max of avgCharWidth and m_ascent
1021         -Mac: look in the OS/2 table for avgCharWidth and grab the maxCharWidth off the font.
1022             If either one is not there, then calculate the value using the Linux approach.
1023
1024         Linux ports could probably dig into the OS/2 table as well, but I'll leave
1025         that up to them to implement.
1026
1027         Tests: fast/forms/text-control-intrinsic-widths.html
1028                fast/forms/textarea-metrics.html
1029                svg/custom/svg-fonts-in-text-controls.html
1030
1031         * css/html4.css:
1032         * css/themeWin.css:
1033         * platform/graphics/SimpleFontData.cpp:
1034         (WebCore::SimpleFontData::SimpleFontData):
1035         (WebCore::SimpleFontData::initCharWidths):
1036         * platform/graphics/SimpleFontData.h:
1037         (WebCore::SimpleFontData::maxCharWidth):
1038         (WebCore::SimpleFontData::avgCharWidth):
1039         * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
1040         (WebCore::SimpleFontData::platformCharWidthInit):
1041         * platform/graphics/chromium/SimpleFontDataLinux.cpp:
1042         (WebCore::SimpleFontData::platformCharWidthInit):
1043         * platform/graphics/gtk/SimpleFontDataGtk.cpp:
1044         (WebCore::SimpleFontData::platformCharWidthInit):
1045         * platform/graphics/gtk/SimpleFontDataPango.cpp:
1046         (WebCore::SimpleFontData::platformCharWidthInit):
1047         * platform/graphics/mac/SimpleFontDataMac.mm:
1048         (WebCore::SimpleFontData::platformCharWidthInit):
1049         * platform/graphics/qt/SimpleFontDataQt.cpp:
1050         (WebCore::SimpleFontData::platformCharWidthInit):
1051         * platform/graphics/win/SimpleFontDataCGWin.cpp:
1052         (WebCore::SimpleFontData::platformCharWidthInit):
1053         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
1054         (WebCore::SimpleFontData::platformInit):
1055         (WebCore::SimpleFontData::platformCharWidthInit):
1056         * platform/graphics/win/SimpleFontDataWin.cpp:
1057         (WebCore::SimpleFontData::initGDIFont):
1058         * platform/graphics/wx/SimpleFontDataWx.cpp:
1059         (WebCore::SimpleFontData::platformCharWidthInit):
1060         * rendering/RenderTextControl.cpp:
1061         (WebCore::RenderTextControl::calcPrefWidths):
1062         * rendering/RenderTextControlMultiLine.cpp:
1063         (WebCore::RenderTextControlMultiLine::createInnerTextStyle):
1064         * rendering/RenderTextControlSingleLine.cpp:
1065         (WebCore::RenderTextControlSingleLine::preferredContentWidth):
1066
1067 2009-04-17  Eric Seidel  <eric@webkit.org>
1068
1069         Reviewed by Simon Fraser.
1070
1071         Remove m_absoluteBounds hack from SVG renderers and move outlineBoundsForRepaint into RenderSVGModelObject
1072         https://bugs.webkit.org/show_bug.cgi?id=25276
1073
1074         This also exposed a buggy paint check in RenderSVGContainer::layout()
1075         we should repaint if we are self painting OR if our kids changed, not AND.
1076
1077         Writing real outlineBoundsForRepaint required writing a mapLocalToContainer() function
1078
1079         No functional changes, thus no tests.
1080
1081         * rendering/RenderPath.cpp:
1082         (WebCore::RenderPath::localToParentTransform):
1083         (WebCore::RenderPath::layout):
1084         * rendering/RenderPath.h:
1085         * rendering/RenderSVGContainer.cpp:
1086         (WebCore::RenderSVGContainer::layout):
1087         * rendering/RenderSVGContainer.h:
1088         * rendering/RenderSVGModelObject.cpp:
1089         (WebCore::RenderSVGModelObject::mapLocalToContainer):
1090         (WebCore::RenderSVGModelObject::outlineBoundsForRepaint):
1091         * rendering/RenderSVGModelObject.h:
1092         * rendering/RenderSVGRoot.cpp:
1093         (WebCore::RenderSVGRoot::layout):
1094         (WebCore::RenderSVGRoot::paint):
1095         (WebCore::RenderSVGRoot::localToParentTransformWithoutCSSParentOffset):
1096         (WebCore::RenderSVGRoot::localToParentTransform):
1097         (WebCore::RenderSVGRoot::computeRectForRepaint):
1098         * rendering/RenderSVGRoot.h:
1099         * rendering/RenderSVGViewportContainer.cpp:
1100         (WebCore::RenderSVGViewportContainer::layout):
1101
1102 2009-04-20  Simon Fraser  <simon.fraser@apple.com>
1103
1104         Reviewed by Eric Seidel
1105
1106         https://bugs.webkit.org/show_bug.cgi?id=25282
1107         
1108         outlineBoundsForRepaint() should compute a quad relative to the
1109         repaintContainer. This fixes the repaint issues originally fixed in
1110         https://bugs.webkit.org/show_bug.cgi?id=12885 for elements in compositing layers.
1111         Failure was only apparent when building with ACCELERATED_COMPOSITING enabled.
1112
1113         Tests: compositing/repaint/content-into-overflow.html
1114                compositing/repaint/overflow-into-content.html
1115
1116         * rendering/RenderBox.cpp:
1117         (WebCore::RenderBox::outlineBoundsForRepaint):
1118
1119 2009-04-20  Sam Weinig  <sam@webkit.org>
1120
1121         Rubber-stamped by Tim Hatcher.
1122
1123         Add licenses for xcconfig files.
1124
1125         * Configurations/Base.xcconfig:
1126         * Configurations/DebugRelease.xcconfig:
1127         * Configurations/FeatureDefines.xcconfig:
1128         * Configurations/Version.xcconfig:
1129         * Configurations/WebCore.xcconfig:
1130
1131 2009-04-20  Eric Roman  <eroman@chromium.org>
1132
1133         Reviewed by Dimitri Glazkov.
1134
1135         https://bugs.webkit.org/show_bug.cgi?id=25261
1136         Implement the V8 binding for DOMWindow.event similarly to JSC, by using
1137         the custom getter boilerplate from the IDL file. 
1138         Also, stub out DOMWindow.crypto which is defined by the idl.
1139
1140         * bindings/v8/V8AbstractEventListener.cpp:
1141         (WebCore::V8AbstractEventListener::invokeEventHandler):
1142         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1143         (WebCore::ACCESSOR_GETTER):
1144
1145 2009-04-20  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
1146
1147         Reviewed by Xan Lopez.
1148
1149         https://bugs.webkit.org/show_bug.cgi?id=25243
1150         Crash when data:// loads are cancelled
1151
1152         Properly handle cancellation of the load for data:// loads. This
1153         fixes crashing in the followin test:
1154
1155         plugins/return-error-from-new-stream-callback-in-full-frame-plugin.html
1156
1157         * platform/network/soup/ResourceHandleSoup.cpp:
1158         (WebCore::parseDataUrl):
1159
1160 2009-04-19  Dan Bernstein  <mitz@apple.com>
1161
1162         - maybe fix release builds
1163
1164         * dom/ScriptElement.cpp:
1165         (WebCore::ScriptElementData::notifyFinished):
1166
1167 2009-04-19  Dan Bernstein  <mitz@apple.com>
1168
1169         - not fix release builds
1170
1171         * dom/Document.cpp:
1172         (WebCore::Document::executeScriptSoonTimerFired):
1173
1174 2009-04-19  Dan Bernstein  <mitz@apple.com>
1175
1176         Reviewed by Mark Rowe.
1177
1178         - fix <rdar://problem/6734365> REGRESSION eBay "Save this search" link
1179           does nothing the second time search results are opened
1180
1181         Test: fast/dom/HTMLScriptElement/nested-execution.html
1182
1183         Instead of executing scripts as soon as they finish loading, which may
1184         happen synchronously during execution of another script, defer their
1185         execution until the next run loop iteration, using a queue that is
1186         similar to the HTML5 notion of the "list of scripts that will execute as
1187         soon as possible", and in my testing was consistent with how Firefox
1188         behaved.
1189
1190         * dom/Document.cpp:
1191         (WebCore::Document::Document): Initialize m_executeScriptSoonTimer.
1192         (WebCore::Document::~Document): deref() script elements in
1193         m_scriptsToExecuteSoon.
1194         (WebCore::Document::executeScriptSoonTimerFired): Added. Executes the
1195         scripts in m_scriptsToExecuteSoon and deref()s them.
1196         (WebCore::Document::executeScriptSoon): Added. Appends to
1197         m_scriptsToExecuteSoon and ref()s the script element, which keeps the
1198         ScriptElementData alive as well.
1199         * dom/Document.h:
1200         * dom/ScriptElement.cpp:
1201         (WebCore::ScriptElementData::ScriptElementData): Initialize m_requested.
1202         (WebCore::ScriptElementData::requestScript): Set m_requested to true, to
1203         prevent further load requests.
1204         (WebCore::ScriptElementData::execute): Added. Moved the code from
1205         notifyFinished() which should not execute synchronously here, to be
1206         called by the Document on a 0-interval timer.
1207         (WebCore::ScriptElementData::notifyFinished): Moved the code to
1208         dispatch events and evaluate the script, which should not execute
1209         synchronously, out of here.
1210         (WebCore::ScriptElementData::ignoresLoadRequest): Changed to test for
1211         m_requested instead of m_cachedScript, because the latter is cleared
1212         before the script is evaluated.
1213         * dom/ScriptElement.h:
1214
1215 2009-04-19  Oliver Hunt  <oliver@apple.com>
1216
1217         Reviewed by Antti Koivisto and Darin Adler.
1218
1219         <rdar://problem/6127705> Excessive memory consumption on image load failure
1220
1221         When we fail to decode an image we clear most of the image data, but not the
1222         input data itself, which can be backed by a CFData object that itself holds onto
1223         a few hundred Kbs of memory.  This patch merely ensures that this buffer gets
1224         cleared.
1225
1226         * loader/CachedImage.cpp:
1227         (WebCore::CachedImage::error):
1228
1229 2009-04-19  Darin Adler  <darin@apple.com>
1230
1231         Reviewed by Sam Weinig.
1232
1233         Add hooks so sudden termination will not cause loss of icons or local storage.
1234         rdar://problem/5951701
1235
1236         * loader/icon/IconDatabase.cpp: Marked various constants static to give them
1237         internal linkage.
1238         (WebCore::IconDatabase::IconDatabase): Added initial value for m_syncTimer.
1239         Removed unneeded initial value for m_defaultIconRecord. Changed assertion to
1240         work cross-platform.
1241         (WebCore::IconDatabase::wakeSyncThread): Added disableSuddenTermination, so
1242         we won't terminate until the sync thread has done its thing.
1243         (WebCore::IconDatabase::scheduleOrDeferSyncTimer): Added disableSuddenTermination,
1244         so we won't terminate if we have an outstanding sync timer.
1245         (WebCore::IconDatabase::syncTimerFired): Added enableSuddenTermination, to
1246         balance the one in scheduleOrDeferSyncTimer.
1247         (WebCore::IconDatabase::syncThreadMainLoop): Added enableSuddenTermination, to
1248         balance the one in wakeSyncThread.
1249         (WebCore::IconDatabase::deleteAllPreparedStatements): Use clear() instead of set(0).
1250
1251         * loader/icon/IconDatabase.h: Use a Timer instead of an OwnPtr<Timer>.
1252
1253         * storage/LocalStorageArea.cpp:
1254         (WebCore::LocalStorageArea::scheduleFinalSync): Added disableSuddenTermination.
1255         (WebCore::LocalStorageArea::scheduleItemForSync): Ditto.
1256         (WebCore::LocalStorageArea::scheduleClear): Ditto.
1257         (WebCore::LocalStorageArea::syncTimerFired): Added a disableSuddenTermination if
1258         we schedule a performSync callback for later and an unconditional
1259         enableSuddenTermination to balance the ones in the schedule calls above.
1260         (WebCore::LocalStorageArea::sync): Factored out the work of the sync function so it
1261         can continue to use early return idiom.
1262         (WebCore::LocalStorageArea::performSync): Added a call to enableSuddenTermination.
1263
1264         * storage/LocalStorageArea.h: Added declaration of the sync function.
1265
1266 2009-04-19  David Kilzer  <ddkilzer@apple.com>
1267
1268         Make FEATURE_DEFINES completely dynamic
1269
1270         Reviewed by Darin Adler.
1271
1272         Make FEATURE_DEFINES depend on individual ENABLE_FEATURE_NAME
1273         variables for each feature, making it possible to remove all
1274         knowledge of FEATURE_DEFINES from build-webkit.
1275
1276         * Configurations/FeatureDefines.xcconfig: Extract a variable
1277         from FEATURE_DEFINES for each feature setting.
1278
1279 2009-04-18  Geoffrey Garen  <ggaren@apple.com>
1280
1281         Reviewed by Alexey Proskuryakov.
1282
1283         More fix for https://bugs.webkit.org/show_bug.cgi?id=21260
1284         Unbounded memory growth when churning elements with anonymous event handler functions
1285         
1286         Removed a little more complexity from event handler creation and destruction.
1287         
1288         Removed the jsProtectedEventListeners, jsProtectedInlineEventListeners,
1289         and jsInlineEventListeners maps, and all the code for managing them.
1290         
1291         ProtectedEventListeners don't exist anymore, so they're easy to nix.
1292         
1293         Inline EventListeners do still exist, but there's no reason to track
1294         them in a map. The map exists to enable 'removeEventListener' to associate
1295         a unique JSEventListener with a given JavaScript function. But the
1296         'removeEventListener' API only works with non-inline event listeners!
1297         
1298         * bindings/js/JSDOMGlobalObject.cpp:
1299         (WebCore::JSDOMGlobalObject::~JSDOMGlobalObject):
1300         (WebCore::JSDOMGlobalObject::findJSEventListener):
1301         (WebCore::JSDOMGlobalObject::findOrCreateJSEventListener):
1302         (WebCore::JSDOMGlobalObject::createJSInlineEventListener):
1303         * bindings/js/JSDOMGlobalObject.h:
1304         * bindings/js/JSEventListener.cpp:
1305         (WebCore::JSEventListener::JSEventListener):
1306         (WebCore::JSEventListener::clearJSFunctionInline):
1307         * bindings/js/JSLazyEventListener.cpp:
1308         (WebCore::JSLazyEventListener::~JSLazyEventListener):
1309         (WebCore::JSLazyEventListener::parseCode):
1310         * bindings/scripts/CodeGeneratorJS.pm:
1311
1312 2009-04-18  Dan Bernstein  <mitz@apple.com>
1313
1314         - try to fix the Windows build
1315
1316         * editing/VisiblePosition.cpp:
1317         (WebCore::VisiblePosition::characterAfter):
1318
1319 2009-04-18  Dan Bernstein  <mitz@apple.com>
1320
1321         - revert the previous change, which was to a file that the Windows
1322           port does not even use
1323
1324         * icu/unicode/utf16.h:
1325
1326 2009-04-18  Dan Bernstein  <mitz@apple.com>
1327
1328         Reviewed by Geoffrey Garen.
1329
1330         - try to fix the Windows build
1331
1332         * icu/unicode/utf16.h:
1333
1334 2009-04-18  Simon Fraser  <simon.fraser@apple.com>
1335
1336         Reviewed by Antti Koivisto.
1337         
1338         https://bugs.webkit.org/show_bug.cgi?id=25066
1339         
1340         When a <video> element gained a RenderLayer via opacity, reflection etc., the
1341         layer hierarchy was not correctly updated because RenderMedia skipped a level
1342         when asked for its children; it skipped m_controlsShadowRoot's renderer, which
1343         actually has a layer.
1344
1345         Test: fast/layers/video-layer.html
1346
1347         * rendering/MediaControlElements.cpp:
1348         (WebCore::MediaControlShadowRootElement::MediaControlShadowRootElement):
1349         Don't manually call setParent() on the renderer. It will happen later
1350         as a result of addChild().
1351         
1352         * rendering/RenderMedia.cpp:
1353         (WebCore::RenderMedia::createControlsShadowRoot):
1354         Add m_controlsShadowRoot's renderer as a child. 
1355
1356         * rendering/RenderMedia.h:
1357         (WebCore::RenderMedia::children):
1358         Now maintain a RenderObjectChildList, m_children, and remove the unneeded
1359         removeChild() method. Make the two children() methods inline.
1360
1361         * rendering/RenderObject.cpp:
1362         (WebCore::RenderObject::moveLayers):
1363         Assert if moveLayers() is called with an oldParent that is not the
1364         layer's actual parent (which would have revealed this bug).
1365
1366 2009-04-18  Geoffrey Garen  <ggaren@apple.com>
1367
1368         Reviewed by Cameron Zwarich.
1369
1370         Fixed a layout test failure, caused by my last check-in
1371         (fast/dom/script-element-gc.html).
1372
1373         * bindings/js/JSDOMBinding.cpp:
1374         (WebCore::isObservableThroughDOM):
1375         * html/HTMLScriptElement.h:
1376         (WebCore::HTMLScriptElement::haveFiredLoadEvent): Treat script elements
1377         just like image elements: if a script element is loading, mark its JS
1378         wrapper, even if the element is not in the document.
1379
1380 2009-04-18  Jian Li  <jianli@chromium.org>
1381
1382         Reviewed by Dimitri Glazkov.
1383
1384         https://bugs.webkit.org/show_bug.cgi?id=25170
1385         Upstream V8WorkerCustom.cpp and V8WorkerContextCustom.cpp for V8 bindings.
1386
1387         * bindings/v8/WorkerContextExecutionProxy.cpp:
1388         (WebCore::WorkerContextExecutionProxy::findOrCreateEventListener):
1389         * bindings/v8/WorkerContextExecutionProxy.h:
1390         * bindings/v8/custom/V8WorkerContextCustom.cpp: Added.
1391         * bindings/v8/custom/V8WorkerCustom.cpp: Added.
1392
1393 2009-04-18  Jian Li  <jianli@chromium.org>
1394
1395         Reviewed by Dimitri Glazkov.
1396
1397         https://bugs.webkit.org/post_bug.cg://bugs.webkit.org/show_bug.cgi?id=25167 
1398         Change createHiddenXHRDependency and removeHiddenXHRDependency so that they can be used by other custom code in V8 bindings.
1399
1400         * bindings/v8/V8Utilities.cpp: Renamed from WebCore/bindings/v8/V8XMLHttpRequestUtilities.cpp.
1401         (WebCore::createHiddenDependency):
1402         (WebCore::removeHiddenDependency):
1403         * bindings/v8/V8Utilities.h: Renamed from WebCore/bindings/v8/V8XMLHttpRequestUtilities.h.
1404         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
1405         (WebCore::ACCESSOR_SETTER):
1406         (WebCore::CALLBACK_FUNC_DECL):
1407         * bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp:
1408         (WebCore::ACCESSOR_SETTER):
1409         (WebCore::CALLBACK_FUNC_DECL):
1410
1411 2009-04-18  Drew Wilson  <amw@apple.com>
1412
1413         <rdar://problem/6781407> VisiblePosition.characterAfter should return UChar32
1414
1415         Reviewed by Dan Bernstein.
1416
1417         No test case since there is no change in behavior.
1418
1419         * editing/VisiblePosition.cpp:
1420         (WebCore::VisiblePosition::characterAfter): Now handles surrogate
1421         pairs correctly and returns a UChar32.
1422         * editing/VisiblePosition.h:
1423         (WebCore::VisiblePosition::characterBefore): Now returns a UChar32.
1424         * editing/visible_units.cpp:
1425         (WebCore::endOfFirstWordBoundaryContext): Renamed
1426         firstNonComplexContextLineBreak() to this. Changed it to use the
1427         generic requiresContextForWordBoundary() instead of
1428         hasLineBreakingPropertyComplexContext().
1429         (WebCore::startOfLastWordBoundaryContext): Replaces
1430         lastNonComplexContextLineBreak(), but returns the offset of
1431         the character after the last character that does not require
1432         context for word breaking. Also changed to use
1433         requiresContextForWordBoundary().
1434         (WebCore::previousBoundary): Updated for the above changes in
1435         names and semantics, and changed to use
1436         requiresContextForWordBoundary().
1437         (WebCore::nextBoundary): Ditto.
1438         (WebCore::startWordBoundary): Ditto.
1439         (WebCore::endWordBoundary): Ditto.
1440         (WebCore::previousWordPositionBoundary): Ditto.
1441         (WebCore::nextWordPositionBoundary): Ditto.
1442         * platform/text/TextBoundaries.h:
1443         (WebCore::requiresContextForWordBoundary): Added.
1444         * platform/text/mac/TextBoundaries.mm:
1445
1446 2009-04-18  Geoffrey Garen  <ggaren@apple.com>
1447
1448         Reviewed by Cameron Zwarich.
1449
1450         Fixed <rdar://problem/6797442> | https://bugs.webkit.org/show_bug.cgi?id=25285
1451         REGRESSION (r42569): Profiles cannot be selected in inspector profiler
1452         
1453         EventListeners are shared; RegisteredEventListeners are not. Therefore,
1454         when a node wrapper needs to invalidate the node's JS event listeners,
1455         it should invalidate its RegisteredEventListeners, not its EventListeners.
1456         Otherwise, it might invalidate an EventListener shared by another node.
1457
1458         * dom/RegisteredEventListener.h:
1459         (WebCore::invalidateEventListeners): ditto
1460
1461 2009-04-18  Pierre d'Herbemont  <pdherbemont@apple.com>
1462
1463         Reviewed by Mark Rowe.
1464
1465         <rdar://problem/6781295> video.buffered and video.seekable are not
1466         the same. video.buffered should return only what is buffered and
1467         not what is seekable
1468
1469         * WebCore.base.exp: Added wkQTMovieMaxTimeSeekable.
1470
1471         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1472         (WebCore::MediaPlayerPrivate::maxTimeSeekable): Return wkQTMovieMaxTimeSeekable.
1473
1474         * platform/mac/WebCoreSystemInterface.h: Add wkQTMovieMaxTimeSeekable.
1475         * platform/mac/WebCoreSystemInterface.mm: Ditto.
1476
1477 2009-04-18  Pierre d'Herbemont  <pdherbemont@apple.com>
1478
1479         Reviewed by Adele Peterson.
1480
1481         <rdar://problem/6747241> work around QTKit no longer reaching
1482         QTMovieLoadStateComplete
1483
1484         * WebCore.base.exp: Export wkQTMovieMaxTimeLoadedChangeNotification.
1485
1486         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1487         (WebCore::MediaPlayerPrivate::createQTMovie): observe QTMovieMaxTimeLoadedChangeNotification.
1488         (WebCore::MediaPlayerPrivate::updateStates): compare duuration() with maxTimeLoaded() instead of
1489         using QTMovieLoadStateComplete to determine if a movie are fully loaded.
1490
1491         * platform/mac/WebCoreSystemInterface.h: Add wkQTMovieMaxTimeLoadedChangeNotification.
1492         * platform/mac/WebCoreSystemInterface.mm: Ditto.
1493
1494 2009-04-18  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
1495
1496         Reviewed by George Staikos.
1497
1498         Make WML work again, most regressions test were failing.
1499
1500         * dom/Document.cpp: Be sure to create WML elements in WML namespace. Otherwhise hasTagName() comparisions fail.
1501         (WebCore::Document::createElement):
1502         * wml/WMLCardElement.cpp: Add ASSERT(hasTagName(cardTag)) to catch errors like this in future.
1503         (WebCore::WMLCardElement::WMLCardElement):
1504         * wml/WMLTagNames.in: Wrap comment in #if 0/#endif blocks, to silence the generation script.
1505
1506 2009-04-17  Justin Garcia  <justin.garcia@apple.com>
1507
1508         Reviewed by Dan Bernstein.
1509
1510         https://bugs.webkit.org/show_bug.cgi?id=25277
1511         If there is no line wrapping, a caret can leave its containing block but it shouldn't leave its root line box
1512         
1513         Also added code to handle a caret wider than one pixel.
1514         
1515         Added fast/inline/25277.html and fast/inline/25277-2.html
1516
1517         * rendering/RenderText.cpp:
1518         (WebCore::RenderText::localCaretRect): Distribute a caret's width to either side of the offset,
1519         so that a caret between two characters doesn't hang over one character more than the other.
1520         If there is no wrapping, the caret can leave its containing block, but not its root line box.
1521
1522 2009-04-17  Geoffrey Garen  <ggaren@apple.com>
1523
1524         Reviewed by Oliver Hunt.
1525
1526         More fix for https://bugs.webkit.org/show_bug.cgi?id=21260
1527         Unbounded memory growth when churning elements with anonymous event handler functions
1528         
1529         Some refactoring of "inline" event listeners.
1530         
1531         Renames:
1532             dispatchEventForType => dispatchEvent
1533             setWindowInlineEventListenerForTypeAndAttribute => setWindowInlineEventListener
1534             removeInlineEventListenerForType => clearInlineEventListener
1535             setInlineEventListenerForType => setInlineEventListener
1536             inlineEventListenerForType => getInlineEventListener
1537
1538         * bindings/js/JSLazyEventListener.cpp:
1539         (WebCore::eventParameterName):
1540         (WebCore::JSLazyEventListener::JSLazyEventListener):
1541         (WebCore::createInlineEventListener):
1542         * bindings/js/JSLazyEventListener.h: Added two helper functions for
1543         creating "inline" event listeners. These replace Document::createEventListener,
1544         and abstract the creation of JS event listeners for DOM attributes out
1545         of the DOM. Removed legacy JSProtectedEventListener constructor code for
1546         adding the event listener's function to a map, since lazy event listeners
1547         don't have functions at construction time.
1548
1549         * dom/Document.cpp:
1550         (WebCore::Document::setFocusedNode):
1551         * dom/Document.h:
1552         (WebCore::Document::isSVGDocument):
1553         * dom/Element.cpp:
1554         (WebCore::Element::setWindowInlineEventListener):
1555         * dom/Element.h: Updated for renames. Nixed Document::createEventListener,
1556         mentioned above. Moved setWindowInlineEventListenerForTypeAndAttribute
1557         to Element, for simplicity.
1558
1559         * dom/InputElement.cpp:
1560         (WebCore::InputElement::setValueFromRenderer):
1561         * dom/Node.cpp:
1562         (WebCore::Node::dispatchFocusEvent):
1563         (WebCore::Node::dispatchBlurEvent):
1564         (WebCore::Node::dispatchEvent):
1565         (WebCore::Node::clearInlineEventListener):
1566         (WebCore::Node::setInlineEventListener):
1567         (WebCore::Node::getInlineEventListener):
1568         (WebCore::Node::onabort):
1569         (WebCore::Node::setOnabort):
1570         (WebCore::Node::etc.):
1571         * dom/Node.h: Updated for renames.
1572         
1573         * editing/ReplaceSelectionCommand.cpp:
1574         (WebCore::ReplacementFragment::ReplacementFragment): Updated for renames.
1575         
1576         Updated these files for renames, and to use the new createInlineEventListener
1577         helper function:
1578
1579         * html/HTMLBodyElement.cpp:
1580         (WebCore::HTMLBodyElement::parseMappedAttribute):
1581         * html/HTMLButtonElement.cpp:
1582         (WebCore::HTMLButtonElement::parseMappedAttribute):
1583         * html/HTMLElement.cpp:
1584         (WebCore::HTMLElement::parseMappedAttribute):
1585         * html/HTMLFormControlElement.cpp:
1586         (WebCore::HTMLFormControlElement::onChange):
1587         * html/HTMLFormElement.cpp:
1588         (WebCore::HTMLFormElement::prepareSubmit):
1589         (WebCore::HTMLFormElement::reset):
1590         (WebCore::HTMLFormElement::parseMappedAttribute):
1591         * html/HTMLFrameElementBase.cpp:
1592         (WebCore::HTMLFrameElementBase::parseMappedAttribute):
1593         * html/HTMLFrameSetElement.cpp:
1594         (WebCore::HTMLFrameSetElement::parseMappedAttribute):
1595         * html/HTMLImageElement.cpp:
1596         (WebCore::HTMLImageElement::parseMappedAttribute):
1597         * html/HTMLImageLoader.cpp:
1598         (WebCore::HTMLImageLoader::dispatchLoadEvent):
1599         * html/HTMLInputElement.cpp:
1600         (WebCore::HTMLInputElement::parseMappedAttribute):
1601         (WebCore::HTMLInputElement::onSearch):
1602         * html/HTMLMediaElement.cpp:
1603         (WebCore::HTMLMediaElement::loadInternal):
1604         * html/HTMLObjectElement.cpp:
1605         (WebCore::HTMLObjectElement::parseMappedAttribute):
1606         * html/HTMLScriptElement.cpp:
1607         (WebCore::HTMLScriptElement::parseMappedAttribute):
1608         (WebCore::HTMLScriptElement::dispatchLoadEvent):
1609         (WebCore::HTMLScriptElement::dispatchErrorEvent):
1610         * html/HTMLSelectElement.cpp:
1611         (WebCore::HTMLSelectElement::parseMappedAttribute):
1612         * html/HTMLTextAreaElement.cpp:
1613         (WebCore::HTMLTextAreaElement::parseMappedAttribute):
1614         * html/HTMLTokenizer.cpp:
1615         (WebCore::HTMLTokenizer::notifyFinished):
1616         * page/AccessibilityRenderObject.cpp:
1617         (WebCore::AccessibilityRenderObject::mouseButtonListener):
1618         * page/DOMWindow.cpp:
1619         * page/DOMWindow.h:
1620         (WebCore::DOMWindow::eventListeners):
1621         * page/EventHandler.cpp:
1622         (WebCore::EventHandler::canMouseDownStartSelect):
1623         (WebCore::EventHandler::canMouseDragExtendSelect):
1624         (WebCore::EventHandler::sendScrollEvent):
1625         * page/Page.cpp:
1626         (WebCore::networkStateChanged):
1627         * rendering/RenderListBox.cpp:
1628         (WebCore::RenderListBox::valueChanged):
1629         * rendering/RenderTextControl.cpp:
1630         (WebCore::RenderTextControl::selectionChanged):
1631         * svg/SVGElement.cpp:
1632         (WebCore::SVGElement::parseMappedAttribute):
1633         * svg/SVGElementInstance.cpp:
1634         * svg/SVGImageLoader.cpp:
1635         (WebCore::SVGImageLoader::dispatchLoadEvent):
1636         * svg/SVGSVGElement.cpp:
1637         (WebCore::SVGSVGElement::parseMappedAttribute):
1638         * svg/SVGScriptElement.cpp:
1639         (WebCore::SVGScriptElement::dispatchErrorEvent):
1640         * wml/WMLInputElement.cpp:
1641         (WebCore::WMLInputElement::defaultEventHandler):
1642
1643 2009-04-17  David Kilzer  <ddkilzer@apple.com>
1644
1645         Simplify FEATURE_DEFINES definition
1646
1647         Reviewed by Darin Adler.
1648
1649         This moves FEATURE_DEFINES and its related ENABLE_FEATURE_NAME
1650         variables to their own FeatureDefines.xcconfig file.  It also
1651         extracts a new ENABLE_GEOLOCATION variable so that
1652         FEATURE_DEFINES only needs to be defined once.
1653
1654         * Configurations/FeatureDefines.xcconfig: Added.
1655         * Configurations/WebCore.xcconfig: Removed definition of
1656         ENABLE_SVG_DOM_OBJC_BINDINGS and FEATURE_DEFINES.  Added include
1657         of FeatureDefines.xcconfig.
1658         * WebCore.xcodeproj/project.pbxproj: Added
1659         FeatureDefines.xcconfig file.
1660         * bindings/scripts/CodeGeneratorObjC.pm: When creating a list of
1661         command-line macro definitions, split on one-or-more spaces
1662         instead of a single space since the FEATURE_DEFINES macro may
1663         now contain more than one space between macros if some macros
1664         aren't defined.
1665
1666 2009-04-17  Brady Eidson  <beidson@apple.com>
1667
1668         Reviewed by Mark Rowe
1669
1670         <rdar://problem/6786999> Tiger WebKit shouldn't try to POST on back/forward without nagging.
1671
1672         * platform/network/mac/ResourceHandleMac.mm:
1673         (WebCore::ResourceHandle::willLoadFromCache):
1674
1675 2009-04-17  Darin Adler  <darin@apple.com>
1676
1677         Reviewed by Timothy Hatcher.
1678
1679         Added sudden termination functions that can be called without involving
1680         the page or client.
1681
1682         * GNUmakefile.am: Added SuddenTermination.h.
1683         * WebCore.vcproj/WebCore.vcproj: Ditto.
1684         * WebCore.xcodeproj/project.pbxproj: Ditto. Also added SuddenTermination.mm.
1685
1686         * platform/SuddenTermination.h: Added.
1687         * platform/mac/SuddenTermination.mm: Added.
1688
1689 2009-04-17  Eric Seidel  <eric@webkit.org>
1690
1691         Reviewed by Simon Fraser.
1692
1693         Move more code into RenderSVGModelObject
1694
1695         needsLayer() already returns false from RenderSVGModelObject
1696         lineHeight and baselinePosition are from days of RenderPath having RenderBox parents.
1697
1698         I also added comments to explain how focus rings work (now that I understand)
1699         I got rid of two more uses of m_absoluteBounds (nearly dead!)
1700
1701         * rendering/RenderPath.cpp:
1702         * rendering/RenderPath.h:
1703         * rendering/RenderSVGContainer.cpp:
1704         (WebCore::RenderSVGContainer::paint):
1705         (WebCore::RenderSVGContainer::addFocusRingRects):
1706         * rendering/RenderSVGContainer.h:
1707         * rendering/RenderSVGModelObject.cpp:
1708         (WebCore::RenderSVGModelObject::absoluteRects):
1709         (WebCore::RenderSVGModelObject::absoluteQuads):
1710         * rendering/RenderSVGModelObject.h:
1711
1712 2009-04-16  Peter Kasting  <pkasting@google.com>
1713
1714         Reviewed by Adele Peterson.
1715
1716         https://bugs.webkit.org/show_bug.cgi?id=25238
1717         Invalidate the hovered scrollbar part when resetting the pressed part,
1718         since once there is no pressed part we can draw a hovered state.
1719
1720         * platform/Scrollbar.cpp:
1721         (WebCore::Scrollbar::setHoveredPart):
1722         (WebCore::Scrollbar::setPressedPart):
1723
1724 2009-04-16  Darin Fisher  <darin@chromium.org>
1725
1726         Reviewed by Darin Adler.
1727
1728         https://bugs.webkit.org/show_bug.cgi?id=25223
1729         REGRESSION: Back button after form submission to the same URL fails to navigate.
1730
1731         Test: http/tests/navigation/post-goback-same-url.html
1732
1733         * loader/FrameLoader.cpp:
1734         (WebCore::FrameLoader::loadItem): Check if the page we are leaving has
1735         FormData.
1736
1737 2009-04-17  Nikolas Zimmermann  <nikolas.zimmerman@torchmobile.com>
1738
1739         Not reviewed. Fix WML enabled builds.
1740
1741         * rendering/RenderTableRow.cpp: Remove dead code, which is no longer necessary.
1742         (WebCore::RenderTableRow::addChild):
1743         * wml/WMLInputElement.cpp: Apply same fix HTMLInputElement received. Covert RenderObject's to RenderTextControl where needed.
1744         (WebCore::WMLInputElement::defaultEventHandler):
1745
1746 2009-04-17  Pierre d'Herbemont  <pdherbemont@apple.com>
1747
1748         Reviewed by Simon Fraser.
1749         
1750         https://bugs.webkit.org/show_bug.cgi?id=24849
1751
1752         Add support for the media element 'played' attribute.
1753         This involves support of "normalized TimeRanges" as described by
1754         the spec.
1755
1756         Test: media/video-played.html
1757
1758         * html/HTMLMediaElement.cpp:
1759         (WebCore::HTMLMediaElement::HTMLMediaElement): Renamed 
1760         m_currentTimeDuringSeek->m_lastSeekTime. Added m_playing and m_playedTimeRanges.
1761         (WebCore::HTMLMediaElement::loadInternal): Reset m_playing, m_lastSeekTime, and
1762         m_playedTimeRanges
1763         (WebCore::HTMLMediaElement::seek): Set current time to m_playedTimeRanges
1764         (WebCore::HTMLMediaElement::currentTime): m_currentTimeDuringSeek -> m_lastSeekTime
1765         (WebCore::HTMLMediaElement::played): Returns m_playedTimeRanges.
1766         (WebCore::HTMLMediaElement::updatePlayState): Add the new played time ranges when pausing. 
1767         Set the m_playing flag.
1768         * html/HTMLMediaElement.h:
1769
1770         * html/TimeRanges.cpp:
1771         (TimeRanges::add): Merge range(s) if overlap.
1772         * html/TimeRanges.h: Add various helpers (below).
1773         (WebCore::TimeRanges::Range::isPointInRange): Added.
1774         (WebCore::TimeRanges::Range::isOverlappingRange): Ditto.
1775         (WebCore::TimeRanges::Range::unionWithOverlappingRange): Ditto.
1776         (WebCore::TimeRanges::Range::isBeforeRange): Ditto.
1777
1778 2009-04-17  Darin Adler  <darin@apple.com>
1779
1780         Reviewed by Antti Koivisto.
1781
1782         Bug 25210: don't use ObjC methods to wrap/unwrap DOM objects with ObjC
1783         https://bugs.webkit.org/show_bug.cgi?id=25210
1784
1785         * WebCore.base.exp: Export the core and kit function overloads that are used
1786         in WebKit. Also resorted this file.
1787
1788         * WebCore.xcodeproj/project.pbxproj: Re-added DOMHTMLCanvasElement.h to fix
1789         a strange problem with the file type.
1790
1791         * bindings/objc/DOM.mm: Removed the many extraneous includes. Added new includes
1792         so we can use and implement the new core and kit functions. Import DOMInternal.h
1793         first so it can do its public/private magic.
1794         (-[DOMNode _rootObject]): Changed to use early-return style.
1795         (kitClass): Added. Tells the wrapper generator what kind of node class to create
1796         to wrap DOM nodes. This has the code that used to be in the _wrapNode method.
1797         (kit): Added. Takes an EventTarget and makes the appropriate type of wrapper,
1798         dpending on whether it's a Node or an SVGElementInstance. This replace methods
1799         that used to be on both of those classes.
1800         (-[DOMNode boundingBox]): Changed to use early return, and the core function.
1801         (-[DOMNode lineBoxRects]): Ditto.
1802         (-[DOMNode renderedImage]): Ditto.
1803         (-[DOMRange boundingBox]): Ditto.
1804         (-[DOMRange lineBoxRects]): Ditto.
1805         (-[DOMElement image]): Ditto.
1806         (-[DOMElement _font]): Ditto.
1807         (-[DOMElement _imageTIFFRepresentation]): Ditto.
1808         (-[DOMElement _getURLAttribute:]): Ditto.
1809         (-[DOMElement isFocused]): Ditto.
1810         (kit): Hand-wrote the version of this for NodeFilter, since it's a protocol,
1811         not a class in the binding.
1812         (core): Ditto.
1813         (-[DOMNodeFilter acceptNode:]): Use core.
1814
1815         * bindings/objc/DOMAbstractView.mm:
1816         (-[DOMAbstractView document]): Use kit.
1817         (-[DOMAbstractView _disconnectFrame]): Call removeDOMWrapper, which is no longer
1818         in the WebCore namespace, since it's headed for WebKit in the future.
1819         (core): Hand-wrote the version of this for DOMAbstractView.mm, since we store
1820         a pointer to the Frame, not the DMWindow.
1821         (kit): Ditto.
1822
1823         * bindings/objc/DOMCSS.mm:
1824         (kitClass): Added. Tells the wrapper generator what kind of node class to create
1825         to wrap CSS objects. This has the code that used to be in the _wrapStyleSheet,
1826         _wrapCSSRule, and _wrapCSSValue methods.
1827
1828         * bindings/objc/DOMEvents.mm:
1829         (kitClass): Added. Tells the wrapper generator what kind of node class to create
1830         to wrap event objects. This has the code that used to be in the _wrapEvent methods.
1831
1832         * bindings/objc/DOMHTML.mm:
1833         (-[DOMHTMLDocument createDocumentFragmentWithMarkupString:baseURL:]): Use kit and core.
1834         (-[DOMHTMLDocument createDocumentFragmentWithText:]): Ditto.
1835         (-[DOMHTMLDocument _createDocumentFragmentWithMarkupString:baseURLString:]): Ditto.
1836         (-[DOMHTMLInputElement _rectOnScreen]): Ditto.
1837         (-[DOMHTMLInputElement _replaceCharactersInRange:withString:selectingFromIndex:]): Ditto.
1838         (-[DOMHTMLInputElement _selectedRange]): Ditto.
1839         (-[DOMHTMLInputElement _setAutofilled:]): Ditto.
1840         (-[DOMHTMLSelectElement _activateItemAtIndex:]): Ditto.
1841         (-[DOMHTMLInputElement _isEdited]): Ditto.
1842         (-[DOMHTMLTextAreaElement _isEdited]): Ditto.
1843         (kitClass): Added. Gives HTMLOptionCollection objects an appropriate wrapper.
1844
1845         * bindings/objc/DOMInternal.h: Removed most of the imports. There's no reason
1846         to have this header include all the other internal DOM headers. Removed unneeded
1847         interfaces, including the redeclaration of _init in DOMObject, since it's already
1848         inherited from WebScriptObject. Moved all the functions out of the WebCore
1849         namespace since this code is destined for WebKit, which doesn't use a namespace.
1850         Added kit and core functions for the two classes that live in this header.
1851
1852         * bindings/objc/DOMInternal.mm:
1853         (-[WebScriptObject _initializeScriptDOMNodeImp]): Use core.
1854
1855         * bindings/objc/DOMObject.h: Made the _internal field be private instead of
1856         protected. This also allows the "#define private public" trick to be used to
1857         make the field accessible inside the bindings code.
1858
1859         * bindings/objc/DOMObject.mm:
1860         (-[DOMObject dealloc]): Updated for namespace change.
1861         (-[DOMObject sheet]): Use core and kit functions.
1862
1863         * bindings/objc/DOMRGBColor.mm:
1864         (-[DOMRGBColor dealloc]): Updated for namespace change.
1865         (-[DOMRGBColor red]): Use kit function.
1866         (-[DOMRGBColor green]): Ditto.
1867         (-[DOMRGBColor blue]): Ditto.
1868         (-[DOMRGBColor alpha]): Ditto.
1869         (core): Added. Replaces the _RGBColor method.
1870         (kit): Added. Replaces the _wrapRGBColor method.
1871
1872         * bindings/objc/DOMSVGPathSegInternal.mm:
1873         (kitClass): Added. Replaces the _wrapSVGPathSeg method.
1874
1875         * bindings/objc/DOMUtility.mm:
1876         (JSC::createDOMWrapper): Use kit function.
1877         (createDOMWrapper): Ditto.
1878
1879         * bindings/objc/DOMXPath.mm:
1880         (core): Added. Replaces the _xpathNSResolver method.
1881         (kit): Added. Replaces the _wrapXPathNSResolver method.
1882
1883         * bindings/objc/ObjCEventListener.mm:
1884         (WebCore::ObjCEventListener::find): Changed to use early return.
1885         (WebCore::ObjCEventListener::handleEvent): Use kit function.
1886
1887         * bindings/objc/ObjCNodeFilterCondition.mm:
1888         (WebCore::ObjCNodeFilterCondition::acceptNode): Use kit function.
1889
1890         * bindings/objc/WebScriptObject.mm:
1891         (+[WebScriptObject scriptObjectForJSObject:originRootObject:rootObject:]):
1892         Updated for namespace change.
1893
1894         * bindings/scripts/CodeGeneratorObjC.pm: Changed spelling of "license"
1895         to U.S. spelling. Removed GetObjCTypeMaker, GetObjCTypeGetterName,
1896         GetInternalTypeGetterSignature, and GetInternalTypeMakerSignature.
1897         Changed includes to conform to new scheme. Generate core and kit
1898         functions instead of methods and calls to those functions. Added a new
1899         attribute, Polymorphic, to indicate classes that have derived subclasses.
1900         Removed the old ObjCCustomInternalImpl attribute.
1901
1902         * css/CSSRule.idl: Use Polymorphic attribute, so core and kit functions
1903         will be generated, with kit calling kitClass. This requires less hand-
1904         written code than the old ObjCCustomInternalImpl.
1905         * css/CSSValue.idl: Ditto.
1906         * css/StyleSheet.idl: Ditto.
1907         * dom/Event.idl: Ditto.
1908         * dom/Node.idl: Ditto.
1909         * html/HTMLCollection.idl: Ditto.
1910         * svg/SVGPathSeg.idl: Ditto.
1911
1912         * editing/TextAffinity.h: Moved kit and core functions out of the
1913         WebCore namespace since this code is destined for WebKit, which
1914         doesn't use a namespace
1915
1916         * platform/mac/ClipboardMac.mm:
1917         (WebCore::ClipboardMac::declareAndWriteDragImage): Use kit function.
1918
1919         * platform/mac/DragDataMac.mm:
1920         (WebCore::DragData::asFragment): Use core function.
1921
1922         * platform/mac/PasteboardMac.mm:
1923         (WebCore::Pasteboard::writeSelection): Use kit function.
1924
1925         * svg/SVGElementInstance.idl: Removed now-unneeded ObjCCustomInternalImpl
1926         function. This can be generated in a standard way now.
1927         * svg/SVGViewSpec.idl: Ditto.
1928
1929 2009-04-17  Brady Eidson  <beidson@apple.com>
1930
1931         Reviewed by Maciej Stachowiak
1932
1933         <rdar://problem/5753299> "Private Browsing" doesn't affect HTML 5 Database storage
1934
1935         If the Page is in private browsing mode when a statement is queued up, flag that 
1936         statement as read-only.
1937
1938         It would be better to set the read-only flag on the database thread when it actually
1939         executes, but that would either require making Settings access a lock-protected operation
1940         or involve a synchronous callback to the WebCore thread, neither of which seem worth it.
1941         If it becomes an issue in practice, we can revisit this later.
1942
1943         Test: storage/private-browsing-readonly.html
1944
1945         * storage/Database.cpp:
1946         (WebCore::Database::setAuthorizerReadOnly):
1947         * storage/Database.h:
1948
1949         * storage/DatabaseAuthorizer.cpp:  For all action types that would alter the database,
1950           deny when in read-only mode.
1951         (WebCore::DatabaseAuthorizer::reset):
1952         (WebCore::DatabaseAuthorizer::createTable):
1953         (WebCore::DatabaseAuthorizer::dropTable):
1954         (WebCore::DatabaseAuthorizer::allowAlterTable):
1955         (WebCore::DatabaseAuthorizer::createIndex):
1956         (WebCore::DatabaseAuthorizer::dropIndex):
1957         (WebCore::DatabaseAuthorizer::createTrigger):
1958         (WebCore::DatabaseAuthorizer::dropTrigger):
1959         (WebCore::DatabaseAuthorizer::createVTable):
1960         (WebCore::DatabaseAuthorizer::dropVTable):
1961         (WebCore::DatabaseAuthorizer::allowDelete):
1962         (WebCore::DatabaseAuthorizer::allowInsert):
1963         (WebCore::DatabaseAuthorizer::allowUpdate):
1964         (WebCore::DatabaseAuthorizer::setReadOnly):
1965         * storage/DatabaseAuthorizer.h:
1966
1967         * storage/SQLStatement.cpp:
1968         (WebCore::SQLStatement::create): Add a m_readOnly flag.
1969         (WebCore::SQLStatement::SQLStatement): Ditto.
1970         (WebCore::SQLStatement::execute): If m_readOnly is set, tell the authorizer to change
1971           to read-only mode.
1972         * storage/SQLStatement.h:
1973
1974         * storage/SQLTransaction.cpp:
1975         (WebCore::SQLTransaction::executeSQL): Flag the statement as read-only if the Page is
1976           currently in private browsing mode.
1977
1978 2009-04-17  Eric Seidel  <eric@webkit.org>
1979
1980         Reviewed by Antti Koivisto.
1981
1982         Move RenderPath and RenderSVGContainer onto a unified clippedOverflowRectForRepaint
1983         https://bugs.webkit.org/show_bug.cgi?id=25268
1984
1985         Lots of minus lines.  Now we're sharing more sane code
1986         (which will respect -webkit-transforms! and scroll offsets correctly)
1987
1988         Which means this fixes:
1989         https://bugs.webkit.org/show_bug.cgi?id=20769 and
1990         https://bugs.webkit.org/show_bug.cgi?id=21968 too!
1991
1992         We're no longer expanding the paint rect "for anti-aliasing", since
1993         I can't find a case where that's required.  If it is, repaintRectInLocalCoordinates()
1994         should be fixed to handle those cases instead of here.
1995
1996         This fixes svg/custom/scroll-hit-test (now that we respect scroll offsets when repainting)
1997         as well as improves our focus ring drawing seen in svg/custom/focus-ring
1998         focus rings are now closer to transformed content by a couple pixels (they were needlessly outset by the antialiasing hack)
1999         Also, it fixes the dumped rects for markers, causing a progression in svg/custom/marker-overflow-clip
2000
2001         * rendering/RenderPath.cpp:
2002         (WebCore::RenderPath::repaintRectInLocalCoordinates):
2003         (WebCore::RenderPath::setPath):
2004         * rendering/RenderPath.h:
2005         * rendering/RenderSVGContainer.cpp:
2006         (WebCore::RenderSVGContainer::repaintRectInLocalCoordinates):
2007         * rendering/RenderSVGContainer.h:
2008         * rendering/RenderSVGModelObject.cpp:
2009         (WebCore::RenderSVGModelObject::clippedOverflowRectForRepaint):
2010         (WebCore::RenderSVGModelObject::computeRectForRepaint):
2011         * rendering/RenderSVGModelObject.h:
2012         * rendering/RenderSVGRoot.cpp:
2013         (WebCore::RenderSVGRoot::computeRectForRepaint):
2014         * rendering/RenderSVGRoot.h:
2015
2016 2009-04-17  Chris Fleizach  <cfleizach@apple.com>
2017
2018         Reviewed by Darin Adler.
2019
2020         Bug 25259: AX: VoiceOver cmd-cntl-space does not follow the google.com->more link
2021         https://bugs.webkit.org/show_bug.cgi?id=25259
2022   
2023         When a node becomes visible or hidden, accessibility needs to be told to update.
2024
2025         Test: accessibility/visible-elements.html
2026
2027         * rendering/RenderObject.cpp:
2028         (WebCore::RenderObject::styleWillChange):
2029
2030 2009-04-17  Kevin Ollivier  <kevino@theolliviers.com>
2031
2032         wx build fix, added missing header.
2033
2034         * platform/graphics/wx/TransformationMatrixWx.cpp:
2035
2036 2009-04-17  Simon Hausmann  <simon.hausmann@nokia.com>
2037
2038         Unreviewed build fix.
2039
2040         Fix the build with enabled SVG filters
2041
2042         * rendering/RenderSVGModelObject.cpp: Include SVGResourceFilter.h.
2043
2044 2009-04-16  Eric Roman  <eroman@chromium.org>
2045
2046         Reviewed by Dimitri Glazkov.
2047
2048         https://bugs.webkit.org/show_bug.cgi?id=25196
2049         Add a missing V8DOMMap include.
2050
2051         * bindings/v8/WorkerScriptController.cpp: Included V8DOMMap.h.
2052
2053 2009-04-16  Dimitri Glazkov  <dglazkov@chromium.org>
2054
2055         Reviewed by Darin Fisher.
2056
2057         https://bugs.webkit.org/show_bug.cgi?id=25260
2058         Finish V8 custom bindings for InspectorController.
2059
2060         * bindings/v8/custom/V8InspectorControllerCustom.cpp:
2061         (WebCore::CALLBACK_FUNC_DECL): Added.
2062
2063 2009-04-16  Kevin Watters  <kevinwatters@gmail.com>
2064
2065         Reviewed by Kevin Ollivier.
2066
2067         Switch to wxGraphicsBitmap when using wxGraphicsContext so that we're not doing
2068         unnecessary conversions internally when drawing bitmaps.
2069         
2070         https://bugs.webkit.org/show_bug.cgi?id=25248
2071
2072         * platform/graphics/ImageSource.h:
2073         * platform/graphics/wx/ImageSourceWx.cpp:
2074         (WebCore::ImageSource::createFrameAtIndex):
2075         * platform/graphics/wx/ImageWx.cpp:
2076         (WebCore::BitmapImage::draw):
2077         (WebCore::BitmapImage::drawPattern):
2078
2079 2009-04-16  Justin Garcia  <justin.garcia@apple.com>
2080
2081         Reviewed by Dan Bernstein.
2082
2083         Performing a block style change in an editable root that contains only a br adds a newline
2084         https://bugs.webkit.org/show_bug.cgi?id=25256
2085
2086         * editing/CompositeEditCommand.cpp:
2087         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): Fix a bad check for an root
2088         block that didn't handle a root that contained a placeholder.
2089
2090 2009-04-16  Eric Seidel  <eric@webkit.org>
2091
2092         Reviewed by Simon Fraser.
2093
2094         Fix computeContainerBoundingBox to respect viewport translations
2095         https://bugs.webkit.org/show_bug.cgi?id=25254
2096
2097         Previously computeContainerBoundingBox was just adding the viewportTranslation.
2098         Which, although it has a confusing name, only contains the scale and translation
2099         for the viewBox/preserveAspectRatio adjustment.  It does not contain the
2100         translation for the x/y offset of the viewport.
2101         localToParentTransform() does contain this offset, so we use that instead
2102         of the previous hacky code.
2103
2104         * rendering/RenderSVGContainer.h:
2105         * rendering/RenderSVGViewportContainer.h:
2106         * rendering/SVGRenderSupport.cpp:
2107         (WebCore::computeContainerBoundingBox):
2108
2109 2009-04-16  Eric Seidel  <eric@webkit.org>
2110
2111         Reviewed by Simon Fraser.
2112
2113         Add a localToParentTransform() method which includes the
2114         full transform between local and parent local coordinates.
2115         https://bugs.webkit.org/show_bug.cgi?id=25226
2116
2117         Moved m_localTransform up into RenderSVGTransformableContainer
2118         and added a comment to RenderSVGViewportContainer to make it more
2119         clear that it does not have a localTransform().
2120
2121         This patch reveals two more failed design decisions:
2122         1.  Use of RenderBox::absoluteTransform() to mean "absoluteTransform()
2123             including only my localTransform()" callers are probably using it
2124             incorrectly anyway and are just masking bugs in the confused code.
2125         2.  computeContainerBoundingBox does not include viewport translations in
2126             its computed bounding box, so bounding boxes will be off for parents of
2127             inner <svg> elements.  I'll fix this an updated the results in a separate change.
2128
2129         No functional changes, thus no tests.
2130
2131         * rendering/RenderObject.cpp:
2132         (WebCore::RenderObject::localToParentTransform):
2133         (WebCore::RenderObject::absoluteTransform):
2134         * rendering/RenderObject.h:
2135         * rendering/RenderSVGContainer.cpp:
2136         (WebCore::RenderSVGContainer::layout):
2137         * rendering/RenderSVGContainer.h:
2138         (WebCore::RenderSVGContainer::viewportTransform):
2139         * rendering/RenderSVGHiddenContainer.cpp:
2140         * rendering/RenderSVGHiddenContainer.h:
2141         (WebCore::RenderSVGHiddenContainer::absoluteTransform):
2142         * rendering/RenderSVGRoot.cpp:
2143         (WebCore::RenderSVGRoot::localToParentTransform):
2144         (WebCore::RenderSVGRoot::absoluteTransform):
2145         * rendering/RenderSVGRoot.h:
2146         * rendering/RenderSVGTransformableContainer.cpp:
2147         (WebCore::RenderSVGTransformableContainer::localToParentTransform):
2148         (WebCore::RenderSVGTransformableContainer::localTransform):
2149         * rendering/RenderSVGTransformableContainer.h:
2150         * rendering/RenderSVGViewportContainer.cpp:
2151         (WebCore::RenderSVGViewportContainer::localToParentTransform):
2152         (WebCore::RenderSVGViewportContainer::absoluteTransform):
2153         * rendering/RenderSVGViewportContainer.h:
2154         * rendering/SVGRenderSupport.cpp:
2155         (WebCore::computeContainerBoundingBox):
2156
2157 2009-04-16  Adam Langley  <agl@google.com>
2158
2159         Reviewed by Darin Fisher.
2160
2161         Fix Chromium's rendering of <option> elements inside of <optgroups>.
2162
2163         https://bugs.webkit.org/show_bug.cgi?id=25244
2164
2165         Test (will included as a manual test by https://bugs.webkit.org/show_bug.cgi?id=24900):
2166
2167         <select>
2168           <optgroup label="Should be bold">
2169             <option>Should not be bold</option>
2170           </optgroup>
2171         </select>
2172
2173         * css/themeWin.css: adding comments
2174         * platform/chromium/PopupMenuChromium.cpp:
2175         (WebCore::PopupListBox::getRowFont): use menuStyle() rather than the item's style
2176
2177 2009-04-16  Eric Roman  <eroman@chromium.org>
2178
2179         Reviewed by Alexey Proskuryakov.
2180
2181         https://bugs.webkit.org/show_bug.cgi?id=25218
2182
2183         Make DOMWindow::inlineEventListenerForType not have the "inline"
2184         keyword. As this method gets used outside of DOMWindow.
2185
2186         * page/DOMWindow.cpp:
2187         (WebCore::DOMWindow::inlineEventListenerForType):
2188
2189 2009-04-16  Greg Bolsinga  <bolsinga@apple.com>
2190
2191         Reviewed by Antti Koivisto.
2192
2193         Fix <rdar://problem/6766969>
2194         
2195         When deferred repaints are enabled and being reset and there is a active
2196         timer, stop the timer and do the deferred repaints immediately.
2197
2198         * page/FrameView.cpp:
2199         (WebCore::FrameView::resetDeferredRepaintDelay):
2200
2201 2009-04-16  Xan Lopez  <xlopez@igalia.com>
2202
2203         Reviewed by Sam Weinig.
2204
2205         https://bugs.webkit.org/show_bug.cgi?id=25241
2206         Remove superfluous NotImplemented.h includes.
2207
2208         * html/CanvasRenderingContext2D.cpp:
2209         * html/CanvasStyle.cpp:
2210         * page/AccessibilityRenderObject.cpp:
2211         * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
2212         * platform/graphics/GraphicsContext.cpp:
2213         * platform/graphics/cairo/ImageBufferCairo.cpp:
2214         * platform/graphics/cairo/PathCairo.cpp:
2215         * platform/graphics/chromium/SimpleFontDataLinux.cpp:
2216         * platform/graphics/gtk/FontGtk.cpp:
2217         * platform/graphics/gtk/IconGtk.cpp:
2218         * platform/graphics/qt/IconQt.cpp:
2219         * platform/graphics/qt/ImageQt.cpp:
2220         * platform/graphics/qt/ImageSourceQt.cpp:
2221         * platform/graphics/skia/ImageBufferSkia.cpp:
2222         * platform/graphics/skia/ImageSkia.cpp:
2223         * platform/graphics/win/ColorSafari.cpp:
2224         * platform/graphics/win/FontWin.cpp:
2225         * platform/graphics/win/GraphicsContextCGWin.cpp:
2226         * platform/graphics/win/GraphicsContextCairoWin.cpp:
2227         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
2228         * platform/graphics/wx/ImageWx.cpp:
2229         * platform/graphics/wx/TransformationMatrixWx.cpp:
2230         * platform/gtk/PlatformScreenGtk.cpp:
2231         * platform/gtk/PopupMenuGtk.cpp:
2232         * platform/gtk/ScrollViewGtk.cpp:
2233         * platform/gtk/ScrollbarGtk.cpp:
2234         * platform/network/cf/ResourceHandleCFNet.cpp:
2235         * platform/posix/FileSystemPOSIX.cpp:
2236         * platform/qt/DragDataQt.cpp:
2237         * platform/qt/FileSystemQt.cpp:
2238         * platform/qt/Localizations.cpp:
2239         * platform/qt/PopupMenuQt.cpp:
2240         * platform/win/EditorWin.cpp:
2241         * platform/win/PasteboardWin.cpp:
2242         * platform/wx/KeyboardEventWx.cpp:
2243         * platform/wx/PopupMenuWx.cpp:
2244         * platform/wx/SharedTimerWx.cpp:
2245         * plugins/gtk/PluginViewGtk.cpp:
2246         * plugins/mac/PluginPackageMac.cpp:
2247         * plugins/qt/PluginPackageQt.cpp:
2248         * plugins/win/PluginViewWin.cpp:
2249         * rendering/RenderThemeChromiumLinux.cpp:
2250         * svg/graphics/SVGImage.cpp:
2251
2252 2009-04-16  Geoffrey Garen  <ggaren@apple.com>
2253
2254         Reviewed by Sam Weinig.
2255
2256         More fix for https://bugs.webkit.org/show_bug.cgi?id=21260
2257         Unbounded memory growth when churning elements with anonymous event handler functions
2258         
2259         Some cleanup in event handling code.
2260
2261         * bindings/js/JSDOMGlobalObject.cpp:
2262         * bindings/js/JSDOMGlobalObject.h: Removed findJSProtectedEventListener
2263         and findJSProtectedEventListener because they are now unused.
2264
2265         * bindings/js/JSEventListener.cpp:
2266         * bindings/js/JSEventListener.h:
2267         (WebCore::JSEventListener::clearGlobalObject):
2268         * bindings/js/JSLazyEventListener.cpp:
2269         (WebCore::JSLazyEventListener::JSLazyEventListener):
2270         (WebCore::JSLazyEventListener::~JSLazyEventListener):
2271         (WebCore::JSLazyEventListener::globalObject):
2272         * bindings/js/JSLazyEventListener.h:
2273         (WebCore::JSLazyEventListener::clearGlobalObject): Nixed JSProtectedEventListener,
2274         and merged it with JSLazyEventListener, the only remaining event listener
2275         that still GC-protects its function and global object.
2276
2277         * bindings/js/ScriptController.cpp:
2278         (WebCore::ScriptController::ScriptController):
2279         * bindings/js/ScriptController.h:
2280         (WebCore::ScriptController::setEventHandlerLineNumber):
2281         (WebCore::ScriptController::eventHandlerLineNumber): Renamed handlerLineno =>
2282         handlerLineNumber, because anything less would be uncivilized. Removed
2283         createInlineEventListener because it mostly did irrelevent work, so it
2284         just got in the way of understanding how event handler creation works.
2285
2286         * dom/Document.cpp:
2287         (WebCore::Document::createEventListener):
2288         * dom/XMLTokenizerLibxml2.cpp:
2289         (WebCore::XMLTokenizer::startElementNs):
2290         * html/HTMLTokenizer.cpp:
2291         (WebCore::HTMLTokenizer::processToken): Ditto.
2292
2293 2009-04-16  Beth Dakin  <bdakin@apple.com>
2294
2295         Reviewed by Dave Hyatt.
2296
2297         Fix for https://bugs.webkit.org/show_bug.cgi?id=20765 Website 
2298         crashes on load due to messy HTML in search form
2299         -and corresponding-
2300         <rdar://problem/6210633>
2301
2302         Before this patch, <form>s were allowed to sit inside tables 
2303         without being wrapped by anonymous table parts. There was also a 
2304         concept that such a form could be "demoted" and would not be 
2305         allowed to have any children. This patch has the HTML parser mark 
2306         form elements that have been demoted as such, and then the demoted 
2307         forms are not given renderers. I also removed the code that allowed 
2308         forms to sit in tables without anonymous table sections. So now any 
2309         forms that do manage to get a renderer inside a table will also be 
2310         wrapped with appropriate table parts.
2311
2312         * html/HTMLFormElement.cpp:
2313         (WebCore::HTMLFormElement::HTMLFormElement):
2314         (WebCore::HTMLFormElement::rendererIsNeeded):
2315         * html/HTMLFormElement.h:
2316         (WebCore::HTMLFormElement::setDemoted):
2317         (WebCore::HTMLFormElement::isDemoted):
2318         * html/HTMLParser.cpp:
2319         (WebCore::HTMLParser::insertNode):
2320         * rendering/RenderTable.cpp:
2321         (WebCore::RenderTable::addChild):
2322         * rendering/RenderTableRow.cpp:
2323         (WebCore::RenderTableRow::addChild):
2324         * rendering/RenderTableSection.cpp:
2325         (WebCore::RenderTableSection::addChild):
2326
2327 2009-04-16  Xiaomei Ji  <xji@chromium.org>
2328
2329         Reviewed by Simon Fraser.
2330
2331         Fix https://bugs.webkit.org/show_bug.cgi?id=24527
2332         caret does not paint the first time you focus on a 0px right padding RTL div
2333
2334         Test: fast/forms/caret-rtl.html
2335
2336         * rendering/RenderBlock.cpp:
2337         (WebCore::RenderBlock::localCaretRect): When calculating x-axis if 
2338         alignment is alignRight, we need to subtract the caretWidth so that the
2339         caret at IntRect(x, y, caretWidth, height) is inside the block.
2340
2341 2009-04-16  Justin Garcia  <justin.garcia@apple.com>
2342
2343         Reviewed by Simon Fraser.
2344
2345         https://bugs.webkit.org/show_bug.cgi?id=25228
2346         SelectionController::absoluteCaretBounds returns an inflated caret (the caret repaint rect)
2347         
2348         Return the bounds of the transformed caret, not the transformed repaint rect for the caret (which is inflated).
2349
2350         * editing/SelectionController.cpp:
2351         (WebCore::SelectionController::localCaretRect):
2352         (WebCore::SelectionController::absoluteBoundsForLocalRect):
2353         (WebCore::SelectionController::caretRepaintRect):
2354         (WebCore::SelectionController::recomputeCaretRect):
2355         * editing/SelectionController.h:
2356
2357 2009-04-16  Pierre d'Herbemont  <pdherbemont@apple.com>
2358
2359         Reviewed by Simon Fraser.
2360
2361         https://bugs.webkit.org/show_bug.cgi?id=25187
2362         Bug 25187: <video> may not be rendered upon certain racy conditions
2363
2364         Always create the video renderer when the load state reaches QTMovieLoadStateLoaded and
2365         the element is visible, not just when the movie has just been opened.
2366
2367         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2368         (WebCore::MediaPlayerPrivate::updateStates): Make sure we do not make false
2369         assumption on the state changes order. Create the renderer if none is present,
2370         when movie is loaded instead.
2371
2372 2009-04-16  Eric Seidel  <eric@webkit.org>
2373
2374         Reviewed by Geoffrey Garen.
2375
2376         Add filterBoundingBox() to RenderSVGModelObject to share a tiny bit of code
2377
2378         RenderSVGModelObject has much more interesting code it can share,
2379         but I'm just trying to get the commits out of my local branch and into
2380         the repository in any order I can. :)  This one was small.
2381
2382         This will be used by the unified RenderSVGModelObject
2383         clippedOverflowRectForRepaint patch coming soon.
2384
2385         * rendering/RenderPath.cpp:
2386         (WebCore::RenderPath::clippedOverflowRectForRepaint):
2387         * rendering/RenderSVGContainer.cpp:
2388         (WebCore::RenderSVGContainer::clippedOverflowRectForRepaint):
2389         * rendering/RenderSVGModelObject.cpp:
2390         (WebCore::RenderSVGModelObject::filterBoundingBox):
2391         * rendering/RenderSVGModelObject.h:
2392
2393 2009-04-16  Geoffrey Garen  <ggaren@apple.com>
2394
2395         Reviewed by Eric Seidel and Adam Roben.
2396
2397         More fix for https://bugs.webkit.org/show_bug.cgi?id=21260
2398         Unbounded memory growth when churning elements with anonymous event handler functions
2399         
2400         Simplified some EventHandler creation code.
2401         
2402         Removed a pile of code whose sole purpose was to allow SVG event handlers
2403         to supply a parameter named "evt" instead of the normal "event", and
2404         replaced it with a single parameter to JSLazyEventListener's constructor
2405         specifying the parameter name to use.
2406
2407         * bindings/js/JSDOMWindowBase.h:
2408         * bindings/js/JSLazyEventListener.cpp:
2409         (WebCore::JSLazyEventListener::JSLazyEventListener):
2410         (WebCore::JSLazyEventListener::parseCode):
2411         * bindings/js/JSLazyEventListener.h:
2412         (WebCore::JSLazyEventListener::create):
2413         * bindings/js/ScriptController.cpp:
2414         (WebCore::ScriptController::createInlineEventListener):
2415         * bindings/js/ScriptController.h:
2416         * dom/Document.cpp:
2417         (WebCore::Document::createEventListener):
2418
2419 2009-04-15  Eric Seidel  <eric@webkit.org>
2420
2421         Reviewed by David Hyatt.
2422
2423         Split out objectBoundingBox and repaintRectInLocalCoordinates from relativeBBox
2424         in preparation for simplifying (and fixing) repaint logic in the SVG rendering tree.
2425         https://bugs.webkit.org/show_bug.cgi?id=25224
2426
2427         objectBoundingBox() matches the SVG 1.1 concept of a "bounding box"
2428
2429         repaintRectInLocalCoordinates() should return the a rect covering all painted content.
2430         However, repaintRectInLocalCoordinates() still only returns the "stroke bounding box"
2431         in this patch.  In a future patch, repaintRectInLocalCoordinates will be fixed to return
2432         a rect covering all painted content.  In order to avoid changing several hundred layout test results, I've left
2433         the behavior as-is for now.  The returned rect is used by various repaintRectInLocalCoordinates
2434         implementations and sometimes adjusted to include all painted content, but not always, and
2435         the places where the adjustments are made are sometimes wrong.  Again, will be fixed in
2436         an upcoming patch.
2437
2438         This patch discovered a bug in Font::drawTextUsingSVGFont, which is probably causing
2439         bounding-box relative gradients on SVGFont glyphs to not paint correctly.
2440         I chose not to try and fix the bug in this patch and instead left a FIXME.
2441
2442         This patch also discovered that at least tspan.getBBox() is broken.  This
2443         along with the foreignObject.getBBox() change will be tested (and fixed) in a
2444         later patch.  https://bugs.webkit.org/show_bug.cgi?id=25225
2445
2446         No change in behavior (besides the above mentioned foreignObject.getBBox()), thus no tests.
2447
2448         * rendering/RenderForeignObject.cpp:
2449         (WebCore::RenderForeignObject::objectBoundingBox): this is a behavior improvement for getBBox() test case coming in a later patch
2450         (WebCore::RenderForeignObject::repaintRectInLocalCoordinates): only really used for layout test results, might some day be used for repaint.
2451         * rendering/RenderForeignObject.h:
2452         * rendering/RenderObject.cpp:
2453         (WebCore::RenderObject::objectBoundingBox): new methods, ASSERT if used but not implemented.
2454         (WebCore::RenderObject::repaintRectInLocalCoordinates):
2455         * rendering/RenderObject.h:
2456         * rendering/RenderPath.cpp:
2457         (WebCore::RenderPath::objectBoundingBox):
2458         (WebCore::RenderPath::repaintRectInLocalCoordinates):
2459         (WebCore::RenderPath::clippedOverflowRectForRepaint):
2460         (WebCore::RenderPath::lineHeight):
2461         (WebCore::RenderPath::baselinePosition):
2462         (WebCore::RenderPath::paint):
2463         (WebCore::RenderPath::addFocusRingRects):
2464         * rendering/RenderPath.h:
2465         * rendering/RenderSVGContainer.cpp:
2466         (WebCore::RenderSVGContainer::paint):
2467         (WebCore::RenderSVGContainer::objectBoundingBox):
2468         (WebCore::RenderSVGContainer::repaintRectInLocalCoordinates):
2469         * rendering/RenderSVGContainer.h:
2470         * rendering/RenderSVGGradientStop.h:
2471         (WebCore::RenderSVGGradientStop::objectBoundingBox):
2472         (WebCore::RenderSVGGradientStop::repaintRectInLocalCoordinates):
2473         * rendering/RenderSVGHiddenContainer.cpp:
2474         (WebCore::RenderSVGHiddenContainer::objectBoundingBox):
2475         (WebCore::RenderSVGHiddenContainer::repaintRectInLocalCoordinates):
2476         * rendering/RenderSVGHiddenContainer.h:
2477         * rendering/RenderSVGImage.cpp:
2478         (WebCore::RenderSVGImage::objectBoundingBox):
2479         (WebCore::RenderSVGImage::repaintRectInLocalCoordinates):
2480         (WebCore::RenderSVGImage::calculateAbsoluteBounds):
2481         (WebCore::RenderSVGImage::addFocusRingRects):
2482         * rendering/RenderSVGImage.h:
2483         * rendering/RenderSVGRoot.cpp:
2484         (WebCore::RenderSVGRoot::paint):
2485         (WebCore::RenderSVGRoot::objectBoundingBox):
2486         (WebCore::RenderSVGRoot::repaintRectInLocalCoordinates):
2487         * rendering/RenderSVGRoot.h:
2488         * rendering/RenderSVGTSpan.h:
2489         (WebCore::RenderSVGTSpan::objectBoundingBox):
2490         (WebCore::RenderSVGTSpan::repaintRectInLocalCoordinates):
2491         * rendering/RenderSVGText.cpp:
2492         (WebCore::RenderSVGText::clippedOverflowRectForRepaint):
2493         (WebCore::RenderSVGText::absoluteRects):
2494         (WebCore::RenderSVGText::absoluteQuads):
2495         (WebCore::RenderSVGText::objectBoundingBox):
2496         (WebCore::RenderSVGText::repaintRectInLocalCoordinates):
2497         * rendering/RenderSVGText.h:
2498         * rendering/RenderSVGViewportContainer.cpp:
2499         (WebCore::RenderSVGViewportContainer::viewportTransform):
2500         * rendering/SVGRenderSupport.cpp:
2501         (WebCore::computeContainerBoundingBox):
2502         * rendering/SVGRenderSupport.h:
2503         * rendering/SVGRenderTreeAsText.cpp:
2504         (WebCore::operator<<):
2505         * svg/SVGFont.cpp:
2506         (WebCore::Font::drawTextUsingSVGFont):
2507         * svg/SVGLocatable.cpp:
2508         (WebCore::SVGLocatable::getBBox):
2509         * svg/SVGPatternElement.cpp:
2510         (WebCore::SVGPatternElement::buildPattern):
2511         * svg/graphics/SVGPaintServerGradient.cpp:
2512         (WebCore::createMaskAndSwapContextForTextGradient):
2513         (WebCore::clipToTextMask):
2514         (WebCore::SVGPaintServerGradient::setup):
2515         * svg/graphics/SVGPaintServerPattern.cpp:
2516         (WebCore::SVGPaintServerPattern::setup):
2517
2518 2009-04-16  Dan Bernstein  <mitz@apple.com>
2519
2520         Reviewed by Darin Adler.
2521
2522         - fix <rdar://problem/6032139> Table cell widths calculated
2523           incorrectly on table that uses table-layout:fixed, colspans, and a mix
2524           of percentage and pixel widths
2525
2526         Test: fast/table/fixed-granular-cols.html
2527
2528         The incorrect widths resulted from incorrect handling of the case where
2529         the <col> elements are more granular than the table cells.
2530
2531         * rendering/FixedTableLayout.cpp:
2532         (WebCore::FixedTableLayout::calcWidthArray): When processing <col>
2533         elements, append effective columns or split existing effective columns
2534         as needed.
2535
2536 2009-04-16  Alexey Proskuryakov  <ap@webkit.org>
2537
2538         <rdar://problem/6795285> Infinite recursion in ResourceHandle::receivedRequestToContinueWithoutCredential
2539
2540         Rolled out <http://trac.webkit.org/projects/webkit/changeset/42536> - the two instances of
2541         authentication challenge are different, after all. Added a FIXME comment about a possible
2542         future improvement.
2543
2544         * platform/network/ResourceHandle.cpp:
2545         (WebCore::ResourceHandle::clearAuthentication):
2546         * platform/network/ResourceHandleInternal.h:
2547         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2548         * platform/network/cf/ResourceHandleCFNet.cpp:
2549         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
2550         (WebCore::ResourceHandle::receivedCredential):
2551         (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
2552         (WebCore::ResourceHandle::receivedCancellation):
2553         * platform/network/mac/ResourceHandleMac.mm:
2554         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
2555         (WebCore::ResourceHandle::didCancelAuthenticationChallenge):
2556         (WebCore::ResourceHandle::receivedCredential):
2557         (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
2558         (WebCore::ResourceHandle::receivedCancellation):
2559
2560 2009-04-15  Geoffrey Garen  <ggaren@apple.com>
2561
2562         Reviewed by Sam Weinig.
2563         
2564         More fix for https://bugs.webkit.org/show_bug.cgi?id=21260
2565         Unbounded memory growth when churning elements with anonymous event handler functions
2566
2567         Also fixed <rdar://problem/6792909> WebInspector crashes when reloading
2568         a page with breakpoints set
2569         
2570         * bindings/js/JSEventListener.cpp:
2571         (WebCore::JSEventListener::clearJSFunctionInline):
2572         (WebCore::JSEventListener::markJSFunction):
2573         * bindings/js/JSEventListener.h: Actually clear our function and global
2574         object pointers when our client instructs us to. (Oops!) Also, mark
2575         our global object while we still intend to use it.
2576
2577         * bindings/js/JSSVGElementInstanceCustom.cpp:
2578         (WebCore::JSSVGElementInstance::mark):
2579         (WebCore::toJS):
2580         * bindings/scripts/CodeGeneratorJS.pm:
2581         * svg/SVGElementInstance.idl: For every SVGElementInstance wrapper, ensure
2582         that the corresponding element also has a wrapper, to keep its event
2583         listeners alive.
2584
2585 2009-04-15  Dimitri Glazkov  <dglazkov@chromium.org>
2586
2587         Reviewed by Darin Fisher.
2588
2589         https://bugs.webkit.org/show_bug.cgi?id=25201
2590         Add ScriptFunctionCall/ScriptObject for V8.
2591
2592         * bindings/v8/ScriptFunctionCall.cpp: Added.
2593         * bindings/v8/ScriptFunctionCall.h: Added.
2594         * bindings/v8/ScriptObject.cpp: Added.
2595         * bindings/v8/ScriptObject.h: Added.
2596         * bindings/v8/ScriptObjectQuarantine.cpp: Added.
2597         * bindings/v8/ScriptObjectQuarantine.h: Added.
2598         * bindings/v8/ScriptScope.cpp: Added.
2599         * bindings/v8/ScriptScope.h: Added.
2600         * bindings/v8/ScriptState.h:
2601         (WebCore::ScriptState::ScriptState): Added new constructors.
2602         (WebCore::ScriptState::frame): Added Frame ptr accessor.
2603         * bindings/v8/ScriptString.h:
2604         (WebCore::ScriptString::ScriptString): Added default constructor.
2605         * bindings/v8/ScriptValue.h:
2606         (WebCore::ScriptValue::isEqual): Added.
2607
2608 2009-04-15  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
2609
2610         Unreviewed build fix. Add RenderSVGModelObject.* to GTK+'s build.
2611
2612         * GNUmakefile.am:
2613
2614 2009-04-15  Steve Falkenburg  <sfalken@apple.com>
2615
2616         <rdar://problem/6785760> WebCore should use a maximum of 6 connections per host, not 4
2617
2618         Reviewed by Adam Roben.
2619
2620         * platform/network/ResourceRequestBase.cpp:
2621         * platform/network/cf/ResourceRequestCFNet.cpp:
2622         (WebCore::initializeMaximumHTTPConnectionCountPerHost):
2623
2624 2009-04-15  Sam Weinig  <sam@webkit.org>
2625
2626         Reviewed by Mark Rowe.
2627
2628         Add special casing to bindings generator so that custom functions
2629         starting with xml or xslt conform to WebKit style guidelines.
2630
2631         * bindings/js/JSDOMWindowCustom.cpp:
2632         (WebCore::JSDOMWindow::xmlHttpRequest):
2633         (WebCore::JSDOMWindow::xsltProcessor):
2634         * bindings/scripts/CodeGenerator.pm:
2635
2636 2009-04-15  Eric Seidel  <eric@webkit.org>
2637
2638         Reviewed by Simon Fraser.
2639
2640         Add minimal RenderSVGModelObject and make RenderPath and RenderSVGContainer use it.
2641         https://bugs.webkit.org/show_bug.cgi?id=25221
2642         
2643         RenderSVGModelObject is the base rendering class for things which live
2644         in the SVG rendering tree.  Not all SVG renders are RenderSVGModelObjects yet.
2645         
2646         More patches coming.  This is just adding the class, future patches
2647         will pull more logic out of RenderPath and RenderSVGContainer into RenderSVGModelObject.
2648
2649         * WebCore.pro:
2650         * WebCore.scons:
2651         * WebCore.vcproj/WebCore.vcproj:
2652         * WebCore.xcodeproj/project.pbxproj:
2653         * rendering/RenderPath.cpp:
2654         (WebCore::RenderPath::RenderPath):
2655         * rendering/RenderPath.h:
2656         * rendering/RenderSVGContainer.cpp:
2657         (WebCore::RenderSVGContainer::RenderSVGContainer):
2658         * rendering/RenderSVGContainer.h:
2659         * rendering/RenderSVGModelObject.cpp: Added.
2660         (WebCore::RenderSVGModelObject::RenderSVGModelObject):
2661         * rendering/RenderSVGModelObject.h: Added.
2662         (WebCore::RenderSVGModelObject::requiresLayer):
2663         * rendering/RenderTreeAsText.cpp:
2664         * rendering/SVGRenderTreeAsText.cpp:
2665
2666 2009-04-15  Eric Seidel  <eric@webkit.org>
2667
2668         Reviewed by Simon Fraser.
2669
2670         Remove more dead code from RenderSVGHiddenContainer.
2671
2672         lineHeight and baselinePosition used to be on RenderSVGContainer
2673         (of which this is a subclass) because RenderSVGContainer used
2674         to be a RenderBox and always the renderer for <svg>
2675         Now <svg> uses RenderSVGRoot when needing a RenderBox (inside HTML)
2676         and RenderSVGViewportContainer (when inside SVG content)
2677         so there is no need for RenderSVGHiddenContainer to have these HTML-specific methods.
2678
2679         * rendering/RenderSVGHiddenContainer.cpp:
2680         * rendering/RenderSVGHiddenContainer.h:
2681
2682 2009-04-15  Eric Seidel  <eric@webkit.org>
2683
2684         Reviewed by Simon Fraser.
2685
2686         Remove unneeded (broken) code from SVG renderers
2687         https://bugs.webkit.org/show_bug.cgi?id=25214
2688
2689         Mostly due to my historical confusions about the render tree
2690         and some methods not being removed after classes were split.
2691
2692         RenderSVGRoot is an RenderBox and should just use all the
2693         standard RenderBox methods for inspector and repaint rects.
2694
2695         RenderSVGContainer is *not* a RenderBox (any more) and thus
2696         doesn't need lineHeight or width/height or calcBounds.
2697
2698         RenderSVGViewportContainer had some broken code which tried
2699         to see if the click was inside the container at all, but it
2700         was using width/height metrics based off of the containing
2701         block (from calcWidth) which is wrong (since its real
2702         width/height are from its containing viewport not containing block).
2703
2704         * rendering/RenderSVGContainer.cpp:
2705         (WebCore::RenderSVGContainer::RenderSVGContainer):
2706         (WebCore::RenderSVGContainer::layout):
2707         * rendering/RenderSVGContainer.h:
2708         * rendering/RenderSVGRoot.cpp:
2709         * rendering/RenderSVGRoot.h:
2710         * rendering/RenderSVGViewportContainer.cpp:
2711         (WebCore::RenderSVGViewportContainer::layout):
2712         (WebCore::RenderSVGViewportContainer::nodeAtPoint):
2713
2714 2009-04-15  Eric Seidel  <eric@webkit.org>
2715
2716         Reviewed by Simon Fraser and Sam Weinig.
2717
2718         https://bugs.webkit.org/show_bug.cgi?id=25217
2719         Simplify nearestViewportElement and farthestViewportElement using isViewportElement and a for loop
2720         Add ASSERT(element) to all these functions since they should never be passed a null element.
2721
2722         * svg/SVGLocatable.cpp:
2723         (WebCore::isViewportElement):
2724         (WebCore::SVGLocatable::nearestViewportElement):
2725         (WebCore::SVGLocatable::farthestViewportElement):
2726         (WebCore::SVGLocatable::getBBox):
2727         (WebCore::SVGLocatable::getCTM):
2728         (WebCore::SVGLocatable::getScreenCTM):
2729
2730 2009-04-15  Sam Weinig  <sam@webkit.org>
2731
2732         Reviewed by Anders Carlsson.
2733
2734         Remove support for the ObjCIvar extended attribute from the Objective-C
2735         bindings generator.  It is not used anymore.
2736
2737         * bindings/scripts/CodeGeneratorObjC.pm:
2738
2739 2009-04-15  Justin Garcia  <justin.garcia@apple.com>
2740
2741         Reviewed by Dan Bernstein.
2742
2743         https://bugs.webkit.org/show_bug.cgi?id=25204
2744         Create a fast path for ReplaceSelectionCommand that merges text nodes
2745         
2746         During simple pastes, where we're just pasting a text node into a run of text, we would split the current
2747         text and insert the new node in between.  This is slow and we hit this bug:
2748
2749         https://bugs.webkit.org/show_bug.cgi?id=6148
2750
2751         in the layout and rendering code where adjacent text nodes don't shape correctly in Arabic.
2752         
2753         This change creates a fast path for ReplaceSelectionCommand that inserts text directly into the
2754         text node that holds the selection (very similar to the fast path we wrote for InsertTextCommand).
2755
2756         * editing/ReplaceSelectionCommand.cpp:
2757         (WebCore::ReplaceSelectionCommand::doApply):
2758         (WebCore::ReplaceSelectionCommand::performTrivialReplace):
2759         * editing/ReplaceSelectionCommand.h:
2760         * editing/TextIterator.cpp:
2761
2762 2009-04-15  Adam Langley  <agl@google.com>
2763
2764         Reviewed by Darin Fisher.
2765
2766         Move VDMX parsing into the Chromium Linux port.
2767
2768         https://bugs.webkit.org/show_bug.cgi?id=25116
2769
2770         VDMX tables are optional tables in TrueType fonts which contain the
2771         exact pixel height of a given font at a given pel size. In order to
2772         match Windows font metrics we have to use these numbers.
2773
2774         Previously, the parsing was performed in Skia. As part of the merge
2775         with upstream Skia, an interface for getting table data from a font
2776         has been added to Skia and we're moving the parsing into WebKit.
2777
2778         This does not change any layout tests.
2779
2780         * platform/graphics/chromium/FontPlatformDataLinux.cpp:
2781         (WebCore::FontPlatformData::uniqueID):
2782         * platform/graphics/chromium/FontPlatformDataLinux.h:
2783         * platform/graphics/chromium/FontTrueTypeLinux.cpp: Added.
2784         * platform/graphics/chromium/FontTrueTypeLinux.h: Added.
2785         * platform/graphics/chromium/SimpleFontDataLinux.cpp:
2786         (WebCore::SimpleFontData::platformInit):
2787         (WebCore::SimpleFontData::platformWidthForGlyph):
2788
2789 2009-04-15  Stephen White  <senorblanco@chromium.org>
2790
2791         Reviewed by Dimitri Glazkov.
2792
2793         https://bugs.webkit.org/show_bug.cgi?id=25180
2794
2795         Restore stroked outlines to PlatformContextSkia::drawRect().
2796         These were removed inadvertently in r41805, aka
2797         https://bugs.webkit.org/show_bug.cgi?id=24662.
2798         SkRect is { left, top, right, bottom }, not { left, top, width, height }.
2799
2800         * platform/graphics/skia/PlatformContextSkia.cpp:
2801         (PlatformContextSkia::drawRect):
2802
2803 2009-04-15  Dan Bernstein  <mitz@apple.com>
2804
2805         Reviewed by Dave Hyatt.
2806
2807         - fix <rdar://problem/6777374> Generated content with display: run-in
2808           causes a crash
2809
2810         Test: fast/runin/generated.html
2811
2812         * rendering/RenderBlock.cpp:
2813         (WebCore::RenderBlock::handleRunInChild): Check if the run-in block is
2814         generated, and if so, make the RenderInline anonymous instead of passing
2815         a 0 node to the RenderInline constructor. If the run-in itself is
2816         generated, do move :before and :after children from the block into the
2817         inline, as they will not be regenerated. Changed nested ifs into early
2818         returns.
2819
2820 2009-04-15  Eric Roman  <eroman@chromium.org>
2821
2822         Reviewed by Geoffrey Garen.
2823
2824         https://bugs.webkit.org/show_bug.cgi?id=25192
2825
2826         Expose DOMWindow::removeInlineEventListenerForType and
2827         DOMWindow::inlineEventListenerForType as public.
2828
2829         * page/DOMWindow.h:
2830
2831 2009-04-14  Eric Roman  <eroman@chromium.org>
2832
2833         Reviewed by Darin Adler.
2834
2835         https://bugs.webkit.org/show_bug.cgi?id=25198
2836
2837         Wrap RegisteredEventListener's markEventListeners and invalidateEventListeners
2838         in a USE(JSC), since it doesn't compile with V8 bindings.
2839
2840         * dom/RegisteredEventListener.h:
2841
2842 2009-04-15  Eric Roman  <eroman@chromium.org>
2843
2844         Reviewed by Darin Adler.
2845
2846         https://bugs.webkit.org/show_bug.cgi?id=25194
2847
2848         Fix a caller of Settings::javaScriptCanOpenWindowsAutomatically() to
2849         use the new name.
2850
2851         * bindings/v8/custom/V8DOMWindowCustom.cpp:
2852
2853 2009-04-14  Alexey Proskuryakov  <ap@webkit.org>
2854
2855         Rubber-stamped by Darin Adler.
2856
2857         Don't keep platform objects for authentication challenge in ResourceHandleInternal.
2858         We already have a copy in AuthenticationChallenge object.
2859
2860         * platform/network/ResourceHandle.cpp:
2861         (WebCore::ResourceHandle::clearAuthentication):
2862         * platform/network/ResourceHandleInternal.h:
2863         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2864         * platform/network/cf/ResourceHandleCFNet.cpp:
2865         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
2866         (WebCore::ResourceHandle::receivedCredential):
2867         (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
2868         (WebCore::ResourceHandle::receivedCancellation):
2869         * platform/network/mac/ResourceHandleMac.mm:
2870         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
2871         (WebCore::ResourceHandle::didCancelAuthenticationChallenge):
2872         (WebCore::ResourceHandle::receivedCredential):
2873         (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
2874         (WebCore::ResourceHandle::receivedCancellation):
2875
2876 2009-04-14  Geoffrey Garen  <ggaren@apple.com>
2877
2878         Reviewed by Sam Weinig.
2879
2880         Nixed some now-defunct autogeneration code.
2881
2882         * bindings/scripts/CodeGeneratorJS.pm:
2883
2884 2009-04-14  Eric Carlson  <eric.carlson@apple.com>
2885
2886         Reviewed by Alexey Proskuryakov.
2887         
2888         Fix <rdar://problem/6755724> <audio> and <video> elements can reference local 
2889         file:/// URLs from remote in Safari
2890
2891         Tests: http/tests/security/local-video-poster-from-remote.html
2892                http/tests/security/local-video-source-from-remote.html
2893                http/tests/security/local-video-src-from-remote.html
2894
2895         * html/HTMLMediaElement.cpp:
2896         (WebCore::HTMLMediaElement::loadResource): Don't pass url to media engine unless loader->canLoad()
2897         says it is OK.
2898
2899 2009-04-14  Sam Weinig  <sam@webkit.org>
2900
2901         Reviewed by Darin Adler.
2902
2903         Part of <rdar://problem/6150868>
2904         Fix incorrect handling of content that needs to go into the head element
2905         once the head element has been removed.
2906
2907         Test: fast/parser/head-content-after-head-removal.html
2908
2909         * html/HTMLParser.cpp:
2910         (WebCore::HTMLParser::HTMLParser): Remove unneeded initializer of m_head.
2911         (WebCore::HTMLParser::handleError): Update since m_head is now a RefPtr.
2912         (WebCore::HTMLParser::createHead): Ditto.
2913         * html/HTMLParser.h: Make m_head a RefPtr.
2914
2915 2009-04-14  Geoffrey Garen  <ggaren@apple.com>
2916
2917         Used svn merge -r42529:42528 to roll out my last patch because it broke
2918         the build.
2919
2920         * bindings/js/JSDOMGlobalObject.cpp:
2921         (WebCore::JSDOMGlobalObject::~JSDOMGlobalObject):
2922         (WebCore::JSDOMGlobalObject::findJSProtectedEventListener):
2923         (WebCore::JSDOMGlobalObject::findOrCreateJSProtectedEventListener):
2924         (WebCore::JSDOMGlobalObject::jsProtectedEventListeners):
2925         (WebCore::JSDOMGlobalObject::jsProtectedInlineEventListeners):
2926         * bindings/js/JSDOMGlobalObject.h:
2927
2928 2009-04-14  Geoffrey Garen  <ggaren@apple.com>
2929
2930         Reviewed by Sam Weinig.
2931
2932         Nixed some now-dead code related to protected event listeners.
2933
2934         * bindings/js/JSDOMGlobalObject.cpp:
2935         (WebCore::JSDOMGlobalObject::~JSDOMGlobalObject):
2936         * bindings/js/JSDOMGlobalObject.h:
2937
2938 2009-04-14  Geoffrey Garen  <ggaren@apple.com>
2939
2940         Reviewed by Sam Weinig.
2941
2942         More fix for https://bugs.webkit.org/show_bug.cgi?id=21260
2943         Unbounded memory growth when churning elements with anonymous event handler functions
2944
2945         Stop using protected event listeners on SVGElementInstance.
2946
2947         * bindings/js/JSSVGElementInstanceCustom.cpp:
2948         (WebCore::JSSVGElementInstance::mark): Mark our event listeners, since
2949         they're not protected anymore.
2950
2951         (WebCore::JSSVGElementInstance::addEventListener):
2952         (WebCore::JSSVGElementInstance::removeEventListener): Make unprotected
2953         event listeners, since we mark them now.
2954
2955         * bindings/scripts/CodeGeneratorJS.pm: Autogenerate event listener
2956         invalidation for SVGElementInstance.
2957
2958         * svg/SVGElementInstance.h:
2959         (WebCore::SVGElementInstance::eventListeners): Added an accessor, for
2960         the sake of autogenerated code.
2961
2962         * svg/SVGElementInstance.idl: Removed the ProtectedEventListener attribute
2963         from event listener properties. Added a CustomMarkFunction attribute,
2964         since we need to mark our event listeners.
2965
2966 2009-04-14  Steve Falkenburg  <sfalken@apple.com>
2967
2968         Windows build fix.
2969
2970         * WebCore.vcproj/WebCore.vcproj:
2971
2972 2009-04-14  Steve Falkenburg  <sfalken@apple.com>
2973
2974         Add header guards to WebCore forwarding headers.
2975         
2976         Speeds up WebCore debug build on Windows by 12% on my system,
2977         since Visual Studio appears to not optimize for standard header
2978         guards in included files.
2979         
2980         Rubber stamped by Ada Chan.
2981
2982         * ForwardingHeaders/debugger/Debugger.h:
2983         * ForwardingHeaders/debugger/DebuggerActivation.h:
2984         * ForwardingHeaders/debugger/DebuggerCallFrame.h:
2985         * ForwardingHeaders/interpreter/CallFrame.h:
2986         * ForwardingHeaders/interpreter/Interpreter.h:
2987         * ForwardingHeaders/masm/X86Assembler.h:
2988         * ForwardingHeaders/parser/Parser.h:
2989         * ForwardingHeaders/parser/SourceCode.h:
2990         * ForwardingHeaders/parser/SourceProvider.h:
2991         * ForwardingHeaders/pcre/pcre.h:
2992         * ForwardingHeaders/profiler/Profile.h:
2993         * ForwardingHeaders/profiler/ProfileNode.h:
2994         * ForwardingHeaders/profiler/Profiler.h:
2995         * ForwardingHeaders/runtime/ArgList.h:
2996         * ForwardingHeaders/runtime/ArrayPrototype.h:
2997         * ForwardingHeaders/runtime/BooleanObject.h:
2998         * ForwardingHeaders/runtime/CallData.h:
2999         * ForwardingHeaders/runtime/Collector.h:
3000         * ForwardingHeaders/runtime/CollectorHeapIterator.h:
3001         * ForwardingHeaders/runtime/Completion.h:
3002         * ForwardingHeaders/runtime/ConstructData.h:
3003         * ForwardingHeaders/runtime/DateInstance.h:
3004         * ForwardingHeaders/runtime/Error.h:
3005         * ForwardingHeaders/runtime/FunctionConstructor.h:
3006         * ForwardingHeaders/runtime/FunctionPrototype.h:
3007         * ForwardingHeaders/runtime/Identifier.h:
3008         * ForwardingHeaders/runtime/InitializeThreading.h:
3009         * ForwardingHeaders/runtime/InternalFunction.h:
3010         * ForwardingHeaders/runtime/JSArray.h:
3011         * ForwardingHeaders/runtime/JSByteArray.h:
3012         * ForwardingHeaders/runtime/JSFunction.h:
3013         * ForwardingHeaders/runtime/JSGlobalData.h:
3014         * ForwardingHeaders/runtime/JSGlobalObject.h:
3015         * ForwardingHeaders/runtime/JSLock.h:
3016         * ForwardingHeaders/runtime/JSNumberCell.h:
3017         * ForwardingHeaders/runtime/JSObject.h:
3018         * ForwardingHeaders/runtime/JSString.h:
3019         * ForwardingHeaders/runtime/JSValue.h:
3020         * ForwardingHeaders/runtime/Lookup.h:
3021         * ForwardingHeaders/runtime/ObjectPrototype.h:
3022         * ForwardingHeaders/runtime/Operations.h:
3023         * ForwardingHeaders/runtime/PropertyMap.h:
3024         * ForwardingHeaders/runtime/PropertyNameArray.h:
3025         * ForwardingHeaders/runtime/Protect.h:
3026         * ForwardingHeaders/runtime/PrototypeFunction.h:
3027         * ForwardingHeaders/runtime/StringObject.h:
3028         * ForwardingHeaders/runtime/StringObjectThatMasqueradesAsUndefined.h:
3029         * ForwardingHeaders/runtime/StringPrototype.h:
3030         * ForwardingHeaders/runtime/Structure.h:
3031         * ForwardingHeaders/runtime/SymbolTable.h:
3032         * ForwardingHeaders/runtime/UString.h:
3033         * ForwardingHeaders/wrec/WREC.h:
3034         * ForwardingHeaders/wtf/ASCIICType.h:
3035         * ForwardingHeaders/wtf/AlwaysInline.h:
3036         * ForwardingHeaders/wtf/Assertions.h:
3037         * ForwardingHeaders/wtf/ByteArray.h:
3038         * ForwardingHeaders/wtf/CurrentTime.h:
3039         * ForwardingHeaders/wtf/Deque.h:
3040         * ForwardingHeaders/wtf/DisallowCType.h:
3041         * ForwardingHeaders/wtf/FastMalloc.h:
3042         * ForwardingHeaders/wtf/Forward.h:
3043         * ForwardingHeaders/wtf/GetPtr.h:
3044         * ForwardingHeaders/wtf/HashCountedSet.h:
3045         * ForwardingHeaders/wtf/HashFunctions.h:
3046         * ForwardingHeaders/wtf/HashMap.h:
3047         * ForwardingHeaders/wtf/HashSet.h:
3048         * ForwardingHeaders/wtf/HashTable.h:
3049         * ForwardingHeaders/wtf/HashTraits.h:
3050         * ForwardingHeaders/wtf/ListHashSet.h:
3051         * ForwardingHeaders/wtf/ListRefPtr.h:
3052         * ForwardingHeaders/wtf/Locker.h:
3053         * ForwardingHeaders/wtf/MainThread.h:
3054         * ForwardingHeaders/wtf/MathExtras.h:
3055         * ForwardingHeaders/wtf/MessageQueue.h:
3056         * ForwardingHeaders/wtf/Noncopyable.h:
3057         * ForwardingHeaders/wtf/NotFound.h:
3058         * ForwardingHeaders/wtf/OwnArrayPtr.h:
3059         * ForwardingHeaders/wtf/OwnPtr.h:
3060         * ForwardingHeaders/wtf/PassRefPtr.h:
3061         * ForwardingHeaders/wtf/Platform.h:
3062         * ForwardingHeaders/wtf/PtrAndFlags.h:
3063         * ForwardingHeaders/wtf/RandomNumber.h:
3064         * ForwardingHeaders/wtf/RefCounted.h:
3065         * ForwardingHeaders/wtf/RefCountedLeakCounter.h:
3066         * ForwardingHeaders/wtf/RefPtr.h:
3067         * ForwardingHeaders/wtf/RetainPtr.h:
3068         * ForwardingHeaders/wtf/StdLibExtras.h:
3069         * ForwardingHeaders/wtf/StringExtras.h:
3070         * ForwardingHeaders/wtf/ThreadSpecific.h:
3071         * ForwardingHeaders/wtf/Threading.h:
3072         * ForwardingHeaders/wtf/TypeTraits.h:
3073         * ForwardingHeaders/wtf/UnusedParam.h:
3074         * ForwardingHeaders/wtf/Vector.h:
3075         * ForwardingHeaders/wtf/VectorTraits.h:
3076         * ForwardingHeaders/wtf/dtoa.h:
3077         * ForwardingHeaders/wtf/unicode/Collator.h:
3078         * ForwardingHeaders/wtf/unicode/UTF8.h:
3079         * ForwardingHeaders/wtf/unicode/Unicode.h:
3080         * ForwardingHeaders/wtf/unicode/icu/UnicodeIcu.h:
3081
3082 2009-04-14  Sam Weinig  <sam@webkit.org>
3083
3084         Reviewed by Adele Peterson.
3085
3086         Use a template function to generalize the way we create non-caching
3087         JS function getters.
3088
3089         * bindings/js/JSDOMWindowCustom.cpp:
3090         * bindings/js/JSDOMWindowCustom.h:
3091         (WebCore::nonCachingStaticFunctionGetter):
3092         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
3093
3094 2009-04-14  Benjamin C Meyer  <benjamin.meyer@torchmobile.com>
3095
3096         Reviewed by George Staikos.
3097
3098         https://bugs.webkit.org/show_bug.cgi?id=25099
3099
3100         When creating a QNetworkRequest make sure to populate the
3101         CacheLoadControlAttribute with the value set by the ResourceRequest::cachePolicy() so that the cache will be used as WebKit expects.
3102
3103         * WebKit/qt/tests/qwebpage/tst_qwebpage.cpp:
3104         (tst_QWebPage::requestCache):
3105
3106         * platform/network/qt/ResourceRequestQt.cpp:
3107         (WebCore::ResourceRequest::toNetworkRequest):
3108
3109 2009-04-14  Timothy Hatcher  <timothy@apple.com>
3110
3111         Fix a world leak caused by opening the Web Inspector. This was
3112         a regression caused by the InspectorController becoming refcounted.
3113
3114         <rdar://problem/6782944>
3115
3116         Reviewed by Darin Adler.
3117
3118         * bindings/js/ScriptObject.cpp:
3119         (WebCore::ScriptGlobalObject::get): Renamed to better match the
3120         other functions.
3121         (WebCore::ScriptGlobalObject::remove): Added. Deletes the property.
3122         * bindings/js/ScriptObject.h:
3123         * inspector/InspectorController.cpp:
3124         (WebCore::InspectorController::~InspectorController): Do less work
3125         at destruction time since the object lifetime is tied to JS GC.
3126         Assert that inspectedPageDestroyed cleared everything needed.
3127         (WebCore::InspectorController::inspectedPageDestroyed): Do most
3128         of the work that ~InspectorController was doing.
3129         (WebCore::InspectorController::scriptObjectReady): Renamed getObject.
3130
3131 2009-04-14  Antony Sargent  <asargent@chromium.org>
3132
3133         Reviewed by Dimitri Glazkov.
3134
3135         This is some cleanup motivated by the crash in http://crbug.com/9775 , which 
3136         happens because of calling window.open inside a window.onload handler. 
3137
3138         These changes are just part of the fix, along with some asserts to help prevent
3139         breakage on future changes. 
3140
3141         https://bugs.webkit.org/show_bug.cgi?id=25132
3142
3143         * bindings/v8/V8EventListenerList.cpp:
3144         (WebCore::V8EventListenerList::add):
3145         (WebCore::V8EventListenerList::remove):
3146         (WebCore::V8EventListenerList::clear):
3147         * bindings/v8/V8EventListenerList.h:
3148         (WebCore::V8EventListenerList::size):
3149
3150 2009-04-14  Evan Martin  <evan@chromium.org>
3151
3152         Reviewed by Darin Adler.
3153
3154         https://bugs.webkit.org/show_bug.cgi?id=25142
3155         Fix a race that can occur between flex and the perl script that parses
3156         its output.
3157
3158         * css/maketokenizer: Consume all input.
3159
3160 2009-04-14  Rohit Rao  <rohitrao@google.com>
3161
3162         Reviewed by Dan Bernstein.
3163
3164         https://bugs.webkit.org/show_bug.cgi?id=25184
3165         Do not change the text color for selected text in Mac Chromium.
3166
3167         * rendering/RenderThemeChromiumMac.h:
3168         (WebCore::RenderThemeChromiumMac::supportsSelectionForegroundColors):
3169         Now returns false, matching the behavior of Safari on Mac.
3170
3171 2009-04-14  Justin Garcia  <justin.garcia@apple.com>
3172
3173         Reviewed by Eric Seidel.
3174
3175         https://bugs.webkit.org/show_bug.cgi?id=25172
3176         Extra partial layout during the first keypress in an empty block
3177         
3178         Determining if a placeholder needs to be removed requires the creation of a VisiblePosition 
3179         which was triggering layout before we were finished modifying the DOM for the insert operation.
3180         
3181         Find out if we need to remove a placeholder near the start of the operation, and if we do remember 
3182         where it's located.  Then, later, remove it along with all of the other DOM operations we perform.
3183         
3184         Renamed lineBreakExistsAtPosition to lineBreakExistsAtVisiblePosition and added a lineBreakExistsAtPosition
3185         that takes in a Position.  In InsertTextCommand, we can use the latter, since we normalize manually.
3186         
3187         removePlaceholderAt now takes in a Position that it assumes has already been checked for a placeholder.
3188         
3189         No test added as this only effects performance.
3190
3191         * editing/BreakBlockquoteCommand.cpp:
3192         (WebCore::BreakBlockquoteCommand::doApply):
3193         * editing/CompositeEditCommand.cpp:
3194         (WebCore::CompositeEditCommand::removePlaceholderAt):
3195         (WebCore::CompositeEditCommand::moveParagraphs):
3196         (WebCore::CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph):
3197         (WebCore::CompositeEditCommand::positionAvoidingSpecialElementBoundary):
3198         * editing/CompositeEditCommand.h:
3199         * editing/DeleteSelectionCommand.cpp:
3200         (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete):
3201         (WebCore::DeleteSelectionCommand::doApply):
3202         * editing/FormatBlockCommand.cpp:
3203         (WebCore::FormatBlockCommand::doApply):
3204         * editing/InsertLineBreakCommand.cpp:
3205         (WebCore::InsertLineBreakCommand::doApply):
3206         * editing/InsertParagraphSeparatorCommand.cpp:
3207         (WebCore::InsertParagraphSeparatorCommand::doApply):
3208         * editing/InsertTextCommand.cpp:
3209         (WebCore::InsertTextCommand::input):
3210         * editing/htmlediting.cpp:
3211         (WebCore::lineBreakExistsAtVisiblePosition):
3212         (WebCore::lineBreakExistsAtPosition):
3213         * editing/htmlediting.h:
3214
3215 2009-04-14  Adam Roben  <aroben@apple.com>
3216
3217         Remove support for profile-guided optimization on Windows
3218
3219         Rubber-stamped by Steve Falkenburg.
3220
3221         * WebCore.vcproj/WebCore.vcproj: Removed the Release_PGO
3222         configuration.
3223
3224 2009-04-14  Dmitry Titov  <dimich@chromium.org>
3225
3226         Reviewed by Dimitri Glazkov.
3227
3228         https://bugs.webkit.org/show_bug.cgi?id=25163
3229         Upstream fix for releasing v8 objects on worker thread termination in Chromium.
3230
3231         * bindings/v8/V8DOMMap.cpp:
3232         (WebCore::domDataList): Now uses Vector instead of HashMap.
3233         (WebCore::domDataListMutex):
3234         (WebCore::ThreadSpecificDOMData::ThreadSpecificDOMData):  remove usage of currentThread();
3235         (WebCore::ThreadSpecificDOMData::~ThreadSpecificDOMData): ditto.
3236         (WebCore::NonMainThreadSpecificDOMData::~NonMainThreadSpecificDOMData): moved call to removeAllDOMObjectsInCurrentThread() to ~WorkerScriptController.
3237         (WebCore::handleWeakObjectInOwningThread):
3238         (WebCore::derefDelayedObjects):
3239         (WebCore::removeAllDOMObjectsInCurrentThread): not static anymore.
3240         * bindings/v8/V8DOMMap.h:
3241         * bindings/v8/WorkerContextExecutionProxy.cpp:
3242         (WebCore::WorkerContextExecutionProxy::dispose): removed code that avoided dual-dereference of WorkerContext.
3243         (WebCore::WorkerContextExecutionProxy::initContextIfNeeded): this ref() is countered in removeAllDOMObjectsInCurrentThread(), when the WorkerContext is removed from the v8 map.
3244         * bindings/v8/WorkerScriptController.cpp:
3245         (WebCore::WorkerScriptController::~WorkerScriptController):
3246
3247 2009-04-14  Adam Roben  <aroben@apple.com>
3248
3249         Fix Bug 25183: Split up WebCore.vcproj's settings into vsprops files
3250
3251         <https://bugs.webkit.org/show_bug.cgi?id=25183>
3252
3253         WebCore.vcproj now uses a set of .vsprops files to store most of its
3254         settings.
3255
3256         Reviewed by Darin Adler.
3257
3258         * WebCore.vcproj/WebCore.vcproj: Moved settings from here into the new
3259         .vsprops files.
3260
3261         * WebCore.vcproj/WebCoreCFNetwork.vsprops: Added. Contains settings
3262         for ports that build against CFNetwork.
3263         * WebCore.vcproj/WebCoreCG.vsprops: Added. Contains settings for ports
3264         that build against CoreGraphics.
3265         * WebCore.vcproj/WebCoreCURL.vsprops: Added. Contains settings for
3266         ports that build against libcurl.
3267         * WebCore.vcproj/WebCoreCairo.vsprops: Added. Contains settings for
3268         ports that build against Cairo.
3269         * WebCore.vcproj/WebCoreCommon.vsprops: Added. Contains settings
3270         shared by all ports.
3271         * WebCore.vcproj/WebCoreMediaQT.vsprops: Added. Contains settings for
3272         ports that use QTMovieWin to implement the MediaPlayerPrivate
3273         interface.
3274         * WebCore.vcproj/WebCorePthreads.vsprops: Added. Contains settings for
3275         ports that build against pthreads.
3276
3277 2009-04-14  Alexey Proskuryakov  <ap@webkit.org>
3278
3279         Reviewed by Darin Adler.
3280
3281         http/tests/xmlhttprequest/basic-auth.html fails on Tiger.
3282
3283         Turns out that NSURLCredentialPersistenceNone doesn't work on Tiger, so we have to use
3284         session persistence.
3285
3286         * platform/network/mac/ResourceHandleMac.mm:
3287         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Route the credential through
3288         receivedCredential(), ensuring that the Tiger-specific need to use session credentials
3289         is honored.
3290         (WebCore::ResourceHandle::receivedCredential): On Tiger, change PersistenceNone to
3291         PersistenceForSession, because the former doesn't work.
3292
3293 2009-04-14  Adele Peterson  <adele@apple.com>
3294
3295         Reviewed by Darin Adler.
3296
3297         Fix for <rdar://problem/6703873> Triple-click quoted line and type Return creates an extra quoted blank line
3298
3299         Test: editing/inserting/6703873.html
3300
3301         * editing/BreakBlockquoteCommand.cpp: (WebCore::BreakBlockquoteCommand::doApply):
3302         If the startNode's original parent is now empty, we can remove it.  Its already been cloned and copied with the startNode,
3303         so we only need to keep it around if it actually holds some original content, otherwise it will look like an extra empty 
3304         container in the document.
3305
3306 2009-04-14  Xan Lopez  <xlopez@igalia.com>
3307
3308         Reviewed by Holger Freyther.
3309
3310         https://bugs.webkit.org/show_bug.cgi?id=21546
3311         [GTK] ATK accessibility enhancements
3312
3313         Add a proper implementation of AtkText::get_text and
3314         AtkText::get_character_count, which takes into account non
3315         TextControl text. With this the 'Text' field in Accerciser's
3316         Interface Viewer is filled correctly.
3317
3318         * page/gtk/AccessibilityObjectWrapperAtk.cpp:
3319
3320 2009-04-14  Xan Lopez  <xlopez@igalia.com>
3321
3322         Reviewed by Holger Freyther.
3323
3324         https://bugs.webkit.org/show_bug.cgi?id=21546
3325         [GTK] ATK accessibility enhancements
3326
3327         Remove some dead code and g_return_if_fail from static functions.
3328
3329         * page/gtk/AccessibilityObjectWrapperAtk.cpp:
3330
3331 2009-04-14  Xan Lopez  <xlopez@igalia.com>
3332
3333         Reviewed by Holger Freyther.
3334
3335         https://bugs.webkit.org/show_bug.cgi?id=21546
3336         [GTK] ATK accessibility enhancements
3337
3338         Also implement text interface for StaticTextRole, which covers
3339         most of the text in web pages.
3340
3341         * page/gtk/AccessibilityObjectWrapperAtk.cpp:
3342
3343 2009-04-14  Alexey Proskuryakov  <ap@webkit.org>
3344
3345         Another Windows build fix.
3346
3347         * platform/network/cf/ResourceHandleCFNet.cpp:
3348         (WebCore::WebCoreSynchronousLoader::load):
3349
3350 2009-04-14  Alexey Proskuryakov  <ap@webkit.org>
3351
3352         Windows build fix.
3353
3354         * platform/network/cf/ResourceHandleCFNet.cpp:
3355         (WebCore::WebCoreSynchronousLoader::willSendRequest):
3356         (WebCore::WebCoreSynchronousLoader::didReceiveChallenge):
3357
3358 2009-04-13  Alexey Proskuryakov  <ap@webkit.org>
3359
3360         Reviewed by Sam Weinig.
3361
3362         <rdar://problem/6698851> Implement XMLHttpRequest withCredentials attribute
3363
3364         * WebCore.xcodeproj/project.pbxproj: Made ThreadableLoader.h private, as enum definitions
3365         from it are now used in otehr private headers.
3366
3367         * xml/XMLHttpRequest.h:
3368         * xml/XMLHttpRequest.idl:
3369         Added withCredentials attribute. When it is false (default), neither credentials nor cookies
3370         are sent with cross origin requests, When it is true, those are sent, but the server needs
3371         to allow handling results via Access-Control-Allow-Credentials header. It was always possible
3372         to send a cross-site request with credentials via IFRAME or IMG, so this just adds a way to
3373         read results, as long as the server reports that it's allowed.
3374         Having the default set to false ensures that requests won't fail unexpectedly because of
3375         stored credentials and cookies for other resources in the target protection space.
3376
3377         * xml/XMLHttpRequest.cpp:
3378         (WebCore::XMLHttpRequest::loadRequestSynchronously): Allow stored credentials for same origin
3379         requests, and for cross origin ones that have withCredentials attribute set. Such code already
3380         existed for cookies (but it's simpler, because we could just set a ResourceRequest flag).
3381         (WebCore::XMLHttpRequest::loadRequestAsynchronously): Ditto.
3382
3383         * platform/network/ResourceHandle.h: Added willSendRequest() - just like for other callbacks,
3384         is is easier to have code in the class. Also, loadResourceSynchronously() now takes a
3385         StoredCredentials option, matching async case.
3386
3387         * platform/network/ResourceHandleClient.h:
3388         (WebCore::ResourceHandleClient::receivedCredential): Removed. This method could never be
3389         called, and no client used it.
3390         (WebCore::ResourceHandleClient::receivedRequestToContinueWithoutCredential): Ditto.
3391
3392         * platform/network/ResourceHandleInternal.h:
3393         (WebCore::ResourceHandleInternal::ResourceHandleInternal): Split username and password out
3394         of request URL. We want to always get a callback for credentials to manage them in WebCore,
3395         so network back-end shouldn't see them too early.
3396
3397         * platform/network/ResourceRequestBase.cpp:
3398         (WebCore::ResourceRequestBase::removeCredentials):
3399         * platform/network/ResourceRequestBase.h:
3400         Added a removeCredentials() method that removes login and password parts from request URL.
3401
3402         * platform/network/mac/ResourceHandleMac.mm:
3403         (WebCoreCredentialStorage): Added a simple storage class for per-session credentials.
3404         (WebCore::ResourceHandle::loadResourceSynchronously): Pass allowStoredCredentials through.
3405         (WebCore::ResourceHandle::willSendRequest): On a redirect, credentials should be replaced.
3406         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Try credentials from the URL
3407         and per-session credentials. Code was partially moved from Obj-C callback.
3408         (WebCore::ResourceHandle::receivedCredential): Intercept per-session credentials and store
3409         them in WebCore storage.
3410         (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]): Don't
3411         store the redirected URL - we only needed credentials, which are now stored separately.
3412         (-[WebCoreResourceHandleAsDelegate connection:didReceiveAuthenticationChallenge:]): Removed
3413         code that was setting credentials from URL. First, the code is now in ResourceHandle, and
3414         also, it wasn't actually needed in Leopard release before this patch, see <rdar://problem/5298142>.
3415         (-[WebCoreSynchronousLoader dealloc]): Release credentials. Note that unlike ResourceHandle,
3416         this class still needs to track URL for checking whether a redirect is allowed. This is
3417         not a great solution, and we should unify client code to use the same checks in sync and
3418         async cases.
3419         (-[WebCoreSynchronousLoader connection:willSendRequest:redirectResponse:]): Just like in
3420         async case, put credentials aside to ensure that network back-end asks for them.
3421         (-[WebCoreSynchronousLoader connection:didReceiveAuthenticationChallenge:]): Use credentials
3422         from URL, or from WebCore storage.
3423         (-[WebCoreSynchronousLoader connectionShouldUseCredentialStorage:]): Don't use stored
3424         credentials when not allowed to.
3425         (+[WebCoreSynchronousLoader loadRequest:allowStoredCredentials:returningResponse:error:]):
3426         Put credentials aside to ensure that network back-end asks for them.
3427
3428         * platform/network/cf/ResourceHandleCFNet.cpp:
3429         (WebCore::WebCoreCredentialStorage::set):
3430         (WebCore::WebCoreCredentialStorage::get):
3431         (WebCore::willSendRequest):
3432         (WebCore::ResourceHandle::start):
3433         (WebCore::ResourceHandle::willSendRequest):
3434         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
3435         (WebCore::ResourceHandle::receivedCredential):
3436         (WebCore::ResourceHandle::loadResourceSynchronously):
3437         (WebCore::WebCoreSynchronousLoader::willSendRequest):
3438         (WebCore::WebCoreSynchronousLoader::didReceiveChallenge):
3439         (WebCore::WebCoreSynchronousLoader::shouldUseCredentialStorage):
3440         (WebCore::WebCoreSynchronousLoader::load):
3441         Same changes as in Mac case.
3442
3443         * platform/network/curl/ResourceHandleCurl.cpp:
3444         (WebCore::ResourceHandle::loadResourceSynchronously):
3445         * platform/network/qt/ResourceHandleQt.cpp:
3446         (WebCore::ResourceHandle::loadResourceSynchronously):
3447         * platform/network/soup/ResourceHandleSoup.cpp:
3448         (WebCore::ResourceHandle::loadResourceSynchronously):
3449         Trying not to break the build.
3450
3451         * dom/XMLTokenizerLibxml2.cpp: (WebCore::openFunc):
3452         * xml/XSLTProcessor.cpp: (WebCore::docLoaderFunc):
3453         Unconditionally allow stored credentials for these, as they only support same origin loads.
3454
3455         * workers/WorkerContext.cpp: (WebCore::WorkerContext::importScripts):
3456         WorkerContext.importScripts() can be cross-origin, but sending credentials with it is no worse
3457         than sending them with <script src=...>, so this is also unconditionally allowed.
3458
3459         * loader/DocumentThreadableLoader.cpp:
3460         (WebCore::DocumentThreadableLoader::loadResourceSynchronously): Pass through storedCredentials.
3461         (WebCore::DocumentThreadableLoader::create): Ditto.
3462         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader): Save storedCredentials and
3463         sameOrigin flags foruse in callbacks.
3464         (WebCore::DocumentThreadableLoader::willSendRequest): Assert that loaders aren't all confused.
3465         (WebCore::DocumentThreadableLoader::didSendData): Ditto.
3466         (WebCore::DocumentThreadableLoader::didReceiveResponse): Ditto.
3467         (WebCore::DocumentThreadableLoader::didReceiveData): Ditto.
3468         (WebCore::DocumentThreadableLoader::didFinishLoading): Ditto.
3469         (WebCore::DocumentThreadableLoader::didFail): Ditto.
3470         (WebCore::DocumentThreadableLoader::getShouldUseCredentialStorage): Don't use credential
3471         storage if that's not allowed by the code that invoked DocumentThreadableLoader.
3472         (WebCore::DocumentThreadableLoader::didReceiveAuthenticationChallenge): Simulate a failure
3473         and cancel the request if we are about to ask the user for credentials for a cross-origin
3474         request, which is forbidden by CORS (and would have been very confusing if allowed).
3475         (WebCore::DocumentThreadableLoader::receivedCancellation): Assert that loaders aren't all confused.
3476
3477         * loader/DocumentThreadableLoader.h: Updated for the new flags (storedCredentials and
3478         sameOrigin) that affect the loader. Eventually, we need to move all CORS logic from XHR here.
3479
3480         * loader/ThreadableLoader.h: (StoredCredentials): Added another flag that affects loader
3481         behavior. We should combine all of these into a structure, and use it for sync requests, too.
3482
3483         * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadResourceSynchronously):
3484         * loader/FrameLoader.h:
3485         * loader/ThreadableLoader.cpp:
3486         (WebCore::ThreadableLoader::create):
3487         (WebCore::ThreadableLoader::loadResourceSynchronously):
3488         * loader/WorkerThreadableLoader.cpp:
3489         (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
3490         (WebCore::WorkerThreadableLoader::loadResourceSynchronously):
3491         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
3492         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader):
3493         * loader/WorkerThreadableLoader.h:
3494         (WebCore::WorkerThreadableLoader::create):
3495         Pass through storedCredentials.
3496
3497 2009-04-13  David Hyatt  <hyatt@apple.com>
3498
3499         Reviewed by Cameron Zwarich.
3500
3501         Remove an outdated comment in ScrollView.h
3502
3503         * platform/ScrollView.h:
3504
3505 2009-04-13  Eric Carlson  <eric.carlson@apple.com>
3506
3507         Reviewed by Mark Rowe.
3508
3509         https://bugs.webkit.org/show_bug.cgi?id=25177
3510
3511         QTTrack's -media method always return NULL in 64-bit QTKit, so
3512         MediaPlayerPrivate::disableUnsupportedTracks should use 
3513         QTTrackMediaTypeAttribute to get a track's type.
3514
3515         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3516         (WebCore::MediaPlayerPrivate::disableUnsupportedTracks):
3517
3518 2009-04-13  Geoffrey Garen  <ggaren@apple.com>
3519
3520         Reviewed by Cameron Zwarich.
3521
3522         More fix for https://bugs.webkit.org/show_bug.cgi?id=21260
3523         Unbounded memory growth when churning elements with anonymous event handler functions
3524
3525         Stop using protected event listeners on the window object.
3526
3527         * bindings/js/JSDOMWindowCustom.cpp:
3528         (WebCore::JSDOMWindow::mark): Mark our event listeners, since they're
3529         no longer protected.
3530
3531         (WebCore::JSDOMWindow::addEventListener):
3532         (WebCore::JSDOMWindow::removeEventListener): Create unprotected event
3533         listeners, since we mark them now.
3534