39e2109e098f9606c667884d462794e4c1b72b5b
[WebKit-https.git] / WebCore / ChangeLog
1 2007-12-16  Rodney Dawes  <dobey@wayofthemonkey.com>
2
3         Reviewed by Maciej Stachowiak.
4
5         http://bugs.webkit.org/show_bug.cgi?id=16389
6         Bug 16389: Common Implementation of NetscapePlugInStreamLoader
7
8         * WebCore.vcproj/WebCore.vcproj: Remove NetscapePlugInStreamLoaderWin.cpp.
9         * loader/NetscapePlugInStreamLoader.cpp: Copy method implementations from NetscapePlugInStreamLoaderWin.cpp.
10         * loader/win/NetscapePlugInStreamLoaderWin.cpp: Removed.
11
12 2007-12-16  Grace Kloba  <klobag@gmail.com>
13
14         Reviewed by Darin Adler.
15
16         Fix http://bugs.webkit.org/show_bug.cgi?id=16433.
17         Bug 16433: LOW_BANDWIDTH_DISPLAY build is broken
18
19         * dom/Document.cpp:
20         (WebCore::Document::Document):
21         * loader/FrameLoader.cpp:
22         (WebCore::FrameLoader::addLowBandwidthDisplayRequest):
23         (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
24
25 2007-12-16  Darin Adler  <darin@apple.com>
26
27         Reviewed by Maciej.
28
29         - fix <rdar://problem/5636065> First form of SQLTransaction.executeSql() fails with TYPE_ERROR dom exception
30
31         Test: storage/execute-sql-args.html
32
33         * bindings/js/JSSQLTransactionCustom.cpp:
34         (WebCore::JSSQLTransaction::executeSql): Added exception handling code so that once an
35         exception happens, we won't try to do any more argument processing. Changed processing
36         of the second argument so that we allow an undefined value or null, and simply omit the
37         array. Changed processing of the second argument so that we don't require an actual
38         JavaScript array. Instead, as with the JavaScript array operations themselves, we use
39         the length property and corresponding numeric properties of the object, allowing other
40         objects to act as arrays. Changed processing of the third and fourth arguments to
41         allow the undefined value as well as null; we check the value of the argument rather
42         than looking at the size of the passed-in arguments list.
43
44 2007-12-16  Sam Weinig  <sam@webkit.org>
45
46         Reviewed by Darin.
47
48         More of http://bugs.webkit.org/show_bug.cgi?id=16385
49         Cleanup kjs_window
50
51         - Move PausedTimeouts into its own file and put it in the WebCore namespace.
52
53         * WebCore.pro:
54         * WebCore.vcproj/WebCore.vcproj:
55         * WebCore.xcodeproj/project.pbxproj:
56         * WebCoreSources.bkl:
57         * bindings/js/PausedTimeouts.cpp: Copied from bindings/js/kjs_window.cpp.
58         * bindings/js/PausedTimeouts.h: Copied from bindings/js/kjs_window.h.
59         * bindings/js/kjs_window.cpp:
60         (KJS::Window::pauseTimeouts):
61         * bindings/js/kjs_window.h:
62         * history/CachedPage.cpp:
63         * history/CachedPage.h:
64         * page/Chrome.cpp:
65
66 2007-12-16  Beth Dakin  <bdakin@apple.com>
67
68         Reviewed by Geoff.
69
70         Make relative-size SVGs work in border-image.
71
72         * rendering/RenderBox.cpp:
73         (WebCore::RenderBox::calculateBackgroundSize):
74         * rendering/RenderObject.cpp:
75         (WebCore::RenderObject::paintBorderImage):
76
77 2007-12-16  Darin Adler  <darin@apple.com>
78
79         - fix Tiger build (my fault it was broken)
80
81         * rendering/RenderThemeMac.mm: Define NSUInteger if on Tiger.
82
83 2007-12-16  Andrew Wellington  <proton@wiretapped.net>
84
85         Reviewed by Darin.
86         
87         http://bugs.webkit.org/show_bug.cgi?id=6129
88         Incomplete implementation of CSS 2.1 system colors
89
90         Test: fast/css/css2-system-color.html
91         
92         Based on original patch by Rob Buis.
93         
94         System colors are retrieved from NSColor as appropriate. If the color is a pattern color
95         (and therefore NSColor won't let us retrieve a color from it) we draw a 1x1 image of the
96         color and sample that to get a solid color.
97
98         * css/CSSStyleSelector.cpp:
99         (WebCore::):
100         (WebCore::colorForCSSValue):
101         * rendering/RenderTheme.cpp:
102         (WebCore::RenderTheme::systemColor):
103         * rendering/RenderTheme.h:
104         * rendering/RenderThemeMac.h:
105         * rendering/RenderThemeMac.mm:
106         (WebCore::getSystemColor):
107         (WebCore::RenderThemeMac::platformColorsDidChange):
108         (WebCore::RenderThemeMac::systemColor):
109
110 2007-12-16  Dan Bernstein  <mitz@apple.com>
111
112         Reviewed by Darin Adler.
113
114         - fix http://bugs.webkit.org/show_bug.cgi?id=16426
115           Divs with overflow:auto: scrollbars not correctly updated when contents change
116
117         Test: fast/overflow/scrollbar-position-update.html
118
119         * platform/mac/PlatformScrollBarMac.mm:
120         (WebCore::PlatformScrollbar::updateThumbProportion): Update the
121         NSScroller's value for the new proportions.
122         * rendering/RenderLayer.cpp:
123         (WebCore::RenderLayer::updateScrollInfoAfterLayout): Removed unnecessary
124         repaint(). Scrollbars repaint themselves as needed.
125
126 2007-12-16  Alexey Proskuryakov  <ap@webkit.org>
127
128         Reviewed by Darin.
129
130         http://bugs.webkit.org/show_bug.cgi?id=14140
131         <rdar://problem/5270958> REGRESSION: Complex system KeyBindings don't work properly
132
133         * dom/KeyboardEvent.h:
134         (WebCore::KeypressCommand::KeypressCommand):
135         (WebCore::KeyboardEvent::keypressCommands):
136         Change stored command class to preserve complete information about commands.
137
138         * editing/EditorCommand.cpp: (WebCore::CommandEntry::): Mark InsertText as a text insertion
139         command, which it is. Previously, we couldn't do it because WebKit didn't really treat insertText:
140         as a command.
141
142         * page/EventHandler.cpp: (WebCore::EventHandler::keyEvent): Copy commands saved while interpreting
143         a keydown event into keypress, to avoid losing state when running interpretKeyEvents: again.
144
145 2007-12-16  Alexey Proskuryakov  <ap@webkit.org>
146
147         Reviewed by Darin.
148
149         http://bugs.webkit.org/show_bug.cgi?id=16462
150         REGRESSION: access keys broken on Windows
151
152         * page/EventHandler.cpp:
153         (WebCore::EventHandler::handleAccessKey):
154         (WebCore::EventHandler::keyEvent):
155         * page/EventHandler.h:
156         Make handleAccessKey a class method; rely on WebKit to call it on Windows and wxWidgets.
157
158 2007-12-16  Xan Lopez  <xan@gnome.org>
159
160         Reviewed by Alexey Proskuryakov.
161
162         http://bugs.webkit.org/show_bug.cgi?id=16454
163         [GTK] Text input doesn't work consistently on PPC
164
165         * platform/gtk/KeyEventGtk.cpp:
166         (WebCore::singleCharacterString):
167
168         UChar is 2 bytes (UTF-16), so transform accordingly from
169         gunichar (UCS-4). Fixes keyboard input on big endian systems.
170
171 2007-12-15  Darin Adler  <darin@apple.com>
172
173         Reviewed by Mark Rowe.
174
175         - better build fix for the problem affecting GTK and some other platforms
176           "this time for sure"
177
178         * WebCore.xcodeproj/project.pbxproj:
179         * bindings/js/JSEventTargetBase.cpp: Move the include of the .lut.h file here.
180         * bindings/js/JSEventTargetBase.h: Instead of including the .lut.h file in the header,
181         which won't work, declare the tables that are in the .lut.h file in the header.
182
183 2007-12-12  Kevin Watters  <kevin@dotsyntax.com>
184
185         Reviewed by Darin Adler.
186
187         Fixed the Wx port's FontPlatformData for use in HashTable.
188         - FontPlatformData(Deleted) made unequal to FontPlatformData()
189
190         * platform/graphics/wx/FontPlatformData
191
192 2007-12-15  Dan Bernstein  <mitz@apple.com>
193
194         Reviewed by Darin Adler.
195
196         - fix <rdar://problem/5636090> Text in Georgia, Armenian, Inuktitut, Cree, or Cherokee (KA, HY, IU, CR, CHR) draws as all missing glyphs
197
198         * platform/graphics/win/FontCacheWin.cpp:
199         (WebCore::metaFileEnumProc): Added. Called during metafile record
200         enumeration and extracts the font from the create font record.
201         (WebCore::FontCache::getFontDataForCharacters): If font linking fails,
202         let Uniscribe draw the characters and see what font it chooses.
203
204 2007-12-15  Darin Adler  <darin@apple.com>
205
206         * WebCore.pro: Roll my last change out. Was wrong and didn't fix the build.
207
208 2007-12-15  Darin Adler  <darin@apple.com>
209
210         Another try at a GTK build fix.
211
212         * WebCore.pro: Add JSEventTargetBase.cpp to LUT_TABLE_FILES instead of LUT_FILES.
213
214 2007-12-15  Sam Weinig  <sam@webkit.org>
215
216         Force windows to regenerate COM DOM bindings.
217
218         * WebCore.vcproj/build-generated-files.sh: Add license. 
219         * bindings/scripts/CodeGeneratorCOM.pm: Use shared WK_ucfirst.
220
221 2007-12-15  Sam Weinig  <sam@webkit.org>
222
223         Fix Windows and wx builds.
224
225         * WebCore.vcproj/WebCore.vcproj:
226         * WebCoreSources.bkl:
227
228 2007-12-15  Mark Rowe  <mrowe@apple.com>
229
230         Gtk build fix.  Add JSEventTargetBase.cpp to SOURCES.
231
232         * WebCore.pro:
233
234 2007-12-15  Sam Weinig  <sam@webkit.org>
235
236         Fix wx build.
237
238         * WebCoreSources.bkl:
239
240 2007-12-15  Nikolas Zimmermann  <zimmermann@kde.org>
241
242         Not reviewed. Build fix for Qt/Gtk.
243
244         * WebCore.pro: Include JSEventTargetBase.lut.h in generation
245
246 2007-12-15  Nikolas Zimmermann  <zimmermann@kde.org>
247
248         Reviewed by Eric.
249
250         Fixes: http://bugs.webkit.org/show_bug.cgi?id=16445 (Refactor EventTargetNode & JSEventTargetNode for an upcoming SVG patch)
251
252         Split up JSEventTargetNode in JSEventTargetNode & JSEventTargetBase - where most functionality has been moved down
253         in the base class. Applied the same refactorization to EventTargetNode.
254
255         This makes it possible for the upcoming patch implementing the EventTarget interface for SVGElementInstance
256         to share as much code as possible with the EventTargetNode classes.
257
258         * DerivedSources.make:
259         * WebCore.xcodeproj/project.pbxproj:
260         * bindings/js/JSEventTargetBase.cpp: Added.
261         (WebCore::retrieveEventTargetAndCorrespondingNode):
262         (WebCore::eventNameForPropertyToken):
263         * bindings/js/JSEventTargetBase.h: Added.
264         (WebCore::JSEventTargetProperties::):
265         (WebCore::JSEventTargetPrototypeFunctionBase::JSEventTargetPrototypeFunctionBase):
266         (WebCore::JSEventTargetPrototypeFunction::JSEventTargetPrototypeFunction):
267         (WebCore::):
268         (WebCore::::create):
269         (WebCore::JSEventTargetBase::JSEventTargetBase):
270         (WebCore::JSEventTargetBase::getValueProperty):
271         (WebCore::JSEventTargetBase::putValueProperty):
272         (WebCore::JSEventTargetBase::getOwnPropertySlot):
273         (WebCore::JSEventTargetBase::put):
274         (WebCore::JSEventTargetPrototype::JSEventTargetPrototype):
275         (WebCore::JSEventTargetPrototype::self):
276         (WebCore::JSEventTargetPrototype::getOwnPropertySlot):
277         (WebCore::JSEventTargetPrototype::classInfo):
278         * bindings/js/JSEventTargetNode.cpp:
279         (WebCore::JSEventTargetNode::getOwnPropertySlot):
280         (WebCore::JSEventTargetNode::getValueProperty):
281         (WebCore::JSEventTargetNode::put):
282         (WebCore::JSEventTargetNode::putValueProperty):
283         (WebCore::JSEventTargetNode::setListener):
284         (WebCore::toEventTargetNode):
285         * bindings/js/JSEventTargetNode.h:
286         (WebCore::JSEventTargetPrototypeInformation::prototypeClassName):
287         (WebCore::JSEventTargetPrototypeInformation::prototypeIdentifier):
288         * dom/EventTarget.cpp:
289         (WebCore::EventTarget::addEventListener):
290         (WebCore::EventTarget::removeEventListener):
291         (WebCore::EventTarget::dispatchGenericEvent):
292         (WebCore::EventTarget::removeAllEventListeners):
293         (WebCore::EventTarget::insertedIntoDocument):
294         (WebCore::EventTarget::removedFromDocument):
295         (WebCore::EventTarget::handleLocalEvents):
296         (WebCore::EventTarget::applySVGEventTargetRules):
297         (WebCore::forbidEventDispatch):
298         (WebCore::allowEventDispatch):
299         (WebCore::eventDispatchForbidden):
300         * dom/EventTarget.h:
301         (WebCore::EventTarget::preDispatchEventHandler):
302         (WebCore::EventTarget::postDispatchEventHandler):
303         (WebCore::forbidEventDispatch):
304         (WebCore::allowEventDispatch):
305         * dom/EventTargetNode.cpp:
306         (WebCore::EventTargetNode::~EventTargetNode):
307         (WebCore::EventTargetNode::insertedIntoDocument):
308         (WebCore::EventTargetNode::removedFromDocument):
309         (WebCore::EventTargetNode::addEventListener):
310         (WebCore::EventTargetNode::removeEventListener):
311         (WebCore::EventTargetNode::removeAllEventListeners):
312         (WebCore::EventTargetNode::handleLocalEvents):
313         (WebCore::EventTargetNode::dispatchEvent):
314         (WebCore::EventTargetNode::dispatchWindowEvent):
315         * dom/EventTargetNode.h:
316         (WebCore::EventTargetNode::localEventListeners):
317         * svg/SVGElement.cpp:
318         (WebCore::SVGElement::sendSVGLoadEventIfPossible):
319         (WebCore::SVGElement::dispatchEvent):
320
321 2007-12-15  Eric Seidel  <eric@webkit.org>
322
323         Reviewed by Oliver.
324         
325         Width of SVG elements not applied to container elements
326         http://bugs.webkit.org/show_bug.cgi?id=16305
327         Added calcPrefWidths for RenderSVGRoot (copied from RenderReplaced)
328         This is caused by poor factoring in the render tree.  RenderContainer probably should be a template.
329
330         svg/css/css-box-min-width.html
331
332         * rendering/RenderSVGRoot.cpp:
333         (WebCore::RenderSVGRoot::calcPrefWidths): Added.
334         * rendering/RenderSVGRoot.h:
335         * css/SVGCSSStyleSelector::applySVGProperty: fixed ASSERT in debug builds
336
337 2007-12-15  David Kilzer  <ddkilzer@apple.com>
338
339         Fix comment after isSafeScript() was renamed to allowsAccessFrom().
340
341         * bindings/js/kjs_window.cpp:
342         (KJS::createWindow):
343
344 2007-12-15  Alp Toker  <alp@atoker.com>
345
346         Reviewed by Mark Rowe.
347
348         http://bugs.webkit.org/show_bug.cgi?id=16449
349         cairo_arc() functions hang or crash when passed inf as radius or start/end angle
350
351         Add checks. This matches a similar workaround for a CG bug in the CG
352         graphics backend: <rdar://problem/5189233>
353
354         Fixes:
355           fast/canvas/arc-crash.html
356           fast/canvas/canvas-with-incorrect-args.html
357
358         * platform/graphics/cairo/PathCairo.cpp:
359         (WebCore::Path::addArc):
360
361 2007-12-15  Alexey Proskuryakov  <ap@webkit.org>
362
363         Reviewed by Darin.
364
365         http://bugs.webkit.org/show_bug.cgi?id=16078
366         Google Maps zooming via the scroll wheel (almost) always zooms IN only.
367
368         * dom/WheelEvent.cpp: (WebCore::WheelEvent::WheelEvent):
369         Ensure that delta is never rounded down to zero - we are getting values less than 1 from 
370         many mice on OS X, and Google Maps code assumes scrolling up if event.wheelDelta is zero.
371
372 2007-12-14  Dan Bernstein  <mitz@apple.com>
373
374         - Windows build fix
375
376         * WebCore.vcproj/WebCore.vcproj:
377
378 2007-12-14  Alp Toker  <alp@atoker.com>
379
380         GTK+/Qt build fix. Track added files in r28722.
381
382         * WebCore.pro:
383
384 2007-12-14  Sam Weinig  <sam@webkit.org>
385
386         Reviewed by Geoff.
387
388         Speed up getElementByClassName.
389         - This makes getElementByClassName 33% faster on the stress test
390           linked to at http://bugs.webkit.org/show_bug.cgi?id=15760.
391
392         * platform/text/StringImpl.cpp:
393         (WebCore::StringImpl::foldCase): Optimize the case when all the characters are ASCII.
394
395 2007-12-14  Alp Toker  <alp@atoker.com>
396
397         Reviewed by Maciej.
398
399         http://bugs.webkit.org/show_bug.cgi?id=16432
400         [GTK] Update license headers
401
402         Consent has been given by the authors of these files to change license
403         to the LGPL as outlined in the bug report.
404
405         * platform/gtk/ClipboardGtk.cpp:
406         * platform/gtk/ContextMenuGtk.cpp:
407         * platform/gtk/ContextMenuItemGtk.cpp:
408         * platform/gtk/CookieJarGtk.cpp:
409         * platform/gtk/CursorGtk.cpp:
410         * platform/gtk/DragDataGtk.cpp:
411         * platform/gtk/DragImageGtk.cpp:
412         * platform/gtk/PasteboardGtk.cpp:
413         * platform/gtk/PlatformScreenGtk.cpp:
414         * platform/gtk/PlatformScrollBarGtk.cpp:
415         * platform/gtk/SearchPopupMenuGtk.cpp:
416         * platform/gtk/WidgetGtk.cpp:
417
418 2007-12-14  Darin Adler  <darin@apple.com>
419
420         Reviewed by Adele.
421
422         - fix http://bugs.webkit.org/show_bug.cgi?id=16442
423           navigation policy delegate gets called twice for each load
424
425         * loader/MainResourceLoader.cpp:
426         (WebCore::MainResourceLoader::willSendRequest): Removed call to checkNavigationPolicy.
427         That's handled by FrameLoader.
428
429         * loader/MainResourceLoader.h: Removed callContinueAfterNavigationPolicy
430         and continueAfterNavigationPolicy.
431
432 2007-12-14  Anders Carlsson  <andersca@apple.com>
433
434         Reviewed by Brady.
435
436         Make document.open count as committing a document load, so that -[WebFrame dataSource:] won't
437         return nil in that case.
438         
439         * loader/FrameLoader.cpp:
440         (WebCore::FrameLoader::didExplicitOpen):
441
442 2007-12-14  David Smith  <catfish.man@gmail.com>
443
444         Reviewed by Mitz.
445
446         - fix http://bugs.webkit.org/show_bug.cgi?id=14955
447           Implement getElementsByClassName.
448
449         This patch also renames AtomicStringList to ClassNames to better reflect its actual use,
450         and takes advantage of admitting that it's class-specific to encapsulate class attribute 
451         parsing so it can be shared.  It also changes the class to use a Vector, rather than a linked
452         list to store the class names.
453
454         Tests: fast/dom/getElementsByClassName/001.html
455                fast/dom/getElementsByClassName/002.html
456                fast/dom/getElementsByClassName/003.html
457                fast/dom/getElementsByClassName/004.html
458                fast/dom/getElementsByClassName/005.html
459                fast/dom/getElementsByClassName/006.html
460                fast/dom/getElementsByClassName/007.html
461                fast/dom/getElementsByClassName/008.html
462                fast/dom/getElementsByClassName/009.html
463                fast/dom/getElementsByClassName/010.xml
464                fast/dom/getElementsByClassName/011.xml
465                fast/dom/getElementsByClassName/012.html
466                fast/dom/getElementsByClassName/013.html
467                fast/dom/getElementsByClassName/014.html
468                fast/dom/getElementsByClassName/array/001.html
469                fast/dom/getElementsByClassName/array/002.html
470                fast/dom/getElementsByClassName/array/003.html
471                fast/dom/getElementsByClassName/array/004.html
472                fast/dom/getElementsByClassName/dumpNodeList.html
473
474         * WebCore.xcodeproj/project.pbxproj:
475         * css/CSSStyleSelector.cpp:
476         (WebCore::CSSStyleSelector::matchRules):
477         (WebCore::CSSStyleSelector::checkOneSelector):
478         * dom/AtomicStringList.h: Removed.
479         * dom/ClassNames.cpp: Added.
480         (WebCore::ClassNames::contains):
481         (WebCore::ClassNames::parseClassAttribute):
482         * dom/ClassNames.h: Copied from WebCore/dom/AtomicStringList.h.
483         (WebCore::ClassNames::ClassNames):
484         (WebCore::ClassNames::size):
485         (WebCore::ClassNames::clear):
486         (WebCore::ClassNames::operator[]):
487         (WebCore::isClassWhitespace):
488         * dom/ClassNodeList.cpp: Added.
489         (WebCore::ClassNodeList::ClassNodeList):
490         (WebCore::ClassNodeList::length):
491         (WebCore::ClassNodeList::item):
492         (WebCore::ClassNodeList::nodeMatches):
493         * dom/ClassNodeList.h: Added.
494         * dom/Document.cpp:
495         (WebCore::Document::getElementsByName):
496         (WebCore::Document::getElementsByClassName):
497         * dom/Document.h:
498         * dom/Document.idl:
499         * dom/Element.cpp:
500         (WebCore::Element::getClassNames):
501         (WebCore::Element::getElementsByClassName):
502         * dom/Element.h:
503         * dom/Element.idl:
504         * dom/NameNodeList.cpp:
505         (WebCore::NameNodeList::NameNodeList):
506         (WebCore::NameNodeList::item):
507         (WebCore::NameNodeList::nodeMatches):
508         * dom/NameNodeList.h:
509         * dom/NamedMappedAttrMap.cpp:
510         (WebCore::NamedMappedAttrMap::clearAttributes):
511         (WebCore::NamedMappedAttrMap::parseClassAttribute):
512         * dom/NamedMappedAttrMap.h:
513         (WebCore::NamedMappedAttrMap::getClassNames):
514         * dom/StyledElement.cpp:
515         (WebCore::StyledElement::getClassNames):
516         * dom/StyledElement.h:
517
518 2007-12-14  Darin Adler  <darin@apple.com>
519
520         Reviewed by Sam.
521
522         - fix http://bugs.webkit.org/show_bug.cgi?id=16351
523           FontFallbackList.h doesn't include wtf/PassRefPtr.h
524           
525         * platform/graphics/FontFallbackList.h: Added include of <wtf/Forward.h>
526         * platform/graphics/GlyphPageTreeNode.h: Removed an unneeded include.
527
528 2007-12-14  Darin Adler  <darin@apple.com>
529
530         Reviewed by Alexey.
531
532         - http://bugs.webkit.org/show_bug.cgi?id=16420
533           change regression tests to use document.execCommand instead of textInputController.doCommand
534
535         Add a few more operations to document.execCommand.
536
537         Finished up the transition to the new Editor::Command, including removing
538         the Editor::execCommand function.
539
540         * WebCore.base.exp: Added Editor::Command::isSupported.
541         * editing/Editor.h: Removed execCommand.
542         * editing/EditorCommand.cpp:
543         (WebCore::expandSelectionToGranularity): Added.
544         (WebCore::verticalScrollDistance): Added; replaces canScroll.
545         (WebCore::executeDeleteBackward): Added. Moved code here from WebHTMLView.
546         (WebCore::executeDeleteBackwardByDecomposingPreviousCharacter): Ditto.
547         (WebCore::executeDeleteForward): Ditto.
548         (WebCore::executeDeleteToBeginningOfLine): Ditto.
549         (WebCore::executeDeleteToBeginningOfParagraph): Ditto.
550         (WebCore::executeDeleteToEndOfLine): Ditto.
551         (WebCore::executeDeleteToEndOfParagraph): Ditto.
552         (WebCore::executeMovePageDown): Renamed this command to be consistent with all the other
553         Move commands. They all modify the caret. Reimplemented to match the Mac OS X version by
554         removing the explicit scrolling, and letting it be done automatically by code that makes
555         the caret visible. In some cases the old code would scroll twice which was harmless but
556         unnecessary.
557         (WebCore::executeMovePageDownAndModifySelection): Added. Moved code here from WebHTMLView.
558         (WebCore::executeMovePageUp): See MovePageDown above.
559         (WebCore::executeMovePageUpAndModifySelection): Added. Moved code here from WebHTMLView.
560         (WebCore::executeSelectLine): Ditto.
561         (WebCore::executeSelectParagraph): Ditto.
562         (WebCore::executeSelectSentence): Ditto.
563         (WebCore::executeSelectWord): Ditto.
564         (WebCore::executeSwapWithMark): Some small tweaks.
565
566         * page/ContextMenuController.cpp:
567         (WebCore::ContextMenuController::contextMenuItemSelected): Changed to use Editor::command()
568         instead of Editor::execCommand(). This code could be changed to use Editor::Command quite a
569         bit more, but I didn't do that this time.
570
571         - Removed some obsolete unused code.
572
573         * page/mac/EventHandlerMac.mm:
574         (WebCore::EventHandler::passMouseDownEventToWidget): Removed the special case code for
575         NSTextView. This was left over from when we used NSTextField and NSTextView for form
576         elements and is no longer used at all.
577
578         * page/mac/WebCoreFrameBridge.h: Removed 20 unused methods that were still on one side
579         of the bridge or another. We really need to find a time to tear down the rest of the
580         bridge, but that's not this patch.
581
582         * page/mac/WebCoreFrameBridge.mm:
583         (-[WebCoreFrameBridge addData:]): Changed to get at the _shouldCreateRenderers field directly
584         instead of using a method.
585         (-[WebCoreFrameBridge rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
586         Took out obsolete comment about matching enums (we use a single enum now and have for some
587         time).
588         (-[WebCoreFrameBridge selectionGranularity]): Ditto.
589
590 2007-12-14  Justin Garcia  <justin.garcia@apple.com>
591
592         Reviewed by Darin Adler.
593
594         <rdar://problem/5575101> GoogleDocs: Hang in SplitElementCommand::doApply when outdenting a list item in a particular list
595
596         * editing/CompositeEditCommand.cpp:
597         (WebCore::CompositeEditCommand::splitTreeToNode): Moved here.
598         * editing/CompositeEditCommand.h:
599         * editing/IndentOutdentCommand.cpp: Moved splitTreeToNode.
600         * editing/IndentOutdentCommand.h: Ditto, and removed unimplemented splitTreeTo.
601         * editing/InsertListCommand.cpp:
602         (WebCore::InsertListCommand::doApply): Split ancestors of listChildNode between
603         it and listNode, if they exists, so that moving listChildNode doesn't put it out
604         of order.  Added a test case to cover each change.
605         * editing/SplitElementCommand.cpp:
606         (WebCore::SplitElementCommand::doApply): Added an ASSERT to catch code that
607         tries to split a container at a bogus child, and an early return to avoid a
608         hang in that case.
609
610 2007-12-14  Anders Carlsson  <andersca@apple.com>
611
612         Reviewed by Darin and Geoff.
613
614         <rdar://problem/5619295> 
615         REGRESSION: 303-304: Embedded YouTube video fails to render- JS errors (16150) (Flash 9)
616
617         _NPN_CreateScriptObject doesn't take an origin root object anymore.
618         
619         * html/HTMLPlugInElement.cpp:
620         (WebCore::HTMLPlugInElement::createNPObject):
621         * page/Frame.cpp:
622         (WebCore::Frame::windowScriptNPObject):
623
624 2007-12-14  Dan Bernstein  <mitz@apple.com>
625
626         Reviewed by Darin Adler.
627
628         - fix <rdar://problem/5643663> text-shadow and box-shadow offsets 1px smaller than specified
629           which is the root cause of:
630           http://bugs.webkit.org/show_bug.cgi?id=12943
631           box-shadow: small values don't affect shadow position
632           http://bugs.webkit.org/show_bug.cgi?id=14736
633           Safari implementation of text-shadow off by 1px
634
635         * platform/graphics/cg/GraphicsContextCG.cpp:
636         (WebCore::GraphicsContext::setShadow): Slightly increase the magnitude
637         of the offsets passed to CGContextSetShadow* to ensure that the end
638         result after truncation is the desired integer offsets.
639
640 2007-12-13  Alp Toker  <alp@atoker.com>
641
642         curl backend build fix for breakage introduced in r28709.
643
644         * platform/network/ResourceHandleInternal.h:
645         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
646
647 2007-12-13  Justin Garcia  <justin.garcia@apple.com>
648
649         Reviewed by Oliver Hunt.
650
651         <rdar://problem/5607069> In Mail, a crash occurs at WebCore::AppendNodeCommand() after dragging image into a <FORM> element
652
653         * editing/InsertLineBreakCommand.cpp:
654         (WebCore::InsertLineBreakCommand::shouldUseBreakElement): Equip this function to
655         handle editing positions, like [input, 0];
656         * editing/InsertParagraphSeparatorCommand.cpp:
657         (WebCore::InsertParagraphSeparatorCommand::doApply): Pass enclosingBlock a node peeled
658         off of a non-editing position, to fix a bug where the enclosing block of [input, 0] was
659         the input element itself.
660         Insert a <br> when a <form> element is the enclosing block instead of splitting/cloning or
661         nesting a <div>.
662
663 2007-12-13  Alp Toker  <alp@atoker.com>
664
665         Reviewed by Oliver Hunt.
666
667         http://bugs.webkit.org/show_bug.cgi?id=16365
668         [cURL] Acid2 test segmentation fault
669
670         This patch makes the Acid2 test pass.
671
672         Defer the cleanup of cancelled jobs and halt further transfer as early
673         as possible.
674
675         Bug found by and initial patch provided by Luca Bruno.
676
677         * platform/network/curl/ResourceHandleManager.cpp:
678         (WebCore::writeCallback):
679         (WebCore::headerCallback):
680         (WebCore::ResourceHandleManager::downloadTimerCallback):
681         (WebCore::ResourceHandleManager::cancel):
682
683 2007-12-13  Sam Weinig  <sam@webkit.org>
684
685         Reviewed by Mark Rowe.
686
687         Fix typos and rename InspectorController::moveByUnrestricted to InspectorController::moveWindowBy.
688
689         * page/InspectorController.cpp:
690         (WebCore::moveByUnrestricted):
691         (WebCore::InspectorController::windowScriptObjectAvailable):
692         (WebCore::InspectorController::moveWindowBy):
693         * page/InspectorController.h:
694         * page/inspector/inspector.js:
695
696 2007-12-13  Dan Bernstein  <mitz@apple.com>
697
698         Reviewed by Dave Hyatt.
699
700         - fix <rdar://problem/5642426> explicit cubic-bezier curves all treated as "default" for transition-timing-function
701
702         Test: fast/css/transition-timing-function.html
703
704         * css/CSSStyleSelector.cpp: Changed the HANDLE_MULTILAYER_VALUE macro to
705         not reject non-primitive non-list values, and instead made sure that the
706         mapping functions rejected them if necessary. This allows non-primitive
707         timing functions to be mapped.
708         (WebCore::CSSStyleSelector::mapBackgroundAttachment):
709         (WebCore::CSSStyleSelector::mapBackgroundClip):
710         (WebCore::CSSStyleSelector::mapBackgroundComposite):
711         (WebCore::CSSStyleSelector::mapBackgroundOrigin):
712         (WebCore::CSSStyleSelector::mapBackgroundImage):
713         (WebCore::CSSStyleSelector::mapBackgroundRepeat):
714         (WebCore::CSSStyleSelector::mapBackgroundXPosition):
715         (WebCore::CSSStyleSelector::mapBackgroundYPosition):
716         (WebCore::CSSStyleSelector::mapTransitionDuration):
717         (WebCore::CSSStyleSelector::mapTransitionRepeatCount):
718         (WebCore::CSSStyleSelector::mapTransitionTimingFunction):
719         (WebCore::CSSStyleSelector::mapTransitionProperty):
720         * css/CSSTimingFunctionValue.cpp:
721         (WebCore::CSSTimingFunctionValue::cssText): Implemented for use in the
722         regression test.
723         * css/CSSTimingFunctionValue.h:
724         (WebCore::CSSTimingFunctionValue::isTransitionTimingFunctionValue):
725         Added. Returns true.
726         * css/CSSValue.h:
727         (WebCore::CSSValue::isTransitionTimingFunctionValue): Added. Returns
728         false.
729
730 2007-12-13  Steve Falkenburg  <sfalken@apple.com>
731
732         Move source file generation into its own vcproj to fix build dependencies.
733
734         Reviewed by Adam.
735
736         * WebCore.vcproj/WebCore.make:
737         * WebCore.vcproj/WebCore.sln:
738         * WebCore.vcproj/WebCore.submit.sln:
739         * WebCore.vcproj/WebCore.vcproj:
740         * WebCore.vcproj/WebCoreGenerated.vcproj: Added.
741
742 2007-12-13  Justin Garcia  <justin.garcia@apple.com>
743
744         Reviewed by Oliver Hunt.
745         
746         <rdar://problem/4145786> Undoing a color change of text in a compose window always changes it back to black
747         
748         Some of the operations performed in removeHTMLFontStyle were non-undoable.
749         
750         I'm having trouble writing a layout test for this because I can't get DRT to
751         perform editing operations in separate Undo steps without adding unacceptably long
752         wait times between operations.  I filed:
753         
754         <rdar://problem/5646779> Can't get DRT to perform editing operations in separate Undo steps
755
756         * editing/ApplyStyleCommand.cpp:
757         (WebCore::ApplyStyleCommand::removeHTMLFontStyle):
758
759 2007-12-13  Sam Weinig  <sam@webkit.org>
760
761         Reviewed by Anders.
762
763         Fix for http://bugs.webkit.org/show_bug.cgi?id=16352
764         Toolbar dragged inspector cannot be moved beyond screen edges
765
766         * page/InspectorController.cpp:
767         (WebCore::moveByUnrestricted):
768         (WebCore::InspectorController::windowScriptObjectAvailable):
769         (WebCore::InspectorController::moveByUnrestricted):
770         * page/InspectorController.h:
771         * page/inspector/inspector.js:
772
773 2007-12-13  Adam Roben  <aroben@apple.com>
774
775         Fix <rdar://5517707> Crash on wptv.wp.pl when "make bigger" button is clicked
776
777         Windows Media Player has a modal message loop that will deliver
778         messages to us at inappropriate times and we will crash if we handle
779         them when they are delivered. In PluginViewWin, we add a quirk for
780         Media Player to set a flag whenever we give the plugin a chance to
781         execute code, and in SharedTimerWin we check if the plugin is
782         executing code and repost messages if so.
783
784         Reviewed by Anders.
785
786         * platform/win/SharedTimerWin.cpp:
787         (WebCore::TimerWindowWndProc): Repost messages if we're calling a
788         plugin.
789         * plugins/win/PluginViewWin.cpp: Surround all calls to the plugin with
790         setCallingPlugin(true/false).
791         (WebCore::PluginViewWin::updateWindow):
792         (WebCore::PluginViewWin::dispatchNPEvent):
793         (WebCore::PluginViewWin::setNPWindowRect):
794         (WebCore::PluginViewWin::start):
795         (WebCore::PluginViewWin::stop):
796         (WebCore::PluginViewWin::performRequest):
797         (WebCore::PluginViewWin::bindingInstance):
798         (WebCore::PluginViewWin::determineQuirks):
799         (WebCore::PluginViewWin::setCallingPlugin): Added.
800         (WebCore::PluginViewWin::isCallingPlugin): Added.
801         * plugins/win/PluginViewWin.h: Added a new quirk.
802
803 2007-12-13  Alp Toker  <alp@atoker.com>
804
805         Add a missing DEPENDPATH. Fixes non-clean builds following networking
806         header changes.
807
808         * WebCore.pro:
809
810 2007-12-13  Dan Bernstein  <mitz@apple.com>
811
812         Reviewed by Anders Carlsson.
813
814         - fix regression in fast/text/international/bidi-override on Tiger
815
816         * platform/graphics/GlyphPageTreeNode.cpp:
817         (WebCore::GlyphPageTreeNode::initializePage): Add bidi overrides here
818         too. I forgot to add them when I added them to treatAsZeroWidthSpace in
819         an earlier patch.
820
821 2007-12-13  Justin Garcia  <justin.garcia@apple.com>
822
823         Reviewed by Darin Adler.
824
825         <rdar://problem/5601583> GMail Editor: Copied link doesn't paste as a link, just colored text
826         
827         The code that checks the selected Range to see if it's inside an anchor
828         checks ancestors of the Range's commonAncestor() but not the
829         commonAncestor() itself, and so we'd fail to add markup for the enclosing
830         anchor to the pasteboard.
831         
832         Some enclosing element getters check the node passed to the getter and some
833         don't.  There were a few places where we incorrectly assumed that enclosing 
834         element getters check the node passed to the getter, but this is the only 
835         case that I'm able to write a test case for at the moment.
836         
837         In this patch I've:
838         Changed enclosingNodeWithType and enclosingNodeWithTag to take in positions,
839         like the newer enclosing element getters.  This is important because we must
840         soon add code to the getters so that they understand that some editing positions
841         inside nodes don't actually refer to positions inside those nodes but positions
842         before and after them.  Like [table, 0].
843         Changed enclosingNodeWithType and enclosingNodeWithTag to check nodes starting with
844         n where [n, o] is the position passed to the getter, instead of starting the the parent
845         of n.  This makes all but a few of the enclosing element getters behave consistently.
846         Changed enclosingNodeWithType and enclosingNodeWithTag to not return non-editable 
847         nodes if the input position was editable.  This fixes a bug that that the above change
848         exposed.
849         Changed enclosingTableCell to simply call enclosingNodeWithType.  We should do
850         this for the rest of the getters, or simply remove them in favor of enclosingNodeWithType
851         unless doing so would affect readability, like it would in the case of enclosingTableCell.
852         Ditto for enclosingBlock.
853
854         * editing/AppendNodeCommand.cpp:
855         (WebCore::AppendNodeCommand::doApply):
856         * editing/DeleteButtonController.cpp:
857         (WebCore::enclosingDeletableElement):
858         * editing/DeleteSelectionCommand.cpp:
859         (WebCore::DeleteSelectionCommand::initializePositionData):
860         (WebCore::DeleteSelectionCommand::saveFullySelectedAnchor):
861         * editing/Editor.cpp:
862         (WebCore::Editor::selectionUnorderedListState):
863         (WebCore::Editor::selectionOrderedListState):
864         * editing/IndentOutdentCommand.cpp:
865         (WebCore::IndentOutdentCommand::prepareBlockquoteLevelForInsertion):
866         (WebCore::IndentOutdentCommand::outdentParagraph):
867         * editing/InsertNodeBeforeCommand.cpp:
868         (WebCore::InsertNodeBeforeCommand::doApply):
869         * editing/InsertParagraphSeparatorCommand.cpp:
870         (WebCore::InsertParagraphSeparatorCommand::doApply):
871         * editing/ReplaceSelectionCommand.cpp:
872         (WebCore::ReplaceSelectionCommand::shouldMerge):
873         (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds):
874         (WebCore::ReplaceSelectionCommand::positionAtEndOfInsertedContent):
875         * editing/TextIterator.cpp:
876         * editing/htmlediting.cpp:
877         (WebCore::enclosingBlock):
878         (WebCore::enclosingNodeWithTag):
879         (WebCore::enclosingNodeOfType):
880         (WebCore::enclosingTableCell):
881         (WebCore::isTableCell):
882         * editing/htmlediting.h:
883         * editing/markup.cpp:
884         (WebCore::appendStartMarkup):
885         (WebCore::createMarkup):
886
887 2007-12-13  Alexey Proskuryakov  <ap@webkit.org>
888
889         Reviewed by Darin.
890
891         Turn on keyboard event processing quirks for feed views and old applications on Mac OS X.
892
893         * WebCore.base.exp:
894         * dom/KeyboardEvent.cpp:
895         (WebCore::KeyboardEvent::charCode):
896         * page/EventHandler.cpp:
897         (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks):
898         (WebCore::EventHandler::keyEvent):
899         * page/EventHandler.h:
900         * page/Settings.cpp:
901         (WebCore::Settings::Settings):
902         (WebCore::Settings::setNeedsKeyboardEventDisambiguationQuirks):
903         * page/Settings.h:
904         (WebCore::Settings::needsKeyboardEventDisambiguationQuirks):
905         * page/mac/EventHandlerMac.mm:
906         (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks):
907         * platform/PlatformKeyboardEvent.h:
908         * platform/mac/KeyEventMac.mm:
909         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
910         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
911
912 2007-12-13  Dan Bernstein  <mitz@apple.com>
913
914         - build fix
915
916         * platform/network/cf/ResourceErrorCF.cpp:
917
918 2007-12-13  Antti Koivisto  <antti@apple.com>
919
920         Reviewed by Tim Hatcher.
921
922         Fix <rdar://problem/5605674> 
923         Make <video> display WebKit context menu instead of the QTKit one.
924     
925         It doesn't really matter where the QTMovieView is.
926
927         * ChangeLog:
928         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
929         (WebCore::MediaPlayerPrivate::createQTMovieView):
930         (WebCore::MediaPlayerPrivate::setRect):
931
932 2007-12-13  Dan Bernstein  <mitz@apple.com>
933
934         Reviewed by Adam Roben.
935
936         - ensure that Unicode bidi control characters are rendered as zero width
937           spaces
938
939         Test: fast/text/international/bidi-control-chars-treated-as-ZWS.html
940
941         * platform/graphics/Font.h:
942         (WebCore::Font::treatAsZeroWidthSpace):
943         * platform/graphics/GlyphPageTreeNode.cpp:
944         (WebCore::GlyphPageTreeNode::initializePage):
945         * platform/text/CharacterNames.h:
946
947 2007-12-13  Brady Eidson  <beidson@apple.com>
948
949         Build fix
950
951         * platform/wx/TemporaryLinkStubs.cpp:
952
953 2007-12-12  Brady Eidson  <beidson@apple.com>
954
955         Build fix
956
957         * platform/gtk/TemporaryLinkStubs.cpp:
958
959 2007-12-12  Brady Eidson  <beidson@apple.com>
960
961         Build fix
962
963         * WebCore.pro:
964         * history/qt/CachedPageQt.cpp: Removed. Whole purpose for this method being platform-specific has been removed
965
966 2007-12-12  Brady Eidson  <beidson@apple.com>
967
968         Build fix
969
970         * platform/win/TemporaryLinkStubs.cpp:
971
972 2007-12-12  Brady Eidson  <beidson@apple.com>
973
974         Reviewed by Sam Weinig
975
976         Fix for <rdar://problem/4886844> and lay groundwork for <rdar://problem/4516170> (Back/Forward Cache on Windows)
977
978         All back/forward list and page cache related items used to be in WebKit.
979         When they were pushed into WebCore, some sloppy compromises were made to keep the Back/Forward cache working on Mac.
980         Namely, a WebCore::HistoryItem had to know how to keep a WebDocumentView alive.  We accomplished this via some #ifdefs
981         in CachedPage and having the Mac-only CachedPageMac.mm
982
983         To get rid of that nastiness and pave the way for adding Back/Forward cache on other platforms, this patch adds the 
984         concept of "CachedPagePlatformData" which can contain anything the platform API wants.  
985
986         I also took the opportunity to do other cleanup and renaming client methods to better fit their new purposes.
987
988         * WebCore.base.exp:
989         * WebCore.xcodeproj/project.pbxproj:
990
991         * history/CachedPage.cpp:
992         (WebCore::CachedPage::~CachedPage): Combined "close()" and "clear()" to just "clear()" - call it from here.
993         (WebCore::CachedPage::clear): Call clear() on the CachedPagePlatformData if it exists.  Also delete the CachedPagePlatformData.
994         (WebCore::CachedPage::setCachedPagePlatformData):
995         (WebCore::CachedPage::cachedPagePlatformData):
996         * history/CachedPage.h:
997
998         * history/CachedPagePlatformData.h: Added.
999         (WebCore::CachedPagePlatformData::~CachedPagePlatformData): Virtual d'tor.
1000         (WebCore::CachedPagePlatformData::clear): Virtual method for platforms that need to do cleanup at the same time as CachedPage::clear().
1001
1002         * history/PageCache.cpp:
1003         (WebCore::PageCache::releaseAutoreleasedPagesNow): Call "clear()" instead of "close()"
1004
1005         * history/mac/CachedPageMac.mm: Removed. Functionality replaced with CachedPagePlatformData.
1006
1007         * loader/FrameLoader.cpp:
1008         (WebCore::FrameLoader::transitionToCommitted): Call the new client methods.  Make some work previously done by WebKitMac cross platform 
1009           (setting the cached DocumentLoader to the Frame).
1010         (WebCore::FrameLoader::cachePageForHistoryItem):  Renamed the client methods
1011
1012         * loader/FrameLoaderClient.h:  The very Mac-centric "makeDocumentView", "setDocumentViewFromCachedPage", and "saveDocumentViewToCachedPage"
1013           become "transitionToCommittedForNewPage", "transitionToCommittedFromCachedPage", and "savePlatformDataToCachedPage" accordingly
1014
1015         * svg/graphics/SVGImageEmptyClients.h:
1016         (WebCore::SVGEmptyFrameLoaderClient::savePlatformDataToCachedPage):
1017         (WebCore::SVGEmptyFrameLoaderClient::transitionToCommittedFromCachedPage):
1018         (WebCore::SVGEmptyFrameLoaderClient::transitionToCommittedForNewPage):
1019
1020 2007-12-12  Dan Bernstein  <mitz@apple.com>
1021
1022         Reviewed by Oliver Hunt.
1023
1024         - fix <rdar://problem/5074620> text with font:initial; fails to appear (causes fast/text/font-initial.html to fail)
1025
1026         * css/CSSStyleSelector.cpp:
1027         (WebCore::CSSStyleSelector::applyProperty): When the font property is
1028         set to 'initial', set the font size to its initial value, 'medium',
1029         and the font family to the standard family.
1030
1031 2007-12-12  Justin Garcia  <justin.garcia@apple.com>
1032
1033         Reviewed by Darin Adler.
1034
1035         <rdar://problem/5433862> Mail crashes at WebCore::highestAncestor() when deleting a particular selection
1036
1037         * editing/DeleteSelectionCommand.cpp:
1038         (WebCore::DeleteSelectionCommand::removePreviouslySelectedEmptyTableRows):
1039         Don't remove the table row that contained the end of the selection if it is where we are
1040         about to place the ending selection.
1041         Don't remove all empty rows after the row that contained the start of the selection,
1042         they might come after the row that contained the end of the selection.
1043
1044 2007-12-12  Sam Weinig  <sam@webkit.org>
1045
1046         Reviewed by Anders Carlsson.
1047
1048         Add button to clear the Web Inspector's console.
1049
1050         * English.lproj/InspectorLocalizedStrings.js:
1051         * page/inspector/ConsolePanel.js:
1052         * page/inspector/inspector.css:
1053
1054 2007-12-12  Anders Carlsson  <andersca@apple.com>
1055
1056         Reviewed by Adam and Jon.
1057
1058         <rdar://problem/5349282>
1059         popup blocking is not applied to plugins on Windows.
1060         
1061         Implement popup blocking. If the plug-in supports the new 
1062         NPN_PushPopupsEnabledState/NPN_PopPopupsEnabledState API we just use that
1063         to determine if a plug-in request can open new windows.
1064         
1065         If a plug-in does not support the new API, we assume that a plug-in can open new windows
1066         in response to either mouse click or key press events.
1067         
1068         * plugins/win/PluginViewWin.cpp:
1069         (WebCore::PluginRequestWin::PluginRequestWin):
1070         (WebCore::PluginRequestWin::shouldAllowPopups):
1071         Add new shouldAllowPopups member.
1072         
1073         (WebCore::PluginViewWin::popPopupsStateTimerFired):
1074         Reset the popup state.
1075         
1076         (WebCore::isWindowsMessageUserGesture):
1077         New function that given a windows message id returns whether it's a user gesture or not.
1078         
1079         (WebCore::PluginViewWin::wndProc):
1080         Allow popups if the window message is a user gesture.
1081         
1082         (WebCore::PluginViewWin::dispatchNPEvent):
1083         New method that dispatches an NPEvent, turning on popups if necessary.
1084         
1085         (WebCore::PluginViewWin::paint):
1086         (WebCore::PluginViewWin::handleKeyboardEvent):
1087         (WebCore::PluginViewWin::handleMouseEvent):
1088         Call dispatchNPEvent().
1089         
1090         (WebCore::PluginViewWin::performRequest):
1091         (WebCore::PluginViewWin::load):
1092         Add calls to shouldAllowPopups().
1093         
1094         (WebCore::PluginViewWin::pushPopupsEnabledState):
1095         (WebCore::PluginViewWin::popPopupsEnabledState):
1096         New methods that maintain the popup state stack.
1097         
1098         (WebCore::PluginViewWin::arePopupsAllowed):
1099         New method that returns whether popups are allowed.
1100         
1101         (WebCore::PluginViewWin::PluginViewWin):
1102         * plugins/win/PluginViewWin.h:
1103         Add new instance variables.
1104         
1105         * plugins/win/npapi.cpp:
1106         (NPN_PushPopupsEnabledState):
1107         (NPN_PopPopupsEnabledState):
1108         Implement these.
1109
1110 2007-12-12  Dan Bernstein  <mitz@apple.com>
1111
1112         Reviewed by John Sullivan.
1113
1114         - fix a bug in debug builds only where selecting an earlier item in
1115           a popup selects the first item
1116
1117         Test: fast/forms/menulist-selection-reset.html
1118
1119         * html/HTMLSelectElement.cpp:
1120         (WebCore::HTMLSelectElement::recalcListItems): Added an argument that
1121         tells that function whether it should update the selected state of
1122         option elements.
1123         (WebCore::HTMLSelectElement::checkListItems): Changed to pass false
1124         as the above argument.
1125         * html/HTMLSelectElement.h:
1126
1127 2007-12-12  Adele Peterson  <adele@apple.com>
1128
1129         Reviewed by Geoff.
1130
1131         Fix for <rdar://problem/5643054> Remove cue point implementation for media elements
1132
1133         When the specification for cue ranges is more final, we will implement those.
1134
1135         * html/HTMLMediaElement.cpp:
1136         (WebCore::HTMLMediaElement::~HTMLMediaElement):
1137         (WebCore::HTMLMediaElement::load):
1138         * html/HTMLMediaElement.h:
1139         * html/HTMLMediaElement.idl:
1140         * platform/graphics/MediaPlayer.cpp:
1141         * platform/graphics/MediaPlayer.h:
1142         (WebCore::MediaPlayerClient::mediaPlayerTimeChanged):
1143         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1144         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1145         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
1146         (WebCore::MediaPlayerPrivate::load):
1147         (WebCore::MediaPlayerPrivate::play):
1148         (WebCore::MediaPlayerPrivate::pause):
1149         (WebCore::MediaPlayerPrivate::setEndTime):
1150         (WebCore::MediaPlayerPrivate::startEndPointTimerIfNeeded):
1151         (WebCore::MediaPlayerPrivate::endPointTimerFired):
1152         (WebCore::MediaPlayerPrivate::timeChanged):
1153         (WebCore::MediaPlayerPrivate::didEnd):
1154         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
1155         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
1156         (WebCore::MediaPlayerPrivate::startEndPointTimerIfNeeded):
1157         (WebCore::MediaPlayerPrivate::endPointTimerFired):
1158         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
1159
1160 2007-12-12  MorganL  <morganl.webkit@yahoo.com>
1161
1162         Reviewed by Maciej.
1163
1164         Fixes:
1165         http://bugs.webkit.org/show_bug.cgi?id=16408
1166
1167         When navigating back/forward to a http:// link, we should prefer to
1168         load from cache if possible.
1169
1170         * loader/FrameLoader.cpp:
1171
1172 2007-12-12  Anders Carlsson  <andersca@apple.com>
1173
1174         Reviewed by Sam.
1175
1176         <rdar://problem/5132003>
1177         dumpResourceLoadCallbacks is not implemented in DRT on Windows.
1178         
1179         * platform/network/cf/ResourceErrorCF.cpp:
1180         (WebCore::ResourceError::unpackPlatformError):
1181         Handle kCFErrorDomainWinSock.
1182         
1183         * platform/network/cf/ResourceHandleCFNet.cpp:
1184         (WebCore::willSendRequest):
1185         Ignore willSendRequest calls where the redirect response is null, like we do in 
1186         the Mac version.
1187
1188 2007-12-12  Steve Falkenburg  <sfalken@apple.com>
1189
1190         <rdar://problem/5643785> Fix iBench regression caused by mis-placed nested timer check.
1191         
1192         Reviewed by Anders.
1193
1194         * platform/win/SharedTimerWin.cpp:
1195         (WebCore::TimerWindowWndProc): Don't set high-resolution timer flag inside non-high-resolution timer proc.
1196
1197 2007-12-12  Beth Dakin  <bdakin@apple.com>
1198
1199         Reviewed by Oliver.
1200
1201         Fix for <rdar://problem/5643770> REGRESSION: Free-standing SVGs 
1202         with width and height 100% clip to 300 x 150
1203
1204         Though it was correct in an earlier iteration of my patch, it is 
1205         not sufficient in the final, committed version to ask if the 
1206         relativeWidthValue() or relativeHeightValue() is greater than 0 
1207         just to determine if one has been set, for, they are now 
1208         initialized to 300 and 150 respectively! This patch instead adds a 
1209         bool to keep track of whether a container size has been set, and 
1210         only used the relative value if it has.
1211
1212         * rendering/RenderSVGRoot.cpp:
1213         (WebCore::RenderSVGRoot::calcViewport):
1214         * svg/SVGSVGElement.cpp:
1215         (WebCore::SVGSVGElement::SVGSVGElement):
1216         * svg/SVGSVGElement.h:
1217         (WebCore::SVGSVGElement::setContainerSize):
1218         (WebCore::SVGSVGElement::hasSetContainerSize):
1219
1220 2007-12-12  Brady Eidson  <beidson@apple.com>
1221
1222         Reviewed by Steve Falkenburg 
1223
1224         <rdar://problem/5012636> - WebURLProtectionSpace::realm returns the hostname rather than the authentication realm
1225
1226         * platform/network/ProtectionSpace.cpp:
1227         (WebCore::ProtectionSpace::ProtectionSpace): Assign the realm to m_realm, instead of the host
1228
1229 2007-12-12  Alp Toker  <alp@atoker.com>
1230
1231         Reviewed by Maciej.
1232
1233         http://bugs.webkit.org/show_bug.cgi?id=16388
1234         [GTK] Widget::setCursor() gets called frequently
1235
1236         Cache the current cursor to avoid calling gdk_window_set_cursor() when
1237         there's no change in cursor.
1238
1239         * platform/gtk/WidgetGtk.cpp:
1240         (WebCore::Widget::Widget):
1241         (WebCore::Widget::cursor):
1242         (WebCore::Widget::setCursor):
1243
1244 2007-12-12  Rodney Dawes  <dobey@wayofthemonkey.com>
1245
1246         Reviewed by Maciej.
1247
1248         http://bugs.webkit.org/show_bug.cgi?id=16342
1249         Build Warning and Error fixes in WebCore GTK+
1250
1251         Use C-style casts for casting function pointers to gpointer
1252         Use static_cast<int> to cast a float to int to fix a warning
1253
1254         * platform/gtk/PlatformScrollBarGtk.cpp:
1255         (PlatformScrollbar::PlatformScrollbar):
1256         (PlatformScrollbar::~PlatformScrollbar):
1257         (PlatformScrollbar::gtkValueChanged):
1258         * platform/gtk/ThreadingGtk.cpp:
1259         (callFunctionOnMainThread):
1260         (callOnMainThread):
1261
1262 2007-12-12  Dan Bernstein  <mitz@apple.com>
1263
1264         Reviewed by Darin Adler.
1265
1266         - better fix for a crash when pressing a key that is not associated
1267           with a command
1268
1269         * editing/EditorCommand.cpp:
1270         (WebCore::Editor::command): Return the empty command if the command name
1271         is empty.
1272
1273 2007-12-12  Alexey Proskuryakov  <ap@webkit.org>
1274
1275         Reviewed by Darin.
1276
1277         http://bugs.webkit.org/show_bug.cgi?id=16410
1278         Implement isKeypadEvent() on Windows
1279
1280         Test: platform/win/fast/events/keyLocation-numpad.html
1281
1282         * platform/win/KeyEventWin.cpp:
1283         (WebCore::isKeypadEvent): Added.
1284         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): Also fixed a mistake with autorepeat.
1285
1286 2007-12-12  Oliver Hunt  <oliver@apple.com>
1287
1288         Reviewed by Maciej.
1289
1290         <rdar://problem/5071781> window.mouseout events are not sent 
1291         to window when mouse moves out of window 
1292
1293         Make PlatformMouseEvent recognise WM_MOUSELEAVE.
1294
1295         * platform/win/PlatformMouseEventWin.cpp:
1296         (WebCore::messageToEventType):
1297         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
1298
1299 2007-12-12  Sam Weinig  <sam@webkit.org>
1300
1301         Fix Mac release build.
1302
1303         * WebCore.base.exp:
1304
1305 2007-12-12  Sam Weinig  <sam@webkit.org>
1306
1307         Build fix for Qt, Gtk, and Wx.
1308
1309         * css/CSSParser.cpp:
1310         (WebCore::CSSParser::parseValue):
1311         * loader/win/FrameLoaderWin.cpp:
1312         (WebCore::FrameLoader::urlSelected):
1313         * platform/network/curl/ResourceHandleManager.cpp:
1314         (WebCore::parseDataUrl):
1315         (WebCore::ResourceHandleManager::startJob):
1316         * platform/network/win/CookieJarWin.cpp:
1317         (WebCore::setCookies):
1318         (WebCore::cookies):
1319         * platform/network/win/ResourceHandleWin.cpp:
1320         (WebCore::ResourceHandle::start):
1321         * platform/qt/PasteboardQt.cpp:
1322         (WebCore::Pasteboard::writeURL):
1323
1324 2007-12-11  Dan Bernstein  <mitz@apple.com>
1325
1326         Reviewed by Maciej Stachowiak.
1327
1328         - allow non-integer font sizes on Windows for small caps
1329
1330         * platform/graphics/win/FontDataWin.cpp:
1331         (WebCore::FontData::smallCapsFontData):
1332         * platform/graphics/win/FontPlatformData.h:
1333         (WebCore::FontPlatformData::size):
1334         (WebCore::FontPlatformData::setSize):
1335         * platform/graphics/win/FontPlatformDataWin.cpp:
1336         (WebCore::FontPlatformData::FontPlatformData):
1337
1338 2007-12-11  Sam Weinig  <sam@webkit.org>
1339
1340         Build fix for Qt, Gtk, and Wx.
1341
1342         * platform/gtk/CookieJarGtk.cpp:
1343         (WebCore::setCookies):
1344         (WebCore::cookies):
1345         * platform/qt/ClipboardQt.cpp:
1346         (WebCore::ClipboardQt::writeURL):
1347         * platform/qt/CookieJarQt.cpp:
1348         (WebCore::setCookies):
1349         (WebCore::cookies):
1350         * platform/wx/PasteboardWx.cpp:
1351         (WebCore::Pasteboard::writeURL):
1352
1353 2007-12-11  Sam Weinig  <sam@webkit.org>
1354
1355         Reviewed by Darin Adler.
1356
1357         Scrub URL out of the tree in preparation for renaming KURL to URL.
1358             - Renames Document::URL() -> Document::url()
1359             - Renames DocumentLoader::URL() -> DocumentLoader::url()
1360             - Renames KURL::url() to KURL::string() and KURL::deprecatedString()
1361             - Remove FrameLoader::URL()
1362             - Various variable renames.
1363
1364         The change from Document::URL() to Document::url() required changes
1365         to the bindings scripts as well, because URL() is the name of a DOM
1366         method.  The code generation scripts now have code to special case URL()
1367         to url().
1368
1369         * WebCore.base.exp:
1370         * bindings/js/kjs_events.cpp:
1371         (WebCore::JSLazyEventListener::parseCode):
1372         * bindings/js/kjs_navigator.cpp:
1373         (KJS::Navigator::getValueProperty):
1374         * bindings/js/kjs_proxy.cpp:
1375         (WebCore::KJSProxy::initScript):
1376         * bindings/js/kjs_window.cpp:
1377         (KJS::Window::put):
1378         (KJS::Window::allowsAccessFrom):
1379         (KJS::Location::put):
1380         (KJS::LocationProtoFuncReplace::callAsFunction):
1381         (KJS::LocationProtoFuncReload::callAsFunction):
1382         (KJS::LocationProtoFuncAssign::callAsFunction):
1383         * bindings/scripts/CodeGenerator.pm:
1384         * bindings/scripts/CodeGeneratorCOM.pm:
1385         * bindings/scripts/CodeGeneratorJS.pm:
1386         * bindings/scripts/CodeGeneratorObjC.pm:
1387         * css/CSSImportRule.cpp:
1388         (WebCore::CSSImportRule::insertedIntoParent):
1389         * css/CSSParser.cpp:
1390         (WebCore::CSSParser::parseValue):
1391         (WebCore::CSSParser::parseContent):
1392         (WebCore::CSSParser::parseBackgroundImage):
1393         (WebCore::CSSParser::parseFontFaceSrc):
1394         (WebCore::CSSParser::parseBorderImage):
1395         (WebCore::CSSParser::createImportRule):
1396         * css/CSSStyleSelector.cpp:
1397         (WebCore::CSSStyleSelector::setEncodedURL):
1398         * dom/Document.cpp:
1399         (WebCore::Document::processHttpEquiv):
1400         (WebCore::Document::cookie):
1401         (WebCore::Document::setCookie):
1402         (WebCore::Document::domain):
1403         (WebCore::Document::setDomain):
1404         (WebCore::Document::getImageMap):
1405         (WebCore::Document::completeURL):
1406         * dom/Document.h:
1407         (WebCore::Document::url):
1408         (WebCore::Document::baseURL):
1409         * dom/Element.cpp:
1410         (WebCore::Element::baseURI):
1411         * dom/ProcessingInstruction.h:
1412         * dom/StyledElement.cpp:
1413         (WebCore::StyledElement::addCSSImageProperty):
1414         * dom/StyledElement.h:
1415         * dom/XMLTokenizer.cpp:
1416         (WebCore::XMLTokenizer::endElementNs):
1417         (WebCore::XMLTokenizer::end):
1418         (WebCore::):
1419         * dom/XMLTokenizer.h:
1420         * editing/Editor.cpp:
1421         (WebCore::Editor::copy):
1422         * editing/markup.cpp:
1423         (WebCore::completeURLs):
1424         * history/CachedPage.h:
1425         (WebCore::CachedPage::url):
1426         * history/HistoryItem.cpp:
1427         (WebCore::HistoryItem::HistoryItem):
1428         (WebCore::HistoryItem::setURL):
1429         (WebCore::HistoryItem::isCurrentDocument):
1430         * html/HTMLBaseElement.cpp:
1431         (WebCore::HTMLBaseElement::process):
1432         * html/HTMLParser.cpp:
1433         (WebCore::HTMLParser::reportErrorToConsole):
1434         * html/HTMLScriptElement.cpp:
1435         (WebCore::HTMLScriptElement::childrenChanged):
1436         (WebCore::HTMLScriptElement::insertedIntoDocument):
1437         (WebCore::HTMLScriptElement::evaluateScript):
1438         * html/HTMLScriptElement.h:
1439         * html/HTMLTokenizer.cpp:
1440         (WebCore::HTMLTokenizer::scriptExecution):
1441         * loader/Cache.cpp:
1442         (WebCore::createResource):
1443         (WebCore::Cache::requestResource):
1444         * loader/CachedCSSStyleSheet.cpp:
1445         (WebCore::CachedCSSStyleSheet::checkNotify):
1446         * loader/CachedResource.cpp:
1447         (WebCore::CachedResource::CachedResource):
1448         * loader/CachedResource.h:
1449         (WebCore::CachedResource::):
1450         * loader/CachedScript.h:
1451         * loader/DocLoader.cpp:
1452         (WebCore::DocLoader::checkForReload):
1453         (WebCore::DocLoader::requestResource):
1454         * loader/DocumentLoader.cpp:
1455         (WebCore::DocumentLoader::url):
1456         (WebCore::DocumentLoader::replaceRequestURLForAnchorScroll):
1457         (WebCore::DocumentLoader::setRequest):
1458         (WebCore::DocumentLoader::startLoadingMainResource):
1459         * loader/DocumentLoader.h:
1460         * loader/FrameLoader.cpp:
1461         (WebCore::FormSubmission::FormSubmission):
1462         (WebCore::ScheduledRedirection::ScheduledRedirection):
1463         (WebCore::FrameLoader::changeLocation):
1464         (WebCore::FrameLoader::urlSelected):
1465         (WebCore::FrameLoader::requestFrame):
1466         (WebCore::FrameLoader::loadSubframe):
1467         (WebCore::FrameLoader::submitFormAgain):
1468         (WebCore::FrameLoader::submitForm):
1469         (WebCore::FrameLoader::didExplicitOpen):
1470         (WebCore::FrameLoader::replaceContentsWithScriptResult):
1471         (WebCore::FrameLoader::executeScript):
1472         (WebCore::FrameLoader::receivedFirstData):
1473         (WebCore::FrameLoader::begin):
1474         (WebCore::FrameLoader::startIconLoader):
1475         (WebCore::FrameLoader::commitIconURLToIconDatabase):
1476         (WebCore::FrameLoader::scheduleRefresh):
1477         (WebCore::FrameLoader::redirectionTimerFired):
1478         (WebCore::FrameLoader::loadPlugin):
1479         (WebCore::FrameLoader::didNotOpenURL):
1480         (WebCore::FrameLoader::updatePolicyBaseURL):
1481         (WebCore::FrameLoader::scrollToAnchor):
1482         (WebCore::FrameLoader::startRedirectionTimer):
1483         (WebCore::FrameLoader::load):
1484         (WebCore::FrameLoader::canLoad):
1485         (WebCore::FrameLoader::shouldHideReferrer):
1486         (WebCore::FrameLoader::shouldAllowNavigation):
1487         (WebCore::FrameLoader::commitProvisionalLoad):
1488         (WebCore::FrameLoader::clientRedirected):
1489         (WebCore::FrameLoader::open):
1490         (WebCore::FrameLoader::didTellBridgeAboutLoad):
1491         (WebCore::FrameLoader::haveToldBridgeAboutLoad):
1492         (WebCore::FrameLoader::post):
1493         (WebCore::FrameLoader::loadResourceSynchronously):
1494         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
1495         (WebCore::FrameLoader::shouldTreatURLAsSameAsCurrent):
1496         (WebCore::FrameLoader::createHistoryItem):
1497         (WebCore::FrameLoader::addBackForwardItemClippedAtTarget):
1498         (WebCore::FrameLoader::loadItem):
1499         (WebCore::FrameLoader::urlsMatchItem):
1500         (WebCore::FrameLoader::recursiveGoToItem):
1501         (WebCore::FrameLoader::updateHistoryForStandardLoad):
1502         (WebCore::FrameLoader::updateHistoryForRedirectWithLockedHistory):
1503         * loader/FrameLoader.h:
1504         (WebCore::FrameLoader::url):
1505         * loader/ImageDocument.cpp:
1506         (WebCore::ImageDocument::createDocumentStructure):
1507         * loader/MainResourceLoader.cpp:
1508         (WebCore::shouldLoadAsEmptyDocument):
1509         (WebCore::MainResourceLoader::didFinishLoading):
1510         * loader/NavigationAction.cpp:
1511         (WebCore::NavigationAction::NavigationAction):
1512         * loader/NavigationAction.h:
1513         (WebCore::NavigationAction::url):
1514         * loader/PluginDocument.cpp:
1515         (WebCore::PluginTokenizer::createDocumentStructure):
1516         * loader/SubresourceLoader.cpp:
1517         (WebCore::SubresourceLoader::load):
1518         (WebCore::SubresourceLoader::create):
1519         * loader/icon/IconLoader.cpp:
1520         (WebCore::IconLoader::startLoading):
1521         (WebCore::IconLoader::finishLoading):
1522         * loader/loader.cpp:
1523         (WebCore::Loader::servePendingRequests):
1524         * loader/mac/LoaderNSURLExtras.m:
1525         (urlOriginalData):
1526         * page/Chrome.cpp:
1527         (WebCore::Chrome::setToolTip):
1528         * page/ContextMenuController.cpp:
1529         (WebCore::ContextMenuController::contextMenuItemSelected):
1530         * page/Frame.cpp:
1531         (WebCore::Frame::setUserStyleSheetLocation):
1532         * page/InspectorController.cpp:
1533         (WebCore::InspectorResource::type):
1534         (WebCore::addSourceToFrame):
1535         (WebCore::InspectorController::addScriptResource):
1536         (WebCore::InspectorController::updateScriptResourceRequest):
1537         (WebCore::InspectorController::didCommitLoad):
1538         * page/mac/WebCoreFrameBridge.mm:
1539         (-[WebCoreFrameBridge getData:andResponse:forURL:]):
1540         * platform/KURL.h:
1541         (WebCore::KURL::string):
1542         (WebCore::KURL::deprecatedString):
1543         * platform/mac/ClipboardMac.mm:
1544         (WebCore::ClipboardMac::getData):
1545         * platform/mac/CookieJar.mm:
1546         (WebCore::cookies):
1547         (WebCore::setCookies):
1548         * platform/mac/PasteboardMac.mm:
1549         (WebCore::Pasteboard::writeURL):
1550         (WebCore::fileWrapperForImage):
1551         (WebCore::Pasteboard::writeImage):
1552         (WebCore::Pasteboard::plainText):
1553         * platform/network/ResourceHandle.cpp:
1554         (WebCore::ResourceHandle::portAllowed):
1555         * platform/network/ResourceRequestBase.cpp:
1556         (WebCore::ResourceRequestBase::isNull):
1557         * platform/network/cf/ResourceHandleCFNet.cpp:
1558         (WebCore::willSendRequest):
1559         (WebCore::didReceiveResponse):
1560         (WebCore::didReceiveData):
1561         (WebCore::didFinishLoading):
1562         (WebCore::didFail):
1563         (WebCore::didReceiveChallenge):
1564         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
1565         (WebCore::ResourceHandle::~ResourceHandle):
1566         (WebCore::ResourceHandle::start):
1567         * platform/win/ClipboardUtilitiesWin.cpp:
1568         (WebCore::createGlobalData):
1569         (WebCore::urlToMarkup):
1570         * platform/win/ClipboardWin.cpp:
1571         (WebCore::writeURL):
1572         (WebCore::writeImageToDataObject):
1573         (WebCore::ClipboardWin::writeURL):
1574         (WebCore::ClipboardWin::writeRange):
1575         * platform/win/PasteboardWin.cpp:
1576         (WebCore::Pasteboard::writeSelection):
1577         (WebCore::Pasteboard::writeURL):
1578         * plugins/win/PluginDatabaseWin.cpp:
1579         (WebCore::PluginDatabaseWin::findPlugin):
1580         * plugins/win/PluginStreamWin.cpp:
1581         (WebCore::PluginStreamWin::startStream):
1582         (WebCore::PluginStreamWin::destroyStream):
1583         * plugins/win/PluginViewWin.cpp:
1584         (WebCore::scriptStringIfJavaScriptURL):
1585         (WebCore::PluginViewWin::performRequest):
1586         * svg/SVGImageLoader.cpp:
1587         (WebCore::SVGImageLoader::updateFromElement):
1588         * xml/XMLHttpRequest.cpp:
1589         (WebCore::XMLHttpRequest::getResponseXML):
1590         (WebCore::XMLHttpRequest::urlMatchesDocumentDomain):
1591         * xml/XSLImportRule.cpp:
1592         (WebCore::XSLImportRule::loadSheet):
1593         * xml/XSLTProcessor.cpp:
1594         (WebCore::XSLTProcessor::createDocumentFromSource):
1595         (WebCore::xsltStylesheetPointer):
1596         (WebCore::xmlDocPtrFromNode):
1597
1598 2007-12-11  Beth Dakin  <bdakin@apple.com>
1599
1600         Reviewed by Darin.
1601
1602         Fix for <rdar://problem/5641255> SVGs with width and height 100% 
1603         fail to render when used as background images
1604
1605         CachedImage now has a setImageContainerSize function. It is only 
1606         needed for SVG right now.
1607         * loader/CachedImage.cpp:
1608         (WebCore::CachedImage::setImageContainerSize):
1609         * loader/CachedImage.h:
1610
1611         Relatively sized SVGs have no intrinsic size. Because this call is 
1612         low-level enough that we cannot pass in the container size and get 
1613         the real size of the SVG, we need to know if it has relative 
1614         dimensions, and if so, we need to get the size from scaledTileSize.
1615         * platform/graphics/Image.cpp:
1616         (WebCore::Image::drawTiled):
1617         * platform/graphics/Image.h:
1618         (WebCore::Image::setContainerSize):
1619         (WebCore::Image::hasRelativeWidth):
1620         (WebCore::Image::hasRelativeHeight):
1621
1622         Re-factored calculateBackgroundSize a bit so that it returns an 
1623         IntSize. Made it a member function so that it can send m_width and 
1624         m_height along to setImageContainerSize.
1625         * rendering/RenderBox.cpp:
1626         (WebCore::RenderBox::calculateBackgroundSize):
1627         (WebCore::RenderBox::calculateBackgroundImageGeometry):
1628         * rendering/RenderBox.h:
1629
1630         Need to account for relatively sized SVGs in calcViewport()
1631         * rendering/RenderSVGRoot.cpp:
1632         (WebCore::RenderSVGRoot::calcViewport):
1633         
1634         Added new member variables to store the size of the SVG container. 
1635         relativeWidthValue() and relativeHeightValue() use the stored SVG 
1636         container size to correctly calculate the width and height of a 
1637         relatively sized SVG.
1638         * svg/SVGSVGElement.cpp:
1639         (WebCore::SVGSVGElement::SVGSVGElement):
1640         (WebCore::SVGSVGElement::setContainerSize):
1641         (WebCore::SVGSVGElement::relativeWidthValue):
1642         (WebCore::SVGSVGElement::relativeHeightValue):
1643         * svg/SVGSVGElement.h:
1644         (WebCore::SVGSVGElement::containerSize):
1645         
1646         Re-factored size calculations to use the size of the container.
1647         * svg/graphics/SVGImage.cpp:
1648         (WebCore::SVGImage::setContainerSize):
1649         (WebCore::SVGImage::size):
1650         (WebCore::SVGImage::hasRelativeWidth):
1651         (WebCore::SVGImage::hasRelativeHeight):
1652         * svg/graphics/SVGImage.h:
1653
1654 2007-12-11  Darin Adler  <darin@apple.com>
1655
1656         * editing/Editor.cpp:
1657         (WebCore::Editor::yankFromKillRing): Try to fix non-Mac builds by adding
1658         a missing return statement.
1659
1660 2007-12-11  Darin Adler  <darin@apple.com>
1661
1662         Reviewed by Geoff.
1663
1664         - exposed many new commands to the DOM Document executeCommand function by
1665           merging the JSEditor and Editor executeCommand implementations
1666         - replaced the execCommand function with a EditorCommand class
1667         - replaced the WTF::StrHash<> class template with the WebCore::StringHash class
1668         - replaced the WTF::CaseInsensitiveHash<> class template with the
1669           WebCore::CaseFoldingHash class
1670
1671         * WebCore.base.exp: Updated.
1672         * WebCore.pro: Added EditorCommand.cpp, removed JSEditor.cpp.
1673         * WebCore.vcproj/WebCore.vcproj: Ditto.
1674         * WebCore.xcodeproj/project.pbxproj: Ditto.
1675         * WebCoreSources.bkl: Ditto.
1676
1677         * dom/Document.cpp:
1678         (WebCore::Document::Document): Removed code to set up m_jsEditor.
1679         (WebCore::Document::~Document): Removed code to delete m_jsEditor.
1680         (WebCore::command): Added. Helper function that gets an Editor::Command.
1681         (WebCore::Document::executeCommand): Changed to use Editor::Command instead of
1682         JSEditor.
1683         (WebCore::Document::queryCommandEnabled): Ditto.
1684         (WebCore::Document::queryCommandIndeterm):
1685         (WebCore::Document::queryCommandState): Ditto.
1686         (WebCore::Document::queryCommandSupported): Ditto.
1687         (WebCore::Document::queryCommandValue): Ditto.
1688
1689         * dom/Document.h: Removed JSEditor, jsEditor, m_jsEditor. Changed to
1690         use CaseFoldingHash.
1691
1692         * editing/Editor.cpp:
1693         (WebCore::Editor::selectionForCommand): Renamed from selectionForEvent and
1694         made into a member function so it is accessible from the new EditorCommand.cpp file.
1695         Also changed to get the selection from the passed-in frame instead of from the
1696         page, because this should work on the targeted frame unless the event overrides it.
1697         (WebCore::Editor::handleKeypress): Updated for selectionForCommand change.
1698         (WebCore::Editor::handleInputMethodKeypress): Ditto.
1699         (WebCore::imageElementFromImageDocument): Renamed and changed to return
1700         a HTMLImageElement instead of a Node*.
1701         (WebCore::Editor::canCopy): Updated for name change.
1702         (WebCore::Editor::selectionUnorderedListState): Updated for TriState change.
1703         (WebCore::Editor::selectionOrderedListState): Ditto.
1704         (WebCore::Editor::selectionStartHasStyle): Make type of local more specific.
1705         (WebCore::updateState): Moved here from Frame.
1706         (WebCore::Editor::selectionHasStyle): Ditto.
1707         (WebCore::Editor::Editor): Initialize m_shouldStartNewKillRingSequence.
1708         (WebCore::Editor::insertTextWithoutSendingTextEvent): Updated for
1709         selectionForCommand change.
1710         (WebCore::Editor::copy): Updated for imageElementFromImageDocument change.
1711         (WebCore::Editor::toggleBold): Call the ToggleBold command via the command
1712         machinery since it's no longer in this file as a local function.
1713         (WebCore::Editor::toggleUnderline): Call the ToggleUnderline command.
1714         (WebCore::Editor::setBaseWritingDirection): Change type of argument and of
1715         local variable.
1716         (WebCore::Editor::addToKillRing): Moved here from EditorMac. Not useful
1717         without a kill ring, but it's relatively straightforward to implement one.
1718         (WebCore::Editor::appendToKillRing): Put default implementation here for
1719         platforms other than Mac. We should probably put a simple kill ring
1720         implementation here -- doesn't need to be shared with the OS oh platforms
1721         other than Mac.
1722         (WebCore::Editor::prependToKillRing): Ditto.
1723         (WebCore::Editor::yankFromKillRing): Ditto.
1724         (WebCore::Editor::startNewKillRingSequence): Ditto.
1725         (WebCore::Editor::setKillRingToYankedState): Ditto.
1726
1727         * editing/Editor.h: Moved the TriState enum here instead of inside the
1728         Frame class. Added EditorCommandSource enum. Moved selectionHasStyle
1729         here from the Frame class. Added Editor::Command class with five functions
1730         for the various things you can do with a command (execute it, check if it
1731         can be used, and its state and value). Changed hte parameter of
1732         setBaseWritingDirection to be a const String& rather than a String.
1733         Got rid of the kill-ring-related operations, but added the kill ring
1734         functions themselves. Made selectedRange() public. Made the
1735         m_startNewKillRingSequence not Mac-specific and added "should" to its
1736         name.
1737
1738         * editing/EditorCommand.cpp: Copied from WebCore/editing/Editor.cpp.
1739         Retained only the editing commands.
1740         (WebCore::targetFrame): Moved to the top of the file.
1741         (WebCore::executeApplyStyle): Added. Helper function for commands
1742         that need to apply styles.
1743         (WebCore::executeToggleStyle): Added. Helper function for commands
1744         that need to toggle styles based on the style of the start of selection.
1745         (WebCore::executeApplyParagraphStyle): Added. Like executeApplyStyle, but
1746         for paragraph styles.
1747         (WebCore::executeInsertFragment): Added. Helper function for commands
1748         that need to insert a DOM fragment.
1749         (WebCore::executeInsertNode): Added. Helper function for commands that
1750         need to insert a tree rooted in a single DOM node.
1751         (WebCore::stateStyle): Added. Helper function for the state of commands
1752         that represent style.
1753         (WebCore::valueStyle): Added. Helper function for the value of commands
1754         that represent style.
1755         (WebCore::canScroll): Added. Helper functions for some move and scroll
1756         commands that need to determine if the renderer they are in can scroll.
1757         (WebCore::unionDOMRanges): Moved here from EditorMac.
1758         (WebCore::executeBackColor):
1759         (WebCore::executeBackwardDelete):
1760         (WebCore::executeCopy):
1761         (WebCore::executeCreateLink):
1762         (WebCore::executeCut):
1763         (WebCore::executeDelete):
1764         (WebCore::executeDeleteToMark):
1765         (WebCore::executeDeleteWordBackward):
1766         (WebCore::executeDeleteWordForward):
1767         (WebCore::executeFindString):
1768         (WebCore::executeFontName):
1769         (WebCore::executeFontSize):
1770         (WebCore::executeFontSizeDelta):
1771         (WebCore::executeForeColor):
1772         (WebCore::executeFormatBlock):
1773         (WebCore::executeForwardDelete):
1774         (WebCore::executeIndent):
1775         (WebCore::executeInsertBacktab):
1776         (WebCore::executeInsertHorizontalRule):
1777         (WebCore::executeInsertHTML):
1778         (WebCore::executeInsertImage):
1779         (WebCore::executeInsertLineBreak):
1780         (WebCore::executeInsertNewline):
1781         (WebCore::executeInsertNewlineInQuotedContent):
1782         (WebCore::executeInsertOrderedList):
1783         (WebCore::executeInsertParagraph):
1784         (WebCore::executeInsertTab):
1785         (WebCore::executeInsertText):
1786         (WebCore::executeInsertUnorderedList):
1787         (WebCore::executeJustifyCenter):
1788         (WebCore::executeJustifyFull):
1789         (WebCore::executeJustifyLeft):
1790         (WebCore::executeJustifyRight):
1791         (WebCore::executeMoveBackward):
1792         (WebCore::executeMoveBackwardAndModifySelection):
1793         (WebCore::executeMoveDown):
1794         (WebCore::executeMoveDownAndModifySelection):
1795         (WebCore::executeMoveDownByPageAndModifyCaret):
1796         (WebCore::executeMoveForward):
1797         (WebCore::executeMoveForwardAndModifySelection):
1798         (WebCore::executeMoveLeft):
1799         (WebCore::executeMoveLeftAndModifySelection):
1800         (WebCore::executeMoveRight):
1801         (WebCore::executeMoveRightAndModifySelection):
1802         (WebCore::executeMoveToBeginningOfDocument):
1803         (WebCore::executeMoveToBeginningOfDocumentAndModifySelection):
1804         (WebCore::executeMoveToBeginningOfLine):
1805         (WebCore::executeMoveToBeginningOfLineAndModifySelection):
1806         (WebCore::executeMoveToBeginningOfParagraph):
1807         (WebCore::executeMoveToBeginningOfParagraphAndModifySelection):
1808         (WebCore::executeMoveToBeginningOfSentence):
1809         (WebCore::executeMoveToBeginningOfSentenceAndModifySelection):
1810         (WebCore::executeMoveToEndOfDocument):
1811         (WebCore::executeMoveToEndOfDocumentAndModifySelection):
1812         (WebCore::executeMoveToEndOfSentence):
1813         (WebCore::executeMoveToEndOfSentenceAndModifySelection):
1814         (WebCore::executeMoveToEndOfLine):
1815         (WebCore::executeMoveToEndOfLineAndModifySelection):
1816         (WebCore::executeMoveToEndOfParagraph):
1817         (WebCore::executeMoveToEndOfParagraphAndModifySelection):
1818         (WebCore::executeMoveParagraphBackwardAndModifySelection):
1819         (WebCore::executeMoveParagraphForwardAndModifySelection):
1820         (WebCore::executeMoveUp):
1821         (WebCore::executeMoveUpAndModifySelection):
1822         (WebCore::executeMoveUpByPageAndModifyCaret):
1823         (WebCore::executeMoveWordBackward):
1824         (WebCore::executeMoveWordBackwardAndModifySelection):
1825         (WebCore::executeMoveWordForward):
1826         (WebCore::executeMoveWordForwardAndModifySelection):
1827         (WebCore::executeMoveWordLeft):
1828         (WebCore::executeMoveWordLeftAndModifySelection):
1829         (WebCore::executeMoveWordRight):
1830         (WebCore::executeMoveWordRightAndModifySelection):
1831         (WebCore::executeOutdent):
1832         (WebCore::executePaste):
1833         (WebCore::executePasteAndMatchStyle):
1834         (WebCore::executePrint):
1835         (WebCore::executeRedo):
1836         (WebCore::executeRemoveFormat):
1837         (WebCore::executeSelectAll):
1838         (WebCore::executeSelectToMark):
1839         (WebCore::executeSetMark):
1840         (WebCore::executeStrikethrough):
1841         (WebCore::executeSubscript):
1842         (WebCore::executeSuperscript):
1843         (WebCore::executeSwapWithMark):
1844         (WebCore::executeToggleBold):
1845         (WebCore::executeToggleItalic):
1846         (WebCore::executeTranspose):
1847         (WebCore::executeUnderline):
1848         (WebCore::executeUndo):
1849         (WebCore::executeUnlink):
1850         (WebCore::executeUnscript):
1851         (WebCore::executeUnselect):
1852         (WebCore::executeYank):
1853         (WebCore::executeYankAndSelect):
1854         (WebCore::supported):
1855         (WebCore::supportedPaste):
1856         (WebCore::enabled):
1857         (WebCore::enabledAnySelection):
1858         (WebCore::enabledAnySelectionAndMark):
1859         (WebCore::enableCaretInEditableText):
1860         (WebCore::enabledCopy):
1861         (WebCore::enabledCut):
1862         (WebCore::enabledInEditableText):
1863         (WebCore::enabledInRichlyEditableText):
1864         (WebCore::enabledPaste):
1865         (WebCore::enabledRangeInEditableText):
1866         (WebCore::enabledRangeInRichlyEditableText):
1867         (WebCore::enabledRedo):
1868         (WebCore::enabledUndo):
1869         (WebCore::stateNone):
1870         (WebCore::stateBold):
1871         (WebCore::stateItalic):
1872         (WebCore::stateOrderedList):
1873         (WebCore::stateStrikethrough):
1874         (WebCore::stateSubscript):
1875         (WebCore::stateSuperscript):
1876         (WebCore::stateUnderline):
1877         (WebCore::stateUnorderedList):
1878         (WebCore::valueNull):
1879         (WebCore::valueBackColor):
1880         (WebCore::valueFontName):
1881         (WebCore::valueFontSize):
1882         (WebCore::valueFontSizeDelta):
1883         (WebCore::valueForeColor):
1884         (WebCore::createCommandMap): Added lots of commands, including all the commands
1885         from JSEditor. A few commands needed different behavior based on whether they are
1886         invoked from the DOM or a keyboard binding.
1887         (WebCore::Editor::command): Added. Gets a command object given a name.
1888         (WebCore::Editor::Command::Command): Added.
1889         (WebCore::Editor::Command::execute): Added.
1890         (WebCore::Editor::Command::isSupported): Added.
1891         (WebCore::Editor::Command::isEnabled): Added.
1892         (WebCore::Editor::Command::state): Added.
1893         (WebCore::Editor::Command::value): Added.
1894         (WebCore::Editor::execCommand): Changed to call command().execute().
1895
1896         * editing/JSEditor.cpp: Removed.
1897         * editing/JSEditor.h: Removed.
1898
1899         * editing/mac/EditorMac.mm: Changed to provide kill ring primitives intead of
1900         kill ring commands, so the kill ring commands can be cross-platform.
1901         (WebCore::Editor::appendToKillRing): Added.
1902         (WebCore::Editor::prependToKillRing): Added.
1903         (WebCore::Editor::yankFromKillRing): Added.
1904         (WebCore::Editor::startNewKillRingSequence): Added.
1905         (WebCore::Editor::setKillRingToYankedState): Added.
1906
1907         * page/Frame.cpp: Removed selectionHasStyle, TriState, and updateState.
1908         * page/Frame.h: Ditto.
1909
1910         * page/mac/WebCoreFrameBridge.mm: Removed selectionHasStyle.
1911         * page/mac/WebCoreFrameBridge.h: Ditto.
1912
1913         * platform/ContextMenu.cpp:
1914         (WebCore::ContextMenu::checkOrEnableIfNeeded): Updated for TriState change.
1915
1916         * platform/text/StringHash.h:
1917         (WebCore::StringHash::hash): Merged the StrHash<> template classes into this.
1918         (WebCore::StringHash::equal): Ditto.
1919         (WebCore::CaseFoldingHash::hash): Merged the CaseInsensitiveHash<> template
1920         classes into this.
1921         (WebCore::CaseFoldingHash::equal): Ditto.
1922
1923         * platform/text/StringImpl.cpp:
1924         (WebCore::equal): Changed to invoke StringHash.
1925         (WebCore::equalIgnoringCase): Changed to invoke CaseFoldingHash.
1926
1927         * dom/DOMImplementation.cpp:
1928         (WebCore::addString): Updated to use StringHash and CaseFoldingHash.
1929         (WebCore::isSVG10Feature): Ditto.
1930         (WebCore::isSVG11Feature): Ditto.
1931         * loader/FrameLoader.cpp:
1932         (WebCore::localSchemes): Ditto.
1933         * platform/graphics/FontCache.cpp:
1934         (WebCore::computeHash): Ditto.
1935         * platform/network/HTTPHeaderMap.h: Ditto.
1936         * platform/text/PlatformString.h: Ditto.
1937         * platform/text/StringImpl.h: Ditto.
1938         * rendering/RenderPartObject.cpp:
1939         (WebCore::RenderPartObject::updateWidget): Ditto.
1940         * xml/XMLHttpRequest.cpp:
1941         (WebCore::canSetRequestHeader): Ditto.
1942
1943         * rendering/RenderTreeAsText.cpp: Removed stray include of JSEditor.h.
1944
1945 2007-12-11  Darin Adler  <darin@apple.com>
1946
1947         * platform/wx/KeyboardEventWx.cpp:
1948         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): Another try at fixing the
1949         WX build. Changes the code around a little bit.
1950
1951 2007-12-11  Darin Adler  <darin@apple.com>
1952
1953         * platform/wx/KeyboardEventWx.cpp:
1954         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): Quick try at fixing build.
1955
1956 2007-12-11  Dan Bernstein  <mitz@apple.com>
1957
1958         Reviewed by Darin Adler.
1959
1960         - fix <rdar://problem/5631507> Text doesn't wrap properly at Tamil version of Wikipedia
1961
1962         Test: fast/text/international/complex-character-based-fallback.html
1963
1964         * platform/graphics/Font.cpp:
1965         (WebCore::Font::glyphDataForCharacter): Added a forceSmallCaps argument
1966         that forces this function to use the small caps font. It is used for
1967         combining marks that need to combine with a small cap.
1968         * platform/graphics/Font.h:
1969         * platform/win/UniscribeController.cpp:
1970         (WebCore::UniscribeController::advance): Changed to split the string
1971         into runs of characters that will be rendered using the same FontData.
1972         This is done by calling glyphDataForCharacter() for each cahracter to
1973         find the FontData it should be rendered with.
1974         (WebCore::UniscribeController::itemizeShapeAndPlace): Added a fontData
1975         argument that is passed on to shapeAndPlaceItem() instead of the
1976         smallCaps argument.
1977         (WebCore::UniscribeController::shapeAndPlaceItem): Added a fontData
1978         argument and removed the font fallback logic from this function, as
1979         it is now expected to be called with an item all of whose characters
1980         can be rendered with the given fontData.
1981         * platform/win/UniscribeController.h:
1982
1983 2007-12-07  Alexey Proskuryakov  <ap@webkit.org>
1984
1985         Reviewed by Darin.
1986
1987         <rdar://problem/5535636>
1988         Have to press 4 times instead of 2 times to get the expected result of ^^ with german keyboard.
1989
1990         http://bugs.webkit.org/show_bug.cgi?id=13916
1991         JavaScript detects Tab as a character input on a textfield validation
1992
1993         Test: platform/win/fast/events/double-dead-char.html
1994
1995         * platform/PlatformKeyboardEvent.h:
1996         (WebCore::PlatformKeyboardEvent::):
1997         (WebCore::PlatformKeyboardEvent::type):
1998         (WebCore::PlatformKeyboardEvent::windowsVirtualKeyCode):
1999         (WebCore::PlatformKeyboardEvent::setWindowsVirtualKeyCode):
2000         (WebCore::PlatformKeyboardEvent::keyIdentifier):
2001         (WebCore::PlatformKeyboardEvent::setIsAutoRepeat):
2002         Added an explicit type member to differentiate different kinds of events:
2003           RawKeyDown == keydown == WM_KEYDOWN
2004           KeyUp == keyup == WM_KEYUP
2005           Char == keypress == WM_CHAR
2006           KeyDown == e.g. NSKeyDown or NSFlagsChanged, used on platforms that have a different model for
2007           event processing, and needs to be converted to RawKeyDown (+ Char) for processing in DOM.
2008
2009         * platform/mac/KeyEventMac.mm:
2010         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): Updated for changed data members.
2011         Fix Enter (numeric keypad) charCode to match Return, as we check for it from keypress default handlers.
2012         (WebCore::windowsKeyCodeForKeyEvent): 
2013         (WebCore::isKeyUpEvent): Made it do something closer to what it claims; added a FIXME explaining
2014         that it still fails.
2015         (WebCore::disambiguateKeyDownEvent): Downgrade from KeyDown to RawKeyDown or Char, removing information that
2016         should not be available in those (because it cannot be provided on Windows).
2017
2018         * platform/win/KeyEventWin.cpp:
2019         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): Updated for changed data members.
2020         Used standard Windows constants for bit masks instead of our own ones.
2021         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent): Should never be called on Windows.
2022
2023         * platform/gtk/KeyEventGtk.cpp:
2024         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2025         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
2026         * platform/qt/PlatformKeyboardEventQt.cpp:
2027         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2028         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
2029         * platform/wx/KeyboardEventWx.cpp:
2030         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2031         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
2032         Updated for cross-platform changes as much as it was possible without appropriate build
2033         environments.
2034
2035         * WebCore.base.exp: Export PlatformKeyboardEvent::disambiguateKeyDownEvent(), used by platforms that need to
2036         convert their fancy key events to RawKeyDown/Char pairs. Export Editor::isTextInsertionCommand().
2037
2038         * bridge/EditorClient.h:
2039         Renamed handleKeypress() to handleKeyboardEvent(), as it gets both keydowns and keypresses.
2040         Renamed handleInputMethodKeypress() to handleInputMethodKeydown(), as IMs work with raw keydowns.
2041
2042         * dom/Document.h:
2043         * dom/Document.cpp:
2044         (WebCore::Document::defaultEventHandler): Moved accesskey processing to EventHandler.
2045
2046         * dom/KeyboardEvent.h: Added comments describing keyCode/charCode behavior.
2047
2048         * dom/KeyboardEvent.cpp:
2049         (WebCore::eventTypeForKeyboardEventType):
2050         (WebCore::KeyboardEvent::KeyboardEvent): Conversion between platform and DOM event types is
2051         now straightforward, so scary hacks such as using autorepeat to distinguish types are
2052         not needed.
2053         (WebCore::KeyboardEvent::keyCode): Added a comment describing other browsers' behavior.
2054         (WebCore::KeyboardEvent::charCode): Added a comment describing other browsers' behavior.
2055         Changed to a more compatible behavior: raw keydown/keyup events do not and can not have
2056         character codes.
2057
2058         * editing/Editor.h:
2059         * editing/Editor.cpp:
2060         (WebCore::Editor::isTextInsertionCommand): Is this command actually text input in disguise?
2061         (WebCore::Editor::handleKeyboardEvent): Updated for new function names.
2062         (WebCore::Editor::handleInputMethodKeydown): Ditto.
2063
2064         * html/HTMLButtonElement.cpp:
2065         (WebCore::HTMLButtonElement::defaultEventHandler): Perform the default action when handling an
2066         appropriate event. Enter is processed on keypress (and thus should be checked for via charCode,
2067         not keyIdentifier), Space is processed on keydown+keyup! We now match IE in that a button is
2068         highlighted when Space is pressed.
2069
2070         * html/HTMLInputElement.cpp:
2071         (WebCore::HTMLInputElement::defaultEventHandler):
2072         * html/HTMLSelectElement.cpp:
2073         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
2074         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
2075         Made a number of fixes to when default actions take place, similar to HTMLButtonElement ones
2076         described above.
2077
2078         * page/EventHandler.cpp:
2079         (WebCore::EventHandler::keyEvent): Unless we have a combined KeyDown, just forward the event
2080         to the target. Call accesskey handling directly, as it doesn't seem to be part of normal event
2081         handling in IE. Also streamlined the code in KeyDown case, thanks to handleInputMethodKeypress()
2082         now being handleInputMethodKeydown().
2083         (WebCore::EventHandler::handleTextInputEvent): Check that we were not called from keydown.
2084         (WebCore::EventHandler::defaultTextInputEventHandler): Removed a call to defaultTabEventHandler,
2085         as default tab handling happens when processing keydown.
2086         (WebCore::handleAccessKey): Moved from Document, as access keys are processed outside normal
2087         event handling. Fixed accesskey processing to use information that's available in a raw keydown
2088         event.
2089
2090         (WebCore::EventHandler::defaultKeyboardEventHandler): Do not ignore keydown; in particular,
2091         handle tabs during keydown processing.
2092
2093         * page/mac/EventHandlerMac.mm:
2094         (WebCore::EventHandler::currentKeyboardEvent): Disambiguate KeyDown as RawKeyDown, as this is
2095         what callers want.
2096
2097         * platform/text/PlatformString.h:
2098         * platform/text/String.cpp:
2099         (WebCore::String::characterStartingAt):
2100         * platform/text/StringImpl.cpp:
2101         (WebCore::StringImpl::characterStartingAt):
2102         * platform/text/StringImpl.h:
2103         Added a UChar32 accessor.
2104
2105         * svg/graphics/SVGImageEmptyClients.h:
2106         (WebCore::SVGEmptyEditorClient::handleKeyboardEvent):
2107         (WebCore::SVGEmptyEditorClient::handleInputMethodKeydown):
2108         Updated for new function names.
2109
2110 2007-12-11  John Sullivan  <sullivan@apple.com>
2111
2112         Reviewed by Adele
2113
2114         Tiger build fix -- don't call QTMovieView setDelegate: directly because it's not public
2115
2116         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2117         (WebCore::MediaPlayerPrivate::createQTMovieView):
2118         (WebCore::MediaPlayerPrivate::detachQTMovieView):
2119
2120 2007-12-11  Alexey Proskuryakov  <ap@webkit.org>
2121
2122         Reviewed by Darin.
2123
2124         http://bugs.webkit.org/show_bug.cgi?id=16325
2125         <rdar://problem/5632997> REGRESSION: www.xerox.ru doesn't work
2126
2127         Fix this on Windows, too!
2128
2129         Test: http/tests/misc/empty-cookie.html
2130
2131         * platform/network/win/CookieJarWin.cpp:
2132         (WebCore::setCookies):
2133         (WebCore::cookies):
2134         Same fix as on Mac, translated into CF.
2135
2136         * platform/win/CookieJarWin.cpp: Removed - the real one is in platform/network/win.
2137
2138 2007-12-11  Christian Dywan  <christian@twotoasts.de>
2139
2140         Reviewed by Alp Toker.
2141
2142         http://bugs.webkit.org/show_bug.cgi?id=16371
2143         Implement additional mouse cursors for Gtk
2144
2145         Added cursor bitmaps from Mozilla:
2146         http://lxr.mozilla.org/mozilla1.8/source/widget/src/gtk2/nsGtkCursors.h
2147
2148         * platform/gtk/CursorGtk.cpp:
2149         (WebCore::customCursorNew):
2150         (WebCore::verticalTextCursor):
2151         (WebCore::cellCursor):
2152         (WebCore::contextMenuCursor):
2153         (WebCore::noDropCursor):
2154         (WebCore::copyCursor):
2155         (WebCore::progressCursor):
2156         (WebCore::aliasCursor):
2157         (WebCore::noneCursor):
2158         (WebCore::notAllowedCursor):
2159         (WebCore::zoomInCursor):
2160         (WebCore::zoomOutCursor):
2161         * platform/gtk/CursorGtk.h: Added.
2162
2163 2007-12-10  Oliver Hunt  <oliver@apple.com>
2164
2165         Reviewed by Weinig, Dan, and Alexey.
2166
2167         Fix character set used for dynamically loaded scripts.
2168
2169         Fix for:
2170             <rdar://problem/5333163> Safari can not display the mouse over pop menu on ChinaTimes News site correctly.
2171             <rdar://problem/5530048> [Safari]? :Leopard9A576: The typed CH characters displays as garbage in Sina website after reloading the webpage.
2172             <rdar://problem/5416588> All menus for chinese IBM site have wrong encoding
2173             
2174         Use the same logic to determine the charset for a script loaded dynamically
2175         as we do for a statically loaded script.
2176
2177         * html/HTMLScriptElement.cpp:
2178         (WebCore::HTMLScriptElement::insertedIntoDocument):
2179
2180 2007-12-10  Justin Garcia  <justin.garcia@apple.com>
2181
2182         Reviewed by Oliver Hunt.
2183
2184         <rdar://problem/5482023> GoogleDocs: After FormatBlock in an empty document, certain functions are disabled
2185         
2186         We were trying to insert a block of the requested type before the body element.
2187         
2188         * editing/FormatBlockCommand.cpp:
2189         (WebCore::FormatBlockCommand::doApply): 
2190         Removed unnecessary ()s in the if condition.
2191         Removed "|| !upstreamStart.node()->isDescendantOf(root)" from the if condition, since
2192         a) upstreamStart will never be outside the root editable element, since in that case
2193         there would be no block inside the editable root to Format, and b) if upstreamStart.node() 
2194         *is* the root, then refNode is the root, and we shouldn't insert before the root, we should insert
2195         at [root, 0].
2196         Added comments to explain the use of upstream() in the second if-clause.
2197         Added an early return for case where there is nothing selected, in that case, there is nothing
2198         to move.
2199
2200 2007-12-10  Adele Peterson  <adele@apple.com>
2201
2202         Reviewed and partially fixed by Tim Hatcher.
2203
2204         Remaining part of fix for <rdar://problem/5633400>
2205         Transformed <video> is not clipped correctly until a repaint is forced
2206
2207         Replace the implementation of a QTKit method to avoid repaints from the NSView system associated with the QTMovie
2208         from clobbering the WebCore repaints.
2209
2210         * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerRepaint): Added.
2211         * html/HTMLMediaElement.h:
2212         * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::repaint): Added.
2213         * platform/graphics/MediaPlayer.h: (WebCore::MediaPlayerClient::mediaPlayerRepaint): Added.
2214
2215         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
2216         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2217         (method_setImplementation): Added for Tiger.
2218
2219         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate): Call detachQTMovieView, which now does more cleanup.
2220         (WebCore::MediaPlayerPrivate::cancelLoad): ditto.
2221         (WebCore::MediaPlayerPrivate::setVisible): ditto.
2222         (WebCore::MediaPlayerPrivate::detachQTMovieView): Clear the delegate as well as m_qtMovieView pointer.
2223
2224         (WebCore::MediaPlayerPrivate::repaint): Added.  Triggers a repaint on the video renderer.
2225         (-[WebCoreMovieObserver repaint]): ditto.
2226
2227         (WebCore::mainThreadSetNeedsDisplay): Added.
2228          Does a WebCore repaint instead of going through the view repaint system for QTMovieView.
2229         (WebCore::MediaPlayerPrivate::createQTMovieView): Replace the implementation of _mainThreadSetNeedsDisplay.
2230
2231 2007-12-10  Geoffrey Garen  <ggaren@apple.com>
2232
2233         Reviewed by Sam Weinig.
2234
2235         Updated for rename in JavaScriptCore.
2236
2237         * bridge/mac/WebCoreScriptDebugger.mm:
2238         (-[WebCoreScriptCallFrame scopeChain]):
2239         (-[WebCoreScriptCallFrame functionName]):
2240         (-[WebCoreScriptCallFrame evaluateWebScript:]):
2241
2242 2007-12-10  Rodney Dawes  <dobey@wayofthemonkey.com>
2243
2244         Bug 16383: Ambiguous Window Usage in kjs_dom.cpp
2245         <http://bugs.webkit.org/show_bug.cgi?id=16383>
2246
2247         Use KJS::Window not the ambiguous Window
2248
2249         Reviewed by ddkilzer.
2250
2251         * bindings/js/kjs_dom.cpp (checkNodeSecurity):
2252
2253 2007-12-10  Sam Weinig  <sam@webkit.org>
2254
2255         Fix non-mac builds.
2256
2257         * page/WindowFeatures.cpp: #include <wtf/MathExtras.h> for isnan.
2258
2259 2007-12-10  Marvin Decker  <marv.decker@gmail.com>
2260
2261         Reviewed by Darin.
2262
2263         Fix a divide by 0 in the progress tracker.
2264         http://bugs.webkit.org/show_bug.cgi?id=15055
2265
2266         * loader/ProgressTracker.cpp:
2267         (WebCore::ProgressTracker::incrementProgress):
2268
2269 2007-12-09  Sam Weinig  <sam@webkit.org>
2270
2271         Reviewed by Darin.
2272
2273         More cleanup of kjs_window.
2274         - Move WindowFeatures from bridge/ to page/
2275         - Move functions related to WindowFeatures (boolFeature,
2276           floatFeature, setWindowFeature, parseWindowFeatures) into the class.
2277         - Fix up whitespace.
2278
2279         * WebCore.vcproj/WebCore.vcproj:
2280         * WebCore.xcodeproj/project.pbxproj:
2281         * bindings/js/kjs_window.cpp:
2282         (KJS::DOMWindowTimer::~DOMWindowTimer):
2283         (KJS::createWindow):
2284         (KJS::showModalDialog):
2285         (KJS::Window::getOwnPropertySlot):
2286         (KJS::Window::allowsAccessFrom):
2287         (KJS::Window::shouldInterruptScript):
2288         (KJS::WindowProtoFuncAToB::callAsFunction):
2289         (KJS::WindowProtoFuncOpen::callAsFunction):
2290         (KJS::Window::setReturnValueSlot):
2291         (KJS::ScheduledAction::execute):
2292         (KJS::Window::timerFired):
2293         (KJS::Location::Location):
2294         (KJS::Location::getValueProperty):
2295         (KJS::Location::getOwnPropertySlot):
2296         (KJS::Location::put):
2297         (KJS::LocationProtoFuncReplace::callAsFunction): Use better variable names.
2298         (KJS::LocationProtoFuncAssign::callAsFunction): Ditto.
2299         (KJS::LocationProtoFuncToString::callAsFunction): Remove extraneous calls to
2300         allowsAccessFrom, cleanup the function a little.
2301         (KJS::PausedTimeouts::~PausedTimeouts):
2302         * bridge/WindowFeatures.h: Removed.
2303         * page/WindowFeatures.cpp: Added.
2304         (WebCore::isSeparator):
2305         (WebCore::WindowFeatures::WindowFeatures):
2306         (WebCore::WindowFeatures::setWindowFeature):
2307         (WebCore::WindowFeatures::boolFeature):
2308         (WebCore::WindowFeatures::floatFeature):
2309         * page/WindowFeatures.h: Copied from WebCore/bridge/WindowFeatures.h.
2310         (WebCore::WindowFeatures::WindowFeatures):
2311
2312 2007-12-10  Timothy Hatcher  <timothy@apple.com>
2313
2314         Reviewed by Mark Rowe.
2315
2316         <rdar://problem/5639463> Bundle versions on Tiger should be 4523.x not 523.x
2317
2318         * Configurations/Version.xcconfig: Some Tiger versions of Xcode don't set MAC_OS_X_VERSION_MAJOR,
2319           so assume Tiger and use a 4 for the SYSTEM_VERSION_PREFIX.
2320
2321 2007-12-10  Alp Toker  <alp@atoker.com>
2322
2323         Reviewed by Niko.
2324
2325         Cairo implementation of GraphicsContext::setUseAntialiasing().
2326
2327         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2328         (WebCore::GraphicsContext::setUseAntialiasing):
2329
2330 2007-12-10  Rob Buis  <buis@kde.org>
2331
2332         Reviewed by Darin.
2333
2334         http://bugs.webkit.org/show_bug.cgi?id=16182
2335         SVG should disable antialiasing for shape-rendering="crispEdges"
2336
2337         Turn off anti-aliasing of shapes when shape-rendering="crispEdges".
2338
2339         * platform/graphics/GraphicsContext.h:
2340         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2341         (WebCore::GraphicsContext::setUseAntialiasing):
2342         * platform/graphics/cg/GraphicsContextCG.cpp:
2343         (WebCore::GraphicsContext::setUseAntialiasing):
2344         * platform/graphics/qt/GraphicsContextQt.cpp:
2345         (WebCore::GraphicsContext::setUseAntialiasing):
2346         * platform/graphics/wx/GraphicsContextWx.cpp:
2347         (WebCore::GraphicsContext::setUseAntialiasing):
2348         * rendering/RenderPath.cpp:
2349         (WebCore::RenderPath::paint):
2350
2351 2007-12-09  Rob Buis  <buis@kde.org>
2352
2353         Reviewed by Niko.
2354
2355         http://bugs.webkit.org/show_bug.cgi?id=16163
2356         SVG crash in Node::setChanged() on Debug builds only (trashed parent)
2357
2358         Fix the crash by properly unregistering as client from SVGResource
2359         when deleting a styled svg node.
2360
2361         * svg/SVGStyledElement.cpp:
2362         (WebCore::SVGStyledElement::~SVGStyledElement):
2363
2364 2007-12-10  Brady Eidson  <beidson@apple.com>
2365
2366         Rubberstamped by John
2367
2368         * storage/DatabaseTracker.cpp:
2369         (WebCore::DatabaseTracker::canEstablishDatabase): If the UI Delegate returns *exactly* the estimated size
2370           for the new quota, we should allow the database to be created
2371
2372 2007-12-10  David D. Kilzer  <ddkilzer@webkit.org>
2373
2374         Bug 9683: Implement select.options.remove() method
2375         <http://bugs.webkit.org/show_bug.cgi?id=9683>
2376
2377         Reviewed by Maciej.
2378
2379         Implement select.options.remove() by calling select.remove()
2380         with the same arguments.  This is what MSIE 7 does, although its
2381         select.remove() method differs from WebKit's by throwing an
2382         exception when called with no arguments or with a negative
2383         integer argument.  Note that the DOM Level 1 documentation
2384         specifies that select.remove() does not throw an exception.
2385
2386         Tests: fast/js/select-options-remove-gc.html
2387                fast/js/select-options-remove.html
2388
2389         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
2390         (WebCore::JSHTMLOptionsCollection::remove): Added.
2391         * html/HTMLOptionsCollection.cpp:
2392         (WebCore::HTMLOptionsCollection::remove): Added.
2393         * html/HTMLOptionsCollection.h:
2394         * html/HTMLOptionsCollection.idl:
2395
2396 2007-12-09  Sam Weinig  <sam@webkit.org>
2397
2398         Rubber stamped by Mark Rowe.
2399
2400         * WebCore.xcodeproj/project.pbxproj: Add missing DerivedSources files.
2401
2402 2007-12-09  Oliver Hunt  <oliver@apple.com>
2403
2404         Reviewed by Niko.
2405
2406         Correction, 'z' and 'Z' are the only commands that cannot have an extended
2407         list of arguments.
2408
2409         * svg/SVGParserUtilities.cpp:
2410         (WebCore::SVGPathParser::parseSVG):
2411
2412 2007-12-09  Oliver Hunt  <oliver@apple.com>
2413
2414         Reviewed by Niko.
2415
2416         Prevent unlimited iteration in the case of invalid path data.
2417         
2418         The only path commands that can leave numbers trailing the command processing
2419         are 'm' and 'M', in which trailing numbers are parsed as arguments to an
2420         implicit lineto command.  In any case we should just terminate as an invalid
2421         path.
2422
2423         * svg/SVGParserUtilities.cpp:
2424         (WebCore::SVGPathParser::parseSVG):
2425
2426 2007-12-09  Luca Bruno  <lethalman88@gmail.com>
2427
2428         Reviewed by Alp Toker.
2429
2430         http://bugs.webkit.org/show_bug.cgi?id=15825
2431         [GTK] curl - slow dns causing hangs.
2432
2433         Create a vector of jobs, to satisfy requests in the right order.
2434         Set a limit to the number of simultaneous connections.
2435
2436         * platform/network/curl/ResourceHandleManager.cpp:
2437         (WebCore::maxRunningJobs): added
2438         (WebCore::ResourceHandleManager::ResourceHandleManager):
2439         (WebCore::ResourceHandleManager::removeFromCurl):
2440         (WebCore::ResourceHandleManager::startScheduledJobs):
2441
2442         * platform/network/curl/ResourceHandleManager.h:
2443         (WebCore::ResourceHandleList): removed
2444         (WebCore::ResourceHandleManager::m_runningJobs): added
2445         (WebCore::ResourceHandleManager::m_resourceHandleListHead): removed
2446         (WebCore::ResourceHandleManager::m_resourceHandleList): added
2447
2448 2007-12-08  Sam Weinig  <sam@webkit.org>
2449
2450         Reviewed by Oliver.
2451
2452         Cleanup kjs_window.h/cpp.
2453
2454         * bindings/js/kjs_window.cpp:
2455         (KJS::WindowPrivate::WindowPrivate):
2456         (KJS::DOMWindowTimer::DOMWindowTimer):
2457         (KJS::Window::Window):
2458         (KJS::Window::retrieveWindow):
2459         (KJS::Window::retrieveActive):
2460         (KJS::Window::retrieve):
2461         (KJS::Window::location):
2462         (KJS::Window::mark):
2463         (KJS::allowPopUp):
2464         (KJS::parseModalDialogFeatures):
2465         (KJS::floatFeature):
2466         (KJS::canShowModalDialog):
2467         (KJS::canShowModalDialogNow):
2468         (KJS::showModalDialog):
2469         (KJS::Window::getValueProperty):
2470         (KJS::Window::getOwnPropertySlot):
2471         (KJS::Window::globalExec):
2472         (KJS::Window::setListener):
2473         (KJS::Window::getListener):
2474         (KJS::Window::findOrCreateJSEventListener):
2475         (KJS::Window::findOrCreateJSUnprotectedEventListener):
2476         (KJS::Window::clearHelperObjectProperties):
2477         (KJS::Window::setCurrentEvent):
2478         (KJS::WindowProtoFuncAToB::callAsFunction):
2479         (KJS::WindowProtoFuncBToA::callAsFunction):
2480         (KJS::WindowProtoFuncOpen::callAsFunction):
2481         (KJS::WindowProtoFuncSetTimeout::callAsFunction):
2482         (KJS::WindowProtoFuncClearTimeout::callAsFunction):
2483         (KJS::WindowProtoFuncSetInterval::callAsFunction):
2484         (KJS::WindowProtoFuncAddEventListener::callAsFunction):
2485         (KJS::WindowProtoFuncRemoveEventListener::callAsFunction):
2486         (KJS::WindowProtoFuncShowModalDialog::callAsFunction):
2487         (KJS::WindowProtoFuncNotImplemented::callAsFunction):
2488         * bindings/js/kjs_window.h:
2489         (KJS::PausedTimeouts::PausedTimeouts):
2490         (KJS::PausedTimeouts::takeTimeouts):
2491         (KJS::ScheduledAction::ScheduledAction):
2492
2493 2007-12-08  Sam Weinig  <sam@webkit.org>
2494
2495         Reviewed by Mitz.
2496
2497         Move window scrolling, moving and resizing methods from KJS::Window
2498         to WebCore::DOMWindow so that there bindings can be autogenerated.
2499
2500         Tests: fast/dom/Window/window-resize-and-move-arguments.html
2501                fast/dom/Window/window-scroll-arguments.html
2502
2503         * WebCore.xcodeproj/project.pbxproj:
2504         * bindings/js/kjs_window.cpp:
2505         (KJS::Window::getValueProperty): Remove extraneous allowsAccessFrom check.
2506         (KJS::WindowProtoFuncOpen::callAsFunction):
2507         (KJS::WindowProtoFuncNotImplemented::callAsFunction): Remove extraneous allowsAccessFrom check.
2508         * bindings/js/kjs_window.h:
2509         * bindings/scripts/CodeGeneratorJS.pm: Add new extended attribute
2510         to ensure that the no less than the declared number of attributes
2511         is allowed.
2512         * page/DOMWindow.cpp:
2513         (WebCore::DOMWindow::adjustWindowRect): Moved from kjs_window.
2514         (WebCore::DOMWindow::scrollBy):
2515         (WebCore::DOMWindow::scrollTo):
2516         (WebCore::DOMWindow::moveBy):
2517         (WebCore::DOMWindow::moveTo):
2518         (WebCore::DOMWindow::resizeBy):
2519         (WebCore::DOMWindow::resizeTo):
2520         * page/DOMWindow.h:
2521         (WebCore::DOMWindow::scroll):
2522         * page/DOMWindow.idl:
2523
2524 2007-12-08  Kevin Ollivier  <kevino@theolliviers.com>
2525
2526         Reviewed by Alp Toker.
2527
2528         http://bugs.webkit.org/show_bug.cgi?id=14651
2529         [CURL] didReceiveResponse() only called for HTTP loads
2530
2531         http://bugs.webkit.org/show_bug.cgi?id=14583
2532         [GDK] file:// relative CSS include URLs handled incorrectly
2533
2534         Make sure CURL sets the ResourceResponse URL and calls
2535         didReceiveResponse for local files too. 
2536
2537         * platform/network/curl/ResourceHandleManager.cpp:
2538         (WebCore::writeCallback):
2539
2540 2007-12-08  Oliver Hunt  <oliver@apple.com>
2541
2542         Reviewed by Sam W.
2543
2544         Split the ENABLE_SVG_EXPERIMENTAL_FEATURES flag into separate flags.
2545         
2546         Fixes <rdar://problem/5620249> Must disable SVG animation
2547         <rdar://problem/5612772> Disable SVG filters on Mac to match Windows behavior
2548         
2549         In order to allow finer grained control over the set of SVG features
2550         this patch splits ENABLE_SVG_EXPERIMENTAL_FEATURES into the following
2551         distinct flags:
2552         ENABLE_SVG_ANIMATION
2553         ENABLE_SVG_FILTERS
2554         ENABLE_SVG_FONTS
2555         ENABLE_SVG_AS_IMAGE
2556         ENABLE_SVG_USE
2557         
2558         by default only ENABLE_SVG_AS_IMAGE and ENABLE_SVG_USE are set.
2559
2560         * Configurations/WebCore.xcconfig:
2561         * DerivedSources.make:
2562           Handle the increased number of build flags that may be necessary
2563           
2564         * WebCore.SVG.Animation.exp: Added.
2565         * WebCore.SVG.Filters.exp: Added.
2566         * WebCore.SVG.exp:
2567           We now may not need the animation or filter exports so 
2568           these need to be separate.
2569           
2570         * WebCore.vcproj/WebCore.vcproj:
2571         * WebCore.vcproj/build-generated-files.sh:
2572           Update for new flags
2573           
2574         Remainder of changes are to swap ENABLE(SVG_EXPERIMENTAL_FEATURES) 
2575         with the appropriate specific feature flag.  
2576         * bindings/js/JSSVGElementWrapperFactory.cpp:
2577         (WebCore::createJSSVGWrapper):
2578         * bindings/objc/DOM.mm:
2579         (WebCore::createElementClassMap):
2580         * dom/make_names.pl:
2581         * loader/CachedImage.cpp:
2582         (WebCore::CachedImage::createImage):
2583         * page/DOMWindow.idl:
2584         * rendering/RenderPath.cpp:
2585         (WebCore::RenderPath::absoluteClippedOverflowRect):
2586         * rendering/RenderSVGContainer.cpp:
2587         (WebCore::RenderSVGContainer::absoluteClippedOverflowRect):
2588         * rendering/RenderSVGImage.cpp:
2589         (WebCore::RenderSVGImage::absoluteClippedOverflowRect):
2590         * rendering/RenderSVGRoot.cpp:
2591         (WebCore::RenderSVGRoot::paint):
2592         (WebCore::RenderSVGRoot::absoluteClippedOverflowRect):
2593         * rendering/RenderSVGText.cpp:
2594         (WebCore::RenderSVGText::absoluteClippedOverflowRect):
2595         * rendering/SVGRenderSupport.cpp:
2596         (WebCore::prepareToRenderSVGContent):
2597         (WebCore::finishRenderSVGContent):
2598         * svg/SVGAnimateElement.cpp:
2599         * svg/SVGAnimateElement.h:
2600         * svg/SVGAnimateElement.idl:
2601         * svg/SVGAnimateMotionElement.cpp:
2602         * svg/SVGAnimateMotionElement.h:
2603         * svg/SVGAnimateTransformElement.cpp:
2604         * svg/SVGAnimateTransformElement.h:
2605         * svg/SVGAnimateTransformElement.idl:
2606         * svg/SVGComponentTransferFunctionElement.cpp:
2607         * svg/SVGComponentTransferFunctionElement.h:
2608         * svg/SVGComponentTransferFunctionElement.idl:
2609         * svg/SVGDocumentExtensions.cpp:
2610         (WebCore::SVGDocumentExtensions::startAnimations):
2611         * svg/SVGFEBlendElement.cpp:
2612         * svg/SVGFEBlendElement.h:
2613         * svg/SVGFEBlendElement.idl:
2614         * svg/SVGFEColorMatrixElement.cpp:
2615         * svg/SVGFEColorMatrixElement.h:
2616         * svg/SVGFEColorMatrixElement.idl:
2617         * svg/SVGFEComponentTransferElement.cpp:
2618         * svg/SVGFEComponentTransferElement.h:
2619         * svg/SVGFEComponentTransferElement.idl:
2620         * svg/SVGFECompositeElement.cpp:
2621         * svg/SVGFECompositeElement.h:
2622         * svg/SVGFECompositeElement.idl:
2623         * svg/SVGFEDiffuseLightingElement.cpp:
2624         * svg/SVGFEDiffuseLightingElement.h:
2625         * svg/SVGFEDiffuseLightingElement.idl:
2626         * svg/SVGFEDisplacementMapElement.cpp:
2627         * svg/SVGFEDisplacementMapElement.h:
2628         * svg/SVGFEDisplacementMapElement.idl:
2629         * svg/SVGFEDistantLightElement.cpp:
2630         * svg/SVGFEDistantLightElement.h:
2631         * svg/SVGFEDistantLightElement.idl:
2632         * svg/SVGFEFloodElement.cpp:
2633         * svg/SVGFEFloodElement.h:
2634         * svg/SVGFEFloodElement.idl:
2635         * svg/SVGFEFuncAElement.cpp:
2636         * svg/SVGFEFuncAElement.h:
2637         * svg/SVGFEFuncAElement.idl:
2638         * svg/SVGFEFuncBElement.cpp:
2639         * svg/SVGFEFuncBElement.h:
2640         * svg/SVGFEFuncBElement.idl:
2641         * svg/SVGFEFuncGElement.cpp:
2642         * svg/SVGFEFuncGElement.h:
2643         * svg/SVGFEFuncGElement.idl:
2644         * svg/SVGFEFuncRElement.cpp:
2645         * svg/SVGFEFuncRElement.h:
2646         * svg/SVGFEFuncRElement.idl:
2647         * svg/SVGFEGaussianBlurElement.cpp:
2648         * svg/SVGFEGaussianBlurElement.h:
2649         * svg/SVGFEGaussianBlurElement.idl:
2650         * svg/SVGFEImageElement.cpp:
2651         * svg/SVGFEImageElement.h:
2652         * svg/SVGFEImageElement.idl:
2653         * svg/SVGFELightElement.cpp:
2654         * svg/SVGFELightElement.h:
2655         * svg/SVGFEMergeElement.cpp:
2656         * svg/SVGFEMergeElement.h:
2657         * svg/SVGFEMergeElement.idl:
2658         * svg/SVGFEMergeNodeElement.cpp:
2659         * svg/SVGFEMergeNodeElement.h:
2660         * svg/SVGFEMergeNodeElement.idl:
2661         * svg/SVGFEOffsetElement.cpp:
2662         * svg/SVGFEOffsetElement.h:
2663         * svg/SVGFEOffsetElement.idl:
2664         * svg/SVGFEPointLightElement.cpp:
2665         * svg/SVGFEPointLightElement.h:
2666         * svg/SVGFEPointLightElement.idl:
2667         * svg/SVGFESpecularLightingElement.cpp:
2668         * svg/SVGFESpecularLightingElement.h:
2669         * svg/SVGFESpecularLightingElement.idl:
2670         * svg/SVGFESpotLightElement.cpp:
2671         * svg/SVGFESpotLightElement.h:
2672         * svg/SVGFESpotLightElement.idl:
2673         * svg/SVGFETileElement.cpp:
2674         * svg/SVGFETileElement.h:
2675         * svg/SVGFETileElement.idl:
2676         * svg/SVGFETurbulenceElement.cpp:
2677         * svg/SVGFETurbulenceElement.h:
2678         * svg/SVGFETurbulenceElement.idl:
2679         * svg/SVGFilterElement.cpp:
2680         * svg/SVGFilterElement.h:
2681         * svg/SVGFilterElement.idl:
2682         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
2683         * svg/SVGTimer.cpp:
2684         (WebCore::SVGTimer::animationsByElement):
2685         * svg/SVGUseElement.cpp:
2686         (WebCore::SVGUseElement::buildPendingResource):
2687         (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements):
2688         * svg/SVGUseElement.h:
2689         * svg/TimeScheduler.cpp:
2690         (WebCore::TimeScheduler::connectIntervalTimer):
2691         (WebCore::TimeScheduler::disconnectIntervalTimer):
2692         * svg/graphics/SVGResourceFilter.cpp:
2693         * svg/graphics/SVGResourceFilter.h:
2694         * svg/graphics/cg/SVGResourceFilterCg.cpp:
2695         * svg/graphics/cg/SVGResourceFilterCg.mm:
2696         * svg/graphics/filters/SVGDistantLightSource.h:
2697         * svg/graphics/filters/SVGFEBlend.cpp:
2698         * svg/graphics/filters/SVGFEBlend.h:
2699         * svg/graphics/filters/SVGFEColorMatrix.cpp:
2700         * svg/graphics/filters/SVGFEColorMatrix.h:
2701         * svg/graphics/filters/SVGFEComponentTransfer.cpp:
2702         * svg/graphics/filters/SVGFEComponentTransfer.h:
2703         * svg/graphics/filters/SVGFEComposite.cpp:
2704         * svg/graphics/filters/SVGFEComposite.h:
2705         * svg/graphics/filters/SVGFEConvolveMatrix.cpp:
2706         * svg/graphics/filters/SVGFEConvolveMatrix.h:
2707         * svg/graphics/filters/SVGFEDiffuseLighting.cpp:
2708         * svg/graphics/filters/SVGFEDiffuseLighting.h:
2709         * svg/graphics/filters/SVGFEDisplacementMap.cpp:
2710         * svg/graphics/filters/SVGFEDisplacementMap.h:
2711         * svg/graphics/filters/SVGFEFlood.cpp:
2712         * svg/graphics/filters/SVGFEFlood.h:
2713         * svg/graphics/filters/SVGFEGaussianBlur.cpp:
2714         * svg/graphics/filters/SVGFEGaussianBlur.h:
2715         * svg/graphics/filters/SVGFEImage.cpp:
2716         * svg/graphics/filters/SVGFEImage.h:
2717         * svg/graphics/filters/SVGFEMerge.cpp:
2718         * svg/graphics/filters/SVGFEMerge.h:
2719         * svg/graphics/filters/SVGFEMorphology.cpp:
2720         * svg/graphics/filters/SVGFEMorphology.h:
2721         * svg/graphics/filters/SVGFEOffset.cpp:
2722         * svg/graphics/filters/SVGFEOffset.h:
2723         * svg/graphics/filters/SVGFESpecularLighting.cpp:
2724         * svg/graphics/filters/SVGFESpecularLighting.h:
2725         * svg/graphics/filters/SVGFETile.h:
2726         * svg/graphics/filters/SVGFETurbulence.cpp:
2727         * svg/graphics/filters/SVGFETurbulence.h:
2728         * svg/graphics/filters/SVGFilterEffect.cpp:
2729         * svg/graphics/filters/SVGFilterEffect.h:
2730         * svg/graphics/filters/SVGLightSource.cpp:
2731         * svg/graphics/filters/SVGLightSource.h:
2732         * svg/graphics/filters/SVGPointLightSource.h:
2733         * svg/graphics/filters/SVGSpotLightSource.h:
2734         * svg/graphics/filters/cg/SVGFEBlendCg.mm:
2735         * svg/graphics/filters/cg/SVGFEColorMatrixCg.mm:
2736         * svg/graphics/filters/cg/SVGFEComponentTransferCg.mm:
2737         * svg/graphics/filters/cg/SVGFECompositeCg.mm:
2738         * svg/graphics/filters/cg/SVGFEDiffuseLightingCg.mm:
2739         * svg/graphics/filters/cg/SVGFEDisplacementMapCg.mm:
2740         * svg/graphics/filters/cg/SVGFEFloodCg.mm:
2741         * svg/graphics/filters/cg/SVGFEGaussianBlurCg.mm:
2742         * svg/graphics/filters/cg/SVGFEHelpersCg.h:
2743         * svg/graphics/filters/cg/SVGFEHelpersCg.mm:
2744         * svg/graphics/filters/cg/SVGFEImageCg.mm:
2745         * svg/graphics/filters/cg/SVGFEMergeCg.mm:
2746         * svg/graphics/filters/cg/SVGFEOffsetCg.mm:
2747         * svg/graphics/filters/cg/SVGFESpecularLightingCg.mm:
2748         * svg/graphics/filters/cg/SVGFETileCg.mm:
2749         * svg/graphics/filters/cg/SVGFilterEffectCg.mm:
2750         * svg/graphics/filters/cg/WKArithmeticFilter.h:
2751         * svg/graphics/filters/cg/WKArithmeticFilter.m:
2752         * svg/graphics/filters/cg/WKComponentMergeFilter.h:
2753         * svg/graphics/filters/cg/WKComponentMergeFilter.m:
2754         * svg/graphics/filters/cg/WKDiffuseLightingFilter.h:
2755         * svg/graphics/filters/cg/WKDiffuseLightingFilter.m:
2756         * svg/graphics/filters/cg/WKDiscreteTransferFilter.h:
2757         * svg/graphics/filters/cg/WKDiscreteTransferFilter.m:
2758         * svg/graphics/filters/cg/WKDisplacementMapFilter.h:
2759         * svg/graphics/filters/cg/WKDisplacementMapFilter.m:
2760         * svg/graphics/filters/cg/WKDistantLightFilter.h:
2761         * svg/graphics/filters/cg/WKDistantLightFilter.m:
2762         * svg/graphics/filters/cg/WKGammaTransferFilter.h:
2763         * svg/graphics/filters/cg/WKGammaTransferFilter.m:
2764         * svg/graphics/filters/cg/WKIdentityTransferFilter.h:
2765         * svg/graphics/filters/cg/WKIdentityTransferFilter.m:
2766         * svg/graphics/filters/cg/WKLinearTransferFilter.h:
2767         * svg/graphics/filters/cg/WKLinearTransferFilter.m:
2768         * svg/graphics/filters/cg/WKNormalMapFilter.h:
2769         * svg/graphics/filters/cg/WKNormalMapFilter.m:
2770         * svg/graphics/filters/cg/WKPointLightFilter.h:
2771         * svg/graphics/filters/cg/WKPointLightFilter.m:
2772         * svg/graphics/filters/cg/WKSpecularLightingFilter.h:
2773         * svg/graphics/filters/cg/WKSpecularLightingFilter.m:
2774         * svg/graphics/filters/cg/WKSpotLightFilter.h:
2775         * svg/graphics/filters/cg/WKSpotLightFilter.m:
2776         * svg/graphics/filters/cg/WKTableTransferFilter.h:
2777         * svg/graphics/filters/cg/WKTableTransferFilter.m:
2778         * svg/graphics/mac/SVGResourceFilterPlatformDataMac.h:
2779         * svg/graphics/mac/SVGResourceFilterPlatformDataMac.mm:
2780         * svg/svgtags.in:
2781
2782 2007-12-08  Dan Bernstein  <mitz@apple.com>
2783
2784         Reviewed by Adele Peterson.
2785
2786         - fix two bugs in parsing of stylesheets in <style> elements created by
2787           the parser:
2788           1. each such stylesheet is parsed twice, once when the text node is
2789              added and again when the </style> tag is reached
2790           2. re-inserting such a <style> element into the document fails to
2791              re-parse and apply its stylesheet.
2792
2793         Test for bug #2: fast/dom/HTMLStyleElement/insert-parser-generated.html
2794
2795         * html/HTMLStyleElement.cpp:
2796         (WebCore::HTMLStyleElement::finishedParsing):
2797         * svg/SVGStyleElement.cpp:
2798         (WebCore::SVGStyleElement::finishedParsing):
2799
2800 2007-12-07  Sam Weinig  <sam@webkit.org>
2801
2802         Reviewed by Darin.
2803
2804         - Removes the faulty isSafeScript implementation that was only
2805           used for plugins.
2806         - Renames isSafeScript to allowsAccessFrom.
2807
2808         * bindings/js/JSDOMWindowCustom.cpp:
2809         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
2810         (WebCore::JSDOMWindow::customPut):
2811         * bindings/js/kjs_dom.cpp:
2812         (WebCore::checkNodeSecurity):
2813         * bindings/js/kjs_window.cpp:
2814         (KJS::createWindow):
2815         (KJS::Window::getValueProperty):
2816         (KJS::Window::namedItemGetter):
2817         (KJS::Window::getOwnPropertySlot):
2818         (KJS::Window::put):
2819         (KJS::Window::allowsAccessFrom):
2820         (KJS::Window::setListener):
2821         (KJS::Window::getListener):
2822         (KJS::WindowProtoFuncOpen::callAsFunction):
2823         (KJS::WindowProtoFuncSetTimeout::callAsFunction):
2824         (KJS::WindowProtoFuncClearTimeout::callAsFunction):
2825         (KJS::WindowProtoFuncSetInterval::callAsFunction):
2826         (KJS::WindowProtoFuncAddEventListener::callAsFunction):
2827         (KJS::WindowProtoFuncRemoveEventListener::callAsFunction):
2828         (KJS::WindowProtoFuncNotImplemented::callAsFunction):
2829         (KJS::Location::getOwnPropertySlot):
2830         (KJS::Location::put):
2831         (KJS::LocationProtoFuncReplace::callAsFunction):
2832         (KJS::LocationProtoFuncReload::callAsFunction):
2833         (KJS::LocationProtoFuncAssign::callAsFunction):
2834         (KJS::LocationProtoFuncToString::callAsFunction):
2835         * bindings/js/kjs_window.h:
2836         (KJS::Window::allowsAccessFrom):
2837         * bindings/objc/WebScriptObject.mm:
2838         (-[WebScriptObject _isSafeScript]): Reverse caller/argument of allowsAccessFrom to match
2839         the new call.
2840         * bindings/scripts/CodeGeneratorJS.pm:
2841
2842 2007-12-08  Rob Buis  <buis@kde.org>
2843
2844         Reviewed by Darin.
2845
2846         http://bugs.webkit.org/show_bug.cgi?id=15464
2847         SVGLengthList allows bad values
2848
2849         Be more strict with svg lengths without a unit identifier.
2850
2851         Test: svg/custom/invalid-lengthlist.svg
2852
2853         * svg/SVGLength.cpp:
2854         (WebCore::SVGLength::setValueAsString):
2855
2856 2007-12-08  Rob Buis  <buis@kde.org>
2857
2858         Mac Tiger build fix.
2859
2860         Use the wtf prefix when including MathExtras.h.
2861
2862         * rendering/RenderMedia.cpp:
2863
2864 2007-12-08  Alp Toker  <alp@atoker.com>
2865
2866         GTK+ build fix (for ENABLE_VIDEO builds):
2867
2868         Include MathExtras.h to get isfinite().
2869
2870         * rendering/RenderMedia.cpp:
2871
2872 2007-12-08  Rob Buis  <buis@kde.org>
2873
2874         Reviewed by Darin.
2875
2876         http://bugs.webkit.org/show_bug.cgi?id=15528
2877         svg_dynamic_cast should be removed
2878
2879         Replace svg_dynamic_cast with a combination of
2880         isSVGElement and static_cast.
2881
2882         * rendering/SVGRootInlineBox.cpp:
2883         (WebCore::SVGRootInlineBox::buildLayoutInformation):
2884         (WebCore::SVGRootInlineBox::buildTextChunks):
2885         * svg/SVGAnimationElement.cpp:
2886         (WebCore::SVGAnimationElement::targetElement):
2887         * svg/SVGElement.h:
2888         * svg/SVGElementInstance.cpp:
2889         (WebCore::SVGElementInstance::updateInstance):
2890         * svg/SVGFilterElement.cpp:
2891         (WebCore::SVGFilterElement::canvasResource):
2892         * svg/SVGGradientElement.cpp:
2893         (WebCore::SVGGradientElement::buildStops):
2894         * svg/SVGLocatable.cpp:
2895         (WebCore::SVGLocatable::getTransformToElement):
2896         * svg/SVGMaskElement.cpp:
2897         (WebCore::SVGMaskElement::drawMaskerContent):
2898         * svg/SVGSwitchElement.cpp:
2899         (WebCore::SVGSwitchElement::childShouldCreateRenderer):
2900         * svg/SVGUseElement.cpp:
2901         (WebCore::SVGUseElement::insertedIntoDocument):
2902         (WebCore::SVGUseElement::buildPendingResource):
2903         (WebCore::SVGUseElement::buildInstanceTree):
2904         (WebCore::SVGUseElement::handleDeepUseReferencing):
2905         (WebCore::SVGUseElement::buildShadowTree):
2906         (WebCore::SVGUseElement::expandUseElementsInShadowTree):
2907         (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements):
2908         * svg/graphics/SVGResource.cpp:
2909         (WebCore::getResourceById):
2910
2911 2007-12-07  Antti Koivisto  <antti@apple.com>
2912
2913         Reviewed by Adele.
2914         
2915         Partial fix for <rdar://problem/5633400>
2916         Transformed <video>, <img>, <embed> are not clipped correctly until a repaint is forced
2917         
2918         Fix video painting when transform is applied.
2919
2920         Test: media/video-transformed.html
2921
2922         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2923         (WebCore::MediaPlayerPrivate::paint):
2924
2925 2007-12-07  Dan Bernstein  <mitz@apple.com>
2926
2927         Reviewed by Sam Weinig.
2928
2929         - fix http://bugs.webkit.org/show_bug.cgi?id=16348
2930           @font-face does not affect the default style
2931
2932         Test: fast/css/font-face-default-font.html
2933
2934         * dom/Document.cpp:
2935         (WebCore::Document::recalcStyle): Pass our font selector to
2936         Font::update() if we already have one.
2937
2938 2007-12-07  Darin Adler  <darin@apple.com>
2939
2940         - fix Windows build
2941
2942         * bridge/win/GlobalHistoryWin.cpp:
2943         (WebCore::historyContains): Missed a rename.
2944
2945 2007-12-07  Brady Eidson  <beidson@apple.com>
2946
2947         Reviewed by Anders and Darin
2948
2949         When a statement bumps up against the quota and the UI Delegate grants more space, we need to
2950         actually set the new maximum size on the SQLiteDatabase (in addition to storing the new max quota
2951         in the DatabaseTracker, which was already done)
2952
2953         * storage/SQLTransaction.cpp:
2954         (WebCore::SQLTransaction::runStatements): If a statement is being retried, set the maximum size on
2955           the SQLiteDatabase to the new maximum size
2956
2957 2007-12-07  Darin Adler  <darin@apple.com>
2958
2959         - fix Tiger build
2960
2961         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: Tiger didn't even have
2962         QTKIT_VERSION_MAX_ALLOWED, so add logic to work without that.
2963
2964 2007-12-07  Darin Adler  <darin@apple.com>
2965
2966         - fix 64-bit build, hopefully without breaking Tiger build
2967
2968         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2969         (WebCore::MediaPlayerPrivate::updateStates):
2970         Don't use Movies.h constants that are nonexistent in 64-bit.
2971         Define the new QTMovie.h constants, though, when using an older QTKit.
2972
2973 2007-12-07  Brady Eidson  <beidson@apple.com>
2974
2975         Reviewed by Anders
2976
2977         Fix <rdar://problem/5636115> - Prompted for quota increase to create database when it already existed
2978
2979         * storage/DatabaseTracker.cpp:
2980         (WebCore::DatabaseTracker::canEstablishDatabase): Check hasEntryForDatabase before doing any prompting
2981         (WebCore::DatabaseTracker::hasEntryForDatabase): Check and see if this database already exists
2982         * storage/DatabaseTracker.h:
2983
2984 2007-12-07  Darin Adler  <darin@apple.com>
2985
2986         Reviewed by Mitz.
2987
2988         - http://bugs.webkit.org/show_bug.cgi?id=15981
2989           speed up visited-link code a bit
2990
2991         * bridge/GlobalHistory.h: Change historyContains to take a character pointer plus length
2992         instead of requiring a DeprecatedString.
2993
2994         * bridge/mac/GlobalHistoryMac.mm: (WebCore::historyContains): Updated for above change.
2995         Also removes pointless "fast Latin-1" case that was never used.
2996         * bridge/win/GlobalHistoryWin.cpp: (WebCore::historyContains): Ditto.
2997         * platform/gtk/TemporaryLinkStubs.cpp: (WebCore::historyContains): Ditto.
2998         * platform/wx/TemporaryLinkStubs.cpp: (WebCore::historyContains): Ditto.
2999
3000         * css/CSSStyleSelector.cpp:
3001         (WebCore::findHash): Added. Helper for cleanpath.
3002         (WebCore::findSlashDotDotSlash): Ditto.
3003         (WebCore::findSlashSlash): Ditto.
3004         (WebCore::findSlashDotSlash): Ditto.
3005         (WebCore::cleanpath): Changed to use fast helper functions instead of slower general-purpose
3006         DeprecatedString find function.
3007         (WebCore::containsColonSlashSlash): Added. Helper for checkPseudoState.
3008         (WebCore::checkPseudoState): Got rid of reference count churn by using an AtomicString*
3009         instead of an AtomicString for the attribute value. Changed to use fast helper function
3010         instead of slower DeprecatedString::contains function, and also made the fast case not
3011         bother allocating a DeprecatedConstString.
3012
3013         - unrelated tiny cleanup
3014
3015         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
3016         (WebCore::releaseCachedStops): Use static_cast instead of reinterpret_cast.
3017         (WebCore::cgGradientCallback): Ditto.
3018
3019 2007-12-07  Darin Adler  <darin@apple.com>
3020
3021         Fix build on Tiger (Mark Rowe told me how).
3022
3023         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3024         Include <objc/objc-runtime.h>, which existed back on Tiger,
3025         rather than <objc/runtime.h>, which did not.
3026
3027 2007-12-07  Geoffrey Garen  <ggaren@apple.com>
3028
3029         Build fix: rolling out last build fix to change #include path.
3030
3031         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3032
3033 2007-12-07  Steve Falkenburg  <sfalken@apple.com>
3034
3035         Re-named our B&I flag from BUILDBOT to PRODUCTION.
3036
3037         Reviewed by Sam Weinig.
3038
3039         * WebCore.vcproj/WebCore.make:
3040
3041 2007-12-07  Geoffrey Garen  <ggaren@apple.com>
3042
3043         Build fix: corrected #include path.
3044
3045         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3046
3047 2007-12-07  Geoffrey Garen  <ggaren@apple.com>
3048
3049         Reviewed by Sam Weinig.
3050
3051         Added some namespace qualifications and a forwarding header, now that
3052         KJS::Node is sometimes #included in WebCore by JavaScriptCore headers.
3053
3054         * ForwardingHeaders/wtf/ListRefPtr.h: Added.
3055         * bindings/js/JSXSLTProcessor.cpp:
3056         (KJS::JSXSLTProcessorPrototypeFunctionTransformToFragment::callAsFunction):
3057         * bindings/js/kjs_binding.cpp:
3058         (KJS::ScriptInterpreter::getDOMNodeForDocument):
3059         (KJS::ScriptInterpreter::forgetDOMNodeForDocument):
3060         (KJS::ScriptInterpreter::putDOMNodeForDocument):
3061         (KJS::ScriptInterpreter::markDOMNodesForDocument):
3062         (KJS::ScriptInterpreter::updateDOMNodeDocument):
3063
3064 2007-12-07  Adam Roben  <aroben@apple.com>
3065
3066         Add SoftLinking.h for Windows and use it in a few places
3067
3068         Reviewed by Oliver.
3069
3070         * WebCore.vcproj/WebCore.vcproj: Added new file to project.
3071         * platform/win/PlatformScrollBarSafari.cpp: Use SoftLinking.h.
3072         (WebCore::PlatformScrollbar::PlatformScrollbar): Removed manual
3073         soft-linking calls.
3074         (WebCore::PlatformScrollbar::paintButton): Check for the presence of
3075         the SafariTheme library now that we can't check for the presence of
3076         paintThemePart directly.
3077         (WebCore::PlatformScrollbar::paintTrack): Ditto.
3078         (WebCore::PlatformScrollbar::paintThumb): Ditto.
3079         * platform/win/SoftLinking.h: Copied from WebCore/platform/mac/SoftLinking.h.
3080         * rendering/RenderThemeSafari.cpp: Same basic changes as to
3081         PlatformScrollBarSafari.cpp.
3082         (WebCore::RenderThemeSafari::RenderThemeSafari):
3083         (WebCore::RenderThemeSafari::isControlStyled):
3084         (WebCore::RenderThemeSafari::paintCapsLockIndicator):
3085         * rendering/RenderThemeSafari.h: Removed m_themeDLL member.
3086
3087 2007-12-07  Darin Adler  <darin@apple.com>
3088
3089         Reviewed by Adele.
3090
3091         - fix <rdar://problem/5608795> CrashTracer: 481 crashes in Safari
3092           at WebCore::HTMLSelectElement::saveState const + 152
3093
3094         Test: fast/forms/select-set-inner.html
3095
3096         * dom/ContainerNode.cpp:
3097         (WebCore::ContainerNode::removeChildren): Added a return value, as with other
3098         calls that change children, so we can optimize for the case where it does nothing.
3099         (WebCore::ContainerNode::cloneChildNodes): Changed parameter type to ContainerNode.
3100         * dom/ContainerNode.h: See above.
3101
3102         * html/HTMLOptGroupElement.cpp:
3103         (WebCore::HTMLOptGroupElement::removeChildren): Override removeChildren and call
3104         recalcSelectOptions in that case.
3105         (WebCore::HTMLOptGroupElement::childrenChanged): Override childrenChanged instead of
3106         addChild, for consistency with HTMLSelectElement; no need to override both.
3107         (WebCore::HTMLOptGroupElement::groupLabelText): Made const.
3108         * html/HTMLOptGroupElement.h: See above.
3109
3110         * html/HTMLSelectElement.cpp: Don't override addChild any more, because we already
3111         override childrenChanged, and addChild calls that.
3112         (WebCore::HTMLSelectElement::removeChildren): Override removeChildren and call
3113         recalcSelectOptions in that case.
3114         (WebCore::HTMLSelectElement::recalcListItems): Tightened up the code a little bit
3115         by using a for loop and traverseNextSibling. Also added some new comments and
3116         removed some obsolete ones.
3117         (WebCore::HTMLSelectElement::checkListItems): Added. Debug-only check to make
3118         sure we don't have a stale list items vector.
3119         * html/HTMLSelectElement.h: Changed listItems() to invoke checkListItems().
3120         This will help us catch cases where we have too few calls to setRecalcListItems.
3121
3122 2007-12-07  Dan Bernstein  <mitz@apple.com>
3123
3124         Reviewed by Darin Adler.
3125
3126         - WebCore part of fixing <rdar://problem/5499918> REGRESSION: insertion point in input field with custom border cuts holes in focus ring interior edges
3127
3128         Test: fast/repaint/focus-ring.html
3129
3130         * editing/SelectionController.cpp:
3131         (WebCore::SelectionController::caretRepaintRect): Changed to return just
3132         the caret rect without any padding.
3133         (WebCore::SelectionController::recomputeCaretRect): Changed to repaint
3134         just the caret rect without any padding.
3135         * platform/graphics/GraphicsContext.h: Removed setFocusRingClip() and
3136         clearFocusRingClip().
3137         * platform/graphics/cairo/GraphicsContextCairo.cpp: Ditto.
3138         * platform/graphics/cg/GraphicsContextCG.cpp: Ditto.
3139         * platform/graphics/cg/GraphicsContextPlatformPrivate.h: Removed
3140         m_focusRingClip member.
3141         * platform/graphics/mac/GraphicsContextMac.mm:
3142         (WebCore::GraphicsContext::drawFocusRing): Changed to call
3143         wkDrawFocusRing() once without setting up additional clip. On Leopard,
3144         wkDrawFocusRing() respects the context clip now. On Tiger, a
3145         transparency layer is used to apply clipping to the focus ring.
3146         * platform/graphics/qt/GraphicsContextQt.cpp: Removed focus ring clip
3147         methods and member.
3148         * platform/graphics/wx/GraphicsContextWx.cpp: Ditto.
3149         * platform/mac/WebCoreSystemInterface.h: Removed the clipRect argument
3150         to wkDrawFocusRing().
3151         * platform/mac/WebCoreSystemInterface.mm: Ditto.
3152         * rendering/RenderLayer.cpp:
3153         (WebCore::setClip): Removed call to set the focus ring clip.
3154         (WebCore::restoreClip): Removed call to reset the focus ring clip.
3155
3156 2007-12-07  Darin Adler  <darin@apple.com>
3157
3158         Reviewed by Antti Koivisto and Kevin Decker.
3159
3160         - fix <rdar://problem/5601586> QtKit should be dynamically loaded upon need, not linked at startup
3161
3162         Also did a lot of small tweaks to MediaPlayerPrivateQTKit.
3163
3164         * WebCore.xcodeproj/project.pbxproj: Don't link to QTKit.
3165
3166         * platform/graphics/mac/MediaPlayerPrivateQTKit.h: Omit unneeded includes and declarations.
3167         Made a lot more functions const. Made a few more members private and a couple inline.
3168         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: Added soft linking machinery for all the
3169         things we currently use in QTKit. It's a little more awkward for classes and other data objects
3170         than it is for functions, but still relatively straightforward, with no changes needed to the
3171         client code. Added using namespace directives. Made a cuePointTimerInterval constant and put
3172         it at the top of the file. Use 0 consistently instead of sometimes 0 and sometimes 0.0f.
3173         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): Removed unneeded initialization of RetainPtr
3174         members to nil.
3175         (WebCore::MediaPlayerPrivate::createQTMovie): Use adoptNS instead of autorelease.
3176         (WebCore::MediaPlayerPrivate::createQTMovieView): Ditto. Also use -[NSColor clearColor].
3177         (WebCore::MediaPlayerPrivate::createQTTime): Remove an unneeded type cast that had no effect.
3178         Changed to use long instead of int because that's the type for a QTTime time scale anyway.
3179         (WebCore::MediaPlayerPrivate::duration): Use a static_cast instead of a C-style cast.
3180         (WebCore::MediaPlayerPrivate::currentTime): Ditto. Also merged into a single expression.
3181         (WebCore::MediaPlayerPrivate::cuePointTimerFired): Added code to make a copy of the cue
3182         points set to avoid a potential problem with a set being modified as we iterate it.
3183         (WebCore::MediaPlayerPrivate::bytesLoaded): Removed unneeded null check of m_qtMovie.
3184         (WebCore::MediaPlayerPrivate::updateStates): Instead of comments explaining the numeric
3185         values, used the constants from the headers directly.
3186         (WebCore::MediaPlayerPrivate::getSupportedTypes): Instead of (QTMovieFileTypeOptions)0,
3187         pass the named constant with value 0, QTIncludeCommonTypes. Skipped the intermediate type
3188         of NSString to remove one cast. Replaced C-style cast with reinterpret_cast (arguably
3189         no better). Used RetainPtr instead of explicit CFRelease calls.
3190
3191         * platform/mac/SoftLinking.h: Added macros to do soft linking for classes and for pointers.
3192         It's not quite as automatic as the soft linking we can do for functions, since these define
3193         functions to get the values, so you need to define macros to make what look like variable
3194         accesses turn into function calls. See MediaPlayerPrivateQTKit for the details.
3195
3196         * html/HTMLMediaElement.h:
3197         * html/TimeRanges.h:
3198         * html/VoidCallback.h:
3199         * platform/graphics/MediaPlayer.h:
3200         Use angle brackets for wtf includes. Omit unneeded includes.
3201
3202 2007-12-07  Dan Bernstein  <mitz@apple.com>
3203
3204         Reviewed by Darin Adler.
3205
3206         - fix http://bugs.webkit.org/show_bug.cgi?id=16334
3207           <rdar://problem/5634923> REGRESSION (r28299): Homepage of any DotMac Web Gallery won't load completely
3208
3209         Test: fast/dynamic/subtree-no-common-root-static-y.html
3210
3211         * rendering/RenderObject.cpp:
3212         (WebCore::RenderObject::markContainingBlocksForLayout): Changed the call
3213         to setChildNeedsLayout() to not mark containing blocks and added a
3214         separate call to markContainingBlocksForLayout() that will not schedule
3215         a layout if we are already in the middle of scheduleRelayoutOfSubtree().
3216
3217 2007-12-07  Alexey Proskuryakov  <ap@webkit.org>
3218
3219         Reviewed by Darin.
3220
3221         http://bugs.webkit.org/show_bug.cgi?id=16325
3222         <rdar://problem/5632997> REGRESSION: www.xerox.ru doesn't work
3223         
3224         Test: http/tests/misc/empty-cookie.html
3225
3226         * platform/mac/CookieJar.mm:
3227         (WebCore::setCookies): Don't store empty cookies.
3228         (WebCore::cookies): Filter out empty cookies if we have them, as they could have been set
3229         with an earlier version of Leopard!
3230
3231 2007-12-06  Ada Chan  <adachan@apple.com>
3232
3233         Fixed the if statement (ERROR_SUCCESS is 0 and we were actually
3234         returning true when there's an error).
3235
3236         Reviewed by Steve.
3237
3238         * platform/win/FileSystemWin.cpp:
3239         (WebCore::makeAllDirectories):
3240
3241 2007-12-06  Darin Adler  <darin@apple.com>
3242
3243         - fix broken regression test
3244
3245         * bindings/js/kjs_binding.cpp:
3246         (KJS::setDOMException): Oops, this was just supposed to be PERMISSION_DENIED.
3247
3248 2007-12-06  Darin Adler  <darin@apple.com>
3249
3250         Reviewed by Sam Weinig.
3251
3252         - fix http://bugs.webkit.org/show_bug.cgi?id=16332
3253           ObjC DOM exception object descriptions should include the exception name
3254
3255         * WebCore.pro: Added ExceptionCode.cpp.
3256         * WebCore.vcproj/WebCore.vcproj: Added ExceptionCode.cpp.
3257         * WebCore.xcodeproj/project.pbxproj: Added ExceptionCode.cpp.
3258         * WebCoreSources.bkl: Added ExceptionCode.cpp.
3259
3260         * bindings/js/kjs_binding.cpp: (KJS::setDOMException): Moved the code to decompose an
3261         ExceptionCode into ExceptionCode.h/cpp -- getExceptionCodeDescription. Also removed
3262         the many unneeded includes that were here. Had to keep one special case here, for
3263         SECURITY_ERR.
3264
3265         * bindings/objc/ExceptionHandlers.mm: (WebCore::raiseDOMException): Changed to use the
3266         new getExceptionCodeDescription function so that this shares the exception name
3267         information that was previously only available to JavaScript.
3268
3269         * dom/ExceptionCode.cpp: Copied from bindings/js/kjs_binding.cpp.
3270         (WebCore::getExceptionCodeDescription): Added some assertions, and made the function
3271         handle exception names in a slightly more robust way that is not subject to integer
3272         overflow. (Not a real world issue since we should never receive a bad exception code.)
3273
3274         * dom/ExceptionCode.h: Added the ExceptionCodeDescription struct and the
3275         getExceptionCodeDescription function.
3276
3277         * svg/SVGException.h: Added a missing #include and got rid of some comments. Some of
3278         the comments were mildly helpful, but others were incorrect. This now matches the other
3279         exception-related headers such as RangeException.h.
3280
3281 2007-12-06  Brady Eidson  <beidson@apple.com>
3282
3283         Reviewed by Darin
3284
3285         Fixed a glaring bug that would prevent a statement from getting run a second time
3286
3287         * storage/SQLStatement.cpp:
3288         (WebCore::SQLStatement::execute): Clear failure due to quota *before* we check the error
3289           and return early
3290         (WebCore::SQLStatement::clearFailureDueToQuota): Only clear the error if it was a quota error
3291
3292 2007-12-06  Timothy Hatcher  <timothy@apple.com>
3293
3294         Reviewed by Oliver Hunt.
3295
3296         Use keydown instead of keypress so keyIdentifier can be used.
3297
3298         * page/inspector/ConsolePanel.js: Use keydown instead of keypress.
3299         * page/inspector/DatabasePanel.js: Ditto.
3300         * page/inspector/inspector.js: Ditto. Plus call removeEventListener
3301         before deleting windowLoaded.
3302
3303 2007-12-06  Adam Roben  <aroben@apple.com>
3304
3305         Rename FontsTable.plist to FontsList.plist
3306
3307         Rubberstamped by Hyatt.
3308
3309         * platform/graphics/win/FontDatabase.cpp:
3310
3311 2007-12-06  Brady Eidson  <beidson@apple.com>
3312
3313         Reviewed by Darin
3314
3315         Tweaked a comment and a few assertions from my last checkin
3316
3317         * storage/SQLStatement.cpp:
3318         (WebCore::SQLStatement::execute):
3319         (WebCore::SQLStatement::clearFailureDueToQuota):
3320         (WebCore::SQLStatement::lastExecutionFailedDueToQuota):
3321
3322 2007-12-06  Brady Eidson <beidson@apple.com>
3323
3324         Reviewed by Darin
3325
3326         Finished hooking up UI Delegate for databases - Database operations will now enforce a size quota and
3327         will ask the UI Delegate for more space when that quota is met
3328
3329         * platform/sql/SQLiteDatabase.cpp: Add the new SQLResultFull constant
3330         * platform/sql/SQLiteDatabase.h: Ditto
3331
3332         * storage/Database.cpp:
3333         (WebCore::Database::securityOriginData): Added this accessor, copying for thread safety
3334         (WebCore::Database::stringIdentifier): Ditto
3335         * storage/Database.h:
3336
3337         * storage/SQLStatement.cpp:
3338         (WebCore::SQLStatement::SQLStatement):
3339         (WebCore::SQLStatement::execute): Change to return an enum that represents 3 states - success, error, and quota.
3340           If the result is quota, this statement expects that it might be run again, presumably after the user increases 
3341           the quota
3342         (WebCore::SQLStatement::setFailureDueToQuota): Setup a quota failure, including a flag and the error
3343         (WebCore::SQLStatement::clearFailureDueToQuota): Clear a quota failure, for when the statement is rerun
3344         (WebCore::SQLStatement::lastExecutionFailedDueToQuota):
3345         * storage/SQLStatement.h:
3346
3347         * storage/SQLTransaction.cpp:
3348         (WebCore::SQLTransaction::SQLTransaction):
3349         (WebCore::SQLTransaction::performPendingCallback): Added an acceptable callback pointer
3350         (WebCore::SQLTransaction::openTransactionAndPreflight): Setup the quota in the database that will remain for this 
3351           transaction.  Note that in this patch, the quota being set is wrong - it makes sense to fix that in a follow up patch
3352         (WebCore::SQLTransaction::runStatements): Modified to add the ability to re-run a statement based on the UI delegate
3353           decision and whether the current statement was already run
3354         (WebCore::SQLTransaction::runCurrentStatement): Added another result condition - the Quota result - and handle it
3355         (WebCore::SQLTransaction::handleCurrentStatementError): Statements can now error-out from two places, so the code
3356           that handles a statement error was moved here
3357         (WebCore::SQLTransaction::deliverQuotaIncreaseCallback): Added - Consult the UI delegate for more quota, then 
3358           reschedule the current statement on the database thread
3359         * storage/SQLTransaction.h:
3360
3361 2007-12-06  Steve Falkenburg  <sfalken@apple.com>
3362
3363         <rdar://problem/5614257> Crash in timer / hashtable code due to uncaught exception
3364         
3365         Don't use callback-based timers, since these cause Windows to eat Windows crashes
3366         in code the timers call.
3367         
3368         Windows appears to be defending against "shatter" attacks partially by setting
3369         up a structured exception block while dispatching callback-based WM_TIMERs.
3370         
3371         I verified this by adding a divide by zero into some timer callback code.
3372         In the case where the timer was dispatched via a callback, the divide by zero
3373         exception was silently handled and ignored, with execution continuing after
3374         our call to DispatchMessage.  When processed via the WNDPROC, no SEH
3375         block was established by Windows, and our divide by zero generated a real
3376         crash (which is what we wanted).
3377         
3378         Windows handling our crashes for us led us to leave the timer data structures
3379         in an invalid state so the next time a timer was set, we'd crash accessing an
3380         invalid HashMap of timer data.
3381         
3382         Reviewed by Hyatt.
3383
3384         * platform/win/SharedTimerWin.cpp:
3385         (WebCore::TimerWindowWndProc):
3386         (WebCore::setSharedTimerFireTime):
3387
3388 2007-12-06  Adam Roben  <aroben@apple.com>
3389
3390         Fix <rdar://5108390> Feed title is too low in blue banner
3391
3392         Way back in r23069 we started applying the same font ascent hack that
3393         Mac WebKit applies to Helvetica, Times, and Courier. We did this so
3394         that those fonts would match the Mac metrics when we run the
3395         regression tests. However, this hack was applying to Arial on Windows
3396         when a site would specify the Helvetica font face because Windows will
3397         alias the font names. Instead of removing the hack entirely, we
3398         turn it off by default but provide some SPI so that DumpRenderTree can
3399         turn it on.
3400
3401         Reviewed by Hyatt.
3402
3403         All tests pass.
3404
3405         * platform/graphics/FontData.h: Add a new static method to turn on the
3406         hack on Windows only.
3407         * platform/graphics/win/FontDataWin.cpp:
3408         (WebCore::FontData::setShouldApplyMacAscentHack): Added.
3409         (WebCore::FontData::platformInit): Only perform the hack if
3410         shouldApplyMacAscentHack is true.
3411
3412 2007-12-06  Geoffrey Garen  <ggaren@apple.com>
3413
3414         Reviewed by Sam Weinig.
3415
3416         Fixed http://bugs.webkit.org/show_bug.cgi?id=16328
3417         REGRESSION (r28470): Crash expanding a GMail conversation
3418         
3419         * page/Frame.cpp:
3420         (WebCore::Frame::scriptProxy): Only return 0 if JS seems disabled *and*
3421         we haven't created the proxy yet. If we've created the proxy already, a
3422         script may be in the midst of execution, even though we've lost our
3423         settings object. During execution, scripts assume they have free access
3424         to the proxy.
3425
3426 2007-12-06  Adele Peterson  <adele@apple.com>
3427
3428         Reviewed by Oliver.
3429
3430         Fix for <rdar://problem/5631356> Toggling display property on video causes controls to get lost
3431
3432         * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::attach): Call updateFromElement.
3433         * html/HTMLMediaElement.h:
3434
3435 2007-12-05  Antti Koivisto  <antti@apple.com>
3436
3437         Reviewed by Oliver.
3438
3439         Rename
3440
3441         Movie -> MediaPlayer
3442         MoviePrivate -> MediaPlayerPrivate
3443         
3444         Movie is QuickTime terminology and clashes with its C API.
3445
3446         * WebCore.xcodeproj/project.pbxproj:
3447         * html/HTMLMediaElement.cpp:
3448         (WebCore::HTMLMediaElement::HTMLMediaElement):
3449         (WebCore::HTMLMediaElement::~HTMLMediaElement):
3450         (WebCore::HTMLMediaElement::initAndDispatchProgressEvent):
3451         (WebCore::HTMLMediaElement::bufferingRate):
3452         (WebCore::HTMLMediaElement::load):
3453         (WebCore::HTMLMediaElement::mediaPlayerNetworkStateChanged):
3454         (WebCore::HTMLMediaElement::mediaPlayerReadyStateChanged):
3455         (WebCore::HTMLMediaElement::setReadyState):
3456         (WebCore::HTMLMediaElement::progressEventTimerFired):
3457         (WebCore::HTMLMediaElement::seek):
3458         (WebCore::HTMLMediaElement::currentTime):
3459         (WebCore::HTMLMediaElement::duration):
3460         (WebCore::HTMLMediaElement::playbackRate):
3461         (WebCore::HTMLMediaElement::setPlaybackRate):
3462         (WebCore::HTMLMediaElement::play):
3463         (WebCore::HTMLMediaElement::pause):
3464         (WebCore::HTMLMediaElement::setVolume):
3465         (WebCore::HTMLMediaElement::setMuted):
3466         (WebCore::HTMLMediaElement::pickMedia):
3467         (WebCore::HTMLMediaElement::checkIfSeekNeeded):
3468         (WebCore::HTMLMediaElement::mediaPlayerVolumeChanged):
3469         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
3470         (WebCore::HTMLMediaElement::mediaPlayerCuePointReached):
3471         (WebCore::HTMLMediaElement::addCuePoint):
3472         (WebCore::HTMLMediaElement::buffered):
3473         (WebCore::HTMLMediaElement::seekable):
3474         (WebCore::HTMLMediaElement::effectiveStart):
3475         (WebCore::HTMLMediaElement::effectiveEnd):
3476         (WebCore::HTMLMediaElement::effectiveLoopStart):
3477         (WebCore::HTMLMediaElement::effectiveLoopEnd):
3478         (WebCore::HTMLMediaElement::updateMediaPlayer):
3479         (WebCore::HTMLMediaElement::willSaveToCache):
3480         * html/HTMLMediaElement.h:
3481         (WebCore::HTMLMediaElement::player):
3482         * html/HTMLVideoElement.cpp:
3483         (WebCore::HTMLVideoElement::videoWidth):
3484         (WebCore::HTMLVideoElement::videoHeight):
3485         * platform/MIMETypeRegistry.cpp:
3486         (WebCore::initialiseSupportedMediaMIMETypes):
3487         (WebCore::MIMETypeRegistry::isSupportedMediaMIMEType):
3488         (WebCore::MIMETypeRegistry::getSupportedMediaMIMETypes):
3489         * platform/MIMETypeRegistry.h:
3490         * platform/graphics/MediaPlayer.cpp: Copied from WebCore/platform/graphics/Movie.cpp.
3491         (WebCore::MediaPlayer::MediaPlayer):
3492         (WebCore::MediaPlayer::~MediaPlayer):
3493         (WebCore::MediaPlayer::load):
3494         (WebCore::MediaPlayer::cancelLoad):
3495         (WebCore::MediaPlayer::play):
3496         (WebCore::MediaPlayer::pause):
3497         (WebCore::MediaPlayer::duration):
3498         (WebCore::MediaPlayer::currentTime):
3499         (WebCore::MediaPlayer::seek):
3500         (WebCore::MediaPlayer::paused):
3501         (WebCore::MediaPlayer::seeking):
3502         (WebCore::MediaPlayer::naturalSize):
3503         (WebCore::MediaPlayer::hasVideo):
3504         (WebCore::MediaPlayer::networkState):
3505         (WebCore::MediaPlayer::readyState):
3506         (WebCore::MediaPlayer::volume):
3507         (WebCore::MediaPlayer::setVolume):
3508         (WebCore::MediaPlayer::rate):
3509         (WebCore::MediaPlayer::setRate):
3510         (WebCore::MediaPlayer::muted):
3511         (WebCore::MediaPlayer::setMuted):
3512         (WebCore::MediaPlayer::dataRate):
3513         (WebCore::MediaPlayer::setEndTime):
3514         (WebCore::MediaPlayer::addCuePoint):
3515         (WebCore::MediaPlayer::removeCuePoint):
3516         (WebCore::MediaPlayer::clearCuePoints):
3517         (WebCore::MediaPlayer::maxTimeBuffered):
3518         (WebCore::MediaPlayer::maxTimeSeekable):
3519         (WebCore::MediaPlayer::bytesLoaded):
3520         (WebCore::MediaPlayer::totalBytesKnown):
3521         (WebCore::MediaPlayer::totalBytes):
3522         (WebCore::MediaPlayer::setRect):
3523         (WebCore::MediaPlayer::visible):
3524         (WebCore::MediaPlayer::setVisible):
3525         (WebCore::MediaPlayer::paint):
3526         (WebCore::MediaPlayer::getSupportedTypes):
3527         (WebCore::MediaPlayer::networkStateChanged):
3528         (WebCore::MediaPlayer::readyStateChanged):
3529         (WebCore::MediaPlayer::volumeChanged):
3530         (WebCore::MediaPlayer::timeChanged):
3531         (WebCore::MediaPlayer::cuePointReached):
3532         * platform/graphics/MediaPlayer.h: Copied from WebCore/platform/graphics/Movie.h.
3533         (WebCore::MediaPlayerClient::~MediaPlayerClient):
3534         (WebCore::MediaPlayerClient::mediaPlayerNetworkStateChanged):
3535         (WebCore::MediaPlayerClient::mediaPlayerReadyStateChanged):
3536         (WebCore::MediaPlayerClient::mediaPlayerVolumeChanged):
3537         (WebCore::MediaPlayerClient::mediaPlayerTimeChanged):
3538         (WebCore::MediaPlayerClient::mediaPlayerCuePointReached):
3539         * platform/graphics/Movie.cpp: Removed.
3540         * platform/graphics/Movie.h: Removed.
3541         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp: Copied from WebCore/platform/graphics/gtk/MoviePrivateGStreamer.cpp.
3542         (WebCore::mediaPlayerPrivateErrorCallback):
3543         (WebCore::mediaPlayerPrivateEOSCallback):
3544         (WebCore::mediaPlayerPrivateStateCallback):
3545         (WebCore::mediaPlayerPrivateBufferingCallback):
3546         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
3547         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
3548         (WebCore::MediaPlayerPrivate::load):
3549         (WebCore::MediaPlayerPrivate::play):
3550         (WebCore::MediaPlayerPrivate::pause):
3551         (WebCore::MediaPlayerPrivate::duration):
3552         (WebCore::MediaPlayerPrivate::currentTime):
3553         (WebCore::MediaPlayerPrivate::seek):
3554         (WebCore::MediaPlayerPrivate::setEndTime):
3555         (WebCore::MediaPlayerPrivate::addCuePoint):
3556         (WebCore::MediaPlayerPrivate::removeCuePoint):
3557         (WebCore::MediaPlayerPrivate::clearCuePoints):
3558         (WebCore::MediaPlayerPrivate::startCuePointTimerIfNeeded):
3559         (WebCore::MediaPlayerPrivate::cancelSeek):
3560         (WebCore::MediaPlayerPrivate::cuePointTimerFired):
3561         (WebCore::MediaPlayerPrivate::paused):
3562         (WebCore::MediaPlayerPrivate::seeking):
3563         (WebCore::MediaPlayerPrivate::naturalSize):
3564         (WebCore::MediaPlayerPrivate::hasVideo):
3565         (WebCore::MediaPlayerPrivate::setVolume):
3566         (WebCore::MediaPlayerPrivate::setMuted):
3567         (WebCore::MediaPlayerPrivate::setRate):
3568         (WebCore::MediaPlayerPrivate::dataRate):
3569         (WebCore::MediaPlayerPrivate::networkState):
3570         (WebCore::MediaPlayerPrivate::readyState):
3571         (WebCore::MediaPlayerPrivate::maxTimeBuffered):
3572         (WebCore::MediaPlayerPrivate::maxTimeSeekable):
3573         (WebCore::MediaPlayerPrivate::maxTimeLoaded):
3574         (WebCore::MediaPlayerPrivate::bytesLoaded):
3575         (WebCore::MediaPlayerPrivate::totalBytesKnown):
3576         (WebCore::MediaPlayerPrivate::totalBytes):
3577         (WebCore::MediaPlayerPrivate::cancelLoad):
3578         (WebCore::MediaPlayerPrivate::updateStates):
3579         (WebCore::MediaPlayerPrivate::loadStateChanged):
3580         (WebCore::MediaPlayerPrivate::rateChanged):
3581         (WebCore::MediaPlayerPrivate::sizeChanged):
3582         (WebCore::MediaPlayerPrivate::timeChanged):
3583         (WebCore::MediaPlayerPrivate::volumeChanged):
3584         (WebCore::MediaPlayerPrivate::didEnd):
3585         (WebCore::MediaPlayerPrivate::loadingFailed):
3586         (WebCore::MediaPlayerPrivate::setRect):
3587         (WebCore::MediaPlayerPrivate::setVisible):
3588         (WebCore::MediaPlayerPrivate::paint):
3589         (WebCore::MediaPlayerPrivate::getSupportedTypes):
3590         (WebCore::MediaPlayerPrivate::createGSTPlayBin):
3591         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h: Copied from WebCore/platform/graphics/gtk/MoviePrivateGStreamer.h.
3592         * platform/graphics/gtk/MoviePrivateGStreamer.cpp: Removed.
3593         * platform/graphics/gtk/MoviePrivateGStreamer.h: Removed.
3594         * platform/graphics/mac/MediaPlayerPrivateQTKit.h: Copied from WebCore/platform/graphics/mac/MoviePrivateQTKit.h.
3595         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: Copied from WebCore/platform/graphics/mac/MoviePrivateQTKit.mm.
3596         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
3597         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
3598         (WebCore::MediaPlayerPrivate::createQTMovie):
3599         (WebCore::MediaPlayerPrivate::createQTMovieView):
3600         (WebCore::MediaPlayerPrivate::createQTTime):
3601         (WebCore::MediaPlayerPrivate::load):
3602         (WebCore::MediaPlayerPrivate::play):
3603         (WebCore::MediaPlayerPrivate::pause):
3604         (WebCore::MediaPlayerPrivate::duration):
3605         (WebCore::MediaPlayerPrivate::currentTime):
3606         (WebCore::MediaPlayerPrivate::seek):
3607         (WebCore::MediaPlayerPrivate::doSeek):
3608         (WebCore::MediaPlayerPrivate::cancelSeek):
3609         (WebCore::MediaPlayerPrivate::seekTimerFired):
3610         (WebCore::MediaPlayerPrivate::setEndTime):
3611         (WebCore::MediaPlayerPrivate::addCuePoint):
3612         (WebCore::MediaPlayerPrivate::removeCuePoint):
3613         (WebCore::MediaPlayerPrivate::clearCuePoints):
3614         (WebCore::MediaPlayerPrivate::startCuePointTimerIfNeeded):
3615         (WebCore::MediaPlayerPrivate::cuePointTimerFired):
3616         (WebCore::MediaPlayerPrivate::paused):
3617         (WebCore::MediaPlayerPrivate::seeking):
3618         (WebCore::MediaPlayerPrivate::naturalSize):
3619         (WebCore::MediaPlayerPrivate::hasVideo):
3620         (WebCore::MediaPlayerPrivate::setVolume):
3621         (WebCore::MediaPlayerPrivate::setMuted):
3622         (WebCore::MediaPlayerPrivate::setRate):
3623         (WebCore::MediaPlayerPrivate::dataRate):
3624         (WebCore::MediaPlayerPrivate::networkState):
3625         (WebCore::MediaPlayerPrivate::readyState):
3626         (WebCore::MediaPlayerPrivate::maxTimeBuffered):
3627         (WebCore::MediaPlayerPrivate::maxTimeSeekable):
3628         (WebCore::MediaPlayerPrivate::maxTimeLoaded):
3629         (WebCore::MediaPlayerPrivate::bytesLoaded):
3630         (WebCore::MediaPlayerPrivate::totalBytesKnown):
3631         (WebCore::MediaPlayerPrivate::totalBytes):
3632         (WebCore::MediaPlayerPrivate::cancelLoad):
3633         (WebCore::MediaPlayerPrivate::updateStates):
3634         (WebCore::MediaPlayerPrivate::loadStateChanged):
3635         (WebCore::MediaPlayerPrivate::rateChanged):
3636         (WebCore::MediaPlayerPrivate::sizeChanged):
3637         (WebCore::MediaPlayerPrivate::timeChanged):
3638         (WebCore::MediaPlayerPrivate::volumeChanged):
3639         (WebCore::MediaPlayerPrivate::didEnd):
3640         (WebCore::MediaPlayerPrivate::setRect):
3641         (WebCore::MediaPlayerPrivate::setVisible):
3642         (WebCore::MediaPlayerPrivate::paint):
3643         (WebCore::MediaPlayerPrivate::getSupportedTypes):
3644         (-[WebCoreMovieObserver initWithCallback:WebCore::]):
3645         * platform/graphics/mac/MoviePrivateQTKit.h: Removed.
3646         * platform/graphics/mac/MoviePrivateQTKit.mm: Removed.
3647         * rendering/RenderMedia.cpp:
3648         (WebCore::RenderMedia::player):
3649         * rendering/RenderMedia.h:
3650         * rendering/RenderVideo.cpp:
3651         (WebCore::RenderVideo::RenderVideo):
3652         (WebCore::RenderVideo::~RenderVideo):
3653         (WebCore::RenderVideo::videoSizeChanged):
3654         (WebCore::RenderVideo::paintReplaced):
3655         (WebCore::RenderVideo::layout):
3656         (WebCore::RenderVideo::updateFromElement):
3657         (WebCore::RenderVideo::updatePlayer):
3658         * rendering/RenderVideo.h:
3659
3660 2007-12-06  Geoffrey Garen  <ggaren@apple.com>
3661
3662         Build fix: access global object directly.
3663
3664         * plugins/win/PluginViewWin.cpp:
3665         (WebCore::PluginViewWin::bindingInstance):
3666
3667 2007-12-06  Mark Rowe  <mrowe@apple.com>
3668
3669         Reviewed by Eric.
3670
3671         Fix bug spotted by GCC 4.2.
3672
3673         * bindings/js/kjs_window.cpp:
3674         (KJS::allowPopUp): Remove extraneous semicolon that completely changed the meaning of allowPopUp.
3675
3676 2007-12-06  Holger Hans Peter Freyther <holger.freyther@trolltech.com>
3677
3678         Reviewed by Alp Toker.
3679
3680         http://bugs.webkit.org/show_bug.cgi?id=16173
3681         Licensing change
3682
3683         Change license from BSD to LGPL.
3684
3685         * platform/gtk/FileSystemGtk.cpp:
3686
3687 2007-12-05  Rob Buis  <buis@kde.org>
3688
3689         Reviewed by Mitz.
3690
3691         http://bugs.webkit.org/show_bug.cgi?id=15289
3692         WebKit does not respect clip paths of a 0x0 rect
3693
3694         Make empty clip paths clip the whole referencing graphic.
3695
3696         * svg/SVGClipPathElement.cpp:
3697         (WebCore::SVGClipPathElement::canvasResource):
3698         * svg/graphics/SVGResourceClipper.h:
3699         (WebCore::ClipDataList::isEmpty):
3700
3701 2007-12-05  Darin Adler  <darin@apple.com>
3702
3703         Reviewed by Maciej.
3704
3705         - fix http://bugs.webkit.org/show_bug.cgi?id=16266
3706           <rdar://problem/5625279> REGRESSION: crash loading CNN.com at
3707           Interpreter::createObjectsForGlobalObjectProperties()
3708
3709         I don't know how to reproduce this in a test.
3710
3711         * bindings/js/JSDocumentCustom.cpp: (WebCore::JSDocument::mark):
3712         Call JSEventTargetNode::mark instead of DOMObject::mark. There's no difference
3713         right now, but it's best to call your base class, not your base's base.
3714
3715         * bindings/js/kjs_events.h: Removed unneeded virtual from the
3716         JSUnprotectedEventListener::mark() function; it neither derives from or is
3717         derived from anyone else with a mark() function so there's no need for virtual.
3718
3719         * bindings/js/kjs_window.cpp: (KJS::Window::mark): Call JSGlobalObject::mark,
3720         not JSObject::mark. This is the actual bug fix.
3721
3722 2007-12-05  Pierre-Luc Beaudoin  <pierre-luc.beaudoin@collabora.co.uk>
3723
3724         http://bugs.webkit.org/show_bug.cgi?id=16145
3725         [gtk] Implement media support in GTK backend
3726
3727         Reviewed by Alp Toker.
3728
3729         Remove old comments, fix variable names, match WebKit coding style.
3730
3731         * platform/graphics/gtk/MoviePrivateGStreamer.cpp:
3732         (WebCore::moviePrivateEOSCallback):
3733         (WebCore::MoviePrivate::MoviePrivate):
3734         (WebCore::MoviePrivate::load):
3735         (WebCore::MoviePrivate::play):
3736         (WebCore::MoviePrivate::pause):
3737         (WebCore::MoviePrivate::currentTime):
3738         (WebCore::MoviePrivate::seek):
3739         (WebCore::MoviePrivate::cancelSeek):
3740         (WebCore::MoviePrivate::seeking):
3741         (WebCore::MoviePrivate::naturalSize):
3742         (WebCore::MoviePrivate::setVolume):
3743         (WebCore::MoviePrivate::setMuted):
3744         (WebCore::MoviePrivate::maxTimeBuffered):
3745         (WebCore::MoviePrivate::bytesLoaded):
3746         (WebCore::MoviePrivate::totalBytesKnown):
3747         (WebCore::MoviePrivate::totalBytes):
3748         (WebCore::MoviePrivate::updateStates):
3749         (WebCore::MoviePrivate::didEnd):
3750         (WebCore::MoviePrivate::paint):
3751         (WebCore::MoviePrivate::createGSTPlayBin):
3752         * platform/graphics/gtk/MoviePrivateGStreamer.h:
3753
3754 2007-12-05  Mark Rowe  <mrowe@apple.com>
3755
3756         Speculative wx build fix.  Add PlugInInfoStore::pluginNameForMIMEType to the temporary link stubs.
3757
3758         * platform/wx/TemporaryLinkStubs.cpp:
3759
3760 2007-12-05  Alp Toker  <alp@atoker.com>
3761
3762         Rubber stamped by Mark Rowe.
3763
3764         Remove DEPENDPATH on the generated sources directory. This causes
3765         trouble and is no longer necessary following the glib-genmarshal
3766         generator split.
3767
3768         * WebCore.pro:
3769
3770 2007-12-04  Geoffrey Garen  <ggaren@apple.com>
3771
3772         Reviewed by Darin Adler.
3773
3774         Third step in refactoring JSGlobalObject: Moved data members and data
3775         member access from Interpreter to JSGlobalObject. Changed Interpreter
3776         member functions to static functions. Same for the subclass, 
3777         ScriptInterpreter.
3778         
3779         This is a big change, but it's mostly code motion and renaming.
3780         
3781 2007-12-05  Darin Adler  <darin@apple.com>
3782
3783         "Reviewed" by Geoff.
3784
3785         * loader/FrameLoader.cpp:
3786         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Removed assertion.
3787         (WebCore::FrameLoader::dispatchDidCommitLoad): This one too.
3788         The assertions are firing like crazy. Not sure why yet.
3789
3790 2007-12-05  Darin Adler  <darin@apple.com>
3791
3792         Reviewed by Adam Roben.
3793
3794         - fix http://bugs.webkit.org/show_bug.cgi?id=16306
3795           Assertion failed in WebCore/loader/FrameLoader.cpp:4642
3796
3797         * loader/FrameLoader.cpp:
3798         (WebCore::FrameLoader::dispatchDidCommitLoad): Check m_creatingInitialEmptyDocument
3799         and don't deliver the client call in that case.
3800
3801 2007-12-05  Mark Rowe  <mrowe@apple.com>
3802
3803         Reviewed by Kevin Decker.
3804
3805         Fix 64-bit debug build.
3806
3807         * platform/text/mac/TextCodecMac.cpp:
3808         (WebCore::TextCodecMac::decode): OSStatus is a long for 32-bit but int on 64-bit,
3809         so we need to cast it to be able to use a single format specifier on both.
3810
3811 2007-12-05  Kevin Decker  <kdecker@apple.com>
3812
3813         Reviewed by Hyatt.
3814
3815         <rdar://problem/5613106> Acordex: REGRESSION (Tiger-Leopard): plug-ins can no longer take over TIFF images (affects uspto.gov)
3816        
3817         * loader/FrameLoader.cpp:
3818         (WebCore::FrameLoader::shouldUsePlugin): Allow plug-ins (with the exception of QuickTime) to
3819         takeover TIFF once again.
3820         
3821 2007-12-05  Luca Bruno  <lethalman88@gmail.com>
3822
3823         Reviewed by Alp Toker.
3824
3825         http://bugs.webkit.org/show_bug.cgi?id=16290
3826         [GTK] Pasting clipboard in rich text.
3827
3828         * platform/gtk/PasteboardGtk.cpp:
3829         (Pasteboard::documentFragment): Implement rich text paste support.
3830
3831 2007-12-05  Adele Peterson  <adele@apple.com>
3832
3833         Reviewed by Hyatt.
3834
3835         Reverting fix for <rdar://problem/5499918> REGRESSION: insertion point in input field with custom border cuts holes in focus ring interior edges
3836
3837         We need to just fix the underlying focus ring repaint problem.
3838
3839         * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::setStyle):
3840
3841 2007-12-04  Kevin McCullough  <kmccullough@apple.com>
3842
3843         Reviewed by Darin.
3844
3845         - <rdar://5621435>
3846         - Security Fix. Instead of having it off by default, WebKit now must
3847         explicitly turn off local-resource restriction when needed for backwards
3848         compatibility reasons.
3849
3850         * loader/FrameLoader.cpp:
3851
3852 2007-12-05  Adam Roben  <aroben@apple.com>
3853
3854         Set the menu item identifier for all menu items
3855
3856         This allows WebKit clients to distinguish between submenus in the
3857         context menu.
3858
3859         Reviewed by Darin.
3860
3861         No test possible.
3862
3863         * platform/win/ContextMenuItemWin.cpp:
3864         (WebCore::ContextMenuItem::ContextMenuItem):
3865
3866 2007-12-05  Dan Bernstein  <mitz@apple.com>
3867
3868         Reviewed by Darin Adler.
3869
3870         - WebCore part of fixing <rdar://problem/5111082> Flash popup video ad doesn't close when clicked at http://www.firestonecompleteautocare.com/
3871
3872         * manual-tests/nested-plug-ins.html: Added.
3873         * manual-tests/resources/nested-plug-ins-inner-frame.html: Added.
3874         * manual-tests/resources/nested-plug-ins-outer-frame.html: Added.
3875         * platform/ScrollView.h:
3876         * platform/Widget.h:
3877         (WebCore::Widget::attachToWindow): Added. Tells the widget that it is connected
3878         via visible ScrollViews to the root ScrollView of the WebView.
3879         (WebCore::Widget::detachFromWindow): Added. Tells the widget that it is no longer
3880         connected via visible ScrollViews to the root ScrollView of the WebView.
3881         * platform/win/ScrollViewWin.cpp:
3882         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate): Added
3883         m_visible and m_attachedToWindow members.
3884         (WebCore::ScrollView::attachToWindow): Added. Attaches all children if this
3885         view is visible.
3886         (WebCore::ScrollView::detachFromWindow): Added. Detaches all children if this
3887         view is visible (otherwise they would be detached already).
3888         (WebCore::ScrollView::show): Added. Attaches all children if this view
3889         is attached.
3890         (WebCore::ScrollView::hide): Added. Detaches all children if this view
3891         is attached (otherwise they would be detached already).
3892         (WebCore::ScrollView::isAttachedToWindow): Added.
3893         * platform/win/WidgetWin.cpp:
3894         (WebCore::Widget::setParent): Added calls to attachToWindow() and detachFromWindow()
3895         depending on whether the parent is set and attached or not.
3896         * plugins/win/PluginViewWin.cpp:
3897         (WebCore::PluginViewWin::setFocus):
3898         (WebCore::PluginViewWin::show): Changed to show the plug-in only if
3899         this view is attached.
3900         (WebCore::PluginViewWin::hide): Changed to hide the plug-in only if this
3901         view is attached (otherwise it would be hidden already).
3902         (WebCore::PluginViewWin::attachToWindow): Added. Shows the plug-in if this view
3903         is visible.
3904         (WebCore::PluginViewWin::detachFromWindow): Added. Hides the plug-in if this view
3905         is visible (otherwise it would be hidden already).
3906         (WebCore::PluginViewWin::PluginViewWin):
3907         * plugins/win/PluginViewWin.h: Added m_attachedToWindow member.
3908
3909 2007-12-04  Alp Toker  <alp@atoker.com>
3910
3911         Potential GTK+ build fix for the glib-genmarshal issue.
3912
3913         Split the glib-genmarshal qmake generator in two; one for the source
3914         file, another for the header.
3915
3916         * WebCore.pro:
3917
3918 2007-12-04  Alp Toker  <alp@atoker.com>
3919
3920         GTK+ build fix.
3921
3922         * platform/PlugInInfoStore.h:
3923
3924 2007-12-04  Kevin Decker  <kdecker@apple.com>
3925
3926         Reviewed by Anders.
3927
3928         <rdar://problem/5629125> PluginInfoStore needs the ability to return the name of a plug-in for a given MIME type
3929
3930         * page/mac/WebCoreViewFactory.h: Added pluginNameForMIMEType: method.
3931         * platform/PlugInInfoStore.h:
3932         * platform/gtk/TemporaryLinkStubs.cpp: Added stub version of pluginNameForMIMEType.
3933         (PlugInInfoStore::pluginNameForMIMEType):
3934         * platform/mac/PlugInInfoStoreMac.mm:
3935         (WebCore::PlugInInfoStore::pluginNameForMIMEType): Added.
3936         * platform/qt/PlugInInfoStoreQt.cpp: 
3937         (WebCore::PlugInInfoStore::pluginNameForMIMEType): Added stub version of pluginNameForMIMEType.
3938         * plugins/win/PlugInInfoStoreWin.cpp: 
3939         (WebCore::PlugInInfoStore::pluginNameForMIMEType): Added stub version of pluginNameForMIMEType.
3940
3941 2007-12-04  Adele Peterson  <adele@apple.com>
3942
3943         Reviewed by Darin.
3944
3945         Fix for <rdar://problem/5499918> REGRESSION: insertion point in input field with custom border cuts holes in focus ring interior edges
3946
3947         * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::setStyle):
3948         Adjust outline-offset so it doesn't extend beyond the border to interfere with typing
3949
3950 2007-12-04  Anders Carlsson  <andersca@apple.com>
3951
3952         Reviewed by Jon.
3953
3954         Always call NPP_NewStream, NPP_DestroyStream and NPP_URLNotify for JavaScript
3955         result streams, even if the JavaScript expression threw an exception or returned undefined.
3956         This matches what Firefox does.
3957         
3958         * plugins/win/PluginStreamWin.cpp:
3959         (WebCore::PluginStreamWin::sendJavaScriptStream):
3960         Handle the result string being null, and set the correct NPReason if it is.
3961         
3962         * plugins/win/PluginViewWin.cpp:
3963         (WebCore::PluginViewWin::performRequest):
3964         Always send the JavaScript stream, regardless of the result could be converted to a string or not.
3965
3966 2007-12-04  Adele Peterson  <adele@apple.com>
3967
3968         Reviewed by Hyatt.
3969
3970         Fix for <rdar://problem/5622464> controls should show up for audio element
3971
3972         * css/html4.css: Added styles for audio controls.  This will need to be refined, since we may want a different look for audio controls.
3973         * html/HTMLMediaElement.cpp:
3974         (WebCore::HTMLMediaElement::attributeChanged): When the controls attribute changes detach and reattach if necessary. 
3975         (WebCore::HTMLMediaElement::rendererIsNeeded): Added.
3976         (WebCore::HTMLMediaElement::createRenderer): Added.  Uses RenderMedia.
3977         * html/HTMLMediaElement.h:
3978         * rendering/RenderMedia.cpp: (WebCore::RenderMedia::RenderMedia): Added constructor that doesn't take intrinsic size.
3979         * rendering/RenderMedia.h:
3980
3981 2007-12-04  Anders Carlsson  <andersca@apple.com>
3982
3983         Reviewed by Sam.
3984
3985         Add isSafeScript(const JSGlobalObject*) so we won't get the JSGlobalObject
3986         implementation, which always returns true(!).
3987         
3988         * bindings/js/kjs_window.cpp:
3989         (KJS::Window::isSafeScript):
3990         Make the static isSafeScript method take two JSGlobalObjects.
3991         
3992         * bindings/js/kjs_window.h:
3993         (KJS::Window::isSafeScript):
3994         Implement isSafeScript and have it call the static method.
3995
3996 2007-11-27  Adam Roben  <aroben@apple.com>
3997
3998         Make the implementation of Frame::setNeedsReapplyStyles cross-platform
3999
4000         Reviewed by Hyatt.
4001
4002         No change in functionality.
4003
4004         * page/Frame.cpp:
4005         (WebCore::Frame::setNeedsReapplyStyles): Added. Invalidates the
4006         FrameView so that FrameView::layout will be called, which ends up
4007         calling reapplyStyles.
4008         (WebCore::Frame::needsReapplyStyles): Added.
4009         (WebCore::Frame::reapplyStyles): Renamed from reparseConfiguration.
4010         (WebCore::FramePrivate::FramePrivate):
4011         * page/Frame.h:
4012         * page/FramePrivate.h: Added new boolean member.
4013         * page/FrameView.cpp:
4014         (WebCore::FrameView::layout): Call Frame::reapplyStyles if needed.
4015         (WebCore::FrameView::needsLayout): Say that we need layout if the
4016         Frame needs styles reapplied.
4017         * page/mac/WebCoreFrameBridge.h: Removed setNeedsReapplyStyles.
4018         * page/mac/WebCoreFrameBridge.mm:
4019         (-[WebCoreFrameBridge reapplyStylesForDeviceType:]): Updated for
4020         rename.
4021
4022         * bridge/win/FrameWin.cpp: Removed Frame::setNeedsReapplyStyles.
4023         * page/gtk/FrameGtk.cpp: Ditto.
4024         * page/mac/FrameMac.mm: Ditto.
4025         * page/qt/FrameQt.cpp: Ditto.
4026         * platform/wx/TemporaryLinkStubs.cpp: Ditto.
4027
4028 2007-12-04  Antti Koivisto  <antti@apple.com>
4029
4030         Reviewed by Adele.
4031
4032         Pass intrinsic size to the base class.
4033
4034         * rendering/RenderMedia.cpp:
4035         (WebCore::RenderMedia::RenderMedia):
4036
4037 2007-12-04  Adele Peterson  <adele@apple.com>
4038
4039         Reviewed by Darin.
4040
4041         Fix for <rdar://problem/5578209> REGRESSION: Crash in WebCore::DeprecatedValueListImpl::Private::copyList when going back on zoomerang.com/survey
4042
4043         * loader/FrameLoader.cpp: (WebCore::FrameLoader::scheduleHistoryNavigation):
4044           When the new url is exactly the same as the old url, don't treat it like a fragment navigation, since its going to cause a reload.
4045
4046 2007-12-04  Darin Adler  <darin@apple.com>
4047
4048         Reviewed by Kevin Decker.
4049
4050         - added an assertion for a situation that leads to a Safari assertion:
4051           a commit that is not followed by a load completion
4052
4053         - removed some unneeded FrameLoader stuff -- maybe some day we'll get this
4054           class cut down to size
4055
4056         * loader/FrameLoader.cpp:
4057         (WebCore::FrameLoader::FrameLoader): Added boolean for assertion.
4058         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Added code to assert
4059         that we already sent a commit before sending a complete.
4060         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy): Call
4061         client directly instead of indirecting through a function.
4062         (WebCore::FrameLoader::loadItem): Ditto.
4063         (WebCore::FrameLoader::goToItem): Ditto.
4064         (WebCore::FrameLoader::addHistoryForCurrentLocation): Get the private browsing
4065         state from Settings instead of FrameLoaderClient. Also call client directly
4066         instead of indirecting through a function.
4067         (WebCore::FrameLoader::updateHistoryForReload): Call client directly instead
4068         of indirecting through a function.
4069         (WebCore::FrameLoader::dispatchDidCommitLoad): Added code to assert
4070         that we did not yet send a commit and set the flag that will be used to check
4071         that we don't do this twice in a row without an intervening completion call.
4072
4073         * loader/FrameLoader.h: Added a boolean for the assertion. Removed six
4074         now-unneeded functions.
4075
4076         * loader/FrameLoaderClient.h: Removed now-unneeded privateBrowsingEnabled function.
4077
4078         * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::willCacheResponse): Get
4079         the private browsing state from Settings instead of FrameLoaderClient.
4080
4081         * svg/graphics/SVGImageEmptyClients.h: Removed obsolete privateBrowsingEnabled.
4082
4083 2007-12-03  Antti Koivisto  <antti@apple.com>
4084
4085         Reviewed by Adele.
4086         
4087         Fix <rdar://problem/5624802> 
4088         Controller displays outside of <video> element when width and height aren't specified 
4089
4090         - Explicitly adjust size of the controls tree root.
4091         - Switch RenderMedia base class back to RenderReplaced. It is easier to manage the shadow tree
4092           by hand. This also allows better code sharing with other replaced element classes.
4093         - Move duplicated layout and painting code from subclasses up to RenderReplaced.
4094
4095         Test: media/video-controls-rendering.html
4096
4097         * rendering/RenderHTMLCanvas.cpp:
4098         (WebCore::RenderHTMLCanvas::paintReplaced):
4099         * rendering/RenderHTMLCanvas.h:
4100             Share code.
4101         * rendering/RenderImage.cpp:
4102         (WebCore::RenderImage::paintReplaced):
4103         (WebCore::RenderImage::minimumReplacedHeight):
4104         * rendering/RenderImage.h:
4105             Share code.
4106         * rendering/RenderMedia.cpp:
4107         (WebCore::RenderMediaControlShadowRoot::RenderMediaControlShadowRoot):
4108         (WebCore::RenderMediaControlShadowRoot::setParent):
4109             Add a subclass just to get through encapsulation to use setParent().
4110         (WebCore::MediaControlShadowRootElement::MediaControlShadowRootElement):
4111             Move initialization to the constructor.
4112         (WebCore::RenderMedia::RenderMedia):
4113         (WebCore::RenderMedia::~RenderMedia):
4114         (WebCore::RenderMedia::layout):
4115             Resize and layout the controller root by hand.
4116         (WebCore::RenderMedia::firstChild):
4117         (WebCore::RenderMedia::lastChild):
4118         (WebCore::RenderMedia::removeChild):
4119             Support one child renderer for controls.
4120         (WebCore::RenderMedia::createControlsShadowRoot):
4121         * rendering/RenderMedia.h:
4122         (WebCore::RenderMedia::isMedia):
4123             Switch base class to RenderReplaced, delete the now unnecessary stuff.
4124         * rendering/RenderReplaced.cpp:
4125         (WebCore::RenderReplaced::layout):
4126         (WebCore::RenderReplaced::paint):
4127         * rendering/RenderReplaced.h:
4128         (WebCore::RenderReplaced::minimumReplacedHeight):
4129         (WebCore::RenderReplaced::paintReplaced):
4130             Share code.
4131         * rendering/RenderVideo.cpp:
4132         (WebCore::RenderVideo::videoSizeChanged):
4133             Simplify, just request relayout.
4134         (WebCore::RenderVideo::paintReplaced):
4135         (WebCore::RenderVideo::layout):
4136         * rendering/RenderVideo.h:
4137             Share code.
4138
4139 2007-12-04  Michael Natterer  <mitch@imendio.com>
4140
4141         Reviewed by Alp Toker.
4142
4143         * WebCore.pro: fix build of webkit-marshal by building the
4144         functions into a separate .cpp file instead of including them in
4145         the header. This way we can use the marshallers from more than one
4146         file without using bad hacks.
4147
4148         Add the generated sources directory to DEPENDPATH.
4149
4150 2007-12-04  Pierre-Luc Beaudoin  <pierre-luc.beaudoin@collabora.co.uk>
4151
4152         Reviewed by Alp Toker.
4153
4154         http://bugs.webkit.org/show_bug.cgi?id=16145
4155         [gtk] Implement media support in GTK backend
4156
4157         This implements the media tags of HTML5 on the GTK+ port based on the 
4158         Mac port. Media tests pass although some tests required a small modifications: 
4159         As per the HTML5 spec, the loading of the clip should start only after 
4160         all script are done.  But in the case of the tests, the loading starts 
4161         before some callbacks get registered.  This has been discussed with 
4162         Antti Koivisto, and the tests should be updated.
4163
4164         There is only one known issue: one time in 10 tries, loading a buffered