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