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