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