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