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