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