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