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