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