Reviewed by Sam.
[WebKit-https.git] / WebCore / ChangeLog
1 2008-01-15  Adele Peterson  <adele@apple.com>
2
3         Reviewed by Sam.
4
5         Remove unused variable for old media control background drawing code.
6
7         * rendering/RenderThemeMac.h:
8         * rendering/RenderThemeMac.mm:
9         (WebCore::RenderThemeMac::RenderThemeMac):
10         (WebCore::RenderThemeMac::~RenderThemeMac):
11
12 2008-01-15  Sam Weinig  <sam@webkit.org>
13
14         Reviewed by Geoffrey Garen.
15
16         Fix <rdar://problem/5595552> r27608 introduced a 20% increase in JS binary size, 4% increase in WebCore binary size
17
18         - Update JS Function implementations to use a static function based method. This decreases
19           the binary size of an Intel only build by 1013.5K.
20
21         * WebCore.xcodeproj/project.pbxproj:
22         * bindings/js/JSDOMWindowCustom.cpp:
23         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
24         * bindings/js/JSEventTargetBase.cpp:
25         (WebCore::jsEventTargetAddEventListener):
26         (WebCore::jsEventTargetRemoveEventListener):
27         (WebCore::jsEventTargetDispatchEvent):
28         (WebCore::retrieveEventTargetAndCorrespondingNode):
29         * bindings/js/JSEventTargetBase.h:
30         * bindings/js/JSHTMLInputElementBase.cpp:
31         (WebCore::jsHTMLInputElementBaseFunctionSetSelectionRange):
32         (WebCore::JSHTMLInputElementBase::getOwnPropertySlot):
33         * bindings/js/JSHTMLInputElementBase.h:
34         * bindings/js/JSLocation.cpp:
35         (WebCore::JSLocation::getOwnPropertySlot):
36         (WebCore::jsLocationProtoFuncReplace):
37         (WebCore::jsLocationProtoFuncReload):
38         (WebCore::jsLocationProtoFuncAssign):
39         (WebCore::jsLocationProtoFuncToString):
40         * bindings/js/JSLocation.h:
41         * bindings/js/JSXMLHttpRequest.cpp:
42         (KJS::jsXMLHttpRequestPrototypeFunctionAbort):
43         (KJS::jsXMLHttpRequestPrototypeFunctionGetAllResponseHeaders):
44         (KJS::jsXMLHttpRequestPrototypeFunctionGetResponseHeader):
45         (KJS::jsXMLHttpRequestPrototypeFunctionOpen):
46         (KJS::jsXMLHttpRequestPrototypeFunctionSend):
47         (KJS::jsXMLHttpRequestPrototypeFunctionSetRequestHeader):
48         (KJS::jsXMLHttpRequestPrototypeFunctionOverrideMIMEType):
49         (KJS::jsXMLHttpRequestPrototypeFunctionAddEventListener):
50         (KJS::jsXMLHttpRequestPrototypeFunctionRemoveEventListener):
51         (KJS::jsXMLHttpRequestPrototypeFunctionDispatchEvent):
52         * bindings/js/JSXMLHttpRequest.h:
53         * bindings/js/JSXSLTProcessor.cpp:
54         (KJS::jsXSLTProcessorPrototypeFunctionImportStylesheet):
55         (KJS::jsXSLTProcessorPrototypeFunctionTransformToFragment):
56         (KJS::jsXSLTProcessorPrototypeFunctionTransformToDocument):
57         (KJS::jsXSLTProcessorPrototypeFunctionSetParameter):
58         (KJS::jsXSLTProcessorPrototypeFunctionGetParameter):
59         (KJS::jsXSLTProcessorPrototypeFunctionRemoveParameter):
60         (KJS::jsXSLTProcessorPrototypeFunctionClearParameters):
61         (KJS::jsXSLTProcessorPrototypeFunctionReset):
62         * bindings/js/JSXSLTProcessor.h:
63         * bindings/js/kjs_events.cpp:
64         (WebCore::jsClipboardPrototypeFunctionClearData):
65         (WebCore::jsClipboardPrototypeFunctionGetData):
66         (WebCore::jsClipboardPrototypeFunctionSetData):
67         (WebCore::jsClipboardPrototypeFunctionSetDragImage):
68         * bindings/js/kjs_events.h:
69         * bindings/js/kjs_navigator.cpp:
70         (KJS::pluginsFunctionRefresh):
71         (KJS::navigatorProtoFuncJavaEnabled):
72         * bindings/js/kjs_navigator.h:
73         * bindings/js/kjs_window.cpp:
74         (KJS::Window::getOwnPropertySlot):
75         (KJS::windowProtoFuncAToB):
76         (KJS::windowProtoFuncBToA):
77         (KJS::windowProtoFuncOpen):
78         (KJS::windowProtoFuncSetTimeout):
79         (KJS::windowProtoFuncClearTimeout):
80         (KJS::windowProtoFuncSetInterval):
81         (KJS::windowProtoFuncAddEventListener):
82         (KJS::windowProtoFuncRemoveEventListener):
83         (KJS::windowProtoFuncShowModalDialog):
84         (KJS::windowProtoFuncNotImplemented):
85         * bindings/js/kjs_window.h:
86         * bindings/scripts/CodeGenerator.pm:
87         * bindings/scripts/CodeGeneratorJS.pm:
88
89 2008-01-15  Adele Peterson  <adele@apple.com>
90
91         Reviewed by Dan.
92
93         Fix for <rdar://problem/5682492> With the <video> element, the audio is heard when forwarding or rewinding a movie while it's playing
94
95         * rendering/MediaControlElements.cpp: (WebCore::MediaControlSeekButtonElement::defaultEventHandler):
96           Instead of pausing the media when you stop seeking on mouse up, pause the video when you first start seeking on mouse down. 
97
98 2008-01-15  Alp Toker  <alp@atoker.com>
99
100         Rubber-stamped by Anders.
101
102         Make the HTTP backend configurable in the GTK+ port. curl is currently
103         the only option.
104
105         * GNUmakefile.am:
106
107 2008-01-15  Adele Peterson  <adele@apple.com>
108
109         Build fix.
110
111         * rendering/RenderThemeSafari.cpp: Removing MediaBackgroundAppearance.
112
113 2008-01-14  Samuel Weinig  <sam@webkit.org>
114
115         Reviewed by Darin.
116
117         Fix for <rdar://problem/5671040>
118         REGRESSION: 6% HTML iBench regression from r28722 (getElementsByClassName)
119
120         On my most consistent tests, this brings the HTML iBench from 1.46 -> 1.41,
121         which does not completely make up reported regression, but I was not able to
122         reproduce those findings either.
123
124         * css/CSSStyleSelector.cpp:
125         (WebCore::CSSStyleSelector::matchRules):
126         (WebCore::CSSStyleSelector::checkOneSelector):
127         * dom/ClassNames.cpp:
128         (WebCore::ClassNames::parseClassAttribute):
129         * dom/ClassNames.h:
130         (WebCore::ClassNames::contains):
131         (WebCore::ClassNames::operator[]):
132
133 2008-01-15  Adele Peterson  <adele@apple.com>
134
135         Build fix.  This time for real.
136
137         * rendering/RenderThemeSafari.cpp:
138
139 2008-01-15  Adele Peterson  <adele@apple.com>
140
141         Build fix.
142
143         * rendering/RenderThemeSafari.cpp:
144
145 2008-01-15  Dan Bernstein  <mitz@apple.com>
146
147         Reviewed by Darin Adler.
148
149         - fix <rdar://problem/5666926> svg/custom/use-css-no-effect-on-shadow-tree.svg is failing
150
151         * svg/SVGPreserveAspectRatio.cpp:
152         (WebCore::SVGPreserveAspectRatio::getCTM): Changed the arguments' type
153         from float to double in order to make the values passed to scale() and
154         translate() on Mac OS X and on Windows the same.
155         * svg/SVGPreserveAspectRatio.h:
156
157 2008-01-15  Alexey Proskuryakov  <ap@webkit.org>
158
159         Reviewed by Darin.
160
161         <rdar://problem/5342813> REGRESSION: Safari encodes mailto URLs incorrectly
162
163         Test: fast/encoding/mailto-always-utf-8.html
164
165         * platform/KURL.cpp: (WebCore::encodeRelativeString): Always use UTF-8 for mailto URLs.
166
167 2008-01-15  Adele Peterson  <adele@apple.com>
168
169         Reviewed by Adam and Antti.
170
171         WebCore part of fix for <rdar://problem/5619062> Add load progress indicator to video controls
172
173         * WebCore.base.exp: Removed symbol for wkGetMediaControlBackgroundImageData.  Added symbol for wkDrawMediaSliderTrack.
174         * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Removed case for MediaBackgroundAppearance.
175         * css/html4.css: Removed -webkit-appearance: media-background rule for the media panel element.  Removed unnecessary margin for slider.
176         * rendering/RenderStyle.h: (WebCore::): Removed MediaBackgroundAppearance.
177
178         * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::initAndDispatchProgressEvent):
179           Call updateMediaPlayer more frequently so the load progress control gets updated appropriately.
180         * platform/mac/WebCoreSystemInterface.h: Removed wkGetMediaControlBackgroundImageData.  Added wkDrawMediaSliderTrack.
181         * platform/mac/WebCoreSystemInterface.mm: ditto.
182
183         * rendering/RenderTheme.h: Removed paintMediaBackground. Added paintMediaSliderTrack.
184         * rendering/RenderTheme.cpp: (WebCore::RenderTheme::paint): Call paintMediaSliderTrack for elements with MediaSliderAppearance.
185         * rendering/RenderThemeMac.h: Removed paintMediaBackground. Added paintMediaSliderTrack.
186         * rendering/RenderThemeMac.mm:
187         (WebCore::RenderThemeMac::adjustSliderThumbSize): Added different sizes for the media slider thumb.
188         (WebCore::RenderThemeMac::paintMediaSliderTrack): Added.  Calls wkDrawMediaSliderTrack with the percentage the media has loaded.
189         * rendering/RenderThemeSafari.cpp: ditto.
190         (WebCore::RenderThemeSafari::adjustSliderThumbSize):
191         (WebCore::RenderThemeSafari::paintMediaSliderTrack):
192         * rendering/RenderThemeSafari.h:
193
194 2008-01-15  Alexey Proskuryakov  <ap@webkit.org>
195
196         Reviewed by Mark Rowe.
197
198         Some logging channels weren't initialized from user defaults.
199
200         * platform/mac/LoggingMac.mm: (WebCore::InitializeLoggingChannelsIfNecessary):
201         Initialize LogPlatformLeaks, LogStorageAPI, LogMedia, LogPlugin.
202
203 2008-01-14  Steve Falkenburg  <sfalken@apple.com>
204
205         Use shared vsprops for most vcproj properties.
206         
207         Reviewed by Darin.
208
209         * WebCore.vcproj/QTMovieWin.vcproj:
210         * WebCore.vcproj/WebCore.vcproj:
211         * platform/graphics/win/QTMovieWin.cpp:
212         (QTMovieWin::initializeQuickTime): Fix compiler warning.
213
214 2008-01-14  Eric Seidel  <eric@webkit.org>
215
216         Reviewed by mjs.
217
218         Remove a couple more uses of DeprecatedString
219
220         No functional changes, thus no test case.
221
222         * dom/Document.cpp:
223         (WebCore::Document::write):
224         (WebCore::Document::writeln):
225         (WebCore::Document::recalcStyleSelector):
226         * dom/Document.h:
227
228 2008-01-14  Pierre-Luc Beaudoin  <pierre-luc.beaudoin@collabora.co.uk>
229
230         Reviewed by Alp Toker.
231
232         Build fix: missing symbols when compiling WebKit/Gtk+ with --enable-svg-filters
233         http://bugs.webkit.org/show_bug.cgi?id=16874
234
235         * GNUmakefile.am:
236         * svg/graphics/cairo/SVGResourceFilterCairo.cpp: Added.
237         (WebCore::SVGResourceFilter::createPlatformData):
238         (WebCore::SVGResourceFilter::prepareFilter):
239         (WebCore::SVGResourceFilter::applyFilter):
240
241 2008-01-14  Finnur Thorarinsson  <finnur.webkit@gmail.com>
242
243         Reviewed by hyatt & eseidel.
244
245         - fix http://bugs.webkit.org/show_bug.cgi?id=16844
246         RenderText::addLineBoxRects erroneously includes last char for boundingBox
247
248         This patch fixes an issue with addLineBoxRects not correctly calculating the 
249         rects due to an off-by-one error in using box->end(). We were assuming that 
250         end() gives the index past the last character, when in fact it gives the 
251         index _of_ the last character. 
252
253         Eric Seidel and I could not find a way to test this via DRT. This method is 
254         only used by WebKit or Safari for displaying selection rects AFAICT.
255
256         * rendering/RenderText.cpp:
257         (WebCore::RenderText::addLineBoxRects):
258
259 2008-01-14  Darin Adler  <darin@apple.com>
260
261         Reviewed by Geoff.
262
263         - fix crash seen in layout tests
264
265         * html/HTMLFrameSetElement.cpp:
266         (WebCore::HTMLFrameSetElement::attach):
267         Remove incorrect cast to HTMLElement* for parentNode(). The parent is either an
268         HTMLElement or a Document, not necessarily an HTMLElement.
269
270 2008-01-14  Darin Adler  <darin@apple.com>
271
272         Reviewed by Sam.
273
274         - fix mistakes Sam noticed in my re-speed-up patch
275
276         * dom/Element.cpp:
277         (WebCore::Element::virtualHasTagName): Moved out of header file. No reason to make
278         this inline.
279         * dom/Element.h: Moved virtualHasTagName out of header file.
280
281         * dom/Node.cpp:
282         (WebCore::Node::virtualHasTagName): Moved out of header file. No reason to make
283         this inline.
284         * dom/Node.h: Removed incorrect "virtual" on hasTagName and moved virtualHasTagName
285         out of header file.
286
287         * platform/text/StringBuffer.h: Added. Has just the new StringBuffer class.
288
289         * platform/text/StringImpl.h: Removed StringBuffer class.
290
291         * loader/DocumentLoader.cpp: Added StringBuffer.h include.
292         * platform/text/String.cpp: Ditto.
293         * platform/text/StringImpl.cpp: Ditto.
294         * platform/text/TextCodecLatin1.cpp: Ditto.
295         * platform/text/TextCodecUTF16.cpp: Ditto.
296         * platform/text/TextCodecUserDefined.cpp: Ditto.
297
298         * WebCore.vcproj/WebCore.vcproj: Added StringBuffer.h.
299         * WebCore.xcodeproj/project.pbxproj: Ditto.
300
301 2008-01-14  Dave Hyatt  <hyatt@apple.com>
302
303         Clean up all the misplaced graphics files after the recent file moves.  Clean up the project to
304         accurately reflect the location of all the graphics files.
305         
306         Reviewed by Adam
307
308         * WebCore.vcproj/WebCore.vcproj:
309         * platform/graphics/win/GraphicsContextWin.cpp: Copied from platform/win/GraphicsContextWin.cpp.
310         * platform/graphics/win/UniscribeController.cpp: Copied from platform/win/UniscribeController.cpp.
311         * platform/graphics/win/UniscribeController.h: Copied from platform/win/UniscribeController.h.
312         * platform/win/GraphicsContextWin.cpp: Removed.
313         * platform/win/UniscribeController.cpp: Removed.
314         * platform/win/UniscribeController.h: Removed.
315
316 2008-01-14  Geoffrey Garen  <ggaren@apple.com>
317
318         Reviewed by Sam Weinig.
319         
320         Some cleanup to my last patch.
321
322         Removed one unused setter declaration and one unused setter definition.
323         
324         Renamed DoNotCheckDomainSecurityOnRead to DoNotCheckDomainSecurityOnGet
325         because "get" is all over the IDL files, and "read" is not.
326
327         * bindings/scripts/CodeGeneratorJS.pm:
328         * page/DOMWindow.h:
329         (WebCore::DOMWindow::defaultstatus):
330         * page/DOMWindow.idl:
331
332 2008-01-14  Dan Bernstein  <mitz@apple.com>
333
334         Rubber-stamped by Alice Liu.
335
336         - remove reference to nonexistent file
337
338         * WebCore.vcproj/WebCore.vcproj: Removed reference to SVGFont.h.
339
340 2008-01-14  Darin Adler  <darin@apple.com>
341
342         Reviewed by Adam.
343
344         - re-speed-up the page load test (my StringImpl change slowed it down)
345           <rdar://problem/5677241> 1.5% PLT regression from r29098
346
347         To reverse the slowdown I caused by changing StringImpl, I tightened it up,
348         and also did a little optimization in the HTML tokenizer and in other clients
349         of Vector.
350
351         * WebCore.base.exp: Removed export of a now-inline function.
352
353         * css/CSSParser.cpp:
354         (WebCore::CSSParser::parseTransitionProperty): Removed use of DeprecatedString
355         to get property ID. This could be sped up even more by writing a fast path
356         to use a local Vector<char> rather than allocating a string.
357         (WebCore::convertASCIIToFloat): Added. Allows numeric conversion without
358         allocating a string object to hold the number.
359         (WebCore::CSSParser::lex): Changed to call convertASCIIToFloat instead of
360         DeprecatedString::toFloat.
361
362         * dom/Element.h:
363         (WebCore::Element::hasTagName): Made this non-virtual and inline if you have
364         an Element*. It's still virtual if you have a Node*.
365         (WebCore::Element::virtualHasTagName): Virtual version that makes the Node*
366         case work.
367
368         * dom/Node.h:
369         (WebCore::Node::hasTagName): Made this non-virtual and inline so that Element
370         can override it with an inline. This is the same technique we use for
371         firstChild and lastChild.
372         (WebCore::Node::virtualHasTagName): This is the private virtual that Element
373         overrides.
374
375         * dom/Text.cpp:
376         (WebCore::Text::splitText): Clean up by using a RefPtr here instead of a
377         PassRefPtr.
378
379         * html/HTMLTokenizer.cpp:
380         (WebCore::HTMLTokenizer::parseSpecial): Use the new advancePastNonNewline(),
381         which is more efficient in cases where we know the character is not a newline
382         and hence we don't have to update the line number.
383         (WebCore::HTMLTokenizer::parseComment): Ditto.
384         (WebCore::HTMLTokenizer::parseServer): Ditto.
385         (WebCore::HTMLTokenizer::parseProcessingInstruction): Ditto.
386         (WebCore::HTMLTokenizer::parseText): Ditto.
387         (WebCore::HTMLTokenizer::parseEntity): Ditto.
388         (WebCore::HTMLTokenizer::parseTag): Ditto. Also streamline the QuotedValue case
389         so there's one less branch taken for non-punctuation characters since this
390         code path is *so* hot.
391         (WebCore::HTMLTokenizer::write): More of the same.
392
393         * loader/Cache.cpp:
394         (WebCore::Cache::lruListFor): Use Vector::grow instead of resize.
395
396         * loader/DocumentLoader.cpp:
397         (WebCore::canonicalizedTitle): Use StringBuffer instead of Vector<UChar>.
398
399         * loader/TextResourceDecoder.cpp:
400         (WebCore::TextResourceDecoder::checkForCSSCharset): Use Vector::grow instead of resize.
401         (WebCore::TextResourceDecoder::checkForHeadCharset): Ditto.
402         (WebCore::TextResourceDecoder::decode): Use Vector::grow and shrink instead of resize.
403         (WebCore::TextResourceDecoder::flush): Use Vector::shrink instead of resize.
404
405         * platform/KURL.cpp:
406         (WebCore::KURL::decode_string): Use Vector::grow instead of resize.
407
408         * platform/SharedBuffer.cpp:
409         (WebCore::SharedBuffer::clear): Use Vector::shrink instead of resize.
410
411         * platform/graphics/BitmapImage.cpp:
412         (WebCore::BitmapImage::cacheFrame): Use Vector::grow instead of resize.
413
414         * platform/network/FormData.cpp:
415         (WebCore::FormData::appendData): Use Vector::grow instead of resize.
416         (WebCore::FormData::flatten): Ditto.
417
418         * platform/text/AtomicString.cpp:
419         (WebCore::CStringTranslator::translate): Use a new StringImpl constructor made just
420         for use by AtomicString. Avoids setting fields twice, and also preserves reference
421         count behavior (which I changed for the other constructors, since they're entirely
422         private and used only inside the class).
423         (WebCore::UCharBufferTranslator::translate): Ditto.
424
425         * platform/text/Base64.cpp:
426         (WebCore::base64Encode): Use Vector::grow instead of resize.
427         (WebCore::base64Decode): Use Vector::grow and shrink instead of resize.
428
429         * platform/text/PlatformString.h:
430         (WebCore::String::adopt): Added an overload for the new StringBuffer class. Also
431         made both versions inline.
432
433         * platform/text/SegmentedString.h:
434         (WebCore::SegmentedString::advancePastNewline): Added. One less branch for case
435         where the character is known to be a newline.
436         (WebCore::SegmentedString::advancePastNonNewline): Added. Less code for case where
437         the character is known not to be a newline.
438
439         * platform/text/String.cpp:
440         (WebCore::String::append): Use StringBuffer instead of Vector<UChar>.
441         (WebCore::String::insert): Ditto.
442         (WebCore::String::truncate): Ditto.
443         (WebCore::String::remove): Ditto.
444         (WebCore::String::format): Use Vector::grow instead of resize.
445
446         * platform/text/StringImpl.cpp:
447         (WebCore::StringImpl::StringImpl): Changed constructors to start with a refCount
448         of 1 instead of 0, and made them all inline. Eliminates the WithOneRef constructor
449         since they all behave this way now. The only exceptions are the constructors for
450         AtomicString, which retain the old behavior.
451         (WebCore::StringImpl::empty): Simplified, since we no longer need to use the
452         special WithOneRef constructor.
453         (WebCore::StringImpl::toCoordsArray): Use StringBuffer instead of Vector<UChar>.
454         (WebCore::StringImpl::lower): Ditto.
455         (WebCore::StringImpl::upper): Ditto.
456         (WebCore::StringImpl::secure): Ditto.
457         (WebCore::StringImpl::foldCase): Ditto.
458         (WebCore::StringImpl::simplifyWhiteSpace): Ditto. Also change to use Vector::shrink
459         instead of resize (since half of the function uses Vector<UChar>).
460         (WebCore::StringImpl::capitalize): Use StringBuffer instead of Vector<UChar>.
461         (WebCore::StringImpl::replace): Ditto.
462         (WebCore::StringImpl::ascii): Streamlined a bit.
463         (WebCore::StringImpl::createStrippingNullCharacters): Use StringBuffer insetad of
464         Vector<UChar>. Took out checks for null characters and 0 length that aren't needed.
465         Coded the check for null characters in a slightly more efficient way. Since this
466         is so hot, didn't call adopt at all, putting the code right in here, including
467         the call to the StringImpl constructor and adoptRef (for the fast case).
468         (WebCore::StringImpl::adopt): Added a version for the new StringBuffer class.
469         Removed the attempt to resize the buffer at the time we adopt based on measuring
470         actual use and realizing that it's just a character here or there and not worth
471         a call to fastRealloc. Changed to use adoptRef since the constructor now starts
472         with a refCount of 1.
473         (WebCore::StringImpl::create): Changed to use adoptRef since the constructor now
474         starts with a refCount of 1.
475         (WebCore::StringImpl::createWithTerminatingNullCharacter): Ditto.
476         (WebCore::StringImpl::copy): Ditto. Also made non-inline since the constructor
477         itself is now inline.
478
479         * platform/text/StringImpl.h: Added a StringBuffer class that's useful for
480         putting characters into a buffer before creating an immutable string. Not good
481         at resizing the way Vector<UChar> is, so only useful for things that rarely need
482         to be resized. Added a new AdoptBuffer constructor and empty constructor, but
483         made all constructors private so they can be inlined and only used inside the
484         StringImpl class. Added two new constructors for AtomicString. Made copy()
485         no longer inline. Changed the type of the [] operator to unsigned instead of
486         int and added an assertion. Made the hash functions inline.
487
488         * platform/text/TextCodecICU.cpp:
489         (WebCore::TextCodecICU::encode): Use Vector::grow instead of resize.
490
491         * platform/text/TextCodecLatin1.cpp:
492         (WebCore::TextCodecLatin1::decode): Use StringBuffer instead of Vector<UChar>.
493         (WebCore::encodeComplexWindowsLatin1): Use Vector::grow instead of resize.
494
495         * platform/text/TextCodecUTF16.cpp:
496         (WebCore::TextCodecUTF16::decode): Use StringBuffer instead of Vector<UChar>.
497
498         * platform/text/TextCodecUserDefined.cpp:
499         (WebCore::TextCodecUserDefined::decode): Use StringBuffer instead of Vector<UChar>.
500         (WebCore::encodeComplexUserDefined): Use Vector::grow instead of resize.
501
502         * platform/text/TextEncoding.cpp:
503         (WebCore::TextEncoding::encode): Use Vector::grow instead of resize.
504
505         * platform/text/TextStream.cpp:
506         (WebCore::TextStream::operator<<): Use Vector::grow instead of resize.
507
508         * platform/text/mac/TextCodecMac.cpp:
509         (WebCore::TextCodecMac::encode): Use Vector::grow instead of resize.
510
511         * rendering/AutoTableLayout.cpp:
512         (WebCore::AutoTableLayout::insertSpanCell): Use Vector::grow instead of resize.
513
514         * rendering/RenderFrameSet.h:
515         (WebCore::FrameEdgeInfo::FrameEdgeInfo): Allocate vectors with the correct initial
516         size instead of calling resize on them after allocating empty.
517
518         * rendering/RenderListMarker.cpp:
519         (WebCore::RenderListMarker::paint): Use Vector::grow instead of resize.
520
521         * rendering/RenderStyle.cpp: Removed CursorList::operator==.
522         * rendering/RenderStyle.h:
523         (WebCore::CursorList::operator==): Implemented using the Vector ==.
524         (WebCore::CursorList::operator!=): Ditto.
525
526         * rendering/RenderTable.cpp:
527         (WebCore::RenderTable::splitColumn): Use Vector::grow instead of resize.
528         (WebCore::RenderTable::appendColumn): Ditto.
529
530         * rendering/RenderTableSection.cpp:
531         (WebCore::RenderTableSection::ensureRows): Use Vector::grow instead of resize.
532
533         * rendering/bidi.cpp:
534         (WebCore::addMidpoint): Use Vector::grow instead of resize.
535
536         * xml/XPathNodeSet.h:
537         (WebCore::XPath::NodeSet::clear): Use Vector::shrink instead of resize.
538
539 2008-01-13  Steve Falkenburg  <sfalken@apple.com>
540
541         Share common files across projects.
542         
543         Unify vsprops files
544         Debug:          common.vsprops, debug.vsprops
545         Debug_Internal: common.vsprops, debug.vsprops, debug_internal.vsprops
546         Release:        common.vsprops, release.vsprops
547         
548         Shared properties can go into common.vsprops, shared debug settings can go into debug.vsprops.
549         debug_internal.vsprops will be mostly empty except for file path prefix modifiers.
550
551         Pull auto-version.sh, VERSION, and PRODUCTVERSION from tools.
552
553         Reviewed by Adam Roben.
554
555         * WebCore.vcproj/PRODUCTVERSION: Removed.
556         * WebCore.vcproj/QTMovieWin.vcproj:
557         * WebCore.vcproj/VERSION: Removed.
558         * WebCore.vcproj/WebCore.vcproj:
559         * WebCore.vcproj/auto-version.sh: Removed.
560         * WebCore.vcproj/debug.vsprops: Removed.
561         * WebCore.vcproj/debug_internal.vsprops: Removed.
562         * WebCore.vcproj/release.vsprops: Removed.
563
564 2008-01-13  Dan Bernstein  <mitz@apple.com>
565
566         Reviewed by Darin Adler.
567
568         - fix http://bugs.webkit.org/show_bug.cgi?id=16865
569           fast/layers/resize-layer-deletion-crash.html crashes under GuardMalloc
570
571         * rendering/RenderBox.cpp:
572         (WebCore::RenderBox::destroy): Removed the call to
573         RenderLayer::destroy() from here, because ~RenderLayer() calls
574         RenderObject() methods.
575         * rendering/RenderObject.cpp:
576         (WebCore::RenderObject::destroy): Added the call to
577         RenderLayer::destroy() here.
578
579 2008-01-13  Eric Seidel  <eric@webkit.org>
580
581         Reviewed by darin.
582
583         Range.insertNode does not update endContainer endIndex correctly
584         in the case where it had to split a text node.
585         http://bugs.webkit.org/show_bug.cgi?id=16765
586         
587         Darin pointed out during review that we still don't handle the dynamic
588         range case (where the dom tree changes not using range methods)
589         Thus this code will get ripped out when we add that.  The test cases
590         are still valid and useful however, so I'm landing this as-is.
591
592         Tests: fast/dom/Range/range-insertNode-separate-endContainer.html
593                fast/dom/Range/range-insertNode-splittext.html
594
595         * dom/Range.cpp:
596         (WebCore::Range::insertNode): handle the splitText case correctly.
597
598 2008-01-13  Darin Adler  <darin@apple.com>
599
600         Reviewed by Eric.
601
602         - http://bugs.webkit.org/show_bug.cgi?id=16861
603           get rid of unnecessary string copying
604
605         * dom/Document.cpp:
606         (WebCore::Document::setDomain): Removed unneeded call to copy.
607         (WebCore::Document::parseQualifiedName): Removed unneeded call to copy, and
608         unneeded length argument to substring, which stops at the end of the string
609         if you don't specify a length.
610         (WebCore::Document::createAttributeNS): Replaced code that was calling copy
611         with more-efficient code using the substring function.
612         * dom/StyledElement.cpp:
613         (WebCore::StyledElement::addCSSColor): Removed unneeded call to copy.
614         * editing/InsertIntoTextNodeCommand.cpp:
615         (WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand): Removed
616         unneeded copy and also initialized text instead of assigning to it.
617         (WebCore::InsertIntoTextNodeCommand::doApply): Removed redundant assertions.
618         (WebCore::InsertIntoTextNodeCommand::doUnapply): Ditto.
619
620         * editing/htmlediting.cpp:
621         (WebCore::stringWithRebalancedWhitespace): Removed unneeded call to copy.
622         This one was particularly bad since we just turned around and copied it again!
623
624         * editing/markup.cpp:
625         (WebCore::stringValueForRange): Removed unneeded call to copy.
626
627         * loader/icon/IconDatabase.cpp:
628         (WebCore::IconDatabase::performOpenInitialization): Changed logging code to not
629         get the path from the database object. This was the only reason the database
630         had to keep its path around.
631
632         * platform/sql/SQLiteDatabase.cpp:
633         (WebCore::SQLiteDatabase::open): Use a local variable instead of a data member to
634         convert the string to a null-terminated one.
635         (WebCore::SQLiteDatabase::close): Removed the code to clear out m_path.
636         * platform/sql/SQLiteDatabase.h: Removed the m_path data member and the path
637         functio member. Also tweaked formatting and comments a bit. Removed the unused
638         escapeSQLString function.
639
640         * platform/text/String.cpp: (WebCore::operator+): Removed uneeded calls to copy.
641
642 2008-01-13  Oliver Hunt  <oliver@apple.com>
643
644         Attempt to fix QT build
645
646         * html/CanvasRenderingContext2D.cpp:
647         (WebCore::CanvasRenderingContext2D::willDraw):
648
649 2008-01-13  Oliver Hunt  <oliver@apple.com>
650
651         Reviewed by Mark Rowe.
652
653         Avoid repainting the entire canvas element when possible.
654
655         http://bugs.webkit.org/show_bug.cgi?id=16859
656
657         We now only register the dirty regions of a canvas for repainting, rather
658         than the entire element (though repaint coalescing may choose to combine
659         these regions).  This doesn't cause a measurable regression in the worst
660         case (clearing the canvas repeatedly), but is a moderate-large win if only
661         a minor update has occurred.  If there is any CSS scaling applied to the
662         canvas almost any update short of clearing the entire element is substantially
663         faster.
664
665         * html/CanvasRenderingContext2D.cpp:
666         (WebCore::CanvasRenderingContext2D::willDraw):
667         * html/HTMLCanvasElement.cpp:
668         (WebCore::HTMLCanvasElement::willDraw):
669
670 2008-01-13  Michael Goddard  <michael.goddard@trolltech.com>
671
672         Reviewed by Anders Carlsson.
673
674         Move RuntimeObjectImp creations into Instance.
675         Make the ctor protected, and Instance a friend class, so
676         that all creation of RuntimeObjectImps goes through
677         one place.
678
679         * bindings/js/kjs_dom.cpp:
680         (WebCore::getRuntimeObject):
681
682 2008-01-12  Rodney Dawes  <dobey@wayofthemonkey.com>
683
684         Gtk debug build fix.  Reviewed by Mark Rowe.
685
686         Add plugin logging channel, and use it rather than Win32-specific debugging methods _RPTF1 _RPTF2 and _CRT_WARN.
687
688         * WebCore.pro: Add plugins directory to DEPENDPATH so dependencies are correctly tracked.
689         * platform/Logging.cpp:
690         * platform/Logging.h:
691         * plugins/PluginDebug.h:
692
693 2008-01-12  Adam Barth  <hk9565@gmail.com>
694
695         Reviewed by Maciej (and also tweaked a little bit).
696
697         - more thorough fix for some crashing tests
698           http://bugs.webkit.org/show_bug.cgi?id=16782
699
700         * loader/FrameLoader.cpp:
701         (WebCore::FrameLoader::urlSelected):
702         (WebCore::FrameLoader::submitForm):
703         (WebCore::FrameLoader::executeIfJavaScriptURL):
704         * loader/FrameLoader.h:
705
706 2008-01-12  Maciej Stachowiak  <mjs@apple.com>
707
708         Reviewed by Sam.
709
710         - fixed <rdar://problem/5556374> REGRESSION: cross-domain error when one URL uses an explicit port number and another doesn't
711         
712         * platform/SecurityOrigin.cpp:
713         (WebCore::isDefaultPortForProtocol):
714         (WebCore::SecurityOrigin::SecurityOrigin):
715
716 2008-01-11  Geoffrey Garen  <ggaren@apple.com>
717
718         Reviewed by Oliver Hunt.
719         
720         Fixed <rdar://problem/5665251> REGRESSION (r28880-r28886): Global
721         variable access (16644)
722         
723         Removed the ReadOnly bit from some properties, to match Firefox. Also
724         removed status-related setters, to allow using their names as variable
725         names.
726         
727         * bindings/scripts/CodeGeneratorJS.pm: Added support for properties that
728         are one-way across domain boundaries, to match Firefox.
729
730         * bindings/js/kjs_window.cpp: Changed ReadOnly declarations to match FF.
731
732         * bindings/scripts/CodeGeneratorJS.pm: Don't use JSObject:: because
733         we don't know that JSObject is our base class.
734
735         * page/DOMWindow.idl: Replaced lots of readonly declarations with
736         [Replaceable] declarations.
737
738         * page/DOMWindow.h: Removed interfaces for setting status text via the
739         DOM. (They were getting in the way of, e.g., "var status"
740         declarations.) By default, IE 7 and FF disable these interfaces in order
741         to defend against phishing attacks that try to spoof domain names in the
742         statusbar.
743         * page/DOMWindow.cpp:
744
745 2008-01-11  Anyang Ren  <anyang.ren@gmail.com>
746
747         Reviewed by Darin Adler.
748
749         http://bugs.webkit.org/show_bug.cgi?id=15960
750         The view source mode should skip an empty attribute value only if
751         the attribute name is not followed by an equal sign (=).
752
753         Test: fast/frames/viewsource-empty-attribute-value.html
754
755         * html/HTMLViewSourceDocument.cpp:
756         (WebCore::HTMLViewSourceDocument::addViewSourceToken):
757
758 2008-01-11  Sylvain Pasche  <sylvain.pasche@gmail.com>
759
760         Reviewed by Alp Toker.
761
762         [Gtk] Uneven glyph spacing with subpixel antialiasing
763         http://bugs.webkit.org/show_bug.cgi?id=16715
764
765         Use cairo font options from the default GDK screen when creating a
766         scaled font.
767
768         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
769         (WebCore::FontPlatformData::FontPlatformData):
770
771 2008-01-11  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
772
773         Reviewed by Maciej.
774
775         Added a new forwarding header, because Activation.h has been separated
776         from function.h
777
778         * ForwardingHeaders/kjs/Activation.h: Added.
779
780 2008-01-11  Luca Bruno  <lethalman88@gmail.com>
781
782         Reviewed by Alp Toker.
783
784         http://bugs.webkit.org/show_bug.cgi?id=16729
785         [cURL] Allow multiple files for upload
786
787         * platform/network/ResourceHandleInternal.h:
788         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
789         * platform/network/curl/ResourceHandleCurl.cpp:
790         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
791         * platform/network/curl/ResourceHandleManager.cpp:
792         (WebCore::readCallback): added
793         (WebCore::ResourceHandleManager::setupPOST): setup for streaming the POST
794         (WebCore::ResourceHandleManager::startJob):
795         (WebCore::ResourceHandleManager::cancel): revert the previous patch for regression
796         * platform/network/curl/ResourceHandleManager.h:
797
798 2008-01-11  Christian Dywan  <christian@imendio.com>
799
800         Reviewed by Alp Toker.
801
802         [Gtk] Menu items need underscores
803         http://bugs.webkit.org/show_bug.cgi?id=16817
804
805         Add underscores to appropriate menu labels.
806         Also adjust strings slightly.
807
808         * platform/gtk/ContextMenuItemGtk.cpp:
809         (WebCore::ContextMenuItem::createNativeMenuItem):
810         * platform/gtk/LocalizedStringsGtk.cpp:
811         (WebCore::searchableIndexIntroduction):
812         (WebCore::fileButtonChooseFileLabel):
813         (WebCore::fileButtonNoFileSelectedLabel):
814         (WebCore::contextMenuItemTagOpenLinkInNewWindow):
815         (WebCore::contextMenuItemTagDownloadLinkToDisk):
816         (WebCore::contextMenuItemTagCopyLinkToClipboard):
817         (WebCore::contextMenuItemTagOpenImageInNewWindow):
818         (WebCore::contextMenuItemTagDownloadImageToDisk):
819         (WebCore::contextMenuItemTagCopyImageToClipboard):
820         (WebCore::contextMenuItemTagOpenFrameInNewWindow):
821         (WebCore::contextMenuItemTagCopy):
822         (WebCore::contextMenuItemTagGoBack):
823         (WebCore::contextMenuItemTagGoForward):
824         (WebCore::contextMenuItemTagStop):
825         (WebCore::contextMenuItemTagReload):
826         (WebCore::contextMenuItemTagCut):
827         (WebCore::contextMenuItemTagPaste):
828         (WebCore::contextMenuItemTagIgnoreSpelling):
829         (WebCore::contextMenuItemTagLearnSpelling):
830         (WebCore::contextMenuItemTagSearchWeb):
831         (WebCore::contextMenuItemTagLookUpInDictionary):
832         (WebCore::contextMenuItemTagOpenLink):
833         (WebCore::contextMenuItemTagIgnoreGrammar):
834         (WebCore::contextMenuItemTagSpellingMenu):
835         (WebCore::contextMenuItemTagShowSpellingPanel):
836         (WebCore::contextMenuItemTagCheckSpelling):
837         (WebCore::contextMenuItemTagCheckSpellingWhileTyping):
838         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
839         (WebCore::contextMenuItemTagFontMenu):
840         (WebCore::contextMenuItemTagBold):
841         (WebCore::contextMenuItemTagItalic):
842         (WebCore::contextMenuItemTagUnderline):
843         (WebCore::contextMenuItemTagOutline):
844         (WebCore::contextMenuItemTagWritingDirectionMenu):
845         (WebCore::contextMenuItemTagDefaultDirection):
846         (WebCore::contextMenuItemTagLeftToRight):
847         (WebCore::contextMenuItemTagRightToLeft):
848         (WebCore::contextMenuItemTagInspectElement):
849         (WebCore::searchMenuClearRecentSearchesText):
850
851 2008-01-11  Ada Chan  <adachan@apple.com>
852
853         <rdar://problem/5681557> On Windows Safari, mouse events are ignored after clicking on link that triggers download
854         Moved the call to cache page from provisionalLoadStarted() to commitProvisionalLoad(), since 
855         provisionalLoadStarted() can be called for cases that do not result in a page navigation, for example,
856         when a link to download a file has been clicked.
857
858         Reviewed by John and Anders.
859
860         * loader/FrameLoader.cpp:
861         (WebCore::FrameLoader::provisionalLoadStarted):
862         (WebCore::FrameLoader::commitProvisionalLoad):
863
864 2008-01-11  Jon Honeycutt  <jhoneycutt@apple.com>
865
866         Reviewed by Anders.
867
868         <rdar://problem/5683529> plugins/embed-inside-object.html is timing
869         out/failing
870
871         Revert to using FrameTree::find() so that frame aliases like "_self" and
872         "_current" are interpreted properly
873
874         * plugins/win/PluginViewWin.cpp:
875         (WebCore::PluginViewWin::performRequest):
876         (WebCore::PluginViewWin::load):
877
878 2008-01-11  Alp Toker  <alp@atoker.com>
879
880         Reviewed by Dave Hyatt and Mark Rowe.
881
882         http://bugs.webkit.org/show_bug.cgi?id=16089
883         [GTK] Support custom fonts, CachedFont::platformDataFromCustomData()
884
885         Add support for CSS2 @font-face custom/downloadable fonts to the GTK+
886         port.
887
888         * GNUmakefile.am:
889         * WebCore.pro:
890         * loader/CachedFont.cpp:
891         (WebCore::CachedFont::~CachedFont):
892         (WebCore::CachedFont::ensureCustomFontData):
893         (WebCore::CachedFont::platformDataFromCustomData):
894         (WebCore::CachedFont::allReferencesRemoved):
895         * platform/graphics/gtk/FontCustomPlatformData.cpp: Added.
896         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
897         (WebCore::FontCustomPlatformData::fontPlatformData):
898         (WebCore::releaseData):
899         (WebCore::createFontCustomPlatformData):
900         * platform/graphics/gtk/FontCustomPlatformData.h: Added.
901         (WebCore::FontCustomPlatformData::FontCustomPlatformData):
902         * platform/graphics/gtk/FontPlatformData.h:
903         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
904         (WebCore::FontPlatformData::FontPlatformData):
905         (WebCore::FontPlatformData::init):
906         (WebCore::FontPlatformData::isFixedPitch):
907         * platform/graphics/gtk/SimpleFontDataGtk.cpp:
908         (WebCore::SimpleFontData::platformDestroy):
909
910 2008-01-11  Adam Roben  <aroben@apple.com>
911
912         Remove FrameLoader::committedFirstRealDocumentLoad
913         
914         This method no longer has any callers.
915
916         Reviewed by Hyatt.
917
918         * loader/FrameLoader.h:
919
920 2008-01-11  Antti Koivisto  <antti@apple.com>
921
922         Add a standalone version of the blog post video player as a manual test.
923
924         * manual-tests/resources/touch-poster.png: Added.
925         * manual-tests/video-player.html: Added.
926
927 2008-01-10  Antti Koivisto  <antti@apple.com>
928
929         Reviewed by Adam.
930
931         Fix <rdar://problem/5682767>
932         Video does not show up in http://webkit.org/blog/140/html5-media-support/ on Windows
933         
934         Take care that GWorld is created and deletes when needed as size or visibility changes.
935
936         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
937         (WebCore::MediaPlayerPrivate::load):
938         * platform/graphics/win/QTMovieWin.cpp:
939         (QTMovieWinPrivate::QTMovieWinPrivate):
940         (QTMovieWinPrivate::updateGWorld):
941         (QTMovieWinPrivate::setSize):
942         (QTMovieWin::setVisible):
943         (QTMovieWin::initializeQuickTime):
944
945 2008-01-11  David Hyatt  <hyatt@apple.com>
946
947         Fix for bug 11188, setting hspace on a table overrides align=center.  Fix align=center to be done using
948         mapped attributes so that it does not get overridden by hspace all the time.
949
950         Reviewed by mitz
951
952         Added fast/table/table-hspace-align-center.html
953
954         * css/html4.css:
955         * html/HTMLTableElement.cpp:
956         (WebCore::HTMLTableElement::parseMappedAttribute):
957
958 2008-01-11  Mark Rowe  <mrowe@apple.com>
959
960         Qt build fix.
961
962         * platform/qt/TemporaryLinkStubs.cpp: Include CString.h.
963
964 2008-01-11  Mark Rowe  <mrowe@apple.com>
965
966         Qt build fix.  Add link stubs for the new FileSystem.h functions introduced
967         in r29399.
968
969         * platform/qt/TemporaryLinkStubs.cpp:
970         (WebCore::openTemporaryFile):
971
972 2008-01-11  Rodney Dawes  <dobey@wayofthemonkey.com>
973
974         Reviewed by Anders Carlsson.
975
976         Bug 16779: Make the PluginStream implementation be shared across platforms
977         http://bugs.webkit.org/show_bug.cgi?id=16779
978
979         Add the new shared PluginStream files to the GTK+ and Win32 builds.
980         Add PluginStreamClient class for the streamDidFinishLoading method.
981         Add open/close/write methods to FileSystem for temporary file handling.
982         Add PluginDebug.h and npfunctions.h for shared PluginStream.
983         Add shared PluginStream.
984         Remove PluginStreamWin.
985         Update PluginViewWin to use shared PluginStream and PluginStreamClass.
986
987         * GNUmakefile.am:
988         * WebCore.pro:
989         * WebCore.vcproj/WebCore.vcproj:
990         * platform/FileSystem.h:
991         * platform/gtk/FileSystemGtk.cpp:
992         * platform/win/FileSystemWin.cpp:
993         * plugins/PluginDebug.h:
994         * plugins/PluginStream.cpp:
995         * plugins/PluginStream.h:
996         * plugins/npfunctions.h:
997         * plugins/win/PluginDebug: Moved to PluginDebug.h.
998         * plugins/win/PluginStreamWin.cpp: Moved to PluginStream.cpp.
999         * plugins/win/PluginStreamWin.h: Moved to PluginStream.h
1000         * plugins/win/PluginViewWin.cpp:
1001         * plugins/win/PluginViewWin.h:
1002         * plugins/win/npfunctions.h: Moved to npfunctions.h
1003
1004 2008-01-11  Geoffrey Garen  <ggaren@apple.com>
1005
1006         Try to fix Mac build: Edit the right .exp file.
1007
1008         * WebCore.base.exp:
1009
1010 2008-01-11  Geoffrey Garen  <ggaren@apple.com>
1011
1012         Try to fix Qt build: don't use pthreads if they're not available.
1013
1014         * bindings/js/GCController.cpp:
1015
1016 2008-01-10  Geoffrey Garen  <ggaren@apple.com>
1017
1018         Reviewed by John Sullivan.
1019
1020         Fixed some world leak reports:
1021         * <rdar://problem/5669436> PLT complains about world leak of 1 JavaScript
1022         Interpreter after running cvs-base suite
1023
1024         * <rdar://problem/5669423> PLT complains about world leak if browser
1025         window is open when PLT starts
1026         
1027         These were both bugs in the reporting mechanism, so I took the
1028         opportunity to do some house cleaning there.
1029
1030         Stupid class, I kill you:
1031         * bridge/JavaScriptStatistics.cpp: Removed.
1032         * bridge/JavaScriptStatistics.h: Removed.
1033
1034         * bindings/js/GCController.h: Adopted the only useful features of
1035         JavaScriptStatistics, since they were GC-related.
1036         * bindings/js/GCController.cpp:
1037
1038 2008-01-10  Eric Seidel  <eric@webkit.org>
1039
1040         Reviewed by Adele.
1041
1042         No functional changes, only code cleanup.
1043
1044         * css/MediaQueryEvaluator.cpp:
1045         (WebCore::compareValue): renamed from cmpvalue
1046         (WebCore::colorMediaFeatureEval):
1047         (WebCore::device_aspect_ratioMediaFeatureEval):
1048         (WebCore::device_pixel_ratioMediaFeatureEval):
1049         (WebCore::gridMediaFeatureEval):
1050         (WebCore::device_heightMediaFeatureEval):
1051         (WebCore::device_widthMediaFeatureEval):
1052         (WebCore::heightMediaFeatureEval):
1053         (WebCore::widthMediaFeatureEval):
1054
1055 2008-01-10  Dan Bernstein  <mitz@apple.com>
1056
1057         Reviewed by Anders Carlsson.
1058
1059         - fix a crash when calling alert() from a repeating timer
1060
1061         On non-Mac platforms, the PageGroupLoadDeferrer pauses DOM timers during
1062         alert() and other similar functions, which deletes the actual
1063         DOMWindowTimer objects and replaces them with new objects when resuming.
1064
1065         * bindings/js/kjs_window.cpp:
1066         (KJS::Window::timerFired): Re-fetch the timer object from the map in
1067         case it has been deleted or replaced.
1068
1069 2008-01-10  Maciej Stachowiak  <mjs@apple.com>
1070
1071         Reviewed by Sam.
1072
1073         - remove SecurityOriginData and fold its functionality into SecurityOrigin
1074
1075         * GNUmakefile.am:
1076         * WebCore.base.exp:
1077         * WebCore.pro:
1078         * WebCore.vcproj/WebCore.vcproj:
1079         * WebCore.xcodeproj/project.pbxproj:
1080         * WebCoreSources.bkl:
1081         * bindings/js/JSDOMWindowCustom.cpp:
1082         (WebCore::JSDOMWindow::postMessage):
1083         * dom/Document.cpp:
1084         (WebCore::Document::domain):
1085         * page/Chrome.cpp:
1086         (WebCore::Chrome::requestQuotaIncreaseForNewDatabase):
1087         (WebCore::Chrome::requestQuotaIncreaseForDatabaseOperation):
1088         * page/Chrome.h:
1089         * page/ChromeClient.h:
1090         * platform/SecurityOrigin.cpp:
1091         (WebCore::SecurityOrigin::copy):
1092         (WebCore::SecurityOrigin::createFromIdentifier):
1093         (WebCore::SecurityOrigin::stringIdentifier):
1094         * platform/SecurityOrigin.h:
1095         (WebCore::SecurityOrigin::host):
1096         (WebCore::SecurityOrigin::protocol):
1097         (WebCore::SecurityOrigin::port):
1098         (WebCore::SecurityOrigin::equal):
1099         * platform/SecurityOriginData.cpp: Removed.
1100         * platform/SecurityOriginData.h: Removed.
1101         * storage/Database.cpp:
1102         (WebCore::Database::openDatabase):
1103         (WebCore::Database::Database):
1104         (WebCore::Database::securityOriginCopy):
1105         * storage/Database.h:
1106         * storage/DatabaseTracker.cpp:
1107         (WebCore::SecurityOriginHash::hash):
1108         (WebCore::SecurityOriginHash::equal):
1109         (WebCore::SecurityOriginTraits::deletedValue):
1110         (WebCore::SecurityOriginTraits::emptyValue):
1111         (WebCore::DatabaseTracker::canEstablishDatabase):
1112         (WebCore::DatabaseTracker::hasEntryForOrigin):
1113         (WebCore::DatabaseTracker::hasEntryForDatabase):
1114         (WebCore::DatabaseTracker::establishEntryForOrigin):
1115         (WebCore::DatabaseTracker::fullPathForDatabase):
1116         (WebCore::DatabaseTracker::populateOrigins):
1117         (WebCore::DatabaseTracker::origins):
1118         (WebCore::DatabaseTracker::databaseNamesForOrigin):
1119         (WebCore::DatabaseTracker::detailsForNameAndOrigin):
1120         (WebCore::DatabaseTracker::setDatabaseDetails):
1121         (WebCore::DatabaseTracker::usageForDatabase):
1122         (WebCore::DatabaseTracker::usageForOrigin):
1123         (WebCore::DatabaseTracker::quotaForOrigin):
1124         (WebCore::DatabaseTracker::setQuota):
1125         (WebCore::DatabaseTracker::addDatabase):
1126         (WebCore::DatabaseTracker::deleteAllDatabases):
1127         (WebCore::DatabaseTracker::deleteDatabasesWithOrigin):
1128         (WebCore::DatabaseTracker::deleteDatabase):
1129         (WebCore::DatabaseTracker::deleteDatabaseFile):
1130         (WebCore::notificationQueue):
1131         (WebCore::DatabaseTracker::scheduleNotifyDatabaseChanged):
1132         (WebCore::DatabaseTracker::notifyDatabasesChanged):
1133         * storage/DatabaseTracker.h:
1134         * storage/DatabaseTrackerClient.h:
1135         * storage/SQLTransaction.cpp:
1136         (WebCore::SQLTransaction::openTransactionAndPreflight):
1137         (WebCore::SQLTransaction::runStatements):
1138         (WebCore::SQLTransaction::deliverQuotaIncreaseCallback):
1139         (WebCore::SQLTransaction::postflightAndCommit):
1140         (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback):
1141         * svg/graphics/SVGImageEmptyClients.h:
1142         (WebCore::SVGEmptyChromeClient::requestQuotaIncreaseForNewDatabase):
1143         (WebCore::SVGEmptyChromeClient::requestQuotaIncreaseForDatabaseOperation):
1144
1145 2008-01-10  Anders Carlsson  <andersca@apple.com>
1146
1147         Reviewed by Sam.
1148
1149         Use the correct frame loader load method. Using the old method would not cause a 
1150         new window to be open if the frame navigation was not allowed.
1151         
1152         * plugins/win/PluginViewWin.cpp:
1153         (WebCore::PluginViewWin::performRequest):
1154
1155 2008-01-10  Alp Toker  <alp@atoker.com>
1156
1157         SVG font build fix for GTK+/autotools.
1158
1159         * GNUmakefile.am:
1160
1161 2008-01-10  Adam Barth  <hk9565@gmail.com>
1162
1163         Reviewed by Sam Weinig and Anders Carlsson.
1164
1165         Fixes: http://bugs.webkit.org/show_bug.cgi?id=16522
1166         <rdar://problem/5657355>
1167
1168         This patch makes two changes:
1169
1170         1) Java calls FrameLoader::load in a slightly different way than
1171            JavaScript, which previously let a malicious web site bypass the
1172            shouldAllowNavigation check.  This patch adds that check to that
1173            code path.
1174
1175         2) FrameLoader now wraps calls to m_frame->tree()->find(name) with
1176            findFrameForNavigation, which calls shouldAllowNavigation.  This
1177            treats disallowed frame navigations as if the named frame did not
1178            exist, resulting in a popup window when appropriate.
1179
1180         Tests: http/tests/security/frameNavigation/xss-DENIED-plugin-navigation.html
1181                http/tests/security/frameNavigation/xss-DENIED-targeted-link-navigation.html
1182
1183         * WebCore.base.exp:
1184         * bindings/js/kjs_window.cpp:
1185         (KJS::WindowProtoFuncOpen::callAsFunction):
1186         * loader/FrameLoader.cpp:
1187         (WebCore::FrameLoader::createWindow):
1188         (WebCore::FrameLoader::load):
1189         (WebCore::FrameLoader::post):
1190         (WebCore::FrameLoader::findFrameForNavigation):
1191         * loader/FrameLoader.h:
1192
1193 2008-01-10  John Sullivan  <sullivan@apple.com>
1194
1195         Written by Hyatt, reviewed by me
1196         
1197         - fixed <rdar://problem/5654297> Mail crashes occurs at WebCore::FontFallbackList::fontDataAt() when attempting to display 
1198           a <video> element that uses controls attribute
1199
1200         * rendering/MediaControlElements.cpp:
1201         (WebCore::MediaControlShadowRootElement::MediaControlShadowRootElement):
1202         force the render style to inherit from the media element's style; Hyatt filed 5682383 to cover cleaning
1203         up this architecture, but this one-line fix will prevent the crash in the meantime
1204
1205 2008-01-10  Ada Chan  <adachan@apple.com>
1206
1207         Fix fast/forms/input-radio-checked-tab.html
1208         Meta key is not the same as Alt key on windows.
1209
1210         Reviewed by Darin.
1211
1212         * platform/win/KeyEventWin.cpp:
1213         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1214
1215 2008-01-10  Anders Carlsson  <andersca@apple.com>
1216
1217         Reviewed by Jon.
1218
1219         Fix an assert that would happen when a plug-in tries to load a URL while a provisional load is going.
1220         
1221         * plugins/win/PluginViewWin.cpp:
1222         (WebCore::PluginViewWin::performRequest):
1223         Move document loader check here since we don't start loading until here and a new document load could have started in the meantime.
1224         
1225         (WebCore::PluginViewWin::requestTimerFired):
1226         Don't leak the plugin requests.
1227         
1228         (WebCore::PluginViewWin::load):
1229
1230 2008-01-10  Anders Carlsson  <andersca@apple.com>
1231
1232         Reviewed by John Sullivan.
1233
1234         <rdar://problem/5455889>
1235         REGRESSION: BumperCar crashes when attempting to load a long invalid URL
1236         
1237         Make sure to call FrameLoader::receivedMainResourceError before calling
1238         FrameLoader::didFailToLoad. The call to receivedMainResourceError takes care of
1239         clearing out the provisional document loader so that we won't call the didFail
1240         ResourceLoadDelegate method twice. This also makes us call the FrameLoadDelegate method
1241         didFailPrivisionalLoad before calling the ResourceLoadDelegate method, which Safari 2.0 does.
1242         
1243         * loader/MainResourceLoader.cpp:
1244         (WebCore::MainResourceLoader::receivedError):
1245
1246 2008-01-10  Antti Koivisto  <antti@apple.com>
1247
1248         Reviewed by Adele.
1249
1250         Fix <rdar://problem/5658048>
1251         After <video> has finished playing, dragging the scroller on different location of controller starts to play movie
1252         
1253         - Move to paused state if the playback had ended and the controller is used to seek to earlier time
1254         - Pause video playback during drag so the knob does not constantly try to escape from the mouse pointer
1255
1256         * html/HTMLMediaElement.cpp:
1257         (WebCore::HTMLMediaElement::HTMLMediaElement):
1258         (WebCore::HTMLMediaElement::updateMediaPlayer):
1259         (WebCore::HTMLMediaElement::setPausedInternal):
1260         * html/HTMLMediaElement.h:
1261         * rendering/MediaControlElements.cpp:
1262         (WebCore::MediaControlTimelineElement::defaultEventHandler):
1263
1264 2008-01-10  Alexey Proskuryakov  <ap@webkit.org>
1265
1266         Reviewed by Adam Roben.
1267
1268         <rdar://problem/5667003> fast/dom/xmlhttprequest-html-response-encoding.html is failing
1269
1270         * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::send): Do not disable sniffing for file://
1271         requests, as CFNetwork doesn't perform extension to MIME type mapping then.
1272
1273 2008-01-10  Adam Roben  <aroben@apple.com>
1274
1275         Fixes to allow multiple FrameViews on Windows
1276
1277         Reviewed by Hyatt.
1278
1279         * page/FrameView.cpp:
1280         (WebCore::FrameView::FrameView): Added a new constructor that takes an
1281         IntSize to specify the FrameView's initial size.
1282         (WebCore::FrameView::scheduleRelayout): Added an assertion that our
1283         Document is not in the page cache.
1284         * page/FrameView.h:
1285         * platform/gtk/WidgetGtk.cpp:
1286         (WebCore::Widget::~Widget): Add a warm, fuzzy ASSERT.
1287         * platform/qt/WidgetQt.cpp:
1288         (WebCore::Widget::~Widget): Ditto.
1289         * rendering/RenderWidget.cpp:
1290         (WebCore::RenderWidget::setWidget): Make sure to remove any existing
1291         Widget from the Widget hierarchy before deleting it. One instance
1292         where this is needed is when setWidget is called during FrameView
1293         creation on Windows.
1294
1295 2008-01-10  Alp Toker  <alp@atoker.com>
1296
1297         Include math.h to get ceilf(). Part of the SVG font GTK+ build fix.
1298
1299         * svg/SVGFontFaceElement.cpp:
1300
1301 2008-01-10  Justin Garcia  <justin.garcia@apple.com>
1302
1303         Reviewed by Alice Liu.
1304
1305         <rdar://problem/5658603> Crash in InsertNodeBefore::doUnapply() on Undo in Yahoo Mail
1306         <rdar://problem/5658709> Crash in RenderView::setSelection on Undo in Yahoo Mail
1307         
1308         Make sure we have an updated layout before we perform any editing work.
1309
1310         * editing/EditCommand.cpp:
1311         (WebCore::EditCommand::apply):
1312         (WebCore::EditCommand::unapply):
1313         (WebCore::EditCommand::reapply):
1314
1315 2008-01-10  Luca Bruno  <lethalman88@gmail.com>
1316
1317         Reviewed by Alp Toker.
1318
1319         Back out r29206 which was causing regressions in curl http job
1320         cancellation.
1321
1322         * platform/network/curl/ResourceHandleManager.cpp
1323         (ResourceHandleManager::cancel): 
1324
1325 2008-01-10  Kevin McCullough  <kmccullough@apple.com>
1326
1327         Reviewed by Darin, Sam, and Adam.
1328
1329         - <rdar://problem/5654486> REGRESSION (Safari 3.0.4-TOT): clicking on
1330         - link in gmail message displays JavaScript alert falsely complaining
1331         about pop-up blocking
1332         - When trying to open a new window, we now see if the user gesture 
1333         occurred in the global dynamic object instead of the frame since that is
1334         the only place an event can occur. 
1335
1336         * bindings/js/kjs_window.cpp: - Check the dynamic global object instead
1337         of the frame.
1338         (KJS::allowPopUp):
1339         (KJS::showModalDialog):
1340         (KJS::WindowProtoFuncOpen::callAsFunction):
1341
1342 2008-01-10  David Hyatt  <hyatt@apple.com>
1343
1344         Fix for bug 16247, visibility:hidden not honored when hit testing inline replaced elements.
1345
1346         Reviewed by adele
1347
1348         Added fast/css/visibility-hit-test.html test case.
1349
1350         * rendering/RenderBox.cpp:
1351         (WebCore::RenderBox::nodeAtPoint):
1352
1353 2008-01-10  Lars Knoll  <lars@trolltech.com>
1354
1355         Reviewed by Simon.
1356
1357         rename QWebPageHistory to QWebHistory.
1358
1359         * WebCore.pro:
1360
1361 2008-01-10  Lars Knoll  <lars@trolltech.com>
1362
1363         Reviewed by Simon.
1364
1365         fix the drawing errors that where introduced due to refactoring.
1366
1367         Correctly clip to the rectangle we want to draw in ScrollView::paint().
1368
1369         * platform/qt/ScrollViewQt.cpp:
1370         (WebCore::ScrollView::paint):
1371
1372 2008-01-10  Simon Hausmann  <hausmann@webkit.org>
1373
1374         Reviewed by Lars.
1375
1376         Temporarily disable gzip decompression in qhttp due to a bug.
1377
1378         * platform/network/qt/QNetworkReplyHandler.cpp:
1379         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
1380
1381 2008-01-10  Simon Hausmann  <hausmann@webkit.org>
1382
1383         Reviewed by Lars.
1384
1385         http://bugs.webkit.org/show_bug.cgi?id=16588
1386
1387         Added a (last) Frame argument to ResourceHandle::loadResourceSynchronously.
1388         This allows implementing the synchronous loading correctly for the Qt port where the networking
1389         backend is bound to the page.
1390
1391         * loader/FrameLoader.cpp:
1392         (WebCore::FrameLoader::loadResourceSynchronously):
1393         * platform/network/ResourceHandle.h:
1394         * platform/network/cf/ResourceHandleCFNet.cpp:
1395         * platform/network/curl/ResourceHandleCurl.cpp:
1396         * platform/network/mac/ResourceHandleMac.mm:
1397         * platform/network/qt/ResourceHandleQt.cpp:
1398         (WebCore::ResourceHandle::loadResourceSynchronously):
1399
1400 2008-01-10  Kevin Ollivier  <kevino@theolliviers.com>
1401
1402         wx build fix for changes in r29328
1403
1404         * WebCoreSources.bkl:
1405
1406 2008-01-09  Maciej Stachowiak  <mjs@apple.com>
1407
1408         Reviewed by Sam.
1409
1410         - refactor SecurityOrigin in preparation for merging with SecurityOriginData
1411
1412         * platform/SecurityOrigin.cpp:
1413         (WebCore::SecurityOrigin::SecurityOrigin):
1414         (WebCore::SecurityOrigin::create):
1415         (WebCore::SecurityOrigin::createForFrame):
1416         * platform/SecurityOrigin.h:
1417
1418 2008-01-09  Ada Chan  <adachan@apple.com>
1419
1420         Tabs with ctrl, meta, or altgraph modifier key down should not advance focus.
1421
1422         Reviewed by Darin.
1423
1424         Test: fast/forms/tabs-with-modifiers.html
1425
1426         * page/EventHandler.cpp:
1427         (WebCore::EventHandler::defaultKeyboardEventHandler):
1428         (WebCore::EventHandler::defaultTabEventHandler): bail if ctrl, meta, or altgraph key is down.  
1429         Clean up the code a bit.
1430         * page/EventHandler.h:
1431         * page/FocusController.cpp: Remove the advanceFocus() that takes in a KeyboardEvent.  It was
1432         only called in EventHandler::defaultTabEventHandler() but we have cleaned up the code there and
1433         no longer needs it.
1434         * page/FocusController.h:
1435
1436 2008-01-09  Antti Koivisto  <antti@apple.com>
1437
1438         Reviewed by Mitz.
1439
1440         Fix http://bugs.webkit.org/show_bug.cgi?id=16376
1441         <rdar://problem/5665206>
1442         <video> element fails to play frames when navigating back to page (16376)
1443         
1444         Don't make MediaPlayer visible when it is actually in page cache.
1445
1446         * rendering/RenderVideo.cpp:
1447         (WebCore::RenderVideo::updatePlayer):
1448
1449 2008-01-09  Anders Carlsson  <andersca@apple.com>
1450
1451         Reviewed by Darin.
1452
1453         <rdar://problem/5532361> 
1454         CrashTracer: 9840 crashes in Safari at com.apple.JavaScriptCore: KJS::Bindings::CInstance::~CInstance [in-charge deleting] + 35
1455         
1456         Clear the frame's plugin root objects so that they don't outlive the plugin bundle.
1457         
1458         * page/Frame.cpp:
1459         (WebCore::Frame::pageDestroyed):
1460
1461 2008-01-09  John Sullivan  <sullivan@apple.com>
1462
1463         Reviewed by Adam Roben and Anders Carlsson
1464         
1465         - fixed <rdar://problem/5469398> Repro assertion failure in context menu code due to 
1466           missing-but-expected Reload item
1467
1468         * platform/ContextMenu.cpp:
1469         (WebCore::ContextMenu::populate):
1470         use isLoadingInAPISense when deciding whether to include Stop or Reload in context
1471         menu, to match the WebKit API
1472
1473 2008-01-09  Mark Rowe  <mrowe@apple.com>
1474
1475         Fix Windows debug build for opensource developers.
1476
1477         * WebCore.vcproj/QTMovieWin.vcproj: Use the correct library suffix.
1478
1479 2007-10-01  Allan Sandfeld Jensen  <sandfeld@kde.org>
1480
1481         Reworked by Eric, Reviewed by Hyatt.
1482
1483         - fix http://bugs.webkit.org/show_bug.cgi?id=9454
1484         Add support for :lang inheritance and xml:lang support.
1485
1486         Tests: fast/selectors/lang-inheritance.html
1487                fast/selectors/lang-inheritance2.html
1488                fast/selectors/lang-vs-xml-lang.html
1489                fast/selectors/lang-vs-xml-lang-xhtml.xhtml
1490
1491         * css/CSSStyleSelector.cpp:
1492         (WebCore::CSSStyleSelector::canShareStyleWithElement): Do not share style between elements with
1493         different LANG-attribute.
1494         (WebCore::CSSStyleSelector::checkOneSelector): Change :lang() to recursively check the LANG attribute
1495         for all the elements parents and the content-language of the document.
1496         * dom/Document.cpp:
1497         (WebCore::Document::processHttpEquiv): Parse MIME Content-Language
1498         * dom/Document.h:
1499         (WebCore::Document::contentLanguage):
1500         (WebCore::Document::setContentLanguage):
1501
1502 2008-01-08  Timothy Hatcher  <timothy@apple.com>
1503
1504         Reviewed by Brady.
1505
1506         Bug 16678: Unreproducible crash in KJS::JSObject::inherits() after using Web Inspector
1507         http://bugs.webkit.org/show_bug.cgi?id=16678
1508
1509         Add a NULL check for controller before calling JSObjectSetPrivate.
1510
1511         * page/InspectorController.cpp:
1512         (WebCore::InspectorController::~InspectorController):
1513
1514 2008-01-08  Xan Lopez  <xan@gnome.org>
1515
1516         Reviewed by Alp Toker.
1517
1518         http://bugs.webkit.org/show_bug.cgi?id=15610
1519         [GTK] Text rendering using Pango
1520
1521         Use Pango to render Complex path text.
1522
1523         * platform/graphics/gtk/FontGtk.cpp:
1524         (WebCore::utf16_to_utf8):
1525         (WebCore::convertUniCharToUTF8):
1526         (WebCore::setPangoAttributes):
1527         (WebCore::Font::drawGlyphs):
1528         (WebCore::Font::drawComplexText):
1529         (WebCore::Font::floatWidthForComplexText):
1530         (WebCore::Font::offsetForPositionForComplexText):
1531
1532 2008-01-08  Timothy Hatcher  <timothy@apple.com>
1533
1534         Reviewed by Darin Adler.
1535
1536         <rdar://problem/5665860> With the web inspector displayed, a crash occurs
1537         at WebCore::Frame::document() when navigating back to previous page
1538
1539         This fixes the crash, but the inspector was totally broken with back/forward.
1540         So this also fixes back/forward navigation so the right main resource shows
1541         up in the inspector.
1542
1543         * page/InspectorController.cpp:
1544         (WebCore::addSourceToFrame): Add some null checks for the frame when
1545         getting the textEncoding. This was the crash.
1546         (WebCore::InspectorController::addScriptResource): Create a script object
1547         only if needed, and always add it by calling addResource.
1548         (WebCore::InspectorController::didCommitLoad): Check if the loader is 
1549         loading from the page cache, and clear m_mainResource. If the load is
1550         normal, then call addAndUpdateScriptResource with the main resource. 
1551         (WebCore::InspectorController::identifierForInitialRequest): If the load
1552         is from the page cache and the resource is the main resource call
1553         addAndUpdateScriptResource since didCommitLoad did not do it.
1554
1555 2008-01-08  Alp Toker  <alp@atoker.com>
1556
1557         Back out VIDEO by default in the GTK+ qmake build. The build bot
1558         doesn't have the necessary libraries installed.
1559
1560         * WebCore.pro:
1561
1562 2008-01-08  Alp Toker  <alp@atoker.com>
1563
1564         Win build fix for breakage introduced in r29328.
1565
1566         * WebCore.vcproj/WebCore.vcproj:
1567
1568 2008-01-08  Alp Toker  <alp@atoker.com>
1569
1570         Rubber-stamped by Mark Rowe.
1571
1572         Enable VIDEO by default in the GTK+ qmake build.
1573
1574         * WebCore.pro:
1575
1576 2008-01-08  Alp Toker  <alp@atoker.com>
1577
1578         GTK+ VIDEO build fix for breakage introduced in r29328.
1579
1580         Issue noticed by Ori_B.
1581
1582         * GNUmakefile.am:
1583         * WebCore.pro:
1584
1585 2008-01-08  Antti Koivisto  <antti@apple.com>
1586
1587         Reviewed by Darin.
1588         
1589         HTMLAudioElement needs generated constructor. Otherwise video instanceof HTMLAudioElement is true which is 
1590         bit strange.
1591         
1592         Renamed custom constructor JSHTMLAudioElementConstructor to JSAudioConstructor to avoid name clashes.
1593
1594         Test: media/constructors.html
1595
1596         * ChangeLog:
1597         * WebCore.xcodeproj/project.pbxproj:
1598         * bindings/js/JSAudioConstructor.cpp: Copied from WebCore/bindings/js/JSHTMLAudioElementConstructor.cpp.
1599         (WebCore::JSAudioConstructor::JSAudioConstructor):
1600         (WebCore::JSAudioConstructor::implementsConstruct):
1601         (WebCore::JSAudioConstructor::construct):
1602         * bindings/js/JSAudioConstructor.h: Copied from WebCore/bindings/js/JSHTMLAudioElementConstructor.h.
1603         * bindings/js/JSHTMLAudioElementConstructor.cpp: Removed.
1604         * bindings/js/JSHTMLAudioElementConstructor.h: Removed.
1605         * bindings/js/kjs_window.cpp:
1606         (KJS::Window::getValueProperty):
1607         * html/HTMLAudioElement.idl:
1608
1609 2008-01-08  Anders Carlsson  <andersca@apple.com>
1610
1611         Reviewed by Mitz.
1612
1613         Don't add the applet widget to the view, that's done later by RenderApplet.
1614             
1615         * loader/FrameLoader.cpp:
1616         (WebCore::FrameLoader::createJavaAppletWidget):
1617
1618 2008-01-08  Antti Koivisto  <antti@apple.com>
1619
1620         Reviewed by Weinig.
1621         
1622         Add security check for Audio constructor.
1623
1624         * bindings/js/kjs_window.cpp:
1625         (KJS::Window::getValueProperty):
1626
1627 2008-01-08  Timothy Hatcher  <timothy@apple.com>
1628
1629         Reviewed by Adam Roben.
1630
1631         <rdar://problem/5676515> List of scripts and images missing when opening Web Inspector from new window (16567)
1632
1633         InspectorController::didLoadResourceFromMemoryCache was not being called for
1634         resources that loaded from the memory cache that the FrameLoader's client
1635         has already been notified about. This fix always calls the InspectorController
1636         when loading a memory cached resource. No test possible for the Web Inspector.
1637
1638         * loader/DocLoader.cpp:
1639         (WebCore::DocLoader::checkCacheObjectStatus): Moved most of the logic to
1640         FrameLoader::loadedResourceFromMemoryCache so the InspectorController can always be notified.
1641         * loader/FrameLoader.cpp:
1642         (WebCore::FrameLoader::didTellClientAboutLoad): Renamed from didTellBridgeAboutLoad.
1643         (WebCore::FrameLoader::haveToldClientAboutLoad): Renamed from haveToldBridgeAboutLoad.
1644         (WebCore::FrameLoader::loadResourceSynchronously): Call the renamed didTellClientAboutLoad.
1645         (WebCore::FrameLoader::loadedResourceFromMemoryCache): Only takes a CachedResource now.
1646         Always call InspectorController. If the resource's sendResourceLoadCallbacks is false or
1647         didTellClientAboutLoad is true, do an early return. Otherwise call the client and call
1648         didTellClientAboutLoad.
1649         (WebCore::FrameLoader::dispatchDidLoadResourceFromMemoryCache): Removed, work now done
1650         in FrameLoader::loadedResourceFromMemoryCache.
1651         * loader/FrameLoader.h: Renamed {didTell,haveTold}BridgeAboutLoad to {didTell,haveTold}ClientAboutLoad.
1652         Made loadedResourceFromMemoryCache only take a CachedResource. Renamed m_urlsBridgeKnowsAbout to 
1653         m_urlsClientKnowsAbout.
1654         * loader/SubresourceLoader.cpp:
1655         (WebCore::SubresourceLoader::load): Call the renamed didTellClientAboutLoad.
1656
1657 2008-01-08  Dan Bernstein  <mitz@apple.com>
1658
1659         Rubber-stamped by Sam Weinig.
1660
1661         - prefix all member variables in CSSStyleSelector with m_
1662
1663         * css/CSSStyleSelector.cpp:
1664         (WebCore::CSSStyleSelector::CSSStyleSelector):
1665         (WebCore::CSSStyleSelector::init):
1666         (WebCore::CSSStyleSelector::setEncodedURL):
1667         (WebCore::CSSStyleSelector::loadDefaultStyle):
1668         (WebCore::CSSStyleSelector::matchRules):
1669         (WebCore::CSSStyleSelector::matchRulesForList):
1670         (WebCore::CSSStyleSelector::initElementAndPseudoState):
1671         (WebCore::CSSStyleSelector::initForStyleResolve):
1672         (WebCore::CSSStyleSelector::canShareStyleWithElement):
1673         (WebCore::CSSStyleSelector::locateSharedStyle):
1674         (WebCore::CSSStyleSelector::matchUARules):
1675         (WebCore::CSSStyleSelector::styleForElement):
1676         (WebCore::CSSStyleSelector::pseudoStyleForElement):
1677         (WebCore::CSSStyleSelector::updateFont):
1678         (WebCore::CSSStyleSelector::cacheBorderAndBackground):
1679         (WebCore::CSSStyleSelector::checkSelector):
1680         (WebCore::CSSStyleSelector::checkOneSelector):
1681         (WebCore::CSSStyleSelector::applyProperty):
1682         (WebCore::CSSStyleSelector::mapBackgroundImage):
1683         (WebCore::CSSStyleSelector::mapBackgroundSize):
1684         (WebCore::CSSStyleSelector::mapBackgroundXPosition):
1685         (WebCore::CSSStyleSelector::mapBackgroundYPosition):
1686         (WebCore::CSSStyleSelector::checkForTextSizeAdjust):
1687         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue):
1688         * css/CSSStyleSelector.h:
1689         (WebCore::CSSStyleSelector::):
1690         (WebCore::CSSRuleData::CSSRuleData):
1691         (WebCore::CSSRuleDataList::CSSRuleDataList):
1692         (WebCore::CSSRuleDataList::append):
1693         * css/SVGCSSStyleSelector.cpp:
1694         (WebCore::CSSStyleSelector::applySVGProperty):
1695         * rendering/RenderStyle.cpp:
1696         (WebCore::RenderStyle::isStyleAvailable):
1697
1698 2008-01-08  David D. Kilzer  <ddkilzer@apple.com>
1699
1700         Removed unnecessary files from Copy Bundle Resources build phase.
1701
1702         Reviewed by Sam.
1703
1704         * WebCore.xcodeproj/project.pbxproj: Files removed from build phase:
1705         DOMCoreException.idl
1706         EventException.idl
1707         MessageEvent.idl
1708         SVGAElement.idl
1709         SVGAngle.idl
1710         SVGAnimateColorElement.idl
1711         SVGAnimateElement.idl
1712         SVGAnimateTransformElement.idl
1713         SVGAnimatedAngle.idl
1714         SVGAnimatedBoolean.idl
1715         SVGAnimatedEnumeration.idl
1716         SVGAnimatedInteger.idl
1717         SVGAnimatedLength.idl
1718         SVGAnimatedLengthList.idl
1719         SVGAnimatedNumber.idl
1720         SVGAnimatedNumberList.idl
1721         SVGAnimatedPathData.idl
1722         SVGAnimatedPoints.idl
1723         SVGAnimatedPreserveAspectRatio.idl
1724         SVGAnimatedRect.idl
1725         SVGAnimatedString.idl
1726         SVGAnimatedTransformList.idl
1727         SVGAnimationElement.idl
1728         SVGCSSPropertyNames.in
1729         SVGCSSValueKeywords.in
1730         SVGCircleElement.idl
1731         SVGClipPathElement.idl
1732         SVGColor.idl
1733         SVGComponentTransferFunctionElement.idl
1734         SVGCursorElement.idl
1735         SVGDefinitionSrcElement.idl
1736         SVGDefsElement.idl
1737         SVGDescElement.idl
1738         SVGDocument.idl
1739         SVGElement.idl
1740         SVGElementInstance.idl
1741         SVGElementInstanceList.idl
1742         SVGEllipseElement.idl
1743         SVGException.idl
1744         SVGExternalResourcesRequired.idl
1745         SVGFEBlendElement.idl
1746         SVGFEColorMatrixElement.idl
1747         SVGFEComponentTransferElement.idl
1748         SVGFECompositeElement.idl
1749         SVGFEDiffuseLightingElement.idl
1750         SVGFEDisplacementMapElement.idl
1751         SVGFEDistantLightElement.idl
1752         SVGFEFloodElement.idl
1753         SVGFEFuncAElement.idl
1754         SVGFEFuncBElement.idl
1755         SVGFEFuncGElement.idl
1756         SVGFEFuncRElement.idl
1757         SVGFEGaussianBlurElement.idl
1758         SVGFEImageElement.idl
1759         SVGFEMergeElement.idl
1760         SVGFEMergeNodeElement.idl
1761         SVGFEOffsetElement.idl
1762         SVGFEPointLightElement.idl
1763         SVGFESpecularLightingElement.idl
1764         SVGFESpotLightElement.idl
1765         SVGFETileElement.idl
1766         SVGFETurbulenceElement.idl
1767         SVGFilterElement.idl
1768         SVGFilterPrimitiveStandardAttributes.idl
1769         SVGFitToViewBox.idl
1770         SVGFontElement.idl
1771         SVGFontFaceElement.idl
1772         SVGFontFaceFormatElement.idl
1773         SVGFontFaceNameElement.idl
1774         SVGFontFaceSrcElement.idl
1775         SVGFontFaceUriElement.idl
1776         SVGForeignObjectElement.idl
1777         SVGGElement.idl
1778         SVGGlyphElement.idl
1779         SVGGradientElement.idl
1780         SVGImageElement.idl
1781         SVGLangSpace.idl
1782         SVGLength.idl
1783         SVGLengthList.idl
1784         SVGLineElement.idl
1785         SVGLinearGradientElement.idl
1786         SVGLocatable.idl
1787         SVGMarkerElement.idl
1788         SVGMaskElement.idl
1789         SVGMatrix.idl
1790         SVGMetadataElement.idl
1791         SVGMissingGlyphElement.idl
1792         SVGNumber.idl
1793         SVGNumberList.idl
1794         SVGPaint.idl
1795         SVGPathElement.idl
1796         SVGPathSeg.idl
1797         SVGPathSegArcAbs.idl
1798         SVGPathSegArcRel.idl
1799         SVGPathSegClosePath.idl
1800         SVGPathSegCurvetoCubicAbs.idl
1801         SVGPathSegCurvetoCubicRel.idl
1802         SVGPathSegCurvetoCubicSmoothAbs.idl
1803         SVGPathSegCurvetoCubicSmoothRel.idl
1804         SVGPathSegCurvetoQuadraticAbs.idl
1805         SVGPathSegCurvetoQuadraticRel.idl
1806         SVGPathSegCurvetoQuadraticSmoothAbs.idl
1807         SVGPathSegCurvetoQuadraticSmoothRel.idl
1808         SVGPathSegLinetoAbs.idl
1809         SVGPathSegLinetoHorizontalAbs.idl
1810         SVGPathSegLinetoHorizontalRel.idl
1811         SVGPathSegLinetoRel.idl
1812         SVGPathSegLinetoVerticalAbs.idl
1813         SVGPathSegLinetoVerticalRel.idl
1814         SVGPathSegList.idl
1815         SVGPathSegMovetoAbs.idl
1816         SVGPathSegMovetoRel.idl
1817         SVGPatternElement.idl
1818         SVGPoint.idl
1819         SVGPointList.idl
1820         SVGPolygonElement.idl
1821         SVGPolylineElement.idl
1822         SVGPreserveAspectRatio.idl
1823         SVGRadialGradientElement.idl
1824         SVGRect.idl
1825         SVGRectElement.idl
1826         SVGRenderingIntent.idl
1827         SVGSVGElement.idl
1828         SVGScriptElement.idl
1829         SVGSetElement.idl
1830         SVGStopElement.idl
1831         SVGStringList.idl
1832         SVGStylable.idl
1833         SVGStyleElement.idl
1834         SVGSwitchElement.idl
1835         SVGSymbolElement.idl
1836         SVGTRefElement.idl
1837         SVGTSpanElement.idl
1838         SVGTests.idl
1839         SVGTextContentElement.idl
1840         SVGTextElement.idl
1841         SVGTextPathElement.idl
1842         SVGTextPositioningElement.idl
1843         SVGTitleElement.idl
1844         SVGTransform.idl
1845         SVGTransformList.idl
1846         SVGTransformable.idl
1847         SVGURIReference.idl
1848         SVGUnitTypes.idl
1849         SVGUseElement.idl
1850         SVGViewElement.idl
1851         SVGViewSpec.idl
1852         SVGZoomAndPan.idl
1853         SVGZoomEvent.idl
1854         XMLHttpRequestException.idl
1855         XPathException.idl
1856         character-sets.txt
1857         mac-encodings.txt
1858         make-charset-table.pl
1859         svgattrs.in
1860         svgtags.in
1861         xlinkattrs.in
1862
1863 2008-01-08  Luca Bruno  <lethalman88@gmail.com>
1864
1865         Reviewed by Alp Toker.
1866
1867         Support copying the selected URL to the clipboard.
1868
1869         * platform/gtk/PasteboardGtk.cpp:
1870         (WebCore::Pasteboard::writeURL): implemented
1871
1872 2008-01-08  David D. Kilzer  <ddkilzer@webkit.org>
1873
1874         Renamed CharacterData::m_str to m_data
1875
1876         Rubber-stamped by Adam again.
1877
1878         No test cases added since there is no change in behavior.
1879
1880         * dom/CDATASection.cpp:
1881         * dom/CharacterData.cpp:
1882         (WebCore::CharacterData::CharacterData):
1883         (WebCore::CharacterData::setData):
1884         (WebCore::CharacterData::substringData):
1885         (WebCore::CharacterData::appendData):
1886         (WebCore::CharacterData::insertData):
1887         (WebCore::CharacterData::deleteData):
1888         (WebCore::CharacterData::replaceData):
1889         (WebCore::CharacterData::nodeValue):
1890         (WebCore::CharacterData::containsOnlyWhitespace):
1891         (WebCore::CharacterData::dispatchModifiedEvent):
1892         (WebCore::CharacterData::checkCharDataOperation):
1893         (WebCore::CharacterData::dump):
1894         * dom/CharacterData.h:
1895         * dom/Comment.cpp:
1896         * dom/Text.cpp:
1897         (WebCore::Text::splitText):
1898         (WebCore::Text::createRenderer):
1899         (WebCore::Text::recalcStyle):
1900
1901 2008-01-08  Steve Falkenburg  <sfalken@apple.com>
1902
1903         Fix a couple of compiler warnings.
1904         
1905         Reviewed by Mitz.
1906
1907         * platform/win/ThreadingWin.cpp:
1908         * platform/win/UniscribeController.cpp: Remove unused function.
1909         (WebCore::UniscribeController::advance): Fix bogus warning about un-initialized variable.
1910
1911 2008-01-08  Adele Peterson  <adele@apple.com>
1912
1913         Reviewed by Darin.
1914
1915         Fix for <rdar://problem/5674667> fast/forms/slider-mouse-events.html is broken by media control checkin 29257
1916
1917         * rendering/RenderSlider.cpp: (WebCore::HTMLSliderThumbElement::defaultEventHandler):
1918           After fixing a bug in EventHandler to make sure events always go to the capturing node, this bug was exposed.
1919           MouseMove and MouseUp events were going to the thumb element, but not to the slider input element.  
1920           This change makes the input element the capturing node, and then the input element forwards the mouse events to the thumb element.
1921           I also added a missing call to setDefaultHandled for the mousemove event.
1922
1923 2008-01-08  Adele Peterson  <adele@apple.com>
1924
1925         Reviewed by Adam. 
1926
1927         * rendering/RenderThemeSafari.cpp: Use the SafariTheme version number to decide whether or not to
1928         paint the media controls in RenderThemeSafari.
1929
1930 2008-01-08  Oliver Hunt  <oliver@apple.com>
1931
1932         Reviewed by Adele and John.
1933
1934         Fix <rdar://problem/5652740> Crash occurs at WebCore::Widget::getView() after
1935         dragging file into window that contains web page ( http://www.econocraft.com/flood_arch.htm )
1936
1937         We hit this crash if the page reloads between DragController::dragUpdated
1938         and DragController::performDrag, meaning that m_document starts pointing to
1939         a now viewless document.  This is picked up by an assertion in performDrag
1940         which I have now replaced with an assignment given that the assertion is 
1941         invalid -- it is possible for m_document to be changed between dragUpdated
1942         performDrag
1943
1944         * page/DragController.cpp:
1945         (WebCore::DragController::performDrag):
1946
1947 2008-01-08  Alexey Proskuryakov  <ap@webkit.org>
1948
1949         Reviewed by Darin.
1950
1951         <rdar://problem/5659812> CrashTracer: 462 crashes in Safari at com.apple.WebCore:
1952         WebCore::Node::setChanged + 96
1953
1954         Test: fast/dom/cssTarget-crash.html
1955
1956         * dom/Node.cpp: (WebCore::Node::removedFromDocument):
1957         Check to see if the node being removed is currently set as the Document's cssTarget.
1958         If it is, clear the cssTarget to prevent a hanging reference to it.
1959
1960 2008-01-08  Adam Roben  <aroben@apple.com>
1961
1962         * bindings/scripts/CodeGeneratorJS.pm: Touch this so the bindings will
1963         rebuild on Windows now that the media elements are enabled.
1964
1965 2008-01-08  Adam Roben  <aroben@apple.com>
1966
1967         * svg/svgtags.in: Touch this again for the sake of the Windows bots.
1968
1969 2008-01-08  Timothy Hatcher  <timothy@apple.com>
1970
1971         Reviewed by Adam Roben.
1972
1973         Use JSRetainPtr in the Web Inspector everywhere we own a JSStringRef.
1974         Also added some #pragma marks to help find places in the file.
1975
1976         * page/InspectorController.cpp:
1977         (WebCore::callSimpleFunction): Use JSRetainPtr<JSStringRef>.
1978         And return the result of JSObjectCallAsFunction.
1979         (WebCore::search): Use JSRetainPtr<JSStringRef>.
1980         (WebCore::databaseTableNames): Ditto.
1981         (WebCore::localizedStrings): Ditto.
1982         (WebCore::InspectorController::~InspectorController): Ditto.
1983         (WebCore::InspectorController::focusNode): Ditto.
1984         (WebCore::InspectorController::windowScriptObjectAvailable): Ditto.
1985         (WebCore::InspectorController::scriptObjectReady): Ditto.
1986         (WebCore::addHeaders): Ditto.
1987         (WebCore::InspectorController::addScriptResource): Ditto.
1988         (WebCore::InspectorController::removeScriptResource): Ditto.
1989         (WebCore::InspectorController::updateScriptResourceRequest): Ditto.
1990         (WebCore::InspectorController::updateScriptResourceResponse): Ditto.
1991         (WebCore::InspectorController::updateScriptResource): Ditto.
1992         (WebCore::InspectorController::addDatabaseScriptResource): Ditto.
1993         (WebCore::InspectorController::removeDatabaseScriptResource): Ditto.
1994         (WebCore::InspectorController::addScriptConsoleMessage): Ditto.
1995
1996 2008-01-08  Dan Bernstein  <mitz@apple.com>
1997
1998         Rubber-stamped by Sam Weinig.
1999
2000         - rename FontDataBaseClass.{cpp,h} back to FontData.{cpp,h}
2001
2002         * GNUmakefile.am:
2003         * WebCore.pro:
2004         * WebCore.vcproj/WebCore.vcproj:
2005         * WebCore.xcodeproj/project.pbxproj:
2006         * WebCoreSources.bkl:
2007         * editing/Editor.cpp:
2008         * platform/graphics/FontData.cpp: Copied from WebCore/platform/graphics/FontDataBaseClass.cpp.
2009         * platform/graphics/FontData.h: Copied from WebCore/platform/graphics/FontDataBaseClass.h.
2010         * platform/graphics/FontDataBaseClass.cpp: Removed.
2011         * platform/graphics/FontDataBaseClass.h: Removed.
2012         * platform/graphics/SegmentedFontData.h:
2013         * platform/graphics/SimpleFontData.h:
2014
2015 2008-01-08  Dan Bernstein  <mitz@apple.com>
2016
2017         Fix a Wx build error.
2018
2019         * platform/graphics/wx/GlyphMapWx.cpp:
2020         (WebCore::GlyphPage::fill):
2021
2022 2008-01-08  Dan Bernstein  <mitz@apple.com>
2023
2024         Fix a Qt build error.
2025
2026         * platform/graphics/qt/SimpleFontDataQt.cpp:
2027         (WebCore::SimpleFontData::containsCharacters):
2028         (WebCore::SimpleFontData::fontDataForCharacter):
2029         (WebCore::SimpleFontData::isSegmented):
2030
2031 2008-01-08  Adam Roben  <aroben@apple.com>
2032
2033         Windows build fix.
2034
2035         Touch config.h to force a rebuild (apparently changing preprocessor
2036         definitions in the .vcproj doesn't force a rebuild).
2037
2038         * config.h:
2039
2040 2008-01-08  Dan Bernstein  <mitz@apple.com>
2041
2042         Fix a Wx build failure.
2043
2044         * webcore-wx.bkl:
2045
2046 2008-01-08  Dan Bernstein  <mitz@apple.com>
2047
2048         Fix a Qt build failure.
2049
2050         * WebCore.pro:
2051
2052 2008-01-08  John Sullivan  <sullivan@apple.com>
2053
2054         Reviewed by Adam Roben
2055         
2056         - fixed <rdar://problem/5671668> REGRESSION (r28711-r28730): With caret in an empty form field, 
2057           Delete menu item is enabled but shouldn't be
2058
2059         The enabled logic was incorrect for the Delete menu item. To fix this, I added an EditorCommandSource
2060         parameter to the enabled functions so that they can have parallel logic to the execute functions.
2061
2062         * editing/EditorCommand.cpp:
2063         added EditorCommandSource parameter to isEnabled function prototype
2064         (WebCore::enabled):
2065         added unused EditorCommandSource parameter to these isEnabled functions:
2066         (WebCore::enabledAnySelection):
2067         (WebCore::enabledAnySelectionAndMark):
2068         (WebCore::enableCaretInEditableText):
2069         (WebCore::enabledCopy):
2070         (WebCore::enabledCut):
2071
2072         (WebCore::enabledDelete):
2073         new function, uses logic previously used by Delete command for DOM sources; uses logic in enabledCut
2074         for menu source
2075
2076         added unused EditorCommandSource parameter to these isEnabled functions:
2077         (WebCore::enabledInEditableText):
2078         (WebCore::enabledInRichlyEditableText):
2079         (WebCore::enabledPaste):
2080         (WebCore::enabledRangeInEditableText):
2081         (WebCore::enabledRangeInRichlyEditableText):
2082         (WebCore::enabledRedo):
2083         (WebCore::enabledUndo):
2084         
2085         (WebCore::CommandEntry::):
2086         wire up new enabledDelete function as delete function for Delete command
2087         
2088         (WebCore::Editor::Command::isEnabled):
2089         pass EditorCommandSource parameter to isEnabled function
2090
2091 2008-01-08  Adam Roben  <aroben@apple.com>
2092
2093         Visual C++ Express build fix
2094
2095         * WebCore.vcproj/QTMovieWin.vcproj: Explicitly link against user32.lib
2096         and advapi32.lib. VS implicitly links against these, VC++ Express
2097         doesn't.
2098
2099 2008-01-08  Dan Bernstein  <mitz@apple.com>
2100
2101         - add bug number
2102
2103         * platform/graphics/mac/FontCustomPlatformData.cpp:
2104         (WebCore::createFontCustomPlatformData):
2105
2106 2008-01-08  Dan Bernstein  <mitz@apple.com>
2107
2108         Try to fix the Qt build.
2109
2110         * WebCore.pro:
2111
2112 2008-01-08  Nikolas Zimmermann  <zimmermann@kde.org>
2113
2114         Not reviewed. Try to fix Qt builds after Timothy's inspector changes.
2115
2116         * page/inspector/WebKit.qrc:
2117
2118 2008-01-08  Maciej Stachowiak  <mjs@apple.com>
2119
2120         Reviewed by Mark.
2121
2122         - remove duplicate definition of getElementById from HTMLDocument IDL (and ObjC bindings)
2123
2124         * bindings/objc/PublicDOMInterfaces.h:
2125         * html/HTMLDocument.idl:
2126
2127 2008-01-08  David D. Kilzer  <ddkilzer@webkit.org>
2128
2129         Renamed CharacterData::str to m_str to match coding style
2130
2131         Rubber-stamped by Adam.
2132
2133         No test cases added since there is no change in behavior.
2134
2135         * dom/CDATASection.cpp:
2136         * dom/CharacterData.cpp:
2137         (WebCore::CharacterData::CharacterData):
2138         (WebCore::CharacterData::setData):
2139         (WebCore::CharacterData::substringData):
2140         (WebCore::CharacterData::appendData):
2141         (WebCore::CharacterData::insertData):
2142         (WebCore::CharacterData::deleteData):
2143         (WebCore::CharacterData::replaceData):
2144         (WebCore::CharacterData::nodeValue):
2145         (WebCore::CharacterData::containsOnlyWhitespace):
2146         (WebCore::CharacterData::dispatchModifiedEvent):
2147         (WebCore::CharacterData::checkCharDataOperation):
2148         (WebCore::CharacterData::dump):
2149         * dom/CharacterData.h:
2150         * dom/Comment.cpp:
2151         * dom/Text.cpp:
2152         (WebCore::Text::splitText):
2153         (WebCore::Text::createRenderer):
2154         (WebCore::Text::recalcStyle):
2155
2156 2008-01-08  Oliver Hunt  <oliver@apple.com>
2157
2158         Set the ENABLE_SVG_FONTS flag in Windows build, now builds, 
2159         I'm not sure if it just caused the right files to regenerate,
2160         or if there's some configuration weirdness in the non-SVG-fonts
2161         build. 
2162
2163         * WebCore.vcproj/WebCore.vcproj:
2164
2165 2008-01-07  Maciej Stachowiak  <mjs@apple.com>
2166
2167         Reviewed by Brady.
2168
2169         - fixed <rdar://problem/5644300> Back/Forward Cache should not include pages with databases
2170         
2171         Track whether a document has ever opened a database; if so, exclude it from b/f caching (for now)
2172         
2173         * dom/Document.cpp:
2174         (WebCore::Document::Document):
2175         * dom/Document.h:
2176         (WebCore::Document::setHasOpenDatabases):
2177         (WebCore::Document::hasOpenDatabases):
2178         * loader/FrameLoader.cpp:
2179         (WebCore::FrameLoader::canCachePage):
2180         * storage/Database.cpp:
2181         (WebCore::Database::openDatabase):
2182
2183 2008-01-07  Dan Bernstein  <mitz@apple.com>
2184
2185         Reviewed by Oliver Hunt.
2186
2187         - fix leaks seen on the build bot
2188
2189         * css/CSSFontSelector.cpp:
2190         (WebCore::CSSFontSelector::addFontFaceRule): Avoid creating a
2191         CSSFontFaceSource for SVG font-face elements going into an
2192         SVGCSSFontFace because it just leaks them. Avoid adding SVG font-
2193         face elements to a CSSFontFace because it will not work as expected.
2194
2195 2008-01-07  Mark Rowe  <mrowe@apple.com>
2196
2197         Tiger build fix.
2198
2199         * platform/graphics/mac/FontCustomPlatformData.cpp:
2200         (WebCore::createFontCustomPlatformData): Only include this code on Leopard.
2201         It's not needed on Tiger, and breaks the build.
2202
2203 2008-01-07  Antti Koivisto  <antti@apple.com>
2204
2205         Reviewed by Steve.
2206
2207         Re-enable media support in Windows build.
2208
2209         * WebCore.vcproj/QTMovieWin.vcproj:
2210         * WebCore.vcproj/WebCore.vcproj:
2211         * WebCore.vcproj/build-generated-files.sh:
2212
2213 2008-01-07  Steve Falkenburg  <sfalken@apple.com>
2214
2215         Add version resource to QTMovieWin.dll
2216         
2217         Reviewed by Adam.
2218
2219         * WebCore.vcproj/PRODUCTVERSION: Copied from ../WebKit/win/WebKit.vcproj/PRODUCTVERSION.
2220         * WebCore.vcproj/QTMovieWin.rc: Added.
2221         * WebCore.vcproj/QTMovieWin.vcproj:
2222         * WebCore.vcproj/VERSION: Copied from ../WebKit/win/WebKit.vcproj/VERSION.
2223         * WebCore.vcproj/auto-version.sh: Copied from ../WebKit/win/WebKit.vcproj/auto-version.sh.
2224
2225 2008-01-07  Dan Bernstein  <mitz@apple.com>
2226
2227         Build fix.
2228
2229         * platform/graphics/qt/FontCustomPlatformData.cpp:
2230         (WebCore::FontCustomPlatformData::~FontCustomPlatformData): Added.
2231         Calls QFontDatabase::removeApplicationFont().
2232         * platform/graphics/qt/FontCustomPlatformData.h:
2233         * platform/graphics/qt/GlyphPageTreeNodeQt.cpp:
2234         (WebCore::GlyphPageTreeNode::pruneTreeCustomFontData): Removed the
2235         implementation because Qt does not use the WebCore glyph cache.
2236
2237 2008-01-07  Dan Bernstein  <mitz@apple.com>
2238
2239         Reviewed by Oliver Hunt.
2240
2241         - fix an assertion failure in svg/W3C-SVG-1.1/fonts-elem-03-b.svg on
2242           Tiger and multiple SVG layout test failures on Leopard.
2243
2244         * css/CSSSegmentedFontFace.cpp:
2245         (WebCore::CSSSegmentedFontFace::getFontData): Avoid returning an
2246         empty SegmentedFontData.
2247         * platform/graphics/mac/FontCustomPlatformData.cpp:
2248         (WebCore::createFontCustomPlatformData): Avoid creating a font that
2249         contains no glyphs. On Leopard, ATS might create such a font given
2250         data in an unsupported format (such as SVG).
2251
2252 2008-01-07  Steve Falkenburg  <sfalken@apple.com>
2253
2254         Build fix.
2255
2256         * WebCore.vcproj/WebCore.sln:
2257         * WebCore.vcproj/WebCore.submit.sln:
2258
2259 2008-01-07  Oliver Hunt  <oliver@apple.com>
2260
2261         Reviewed by Niko.
2262
2263         Fix painting of SVG <image> when the image must be scaled to retain aspect ratio
2264
2265         Test: svg/custom/image-with-aspect-ratio-stretch.svg
2266
2267         * rendering/RenderSVGImage.cpp:
2268         (WebCore::RenderSVGImage::adjustRectsForAspectRatio):
2269
2270 2008-01-07  Dan Bernstein  <mitz@apple.com>
2271
2272         Build fix.
2273
2274         * platform/graphics/qt/GlyphPageTreeNodeQt.cpp:
2275         (WebCore::GlyphPageTreeNode::pruneTreeCustomFontData):
2276
2277 2008-01-07  Adele Peterson  <adele@apple.com>
2278
2279         Add missing newline.
2280
2281         * rendering/MediaControlElements.cpp:
2282
2283 2008-01-07  Jon Honeycutt  <jhoneycutt@apple.com>
2284
2285         Reviewed by Hyatt.
2286
2287         <rdar://problem/5673489> Safari does not render windowless plugins in an
2288         iframe when opacity < 1.0
2289
2290         Plugins in transparency layers handle their own world transforms, so
2291         only apply the horizontal/vertical transform if we are not in a
2292         transparency layer.
2293
2294         * platform/graphics/GraphicsContext.h: Add a Windows-platform-only
2295         inTransparencyLayer() function
2296         * platform/win/GraphicsContextWin.cpp:
2297         (WebCore::GraphicsContext::getWindowsContext): Use inTransparencyLayer()
2298         (WebCore::GraphicsContext::inTransparencyLayer):
2299         (WebCore::GraphicsContext::releaseWindowsContext): Use
2300         inTransparencyLayer()
2301         * plugins/win/PluginViewWin.cpp:
2302         (WebCore::PluginViewWin::paint): When retrieving the HDC, use the rect
2303         relative to the window. Pass m_isTransparent to
2304         get/releaseWindowsContext(). Only set the world transform if we are not
2305         in a transparency layer.
2306
2307 2008-01-07  Adele Peterson  <adele@apple.com>
2308
2309         Build fix.  Need to wrap these classes in #if ENABLE(VIDEO)
2310
2311         * rendering/MediaControlElements.cpp:
2312         * rendering/MediaControlElements.h:
2313
2314 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
2315
2316         Reviewed by Mark.
2317
2318         Enable SVG_FONTS by default.
2319
2320         * Configurations/WebCore.xcconfig:
2321         * WebCore.vcproj/build-generated-files.sh:
2322
2323 2008-01-07  Dan Bernstein  <mitz@apple.com>
2324
2325         Build fix.
2326
2327         * platform/graphics/qt/SimpleFontDataQt.cpp:
2328         (WebCore::SimpleFontData::SimpleFontData):
2329         (WebCore::SimpleFontData::~SimpleFontData):
2330
2331 2008-01-07  Adam Barth  <hk9565@gmail.com>
2332
2333         Reviewed by Sam Weinig
2334
2335         Fixes: http://bugs.webkit.org/show_bug.cgi?id=16523
2336         <rdar://problem/5657447>
2337
2338         When a frame is created with the URL "about:blank" or "", it should
2339         inherit its SecurityOrigin from its opener.  However, once it has
2340         decided on that SecurityOrigin, it should not change its mind.
2341         Prior to this patch, several events could induce the frame to change
2342         its SecurityOrigin, permitting an attacker to inject script into an
2343         arbitrary SecurityOrigin.
2344
2345         This patch makes several changes:
2346
2347         1) Documents refuse to change from one SecurityOrigin to another
2348            unless explicitly instructed to do so.
2349
2350         2) Navigating to a JavaScript URL that produces a value
2351            preserves the current SecurityOrigin explicitly instead of
2352            relying on the URL to preserve the origin (which fails for
2353            about:blank URLs and SecurityOrigins with document.domain set).
2354
2355            Ideally, we should not preserve the URL at all.  Instead, the
2356            frame's URL should be the JavaScript URL, as in Firefox, but this
2357            would require changes that are too risky for this patch.  I'll
2358            file this as a separate issue.
2359
2360         3) Various methods of navigating to JavaScript URLs were not
2361            properly handling JavaScript that returned a value (and should
2362            therefore replace the current document).  This patch unifies
2363            those code paths with the path that works.
2364
2365            There are still a handful of bugs relating to the handling of
2366            JavaScript URLs, but I'll file those as separate issues.
2367
2368         Tests: http/tests/security/aboutBlank/xss-DENIED-navigate-opener-document-write.html
2369                http/tests/security/aboutBlank/xss-DENIED-navigate-opener-javascript-url.html
2370                http/tests/security/aboutBlank/xss-DENIED-set-opener.html
2371
2372         * dom/Document.cpp:
2373         (WebCore::Document::initSecurityOrigin):
2374         * dom/Document.h:
2375         (WebCore::Document::setSecurityOrigin):
2376         * loader/FrameLoader.cpp:
2377         (WebCore::FrameLoader::changeLocation):
2378         (WebCore::FrameLoader::urlSelected):
2379         (WebCore::FrameLoader::requestFrame):
2380         (WebCore::FrameLoader::submitForm):
2381         (WebCore::FrameLoader::executeIfJavaScriptURL):
2382         (WebCore::FrameLoader::begin):
2383         * loader/FrameLoader.h:
2384         * platform/SecurityOrigin.cpp:
2385         (WebCore::SecurityOrigin::setForURL):
2386         (WebCore::SecurityOrigin::createForFrame):
2387         * platform/SecurityOrigin.h:
2388
2389 2008-01-07  Adele Peterson  <adele@apple.com>
2390
2391         Forgot to check in these changes in my last checkin.
2392
2393         * rendering/RenderThemeSafari.cpp:
2394
2395 2008-01-07  Dan Bernstein  <mitz@apple.com>
2396
2397         Build fixes.
2398
2399         * WebCore.pro:
2400         * platform/graphics/qt/FontCacheQt.cpp:
2401         (WebCore::FontCache::getCachedFontData):
2402
2403 2008-01-07  Timothy Hatcher  <timothy@apple.com>
2404
2405         Reviewed by John Sullivan.
2406
2407         <rdar://problem/5674119> Make the Web Inspector toolbar the normal size when not docked
2408
2409         * page/inspector/inspector.css: Changed CSS rules to have the toolbar and buttons be
2410           normal height when not docked, and small when docked. Also added some cursor properties
2411           prevent showing the text cursor over areas that are not selectable.
2412         * page/inspector/Images: A few images added and old ones removed or renamed.
2413
2414 2008-01-07  Alp Toker  <alp@atoker.com>
2415
2416         Prospective GTK+ autotools/qmake VIDEO build fix for breakage
2417         introduced in r29257.
2418
2419         * GNUmakefile.am:
2420         * WebCore.pro:
2421
2422 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
2423
2424         Reviewed by Oliver.
2425
2426         Build fix affecting all builds - again related to the unicode-range addition.
2427
2428         * css/CSSFontSelector.cpp:
2429         (WebCore::CSSFontSelector::addFontFaceRule):
2430         * css/SVGCSSFontFace.cpp:
2431         (WebCore::SVGCSSFontFace::SVGCSSFontFace):
2432         * css/SVGCSSFontFace.h:
2433         * rendering/RenderSVGText.cpp:
2434         * svg/SVGFont.cpp:
2435         (WebCore::svgFontAndFontFaceElementForFontData):
2436         (WebCore::floatWidthMissingGlyphCallback):
2437         (WebCore::drawTextMissingGlyphCallback):
2438         * svg/SVGFontFaceElement.cpp:
2439
2440 2008-01-07  Adele Peterson  <adele@apple.com>
2441
2442         Reviewed by Antti, Adam, and Mitz.
2443
2444         WebCore part of fix for 
2445         <rdar://problem/5619073> Updated look for <video> controls
2446         <rdar://problem/5619057> Add volume control to video controls
2447
2448         * WebCore.base.exp: Added symbols for WebKitSystemInterface drawing methods.
2449         * WebCore.xcodeproj/project.pbxproj: Added MediaControlElements.h/cpp
2450         * WebCore.vcproj/WebCore.vcproj: ditto.
2451
2452         * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added cases for new appearances.
2453         * css/CSSSelector.cpp: (WebCore::CSSSelector::extractPseudoType): Added cases for new types.
2454         * css/CSSSelector.h: (WebCore::CSSSelector::): Added new pseudo elements.
2455         * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::checkOneSelector): ditto.
2456         * css/CSSValueKeywords.in: Added keywords for new control appearance styles.
2457         * css/html4.css: Added new styles for new controls.
2458
2459         * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::canPlay): Added. Takes loading state into account.
2460         * html/HTMLMediaElement.h:
2461
2462         * page/EventHandler.cpp: (WebCore::EventHandler::updateMouseEventTargetNode): Make sure the events always go to the capturing node, if there is one.
2463
2464         * platform/mac/WebCoreSystemInterface.h: Added drawing methods for controls.
2465         * platform/mac/WebCoreSystemInterface.mm: ditto.
2466
2467         * rendering/MediaControlElements.cpp: Added.
2468         (WebCore::MediaControlShadowRootElement::MediaControlShadowRootElement): Moved from RenderMedia.  Made this relatively positioned, instead of absolute.
2469         (WebCore::MediaControlInputElement::MediaControlInputElement): Moved from RenderMedia.  Removed call to updateFromElement, 
2470          since its too early to do this here, and causes crashes for the slider.
2471         (WebCore::MediaControlInputElement::attachToParent): Moved from RenderMedia.
2472         (WebCore::MediaControlInputElement::update): ditto.
2473         (WebCore::MediaControlMuteButtonElement::MediaControlMuteButtonElement): Added.
2474         (WebCore::MediaControlMuteButtonElement::defaultEventHandler): ditto.
2475         (WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement): Moved from RenderMedia.
2476         (WebCore::MediaControlPlayButtonElement::defaultEventHandler): ditto.
2477         (WebCore::MediaControlSeekButtonElement::MediaControlSeekButtonElement): Added.
2478         (WebCore::MediaControlSeekButtonElement::defaultEventHandler): ditto.
2479         (WebCore::MediaControlSeekButtonElement::seekTimerFired): ditto.
2480         (WebCore::MediaControlTimelineElement::MediaControlTimelineElement): Moved from RenderMedia.
2481         (WebCore::MediaControlTimelineElement::defaultEventHandler): ditto.
2482         (WebCore::MediaControlTimelineElement::update): ditto. 
2483         (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement): Added.
2484         (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler): ditto.
2485         * rendering/MediaControlElements.h: Added. Moved from RenderMedia.
2486         (WebCore::MediaControlShadowRootElement::isShadowNode):
2487         (WebCore::MediaControlShadowRootElement::shadowParentNode):
2488         (WebCore::RenderMediaControlShadowRoot::RenderMediaControlShadowRoot):
2489         (WebCore::RenderMediaControlShadowRoot::setParent):
2490
2491         * rendering/RenderMedia.cpp: Moved control element classes to MediaControlElements files.
2492         (WebCore::RenderMedia::RenderMedia): No need to initialize RefPtrs.
2493         (WebCore::RenderMedia::layout): Set the position for the controlsRenderer.
2494         (WebCore::RenderMedia::createPanel): Added nil check for the renderer.
2495         (WebCore::RenderMedia::createMuteButton): Added.
2496         (WebCore::RenderMedia::createSeekBackButton): ditto.
2497         (WebCore::RenderMedia::createSeekForwardButton): ditto.
2498         (WebCore::RenderMedia::createTimeDisplay): Added nil check for the renderer.
2499         (WebCore::RenderMedia::createFullscreenButton): Added.
2500         (WebCore::RenderMedia::updateControls): Create, delete, and update new controls when appropriate.
2501         (WebCore::RenderMedia::updateControlVisibility): Don't fade controls for audio controls. 
2502         (WebCore::RenderMedia::forwardEvent): Forward events for new controls.
2503         * rendering/RenderMedia.h: Added new methods for creating new controls.
2504
2505         * rendering/RenderObject.cpp: (WebCore::RenderObject::containingBlock): Updated special case for media elements, which are replaced elements, 
2506           but also can contain children (the controls' container) that may need to look for the containing block.
2507
2508         * rendering/RenderSlider.cpp: (WebCore::RenderSlider::createThumbStyle): Added case for MediaSliderAppearance.
2509
2510         * rendering/RenderStyle.h: Added appearance constants and pseudo ids for new controls.
2511         (WebCore::):
2512         (WebCore::RenderStyle::):
2513
2514         * rendering/RenderTheme.cpp:
2515         (WebCore::RenderTheme::adjustStyle): Added cases for new appearances.
2516         (WebCore::RenderTheme::paint): ditto.
2517         * rendering/RenderTheme.h: Added new methods for painting new appearances.
2518         (WebCore::RenderTheme::paintMediaBackground):
2519         (WebCore::RenderTheme::paintMediaFullscreenButton):
2520         (WebCore::RenderTheme::paintMediaPlayButton):
2521         (WebCore::RenderTheme::paintMediaMuteButton):
2522         (WebCore::RenderTheme::paintMediaSeekBackButton):
2523         (WebCore::RenderTheme::paintMediaSeekForwardButton):
2524         (WebCore::RenderTheme::paintMediaSliderThumb):
2525         * rendering/RenderThemeMac.h:
2526         * rendering/RenderThemeMac.mm:
2527         (WebCore::RenderThemeMac::RenderThemeMac): Initialize m_mediaControlBackgroundImage.
2528         (WebCore::RenderThemeMac::~RenderThemeMac): Delete m_mediaControlBackgroundImage.
2529         (WebCore::RenderThemeMac::paintCapsLockIndicator): Use LocalCurrentGraphicsContext here too, since we use it in all other painting methods.
2530         (WebCore::RenderThemeMac::paintSliderTrack): Added case for MediaSliderAppearance.
2531         (WebCore::RenderThemeMac::adjustSliderThumbSize): Added case for MediaSliderThumbAppearance.
2532         (WebCore::RenderThemeMac::paintMediaBackground): Draws the new artwork for the controls.
2533         (WebCore::RenderThemeMac::paintMediaFullscreenButton): ditto.
2534         (WebCore::RenderThemeMac::paintMediaMuteButton): ditto.
2535         (WebCore::RenderThemeMac::paintMediaPlayButton): ditto.
2536         (WebCore::RenderThemeMac::paintMediaSeekBackButton): ditto.
2537         (WebCore::RenderThemeMac::paintMediaSeekForwardButton): ditto.
2538         (WebCore::RenderThemeMac::paintMediaSliderThumb): ditto.
2539         * rendering/RenderThemeSafari.cpp: Draws the new artwork on Windows.
2540         (WebCore::RenderThemeSafari::paintSliderTrack):
2541         (WebCore::RenderThemeSafari::adjustSliderThumbSize):
2542         (WebCore::RenderThemeSafari::paintMediaBackground):
2543         (WebCore::RenderThemeSafari::paintMediaFullscreenButton):
2544         (WebCore::RenderThemeSafari::paintMediaMuteButton):
2545         (WebCore::RenderThemeSafari::paintMediaPlayButton):
2546         (WebCore::RenderThemeSafari::paintMediaSeekBackButton):
2547         (WebCore::RenderThemeSafari::paintMediaSeekForwardButton):
2548         (WebCore::RenderThemeSafari::paintMediaSliderThumb):
2549         * rendering/RenderThemeSafari.h:
2550
2551 2008-01-07  Timothy Hatcher  <timothy@apple.com>
2552
2553         Reviewed by Darin Adler.
2554
2555         Fix ASSERTION FAILED: dstOffset + srcSegmentLength == static_cast<int>(data.size())
2556         when the replacment string is a different length.
2557
2558         * platform/text/StringImpl.cpp:
2559         (WebCore::StringImpl::replace): Move the parenthesis to be around only the subtraction in
2560         the Vector size calculation, correcting the order of math operations.
2561
2562 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
2563
2564         Reviewed by Eric. Hopefully fix build with mac tiger after the unicode-range addition. NSInteger not available there.
2565
2566         * platform/graphics/mac/FontCacheMac.mm:
2567
2568 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
2569
2570         Reviewed by Oliver. Fix build error introduced by Dan's unicode-range support patch & enabling SVG_FONTS by default.
2571
2572         * css/CSSFontSelector.cpp:
2573         (WebCore::CSSFontSelector::getFontData):
2574
2575 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
2576
2577         Not reviewed. Next try to fix wx/mac leopard build.
2578
2579         * css/CSSFontSelector.cpp: Need to wrap a SVG* include in ENABLE(SVG) blocks, as this port doesn't build this generated file.
2580         * svg/SVGFontFaceElement.cpp:
2581         (WebCore::SVGFontFaceElement::createFontData): Fix double<->float conversion issue.
2582         * webcore-base.bkl: Undo svg/ include.
2583
2584 2008-01-07  Dan Bernstein  <mitz@apple.com>
2585
2586         Reviewed by Dave Hyatt.
2587
2588         - <rdar://problem/5665216> Support the unicode-range property in @font-face rules
2589
2590         * GNUmakefile.am:
2591         * WebCore.pro:
2592         * WebCore.vcproj/WebCore.vcproj:
2593         * WebCore.xcodeproj/project.pbxproj:
2594         * WebCoreSources.bkl:
2595         * bindings/objc/DOM.mm:
2596         * bridge/mac/WebCoreAXObject.mm:
2597         * css/CSSComputedStyleDeclaration.cpp:
2598         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2599         * css/CSSFontFace.cpp:
2600         (WebCore::CSSFontFace::fontLoaded): Changed to call the owning segmented
2601         font face.
2602         (WebCore::CSSFontFace::getFontData):
2603         * css/CSSFontFace.h:
2604         (WebCore::CSSFontFace::CSSFontFace):
2605         (WebCore::CSSFontFace::setSegmentedFontFace):
2606         * css/CSSFontFaceSource.cpp:
2607         (WebCore::CSSFontFaceSource::pruneTable): Removed the calls to
2608         GlyphPageTreeNode::pruneTreeCustomFontData because the fonts in the
2609         font table are not exposed in the glyph page tree. Only the segmented
2610         font is, and that is taken care of by the segmented font face.
2611         (WebCore::CSSFontFaceSource::getFontData):
2612         * css/CSSFontFaceSource.h:
2613         * css/CSSFontSelector.cpp:
2614         (WebCore::CSSFontSelector::addFontFaceRule): Changed to collect
2615         @font-face rules with the same family and traits into a single
2616         segmented font face, instead of just retaining the most recent one.
2617         (WebCore::CSSFontSelector::fontLoaded):
2618         (WebCore::CSSFontSelector::getFontData):
2619         * css/CSSFontSelector.h:
2620         * css/CSSGrammar.y:
2621         * css/CSSParser.cpp:
2622         (WebCore::CSSParser::parseValue):
2623         (WebCore::CSSParser::parseFontFaceUnicodeRange): Added. Parses a unicode
2624         range value.
2625         * css/CSSParser.h:
2626         * css/CSSPrimitiveValue.h:
2627         (WebCore::CSSPrimitiveValue::):
2628         * css/CSSPropertyNames.in:
2629         * css/CSSSegmentedFontFace.cpp: Added.
2630         (WebCore::CSSSegmentedFontFace::CSSSegmentedFontFace):
2631         (WebCore::CSSSegmentedFontFace::~CSSSegmentedFontFace):
2632         (WebCore::CSSSegmentedFontFace::pruneTable):
2633         (WebCore::CSSSegmentedFontFace::isLoaded):
2634         (WebCore::CSSSegmentedFontFace::isValid):
2635         (WebCore::CSSSegmentedFontFace::fontLoaded):
2636         (WebCore::CSSSegmentedFontFace::overlayRange):
2637         (WebCore::CSSSegmentedFontFace::getFontData):
2638         * css/CSSSegmentedFontFace.h: Added.
2639         (WebCore::FontFaceRange::FontFaceRange):
2640         (WebCore::FontFaceRange::from):
2641         (WebCore::FontFaceRange::to):
2642         (WebCore::FontFaceRange::fontFace):
2643         (WebCore::CSSSegmentedFontFace::fontSelector):
2644         * css/CSSStyleSelector.cpp:
2645         (WebCore::CSSStyleSelector::applyProperty):
2646         * css/CSSUnicodeRangeValue.cpp: Added.
2647         (WebCore::CSSUnicodeRangeValue::~CSSUnicodeRangeValue):
2648         (WebCore::CSSUnicodeRangeValue::cssText):
2649         * css/CSSUnicodeRangeValue.h: Added.
2650         (WebCore::CSSUnicodeRangeValue::CSSUnicodeRangeValue):
2651         (WebCore::CSSUnicodeRangeValue::from):
2652         (WebCore::CSSUnicodeRangeValue::to):
2653         * css/SVGCSSFontFace.cpp:
2654         (WebCore::SVGCSSFontFace::getFontData):
2655         * css/SVGCSSFontFace.h:
2656         * editing/Editor.cpp:
2657         (WebCore::Editor::fontForSelection):
2658         * editing/Editor.h:
2659         * page/mac/FrameMac.mm:
2660         * page/mac/WebCoreFrameBridge.mm:
2661         (-[WebCoreFrameBridge fontForSelection:]):
2662         * platform/graphics/Font.cpp:
2663         (WebCore::WidthIterator::advance):
2664         (WebCore::Font::glyphDataForCharacter):
2665         (WebCore::Font::primaryFont): Changed to return the simple font data
2666         used for the space character.
2667         (WebCore::Font::fontDataAt):
2668         (WebCore::Font::fontDataForCharacters):
2669         (WebCore::Font::drawGlyphBuffer):
2670         * platform/graphics/Font.h:
2671         * platform/graphics/FontCache.cpp:
2672         (WebCore::FontCache::getCachedFontData):
2673         (WebCore::FontCache::getFontData):
2674         * platform/graphics/FontCache.h:
2675         * platform/graphics/FontData.cpp: Renamed to SimpleFontData.cpp
2676         * platform/graphics/FontData.h: Renamed to SimpleFontData.cpp.
2677         * platform/graphics/FontDataBaseClass.cpp: Added. This will be renamed
2678         FontData.cpp.
2679         (WebCore::FontData::~FontData):
2680         * platform/graphics/FontDataBaseClass.h: Added. This will be renamed
2681         FontData.h.
2682         * platform/graphics/FontFallbackList.cpp:
2683         (WebCore::FontFallbackList::determinePitch):
2684         (WebCore::FontFallbackList::fontDataAt):
2685         (WebCore::FontFallbackList::fontDataForCharacters):
2686         * platform/graphics/FontFallbackList.h:
2687         (WebCore::FontFallbackList::primaryFont):
2688         * platform/graphics/FontSelector.h:
2689         * platform/graphics/GlyphBuffer.h:
2690         (WebCore::GlyphBuffer::fontDataAt):
2691         (WebCore::GlyphBuffer::swap):
2692         (WebCore::GlyphBuffer::add):
2693         * platform/graphics/GlyphPageTreeNode.cpp:
2694         (WebCore::GlyphPageTreeNode::pruneTreeCustomFontData):
2695         (WebCore::GlyphPageTreeNode::initializePage): Added code to initialize
2696         pages for segmented font data.
2697         (WebCore::GlyphPageTreeNode::getChild):
2698         (WebCore::GlyphPageTreeNode::pruneCustomFontData):
2699         * platform/graphics/GlyphPageTreeNode.h:
2700         (WebCore::GlyphPage::setGlyphDataForCharacter):
2701         (WebCore::GlyphPage::setGlyphDataForIndex):
2702         (WebCore::GlyphPageTreeNode::getRootChild):
2703         * platform/graphics/SegmentedFontData.cpp: Added.
2704         (WebCore::SegmentedFontData::~SegmentedFontData):
2705         (WebCore::SegmentedFontData::fontDataForCharacter):
2706         (WebCore::SegmentedFontData::containsCharacters):
2707         (WebCore::SegmentedFontData::isCustomFont):
2708         (WebCore::SegmentedFontData::isLoading):
2709         (WebCore::SegmentedFontData::isSegmented):
2710         * platform/graphics/SegmentedFontData.h: Added.
2711         (WebCore::FontDataRange::FontDataRange):
2712         (WebCore::FontDataRange::from):
2713         (WebCore::FontDataRange::to):
2714         (WebCore::FontDataRange::fontData):
2715         (WebCore::SegmentedFontData::appendRange):
2716         (WebCore::SegmentedFontData::numRanges):
2717         (WebCore::SegmentedFontData::rangeAt):
2718         * platform/graphics/SimpleFontData.cpp: Copied from WebCore/platform/graphics/FontData.cpp.
2719         (WebCore::SimpleFontData::SimpleFontData):
2720         (WebCore::SimpleFontData::~SimpleFontData):
2721         (WebCore::SimpleFontData::ascent):
2722         (WebCore::SimpleFontData::descent):
2723         (WebCore::SimpleFontData::widthForGlyph):
2724         (WebCore::SimpleFontData::fontDataForCharacter):
2725         (WebCore::SimpleFontData::isSegmented):
2726         * platform/graphics/SimpleFontData.h: Copied from WebCore/platform/graphics/FontData.h.
2727         (WebCore::SimpleFontData::isCustomFont):
2728         (WebCore::SimpleFontData::isLoading):
2729         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2730         (WebCore::GraphicsContext::setPlatformFont):
2731         * platform/graphics/gtk/FontCacheGtk.cpp:
2732         (WebCore::FontCache::getFontDataForCharacters):
2733         * platform/graphics/gtk/FontDataGtk.cpp: Renamed to
2734         SimpleFontDataGtk.cpp.
2735         * platform/graphics/gtk/FontGtk.cpp:
2736         (WebCore::Font::drawGlyphs):
2737         * platform/graphics/gtk/GlyphPageTreeNodeGtk.cpp:
2738         (WebCore::GlyphPage::fill):
2739         * platform/graphics/gtk/SimpleFontDataGtk.cpp: Copied from WebCore/platform/graphics/gtk/FontDataGtk.cpp.
2740         (WebCore::SimpleFontData::platformInit):
2741         (WebCore::SimpleFontData::platformDestroy):
2742         (WebCore::SimpleFontData::smallCapsFontData):
2743         (WebCore::SimpleFontData::containsCharacters):
2744         (WebCore::SimpleFontData::determinePitch):
2745         (WebCore::SimpleFontData::platformWidthForGlyph):
2746         (WebCore::SimpleFontData::setFont):
2747         * platform/graphics/mac/FontCacheMac.mm:
2748         (WebCore::FontCache::getFontDataForCharacters):
2749         * platform/graphics/mac/FontDataMac.mm: Renamed to SimpleFontDataMac.mm.
2750         * platform/graphics/mac/FontMac.mm:
2751         (WebCore::initializeATSUStyle):
2752         (WebCore::overrideLayoutOperation):
2753         (WebCore::ATSULayoutParameters::initialize):
2754         (WebCore::Font::drawGlyphs):
2755         * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
2756         (WebCore::GlyphPage::fill):
2757         * platform/graphics/mac/SimpleFontDataMac.mm: Copied from WebCore/platform/graphics/mac/FontDataMac.mm.
2758         (WebCore::initFontData):
2759         (WebCore::SimpleFontData::platformInit):
2760         (WebCore::SimpleFontData::platformDestroy):
2761         (WebCore::SimpleFontData::smallCapsFontData):
2762         (WebCore::SimpleFontData::containsCharacters):
2763         (WebCore::SimpleFontData::determinePitch):
2764         (WebCore::SimpleFontData::platformWidthForGlyph):
2765         (WebCore::SimpleFontData::checkShapesArabic):
2766         * platform/graphics/qt/FontDataQt.cpp: Renamed to SimpleFontDataQt.cpp.
2767         * platform/graphics/qt/GlyphPageTreeNodeQt.cpp:
2768         (WebCore::GlyphPageTreeNode::pruneTreeCustomFontData):
2769         * platform/graphics/qt/SimpleFontDataQt.cpp: Copied from WebCore/platform/graphics/qt/FontDataQt.cpp.
2770         * platform/graphics/win/FontCacheWin.cpp:
2771         (WebCore::FontCache::getFontDataForCharacters):
2772         * platform/graphics/win/FontDataWin.cpp: Renamed to
2773         SimpleFontDataWin.cpp.
2774         * platform/graphics/win/FontWin.cpp:
2775         (WebCore::Font::drawGlyphs):
2776         * platform/graphics/win/GlyphPageTreeNodeWin.cpp:
2777         (WebCore::GlyphPage::fill):
2778         * platform/graphics/win/SimpleFontDataWin.cpp: Copied from WebCore/platform/graphics/win/FontDataWin.cpp.
2779         (WebCore::SimpleFontData::setShouldApplyMacAscentHack):
2780         (WebCore::SimpleFontData::platformInit):
2781         (WebCore::SimpleFontData::platformDestroy):
2782         (WebCore::SimpleFontData::smallCapsFontData):
2783         (WebCore::SimpleFontData::containsCharacters):
2784         (WebCore::SimpleFontData::determinePitch):
2785         (WebCore::SimpleFontData::platformWidthForGlyph):
2786         (WebCore::SimpleFontData::scriptFontProperties):
2787         * platform/graphics/wx/FontCacheWx.cpp:
2788         (WebCore::FontCache::getFontDataForCharacters):
2789         * platform/graphics/wx/FontDataWx.cpp: Renamed to SimpleFontDataWx.cpp.
2790         * platform/graphics/wx/FontWx.cpp:
2791         (WebCore::Font::drawGlyphs):
2792         * platform/graphics/wx/GlyphMapWx.cpp:
2793         (WebCore::GlyphPage::fill):
2794         * platform/graphics/wx/SimpleFontDataWx.cpp: Copied from WebCore/platform/graphics/wx/FontDataWx.cpp.
2795         (WebCore::SimpleFontData::platformInit):
2796         (WebCore::SimpleFontData::platformDestroy):
2797         (WebCore::SimpleFontData::smallCapsFontData):
2798         (WebCore::SimpleFontData::containsCharacters):
2799         (WebCore::SimpleFontData::determinePitch):
2800         (WebCore::SimpleFontData::platformWidthForGlyph):
2801         * platform/mac/FileChooserMac.mm:
2802         * platform/mac/PopupMenuMac.mm:
2803         * platform/mac/WebCoreTextRenderer.mm:
2804         * platform/win/PopupMenuWin.cpp:
2805         * platform/win/UniscribeController.cpp:
2806         (WebCore::UniscribeController::advance):
2807         (WebCore::UniscribeController::itemizeShapeAndPlace):
2808         (WebCore::UniscribeController::shapeAndPlaceItem):
2809         (WebCore::UniscribeController::shape):
2810         * platform/win/UniscribeController.h:
2811         * svg/SVGFont.cpp:
2812         (WebCore::Font::drawGlyphsWithSVGFont):
2813         * svg/SVGFontElement.cpp:
2814         (WebCore::SVGFontElement::collectGlyphs):
2815         * svg/SVGFontFaceElement.cpp:
2816         (WebCore::SVGFontFaceElement::createFontData):
2817         * svg/SVGFontFaceElement.h:
2818         * svg/SVGGlyphElement.cpp:
2819
2820 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
2821
2822         Not reviewed. Try to fix mac build by forcing SVGNames regeneration.
2823
2824         * svg/svgtags.in:
2825
2826 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
2827
2828         Not reviewed. Proposed build fix for wx.
2829
2830         * webcore-base.bkl:
2831
2832 2008-01-07  Dan Bernstein  <mitz@apple.com>
2833
2834         64-bit build fix
2835
2836         * platform/graphics/mac/FontCustomPlatformData.cpp:
2837         (WebCore::FontCustomPlatformData::fontPlatformData): Have to use a
2838         cast here since FMGetFontFromATSFontRef() is not available on 64-bit.
2839
2840 2008-01-06  Nikolas Zimmermann  <zimmermann@kde.org>
2841
2842         Reviewed by Oliver. Parts reviewed by Eric, David Hyatt & Dan & Alexey.
2843         Fixes: http://bugs.webkit.org/show_bug.cgi?id=15741 (REGRESSION: svg/W3C-SVG-1.1/fonts-elem-03-b.svg shows worse behavior on TOT)
2844
2845         Display SVG Fonts, fill svg/SVGFont.cpp with life by adding all needed code to
2846         measure & render glyphs contained in SVG Fonts, including ligature lookup support.
2847
2848         Implement floatWidth/selectionRectForText for SVG Fonts, fixing text selection.
2849
2850         Support horiz-origin-x/y, horiz-adv-x, vert-adv-y, vert-origin-x/y & arabic-form.
2851         Implement simple algorithm to determine the arabic forms for a string (initial, isolated, medial, terminal).
2852
2853         Removed drawGlyphsWithSVGFont - create a new function drawTextWithSVGFont instead.
2854         This doesn't involve creating/using a 'GlyphBuffer' object anymore, which is not
2855         required for SVG Fonts anyway (we already know all our offsets/advances/etc..)
2856
2857         Don't call it from drawSimpleText anymore, but directly in drawText - as Dan suggested.
2858
2859         <glyph> elements now register themselves in the SVGFontElement's glyph cache.
2860         (insertedIntoDocument / removedFromDocument take care of this)
2861
2862         The cache is built once now, and is kept updated - it's not rebuild anymore
2863         on painting (!) - which was a crude hack for testing.
2864
2865         W3C testcase which include SVG Fonts:
2866         svg/W3C-SVG-1.1/animate-elem-03-t.svg (Fixed, of course not the anim itself, but it's SVG Fonts usage)
2867         svg/W3C-SVG-1.1/animate-elem-24-t.svg (Ditto)
2868         svg/W3C-SVG-1.1/animate-elem-36-t.svg (Ditto)
2869         svg/W3C-SVG-1.1/animate-elem-40-t.svg (Ditto)
2870         svg/W3C-SVG-1.1/fonts-kern-01-t.svg (missing <vkern>/<hkern> support)
2871         svg/W3C-SVG-1.1/fonts-desc-02-t.svg (Fixed, tests CSS font matching based on font-variant attribute)
2872         svg/W3C-SVG-1.1/fonts-elem-01-t.svg (Fixed, basic SVG font test)
2873         svg/W3C-SVG-1.1/fonts-elem-02-t.svg (Fixed, accuracy test for embedded SVG font)
2874         svg/W3C-SVG-1.1/fonts-elem-05-t.svg (Fixed, checks horiz-origin-x support, note: W3C reference image is wrong)
2875         svg/W3C-SVG-1.1/fonts-elem-06-t.svg (Fixed, checks horiz-adv-x support)
2876         svg/W3C-SVG-1.1/fonts-glyph-02-t.svg (Fixed, checks arabic-form support)
2877         svg/W3C-SVG-1.1/fonts-glyph-03-t.svg (Fixed, checks glyph matching based on xml:lang)
2878         svg/W3C-SVG-1.1/masking-mask-01-b.svg (Fixed, SVG Fonts & masking)
2879         svg/W3C-SVG-1.1/pservers-grad-08-b.svg (Fixed, SVG Fonts & gradient on fill/stroke)
2880         svg/W3C-SVG-1.1/render-elems-06-t.svg (Fixed, simple 'fill' property test)
2881         svg/W3C-SVG-1.1/render-elems-07-t.svg (Fixed, simple 'stroke' property test - shows SVG Font interprets stroke-width in glyph coordinate system, as demanded by spec)
2882         svg/W3C-SVG-1.1/render-elems-08-t.svg (Fixed, simple 'fill' & 'stroke' property test)
2883         svg/W3C-SVG-1.1/render-groups-01-b.svg (missing <vkern>/<hkern> support)
2884         svg/W3C-SVG-1.1/render-groups-03-t.svg (Ditto)
2885         svg/W3C-SVG-1.1/text-altglyph-01-b.svg (no <altGlyph> support yet)
2886         svg/W3C-SVG-1.1/text-text-04-t.svg (Fixed, absolute placing of characters pixel perfect now)
2887         svg/W3C-SVG-1.1/text-text-05-t.svg (FIXME: problem with text-anchor)
2888         svg/W3C-SVG-1.1/text-text-06-t.svg (highlights problem with ligatures & absolute positioned characters)
2889
2890         Questionable testcases:
2891         svg/W3C-SVG-1.1/fonts-glyph-04-t.svg (tests that glyph selection is done in the order in the definition of the font element.)
2892         I am not sure why this behaviour is desired, no comment given in spec - doesn't make much sense to me, ignoring it for now.
2893
2894         Several other batik testcases fixed, which use SVG Fonts in combination with gradients & filters.
2895
2896         * css/CSSFontSelector.cpp:
2897         (WebCore::CSSFontSelector::addFontFaceRule):
2898         (WebCore::CSSFontSelector::getFontData):
2899         * platform/graphics/Font.cpp:
2900         (WebCore::Font::lineSpacing):
2901         (WebCore::Font::xHeight):
2902         (WebCore::Font::canUseGlyphCache):
2903         (WebCore::Font::drawGlyphBuffer):
2904         (WebCore::Font::drawText):
2905         (WebCore::Font::floatWidth):
2906         (WebCore::Font::selectionRectForText):
2907         * platform/graphics/Font.h:
2908         (WebCore::TextRun::TextRun):
2909         (WebCore::TextRun::activePaintServer):
2910         (WebCore::TextRun::setActivePaintServer):
2911         * platform/graphics/FontData.cpp:
2912         (WebCore::FontData::lineSpacing):
2913         (WebCore::FontData::lineGap):
2914         (WebCore::FontData::xHeight):
2915         * platform/graphics/FontData.h:
2916         * platform/graphics/win/FontWin.cpp:
2917         (WebCore::Font::drawGlyphs):
2918         * rendering/RenderSVGText.cpp:
2919         (WebCore::RenderSVGText::relativeBBox):
2920         * rendering/SVGInlineTextBox.cpp:
2921         (WebCore::SVGInlineTextBox::paintCharacters):
2922         * rendering/SVGInlineTextBox.h:
2923         * rendering/SVGRootInlineBox.cpp:
2924         (WebCore::SVGRootInlineBoxPaintWalker::chunkPortionCallback):
2925         * svg/SVGFont.cpp:
2926         (WebCore::):
2927         (WebCore::processArabicFormDetection):
2928         (WebCore::charactersWithArabicForm):
2929         (WebCore::isCompatibleArabicForm):
2930         (WebCore::isCompatibleGlyph):
2931         (WebCore::svgFontAndFontFaceElementForFontData):
2932         (WebCore::SVGTextRunWalker::SVGTextRunWalker):
2933         (WebCore::SVGTextRunWalker::walk):
2934         (WebCore::floatWidthUsingSVGFontCallback):
2935         (WebCore::floatWidthMissingGlyphCallback):
2936         (WebCore::floatWidthOfSubStringUsingSVGFont):
2937         (WebCore::Font::floatWidthUsingSVGFont):
2938         (WebCore::drawTextUsingSVGFontCallback):
2939         (WebCore::drawTextMissingGlyphCallback):
2940         (WebCore::Font::drawTextUsingSVGFont):
2941         (WebCore::Font::selectionRectForTextUsingSVGFont):
2942         * svg/SVGFontElement.cpp:
2943         (WebCore::SVGFontElement::SVGFontElement):
2944         (WebCore::SVGFontElement::addGlyphToCache):
2945         (WebCore::SVGFontElement::removeGlyphFromCache):
2946         (WebCore::SVGFontElement::firstMissingGlyphElement):
2947         (WebCore::SVGFontElement::glyphIdentifiersForString):
2948         * svg/SVGFontElement.h:
2949         (WebCore::SVGFontElement::maximumHashKeyLength):
2950         * svg/SVGFontFaceElement.cpp:
2951         (WebCore::SVGFontFaceElement::createFontData):
2952         (WebCore::SVGFontFaceElement::rebuildFontFace):
2953         (WebCore::SVGFontFaceElement::associatedFontElement):
2954         * svg/SVGFontFaceElement.h:
2955         * svg/SVGGlyphElement.cpp:
2956         (WebCore::SVGGlyphElement::insertedIntoDocument):
2957         (WebCore::SVGGlyphElement::removedFromDocument):
2958         (WebCore::parseArabicForm):
2959         (WebCore::SVGGlyphElement::inheritUnspecifiedAttributes):
2960         (WebCore::SVGGlyphElement::buildGlyphIdentifier):
2961         * svg/SVGGlyphElement.h:
2962         (WebCore::SVGGlyphIdentifier::):
2963         (WebCore::SVGGlyphIdentifier::SVGGlyphIdentifier):
2964         (WebCore::SVGGlyphIdentifier::inheritedValue):
2965         (WebCore::SVGGlyphIdentifier::operator==):
2966         (WebCore::SVGGlyphElement::~SVGGlyphElement):
2967
2968 2008-01-07  David Hyatt  <hyatt@apple.com>
2969
2970         Fix for bug 13095, CSS3 multiple backgrounds don't work on table cells.
2971
2972         Reviewed by Dan
2973
2974         * rendering/RenderBox.h:
2975         * rendering/RenderTableCell.cpp:
2976         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
2977
2978 2008-01-07  Holger Freyther  <zecke@selfish.org>
2979
2980         Reviewed by Alp Toker.
2981
2982         * Fix indention
2983
2984         * platform/gtk/ContextMenuGtk.cpp:
2985         (WebCore::ContextMenu::~ContextMenu):
2986
2987 2008-01-07  Holger Freyther  <zecke@selfish.org>
2988
2989         Reviewed by Alp Toker.
2990
2991         * The ContextMenuController is going to live longer than the ContextMenu. It is
2992         going to live as long as the WebCore::Page is around where the ContextMenu, specially
2993         in the case of a SubMenu, is gone before we popup the menu.
2994
2995         * platform/gtk/ContextMenuGtk.cpp:
2996         (WebCore::menuItemActivated):
2997         (WebCore::ContextMenu::appendItem):
2998
2999 2008-01-07  Holger Freyther  <zecke@selfish.org>
3000
3001         Reviewed by Alp Toker.
3002
3003         * Fix SubMenu handling
3004         * Do not connect to the activated signal if we are a separator or submenu
3005         * Change our type from ActionType to SubMenuType when we have a submenu
3006         * Initialize the SubMenu
3007
3008         * platform/gtk/ContextMenuGtk.cpp:
3009         (WebCore::ContextMenu::appendItem):
3010         * platform/gtk/ContextMenuItemGtk.cpp:
3011         (WebCore::ContextMenuItem::ContextMenuItem):
3012         (WebCore::ContextMenuItem::createNativeMenuItem):
3013         (WebCore::ContextMenuItem::setSubMenu):
3014
3015 2008-01-07  Holger Freyther  <zecke@selfish.org>
3016
3017         Reviewed by Alp Toker.
3018
3019         * Qt and Gtk must know if a ContextMenuItem is checkable. Add a new ContextMenuItemType for checkable
3020         actions.
3021         * Use this information in the Gtk platform to create a GtkCheckMenuItem when needed.
3022         * Update the ContextMenuController to accept CheckableActionTypes as well.
3023         * Change ContextMenu.cpp to use the CheckableActionType. The information if a item is checkable
3024         was extracted from ContextMenu::checkOrEnableIfNeeded.
3025         * Update the Qt and Windows port.
3026
3027
3028         * page/ContextMenuController.cpp:
3029         * platform/ContextMenu.cpp:
3030         (WebCore::createAndAppendFontSubMenu):
3031         (WebCore::createAndAppendSpellingAndGrammarSubMenu):
3032         (WebCore::createAndAppendSpellingSubMenu):
3033         (WebCore::createAndAppendWritingDirectionSubMenu):
3034         * platform/ContextMenuItem.h:
3035         * platform/gtk/ContextMenuItemGtk.cpp:
3036         (WebCore::ContextMenuItem::ContextMenuItem):
3037         (WebCore::ContextMenuItem::createNativeMenuItem):
3038
3039 2008-01-07  Luca Bruno  <lethalman88@gmail.com>
3040
3041         Reviewed by Alp Toker.
3042
3043         http://bugs.webkit.org/show_bug.cgi?id=16745
3044         [GTK] Context menu doesn't feel or look native - no icons
3045
3046         Use GTK+ stock icons for menu items where possible.
3047
3048         * platform/gtk/ContextMenuItemGtk.cpp:
3049         (WebCore::gtkStockIDFromContextMenuAction):
3050         (WebCore::ContextMenuItem::createNativeMenuItem):
3051         (WebCore::ContextMenuItem::setAction):
3052
3053 2008-01-07  Dan Bernstein  <mitz@apple.com>
3054
3055         Reviewed by John Sullivan.
3056
3057         - make the ATSUI code path work with custom fonts rather than crash
3058
3059         * platform/graphics/mac/FontCustomPlatformData.cpp:
3060         (WebCore::FontCustomPlatformData::fontPlatformData):
3061         * platform/graphics/mac/FontMac.mm:
3062         (WebCore::initializeATSUStyle):
3063
3064 2008-01-07  Thiago Macieira  <thiago.macieira@trolltech.com>
3065
3066         Reviewed by Simon.
3067
3068         abort() now emits the signals, so disconnect them before you abort()
3069
3070         * platform/network/qt/QNetworkReplyHandler.cpp:
3071         (WebCore::QNetworkReplyHandler::abort):
3072
3073 2008-01-07  Simon Hausmann  <hausmann@webkit.org>
3074
3075         Reviewed by Lars.
3076
3077         Use a faster and safer way of flattening the form data.
3078
3079         * platform/network/qt/QNetworkReplyHandler.cpp:
3080         (WebCore::QNetworkReplyHandler::start):
3081
3082 2008-01-07  Simon Hausmann  <hausmann@webkit.org>
3083
3084         Reviewed by Lars.
3085
3086         Ported of the network backend of the Qt platform to Qt 4.4's new networking API.
3087
3088         * WebCore.pro:
3089         * platform/network/ResourceHandleInternal.h:
3090         * platform/network/qt/QNetworkReplyHandler.cpp: Added.
3091         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
3092         (WebCore::QNetworkReplyHandler::abort):
3093         (WebCore::QNetworkReplyHandler::finish):
3094         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
3095         (WebCore::QNetworkReplyHandler::forwardData):
3096         (WebCore::QNetworkReplyHandler::start):
3097         * platform/network/qt/QNetworkReplyHandler.h: Added.
3098         (WebCore::QNetworkReplyHandler::reply):
3099         * platform/network/qt/ResourceHandleQt.cpp:
3100         (WebCore::ResourceHandle::start):
3101         (WebCore::ResourceHandle::cancel):
3102         (WebCore::ResourceHandle::loadResourceSynchronously):
3103         * platform/network/qt/ResourceRequest.h:
3104         (WebCore::ResourceRequest::ResourceRequest):
3105         * platform/network/qt/ResourceRequestQt.cpp: Added.
3106         (WebCore::ResourceRequest::toNetworkRequest):
3107         * platform/qt/MIMETypeRegistryQt.cpp:
3108         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
3109         * platform/qt/PlugInInfoStoreQt.cpp:
3110         (WebCore::PlugInInfoStore::createPluginInfoForPluginAtIndex):
3111         (WebCore::PlugInInfoStore::pluginCount):
3112         (WebCore::PlugInInfoStore::pluginNameForMIMEType):
3113
3114 2008-01-07  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3115
3116         Reviewed by Lars.
3117
3118         * Remove m_dirtyRegion as it is not used as we pass every dirty region
3119         directly to the ChromeClient
3120
3121         * platform/qt/ScrollViewQt.cpp:
3122         (WebCore::ScrollView::paint):
3123
3124 2008-01-06  Nikolas Zimmermann  <zimmermann@kde.org>
3125
3126         Reviewed by Oliver.
3127
3128         Small CG paint server cleanups - use more GraphicsContext method where possible.
3129
3130         * svg/graphics/cg/CgSupport.cpp:
3131         (WebCore::applyStrokeStyleToContext):
3132         (WebCore::strokeBoundingBox):
3133         * svg/graphics/cg/CgSupport.h:
3134         * svg/graphics/cg/RenderPathCg.cpp:
3135         (WebCore::RenderPath::strokeContains):
3136         * svg/graphics/cg/SVGPaintServerGradientCg.cpp:
3137         (WebCore::SVGPaintServerGradient::setup):
3138         * svg/graphics/cg/SVGPaintServerPatternCg.cpp:
3139         (WebCore::SVGPaintServerPattern::setup):
3140         * svg/graphics/cg/SVGPaintServerSolidCg.cpp:
3141         (WebCore::SVGPaintServerSolid::setup):
3142
3143 2008-01-06  Nikolas Zimmermann  <zimmermann@kde.org>
3144
3145         Reviewed by Dan.
3146
3147         Use new helper function isArabicChar() - which also calls ublock_getCode() == UBLOCK_ARABIC on mac.
3148
3149         * platform/graphics/mac/FontMac.mm:
3150         (WebCore::ATSULayoutParameters::initialize):
3151
3152 2008-01-06  Andrew Wellington  <proton@wiretapped.net>
3153
3154         Reviewed by Darin.
3155         
3156         DOMRange doesn't correctly re-size when inserting items (Acid3)
3157         http://bugs.webkit.org/show_bug.cgi?id=16764
3158         
3159         Update the offset for the range when inserting items into the range.
3160
3161         Test: fast/dom/Range/range-modifycontents.html
3162
3163         * dom/Range.cpp:
3164         (WebCore::Range::insertNode):
3165
3166 2008-01-06  Alexey Proskuryakov  <ap@webkit.org>
3167
3168         Reviewed by Darin.
3169
3170         http://bugs.webkit.org/show_bug.cgi?id=16731
3171         Incorrect node type for whitespace when setting innerHTML in an XHTML document
3172
3173         Test: fast/dom/xhtml-fragment-whitespace.xhtml
3174
3175         * dom/XMLTokenizer.cpp: (WebCore::parseXMLDocumentFragment):
3176         Use balancedCharactersHandler for ignorable whitespace.
3177
3178 2008-01-06  Alexey Proskuryakov  <ap@webkit.org>
3179
3180         Reviewed by Darin.
3181
3182         http://bugs.webkit.org/show_bug.cgi?id=16701
3183         <rdar://problem/5666580> REGRESSION: URL-encoded space (%20) in livejournal url
3184         causes page load error
3185
3186         Test: http/tests/misc/location-with-space.php
3187
3188         * platform/network/cf/ResourceRequestCFNet.cpp:
3189         (WebCore::ResourceRequest::doUpdatePlatformRequest): Do update its URL, too.
3190
3191 2008-01-06  Andrew Wellington  <proton@wiretapped.net>
3192
3193         Reviewed by Darin.
3194         
3195         DOMRange.cloneContents does not work (Acid3 bug)
3196         http://bugs.webkit.org/show_bug.cgi?id=16748
3197         
3198         When cloning an empty range, return an empty DocmentFragment instead of
3199         null or undefined.
3200
3201         Test: fast/dom/Range/range-clone-empty.html
3202
3203         * dom/Range.cpp:
3204         (WebCore::Range::processContents):
3205
3206 2008-01-06  Luca Bruno  <lethalman88@gmail.com>
3207
3208         Reviewed by Alp Toker.
3209
3210         Remove curl handles immediately if the timer is not running.
3211
3212         * platform/network/curl/ResourceHandleManager.cpp:
3213         (WebCore::ResourceHandleManager::cancel):
3214
3215 2008-01-06  Alp Toker  <alp@atoker.com>
3216
3217         Reviewed by Eric.
3218
3219         Cairo canvas refcounting fix. Reference the surface in the constructor
3220         to match its destruction in the destructor.
3221
3222         Fixes a crash triggered by leaving this page:
3223           http://philip.html5.org/tests/canvas/misc/globalalpha-pattern.html
3224
3225         * html/CanvasPattern.cpp:
3226         (WebCore::CanvasPattern::CanvasPattern):
3227
3228 2008-01-06  Eric Seidel  <eric@webkit.org>
3229
3230         Reviewed by darin.
3231
3232         Make attr selectors case-insensitive for certain HTML attributes
3233         http://bugs.webkit.org/show_bug.cgi?id=15470
3234
3235         Test: fast/css/html-attr-case-sensitivity.html
3236
3237         * css/CSSStyleSelector.cpp:
3238         (WebCore::addLocalNameToSet):
3239         (WebCore::createHtmlCaseInsensitiveAttributesSet):
3240         (WebCore::htmlAttributeHasCaseInsensitiveValue):
3241         (WebCore::CSSStyleSelector::checkOneSelector):
3242
3243 2008-01-06  Eric Seidel  <eric@webkit.org>
3244
3245         Reviewed by Sam.
3246
3247         Fix :checked matching type='text' and add test case
3248         http://bugs.webkit.org/show_bug.cgi?id=16750
3249
3250         Test: fast/dom/HTMLInputElement/checked-pseudo-selector.html
3251
3252         * html/HTMLInputElement.h: isChecked() can only be true for RADIO or CHECKBOX
3253
3254 2008-01-05  Sam Weinig  <sam@webkit.org>
3255
3256         Reviewed by Eric Seidel.
3257
3258         Patch for http://bugs.webkit.org/show_bug.cgi?id=16758
3259         ASSERT when using TreeWalker methods for a current node outside of the root (Acid3)
3260
3261         - Ensure that returned nodes are within the root node, or return 0, in adherence with the spec.
3262
3263         Test: fast/dom/TreeWalker/TreeWalker-currentNode.html
3264
3265         * dom/TreeWalker.cpp:
3266         (WebCore::TreeWalker::parentNode):
3267         (WebCore::TreeWalker::firstChild):
3268         (WebCore::TreeWalker::lastChild):
3269         (WebCore::TreeWalker::previousSibling):
3270         (WebCore::TreeWalker::nextSibling):
3271         (WebCore::TreeWalker::previousNode):
3272         (WebCore::TreeWalker::nextNode):
3273
3274 2008-01-04  Oliver Hunt  <oliver@apple.com>
3275
3276         Reviewed by Beth Dakin.
3277
3278         Fix bounds computation bugs responsible for http://bugs.webkit.org/show_bug.cgi?id=16015
3279         and other image repaint bugs.
3280
3281         We now cache the full local bounds for the <image> element, as otherwise certain
3282         combinations of attribute changes could result in incorrect dirty rects.
3283         Additionally we no longer use any of the integer bounds fields on RenderObject for
3284         determining repaint bounds (this was the principle cause of bug #16015).
3285
3286         I also removed the outline painting code as it was both wrong, and not correctly
3287         repainted.  I feel safe doing this as no other browser or viewer supports outline
3288         properties on svg elements.
3289
3290         I was unable to make a testcase for this unfortunately, despite seemingly deterministic 
3291         behaviour :(
3292
3293         * rendering/RenderSVGImage.cpp:
3294         (WebCore::RenderSVGImage::layout):
3295         (WebCore::RenderSVGImage::paint):
3296         (WebCore::RenderSVGImage::nodeAtPoint):
3297         (WebCore::RenderSVGImage::calculateAbsoluteBounds):
3298         * rendering/RenderSVGImage.h:
3299
3300 2008-01-04  Beth Dakin  <bdakin@apple.com>
3301
3302         Reviewed by Oliver.
3303
3304         Fix for http://bugs.webkit.org/show_bug.cgi?id=16704 input with 
3305         type="hidden" matches :enabled/:disabled (Acid3 bug)
3306
3307         Prevent :enabled and :disabled from applying to input type="hidden" 
3308
3309         * css/CSSStyleSelector.cpp:
3310         (WebCore::CSSStyleSelector::checkOneSelector): Rather than 
3311         allowing :enabled and :disabled to apply to all controls, only 
3312         allow it to apply to non-"hidden" controls
3313         * dom/Element.h:
3314         (WebCore::Element::isInputTypeHidden): 
3315         * html/HTMLInputElement.h:
3316         (WebCore::HTMLInputElement::isInputTypeHidden):
3317
3318 2008-01-04  Sam Weinig  <sam@webkit.org>
3319
3320         Reviewed by Oliver Hunt.
3321
3322         - Match the spec when calling getFloatValue, getStringValue, getCounterValue,
3323           getRectValue and getRGBColorValue of CSSPrimitiveValue by throwing exceptions
3324           if the type of the CSSPrimitiveValue is not the same as the type requested.
3325         - Fix the intermittent assertion failure seen in svg/css/glyph-orientation-rounding-test.xhtml
3326
3327         Test: fast/css/CSSPrimitiveValue-exceptions.html
3328
3329         * css/CSSPrimitiveValue.cpp:
3330         (WebCore::CSSPrimitiveValue::getDoubleValue):
3331         (WebCore::CSSPrimitiveValue::getStringValue):
3332         (WebCore::CSSPrimitiveValue::getCounterValue):
3333         (WebCore::CSSPrimitiveValue::getRectValue):
3334         (WebCore::CSSPrimitiveValue::getRGBColorValue):
3335         (WebCore::CSSPrimitiveValue::getPairValue):
3336         * css/CSSPrimitiveValue.h:
3337         (WebCore::CSSPrimitiveValue::getFloatValue):
3338         (WebCore::CSSPrimitiveValue::getIntValue):
3339         (WebCore::CSSPrimitiveValue::getCounterValue):
3340         (WebCore::CSSPrimitiveValue::getRectValue):
3341         (WebCore::CSSPrimitiveValue::getDashboardRegionValue):
3342         * css/CSSPrimitiveValue.idl:
3343
3344 2008-01-04  Antti Koivisto  <antti@apple.com>
3345
3346         Reviewed by Darin.
3347         
3348         Windows part of <rdar://problem/5647034>
3349         Media tests crash if an old version of QuickTime is installed
3350
3351         Check QuickTime version on Windows too.
3352
3353         * platform/graphics/MediaPlayer.cpp:
3354         (WebCore::MediaPlayer::isAvailable):
3355         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
3356         (WebCore::MediaPlayerPrivate::isAvailable):
3357         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
3358         (WebCore::MediaPlayerPrivate::isAvailable):
3359         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
3360         * platform/graphics/win/QTMovieWin.cpp:
3361         (QTMovieWin::initializeQuickTime):
3362
3363 2008-01-04  Darin Adler  <darin@apple.com>
3364
3365         Reviewed by Maciej and Alice.
3366
3367         - fix <rdar://problem/4404302> Borders where there should be none (canadasmountains.com)
3368
3369         Test: fast/images/border.html
3370
3371         * html/HTMLImageElement.cpp:
3372         (WebCore::HTMLImageElement::parseMappedAttribute): Change the code that handles cases
3373         where the border value is not a number to use the value "0" for the border width instead
3374         of not setting the border width and style at all. This matches other browsers, and makes
3375         more sense.
3376
3377 2008-01-04  Antti Koivisto  <antti@apple.com>
3378
3379         Try to fix 64-bit build
3380
3381         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3382         (WebCore::MediaPlayerPrivate::isAvailable):
3383
3384 2008-01-04  Stephanie  <slewis@apple.com>
3385
3386         Reviewed by Oliver.
3387
3388         WARNING: NO TEST CASES ADDED OR CHANGED
3389
3390         Fix another stringImpl leak.
3391
3392         * platform/text/StringImpl.cpp: remove an extra allocation
3393         (WebCore::StringImpl::StringImpl):
3394
3395 2008-01-04  Alice Liu  <alice.liu@apple.com>
3396
3397         Reviewed by Mitz.
3398
3399         * platform/graphics/win/FontCacheWin.cpp:
3400         fix loop condition that was causing crash
3401
3402 2008-01-04  Timothy Hatcher  <timothy@apple.com>
3403
3404         Reviewed by Adam Roben.
3405
3406         <rdar://problem/5671059> Always show the Timeline and Console buttons in the Inspector
3407
3408         * page/inspector/inspector.css: Remove styles related to the toggle button
3409           and make the area always visible. 
3410         * page/inspector/inspector.html: Remove the toggle button.
3411         * page/inspector/inspector.js: Remove code to toggle the status area.
3412
3413 2008-01-04  Alexey Proskuryakov  <ap@webkit.org>
3414
3415         Reviewed by Adam Roben.
3416
3417         Temporarily restore BackwardDelete for Windows nightlies to work correctly.
3418
3419         * editing/EditorCommand.cpp: (WebCore::CommandEntry::):
3420
3421 2008-01-04  Alexey Proskuryakov  <ap@webkit.org>
3422
3423         Reviewed by Darin.
3424
3425         <rdar://problem/5611712> xsl:sort does not use a case folding sort, and the 'case-order' attribute is ignored (16077)
3426
3427         Enable the fix on Windows.
3428
3429         * xml/XSLTProcessor.cpp: (WebCore::XSLTProcessor::transformToString):
3430         Always set a custom sort function, even if it doesn't implement proper collation on the platform.
3431
3432         * xml/XSLTUnicodeSort.cpp:
3433         (WebCore::xsltUnicodeSortFunction):
3434         * xml/XSLTUnicodeSort.h:
3435         If the platform does not use ICU, or ICU has collation support disabled, fall back to binary comparison.
3436
3437 2008-01-04  Antti Koivisto  <antti@apple.com>
3438
3439         Fix build.
3440
3441         * bindings/js/JSHTMLElementWrapperFactory.cpp:
3442
3443 2008-01-04  Antti Koivisto  <antti@apple.com>
3444
3445         Reviewed by Darin.
3446         
3447         Partial fix for <rdar://problem/5647034>
3448         Media tests crash if an old version of QuickTime is installed
3449
3450         Disable media support if QuickTime is not current enough (>=7.3).
3451         
3452         Windows patch coming soon.
3453
3454         * bindings/js/JSHTMLElementWrapperFactory.cpp:
3455         (WebCore::createJSHTMLWrapper):
3456         * bindings/js/kjs_window.cpp:
3457         (KJS::Window::getValueProperty):
3458         * html/HTMLElementFactory.cpp:
3459         (WebCore::audioConstructor):
3460         (WebCore::videoConstructor):
3461         (WebCore::sourceConstructor):
3462         * platform/graphics/MediaPlayer.cpp:
3463         (WebCore::MediaPlayer::isAvailable):
3464         * platform/graphics/MediaPlayer.h:
3465         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
3466         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3467         (WebCore::MediaPlayerPrivate::isAvailable):
3468
3469 2008-01-04  Timothy Hatcher  <timothy@apple.com>
3470
3471         Reviewed by Darin Adler.
3472
3473         <rdar://problem/5604409> JavaScript privilege escalation when Web Inspector accesses page unsafely (16011)
3474
3475         Check if the property is a getter before asking for the value.
3476         If the property is a getter, we no longer show the value.
3477
3478         * page/inspector/PropertiesSidebarPane.js:
3479         * page/inspector/inspector.css:
3480
3481 2008-01-04  Dan Bernstein  <mitz@apple.com>
3482
3483         Reviewed by Darin Adler.
3484
3485         - fix synthetic bold and italic on Windows
3486
3487         Covered by an existing test.
3488
3489         * platform/graphics/win/FontPlatformDataWin.cpp:
3490         (WebCore::FontPlatformData::FontPlatformData):
3491
3492 2008-01-04  Alp Toker  <alp@atoker.com>
3493
3494         GTK+ autotools build fix. Terminate empty rules.
3495
3496         * GNUmakefile.am:
3497
3498 2008-01-04  Lars Knoll  <lars@trolltech.com>
3499
3500         Reviewed by Simon.
3501
3502         Remove most dependencies of Widget/ScrollView onto native QWidgets.
3503
3504         This also brings the code closer in line with the Windows code. Seems
3505         to work nicely on first try :)
3506
3507         * page/qt/FrameQt.cpp:
3508         (WebCore::Frame::createScriptInstanceForWidget):
3509         * platform/Widget.h:
3510         * platform/qt/PlatformScreenQt.cpp:
3511         (WebCore::screenDepth):
3512         (WebCore::screenDepthPerComponent):
3513         (WebCore::screenIsMonochrome):
3514         (WebCore::screenRect):
3515         * platform/qt/PlatformScrollBarQt.cpp:
3516         (WebCore::PlatformScrollbar::thumbPosition):
3517         (WebCore::PlatformScrollbar::handleMouseMoveEvent):
3518         * platform/qt/ScrollViewQt.cpp:
3519         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
3520         (WebCore::ScrollView::ScrollViewPrivate::scrollBackingStore):
3521         (WebCore::ScrollView::updateContents):
3522         (WebCore::ScrollView::update):
3523         (WebCore::ScrollView::scrollRectIntoViewRecursively):
3524         (WebCore::ScrollView::updateScrollbars):
3525         (WebCore::ScrollView::addChild):
3526         (WebCore::ScrollView::removeChild):
3527         (WebCore::ScrollView::paint):
3528         * platform/qt/WidgetQt.cpp:
3529         (WebCore::WidgetPrivate::WidgetPrivate):
3530         (WebCore::WidgetPrivate::~WidgetPrivate):
3531         (WebCore::Widget::frameGeometry):
3532         (WebCore::Widget::setFrameGeometry):
3533         (WebCore::Widget::setCursor):
3534         (WebCore::Widget::show):
3535         (WebCore::Widget::hide):
3536         (WebCore::Widget::nativeWidget):
3537         (WebCore::Widget::setNativeWidget):
3538         (WebCore::Widget::suppressInvalidation):
3539         (WebCore::Widget::setSuppressInvalidation):
3540         (WebCore::Widget::invalidateRect):
3541         (WebCore::Widget::topLevel):
3542         (WebCore::Widget::containingWindow):
3543
3544 2008-01-04  Lars Knoll  <lars@trolltech.com>
3545
3546         Reviewed by Simon.
3547
3548         make QWebPage a QObject and get things to compile.
3549
3550         Nothing works currently though.
3551
3552         * platform/qt/ScrollViewQt.cpp:
3553         (WebCore::ScrollView::updateContents):
3554         (WebCore::ScrollView::update):
3555         * platform/qt/WidgetQt.cpp:
3556         (WebCore::Widget::qwidget):
3557         (WebCore::Widget::invalidateRect):
3558
3559 2008-01-04  Alp Toker  <alp@atoker.com>
3560
3561         Reviewed by Mark Rowe.
3562
3563         http://bugs.webkit.org/show_bug.cgi?id=16667
3564         make -j is failing with the autotools based system
3565
3566         Support parallel code generation. Nearly every use of explicit
3567         multiple targets was a potential concurrency bug, though in practice
3568         the bison rules were the first to be noticed because they took longer
3569         to complete and broke the build immediately.
3570
3571         * GNUmakefile.am:
3572
3573 2008-01-04  Alp Toker  <alp@atoker.com>
3574
3575         Reviewed by Mark Rowe.
3576
3577         Re-use a single static dummy surface rather than creating and
3578         destroying a surface for each CairoPath.
3579
3580         * platform/graphics/cairo/CairoPath.h:
3581         (WebCore::CairoPath::CairoPath):
3582
3583 2008-01-04  Mark Rowe  <mrowe@apple.com>
3584
3585         Tiger build fix.
3586
3587         * platform/Threading.h: The OSAtomic functions take non-volatile pointers on Tiger.
3588
3589 2008-01-03  Mark Rowe  <mrowe@apple.com>
3590
3591         Reviewed by Maciej Stachowiak.
3592
3593         Use platform-provided atomic operations in place of inline assembly to
3594         increase portability.
3595
3596         * platform/Threading.h:
3597         (WebCore::atomicIncrement):
3598         (WebCore::atomicDecrement):
3599