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