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