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