2008-04-01 Holger Hans Peter Freyther <holger.freyther@trolltech.com>
[WebKit-https.git] / WebCore / ChangeLog
1 2008-04-01  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2
3         Reviewed by Simon.
4
5         * Do not store the QWebFrame associated with a ScrollView/FrameView
6         in the WebCore::Widget.
7         * Instead of asking the Widget for the QWebFrame use the QWebFramePrivate::core
8         and QWebFramePrivate::kit function to convert from and to QWebFrame.
9
10         * platform/Widget.h:
11         * platform/qt/WidgetQt.cpp:
12         (WebCore::WidgetPrivate::WidgetPrivate):
13         (WebCore::Widget::containingWindow):
14
15 2008-04-01  Alice Liu  <alice.liu@apple.com>
16         Patch by Beth Dakin <bdakin@apple.com> and Alice Liu
17
18         Reviewed by Darin.
19
20         Refactored WebCore Accessibility code.  Prior to this patch, WebCore
21         accessibility was implemented in an ObjC class named WebCoreAXObject,
22         with much of the "guts" in C++.  This patch the next natural step of
23         factoring out the C++ code into a class named AccessibilityObject, and 
24         in order to maintain the required ObjC object ties, also implements an
25         ObjC class named AccessibilityObjectWrapper as a thin wrapper around the
26         C++ object.  Internally within WebCore we operate on the C++ object as
27         much as possible, and the ObjC object gets used mostly when we need to
28         return something to AppKit or call something implemented on NSObject.
29         The AXObjectCache still keeps one HashMap, now of RenderObjects to
30         AccessibilityObjects instead of WebCoreAXObjects, and the
31         AccessibilityObject keeps track of its ObjC wrapper.
32
33         * WebCore.xcodeproj/project.pbxproj:
34         * page/AXObjectCache.h:
35         (WebCore::AXObjectCache::get):
36         (WebCore::AXObjectCache::removeAXID):
37         * page/AccessibilityObject.cpp: Added.
38         (WebCore::AccessibilityObject::AccessibilityObject):
39         (WebCore::AccessibilityObject::~AccessibilityObject):
40         (WebCore::AccessibilityObject::create):
41         (WebCore::AccessibilityObject::detach):
42         (WebCore::AccessibilityObject::firstChild):
43         (WebCore::AccessibilityObject::lastChild):
44         (WebCore::AccessibilityObject::previousSibling):
45         (WebCore::AccessibilityObject::nextSibling):
46         (WebCore::AccessibilityObject::parentObject):
47         (WebCore::AccessibilityObject::parentObjectUnignored):
48         (WebCore::AccessibilityObject::isWebArea):
49         (WebCore::AccessibilityObject::isImageButton):
50         (WebCore::AccessibilityObject::isAnchor):
51         (WebCore::AccessibilityObject::isTextControl):
52         (WebCore::AccessibilityObject::isImage):
53         (WebCore::AccessibilityObject::isAttachment):
54         (WebCore::isPasswordFieldElement):
55         (WebCore::AccessibilityObject::isPasswordField):
56         (WebCore::AccessibilityObject::headingLevel):
57         (WebCore::AccessibilityObject::isHeading):
58         (WebCore::AccessibilityObject::anchorElement):
59         (WebCore::isCheckboxOrRadio):
60         (WebCore::AccessibilityObject::actionElement):
61         (WebCore::AccessibilityObject::mouseButtonListener):
62         (WebCore::AccessibilityObject::helpText):
63         (WebCore::AccessibilityObject::textUnderElement):
64         (WebCore::AccessibilityObject::hasIntValue):
65         (WebCore::AccessibilityObject::intValue):
66         (WebCore::AccessibilityObject::stringValue):
67         (WebCore::labelForElement):
68         (WebCore::AccessibilityObject::title):
69         (WebCore::AccessibilityObject::accessibilityDescription):
70         (WebCore::AccessibilityObject::boundingBoxRect):
71         (WebCore::AccessibilityObject::size):
72         (WebCore::AccessibilityObject::linkedUIElement):
73         (WebCore::AccessibilityObject::accessibilityShouldUseUniqueId):
74         (WebCore::AccessibilityObject::accessibilityIsIgnored):
75         (WebCore::AccessibilityObject::loaded):
76         (WebCore::AccessibilityObject::layoutCount):
77         (WebCore::AccessibilityObject::textLength):
78         (WebCore::AccessibilityObject::selectedText):
79         (WebCore::AccessibilityObject::selection):
80         (WebCore::AccessibilityObject::selectedTextRange):
81         (WebCore::AccessibilityObject::setSelectedText):
82         (WebCore::AccessibilityObject::setSelectedTextRange):
83         (WebCore::AccessibilityObject::makeRangeVisible):
84         (WebCore::AccessibilityObject::url):
85         (WebCore::AccessibilityObject::isVisited):
86         (WebCore::AccessibilityObject::isFocused):
87         (WebCore::AccessibilityObject::setFocused):
88         (WebCore::AccessibilityObject::setValue):
89         (WebCore::AccessibilityObject::isEnabled):
90         (WebCore::AccessibilityObject::press):
91         (WebCore::AccessibilityObject::topRenderer):
92         (WebCore::AccessibilityObject::textControl):
93         (WebCore::AccessibilityObject::widget):
94         (WebCore::AccessibilityObject::axObjectCache):
95         (WebCore::AccessibilityObject::documentLinks):
96         (WebCore::AccessibilityObject::documentFrameView):
97         (WebCore::AccessibilityObject::frameViewIfRenderView):
98         (WebCore::AccessibilityObject::visiblePositionRange):
99         (WebCore::AccessibilityObject::doAXTextMarkerRangeForLine):
100         (WebCore::AccessibilityObject::doAXTextMarkerRangeForUnorderedTextMarkers):
101         (WebCore::AccessibilityObject::doAXLeftWordTextMarkerRangeForTextMarker):
102         (WebCore::AccessibilityObject::doAXRightWordTextMarkerRangeForTextMarker):
103         (WebCore::updateAXLineStartForVisiblePosition):
104         (WebCore::AccessibilityObject::doAXLeftLineTextMarkerRangeForTextMarker):
105         (WebCore::AccessibilityObject::doAXRightLineTextMarkerRangeForTextMarker):
106         (WebCore::AccessibilityObject::doAXSentenceTextMarkerRangeForTextMarker):
107         (WebCore::AccessibilityObject::doAXParagraphTextMarkerRangeForTextMarker):
108         (WebCore::startOfStyleRange):
109         (WebCore::endOfStyleRange):
110         (WebCore::AccessibilityObject::doAXStyleTextMarkerRangeForTextMarker):
111         (WebCore::AccessibilityObject::textMarkerRangeForRange):
112         (WebCore::AccessibilityObject::stringForReplacedNode):
113         (WebCore::AccessibilityObject::doAXStringForTextMarkerRange):
114         (WebCore::AccessibilityObject::doAXBoundsForTextMarkerRange):
115         (WebCore::AccessibilityObject::doAXLengthForTextMarkerRange):
116         (WebCore::AccessibilityObject::doSetAXSelectedTextMarkerRange):
117         (WebCore::AccessibilityObject::doAXTextMarkerForPosition):
118         (WebCore::AccessibilityObject::doAXNextTextMarkerForTextMarker):
119         (WebCore::AccessibilityObject::doAXPreviousTextMarkerForTextMarker):
120         (WebCore::AccessibilityObject::doAXNextWordEndTextMarkerForTextMarker):
121         (WebCore::AccessibilityObject::doAXPreviousWordStartTextMarkerForTextMarker):
122         (WebCore::AccessibilityObject::doAXNextLineEndTextMarkerForTextMarker):
123         (WebCore::AccessibilityObject::doAXPreviousLineStartTextMarkerForTextMarker):
124         (WebCore::AccessibilityObject::doAXNextSentenceEndTextMarkerForTextMarker):
125         (WebCore::AccessibilityObject::doAXPreviousSentenceStartTextMarkerForTextMarker):
126         (WebCore::AccessibilityObject::doAXNextParagraphEndTextMarkerForTextMarker):
127         (WebCore::AccessibilityObject::doAXPreviousParagraphStartTextMarkerForTextMarker):
128         (WebCore::AccessibilityObject::textMarkerForIndex):
129         (WebCore::AccessibilityObject::doAXUIElementForTextMarker):
130         (WebCore::AccessibilityObject::doAXLineForTextMarker):
131         (WebCore::AccessibilityObject::rangeForTextMarkerRange):
132         (WebCore::AccessibilityObject::indexForTextMarker):
133         (WebCore::AccessibilityObject::doAXRangeForLine):
134         (WebCore::AccessibilityObject::doAXRangeForPosition):
135         (WebCore::AccessibilityObject::doAXRangeForIndex):
136         (WebCore::AccessibilityObject::doAXStyleRangeForIndex):
137         (WebCore::AccessibilityObject::doAXStringForRange):
138         (WebCore::AccessibilityObject::doAXBoundsForRange):
139         (WebCore::AccessibilityObject::doAXLineForIndex):
140         (WebCore::AccessibilityObject::doAccessibilityHitTest):
141         (WebCore::AccessibilityObject::focusedUIElement):
142         (WebCore::AccessibilityObject::observableObject):
143         (WebCore::AccessibilityObject::roleValue):
144         (WebCore::AccessibilityObject::canSetFocusAttribute):
145         (WebCore::AccessibilityObject::canSetValueAttribute):
146         (WebCore::AccessibilityObject::canSetTextRangeAttributes):
147         (WebCore::AccessibilityObject::childrenChanged):
148         (WebCore::AccessibilityObject::clearChildren):
149         (WebCore::AccessibilityObject::hasChildren):
150         (WebCore::AccessibilityObject::addChildren):
151         (WebCore::AccessibilityObject::axObjectID):
152         (WebCore::AccessibilityObject::setAXObjectID):
153         (WebCore::AccessibilityObject::removeAXObjectID):
154         * page/AccessibilityObject.h: Added.
155         (WebCore::):
156         (WebCore::VisiblePositionRange::VisiblePositionRange):
157         (WebCore::VisiblePositionRange::isNull):
158         (WebCore::AccessibilityObject::detached):
159         (WebCore::AccessibilityObject::PlainTextRange::PlainTextRange):
160         (WebCore::AccessibilityObject::PlainTextRange::isNull):
161         (WebCore::AccessibilityObject::renderer):
162         (WebCore::AccessibilityObject::children):
163         (WebCore::AccessibilityObject::wrapper):
164         (WebCore::AccessibilityObject::setWrapper):
165         * page/mac/AXObjectCacheMac.mm:
166         (WebCore::AXObjectCache::~AXObjectCache):
167         (WebCore::AXObjectCache::get):
168         (WebCore::AXObjectCache::remove):
169         (WebCore::AXObjectCache::getAXID):
170         (WebCore::AXObjectCache::removeAXID):
171         (WebCore::AXObjectCache::textMarkerForVisiblePosition):
172         (WebCore::AXObjectCache::childrenChanged):
173         (WebCore::AXObjectCache::postNotification):
174         (WebCore::AXObjectCache::postNotificationToElement):
175         * page/mac/AccessibilityObjectMac.mm: Added.
176         (createAccessibilityRoleMap):
177         (RoleEntry::):
178         (roleValueToNSString):
179         (AccessibilityObject::attachmentView):
180         (AccessibilityObject::performPressActionForAttachment):
181         (AccessibilityObject::textMarkerRange):
182         (AccessibilityObject::textMarkerForVisiblePosition):
183         (AccessibilityObject::startTextMarker):
184         (AccessibilityObject::visiblePositionForTextMarker):
185         (AccessibilityObject::visiblePositionForStartOfTextMarkerRange):
186         (AccessibilityObject::visiblePositionForEndOfTextMarkerRange):
187         (AccessibilityObject::textMarkerRangeFromVisiblePositions):
188         (AccessibilityObject::textMarkerRangeForSelection):
189         (AccessibilityObject::textMarkerRangeFromMarkers):
190         (AccessibilityObject::convertViewRectToScreenCoords):
191         (AccessibilityObject::convertAbsolutePointToViewCoords):
192         (AccessibilityObject::convertWidgetChildrenToNSArray):
193         (AccessibilityObject::position):
194         (AccessibilityObject::role):
195         (AccessibilityObject::subrole):
196         (AccessibilityObject::roleDescription):
197         (blockquoteLevel):
198         (AccessibilityObject::AXAttributeStringSetElement):
199         (AXAttributeStringSetBlockquoteLevel):
200         (CreateCGColorIfDifferent):
201         (AXAttributeStringSetColor):
202         (AXAttributeStringSetNumber):
203         (AXAttributeStringSetFont):
204         (AXAttributeStringSetStyle):
205         (AccessibilityObject::AXAttributeStringSetHeadingLevel):
206         (AccessibilityObject::AXLinkElementForNode):
207         (AXAttributeStringSetSpelling):
208         (AccessibilityObject::AXAttributedStringAppendText):
209         (nsStringForReplacedNode):
210         (AccessibilityObject::doAXAttributedStringForTextMarkerRange):
211         (AccessibilityObject::doAXAttributedStringForRange):
212         (AccessibilityObject::doAXRTFForRange):
213         * page/mac/AccessibilityObjectWrapper.h: Added.
214         * page/mac/AccessibilityObjectWrapper.mm: Added.
215         (-[AccessibilityObjectWrapper initWithAccessibilityObject:]):
216         (-[AccessibilityObjectWrapper unregisterUniqueIdForUIElement]):
217         (-[AccessibilityObjectWrapper detach]):
218         (-[AccessibilityObjectWrapper accessibilityObject]):
219         (-[AccessibilityObjectWrapper accessibilityActionNames]):
220         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
221         (-[AccessibilityObjectWrapper visiblePositionRangeForTextMarkerRange:]):
222         (-[AccessibilityObjectWrapper renderWidgetChildren]):
223         (convertToNSArray):
224         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
225         (-[AccessibilityObjectWrapper accessibilityFocusedUIElement]):
226         (-[AccessibilityObjectWrapper accessibilityHitTest:]):
227         (-[AccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
228         (-[AccessibilityObjectWrapper accessibilityIsIgnored]):
229         (-[AccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
230         (-[AccessibilityObjectWrapper accessibilityPerformAction:]):
231         (-[AccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
232         (rendererForView):
233         (-[AccessibilityObjectWrapper _accessibilityParentForSubview:]):
234         (-[AccessibilityObjectWrapper accessibilityActionDescription:]):
235         (-[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
236         (-[AccessibilityObjectWrapper accessibilityShouldUseUniqueId]):
237         * page/mac/WebCoreAXObject.h: Removed.
238         * page/mac/WebCoreAXObject.mm: Removed.
239         * rendering/RenderMenuList.cpp:
240         (WebCore::RenderMenuList::selectElement):
241         * rendering/RenderMenuList.h:
242
243 2008-03-31  Dan Bernstein  <mitz@apple.com>
244
245         - fix previous attempted fixes
246
247         * platform/qt/TemporaryLinkStubs.cpp:
248         (PluginDatabase::getPluginPathsInDirectories):
249         * platform/wx/TemporaryLinkStubs.cpp:
250         (PluginDatabase::getPluginPathsInDirectories):
251
252 2008-03-31  Dan Bernstein  <mitz@apple.com>
253
254         - fix Qt link stubs
255
256         * platform/qt/TemporaryLinkStubs.cpp:
257         (PluginDatabase::getPluginPathsInDirectories):
258         (PluginDatabase::isPreferredPluginDirectory):
259
260 2008-03-31  Dan Bernstein  <mitz@apple.com>
261
262         - try to fix the Wx build
263
264         * platform/wx/TemporaryLinkStubs.cpp:
265         (PluginDatabase::getPluginPathsInDirectories):
266         (PluginDatabase::isPreferredPluginDirectory):
267
268 2008-03-31  Dan Bernstein  <mitz@apple.com>
269
270         - Gtk and Qt build fixes
271
272         * platform/graphics/gtk/FontCustomPlatformData.cpp:
273         (WebCore::FontCustomPlatformData::fontPlatformData):
274         * platform/graphics/gtk/FontCustomPlatformData.h:
275         * platform/graphics/qt/FontCustomPlatformData.cpp:
276         (WebCore::FontCustomPlatformData::fontPlatformData):
277         * platform/graphics/qt/FontCustomPlatformData.h:
278
279 2008-03-31  Dan Bernstein  <mitz@apple.com>
280
281         - Mac build fix
282
283         * platform/graphics/mac/FontCustomPlatformData.cpp:
284         (WebCore::FontCustomPlatformData::fontPlatformData):
285         * platform/graphics/mac/FontCustomPlatformData.h:
286
287 2008-03-31  Dan Bernstein  <mitz@apple.com>
288
289         Reviewed by Darin Adler.
290
291         - fix <rdar://problem/5792638> @font-face with downloadable fonts doesn't work with GDI text
292
293         * WebCore.vcproj/WebCore.vcproj: Added GetEOTHeader.{h,cpp}
294
295         * css/CSSFontFaceSource.cpp:
296         (WebCore::CSSFontFaceSource::getFontData): Changed to pass the rendering
297         mode to CachedFont::platformDataFromCustomData().
298
299         * loader/CachedFont.cpp:
300         (WebCore::CachedFont::platformDataFromCustomData): Added a rendering
301         mode parameter which is passed down to
302         FontCustomPlatformData::fontPlatformData().
303
304         * loader/CachedFont.h:
305
306         * platform/graphics/win/FontCacheWin.cpp:
307         (WebCore::FontCache::fontExists): Changed the number 5 to the named
308         constant CLEARTYPE_QUALITY.
309
310         * platform/graphics/win/FontCustomPlatformData.cpp:
311         (WebCore::FontCustomPlatformData::~FontCustomPlatformData): Added code
312         to delete the embedded font reference.
313         (WebCore::FontCustomPlatformData::fontPlatformData): Added code to
314         create an HFONT from the embedded font reference and pass it along with
315         the CGFontRef to the FontPlatformData constructor. Added a rendering
316         mode parameter which is passed down to the FontPlatformData constructor.
317         (WebCore::EOTStream::EOTStream): Added this helper class used to feed
318         data to TTLoadEmbeddedFont().
319         (WebCore::EOTStream::read): Added.
320         (WebCore::readEmbedProc): Added this TTLoadEmbeddedFont() callback.
321         (WebCore::createUniqueFontName): Added. Creates a unique GUID-derived
322         font name. 
323         (WebCore::createFontCustomPlatformData): Added code to make the font
324         accessible to GDI by creating an Embedded OpenType stream and
325         activating it in the process under a globally-unique name.
326
327         * platform/graphics/win/FontCustomPlatformData.h:
328         Added a font reference data member which holds the embedded font.
329         (WebCore::FontCustomPlatformData::FontCustomPlatformData): Added a
330         rendering mode parameter.
331
332         * platform/graphics/win/FontPlatformData.h:
333         (WebCore::FontPlatformData::FontPlatformData): Made this class always
334         own the CGFontRef and the HFONT by turning these data members into a
335         RetainPtr and a RefPtr around a RefCountedHFONT.
336         Added an HFONT parameter to the CGFontRef-based constructor.
337         Made platformDataInit() private.
338         (WebCore::FontPlatformData::hfont):
339         (WebCore::FontPlatformData::cgFont):
340         (WebCore::FontPlatformData::hash):
341         (WebCore::FontPlatformData::RefCountedHFONT::RefCountedHFONT): Added.
342         (WebCore::FontPlatformData::RefCountedHFONT::~RefCountedHFONT):
343         (WebCore::FontPlatformData::RefCountedHFONT::hfont):
344         (WebCore::FontPlatformData::RefCountedHFONT::hash):
345
346         * platform/graphics/win/FontPlatformDataCGWin.cpp:
347         (WebCore::FontPlatformData::platformDataInit): Changed to take
348         ownership of the CGFontRef created here.
349         (WebCore::FontPlatformData::FontPlatformData): Added an HFONT parameter
350         and a useGDI flag.
351
352         * platform/graphics/win/FontPlatformDataWin.cpp:
353         (WebCore::FontPlatformData::FontPlatformData): Changed to take ownership
354         of the HFONT.
355
356         * platform/graphics/win/GetEOTHeader.cpp: Added.
357         (WebCore::BigEndianUShort::operator unsigned short):
358         (WebCore::BigEndianULong::operator unsigned):
359         (WebCore::appendBigEndianStringToEOTHeader):
360         (WebCore::getEOTHeader): Added. Creates an Embedded OpenType (.eot)
361         header for the given font data, making it suitable as input for
362         TTLoadEmbeddedFont.
363
364         * platform/graphics/win/GetEOTHeader.h: Added.
365
366         * platform/graphics/win/SimpleFontDataCGWin.cpp:
367         (WebCore::SimpleFontData::platformDestroy): Removed code to delete parts
368         of the FontPlatformData, since they are now always owned and managed
369         by the FontPlatformData.
370
371 2008-03-31  Darin Adler  <darin@apple.com>
372
373         Reviewed by Anders.
374
375         - fix crash seen on buildbot (regression from a recent speedup)
376
377         * html/HTMLDocument.cpp:
378         (WebCore::HTMLDocument::createElement): Check validity before calling isLower, since
379         that takes care of the null string case.
380
381 2008-03-31  Dan Bernstein  <mitz@apple.com>
382
383         Reviewed by John Sullivan.
384
385         - fix <rdar://problem/5741075> Google Maps: cursor and placemarks don't match up
386
387         * platform/win/CursorWin.cpp:
388         (WebCore::Cursor::Cursor): Set the 1-bit mask for full-alpha cursors
389         to fully opaque. The mask is ignored and the alpha values from the
390         32-bit image are used except in the case of a fully-transparent image,
391         in which the fully-opaque 1-bit mask is required to get transparency.
392
393 2008-03-31  Brady Eidson  <beidson@apple.com>
394
395         Reviewed by Jon Honeycutt
396
397         Move a WebArchive loading check into WebCore
398         
399         * loader/FrameLoader.cpp:
400         (WebCore::FrameLoader::committedLoad): Don't call the client method if currently loading a WebArchive
401
402 2008-03-31  Brady Eidson  <beidson@apple.com>
403
404         Reviewed by Oliver Hunt
405
406         "Turn on" WebArchives for Windows
407         
408         Thought I'd done this already, but I hadn't!
409
410         * platform/MIMETypeRegistry.cpp:
411         (WebCore::initializeSupportedNonImageMimeTypes): Apply known ArchiveFactory MIME types
412
413 2008-03-31  Dan Bernstein  <mitz@apple.com>
414
415         Reviewed by Dave Hyatt.
416
417         - fix http://bugs.webkit.org/show_bug.cgi?id=18076
418           Box disappears after CSS Transition completes
419
420         * page/AnimationController.cpp: Changed the BLEND_MAYBE_INVALID_COLOR
421         macro to not blend two invalid colors.
422         * rendering/RenderStyle.cpp:
423         (WebCore::StyleBackgroundData::StyleBackgroundData): Added missing
424         copying of the m_color data member.
425
426 2008-03-31  Julien Chaffraix  <jchaffraix@webkit.org>
427
428         Reviewed by Darin.
429
430         Bug 18177: m_encoding is used twice in XMLHttpRequest
431         http://bugs.webkit.org/show_bug.cgi?id=18177
432
433         - Change XMLHttpRequest variable m_encoding to m_responseEncoding.
434
435         - Change send local variable m_encoding to encoding.
436
437         No test case (no functionnal change).
438
439         * platform/network/ResourceResponseBase.h: Removed unused variable.
440         * xml/XMLHttpRequest.cpp:
441         (WebCore::XMLHttpRequest::send): Changed local m_encoding to encoding.
442         (WebCore::XMLHttpRequest::didReceiveResponse): m_encoding -> m_responseEncoding.
443         (WebCore::XMLHttpRequest::didReceiveData): Ditto.
444         * xml/XMLHttpRequest.h: Change m_encoding to m_responseEncoding to disambiguate
445         the name as it is only used for response.
446
447 2008-03-27  Adam Roben  <aroben@apple.com>
448
449         Pass the right ExecStates to toJS when creating JS wrappers for
450         objects from the inspected page
451
452         We now use an ExecState from the inspected page to create the JS
453         wrappers for objects from the inspected page, rather than use an
454         ExecState from the Inspector.
455
456         Reviewed by Tim Hatcher.
457
458         * page/InspectorController.cpp:
459         (WebCore::getResourceDocumentNode):
460         (WebCore::InspectorController::focusNode):
461         (WebCore::InspectorController::addDatabaseScriptResource):
462
463 2008-03-31  Adam Roben  <aroben@apple.com>
464
465         Stop relying on functions added to prototypes in the Inspector being
466         callable on objects from the inspected window
467
468         Reviewed by Tim Hatcher.
469
470         * page/inspector/Console.js:
471         (WebInspector.ConsolePanel._formatnode): Use nodeTitleInfo.call(node)
472         instead of node.titleInfo().
473         * page/inspector/StylesSidebarPane.js: Changed uses of
474         getShorthandValue, getShorthandPriority, getLonghandProperties, and
475         getUniqueStyleProperties to call them as functions instead of as
476         methods on the CSSStyleDeclaration objects.
477         * page/inspector/utilities.js: Removed Node.prototype.titleInfo, and
478         changed our CSSStyleDeclaration methods to just be standalone
479         functions.
480
481 2008-03-26  Adam Roben  <aroben@apple.com>
482
483         Fix an exception while adding a message to the console
484
485         Reviewed by Mark Rowe.
486
487         * page/inspector/ConsolePanel.js: Don't call addMessageToSource if the
488         panel has no such method. This can happen if we get a message for,
489         e.g., a Database.
490
491 2008-03-31  Brady Eidson  <beidson@apple.com>
492
493         Reviewed by Darin and Mitz's rubber stamp
494
495         Remove dataForArchivedSelection(WebCore::Frame*) from the EditorClient - only usage is now directly in WebCore
496
497         * page/EditorClient.h:
498         * svg/graphics/SVGImageEmptyClients.h:
499
500         * platform/mac/PasteboardMac.mm:
501         (WebCore::Pasteboard::writeSelection): Make the archive and get the data directly
502
503 2008-03-31  Brady Eidson  <beidson@apple.com>
504
505         Reviewed by Mitz Pettel
506
507         Fix for http://bugs.webkit.org/show_bug.cgi?id=18183
508
509         Despite the bug reporter's instructions, I have still not been able to actually reproduce this crash and 
510         therefore don't know how to make a layout test for it.
511
512         * loader/archive/ArchiveResource.cpp:
513         (WebCore::ArchiveResource::response): Fix potential null dereference
514
515 2008-03-29  Adam Roben  <aroben@apple.com>
516
517         Fix Bug 18208: Acid3 test 65 takes >33ms due to plugin refreshing on
518         Windows
519
520         <http://bugs.webkit.org/show_bug.cgi?id=18208>
521
522         We now keep track of all the plugin paths found each time refresh() is
523         called. We'll only instantiate PluginPackages if there are new paths
524         or paths with changed timestamps since the last time refresh() was
525         called.
526
527         Reviewed by Darin Adler and Anders Carlsson.
528
529         * plugins/PluginDatabase.cpp:
530         (WebCore::PluginDatabase::refresh):
531           - Only instantiate PluginPackages if there is a new path or a path
532             with a changed timestamp since we last ran refresh().
533           - Cache the set of plugin paths found and their timestamps for the
534             next call to refresh().
535           - Only re-register MIME types if our set of plugins changed.
536         * plugins/PluginDatabase.h: Added a new member to cache plugin paths
537         and their timestamps.
538
539 2008-03-29  Adam Roben  <aroben@apple.com>
540
541         Separate filesystem crawling from PluginPackage instantiation
542
543         Part of Bug 18208: Acid3 test 65 takes >33ms due to plugin refreshing
544         on Windows
545         <http://bugs.webkit.org/show_bug.cgi?id=18208>
546
547         refresh() is now the only place where PluginPackages are instantiated.
548         refresh() now asks for a set of plugins that no longer exist on disk,
549         and the set of all plugin files in our plugin directories. Using these
550         two sets we can update our instantiated plugins without copying any
551         HashSets. The code in refresh() and in the platform-specific methods
552         to crawl the filesystem is now quite a bit simpler.
553
554         PluginDatabase now stores both a PluginSet and a HashMap that maps
555         plugin paths to PluginPackages. This allows us to quickly determine
556         whether we already have a PluginPackage instantiated for a particular
557         path. The new add/remove methods handle the modification of these two
558         collections.
559
560         A nice side effect of all this is that refresh() no longer copies any
561         HashSets.
562
563         Reviewed by Mitz Pettel.
564
565         * plugins/PluginDatabase.cpp:
566         (WebCore::PluginDatabase::refresh): Unload any plugins that have been
567         deleted from disk, and add any plugins that either weren't installed
568         last time, or have changed since last time.
569         (WebCore::PluginDatabase::getDeletedPlugins): Added.
570         (WebCore::PluginDatabase::add): Added. Returns whether or not the
571         PluginPackage was actually added to the database (duplicates won't be
572         added).
573         (WebCore::PluginDatabase::remove): Added.
574         * plugins/PluginDatabase.h:
575         * plugins/PluginPackage.h:
576         (WebCore::PluginPackage::path): Added.
577         (WebCore::PluginPackage::lastModified): Added.
578         * plugins/gtk/PluginDatabaseGtk.cpp:
579         (WebCore::PluginDatabase::getPluginPathsInDirectories): Renamed from
580         getPluginsInDirectories. Now fills a HashSet of Strings instead of
581         instantiated PluginPackages.
582         * plugins/win/PluginDatabaseWin.cpp:
583         (WebCore::addPluginPathsFromRegistry): Ditto.
584         (WebCore::PluginDatabase::getPluginPathsInDirectories): Ditto.
585
586 2008-03-29  Adam Roben  <aroben@apple.com>
587
588         Change getPluginsInDirectories to use an out parameter
589
590         This avoids copying a HashSet.
591
592         Reviewed by Mitz Pettel.
593
594         * plugins/PluginDatabase.cpp:
595         (WebCore::PluginDatabase::refresh):
596         * plugins/PluginDatabase.h:
597         * plugins/gtk/PluginDatabaseGtk.cpp:
598         (WebCore::PluginDatabase::getPluginsInDirectories):
599         * plugins/win/PluginDatabaseWin.cpp:
600         (WebCore::PluginDatabase::getPluginsInDirectories):
601
602 2008-03-29  Adam Roben  <aroben@apple.com>
603
604         Make some PluginPackage methods return const String&
605
606         Reviewed by Mitz Pettel.
607
608         * plugins/PluginPackage.h:
609
610 2008-03-29  Adam Roben  <aroben@apple.com>
611
612         Rename PluginDatabase's "PluginPaths" to "PluginDirectories"
613
614         The code expects these paths to all be directories, so it seems good
615         to refer to them as such.
616
617         This patch just changes "Paths" to "Directories" and "Path" to
618         "Directory".
619
620         Reviewed by Mitz Pettel.
621
622         * platform/qt/TemporaryLinkStubs.cpp:
623         * platform/wx/TemporaryLinkStubs.cpp:
624         * plugins/PluginDatabase.cpp:
625         (WebCore::PluginDatabase::installedPlugins):
626         (WebCore::PluginDatabase::refresh):
627         * plugins/PluginDatabase.h:
628         (WebCore::PluginDatabase::setPluginDirectories):
629         * plugins/gtk/PluginDatabaseGtk.cpp:
630         (WebCore::PluginDatabase::getPluginsInDirectories):
631         * plugins/win/PluginDatabaseWin.cpp:
632         (WebCore::PluginDatabase::getPluginsInDirectories):
633         (WebCore::safariPluginsDirectory):
634         (WebCore::PluginDatabase::defaultPluginDirectories):
635         (WebCore::PluginDatabase::isPreferredPluginDirectory):
636         * plugins/win/PluginPackageWin.cpp:
637         (WebCore::PluginPackage::compare):
638
639 2008-03-29  Adam Roben  <aroben@apple.com>
640
641         Remove PlatformFileTime
642
643         This typedef is time_t on all platforms, so we can just get rid of the
644         typedef.
645
646         Reviewed by Mitz Pettel.
647
648         * platform/FileSystem.h:
649         * plugins/PluginPackage.cpp:
650         * plugins/PluginPackage.h:
651
652 2008-03-29  Adam Roben  <aroben@apple.com>
653
654         Change PlatformFileTime on Windows to be time_t
655
656         This matches other platforms and our existing functions in
657         FileSystem.h. It will also let us get rid of PlatformFileTime
658         altogether.
659
660         Reviewed by Mitz Pettel.
661
662         * platform/FileSystem.h: Change PlatformFileTime to time_t on Windows.
663         * plugins/win/PluginDatabaseWin.cpp:
664         (WebCore::addPluginsFromRegistry): Use getFileModificationTime to get
665         the modification time to pass to PluginPackage::create.
666         (WebCore::PluginDatabase::getPluginsInPaths): Ditto.
667         * plugins/win/PluginPackageWin.cpp:
668         (WebCore::PluginPackage::hash): Updated to use m_lastModified as a
669         time_t.
670         (WebCore::PluginPackage::equal): Ditto.
671
672 2008-03-29  Adam Roben  <aroben@apple.com>
673
674         Make PluginPackage work like our other RefCounted classes
675
676         PluginPackage now starts with a ref count of 1, and its createPackage
677         method now returns a PassRefPtr instead of a raw pointer.
678
679         Reviewed by Darin Adler.
680
681         * plugins/PluginPackage.cpp:
682         (WebCore::PluginPackage::PluginPackage): Removed explicit call to the
683         RefCounted constructor so that we'll start with a ref count of 1.
684         (WebCore::PluginPackage::createPackage): Changed to return a
685         PassRefPtr.
686         * plugins/PluginPackage.h:
687         * plugins/gtk/PluginDatabaseGtk.cpp:
688         (WebCore::PluginDatabase::getPluginsInPaths): Changed to store the
689         newly-created PluginPackage in a RefPtr.
690         * plugins/win/PluginDatabaseWin.cpp:
691         (WebCore::addPluginsFromRegistry): Ditto.
692         (WebCore::PluginDatabase::getPluginsInPaths): Ditto.
693
694 2008-03-29  Adam Roben  <aroben@apple.com>
695
696         Fix Bug 18214: WebKit will sometimes load duplicate plugins
697
698         <http://bugs.webkit.org/show_bug.cgi?id=18214>
699
700         We now compare 3 things to determine if two PluginPackages are equal:
701           1) Name
702           2) Description
703           3) Supported MIME types
704
705         This matches Gecko's equality logic for plugins (implemented in
706         nsPluginTag::Equals).
707
708         Reviewed by Darin Adler.
709
710         * plugins/win/PluginPackageWin.cpp:
711         (WebCore::PluginPackage::hash): Use the above-mentioned 3 criteria to
712         calculate the hash.
713         (WebCore::PluginPackage::equal): Use the above-mentioned 3 criteria to
714         determine equality.
715
716 2008-03-31  Simon Hausmann  <hausmann@webkit.org>
717
718         Fix the Qt build.
719
720         ResourceHandleInternal.h references ResourceHandle::fireFailure, so include
721         ResourceHandle.h.
722
723         * platform/network/ResourceHandleInternal.h:
724
725 2008-03-31  Rob Buis  <buis@kde.org>
726
727         Reviewed by Darin.
728
729         http://bugs.webkit.org/show_bug.cgi?id=15595
730         marker property doesn't show up correctly as "shorthand" in inspector
731
732         Make sure parsing the marker property sets the individual
733         marker properties as implicit with marker as shorthand.
734         Also let CSSStyleDecleration::getPropertyValue return
735         the correct value for the marker property.
736
737         * css/CSSMutableStyleDeclaration.cpp:
738         (WebCore::CSSMutableStyleDeclaration::getPropertyValue):
739         * css/CSSParser.cpp:
740         * css/CSSParser.h:
741         (WebCore::ShorthandScope::ShorthandScope):
742         (WebCore::ShorthandScope::~ShorthandScope):
743         * css/SVGCSSParser.cpp:
744         (WebCore::CSSParser::parseSVGValue):
745
746 2008-03-30  Eric Seidel  <eric@webkit.org>
747
748         Reviewed by Oliver.
749
750         Make AMatthews life easier -- fix the SVG_FILTERS build
751
752         Build fix only, no tests.
753
754         * svg/SVGComponentTransferFunctionElement.cpp:
755         (WebCore::SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement):
756         * svg/SVGFEColorMatrixElement.cpp:
757         (WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement):
758         * svg/SVGFEDiffuseLightingElement.cpp:
759         * svg/SVGFEGaussianBlurElement.cpp:
760         * svg/SVGFEImageElement.cpp:
761         (WebCore::SVGFEImageElement::SVGFEImageElement):
762         * svg/SVGFESpecularLightingElement.cpp:
763         * svg/SVGFETurbulenceElement.cpp:
764         * svg/SVGFilterElement.cpp:
765         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
766         * svg/graphics/filters/SVGFEBlend.cpp:
767         * svg/graphics/filters/SVGFEComponentTransfer.cpp:
768         * svg/graphics/filters/SVGFEComposite.cpp:
769         * svg/graphics/filters/SVGFEDiffuseLighting.cpp:
770         * svg/graphics/filters/SVGFEGaussianBlur.cpp:
771         * svg/graphics/filters/SVGFEImage.cpp:
772         * svg/graphics/filters/SVGFEMerge.cpp:
773         * svg/graphics/filters/SVGFEMorphology.cpp:
774         * svg/graphics/filters/SVGFEOffset.cpp:
775         * svg/graphics/filters/SVGFESpecularLighting.cpp:
776         * svg/graphics/filters/SVGFETurbulence.cpp:
777
778 2008-03-30  Dan Bernstein  <mitz@apple.com>
779
780         Reviewed by Sam Weinig.
781
782         - fix http://bugs.webkit.org/show_bug.cgi?id=18115
783           REGRESSION (r31250): Incomplete repaint of GoogleReader sidebar while reading unread posts
784
785         Test: fast/repaint/lines-with-layout-delta.html
786
787         * rendering/RenderObject.cpp:
788         (WebCore::RenderObject::repaintRectangle): Made this method take layout
789         delta into account.
790
791 2008-03-30  Dan Bernstein  <mitz@apple.com>
792
793         Reviewed by Maciej Stachowiak.
794
795         - fix assertion failure in CSSParser.cpp's equalIgnoringCase() when
796           parsing certain transforms.
797
798         Test: fast/css/transform-function-lowercase-assert.html
799
800         * css/CSSParser.cpp:
801         (WebCore::TransformOperationInfo::TransformOperationInfo): Changed to
802         always pass a lowercase string as the second argument of
803         equalIgnoringCase().
804
805 2008-03-30  Mark Rowe  <mrowe@apple.com>
806
807         ARM build fix.
808
809         * platform/text/AtomicString.cpp:
810         (WebCore::equal): Use correct variable name.
811
812 2008-03-30  Hiroyuki Ikezoe  <poincare@ikezoe.net>
813
814         Reviewed by Alp Toker.
815
816         http://bugs.webkit.org/show_bug.cgi?id=18036
817         Rendering invalid japanese characters with pango backend.
818
819         * platform/graphics/gtk/FontPlatformDataPango.cpp:
820         (FontPlatformData::FontPlatformData): Set PangoFontDescription for
821         PangoContext explicitly to use proper font.
822
823 2008-03-30  Rob Buis  <buis@kde.org>
824
825         Reviewed by Oliver.
826
827         http://bugs.webkit.org/show_bug.cgi?id=17633
828         SVG: modifying x & y attribute of text element from JS fails
829
830         Make SVG text relayout when x, y attribute is changed from js.
831
832         * svg/SVGTextContentElement.cpp:
833         (WebCore::SVGTextContentElement::isKnownAttribute):
834         * svg/SVGTextContentElement.h:
835         * svg/SVGTextElement.cpp:
836         (WebCore::SVGTextElement::svgAttributeChanged):
837         * svg/SVGTextElement.h:
838         * svg/SVGTextPositioningElement.cpp:
839         (WebCore::SVGTextPositioningElement::isKnownAttribute):
840         * svg/SVGTextPositioningElement.h:
841
842 2008-03-28  Maciej Stachowiak  <mjs@apple.com>
843
844         Reviewed by Oliver.
845
846         - yet still more bindings speedup
847         
848         Make AtomicString straight from UString in handcoded bindings
849
850         * bindings/js/JSElementCustom.cpp:
851         (WebCore::JSElement::setAttribute):
852         (WebCore::JSElement::setAttributeNS):
853         * dom/Document.cpp:
854         (WebCore::Document::createElement):
855         * dom/Document.h:
856         * html/HTMLDocument.cpp:
857         (WebCore::HTMLDocument::createElement):
858         * html/HTMLDocument.h:
859
860 2008-03-29  Sam Weinig  <sam@webkit.org>
861
862         Reviewed by Darin Adler.
863
864         Fix for <rdar://problem/5828873>
865
866         Since NSURL is allowing invalid urls to be loaded, we need to
867         check the URL validity at the ResourceHandle level and fire off
868         a cannotShowURL error.
869
870         * loader/FrameLoader.cpp:
871         (WebCore::FrameLoader::cannotShowURLError):
872         * loader/FrameLoader.h:
873         * loader/ResourceLoader.cpp:
874         (WebCore::ResourceLoader::cannotShowURLError):
875         (WebCore::ResourceLoader::wasBlocked):
876         (WebCore::ResourceLoader::cannotShowURL):
877         * loader/ResourceLoader.h:
878         * platform/KURL.h:
879         (WebCore::KURL::isValid):
880         * platform/network/ResourceHandle.cpp:
881         (WebCore::ResourceHandle::create):
882         (WebCore::ResourceHandle::scheduleFailure):
883         (WebCore::ResourceHandle::fireFailure):
884         (WebCore::portAllowed):
885         * platform/network/ResourceHandle.h:
886         (WebCore::ResourceHandle::):
887         * platform/network/ResourceHandleClient.h:
888         (WebCore::ResourceHandleClient::cannotShowURL):
889         * platform/network/ResourceHandleInternal.h:
890         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
891
892 2008-03-29  Darin Adler  <darin@apple.com>
893
894         Reviewed by Mitz.
895
896         - more bindings speedup
897
898         When I changed the temporary variables to be UString that means that the
899         valueToString functions also need to return UString to avoid converting
900         from UString to String twice.
901
902         * bindings/js/kjs_binding.cpp:
903         (WebCore::valueToStringWithNullCheck): Changed return value to UString.
904         (WebCore::valueToStringWithUndefinedOrNullCheck): Ditto.
905         * bindings/js/kjs_binding.h: Ditto.
906
907 2008-03-29  Darin Adler  <darin@apple.com>
908
909         Reviewed by Sam.
910
911         * DerivedSources.make: Removed temporary remove-stray-JSRGBColor build rule.
912
913 2008-03-29  Darin Adler  <darin@apple.com>
914
915         Reviewed by Sam.
916
917         - tweak handling of the class attribute to speed up code that
918           sets it but never needs to parse it
919
920         6% speedup of Acid3 test 26
921
922         * css/CSSStyleSelector.cpp:
923         (WebCore::CSSStyleSelector::matchRules): Change to use non-virtual
924         classNames function since the hasClass bit can only be set for a
925         StyledElement.
926         (WebCore::CSSStyleSelector::checkOneSelector): Ditto. Also
927         streamlined the code a bit for the tag matching as well.
928
929         * dom/ClassNames.cpp:
930         (WebCore::hasNonASCIIOrUpper): Added. This function does what other
931         callers seem to want isLower() to do. We should merge this with
932         isLower() in a subsequent cleanup pass.
933         (WebCore::ClassNamesData::createVector): Renamed from parseClassAttribute.
934         Turns the string into a vector.
935         (WebCore::ClassNamesData::containsAll): Added. Used by getElementsByClassName.
936
937         * dom/ClassNames.h: Added a separate ClassNameData class so we could hold
938         the string and case folding flag as well as the vector. Changed ClassNames
939         to have a set function rather than a parseClassAttribute function. Removed
940         the "static" from isClassWhitespace. There's no reason to ask for internal linkage.
941
942         * dom/ClassNodeList.cpp:
943         (WebCore::ClassNodeList::ClassNodeList): Use constructor instead of the
944         parseClassAttribute function.
945         (WebCore::ClassNodeList::nodeMatches): Get rid of unnneeded isElementNode
946         check, since hasClass will only be true for StyledElement nodes. Use the new
947         containsAll function in ClassNames instead of having a loop here.
948
949         * dom/ClassNodeList.h: Removed unneeded forward declaration.
950
951         * dom/Document.cpp: Removed unneeded include.
952
953         * dom/Element.cpp:
954         (WebCore::Element::cloneNode): Changed code to copy attributes to use a
955         function call instead of the assignment operator. This paves the way to
956         making the function more efficient, using a virtual function.
957         (WebCore::Element::setAttributeMap): Updated for PassRefPtr and for name change
958         (element -> m_element).
959         (WebCore::Element::createAttributeMap): Changed to use create function instead of
960         calling the constructor directly.
961         * dom/Element.h: Removed unneeded virtual getClassNames function.
962         Changed the argument to setAttributeMap to be a PassRefPtr.
963
964         * dom/NamedAttrMap.cpp:
965         (WebCore::NamedAttrMap::NamedAttrMap): Updated for name change (element -> m_element).
966         (WebCore::NamedAttrMap::getNamedItem): Ditto.
967         (WebCore::NamedAttrMap::removeNamedItem): Ditto.
968         (WebCore::NamedAttrMap::setNamedItem): Ditto.
969         (WebCore::NamedAttrMap::item): Ditto.
970         (WebCore::NamedAttrMap::detachFromElement): Ditto.
971         (WebCore::NamedAttrMap::setAttributes): Renamed this from the assignment operator.
972         (WebCore::NamedAttrMap::addAttribute): Ditto.
973         (WebCore::NamedAttrMap::removeAttribute): Ditto.
974         (WebCore::NamedAttrMap::isReadOnlyNode): Ditto.
975         * dom/NamedAttrMap.h: Removed the copy constructor and assignment operator and added
976         a new function, setAttributes, possibly to be made virtual in the future. Made
977         isReadOnlyNode non-virtual. Renamed element -> m_element. Made constructor protected
978         and added a create function.
979
980         * dom/NamedMappedAttrMap.cpp:
981         (WebCore::NamedMappedAttrMap::NamedMappedAttrMap): Changed constructor parameter to
982         take a StyledElement.
983         (WebCore::NamedMappedAttrMap::setClass): Changed to use the new set function.
984
985         * dom/NamedMappedAttrMap.h: Made constructor private and added a create function.
986         Replaced theparseClassAttribute function with clearClass and setClass functions.
987         Replaced the getClassNames function with a classNames function returning a reference
988         instead of a pointer.
989
990         * dom/NamedNodeMap.h: Changed to start refcount at 1 instead of 0. Removed unneeded
991         virtual function isReadOnlyNode.
992
993         * dom/StyledElement.cpp:
994         (WebCore::StyledElement::parseMappedAttribute): Rewrote class attribute handling to
995         use new function names and took out uneeded special case for null attribute.
996         (WebCore::StyledElement::createAttributeMap): Changed to use create function instead
997         of a direct call to new.
998
999         * dom/StyledElement.h: Replaced the virtual getClassNames function with a non-virtual
1000         inline classNames function.
1001
1002         * html/HTMLElement.cpp:
1003         (WebCore::HTMLElement::cloneNode): Changed code to copy attributes to use a
1004         function call instead of the assignment operator.
1005
1006         * html/HTMLTokenizer.cpp:
1007         (WebCore::Token::addAttribute): Use create function instead of a a direct call
1008         to new.
1009
1010         * html/HTMLViewSourceDocument.cpp:
1011         (WebCore::HTMLViewSourceDocument::createContainingTable): Use RefPtr and the new
1012         create function.
1013         (WebCore::HTMLViewSourceDocument::addViewSourceToken): Ditto.
1014         (WebCore::HTMLViewSourceDocument::addSpanWithClassName): Ditto.
1015         (WebCore::HTMLViewSourceDocument::addLine): Ditto.
1016         (WebCore::HTMLViewSourceDocument::addText): Ditto.
1017         (WebCore::HTMLViewSourceDocument::addLink): Ditto.
1018         * html/HTMLViewSourceDocument.h: Ditto.
1019
1020         * svg/SVGUseElement.cpp:
1021         (WebCore::SVGUseElement::expandSymbolElementsInShadowTree): Changed code to copy
1022         attributes to use a function call instead of the assignment operator.
1023         (WebCore::SVGUseElement::transferUseAttributesToReplacedElement): Ditto.
1024
1025 2008-03-29  Sam Weinig  <sam@webkit.org>
1026
1027         Reviewed by Brady Eidson.
1028
1029         Fix crash when canceling a resource load while port blocked failure
1030         timer is going.
1031
1032         Test: fast/loader/cancel-load-during-port-block-timer.html
1033
1034         * platform/network/ResourceHandle.cpp:
1035         (WebCore::ResourceHandle::scheduleBlockedFailure):
1036         (WebCore::ResourceHandle::fireBlockedFailure):
1037         * platform/network/ResourceHandleInternal.h:
1038         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
1039         Make the Timer a member variable of ResourceHandleInternal so
1040         that it can be canceled if the ResourceHandle is destroyed.
1041
1042 2008-03-28  Stephanie  <slewis@apple.com>
1043
1044         Fix 64bit build
1045
1046         * WebCore.LP64.exp:
1047         * loader/archive/cf/LegacyWebArchiveMac.mm:
1048         (WebCore::createResourceResponseFromMacArchivedData):
1049
1050 2008-03-28  Steve Falkenburg  <sfalken@apple.com>
1051
1052         Enabled LTCG on files within "page".
1053
1054         Rubber stamped by Oliver.
1055
1056         * WebCore.vcproj/WebCore.vcproj:
1057
1058 2008-03-28  Dan Bernstein  <mitz@apple.com>
1059
1060         Reviewed by Dave Hyatt.
1061
1062         - fix a percentage background position regression from r31389
1063
1064         Test: fast/backgrounds/background-position-1.html
1065
1066         * rendering/Length.h:
1067         (WebCore::Length::calcValue): Divide by 100.
1068         (WebCore::Length::calcMinValue): Ditto.
1069
1070 2008-03-28  David Hyatt  <hyatt@apple.com>
1071
1072         Back out the Ahem font antialiasing hack, since it is now no longer required for LCD antialiased text
1073         to match the reference rendering on Acid 3.
1074
1075         * platform/graphics/SimpleFontData.h:
1076         * platform/graphics/mac/FontMac.mm:
1077         (WebCore::Font::drawGlyphs):
1078         * platform/graphics/mac/SimpleFontDataMac.mm:
1079         (WebCore::SimpleFontData::platformInit):
1080         * platform/graphics/win/FontCGWin.cpp:
1081         (WebCore::Font::drawGlyphs):
1082         * platform/graphics/win/SimpleFontDataCGWin.cpp:
1083         (WebCore::SimpleFontData::platformInit):
1084         * rendering/RenderBlock.cpp:
1085         (WebCore::RenderBlock::positionNewFloats):
1086
1087 2008-03-28  Brady Eidson  <beidson@apple.com>
1088
1089         Reviewed by Darin Adler
1090
1091         More Kit->Core WebArchive changes.
1092
1093         Create an archive from the current selection in a frame
1094
1095         * WebCore.base.exp:
1096
1097         * loader/archive/cf/LegacyWebArchive.cpp:
1098         (WebCore::LegacyWebArchive::createFromSelection):
1099         * loader/archive/cf/LegacyWebArchive.h:
1100
1101 2008-03-28  Kevin McCullough  <kmccullough@apple.com>
1102
1103         - Somehow managed to duplicate code :(
1104
1105         * xml/XMLHttpRequest.cpp:
1106         (WebCore::XMLHttpRequest::didFinishLoading):
1107
1108 2008-03-28  Kevin McCullough  <kmccullough@apple.com>
1109
1110         - Missed some changes in previous checkin.
1111
1112         * xml/XMLHttpRequest.cpp:
1113         (WebCore::XMLHttpRequest::send): Get identifier from synchronous loader.
1114         (WebCore::XMLHttpRequest::didFinishLoading):
1115
1116 2008-03-28  Kevin McCullough  <kmccullough@apple.com>
1117
1118         Reviewed by Adam.
1119
1120         -<rdar://problem/5712804> XMLHttpRequests do not show response contents, preview images (14313)
1121         -<rdar://problem/5712931> XMLHttpRequests should be shown separately and grouped (14315)
1122         -<rdar://problem/5732836> XMLHttpRequest: Inspector should show network activity/XHR in Console (17233)
1123         - Send the XMLHttpRequest data to the Inspector Controller.
1124
1125         * loader/FrameLoader.cpp: Return the identifier for this resource since we need it in the XHR case.
1126         (WebCore::FrameLoader::loadResourceSynchronously):
1127         * loader/FrameLoader.h: Ditto.
1128         * page/InspectorController.cpp:
1129         (WebCore::XMLHttpRequestResource::XMLHttpRequestResource): We only need the data since the type will
1130         be XHR and the encoding is not used (we decoded earlier).
1131         (WebCore::XMLHttpRequestResource::~XMLHttpRequestResource): Locking is necessary when setting and clearing
1132         the KJS::UString::Rep.
1133         (WebCore::InspectorResource::setXMLHttpRequestProperties):
1134         (WebCore::InspectorResource::sourceString): Return the decoded source.
1135         (WebCore::addSourceToFrame): No longer do the decoding here, it has been encapsulated in the InspectorResource.
1136         (WebCore::InspectorController::resourceRetrievedByXMLHttpRequest):
1137         * page/InspectorController.h: Pass a UString instead of copying to a WebCore::String.  In case we
1138         never ask for the string's contents this will save us an extra copy.
1139         * xml/XMLHttpRequest.cpp:
1140         (WebCore::XMLHttpRequest::send): In the synchronous load case we normally do not keep the identifier
1141         but we need it to find the InspectorResource in order to tell it that it was loaded via XHR.
1142         (WebCore::XMLHttpRequest::didFinishLoading): Tell the InspectorController that its resource was loaded
1143         via XHR.
1144         * xml/XMLHttpRequest.h: Ditto.
1145
1146 2008-03-28  Brady Eidson  <beidson@apple.com>
1147
1148         Reviewed by Sam Weinig
1149
1150         WebArchive saga continues - Can now make archives from ranges in WebCore
1151
1152         Again, previous layout test coverage exercised this code
1153
1154         * WebCore.base.exp:
1155
1156         * editing/markup.cpp:
1157         (WebCore::createFullMarkup): Added a "markup from range" variant that copies the previous WebKit implementation
1158         * editing/markup.h:
1159
1160         * loader/archive/cf/LegacyWebArchive.cpp:
1161         (WebCore::LegacyWebArchive::create):
1162         * loader/archive/cf/LegacyWebArchive.h:
1163
1164 2008-03-28  Stephanie Lewis  <slewis@apple.com>
1165
1166         windows build fix.
1167
1168         * platform/win/MainThreadWin.cpp:
1169         (WebCore::initializeThreadingAndMainThread):
1170
1171 2008-03-28  Brady Eidson  <beidson@apple.com>
1172
1173         Reviewed by Sam Weinig
1174
1175         More Kit->Core webarchive code movement
1176
1177         * WebCore.base.exp:
1178         * editing/markup.cpp:
1179         (WebCore::createFullMarkup): Replacement for [DOMNode markupString], creating full markup at this node including 
1180           the document type string, which the WebKit implementation did indirectly
1181         * editing/markup.h:
1182
1183 2008-03-28  Darin Adler  <darin@apple.com>
1184
1185         Reviewed by Maciej.
1186
1187         - cut down on copying and refcount churn a little by using references a bit more for
1188           KURL and String
1189
1190         * bindings/js/JSXMLHttpRequest.cpp:
1191         (WebCore::jsXMLHttpRequestPrototypeFunctionOpen): Use const KURL& instead of KURL.
1192         * css/StyleSheet.h:
1193         (WebCore::StyleSheet::href): Return const String& instead of String.
1194         (WebCore::StyleSheet::title): Ditto.
1195         * dom/Document.cpp:
1196         (WebCore::Document::completeURL): Use const KURL* for a local variable instead of
1197         KURL to avoid copying the KURL.
1198         * dom/Element.cpp:
1199         (WebCore::Element::baseURI): Use const KURL& instead of KURL.
1200         * html/HTMLAnchorElement.cpp:
1201         (WebCore::HTMLAnchorElement::hostname): Ditto.
1202         * html/HTMLFrameElementBase.cpp:
1203         (WebCore::HTMLFrameElementBase::isURLAllowed): Ditto.
1204         * html/HTMLKeygenElement.cpp: Removed unneeded include of KURL.
1205         * page/ContextMenuController.cpp:
1206         (WebCore::ContextMenuController::contextMenuItemSelected): Get rid of temporary
1207         KURL.
1208         * platform/SecurityOrigin.cpp:
1209         (WebCore::SecurityOrigin::createForFrame): Use const KURL& instead of KURL.
1210
1211 2008-03-28  Alexey Proskuryakov  <ap@webkit.org>
1212
1213         Reviewed by Sam Weinig.
1214
1215         Fix a dtoa thread safety issue.
1216
1217         * ForwardingHeaders/kjs/InitializeThreading.h: Added.
1218         * platform/MainThread.cpp:
1219         * platform/MainThread.h:
1220         (WebCore::initializeThreadingAndMainThread): Call KJS::initializeThreading instead of its
1221         WTF counterpart.
1222
1223 2008-03-28  Brent Fulgham  <bfulgham@gmail.com>
1224
1225         Reviewed by Maciej, landed by Brady
1226
1227         Correct build regression (http://bugs.webkit.org/show_bug.cgi?id=18148)
1228
1229         * platform/graphics/win/GraphicsContextCairoWin.cpp:
1230         (WebCore::GraphicsContext::getWindowsContext):
1231         (WebCore::GraphicsContext::releaseWindowsContext):
1232
1233 2008-03-28  Brady Eidson  <beidson@apple.com>
1234
1235         Reviewed by Darin
1236
1237         "Yet another transitional step" to empty out WebKit-based code for archiving.
1238
1239         With this patch, the key operation of "Creating a WebArchive rooted at a single Node" takes place
1240         entirely within WebCore, and opens the door to saving WebArchives on Windows.
1241
1242         This is another "zero behavior change" patch, and current editing/ and webarchive/ layout tests
1243         covered the relevant code
1244
1245         * WebCore.base.exp:
1246         * loader/archive/cf/LegacyWebArchive.cpp:
1247         (WebCore::LegacyWebArchive::create):
1248         * loader/archive/cf/LegacyWebArchive.h:
1249
1250 2008-03-28  Jasper Bryant-Greene  <jasper@unix.geek.nz>
1251
1252         Reviewed by Alp Toker.
1253
1254         http://bugs.webkit.org/show_bug.cgi?id=18061
1255         PlatformScrollBarGtk attempts to allocate negative width and/or height for widgets
1256
1257         Missing clampNegativeToZero() call meant that we tried to allocate widgets with negative width and/or height.
1258
1259         * platform/gtk/PlatformScrollBarGtk.cpp:
1260         (PlatformScrollbar::geometryChanged):
1261
1262 2008-03-28  Brady Eidson  <beidson@apple.com>
1263
1264         Reviewed by Darin
1265
1266         Using convertUTF16ToUTF8() from WTF, add a helper function that gives you a UTF8 SharedBuffer
1267         created from a String.
1268
1269         * ForwardingHeaders/wtf/unicode/UTF8.h: Added.
1270         * platform/text/PlatformString.h:
1271         * platform/text/String.cpp:
1272         (WebCore::utf8Buffer):
1273
1274 2008-03-28  Darin Adler  <darin@apple.com>
1275
1276         Reviewed by Adam.
1277
1278         - eliminate a tiny bit of unnecessary refcount churn
1279
1280         * bindings/js/JSEventTargetBase.cpp:
1281         (WebCore::eventNameForPropertyToken): Return const AtomicString&.
1282         * bindings/js/JSEventTargetBase.h:
1283         (WebCore::JSEventTargetBase::getValueProperty): Update for above change.
1284         (WebCore::JSEventTargetBase::putValueProperty): Ditto.
1285
1286 2008-03-28  Simon Hausmann  <hausmann@webkit.org>
1287
1288         Fix the Qt build.
1289
1290         * rendering/Length.h: Include wtf/MathExtras.h for round().
1291
1292 2008-03-28  David Hyatt  <hyatt@apple.com>
1293
1294         Fix a bug where background-position truncates instead of rounding when it evaluates to fractional
1295         pixel values.  This matches other browsers.
1296
1297         Reviewed by maciej
1298
1299         Added fast/backgrounds/background-position-rounding.html
1300
1301         * rendering/Length.h:
1302         (WebCore::Length::calcValue):
1303         (WebCore::Length::calcMinValue):
1304         * rendering/RenderBox.cpp:
1305         (WebCore::RenderBox::calculateBackgroundImageGeometry):
1306
1307 2008-03-27  Kevin Ollivier  <kevino@theolliviers.com>
1308
1309         wx build fix. Return a default value for operator == 
1310         when !USE(WXGC) (not implemented in that case).
1311
1312         * platform/graphics/wx/AffineTransformWx.cpp:
1313         (WebCore::AffineTransform::operator== ):
1314
1315 2008-03-27  Maciej Stachowiak  <mjs@apple.com>
1316
1317         - fix build
1318
1319         * svg/SVGGlyphMap.h:
1320         (WebCore::GlyphMapNode::create):
1321
1322 2008-03-27  Brady Eidson  <beidson@apple.com>
1323
1324         Forgot a small requested change before committing
1325
1326         * loader/DocumentLoader.cpp:
1327         (WebCore::DocumentLoader::mainResource):
1328
1329 2008-03-27  Brady Eidson  <beidson@apple.com>
1330
1331         Reviewed by Adam Roben
1332
1333         Move [WebDataSource mainResource] and [WebDataSource subresources] down into WebCore
1334         as the push to core-ify WebArchives continues.
1335
1336         This patch also introduces a behavior change.  WebCore allows ArchiveResources with null or empty data.  
1337         WebKit has had the inexplicable distinction of allowing empty Data in a WebResource, but not null.  
1338         Since WebResource is API, I decided to leave it be to avoid a behavior change.  But internally created resources 
1339         (as in "while archiving a page") are accepting of null or empty data.
1340
1341         This actually fixes a bug where not all subframes are archived, and resulted in a layout test change.
1342
1343         * WebCore.base.exp:
1344         * loader/DocumentLoader.cpp:
1345         (WebCore::DocumentLoader::archiveResourceForURL): Make this const
1346         (WebCore::DocumentLoader::mainResource):
1347         (WebCore::DocumentLoader::subresource): Make this const and relocate
1348         (WebCore::DocumentLoader::getSubresources):
1349         * loader/DocumentLoader.h:
1350
1351 2008-03-27  Maciej Stachowiak  <mjs@apple.com>
1352
1353         Reviewed by Darin.
1354
1355         - fixed many buildbot leaks in glyph map code
1356
1357         * svg/SVGGlyphMap.h:
1358         (WebCore::GlyphMapNode::create): Use explicit create pattern, to avoid overreffing and therefore leaking
1359         these objects.
1360         (WebCore::SVGGlyphMap::add): Call create instead of using new.
1361
1362 2008-03-27  Maciej Stachowiak  <mjs@apple.com>
1363
1364         Rubber stamped by Oliver.
1365
1366         - re-fix Acid3, some code was incorrectly moved when fixing the Qt build
1367
1368         * rendering/SVGRootInlineBox.cpp:
1369         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
1370
1371 2008-03-27  Simon Hausmann  <hausmann@webkit.org>
1372
1373         Fix compilation against Qt 4.4 and one missing SVG_FONTS #ifdef.
1374
1375         * platform/graphics/qt/FontQt.cpp:
1376         (WebCore::Font::floatWidth): Forgot to adjust this signture for Qt 4.4.
1377         * bindings/js/JSSVGElementWrapperFactory.cpp: Added a missing #ifdef
1378         for SVG_FONTS
1379
1380 2008-03-27  Simon Hausmann  <hausmann@webkit.org>
1381
1382         Reviewed by Eric Seidel.
1383
1384         Fix the Qt build and the build without ENABLE(SVG_FONTS)
1385
1386         * WebCore.pro: Removed ElementTimeControl.idl as it's ObjC only and
1387         removed some SVG_FONTS specific idl files from IDL_BINDINGS for now
1388         * bindings/js/JSSVGElementWrapperFactory.cpp: altGlyph is
1389         ENABLE(SVG_FONTS) only
1390         * platform/graphics/qt/FontQt.cpp:
1391         (WebCore::Font::floatWidth): Adjust the function signature to Font.h
1392         * rendering/SVGRootInlineBox.cpp:
1393         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox): Fix
1394         compilation without SVG_FONTS
1395         * svg/SVGAltGlyphElement.cpp: Compile only if ENABLE(SVG_FONTS)
1396         * svg/SVGAltGlyphElement.h: Ditto
1397         * svg/svgtags.in: hkern and altGlyph are SVG_FONTS only.
1398         * svg/SVGTSpanElement.cpp:
1399         (WebCore::SVGTSpanElement::childShouldCreateRenderer): Compile without
1400         SVG_FONTS
1401         * svg/SVGTextElement.cpp:
1402         (WebCore::SVGTextElement::childShouldCreateRenderer): Ditto
1403         * svg/SVGTextPathElement.cpp:
1404         (WebCore::SVGTextPathElement::childShouldCreateRenderer):
1405
1406 2008-03-26  Timothy Hatcher  <timothy@apple.com>
1407
1408         Rename some Inspector files to facilitate the up-coming UI refresh changes.
1409
1410         http://bugs.webkit.org/show_bug.cgi?id=17773
1411
1412         Rubber-stamped by Adam Roben.
1413
1414         * WebCore.vcproj/WebCore.vcproj:
1415         * page/inspector/Console.js: Copied from page/inspector/ConsolePanel.js.
1416         * page/inspector/ConsolePanel.js: Removed.
1417         * page/inspector/DocumentPanel.js: Removed.
1418         * page/inspector/ElementsPanel.js: Copied from page/inspector/DocumentPanel.js.
1419         * page/inspector/FontPanel.js: Removed.
1420         * page/inspector/FontView.js: Copied from page/inspector/FontPanel.js.
1421         * page/inspector/ImagePanel.js: Removed.
1422         * page/inspector/ImageView.js: Copied from page/inspector/ImagePanel.js.
1423         * page/inspector/NetworkPanel.js: Removed.
1424         * page/inspector/ResourcePanel.js: Removed.
1425         * page/inspector/ResourceView.js: Copied from page/inspector/ResourcePanel.js.
1426         * page/inspector/ResourcesPanel.js: Copied from page/inspector/NetworkPanel.js.
1427         * page/inspector/SourcePanel.js: Removed.
1428         * page/inspector/SourceView.js: Copied from page/inspector/SourcePanel.js.
1429         * page/inspector/WebKit.qrc:
1430         * page/inspector/inspector.html:
1431
1432 2008-03-26  Steve Falkenburg  <sfalken@apple.com>
1433
1434         Enable LTCG on css, dom files in WebCore
1435
1436         Reviewed by Stephanie.
1437
1438         * WebCore.vcproj/WebCore.vcproj:
1439
1440 2008-03-26  Stephanie Lewis  <slewis@apple.com>
1441
1442         Fix Windows Build
1443
1444         * WebCore.vcproj/WebCore.vcproj:
1445
1446 2008-03-26  Mark Rowe  <mrowe@apple.com>
1447
1448         Speculative GTK build fix.
1449
1450         * GNUmakefile.am:
1451
1452 2008-03-26  Mark Rowe  <mrowe@apple.com>
1453
1454         Mac build fix.
1455
1456         * WebCore.base.exp:  Remove nonexistent symbol from the export file.
1457
1458 2008-03-26  Sam Weinig  <sam@webkit.org>
1459
1460         Try and fix Gtk+ again.
1461
1462         * GNUmakefile.am:
1463
1464 2008-03-26  Dan Bernstein  <mitz@apple.com>
1465
1466         Reviewed by Dave Hyatt.
1467
1468         - fix <rdar://problem/5816522> REGRESSION (r30111-30112): Tahoe web cam website has some text in Chinese or japanese
1469
1470         * html/HTMLParser.cpp:
1471         (WebCore::HTMLParser::insertNode): Added call to beginParsingChildren()
1472         on the new node.
1473         (WebCore::HTMLParser::handleError): Ditto.
1474         (WebCore::HTMLParser::reopenResidualStyleTags): Ditto.
1475         (WebCore::HTMLParser::pushBlock): Removed incorrect call to
1476         beginParsingChildren() on the current node.
1477         * manual-tests/applet-finish-parsing-children.html: Added.
1478         * manual-tests/resources/DrawMessage.class: Added.
1479
1480 2008-03-26  Brady Eidson  <beidson@apple.com>
1481
1482         Reviewed by Darin
1483
1484         When we create a WebArchive, we walk every node from some starting point, asking each node
1485         along the way "What are your subresource URLs?"
1486
1487         That logic is currently in DOMNode in WebKitMac - this patch moves that ability down into
1488         WebCore::Node
1489
1490         * WebCore.base.exp:
1491         
1492         * dom/Node.cpp:
1493         (WebCore::Node::getSubresourceURLs):
1494         (WebCore::Node::getSubresourceAttributeStrings):  Virtual and empty.  Subclasses of Node that have 
1495           subresources will override it.
1496
1497         * dom/ProcessingInstruction.cpp:
1498         (WebCore::ProcessingInstruction::getSubresourceAttributeStrings):
1499         * dom/ProcessingInstruction.h:
1500         * html/HTMLBodyElement.cpp:
1501         (WebCore::HTMLBodyElement::getSubresourceAttributeStrings):
1502         * html/HTMLBodyElement.h:
1503         * html/HTMLEmbedElement.cpp:
1504         (WebCore::HTMLEmbedElement::getSubresourceAttributeStrings):
1505         * html/HTMLEmbedElement.h:
1506         * html/HTMLImageElement.cpp:
1507         (WebCore::HTMLImageElement::getSubresourceAttributeStrings):
1508         * html/HTMLImageElement.h:
1509         * html/HTMLInputElement.cpp:
1510         (WebCore::HTMLInputElement::getSubresourceAttributeStrings):
1511         * html/HTMLInputElement.h:
1512         * html/HTMLLinkElement.cpp:
1513         (WebCore::HTMLLinkElement::getSubresourceAttributeStrings):
1514         * html/HTMLLinkElement.h:
1515         * html/HTMLObjectElement.cpp:
1516         (WebCore::HTMLObjectElement::getSubresourceAttributeStrings):
1517         * html/HTMLObjectElement.h:
1518         * html/HTMLParamElement.cpp:
1519         (WebCore::HTMLParamElement::getSubresourceAttributeStrings):
1520         * html/HTMLParamElement.h:
1521         * html/HTMLScriptElement.cpp:
1522         (WebCore::HTMLScriptElement::getSubresourceAttributeStrings):
1523         * html/HTMLScriptElement.h:
1524         * html/HTMLTableCellElement.cpp:
1525         (WebCore::HTMLTableCellElement::getSubresourceAttributeStrings):
1526         * html/HTMLTableCellElement.h:
1527         * html/HTMLTableElement.cpp:
1528         (WebCore::HTMLTableElement::getSubresourceAttributeStrings):
1529         * html/HTMLTableElement.h:
1530         * svg/SVGCursorElement.cpp:
1531         (WebCore::SVGCursorElement::getSubresourceAttributeStrings):
1532         * svg/SVGCursorElement.h:
1533         * svg/SVGFEImageElement.cpp:
1534         (WebCore::SVGFEImageElement::getSubresourceAttributeStrings):
1535         * svg/SVGFEImageElement.h:
1536         * svg/SVGImageElement.cpp:
1537         (WebCore::SVGImageElement::getSubresourceAttributeStrings):
1538         * svg/SVGImageElement.h:
1539         * svg/SVGScriptElement.cpp:
1540         (WebCore::SVGScriptElement::getSubresourceAttributeStrings):
1541         * svg/SVGScriptElement.h:
1542
1543 2008-03-26  Dan Bernstein  <mitz@apple.com>
1544
1545         Reviewed by Dave Hyatt.
1546
1547         - maintain subpixel-antialiasing when drawing text with a simple shadow
1548
1549         * platform/graphics/mac/FontMac.mm:
1550         (WebCore::Font::drawComplexText): If the shadow has a zero blur radius,
1551         draw the shadow by drawing the text at an offset instead of relying on
1552         Core Graphics shadows.
1553         (WebCore::Font::drawGlyphs): Ditto.
1554         * platform/graphics/win/FontCGWin.cpp:
1555         (WebCore::Font::drawGlyphs): Ditto.
1556
1557 2008-03-26  Brady Eidson  <beidson@apple.com>
1558
1559         Reviewed by Mark Rowe
1560
1561         Part of the continued push to move WebArchive-related code down to WebCore, this
1562         moves [WebDataSource subresourceForURL:] down to DocumentLoader->subresource()
1563
1564         * WebCore.base.exp:
1565         * loader/DocumentLoader.cpp:
1566         (WebCore::DocumentLoader::subresource): Create an ArchiveResource from a CachedResource if it exists
1567           Otherwise, fallback to an ArchiveResource from the current Archive if any.  Otherwise, return null
1568         * loader/DocumentLoader.h:
1569
1570         * loader/archive/ArchiveResource.cpp:
1571         (WebCore::ArchiveResource::create):
1572         (WebCore::ArchiveResource::ArchiveResource):
1573         * loader/archive/ArchiveResource.h:
1574
1575 2008-03-26  Sam Weinig  <sam@webkit.org>
1576
1577         Fix Gtk+ build.
1578
1579         * GNUmakefile.am:
1580
1581 2008-03-26  Mark Rowe  <mrowe@apple.com>
1582
1583         Rubber-stamped by Brady Eidson.
1584
1585         Update FEATURE_DEFINES to be consistent with the other locations in which it is defined.
1586
1587         * Configurations/WebCore.xcconfig:
1588
1589 2008-03-26  Brent Fulgham  <bfulgham@gmail.com>
1590
1591         Reviewed by Adam Roben.
1592
1593         Add necessary files and build commands to vcproj files to
1594         build a Curl-based Windows WebKit.  For details, see
1595         http://bugs.webkit.org/show_bug.cgi?id=17985
1596
1597         * WebCore.vcproj/WebCore.vcproj:
1598
1599 2008-03-26  Adam Roben  <aroben@apple.com>
1600
1601         Record JS exceptions triggered by the Inspector's use of JSC
1602
1603         We now dump all exceptions returned from JavaScriptCore into the
1604         Inspector's console.
1605
1606         The HANDLE_EXCEPTION macro records the line on which the exception was
1607         returned. It calls a new private handleException method on
1608         InspectorController.
1609
1610         Reviewed by Kevin McCullough.
1611
1612         * page/InspectorController.cpp:
1613         (WebCore::InspectorController::callSimpleFunction): Made this be a
1614         member of InspectorController so that it can call handleException.
1615         (WebCore::addSourceToFrame): Pass the exception pointer on to inner
1616         JSC calls, and check it after those calls return.
1617         (WebCore::getResourceDocumentNode): Ditto.
1618         (WebCore::search): Ditto. Also changed the name/type of an existing
1619         exception variable to ExceptionCode ec.
1620         (WebCore::databaseTableNames): Ditto.
1621         (WebCore::moveByUnrestricted): Ditto.
1622         (WebCore::InspectorController::~InspectorController): Check for and
1623         record exceptions as we call JSC.
1624         (WebCore::InspectorController::focusNode): Ditto.
1625         (WebCore::InspectorController::scriptObjectReady): Ditto.
1626         (WebCore::addHeaders): Added an exception parameter.
1627         (WebCore::scriptObjectForRequest): Ditto.
1628         (WebCore::scriptObjectForResponse): Ditto.
1629         (WebCore::InspectorController::addScriptResource): Check for and
1630         record exceptions as we call JSC.
1631         (WebCore::InspectorController::addAndUpdateScriptResource): Ditto.
1632         (WebCore::InspectorController::removeScriptResource): Ditto. Also
1633         moved the call to setScriptObject to before the JSC calls so that it
1634         will always be called even if we return early if JSC throws an
1635         exception.
1636         (WebCore::InspectorController::updateScriptResourceRequest): Check for
1637         and record exceptions as we call JSC.
1638         (WebCore::InspectorController::updateScriptResourceResponse): Ditto.
1639         (WebCore::InspectorController::updateScriptResource): Ditto.
1640         (WebCore::InspectorController::addDatabaseScriptResource): Ditto.
1641         (WebCore::InspectorController::removeDatabaseScriptResource): Ditto.
1642         Also moved the call to setScriptObject to before the JSC calls so that
1643         it will always be called even if we return early if JSC throws an
1644         exception.
1645         (WebCore::InspectorController::addScriptConsoleMessage): Check for and
1646         record exceptions as we call JSC.
1647         (WebCore::InspectorController::handleException): Added.
1648         * page/InspectorController.h:
1649
1650 2008-03-26  Darin Adler  <darin@apple.com>
1651
1652         Rubber stamped by Maciej.
1653
1654         - removed a couple log messages in error cases that are handled internally
1655
1656         * platform/text/TextCodecICU.cpp:
1657         (WebCore::TextCodecICU::decode): Removed the LOG_ERROR.
1658         * platform/text/mac/TextCodecMac.cpp:
1659         (WebCore::TextCodecMac::decode): Ditto.
1660
1661 2008-03-26  Sam Weinig  <sam@webkit.org>
1662
1663         Reviewed by Adam Roben.
1664
1665         * page/Location.idl: Don't enumerate toString.
1666
1667 2008-03-26  Mark Rowe  <mrowe@apple.com>
1668
1669         Release build fix.
1670
1671         * rendering/SVGRootInlineBox.cpp:
1672         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox): Initialize svgFont to zero.
1673
1674 2008-03-26  Maciej Stachowiak  <mjs@apple.com>
1675
1676         Reviewed by Hyatt and Adam.
1677
1678         Coded by me and Darin.
1679         
1680         - SVG kerning support (horizontal kerning only for now since we don't do vertical text layout right yet) 
1681         
1682         Acid3 100/100
1683
1684         * DerivedSources.make:
1685         * WebCore.vcproj/WebCore.vcproj:
1686         * WebCore.xcodeproj/project.pbxproj:
1687         * platform/graphics/Font.cpp:
1688         (WebCore::Font::floatWidth):
1689         (WebCore::Font::isSVGFont):
1690         * platform/graphics/Font.h:
1691         * rendering/SVGInlineTextBox.cpp:
1692         (WebCore::SVGInlineTextBox::calculateGlyphWidth):
1693         (WebCore::SVGInlineTextBox::calculateGlyphBoundaries):
1694         * rendering/SVGInlineTextBox.h:
1695         * rendering/SVGRootInlineBox.cpp:
1696         (WebCore::cummulatedWidthOrHeightOfTextChunk):
1697         (WebCore::SVGRootInlineBox::buildLayoutInformation):
1698         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
1699         * rendering/SVGRootInlineBox.h:
1700         (WebCore::LastGlyphInfo::LastGlyphInfo):
1701         * svg/SVGFont.cpp:
1702         (WebCore::SVGTextRunWalker::walk):
1703         (WebCore::Font::svgFont):
1704         (WebCore::floatWidthOfSubStringUsingSVGFont):
1705         (WebCore::Font::floatWidthUsingSVGFont):
1706         (WebCore::Font::drawTextUsingSVGFont):
1707         (WebCore::Font::selectionRectForTextUsingSVGFont):
1708         * svg/SVGFontElement.cpp:
1709         (WebCore::SVGFontElement::invalidateGlyphCache):
1710         (WebCore::SVGFontElement::ensureGlyphCache):
1711         (WebCore::parseUnicodeRange):
1712         (WebCore::parseUnicodeRangeList):
1713         (WebCore::stringMatchesUnicodeRange):
1714         (WebCore::matches):
1715         (WebCore::SVGFontElement::getHorizontalKerningPairForStringsAndGlyphs):
1716         * svg/SVGFontElement.h:
1717         * svg/SVGGlyphElement.cpp:
1718         (WebCore::SVGGlyphElement::insertedIntoDocument):
1719         (WebCore::SVGGlyphElement::removedFromDocument):
1720         * svg/SVGHKernElement.cpp: Added.
1721         (WebCore::SVGHKernElement::SVGHKernElement):
1722         (WebCore::SVGHKernElement::~SVGHKernElement):
1723         (WebCore::SVGHKernElement::insertedIntoDocument):
1724         (WebCore::SVGHKernElement::removedFromDocument):
1725         (WebCore::SVGHKernElement::buildHorizontalKerningPair):
1726         * svg/SVGHKernElement.h: Added.
1727         (WebCore::SVGHorizontalKerningPair::SVGHorizontalKerningPair):
1728         (WebCore::SVGHKernElement::rendererIsNeeded):
1729         * svg/SVGHKernElement.idl: Added.
1730         * svg/SVGTextContentElement.cpp:
1731         (WebCore::cummulatedCharacterRangeLength):
1732         (WebCore::SVGInlineTextBoxQueryWalker::chunkPortionCallback):
1733         * svg/svgtags.in:
1734
1735 2008-03-26  Sam Weinig  <sam@webkit.org>
1736
1737         Reviewed by Adam Roben.
1738
1739         Autogenerate JSLocation.
1740
1741         * GNUmakefile.am:
1742         * WebCore.pro:
1743         * WebCore.vcproj/WebCore.vcproj:
1744         * WebCore.xcodeproj/project.pbxproj:
1745         * WebCoreSources.bkl:
1746         Add files.
1747
1748         * DerivedSources.make: Add Location, remove JSLocation.lut.h
1749         * bindings/js/JSDOMWindowBase.cpp:
1750         (WebCore::JSDOMWindowBasePrivate::JSDOMWindowBasePrivate):
1751         (WebCore::JSDOMWindowBase::getValueProperty):
1752         (WebCore::JSDOMWindowBase::put):
1753         (WebCore::JSDOMWindowBase::clearHelperObjectProperties):
1754         (WebCore::JSDOMWindowBase::disconnectFrame):
1755         * bindings/js/JSDOMWindowBase.h:
1756         Remove manuel management of the Location object.
1757
1758         * bindings/js/JSDOMWindowCustom.cpp:
1759         (WebCore::JSDOMWindow::mark): Add marking of JSLocation.
1760         (WebCore::JSDOMWindow::setLocation): Add custom setLocation as we only want to do this when
1761         safe and we need to keep Dashboard quirks.
1762
1763         * bindings/js/JSDocumentCustom.cpp:
1764         (WebCore::JSDocument::location):
1765         Fetch the location object using the normal toJS route.
1766
1767         * bindings/js/JSLocation.cpp: Removed.
1768         * bindings/js/JSLocation.h: Removed.
1769         * bindings/js/JSLocationCustom.cpp: Added.
1770         (WebCore::JSLocation::customGetOwnPropertySlot):
1771         (WebCore::JSLocation::customPut):
1772         (WebCore::JSLocation::deleteProperty):
1773         (WebCore::JSLocation::customGetPropertyNames):
1774         (WebCore::navigateIfAllowed):
1775         (WebCore::JSLocation::setHref):
1776         (WebCore::JSLocation::setProtocol):
1777         (WebCore::JSLocation::setHost):
1778         (WebCore::JSLocation::setHostname):
1779         (WebCore::JSLocation::setPort):
1780         (WebCore::JSLocation::setPathname):
1781         (WebCore::JSLocation::setSearch):
1782         (WebCore::JSLocation::setHash):
1783         (WebCore::JSLocation::replace):
1784         (WebCore::JSLocation::reload):
1785         (WebCore::JSLocation::assign):
1786         (WebCore::JSLocation::toString):
1787         Setter and Functions need custom implementations as they rely on the dynamic
1788         global object for determining the behavior of the navigation.
1789
1790         * history/CachedPage.cpp:
1791         (WebCore::CachedPage::CachedPage):
1792         (WebCore::CachedPage::restore):
1793         (WebCore::CachedPage::clear):
1794         * history/CachedPage.h:
1795         Removed all the special casing for location as it should be treated like all
1796         the other objects hanging off the window.
1797
1798         * page/DOMWindow.cpp:
1799         (WebCore::DOMWindow::clear):
1800         (WebCore::DOMWindow::location):
1801         * page/DOMWindow.h:
1802         (WebCore::DOMWindow::optionalLocation):
1803         * page/DOMWindow.idl:
1804         Add Location accessor and pointer getter for marking.
1805
1806         * page/Location.cpp: Added.
1807         (WebCore::Location::Location):
1808         (WebCore::Location::disconnectFrame):
1809         (WebCore::Location::url):
1810         (WebCore::Location::href):
1811         (WebCore::Location::protocol):
1812         (WebCore::Location::host):
1813         (WebCore::Location::hostname):
1814         (WebCore::Location::port):
1815         (WebCore::Location::pathname):
1816         (WebCore::Location::search):
1817         (WebCore::Location::hash):
1818         (WebCore::Location::toString):
1819         * page/Location.h: Added.
1820         (WebCore::Location::create):
1821         (WebCore::Location::frame):
1822         * page/Location.idl: Added.
1823
1824 2008-03-26  David Hyatt  <hyatt@apple.com>
1825
1826         Add support for the rendering and measurement of the <altGlyph> element in SVG.  This patch brings
1827         is half of what's needed to reach 100/100 on Acid3 and pass the test.  Maciej has coded up the other half. :)
1828
1829         Reviewed by mjs
1830
1831         Added svg/custom/altGlyph.svg
1832
1833         * svg/SVGAltGlyphElement.cpp:
1834         (WebCore::SVGAltGlyphElement::childShouldCreateRenderer):
1835         (WebCore::SVGAltGlyphElement::glyphElement):
1836         * svg/SVGAltGlyphElement.h:
1837         * svg/SVGFont.cpp:
1838         (WebCore::SVGTextRunWalker::walk):
1839         * svg/SVGFontFaceElement.cpp:
1840         (WebCore::SVGFontFaceElement::insertedIntoDocument):
1841         * svg/SVGGlyphElement.cpp:
1842         (WebCore::SVGGlyphElement::insertedIntoDocument):
1843         (WebCore::SVGGlyphElement::removedFromDocument):
1844
1845 2008-03-26  Adam Roben  <aroben@apple.com>
1846
1847         Turn on SVG animation on Windows
1848
1849         Also touched some files to force things to rebuild/regenerate.
1850
1851         * WebCore.vcproj/WebCore.vcproj: Added ENABLE_SVG_ANIMATION.
1852         * WebCore.vcproj/build-generated-files.sh: Ditto.
1853         * bindings/scripts/CodeGenerator.pm: Touched.
1854         * config.h: Touched.
1855         * svg/svgtags.in: Touched.
1856
1857 2008-03-26  Justin Garcia  <justin.garcia@apple.com>
1858
1859         Reviewed by Harrison.
1860
1861         <rdar://problem/5820749> REGRESSION (Safari 3.1): Mail's plain text reply omits blank line following the attribution
1862
1863         * editing/markup.cpp:
1864         (WebCore::createFragmentFromText): When asked to create a fragment from "Attribution:\n"
1865         with a context from [html, 0] to [html, 0], we'd return "<html>Attribution</html><br>".
1866         Don't enclose paragraphs in clones of the context's enclosing block if that block is the
1867         html or body element.  Currently no way to test [DOMHTMLElement createFragmentFromText:].
1868
1869 2008-03-26  Antti Koivisto  <antti@apple.com>
1870
1871         Reviewed by Anders.
1872
1873         http://bugs.webkit.org/show_bug.cgi?id=17077
1874         Bug 17077: SVG SMIL animation is currently broken (and turned off) (affects Acid3 tests 75 and 76)
1875
1876         - enable SVG animation support.
1877         - basic implementation of beginElement()/endElement().
1878         
1879         Animation definitely will need more work than this, but it is a start!
1880
1881         * Configurations/WebCore.xcconfig:
1882         * svg/SVGAnimationElement.cpp:
1883         (WebCore::SVGAnimationElement::SVGAnimationElement):
1884         (WebCore::SVGAnimationElement::updateAnimatedValueForElapsedSeconds):
1885         (WebCore::SVGAnimationElement::beginElement):
1886         (WebCore::SVGAnimationElement::beginElementAt):
1887         (WebCore::SVGAnimationElement::endElement):
1888         (WebCore::SVGAnimationElement::endElementAt):
1889         * svg/SVGAnimationElement.h:
1890
1891 2008-03-26  Mark Rowe  <mrowe@apple.com>
1892
1893         Reviewed by David Hyatt.
1894
1895         Make the Ahem font antialias correctly on Acid3 on Tiger.
1896
1897         * WebCore.Tiger.exp:
1898         * platform/graphics/mac/SimpleFontDataMac.mm:
1899         (WebCore::SimpleFontData::platformInit):
1900         * platform/mac/WebCoreSystemInterface.h:
1901         * platform/mac/WebCoreSystemInterface.mm:
1902
1903 2008-03-26  Simon Hausmann  <hausmann@webkit.org>
1904
1905         Attempt to fix the Qt build.
1906
1907         * platform/text/qt/TextCodecQt.cpp: Adjust function signature.
1908         (WebCore::TextCodecQt::decode):
1909         * platform/text/qt/TextCodecQt.h: Ditto.
1910
1911 2008-03-26  Dan Bernstein  <mitz@apple.com>
1912
1913         Reviewed by Anders Carlsson.
1914
1915         - fix http://bugs.webkit.org/show_bug.cgi?id=18104
1916           REGRESSION: LEAK: 2 InlineBox in editing/inserting/12882.html
1917
1918         * rendering/bidi.cpp:
1919         (WebCore::RenderBlock::layoutInlineChildren): When deciding to ditch
1920         old clean lines (due to changed or newly-added floats), keep the
1921         reference to those lines so they can be properly deleted in the end,
1922         and use a separate flag to signal that no matching should be attempted.
1923
1924 2008-03-26  Mark Rowe  <mrowe@apple.com>
1925
1926         Speculative Windows build fix.
1927
1928         * platform/graphics/win/SimpleFontDataCGWin.cpp:
1929
1930 2008-03-25  Steve Falkenburg  <sfalken@apple.com>
1931
1932         Turn on link-time-codegen in html and rendering related files.
1933
1934         Reviewed by Oliver.
1935
1936         * WebCore.vcproj/WebCore.vcproj:
1937
1938 2008-03-26  Maciej Stachowiak  <mjs@apple.com>
1939
1940         Reviewed by Darin.
1941
1942         - fixed "SVG multichar glyph matching matches longest instead of first (affects Acid3 test 79)"
1943         http://bugs.webkit.org/show_bug.cgi?id=18118
1944
1945         * svg/SVGFont.cpp:
1946         (WebCore::SVGTextRunWalker::walk):
1947         * svg/SVGFontElement.cpp:
1948         (WebCore::SVGFontElement::SVGFontElement):
1949         (WebCore::SVGFontElement::addGlyphToCache):
1950         (WebCore::SVGFontElement::removeGlyphFromCache):
1951         (WebCore::SVGFontElement::ensureGlyphCache):
1952         (WebCore::SVGFontElement::getGlyphIdentifiersForString):
1953         * svg/SVGFontElement.h:
1954         * svg/SVGGlyphElement.h:
1955         (WebCore::SVGGlyphIdentifier::SVGGlyphIdentifier):
1956         * svg/SVGGlyphMap.h: Added. New radix tree based glyph map.
1957         (WebCore::GlyphMapNode::GlyphMapNode):
1958         (WebCore::SVGGlyphMap::SVGGlyphMap):
1959         (WebCore::SVGGlyphMap::add):
1960         (WebCore::SVGGlyphMap::compareGlyphPriority):
1961         (WebCore::SVGGlyphMap::get):
1962         (WebCore::SVGGlyphMap::clear):
1963
1964 2008-03-26  David Hyatt  <hyatt@apple.com>
1965
1966         Fix build bustage on Tiger.  Tiger will not have the bug fix.
1967
1968         * platform/graphics/mac/SimpleFontDataMac.mm:
1969         (WebCore::SimpleFontData::platformInit):
1970         * platform/graphics/win/SimpleFontDataCGWin.cpp:
1971         (WebCore::SimpleFontData::platformInit):
1972
1973 2008-03-26  David Hyatt  <hyatt@apple.com>
1974
1975         Make the Ahem font antialias correctly on Acid3.
1976
1977         Reviewed by Dan
1978
1979         * platform/graphics/SimpleFontData.h:
1980         * platform/graphics/mac/FontMac.mm:
1981         (WebCore::Font::drawGlyphs):
1982         * platform/graphics/mac/SimpleFontDataMac.mm:
1983         (WebCore::SimpleFontData::platformInit):
1984         * platform/graphics/win/FontCGWin.cpp:
1985         (WebCore::Font::drawGlyphs):
1986         * platform/graphics/win/SimpleFontDataCGWin.cpp:
1987         (WebCore::SimpleFontData::platformInit):
1988
1989 2008-03-26  Mark Rowe  <mrowe@apple.com>
1990
1991         Fix the Mac build.
1992
1993         * WebCore.xcodeproj/project.pbxproj:  Copy the newly generated header into the right place.
1994
1995 2008-03-26  Adam Roben  <aroben@apple.com>
1996
1997         Fix Bug 17768: REGRESSION (r30146): Inspector no longer shows elements
1998         properties
1999
2000         <http://bugs.webkit.org/show_bug.cgi?id=17768>
2001
2002         We were throwing an exception from Object.describe because of some
2003         undefined variables.
2004
2005         Reviewed by Tim Hatcher.
2006
2007         * page/inspector/utilities.js:
2008         (Object.describe): Reinstate the type1 and type2 variables that were
2009         removed in r30146. They're still used when formatting a function.
2010
2011 2008-03-26  Eric Seidel  <eric@webkit.org>
2012
2013         Reviewed by darin.
2014
2015         Forgot to add braces darin asked for during review.
2016
2017         * dom/XMLTokenizer.cpp:
2018         (WebCore::XMLTokenizer::write):
2019
2020 2008-03-26  Eric Seidel  <eric@webkit.org>
2021
2022         Reviewed by darin.
2023
2024         Fix, makes us pass Test 70
2025         XML documents should be strict about encoding checks
2026         http://bugs.webkit.org/show_bug.cgi?id=17079
2027
2028         Test: fast/encoding/invalid-xml.html
2029
2030         * WebCore.base.exp:
2031         * dom/XMLTokenizer.cpp:
2032         (WebCore::XMLTokenizer::write):
2033         * loader/CachedFont.cpp:
2034         (WebCore::CachedFont::ensureSVGFontData):
2035         * loader/TextResourceDecoder.cpp:
2036         (WebCore::TextResourceDecoder::TextResourceDecoder):
2037         (WebCore::TextResourceDecoder::decode):
2038         * loader/TextResourceDecoder.h:
2039         * platform/text/TextCodec.h:
2040         (WebCore::TextCodec::decode):
2041         * platform/text/TextCodecICU.cpp:
2042         (WebCore::TextCodecICU::decodeToBuffer):
2043         (WebCore::ErrorCallbackSetter::ErrorCallbackSetter):
2044         (WebCore::ErrorCallbackSetter::~ErrorCallbackSetter):
2045         (WebCore::TextCodecICU::decode):
2046         * platform/text/TextCodecICU.h:
2047         * platform/text/TextCodecLatin1.cpp:
2048         * platform/text/TextCodecLatin1.h:
2049         * platform/text/TextCodecUTF16.cpp:
2050         * platform/text/TextCodecUTF16.h:
2051         * platform/text/TextCodecUserDefined.cpp:
2052         * platform/text/TextCodecUserDefined.h:
2053         * platform/text/TextDecoder.cpp:
2054         (WebCore::TextDecoder::checkForBOM):
2055         * platform/text/TextDecoder.h:
2056         (WebCore::TextDecoder::decode):
2057         * platform/text/TextEncoding.cpp:
2058         (WebCore::TextEncoding::decode):
2059         * platform/text/TextEncoding.h:
2060         (WebCore::TextEncoding::decode):
2061         * platform/text/mac/TextCodecMac.cpp:
2062         (WebCore::TextCodecMac::decode):
2063         * platform/text/mac/TextCodecMac.h:
2064
2065 2008-03-26  Antti Koivisto  <antti@apple.com>
2066
2067         Reviewed by Adam.
2068
2069         Add ElementTimeControl interface to SVGAnimationElement.
2070         Passes Acid3 test 75.
2071
2072         * DerivedSources.make:
2073         * WebCore.pro:
2074         * WebCore.vcproj/WebCore.vcproj:
2075         * WebCore.xcodeproj/project.pbxproj:
2076         * bindings/scripts/CodeGeneratorObjC.pm:
2077         * svg/ElementTimeControl.h: Added.
2078         (WebCore::ElementTimeControl::~ElementTimeControl):
2079         * svg/ElementTimeControl.idl: Added.
2080         * svg/SVGAnimationElement.cpp:
2081         (WebCore::SVGAnimationElement::beginElement):
2082         (WebCore::SVGAnimationElement::beginElementAt):
2083         (WebCore::SVGAnimationElement::endElement):
2084         (WebCore::SVGAnimationElement::endElementAt):
2085         * svg/SVGAnimationElement.h:
2086         * svg/SVGAnimationElement.idl:
2087
2088 2008-03-26  Kevin McCullough  <kmccullough@apple.com>
2089
2090         - LayoutTest fix.  Null check.
2091
2092         * xml/XMLHttpRequest.cpp:
2093         (WebCore::XMLHttpRequest::send):
2094
2095 2008-03-26  Dan Bernstein  <mitz@apple.com>
2096
2097         Reviewed by Darin Adler.
2098
2099         - fix http://bugs.webkit.org/show_bug.cgi?id=17994
2100           REGRESSION (523-525+) View not updated when changing CSS size via JavaScript
2101         - fix http://bugs.webkit.org/show_bug.cgi?id=18063
2102           REGRESSION (r31250): Small bug that just cropped up in WebKit r31275
2103
2104         Tests: fast/repaint/subtree-root-clip.html
2105                fast/repaint/subtree-root-clip-2.html
2106                fast/repaint/subtree-root-clip-3.html
2107
2108         * rendering/LayoutState.cpp:
2109         (WebCore::LayoutState::LayoutState): Changed to not set an initial clip.
2110         Since the root is clipping, there is no need to set a clip, and setting
2111         the clip based on the container was wrong because often the root was
2112         not included in the container's overflow rect because it had its own
2113         layer.
2114         * rendering/RenderBox.cpp:
2115         (WebCore::RenderBox::absolutePosition): Removed code that added table
2116         cell's extra top offset only in the slow (recursive) code path.
2117         * rendering/RenderTableCell.cpp:
2118         (WebCore::RenderTableCell::absolutePosition): Added code to add the
2119         extra top offset in both code paths.
2120
2121 2008-03-26  Simon Hausmann  <hausmann@webkit.org>
2122
2123         Fix the Qt build.
2124
2125         * platform/graphics/qt/FontQt.cpp:
2126         (WebCore::Font::floatWidth):
2127
2128 2008-03-24  Maciej Stachowiak  <mjs@apple.com>
2129
2130         Reviewed by Eric.
2131
2132         - fixed "SVGTextElement.getStartPositionOfChar does not correctly account for multichar glyphs"
2133         http://bugs.webkit.org/show_bug.cgi?id=18046
2134
2135         * platform/graphics/Font.cpp:
2136         (WebCore::Font::floatWidth): Allow expressing a run that has extra "context" characters beyond the end,
2137         and reporting of how many characters were actually consumed, to support multichar glyphs in SVG fonts.
2138         * platform/graphics/Font.h:
2139         * rendering/SVGInlineTextBox.cpp:
2140         (WebCore::SVGInlineTextBox::calculateGlyphWidth): Pass along extra chars in argument and chars consumed out
2141         argument.
2142         (WebCore::SVGInlineTextBox::calculateGlyphHeight): Pass along extra chars in argument.
2143         (WebCore::SVGInlineTextBox::calculateGlyphBoundaries): Add boilerplate; may not handle multichar glyphs
2144         right but I don't know what effects this would have.
2145         * rendering/SVGInlineTextBox.h:
2146         * rendering/SVGRootInlineBox.cpp:
2147         (WebCore::cummulatedWidthOrHeightOfTextChunk): Add boilerplate; may not handle multichar glyphs right
2148         but again I am not sure what effect this would have.
2149         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox): Account for multichar glyphs - let glyph
2150         selection consider extra chars, and account for the fact that a glyph may have consumed multiple chars.
2151         * rendering/SVGRootInlineBox.h:
2152         * svg/SVGFont.cpp:
2153         (WebCore::SVGTextRunWalker::walk): This is the place where glyph selection happens, so this is where
2154         we accout for multichar glyphs (both looking at extra chars past the end of the run, and reporting how
2155         many chars were consumed).
2156         (WebCore::floatWidthOfSubStringUsingSVGFont): Pass aforementioned info through the layers.
2157         (WebCore::Font::floatWidthUsingSVGFont): ditto
2158         (WebCore::Font::drawTextUsingSVGFont): ditto
2159         (WebCore::Font::selectionRectForTextUsingSVGFont): ditto
2160         * svg/SVGTextContentElement.cpp:
2161         (WebCore::cummulatedCharacterRangeLength): ditto
2162         (WebCore::SVGInlineTextBoxQueryWalker::chunkPortionCallback): ditto
2163
2164 2008-03-25  Beth Dakin  <bdakin@apple.com>
2165
2166         Reviewed by Oliver.
2167
2168         Fix for <rdar://problem/5811826> CSSValueList::item() does not 
2169         range-check index
2170
2171         Check bounds before accessing the item to avoid a crash. 
2172         itemWithoutBoundsCheck() is still inlined and not bounds-checked to 
2173         avoid slowing down our internal callers of item().
2174         * css/CSSValueList.cpp:
2175         (WebCore::CSSValueList::item):
2176         * css/CSSValueList.h:
2177         (WebCore::CSSValueList::itemWithoutBoundsCheck):
2178
2179         Call itemWithoutBoundsCheck() to avoid slowing down these internal 
2180         callers.
2181         * css/CSSFontSelector.cpp:
2182         (WebCore::CSSFontSelector::addFontFaceRule):
2183         * css/CSSMutableStyleDeclaration.cpp:
2184         (WebCore::CSSMutableStyleDeclaration::getLayeredShorthandValue):
2185         * css/CSSStyleSelector.cpp:
2186         (WebCore::applyCounterList):
2187         (WebCore::CSSStyleSelector::applyProperty):
2188         * css/MediaQueryEvaluator.cpp:
2189         (WebCore::parseAspectRatio):
2190         * svg/SVGFontFaceElement.cpp:
2191         (WebCore::SVGFontFaceElement::rebuildFontFace):
2192         * svg/graphics/SVGPaintServer.cpp:
2193         (WebCore::dashArrayFromRenderingStyle):
2194
2195 2008-03-25  Antti Koivisto  <antti@apple.com>
2196
2197         Reviewed by Oliver.
2198
2199         Fix http://bugs.webkit.org/show_bug.cgi?id=18082
2200         REGRESSION (r31287): GMail does not work if user stylesheet is set
2201         
2202         Oops, my cache refactoring patch was missing these rather essential lines for
2203         user stylesheets. They would get reloaded repeatedly.
2204
2205         * loader/Cache.cpp:
2206         (WebCore::Cache::requestUserCSSStyleSheet):
2207
2208 2008-03-25  Matt Lilek  <webkit@mattlilek.com>
2209
2210         Rubber stamped by Adam
2211
2212         Roll out r31300 since it causes assertion failures on page load.
2213         See http://bugs.webkit.org/show_bug.cgi?id=18093
2214
2215         * page/InspectorController.cpp:
2216         (WebCore::InspectorController::didFinishLoading):
2217         (WebCore::InspectorController::didFailLoading):
2218
2219 2008-03-25  Darin Adler  <darin@apple.com>
2220
2221         Reviewed by Anders.
2222
2223         - fix http://bugs.webkit.org/show_bug.cgi?id=17252
2224           Acid3 test removing Nodes during NodeIterator walk fails (affects Acid3 test 2)
2225
2226         Test: traversal/acid3-test-2.html
2227
2228         * bindings/js/JSNodeIteratorCustom.cpp:
2229         (WebCore::JSNodeIterator::nextNode): Update since result is PassRefPtr.
2230         (WebCore::JSNodeIterator::previousNode): Ditto.
2231         * dom/NodeIterator.cpp:
2232         (WebCore::NodeIterator::nextNode): Changed result to PassRefPtr. Added code to
2233         track both the current candidate (which needs to move along to the next node
2234         if current node is deleted) and the current provisional result (passed to acceptNode,
2235         and needs to be returned even if it's deleted).
2236         (WebCore::NodeIterator::previousNode): Ditto.
2237         (WebCore::NodeIterator::nodeWillBeRemoved): Call updateForNodeRemoval for
2238         m_candidateNode as well as m_referenceNode.
2239         * dom/NodeIterator.h: Use PassRefPtr for return values.
2240
2241 2008-03-25  Brady Eidson  <beidson@apple.com>
2242
2243         Reviewed by Anders
2244
2245         Add the ability to transform a CString into a SharedBuffer to avoid copying data
2246         This is valuable to avoid copying a block of data for an upcoming patch
2247
2248         * platform/SharedBuffer.cpp:
2249         (WebCore::SharedBuffer::adoptVector):
2250         * platform/SharedBuffer.h:
2251
2252         * platform/text/CString.cpp:
2253         (WebCore::CString::releaseBuffer):
2254         * platform/text/CString.h:
2255         (WebCore::CStringBuffer::releaseBuffer):
2256
2257 2008-03-25  Brady Eidson  <beidson@apple.com>
2258
2259         Attempt to fix .bkl build systems after recent archive additions
2260
2261         * webcore-base.bkl:
2262
2263 2008-03-25  Kevin McCullough  <kmccullough@apple.com>
2264
2265         Reviewed by Adam.
2266
2267         - Cleaned up the needless use of RefPtrs, which we may someday no longer use for
2268         InspectorResources.
2269
2270         * page/InspectorController.cpp:
2271         (WebCore::InspectorController::didFinishLoading):
2272         (WebCore::InspectorController::didFailLoading):
2273
2274 2008-03-25  Kevin McCullough  <kmccullough@apple.com>
2275
2276         Reviewed by Adam.
2277
2278         - Added a null check
2279
2280         * xml/XMLHttpRequest.cpp: Null check
2281         (WebCore::XMLHttpRequest::send):
2282
2283 2008-03-25  Kevin McCullough  <kmccullough@apple.com>
2284
2285         Reviewed by Tim.
2286
2287         -<rdar://problem/5712804> XMLHttpRequests do not show response contents, preview images (14313)
2288         -<rdar://problem/5712931> XMLHttpRequests should be shown separately and grouped (14315)
2289         -<rdar://problem/5732836> XMLHttpRequest: Inspector should show network activity/XHR in Console (17233)
2290         - XMLHttpRequestResources now identify themselves to the inspector which caches the data related to
2291         the request since no one else caches it.  However this is just the plumbing and the Inspector's UI
2292         has not been changed to show XHR resources yet. 
2293
2294         * page/InspectorController.cpp: Add ability to set XHR data on an InspectorResource.
2295         (WebCore::XMLHttpRequestResource::XMLHttpRequestResource):
2296         (WebCore::XMLHttpRequestResource::data):
2297         (WebCore::XMLHttpRequestResource::encoding):
2298         (WebCore::InspectorResource::): Add new type.
2299         (WebCore::InspectorResource::~InspectorResource): No longer virtual since we are not using inheritance.
2300         (WebCore::InspectorResource::type): Ditto.
2301         (WebCore::InspectorResource::setXMLHttpRequestResource):
2302         (WebCore::InspectorResource::isXHR):
2303         (WebCore::InspectorResource::xmlHttpRequestData):
2304         (WebCore::InspectorResource::xmlHttpRequestEncoding):
2305         (WebCore::InspectorResource::InspectorResource):
2306         (WebCore::addSourceToFrame):
2307         (WebCore::InspectorController::resourceRetrievedByXMLHttpRequest):
2308         * page/InspectorController.h: Add accessor for setting the XHR data.
2309         * page/inspector/Resource.js: Keep the XHR resource types in sync with the Inspector Controller.
2310         * xml/XMLHttpRequest.cpp: Give the InspectorController the XHR information to cache.
2311         (WebCore::XMLHttpRequest::send):
2312
2313 2008-03-25  Adam Roben  <aroben@apple.com>
2314
2315         Add an UnusedParam.h forwarding header for use by testapi
2316
2317         Reviewed by Steve Falkenburg.
2318
2319         * ForwardingHeaders/wtf/UnusedParam.h: Added.
2320
2321 2008-03-25  Brady Eidson  <beidson@apple.com>
2322
2323         Reviewed by Adam Roben
2324
2325         <rdar://problem/5819308> - View Source is empty when view webarchives
2326
2327         * WebCore.base.exp:
2328         * loader/DocumentLoader.cpp:
2329         (WebCore::DocumentLoader::setParsedArchiveData):
2330         (WebCore::DocumentLoader::parsedArchiveData):
2331         * loader/DocumentLoader.h:
2332
2333         * loader/FrameLoader.cpp:
2334         (WebCore::FrameLoader::finishedLoadingDocument): Set the archive's MainResource data as the parsedArchiveData
2335           in the DocumentLoader
2336
2337 2008-03-25  Eric Seidel  <eric@webkit.org>
2338
2339         Reviewed by Oliver.
2340
2341         Speculative crash fix for Acid3 crasher.
2342         I couldn't figure out how to make a test case for this?
2343         Suggestions welcome.
2344
2345         * css/CSSFontSelector.cpp: null check document->renderer()
2346
2347 2008-03-25  Antti Koivisto  <antti@apple.com>
2348
2349         Reviewed by Geoff Garen.
2350
2351         Some memory cache cleanups:
2352         - Separate CachedResource loading from construction, initiate load using a separate load() method.
2353         - Add special case function to Cache for loading user stylesheets. This allows removal
2354           of a bunch of parameters from several methods and CachedResource constructors.
2355         - Construct CachedResources with m_inCache set to false which is quite a bit more logical as they
2356           are not yet in the cache at that point.
2357         - Pass encoding around as const String& instead of const String*.
2358
2359         * css/CSSImageValue.cpp:
2360         (WebCore::CSSImageValue::image):
2361         * html/HTMLImageLoader.cpp:
2362         (WebCore::HTMLImageLoader::updateFromElement):
2363         * loader/Cache.cpp:
2364         (WebCore::createResource):
2365         (WebCore::Cache::requestResource):
2366         (WebCore::Cache::requestUserCSSStyleSheet):
2367         (WebCore::Cache::remove):
2368         * loader/Cache.h:
2369         * loader/CachedCSSStyleSheet.cpp:
2370         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
2371         * loader/CachedCSSStyleSheet.h:
2372         * loader/CachedFont.cpp:
2373         (WebCore::CachedFont::CachedFont):
2374         (WebCore::CachedFont::load):
2375         (WebCore::CachedFont::ref):
2376         * loader/CachedFont.h:
2377         * loader/CachedImage.cpp:
2378         (WebCore::CachedImage::CachedImage):
2379         (WebCore::CachedImage::load):
2380         * loader/CachedImage.h:
2381         * loader/CachedResource.cpp:
2382         (WebCore::CachedResource::CachedResource):
2383         (WebCore::CachedResource::~CachedResource):
2384         (WebCore::CachedResource::load):
2385         * loader/CachedResource.h:
2386         (WebCore::CachedResource::load):
2387         * loader/CachedScript.cpp:
2388         (WebCore::CachedScript::CachedScript):
2389         * loader/CachedScript.h:
2390         * loader/CachedXBLDocument.cpp:
2391         (WebCore::CachedXBLDocument::CachedXBLDocument):
2392         * loader/CachedXBLDocument.h:
2393         * loader/CachedXSLStyleSheet.cpp:
2394         (WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
2395         * loader/CachedXSLStyleSheet.h:
2396         * loader/DocLoader.cpp:
2397         (WebCore::DocLoader::requestImage):
2398         (WebCore::DocLoader::requestFont):
2399         (WebCore::DocLoader::requestCSSStyleSheet):
2400         (WebCore::DocLoader::requestUserCSSStyleSheet):
2401         (WebCore::DocLoader::requestScript):
2402         (WebCore::DocLoader::requestXSLStyleSheet):
2403         (WebCore::DocLoader::requestXBLDocument):
2404         (WebCore::DocLoader::requestResource):
2405         (WebCore::DocLoader::preload):
2406         * loader/DocLoader.h:
2407
2408 2008-03-25  Darin Adler  <darin@apple.com>
2409
2410         Reviewed by Anders.
2411
2412         - avoid converting UString to String and then later to AtomicString
2413
2414         1% speedup on Acid3 test 26
2415
2416         This is inefficient for the case where there's already an AtomicString.
2417         By first creating and destroying a String we waste time.
2418
2419         * bindings/scripts/CodeGeneratorJS.pm: Use const UString& for string
2420         arguments rather than using String; this uses the object as it's produced
2421         from toString rather than creating a new temporary object that might not
2422         be of the right type. The type conversion happens at the callsite instead.
2423         Also eliminate the ability to use the type AtomicString from IDL.
2424
2425         * dom/KeyboardEvent.idl: AtomicString -> DOMString.
2426         * dom/MouseEvent.idl: Ditto.
2427         * dom/MutationEvent.idl: Ditto.
2428         * dom/UIEvent.idl: Ditto.
2429         * svg/SVGStyleElement.idl: Ditto.
2430
2431 2008-03-25  Brady Eidson  <beidson@apple.com>
2432
2433         Build fix for non-CoreFoundation platforms
2434
2435         * loader/archive/ArchiveFactory.cpp:
2436
2437 2008-03-25  Brady Eidson  <beidson@apple.com>
2438
2439         Reviewed by Darin
2440
2441         Remove newly obsolete FrameLoaderClient methods
2442
2443         * loader/FrameLoaderClient.h:
2444         * svg/graphics/SVGImageEmptyClients.h:
2445         (WebCore::SVGEmptyFrameLoaderClient::setMainDocumentError):
2446         (WebCore::SVGEmptyFrameLoaderClient::finishedLoading):
2447
2448 2008-03-25  Brady Eidson  <beidson@apple.com>
2449
2450         Reviewed by Darin
2451
2452         <rdar://problem/4516169> - Support WebArchives on Windows
2453         And pave the way for many future WebArchive bug fixes and enhancements
2454
2455         This patch accomplishes two main goals:
2456         1 - Consolidates much of the spread out WebKitMac archive code into one place in WebCore.  This allows for cleaner refactoring 
2457             in the future as well as adding more archive formats with ease.
2458         2 - Hooks up WebArchive support on Windows.  Safari-style .webarchive files are nothing more than property lists readable by
2459             CoreFoundation.  While there are still some outstanding issues, including an NSKeyedArchiver chunk of data for the 
2460             ResourceResponse for each resource, this patch manually parses through the property list on CoreFoundation platforms and
2461             gets many archives loading on Windows
2462
2463         My goal for this first cut was zero behavior change.  As such, I went for a direct port of the WebKitMac code.  There will be
2464         opportunities for redesign and refactoring as followups.
2465
2466         * WebCore.base.exp:
2467
2468         * loader/DocumentLoader.cpp:
2469         (WebCore::DocumentLoader::setupForReplaceByMIMEType): Ported from WebKitMac, WebDataSource
2470         (WebCore::DocumentLoader::addAllArchiveResources):
2471         (WebCore::DocumentLoader::addArchiveResource):
2472         (WebCore::DocumentLoader::archiveResourceForURL):
2473         (WebCore::DocumentLoader::popArchiveForSubframe):
2474         (WebCore::DocumentLoader::clearArchiveResources):
2475         * loader/DocumentLoader.h:
2476
2477         * loader/FrameLoader.cpp: Moved WebFrameLoaderClient and WebFrame code down into their more appropriate FrameLoader home
2478         (WebCore::FrameLoader::FrameLoader):
2479         (WebCore::FrameLoader::setDefersLoading):
2480         (WebCore::FrameLoader::deliverArchivedResourcesAfterDelay):
2481         (WebCore::FrameLoader::archiveResourceDeliveryTimerFired):
2482         (WebCore::FrameLoader::loadURLIntoChildFrame):
2483         (WebCore::FrameLoader::loadArchive):
2484         (WebCore::FrameLoader::scheduleArchiveLoad):
2485         (WebCore::FrameLoader::stopAllLoaders):
2486         (WebCore::FrameLoader::cancelPendingArchiveLoad):
2487         (WebCore::FrameLoader::isArchiveLoadPending):
2488         (WebCore::FrameLoader::finishedLoadingDocument):
2489         * loader/FrameLoader.h:
2490
2491         * loader/ResourceLoader.cpp:
2492         (WebCore::ResourceLoader::load):
2493
2494         * loader/archive/Archive.h: Generic "Archive of web resources" class that is only useful when subclassed.  
2495             Contains a MainResource, subresources, and Archives for subframes
2496         (WebCore::Archive::mainResource):
2497         (WebCore::Archive::subresources):
2498         (WebCore::Archive::subframeArchives):
2499         (WebCore::Archive::setMainResource):
2500         (WebCore::Archive::addSubresource):
2501         (WebCore::Archive::addSubframeArchive):
2502
2503         * loader/archive/ArchiveFactory.cpp: A class that will take raw archive data and the MIMEtype, and create the
2504             appropriate Archive class for it.  Additionally it handles registering the known MIMEtypes for all known archive formats
2505         (WebCore::archiveFactoryCreate):
2506         (WebCore::archiveMIMETypes):
2507         (WebCore::ArchiveFactory::isArchiveMimeType):
2508         (WebCore::ArchiveFactory::create):
2509         (WebCore::ArchiveFactory::registerKnownArchiveMIMETypes):
2510         * loader/archive/ArchiveFactory.h:
2511
2512         * loader/archive/ArchiveResource.cpp: Analog to "WebResource" in WebKitMac.  Contains the data and other important
2513             attributes of an archived resource
2514         (WebCore::ArchiveResource::create):
2515         (WebCore::ArchiveResource::ArchiveResource):
2516         (WebCore::ArchiveResource::response):
2517         * loader/archive/ArchiveResource.h:
2518         (WebCore::ArchiveResource::data):
2519         (WebCore::ArchiveResource::url):
2520         (WebCore::ArchiveResource::mimeType):
2521         (WebCore::ArchiveResource::textEncoding):
2522         (WebCore::ArchiveResource::frameName):
2523         (WebCore::ArchiveResource::ignoreWhenUnarchiving):
2524         (WebCore::ArchiveResource::shouldIgnoreWhenUnarchiving):
2525
2526         * loader/archive/ArchiveResourceCollection.cpp: Analog of "WebUnarchivingState" in WebKitMac.  Contains a hash of
2527             all the resources for every frame in an archive, and contains the archives for each subframe needed to load a multi-frame archive
2528         (WebCore::ArchiveResourceCollection::ArchiveResourceCollection):
2529         (WebCore::ArchiveResourceCollection::addAllResources):
2530         (WebCore::ArchiveResourceCollection::addResource):
2531         (WebCore::ArchiveResourceCollection::archiveResourceForURL):
2532         (WebCore::ArchiveResourceCollection::popSubframeArchive):
2533         * loader/archive/ArchiveResourceCollection.h:
2534
2535         * loader/archive/cf/LegacyWebArchive.cpp: Subclass of Archive specifically for Webkit's Objective-C based ".webarchive" format.
2536             Mostly a collection of static methods involved in parsing and serializing a WebKit-style .webarchive.  Is mostly supported
2537             for any CF platform.
2538         (WebCore::createPropertyListRepresentationFromResource):
2539         (WebCore::createPropertyListRep):
2540         (WebCore::createResourceResponseFromPropertyListData):
2541         (WebCore::createResource):
2542         (WebCore::LegacyWebArchive::create):
2543         (WebCore::LegacyWebArchive::LegacyWebArchive):
2544         (WebCore::LegacyWebArchive::init):
2545         (WebCore::LegacyWebArchive::extract):
2546         (WebCore::LegacyWebArchive::rawDataRepresentation):
2547         (WebCore::createResourceResponseFromMacArchivedData):
2548         (WebCore::propertyListDataFromResourceResponse):
2549         * loader/archive/cf/LegacyWebArchive.h:
2550         * loader/archive/cf/LegacyWebArchiveMac.mm:
2551         (WebCore::createResourceResponseFromMacArchivedData):
2552         (WebCore::propertyListDataFromResourceResponse):
2553
2554         * platform/network/mac/ResourceRequest.h:
2555         * platform/network/mac/ResourceRequestMac.mm:
2556         (WebCore::ResourceRequest::applyWebArchiveHackForMail): Tweak the resource request for Mac clients when loading WebArchives
2557
2558 2008-03-25  David Hyatt  <hyatt@apple.com>
2559
2560         Cut and paste error in the zoom code.  A width() should have been a height().  Regression tests caught this.
2561
2562         * page/DOMWindow.cpp:
2563         (WebCore::DOMWindow::innerHeight):
2564
2565 2008-03-24  Darin Adler  <darin@apple.com>
2566
2567         - try to fix broken Wx build
2568
2569         * platform/wx/TemporaryLinkStubs.cpp:
2570         (GraphicsContext::setPlatformShadow):
2571         (GraphicsContext::clearPlatformShadow):
2572
2573 2008-03-24  Darin Adler  <darin@apple.com>
2574
2575         Reviewed by Sam.
2576
2577         - use AtomicString more consistently for attribute values
2578
2579         1% speedup on Acid3 test 26
2580
2581         * dom/Element.cpp:
2582         (WebCore::Element::setAttribute): Changed value argument to AtomicString.
2583         Also fixed call to lower() to only be done if the name isn't already lowercase.
2584         Also took out one unneeded condition in a cascade of if statements.
2585         (WebCore::Element::createAttribute): Ditto.
2586         (WebCore::Element::setAttributeNS): Ditto.
2587         * dom/Element.h: Ditto.
2588         * dom/StyledElement.cpp:
2589         (WebCore::StyledElement::createAttribute): Ditto.
2590         * dom/StyledElement.h: Ditto.
2591
2592 2008-03-24  Darin Adler  <darin@apple.com>
2593
2594         Reviewed by Sam.
2595
2596         - get rid of extra level of function call in toJS functions for Node
2597
2598         0.6% speedup on Acid3 test 26
2599
2600         * bindings/js/JSNodeCustom.cpp:
2601         (WebCore::toJS): Take a raw pointer, not a PassRefPtr, like other toJS functions.
2602
2603         * bindings/scripts/CodeGeneratorJS.pm: Add an inlined toJS for EventTargetNode*
2604         to avoid ambiguity that otherwise exists between the toJS for EventTarget* and
2605         for Node*.
2606
2607 2008-03-24  Darin Adler  <darin@apple.com>
2608
2609         Reviewed by Hyatt.
2610
2611         - add fast path to isValidName that does not use advanced Unicode functions
2612
2613         2% speedup on Acid3 test 26
2614
2615         * dom/Document.cpp:
2616         (WebCore::isValidNameNonASCII): Added. Contains the old isValidName function.
2617         (WebCore::isValidNameASCII): Added. Contains a simpler function that returns
2618         true for most valid names that are also all ASCII.
2619         (WebCore::Document::isValidName): Changed to call both of the above functions.
2620         The common case is that isValidNameASCII returns true so isValidNameNonASCII
2621         is never called.
2622
2623 2008-03-24  David Hyatt  <hyatt@apple.com>
2624
2625         Fix for bug 18052, window properties need to respect zoom factor.
2626
2627         Reviewed by Beth
2628
2629         * page/DOMWindow.cpp:
2630         (WebCore::DOMWindow::innerHeight):
2631         (WebCore::DOMWindow::innerWidth):
2632         (WebCore::DOMWindow::scrollX):
2633         (WebCore::DOMWindow::scrollY):
2634         (WebCore::DOMWindow::scrollTo):
2635         * page/FrameView.cpp:
2636         (WebCore::FrameViewPrivate::reset):
2637         (WebCore::FrameView::layout):
2638         (WebCore::FrameView::performPostLayoutTasks):
2639
2640 2008-03-24  Sam Weinig  <sam@webkit.org>
2641
2642         Reviewed by Darin Adler.
2643
2644         Fix http://bugs.webkit.org/show_bug.cgi?id=18048
2645         The "thisObject" parameter to JSEvaluateScript is not used properly
2646
2647         * bindings/js/kjs_proxy.cpp:
2648         (WebCore::KJSProxy::evaluate): No need to pass a thisObject since we want the global object to be used.
2649         * bridge/jni/jni_jsobject.mm:
2650         (JavaJSObject::eval): To avoid any change to this function, don't pass a thisObject to keep the same
2651         behavior.
2652
2653 2008-03-24  Brady Eidson  <beidson@apple.com>
2654
2655         Reviewed by Darin's rubberstamp
2656
2657         Land a load of empty files for upcoming work to make sure I'm not breaking any platform's build
2658
2659         * GNUmakefile.am:
2660         * WebCore.pro:
2661         * WebCore.vcproj/WebCore.vcproj:
2662         * WebCore.xcodeproj/project.pbxproj:
2663         * WebCoreSources.bkl:
2664         * loader/archive: Added.
2665         * loader/archive/Archive.h: Added.
2666         * loader/archive/ArchiveFactory.cpp: Added.
2667         * loader/archive/ArchiveFactory.h: Added.
2668         * loader/archive/ArchiveResource.cpp: Added.
2669         * loader/archive/ArchiveResource.h: Added.
2670         * loader/archive/ArchiveResourceCollection.cpp: Added.
2671         * loader/archive/ArchiveResourceCollection.h: Added.
2672         * loader/archive/cf: Added.
2673         * loader/archive/cf/LegacyWebArchive.cpp: Added.
2674         * loader/archive/cf/LegacyWebArchive.h: Added.
2675         * loader/archive/cf/LegacyWebArchiveMac.mm: Added.
2676
2677 2008-03-24  David Hyatt  <hyatt@apple.com>
2678
2679         Fix for bug 18009. Make sure the IE offset/client/scroll*** extensions respect full page zoom.
2680
2681         Reviewed by Beth
2682
2683         * dom/Element.cpp:
2684         (WebCore::localZoomForRenderer):
2685         (WebCore::adjustForLocalZoom):
2686         (WebCore::adjustForAbsoluteZoom):
2687         (WebCore::Element::offsetLeft):
2688         (WebCore::Element::offsetTop):
2689         (WebCore::Element::offsetWidth):
2690         (WebCore::Element::offsetHeight):
2691         (WebCore::Element::clientLeft):
2692         (WebCore::Element::clientTop):
2693         (WebCore::Element::clientWidth):
2694         (WebCore::Element::clientHeight):
2695         (WebCore::Element::scrollLeft):
2696         (WebCore::Element::scrollTop):
2697         (WebCore::Element::setScrollLeft):
2698         (WebCore::Element::setScrollTop):
2699         (WebCore::Element::scrollWidth):
2700         (WebCore::Element::scrollHeight):
2701         * rendering/RenderBox.cpp:
2702         (WebCore::RenderBox::setStyle):
2703         * rendering/RenderObject.cpp:
2704         (WebCore::RenderObject::offsetParent):
2705         * rendering/RenderObject.h:
2706
2707 2008-03-24  Brady Eidson  <beidson@apple.com>
2708
2709         Reviewed by Darin
2710
2711         Some style cleanup and add a logging channel for upcoming work
2712
2713         * platform/Logging.cpp:
2714         * platform/Logging.h:
2715
2716         * platform/MIMETypeRegistry.cpp:
2717         (WebCore::initializeSupportedImageMIMETypes):
2718         (WebCore::initializeSupportedNonImageMimeTypes):
2719
2720 2008-03-24  Dan Bernstein  <mitz@apple.com>
2721
2722         Reviewed by Sam Weinig.
2723
2724         - fix <rdar://problem/5812292> CrashTracer: [REGRESSION] 60 crashes in Safari at com.apple.WebCore: WebCore::RenderObject::repaintRectangle + 47
2725
2726         Test: fast/repaint/renderer-destruction-by-invalidateSelection-crash.html
2727
2728         * page/FrameView.cpp:
2729         (WebCore::FrameViewPrivate::reset): Removed repaintRects code.
2730         (WebCore::FrameView::layout): Ditto.
2731         (WebCore::FrameView::addRepaintInfo): Removed.
2732
2733         * page/FrameView.h: Removed addRepaintInfo().
2734
2735         * rendering/RenderBlock.cpp:
2736         (WebCore::RenderBlock::layoutBlock): Changed to call repaintRectangle
2737         instead of FrameView::addRepaintInfo().
2738         * rendering/RenderTable.cpp:
2739         (WebCore::RenderTable::layout): Ditto.
2740
2741 2008-03-24  Alp Toker  <alp@atoker.com>
2742
2743         GTK+/soup http backend build fix for breakage introduced in r31141.
2744         Fix suggested by Xan.
2745
2746         * platform/network/ResourceHandle.h:
2747
2748 2008-03-24  Dan Bernstein  <mitz@apple.com>
2749
2750         Reviewed by Sam Weinig.
2751
2752         - fix <rdar://problem/5792582> CSS opacity does not work with GDI text
2753         - fix <rdar://problem/5792619> non-opaque CSS colors do not work with GDI text (RGBA, HSLA)
2754         - fix <rdar://problem/5792624> GDI text can't be stroked/filled independently
2755         - make text-shadow work with GDI text
2756         - make -webkit-background-clip: text work with GDI text
2757
2758         * platform/graphics/GraphicsContext.cpp:
2759         (WebCore::GraphicsContext::setShadow): Made this a shared method that
2760         updates the state and calls the platform-specific method.
2761         (WebCore::GraphicsContext::clearShadow): Ditto.
2762         (WebCore::GraphicsContext::getShadow): Added.
2763
2764         * platform/graphics/GraphicsContext.h:
2765         (WebCore::GraphicsContext::WindowsBitmap): Added this class that
2766         represents a bitmap with a Windows device context that GDI can draw into.
2767
2768         * platform/graphics/GraphicsContextPrivate.h:
2769         (WebCore::GraphicsContextState::GraphicsContextState): Added the shadow
2770         parameters to the graphics state.
2771
2772         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2773         (WebCore::GraphicsContext::setPlatformShadow): Renamed the platform-
2774         specific implementation to this.
2775         (WebCore::GraphicsContext::clearPlatformShadow): Renamed the platform-
2776         specific implementation to this.
2777
2778         * platform/graphics/cg/GraphicsContextCG.cpp:
2779         (WebCore::GraphicsContext::setPlatformShadow): Renamed the platform-
2780         specific implementation to this.
2781         (WebCore::GraphicsContext::clearPlatformShadow): Renamed the platform-
2782         specific implementation to this.
2783
2784         * platform/graphics/qt/GraphicsContextQt.cpp:
2785         (WebCore::GraphicsContext::setPlatformShadow): Renamed the platform-
2786         specific implementation to this.
2787         (WebCore::GraphicsContext::clearPlatformShadow): Renamed the platform-
2788         specific implementation to this.
2789
2790         * platform/graphics/win/FontCGWin.cpp:
2791         (WebCore::toCGFloat): Added. Converts a Windows FIXED.
2792         (WebCore::createPathForGlyph): Added. Retrieves a glyph's hinted
2793         outline from GDI and creates a CGPath containing it.
2794         (WebCore::Font::drawGlyphs): Added two code paths in the GDI case.
2795         The existing code path, which uses GDI to draw text directly to the
2796         graphics context, is used for opaque-colored, non-transformed,
2797         non-stroked, non-shadowed text in a GDI-backed graphics context that is
2798         not in a transparency layer.
2799         An additional code path is used for non-stroked text in all other cases.
2800         It uses GDI to draw black text into an all-white Windows bitmap, then
2801         uses the green channel as a mask to create a bitmap with the desired
2802         fill color and alpha. The bitmap is then drawn into the graphics
2803         context, at which time transparency layers, transforms and shadows are
2804         handled properly.
2805         A third code path is used for stroked text. It constructs a path from
2806         hinted glyph outlines retrieved from GDI and strokes (and optionally
2807         fills) it.
2808
2809         * platform/graphics/win/GraphicsContextCGWin.cpp:
2810         (WebCore::GraphicsContext::getWindowsContext): Added a mayCreateBitmap
2811         parameter. When false, prevents this method from creating a Windows
2812         device context if the graphics context does not already have one.
2813         (WebCore::GraphicsContext::releaseWindowsContext): Added a
2814         mayCreateBitmap parameter to match getWindowsContext().
2815         (WebCore::GraphicsContext::WindowsBitmap::WindowsBitmap):
2816         (WebCore::GraphicsContext::WindowsBitmap::~WindowsBitmap):
2817         (WebCore::GraphicsContext::createWindowsBitmap): Added.
2818         (WebCore::GraphicsContext::drawWindowsBitmap): Added. Draws the bitmap
2819         as a non-alpha-premultiplied image.
2820
2821 2008-03-24  Kevin McCullough <kmccullough@apple.com>
2822
2823           - Fixed Changelog
2824
2825 2008-03-24  Marco Barisione  <marco.barisione@collabora.co.uk>
2826
2827         Reviewed by Alp Toker.
2828
2829         http://bugs.webkit.org/show_bug.cgi?id=17845
2830         [GTK] combo box menu displayed in the wrong position
2831
2832         * platform/gtk/PopupMenuGtk.cpp:
2833         (WebCore::PopupMenu::show): Change the popup menu vertical position so
2834         that the active item is over the combo box.
2835         (WebCore::PopupMenu::menuPositionFunction): use the "push in" style
2836         like native GTK+ combo boxes to handle menus that don't fit in the
2837         screen.
2838
2839 2008-03-24  Adam Roben  <aroben@apple.com>
2840
2841         * WebCore.vcproj/WebCore.vcproj: Add files from WebCore/page/inspector
2842         to the project.
2843
2844 2008-03-24  Alexey Proskuryakov  <ap@webkit.org>
2845
2846         Build fix.
2847
2848         * WebCore.xcodeproj/project.pbxproj: Added DOMSVGAltGlyphElement.h and
2849         DOMSVGAltGlyphElementInternal.h to Copy Generated Headers phase.
2850
2851 2008-03-24  Eric Seidel  <eric@webkit.org>
2852
2853         Build fix, no review.
2854
2855         Fix project paths to be group relative instead of project relative
2856
2857         * WebCore.xcodeproj/project.pbxproj:
2858
2859 2008-03-23  Maciej Stachowiak  <mjs@apple.com>
2860
2861         Reviewed by Eric.
2862
2863         - fixed "SVGTextElement.getNumberOfChars is broken for altGlyph (affects Acid3 test 79)"
2864         http://bugs.webkit.org/show_bug.cgi?id=17062
2865
2866         * svg/SVGAltGlyphElement.cpp: Added. Implementation for new element.
2867         (WebCore::SVGAltGlyphElement::SVGAltGlyphElement):
2868         (WebCore::SVGAltGlyphElement::~SVGAltGlyphElement):
2869         (WebCore::SVGAltGlyphElement::setGlyphRef):
2870         (WebCore::SVGAltGlyphElement::glyphRef):
2871         (WebCore::SVGAltGlyphElement::setFormat):
2872         (WebCore::SVGAltGlyphElement::format):
2873         (WebCore::SVGAltGlyphElement::childShouldCreateRenderer):
2874         (WebCore::SVGAltGlyphElement::createRenderer): For now, this just renders as a tspan,
2875         which is right for everything besides the alternate glyph substitution itself.
2876         * svg/SVGAltGlyphElement.h: Added. Header for new element.
2877         (WebCore::SVGAltGlyphElement::contextElement):
2878         * svg/SVGAltGlyphElement.idl: Added. Interface for new element.
2879         * svg/SVGTSpanElement.cpp:
2880         (WebCore::SVGTSpanElement::childShouldCreateRenderer): Allow altGlyph to render here.
2881         * svg/SVGTextElement.cpp:
2882         (WebCore::SVGTextElement::childShouldCreateRenderer): ditto
2883         * svg/SVGTextPathElement.cpp:
2884         (WebCore::SVGTextPathElement::childShouldCreateRenderer): ditto
2885         * svg/svgtags.in: Add altGlyph
2886         * DerivedSources.make: Add new files
2887         * GNUmakefile.am: ditto
2888         * WebCore.SVG.exp: Add new ObjC DOM class
2889         * WebCore.pro: Add new files
2890         * WebCore.vcproj/WebCore.vcproj: ditto
2891         * WebCore.xcodeproj/project.pbxproj: ditto
2892         * bindings/js/JSSVGElementWrapperFactory.cpp: Handle altGlyph
2893         * bindings/objc/DOM.mm:
2894         (WebCore::createElementClassMap): ditto
2895         * bindings/objc/DOMInternal.h: Include altGlyph header
2896         * bindings/objc/DOMSVG.h: Include altGlyph header
2897
2898 2008-03-23  Robert Blaut  <webkit@blaut.biz>
2899
2900         Reviewed by eseidel.  Landed by eseidel.
2901
2902         Bug 17685: [~=] attribute selector failing to match empty string
2903         <http://bugs.webkit.org/show_bug.cgi?id=17685>
2904
2905         Test: fast/css/attribute-selector-empty-value.html
2906
2907         * css/CSSStyleSelector.cpp:
2908         (WebCore::CSSStyleSelector::checkOneSelector):
2909
2910 2008-03-22  Marco Barisione  <marco.barisione@collabora.co.uk>
2911
2912         Reviewed by Darin Adler.
2913
2914         http://bugs.webkit.org/show_bug.cgi?id=16339
2915         Frame scrollbar positions are not updated on page scroll
2916
2917         Widget::geometryChanged() was called instead of
2918         ScrollViewScrollbar::geometryChanged() because of a missing const.
2919
2920         * platform/gtk/ScrollViewGtk.cpp:
2921         (WebCore::ScrollViewScrollbar::geometryChanged): add the missing
2922         const.
2923
2924 2008-03-22  Rodney Dawes  <dobey@wayofthemonkey.com>
2925
2926         Reviewed by Mark Rowe.
2927
2928         Bug 17974: REGRESSION: npfunctions.h should not import npruntime_internal.h
2929         <http://bugs.webkit.org/show_bug.cgi?id=17974>
2930         <rdar://problem/5782310>
2931
2932         Include npapi.h and npruntime.h directly in npfunctions.h.
2933         Add npfunctions.h and npapi.h to npruntime_internal.h.
2934         Replace includes of npfunctions.h with npruntime_internal.h.
2935
2936         * bridge/npruntime_internal.h:
2937         * plugins/PluginPackage.h:
2938         * plugins/PluginStream.h:
2939         * plugins/npapi.cpp:
2940         * plugins/npfunctions.h:
2941
2942 2008-03-22  Mark Rowe  <mrowe@apple.com>
2943
2944         Qt build fix.
2945
2946         * bridge/qt/qt_runtime.cpp:
2947         (KJS::Bindings::valueRealType):
2948
2949 2008-03-22  Eric Seidel  <eric@webkit.org>
2950
2951         Reviewed by mjs.
2952
2953         Unify handling of NAMESPACE_ERR and fix Acid3 test 25
2954         http://bugs.webkit.org/show_bug.cgi?id=16693
2955
2956         Test: fast/dom/DOMImplementation/createDocumentType-err.html
2957
2958         * dom/DOMImplementation.cpp:
2959         (WebCore::DOMImplementation::createDocumentType):
2960         (WebCore::DOMImplementation::createDocument):
2961         * dom/DOMImplementation.idl:
2962         * dom/Document.cpp:
2963         (WebCore::Document::hasPrefixNamespaceMismatch):
2964         (WebCore::Document::createElementNS):
2965         (WebCore::Document::parseQualifiedName):
2966         (WebCore::Document::createAttributeNS):
2967         * dom/Document.h:
2968         * dom/Element.cpp:
2969         (WebCore::Element::setAttributeNS):
2970         * editing/FormatBlockCommand.cpp:
2971         (WebCore::FormatBlockCommand::doApply):
2972
2973 2008-03-22  Eric Seidel  <eric@webkit.org>
2974
2975         Reviewed by mjs.
2976
2977         Fix createElementNS to throw exceptions for invalid qualified names
2978         Fixes Acid3 sub-test 23
2979         http://bugs.webkit.org/show_bug.cgi?id=16833
2980
2981         Tests: fast/dom/Document/createAttributeNS-namespace-err.html
2982                fast/dom/Document/createElementNS-namespace-err.html
2983
2984         * dom/Document.cpp:
2985         (WebCore::Document::createElement):
2986         (WebCore::hasNamespaceError):
2987         (WebCore::Document::createElementNS):
2988         (WebCore::Document::createAttributeNS):
2989         * dom/Document.idl:
2990
2991 2008-03-21  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
2992
2993         Reviewed by Oliver Hunt.
2994
2995         Bug 13693: REGRESSION (r13615): Acid2 Test Eyes render improperly after a page refresh
2996         <http://bugs.webkit.org/show_bug.cgi?id=13693>
2997
2998         Do not create bogus history items for unloaded <object> elements, because they
2999         cause fallback content to be ignored on reload.
3000
3001         * loader/FrameLoader.cpp:
3002         (WebCore::FrameLoader::createHistoryItemTree):
3003
3004 2008-03-21  Dan Bernstein  <mitz@apple.com>
3005
3006         Reviewed by Oliver Hunt.
3007
3008         - fix http://bugs.webkit.org/show_bug.cgi?id=17988
3009           REGRESSION (r31114-31132): Crash in InlineBox::isDirty() opening chowhound.com
3010
3011         Test: fast/css-generated-content/empty-content-with-float-crash.html
3012
3013         * rendering/bidi.cpp:
3014         (WebCore::RenderBlock::layoutInlineChildren): Added a null check for
3015         the case where the block contains no in-flow elements but still lays
3016         out as a line flow, which can happen as a result of empty generated
3017         content.
3018
3019 2008-03-21  Sam Weinig  <sam@webkit.org>
3020
3021         Reviewed by Oliver Hunt.
3022
3023         Fix <rdar://problem/5788451>
3024         toDataURL not implemented for Windows (need mapping of MIME type to UTI)
3025
3026         Hard code support for just PNG's on windows, the minimum the spec requires.
3027
3028         * platform/MIMETypeRegistry.cpp:
3029         (WebCore::initializeSupportedImageMIMETypesForEncoding):
3030         * platform/graphics/cg/ImageBufferCG.cpp:
3031         (WebCore::utiFromMIMEType):
3032         (WebCore::ImageBuffer::toDataURL):
3033
3034 2008-03-21  Matt Lilek  <webkit@mattlilek.com>
3035
3036         Not reviewed, Mac build fix.
3037
3038         * bindings/objc/WebScriptObject.mm:
3039         (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
3040         * bridge/jni/jni_utility.cpp:
3041         (KJS::Bindings::convertValueToJValue):
3042         * bridge/objc/objc_runtime.mm:
3043         (ObjcFallbackObjectImp::callAsFunction):
3044
3045 2008-03-21  Adam Roben  <aroben@apple.com>
3046
3047         Attempt to fix the Mac build
3048
3049         * bindings/objc/DOMUtility.mm:
3050         (KJS::createDOMWrapper):
3051
3052 2008-03-21  Adam Roben  <aroben@apple.com>
3053
3054         Rename static info members to s_info
3055
3056         This avoids conflicts with custom "info" methods, such as the one that
3057         will soon be added to Console.
3058
3059         Reviewed by Ada Chan and Sam Weinig.
3060
3061 2008-03-21  David Hyatt  <hyatt@apple.com>
3062
3063         <rdar://problem/5808863> Zooming should not let non-zero border width become zero
3064
3065         Make sure zoomed values that begin >= 1 are not allowed to fall below 1.
3066
3067         Reviewed by adele
3068
3069         * css/CSSPrimitiveValue.cpp:
3070         (WebCore::CSSPrimitiveValue::computeLengthDouble):
3071         * loader/CachedImage.cpp:
3072         (WebCore::CachedImage::imageSize):
3073         (WebCore::CachedImage::imageRect):
3074
3075 2008-03-21  Kevin McCullough  <kmccullough@apple.com>
3076
3077         Reviewed by Sam.
3078
3079         -<rdar://problem/5712804> XMLHttpRequests do not show response contents, preview images (14313)
3080         -<rdar://problem/5712931> XMLHttpRequests should be shown separately and grouped (14315)
3081         -<rdar://problem/5732836> XMLHttpRequest: Inspector should show network activity/XHR in Console (17233)
3082         - Instrument the InspectorController to cache XHR resrouces since they are not cached by WebCore.
3083         The resources will be kept in the same map as all other resources so they will have the exact
3084         same lifecycle. 
3085
3086         * ChangeLog:
3087         * page/InspectorController.cpp:
3088         (WebCore::InspectorCachedXMLHttpRequestResource::type):
3089         (WebCore::InspectorCachedXMLHttpRequestResource::setType):
3090         (WebCore::InspectorCachedXMLHttpRequestResource::data):
3091         (WebCore::InspectorCachedXMLHttpRequestResource::setData):
3092         (WebCore::InspectorCachedXMLHttpRequestResource::encoding):
3093         (WebCore::InspectorCachedXMLHttpRequestResource::setEncoding):
3094         (WebCore::InspectorCachedXMLHttpRequestResource::create):
3095         (WebCore::InspectorCachedXMLHttpRequestResource::InspectorCachedXMLHttpRequestResource):
3096
3097 2008-03-21  Rodney Dawes  <dobey@wayofthemonkey.com>
3098
3099         Reviewed by Holger.
3100
3101         http://bugs.webkit.org/show_bug.cgi?id=17981
3102
3103         Remove WebCore/ForwardingHeaders from cppflags as it is not needed,
3104         and causes build problems with GTK+.
3105
3106         * GNUmakefile.am:
3107
3108 2008-03-21  Dan Bernstein  <mitz@apple.com>
3109
3110         Reviewed by Adele Peterson.
3111
3112         - fix http://bugs.webkit.org/show_bug.cgi?id=17966
3113           REGRESSION (r31114-r31132): Clearing via br behaves unpredictably
3114
3115         Test: fast/block/float/br-with-clear.html
3116
3117         * rendering/bidi.cpp:
3118         (WebCore::RenderBlock::layoutInlineChildren): Fixed the logic for the
3119         very special case of an all-lines-clean block that ends with a float-
3120         clearing <br> by looking for the <br> at the end of the line rather
3121         than at its beginning.
3122
3123 2008-03-21  Adam Roben  <aroben@apple.com>
3124
3125         Don't allow any newly-scheduled plugin requests to be serviced when JS is paused
3126
3127         This is a followup to r31199.
3128
3129         Reviewed by Tim Hatcher.
3130
3131         * plugins/PluginView.cpp:
3132         (WebCore::PluginView::requestTimerFired): Added an assertion that JS
3133         is not paused.
3134         (WebCore::PluginView::scheduleRequest): Don't start the request timer
3135         if JS is paused. This is the bug fix.
3136         (WebCore::PluginView::setJavaScriptPaused): Replaced the use of
3137         m_requestTimerWasActive with a check to see if we have any pending
3138         requests. m_requestTimerWasActive would not be accurate if a new
3139         request had been scheduled while JS was paused.
3140         (WebCore::PluginView::PluginView): Removed initialization of
3141         m_requestTimerWasActive.
3142         * plugins/PluginView.h: Removed m_requestTimerWasActive.
3143
3144 2008-03-20  Dan Bernstein  <mitz@apple.com>
3145
3146         Reviewed by Anders Carlsson.
3147
3148         - fix an assertion failure due to a line being marked dirty during
3149           computeVerticalPositionsForLine() due to temporary box destruction
3150
3151         Test: fast/inline/clean-after-removing-temp-boxes.html
3152
3153         * rendering/RenderText.cpp:
3154         (WebCore::RenderText::setTextWithOffset): Added code to dirty lines
3155         when this method is called on an empty text node, which has no line
3156         boxes.
3157         * rendering/bidi.cpp:
3158         (WebCore::RenderBlock::computeVerticalPositionsForLine): Mark the line
3159         clean in the end.
3160
3161 2008-03-20  Anders Carlsson  <andersca@apple.com>
3162
3163         Reviewed by Maciej.
3164
3165         Make some member variables private.
3166         
3167         * loader/ResourceLoader.cpp:
3168         (WebCore::ResourceLoader::ResourceLoader):
3169         * loader/ResourceLoader.h:
3170
3171 2008-03-20  Anders Carlsson  <andersca@apple.com>
3172
3173         Reviewed by Maciej.
3174
3175         Get rid of m_originalURL in ResourceLoader.
3176
3177         * loader/ResourceLoader.cpp:
3178         (WebCore::ResourceLoader::load):
3179         Don't store m_originalURL.
3180         
3181         * loader/ResourceLoader.h:
3182         * loader/SubresourceLoader.cpp:
3183         (WebCore::SubresourceLoader::willSendRequest):
3184         Use the url of the current request instead of the original URL.
3185
3186 2008-03-20  Anders Carlsson  <andersca@apple.com>
3187
3188         Reviewed by Maciej.
3189
3190         Small loader cleanups.
3191         
3192         * loader/MainResourceLoader.cpp:
3193         (WebCore::MainResourceLoader::willSendRequest):
3194         No need to call setRequest here, ResourceLoader::willSendRequest takes care of that. 
3195         Also, there is no need to check that newRequest is null here, because we assert earlier that it is not.
3196         
3197         * loader/ResourceLoader.h:
3198         Get rid of setRequest, it is no longer needed.
3199
3200 2008-03-20  Anders Carlsson  <andersca@apple.com>
3201
3202         Get rid of a couple of unnecessary class declarations.
3203         
3204         * loader/SubresourceLoader.h:
3205
3206 2008-03-20  David Hyatt  <hyatt@apple.com>
3207
3208         Add a new value to background-clip, "text", that allows backgrounds to be clipped to foreground text (and
3209         associated text decorations like shadows and underlines).
3210
3211         Reviewed by Beth
3212
3213         * css/CSSParser.cpp:
3214         (WebCore::CSSParser::parseBackgroundProperty):
3215         * css/CSSPrimitiveValueMappings.h:
3216         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3217         (WebCore::CSSPrimitiveValue::operator EBackgroundBox):
3218         * platform/graphics/GraphicsContext.cpp:
3219         (WebCore::GraphicsContext::clipToImageBuffer):
3220         * platform/graphics/GraphicsContext.h:
3221         * platform/graphics/cg/GraphicsContextCG.cpp:
3222         (WebCore::GraphicsContext::clipToImageBuffer):
3223         * rendering/InlineBox.cpp:
3224         (WebCore::InlineBox::paint):
3225         * rendering/InlineFlowBox.cpp:
3226         (WebCore::InlineFlowBox::paintBackgrounds):
3227         (WebCore::InlineFlowBox::paintBackground):
3228         (WebCore::InlineFlowBox::paintBoxDecorations):
3229         * rendering/InlineFlowBox.h:
3230         * rendering/InlineTextBox.cpp:
3231         (WebCore::InlineTextBox::paint):
3232         * rendering/RenderBlock.cpp:
3233         (WebCore::RenderBlock::paintColumns):
3234         (WebCore::RenderBlock::paintObject):
3235         (WebCore::RenderBlock::paintFloats):
3236         * rendering/RenderBlock.h:
3237         * rendering/RenderBox.cpp:
3238         (WebCore::RenderBox::paintRootBoxDecorations):
3239         (WebCore::RenderBox::paintBoxDecorations):
3240         (WebCore::RenderBox::paintBackgrounds):
3241         (WebCore::RenderBox::paintBackground):
3242         (WebCore::RenderBox::paintBackgroundExtended):
3243         * rendering/RenderBox.h:
3244         * rendering/RenderFieldset.cpp:
3245         (WebCore::RenderFieldset::paintBoxDecorations):
3246         * rendering/RenderFlow.cpp:
3247         (WebCore::RenderFlow::paintLines):
3248         * rendering/RenderObject.h:
3249         (WebCore::):
3250         (WebCore::RenderObject::paintBackgroundExtended):
3251         * rendering/RenderStyle.h:
3252         (WebCore::):
3253         * rendering/RenderTable.cpp:
3254         (WebCore::RenderTable::paintBoxDecorations):
3255         * rendering/RenderTableCell.cpp:
3256         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
3257
3258 2008-03-20  Adam Roben  <aroben@apple.com>
3259
3260         Allow pausing/blocking of JS execution by plugins
3261
3262         Part of Bug 17133: Should support pausing JavaScript execution without
3263         hanging the process
3264
3265         <http://bugs.webkit.org/show_bug.cgi?id=17133>
3266         <rdar://problem/5719551>
3267
3268         This patch doesn't affect Mac, which doesn't use the shared PluginView
3269         code.
3270
3271         Note that this patch doesn't prevent plugins from executing JS via an
3272         NPObject they've already gotten hold of. It just blocks obtaining new
3273         NPObjects and pauses any requests to evaluate javascript: URIs. This
3274         is probably good enough for now because most plugins seem to always
3275         obtain the Window object each time they want to execute JS.
3276
3277         Reviewed by Tim Hatcher.
3278
3279         * plugins/PluginView.cpp:
3280         (WebCore::PluginView::getValue): Return an error if JS is paused.
3281         (WebCore::PluginView::setJavaScriptPaused): Stop the request timer if
3282         we're pausing, and resume it if we're unpausing.
3283         (WebCore::PluginView::PluginView): Initialize new members.
3284         * plugins/PluginView.h:
3285
3286 2008-03-20  Adam Roben  <aroben@apple.com>
3287
3288         Allow pausing of callOnMainThread callbacks
3289
3290         Part of Bug 17133: Should support pausing JavaScript execution without
3291         hanging the process
3292
3293         <http://bugs.webkit.org/show_bug.cgi?id=17133>
3294         <rdar://problem/5719551>
3295
3296         Reviewed by Tim Hatcher.
3297
3298         * platform/MainThread.cpp:
3299         (WebCore::dispatchFunctionsFromMainThread): If callbacks are paused,
3300         don't dispatch the functions.
3301         (WebCore::setMainThreadCallbacksPaused): Added. If we're being
3302         unpaused, call scheduleDispatchFunctionsOnMainThread so that any
3303         queued callbacks will get dispatched in the near future.
3304         * platform/MainThread.h:
3305
3306 2008-03-20  Adam Roben  <aroben@apple.com>
3307
3308         Allow blocking of JS event handlers/javascript: URIs per-Frame
3309
3310         Part of Bug 17133: Should support pausing JavaScript execution without
3311         hanging the process
3312
3313         <http://bugs.webkit.org/show_bug.cgi?id=17133>
3314         <rdar://problem/5719551>
3315
3316         Two new methods are added to KJSProxy: setPaused and isPaused. When
3317         setPaused(true) is called, JS event handlers are blocked and
3318         javascript: URIs will not be evaluated.
3319
3320         Reviewed by Tim Hatcher.
3321
3322         * bindings/js/kjs_events.cpp:
3323         (WebCore::JSAbstractEventListener::handleEvent):
3324           - Removed some old KJS_DEBUGGER code
3325           - Don't run the handler if the KJSProxy is paused.
3326         * bindings/js/kjs_proxy.cpp:
3327         (WebCore::KJSProxy::KJSProxy): Initialize new member.
3328         * bindings/js/kjs_proxy.h: Added new methods.
3329         * loader/FrameLoader.cpp:
3330         (WebCore::FrameLoader::executeScript): Don't execute the script if the
3331         KJSProxy is paused.
3332
3333 2008-03-20  Jon Honeycutt  <jhoneycutt@apple.com>
3334
3335         Reviewed by Anders.
3336
3337         Fix Windows warning / leak: warning C4150: deletion of pointer to
3338         incomplete type 'WebCore::PluginRequest'; no destructor called
3339
3340         * plugins/PluginView.cpp: Move PluginRequest class to PluginView.h so
3341         Windows PluginView destructor can use WTF::deleteAllValues to clean up
3342         m_requests.
3343         * plugins/PluginView.h:
3344         (WebCore::PluginRequest::PluginRequest):
3345         (WebCore::PluginRequest::frameLoadRequest):
3346         (WebCore::PluginRequest::notifyData):
3347         (WebCore::PluginRequest::sendNotification):
3348         (WebCore::PluginRequest::shouldAllowPopups):
3349
3350 2008-03-20  Mark Rowe  <mrowe@apple.com>
3351
3352         Reviewed by Sam Weinig.
3353
3354         Ensure that the defines in FEATURE_DEFINES are sorted so that they will match the default settings of build-webkit.
3355         This will prevent the world from being rebuilt if you happen to switch between building in Xcode and with build-webkit on the
3356         command-line.
3357
3358         * Configurations/WebCore.xcconfig:
3359
3360 2008-03-20  Jon Honeycutt  <jhoneycutt@apple.com>
3361
3362         Reviewed by Anders.
3363
3364         <rdar://problem/5809600> REGRESSION:
3365         http/tests/plugins/cross-frame-object-access.html hangs Windows Layout
3366         Tests
3367
3368         r30897 changed the way we conditionalize this feature.
3369
3370         * plugins/PluginView.cpp:
3371         (WebCore::PluginView::getValue): Test ENABLE(NETSCAPE_PLUGIN_API)
3372         instead of USE(NPOBJECT).
3373         (WebCore::PluginView::bindingInstance): Same.
3374
3375 2008-03-20  Adam Roben  <aroben@apple.com>
3376
3377         Highlight nodes when you hover over them in the Console
3378
3379         Part of Bug 16532: Inspector should highlight nodes in page when
3380         hovering over nodes in Inspector's interface
3381
3382         <http://bugs.webkit.org/show_bug.cgi?id=16532>
3383         <rdar://problem/5712896>
3384
3385         Reviewed by Tim Hatcher.
3386
3387         * page/inspector/ConsolePanel.js:
3388         (WebInspector.ConsolePanel._formatnode): Add mouseover/mouseout event
3389         listeners to highlight the node and clear the highlight.
3390
3391 2008-03-20  Adam Roben  <aroben@apple.com>
3392
3393         Highlight nodes in the page when you hover over their DOM breadcrumbs
3394
3395         Part of Bug 16532: Inspector should highlight nodes in page when
3396         hovering over nodes in Inspector's interface
3397
3398         <http://bugs.webkit.org/show_bug.cgi?id=16532>
3399         <rdar://problem/5712896>
3400
3401         Reviewed by Tim Hatcher.
3402
3403         * page/inspector/DocumentPanel.js:
3404         (WebInspector.DocumentPanel): Add an mouseout event listener to the
3405         breadcrumbs element to clear the highlighted node.
3406         (WebInspector.DocumentPanel.updateBreadcrumbs): Change the mouseover
3407         event listener to highlight the node represented by the hovered
3408         breadcrumb.
3409
3410 2008-03-20  Adam Roben  <aroben@apple.com>
3411
3412         Highlight nodes in the page when you hover over them in the DOM tree
3413
3414         Part of Bug 16532: Inspector should highlight nodes in page when
3415         hovering over nodes in Inspector's interface
3416
3417         <http://bugs.webkit.org/show_bug.cgi?id=16532>
3418         <rdar://problem/5712896>
3419
3420         The inspected node is no longer highlighted (unless, of course, you
3421         hover over it).
3422
3423         Reviewed by Tim Hatcher.
3424
3425         * page/inspector/DocumentPanel.js:
3426         (WebInspector.DocumentPanel):
3427           - Don't highlight the focused node when the DOM tree is shown
3428           - Added mousemove/mouseout event listeners to set/clear the
3429             highlighted node. These are added to the root of the DOM tree
3430             instead of to each individual list item to avoid flashing as the
3431             mouse moves between nodes.
3432         (WebInspector.DocumentPanel.set focusedDOMNode): Don't highlight the
3433         focused node.
3434         (WebInspector.DocumentPanel._onmousemove): Highlight the node under
3435         the mouse.
3436
3437 2008-03-20  Adam Roben  <aroben@apple.com>
3438
3439         Show nodes' content/padding/border/margin boxes in the node highlight
3440
3441         Part of Bug 17221: Node highlight should show node metrics
3442
3443         <http://bugs.webkit.org/show_bug.cgi?id=17221>
3444         <rdar://problem/5732822>
3445
3446         Outstanding issues:
3447           1) We don't show padding/border/margins for inlines
3448           2) We don't show any numeric metrics, we just draw the boxes
3449           3) We'll probably want to tweak the look of the highlight some, at
3450              least to make the boxes better distinguishable
3451
3452         Reviewed by Tim Hatcher.
3453
3454         * page/InspectorController.cpp:
3455         (WebCore::drawOutlinedRect): Added. Just draws a single rect.
3456         (WebCore::drawHighlightForBoxes): Added. Takes the rects we calculated
3457         for the node and draws the highlight.
3458         (WebCore::InspectorController::drawNodeHighlight): Calculates the
3459         content/padding/border/margin boxes for blocks and passes them off to
3460         drawHighlightForBoxes. The behavior for inlines is for now unchanged.
3461
3462 2008-03-20  Adam Roben  <aroben@apple.com>
3463
3464         Fix RenderContainer's override of addLineBoxRects to match RenderObject's
3465
3466         RenderContainer::addLineBoxRects was never getting called because its
3467         parameters didn't match those of RenderObject::addLineBoxRects.
3468
3469         Reviewed by Mitz Pettel.
3470
3471         No test possible.
3472
3473         * rendering/RenderContainer.cpp: Added an optional bool
3474         useSelectionHeight parameter to match RenderObject's method.
3475         * rendering/RenderContainer.h: Ditto.
3476
3477 2008-03-20  Marco Barisione  <marco.barisione@collabora.co.uk>
3478
3479         Reviewed by Alp Toker.
3480
3481         http://bugs.webkit.org/show_bug.cgi?id=17946
3482         [GTK] Widgets are not clipped
3483
3484         * platform/gtk/RenderThemeGtk.cpp:
3485         (WebCore::paintMozWidget): pass the clipping rectangle to
3486         moz_gtk_widget_paint() instead of just the widget rectangle.
3487
3488 2008-03-20  David Hyatt  <hyatt@apple.com>
3489
3490         Fix for http://bugs.webkit.org/show_bug.cgi?id=9279
3491
3492         Make :hover work with the adjacent sibling selector.  This fix makes all forms of dynamic changes
3493         (class name changes, :hover, :focus, etc.) work properly when used with the + selector.
3494
3495         Reviewed by weinig
3496
3497         Added fast/css/dynamic-sibling-selector.html
3498
3499         * dom/Element.cpp:
3500         (WebCore::Element::recalcStyle):
3501
3502 2008-03-20  Aaron Golden  <aegolden@gmail.com>
3503
3504         Reviewed by Darin and David Kilzer.
3505
3506         Addresses <http://bugs.webkit.org/show_bug.cgi?id=15263>, which caused certain marquees to not display.
3507
3508         Test: fast/html/marquee-scroll.html
3509
3510         * html/HTMLMarqueeElement.cpp:
3511         (WebCore::HTMLMarqueeElement::parseMappedAttribute):
3512
3513 2008-03-20  Adam Roben  <aroben@apple.com>
3514
3515         Export InspectorController::drawNodeHighlight
3516
3517         Reviewed by Tim Hatcher.
3518
3519         * WebCore.base.exp: Also sorted this file.
3520
3521 2008-03-19  Stephanie Lewis  <slewis@apple.com>
3522
3523         Rubber-stamped by Anders.
3524
3525         Fix Windows Build
3526
3527         * platform/cf/SharedBufferCF.cpp:
3528         (WebCore::SharedBuffer::createCFData):
3529
3530 2008-03-19  Stephanie Lewis <slewis@apple.com>
3531
3532         Rubber-stamped by Anders.
3533
3534         Fix Windows Build
3535
3536         * platform/SharedBuffer.h:
3537
3538 2008-03-19  Justin Garcia  <justin.garcia@apple.com>
3539
3540         Reviewed by Oliver.
3541         
3542         <rdar://problem/5780697> Copying content with CSS property values that are percentages can cause fidelity issues
3543          
3544         Elements with height: x%; overflow: visible; overlap what's below them when they are copied from
3545         a document in quirksmode and pasted into to one in standards mode.  This fix uses the computed 
3546         the value for a property if its value is a percentage.
3547         
3548         * css/CSSMutableStyleDeclaration.cpp:
3549         (WebCore::CSSMutableStyleDeclaration::addParsedProperty): Added so that we don't have to use
3550         setProperty from appendStartMarkup.  We already have a parsed property value, so we shouldn't
3551         use setProperty, since it takes in a String.  If we did, we would have to call CSSValue::cssText()
3552         for a String only to re-parse it in setProperty.  This wasn't extremely important now, but it will 
3553         be as we compute more properties to fix the rest of the copy/paste fidelity bugs.
3554         * css/CSSMutableStyleDeclaration.h:
3555         * editing/markup.cpp:
3556         (WebCore::appendStartMarkup): Compute values for properties that have percentage values.  We could
3557         perhaps narrow this special case to only include properties that are effected by quirksmode.
3558
3559 2008-03-19  Sam Weinig  <sam@webkit.org>
3560
3561         Reviewed by Anders Carlsson.
3562
3563         Fix for <rdar://problem/5785694>
3564         Crash occurs at KJS::Collector::collect() when loading web clip widgets with a PAC file
3565
3566         Make the activeExecStates stack per JSGlobalObject instead of static to ensure
3567         thread safety.
3568
3569         * bindings/objc/WebScriptObject.mm:
3570         (+[WebScriptObject throwException:]): Change to throw an exception on the current
3571         GlobalObject instead of the top of the static activeExecStates stack.
3572         (-[WebScriptObject setException:]): Change to use the top of the rootObjects GlobalObject
3573         instead of the top of the static activeExecStates stack.
3574
3575         * bridge/c/c_instance.cpp:
3576         * bridge/c/c_instance.h:
3577         * bridge/jni/jni_instance.cpp:
3578         (JavaInstance::virtualBegin):
3579         (JavaInstance::virtualEnd):
3580         * bridge/jni/jni_instance.h:
3581         * bridge/objc/objc_instance.h:
3582         * bridge/objc/objc_instance.mm:
3583         (ObjcInstance::~ObjcInstance):
3584         (ObjcInstance::virtualBegin):
3585         (ObjcInstance::virtualEnd):
3586         * bridge/runtime.cpp:
3587         (KJS::Bindings::Instance::setDidExecuteFunction):
3588         (KJS::Bindings::Instance::didExecuteFunction):
3589         (KJS::Bindings::Instance::setCurrentGlobalObject): Added.
3590         (KJS::Bindings::Instance::currentGlobalObject): Added.
3591         (KJS::Bindings::Instance::begin):
3592