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