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