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