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