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