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