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