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