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