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