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