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