18f0a6dcca1d61b72b21344f75eda13ca84fa5f8
[WebKit-https.git] / WebCore / ChangeLog
1 2008-01-04  Antti Koivisto  <antti@apple.com>
2
3         Try to fix 64-bit build
4
5         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
6         (WebCore::MediaPlayerPrivate::isAvailable):
7
8 2008-01-04  Stephanie  <slewis@apple.com>
9
10         Reviewed by Oliver.
11
12         WARNING: NO TEST CASES ADDED OR CHANGED
13
14         Fix another stringImpl leak.
15
16         * platform/text/StringImpl.cpp: remove an extra allocation
17         (WebCore::StringImpl::StringImpl):
18
19 2008-01-04  Alice Liu  <alice.liu@apple.com>
20
21         Reviewed by Mitz.
22
23         * platform/graphics/win/FontCacheWin.cpp:
24         fix loop condition that was causing crash
25
26 2008-01-04  Timothy Hatcher  <timothy@apple.com>
27
28         Reviewed by Adam Roben.
29
30         <rdar://problem/5671059> Always show the Timeline and Console buttons in the Inspector
31
32         * page/inspector/inspector.css: Remove styles related to the toggle button
33           and make the area always visible. 
34         * page/inspector/inspector.html: Remove the toggle button.
35         * page/inspector/inspector.js: Remove code to toggle the status area.
36
37 2008-01-04  Alexey Proskuryakov  <ap@webkit.org>
38
39         Reviewed by Adam Roben.
40
41         Temporarily restore BackwardDelete for Windows nightlies to work correctly.
42
43         * editing/EditorCommand.cpp: (WebCore::CommandEntry::):
44
45 2008-01-04  Alexey Proskuryakov  <ap@webkit.org>
46
47         Reviewed by Darin.
48
49         <rdar://problem/5611712> xsl:sort does not use a case folding sort, and the 'case-order' attribute is ignored (16077)
50
51         Enable the fix on Windows.
52
53         * xml/XSLTProcessor.cpp: (WebCore::XSLTProcessor::transformToString):
54         Always set a custom sort function, even if it doesn't implement proper collation on the platform.
55
56         * xml/XSLTUnicodeSort.cpp:
57         (WebCore::xsltUnicodeSortFunction):
58         * xml/XSLTUnicodeSort.h:
59         If the platform does not use ICU, or ICU has collation support disabled, fall back to binary comparison.
60
61 2008-01-04  Antti Koivisto  <antti@apple.com>
62
63         Fix build.
64
65         * bindings/js/JSHTMLElementWrapperFactory.cpp:
66
67 2008-01-04  Antti Koivisto  <antti@apple.com>
68
69         Reviewed by Darin.
70         
71         Partial fix for <rdar://problem/5647034>
72         Media tests crash if an old version of QuickTime is installed
73
74         Disable media support if QuickTime is not current enough (>=7.3).
75         
76         Windows patch coming soon.
77
78         * bindings/js/JSHTMLElementWrapperFactory.cpp:
79         (WebCore::createJSHTMLWrapper):
80         * bindings/js/kjs_window.cpp:
81         (KJS::Window::getValueProperty):
82         * html/HTMLElementFactory.cpp:
83         (WebCore::audioConstructor):
84         (WebCore::videoConstructor):
85         (WebCore::sourceConstructor):
86         * platform/graphics/MediaPlayer.cpp:
87         (WebCore::MediaPlayer::isAvailable):
88         * platform/graphics/MediaPlayer.h:
89         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
90         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
91         (WebCore::MediaPlayerPrivate::isAvailable):
92
93 2008-01-04  Timothy Hatcher  <timothy@apple.com>
94
95         Reviewed by Darin Adler.
96
97         <rdar://problem/5604409> JavaScript privilege escalation when Web Inspector accesses page unsafely (16011)
98
99         Check if the property is a getter before asking for the value.
100         If the property is a getter, we no longer show the value.
101
102         * page/inspector/PropertiesSidebarPane.js:
103         * page/inspector/inspector.css:
104
105 2008-01-04  Dan Bernstein  <mitz@apple.com>
106
107         Reviewed by Darin Adler.
108
109         - fix synthetic bold and italic on Windows
110
111         Covered by an existing test.
112
113         * platform/graphics/win/FontPlatformDataWin.cpp:
114         (WebCore::FontPlatformData::FontPlatformData):
115
116 2008-01-04  Alp Toker  <alp@atoker.com>
117
118         GTK+ autotools build fix. Terminate empty rules.
119
120         * GNUmakefile.am:
121
122 2008-01-04  Lars Knoll  <lars@trolltech.com>
123
124         Reviewed by Simon.
125
126         Remove most dependencies of Widget/ScrollView onto native QWidgets.
127
128         This also brings the code closer in line with the Windows code. Seems
129         to work nicely on first try :)
130
131         * page/qt/FrameQt.cpp:
132         (WebCore::Frame::createScriptInstanceForWidget):
133         * platform/Widget.h:
134         * platform/qt/PlatformScreenQt.cpp:
135         (WebCore::screenDepth):
136         (WebCore::screenDepthPerComponent):
137         (WebCore::screenIsMonochrome):
138         (WebCore::screenRect):
139         * platform/qt/PlatformScrollBarQt.cpp:
140         (WebCore::PlatformScrollbar::thumbPosition):
141         (WebCore::PlatformScrollbar::handleMouseMoveEvent):
142         * platform/qt/ScrollViewQt.cpp:
143         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
144         (WebCore::ScrollView::ScrollViewPrivate::scrollBackingStore):
145         (WebCore::ScrollView::updateContents):
146         (WebCore::ScrollView::update):
147         (WebCore::ScrollView::scrollRectIntoViewRecursively):
148         (WebCore::ScrollView::updateScrollbars):
149         (WebCore::ScrollView::addChild):
150         (WebCore::ScrollView::removeChild):
151         (WebCore::ScrollView::paint):
152         * platform/qt/WidgetQt.cpp:
153         (WebCore::WidgetPrivate::WidgetPrivate):
154         (WebCore::WidgetPrivate::~WidgetPrivate):
155         (WebCore::Widget::frameGeometry):
156         (WebCore::Widget::setFrameGeometry):
157         (WebCore::Widget::setCursor):
158         (WebCore::Widget::show):
159         (WebCore::Widget::hide):
160         (WebCore::Widget::nativeWidget):
161         (WebCore::Widget::setNativeWidget):
162         (WebCore::Widget::suppressInvalidation):
163         (WebCore::Widget::setSuppressInvalidation):
164         (WebCore::Widget::invalidateRect):
165         (WebCore::Widget::topLevel):
166         (WebCore::Widget::containingWindow):
167
168 2008-01-04  Lars Knoll  <lars@trolltech.com>
169
170         Reviewed by Simon.
171
172         make QWebPage a QObject and get things to compile.
173
174         Nothing works currently though.
175
176         * platform/qt/ScrollViewQt.cpp:
177         (WebCore::ScrollView::updateContents):
178         (WebCore::ScrollView::update):
179         * platform/qt/WidgetQt.cpp:
180         (WebCore::Widget::qwidget):
181         (WebCore::Widget::invalidateRect):
182
183 2008-01-04  Alp Toker  <alp@atoker.com>
184
185         Reviewed by Mark Rowe.
186
187         http://bugs.webkit.org/show_bug.cgi?id=16667
188         make -j is failing with the autotools based system
189
190         Support parallel code generation. Nearly every use of explicit
191         multiple targets was a potential concurrency bug, though in practice
192         the bison rules were the first to be noticed because they took longer
193         to complete and broke the build immediately.
194
195         * GNUmakefile.am:
196
197 2008-01-04  Alp Toker  <alp@atoker.com>
198
199         Reviewed by Mark Rowe.
200
201         Re-use a single static dummy surface rather than creating and
202         destroying a surface for each CairoPath.
203
204         * platform/graphics/cairo/CairoPath.h:
205         (WebCore::CairoPath::CairoPath):
206
207 2008-01-04  Mark Rowe  <mrowe@apple.com>
208
209         Tiger build fix.
210
211         * platform/Threading.h: The OSAtomic functions take non-volatile pointers on Tiger.
212
213 2008-01-03  Mark Rowe  <mrowe@apple.com>
214
215         Reviewed by Maciej Stachowiak.
216
217         Use platform-provided atomic operations in place of inline assembly to
218         increase portability.
219
220         * platform/Threading.h:
221         (WebCore::atomicIncrement):
222         (WebCore::atomicDecrement):
223
224 2008-01-03  Oliver Hunt  <oliver@apple.com>
225
226         Reviewed by Maciej.
227
228         Fix <rdar://problem/5668517> REGRESSION: Major under painting issues in SVG (carto.net dock example)
229
230         We need to cache the absolute bounds of the <image>,
231         as there's no reliable way to recompute the old bounding
232         box one we have started layout.
233
234         * rendering/RenderSVGImage.cpp:
235         (WebCore::RenderSVGImage::layout):
236         (WebCore::RenderSVGImage::calculateAbsoluteBounds):
237         * rendering/RenderSVGImage.h:
238
239 2008-01-03  Alp Toker  <alp@atoker.com>
240
241         Reviewed by Mark Rowe.
242
243         Support building in Scratchbox, which has a version of make that fails
244         on wildcard syntax. Use a vpath to match IDL files instead.
245
246         * GNUmakefile.am:
247
248 2008-01-03  Jon Honeycutt  <jhoneycutt@apple.com>
249
250         Reviewed by Darin.
251
252         <rdar://problem/5504775> PDF page will not load first time after Adobe
253         Reader install, unless browser is relaunched
254
255         Refresh and re-search the plugin database if the MIME type is not
256         registered.
257
258         * plugins/win/PluginDatabaseWin.cpp:
259         (WebCore::PluginDatabaseWin::isMIMETypeRegistered):
260         * plugins/win/PluginDatabaseWin.h:
261
262 2008-01-03  Dan Bernstein  <mitz@apple.com>
263
264         Reviewed by Darin Adler.
265
266         - fix http://bugs.webkit.org/show_bug.cgi?id=16548
267           <rdar://problem/5659452> REGRESSION(r28810): Font style and sizes are weird for Japanese text
268
269         * platform/graphics/win/FontCacheWin.cpp:
270         (WebCore::linkedFontEnumProc): Added. This callback is used to fetch
271         a valid LOGFONT for a given family.
272         (WebCore::getLinkedFonts): Added. Returns a vector of font families
273         linked to the given font family by the Windows registry key
274         HKLM\Software\...\FontLink\SystemLink. The registry values typically
275         differ based on the installed language version of Windows.
276         (WebCore::FontCache::getFontDataForCharacters): Changed to not use MLang
277         font mapping, which is Windows code page based, except for characters in
278         the range U+2000..U+200F. Instead, this function gets the font Uniscribe
279         would use for the character. However, that font might not actually
280         contain the character, in which case GDI font linking would substitute a
281         different font. Therefore, this function walks the linked font list
282         until it finds a font that actually contains the character.
283
284 2008-01-03  Darin Adler  <darin@apple.com>
285
286         Reviewed by Mitz.
287
288         - fix http://bugs.webkit.org/show_bug.cgi?id=16723
289           tables/mozilla/bugs/bug30418.html test failing due to problems updating dynamic border rules
290
291         Test: fast/table/border-changes.html
292
293         * html/HTMLTableElement.h:
294         * html/HTMLTableElement.cpp:
295         (WebCore::HTMLTableElement::parseMappedAttribute): Check the border type before and after
296         parsing attributes, rather than doing this only for the rules attribute.
297         (WebCore::HTMLTableElement::cellBorders): Added.
298         (WebCore::HTMLTableElement::getSharedCellDecl): Changed to use cellBorders to factor out the
299         rule about what type of borders to use.
300
301 2008-01-02  Sam Weinig  <sam@webkit.org>
302
303         Reviewed by Darin.
304
305         Pass the prototype of WebCore JS objects up the constructor chain
306         rather than explicitly setting using setPrototype.  This removes many
307         redundant settings of the prototype on construction.  To avoid a CG 
308         hazard, the prototype must be constructed before calling the
309         constructor of the JS object.
310
311         - JS objects that inherit from DOMObject, which all bindings objects
312           (except Window) do, now can't implicitly have a jsNull prototype, but
313           must explicitly pass it up the construction chain.
314
315         * bindings/js/JSCSSRuleCustom.cpp:
316         (WebCore::toJS):
317         * bindings/js/JSCSSValueCustom.cpp:
318         (WebCore::toJS):
319         * bindings/js/JSDocumentCustom.cpp:
320         (WebCore::toJS):
321         * bindings/js/JSEventCustom.cpp:
322         (WebCore::toJS):
323         * bindings/js/JSEventTargetNode.cpp:
324         (WebCore::JSEventTargetNode::JSEventTargetNode):
325         * bindings/js/JSEventTargetNode.h:
326         * bindings/js/JSHTMLAllCollection.h:
327         (WebCore::JSHTMLAllCollection::JSHTMLAllCollection):
328         * bindings/js/JSHTMLAudioElementConstructor.cpp:
329         (WebCore::JSHTMLAudioElementConstructor::JSHTMLAudioElementConstructor):
330         * bindings/js/JSHTMLCollectionCustom.cpp:
331         (WebCore::getNamedItems):
332         (WebCore::toJS):
333         * bindings/js/JSHTMLElementWrapperFactory.cpp:
334         (WebCore::createJSHTMLWrapper):
335         * bindings/js/JSHTMLFormElementCustom.cpp:
336         (WebCore::JSHTMLFormElement::nameGetter):
337         * bindings/js/JSHTMLInputElementBase.cpp:
338         (WebCore::JSHTMLInputElementBase::JSHTMLInputElementBase):
339         * bindings/js/JSHTMLInputElementBase.h:
340         * bindings/js/JSHTMLOptionElementConstructor.cpp:
341         (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor):
342         * bindings/js/JSLocation.cpp:
343         (WebCore::JSLocation::JSLocation):
344         * bindings/js/JSLocation.h:
345         * bindings/js/JSNamedNodesCollection.cpp:
346         (WebCore::JSNamedNodesCollection::JSNamedNodesCollection):
347         * bindings/js/JSNamedNodesCollection.h:
348         * bindings/js/JSNodeCustom.cpp:
349         (WebCore::toJS):
350         * bindings/js/JSSVGElementWrapperFactory.cpp:
351         (WebCore::createJSSVGWrapper):
352         * bindings/js/JSSVGPathSegCustom.cpp:
353         (WebCore::toJS):
354         * bindings/js/JSStyleSheetCustom.cpp:
355         (WebCore::toJS):
356         * bindings/js/JSXMLHttpRequest.cpp:
357         (KJS::JSXMLHttpRequestConstructorImp::JSXMLHttpRequestConstructorImp):
358         (KJS::JSXMLHttpRequestConstructorImp::construct):
359         (KJS::JSXMLHttpRequest::JSXMLHttpRequest):
360         * bindings/js/JSXMLHttpRequest.h:
361         * bindings/js/JSXSLTProcessor.cpp:
362         (KJS::JSXSLTProcessor::JSXSLTProcessor):
363         (KJS::XSLTProcessorConstructorImp::XSLTProcessorConstructorImp):
364         (KJS::XSLTProcessorConstructorImp::implementsConstruct):
365         (KJS::XSLTProcessorConstructorImp::construct):
366         * bindings/js/JSXSLTProcessor.h:
367         * bindings/js/kjs_binding.h:
368         (KJS::DOMObject::DOMObject):
369         (KJS::cacheDOMObject):
370         (KJS::cacheSVGDOMObject):
371         * bindings/js/kjs_css.cpp:
372         (WebCore::JSRGBColor::JSRGBColor):
373         (WebCore::getJSRGBColor):
374         * bindings/js/kjs_css.h:
375         * bindings/js/kjs_events.cpp:
376         (WebCore::JSClipboard::JSClipboard):
377         (WebCore::toJS):
378         * bindings/js/kjs_events.h:
379         * bindings/js/kjs_html.cpp:
380         (WebCore::ImageConstructorImp::ImageConstructorImp):
381         * bindings/js/kjs_navigator.cpp:
382         (KJS::Navigator::Navigator):
383         (KJS::PluginBase::PluginBase):
384         * bindings/js/kjs_navigator.h:
385         * bindings/js/kjs_window.cpp:
386         (KJS::Window::Window):
387         (KJS::Window::location):
388         (KJS::Window::getValueProperty):
389         * bindings/js/kjs_window.h:
390         * bindings/scripts/CodeGeneratorJS.pm:
391
392 2008-01-03  Holger Hans Peter Freyther  <zecke@selfish.org>
393
394         Reviewed by Alp.
395
396         -This is from http://bugs.webkit.org/show_bug.cgi?id=16115
397
398         Change the Gtk ContextMenuItem code to generate the GtkMenuItem
399         or GtkCheckMenuItem on the fly. Currently we will create a
400         GtkCheckMenuItem if the ContextMenuItem has been checked. What needs
401         to be done is to change WebCore to tell the platform code if an item
402         is checkable or not.
403
404         * platform/ContextMenuItem.h:
405         (WebCore::PlatformMenuItemDescription::PlatformMenuItemDescription):
406         * platform/gtk/ContextMenuGtk.cpp:
407         (WebCore::ContextMenu::appendItem):
408         * platform/gtk/ContextMenuItemGtk.cpp:
409         (WebCore::ContextMenuItem::ContextMenuItem):
410         (WebCore::ContextMenuItem::~ContextMenuItem):
411         (WebCore::ContextMenuItem::createNativeMenuItem):
412         (WebCore::ContextMenuItem::releasePlatformDescription):
413         (WebCore::ContextMenuItem::type):
414         (WebCore::ContextMenuItem::setType):
415         (WebCore::ContextMenuItem::action):
416         (WebCore::ContextMenuItem::setAction):
417         (WebCore::ContextMenuItem::platformSubMenu):
418         (WebCore::ContextMenuItem::setSubMenu):
419         (WebCore::ContextMenuItem::setChecked):
420
421 2008-01-03  Dan Bernstein  <mitz@apple.com>
422
423         Rubber-stamped by Adam Roben.
424
425         - update the project hierarchy to match the on-disk organization of
426           the platform directory.
427
428         * WebCore.vcproj/WebCore.vcproj:
429
430 2008-01-03  Adam Roben  <aroben@apple.com>
431
432         Fix a buffer overrun and a leak introduced in r29098
433
434         Reviewed by Mark.
435
436         * platform/text/StringImpl.cpp:
437         (WebCore::StringImpl::StringImpl): Only allocate one buffer, and make
438         it be big enough to hold the string contents plus the null terminator.
439
440 2008-01-03  Simon Hausmann  <hausmann@webkit.org>
441
442         Reviewed by Lars.
443
444         Added the first revision of QWebView and started moving functionality from QWebPave over to QWebView and QWebFrame.
445
446         * WebCore.pro:
447
448 2008-01-03  Alp Toker  <alp@atoker.com>
449
450         Suggested by Mark Rowe.
451
452         Fix indentation and remove trailing whitespace.
453
454         * platform/network/curl/ResourceHandleManager.cpp:
455
456 2008-01-03  Luca Bruno  <lethalman88@gmail.com>
457
458         Reviewed by Alp Toker.
459
460         Fix HTTP POST-based logins to sites like Facebook, GMail by ensuring
461         that the two POST methods don't conflict.
462
463         * platform/network/curl/ResourceHandleManager.cpp:
464         (WebCore::ResourceHandleManager::setupPOST):
465
466 2008-01-02  Darin Adler  <darin@apple.com>
467
468         - touched some files to try to get the Windows buildbot building again
469
470 2008-01-02  Dan Bernstein  <mitz@apple.com>
471
472         Reviewed by Sam Weinig.
473
474         - fix small caps rendering
475
476         Covered by an existing test.
477
478         * platform/graphics/win/FontDataWin.cpp:
479         (WebCore::FontData::smallCapsFontData):
480
481 2008-01-02  Antti Koivisto  <antti@apple.com>
482
483         Reviewed by Oliver.
484
485         Calculate video position and size within the renderer box in WebCore. This
486         way the aspect ratio calculation is not needed in each MediaPlayer implementation.
487         
488         This fixes video aspect ratio on Windows.
489         
490         Covered by an existing pixel test.
491
492         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
493         (WebCore::MediaPlayerPrivate::createQTMovieView):
494         * rendering/RenderVideo.cpp:
495         (WebCore::RenderVideo::videoBox):
496         (WebCore::RenderVideo::paintReplaced):
497         (WebCore::RenderVideo::updatePlayer):
498         * rendering/RenderVideo.h:
499
500 2008-01-02  Ada Chan  <adachan@apple.com>
501
502         Fix windows build.
503
504         * WebCore.vcproj/WebCore.vcproj:
505
506 2008-01-02  John Sullivan  <sullivan@apple.com>
507
508         Reviewed by Dan Bernstein
509         
510         - fixed <rdar://problem/5579010> REGRESSION: Safari inserts newlines in tab names when U+2028 is present
511
512         * loader/DocumentLoader.cpp:
513         (WebCore::canonicalizedTitle):
514         in the code that replaces control characters with white space, also replace the unicode line separator
515         and paragraph separator characters
516
517 2008-01-02  Darin Adler  <darin@apple.com>
518
519         - fix buffer overruns seen on buildbot
520
521         * platform/text/StringImpl.cpp:
522         (WebCore::countCharacter): Added this.
523         (WebCore::StringImpl::toCoordsArray): Use countCharacter instead of incorrect find expression.
524         (WebCore::StringImpl::toLengthArray): Ditto.
525         (WebCore::StringImpl::replace): Added assertions.
526
527 2008-01-02  Darin Adler  <darin@apple.com>
528
529         Reviewed by Maciej.
530
531         - fix http://bugs.webkit.org/show_bug.cgi?id=16657
532           Acid3 failure since table.caption and table.thead do not work for nodes added by appendChild
533         - fix http://bugs.webkit.org/show_bug.cgi?id=16659
534           Acid3 expects HTMLTableElement.rows to include a <tr> element that is an immediate child of the <table>
535
536         Tests: dom/html/level2/html/HTMLCollection07.html
537                dom/html/level2/html/HTMLCollection08.html
538                dom/html/level2/xhtml/HTMLCollection07.xhtml
539                dom/html/level2/xhtml/HTMLCollection08.xhtml
540                fast/dom/HTMLTableElement/early-acid3-65-excerpt.html
541                fast/dom/HTMLTableElement/early-acid3-66-excerpt.html
542
543         * GNUmakefile.am: Added HTMLTableRowsCollection.
544         * WebCore.pro: Ditto.
545         * WebCore.vcproj/WebCore.vcproj: Ditto.
546         * WebCore.xcodeproj/project.pbxproj: Ditto.
547         * WebCoreSources.bkl: Ditto.
548
549         * dom/XMLTokenizer.cpp: Took out stray include.
550
551         * html/HTMLCollection.cpp:
552         (WebCore::HTMLCollection::itemAfter): Removed all the table rows code, since we now use
553         a separate class for that collection. Also got rid of the distinct types for custom collections
554         that don't need them (use Other for both).
555         * html/HTMLCollection.h: Also made firstItem non-virtual because it doesn't need to be virtual.
556
557         * html/HTMLFormCollection.cpp:
558         (WebCore::HTMLFormCollection::HTMLFormCollection): Use Other instead of FormElements
559         for the HTMLCollection type.
560
561         * html/HTMLTableElement.cpp:
562         (WebCore::HTMLTableElement::HTMLTableElement): Eliminated m_head, m_foot, m_firstBody, and m_caption.
563         (WebCore::HTMLTableElement::caption): Added non-inline version. Finds the caption rather than
564         keeping a pointer to it.
565         (WebCore::HTMLTableElement::setCaption): Rewrote.
566         (WebCore::HTMLTableElement::tHead): Ditto.
567         (WebCore::HTMLTableElement::setTHead): Ditto.
568         (WebCore::HTMLTableElement::tFoot): Ditto.
569         (WebCore::HTMLTableElement::setTFoot): Ditto.
570         (WebCore::HTMLTableElement::createTHead): Ditto.
571         (WebCore::HTMLTableElement::deleteTHead): Ditto.
572         (WebCore::HTMLTableElement::createTFoot): Ditto.
573         (WebCore::HTMLTableElement::deleteTFoot): Ditto.
574         (WebCore::HTMLTableElement::createCaption): Ditto.
575         (WebCore::HTMLTableElement::deleteCaption): Ditto.
576         (WebCore::HTMLTableElement::lastBody): Added.
577         (WebCore::HTMLTableElement::insertRow): Rewrote to use a loop based on code in HTMLTableRowsCollection.
578         This is different from the old code mainly in how it handles rows outside any section.
579         (WebCore::HTMLTableElement::deleteRow): Ditto.
580         (WebCore::HTMLTableElement::addChild): Removed code to set the various members. Keeping pointers to
581         these was a possible source of serious bugs too, including crashes with stale pointers, although I
582         didn't write any test cases to prove those bugs existed.
583         (WebCore::HTMLTableElement::parseMappedAttribute): Changed the rules code to visit all cells, not
584         just the cells of the first body. I believe this fixed rendering on some table tests. I think the code
585         visits too many cells and also the use of recursion is overkill, but I didn't try to fix that.
586         (WebCore::HTMLTableElement::rows): Changed to use the new HTMLTableRowsCollection.
587         * html/HTMLTableElement.h: Changed functions to return PassRefPtr, which can be important if strange
588         things like DOM mutation events take things ot of the tree before they are safely referenced by
589         JavaScript wrappers. Also changed functions to take PassRefPtr and added exceptions. Removed unneeded
590         firstTBody and setTBody functions and childrenChanged function override, as well as unused Rules and
591         Frame enums. Removed m_head, m_foot, m_firstBody, and m_caption, and added lastBody function. Removed
592         unneeded friend declaration for HTMLTableCellElement.
593         * html/HTMLTableElement.idl: Allow the setteres for caption, tHead, and tFoot to raise exceptions.
594
595         * html/HTMLTableRowsCollection.cpp: Added. Implements the HTML 5 rule for which rows are in the
596         collection in which order.
597         * html/HTMLTableRowsCollection.h: Added.
598
599         * loader/FTPDirectoryDocument.cpp:
600         (WebCore::FTPDirectoryTokenizer::appendEntry): Use the standard insertRow function instead of
601         coming up with our own way of inserting a row. Simplifies things -- we can remove the code to
602         create a tbody element.
603
604 2008-01-02  Darin Adler  <darin@apple.com>
605
606         Reviewed by Alice and Tim.
607
608         - try to fix GTK and Qt builds
609
610         * platform/win/ScrollViewWin.cpp:
611         (WebCore::ScrollView::scroll): Improve logic slightly for the case of
612         vertical scrolling when there's no vertical scroll bar.
613
614         * platform/gtk/ScrollViewGtk.cpp:
615         (WebCore::ScrollView::scroll): Copy the code from Windows. Maybe this
616         should be factored differently.
617         * platform/qt/ScrollViewQt.cpp:
618         (WebCore::ScrollView::scroll): Ditto.
619
620 2008-01-02  Darin Adler  <darin@apple.com>
621
622         Reviewed by Anders.
623
624         - http://bugs.webkit.org/show_bug.cgi?id=16712
625           change StringImpl to take and return PassRefPtr instead of raw pointers
626
627         Also eliminated use of const StringImpl. Since StringImpl is immutable there
628         is no distinction between a const and non-const one at the moment.
629
630         * WebCore.base.exp: Updated.
631
632         * css/CSSHelper.cpp:
633         (WebCore::parseURL): Make String directly, not by making a StringImpl.
634         * dom/Attr.cpp:
635         (WebCore::Attr::createTextChild): Convert AtomicString to String with domString,
636         not via StringImpl.
637         (WebCore::Attr::setValue): Remove unneed call to impl() when passing a String
638         to a function that takes a String.
639
640         * dom/CDATASection.cpp: Removed unused constructor.
641         (WebCore::CDATASection::cloneNode): Added a now-needed .get().
642         (WebCore::CDATASection::createNew): Changed function to take a PassRefPtr.
643         * dom/CDATASection.h:
644
645         * dom/CharacterData.cpp:
646         (WebCore::CharacterData::CharacterData): Removed unneeded initialization and
647         ref() now that the string is a RefPtr. Also updated to not call "new StringImpl".
648         (WebCore::CharacterData::~CharacterData): Removed unneeded deref() since it's
649         a RefPtr.
650         (WebCore::CharacterData::setData): More of that.
651         (WebCore::CharacterData::substringData): Ditto.
652         (WebCore::CharacterData::appendData): Ditto.
653         (WebCore::CharacterData::insertData): Ditto.
654         (WebCore::CharacterData::deleteData): Ditto.
655         (WebCore::CharacterData::replaceData): Ditto.
656         (WebCore::CharacterData::nodeValue): Ditto.
657         (WebCore::CharacterData::dispatchModifiedEvent): Ditto.
658         (WebCore::CharacterData::dump): Ditto.
659         * dom/CharacterData.h: Changed to use a RefPtr. I could have used a String
660         instead, but since String adds extra branches to handle 0, I figured it was
661         more conservative to just use RefPtr. Later it would be good to figure out
662         which is preferred style and be more consistent. Maybe we'll phase out
663         StringImpl, or maybe we'll go the other way and use it more since it can be
664         more efficient.
665
666         * dom/DOMImplementation.cpp:
667         (WebCore::addString): Changed set to use String rather than StringImpl.
668         (WebCore::isSVG10Feature): Ditto.
669         (WebCore::isSVG11Feature): Ditto.
670         (WebCore::DOMImplementation::createDocument): Replaced custom code to
671         find a colon with a call to String::find.
672
673         * dom/Range.cpp:
674         (WebCore::Range::insertNode): Updated since the result of splitText is now
675         a PassRefPtr.
676
677         * dom/Text.cpp:
678         (WebCore::Text::splitText): Updated since str is now a RefPtr. Also made the
679         result of this function be a PassRefPtr.
680         (WebCore::Text::createRenderer): Ditto.
681         (WebCore::Text::createNew): Made the parameter and result both be PassRefPtr.
682         * dom/Text.h:
683
684         * html/HTMLElement.cpp:
685         (WebCore::HTMLElement::nodeName): Use String::upper.
686
687         * html/HTMLInputElement.cpp:
688         (WebCore::numGraphemeClusters): Remove now-unneeded const.
689         (WebCore::numCharactersInGraphemeClusters): Ditto.
690
691         * html/HTMLTokenizer.cpp:
692         (WebCore::HTMLTokenizer::processToken): Updated for function name change.
693
694         * platform/text/AtomicString.cpp:
695         (WebCore::CStringTranslator::translate): Updated since there is no longer
696         a constructor that takes a string.
697
698         * platform/text/PlatformString.h: Added new constructors that take
699         PassRefPtr and RefPtr. Removed misleading comment.
700
701         * platform/text/String.cpp:
702         (WebCore::String::String): Changed to use StringImpl::create, which handles
703         the empty string automatically.
704         (WebCore::String::append): Ditto.
705         (WebCore::String::charactersWithNullTermination): Similar.
706         (WebCore::String::format): Ditto.
707
708         * platform/text/StringHash.h: Took out unneeded const.
709
710         * platform/text/StringImpl.cpp:
711         (WebCore::deleteUCharVector): Changed to take a const pointer since the
712         buffers are now const UChar buffers.
713         (WebCore::StringImpl::StringImpl): Removed some constructors. Got rid of the
714         separate init functions. The constructors are now private and used only in
715         the create functions and one or two other places.
716         (WebCore::StringImpl::containsOnlyWhitespace): Removed now-meaningless const.
717         (WebCore::StringImpl::substring): Ditto. Also changed return value to be a
718         PassRefPtr.
719         (WebCore::StringImpl::characterStartingAt): Ditto.
720         (WebCore::StringImpl::toLength): Ditto.
721         (WebCore::StringImpl::toCoordsArray): Ditto.
722         (WebCore::StringImpl::toLengthArray): Ditto.
723         (WebCore::StringImpl::isLower): Ditto.
724         (WebCore::StringImpl::lower): Ditto. Changed to use Vector and adopt so we
725         don't have to use new directly here. Makes empty string handling more consistent.
726         (WebCore::StringImpl::upper): Ditto.
727         (WebCore::StringImpl::secure): Ditto.
728         (WebCore::StringImpl::foldCase): Ditto.
729         (WebCore::StringImpl::stripWhiteSpace): Ditto.
730         (WebCore::StringImpl::simplifyWhiteSpace): Ditto.
731         (WebCore::StringImpl::capitalize): Ditto.
732         (WebCore::StringImpl::toInt): Removed now-meaningless const.
733         (WebCore::StringImpl::toInt64): Ditto.
734         (WebCore::StringImpl::toUInt64): Ditto.
735         (WebCore::StringImpl::toDouble): Ditto.
736         (WebCore::StringImpl::toFloat): Ditto.
737         (WebCore::StringImpl::find): Ditto.
738         (WebCore::StringImpl::reverseFind): Ditto.
739         (WebCore::StringImpl::endsWith): Ditto.
740         (WebCore::StringImpl::replace): Ditto.
741         (WebCore::equal): Ditto.
742         (WebCore::equalIgnoringCase): Ditto.
743         (WebCore::StringImpl::ascii): Ditto.
744         (WebCore::StringImpl::defaultWritingDirection): Ditto.
745         (WebCore::StringImpl::createStrippingNullCharacters): Ditto.
746         (WebCore::StringImpl::adopt): Added special case so this uses the shared
747         empty string like other functions. Also optimized the common case where the
748         vector happens to already have the right size so we don't do a fastRealloc
749         at all in those cases.
750         (WebCore::StringImpl::create): Added. These are now the public functions for
751         creating new StringImpl objects. They all implement the shared empty string.
752         (WebCore::StringImpl::createWithTerminatingNullCharacter):
753         * platform/text/StringImpl.h:
754
755         * platform/text/cf/StringCF.cpp:
756         (WebCore::String::String): Use StringImpl::create instead of new StringImpl.
757         * platform/text/cf/StringImplCF.cpp:
758         (WebCore::StringImpl::createCFString): Removed now-obsolete const.
759         * platform/text/mac/StringImplMac.mm:
760         (WebCore::StringImpl::operator NSString *): Ditto.
761         * platform/text/mac/StringMac.mm:
762         (WebCore::String::String): Use StringImpl::create instead of new StringImpl.
763         * platform/text/qt/StringQt.cpp:
764         (WebCore::String::String): Ditto.
765         * platform/text/wx/StringWx.cpp:
766         (WebCore::String::String): Ditto.
767         * rendering/RenderBR.cpp:
768         (WebCore::RenderBR::RenderBR): Ditto.
769
770         * rendering/RenderSVGInlineText.cpp:
771         (WebCore::RenderSVGInlineText::RenderSVGInlineText): Use PassRefPtr.
772         * rendering/RenderSVGInlineText.h:
773
774         * rendering/RenderText.cpp:
775         (WebCore::charactersAreAllASCII): Removed now-unneeded const.
776         * rendering/RenderTextFragment.cpp:
777         (WebCore::RenderTextFragment::originalText): Use RefPtr.
778
779 2008-01-02  Timothy Hatcher  <timothy@apple.com>
780
781         Reviewed by Oliver Hunt.
782
783         <rdar://problem/5618086> WebInspector does not expand the DOM tree after being closed
784
785         Closing the Web Inspector causes the DOM tree outline to be torn down, clearing the
786         internal element lookup tables. The represented DOM node object still holds the identifier
787         it was assigned, and a later call to findTreeElement will use that original identifier
788         against a cleared lookup table. In that case we need to fallback on DOM ancestor lookup.
789
790         * page/inspector/treeoutline.js:
791         (TreeOutline.prototype.findTreeElement): If the DOM node already had a __treeElementIdentifier,
792         but the TreeOutline no longer has the element in the _knownTreeElements list do an ancestor lookup
793         instead of an early return.
794
795 2008-01-02  Alice Liu  <alice.liu@apple.com>
796
797         Reviewed by Maciej.
798
799         Fixed <rdar://5283861> (problems scrolling in gmail message content area)
800
801         * platform/ScrollView.h:
802         * platform/win/ScrollViewWin.cpp:
803         (WebCore::ScrollView::scroll):
804          Changed return value to bool to reflect success of scroll attempt
805
806 2008-01-02  Alexey Proskuryakov  <ap@webkit.org>
807
808         Fixed a typo (pointed out in review, but I somehow missed it at first).
809
810         * editing/EditorCommand.cpp: (WebCore::executeDelete):
811
812 2008-01-02  Alexey Proskuryakov  <ap@webkit.org>
813
814         Reviewed by Darin.
815
816         Resolved several FIXMEs in EditorCommand.
817         Made recently added commands hidden from JS again.
818         Removed BackwardDelete implementation, which used to be dead code, but got exposed now.
819
820         Tests: editing/execCommand/delete-no-scroll.html
821                editing/execCommand/forward-delete-no-scroll.html
822                editing/execCommand/insert-line-break-no-scroll.html
823
824         * editing/EditorCommand.cpp:
825         (WebCore::executeDelete):
826         (WebCore::executeForwardDelete):
827         (WebCore::executeInsertLineBreak):
828         (WebCore::supportedFromMenuOrKeyBinding):
829         (WebCore::CommandEntry::):
830
831 2008-01-02  Alexey Proskuryakov  <ap@webkit.org>
832
833         Reviewed by Darin.
834
835         http://bugs.webkit.org/show_bug.cgi?id=14555
836         action=mailto + method=get - The generated mailto URI is incorrect and the hvalues are encoded twice
837
838         http://bugs.webkit.org/show_bug.cgi?id=14774
839         Submitted data only includes first input item
840
841         Reworked encoding of mailto URLs to match other browsers.
842         Moved most of related logic from FrameLoader::submitForm() to HTMLFormElement::submit().
843
844         Tests: fast/forms/mailto/advanced-get.html
845                fast/forms/mailto/advanced-put.html
846                fast/forms/mailto/get-multiple-items-text-plain.html
847                fast/forms/mailto/get-multiple-items-x-www-form-urlencoded.html
848                fast/forms/mailto/get-multiple-items.html
849                fast/forms/mailto/get-non-ascii.html
850                fast/forms/mailto/get-non-ascii-text-plain.html
851                fast/forms/mailto/get-overwrite-query.html
852                fast/forms/mailto/post-append-query.html
853                fast/forms/mailto/post-multiple-items-multipart-form-data.html
854                fast/forms/mailto/post-multiple-items-text-plain.html
855                fast/forms/mailto/post-multiple-items-x-www-form-urlencoded.html
856                fast/forms/mailto/post-multiple-items.html
857
858         * html/HTMLFormElement.cpp:
859         (WebCore::HTMLFormElement::submit):
860         * loader/FrameLoader.cpp:
861         (WebCore::FrameLoader::submitForm):
862
863 2008-01-02  Mark Rowe  <mrowe@apple.com>
864
865         Autotools build fix.
866
867         * GNUmakefile.am: Remove files before generating them, not after.
868
869 2008-01-02  Mark Rowe  <mrowe@apple.com>
870
871         Rubber-stamped by Alp Toker.
872
873         Add missing dependencies to some GNUmakefile.am rules.
874
875         * GNUmakefile.am:
876
877 2008-01-02  Mark Rowe  <mrowe@apple.com>
878
879         Reviewed by Alp Toker.
880
881         Autotools build fix.  Make can expand $@ to any of the targets for the rule,
882         while we always want to use the name of the .cpp file as the output file.
883
884         * GNUmakefile.am:
885
886 2008-01-02  Luca Bruno  <lethalman88@gmail.com>
887
888         Reviewed by Alp Toker.
889
890         http://bugs.webkit.org/show_bug.cgi?id=16115
891         [GTK] ContextMenu and ContextMenuItem lacks an implementation
892
893         Add context menu support.
894
895         Based on a patch by Holger Freyther.
896
897         * platform/gtk/ContextMenuGtk.cpp:
898         (WebCore::menuItemActivated):
899         (WebCore::ContextMenu::ContextMenu):
900         (WebCore::ContextMenu::~ContextMenu):
901         (WebCore::ContextMenu::appendItem):
902         (WebCore::ContextMenu::setPlatformDescription):
903         (WebCore::ContextMenu::releasePlatformDescription):
904         * platform/gtk/ContextMenuItemGtk.cpp:
905         (WebCore::ContextMenuItem::ContextMenuItem):
906         (WebCore::ContextMenuItem::~ContextMenuItem):
907         (WebCore::ContextMenuItem::releasePlatformDescription):
908         (WebCore::ContextMenuItem::type):
909         (WebCore::ContextMenuItem::action):
910         (WebCore::ContextMenuItem::setAction):
911         (WebCore::ContextMenuItem::platformSubMenu):
912         (WebCore::ContextMenuItem::setSubMenu):
913         (WebCore::ContextMenuItem::setChecked):
914         (WebCore::ContextMenuItem::setEnabled):
915
916 2008-01-02  Alp Toker  <alp@atoker.com>
917
918         GTK+ autotools build fix. Track changes in r29073.
919
920         * GNUmakefile.am:
921
922 2008-01-01  Darin Adler  <darin@apple.com>
923
924         - fix release build
925
926         * bindings/js/kjs_binding.cpp:
927         (KJS::setDOMException): Initialize to avoid uninitialized variable warning.
928         Removed default so we get a warning if there's a missing case.
929
930 2008-01-01  David D. Kilzer  <ddkilzer@webkit.org>
931
932         Scripting MIME Types application/ecmascript, application/javascript not viewable
933         <http://bugs.webkit.org/show_bug.cgi?id=11063>
934
935         Reviewed by Darin.
936
937         This patch consolidates the list of acceptable MIME types for JavaScript
938         source into the MIMETypeRegistry class, and replaces checks for these
939         types with a call to MIMETypeRegistry::isSupportedJavaScriptMIMEType().
940
941         No tests added since viewing JavaScript source is not testable.
942
943         * dom/DOMImplementation.cpp:
944         (WebCore::DOMImplementation::isTextMIMEType): Use
945         MIMETypeRegistry::isSupportedJavaScriptMIMEType() instead of a single
946         hard-coded MIME type, "application/x-javascript".
947
948         * html/HTMLScriptElement.cpp:
949         (WebCore::HTMLScriptElement::shouldExecuteAsJavaScript): Moved list of
950         JavaScript MIME types from here to
951         MIMETypeRegistry::initialiseSupportedJavaScriptMIMETypes().
952
953         * platform/MIMETypeRegistry.cpp:
954         (WebCore::initialiseSupportedJavaScriptMIMETypes): Added. List of
955         MIME types came from HTMLScriptElement::shouldExecuteAsJavaScript().
956         (WebCore::initialiseSupportedNonImageMimeTypes): Remove single
957         hard-coded MIME type, "application/x-javascript", from the list.
958         (WebCore::initialiseMIMETypeRegistry): Initialise
959         supportedJavaScriptMIMETypes, then pre-populate supportedNonImageMIMETypes
960         with values in supportedJavaScriptMIMETypes.
961         (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType): Added.
962
963         * platform/MIMETypeRegistry.h: Added isSupportedJavaScriptMIMEType().
964
965 2008-01-01  Sam Weinig  <sam@webkit.org>
966
967         Reviewed by Darin.
968
969         Patch for http://bugs.webkit.org/show_bug.cgi?id=16691
970         Use real JS objects for the rest of the DOMExceptions (EventException, RangeException, etc)
971
972         - Create JS objects for all the different types of exceptions, each with there own prototype and constructor.
973         - Abstract all the logic and storage for exception classes in to an ExceptionBase class.
974         - Move specialized ExceptionCodes into the exception classes. (ie. the EventExceptionCode enum is now in EventException).
975
976         Tests: fast/dom/DOMException/EventException.html
977                fast/dom/DOMException/RangeException.html
978                fast/dom/DOMException/XPathException.html
979                http/tests/xmlhttprequest/XMLHttpRequestException.html
980                svg/custom/SVGException.html
981
982         * DerivedSources.make:
983         * WebCore.pro:
984         * WebCore.vcproj/WebCore.vcproj:
985         * WebCore.xcodeproj/project.pbxproj:
986         * WebCoreSources.bkl:
987         * bindings/js/JSSVGMatrixCustom.cpp:
988         (WebCore::JSSVGMatrix::inverse):
989         (WebCore::JSSVGMatrix::rotateFromVector):
990         * bindings/js/kjs_binding.cpp:
991         (KJS::setDOMException):
992         * bindings/scripts/CodeGeneratorJS.pm: Use the constant values defined
993         in the IDL as the ObjC bindings do.
994         * bindings/scripts/CodeGeneratorObjC.pm:
995         * dom/DOMCoreException.cpp: Removed.
996         * dom/DOMCoreException.h:
997         (WebCore::DOMCoreException::DOMCoreException):
998         * dom/DOMCoreException.idl:
999         * dom/Event.h:
1000         * dom/EventException.h: Copied from WebCore/dom/DOMCoreException.h.
1001         (WebCore::EventException::EventException):
1002         (WebCore::EventException::):
1003         * dom/EventException.idl: Copied from WebCore/dom/DOMCoreException.idl.
1004         * dom/EventTargetNode.cpp:
1005         (WebCore::EventTargetNode::dispatchEvent):
1006         * dom/ExceptionBase.cpp: Copied from WebCore/dom/DOMCoreException.cpp.
1007         (WebCore::ExceptionBase::ExceptionBase):
1008         (WebCore::ExceptionBase::toString):
1009         * dom/ExceptionBase.h: Copied from WebCore/dom/DOMCoreException.h.
1010         (WebCore::ExceptionBase::code):
1011         * dom/ExceptionCode.cpp:
1012         (WebCore::getExceptionCodeDescription):
1013         * dom/ExceptionCode.h:
1014         (WebCore::):
1015         * dom/Range.cpp:
1016         (WebCore::Range::insertNode):
1017         (WebCore::Range::checkNodeWOffset):
1018         (WebCore::Range::checkNodeBA):
1019         (WebCore::Range::selectNode):
1020         (WebCore::Range::selectNodeContents):
1021         (WebCore::Range::surroundContents):
1022         * dom/RangeException.h:
1023         (WebCore::RangeException::RangeException):
1024         (WebCore::RangeException::):
1025         * dom/RangeException.idl:
1026         * page/DOMWindow.idl:
1027         * svg/SVGColor.cpp:
1028         (WebCore::SVGColor::setRGBColor):
1029         * svg/SVGException.h:
1030         (WebCore::SVGException::SVGException):
1031         (WebCore::SVGException::):
1032         * svg/SVGException.idl:
1033         * svg/SVGLocatable.cpp:
1034         (WebCore::SVGLocatable::getTransformToElement):
1035         * xml/XMLHttpRequest.cpp:
1036         (WebCore::XMLHttpRequest::dispatchEvent):
1037         (WebCore::XMLHttpRequest::open):
1038         (WebCore::XMLHttpRequest::send):
1039         * xml/XMLHttpRequest.h:
1040         * xml/XMLHttpRequestException.h: Copied from WebCore/dom/DOMCoreException.h.
1041         (WebCore::XMLHttpRequestException::XMLHttpRequestException):
1042         (WebCore::XMLHttpRequestException::):
1043         * xml/XMLHttpRequestException.idl: Copied from WebCore/dom/DOMCoreException.idl.
1044         * xml/XPathEvaluator.h:
1045         * xml/XPathException.h: Copied from WebCore/dom/DOMCoreException.h.
1046         (WebCore::XPathException::XPathException):
1047         (WebCore::XPathException::):
1048         * xml/XPathException.idl: Copied from WebCore/dom/DOMCoreException.idl.
1049         * xml/XPathParser.cpp:
1050         (WebCore::XPath::Parser::parseStatement):
1051         * xml/XPathResult.cpp:
1052         (WebCore::XPathResult::convertTo):
1053         (WebCore::XPathResult::numberValue):
1054         (WebCore::XPathResult::stringValue):
1055         (WebCore::XPathResult::booleanValue):
1056         (WebCore::XPathResult::singleNodeValue):
1057         (WebCore::XPathResult::snapshotLength):
1058         (WebCore::XPathResult::iterateNext):
1059         (WebCore::XPathResult::snapshotItem):
1060
1061 2008-01-01  Sam Weinig  <sam@webkit.org>
1062
1063         Remove JSDomExceptionConstructor.lut.h from clean step
1064         as it no longer exists.
1065
1066         * GNUmakefile.am:
1067
1068 2008-01-01  Dan Bernstein  <mitz@apple.com>
1069
1070         - Windows build fix
1071
1072         * WebCore.vcproj/WebCore.vcproj:
1073
1074 2008-01-01  Sam Weinig  <sam@webkit.org>
1075
1076         Try again to fix the builds
1077
1078         * DerivedSources.make:
1079
1080 2008-01-01  Sam Weinig  <sam@webkit.org>
1081
1082         Fix non-mac builds.
1083
1084         * WebCore.pro:
1085         * WebCore.vcproj/WebCore.vcproj:
1086         * WebCoreSources.bkl:
1087
1088 2008-01-01  Eric Seidel  <eric@webkit.org>
1089
1090         Reviewed by Alexey.
1091
1092         Don't replace \ with / in data: urls
1093         http://bugs.webkit.org/show_bug.cgi?id=16692
1094
1095         Test: fast/loader/url-data-replace-backslash.html
1096
1097         * platform/KURL.cpp:
1098         (WebCore::KURL::init):
1099
1100 2008-01-01  Alp Toker  <alp@atoker.com>
1101
1102         GTK+ autotools build fix. Track changes in r29051, r29058 and pass the
1103         correct parameter to AM_INIT_AUTOMAKE.
1104
1105         * GNUmakefile.am:
1106
1107 2007-12-31  Sam Weinig  <sam@webkit.org>
1108
1109         Reviewed by Darin.
1110
1111         Patch for http://bugs.webkit.org/show_bug.cgi?id=16637
1112         Acid3 expects ExeceptionCode constants to be defined on DOMException objects
1113
1114         - Make DOMException a real JS object.
1115
1116         Test: fast/dom/DOMException/prototype-object.html
1117
1118         * DerivedSources.make:
1119         * WebCore.xcodeproj/project.pbxproj:
1120
1121         This is no longer needed as the autogenerated classes now includes the
1122         constructor.
1123         * bindings/js/JSDOMExceptionConstructor.cpp: Removed.
1124         * bindings/js/JSDOMExceptionConstructor.h: Removed.
1125
1126         Create on demand and use the new class for DOMExceptions.
1127         * bindings/js/kjs_binding.cpp:
1128         (KJS::setDOMException):
1129
1130         Remove no longer needed custom constructor getter.
1131         * bindings/js/kjs_window.cpp:
1132         (KJS::Window::getValueProperty):
1133
1134         Don't expose DOMCoreException as the name of class by special casing
1135         the user visible class name to be DOMException.
1136         * bindings/scripts/CodeGeneratorJS.pm:
1137
1138         The DOMException class/file needs to be named DOMCoreException because there is
1139         name conflict with one of the Objective-C bindings classes.  It should be renamed
1140         to DOMException when the Objective-C bindings are moved into WebKit.
1141         * dom/DOMCoreException.cpp: Added.
1142         (WebCore::DOMCoreException::DOMCoreException):
1143         (WebCore::DOMCoreException::toString):
1144         * dom/DOMCoreException.h: Added.
1145         (WebCore::DOMCoreException::):
1146         (WebCore::DOMCoreException::code):
1147         (WebCore::DOMCoreException::name):
1148         (WebCore::DOMCoreException::message):
1149         * dom/DOMCoreException.idl: Added.
1150         * page/DOMWindow.idl:
1151
1152 2007-12-31  Sam Weinig  <sam@webkit.org>
1153
1154         Re-enable querySelector and querySelectorAll and touch the necessary files to not
1155         kill the windows build.
1156
1157         * WebCore.vcproj/build-generated-files.sh:
1158         * bindings/scripts/CodeGeneratorCOM.pm:
1159         * dom/Document.idl:
1160         * dom/Element.idl:
1161
1162 2007-12-31  Darin Adler  <darin@apple.com>
1163
1164         - fix Windows build
1165
1166         * dom/Document.idl: Temporarily disable querySelector and querySelectorAll, since they are showing
1167         up as pure virtual functions. Sam can fix this later.
1168         * dom/Element.idl: Ditto.
1169
1170 2007-12-31  Dan Bernstein  <mitz@apple.com>
1171
1172         Reviewed by Darin Adler.
1173
1174         - fix http://bugs.webkit.org/show_bug.cgi?id=14134
1175           <rdar://problem/5655160> REGRESSION (r25353): Whitespace nodes ignored between inline list items
1176
1177         Test: fast/dynamic/create-renderer-for-whitespace-only-text.html
1178
1179         * dom/Node.cpp:
1180         (WebCore::Node::attach): Added code to check if this node's renderer
1181         has become the "previous renderer" of any sibling text node, and if so,
1182         ensure that that node gets a renderer if it now needs one.
1183         (WebCore::Node::createRendererIfNeeded): Removed the assertion that the
1184         node is not attached.
1185
1186 2007-12-31  Darin Adler  <darin@apple.com>
1187
1188         Reviewed by Mitz.
1189
1190         - fix http://bugs.webkit.org/show_bug.cgi?id=16641
1191           Acid3 reveals HTMLFormElement.elements fails to update when element name changes
1192
1193         Test: fast/dom/HTMLFormElement/elements-not-in-document.html
1194
1195         This was a bug specific to forms that are not in the document tree.
1196         The fix was to change the code to increment the document version number to match
1197         up with other document change tracking. Maybe at some point we can clean these up
1198         so we don't have so many competing change notification systems.
1199
1200         * dom/ContainerNode.cpp:
1201         (WebCore::ContainerNode::replaceChild): Removed bogus comment.
1202         (WebCore::ContainerNode::addChild): Added an explicit incDOMTreeVersion
1203         call here, since this code path bypasses the subtree-modified event code.
1204
1205         * dom/Element.cpp:
1206         (WebCore::Element::setAttribute): Remove the inDocument() check -- not all HTML
1207         collections are for things in the document.
1208         (WebCore::Element::setAttributeMap): Ditto.
1209
1210         * dom/EventTargetNode.cpp:
1211         (WebCore::EventTargetNode::dispatchSubtreeModifiedEvent): Added a call to
1212         incDOMTreeVersion here; covers most cases of tree structure changes.
1213
1214         * dom/Node.cpp:
1215         (WebCore::Node::attach): Remove call to incDOMTreeVersion -- creating a renderer
1216         has nothing to do with changes to the DOM tree!
1217         (WebCore::Node::detach): Ditto.
1218
1219         * html/HTMLFormElement.cpp:
1220         (WebCore::HTMLFormElement::registerFormElement): Remove call to incDOMTreeVersion.
1221         This is handled at a lower level and doesn't need to be here.
1222         (WebCore::HTMLFormElement::removeFormElement): Ditto.
1223
1224 2007-12-31  Henry Mason  <hmason@mac.com>
1225
1226         Reviewed by Darin.
1227
1228         Patch for http://bugs.webkit.org/show_bug.cgi?id=14994
1229         Support for MessageEvent and cross-domain messaging
1230
1231         Test: http/tests/messaging/cross-domain-message-send.html
1232
1233         * DerivedSources.make:
1234         * WebCore.pro:
1235         * WebCore.vcproj/WebCore.vcproj:
1236         * WebCore.xcodeproj/project.pbxproj:
1237         * WebCoreSources.bkl:
1238         * bindings/js/JSDOMWindowCustom.cpp:
1239         (WebCore::JSDOMWindow::customGetOwnPropertySlot): Allow cross-domain access to the
1240         postMessage function.
1241         (WebCore::JSDOMWindow::postMessage):
1242         * bindings/js/JSEventCustom.cpp:
1243         (WebCore::toJS):
1244         * dom/Event.cpp:
1245         (WebCore::Event::isMessageEvent):
1246         * dom/Event.h:
1247         * dom/EventNames.h: New event name
1248         * dom/MessageEvent.cpp: Added.
1249         * dom/MessageEvent.h: Added.
1250         * dom/MessageEvent.idl: Added.
1251         * page/DOMWindow.cpp:
1252         (WebCore::DOMWindow::postMessage): Added.
1253         * page/DOMWindow.h:
1254         * page/DOMWindow.idl:
1255
1256 2007-12-31  Darin Adler  <darin@apple.com>
1257
1258         Suggested by Antti.
1259
1260         - turn ENABLE_VIDEO back off for Windows until we can install QuickTime on the build bots
1261
1262         * WebCore.vcproj/WebCore.vcproj: Removed ENABLE_VIDEO.
1263         * WebCore.vcproj/build-generated-files.sh: Ditto.
1264
1265 2007-12-30  Alp Toker  <alp@atoker.com>
1266
1267         Reviewed by Dan Bernstein.
1268
1269         Silence warning.
1270
1271         * dom/NodeList.h:
1272
1273 2007-12-30  Sam Weinig  <sam@webkit.org>
1274
1275         Reviewed by Oliver Hunt.
1276
1277         Fix for http://bugs.webkit.org/show_bug.cgi?id=16387
1278         Variable names can be enumerated across domains
1279         <rdar://problem/5640454>
1280
1281         Test: http/tests/security/cross-frame-access-enumeration.html
1282
1283         * bindings/js/kjs_window.cpp:
1284         (KJS::Window::getPropertyNames): Override method to test same-origin policy.
1285         * bindings/js/kjs_window.h:
1286
1287 2007-12-30  Sam Weinig  <sam@webkit.org>
1288
1289         Reviewed by Oliver Hunt.
1290
1291         Patch for http://bugs.webkit.org/show_bug.cgi?id=10686
1292         event instanceof MouseEvent throws exception
1293
1294         Add JS constructors for all the Event types.
1295
1296         Test: fast/events/event-instanceof.html
1297
1298         * WebCore.xcodeproj/project.pbxproj:
1299         * dom/KeyboardEvent.idl:
1300         * dom/MouseEvent.idl:
1301         * dom/MutationEvent.idl:
1302         * dom/OverflowEvent.idl:
1303         * dom/ProgressEvent.idl:
1304         * dom/TextEvent.idl:
1305         * dom/UIEvent.idl:
1306         * dom/WheelEvent.idl:
1307         * page/DOMWindow.idl:
1308
1309 2007-12-30  David Kilzer  <ddkilzer@webkit.org>
1310
1311         Reviewed by Darin.
1312
1313         - fix http://bugs.webkit.org/show_bug.cgi?id=15359
1314           JPEG image not shown when height is specified as percentage inside a table
1315
1316         The problem occurs when a replaced element (image, canvas, etc.) with
1317         a percent-height attribute is contained by a table cell with an auto-
1318         or percent-height attribute.  If there are no other conditions to cause
1319         the table cell's height to expand, an available height of zero will
1320         always be returned.  In these cases, the intrinsic height of the
1321         replaced element should be used if it is greater than the available
1322         height of the table cell.
1323
1324         Tests: fast/replaced/table-percent-height.html
1325                tables/mozilla/bugs/bug137388-1.html
1326                tables/mozilla/bugs/bug137388-2.html
1327
1328         * rendering/RenderBox.cpp:
1329         (WebCore::RenderBox::calcReplacedHeightUsing):
1330
1331 2007-12-30  Luca Bruno  <lethalman88@gmail.com>
1332
1333         Reviewed by Alp Toker.
1334
1335         http://bugs.webkit.org/show_bug.cgi?id=16099
1336         Crash in CURL for empty POST
1337
1338         We have to set POST even when the data is empty, otherwise cURL will
1339         hang while waiting for a response.
1340
1341         * platform/network/curl/ResourceHandleManager.cpp
1342         (ResourceHandleManager::setupPOST): allow empty POST
1343
1344 2007-12-29  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
1345
1346         Reviewed by Alp Toker.
1347
1348         Move all SVG related stuff inside SVG block. Don't include
1349         SVGNames, SVGElementFactory, and XLinkNames when SVG is not
1350         enabled
1351
1352         * GNUmakefile.am:
1353
1354 2007-12-29  Alexey Proskuryakov  <ap@webkit.org>
1355
1356         Reviewed by Darin.
1357
1358         http://bugs.webkit.org/show_bug.cgi?id=14428
1359         FCKEditor: Images disappear on drag/drop and copy/paste
1360
1361         Test: editing/pasteboard/drag-image-in-about-blank-frame.html
1362
1363         * editing/markup.cpp: (WebCore::createFragmentFromMarkup): Don't use "about:blank" as a
1364         base URL, just like we don't use an empty one.
1365
1366 2007-12-29  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
1367
1368         Reviewed by Alp Toker.
1369
1370         http://bugs.webkit.org/show_bug.cgi?id=16669
1371         autotools update and fixes
1372
1373         Autotools update and database/icon database inclusion guard fixes
1374
1375         * GNUmakefile.am:
1376           - Update autotools config as per -r29012 changes
1377           - Fix CSSGrammar.h/cpp generation (Seo Sanghyeon, sanxiyn)
1378         * dom/Document.cpp:
1379         * loader/icon/IconDatabase.h:
1380         * page/DOMWindow.cpp:
1381         * page/InspectorController.cpp:
1382         * page/Settings.cpp:
1383         * storage/Database.h:
1384           - Remove ENABLE(DATABASE) inclusion guard. Let the includer add the guard instead.
1385
1386 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
1387
1388         Reviewed by Alexey.
1389
1390         Respect horiz-origin-x / horiz-origin-y / vert-origin-x / vert-origin-y properties when drawing SVG Fonts.
1391         (Fixes fonts-elem-05-t.svg in a --svg-fonts build)
1392
1393         * svg/SVGFont.cpp:
1394         (WebCore::Font::drawGlyphsWithSVGFont):
1395
1396 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
1397
1398         Reviewed by Oliver.
1399
1400         Further SVG Font work. Parse all <glyph> attributes, using SVGGlyphElement::buildGlyphIdentifier.
1401         SVGFontElement::collectGlyphs() now uses this method. Per character advance values work well now.
1402
1403         * platform/graphics/FontData.cpp:
1404         (WebCore::SVGFontData::convertEmUnitToPixel): Add helper function.
1405         (WebCore::FontData::ascent):
1406         (WebCore::FontData::descent):
1407         * platform/graphics/FontData.h:
1408         * svg/SVGFont.cpp:
1409         (WebCore::isVerticalWritingMode): Add helper function.
1410         (WebCore::Font::drawGlyphsWithSVGFont):
1411         * svg/SVGFontElement.cpp:
1412         (WebCore::SVGFontElement::collectGlyphs): Simplified implementation - SVGGlyphIdentifier now build by SVGGlyphElement.
1413         * svg/SVGGlyphElement.cpp:
1414         (WebCore::parseArabicForm): Helper function.
1415         (WebCore::parseOrientation): Ditto.
1416         (WebCore::parsePathData): Ditto.
1417         (WebCore::SVGGlyphElement::buildGlyphIdentifier):
1418         * svg/SVGGlyphElement.h:
1419         (WebCore::SVGGlyphElement::rendererIsNeeded):
1420
1421 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
1422
1423         Reviewed by Oliver.
1424
1425         Refactor SVGAnimationElement::parseValues into a generic function parseDelimitedString.
1426         SVGAnimationElement needs to parse semicolon-seperated strings, SVGGlyphElement comma-seperated.
1427
1428         * svg/SVGAnimationElement.cpp:
1429         (WebCore::SVGAnimationElement::parseMappedAttribute):
1430         * svg/SVGParserUtilities.cpp:
1431         (WebCore::parseDelimitedString):
1432         * svg/SVGParserUtilities.h:
1433
1434 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
1435
1436         Reviewed by Maciej.
1437
1438         Add new helper structure SVGFontData - FontData holds this object as OwnPtr.
1439         Store several attribute values there (horiz-adv-x, horiz-origin-x etc..)
1440
1441         To optimize for the common case ('FontData' used for HTML rendering) it feels
1442         better to hold one OwnPtr in FontData, than several floats.
1443
1444         Parse all <font> attributes in SVGFontFaceElement::createFontData.
1445
1446         * platform/graphics/FontData.cpp:
1447         (WebCore::SVGFontData::SVGFontData):
1448         (WebCore::FontData::FontData):
1449         (WebCore::FontData::ascent):
1450         (WebCore::FontData::descent):
1451         * platform/graphics/FontData.h:
1452         (WebCore::FontData::isSVGFont):
1453         (WebCore::FontData::svgFontData):
1454         * svg/SVGFont.cpp:
1455         (WebCore::Font::drawGlyphsWithSVGFont):
1456         * svg/SVGFontElement.cpp:
1457         * svg/SVGFontElement.h:
1458         (WebCore::SVGFontElement::rendererIsNeeded):
1459         * svg/SVGFontFaceElement.cpp:
1460         (WebCore::SVGFontFaceElement::unitsPerEm):
1461         (WebCore::SVGFontFaceElement::createFontData):
1462
1463 2007-12-28  Darin Adler  <darin@apple.com>
1464
1465         - try to fix Windows and WX builds (broken by SVG Fonts check-in)
1466
1467         * platform/graphics/win/FontWin.cpp:
1468         (WebCore::Font::drawGlyphs): Pass font size to FontData::ascent, now that it requires it.
1469         I can't see how it can be right to require the font size for ascent and descent,
1470         but not for other metrics functions in FontData.
1471
1472         * platform/graphics/wx/FontWx.cpp:
1473         (WebCore::Font::drawGlyphs): Pass font size to FontData::ascent and FontData::descent.
1474
1475 2007-12-28  Dan Bernstein  <mitz@apple.com>
1476
1477         Reviewed by Mark Rowe.
1478
1479         - fix http://bugs.webkit.org/show_bug.cgi?id=16650
1480           <rdar://problem/5664872> REGRESSION (r28278-r28314): ATSUI uses LTR writing direction for all text runs
1481
1482         Covered by existing pixel tests.
1483
1484         * platform/graphics/mac/FontMac.mm:
1485         (WebCore::Font::drawComplexText): Corrected to maintain the style
1486         information in the adjusted text run when passing it to
1487         ATSUILayoutParameters. Prior to r28298 the style was passed separately.
1488
1489 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
1490
1491         Build fix, not reviewed.
1492
1493         Add wtf/OwnPtr.h include, to fix --svg-fonts build.
1494
1495         * css/SVGCSSFontFace.h:
1496
1497 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
1498
1499         Reviewed by Eric.
1500
1501         Fixes: http://bugs.webkit.org/show_bug.cgi?id=10649 (WebKit SVG needs SVG Fonts support)
1502
1503         Begin implementation of SVG Fonts module. Basic documents using SVG Fonts already work.
1504         Only local, in-document fonts who declare their glyphs using the <glyph d="..."> path syntax
1505         are supported. (<glyph> containing arbitary SVG content as child elements, not supported yet).
1506
1507         Limited to single char <-> glyph mapping, no ligatures supported yet.
1508         (ie. <glyph unicode='A'/> <glyph unicode='AB'/> - it ignores the 'AB' glyph definition for now)
1509
1510         Mark all SVG Font related classes & usages in ENABLE(SVG_FONTS) blocks.
1511
1512         No layout test changes for a --no-svg-fonts build, heavy changes if enabled. Because a lot of SVG Font
1513         attributes are not processed yet, the rendering looks wrong - hence disabled by default.)
1514
1515         * DerivedSources.make: Add SVGFontElement/SVGGlyphElement/SVGMissingGlyphElement
1516         * WebCore.pro: Updated build system.
1517         * WebCore.vcproj/WebCore.vcproj: Ditto.
1518         * WebCore.xcodeproj/project.pbxproj: Ditto.
1519         * bindings/js/JSSVGElementWrapperFactory.cpp: Add JSSVGFontElement/JSSVGGlyphElement/JSSVGMissingGlyphElement
1520         * bindings/objc/DOM.mm: Ditto (for DOMSVG*).
1521         (WebCore::createElementClassMap):
1522         * bindings/objc/DOMInternal.h: Ditto.
1523         * bindings/objc/DOMSVG.h: Ditto.
1524         * css/CSSFontFace.h: Mark three functions 'virtual', to be overriden by SVGCSSFontFace
1525         * css/CSSFontFaceSrcValue.h: Add functionality to identify as SVG CSS font face source.
1526         (WebCore::CSSFontFaceSrcValue::m_fontFaceElement): Hold a pointer to the font face which created it.
1527         (WebCore::CSSFontFaceSrcValue::svgFontFaceElement):
1528         (WebCore::CSSFontFaceSrcValue::setSVGFontFaceElement):
1529         * css/CSSFontSelector.cpp: Build 'SVGCSSFontFace' objects for local, in-document SVG fonts.
1530         (WebCore::CSSFontSelector::addFontFaceRule):
1531         * css/SVGCSSFontFace.cpp: Added. (Simplified implementation for SVG Fonts)
1532         (WebCore::SVGCSSFontFace::SVGCSSFontFace):
1533         (WebCore::SVGCSSFontFace::~SVGCSSFontFace):
1534         (WebCore::SVGCSSFontFace::isValid):
1535         (WebCore::SVGCSSFontFace::addSource):
1536         (WebCore::SVGCSSFontFace::getFontData):
1537         * css/SVGCSSFontFace.h: Added.
1538         * platform/graphics/cg/PathCG.cpp:
1539         (WebCore::Path::closeSubpath): Silence a CG warning when calling closeSubpath() on empty path.
1540         * platform/graphics/Font.cpp: Add some logic to call into SVG Font code when operating on SVG Fonts.
1541         (WebCore::Font::ascent): Pass font size to FontData::ascent() call
1542         (WebCore::Font::descent): Pass font size to FontData::descent() call
1543         (WebCore::Font::canUseGlyphCache): Always return true for SVG fonts here.
1544         (WebCore::Font::drawGlyphBuffer): Call drawGlyphsWithSVGFont (instead of drawGlyphs) if the primary font is a SVG font.
1545         * platform/graphics/Font.h: Add (SVG-only!) ability to store a RenderObject pointer, to the element which invoked the drawText() call.
1546         (WebCore::TextRun::TextRun):
1547         (WebCore::TextRun::referencingRenderObject):
1548         (WebCore::TextRun::setReferencingRenderObject):
1549         * platform/graphics/FontData.cpp:
1550         (WebCore::FontData::FontData):
1551         (WebCore::FontData::ascent):
1552         (WebCore::FontData::descent):
1553         * platform/graphics/FontData.h: Store a pointer to the SVGFontFaceElement, which created this FontData object - needed for drawGlyphsWithSVGFont().
1554         (WebCore::FontData::isSVGFont): Offer a way to determine wheter this is a FontData object, created by a SVGFontFaceElement.
1555         (WebCore::FontData::svgFontFace):
1556         * rendering/SVGInlineTextBox.cpp:
1557         (WebCore::SVGInlineTextBox::calculateGlyphWidth): Add assertion.
1558         * rendering/SVGRootInlineBox.cpp:
1559         (WebCore::svgTextRunForInlineTextBox): Always call 'setReferencingRenderObject(myRenderSVGText)' on the new TextRun
1560         * svg/SVGFont.cpp: Added.
1561         (WebCore::Font::drawGlyphsWithSVGFont): Outsourced implementation of SVG Fonts into it's own file.
1562         * svg/SVGFontElement.cpp: Added. (Note: this holds the GlyphHashMap which associates certain <glyph> objects with unicode values)
1563         (WebCore::SVGFontElement::SVGFontElement):
1564         (WebCore::SVGFontElement::~SVGFontElement):
1565         (WebCore::SVGFontElement::parseMappedAttribute):
1566         (WebCore::SVGFontElement::collectGlyphs):
1567         (WebCore::SVGFontElement::glyphIdentifierForGlyphCode):
1568         * svg/SVGFontElement.h: Added.
1569         (WebCore::GlyphHash::hash):
1570         (WebCore::GlyphHash::equal):
1571         (WebCore::GlyphHashTraits::deletedValue):
1572         (WebCore::SVGFontElement::rendererIsNeeded):
1573         (WebCore::SVGFontElement::contextElement):
1574         * svg/SVGFontElement.idl: Added.
1575         * svg/SVGFontFaceElement.cpp: Build SVG specific 'FontData' object
1576         (WebCore::SVGFontFaceElement::unitsPerEm):
1577         (WebCore::SVGFontFaceElement::fontFamily):
1578         (WebCore::SVGFontFaceElement::createFontData): Builds SVG specified 'FontData' object with the markup specified ascent/descent values etc..
1579         (WebCore::SVGFontFaceElement::rebuildFontFace): Construct CSSFontFaceSrc object (marked as 'isSVGFontFaceSrc') to satisfy CSSFontSelector::addFontFaceRule.
1580         (WebCore::SVGFontFaceElement::insertedIntoDocument): Rebuild font face.
1581         (WebCore::SVGFontFaceElement::glyphIdentifierForGlyphCode): Allows drawGlyphsWithSVGFont to access the glyph hash map living in the SVGFontElement.
1582         * svg/SVGFontFaceElement.h: Fixed code formatting issues & wrap in ENABLE(SVG_FONTS) blocks.
1583         * svg/SVGFontFaceElement.idl: Ditto.
1584         * svg/SVGFontFaceFormatElement.cpp: Ditto.
1585         * svg/SVGFontFaceFormatElement.h: Ditto.
1586         * svg/SVGFontFaceFormatElement.idl: Ditto.
1587         * svg/SVGFontFaceNameElement.cpp: Ditto.
1588         * svg/SVGFontFaceNameElement.h: Ditto.
1589         * svg/SVGFontFaceNameElement.idl: Ditto.
1590         * svg/SVGFontFaceSrcElement.cpp: Ditto.
1591         * svg/SVGFontFaceSrcElement.h: Ditto.
1592         * svg/SVGFontFaceSrcElement.idl: Ditto.
1593         * svg/SVGFontFaceUriElement.cpp: Ditto.
1594         * svg/SVGFontFaceUriElement.h: Ditto.
1595         * svg/SVGFontFaceUriElement.idl: Ditto.
1596         * svg/SVGDefinitionSrcElement.cpp: Ditto.
1597         * svg/SVGDefinitionSrcElement.h: Ditto.
1598         * svg/SVGDefinitionSrcElement.idl: Ditto.
1599         * svg/SVGGlyphElement.cpp: Added.
1600         (WebCore::SVGGlyphElement::SVGGlyphElement):
1601         (WebCore::SVGGlyphElement::parseMappedAttribute):
1602         (WebCore::SVGGlyphElement::childrenChanged):
1603         * svg/SVGGlyphElement.h: Added.
1604         (WebCore::SVGGlyphElement::rendererIsNeeded):
1605         (WebCore::SVGGlyphIdentifier::): Structure holding all data to represent a SVG glyph (origin, advance, orientation etc..)
1606         (WebCore::SVGGlyphIdentifier::SVGGlyphIdentifier):
1607         * svg/SVGGlyphElement.idl: Added.
1608         * svg/SVGMissingGlyphElement.cpp: Added. (stub implementation)
1609         (WebCore::SVGMissingGlyphElement::SVGMissingGlyphElement):
1610         (WebCore::SVGMissingGlyphElement::parseMappedAttribute):
1611         (WebCore::SVGMissingGlyphElement::childrenChanged):
1612         * svg/SVGMissingGlyphElement.h: Added.
1613         (WebCore::SVGMissingGlyphElement::rendererIsNeeded):
1614         * svg/SVGMissingGlyphElement.idl: Added.
1615         * svg/svgtags.in: Wrap all SVGFont* elements in ENABLE(SVG_FONTS) block - to assure --no-svg-fonts compilation works (which is the default for now!).
1616
1617 2007-12-27  Dan Bernstein  <mitz@apple.com>
1618
1619         Reviewed by Alexey Proskuryakov.
1620
1621         - fix http://bugs.webkit.org/show_bug.cgi?id=16628
1622           ASSERTION FAILED: m_resizeLayer (running layout tests)
1623
1624         * rendering/RenderLayer.cpp:
1625         (WebCore::RenderLayer::~RenderLayer): Avoid calling
1626         EventHandler::resizeLayerDestroyed() if the document is being destroyed.
1627
1628 2007-12-27  Dan Bernstein  <mitz@apple.com>
1629
1630         Reviewed by Oliver Hunt.
1631
1632         - fix http://bugs.webkit.org/show_bug.cgi?id=16603
1633           <rdar://problem/5664199> Crash when resizing text field
1634
1635         Test: fast/layers/resize-layer-deletion-crash.html
1636
1637         The event handler has only a weak reference to the layer that is
1638         currently in resize mode, so it is the layer's responsibility to let
1639         the event handler know if it has been destroyed while in that mode.
1640
1641         * page/EventHandler.cpp:
1642         (WebCore::EventHandler::resizeLayerDestroyed): Added. Resets
1643         m_resizeLayer to 0.
1644         * page/EventHandler.h:
1645         * rendering/RenderLayer.cpp:
1646         (WebCore::RenderLayer::~RenderLayer): Added a call to
1647         EventHandler::resizeLayerDestroyed() if the layer is in resize mode.
1648
1649 2007-12-27  Collin Jackson  <webkit@collinjackson.com>
1650
1651         Reviewed by Sam Weinig.
1652
1653         http://bugs.webkit.org/show_bug.cgi?id=16539
1654         <rdar://problem/5659269>
1655
1656         The same-origin check was missing in the implementation of 
1657         setTimeout, setInterval, addEventListener, and removeEventListener.
1658
1659         Suppose <http://www.badguy.com/> contains an iframe to 
1660         <http://www.goodguy.com/>. Now www.badguy.com can steal
1661         www.goodguy.com cookies by running this code:
1662
1663         setTimeout.call(frames[0], "alert(document.cookie)", 1000);
1664
1665         This patch changes the behavior so that setTimeout to does 
1666         nothing and returns an undefined value if the caller is not
1667         permitted to script the window whose setTimeout method is being
1668         called. The same applies to setInterval, addEventListener, and 
1669         removeEventListener.
1670
1671         Tests: http/tests/security/cross-frame-access-call.html
1672
1673         * bindings/js/kjs_window.cpp:
1674         (KJS::WindowProtoFuncSetTimeout::callAsFunction)
1675         (KJS::WindowProtoFuncSetInterval::callAsFunction)
1676         (KJS::WindowProtoFuncAddEventListener::callAsFunction)
1677         (KJS::WindowProtoFuncRemoveEventListener::callAsFunction)
1678
1679 2007-12-27  Dan Bernstein  <mitz@apple.com>
1680
1681         Reviewed by Dave Hyatt and Sam Weinig.
1682
1683         - fix <rdar://problem/5605937> Inspector: Disclosure triangle not drawn in node's properties panel until click
1684
1685         Test: fast/layers/add-layer-with-nested-stacking.html
1686         Test: fast/layers/remove-layer-with-nested-stacking.html
1687
1688         * rendering/RenderLayer.cpp:
1689         (WebCore::RenderLayer::addChild): If the new child is overflow-only
1690         but has children of its own, dirty the stacking context's z-order lists
1691         since the grandchildren might need to be in them.
1692         (WebCore::RenderLayer::removeChild): Similarly for the old child.
1693
1694 2007-12-27  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
1695
1696         Reviewed by Alp Toker.
1697
1698         http://bugs.webkit.org/show_bug.cgi?id=16353
1699         [GTK] Check for deprecated API use (G_DISABLE_DEPRECATED etc.)
1700
1701         Added the flags mentioned in the bug only when doing 'debug'
1702         builds. -DGST_DISABLE_DEPRECATED only added when video is enabled.
1703
1704         * GNUmakefile.am:
1705         * WebCore.pro:
1706
1707 2007-12-27  Dan Bernstein  <mitz@apple.com>
1708
1709         Reviewed by Eric Seidel.
1710
1711         - fix http://bugs.webkit.org/show_bug.cgi?id=16490
1712           ASSERT in ~FrameView while viewing/reloading WICD test case
1713
1714         Test: fast/dynamic/paused-event-dispatch.html
1715
1716         * page/FrameView.cpp:
1717         (WebCore::FrameView::~FrameView):
1718         (WebCore::FrameView::layout): Changed to always pause event dispatch and
1719         always resume event dispatch, regardless of whether the post-layout
1720         task timer is active. However, if it is active, assert that event
1721         dispatch is still paused.
1722
1723 2007-12-27  Alexey Proskuryakov  <ap@webkit.org>
1724
1725         Reviewed by Maciej.
1726
1727         http://bugs.webkit.org/show_bug.cgi?id=14500
1728         need to be more generous about charset declaration with meta tag
1729         
1730         http://bugs.webkit.org/show_bug.cgi?id=12526
1731         <rdar://problem/4867183> Safari ignores encoding description "charset=Shift_JIS" in invalid html
1732
1733         <rdar://problem/4892428> Unlike other browsers, WebKit ignores <meta> charset definitions outside the head
1734
1735         <rdar://problem/5643774> REGRESSION: Text is garbled when clicking a link inside an Arabic website
1736
1737         Tests: fast/encoding/ahram-org-eg.html
1738                fast/encoding/bandai-co-jp-releases.html
1739                fast/encoding/floraexpress-ru.html
1740                fast/encoding/hanarei-blog32-fc2-com.html
1741                fast/encoding/yahoo-mail.html
1742
1743         * loader/TextResourceDecoder.cpp:
1744         (WebCore::TextResourceDecoder::checkForHeadCharset): Don't stop looking for <meta> until we've
1745         seen at least 512 bytes of input.
1746
1747 2007-12-26  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
1748
1749         Reviewed by Alp Toker.
1750
1751         http://bugs.webkit.org/show_bug.cgi?id=16390
1752         Use autotools or GNU make as the build system for the GTK port
1753
1754         * GNUmakefile.am: Added.
1755
1756 2007-12-26  Alexey Proskuryakov  <ap@webkit.org>
1757
1758         Reviewed by Sam Weinig.
1759
1760         http://bugs.webkit.org/show_bug.cgi?id=16609
1761         Make manual-tests/xmlhttprequest-contenttype-empty.html test automatic
1762
1763         * manual-tests/xmlhttprequest-contenttype-empty.html: Removed (moved to LayoutTests/http).
1764
1765 2007-12-26  Mark Rowe  <mrowe@apple.com>
1766
1767         Windows build fix.
1768
1769         * platform/Threading.h:
1770
1771 2007-12-25  Rob Buis  <buis@kde.org>
1772
1773         Reviewed by Eric.
1774
1775         http://bugs.webkit.org/show_bug.cgi?id=15514
1776         <clipPath> with <use> not respected
1777         http://bugs.webkit.org/show_bug.cgi?id=16557
1778         SVG circle elements have been clipped away completely, instead of partially.
1779
1780         Add toClipPath to get clip path data for the clipping paths. Implement it for <use>, thereby allowing clip paths using use.
1781
1782         * svg/SVGClipPathElement.cpp:
1783         (WebCore::SVGClipPathElement::canvasResource):
1784         * svg/SVGStyledTransformableElement.h:
1785         (WebCore::SVGStyledTransformableElement::toClipPath):
1786         * svg/SVGUseElement.cpp:
1787         (WebCore::isDirectReference):
1788         (WebCore::SVGUseElement::toClipPath):
1789         * svg/SVGUseElement.h:
1790
1791 2007-12-25  Sam Weinig  <sam@webkit.org>
1792
1793         Reviewed by Eric Seidel.
1794
1795         Clean up the files relating to NodeLists.
1796
1797         * dom/ChildNodeList.cpp:
1798         (WebCore::ChildNodeList::ChildNodeList):
1799         (WebCore::ChildNodeList::length):
1800         (WebCore::ChildNodeList::item):
1801         (WebCore::ChildNodeList::nodeMatches):
1802         * dom/ChildNodeList.h:
1803         * dom/DynamicNodeList.cpp:
1804         (WebCore::DynamicNodeList::itemForwardsFromCurrent):
1805         (WebCore::DynamicNodeList::itemBackwardsFromCurrent):
1806         (WebCore::DynamicNodeList::itemWithName):
1807         * dom/DynamicNodeList.h:
1808         (WebCore::DynamicNodeList::needsNotifications):
1809         * dom/NameNodeList.cpp:
1810         (WebCore::NameNodeList::NameNodeList):
1811         (WebCore::NameNodeList::rootNodeAttributeChanged):
1812         (WebCore::NameNodeList::nodeMatches):
1813         * dom/NameNodeList.h:
1814         * dom/NodeList.h:
1815         * dom/SelectorNodeList.h:
1816
1817 2007-12-25  Sam Weinig  <sam@webkit.org>
1818
1819         Fix non-mac builds.
1820
1821         * WebCore.pro:
1822         * WebCore.vcproj/WebCore.vcproj:
1823         * WebCoreSources.bkl:
1824
1825 2007-12-25  Sam Weinig  <sam@webkit.org>
1826
1827         Rubber stamped by Eric Seidel.
1828
1829         Move TagNodeList into its own file.
1830
1831         * WebCore.xcodeproj/project.pbxproj:
1832         * dom/Node.cpp:
1833         * dom/TagNodeList.cpp: Copied from dom/Node.cpp.
1834         (WebCore::TagNodeList::TagNodeList):
1835         * dom/TagNodeList.h: Copied from dom/Node.cpp.
1836
1837 2007-12-25  Sam Weinig  <sam@webkit.org>
1838
1839         Reviewed by Eric Seidel.
1840
1841         Simplify the NodeList architecture.
1842         - Rename recursiveItem() to item(), since it is not recursive.
1843         - Make recursiveLength() iterative and rename to length().
1844         - Remove now unneeded overrides of item() and length() that used 
1845           to call the recursive variants.
1846
1847         * dom/ClassNodeList.cpp:
1848         * dom/ClassNodeList.h:
1849         * dom/DynamicNodeList.cpp:
1850         (WebCore::DynamicNodeList::length):
1851         (WebCore::DynamicNodeList::item):
1852         (WebCore::DynamicNodeList::rootNodeAttributeChanged): Move implementation 
1853         into the .cpp file since virtual methods can't be inlined.
1854         * dom/DynamicNodeList.h:
1855         * dom/NameNodeList.cpp:
1856         * dom/NameNodeList.h:
1857         * dom/Node.cpp:
1858
1859 2007-12-25  Alp Toker  <alp@atoker.com>
1860
1861         More complete GTK+/Qt/Wx/Win build fixes for breakage introduced in
1862         r28981.
1863
1864         * WebCore.pro:
1865         * WebCore.vcproj/WebCore.vcproj:
1866         * WebCoreSources.bkl:
1867
1868 2007-12-25  Alp Toker  <alp@atoker.com>
1869
1870         Win build fix for breakage introduced in r28981.
1871
1872         * WebCore.vcproj/WebCore.vcproj:
1873
1874 2007-12-25  Alp Toker  <alp@atoker.com>
1875
1876         Wx build fix for breakage introduced in r28981.
1877
1878         * WebCoreSources.bkl:
1879
1880 2007-12-25  Alp Toker  <alp@atoker.com>
1881
1882         GTK+/Qt build fix for breakage introduced in r28981.
1883
1884         * WebCore.pro:
1885
1886 2007-12-25  David Smith  <catfish.man@gmail.com> and Sam Weinig  <sam@webkit.org>
1887
1888         Reviewed by Oliver.
1889         
1890         - http://bugs.webkit.org/show_bug.cgi?id=16587
1891         Implement the most useful part of the W3C Selectors API.
1892
1893         * WebCore.xcodeproj/project.pbxproj:
1894         * css/CSSStyleSelector.h: Make Node a friend of CSSStyleSelector so it can use checkSelector()
1895         * dom/ChildNodeList.cpp:
1896         (WebCore::ChildNodeList::ChildNodeList): Change to being a DynamicNodeList
1897         * dom/ChildNodeList.h:
1898         * dom/ClassNodeList.cpp:
1899         (WebCore::ClassNodeList::ClassNodeList): Change to being a DynamicNodeList
1900         * dom/ClassNodeList.h:
1901         * dom/Document.idl: Add the new functions
1902         * dom/DynamicNodeList.cpp: Copied from WebCore/dom/NodeList.cpp.
1903         (WebCore::DynamicNodeList::DynamicNodeList): Rename NodeList to DynamicNodeList, to differentiate it from the new StaticNodeList
1904         (WebCore::DynamicNodeList::~DynamicNodeList):
1905         (WebCore::DynamicNodeList::recursiveLength):
1906         (WebCore::DynamicNodeList::itemForwardsFromCurrent):
1907         (WebCore::DynamicNodeList::itemBackwardsFromCurrent):
1908         (WebCore::DynamicNodeList::recursiveItem):
1909         (WebCore::DynamicNodeList::itemWithName):
1910         (WebCore::DynamicNodeList::rootNodeChildrenChanged):
1911         (WebCore::DynamicNodeList::Caches::Caches):
1912         (WebCore::DynamicNodeList::Caches::reset):
1913         * dom/DynamicNodeList.h: Copied from WebCore/dom/NodeList.h.
1914         (WebCore::DynamicNodeList::rootNodeAttributeChanged):
1915         * dom/Element.idl: Add the new functions
1916         * dom/NameNodeList.cpp: Change to being a DynamicNodeList
1917         (WebCore::NameNodeList::NameNodeList):
1918         * dom/NameNodeList.h:
1919         (WebCore::NameNodeList::rootNodeAttributeChanged):
1920         * dom/Node.cpp:
1921         (WebCore::TagNodeList::TagNodeList): Change to being a DynamicNodeList
1922         (WebCore::Node::registerDynamicNodeList):
1923         (WebCore::Node::unregisterDynamicNodeList):
1924         (WebCore::Node::getElementsByName):
1925         (WebCore::Node::getElementsByClassName):
1926         (WebCore::Node::querySelector): new
1927         (WebCore::Node::querySelectorAll): new
1928         * dom/Node.h:
1929         * dom/NodeList.cpp: Removed.
1930         * dom/NodeList.h: This is now an abstract superclass of DynamicNodeList and StaticNodeList
1931         (WebCore::NodeList::NodeList):
1932         (WebCore::NodeList::~NodeList):
1933         * dom/SelectorNodeList.cpp: Added.
1934         (WebCore::SelectorNodeList::SelectorNodeList): New StaticNodeList subclass that filters elements by CSS selector
1935         * dom/SelectorNodeList.h: Added.
1936         * dom/StaticNodeList.cpp: Added.
1937         (WebCore::StaticNodeList::length):
1938         (WebCore::StaticNodeList::item):
1939         (WebCore::StaticNodeList::itemWithName):
1940         * dom/StaticNodeList.h: Added.
1941         (WebCore::StaticNodeList::StaticNodeList):
1942         (WebCore::StaticNodeList::~StaticNodeList):
1943
1944 2007-12-25  Mark Rowe  <mrowe@apple.com>
1945
1946         Reviewed by Sam Weinig.
1947
1948         Implement a lock-free ThreadSafeShared for i386, x86_64, ppc and ppc64.
1949         http://bugs.webkit.org/show_bug.cgi?id=16596
1950
1951         This is a 1.7x as fast as the lock-based implementation on x86 for a single-threaded use
1952         of ThreadSafeShared but is closer to 280x as fast when there is heavy concurrent multi-threaded
1953         access to a single ThreadSafeShared object.
1954
1955         The atomic operations are based on those used by the Boost C++ library's shared_ptr implementation.
1956
1957         * platform/Threading.h:
1958         (WebCore::atomicIncrement):
1959         (WebCore::atomicDecrement):
1960         (WebCore::ThreadSafeShared::ThreadSafeShared):
1961         (WebCore::ThreadSafeShared::ref): Use lock-free operations if available.
1962         (WebCore::ThreadSafeShared::deref): Ditto.
1963         (WebCore::ThreadSafeShared::hasOneRef):
1964         (WebCore::ThreadSafeShared::refCount):
1965         (WebCore::ThreadSafeShared::isThreadSafe):
1966
1967 2007-12-24  Darin Adler  <darin@apple.com>
1968
1969         * platform/text/PlatformString.h: Removed now-incorrect comment.
1970         Added a comment about copy().
1971         * platform/text/StringImpl.h: Added a comment about copy().
1972
1973 2007-12-24  Darin Adler  <darin@apple.com>
1974
1975         Reviewed by Maciej.
1976
1977         - http://bugs.webkit.org/show_bug.cgi?id=16550
1978           make StringImpl immutable
1979
1980         I tried to keep the changes to a minimum. In some cases there is
1981         room for optimization -- I didn't try to add in the "single ref count"
1982         optimizations and there might be a tiny bit more string copying than
1983         we had before.
1984
1985         * WebCore.base.exp: Updated.
1986
1987         * dom/CharacterData.cpp:
1988         (WebCore::CharacterData::appendData): Changed to use String since
1989         StringImpl doesn't have mutating functions any more.
1990         (WebCore::CharacterData::insertData): Ditto.
1991         (WebCore::CharacterData::deleteData): Ditto.
1992         (WebCore::CharacterData::replaceData): Ditto.
1993         * dom/Text.cpp:
1994         (WebCore::Text::splitText): Changed to use substring instead of
1995         remove since StringImpl does't have mutating functions any more.
1996         * editing/CompositeEditCommand.cpp:
1997         (WebCore::CompositeEditCommand::deleteInsignificantText): Changed
1998         to use String instead of StringImpl so we can use remove.
1999
2000         * platform/text/PlatformString.h: Removed newUninitialized.
2001         Added append that takes a character pointer and length.
2002
2003         * platform/text/String.cpp:
2004         (WebCore::String::insert): Added an implementation that does not
2005         rely on an underlying StringImpl function.
2006         (WebCore::String::append): Ditto.
2007         (WebCore::String::truncate): Ditto.
2008         (WebCore::String::remove): Ditto.
2009         (WebCore::String::charactersWithNullTermination): Added an
2010         implementation that uses the new StringImpl null termination feature,
2011         which does not require modifying a string.
2012
2013         * platform/text/StringImpl.cpp:
2014         (WebCore::isSpace): Fix comment.
2015         (WebCore::StringImpl::StringImpl): Added a new constructor that makes
2016         a string with a trailing null character.
2017         (WebCore::StringImpl::substring): Marked const.
2018         (WebCore::StringImpl::replace): Marked const; had to add quite a few
2019         const_cast. Also rewrote one of these to work without modifying the
2020         existing string.
2021
2022         * platform/text/StringImpl.h: Fixed a mistake where the empty string had
2023         m_hasTerminatingNullCharacter uninitialized. Added a type and constructor
2024         for creating strings that have a trailing null character. Added a
2025         hasTerminatingNullCharacter function. Removed newUninitialized,
2026         charactersWithNullTermination, append, insert, truncate, and remove.
2027         Marked lots of other functions const.
2028
2029         * platform/text/TextCodecLatin1.cpp:
2030         (WebCore::TextCodecLatin1::decode): Rewrote to use a Vector instead of
2031         newUninitialized.
2032         * platform/text/TextCodecUTF16.cpp:
2033         (WebCore::TextCodecUTF16::decode): Ditto.
2034         * platform/text/TextCodecUserDefined.cpp:
2035         (WebCore::TextCodecUserDefined::decode): Ditto.
2036
2037         * rendering/RenderStyle.cpp:
2038         (WebCore::RenderStyle::setContent): Changed to use String since
2039         StringImpl doesn't have mutating functions any more.
2040
2041 2007-12-24  Alexey Proskuryakov  <ap@webkit.org>
2042
2043         Reviewed by Oliver.
2044
2045         Fix fast/events/arrow-keys-on-body.html, failing on Windows.
2046
2047         * platform/win/KeyEventWin.cpp:
2048         (WebCore::isKeypadEvent):
2049         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2050         Use HIWORD() macro instead of shifting the value explicitly (no change in behavior).
2051
2052 2007-12-23  Alexey Proskuryakov  <ap@webkit.org>
2053
2054         Fix Debug and Release QTMovieWin bulds.
2055
2056         * WebCore.vcproj/QTMovieWin.vcproj:
2057         * WebCore.vcproj/debug.vsprops:
2058         * WebCore.vcproj/debug_internal.vsprops:
2059         * WebCore.vcproj/release.vsprops:
2060         Use LibraryConfigSuffix instead of WebKitConfigSuffix for pthreadVC2.
2061         Build release import lib into \lib, not \bin.
2062
2063 2007-12-23  Alp Toker  <alp@atoker.com>
2064
2065         Reviewed by Holger Freyther.
2066
2067         http://bugs.webkit.org/show_bug.cgi?id=15382
2068         [CAIRO] Canvas pattern support
2069
2070         http://bugs.webkit.org/show_bug.cgi?id=16577
2071         Merge Cairo enhancements from Apollo project
2072
2073         Add support for canvas patterns.
2074
2075         Make Image::nativeImageForCurrentFrame() public.
2076
2077         Fix some typos along the way.
2078
2079         The globalAlpha canvas fixes are not included in this patch as
2080         they're slightly more intrusive and may conflict conceptually with
2081         GraphicsContext::setAlpha().
2082
2083         * html/CanvasPattern.cpp:
2084         (WebCore::CanvasPattern::CanvasPattern):
2085         (WebCore::CanvasPattern::~CanvasPattern):
2086         (WebCore::CanvasPattern::createPattern):
2087         * html/CanvasPattern.h:
2088         (WebCore::CanvasPattern::platformImage):
2089         * html/CanvasRenderingContext2D.cpp:
2090         (WebCore::CanvasRenderingContext2D::setShadow):
2091         (WebCore::CanvasRenderingContext2D::applyShadow):
2092         (WebCore::CanvasRenderingContext2D::drawImage):
2093         (WebCore::CanvasRenderingContext2D::createPattern):
2094         (WebCore::CanvasRenderingContext2D::applyStrokePattern):
2095         (WebCore::CanvasRenderingContext2D::applyFillPattern):
2096         * platform/graphics/Image.h:
2097         (WebCore::Image::nativeImageForCurrentFrame):
2098
2099 2007-12-23  Kevin Ollivier  <kevino@theolliviers.com>
2100
2101         Reviewed by Eric Seidel.
2102
2103         Remove getWxBitmap as we have nativeImageForCurrentFrame now,
2104         and don't draw a border in fillRect.
2105
2106         * platform/graphics/BitmapImage.h:
2107         * platform/graphics/wx/GraphicsContextWx.cpp:
2108         (WebCore::GraphicsContext::fillRect):
2109         * platform/graphics/wx/ImageWx.cpp:
2110
2111 2007-12-23  Alp Toker  <alp@atoker.com>
2112
2113         Reviewed by Holger Freyther.
2114
2115         http://bugs.webkit.org/show_bug.cgi?id=16577
2116         Merge Cairo enhancements from Apollo project
2117
2118         This patch is based on initial merging work by Brent Fulgham. Adobe's
2119         code has been modified in a few places to better suit the existing
2120         coding style.
2121
2122         Implement more clipping and drawing functions.
2123
2124         Save and restore the fill rule manually when clipping.
2125
2126         Avoid image surface creation when the image buffer has height zero.
2127
2128         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2129         (WebCore::GraphicsContext::clip):
2130         (WebCore::GraphicsContext::addInnerRoundedRectClip):
2131         (WebCore::GraphicsContext::addPath):
2132         (WebCore::GraphicsContext::clipOut):
2133         (WebCore::GraphicsContext::clipOutEllipseInRect):
2134         (WebCore::GraphicsContext::fillRoundedRect):
2135         * platform/graphics/cairo/ImageSourceCairo.cpp:
2136         (WebCore::ImageSource::createFrameAtIndex):
2137
2138 2007-12-23  Nikolas Zimmermann  <zimmermann@kde.org>
2139
2140         Reviewed by Mark.
2141
2142         Fix wrong placed ifdef - wrapping SVGDefsElement, instead of SVGDefinitionSrcElement in SVG_FONTS block.
2143
2144         * bindings/objc/DOM.mm:
2145         (WebCore::createElementClassMap):
2146
2147 2007-12-22  Alp Toker  <alp@atoker.com>
2148
2149         GTK+ build fix
2150
2151         GTK_TARGET_OTHER_APP is not available in older GTK+ versions. Pass
2152         empty target flags for now.
2153
2154         Check GTK+, not GLib versions, since they are different.
2155
2156         * platform/gtk/PasteboardGtk.cpp:
2157         (WebCore::Pasteboard::documentFragment):
2158
2159 2007-12-22  Luca Bruno  <lethalman88@gmail.com>
2160
2161         Reviewed by Alp Toker.
2162
2163         http://bugs.webkit.org/show_bug.cgi?id=16311
2164         [Gtk] Copy rich text to clipboard as text/plain and text/html.
2165
2166         Hook into the WebView to get the correct clipboard object on the
2167         appropriate display. This is necessary because GTK+ does not have
2168         global clipboards.
2169
2170         * WebCore.pro:
2171         * platform/Pasteboard.h:
2172         (WebCore::Pasteboard::setHelper): added for GTK
2173         (WebCore::Pasteboard::m_helper): private added for GTK
2174         * platform/gtk/PasteboardGtk.cpp:
2175         (WebCore::PasteboardSelectionData): added to support GTK selection data callback
2176         (WebCore::clipboard_get_contents_cb): added
2177         (WebCore::clipboard_clear_contents_cb): added
2178         (WebCore::Pasteboard::~Pasteboard):
2179         (WebCore::Pasteboard::setHelper):
2180         (WebCore::Pasteboard::writeSelection): copy rich text
2181         (WebCore::Pasteboard::documentFragment): 
2182         (WebCore::Pasteboard::plainText): 
2183         * platform/gtk/PasteboardHelper.h: Added.
2184
2185 2007-12-22  Nikolas Zimmermann  <zimmermann@kde.org>
2186
2187         Reviewed by Oliver.
2188
2189         Fixes: http://bugs.webkit.org/show_bug.cgi?id=15966 (Crash in SVGRootInlineBox::walkTextChunks() on mouse hover)
2190
2191         Add new isSVGRootInlineBox() function to InlineBox to be able to differentiate between RootInlineBox/SVGRootInlineBox.
2192         SVG assumed it's root inline box (for <text> elements) is always of type SVGRootInlineBox, which is not the case
2193         for HTML text in <foreignObject>. Text selection doesn't work so far as line box offsets are wrong - which is visible
2194         in Web Inspector.
2195
2196         * rendering/InlineBox.h:
2197         (WebCore::InlineBox::isSVGRootInlineBox):
2198         * rendering/SVGInlineTextBox.cpp:
2199         (WebCore::SVGInlineTextBox::svgRootInlineBox):
2200         (WebCore::SVGInlineTextBox::closestCharacterToPosition):
2201         (WebCore::SVGInlineTextBox::selectionRect):
2202         * rendering/SVGRenderTreeAsText.cpp:
2203         (WebCore::writeSVGInlineTextBox):
2204         * rendering/SVGRootInlineBox.h:
2205         (WebCore::SVGRootInlineBox::isSVGRootInlineBox):
2206
2207 2007-12-22  Alp Toker  <alp@atoker.com>
2208
2209         LOW_BANDWIDTH_DISPLAY build fix
2210
2211         Track recent KURL DeprecatedString changes.
2212
2213         * loader/FrameLoader.cpp:
2214         (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
2215
2216 2007-12-22  Dan Bernstein  <mitz@apple.com>
2217
2218         - Windows build fix
2219
2220         * WebCore.vcproj/WebCore.vcproj:
2221
2222 2007-12-22  Xan Lopez  <xan@gnome.org>
2223
2224         Reviewed by Alp Toker.
2225
2226         Add missing return 0 to fix a compile warning.
2227
2228         * page/gtk/FrameGtk.cpp:
2229         (WebCore::Frame::createScriptInstanceForWidget):
2230
2231 2007-12-21  Antti Koivisto  <antti@apple.com>
2232
2233         Reviewed by Darin, Adam and Steve.
2234
2235         Add media playback support for Windows.
2236         
2237         The implementation uses low level QuickTime API. DLL is
2238         needed to work around CF use in both WebKit and QuickTime.
2239         
2240         This makes Windows build depend on the QuickTime SDK 
2241         
2242         http://developer.apple.com/quicktime/download/
2243         
2244         but not QuickTime itself.
2245         
2246         QTMovieWinTimer contains some copy code from SharedTimerWin. It
2247         is used in the QuickTime access DLL which can't use WebCore
2248         SharedTimer due to dependency problems.
2249
2250         * WebCore.vcproj/QTMovieWin.vcproj: Added.
2251         * WebCore.vcproj/WebCore.vcproj:
2252         * WebCore.vcproj/build-generated-files.sh:
2253         * html/HTMLMediaElement.cpp:
2254         (WebCore::HTMLMediaElement::setSrc):
2255         * platform/graphics/MediaPlayer.cpp:
2256         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp: Added.
2257         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
2258         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
2259         (WebCore::MediaPlayerPrivate::load):
2260         (WebCore::MediaPlayerPrivate::play):
2261         (WebCore::MediaPlayerPrivate::pause):
2262         (WebCore::MediaPlayerPrivate::duration):
2263         (WebCore::MediaPlayerPrivate::currentTime):
2264         (WebCore::MediaPlayerPrivate::seek):
2265         (WebCore::MediaPlayerPrivate::doSeek):
2266         (WebCore::MediaPlayerPrivate::cancelSeek):
2267         (WebCore::MediaPlayerPrivate::seekTimerFired):
2268         (WebCore::MediaPlayerPrivate::setEndTime):
2269         (WebCore::MediaPlayerPrivate::startEndPointTimerIfNeeded):
2270         (WebCore::MediaPlayerPrivate::endPointTimerFired):
2271         (WebCore::MediaPlayerPrivate::paused):
2272         (WebCore::MediaPlayerPrivate::seeking):
2273         (WebCore::MediaPlayerPrivate::naturalSize):
2274         (WebCore::MediaPlayerPrivate::hasVideo):
2275         (WebCore::MediaPlayerPrivate::setVolume):
2276         (WebCore::MediaPlayerPrivate::setMuted):
2277         (WebCore::MediaPlayerPrivate::setRate):
2278         (WebCore::MediaPlayerPrivate::dataRate):
2279         (WebCore::MediaPlayerPrivate::maxTimeBuffered):
2280         (WebCore::MediaPlayerPrivate::maxTimeSeekable):
2281         (WebCore::MediaPlayerPrivate::maxTimeLoaded):
2282         (WebCore::MediaPlayerPrivate::bytesLoaded):
2283         (WebCore::MediaPlayerPrivate::totalBytesKnown):
2284         (WebCore::MediaPlayerPrivate::totalBytes):
2285         (WebCore::MediaPlayerPrivate::cancelLoad):
2286         (WebCore::MediaPlayerPrivate::updateStates):
2287         (WebCore::MediaPlayerPrivate::didEnd):
2288         (WebCore::MediaPlayerPrivate::setRect):
2289         (WebCore::MediaPlayerPrivate::setVisible):
2290         (WebCore::MediaPlayerPrivate::paint):
2291         (WebCore::MediaPlayerPrivate::getSupportedTypes):
2292         (WebCore::MediaPlayerPrivate::movieEnded):
2293         (WebCore::MediaPlayerPrivate::movieLoadStateChanged):
2294         (WebCore::MediaPlayerPrivate::movieTimeChanged):
2295         (WebCore::MediaPlayerPrivate::movieNewImageAvailable):
2296         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h: Added.
2297         (WebCore::MediaPlayerPrivate::networkState):
2298         (WebCore::MediaPlayerPrivate::readyState):
2299         * platform/graphics/win/QTMovieWin.cpp: Added.
2300         (updateTaskTimer):
2301         (QTMovieWinPrivate::QTMovieWinPrivate):
2302         (QTMovieWinPrivate::~QTMovieWinPrivate):
2303         (taskTimerFired):
2304         (QTMovieWinPrivate::startTask):
2305         (QTMovieWinPrivate::endTask):
2306         (QTMovieWinPrivate::task):
2307         (QTMovieWinPrivate::registerDrawingCallback):
2308         (QTMovieWinPrivate::drawingComplete):
2309         (QTMovieWinPrivate::createGWorld):
2310         (QTMovieWinPrivate::setSize):
2311         (QTMovieWinPrivate::deleteGWorld):
2312         (QTMovieWin::QTMovieWin):
2313         (QTMovieWin::~QTMovieWin):
2314         (QTMovieWin::play):
2315         (QTMovieWin::pause):
2316         (QTMovieWin::rate):
2317         (QTMovieWin::setRate):
2318         (QTMovieWin::duration):
2319         (QTMovieWin::currentTime):
2320         (QTMovieWin::setCurrentTime):
2321         (QTMovieWin::setVolume):
2322         (QTMovieWin::setMuted):
2323         (QTMovieWin::dataSize):
2324         (QTMovieWin::maxTimeLoaded):
2325         (QTMovieWin::loadState):
2326         (QTMovieWin::getNaturalSize):
2327         (QTMovieWin::setSize):
2328         (QTMovieWin::setVisible):
2329         (QTMovieWin::paint):
2330         (QTMovieWin::load):
2331         (movieDrawingCompleteProc):
2332         (initializeSupportedTypes):
2333         (QTMovieWin::countSupportedTypes):
2334         (QTMovieWin::getSupportedType):
2335         (QTMovieWin::initializeQuickTime):
2336         (DllMain):
2337         * platform/graphics/win/QTMovieWin.h: Added.
2338         * platform/graphics/win/QTMovieWinTimer.cpp: Added.
2339         (TimerWindowWndProc):
2340         (initializeOffScreenTimerWindow):
2341         (setSharedTimerFiredFunction):
2342         (timerFired):
2343         (setSharedTimerFireDelay):
2344         (stopSharedTimer):
2345         (setSharedTimerInstanceHandle):
2346         (systemTime):
2347         * platform/graphics/win/QTMovieWinTimer.h: Added.
2348         * rendering/RenderMedia.cpp:
2349         (WebCore::MediaControlPlayButtonElement::update):
2350
2351 2007-12-21  Brent Fulgham  <bfulgham@gmail.com>
2352
2353         Reviewed by Alp Toker.
2354
2355         http://bugs.webkit.org/show_bug.cgi?id=16558
2356         Cairo WebCore Rendering Fails on arc drawing
2357
2358         Fix for bug reported (and patched) by Apollo team in which
2359         arcs were draw in reverse (resulting in inverted images).
2360         Review of the source found that the 'clockwise' term was
2361         actually meant to mean 'anticlockwise' so the IDL and
2362         supporting classes have been changed to match this. 
2363
2364         * html/CanvasRenderingContext2D.cpp:
2365         (WebCore::CanvasRenderingContext2D::arc):
2366         * html/CanvasRenderingContext2D.idl:
2367         * platform/graphics/cairo/PathCairo.cpp:
2368         (WebCore::Path::addArc):
2369         (WebCore::Path::addEllipse):
2370         * platform/graphics/Path.h:
2371
2372 2007-12-21  Alexey Proskuryakov  <ap@webkit.org>
2373
2374         Reviewed by Oliver.
2375
2376         <rdar://problem/5629995> Incorrect display of Danish characters on web site.
2377
2378         Test: http/tests/xmlhttprequest/response-encoding.html
2379
2380         * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::didReceiveData):
2381         Default to UTF-8 for HTML, too. It's unfortunate that we have to use different
2382         rules for main content and XHR responses, but this matches both IE and Firefox.
2383
2384 2007-12-20  Jon Honeycutt  <jhoneycutt@apple.com>
2385
2386         Reviewed by Kevin Decker.
2387
2388         <rdar://problem/5655797> REGRESSION(304-306A10) Safari does not find
2389         shockwave plugin on freshly installed OS
2390
2391         Look for Director plugin in its native directory.
2392
2393         * plugins/win/PluginDatabaseWin.cpp:
2394         (WebCore::PluginDatabaseWin::getPluginsInPaths): The Director plugin
2395         doesn't start with "np," so special case its filename.
2396         (WebCore::addMacromediaPluginPaths): Add Flash and "Shockwave 10"
2397         directories to the plugin paths.
2398         (WebCore::PluginDatabaseWin::defaultPluginPaths):
2399
2400 2007-12-20  Peter Kasting  <zerodpx@gmail.com>
2401
2402         Reviewed by Alp Toker.
2403
2404         http://bugs.webkit.org/show_bug.cgi?id=16508
2405         Fix regression in GIFImageDecoder.cpp: "Haeberli hack" led to wrongly
2406         decoded transparent areas.
2407
2408         * platform/image-decoders/gif/GIFImageDecoder.cpp:
2409         (WebCore::GIFImageDecoder::haveDecodedRow):
2410         * platform/image-decoders/gif/GIFImageDecoder.h:
2411         * platform/image-decoders/gif/GIFImageReader.cpp:
2412         (GIFImageReader::output_row):
2413
2414 2007-12-20  Justin Garcia  <justin.garcia@apple.com>
2415
2416         Reviewed by Oliver Hunt.
2417
2418         <rdar://problem/5543472> GoogleDocs: Safari hangs when creating a list from a particular selection
2419         
2420         Still need to fix similar issues with the other operations that iterate 
2421         over selected paragraphs, like FormatBlock, Indent and Outdent (<rdar://problem/5658933>).
2422
2423         * editing/IndentOutdentCommand.cpp:
2424         (WebCore::IndentOutdentCommand::indentRegion): Added a FIXME.
2425         * editing/IndentOutdentCommand.h: Removed an unused function.
2426         * editing/InsertListCommand.cpp:
2427         (WebCore::InsertListCommand::modifyRange): 
2428         Renamed visibleStart to startOfSelection and visibleEnd to endOfSelection.
2429         Call the new selectionForParagraphIteration, which a) prevents operations like this
2430         one from being performed on a table that isn't fully selected (where the selection
2431         starts just before the table and ends inside it), and b) helps prevent paragraph
2432         iteration from going past the end of the selection.
2433         Call the new startOfNextParagraph, instead of using endOfParagraph(v).next(),
2434         since when v is in the last paragraph of the last cell of a table, that expression 
2435         will return the position after the table, not the start of the next paragraph.
2436         * editing/htmlediting.cpp:
2437         (WebCore::enclosingListChild): Don't go above a table cell, so that list operations
2438         take effect inside the table cell where they are performed.
2439         (WebCore::selectionForParagraphIteration): Added, see above.
2440         (WebCore::indexForVisiblePosition): Moved from IndentOutdentCommand.cpp.
2441         * editing/htmlediting.h:
2442         * editing/visible_units.cpp:
2443         (WebCore::startOfNextParagraph): Added, see above.
2444         * editing/visible_units.h:
2445         * editing/TextIterator.h:
2446         (WebCore::TextIterator::exitNode): Added a FIXME.
2447
2448 2007-12-20  Alp Toker  <alp@atoker.com>
2449
2450         Rubber-stamped by Maciej.
2451
2452         http://bugs.webkit.org/show_bug.cgi?id=16542
2453         [GTK] Text is missing with old Pango version
2454
2455         Back out commits r28880, r28876, r28865, r28864 which added Pango font
2456         selection support. These changes caused a regression where no text was
2457         displayed with older Pango versions.
2458
2459         * platform/graphics/gtk/FontCacheGtk.cpp:
2460         (WebCore::FontCache::fontExists):
2461         * platform/graphics/gtk/FontDataGtk.cpp:
2462         (WebCore::FontData::platformDestroy):
2463         (WebCore::FontData::containsCharacters):
2464         * platform/graphics/gtk/FontPlatformData.h:
2465         (WebCore::FontPlatformData::FontPlatformData):
2466         (WebCore::FontPlatformData::hash):
2467         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
2468         (WebCore::FontPlatformData::FontPlatformData):
2469         (WebCore::FontPlatformData::init):
2470         (WebCore::FontPlatformData::~FontPlatformData):
2471         (WebCore::FontPlatformData::isFixedPitch):
2472         (WebCore::FontPlatformData::operator==):
2473         * platform/graphics/gtk/GlyphPageTreeNodeGtk.cpp:
2474         (WebCore::GlyphPage::fill):
2475
2476 2007-12-20  Timothy Hatcher  <timothy@apple.com>
2477
2478         Reviewed by Sam Weinig.
2479
2480         <rdar://problem/5604897> Double-clicking on JavaScript console error
2481         won't show the line where it occurred
2482
2483         Make the URLs clickable in the console, since double clicking is used for
2484         word text selection. Makes the word "line" localizable. Messages that don't
2485         have a URL will no longer print "undefined". Messages that have a line number
2486         less than or equal to 0 will no longer be printed.
2487
2488         * English.lproj/InspectorLocalizedStrings.js: Add "%s (line %d)".
2489         * page/inspector/ConsolePanel.js: Tweak how the DOM nodes are created
2490           and change the click handler to look for a link with the
2491           "console-message-url" class name.
2492         * page/inspector/SourcePanel.js: Call setupSourceFrameIfNeeded() if a
2493           line row is needed. 
2494         * page/inspector/inspector.css: Update the look of the URL in the console.
2495
2496 2007-12-20  Adam Barth  <hk9565@gmail.com>
2497
2498         Reviewed and landed by Sam Weinig.
2499
2500         http://bugs.webkit.org/show_bug.cgi?id=15313
2501         <rdar://problem/5514516>
2502
2503         The same-origin check was incorrect in two cases (both fixed in this
2504         patch):
2505
2506         A) If both the source and the target have set their document.domain
2507            to the same value, the protocol must also match in order for
2508            access to be allowed.  Without this requirement, the browser is
2509            vulnerable to the following attack:
2510
2511            1) Suppose there is an HTTPS site (www.example.com) that sets
2512               document.domain = "example.com".
2513            2) A network attacker redirects the browser to http://www.example.com/
2514               a) injects script to set document.domain = "example.com", and
2515               b) opens a window to https://www.example.com/
2516            3) Now the network attacker can inject script into the HTTPS page,
2517               stealing cookies and issuing banking transactions.
2518
2519         B) If only one of the source and target has set document.domain, then
2520            access should be denied.  With this behavior, the browser is
2521            vulnerable to the following attack:
2522
2523            1) Suppose http://foo.example.com/ opens an iframe to
2524               http://foo.example.com/frame.html that
2525               a) sets document.domain = "example.com", and
2526               b) opens an iframe to http://bar.example.com/
2527               This is a common usage of document.domain for cross-domain
2528               communication, see for example:
2529                 http://www.collinjackson.com/research/papers/fp801-jackson.pdf
2530            2) The inner-most iframe, which is from bar.example.com, sets
2531               document.domain = "example.com".
2532            3) Now the inner-most iframe can inject script into the middle
2533               iframe (say via document.write).  This bar.example.com script
2534               now has access to the outer-most frame (from foo.example.com).
2535
2536         Both these changes cause WebKit to match the behavior of Firefox 2 and
2537         IE6 in these cases.  This patch includes regression tests for both
2538         issues.
2539
2540         Internet Explorer 7 and Opera 9 are more strict in that they require
2541         the port numbers to match when both pages have document.domain set.
2542         Opera 9 allows access when only one page has set document.domain, but
2543         this is a security vulnerability.
2544
2545         Tests: http/tests/security/cross-frame-access-child-explicit-domain.html
2546                http/tests/security/cross-frame-access-parent-explicit-domain.html
2547
2548         * bindings/js/kjs_window.cpp:
2549         (KJS::createWindow):
2550         (KJS::Window::allowsAccessFrom):
2551         * dom/Document.cpp:
2552         (WebCore::Document::domain):
2553         (WebCore::Document::setDomain):
2554         (WebCore::Document::initSecurityOrigin):
2555         * dom/Document.h:
2556         (WebCore::Document::securityOrigin):
2557         * loader/FrameLoader.cpp:
2558         (WebCore::FrameLoader::begin):
2559         (WebCore::FrameLoader::checkCallImplicitClose):
2560         (WebCore::FrameLoader::shouldAllowNavigation):
2561         * platform/SecurityOrigin.cpp:
2562         (WebCore::SecurityOrigin::setForURL):
2563         (WebCore::SecurityOrigin::createForFrame):
2564         (WebCore::SecurityOrigin::canAccess):
2565         * platform/SecurityOrigin.h:
2566         (WebCore::SecurityOrigin::domain):
2567         * storage/Database.cpp:
2568         (WebCore::Database::openDatabase):
2569         (WebCore::Database::Database):
2570         (WebCore::Database::securityOriginData):
2571         * storage/Database.h:
2572         (WebCore::Database::databaseDebugName):
2573         * storage/DatabaseTracker.cpp:
2574         (WebCore::DatabaseTracker::canEstablishDatabase):
2575         * storage/SQLTransaction.cpp:
2576         (WebCore::SQLTransaction::postflightAndCommit):
2577         (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback):
2578
2579 2007-12-20  Rodney Dawes  <dobey@wayofthemonkey.com>
2580
2581         Reviewed by Darin Adler.
2582
2583         Define XP_UNIX when building with plugins on X11.
2584         Use new npruntime_internal.h instead of npruntime.h.
2585         http://bugs.webkit.org/show_bug.cgi?id=15669
2586
2587         * ForwardingHeaders/bindings/npruntime_internal.h
2588         * WebCore.pro:
2589         * html/HTMLPlugInElement.h:
2590
2591 2007-12-19  johnnyding.webkit  <johnnyding.webkit@gmail.com>
2592
2593         Reviewed by Alexey. Landed by Stephanie.
2594
2595         - fix http://bugs.webkit.org/show_bug.cgi?id=16179 | <rdar://problem/5619399>
2596           Any attribute name start with a unicode which like #xx00(x could be any hex number[0-9a-f]) will cause HTMLTokenizer parse error
2597           Actually any unicode characters which great than 255 in attribute name will cause Webkit parse the attribute name wrong. So after comparing 
2598           the same scenario in IE 6/7, FireFox 2/3, Opera, we should treat those characters as part of attribute name.
2599
2600
2601         * html/HTMLTokenizer.cpp:
2602         (WebCore::HTMLTokenizer::parseEntity): Handle Unicode Entity Name by using ASCII version of findEntity.
2603         (WebCore::HTMLTokenizer::parseTag): Let type of ptr match type of cBuffer.
2604         * html/HTMLTokenizer.h: Change type of cBuffer from char to UChar.
2605
2606 2007-12-20  Eric Seidel  <eric@webkit.org>
2607
2608         Reviewed by Nikolas Zimmermann.
2609
2610         WebKit claims to support SVG feature strings it shouldn't
2611         http://bugs.webkit.org/show_bug.cgi?id=15480
2612
2613         * dom/DOMImplementation.cpp:
2614         (WebCore::isSVG10Feature):
2615         (WebCore::isSVG11Feature):
2616
2617 2007-12-20  John Sullivan  <sullivan@apple.com>
2618
2619         Reviewed by Oliver and Geoff
2620         
2621         - fix <rdar://problem/5536858> Yellow highlight for find results is sometimes shorter 
2622           than white "hole" behind it
2623
2624         * rendering/RenderText.cpp:
2625         (WebCore::RenderText::addLineBoxRects):
2626         respect useSelectionHeight in all cases; we were only respecting it in one of the two cases
2627
2628 2007-12-20  Dan Bernstein  <mitz@apple.com>
2629
2630         Reviewed by Darin Adler.
2631
2632         - fix <rdar://problem/5656368> REGRESSION(3.0.4-ToT): Acid2 test fails to render anything
2633
2634         * platform/win/ScrollViewWin.cpp:
2635         (WebCore::ScrollView::maximumScroll): Changed back to return the maximum
2636         scroll offsets even if scrolling is not allowed, because navigation and
2637         scrollTo should still work.
2638         (WebCore::ScrollView::wheelEvent): Added early return if scrolling is
2639         not allowed.
2640
2641 2007-12-17  Tony Chang  <idealisms@gmail.com>
2642
2643         Reviewed by Darin.
2644
2645         - Fix for http://bugs.webkit.org/show_bug.cgi?id=16479
2646           text selection does not always begin at mouse down point
2647           Reset the m_dragSrc object on mouse down on all platforms.
2648
2649         Test: fast/text/reset-drag-on-mouse-down.html
2650
2651         * page/EventHandler.cpp:
2652         (WebCore::EventHandler::handleMousePressEvent):
2653         * page/mac/EventHandlerMac.mm:
2654         (WebCore::EventHandler::mouseDown):
2655
2656 2007-12-19  Geoffrey Garen  <ggaren@apple.com>
2657
2658         Reviewed by Oliver Hunt.
2659
2660         Build support:
2661         * ForwardingHeaders/kjs/SymbolTable.h: Added.
2662         * ForwardingHeaders/wtf/VectorTraits.h: Added.
2663
2664         * bindings/js/JSDOMWindowCustom.cpp:
2665         (WebCore::JSDOMWindow::customGetOwnPropertySlot): Replaced use of
2666         getDirectLocation with getOwnPropertySlot. getDirectLocation is no
2667         longer valid, since global declarations are not stored in the property
2668         map.
2669
2670         (WebCore::JSDOMWindow::customPut): Replaced use of JSObject::put with
2671         JSGlobalObject::put. JSObject::put is no longer valid, since global
2672         declarations are not stored in the property map.
2673
2674         * bindings/js/kjs_window.cpp: Replaced JSObject:: calls with Base::
2675         calls, since JSObject is not our base class. This was always a bug, but
2676         the bug is even more apparent after some of my changes.
2677
2678         (KJS::Window::clear): Removed call to clearProperties because
2679         JSGlobalObject::reset takes care of that now.
2680
2681         * history/CachedPage.cpp:
2682         * history/CachedPage.h: Added support for saving a symbol table and
2683         localStorage to the page cache, and restoring it.
2684
2685 2007-12-19  Dan Bernstein  <mitz@apple.com>
2686
2687         Reviewed by Darin Adler and Dave Hyatt.
2688
2689         - Substitute the user's preferred standard font for an unknown primary
2690           font before falling back on the platform's last resort font
2691
2692         Cannot be tested in DumpRenderTree because it sets the standard font to
2693         Times, which is also the hard-coded last resort font on Mac.
2694
2695         * css/CSSFontSelector.cpp:
2696         (WebCore::CSSFontSelector::getFontData): Changed the early bail out
2697         condition to allow getting generic font families from settings even if
2698         there are not @font-face rules. Fixed a typo that mapped fantasy to
2699         cursive. Added a mapping from -webkit-standard to the standard family.
2700         * css/CSSStyleSelector.cpp:
2701         (WebCore::CSSStyleSelector::CSSStyleSelector): Changed to always create
2702         a font selector.
2703         (WebCore::CSSRuleSet::addRulesFromSheet):
2704         (WebCore::CSSStyleSelector::applyProperty): Changed to always use the
2705         font selector.
2706         * css/CSSStyleSelector.h:
2707         (WebCore::CSSStyleSelector::fontSelector):
2708         * platform/graphics/FontCache.cpp:
2709         (WebCore::FontCache::getFontData): Try the user's preferred standard
2710         font before the platform's last resort font.
2711
2712 2007-12-19  Sven Herzberg  <sven@imendio.com>
2713
2714         Reviewed by Alp Toker.
2715
2716         Scaled font destruction takes place in FontData::platformDestroy(). No
2717         need to do it in FontPlatformData::~FontPlatformData().
2718
2719         Destroying platform data in platformDestroy() is a convention we
2720         borrow from the Mac and Win ports.
2721
2722         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
2723
2724 2007-12-19  Alice Liu  <alice.liu@apple.com>
2725
2726         build fix (Windows)
2727
2728         Changed uint to unsigned int.  uint caused Windows build breakage
2729
2730         * page/Page.cpp:
2731         (WebCore::Page::markAllMatchesForText):
2732         * page/Page.h:
2733
2734 2007-12-19  Christian Dywan  <christian@twotoasts.de> 
2735
2736         Reviewed by Alp Toker.
2737
2738         http://bugs.webkit.org/show_bug.cgi?id=16222
2739         [GTK] Implement inline search and highlighting of matching strings.
2740
2741         Implement search and highlighting logic directly in WebCore.
2742
2743         * page/Page.cpp:
2744         (WebCore::incrementFrame):
2745         (WebCore::Page::findString):
2746         (WebCore::Page::markAllMatchesForText):
2747         (WebCore::Page::unmarkAllTextMatches):
2748         * page/Page.h:
2749
2750 2007-12-19  Geoffrey Garen  <ggaren@apple.com>
2751
2752         Reviewed by Sam Weinig, Dan Bernstein.
2753
2754         Tiger build fix: restored some graphics code still needed on Tiger.
2755
2756         * platform/graphics/GraphicsTypes.h:
2757         * platform/graphics/cg/GraphicsContextCG.cpp:
2758         * platform/graphics/mac/GraphicsContextMac.mm:
2759         (WebCore::GraphicsContext::setCompositeOperation):
2760
2761 2007-12-19  Alp Toker  <alp@atoker.com>
2762
2763         Build fix for Pango < 1.18.0 breakage introduced in r28864. Use Fc and
2764         the Pango backend API in these cases.
2765
2766         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
2767         (WebCore::FontPlatformData::FontPlatformData):
2768         (WebCore::FontPlatformData::~FontPlatformData):
2769
2770 2007-12-19  Alice Liu  <alice.liu@apple.com>
2771
2772         Reviewed by Darin.
2773
2774         Fixed <rdar://problem/5592485> Safari crashed trying to get a motorcycle insurance quote
2775         on Geico.com WebCore::Document::inPageCache()
2776
2777         Calling Node::willRemove on the focusedNode would immediately tell the document to remove
2778         the focused node, and trigger JS events.  This means that the document is mutated while
2779         the engine is trying to tell all child nodes that it's about to removed.  To avoid
2780         crashing, we need to hold off on mutating the document until node traversal is finished.
2781
2782         * dom/ContainerNode.cpp:
2783         (WebCore::ContainerNode::removeChild):
2784         (WebCore::ContainerNode::removeChildren):
2785         * dom/Node.cpp:
2786         * dom/Node.h:
2787         (WebCore::Node::willRemove):
2788         * loader/FrameLoader.cpp:
2789         (WebCore::FrameLoader::clear):
2790
2791 2007-12-19  Andre Boule  <aboule@apple.com>
2792
2793         Reviewed by Dan Bernstein.
2794
2795         Test: fast/canvas/canvas-composite.html
2796
2797         Fix for:
2798         <rdar://problem/5640059> GraphicsContext::setCompositeOperation should use CGContextSetBlendMode
2799
2800         This fix makes setCompositeOperation consistent across all platforms that use CG.
2801
2802         The following compositing modes don't pass however that is covered by another bug:
2803         source-in
2804         source-out
2805         destination-in
2806         destination-atop
2807         copy
2808         <rdar://problem/5651783> Some canvas tag compositing modes don't render correctly
2809
2810         * platform/graphics/GraphicsTypes.h:
2811         * platform/graphics/cg/GraphicsContextCG.cpp:
2812         (WebCore::GraphicsContext::setCompositeOperation):
2813         * platform/graphics/mac/GraphicsContextMac.mm:
2814         * platform/win/GraphicsContextWin.cpp:
2815
2816 2007-12-19  Dan Bernstein  <mitz@apple.com>
2817
2818         Reviewed by Dave Hyatt.
2819
2820         - fix <rdar://problem/5650045> REGRESSION: major layout problems in svn r28754 WebKit on Vox.com page
2821
2822         Test: fast/dynamic/subtree-boundary-percent-height.html
2823
2824         * rendering/RenderObject.cpp:
2825         (WebCore::objectIsRelayoutBoundary): Do not allow overflows with
2826         percent heights because sometimes they compute to 'auto'.
2827
2828 2007-12-19  Sam Weinig  <sam@webkit.org>
2829
2830         Reviewed by Maciej.
2831
2832         http://bugs.webkit.org/show_bug.cgi?id=16511
2833         Speed up ClassNodeList and NamedNodeList by using the caching mechanism employed by ChildNodeList.
2834         - This give a ~2.15x speedup on the native test @ http://ejohn.org/apps/classname/
2835
2836         * dom/ChildNodeList.cpp: Use the caching NodeList constructor to turn on caching.
2837         (WebCore::ChildNodeList::ChildNodeList):
2838         * dom/ClassNodeList.cpp:
2839         (WebCore::ClassNodeList::ClassNodeList):
2840         * dom/ClassNodeList.h:
2841
2842         Move getElementsByName and getElementsByClassName to Node so they
2843         can use easily employ the caching already used by ChildNodeLists.  In the case of 
2844         getElementsByClassName, this reduces code duplication in Element as well
2845         * dom/Document.cpp:
2846         * dom/Document.h:
2847
2848         Move getElementsByClassName to Node.
2849         * dom/Element.cpp:
2850         * dom/Element.h:
2851
2852         * dom/NameNodeList.cpp: Use the caching NodeList constructor to turn on caching.
2853         (WebCore::NameNodeList::NameNodeList):
2854         (WebCore::NameNodeList::item):
2855         * dom/NameNodeList.h:
2856
2857         Add maps of caches for ClassNodeLists and NameNodeList to NodeListsNodeData.
2858         * dom/Node.cpp:
2859         (WebCore::TagNodeList::TagNodeList):
2860         (WebCore::Node::Node):
2861         (WebCore::Node::~Node):
2862         (WebCore::Node::childNodes):
2863         (WebCore::Node::registerNodeList):
2864         (WebCore::Node::getElementsByName):
2865         (WebCore::Node::getElementsByClassName):
2866         * dom/Node.h: Make m_nodeLists an OwnPtr.  Moved getElementsByName and getElementsByClassName here
2867
2868         Allow subclasses to choose whether they want to receive the notifications using a new bit.
2869         * dom/NodeList.cpp:
2870         (WebCore::NodeList::NodeList):
2871         * dom/NodeList.h:
2872         (WebCore::NodeList::needsNotifications):
2873
2874 2007-12-19  Dave Hyatt  <hyatt@apple.com>
2875
2876         Add support for GDI text rendering to WebKit.
2877       
2878         Reviewed by mitz
2879         
2880         * css/CSSStyleSelector.cpp:
2881         (WebCore::CSSStyleSelector::applyProperty):
2882         * dom/Document.cpp:
2883         (WebCore::Document::recalcStyle):
2884         * page/Settings.cpp:
2885         (WebCore::Settings::setFontRenderingMode):
2886         (WebCore::Settings::fontRenderingMode):
2887         * page/Settings.h:
2888         * platform/graphics/Font.h:
2889         (WebCore::Font::renderingMode):
2890         * platform/graphics/FontCache.cpp:
2891         (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
2892         (WebCore::FontPlatformDataCacheKey::operator==):
2893         (WebCore::computeHash):
2894         (WebCore::FontCache::getCachedFontPlatformData):
2895         * platform/graphics/FontDescription.h:
2896         (WebCore::):
2897         (WebCore::FontDescription::FontDescription):
2898         (WebCore::FontDescription::renderingMode):
2899         (WebCore::FontDescription::setRenderingMode):
2900         (WebCore::FontDescription::operator==):
2901         * platform/graphics/GraphicsContext.h:
2902         * platform/graphics/win/FontCacheWin.cpp:
2903         (WebCore::FontCache::fontExists):
2904         (WebCore::FontCache::createFontPlatformData):
2905         * platform/graphics/win/FontDataWin.cpp:
2906         (WebCore::FontData::platformInit):
2907         (WebCore::FontData::smallCapsFontData):
2908         (WebCore::FontData::containsCharacters):
2909         (WebCore::FontData::determinePitch):
2910         (WebCore::FontData::platformWidthForGlyph):
2911         * platform/graphics/win/FontPlatformData.h:
2912         (WebCore::FontPlatformData::FontPlatformData):
2913         (WebCore::FontPlatformData::useGDI):
2914         (WebCore::FontPlatformData::operator==):
2915         * platform/graphics/win/FontPlatformDataWin.cpp:
2916         (WebCore::FontPlatformData::FontPlatformData):
2917         * platform/graphics/win/FontWin.cpp:
2918         (WebCore::Font::drawGlyphs):
2919         * platform/graphics/win/IconWin.cpp:
2920         (WebCore::Icon::paint):
2921         * platform/win/GraphicsContextWin.cpp:
2922         (WebCore::GraphicsContext::getWindowsContext):
2923         (WebCore::GraphicsContext::releaseWindowsContext):
2924         * platform/win/UniscribeController.cpp:
2925         (WebCore::UniscribeController::shapeAndPlaceItem):
2926         * platform/win/UniscribeController.h:
2927         * plugins/win/PluginViewWin.cpp:
2928         (WebCore::PluginViewWin::paint):
2929
2930 2007-12-19  Sven Herzberg  <sven@imendio.com>
2931
2932         Reviewed by Alp Toker.
2933
2934         Replace the fontconfig/freetype based font management with a pango
2935         based one. Fixes:
2936         http://bugs.webkit.org/show_bug.cgi?id=15229
2937
2938         * platform/gtk/FontDataGtk.cpp (FontData::platformDestroy()): updated
2939         the platform specific destroy code
2940         (FontData::containsCharacters()): implemented font coverage with pango
2941         * platform/gtk/FontPlatformData.h: replaced fontconfig specific
2942         members with pango-specific ones
2943         * platform/gtk/FontPlatformDataGtk.cpp: added static members for the
2944         FontPlatformData class
2945         (FontPlatformData::FontPlatformData()): implemented the font-matching
2946         with a PangoFontDescription instead of an FcPattern; initialize the
2947         scaled font by using the API for PangoCairoFont
2948         (FontPlatformData::init()): initialize the PangoFontMap and set up a
2949         hash table to translate the font family name into a font family
2950         (FontPlatformData::isFixedPitch()): implemented by querying the
2951         PangoFontFamily
2952         (FontPlatformData::operator==): compare the FontPlatformData by
2953         comparing the font pointers or the described fonts
2954         * platform/gtk/GlyphPageTreeNodeGtk.cpp (pango_font_get_glyph()):
2955         added a function to query a glyph from a PangoFont
2956         (GlyphPage::fill()): implemented the fill function with Pango instead
2957         of fontconfig/freetype
2958
2959 2007-12-19  Alp Toker  <alp@atoker.com>
2960
2961         Reviewed by Holger Freyther.
2962
2963         Improve graphics operator approximations
2964         
2965         These changes match Cairo's own CG approximations.
2966
2967         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2968         (WebCore::toCairoOperator):
2969
2970 2007-12-19  Alp Toker  <alp@atoker.com>
2971
2972         Reviewed by Holger Freyther.
2973
2974         Check the bounding box before doing a full hit test
2975
2976         * platform/graphics/cairo/PathCairo.cpp:
2977         (WebCore::Path::contains):
2978
2979 2007-12-18  Sam Weinig  <sam@webkit.org>
2980
2981         Reviewed by Geoff.
2982
2983         Fix for <rdar://problem/5646478>
2984         REGRESSION: fast/events/event-view-toString fails on Leopard
2985
2986         This fixes an issue where we were incorrectly setting the lastInPrototypeChain
2987         for the JSDOMWindow (the global object) before a call to setPrototype overwrote
2988         it. This fixes it by passing the prototype up the constructor chain so that it
2989         is set before any calls can be made.
2990
2991         * bindings/js/kjs_window.cpp:
2992         (KJS::Window::Window):
2993         * bindings/js/kjs_window.h:
2994         * bindings/scripts/CodeGeneratorJS.pm:
2995
2996 2007-12-18  Beth Dakin  <bdakin@apple.com>
2997
2998         Reviewed by Oliver.
2999
3000         Fix for <rdar://problem/5616982> SVGs with width and height 100% 
3001         fail to render when used as <img> or CSS image (16167)
3002
3003         This final part of the work fixes the <img> tag.
3004
3005         This is the real fix. 
3006         * rendering/RenderImage.cpp:
3007         (WebCore::RenderImage::calcReplacedWidth): Set the container size 
3008         on the image. Setting the container size only actually sticks if 
3009         the values are non-zero, so if the container size really was set, 
3010         use the imageSize that is calculated using the container size. If 
3011         it did not stick but the image does have relative width (meaning 
3012         that the container size is 0), set the width to 0 by hand. We want 
3013         to avoid setting the width before we have a container size or we 
3014         will end up incorrectly using the default size of 300x150.
3015         (WebCore::RenderImage::calcReplacedHeight): Same as above, but for 
3016         height.
3017
3018         A few more pieces of information have to be exposed through cached 
3019         image to make this happen.
3020         * loader/CachedImage.cpp:
3021         (WebCore::CachedImage::usesImageContainerSize): As mentioned above, 
3022         when setContainerSize() is called, the container size is only 
3023         actually set if the values are non-zero. This call tells you if it 
3024         was set.
3025         (WebCore::CachedImage::imageHasRelativeWidth):
3026         (WebCore::CachedImage::imageHasRelativeHeight):
3027         * loader/CachedImage.h:
3028         * platform/graphics/Image.h:
3029         (WebCore::Image::usesContainerSize):
3030         * svg/graphics/SVGImage.cpp:
3031         (WebCore::SVGImage::usesContainerSize):
3032         * svg/graphics/SVGImage.h:
3033
3034 2007-12-18  Mark Rowe  <mrowe@apple.com>
3035
3036         Rubber-stamped by Maciej Stachowiak.
3037
3038         Remove outdated and non-functioning project files for the Apollo port.
3039
3040         * WebCore.apolloproj: Removed.
3041
3042 2007-12-18  Steve Falkenburg  <sfalken@apple.com>
3043
3044         <rdar://problem/5649911> REGRESSION (304-306A9): Typing 'p' in popup menu for type-to-select brings up Safari Help
3045         
3046         Need to translate the char back into a key code for posting our WM_KEYDOWN.
3047         
3048         Reviewed by Ada.
3049
3050         * platform/win/PopupMenuWin.cpp:
3051         (WebCore::PopupWndProc):
3052
3053 2007-12-18  Steve Falkenburg  <sfalken@apple.com>
3054
3055         <rdar://problem/5651534> REGRESSION(r28764-r28765): GDI leak drawing text when no appropriate font is available
3056         
3057         Our captured metafile from Uniscribe may contain multiple calls to CreateFontIndirect.
3058         Only create a font with the last one.
3059         
3060         Reviewed by Mitz, Darin.
3061
3062         * platform/graphics/win/FontCacheWin.cpp:
3063         (WebCore::metaFileEnumProc):
3064         (WebCore::FontCache::getFontDataForCharacters):
3065
3066 2007-12-17  Brent Fulgham  <bfulgham@gmail.com>
3067
3068         Reviewed by Darin.
3069
3070         http://bugs.webkit.org/show_bug.cgi?id=16464
3071         Modify WebCore to use win32 thread primitives
3072
3073         Updates to support native windows threading primitives
3074         rather than pthreads emulation library.
3075
3076         * WebCore.vcproj/WebCore.vcproj:
3077         * config.h:
3078         * platform/Threading.h:
3079         * platform/win/MutexWin.cpp: Added.
3080         (WebCore::Mutex::Mutex):
3081         (WebCore::Mutex::~Mutex):
3082         (WebCore::Mutex::lock):
3083         (WebCore::Mutex::tryLock):
3084         (WebCore::Mutex::unlock):
3085         * platform/win/ThreadConditionWin.cpp: Added.
3086         (WebCore::ThreadCondition::ThreadCondition):
3087         (WebCore::ThreadCondition::~ThreadCondition):
3088         (WebCore::ThreadCondition::wait):
3089         (WebCore::ThreadCondition::signal):
3090         (WebCore::ThreadCondition::broadcast):
3091         * platform/win/ThreadingWin.cpp:
3092         (WebCore::threadMapMutex):
3093         (WebCore::threadMap):
3094         (WebCore::storeThreadHandleByIdentifier):
3095         (WebCore::identifierByThreadHandle):
3096         (WebCore::threadHandleForIdentifier):
3097         (WebCore::clearThreadHandleForIdentifier):
3098         (WebCore::createThread):
3099         (WebCore::waitForThreadCompletion):
3100         (WebCore::detachThread):
3101         (WebCore::currentThread):
3102
3103 2007-12-18  Rodney Dawes  <dobey@wayofthemonkey.com>
3104
3105         Reviewed by Darin Adler.
3106
3107         Handle EINTR when set by select() and try the select() again
3108         http://bugs.webkit.org/show_bug.cgi?id=16071
3109
3110         * platform/network/curl/ResourceHandleManager.cpp:
3111         (ResourceHandleManager::downloadTimerCallback):
3112
3113 2007-12-18  Dan Bernstein  <mitz@apple.com>
3114
3115         Reviewed by Dave Hyatt.
3116
3117         - avoid the simplified Chinese font linking code for characters that are
3118           not in any Windows code page
3119
3120         * platform/graphics/win/FontCacheWin.cpp:
3121         (WebCore::FontCache::getFontDataForCharacters):
3122
3123 2007-12-18  Brady Eidson <beidson@apple.com>
3124
3125         Reviewed by Adele
3126
3127         <rdar://problem/5525770> REGRESSION: HTTP Auth protected favicon request results in a password sheet
3128
3129         Some http-auth protected sites have the main resource(s) unprotected, but many subresources are
3130         protected by authentication.  Occasionally one can view the main page of a site but the favicon
3131         is behind the iron curtain - in these cases, we should *not* prompt for a username and password
3132         solely for the favicon.
3133
3134         * loader/ResourceLoader.h: Make didReceiveAuthenticationChallenge virtual
3135
3136         * loader/SubresourceLoader.cpp:
3137         (WebCore::SubresourceLoader::didReceiveAuthenticationChallenge): Now that this method
3138           is virtual from ResourceLoader, SubresourceLoader can override.  First call to the 
3139           SubresourceLoaderClient.  If they cancel the resource load, return early. Otherwise, let
3140           ResourceLoader work its magic (resulting in the auth sheet coming down)
3141         * loader/SubresourceLoader.h:
3142
3143         * loader/SubresourceLoaderClient.h:
3144         (WebCore::SubresourceLoaderClient::didReceiveAuthenticationChallenge):
3145
3146         * loader/icon/IconLoader.cpp:
3147         (WebCore::IconLoader::didReceiveAuthenticationChallenge): Cancel the resource load, since we should
3148           never prompt the user for credentials just for a favicon.
3149         * loader/icon/IconLoader.h:
3150
3151 2007-12-18  John Sullivan  <sullivan@apple.com>
3152
3153         Reviewed by Brady
3154         
3155         - fixed <rdar://problem/5652380> Initial prompt shows "" for databases with no user-visible name
3156
3157         * storage/DatabaseTracker.cpp:
3158         (WebCore::DatabaseTracker::canEstablishDatabase):
3159         pass "name" instead of "displayName" if there's no displayName
3160
3161 2007-12-17  Dan Bernstein  <mitz@apple.com>
3162
3163         Reviewed by Maciej Stachowiak.
3164
3165         - restore ButtonFace and ThreeDFace to their previous values for non-Mac
3166           platforms. The Mac port also uses the same values for now instead
3167           of NSColor-based ones.
3168
3169         * rendering/RenderTheme.cpp:
3170         (WebCore::RenderTheme::systemColor):
3171
3172 2007-12-17  Rodney Dawes  <dobey@wayofthemonkey.com>
3173
3174         Reviewed by Maciej Stachowiak.
3175
3176         Define WTF_USE_NPOBJECT and WTF_USE_JAVASCRIPTCORE_BINDINGS for GTK+
3177         Add required Frame::createScriptInstanceForWidget to FrameGtk
3178
3179         * config.h:
3180         * page/gtk/FrameGtk.cpp (Frame::createScriptInstanceForWidget):
3181
3182 2007-12-17  Alice Liu  <alice.liu@apple.com>
3183
3184         Reviewed by Adam.
3185
3186         Fixed <rdar://5566435> window with no scrollbars can be scrolled
3187
3188         * platform/win/ScrollViewWin.cpp:
3189         (WebCore::ScrollView::maximumScroll):
3190         corrected maximumScroll() to account for scrolling not allowed.
3191         (WebCore::ScrollView::wheelEvent):
3192
3193 2007-12-14  Juan A. Suarez Romero  <jasuarez@igalia.com>
3194
3195         Reviewed by Alp Toker.
3196
3197         http://bugs.webkit.org/show_bug.cgi?id=16042
3198         [GTK] Eliminate webkit_init()
3199
3200         Move webkit initialization to WebView class init.
3201
3202         * WebCore.pro:
3203
3204 2007-12-17  Jon Honeycutt  <jhoneycutt@apple.com>
3205
3206         Reviewed by Darin.
3207
3208         <rdar://problem/5651291> REGRESSION: Flash content doesn't display
3209         (www.adobe.com)
3210
3211         We were passing NPEvent** instead of NPEvent* to NPP_HandleEvent.
3212
3213         * plugins/win/PluginViewWin.cpp:
3214         (WebCore::PluginViewWin::dispatchNPEvent): Changed to take NPEvent&, not
3215         NPEvent*
3216         (WebCore::PluginViewWin::paint): Pass NPEvent, not NPEvent*
3217         (WebCore::PluginViewWin::handleKeyboardEvent): same
3218         (WebCore::PluginViewWin::handleMouseEvent): same
3219         * plugins/win/PluginViewWin.h:
3220
3221 2007-12-17  Alexey Proskuryakov  <ap@webkit.org>
3222
3223         Reviewed by Darin.
3224
3225         Live to the promise of never making AppKit special character codes visible via DOM.
3226
3227         Test: fast/events/arrow-keys-on-body.html
3228
3229         * page/EventHandler.cpp:
3230         (WebCore::EventHandler::keyEvent): Check for empty keypress characters after disambiguation,
3231         to let quirks-aware code strip special charactrers.
3232         * platform/mac/KeyEventMac.mm:
3233         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent): If not in keyboard event quirks
3234         mode, remove the text if it's a special character.
3235
3236 2007-12-17  Mark Rowe  <mrowe@apple.com>
3237
3238         Reviewed by Darin Adler.
3239
3240         Fix incorrect array size and incorrect array index in convertNSColorToColor.
3241
3242         * rendering/RenderThemeMac.mm:
3243         (WebCore::convertNSColorToColor):
3244
3245 2007-12-17  Darin Adler  <darin@apple.com>
3246
3247         Reviewed by Mark Rowe.
3248
3249         - fix http://bugs.webkit.org/show_bug.cgi?id=16468
3250           REGRESSION(r28781): Crash running storage/transaction_callback_exception_crash.html
3251
3252         * storage/DatabaseThread.cpp:
3253         (WebCore::DatabaseThread::dispatchNextTaskIdentifier): Use a RefPtr for the database
3254         because there's no guarantee it won't lose its last reference otherwise.
3255
3256 2007-12-17  Dan Bernstein  <mitz@apple.com>
3257
3258         Reviewed by Maciej Stachowiak.
3259
3260         - fix <rdar://problem/5333260> Some Chinese characters in Text Encoding menu are bold, others are not
3261           and <rdar://problem/5280188> Chinese text looks worse on Safari for Windows cf. Safari for Mac
3262
3263         * platform/graphics/win/FontCacheWin.cpp:
3264         (WebCore::FontCache::getFontDataForCharacters): To ensure that font
3265         linking gives consistent results for characters that are exclusive to
3266         the simplified Chinese code page and characters that belong to that
3267         code page and other code pages, always ask to map to simplified Chinese
3268         alone first.
3269
3270 2007-12-17  Christian Dywan  <christian@twotoasts.de>
3271
3272         Reviewed by Alp Toker.
3273
3274         http://bugs.webkit.org/show_bug.cgi?id=16378
3275         Implement Icon for Gtk
3276
3277         Icon provides a GdkPixbuf containing a themed icon.
3278         The icon theme is probed for an icon name according to the
3279         Icon Naming Specification or conventional Gnome icon names respectively.
3280
3281         See http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
3282
3283         * platform/graphics/Icon.h:
3284         * platform/graphics/gtk/IconGtk.cpp:
3285         (WebCore::Icon::~Icon):
3286         (WebCore::lookupIconName):
3287         (WebCore::Icon::newIconForFile):
3288         (WebCore::Icon::paint):
3289
3290 2007-12-16  Sam Weinig  <sam@webkit.org>
3291
3292         Reviewed by Mitz.
3293
3294         Fix for http://bugs.webkit.org/show_bug.cgi?id=16466
3295         Move the JS Location object to its own file
3296
3297         - Move Location into its own file and rename it JSLocation.
3298
3299         * DerivedSources.make:
3300         * WebCore.pro:
3301         * WebCore.vcproj/WebCore.vcproj:
3302         * WebCore.xcodeproj/project.pbxproj:
3303         * WebCoreSources.bkl:
3304         * bindings/js/JSDocumentCustom.cpp:
3305         * bindings/js/JSLocation.cpp: Copied from WebCore/bindings/js/kjs_window.cpp.
3306         (WebCore::):
3307         (WebCore::JSLocation::JSLocation):
3308         (WebCore::JSLocation::getValueProperty):
3309         (WebCore::JSLocation::getOwnPropertySlot):
3310         (WebCore::JSLocation::put):
3311         (WebCore::JSLocationProtoFuncReplace::callAsFunction):
3312         (WebCore::JSLocationProtoFuncReload::callAsFunction):
3313         (WebCore::JSLocationProtoFuncAssign::callAsFunction):
3314         (WebCore::JSLocationProtoFuncToString::callAsFunction):
3315         * bindings/js/JSLocation.h: Copied from WebCore/bindings/js/kjs_window.h.
3316         (WebCore::JSLocation::):
3317         (WebCore::JSLocation::frame):
3318         (WebCore::JSLocation::classInfo):
3319         * bindings/js/kjs_window.cpp:
3320         (KJS::Window::location):
3321         * bindings/js/kjs_window.h:
3322         * history/CachedPage.cpp:
3323
3324 2007-12-16  Dan Bernstein  <mitz@apple.com>
3325
3326         Reviewed by Sam Weinig.
3327
3328         - make 'cursor: copy' and 'cursor: none' work.
3329
3330         Already covered by manual-tests/cursor.html
3331
3332         * rendering/RenderStyle.h: Increase the _cursor_style field to 6 bits,
3333         needed for the 33rd and 34th cursor values.
3334
3335 2007-12-16  Mark Rowe  <mrowe@apple.com>
3336
3337         Reviewed by Maciej Stachowiak.
3338
3339         Refactor Mac plugin stream code to use the shared NetscapePlugInStreamLoader implementation.
3340
3341         * WebCore.base.exp:
3342         * WebCore.xcodeproj/project.pbxproj:
3343         * loader/NetscapePlugInStreamLoader.h:
3344         * loader/mac/NetscapePlugInStreamLoaderMac.mm: Removed.
3345         * loader/mac/WebPlugInStreamLoaderDelegate.h: Moved to WebKit.
3346
3347 2007-12-16  Sam Weinig  <sam@webkit.org>
3348
3349         Reviewed by Maciej.
3350
3351         Yet more of http://bugs.webkit.org/show_bug.cgi?id=16385
3352         Cleanup kjs_window
3353
3354         - Move ScheduledAction into its own file and put it in the WebCore namespace.
3355
3356         * WebCore.pro:
3357         * WebCore.vcproj/WebCore.vcproj:
3358         * WebCore.xcodeproj/project.pbxproj:
3359         * WebCoreSources.bkl:
3360         * bindings/js/PausedTimeouts.cpp:
3361         * bindings/js/PausedTimeouts.h:
3362         * bindings/js/ScheduledAction.cpp: Copied from bindings/js/kjs_window.cpp.
3363         (WebCore::ScheduledAction::ScheduledAction):
3364         (WebCore::ScheduledAction::execute):
3365         * bindings/js/ScheduledAction.h: Copied from bindings/js/kjs_window.h.
3366         (WebCore::ScheduledAction::ScheduledAction):
3367         * bindings/js/kjs_window.cpp:
3368         (KJS::DOMWindowTimer::DOMWindowTimer):
3369         (KJS::DOMWindowTimer::action):
3370         (KJS::DOMWindowTimer::takeAction):
3371         (KJS::Window::installTimeout):
3372         (KJS::Window::timerFired):
3373         * bindings/js/kjs_window.h:
3374
3375 2007-12-16  Alp Toker  <alp@atoker.com>
3376
3377         Reviewed by Maciej.
3378
3379         http://bugs.webkit.org/show_bug.cgi?id=16356
3380         [GTK] Integrate GStreamer video with the graphics backend
3381
3382         Integrate the GStreamer media backend with the Cairo graphics backend.
3383         There are still some issues: Data is copied more often than necessary,
3384         and repaint() is not called, causing transformed video not to update
3385         sometimes.
3386
3387         * WebCore.pro:
3388         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
3389         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
3390         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
3391         (WebCore::MediaPlayerPrivate::currentTime):
3392         (WebCore::MediaPlayerPrivate::setEndTime):
3393         (WebCore::MediaPlayerPrivate::seeking):
3394         (WebCore::MediaPlayerPrivate::naturalSize):
3395         (WebCore::MediaPlayerPrivate::setMuted):
3396         (WebCore::MediaPlayerPrivate::setRect):
3397         (WebCore::MediaPlayerPrivate::setVisible):
3398         (WebCore::MediaPlayerPrivate::repaint):
3399         (WebCore::MediaPlayerPrivate::paint):
3400         (WebCore::MediaPlayerPrivate::createGSTPlayBin):
3401         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
3402         * platform/graphics/gtk/VideoSinkGStreamer.cpp: Added.
3403         (webkit_video_sink_base_init):
3404         (webkit_video_sink_init):
3405         (webkit_video_sink_idle_func):
3406         (webkit_video_sink_render):
3407         (webkit_video_sink_set_caps):
3408         (webkit_video_sink_dispose):
3409         (webkit_video_sink_finalize):
3410         (webkit_video_sink_set_property):
3411         (webkit_video_sink_get_property):
3412         (webkit_video_sink_stop):
3413         (webkit_video_sink_class_init):
3414         (webkit_video_sink_new):
3415         (webkit_video_sink_set_surface):
3416         (plugin_init):
3417         * platform/graphics/gtk/VideoSinkGStreamer.h: Added.
3418
3419 2007-12-16  Mark Rowe  <mrowe@apple.com>
3420
3421         Mac build fix.
3422
3423         * WebCore.xcodeproj/project.pbxproj: Remove NetscapePlugInStreamLoader.cpp from the WebCore target.
3424         Mac currently has its own implementation in NetscapePlugInStreamLoaderMac.mm which conflicts with the
3425         new shared implementation.
3426
3427 2007-12-16  Rodney Dawes  <dobey@wayofthemonkey.com>
3428
3429         Reviewed by Maciej Stachowiak.
3430
3431         http://bugs.webkit.org/show_bug.cgi?id=16389
3432         Bug 16389: Common Implementation of NetscapePlugInStreamLoader
3433
3434         * WebCore.vcproj/WebCore.vcproj: Remove NetscapePlugInStreamLoaderWin.cpp.
3435         * loader/NetscapePlugInStreamLoader.cpp: Copy method implementations from NetscapePlugInStreamLoaderWin.cpp.
3436         * loader/win/NetscapePlugInStreamLoaderWin.cpp: Removed.
3437
3438 2007-12-16  Grace Kloba  <klobag@gmail.com>
3439
3440         Reviewed by Darin Adler.
3441
3442         Fix http://bugs.webkit.org/show_bug.cgi?id=16433.
3443         Bug 16433: LOW_BANDWIDTH_DISPLAY build is broken
3444
3445         * dom/Document.cpp:
3446         (WebCore::Document::Document):
3447         * loader/FrameLoader.cpp:
3448         (WebCore::FrameLoader::addLowBandwidthDisplayRequest):
3449         (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
3450
3451 2007-12-16  Darin Adler  <darin@apple.com>
3452
3453         Reviewed by Maciej.
3454
3455         - fix <rdar://problem/5636065> First form of SQLTransaction.executeSql() fails with TYPE_ERROR dom exception
3456
3457         Test: storage/execute-sql-args.html
3458
3459         * bindings/js/JSSQLTransactionCustom.cpp:
3460         (WebCore::JSSQLTransaction::executeSql): Added exception handling code so that once an
3461         exception happens, we won't try to do any more argument processing. Changed processing
3462         of the second argument so that we allow an undefined value or null, and simply omit the
3463         array. Changed processing of the second argument so that we don't require an actual
3464         JavaScript array. Instead, as with the JavaScript array operations themselves, we use
3465         the length property and corresponding numeric properties of the object, allowing other
3466         objects to act as arrays. Changed processing of the third and fourth arguments to
3467         allow the undefined value as well as null; we check the value of the argument rather
3468         than looking at the size of the passed-in arguments list.
3469
3470 2007-12-16  Sam Weinig  <sam@webkit.org>
3471
3472         Reviewed by Darin.
3473
3474         More of http://bugs.webkit.org/show_bug.cgi?id=16385
3475         Cleanup kjs_window
3476
3477         - Move PausedTimeouts into its own file and put it in the WebCore namespace.
3478
3479         * WebCore.pro:
3480         * WebCore.vcproj/WebCore.vcproj:
3481         * WebCore.xcodeproj/project.pbxproj:
3482         * WebCoreSources.bkl:
3483         * bindings/js/PausedTimeouts.cpp: Copied from bindings/js/kjs_window.cpp.
3484         * bindings/js/PausedTimeouts.h: Copied from bindings/js/kjs_window.h.
3485         * bindings/js/kjs_window.cpp:
3486         (KJS::Window::pauseTimeouts):
3487         * bindings/js/kjs_window.h:
3488         * history/CachedPage.cpp:
3489         * history/CachedPage.h:
3490         * page/Chrome.cpp:
3491
3492 2007-12-16  Beth Dakin  <bdakin@apple.com>
3493
3494         Reviewed by Geoff.
3495
3496         Make relative-size SVGs work in border-image.
3497
3498         * rendering/RenderBox.cpp:
3499         (WebCore::RenderBox::calculateBackgroundSize):
3500         * rendering/RenderObject.cpp:
3501         (WebCore::RenderObject::paintBorderImage):
3502
3503 2007-12-16  Darin Adler  <darin@apple.com>
3504
3505         - fix Tiger build (my fault it was broken)
3506
3507         * rendering/RenderThemeMac.mm: Define NSUInteger if on Tiger.
3508
3509 2007-12-16  Andrew Wellington  <proton@wiretapped.net>
3510
3511         Reviewed by Darin.
3512         
3513         http://bugs.webkit.org/show_bug.cgi?id=6129
3514         Incomplete implementation of CSS 2.1 system colors
3515
3516         Test: fast/css/css2-system-color.html
3517         
3518         Based on original patch by Rob Buis.
3519         
3520         System colors are retrieved from NSColor as appropriate. If the color is a pattern color
3521         (and therefore NSColor won't let us retrieve a color from it) we draw a 1x1 image of the
3522         color and sample that to get a solid color.
3523
3524         * css/CSSStyleSelector.cpp:
3525         (WebCore::):
3526         (WebCore::colorForCSSValue):
3527         * rendering/RenderTheme.cpp:
3528         (WebCore::RenderTheme::systemColor):
3529         * rendering/RenderTheme.h:
3530         * rendering/RenderThemeMac.h:
3531         * rendering/RenderThemeMac.mm:
3532         (WebCore::getSystemColor):
3533         (WebCore::RenderThemeMac::platformColorsDidChange):
3534         (WebCore::RenderThemeMac::systemColor):
3535
3536 2007-12-16  Dan Bernstein  <mitz@apple.com>
3537
3538         Reviewed by Darin Adler.
3539
3540         - fix http://bugs.webkit.org/show_bug.cgi?id=16426
3541           Divs with overflow:auto: scrollbars not correctly updated when contents change
3542
3543         Test: fast/overflow/scrollbar-position-update.html
3544
3545         * platform/mac/PlatformScrollBarMac.mm:
3546         (WebCore::PlatformScrollbar::updateThumbProportion): Update the
3547         NSScroller's value for the new proportions.
3548         * rendering/RenderLayer.cpp:
3549         (WebCore::RenderLayer::updateScrollInfoAfterLayout): Removed unnecessary
3550         repaint(). Scrollbars repaint themselves as needed.
3551
3552 2007-12-16  Alexey Proskuryakov  <ap@webkit.org>
3553
3554         Reviewed by Darin.
3555
3556         http://bugs.webkit.org/show_bug.cgi?id=14140
3557         <rdar://problem/5270958> REGRESSION: Complex system KeyBindings don't work properly
3558
3559         * dom/KeyboardEvent.h:
3560         (WebCore::KeypressCommand::KeypressCommand):
3561         (WebCore::KeyboardEvent::keypressCommands):
3562         Change stored command class to preserve complete information about commands.
3563
3564         * editing/EditorCommand.cpp: (WebCore::CommandEntry::): Mark InsertText as a text insertion
3565         command, which it is. Previously, we couldn't do it because WebKit didn't really treat insertText:
3566         as a command.
3567
3568         * page/EventHandler.cpp: (WebCore::EventHandler::keyEvent): Copy commands saved while interpreting
3569         a keydown event into keypress, to avoid losing state when running interpretKeyEvents: again.
3570
3571 2007-12-16  Alexey Proskuryakov  <ap@webkit.org>
3572
3573         Reviewed by Darin.
3574
3575         http://bugs.webkit.org/show_bug.cgi?id=16462
3576         REGRESSION: access keys broken on Windows
3577
3578         * page/EventHandler.cpp:
3579         (WebCore::EventHandler::handleAccessKey):
3580         (WebCore::EventHandler::keyEvent):
3581         * page/EventHandler.h:
3582         Make handleAccessKey a class method; rely on WebKit to call it on Windows and wxWidgets.
3583
3584 2007-12-16  Xan Lopez  <xan@gnome.org>
3585
3586         Reviewed by Alexey Proskuryakov.
3587
3588         http://bugs.webkit.org/show_bug.cgi?id=16454
3589         [GTK] Text input doesn't work consistently on PPC
3590
3591         * platform/gtk/KeyEventGtk.cpp:
3592         (WebCore::singleCharacterString):
3593
3594         UChar is 2 bytes (UTF-16), so transform accordingly from
3595         gunichar (UCS-4). Fixes keyboard input on big endian systems.
3596
3597 2007-12-15  Darin Adler  <darin@apple.com>
3598
3599         Reviewed by Mark Rowe.
3600
3601         - better build fix for the problem affecting GTK and some other platforms
3602           "this time for sure"
3603
3604         * WebCore.xcodeproj/project.pbxproj:
3605         * bindings/js/JSEventTargetBase.cpp: Move the include of the .lut.h file here.
3606         * bindings/js/JSEventTargetBase.h: Instead of including the .lut.h file in the header,
3607         which won't work, declare the tables that are in the .lut.h file in the header.
3608
3609 2007-12-12  Kevin Watters  <kevin@dotsyntax.com>
3610
3611         Reviewed by Darin Adler.
3612
3613         Fixed the Wx port's FontPlatformData for use in HashTable.
3614         - FontPlatformData(Deleted) made unequal to FontPlatformData()
3615
3616         * platform/graphics/wx/FontPlatformData
3617
3618 2007-12-15  Dan Bernstein  <mitz@apple.com>
3619
3620         Reviewed by Darin Adler.
3621
3622         - fix <rdar://problem/5636090> Text in Georgia, Armenian, Inuktitut, Cree, or Cherokee (KA, HY, IU, CR, CHR) draws as all missing glyphs
3623
3624         * platform/graphics/win/FontCacheWin.cpp:
3625         (WebCore::metaFileEnumProc): Added. Called during metafile record
3626         enumeration and extracts the font from the create font record.
3627         (WebCore::FontCache::getFontDataForCharacters): If font linking fails,
3628         let Uniscribe draw the characters and see what font it chooses.
3629
3630 2007-12-15  Darin Adler  <darin@apple.com>
3631
3632         * WebCore.pro: Roll my last change out. Was wrong and didn't fix the build.
3633
3634 2007-12-15  Darin Adler  <darin@apple.com>
3635
3636         Another try at a GTK build fix.
3637
3638         * WebCore.pro: Add JSEventTargetBase.cpp to LUT_TABLE_FILES instead of LUT_FILES.
3639
3640 2007-12-15  Sam Weinig  <sam@webkit.org>
3641
3642         Force windows to regenerate COM DOM bindings.
3643
3644         * WebCore.vcproj/build-generated-files.sh: Add license. 
3645         * bindings/scripts/CodeGeneratorCOM.pm: Use shared WK_ucfirst.
3646
3647 2007-12-15  Sam Weinig  <sam@webkit.org>
3648
3649         Fix Windows and wx builds.
3650
3651         * WebCore.vcproj/WebCore.vcproj:
3652         * WebCoreSources.bkl:
3653
3654 2007-12-15  Mark Rowe  <mrowe@apple.com>
3655
3656         Gtk build fix.  Add JSEventTargetBase.cpp to SOURCES.
3657
3658         * WebCore.pro:
3659
3660 2007-12-15  Sam Weinig  <sam@webkit.org>
3661
3662         Fix wx build.
3663
3664         * WebCoreSources.bkl:
3665
3666 2007-12-15  Nikolas Zimmermann  <zimmermann@kde.org>
3667
3668         Not reviewed. Build fix for Qt/Gtk.
3669
3670         * WebCore.pro: Include JSEventTargetBase.lut.h in generation
3671
3672 2007-12-15  Nikolas Zimmermann  <zimmermann@kde.org>
3673
3674         Reviewed by Eric.
3675
3676         Fixes: http://bugs.webkit.org/show_bug.cgi?id=16445 (Refactor EventTargetNode & JSEventTargetNode for an upcoming SVG patch)
3677
3678         Split up JSEventTargetNode in JSEventTargetNode & JSEventTargetBase - where most functionality has been moved down
3679         in the base class. Applied the same refactorization to EventTargetNode.
3680
3681         This makes it possible for the upcoming patch implementing the EventTarget interface for SVGElementInstance
3682         to share as much code as possible with the EventTargetNode classes.
3683
3684         * DerivedSources.make:
3685         * WebCore.xcodeproj/project.pbxproj:
3686         * bindings/js/JSEventTargetBase.cpp: Added.
3687         (WebCore::retrieveEventTargetAndCorrespondingNode):
3688         (WebCore::eventNameForPropertyToken):
3689         * bindings/js/JSEventTargetBase.h: Added.
3690         (WebCore::JSEventTargetProperties::):
3691         (WebCore::JSEventTargetPrototypeFunctionBase::JSEventTargetPrototypeFunctionBase):
3692         (WebCore::JSEventTargetPrototypeFunction::JSEventTargetPrototypeFunction):
3693         (WebCore::):
3694         (WebCore::::create):
3695         (WebCore::JSEventTargetBase::JSEventTargetBase):
3696         (WebCore::JSEventTargetBase::getValueProperty):
3697         (WebCore::JSEventTargetBase::putValueProperty):
3698         (WebCore::JSEventTargetBase::getOwnPropertySlot):
3699         (WebCore::JSEventTargetBase::put):
3700         (WebCore::JSEventTargetPrototype::JSEventTargetPrototype):
3701         (WebCore::JSEventTargetPrototype::self):
3702         (WebCore::JSEventTargetPrototype::getOwnPropertySlot):
3703         (WebCore::JSEventTargetPrototype::classInfo):
3704         * bindings/js/JSEventTargetNode.cpp:
3705         (WebCore::JSEventTargetNode::getOwnPropertySlot):
3706         (WebCore::JSEventTargetNode::getValueProperty):
3707         (WebCore::JSEventTargetNode::put):
3708         (WebCore::JSEventTargetNode::putValueProperty):
3709         (WebCore::JSEventTargetNode::setListener):
3710         (WebCore::toEventTargetNode):
3711         * bindings/js/JSEventTargetNode.h:
3712         (WebCore::JSEventTargetPrototypeInformation::prototypeClassName):
3713         (WebCore::JSEventTargetPrototypeInformation::prototypeIdentifier):
3714         * dom/EventTarget.cpp:
3715         (WebCore::EventTarget::addEventListener):
3716         (WebCore::EventTarget::removeEventListener):
3717         (WebCore::EventTarget::dispatchGenericEvent):
3718         (WebCore::EventTarget::removeAllEventListeners):
3719         (WebCore::EventTarget::insertedIntoDocument):
3720         (WebCore::EventTarget::removedFromDocument):
3721         (WebCore::EventTarget::handleLocalEvents):
3722         (WebCore::EventTarget::applySVGEventTargetRules):
3723         (WebCore::forbidEventDispatch):
3724         (WebCore::allowEventDispatch):
3725         (WebCore::eventDispatchForbidden):
3726         * dom/EventTarget.h:
3727         (WebCore::EventTarget::preDispatchEventHandler):
3728         (WebCore::EventTarget::postDispatchEventHandler):
3729         (WebCore::forbidEventDispatch):
3730         (WebCore::allowEventDispatch):
3731         * dom/EventTargetNode.cpp:
3732         (WebCore::EventTargetNode::~EventTargetNode):
3733         (WebCore::EventTargetNode::insertedIntoDocument):
3734         (WebCore::EventTargetNode::removedFromDocument):
3735         (WebCore::EventTargetNode::addEventListener):
3736         (WebCore::EventTargetNode::removeEventListener):
3737         (WebCore::EventTargetNode::removeAllEventListeners):
3738         (WebCore::EventTargetNode::handleLocalEvents):
3739         (WebCore::EventTargetNode::dispatchEvent):
3740         (WebCore::EventTargetNode::dispatchWindowEvent):
3741         * dom/EventTargetNode.h:
3742         (WebCore::EventTargetNode::localEventListeners):
3743         * svg/SVGElement.cpp:
3744         (WebCore::SVGElement::sendSVGLoadEventIfPossible):
3745         (WebCore::SVGElement::dispatchEvent):
3746
3747 2007-12-15  Eric Seidel  <eric@webkit.org>
3748
3749         Reviewed by Oliver.
3750         
3751         Width of SVG elements not applied to container elements
3752         http://bugs.webkit.org/show_bug.cgi?id=16305
3753         Added calcPrefWidths for RenderSVGRoot (copied from RenderReplaced)
3754         This is caused by poor factoring in the render tree.  RenderContainer probably should be a template.
3755
3756         svg/css/css-box-min-width.html
3757
3758         * rendering/RenderSVGRoot.cpp:
3759         (WebCore::RenderSVGRoot::calcPrefWidths): Added.
3760         * rendering/RenderSVGRoot.h:
3761         * css/SVGCSSStyleSelector::applySVGProperty: fixed ASSERT in debug builds
3762
3763 2007-12-15  David Kilzer  <ddkilzer@apple.com>
3764
3765         Fix comment after isSafeScript() was renamed to allowsAccessFrom().
3766
3767         * bindings/js/kjs_window.cpp:
3768         (KJS::createWindow):
3769
3770 2007-12-15  Alp Toker  <alp@atoker.com>
3771
3772         Reviewed by Mark Rowe.
3773
3774         http://bugs.webkit.org/show_bug.cgi?id=16449
3775         cairo_arc() functions hang or crash when passed inf as radius or start/end angle
3776
3777         Add checks. This matches a similar workaround for a CG bug in the CG
3778         graphics backend: <rdar://problem/5189233>
3779
3780         Fixes:
3781           fast/canvas/arc-crash.html
3782           fast/canvas/canvas-with-incorrect-args.html
3783
3784         * platform/graphics/cairo/PathCairo.cpp:
3785         (WebCore::Path::addArc):
3786
3787 2007-12-15  Alexey Proskuryakov  <ap@webkit.org>
3788
3789         Reviewed by Darin.
3790
3791         http://bugs.webkit.org/show_bug.cgi?id=16078
3792         Google Maps zooming via the scroll wheel (almost) always zooms IN only.
3793
3794         * dom/WheelEvent.cpp: (WebCore::WheelEvent::WheelEvent):
3795         Ensure that delta is never rounded down to zero - we are getting values less than 1 from 
3796         many mice on OS X, and Google Maps code assumes scrolling up if event.wheelDelta is zero.
3797
3798 2007-12-14  Dan Bernstein  <mitz@apple.com>
3799
3800         - Windows build fix
3801
3802         * WebCore.vcproj/WebCore.vcproj:
3803
3804 2007-12-14  Alp Toker  <alp@atoker.com>
3805
3806         GTK+/Qt build fix. Track added files in r28722.
3807
3808         * WebCore.pro:
3809
3810 2007-12-14  Sam Weinig  <sam@webkit.org>
3811
3812         Reviewed by Geoff.
3813
3814         Speed up getElementByClassName.
3815         - This makes getElementByClassName 33% faster on the stress test
3816           linked to at http://bugs.webkit.org/show_bug.cgi?id=15760.
3817
3818         * platform/text/StringImpl.cpp:
3819         (WebCore::StringImpl::foldCase): Optimize the case when all the characters are ASCII.
3820
3821 2007-12-14  Alp Toker  <alp@atoker.com>
3822
3823         Reviewed by Maciej.
3824
3825         http://bugs.webkit.org/show_bug.cgi?id=16432
3826         [GTK] Update license headers
3827
3828         Consent has been given by the authors of these files to change license
3829         to the LGPL as outlined in the bug report.
3830
3831         * platform/gtk/ClipboardGtk.cpp:
3832         * platform/gtk/ContextMenuGtk.cpp:
3833         * platform/gtk/ContextMenuItemGtk.cpp:
3834         * platform/gtk/CookieJarGtk.cpp:
3835         * platform/gtk/CursorGtk.cpp:
3836         * platform/gtk/DragDataGtk.cpp:
3837         * platform/gtk/DragImageGtk.cpp:
3838         * platform/gtk/PasteboardGtk.cpp:
3839         * platform/gtk/PlatformScreenGtk.cpp:
3840         * platform/gtk/PlatformScrollBarGtk.cpp:
3841         * platform/gtk/SearchPopupMenuGtk.cpp:
3842         * platform/gtk/WidgetGtk.cpp:
3843
3844 2007-12-14  Darin Adler  <darin@apple.com>
3845
3846         Reviewed by Adele.
3847
3848         - fix http://bugs.webkit.org/show_bug.cgi?id=16442
3849           navigation policy delegate gets called twice for each load
3850
3851         * loader/MainResourceLoader.cpp:
3852         (WebCore::MainResourceLoader::willSendRequest): Removed call to checkNavigationPolicy.
3853         That's handled by FrameLoader.
3854
3855         * loader/MainResourceLoader.h: Removed callContinueAfterNavigationPolicy
3856         and continueAfterNavigationPolicy.
3857
3858 2007-12-14  Anders Carlsson  <andersca@apple.com>
3859
3860         Reviewed by Brady.
3861
3862         Make document.open count as committing a document load, so that -[WebFrame dataSource:] won't
3863         return nil in that case.
3864         
3865         * loader/FrameLoader.cpp:
3866         (WebCore::FrameLoader::didExplicitOpen):
3867
3868 2007-12-14  David Smith  <catfish.man@gmail.com>
3869
3870         Reviewed by Mitz.
3871
3872         - fix http://bugs.webkit.org/show_bug.cgi?id=14955
3873           Implement getElementsByClassName.
3874
3875         This patch also renames AtomicStringList to ClassNames to better reflect its actual use,
3876         and takes advantage of admitting that it's class-specific to encapsulate class attribute 
3877         parsing so it can be shared.  It also changes the class to use a Vector, rather than a linked
3878         list to store the class names.
3879
3880         Tests: fast/dom/getElementsByClassName/001.html
3881                fast/dom/getElementsByClassName/002.html
3882                fast/dom/getElementsByClassName/003.html
3883                fast/dom/getElementsByClassName/004.html
3884                fast/dom/getElementsByClassName/005.html
3885                fast/dom/getElementsByClassName/006.html
3886                fast/dom/getElementsByClassName/007.html
3887                fast/dom/getElementsByClassName/008.html
3888                fast/dom/getElementsByClassName/009.html
3889                fast/dom/getElementsByClassName/010.xml
3890                fast/dom/getElementsByClassName/011.xml
3891                fast/dom/getElementsByClassName/012.html
3892                fast/dom/getElementsByClassName/013.html
3893                fast/dom/getElementsByClassName/014.html
3894                fast/dom/getElementsByClassName/array/001.html
3895                fast/dom/getElementsByClassName/array/002.html
3896                fast/dom/getElementsByClassName/array/003.html
3897                fast/dom/getElementsByClassName/array/004.html
3898                fast/dom/getElementsByClassName/dumpNodeList.html
3899
3900         * WebCore.xcodeproj/project.pbxproj:
3901         * css/CSSStyleSelector.cpp:
3902         (WebCore::CSSStyleSelector::matchRules):
3903         (WebCore::CSSStyleSelector::checkOneSelector):
3904         * dom/AtomicStringList.h: Removed.
3905         * dom/ClassNames.cpp: Added.
3906         (WebCore::ClassNames::contains):
3907         (WebCore::ClassNames::parseClassAttribute):
3908         * dom/ClassNames.h: Copied from WebCore/dom/AtomicStringList.h.
3909         (WebCore::ClassNames::ClassNames):
3910         (WebCore::ClassNames::size):
3911         (WebCore::ClassNames::clear):
3912         (WebCore::ClassNames::operator[]):
3913         (WebCore::isClassWhitespace):
3914         * dom/ClassNodeList.cpp: Added.
3915         (WebCore::ClassNodeList::ClassNodeList):
3916         (WebCore::ClassNodeList::length):
3917         (WebCore::ClassNodeList::item):
3918         (WebCore::ClassNodeList::nodeMatches):
3919         * dom/ClassNodeList.h: Added.
3920         * dom/Document.cpp:
3921         (WebCore::Document::getElementsByName):
3922         (WebCore::Document::getElementsByClassName):
3923         * dom/Document.h:
3924         * dom/Document.idl:
3925         * dom/Element.cpp:
3926         (WebCore::Element::getClassNames):
3927         (WebCore::Element::getElementsByClassName):
3928         * dom/Element.h:
3929         * dom/Element.idl:
3930         * dom/NameNodeList.cpp:
3931         (WebCore::NameNodeList::NameNodeList):
3932         (WebCore::NameNodeList::item):
3933         (WebCore::NameNodeList::nodeMatches):
3934         * dom/NameNodeList.h:
3935         * dom/NamedMappedAttrMap.cpp:
3936         (WebCore::NamedMappedAttrMap::clearAttributes):
3937         (WebCore::NamedMappedAttrMap::parseClassAttribute):
3938         * dom/NamedMappedAttrMap.h:
3939         (WebCore::NamedMappedAttrMap::getClassNames):
3940         * dom/StyledElement.cpp:
3941         (WebCore::StyledElement::getClassNames):
3942         * dom/StyledElement.h:
3943
3944 2007-12-14  Darin Adler  <darin@apple.com>
3945
3946         Reviewed by Sam.
3947
3948         - fix http://bugs.webkit.org/show_bug.cgi?id=16351
3949           FontFallbackList.h doesn't include wtf/PassRefPtr.h
3950           
3951         * platform/graphics/FontFallbackList.h: Added include of <wtf/Forward.h>
3952         * platform/graphics/GlyphPageTreeNode.h: Removed an unneeded include.
3953
3954 2007-12-14  Darin Adler  <darin@apple.com>
3955
3956         Reviewed by Alexey.
3957
3958         - http://bugs.webkit.org/show_bug.cgi?id=16420
3959           change regression tests to use document.execCommand instead of textInputController.doCommand
3960
3961         Add a few more operations to document.execCommand.
3962
3963         Finished up the transition to the new Editor::Command, including removing
3964         the Editor::execCommand function.
3965
3966         * WebCore.base.exp: Added Editor::Command::isSupported.
3967         * editing/Editor.h: Removed execCommand.
3968         * editing/EditorCommand.cpp:
3969         (WebCore::expandSelectionToGranularity): Added.
3970         (WebCore::verticalScrollDistance): Added; replaces canScroll.
3971         (WebCore::executeDeleteBackward): Added. Moved code here from WebHTMLView.
3972         (WebCore::executeDeleteBackwardByDecomposingPreviousCharacter): Ditto.
3973         (WebCore::executeDeleteForward): Ditto.
3974         (WebCore::executeDeleteToBeginningOfLine): Ditto.
3975         (WebCore::executeDeleteToBeginningOfParagraph): Ditto.
3976         (WebCore::executeDeleteToEndOfLine): Ditto.
3977         (WebCore::executeDeleteToEndOfParagraph): Ditto.
3978         (WebCore::executeMovePageDown): Renamed this command to be consistent with all the other
3979         Move commands. They all modify the caret. Reimplemented to match the Mac OS X version by
3980         removing the explicit scrolling, and letting it be done automatically by code that makes
3981         the caret visible. In some cases the old code would scroll twice which was harmless but
3982         unnecessary.
3983         (WebCore::executeMovePageDownAndModifySelection): Added. Moved code here from WebHTMLView.
3984         (WebCore::executeMovePageUp): See MovePageDown above.
3985         (WebCore::executeMovePageUpAndModifySelection): Added. Moved code here from WebHTMLView.
3986         (WebCore::executeSelectLine): Ditto.
3987         (WebCore::executeSelectParagraph): Ditto.
3988         (WebCore::executeSelectSentence): Ditto.
3989         (WebCore::executeSelectWord): Ditto.
3990         (WebCore::executeSwapWithMark): Some small tweaks.
3991
3992         * page/ContextMenuController.cpp:
3993         (WebCore::ContextMenuController::contextMenuItemSelected): Changed to use Editor::command()
3994         instead of Editor::execCommand(). This code could be changed to use Editor::Command quite a
3995         bit more, but I didn't do that this time.
3996
3997         - Removed some obsolete unused code.
3998
3999         * page/mac/EventHandlerMac.mm:
4000         (WebCore::EventHandler::passMouseDownEventToWidget): Removed the special case code for
4001         NSTextView. This was left over from when we used NSTextField and NSTextView for form
4002         elements and is no longer used at all.
4003
4004         * page/mac/WebCoreFrameBridge.h: Removed 20 unused methods that were still on one side
4005         of the bridge or another. We really need to find a time to tear down the rest of the
4006         bridge, but that's not this patch.
4007
4008         * page/mac/WebCoreFrameBridge.mm:
4009         (-[WebCoreFrameBridge addData:]): Changed to get at the _shouldCreateRenderers field directly
4010         instead of using a method.
4011         (-[WebCoreFrameBridge rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
4012         Took out obsolete comment about matching enums (we use a single enum now and have for some
4013         time).
4014         (-[WebCoreFrameBridge selectionGranularity]): Ditto.
4015
4016 2007-12-14  Justin Garcia  <justin.garcia@apple.com>
4017
4018         Reviewed by Darin Adler.
4019
4020         <rdar://problem/5575101> GoogleDocs: Hang in SplitElementCommand::doApply when outdenting a list item in a particular list
4021
4022         * editing/CompositeEditCommand.cpp:
4023         (WebCore::CompositeEditCommand::splitTreeToNode): Moved here.
4024         * editing/CompositeEditCommand.h:
4025         * editing/IndentOutdentCommand.cpp: Moved splitTreeToNode.
4026         * editing/IndentOutdentCommand.h: Ditto, and removed unimplemented splitTreeTo.
4027         * editing/InsertListCommand.cpp:
4028         (WebCore::InsertListCommand::doApply): Split ancestors of listChildNode between
4029         it and listNode, if they exists, so that moving listChildNode doesn't put it out
4030         of order.  Added a test case to cover each change.
4031         * editing/SplitElementCommand.cpp:
4032         (WebCore::SplitElementCommand::doApply): Added an ASSERT to catch code that
4033         tries to split a container at a bogus child, and an early return to avoid a
4034         hang in that case.
4035
4036 2007-12-14  Anders Carlsson  <andersca@apple.com>
4037
4038         Reviewed by Darin and Geoff.
4039
4040         <rdar://problem/5619295> 
4041         REGRESSION: 303-304: Embedded YouTube video fails to render- JS errors (16150) (Flash 9)
4042
4043         _NPN_CreateScriptObject doesn't take an origin root object anymore.
4044         
4045         * html/HTMLPlugInElement.cpp:
4046         (WebCore::HTMLPlugInElement::createNPObject):
4047         * page/Frame.cpp:
4048         (WebCore::Frame::windowScriptNPObject):
4049
4050 2007-12-14  Dan Bernstein  <mitz@apple.com>
4051
4052         Reviewed by Darin Adler.
4053
4054         - fix <rdar://problem/5643663> text-shadow and box-shadow offsets 1px smaller than specified
4055           which is the root cause of:
4056           http://bugs.webkit.org/show_bug.cgi?id=12943
4057           box-shadow: small values don't affect shadow position
4058           http://bugs.webkit.org/show_bug.cgi?id=14736
4059           Safari implementation of text-shadow off by 1px
4060
4061         * platform/graphics/cg/GraphicsContextCG.cpp:
4062         (WebCore::GraphicsContext::setShadow): Slightly increase the magnitude
4063         of the offsets passed to CGContextSetShadow* to ensure that the end
4064         result after truncation is the desired integer offsets.
4065
4066 2007-12-13  Alp Toker  <alp@atoker.com>
4067
4068         curl backend build fix for breakage introduced in r28709.
4069
4070         * platform/network/ResourceHandleInternal.h:
4071         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
4072
4073 2007-12-13  Justin Garcia  <justin.garcia@apple.com>
4074
4075         Reviewed by Oliver Hunt.
4076
4077         <rdar://problem/5607069> In Mail, a crash occurs at WebCore::AppendNodeCommand() after dragging image into a <FORM> element
4078
4079         * editing/InsertLineBreakCommand.cpp:
4080         (WebCore::InsertLineBreakCommand::shouldUseBreakElement): Equip this function to
4081         handle editing positions, like [input, 0];
4082         * editing/InsertParagraphSeparatorCommand.cpp:
4083         (WebCore::InsertParagraphSeparatorCommand::doApply): Pass enclosingBlock a node peeled
4084         off of a non-editing position, to fix a bug where the enclosing block of [input, 0] was
4085         the input element itself.
4086         Insert a <br> when a <form> element is the enclosing block instead of splitting/cloning or
4087         nesting a <div>.
4088
4089 2007-12-13  Alp Toker  <alp@atoker.com>
4090
4091         Reviewed by Oliver Hunt.
4092
4093         http://bugs.webkit.org/show_bug.cgi?id=16365
4094         [cURL] Acid2 test segmentation fault
4095
4096         This patch makes the Acid2 test pass.
4097
4098         Defer the cleanup of cancelled jobs and halt further transfer as early
4099         as possible.
4100
4101         Bug found by and initial patch provided by Luca Bruno.
4102
4103         * platform/network/curl/ResourceHandleManager.cpp:
4104         (WebCore::writeCallback):
4105         (WebCore::headerCallback):
4106         (WebCore::ResourceHandleManager::downloadTimerCallback):
4107         (WebCore::ResourceHandleManager::cancel):
4108
4109 2007-12-13  Sam Weinig  <sam@webkit.org>
4110
4111         Reviewed by Mark Rowe.
4112
4113         Fix typos and rename InspectorController::moveByUnrestricted to InspectorController::moveWindowBy.
4114
4115         * page/InspectorController.cpp:
4116         (WebCore::moveByUnrestricted):
4117         (WebCore::InspectorController::windowScriptObjectAvailable):
4118         (WebCore::InspectorController::moveWindowBy):
4119         * page/InspectorController.h:
4120         * page/inspector/inspector.js:
4121
4122 2007-12-13  Dan Bernstein  <mitz@apple.com>
4123
4124         Reviewed by Dave Hyatt.
4125
4126         - fix <rdar://problem/5642426> explicit cubic-bezier curves all treated as "default" for transition-timing-function
4127
4128         Test: fast/css/transition-timing-function.html
4129
4130         * css/CSSStyleSelector.cpp: Changed the HANDLE_MULTILAYER_VALUE macro to
4131         not reject non-primitive non-list values, and instead made sure that the
4132         mapping functions rejected them if necessary. This allows non-primitive
4133         timing functions to be mapped.
4134         (WebCore::CSSStyleSelector::mapBackgroundAttachment):
4135         (WebCore::CSSStyleSelector::mapBackgroundClip):
4136         (WebCore::CSSStyleSelector::mapBackgroundComposite):
4137         (WebCore::CSSStyleSelector::mapBackgroundOrigin):
4138         (WebCore::CSSStyleSelector::mapBackgroundImage):
4139         (WebCore::CSSStyleSelector::mapBackgroundRepeat):
4140         (WebCore::CSSStyleSelector::mapBackgroundXPosition):
4141         (WebCore::CSSStyleSelector::mapBackgroundYPosition):
4142         (WebCore::CSSStyleSelector::mapTransitionDuration):
4143         (WebCore::CSSStyleSelector::mapTransitionRepeatCount):
4144         (WebCore::CSSStyleSelector::mapTransitionTimingFunction):
4145         (WebCore::CSSStyleSelector::mapTransitionProperty):
4146         * css/CSSTimingFunctionValue.cpp:
4147         (WebCore::CSSTimingFunctionValue::cssText): Implemented for use in the
4148         regression test.
4149         * css/CSSTimingFunctionValue.h:
4150         (WebCore::CSSTimingFunctionValue::isTransitionTimingFunctionValue):
4151         Added. Returns true.
4152         * css/CSSValue.h:
4153         (WebCore::CSSValue::isTransitionTimingFunctionValue): Added. Returns
4154         false.
4155
4156 2007-12-13  Steve Falkenburg  <sfalken@apple.com>
4157
4158         Move source file generation into its own vcproj to fix build dependencies.
4159
4160         Reviewed by Adam.
4161
4162         * WebCore.vcproj/WebCore.make:
4163         * WebCore.vcproj/WebCore.sln:
4164         * WebCore.vcproj/WebCore.submit.sln:
4165         * WebCore.vcproj/WebCore.vcproj:
4166         * WebCore.vcproj/WebCoreGenerated.vcproj: Added.
4167
4168 2007-12-13  Justin Garcia  <justin.garcia@apple.com>
4169
4170         Reviewed by Oliver Hunt.
4171         
4172         <rdar://problem/4145786> Undoing a color change of text in a compose window always changes it back to black
4173         
4174         Some of the operations performed in removeHTMLFontStyle were non-undoable.
4175         
4176         I'm having trouble writing a layout test for this because I can't get DRT to
4177         perform editing operations in separate Undo steps without adding unacceptably long
4178         wait times between operations.  I filed:
4179         
4180         <rdar://problem/5646779> Can't get DRT to perform editing operations in separate Undo steps
4181
4182         * editing/ApplyStyleCommand.cpp:
4183         (WebCore::ApplyStyleCommand::removeHTMLFontStyle):
4184
4185 2007-12-13  Sam Weinig  <sam@webkit.org>
4186
4187         Reviewed by Anders.
4188
4189         Fix for http://bugs.webkit.org/show_bug.cgi?id=16352
4190         Toolbar dragged inspector cannot be moved beyond screen edges
4191
4192         * page/InspectorController.cpp:
4193         (WebCore::moveByUnrestricted):
4194         (WebCore::InspectorController::windowScriptObjectAvailable):
4195         (WebCore::InspectorController::moveByUnrestricted):
4196         * page/InspectorController.h:
4197         * page/inspector/inspector.js:
4198
4199 2007-12-13  Adam Roben  <aroben@apple.com>
4200
4201         Fix <rdar://5517707> Crash on wptv.wp.pl when "make bigger" button is clicked
4202
4203         Windows Media Player has a modal message loop that will deliver
4204         messages to us at inappropriate times and we will crash if we handle
4205         them when they are delivered. In PluginViewWin, we add a quirk for
4206         Media Player to set a flag whenever we give the plugin a chance to
4207         execute code, and in SharedTimerWin we check if the plugin is
4208         executing code and repost messages if so.
4209
4210         Reviewed by Anders.
4211
4212         * platform/win/SharedTimerWin.cpp:
4213         (WebCore::TimerWindowWndProc): Repost messages if we're calling a
4214         plugin.
4215         * plugins/win/PluginViewWin.cpp: Surround all calls to the plugin with
4216         setCallingPlugin(true/false).
4217         (WebCore::PluginViewWin::updateWindow):
4218         (WebCore::PluginViewWin::dispatchNPEvent):
4219         (WebCore::PluginViewWin::setNPWindowRect):
4220         (WebCore::PluginViewWin::start):