2008-06-05 Alp Toker <alp@nuanti.com>
[WebKit-https.git] / WebCore / ChangeLog
1 2008-06-05  Alp Toker  <alp@nuanti.com>
2
3         Build fix for r34387.
4
5         * GNUmakefile.am:
6
7 2008-06-05  Justin Garcia  <justin.garcia@apple.com>
8
9         Reviewed by Eric.
10
11         <https://bugs.webkit.org/show_bug.cgi?id=19089> Editing ASSERT in Range::compareBoundaryPoints
12         
13         ApplyStyleCommand::applyInlineStyle does some work and then checks to see
14         if the start offset of the Range it's operating on is now past the caretMaxOffset
15         of the start container.  If it is, applyInlineStyle updates the position to 
16         [startContainer->traverseNextNode(), 0] and then operates on that new start
17         position.
18         
19         caretMaxOffset was incorrect for horizontal rules.  It should be 1 and it was 0.  So,
20         if the horizontal rule was the last node in the document, applyInlineStyle would update
21         its start position to [0, 0] and then try to operate on that position, assuming it was
22         non-null, leading to the ASSERT.
23         
24         * rendering/RenderObject.cpp:
25         (WebCore::RenderObject::caretMaxOffset):
26
27 2008-06-05  Chris Fleizach  <cfleizach@apple.com>
28
29         Reviewed by John Sullivan.
30
31         <rdar://problem/5947396> AccessibilityListBoxOptions should return their string as AXValue, not AXTitle
32
33         * page/AccessibilityListBoxOption.cpp:
34         (WebCore::AccessibilityListBoxOption::stringValue):
35         * page/AccessibilityListBoxOption.h:
36
37 2008-06-05  Justin Garcia  <justin.garcia@apple.com>
38
39         Reviewed by Harrison.
40
41         <rdar://problem/5658933> GoogleDocs: Crash indenting a particular selection twice
42         <rdar://problem/5831310> CrashTracer: [USER] 4 crashes in Mail at WebCore::IndentOutdentCommand::prepareBlockquoteLevelForInsertion
43         <rdar://problem/5480141> GoogleDocs: Attempting to indent content in <td> closes <table> element
44         
45         A crash would occur when indenting a selection that started just before a table
46         and ended inside that table.  With a selection like this, we'd indent the entire
47         table, then try and indent paragraphs inside it, but the stored position for the
48         next paragraph to indent was inside content that had been removed from the document 
49         during the first Indent.
50         
51         Fixed the crash adjusting the selection to perform the indent on to prepare it
52         for paragraph iteration using selectionForParagraphIteration.  We do this adjustment
53         for paragraph iteration in InsertList as well.
54         
55         Also, indenting paragraphs inside table cells would break table structure because 
56         we were splitting the DOM all the way up to the root editable element to insert
57         a blockquote.  Fixed this by only splitting up to the enclosing table cell.  This 
58         matches FF.  Lastly, fixed a bug where indenting several paragraphs inside different 
59         table cells would move all the selected text into the same table cell. FF still has 
60         this bug.
61
62         * editing/IndentOutdentCommand.cpp:
63         (WebCore::IndentOutdentCommand::indentRegion):
64
65 2008-06-05  chris fleizach  <cfleizach@apple.com>
66
67         Reviewed by Alice Liu.
68
69          <rdar://problem/5979998> AXList controls should have AXSelectedChildren and its children's AXSelected attribute writable
70
71         * page/AccessibilityListBox.cpp:
72         (WebCore::AccessibilityListBox::canSetSelectedChildrenAttribute):
73         (WebCore::AccessibilityListBox::setSelectedChildren):
74         (WebCore::AccessibilityListBox::selectedChildren):
75         (WebCore::AccessibilityListBox::visibleChildren):
76         * page/AccessibilityListBox.h:
77         * page/AccessibilityListBoxOption.cpp:
78         (WebCore::AccessibilityListBoxOption::canSetSelectedAttribute):
79         (WebCore::AccessibilityListBoxOption::setSelected):
80         * page/AccessibilityListBoxOption.h:
81         (WebCore::AccessibilityListBoxOption::selectedChildren):
82         (WebCore::AccessibilityListBoxOption::visibleChildren):
83         * page/AccessibilityObject.cpp:
84         (WebCore::AccessibilityObject::setSelected):
85         (WebCore::AccessibilityObject::getDocumentLinks):
86         * page/AccessibilityObject.h:
87         (WebCore::AccessibilityObject::canSetSelectedAttribute):
88         (WebCore::AccessibilityObject::canSetSelectedChildrenAttribute):
89         (WebCore::AccessibilityObject::children):
90         * page/AccessibilityRenderObject.cpp:
91         (WebCore::AccessibilityRenderObject::getDocumentLinks):
92         (WebCore::AccessibilityRenderObject::children):
93         (WebCore::AccessibilityRenderObject::addChildren):
94         (WebCore::AccessibilityRenderObject::ariaListboxSelectedChildren):
95         (WebCore::AccessibilityRenderObject::selectedChildren):
96         (WebCore::AccessibilityRenderObject::ariaListboxVisibleChildren):
97         (WebCore::AccessibilityRenderObject::visibleChildren):
98         * page/AccessibilityRenderObject.h:
99         * page/mac/AccessibilityObjectWrapper.mm:
100         (convertToVector):
101         (convertToNSArray):
102         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
103         (-[AccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
104         (-[AccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
105
106 2008-06-04  David Hyatt  <hyatt@apple.com>
107
108         Fix for <rdar://problem/5957994> Height doesn't animate
109
110         Improve the behavior when transitions are dynamically changed.  Make sure to leave older transitions
111         running and let them obsolete themselves when they finish.
112
113         Reviewed by Dan Bernstein
114
115         Added WebCore/manual-tests/transitions2.html (must be tested manually)
116
117         * manual-tests/transitions.html:
118         * manual-tests/transitions2.html: Added.
119         * page/AnimationController.cpp:
120         (WebCore::ImplicitAnimation::property):
121         (WebCore::ImplicitAnimation::setFinished):
122         (WebCore::ImplicitAnimation::markedForDeath):
123         (WebCore::ImplicitAnimation::setMarkedForDeath):
124         (WebCore::ImplicitAnimation::ImplicitAnimation):
125         (WebCore::ImplicitAnimation::reset):
126         (WebCore::ImplicitAnimation::animate):
127         (WebCore::CompositeImplicitAnimation::animate):
128
129 2008-06-05  Eric Seidel  <eric@webkit.org>
130
131         Reviewed by mjs.
132
133         Get rid of Uninitialized Memory Reads (UMRs) in the XPath::Value copy constructor.
134
135         No functional changes, thus no tests.
136
137         * xml/XPathValue.h:
138         (WebCore::XPath::Value::Value): initialize all values in each constructor
139
140 2008-06-05  Eric Seidel  <eric@webkit.org>
141
142         Reviewed by hyatt.
143
144         No functional changes, thus no tests.
145
146         * platform/graphics/Color.h: remove unnecessary bitfield use
147
148 2008-06-05  Antti Koivisto  <antti@apple.com>
149
150         Reviewed by Dave Hyatt.
151         
152         Make hasFeature() return true for the animation stuff.
153
154         * dom/DOMImplementation.cpp:
155         (WebCore::isSVG11Feature):
156
157 2008-06-05  Dan Bernstein  <mitz@apple.com>
158
159         Reviewed by Darin Adler.
160
161         - fix https://bugs.webkit.org/show_bug.cgi?id=19397
162           REGRESSION (3.1-TOT): Box-shadow renders weird when rotating a div with border radius
163
164         Test: fast/transforms/shadows.html
165
166         * platform/graphics/cg/GraphicsContextCG.cpp:
167         (WebCore::GraphicsContext::setPlatformShadow): In Core Graphics, shadow
168         dimensions are always in device space. Account for that, and apply the
169         current context transform to shadow offset, and multiply the blur radius
170         by the inverse of the operator norm of the inverse transform (which is
171         the radius of the circle inscribed in the transformed unit circle). 
172         * rendering/RenderObject.cpp:
173         (WebCore::RenderObject::paintBoxShadow): Added 1px separation between
174         the edge of the filled shape and the edge of the clipped-out shape,
175         because in a transformed context, due to antialiasing, the fill can
176         bleed into the clip if they touch.
177
178 2008-06-05  Tor Arne Vestbø  <tavestbo@trolltech.com>
179
180         Reviewed by Simon.
181
182         Prevent cycles when converting from DOM objects to
183         QVariant, due to cycles in the DOM tree.
184
185         * bridge/qt/qt_runtime.cpp:
186         (KJS::Bindings::convertValueToQVariant):
187
188 2008-06-04  Anders Carlsson  <andersca@apple.com>
189
190         Reviewed by Mitz.
191
192         Get rid of DeprecatedPtrList from StyleSheetList.
193         
194         * css/CSSStyleSelector.cpp:
195         (WebCore::CSSStyleSelector::CSSStyleSelector):
196         * css/StyleSheetList.cpp:
197         (WebCore::StyleSheetList::~StyleSheetList):
198         (WebCore::StyleSheetList::length):
199         (WebCore::StyleSheetList::item):
200         * css/StyleSheetList.h:
201         (WebCore::StyleSheetList::swap):
202         * dom/Document.cpp:
203         (WebCore::Document::recalcStyleSelector):
204
205 2008-06-04  Anders Carlsson  <andersca@apple.com>
206
207         Reviewed by Darin.
208
209         Convert more classes over to start out with a ref count of 1.
210         
211         * css/CSSImageGeneratorValue.cpp:
212         (WebCore::CSSImageGeneratorValue::generatedImage):
213         * css/CSSImageValue.cpp:
214         (WebCore::CSSImageValue::cachedImage):
215         * css/CSSMediaRule.cpp:
216         (WebCore::CSSMediaRule::CSSMediaRule):
217         * css/CSSParser.cpp:
218         (WebCore::CSSParser::parseValue):
219         (WebCore::CSSParser::parseFillSize):
220         (WebCore::CSSParser::parseCounter):
221         (WebCore::CSSParser::createRuleList):
222         * css/CSSRuleList.cpp:
223         (WebCore::CSSRuleList::CSSRuleList):
224         * css/CSSRuleList.h:
225         (WebCore::CSSRuleList::create):
226         * css/CSSStyleSelector.cpp:
227         (WebCore::CSSStyleSelector::matchRules):
228         (WebCore::CSSStyleSelector::styleRulesForElement):
229         * css/CSSStyleSelector.h:
230         * css/CSSStyleSheet.cpp:
231         (WebCore::CSSStyleSheet::cssRules):
232         (WebCore::CSSStyleSheet::addSubresourceURLStrings):
233         * css/CSSStyleSheet.h:
234         (WebCore::CSSStyleSheet::rules):
235         * css/Pair.h:
236         (WebCore::Pair::create):
237         (WebCore::Pair::Pair):
238         * html/HTMLMediaElement.cpp:
239         (WebCore::HTMLMediaElement::buffered):
240         (WebCore::HTMLMediaElement::played):
241         (WebCore::HTMLMediaElement::seekable):
242         * html/TimeRanges.cpp:
243         (TimeRanges::TimeRanges):
244         * html/TimeRanges.h:
245         (WebCore::TimeRanges::create):
246         (WebCore::TimeRanges::TimeRanges):
247         * rendering/style/RenderStyle.cpp:
248         (WebCore::RenderStyle::addCursor):
249         (WebCore::RenderStyle::clearCursorList):
250         * rendering/style/RenderStyle.h:
251         (WebCore::StyleImage::~StyleImage):
252         (WebCore::StyleImage::StyleImage):
253         (WebCore::StyleCachedImage::create):
254         (WebCore::StyleCachedImage::StyleCachedImage):
255         (WebCore::StyleGeneratedImage::create):
256         (WebCore::StyleGeneratedImage::StyleGeneratedImage):
257         (WebCore::CursorList::create):
258         (WebCore::CursorList::CursorList):
259
260 2008-06-04  chris fleizach  <cfleizach@apple.com>
261
262         Reviewed by Dave Hyatt, Alice, Liu
263
264         <rdar://problem/5983804> Editable web areas do not properly report the AXFocused attribute
265
266         * page/AccessibilityRenderObject.cpp:
267         (WebCore::AccessibilityRenderObject::isFocused):
268
269 2008-06-03  Beth Dakin  <bdakin@apple.com>
270
271         Reviewed by Adele.
272
273         Fix for https://bugs.webkit.org/show_bug.cgi?id=19381 WebKit 
274         Crashing Constantly on Gmail with accessibility turned on
275
276         There was a missing null-check!
277
278         * page/AccessibilityRenderObject.cpp:
279         (WebCore::AccessibilityRenderObject::roleValue):
280
281 2008-06-04  Anders Carlsson  <andersca@apple.com>
282
283         Reviewed by Sam.
284
285         Convert more classes to start with a ref count of 1.
286         
287         * bindings/js/JSCustomVoidCallback.cpp:
288         (WebCore::toVoidCallback):
289         * bindings/js/JSCustomVoidCallback.h:
290         (WebCore::JSCustomVoidCallback::create):
291         * css/StyleSheetList.cpp:
292         (WebCore::StyleSheetList::StyleSheetList):
293         * css/StyleSheetList.h:
294         (WebCore::StyleSheetList::create):
295         * dom/Document.cpp:
296         (WebCore::Document::Document):
297         (WebCore::Document::createNodeIterator):
298         (WebCore::Document::createTreeWalker):
299         * dom/NodeIterator.h:
300         (WebCore::NodeIterator::create):
301         * dom/Traversal.cpp:
302         (WebCore::Traversal::Traversal):
303         * dom/Traversal.h:
304         * dom/TreeWalker.h:
305         (WebCore::TreeWalker::create):
306         * history/CachedPage.cpp:
307         (WebCore::CachedPage::create):
308         (WebCore::CachedPage::CachedPage):
309         * html/CanvasGradient.cpp:
310         (WebCore::CanvasGradient::CanvasGradient):
311         * html/CanvasGradient.h:
312         (WebCore::CanvasGradient::create):
313         * html/CanvasRenderingContext2D.cpp:
314         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
315         (WebCore::CanvasRenderingContext2D::createLinearGradient):
316         (WebCore::CanvasRenderingContext2D::createRadialGradient):
317         * html/CanvasRenderingContext2D.h:
318         (WebCore::CanvasRenderingContext2D::create):
319         * html/HTMLCanvasElement.cpp:
320         (WebCore::HTMLCanvasElement::getContext):
321         * html/VoidCallback.h:
322         (WebCore::VoidCallback::VoidCallback):
323         * loader/FormState.cpp:
324         (WebCore::FormState::create):
325         (WebCore::FormState::FormState):
326         * platform/text/RegularExpression.cpp:
327         (WebCore::RegularExpression::Private::create):
328         (WebCore::RegularExpression::Private::Private):
329         (WebCore::RegularExpression::RegularExpression):
330         * storage/SQLResultSet.cpp:
331         (WebCore::SQLResultSet::SQLResultSet):
332         * storage/SQLResultSetRowList.h:
333         (WebCore::SQLResultSetRowList::create):
334         (WebCore::SQLResultSetRowList::SQLResultSetRowList):
335
336 2008-06-04  Dan Bernstein  <mitz@apple.com>
337
338         Reviewed by Dave Hyatt.
339
340         - fix <rdar://problem/5962118> Crash in RenderBlock::calcColumnWidth()
341
342         Test: fast/multicol/gap-non-negative.html
343
344         * css/CSSParser.cpp:
345         (WebCore::CSSParser::parseValue): Changed to not allow negative
346         values for column-gap, per
347         <http://www.w3.org/TR/2001/WD-css3-multicol-20010118/#column-gap>.
348
349 2008-06-04  Dan Bernstein  <mitz@apple.com>
350
351         Reviewed by Dave Hyatt.
352
353         - fix <rdar://problem/5962270> Crash in WebCore::RenderTableCell::computeAbsoluteRepaintRect()
354
355         Test: fast/reflections/table-cell.html
356
357         * rendering/RenderTableCell.cpp:
358         (WebCore::RenderTableCell::computeAbsoluteRepaintRect): Null-check
359         parent().
360         (WebCore::RenderTableCell::absolutePosition): Ditto.
361
362 2008-06-04  Alexey Proskuryakov  <ap@webkit.org>
363
364         Reviewed by Darin.
365
366         Fix JSClassCreate to work with old JSCore API threading model.
367
368         * ForwardingHeaders/wtf/StrHash.h: Removed (moved into ustring.h).
369
370 2008-06-03  Antti Koivisto  <antti@apple.com>
371
372         Reviewed by Darin.
373         
374         https://bugs.webkit.org/show_bug.cgi?id=19384
375         Implement path morphing for SVG animation
376         
377         You can animate smoothly between paths that have equal number of control points of matching type.
378
379         Test: svg/custom/animate-path-morphing.svg
380
381         * svg/SVGAnimateElement.cpp:
382         (WebCore::SVGAnimateElement::determinePropertyType):
383         (WebCore::SVGAnimateElement::calculateAnimatedValue):
384         (WebCore::SVGAnimateElement::calculateFromAndToValues):
385         (WebCore::SVGAnimateElement::resetToBaseValue):
386         (WebCore::SVGAnimateElement::applyResultsToTarget):
387         * svg/SVGAnimateElement.h:
388         (WebCore::SVGAnimateElement::):
389         * svg/SVGPathSegList.cpp:
390         (WebCore::blendFunc):
391         (WebCore::SVGPathSegList::createAnimated):
392         * svg/SVGPathSegList.h:
393
394 2008-06-03  Darin Adler  <darin@apple.com>
395
396         - try to fix the Qt build
397
398         * bridge/qt/qt_runtime.cpp:
399         (KJS::Bindings::QtRuntimeMetaMethod::lengthGetter): Remove the originalObject argument.
400         (KJS::Bindings::QtRuntimeMetaMethod::connectGetter): Ditto.
401         (KJS::Bindings::QtRuntimeMetaMethod::disconnectGetter): Ditto.
402         (KJS::Bindings::QtRuntimeConnectionMethod::lengthGetter): Ditto.
403         (KJS::Bindings::QtConnectionObject::execute): Use callAsFunction.
404         * bridge/qt/qt_runtime.h: More of the same.
405
406 2008-06-03  Justin Garcia  <justin.garcia@apple.com>
407
408         Reviewed by John.
409
410         <rdar://problem/5763082> GMail: Hang when removing indent from nested list
411         <rdar://problem/5775449> In Gmail and GoogleDocs, a hang occurs when I attempt to apply a list style to a large selection of text
412         <rdar://problem/5937624> 9D32: Hang in Safari. Using 100% of processor
413
414         * editing/InsertListCommand.cpp:
415         (WebCore::InsertListCommand::modifyRange): doApply() may operate on and remove 
416         the last paragraph of the selection from the document if it's in the same list 
417         item as startOfCurrentParagraph.  Return early to avoid an infinite loop and 
418         because there is no more work to be done.  Added a FIXME (<rdar://problem/5983974>)
419         about the incorrect endingSelection()s.
420
421 2008-06-03  Oliver Hunt  <oliver@apple.com>
422
423         Reviewed by Tim.
424
425         Bug 12983: Web Inspector break on the debugger keyword
426         <https://bugs.webkit.org/show_bug.cgi?id=12983>
427
428         Added support for the new debugger didReachBreakpoint 
429         callback so that WebInspector receives the debugger event
430         and breaks.
431
432         * page/JavaScriptDebugServer.cpp:
433         (WebCore::JavaScriptDebugServer::didReachBreakpoint):
434         * page/JavaScriptDebugServer.h:
435
436 2008-06-03  Darin Adler  <darin@apple.com>
437
438         Reviewed by Geoff.
439
440         - https://bugs.webkit.org/show_bug.cgi?id=19269
441           speed up SunSpider by eliminating the toObject call for most get/put/delete
442
443         Eliminate the originalObject argument from property getter functions; it's no longer
444         available and was used only for JavaScript function-based getters and setters.
445
446         Updated callers of PropertySlot::setUndefined. It no longer takes a base argument.
447
448         * bindings/js/JSQuarantinedObjectWrapper.cpp:
449         (WebCore::JSQuarantinedObjectWrapper::cachedValueGetter): Removed the originalObject
450         argument.
451         (WebCore::JSQuarantinedObjectWrapper::getOwnPropertySlot): Changed to initialize the
452         PropertySlot with the original object -- this is a new requirement.
453
454         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
455         (WebCore::JSCSSStyleDeclaration::nameGetter):
456         * bindings/js/JSCanvasPixelArrayCustom.cpp:
457         (WebCore::JSCanvasPixelArray::indexGetter):
458         * bindings/js/JSDOMWindowBase.cpp:
459         (WebCore::JSDOMWindowBase::childFrameGetter):
460         (WebCore::JSDOMWindowBase::indexGetter):
461         (WebCore::JSDOMWindowBase::namedItemGetter):
462         (WebCore::JSDOMWindowBase::getOwnPropertySlot):
463         * bindings/js/JSDOMWindowBase.h:
464         * bindings/js/JSDOMWindowCustom.h:
465         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
466         * bindings/js/JSHTMLAppletElementCustom.cpp:
467         (WebCore::JSHTMLAppletElement::nameGetter):
468         * bindings/js/JSHTMLCollectionCustom.cpp:
469         (WebCore::JSHTMLCollection::nameGetter):
470         * bindings/js/JSHTMLDocumentCustom.cpp:
471         (WebCore::JSHTMLDocument::nameGetter):
472         * bindings/js/JSHTMLEmbedElementCustom.cpp:
473         (WebCore::JSHTMLEmbedElement::nameGetter):
474         * bindings/js/JSHTMLFormElementCustom.cpp:
475         (WebCore::JSHTMLFormElement::nameGetter):
476         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
477         (WebCore::JSHTMLFrameSetElement::nameGetter):
478         * bindings/js/JSHTMLObjectElementCustom.cpp:
479         (WebCore::JSHTMLObjectElement::nameGetter):
480         * bindings/js/JSHistoryCustom.cpp:
481         (WebCore::JSHistory::customGetOwnPropertySlot):
482         * bindings/js/JSLocationCustom.cpp:
483         (WebCore::JSLocation::customGetOwnPropertySlot):
484         * bindings/js/JSMimeTypeArrayCustom.cpp:
485         (WebCore::JSMimeTypeArray::nameGetter):
486         * bindings/js/JSNamedNodeMapCustom.cpp:
487         (WebCore::JSNamedNodeMap::nameGetter):
488         * bindings/js/JSNamedNodesCollection.cpp:
489         (WebCore::JSNamedNodesCollection::lengthGetter):
490         (WebCore::JSNamedNodesCollection::indexGetter):
491         * bindings/js/JSNamedNodesCollection.h:
492         * bindings/js/JSNodeListCustom.cpp:
493         (WebCore::JSNodeList::nameGetter):
494         * bindings/js/JSPluginArrayCustom.cpp:
495         (WebCore::JSPluginArray::nameGetter):
496         * bindings/js/JSPluginCustom.cpp:
497         (WebCore::JSPlugin::nameGetter):
498         * bindings/js/JSQuarantinedObjectWrapper.h:
499         * bindings/js/JSStorageCustom.cpp:
500         (WebCore::JSStorage::nameGetter):
501         * bindings/js/JSStyleSheetListCustom.cpp:
502         (WebCore::JSStyleSheetList::nameGetter):
503         * bindings/js/kjs_binding.cpp:
504         (WebCore::nonCachingStaticFunctionGetter):
505         (WebCore::objectToStringFunctionGetter):
506         * bindings/js/kjs_binding.h:
507         * bindings/js/kjs_html.cpp:
508         (WebCore::runtimeObjectGetter):
509         (WebCore::runtimeObjectPropertyGetter):
510         * bindings/js/kjs_html.h:
511         * bindings/scripts/CodeGeneratorJS.pm:
512         * bridge/objc/objc_runtime.mm:
513         (ObjcFallbackObjectImp::getOwnPropertySlot):
514         * bridge/runtime_array.cpp:
515         (RuntimeArray::lengthGetter):
516         (RuntimeArray::indexGetter):
517         * bridge/runtime_array.h:
518         * bridge/runtime_method.cpp:
519         (RuntimeMethod::lengthGetter):
520         * bridge/runtime_method.h:
521         * bridge/runtime_object.cpp:
522         (RuntimeObjectImp::fallbackObjectGetter):
523         (RuntimeObjectImp::fieldGetter):
524         (RuntimeObjectImp::methodGetter):
525         * bridge/runtime_object.h:
526         Removed originalObject arguments from getter fnctions and base arguments from
527         calls to setUndefined.
528
529 2008-06-03  Darin Adler  <darin@apple.com>
530
531         Fix build with GCC.
532
533         * page/AccessibilityRenderObject.cpp:
534         (WebCore::AccessibilityRenderObject::ariaRoleHasPresentationalChildren):
535         Put a default case back in the switch statement so we don't get warned about
536         all the unhandled cases with GCC. Remove the unreachable code that was causing
537         a warning in Visual Studio.
538
539 2008-06-03  Steve Falkenburg  <sfalken@apple.com>
540
541         Fix build
542
543         * page/AccessibilityRenderObject.cpp:
544         (WebCore::AccessibilityRenderObject::ariaRoleHasPresentationalChildren):
545
546 2008-06-03  Justin Garcia  <justin.garcia@apple.com>
547
548         Reviewed by John Sullivan.
549
550         <rdar://problem/5943515> SelectionController()->modify Backward/Forward with LineGranularity sometimes don't work
551         
552         next/previousLinePosition didn't work if the input position was the last line in its
553         block.  The code for handling such a position assumed that the input position was
554         editable, and that the position to be returned needed to also be editable.  Changed
555         this code to just maintain the same editability.
556         
557         No test case for now because we haven't enabled selection extension operations for
558         non-editable selections.  I enabled them temporarily to test the fix, however.
559
560         * dom/Node.cpp: Removed the now unused nextEditable(int).
561         * dom/Node.h:
562         * editing/visible_units.cpp:
563         (WebCore::previousLeafWithSameEditability): Added.  Like previousEditable but just returns
564         a node of the same editability.
565         (WebCore::previousLinePosition): Call previousLeaf instead of previousEditable.
566         (WebCore::nextLeafWithSameEditability): Added.
567         (WebCore::nextLinePosition): Same as above.
568
569 2008-06-02  Anders Carlsson  <andersca@apple.com>
570
571         Reviewed by John and Sam.
572
573         <rdar://problem/5955218> 
574         Assertion failure in ApplicationCacheGroup::addEntry when reloading a page with a cache manifest (19182)
575         
576         * loader/appcache/ApplicationCacheGroup.h:
577         (WebCore::ApplicationCacheGroup::hasNewestCache):
578         Add new accessor.
579         
580         * loader/appcache/ApplicationCacheStorage.cpp:
581         (WebCore::ApplicationCacheStorage::cacheGroupDestroyed):
582         Don't call newestCache since it will always be null. Instead, call hasNewestCache which returns the saved newest cache pointer.
583         
584 2008-06-03  Dan Bernstein  <mitz@apple.com>
585
586         Reviewed by Dave Hyatt.
587
588         - fix <rdar://problem/5965410>
589           In fixed table layout, the width of cells with auto width should be
590           proportional to their column span, to match Firefox and IE.
591
592         Test: fast/table/fixed-with-auto-with-colspan.html
593
594         * rendering/FixedTableLayout.cpp:
595         (WebCore::FixedTableLayout::layout):
596
597 2008-06-03  Alp Toker  <alp@nuanti.com>
598
599         Rubber-stamped by Alexey.
600
601         Remove GenerateNativeConverter added in r34331 to fix JS regressions.
602         (JSTextCustom.cpp added in r34141 is now unused in any code path.)
603
604         * dom/Text.idl:
605
606 2008-06-03  Alexander Vassilev <avasilev@voipgate.com>
607
608         Reviewed, tweaked and landed by Alexey.
609
610         https://bugs.webkit.org/show_bug.cgi?id=19363
611         Compiler error in Entity.h
612
613         * dom/Entity.h:
614         (WebCore::Entity::Entity): Add a private constructor to shut down the errors.
615
616 2008-06-02  Geoffrey Garen  <ggaren@apple.com>
617
618         Reviewed by Alexey Proskuryakov.
619         
620         Removed JSObject::call, since it just called JSObject::callAsFunction.
621         
622         SunSpider reports no change.
623
624 2008-06-02  Alp Toker  <alp@nuanti.com>
625
626         Reviewed by Maciej.
627
628         Two of the toJSNewlyCreated() optimisations in r34141 were never
629         reached due to a generator bug and missing IDL attribute.
630
631         Fix header generation to provide the necessary toJSNewlyCreated()
632         overloads.
633
634         Patch includes a related build fix by Jan Michael Alonzo.
635
636         * GNUmakefile.am:
637         * bindings/scripts/CodeGeneratorJS.pm:
638         * dom/Text.idl:
639
640 2008-06-02  Alice Liu  <alice.liu@apple.com>
641
642         Reviewed by Beth Dakin.
643
644         Some ARIA roles are designated to have presentational children, which
645         means that their descendants aren't exposed to assistive technologies
646         on an individual basis.  What this means in webcore is that descendants
647         of such roles need to be ignored in terms of accessibility.
648
649         * page/AccessibilityObject.cpp:
650         (WebCore::AccessibilityObject::isPresentationalChildOfAriaRole):
651         (WebCore::AccessibilityObject::ariaRoleHasPresentationalChildren):
652         * page/AccessibilityObject.h:
653         * page/AccessibilityRenderObject.cpp:
654         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
655         (WebCore::RoleEntry::):
656         (WebCore::AccessibilityRenderObject::isPresentationalChildOfAriaRole):
657         (WebCore::AccessibilityRenderObject::ariaRoleHasPresentationalChildren):
658         * page/AccessibilityRenderObject.h:
659
660 2008-06-02  David Hyatt  <hyatt@apple.com>
661
662         Fix for https://bugs.webkit.org/show_bug.cgi?id=19303
663
664         When the right slice value is omitted in border-image it should use the value of the left slice and not
665         the top slice.
666
667         Reviewed by darin
668
669         Added fast/borders/border-image-omit-right-slice.html
670
671         * css/CSSParser.cpp:
672         (WebCore::BorderImageParseContext::commitBorderImage)
673
674 2008-06-02  Anders Carlsson  <andersca@apple.com>
675
676         Reviewed by David Hyatt and Mitz.
677
678         <rdar://problem/5704119> 
679         repro crash in WebCore::RenderPart::setWidget (plugin-related?)
680         
681         Test: platform/mac/plugins/update-widget-from-style-recalc.html
682
683         Make sure to update the document's rendering before calling updateWidget.
684         
685         * html/HTMLEmbedElement.cpp:
686         (WebCore::HTMLEmbedElement::updateWidget):
687         * html/HTMLObjectElement.cpp:
688         (WebCore::HTMLObjectElement::updateWidget):
689
690 2008-06-02  Kevin McCullough  <kmccullough@apple.com>
691
692         Reviewed by Adam.
693
694         <rdar://problem/5954226> JSProfiler: Move the calls from
695         JavaScriptProfileNode to JavaScriptProfile in WebCore (19231)
696         - This Makes the profiler now call sorting function s on a per-profile
697         basis instead of on a node in the profile.
698         - This is also needed to remove the recursion limit in the profiler
699         <rdar://problem/5969992> JSProfiler: Remove the recursion limit in the
700         profiler
701         since once the limit is removed calling sort on a node will only sort
702         that node's children not the entire sub-tree of that node.
703
704         * page/JavaScriptProfile.cpp: All of these functions were moved from 
705         JavaScriptProfileNode.
706         (WebCore::sortTotalTimeDescending):
707         (WebCore::sortTotalTimeAscending):
708         (WebCore::sortSelfTimeDescending):
709         (WebCore::sortSelfTimeAscending):
710         (WebCore::sortCallsDescending):
711         (WebCore::sortCallsAscending):
712         (WebCore::sortFunctionNameDescending):
713         (WebCore::sortFunctionNameAscending):
714         (WebCore::ProfileClass):
715         * page/JavaScriptProfileNode.cpp:
716         (WebCore::ProfileNodeClass):
717         * page/inspector/ProfileView.js: Change uses of JavaScriptProfileNode
718         for sorting to JavaScriptProfile.
719
720 2008-06-02  Dan Bernstein  <mitz@apple.com>
721
722         Reviewed by Oliver Hunt.
723
724         - fix more cases of https://bugs.webkit.org/show_bug.cgi?id=19344
725           <rdar://problem/5977300> Regression: Shadow offsets seem to have changed in 10.5.3 in canvas
726
727         Tests: fast/canvas/shadow-offset-1.html
728                fast/canvas/shadow-offset-2.html
729                fast/canvas/shadow-offset-3.html
730                fast/canvas/shadow-offset-4.html
731                fast/canvas/shadow-offset-5.html
732                fast/canvas/shadow-offset-6.html
733                fast/canvas/shadow-offset-7.html
734
735         * html/CanvasRenderingContext2D.cpp:
736         (WebCore::adjustedShadowSize): Added this helper function.
737         (WebCore::CanvasRenderingContext2D::setShadow): Changed to call
738         adjustedShadowSize().
739         (WebCore::CanvasRenderingContext2D::applyShadow): Ditto.
740
741 2008-06-02  Julien Chaffraix  <jchaffraix@webkit.org>
742
743         Reviewed by Darin.
744
745         Bug 18066: REGRESSION: createAttribute throws NAMESPACE_ERR exception
746         https://bugs.webkit.org/show_bug.cgi?id=18066
747
748         Test: fast/dom/createAttribute-exception.html
749
750         * dom/Document.cpp:
751         (WebCore::Document::createAttributeNS):
752         * dom/Document.h: Add a bool parameter shouldIgnoreNamespaceChecks
753         to createNamespaceNS() used by createAttribute() to bypass namespace
754         checking.
755
756 2008-06-02  Darin Adler  <darin@apple.com>
757
758         Reviewed by John Sullivan.
759
760         - fix https://bugs.webkit.org/show_bug.cgi?id=18799
761           apl.aip.org menu does not work (property names should be case sensitive)
762           <rdar://problem/5900484>
763
764         Test: fast/dom/CSSStyleDeclaration/css-properties-case-sensitive.html
765
766         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
767         (WebCore::hasCSSPropertyNamePrefix): Tweak implementation a tiny bit for
768         improved performance when the first character does not match.
769         (WebCore::cssPropertyName): Reject property names with a leading uppercase
770         letter.
771
772 2008-06-02  Darin Adler  <darin@apple.com>
773
774         Reviewed by Mitz.
775
776         - fix https://bugs.webkit.org/show_bug.cgi?id=19358
777           <rdar://problem/5951986> first line break in <pre> elements ignored
778           (chess boards at http://rankzero.de/)
779
780         Test: fast/parser/pre-first-line-break.html
781
782         * editing/markup.cpp:
783         (WebCore::appendStartMarkup): Fix handling of <listing>. Not part of the
784         bug mentioned above, but uncovered by the regression test.
785
786         * html/HTMLTokenizer.cpp:
787         (WebCore::HTMLTokenizer::write): Clear the "discardLF" flag when
788         processing a new tag.
789
790 2008-06-02  Timothy Hatcher  <timothy@apple.com>
791
792         Fixes a bug where only the last breakpoint would be hit after reloading
793         the page. Also fixes a bug where disabled breakpoints would be hit
794         after reloading the page.
795
796         Reviewed by Darin Adler.
797
798         * page/inspector/BreakpointsSidebarPane.js:
799         (WebInspector.BreakpointsSidebarPane.prototype.addBreakpoint): Don't call
800         InspectorController.addBreakpoint() unless the breakpoint is enabled.
801         * page/inspector/ScriptsPanel.js:
802         (WebInspector.ScriptsPanel.prototype.addScript): Move the addBreakpoint()
803         call inside the for loop so each breakpoint is added. Also check the
804         breakpoint's enabled state before calling addBreakpoint().
805
806 2008-06-02  Timothy Hatcher  <timothy@apple.com>
807
808         Fixes a bug where the line highlight and the execution line were conflicting.
809         The line highlight no longer shows up when the execution line changes, only
810         when showResource or showScript is called with a line number.
811
812         Reviewed by Darin Adler.
813
814         * page/inspector/ScriptsPanel.js:
815         (WebInspector.ScriptsPanel.prototype.showScript): Pass true for shouldHighlightLine.
816         (WebInspector.ScriptsPanel.prototype.showResource): Ditto.
817         (WebInspector.ScriptsPanel.prototype._showScriptOrResource): Added a shouldHighlightLine
818         argument that triggers the highlightLine() call on the SourceFrame.
819         (WebInspector.ScriptsPanel.prototype._goBack): Pass false for shouldHighlightLine since
820         we need to pass true for fromBackForwardAction.
821         (WebInspector.ScriptsPanel.prototype._goForward): Ditto.
822
823 2008-06-02  Timothy Hatcher  <timothy@apple.com>
824
825         Bring the Web Inspector forward when the debugger pauses.
826
827         https://bugs.webkit.org/show_bug.cgi?id=19095
828
829         Reviewed by Darin Adler.
830
831         * page/inspector/ScriptsPanel.js:
832         (WebInspector.ScriptsPanel.prototype.debuggerPaused): Call window.focus() and
833         make the Scripts panel the current panel.
834
835 2008-06-02  Jan Michael Alonzo  <jmalonzo@webkit.org>
836
837         Reviewed by Alp Toker.
838
839         Build WebCore GTK+ sources as part of WebCore, not WebKit.
840         Split common and GTK+-specific sources into separate file lists.
841
842         * GNUmakefile.am:
843
844 2008-05-30  Tor Arne Vestbø  <tavestbo@trolltech.com>
845
846         Reviewed by Simon.
847
848         Implement basic media element controls for the QtWebKit port.
849
850         * platform/qt/RenderThemeQt.cpp:
851         (WebCore::WorldMatrixTransformer::WorldMatrixTransformer):
852         (WebCore::WorldMatrixTransformer::~WorldMatrixTransformer):
853         (WebCore::RenderThemeQt::getMediaElementFromRenderObject):
854         (WebCore::RenderThemeQt::paintMediaBackground):
855         (WebCore::RenderThemeQt::getMediaControlForegroundColor):
856         (WebCore::RenderThemeQt::paintMediaFullscreenButton):
857         (WebCore::RenderThemeQt::paintMediaMuteButton):
858         (WebCore::RenderThemeQt::paintMediaPlayButton):
859         (WebCore::RenderThemeQt::paintMediaSeekBackButton):
860         (WebCore::RenderThemeQt::paintMediaSeekForwardButton):
861         (WebCore::RenderThemeQt::paintMediaSliderTrack):
862         (WebCore::RenderThemeQt::paintMediaSliderThumb):
863         (WebCore::RenderThemeQt::adjustSliderThumbSize):
864         * platform/qt/RenderThemeQt.h:
865         * platform/qt/html4-adjustments-qt.css:
866
867 2008-05-30  Tor Arne Vestbø  <tavestbo@trolltech.com>
868
869         Reviewed by Simon.
870
871         Change default styling of media elements to allow controls
872         to be placed at any position within the media element.
873
874         * css/html4.css:
875
876 2008-05-30  Tor Arne Vestbø  <tavestbo@trolltech.com>
877
878         Reviewed by Simon.
879
880         Use intrinsic size for media elements with no natural size.
881
882         * rendering/RenderVideo.cpp:
883         (WebCore::RenderVideo::videoSizeChanged):
884
885 2008-05-28  Tor Arne Vestbø  <tavestbo@trolltech.com>
886
887         Reviewed by Simon.
888
889         Allow platform specific adjustments to the default style sheet.
890
891         Clients will change the #ifdef in RenderTheme.cpp and implement
892         any platform specific adjustments in RenderThemeXXX.cpp, either
893         by loading a file as the Qt port does, or by modifying the style
894         directly.
895
896         * WebCore.pro: Add new resource file
897         * css/CSSStyleSelector.cpp:
898         (WebCore::loadDefaultStyle): adjust default stylesheet
899         * platform/qt/RenderThemeQt.cpp:
900         (WebCore::RenderTheme::adjustDefaultStyleSheet): Qt adjustments
901         * platform/qt/WebCoreResources.qrc: Added.
902         * platform/qt/html4-adjustments-qt.css: Added.
903         * rendering/RenderTheme.cpp: Default adjustments (none)
904         * rendering/RenderTheme.h:
905
906 2008-06-02  Siraj Razick  <siraj.razick@collabora.co.uk>
907
908         Reviewed by Simon
909
910         Allow button fonts to scale based on the text size multiplier.
911
912         https://bugs.webkit.org/show_bug.cgi?id=19251
913
914         * platform/qt/RenderThemeQt.cpp:
915         (WebCore::RenderThemeQt::adjustButtonStyle):
916
917 2008-06-01  Rob Buis  <buis@kde.org>
918
919         Reviewed by Darin.
920
921         https://bugs.webkit.org/show_bug.cgi?id=15823
922         getPropertyValue for border returns null, should compute the shorthand value
923
924         Compute the value for the border shorthand property by computing
925         its shorthand subproperties.
926
927         Test: fast/css/getPropertyValue-border.html
928
929         * css/CSSMutableStyleDeclaration.cpp:
930         (WebCore::CSSMutableStyleDeclaration::getPropertyValue):
931         (WebCore::CSSMutableStyleDeclaration::getCommonValue):
932         * css/CSSMutableStyleDeclaration.h:
933
934 2008-06-01  Dan Bernstein  <mitz@apple.com>
935
936         Reviewed by Darin Adler.
937
938         - fix https://bugs.webkit.org/show_bug.cgi?id=19344
939           <rdar://problem/5977300> Regression: Shadow offsets seem to have changed in 10.5.3 in canvas
940
941         Test: fast/canvas/shadow-offset.html
942
943         * html/CanvasRenderingContext2D.cpp:
944         (WebCore::CanvasRenderingContext2D::applyShadow): Slightly increase the
945         magnitude of the offsets passed to CGContextSetShadow* to ensure that
946         the end result after truncation is the desired integer offsets. This is
947         the same workaround for <rdar://problem/5539388> that is used in
948         GraphicsContext::setShadow(). Also correct a recent regression where
949         shadow Y offsets were flipped.
950
951 2008-05-31  Maciej Stachowiak  <mjs@apple.com>
952
953         Reviewed by Sam.
954
955         - avoid assertion in updateDocument() when running debug
956
957         * bindings/js/kjs_proxy.cpp:
958         (WebCore::KJSProxy::updateDocument): Exit early if the document is null. We
959         don't need to update in this case.
960
961 2008-05-30  Dan Bernstein  <mitz@apple.com>
962
963         Reviewed by Darin Adler.
964
965         - fix https://bugs.webkit.org/show_bug.cgi?id=19278
966           <rdar://problem/5968621> REGRESSION (r31114-r31132): image float disappears on refresh
967
968         Test: fast/dynamic/float-in-trailing-whitespace-after-last-line-break.html
969
970         * rendering/bidi.cpp:
971         (WebCore::RenderBlock::layoutInlineChildren): Ensured that floats
972         occurring in trailing whitespace after a line break are added to the
973         last line's floats vector.
974
975 2008-05-30  Timothy Hatcher  <timothy@apple.com>
976
977         Implements the back and forward buttons in the Scripts panel.
978
979         Reviewed by Adam Roben.
980
981         * page/inspector/ScriptsPanel.js:
982         (WebInspector.ScriptsPanel): Add the back and forward button elements
983         and remove the FIXMEs.
984         (WebInspector.ScriptsPanel.prototype.reset): Reset _backForwardList
985         and _currentBackForwardIndex. Then call _updateBackAndForwardButtons().
986         (WebInspector.ScriptsPanel.prototype._showScriptOrResource):
987         Added a fromBackForwardAction argument. If fromBackForwardAction is false
988         then update the _currentBackForwardIndex and _backForwardList.
989         (WebInspector.ScriptsPanel.prototype._updateBackAndForwardButtons):
990         Update the disabled state of the buttons.
991         (WebInspector.ScriptsPanel.prototype._goBack): Update the _currentBackForwardIndex
992         and call _showScriptOrResource() and _updateBackAndForwardButtons().
993         (WebInspector.ScriptsPanel.prototype._goForward): Ditto.
994
995 2008-05-30  Timothy Hatcher  <timothy@apple.com>
996
997         Made clicking a Console message URL originating from a JavaScript
998         source show the Resource in the Scripts panel. This only happens
999         when the debugger is attached.
1000
1001         Reviewed by Adam Roben.
1002
1003         * page/inspector/Console.js:
1004         (WebInspector.Console.prototype._formaterror):
1005         Add a preferredPanel of "scripts".
1006         (WebInspector.ConsoleMessage.prototype.toMessageElement):
1007         Add a preferredPanel of "scripts" when the source is JS.
1008         * page/inspector/ScriptView.js:
1009         (WebInspector.ScriptView.prototype.highlightLine): Added.
1010         Calls through to the sourceFrame. Matches SourceView.
1011         * page/inspector/ScriptsPanel.js:
1012         (WebInspector.ScriptsPanel.prototype.canShowResource): Added.
1013         Returns true if the debugger is attached and the resource has scripts.
1014         (WebInspector.ScriptsPanel.prototype._showScriptOrResource): Call
1015         highlightLine on the view.
1016         * page/inspector/inspector.js:
1017         (WebInspector.documentClick): Pass the preferredPanel to showResourceForURL.
1018         (WebInspector.showResourceForURL): Resolve the preferredPanel from the string
1019         passed in. Checks if the panel implements showResource and canShowResource.
1020         Reverts to the Resources panel if any of that is false or not implemented.
1021
1022 2008-05-30  Timothy Hatcher  <timothy@apple.com>
1023
1024         Fixed an "undefined type" exception that was being thrown when
1025         selecting a eval script from the file menu in the Scripts panel.
1026         This would also happen when stepping into an eval which would
1027         break other parts of the Inspector interface.
1028
1029         Reviewed by Adam Roben.
1030
1031         * page/inspector/ScriptsPanel.js:
1032         (WebInspector.ScriptsPanel.prototype._showScriptOrResource):
1033         Use the scriptOrResource variable instead of the undefined script variable.
1034
1035 2008-05-30  Timothy Hatcher  <timothy@apple.com>
1036
1037         Made the starting line number of scripts be 1-based throughout the engine.
1038         This cleans up script line numbers so they are all consistent now and fixes
1039         some cases where script execution was shown as off by one line in the debugger.
1040
1041         Doing this also exposed a bug where JSLazyEventListener created in XHML or SVG
1042         documents would always have a line number of 0. So this change fixed that bug
1043         to pass all the SVG and XHTML tests.
1044
1045         All layout tests pass.
1046
1047         Reviewed by Oliver Hunt.
1048
1049         * bindings/js/kjs_events.cpp:
1050         (WebCore::JSLazyEventListener::JSLazyEventListener): Set the line number to 1
1051         if it was passed in as 0. This can happen when listeners are created with
1052         a setAttribute call from JavaScript.
1053         (WebCore::JSLazyEventListener::parseCode): Add a FIXME about the URL being
1054         incorrect when listeners are created with a setAttribute call from JavaScript.
1055         * bindings/js/kjs_events.h: Remove the default value for lineNumber, since no
1056         callers need it.
1057         * bindings/objc/WebScriptObject.mm:
1058         (-[WebScriptObject evaluateWebScript:]): Pass a line number of 1 instead of 0
1059         to Interpreter::evaluate().
1060         * bridge/NP_jsobject.cpp:
1061         (_NPN_Evaluate): Ditto.
1062         * bridge/jni/jni_jsobject.mm:
1063         (JavaJSObject::eval): Ditto.
1064         * dom/XMLTokenizer.cpp:
1065         (WebCore::XMLTokenizer::startElementNs): Call KJSProxy::setEventHandlerLineno()
1066         around the call to handleElementAttributes, so any JSLazyEventListener created
1067         from those attributes have line numbers.
1068         (WebCore::XMLTokenizer::endElementNs): Remove a minus 1 of the line number.
1069         (WebCore::XMLTokenizer::notifyFinished): Pass a line number of 1 instead of 0.
1070         (WebCore::XMLTokenizer::parseEndElement): Remove a minus 1 of the line number.
1071         * html/HTMLScriptElement.cpp:
1072         (WebCore::HTMLScriptElement::evaluateScript): Add a FIXME about the starting
1073         line number being incorrect in some cases when this function is called.
1074         * html/HTMLTokenizer.cpp:
1075         (WebCore::HTMLTokenizer::parseSpecial): Add a plus 1 to the line number when
1076         setting scriptStartLineno so it is 1-based. Same for calling setEventHandlerLineno().
1077         (WebCore::HTMLTokenizer::processToken): Ditto.
1078         * html/HTMLTokenizer.h: Change the default line number on scriptExecution() to 1 from 0.
1079         * loader/FrameLoader.cpp:
1080         (FrameLoader::executeIfJavaScriptURL): Pass a line number of 1 instead of 0 to executeScript().
1081
1082 2008-05-30  Maciej Stachowiak  <mjs@apple.com>
1083
1084         Reviewed by Oliver (earlier version reviewed by Alexey).
1085
1086         - speculative fix for "REGRESSION(r34143?): Frequent crash while browsing"
1087         https://bugs.webkit.org/show_bug.cgi?id=19285
1088         
1089         ("This Time for Sure" Edition)
1090
1091         I'm pretty sure this fixes it but I have not been able to
1092         reproduce and am unsure if my theory of the bug is right.
1093
1094         I belive the bug was because JSDOMWindowBase accessed
1095         JSDOMWindowShell in its destructor to remove itself from a
1096         hashtable, but GC destructor order is not guaranteed, so the
1097         hashtable may have been freed already. This patch changes things
1098         so that a non-GC object (the KJSProxy) does the tracking of live
1099         window objects for a frame. JSDOMWindowBase can null check the frame
1100         pointer to verify if it is still good.
1101         
1102         In addition, we must create a similar setup between DOMWindow and
1103         Frame; since the DOMWindow of a given frame can now change over
1104         time, we must ensure that the Frame disconnects every live
1105         DOMWindow when destroyed, not just the last.
1106
1107         * bindings/js/JSDOMWindowBase.cpp:
1108         (WebCore::JSDOMWindowBase::~JSDOMWindowBase):
1109         * bindings/js/JSDOMWindowShell.cpp:
1110         (WebCore::JSDOMWindowShell::JSDOMWindowShell):
1111         * bindings/js/JSDOMWindowShell.h:
1112         (WebCore::JSDOMWindowShell::setWindow):
1113         * bindings/js/kjs_proxy.cpp:
1114         (WebCore::KJSProxy::clear):
1115         (WebCore::KJSProxy::initScript):
1116         (WebCore::KJSProxy::updateDocument):
1117         * bindings/js/kjs_proxy.h:
1118         (WebCore::KJSProxy::clearFormerWindow):
1119         * page/DOMWindow.cpp:
1120         (WebCore::DOMWindow::~DOMWindow):
1121         * page/Frame.cpp:
1122         (WebCore::Frame::~Frame):
1123         (WebCore::Frame::setDocument):
1124         (WebCore::Frame::clearDOMWindow):
1125         (WebCore::Frame::clearFormerDOMWindow):
1126         * page/Frame.h:
1127         * page/FramePrivate.h:
1128
1129 2008-05-30  Dan Bernstein  <mitz@apple.com>
1130
1131         Reviewed by Darin Adler and Dave Hyatt.
1132
1133         - eliminate excessive repainting when an object's final position
1134           after layout is unchanged
1135
1136         * rendering/RenderBlock.cpp:
1137         (WebCore::RenderBlock::layoutBlockChildren): Removed the full repaint
1138         for the case that the final position is unchanged but the position at
1139         which an intermediate layout occurred was different. Any repainting
1140         done during the intermediate layout would have happened at the object's
1141         initial (and also final) coordinates, since layoutDelta is factored
1142         into repaint rect calculations.
1143
1144 2008-05-30  Chris Fleizach  <cfleizach@apple.com>
1145
1146         Reviewed by Beth Dakin.
1147
1148         <rdar://problem/5959478> r34079: AX: crash at stringForReplacedNode
1149
1150         * page/AccessibilityObject.cpp:
1151         (WebCore::stringForReplacedNode):
1152
1153 2008-05-30  Tor Arne Vestbø  <tavestbo@trolltech.com>
1154
1155         Reviewed by Simon.
1156
1157         Fix the build dependencies for the Qt build. Don't generate
1158         SVGCSSPropertyNames.cpp for every build.
1159
1160         * WebCore.pro: The output file was renamed, so the compiler rule needs
1161         to be adjusted in order for qmake to generate correct depdencies.
1162
1163 2008-05-30  Maciej Stachowiak  <mjs@apple.com>
1164
1165         Revert fix for 19285, it just caused more crashes and I need time
1166         to fix it properly.
1167
1168         * bindings/js/JSDOMWindowBase.cpp:
1169         (WebCore::JSDOMWindowBase::~JSDOMWindowBase):
1170         * bindings/js/JSDOMWindowShell.cpp:
1171         (WebCore::JSDOMWindowShell::JSDOMWindowShell):
1172         (WebCore::JSDOMWindowShell::updateDocument):
1173         * bindings/js/JSDOMWindowShell.h:
1174         (WebCore::JSDOMWindowShell::setWindow):
1175         (WebCore::JSDOMWindowShell::clearFormerWindow):
1176         * bindings/js/kjs_proxy.cpp:
1177         (WebCore::KJSProxy::clear):
1178         (WebCore::KJSProxy::initScript):
1179         * bindings/js/kjs_proxy.h:
1180         * page/Frame.cpp:
1181         (WebCore::Frame::setDocument):
1182
1183 2008-05-30  Adam Treat  <treat@kde.org>
1184
1185         Reviewed by Simon.
1186
1187         Fix a huge memory leak by ensuring that on application shutdown
1188         the shared timer is fired one last time if it is active. This
1189         ensures that the GCController timer is fired at the end to free
1190         references to JavaScript objects.
1191
1192         * platform/qt/SharedTimerQt.h:
1193         (WebCore::SharedTimerQt::cleanup):
1194         (WebCore::SharedTimerQt::inst):
1195
1196 2008-05-30  Alexey Proskuryakov  <ap@webkit.org>
1197
1198         Reviewed by Darin.
1199
1200         http://bugs.webkit.org/show_bug.cgi?id=7466
1201         <rdar://problem/4657563> Use of Ctrl as access key modifier conflicts with Mac OS X
1202         emacs-style keybindings
1203
1204         * page/EventHandler.cpp:
1205         (WebCore::EventHandler::handleAccessKey): Use Ctrl+Option for access keys on Mac OS X.
1206
1207 2008-05-30  Maciej Stachowiak  <mjs@apple.com>
1208
1209         Reviewed by Alexey.
1210         
1211         - speculative fix for "REGRESSION(r34143?): Frequent crash while browsing"
1212         https://bugs.webkit.org/show_bug.cgi?id=19285
1213
1214         I'm pretty sure this fixes it but I have not been able to
1215         reproduce and am unsure if my theory of the bug is right.
1216
1217         I belive the bug was because JSDOMWindowBase accessed
1218         JSDOMWindowShell in its destructor to remove itself from a
1219         hashtable, but GC destructor order is not guaranteed, so the
1220         hashtable may have been freed already. This patch changes things
1221         so that a non-GC object (the KJSProxy) does the tracking of live
1222         window objects for a frame. JSDOMWindowBase can null check the frame
1223         pointer to verify if it is still good.
1224         
1225         * bindings/js/JSDOMWindowBase.cpp:
1226         (WebCore::JSDOMWindowBase::~JSDOMWindowBase):
1227         * bindings/js/JSDOMWindowShell.cpp:
1228         (WebCore::JSDOMWindowShell::JSDOMWindowShell):
1229         * bindings/js/JSDOMWindowShell.h:
1230         (WebCore::JSDOMWindowShell::setWindow):
1231         * bindings/js/kjs_proxy.cpp:
1232         (WebCore::KJSProxy::clear):
1233         (WebCore::KJSProxy::initScript):
1234         (WebCore::KJSProxy::updateDocument):
1235         * bindings/js/kjs_proxy.h:
1236         (WebCore::KJSProxy::clearFormerWindow):
1237         * page/Frame.cpp:
1238         (WebCore::Frame::setDocument):
1239
1240 2008-05-29  Chris Fleizach  <cfleizach@apple.com>
1241
1242         Reviewed by Darin Adler.
1243
1244         <rdar://problem/4783102> Radio button/checkbox embedded with <label> tag should combine the text and the label as a single element
1245         <rdar://problem/5091386> Seed: VO reads form labels twice in Safari
1246
1247         * page/AccessibilityObject.cpp:
1248         (WebCore::AccessibilityObject::titleUIElement):
1249         * page/AccessibilityObject.h:
1250         (WebCore::AccessibilityObject::isControl):
1251         * page/AccessibilityRenderObject.cpp:
1252         (WebCore::AccessibilityRenderObject::isControl):
1253         (WebCore::AccessibilityRenderObject::labelElementContainer):
1254         (WebCore::AccessibilityRenderObject::title):
1255         (WebCore::AccessibilityRenderObject::checkboxOrRadioRect):
1256         (WebCore::AccessibilityRenderObject::elementRect):
1257         (WebCore::AccessibilityRenderObject::titleUIElement):
1258         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
1259         (WebCore::AccessibilityRenderObject::roleValue):
1260         * page/AccessibilityRenderObject.h:
1261         * page/mac/AccessibilityObjectWrapper.mm:
1262         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
1263         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
1264
1265 2008-05-29  Timothy Hatcher  <timothy@apple.com>
1266
1267         Fixes the regression where image resources don't have a preview icon.
1268
1269         https://bugs.webkit.org/show_bug.cgi?id=18500
1270
1271         Reviewed by Adam Roben.
1272
1273         * page/inspector/ResourcesPanel.js:
1274         (WebInspector.ResourceSidebarTreeElement): Call createIconElement before
1275         calling the superclass.
1276         (WebInspector.ResourceSidebarTreeElement.prototype.createIconElement):
1277         Create an iconElement, if the category is images then make a div that
1278         contains a preview image. Otherwise just make an img element. If there
1279         was a previous iconElement, then replace it.
1280         (WebInspector.ResourceSidebarTreeElement.prototype.refresh): Call
1281         createIconElement if the category changed.
1282         * page/inspector/SidebarTreeElement.js:
1283         (WebInspector.SidebarTreeElement): Create an iconElement if one hasn't
1284         been made already by a subclass.
1285         (WebInspector.SidebarTreeElement.prototype.onattach): Append the iconElement
1286         instead of creating one each time.
1287         * page/inspector/inspector.css: New and updated style rules.
1288
1289 2008-05-29  Timothy Hatcher  <timothy@apple.com>
1290
1291         Removes a use of the internal _childrenListNode property by adding
1292         a getter/setter for smallChildren to SidebarSectionTreeElement.
1293
1294         Reviewed by Adam Roben.
1295
1296         * page/inspector/ResourcesPanel.js:
1297         (WebInspector.ResourcesPanel.prototype._toggleLargerResources):
1298         Toggle smallChildren on the resourcesTreeElement instead of setting
1299         the style class directly.
1300         * page/inspector/SidebarTreeElement.js:
1301         (WebInspector.SidebarSectionTreeElement.prototype.smallChildren):
1302         Sets or removes the small class on the _childrenListNode.
1303
1304 2008-05-29  Timothy Hatcher  <timothy@apple.com>
1305
1306         Fixes a bug where the className would be reset for Resource
1307         tree elements and the selected state would be lost. This could
1308         happen when sorting the resources.
1309
1310         https://bugs.webkit.org/show_bug.cgi?id=19211
1311
1312         Reviewed by Adam Roben.
1313
1314         * page/inspector/ResourcesPanel.js:
1315         (WebInspector.ResourceSidebarTreeElement.prototype.refresh): Call
1316         removeMatchingStyleClasses to remove previous category classes instead
1317         of setting the whole className directly.
1318         * page/inspector/utilities.js:
1319         (Element.prototype.removeStyleClass): Moved code to
1320         removeMatchingStyleClasses and call removeMatchingStyleClasses.
1321         (Element.prototype.removeMatchingStyleClasses): Added. Code moved from
1322         removeStyleClass and don't escape the string.
1323
1324 2008-05-29  David Hyatt  <hyatt@apple.com>
1325
1326         Improve the performance of the GUIMark benchmark by 2x in the CoreGraphics code path.
1327
1328         Whenever a foreground image changes size rapidly, we will now dynamically shift into rendering it
1329         using low quality scaling.  Once the animation completes, the image will repaint at high quality.
1330         Scaled images will still render at high quality by default, only shifting into low quality if
1331         the scale factor is rapidly changing.  This change raises GUIMark from 21fps to 34fps on my machine.
1332
1333         Rewrite the Image draw method to avoid the use of throwaway CG subimages.  Instead the entire image is
1334         always drawn (with the appropriate clip and scale set up to make sure the correct subimage portion shows up
1335         in the destination rect).  This change raises GUIMark from 34fps to 43fps on my machine.
1336
1337         Reviewed by Darin
1338
1339         * platform/graphics/GraphicsContext.cpp:
1340         (WebCore::GraphicsContext::drawImage):
1341         * platform/graphics/cg/ImageCG.cpp:
1342         (WebCore::BitmapImage::draw):
1343         * rendering/RenderImage.cpp:
1344         (WebCore::RenderImageScaleData::RenderImageScaleData):
1345         (WebCore::RenderImageScaleData::~RenderImageScaleData):
1346         (WebCore::RenderImageScaleData::size):
1347         (WebCore::RenderImageScaleData::time):
1348         (WebCore::RenderImageScaleData::useLowQualityScale):
1349         (WebCore::RenderImageScaleData::hiqhQualityRepaintTimer):
1350         (WebCore::RenderImageScaleData::setSize):
1351         (WebCore::RenderImageScaleData::setTime):
1352         (WebCore::RenderImageScaleData::setUseLowQualityScale):
1353         (WebCore::RenderImageScaleObserver::shouldImagePaintAtLowQuality):
1354         (WebCore::RenderImageScaleObserver::imageDestroyed):
1355         (WebCore::RenderImageScaleObserver::highQualityRepaintTimerFired):
1356         (WebCore::RenderImage::highQualityRepaintTimerFired):
1357         (WebCore::RenderImage::~RenderImage):
1358         (WebCore::RenderImage::paintReplaced):
1359         * rendering/RenderImage.h:
1360
1361 2008-05-29  Justin Garcia  <justin.garcia@apple.com>
1362
1363         Reviewed by Eric.
1364
1365         <rdar://problem/5847330> REGRESSION CrashTracer: [USER] 536 crashes at WebCore::highestAncestor
1366
1367         * editing/CompositeEditCommand.cpp:
1368         (WebCore::CompositeEditCommand::breakOutOfEmptyListItem): Don't break out of an empty
1369         list item if its parent is non-editable, since doing so will move into non-editable content.
1370         * editing/DeleteSelectionCommand.cpp:
1371         (WebCore::DeleteSelectionCommand::initializePositionData): We want to prevent merges from
1372         table cells even if those table cells are non-editable.
1373         * editing/htmlediting.cpp:
1374         (WebCore::enclosingNodeOfType): Can now return non-editable nodes, for cases where the caller 
1375         isn't going to do editing in the returned node.
1376         * editing/htmlediting.h:
1377
1378 2008-05-29  Anders Carlsson  <andersca@apple.com>
1379
1380         Reviewed by Mitz.
1381
1382         <rdar://problem/5971845>
1383         https://bugs.webkit.org/show_bug.cgi?id=19313
1384         Add version member to NPCocoaEvent
1385         
1386         * bridge/npapi.h:
1387
1388 2008-05-29  Alexey Proskuryakov  <ap@webkit.org>
1389
1390         Reviewed by Adam Roben.
1391
1392         <rdar://problem/5960682> REGRESSION(r30535): Crashes on iExploder in checkForHeadCharset().
1393
1394         I don't see how to make a reliable test, but iExploder catches this quickly.
1395
1396         * loader/TextResourceDecoder.cpp:
1397         (WebCore::TextResourceDecoder::checkForHeadCharset): Correct the length passed to
1398         findIgnoringCase().
1399
1400 2008-05-29  Peter Kasting  <zerodpx@gmail.com>
1401
1402         Reviewed by Dave Hyatt.
1403
1404         https://bugs.webkit.org/show_bug.cgi?id=19273
1405         Handle looping GIFs correctly (at least in the open source GIF decoder) even when
1406         the loop count doesn't appear in the initial data packets.
1407
1408         * platform/graphics/BitmapImage.cpp:
1409         (WebCore::BitmapImage::cacheFrame):
1410         (WebCore::BitmapImage::startAnimation):
1411         (WebCore::BitmapImage::advanceAnimation):
1412         * platform/image-decoders/gif/GIFImageDecoder.cpp:
1413         (WebCore::GIFImageDecoder::GIFImageDecoder):
1414         (WebCore::GIFImageDecoder::repetitionCount):
1415         (WebCore::GIFImageDecoder::gifComplete):
1416         * platform/image-decoders/gif/GIFImageDecoder.h:
1417
1418 2008-05-29  Brent Fulgham  <bfulgham@gmail.com>
1419
1420         Reviewed by Alp Toker.
1421
1422         http://bugs.webkit.org/show_bug.cgi?id=19284
1423         Correct Windows (Cairo) Build Regressions
1424
1425         Correct small Windows (Cairo) build regressions in recent updates.
1426
1427         * platform/graphics/SimpleFontData.h:  Correct build regression due
1428           to r32781 (additional use of m_syntheticBoldOffset in GDI code).
1429         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
1430           Correct build regression due to r31830 (change of clip signature
1431           to use FloatRect rather than IntRect).
1432         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
1433         (WebCore::SimpleFontData::platformInit):  Initialize
1434         m_syntheticBoldOffset
1435         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
1436         (WebCore::JPEGImageReader::JPEGImageReader):  Work around build
1437           error due to warnings about _setjmp treated as errors.
1438         * platform/image-decoders/png/PNGImageDecoder.cpp:  Work around
1439           build error due to warnings about _setjmp treated as errors.
1440         * platform/network/curl/ResourceHandleCurl.cpp:  Correct build error
1441           due to different order (and content) of include files when building
1442           with CoreFoundation (but not CoreGraphics).
1443         * platform/network/curl/ResourceHandleManager.cpp:
1444         (WebCore::ResourceHandleManager::setupPOST):  Correct build error
1445           due to Visual Studio compiler bug.
1446
1447 2008-05-29  Alexey Proskuryakov  <ap@webkit.org>
1448
1449         Reviewed by Darin.
1450
1451         https://bugs.webkit.org/show_bug.cgi?id=19215
1452         REGRESSION: transformToDocument fails when xsl includes &#160;
1453
1454         Test: fast/xsl/nbsp-in-stylesheet.html
1455
1456         * editing/markup.cpp:
1457         (WebCore::appendAttributeValue):
1458         (WebCore::appendEscapedContent):
1459         (WebCore::escapeContentText):
1460         (WebCore::appendQuotedURLAttributeValue):
1461         (WebCore::appendNamespace):
1462         (WebCore::appendStartMarkup):
1463         (WebCore::appendDocumentType):
1464         (WebCore::createMarkup):
1465         Only escape non-breaking spaces in HTML documents. In Firefox, this behavior is also limited
1466         to innerHTML, but we don't have a separate code path for it, and do not necessarily want to.
1467
1468         * page/Frame.cpp:
1469         (WebCore::Frame::documentTypeString):
1470         * dom/CDATASection.cpp:
1471         * dom/CDATASection.h:
1472         * dom/Comment.cpp:
1473         * dom/Comment.h:
1474         * dom/DocumentType.cpp:
1475         * dom/DocumentType.h:
1476         * dom/ProcessingInstruction.cpp:
1477         * dom/ProcessingInstruction.h:
1478         While at it, I also wanted to fix escaping for these nodes, but it turned out that FIXMEs were
1479         incorrect. So, I just moved their serialization to markup.cpp for consistency.
1480
1481 2008-05-29  Maciej Stachowiak  <mjs@apple.com>
1482
1483         Reviewed by Dave Hyatt.
1484
1485         - speed up DHTML using lazy style resolution and renderer creation
1486
1487         This change introduces the concept of "lazy attach" - when a node
1488         is lazy attached, then instead of resolving style and creating a
1489         renderer right away, we just mark it as needing a style recalc.
1490         
1491         The patch makes use of this mechanism when inserting nodes directly
1492         using DOM APIs from script. For now this is only done for the
1493         JavaScript language binding but could also be done for other
1494         bindings in the future.
1495         
1496         Lazy attach helps some common DHTML patterns - when a node is
1497         added to the DOM, and then subsequently changed in a
1498         style-affecting way, this causes an extra style recalc. This is a
1499         fairly common pattern so it is better to be lazy.
1500         
1501         * bindings/js/JSNodeCustom.cpp:
1502         (WebCore::JSNode::insertBefore): Request lazy attach.
1503         (WebCore::JSNode::replaceChild): ditto
1504         (WebCore::JSNode::appendChild): ditto
1505         * dom/ContainerNode.cpp:
1506         (WebCore::ContainerNode::insertBefore): Support lazy attach.
1507         (WebCore::ContainerNode::replaceChild): ditto
1508         (WebCore::ContainerNode::appendChild): ditto
1509         (WebCore::ContainerNode::detach): Clear "changed child" bit if still set.
1510         * dom/ContainerNode.h:
1511         * dom/Element.cpp:
1512         (WebCore::Element::recalcStyle): Adjusted to properly reattach a
1513         lazy-attached node.
1514         * dom/Node.cpp:
1515         (WebCore::Node::insertBefore): Extra parameter for lazy attach
1516         (still doesn't do anything).
1517         (WebCore::Node::replaceChild): ditto
1518         (WebCore::Node::appendChild): ditto
1519         (WebCore::Node::setChanged): Unrelated but obvious optimization -
1520         stop marking ancestor as having a changed child once we already reach
1521         an ancestor so marked.
1522         (WebCore::outermostLazyAttachedAncestor): Helper function for lazyAttach.
1523         (WebCore::Node::lazyAttach): Implement lazy attach.
1524         (WebCore::Node::canLazyAttach): Virtual method - true for most nodes.
1525         * dom/Node.h:
1526         * dom/Text.cpp:
1527         (WebCore::Text::recalcStyle): Properly handle the case of a reattached node.
1528         * html/HTMLEmbedElement.h:
1529         (WebCore::HTMLEmbedElement::canLazyAttach): Refuse lazy attach, since
1530         plugins and frames do important work at rederer creation time.
1531         * html/HTMLFrameElementBase.h:
1532         (WebCore::HTMLFrameElementBase::canLazyAttach): Refuse lazy attach, since
1533         plugins and frames do important work at rederer creation time.
1534         * html/HTMLFrameSetElement.cpp:
1535         (WebCore::HTMLFrameSetElement::recalcStyle): Change order so that
1536         reattach works properly.
1537         * html/HTMLObjectElement.h:
1538         (WebCore::HTMLObjectElement::canLazyAttach): Refuse lazy attach, since
1539         plugins and frames do important work at rederer creation time.
1540         * html/HTMLOptGroupElement.cpp:
1541         (WebCore::HTMLOptGroupElement::insertBefore): Pass along extra param.
1542         (WebCore::HTMLOptGroupElement::replaceChild): ditto
1543         (WebCore::HTMLOptGroupElement::appendChild): ditto
1544         * html/HTMLOptGroupElement.h:
1545         * html/HTMLSelectElement.cpp:
1546         (WebCore::HTMLSelectElement::insertBefore): Pass along extra param.
1547         (WebCore::HTMLSelectElement::replaceChild): ditto
1548         (WebCore::HTMLSelectElement::appendChild): ditto
1549         * html/HTMLSelectElement.h:
1550         * svg/SVGLocatable.cpp:
1551         (WebCore::SVGLocatable::getBBox): Add missing updateLayout call.
1552         * svg/SVGTextContentElement.cpp:
1553         (WebCore::SVGTextContentElement::getNumberOfChars): ditto
1554         (WebCore::SVGTextContentElement::getComputedTextLength): ditto
1555         (WebCore::SVGTextContentElement::getSubStringLength): ditto
1556         (WebCore::SVGTextContentElement::getStartPositionOfChar): ditto
1557         (WebCore::SVGTextContentElement::getEndPositionOfChar): ditto
1558         (WebCore::SVGTextContentElement::getExtentOfChar): ditto
1559         (WebCore::SVGTextContentElement::getRotationOfChar): ditto
1560         (WebCore::SVGTextContentElement::getCharNumAtPosition): ditto
1561
1562 2008-05-28  Ada Chan  <adachan@apple.com>
1563
1564         <rdar://problem/5957036> REGRESSION (r31960): 20-30% slowdown in i-Bench JavaScript test on XP Home
1565         Conditionalize the timer latency change (r31960) only for vista since it does not
1566         help xp anyway.
1567
1568         Reviewed by Steve Falkenburg.
1569
1570         * platform/win/SharedTimerWin.cpp:
1571         (WebCore::isRunningOnVistaOrLater):
1572         (WebCore::TimerWindowWndProc):
1573         (WebCore::setSharedTimerFireTime):
1574
1575 2008-05-28  Anders Carlsson  <andersca@apple.com>
1576
1577         Build fix.
1578         
1579         * storage/LocalStorage.cpp:
1580         (WebCore::LocalStorage::scheduleImport):
1581
1582 2008-05-28  Anders Carlsson  <andersca@apple.com>
1583
1584         Reviewed by Tim.
1585
1586         <rdar://problem/5965960>
1587         CrashTracer: [USER] 4 crashes in Safari at libxml2.2.dylib: xmlGenericErrorDefaultFunc + 76
1588         
1589         Turns out that while libxml has two different error callbacks, they both use the same context, so we need to 
1590         set both error callbacks to prevent one of the error callbacks from using the context as a FILE pointer.
1591         
1592         * xml/XSLStyleSheet.cpp:
1593         (WebCore::XSLStyleSheet::parseString):
1594         * xml/XSLTProcessor.cpp:
1595         (WebCore::XSLTProcessor::genericErrorFunc):
1596         (WebCore::docLoaderFunc):
1597         * xml/XSLTProcessor.h:
1598
1599 2008-05-28  Brady Eidson  <beidson@apple.com>
1600
1601         Reviewed by Adam
1602
1603         Fix hang I introduced to WebKit clients without their LocalStorage paths set
1604         Such as DRT...
1605
1606         * storage/LocalStorage.cpp:
1607         (WebCore::LocalStorage::scheduleImport): Return a bool, namely to signify
1608           whether or not there is a LocalStorageThread to schedule the import on.
1609         * storage/LocalStorage.h:
1610
1611         * storage/LocalStorageArea.cpp:
1612         (WebCore::LocalStorageArea::LocalStorageArea): If the scheduleImport failed,
1613           mark the imported flag as true so the LocalStorageArea doesn't wait around
1614           locking the main thread.
1615
1616 2008-05-28  Anthony Ricaud  <rik24d@gmail.com>
1617
1618         User stylesheets are now non-editable and displayed as user-stylesheets
1619
1620         <https://bugs.webkit.org/show_bug.cgi?id=17602>
1621         <rdar://problem/5967637>
1622
1623         Reviewed by Tim Hatcher.
1624
1625         * English.lproj/localizedStrings.js: Added a string
1626         * page/inspector/StylesSidebarPane.js:
1627
1628 2008-05-28  Anders Carlsson  <andersca@apple.com>
1629
1630         Reviewed by Mitz.
1631
1632         <rdar://problem/5819989> 
1633         Crash in WebKit!KJS::Window::printErrorMessage quitting Safari after pop up window on uk.real.com was closed
1634
1635         Add null check for Frame::settings().
1636         
1637         * bindings/js/JSDOMWindowBase.cpp:
1638         (WebCore::JSDOMWindowBase::printErrorMessage):
1639
1640 2008-05-27  Geoffrey Garen  <ggaren@apple.com>
1641
1642         Reviewed by Tim Hatcher.
1643
1644         Fixed https://bugs.webkit.org/show_bug.cgi?id=19183
1645         REGRESSION (r33979): Crash in DebuggerCallFrame::functionName when
1646         clicking button in returnEvent-crash.html
1647         
1648         Added implementations for willExecuteProgram and didExecuteProgram. They
1649         take care to update our call frame when entering and exiting programs,
1650         preventing us from keeping around a stale global frame after executing
1651         a program.
1652         
1653         eval programs now show up as "anonymous function" in a new scope. This
1654         is slightly better than what they used to do -- overwriting the current
1655         scope -- but obviously we can do better.
1656
1657 2008-05-28  Brady Eidson  <beidson@apple.com>
1658
1659         Reviewed by Dan Bernstein
1660
1661         <rdar://problem/5946834> - LocalStorage threads appearing in apps that don't want them.
1662
1663         Decided to fix this bug from a few different avenues to make sure we only create LocalStorage resources
1664         when we *really* want them.
1665
1666         * page/DOMWindow.cpp:
1667         (WebCore::DOMWindow::localStorage): Account for the possibility that the LocalStorage object might be null.
1668
1669         * storage/LocalStorage.cpp:
1670         (WebCore::LocalStorage::LocalStorage): Don't create the thread if there is no path name - we know we'll never
1671           be needing it when there is no file backing us on disk.
1672         (WebCore::LocalStorage::scheduleImport): Null check the thread, as it might not exist.
1673         (WebCore::LocalStorage::scheduleSync): Ditto
1674
1675         * storage/LocalStorageThread.cpp:
1676         (WebCore::LocalStorageThread::localStorageThread): Clear the threadID after termination - clear way to signify
1677           that this thread is truly done.
1678         (WebCore::LocalStorageThread::scheduleImport): ASSERT that the queue is live, and the threadID exists
1679         (WebCore::LocalStorageThread::scheduleSync): Ditto
1680         (WebCore::LocalStorageThread::terminate): Don't schedule termination and wait for it to complete if the thread 
1681           isn't live.
1682
1683 2008-05-28  Alexander Vassilev  <avasilev@voipgate.com>
1684
1685         Reviewed by Kevin Ollivier.
1686
1687         Rescale image to fit the destination rect so that we don't get a crash when drawing
1688         in a destination rect that's bigger than the image rect. Also adds an optimization for
1689         drawing an image that is a solid color.
1690         
1691         https://bugs.webkit.org/show_bug.cgi?id=18465
1692
1693         * platform/graphics/wx/ImageWx.cpp:
1694         (WebCore::BitmapImage::draw):
1695
1696 2008-05-27  Tor Arne Vestbø  <tavestbo@trolltech.com>
1697
1698         Reviewed by Simon
1699
1700         Close the video widget explicitly so we don't hang
1701         when exiting the application.
1702
1703         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
1704         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
1705
1706 2008-05-27  Justin Garcia  <justin.garcia@apple.com>
1707
1708         Reviewed by Oliver.
1709
1710         <rdar://problem/5803706> Pressing return at the end of a header doesn't break out of header (17460)
1711         
1712         It wasn't enough to break out of the header, to match other browsers we 
1713         also need to not preserve the typing style.
1714
1715         * editing/InsertParagraphSeparatorCommand.cpp:
1716         (WebCore::InsertParagraphSeparatorCommand::applyStyleAfterInsertion):
1717         (WebCore::InsertParagraphSeparatorCommand::doApply):
1718         * editing/InsertParagraphSeparatorCommand.h:
1719
1720 2008-05-27  Timothy Hatcher  <timothy@apple.com>
1721
1722         <rdar://problem/5966961> REGRESSION: Font previews in the Web
1723         Inspector always show in Lucida Grande (not the real font)
1724
1725         Reviewed by Adam Roben.
1726
1727         * page/inspector/FontView.js: Add a style element that loads the
1728         @font-face rule that is excepted by the preview element.
1729
1730 2008-05-27  Timothy Hatcher  <timothy@apple.com>
1731
1732         Fixes a regression where the Image and Font preview views do not
1733         size correctly.
1734
1735         <rdar://problem/5966723> REGRESSION (r33991): Image and font previews
1736         are shrunken and can't be made larger (19281)
1737
1738         Reviewed by Adam Roben.
1739
1740         * page/inspector/FontView.js: Adjust the font size based only on the
1741         container width minus padding.
1742         * page/inspector/inspector.css: Updated styles for the image and
1743         font views.
1744
1745 2008-05-27  Adam Roben  <aroben@apple.com>
1746
1747         Fix Bug 19276: XHR resources are classified as "Other" until Inspector
1748         is closed and reopened
1749
1750         <https://bugs.webkit.org/show_bug.cgi?id=19276>
1751         <rdar://problem/5965742>
1752
1753         Reviewed by Tim Hatcher.
1754
1755         * page/InspectorController.cpp:
1756         (WebCore::InspectorController::updateScriptResourceResponse): Moved
1757         code that updates the resource's type from here...
1758         (WebCore::InspectorController::updateScriptResourceType): ...to here.
1759         (WebCore::InspectorController::resourceRetrievedByXMLHttpRequest):
1760         Call updateScriptResourceType now that we know this resource was
1761         retrieved via an XHR.
1762         * page/InspectorController.h:
1763
1764 2008-05-27  Timothy Hatcher  <timothy@apple.com>
1765
1766         Removes a redundant call to InspectorController::stopDebugging().
1767
1768         Rubber-stamped by Adam Roben.
1769
1770         * page/InspectorController.cpp:
1771         (WebCore::InspectorController::showWindow):
1772
1773 2008-05-27  Kevin McCullough  <kmccullough@apple.com>
1774
1775         Reviewed by Tim.
1776
1777         - Added and updated some manual test for the profiler.
1778
1779         * manual-tests/inspector/profiler-test-anonymous-function-calls-eval.html:
1780         * manual-tests/inspector/profiler-test-apply.html:
1781         * manual-tests/inspector/profiler-test-call.html:
1782         * manual-tests/inspector/profiler-test-deep-recursion.html: Added.
1783         * manual-tests/inspector/profiler-test-simple-event-call.html: Added.
1784
1785 2008-05-27  Kevin Ollivier  <kevino@theolliviers.com>
1786
1787         wx build fix. Accidently left a couple fixes out of the previous commit.
1788
1789         * webcore-base.bkl:
1790
1791 2008-05-27  Kevin Ollivier  <kevino@theolliviers.com>
1792
1793         wx build fix. Adding JSHTMLElementWrapperFactory.cpp.
1794         
1795         * WebCoreSources.bkl:
1796
1797 2008-05-27  Ariya Hidayat  <ariya.hidayat@trolltech.com>
1798
1799         Reviewed by Simon.
1800
1801         Fix linking error (missing gdi32 and user32 libraries).
1802
1803         * WebCore.pro:
1804
1805 2008-05-27  Ariya Hidayat  <ariya.hidayat@trolltech.com>
1806
1807         Reviewed by Simon.
1808
1809         Update the WebKit.qrc so that Web Inspector is functional again.
1810
1811         * page/inspector/WebKit.qrc:
1812
1813 2008-05-26  Alp Toker  <alp@nuanti.com>
1814
1815         Reviewed by Anders.
1816
1817         http://bugs.webkit.org/show_bug.cgi?id=16495
1818         [GTK] Accessibility support with ATK/AT-SPI
1819
1820         Implement basic action, text and editable text accessibility.
1821
1822         Provide utility functions to simplify const string return and casting
1823         and add some more stubs.
1824
1825         It's now possible to navigate and manipulate forms and text using
1826         assistive technologies.
1827
1828         * page/gtk/AccessibilityObjectWrapperAtk.cpp:
1829         (returnString):
1830         (core):
1831         * platform/gtk/LocalizedStringsGtk.cpp:
1832         (WebCore::AXButtonActionVerb):
1833         (WebCore::AXRadioButtonActionVerb):
1834         (WebCore::AXTextFieldActionVerb):
1835         (WebCore::AXCheckedCheckBoxActionVerb):
1836         (WebCore::AXUncheckedCheckBoxActionVerb):
1837         (WebCore::AXLinkActionVerb):
1838         (WebCore::imageTitle):
1839
1840 2008-05-25  Maciej Stachowiak  <mjs@apple.com>
1841
1842         Reviewed by Anders.
1843
1844         - bind the window's "document" and "window" properties to static slots
1845         1.7% speedup on Acid3 test 26
1846         
1847         Only the "document" part matters for Acid3, but since I was doing
1848         this anyway, "window" also seemed like a good one to optimize.
1849
1850         * bindings/js/JSDOMWindowBase.cpp:
1851         (WebCore::JSDOMWindowBase::JSDOMWindowBase): Allocate variable
1852         slots for document and window; but just put null in the document
1853         slot for now.
1854         (WebCore::JSDOMWindowBase::updateDocument): Fill in the document
1855         slot.        
1856         (WebCore::JSDOMWindowBase::~JSDOMWindowBase): Make our shell stop
1857         tracking us.
1858         * bindings/js/JSDOMWindowBase.h:
1859         * bindings/js/JSDOMWindowShell.cpp:
1860         (WebCore::JSDOMWindowShell::JSDOMWindowShell): Allocate HashSet
1861         for our still-not-dead inner windows.
1862         (WebCore::JSDOMWindowShell::updateDocument): Update all our
1863         inner windows ever (to make sure the update to the document
1864         property shows up everywhere).
1865         * bindings/js/JSDOMWindowShell.h:
1866         (WebCore::JSDOMWindowShell::setWindow): Update our hash.
1867         (WebCore::JSDOMWindowShell::clearFormerWindow): Ditto.
1868         * bindings/js/JSDocumentCustom.cpp:
1869         (WebCore::toJS): Don't set self as a property map property of
1870         the window, this is no longer necessary.
1871         * bindings/js/kjs_proxy.cpp:
1872         (WebCore::KJSProxy::initScript): Update document for the
1873         newly created window.
1874         * bindings/js/kjs_proxy.h:
1875         * page/Frame.cpp:
1876         (WebCore::Frame::setDocument): If the document is not null,
1877         update our window.
1878
1879 2008-05-26  Anders Carlsson  <andersca@apple.com>
1880
1881         Reviewed by Sam.
1882
1883         This patch does two things:
1884         
1885         * It adds a toJSNewlyCreated function for creating JS wrappers for nodes where we know
1886         that the node doesn't have a wrapper. This avoids a hash lookup.
1887         
1888         * It adds toJSNewlyCreated methods for JSElement and JSText. 
1889         
1890         All in all this is a 4.3% speedup on Acid 3 test 26.
1891         
1892         * WebCore.vcproj/WebCore.vcproj:
1893         * WebCore.xcodeproj/project.pbxproj:
1894         * bindings/js/JSElementCustom.cpp:
1895         (WebCore::toJSNewlyCreated):
1896         * bindings/js/JSNodeCustom.cpp:
1897         (WebCore::createWrapper):
1898         (WebCore::toJSNewlyCreated):
1899         (WebCore::toJS):
1900         * bindings/js/JSTextCustom.cpp: Added.
1901         (WebCore::toJSNewlyCreated):
1902         * bindings/scripts/CodeGeneratorJS.pm:
1903         * dom/Document.idl:
1904
1905 2008-05-26  Sam Weinig  <sam@webkit.org>
1906
1907         Reviewed by Anders Carlsson.
1908
1909         Inline the getOwnPropertySlot for JSNode, JSEventTargetNode, JSElement,
1910         and JSDocument for a 1-2% speedup on Acid 3 test 26.
1911
1912         * bindings/js/JSEventTargetNode.cpp:
1913         * bindings/js/JSEventTargetNode.h:
1914         (WebCore::JSEventTargetNode::getOwnPropertySlot):
1915         (WebCore::JSEventTargetNode::getValueProperty):
1916         (WebCore::JSEventTargetNode::put):
1917         (WebCore::JSEventTargetNode::putValueProperty):
1918         * bindings/scripts/CodeGeneratorJS.pm:
1919         * dom/Document.idl:
1920         * dom/Element.idl:
1921         * dom/Node.idl:
1922
1923 2008-05-26  Darin Adler  <darin@apple.com>
1924
1925         Reviewed by Maciej.
1926
1927         - https://bugs.webkit.org/show_bug.cgi?id=19239
1928
1929         Removed code that would only useful if if there was any way to create an Entity
1930         node or if we populated EntityReference nodes. It's likely that we'll remove
1931         these node types entirely in some future version of WebKit, depending in part
1932         on what happens with these in HTML 5.
1933
1934         1.8% speedup of Acid3 test 26.
1935
1936         The only read-only nodes we ever create are EntityReference nodes.
1937         These are only created by explicit calls to the Document.createEntityReference
1938         function. Since the created nodes are read-only, there can be no children of
1939         these nodes, so no other types of nodes can be read-only despite the rule that
1940         makes descendants of Entity and EntityReference nodes read-only.
1941
1942         * bindings/objc/DOM.mm: Removed unneeded include.
1943
1944         * dom/Attr.cpp:
1945         (WebCore::Attr::setValue): Removed unnecessary isReadOnlyNode check.
1946         (WebCore::Attr::setNodeValue): Ditto.
1947         * dom/CharacterData.cpp:
1948         (WebCore::CharacterData::setData): Removed unnecessary isReadOnlyNode check.
1949         (WebCore::CharacterData::substringData): Don't initialize the ec variable before
1950         calling checkCharDataOperation, since that function already does it.
1951         (WebCore::CharacterData::appendData): Removed unnecessary isReadOnlyNode check.
1952         (WebCore::CharacterData::insertData): Don't initialize ec.
1953         (WebCore::CharacterData::deleteData): Ditto.
1954         (WebCore::CharacterData::replaceData): Ditto.
1955         (WebCore::CharacterData::setNodeValue): Removed now-misleading comment.
1956         (WebCore::CharacterData::checkCharDataOperation): Removed unnecessary
1957         isReadOnlyNode check.
1958         * dom/CharacterData.h: Made checkCharDataOperation private and non-virtual
1959         since it's never used or defined in any other class.
1960
1961         * dom/Element.cpp:
1962         (WebCore::Element::setAttribute): Removed unneeded isReadOnlyNode check.
1963
1964         * dom/Entity.cpp: Removed the entire contents of this file.
1965
1966         * dom/Entity.h: Replaced the class with a stub -- just enough to keep the
1967         public bindings (JavaScript and Objective-C compiling), but the class is
1968         abstract and can't be instantianted.
1969
1970         * dom/EntityReference.cpp: Removed unused constructor.
1971         (WebCore::EntityReference::cloneNode): Removed unneeded code and comments
1972         to clone nonexistent child nodes.
1973         * dom/EntityReference.h: Removed unused constructor and unnecessary override
1974         of childTypeAllowed, since no children are allowed at all.
1975
1976         * dom/NamedAttrMap.cpp:
1977         (WebCore::NamedAttrMap::setNamedItem): Removed unneeded isReadOnlyNode check.
1978         (WebCore::NamedAttrMap::removeNamedItem): Ditto.
1979         * dom/NamedAttrMap.h: Removed isReadOnlyNode function.
1980
1981         * dom/Node.cpp: Removed the old isReadOnlyNode function. It made lots of
1982         virtual nodeType function calls.
1983         * dom/Node.h:
1984         (WebCore::Node::isReadOnlyNode): Replaced the old virtual isReadOnlyNode
1985         function with a new simple non-virtual one.
1986
1987         * dom/ProcessingInstruction.cpp:
1988         (WebCore::ProcessingInstruction::setData): Removed unneeded isReadOnlyNode
1989         check.
1990
1991         * dom/Text.cpp:
1992         (WebCore::Text::splitText): Removed unneeded isReadOnlyNode check.
1993         (WebCore::Text::replaceWholeText): Removed unnecessary isReadOnlyNode assertion.
1994         There is no reason for this function to go out of its way to mention the
1995         read-only node issue when none of the other DOM mutation functions do.
1996
1997 2008-05-26  Adam Barth  <abarth@webkit.org>
1998
1999         Reviewed by Sam.
2000
2001         Cleanup SecurityOrigin::canAccess.  Removed comment referring to an
2002         old version of the code.  Removed some useless code.
2003
2004         * platform/SecurityOrigin.cpp:
2005         (WebCore::SecurityOrigin::canAccess):
2006
2007 2008-05-26  Gwenole Beauchesne  <gbeauchesne@splitted-desktop.org>
2008
2009         Reviewed by Alp Toker.
2010
2011         * platform/gtk/LocalizedStringsGtk.cpp:
2012         (WebCore::contextMenuItemTagSelectAll): Fix GTK+ version check.
2013
2014 2008-05-25  Chris Fleizach  <cfleizach@apple.com>
2015
2016         Reviewed by David Harrison
2017
2018         <rdar://problem/3582905> elements on separate pages need to be distinct
2019
2020         * page/AccessibilityListBox.h:
2021         * page/AccessibilityObject.h:
2022         (WebCore::AccessibilityObject::accessibilityShouldUseUniqueId):
2023         * page/AccessibilityRenderObject.cpp:
2024         * page/AccessibilityRenderObject.h:
2025
2026 2008-05-25  Maciej Stachowiak  <mjs@apple.com>
2027
2028         Reviewed by Darin.
2029
2030         - don't repaint nodes that are removed before layout
2031         4.3% speedup on Acid3 test 26
2032
2033         Mitz points out the new flag can also be used to optimize other
2034         cases of needless repaint such as
2035         <https://bugs.webkit.org/show_bug.cgi?id=15129>.
2036         
2037         * rendering/RenderContainer.cpp:
2038         (WebCore::RenderContainer::removeChildNode): If the child has never had a layout,
2039         don't bother to repaint it, since there's nothing to dirty.
2040         * rendering/RenderObject.cpp:
2041         (WebCore::RenderObject::RenderObject): Initialize m_everHadLayout to false.
2042         (WebCore::RenderObject::setNeedsLayout): Set m_everHadLayout to true if we
2043         are being marked as not needing layout.
2044         * rendering/RenderObject.h:
2045
2046 2008-05-25  Dan Bernstein  <mitz@apple.com>
2047
2048         Reviewed by Darin Adler.
2049
2050         - fix https://bugs.webkit.org/show_bug.cgi?id=19086
2051           <rdar://problem/5962254> REGRESSION (r28519-r28535): Caret doesn't paint past the right edge of a block
2052
2053         Test: fast/repaint/caret-outside-block.html
2054
2055         * editing/SelectionController.cpp:
2056         (WebCore::repaintRectForCaret): Restored this function which was removed
2057         in r28523, but changed it to inflate only the width.
2058         (WebCore::SelectionController::caretRepaintRect): Changed back to use
2059         repaintRectForCaret().
2060         (WebCore::SelectionController::recomputeCaretRect): Ditto.
2061
2062 2008-05-25  Marco Barisione  <marco.barisione@collabora.co.uk>
2063
2064         Reviewed by Alp Toker.
2065
2066         http://bugs.webkit.org/show_bug.cgi?id=18940
2067         [CURL] Allow \n as line terminator for headers
2068
2069         The line terminator for message-header fields should be CRLF. However,
2070         it is recommended to recognise as a line terminator also a single LF.
2071
2072         * platform/network/curl/ResourceHandleManager.cpp:
2073         (WebCore::headerCallback): Allow headers to be terminated by "\n" and
2074         not just by "\r\n".
2075
2076 2008-05-25  Jan Michael Alonzo  <jmalonzo@webkit.org>
2077
2078         Reviewed by Alp Toker.
2079
2080         WARNING: NO TEST CASES ADDED OR CHANGED
2081
2082         http://bugs.webkit.org/show_bug.cgi?id=19142
2083         [Gtk] Remove build options --svg-experimental and --cross-document-messaging
2084
2085         * GNUmakefile.am:
2086
2087 2008-05-24  Rob Buis  <buis@kde.org>
2088
2089         Reviewed by Eric.
2090
2091         https://bugs.webkit.org/show_bug.cgi?id=18927
2092         Unify path data debug output
2093
2094         Implement unified path data output for Mac svg tests.
2095
2096         * platform/graphics/cg/PathCG.cpp:
2097         (WebCore::CGPathToCFStringApplierFunction):
2098         (WebCore::CFStringFromCGPath):
2099
2100 2008-05-24  Timothy Hatcher  <timothy@apple.com>
2101
2102         Fixes a huge leak with the Inspector where it was protecting
2103         a large object that was not being unprotected.
2104
2105         <rdar://problem/5961999> Inspector protects a large JavaScript
2106         object and never unprotects it (large leak)
2107
2108         Reviewed by Darin Adler.
2109
2110         * page/InspectorController.cpp:
2111         (WebCore::InspectorController::inspectedPageDestroyed): Call close()
2112         and removed a call to stopDebugging() and moved it to close().
2113         (WebCore::InspectorController::close): Add stopDebugging() and
2114         stopUserInitiatedProfiling(). Removed an ASSERT and added an
2115         if statement before calling JSValueUnprotect. We don't always have
2116         a m_scriptContext and m_scriptObject.
2117
2118 2008-05-24  Alp Toker  <alp@nuanti.com>
2119
2120         Win32/gcc3 build fix in Pango font backend. UChar needs to be
2121         explicitly cast to gunichar2.
2122
2123         * platform/graphics/gtk/FontGtk.cpp:
2124         (WebCore::utf16_to_utf8):
2125
2126 2008-05-24  Timothy Hatcher  <timothy@apple.com>
2127
2128         Fixes a crash where a new Inspector would get an old
2129         JSInspectedObjectWrapper for a user agent CSSStyleDeclaration.
2130         Since these style objects shared between pages, the wrapper cache
2131         would have a wrapper for the object still. But the wrapper was
2132         for a previous global object and with a disconnected frame. This
2133         fixes the wrapper cache so wrappers are remembered per global object
2134         and the object they are wrapping.
2135
2136         <rdar://problem/5958567> repro crash in WebCore::Frame::keepAlive()
2137         opening inspector window after closing it
2138
2139         Reviewed by Darin Adler.
2140
2141         * bindings/js/JSInspectedObjectWrapper.cpp:
2142         (WebCore::wrappers): Return a GlobalObjectWrapperMap reference.
2143         (WebCore::JSInspectedObjectWrapper::wrap): Find the WrapperMap
2144         by the dynamicGlobalObject then find the wrapper for unwrappedObject.
2145         (WebCore::JSInspectedObjectWrapper::JSInspectedObjectWrapper): Changes
2146         how the wrapper is added to the wrapper cache.
2147         (WebCore::JSInspectedObjectWrapper::~JSInspectedObjectWrapper): Changes
2148         how the wrapper is removed from the wrapper cache.
2149         * bindings/js/JSQuarantinedObjectWrapper.h:
2150         (WebCore::JSQuarantinedObjectWrapper:unwrappedGlobalObject): Added.
2151
2152 2008-05-24  Alexey Proskuryakov  <ap@webkit.org>
2153
2154         Reviewed by Maciej.
2155
2156         Optimize Node::textContent() to avoid O(n^2) string appending behavior.
2157
2158         1.6% speedup at Acid3 test 26.
2159
2160         * WebCore.xcodeproj/project.pbxproj:
2161         * GNUmakefile.am:
2162         * WebCore.pro:
2163         * WebCoreSources.bkl:
2164         * WebCore.vcproj/WebCore.vcproj:
2165         * platform/text/StringBuilder.cpp: Added.
2166         (WebCore::StringBuilder::append):
2167         (WebCore::StringBuilder::toString):
2168         * platform/text/StringBuilder.h: Added.
2169         (WebCore::StringBuilder::StringBuilder):
2170         (WebCore::StringBuilder::isNull):
2171         Added a simple class to efficiently build a string by appending. Potentially, it can be
2172         extended to be more like java.lang.StringBuilder, but we don't need that much flexibility now.
2173
2174         * dom/Node.cpp:
2175         (WebCore::Node::appendTextContent):
2176         (WebCore::Node::textContent):
2177         * dom/Node.h:
2178         Changed to use StringBuilder.
2179
2180 2008-05-24  Julien Chaffraix  <jchaffraix@webkit.org>
2181
2182         Reviewed by Eric.
2183
2184         Bug 9191: JS*ElementWrapperFactory should be autogenerated
2185         https://bugs.webkit.org/show_bug.cgi?id=9191
2186
2187         This is a first pass for generation of JS*ElementWrapperFactory, in the long term we should move the make_names.pl
2188         intelligence to the *.in files.
2189
2190         - Add a new parameter to make_names.pl --wrapperFactory which works like --wrapper but generates the
2191         JS*ElementWrapperFactory files.
2192
2193         - Removed JS*ElementWrapperFactory files in WebCore/bindings/js, replaced by the generated ones.
2194
2195         - Updated the build systems to account for the previous changes.
2196
2197         * DerivedSources.make:
2198         * GNUmakefile.am:
2199         * WebCore.pro:
2200         * WebCore.vcproj/WebCore.vcproj:
2201         * WebCore.xcodeproj/project.pbxproj:
2202         * WebCoreSources.bkl:
2203         * bindings/js/JSHTMLElementWrapperFactory.cpp: Removed.
2204         * bindings/js/JSHTMLElementWrapperFactory.h: Removed.
2205         * bindings/js/JSSVGElementWrapperFactory.cpp: Removed.
2206         * bindings/js/JSSVGElementWrapperFactory.h: Removed.
2207         * dom/make_names.pl:
2208
2209 2008-05-24  Oleg Finkelshteyn <olegfink@gmail.com>
2210
2211         Rubber-stamped and landed by Alexey.
2212
2213         Build fix for gcc 4.3.
2214
2215         * WebCore/page/Console.cpp:
2216         Add missing standard includes.
2217
2218 2008-05-23  Timothy Hatcher  <timothy@apple.com>
2219
2220         Fixes a bug where a timer would keep firing after the Inspector
2221         was closed. It turns out this timer wasn't needed anymore now
2222         that we can add an event listener to the inspected page and have
2223         it get called in the Inspector's context.
2224
2225         https://bugs.webkit.org/show_bug.cgi?id=18577
2226
2227         Reviewed by Mark Rowe.
2228
2229         * page/inspector/ElementsPanel.js:
2230
2231 2008-05-23  Anthony Ricaud  <rik24d@gmail.com>
2232
2233         Changes the largerResourcesButton tooltip to toggle.
2234
2235         https://bugs.webkit.org/show_bug.cgi?id=19210
2236
2237         Reviewed by Tim Hatcher.
2238
2239         * WebCore/English.lproj/localizedStrings.js: New string and clean an
2240         double string "Dock to main window."
2241         * WebCore/page/inspector/ResourcesPanel.js: Toggle the tooltip and
2242         change the default tooltip
2243
2244 2008-05-23  Justin Garcia  <justin.garcia@apple.com>
2245
2246         Reviewed by Darin.
2247
2248         <rdar://problem/5939887> REGRESSION: With no selection, copy does not fire oncopy handler (affects CIFilterBrowser widget)
2249         
2250         Execute cut, copy and paste if they are invoked explicitly, via execCommand or -[WebView copy:], even
2251         if they are disabled.  This will fire oncopy, oncut and onpaste, but won't perform any other work, like
2252         writing to the pasteboard during cut/copy or deleting the selection during cut/paste.  This matches FF3,
2253         which actually goes further and fires oncopy on any Command-C.
2254         
2255         * editing/EditorCommand.cpp:
2256         (WebCore::CommandEntry::):
2257         (WebCore::Editor::Command::execute):
2258
2259 2008-05-23  Timothy Hatcher  <timothy@apple.com>
2260
2261         Adds a percentage toggle button the profile view status bar that
2262         changes the time columns between absolute and percents.
2263
2264         https://bugs.webkit.org/show_bug.cgi?id=19224
2265
2266         Reviewed by Kevin McCullough.
2267
2268         * English.lproj/localizedStrings.js: New strings.
2269         * page/inspector/Images/percentButtons.png: Added.
2270         * page/inspector/ProfileView.js: Make the button and add it to the
2271         status bar. Make clicking toggle the showAsPercent* properties.
2272         * page/inspector/inspector.css: New styles.
2273
2274 2008-05-23  Timothy Hatcher  <timothy@apple.com>
2275
2276         Fixes a bug where excluding nodes from the profile could
2277         show an empty parent node.
2278
2279         <rdar://problem/5959573> Excluding nodes from the profile could show
2280         an empty parent node
2281
2282         Reviewed by Kevin McCullough.
2283
2284         * page/inspector/ProfileView.js: Only say we have children if
2285         all of our children nodes are visible.
2286
2287 2008-05-23  Anders Carlsson  <andersca@apple.com>
2288
2289         Reviewed by Adam.
2290
2291         Add IconFetcher to project.
2292         
2293         * WebCore.vcproj/WebCore.vcproj:
2294
2295 2008-05-23  Timothy Hatcher  <timothy@apple.com>
2296
2297         Fixes a bug where the Web Insepctor would jump back to
2298         Elements each time it is opened instead of staying at the
2299         last selected panel.
2300
2301         <rdar://problem/5959475> Inspector jumps to the Elements panel
2302         each time it is opened, instead of staying at the previous panel
2303
2304         Reviewed by Adam Roben.
2305
2306         * page/InspectorController.cpp:
2307         (WebCore::InspectorController::setWindowVisible): Reset
2308         m_showAfterVisible to CurrentPanel, so the next time setWindowVisible
2309         is called it will use CurrentPanel unless showPanel was called again.
2310
2311 2008-05-23  chris fleizach  <cfleizach@apple.com>
2312
2313         Reviewed by Darin Adler.
2314
2315         <rdar://problem/5933759> REGRESSION: Frames don't appear as AX children of the top level web area
2316
2317         * page/AccessibilityRenderObject.cpp:
2318         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
2319
2320 2008-05-23  Ariya Hidayat  <ariya.hidayat@trolltech.com>
2321
2322         Reviewed by Simon.
2323
2324         For Qt port, support painting to native Windows HDC.
2325
2326         * platform/graphics/GraphicsContext.h:
2327         * platform/graphics/qt/GraphicsContextQt.cpp:
2328         (WebCore::GraphicsContext::getWindowsContext):
2329         (WebCore::GraphicsContext::releaseWindowsContext):
2330
2331 2008-05-23  Timothy Hatcher  <timothy@apple.com>
2332
2333         Fixes a bug where the Inspector could have 0ms timers firing
2334         even after it is closed.
2335
2336         https://bugs.webkit.org/show_bug.cgi?id=18577
2337
2338         Reviewed by Oliver Hunt.
2339
2340         * page/inspector/DatabasesPanel.js: Removes setTimeouts that call
2341         the same function with a 0ms delay. These we not doing any good anyway,
2342         so they weren't needed and just caused problems.
2343         * page/inspector/ElementsPanel.js: Ditto.
2344         * page/inspector/ProfilesPanel.js: Ditto.
2345         * page/inspector/ResourcesPanel.js: Ditto.
2346
2347 2008-05-23  Timothy Hatcher  <timothy@apple.com>
2348
2349         Make the Inspector correctly populate the profiles when
2350         closed and re-opened.
2351
2352         Reviewed by Adam Roben.
2353
2354         * page/InspectorController.cpp:
2355         (WebCore::InspectorController::populateScriptObjects): Call populateInterface
2356         in inspector.js.
2357         * page/inspector/ProfilesPanel.js:
2358         (WebInspector.ProfilesPanel.prototype.populateInterface): If visible,
2359         call _populateProfiles. Else just set this._shouldPopulateProfiles to true.
2360         (WebInspector.ProfilesPanel.prototype.reset): Don't call _populateProfiles.
2361         Just set this._shouldPopulateProfiles to true.
2362         (WebInspector.ProfilesPanel.prototype._populateProfiles): Delete
2363         this._shouldPopulateProfiles.
2364         * page/inspector/inspector.js:
2365         (WebInspector.populateInterface): Added. Call populateInterface on all the
2366         panels if they implement it.
2367
2368 2008-05-23  Kevin McCullough  <kmccullough@apple.com>
2369
2370         RS = Adam.
2371
2372         Editorial changes
2373
2374         * manual-tests/inspector/profiler-test-apply.html:
2375         * manual-tests/inspector/profiler-test-document-dot-write.html:
2376         * manual-tests/inspector/profiler-test-execution-context-and-eval-on-same-line.html:
2377         * manual-tests/inspector/profiler-test-one-execution-context.html:
2378         * manual-tests/inspector/profiler-test-two-execution-contexts.html:
2379
2380 2008-05-23  Timothy Hatcher  <timothy@apple.com>
2381
2382         Fixes the bug where the profile was not added when finished.
2383
2384         <rdar://problem/5958851> Stop Profiling from the Develop menu does
2385         not add the Profile to the Inspector
2386
2387         Reviewed by Adam Roben.
2388
2389         * page/InspectorController.cpp:
2390         (WebCore::InspectorController::stopUserInitiatedProfiling): Call
2391         addProfile with the result of stopProfiling.
2392
2393 2008-05-23  Timothy Hatcher  <timothy@apple.com>
2394
2395         Tweak the Web Insector toolbar look to be smaller when attached to
2396         the inspected page.
2397
2398         Reviewed by Adam Roben.
2399
2400         * page/inspector/inspector.css:
2401
2402 2008-05-23  Simon Hausmann  <hausmann@webkit.org>
2403
2404         Fix compilation without accessibility by providing an empty stub for
2405         AXObjectCache::handleAriaRoleChanged.
2406
2407         * page/AXObjectCache.h:
2408
2409 2008-05-23  Alice Liu  <alice.liu@apple.com>
2410
2411         Reviewed by Mark Rowe.
2412
2413         Remove call to function whose body was commented out. Returning the
2414         children for a menu button by the normal calculation works just as well. 
2415
2416         * page/AccessibilityRenderObject.cpp:
2417         (WebCore::AccessibilityRenderObject::addChildren):
2418         * page/AccessibilityRenderObject.h:
2419
2420 2008-05-22  Timothy Hatcher  <timothy@apple.com>
2421
2422         Fixes the bug where resource would show up multiple times in the
2423         Inspector. This happened when a resource was used multiple times or
2424         when the preloader was scanning ahead to fetch resources.
2425
2426         <rdar://problem/5689373> Cached resources re-appear in Web Inspector
2427         for each access (18223)
2428
2429         Reviewed by Adam Roben.
2430
2431         * page/InspectorController.cpp:
2432         (WebCore::InspectorController::addResource): Add the URL to m_knownResources.
2433         (WebCore::InspectorController::removeResource): Remove the URL from m_knownResources
2434         (WebCore::InspectorController::didLoadResourceFromMemoryCache): If the URL
2435         is in m_knownResources, then early return.
2436         * page/InspectorController.h: Added m_knownResources.
2437
2438 2008-05-22  Alice Liu  <alice.liu@apple.com>
2439
2440         Reviewed by Adele, Dan Bernstein.
2441
2442         Fixed <rdar://problem/5943104> Need to implement ARIA role="menu" and related roles
2443         <rdar://problem/5943132> Need to implement ARIA role="menuitem"
2444         <rdar://problem/5943173> Need to implement ARIA role="menubar" 
2445
2446         These changes added a handler for determining the ARIA role when the
2447         attribute changes.  Before we were querying for the attribute over and
2448         over every time we queried for the role.
2449         * dom/Element.cpp:
2450         (WebCore::Element::attributeChanged):
2451         * page/AXObjectCache.cpp:
2452         (WebCore::AXObjectCache::handleAriaRoleChanged):
2453         * page/AXObjectCache.h:
2454
2455         The rest of these changes implement menu, menuitem, and menubar. the last 2 of those
2456         have to, for now, be represented as a Group and MenuButton instead, because AppKit 
2457         won't recognize menubar and menubaritems within apps. 
2458         * page/AccessibilityObject.h:
2459         (WebCore::AccessibilityObject::isMenuRelated):
2460         (WebCore::AccessibilityObject::isMenu):
2461         (WebCore::AccessibilityObject::isMenuBar):
2462         (WebCore::AccessibilityObject::isMenuButton):
2463         (WebCore::AccessibilityObject::isMenuItem):
2464         * page/AccessibilityRenderObject.cpp:
2465         (WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
2466         (WebCore::AccessibilityRenderObject::parentObject):
2467         (WebCore::AccessibilityRenderObject::isMenuRelated):
2468         (WebCore::AccessibilityRenderObject::isMenu):
2469         (WebCore::AccessibilityRenderObject::isMenuBar):
2470         (WebCore::AccessibilityRenderObject::isMenuButton):
2471         (WebCore::AccessibilityRenderObject::isMenuItem):
2472         (WebCore::siblingWithAriaRole):
2473         (WebCore::AccessibilityRenderObject::menuElementForMenuButton):
2474         (WebCore::AccessibilityRenderObject::menuForMenuButton):
2475         (WebCore::AccessibilityRenderObject::menuItemElementForMenu):
2476         (WebCore::AccessibilityRenderObject::menuButtonForMenu):
2477         (WebCore::AccessibilityRenderObject::title):
2478         (WebCore::AccessibilityRenderObject::accessibilityShouldUseUniqueId):
2479         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
2480         (WebCore::RoleEntry::):
2481         (WebCore::AccessibilityRenderObject::determineAriaRoleAttribute):
2482         (WebCore::AccessibilityRenderObject::setAriaRole):
2483         (WebCore::AccessibilityRenderObject::ariaRoleAttribute):
2484         (WebCore::AccessibilityRenderObject::addChildren):
2485         (WebCore::AccessibilityRenderObject::ariaMenuButtonChildren):
2486         * page/AccessibilityRenderObject.h:
2487         * page/mac/AccessibilityObjectWrapper.mm:
2488         (-[AccessibilityObjectWrapper accessibilityActionNames]):
2489         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
2490         (-[AccessibilityObjectWrapper roleDescription]):
2491         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
2492         (-[AccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
2493
2494 2008-05-22  Adam Roben  <aroben@apple.com>
2495
2496         Make top-level resources show their full URLs again instead of just
2497         "/"
2498
2499         Reviewed by Tim Hatcher.
2500
2501         * page/inspector/Resource.js:
2502         (WebInspector.Resource.prototype.displayName): If the title has gotten
2503         down to just "/", which will happen for, e.g., http://webkit.org/,
2504         just show the entire URL.
2505
2506 2008-05-22  Timothy Hatcher  <timothy@apple.com>
2507
2508         Shorten URLs shown in the Web Inspector to the file name. This makes
2509         finding files in the Console or the Scripts panel easier.
2510
2511         Reviewed by Adam Roben.
2512
2513         * page/inspector/Console.js:
2514         (WebInspector.ConsoleMessage.prototype.get shortURL): Removed dead code.
2515         (WebInspector.ConsoleMessage.prototype.toMessageElement): Call WebInspector.displayNameForURL
2516         for the URL before making the link element.
2517         * page/inspector/ProfileView.js:
2518         (WebInspector.ProfileDataGridNode.prototype.createCell): Use WebInspector.displayNameForURL.
2519         * page/inspector/Resource.js:
2520         (WebInspector.Resource.prototype.get displayName): Use trimURL to
2521         trim the URL with the main resource's domain.
2522         * page/inspector/ScriptsPanel.js:
2523         (WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu): Use WebInspector.displayNameForURL.
2524         * page/inspector/StylesSidebarPane.js:
2525         (WebInspector.StylePropertiesSection): Ditto.
2526         * page/inspector/inspector.js:
2527         (WebInspector.displayNameForURL): Added.
2528         (WebInspector.resourceForURL): Check for a direct match in resourceURLMap first.
2529
2530 2008-05-22  Adam Roben  <aroben@apple.com>
2531
2532         Fix Bug 19204: Inspector should highlight source lines when following
2533         links to them
2534
2535         <https://bugs.webkit.org/show_bug.cgi?id=19204>
2536
2537         Reviewed by Tim Hatcher.
2538
2539         Test: manual-tests/inspector/highlight-source-line.html
2540
2541         * manual-tests/inspector/highlight-source-line.html: Added.
2542         * page/inspector/ResourcesPanel.js:
2543         (WebInspector.ResourcesPanel.prototype.showResource): Call
2544         highlightLine on the view if that function exists.
2545         * page/inspector/SourceFrame.js:
2546         (WebInspector.SourceFrame.prototype.highlightLine): Added. Adds the
2547         webkit-highlighted-line class to the relevant line, then removes it
2548         after a short delay.
2549         (WebInspector.SourceFrame.prototype._loaded): Added styles for the
2550         highlighted line(s).
2551         * page/inspector/SourceView.js:
2552         (WebInspector.SourceView.prototype.highlightLine): Added. Calls
2553         through to the SourceFrame.
2554
2555 2008-05-22  Rob Buis  <buis@kde.org>
2556
2557         Reviewed by Eric.
2558
2559         https://bugs.webkit.org/show_bug.cgi?id=12053
2560         SVGPathSeg*(Abs|Rel) classses should be combined to reduce code size
2561
2562         Reduce code size through shared base classes.
2563
2564         * svg/SVGPathSeg.h:
2565         (WebCore::SVGPathSegSingleCoord::SVGPathSegSingleCoord):
2566         (WebCore::SVGPathSegSingleCoord::setX):
2567         (WebCore::SVGPathSegSingleCoord::x):
2568         (WebCore::SVGPathSegSingleCoord::setY):
2569         (WebCore::SVGPathSegSingleCoord::y):
2570         (WebCore::SVGPathSegSingleCoord::toString):
2571         * svg/SVGPathSegArc.cpp:
2572         (WebCore::SVGPathSegArcAbs::SVGPathSegArcAbs):
2573         (WebCore::SVGPathSegArcRel::SVGPathSegArcRel):
2574         * svg/SVGPathSegArc.h:
2575         (WebCore::SVGPathSegArc::SVGPathSegArc):
2576         (WebCore::SVGPathSegArc::toString):
2577         (WebCore::SVGPathSegArc::setX):
2578         (WebCore::SVGPathSegArc::x):
2579         (WebCore::SVGPathSegArc::setY):
2580         (WebCore::SVGPathSegArc::y):
2581         (WebCore::SVGPathSegArc::setR1):
2582         (WebCore::SVGPathSegArc::r1):
2583         (WebCore::SVGPathSegArc::setR2):
2584         (WebCore::SVGPathSegArc::r2):
2585         (WebCore::SVGPathSegArc::setAngle):
2586         (WebCore::SVGPathSegArc::angle):
2587         (WebCore::SVGPathSegArc::setLargeArcFlag):
2588         (WebCore::SVGPathSegArc::largeArcFlag):
2589         (WebCore::SVGPathSegArc::setSweepFlag):
2590         (WebCore::SVGPathSegArc::sweepFlag):
2591         (WebCore::SVGPathSegArcAbs::create):
2592         (WebCore::SVGPathSegArcAbs::pathSegType):
2593         (WebCore::SVGPathSegArcAbs::pathSegTypeAsLetter):
2594         (WebCore::SVGPathSegArcRel::create):
2595         (WebCore::SVGPathSegArcRel::pathSegTypeAsLetter):
2596         * svg/SVGPathSegCurvetoCubic.cpp:
2597         (WebCore::SVGPathSegCurvetoCubicAbs::SVGPathSegCurvetoCubicAbs):
2598         (WebCore::SVGPathSegCurvetoCubicRel::SVGPathSegCurvetoCubicRel):
2599         * svg/SVGPathSegCurvetoCubic.h:
2600         (WebCore::SVGPathSegCurvetoCubic::SVGPathSegCurvetoCubic):
2601         (WebCore::SVGPathSegCurvetoCubic::toString):
2602         (WebCore::SVGPathSegCurvetoCubic::setX):
2603         (WebCore::SVGPathSegCurvetoCubic::x):
2604         (WebCore::SVGPathSegCurvetoCubic::setY):
2605         (WebCore::SVGPathSegCurvetoCubic::y):
2606         (WebCore::SVGPathSegCurvetoCubic::setX1):
2607         (WebCore::SVGPathSegCurvetoCubic::x1):
2608         (WebCore::SVGPathSegCurvetoCubic::setY1):
2609         (WebCore::SVGPathSegCurvetoCubic::y1):
2610         (WebCore::SVGPathSegCurvetoCubic::setX2):
2611         (WebCore::SVGPathSegCurvetoCubic::x2):
2612         (WebCore::SVGPathSegCurvetoCubic::setY2):
2613         (WebCore::SVGPathSegCurvetoCubic::y2):
2614         (WebCore::SVGPathSegCurvetoCubicAbs::create):
2615         (WebCore::SVGPathSegCurvetoCubicAbs::pathSegType):
2616         (WebCore::SVGPathSegCurvetoCubicAbs::pathSegTypeAsLetter):
2617         (WebCore::SVGPathSegCurvetoCubicRel::create):
2618         (WebCore::SVGPathSegCurvetoCubicRel::pathSegTypeAsLetter):
2619         * svg/SVGPathSegCurvetoCubicSmooth.cpp:
2620         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::SVGPathSegCurvetoCubicSmoothAbs):
2621         (WebCore::SVGPathSegCurvetoCubicSmoothRel::SVGPathSegCurvetoCubicSmoothRel):
2622         * svg/SVGPathSegCurvetoCubicSmooth.h:
2623         (WebCore::SVGPathSegCurvetoCubicSmooth::SVGPathSegCurvetoCubicSmooth):
2624         (WebCore::SVGPathSegCurvetoCubicSmooth::toString):
2625         (WebCore::SVGPathSegCurvetoCubicSmooth::setX):
2626         (WebCore::SVGPathSegCurvetoCubicSmooth::x):
2627         (WebCore::SVGPathSegCurvetoCubicSmooth::setY):
2628         (WebCore::SVGPathSegCurvetoCubicSmooth::y):
2629         (WebCore::SVGPathSegCurvetoCubicSmooth::setX2):
2630         (WebCore::SVGPathSegCurvetoCubicSmooth::x2):
2631         (WebCore::SVGPathSegCurvetoCubicSmooth::setY2):
2632         (WebCore::SVGPathSegCurvetoCubicSmooth::y2):
2633         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::create):
2634         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::pathSegType):
2635         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::pathSegTypeAsLetter):
2636         (WebCore::SVGPathSegCurvetoCubicSmoothRel::create):
2637         (WebCore::SVGPathSegCurvetoCubicSmoothRel::pathSegType):
2638         (WebCore::SVGPathSegCurvetoCubicSmoothRel::pathSegTypeAsLetter):
2639         * svg/SVGPathSegCurvetoQuadratic.cpp:
2640         (WebCore::SVGPathSegCurvetoQuadraticAbs::SVGPathSegCurvetoQuadraticAbs):
2641         (WebCore::SVGPathSegCurvetoQuadraticRel::SVGPathSegCurvetoQuadraticRel):
2642         * svg/SVGPathSegCurvetoQuadratic.h:
2643         (WebCore::SVGPathSegCurvetoQuadratic::SVGPathSegCurvetoQuadratic):
2644         (WebCore::SVGPathSegCurvetoQuadratic::toString):
2645         (WebCore::SVGPathSegCurvetoQuadratic::setX):
2646         (WebCore::SVGPathSegCurvetoQuadratic::x):
2647         (WebCore::SVGPathSegCurvetoQuadratic::setY):
2648         (WebCore::SVGPathSegCurvetoQuadratic::y):
2649         (WebCore::SVGPathSegCurvetoQuadratic::setX1):
2650         (WebCore::SVGPathSegCurvetoQuadratic::x1):
2651         (WebCore::SVGPathSegCurvetoQuadratic::setY1):
2652         (WebCore::SVGPathSegCurvetoQuadratic::y1):
2653         (WebCore::SVGPathSegCurvetoQuadraticAbs::create):
2654         (WebCore::SVGPathSegCurvetoQuadraticAbs::pathSegType):
2655         (WebCore::SVGPathSegCurvetoQuadraticAbs::pathSegTypeAsLetter):
2656         (WebCore::SVGPathSegCurvetoQuadraticRel::create):
2657         (WebCore::SVGPathSegCurvetoQuadraticRel::pathSegType):
2658         (WebCore::SVGPathSegCurvetoQuadraticRel::pathSegTypeAsLetter):
2659         * svg/SVGPathSegCurvetoQuadraticSmooth.cpp:
2660         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::SVGPathSegCurvetoQuadraticSmoothAbs):
2661         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::SVGPathSegCurvetoQuadraticSmoothRel):
2662         * svg/SVGPathSegCurvetoQuadraticSmooth.h:
2663         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::create):
2664         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::pathSegTypeAsLetter):
2665         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::create):
2666         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::pathSegTypeAsLetter):
2667         * svg/SVGPathSegLineto.cpp:
2668         (WebCore::SVGPathSegLinetoAbs::SVGPathSegLinetoAbs):
2669         (WebCore::SVGPathSegLinetoRel::SVGPathSegLinetoRel):
2670         * svg/SVGPathSegLineto.h:
2671         (WebCore::SVGPathSegLinetoAbs::create):
2672         (WebCore::SVGPathSegLinetoAbs::pathSegTypeAsLetter):
2673         (WebCore::SVGPathSegLinetoRel::pathSegTypeAsLetter):
2674         * svg/SVGPathSegLinetoHorizontal.cpp:
2675         (WebCore::SVGPathSegLinetoHorizontalAbs::SVGPathSegLinetoHorizontalAbs):
2676         (WebCore::SVGPathSegLinetoHorizontalRel::SVGPathSegLinetoHorizontalRel):
2677         * svg/SVGPathSegLinetoHorizontal.h:
2678         (WebCore::SVGPathSegLinetoHorizontal::SVGPathSegLinetoHorizontal):
2679         (WebCore::SVGPathSegLinetoHorizontal::toString):
2680         (WebCore::SVGPathSegLinetoHorizontal::setX):
2681         (WebCore::SVGPathSegLinetoHorizontal::x):
2682         (WebCore::SVGPathSegLinetoHorizontalAbs::create):
2683         (WebCore::SVGPathSegLinetoHorizontalAbs::pathSegTypeAsLetter):
2684         (WebCore::SVGPathSegLinetoHorizontalRel::create):
2685         (WebCore::SVGPathSegLinetoHorizontalRel::pathSegTypeAsLetter):
2686         * svg/SVGPathSegLinetoVertical.cpp:
2687         (WebCore::SVGPathSegLinetoVerticalAbs::SVGPathSegLinetoVerticalAbs):
2688         (WebCore::SVGPathSegLinetoVerticalRel::SVGPathSegLinetoVerticalRel):
2689         * svg/SVGPathSegLinetoVertical.h:
2690         (WebCore::SVGPathSegLinetoVertical::SVGPathSegLinetoVertical):
2691         (WebCore::SVGPathSegLinetoVertical::toString):
2692         (WebCore::SVGPathSegLinetoVertical::setY):
2693         (WebCore::SVGPathSegLinetoVertical::y):
2694         (WebCore::SVGPathSegLinetoVerticalAbs::create):
2695         (WebCore::SVGPathSegLinetoVerticalAbs::pathSegTypeAsLetter):
2696         (WebCore::SVGPathSegLinetoVerticalRel::create):
2697         (WebCore::SVGPathSegLinetoVerticalRel::pathSegTypeAsLetter):
2698         * svg/SVGPathSegMoveto.cpp:
2699         (WebCore::SVGPathSegMovetoAbs::SVGPathSegMovetoAbs):
2700         (WebCore::SVGPathSegMovetoRel::SVGPathSegMovetoRel):
2701         * svg/SVGPathSegMoveto.h:
2702         (WebCore::SVGPathSegMovetoAbs::create):
2703         (WebCore::SVGPathSegMovetoAbs::pathSegTypeAsLetter):
2704         (WebCore::SVGPathSegMovetoRel::create):
2705         (WebCore::SVGPathSegMovetoRel::pathSegTypeAsLetter):
2706
2707 2008-05-22  Alp Toker  <alp@nuanti.com>
2708
2709         GTK+/DirectFB build fix attempt.
2710
2711         * plugins/PluginDatabase.cpp:
2712         (WebCore::PluginDatabase::isPreferredPluginDirectory):
2713         * plugins/gtk/PluginDatabaseGtk.cpp:
2714         (WebCore::PluginDatabase::isPreferredPluginDirectory):
2715
2716 2008-05-22  Timothy Hatcher  <timothy@apple.com>
2717
2718         Adds Focus, Exclude and Restore buttons to the Profile view
2719         Status bar. Also adds a Record button to create new profiles.
2720
2721         <rdar://problem/5950867> JSProfiler: Allow the profiler to "Focus" a profile node.
2722         <rdar://problem/5951529> JSProfiler: Allow the profiler to "Exclude" a profile node.
2723
2724         Reviewed by Adam Roben.
2725
2726         * English.lproj/localizedStrings.js: Added new strings.
2727         * page/JavaScriptProfile.cpp:
2728         (WebCore::restoreAll): Call Profile::restoreAll.
2729         (WebCore::ProfileClass): Added restoreAll to the static functions.
2730         * page/inspector/Images/excludeButtons.png: Added.
2731         * page/inspector/Images/focusButtons.png: Added.
2732         * page/inspector/Images/recordButtons.png: Added.
2733         * page/inspector/Images/reloadButtons.png: Added.
2734         * page/inspector/ProfileView.js:
2735         (WebInspector.ProfileView): Create the buttons elements.
2736         (WebInspector.ProfileView.prototype.get statusBarItems): Return the three
2737         status bar buttons.
2738         (WebInspector.ProfileView.prototype.refresh): Only create ProfileDataGridNodes
2739         for ProfileNodes that are visible.
2740         (WebInspector.ProfileView.prototype.refreshShowAsPercents): Just call
2741         refresh on the children, now that they have access to the ProfileView's properties.
2742         (WebInspector.ProfileView.prototype._focusClicked): Call focus
2743         on the profile, refresh the ProfileView and show the reset button.
2744         (WebInspector.ProfileView.prototype._excludeClicked): Call exclude
2745         on the profile, refresh the ProfileView and show the reset button.
2746         (WebInspector.ProfileView.prototype._resetClicked): Call restoreAll
2747         on the profile, refresh the ProfileView and hide the reset button.
2748         (WebInspector.ProfileView.prototype._dataGridNodeSelected): Enable the 
2749         focus and exclude buttons.
2750         (WebInspector.ProfileView.prototype._dataGridNodeDeselected): Disable the
2751         focus and exclude buttons.
2752         (WebInspector.ProfileDataGridNode): Take a ProfileView, and remove the 
2753         showPercentAs* arguments.
2754         * page/inspector/ProfilesPanel.js: Add a record status bar button and
2755         th ability to have per-view status bar buttons.
2756         * page/inspector/inspector.css: New styles.
2757
2758 2008-05-22  Mark Rowe  <mrowe@apple.com>
2759
2760         Reviewed by Tim Hatcher.
2761
2762         <rdar://problem/5956612> ibtool crashes during build
2763
2764         SCDynamicStoreCreate will return null if it cannot create a dynamic store object.  We need
2765         to check for failure rather than continuing with a null store as this results in us
2766         passing a null CFRunLoopSourceRef to CFRunLoopAddSource, which promptly crashes.
2767
2768         * platform/network/mac/NetworkStateNotifierMac.cpp:
2769         (WebCore::NetworkStateNotifier::NetworkStateNotifier): Null check SCDynamicStoreCreate and
2770         SCDynamicStoreCreateRunLoopSource as it is possible for them to fail.
2771
2772 2008-05-22  Adam Roben  <aroben@apple.com>
2773
2774         Add a test for calling a NodeList as a function while profiling
2775
2776         Reviewed by Kevin McCullough.
2777
2778         * manual-tests/inspector/profiler-test-call-nodelist-as-function.html: Added.
2779
2780 2008-05-22  Kevin McCullough  <kmccullough@apple.com>
2781
2782         Rubber stamped by Adam.
2783
2784         -Added new profiler tests.
2785
2786         * manual-tests/inspector/profiler-test-calling-the-function-that-started-the-profiler-from-another-scope.html: Added.
2787         * manual-tests/inspector/profiler-test-constructor.html: Added.
2788         * manual-tests/inspector/profiler-test-document-dot-write.html: Added.
2789         * manual-tests/inspector/profiler-test-simple-no-level-change.html: Added.
2790         * manual-tests/inspector/profiler-test-throw-exception-from-eval.html: Added.
2791         * manual-tests/inspector/profiler-test-window-dot-eval.html: Added.
2792
2793 2008-05-22  Kevin McCullough  <kmccullough@apple.com>
2794
2795         Reviewed by Tim.
2796
2797         <rdar://problem/5951529> JSProfiler: Allow the profiler to "Exclude" a
2798         profile node.
2799         -Expose the 'exclude' function to the WebInspector.
2800         -Also fix a bug with 'focus' and expose whether or not a node is visible
2801
2802         * page/JavaScriptProfile.cpp: Renamed profileClass to have a capital P.
2803         (WebCore::getTitleCallback):
2804         (WebCore::getHeadCallback):
2805         (WebCore::focus): Now correctly compares against a ProfileNodeClass
2806         instead of ProfileClass.
2807         (WebCore::exclude): Expose 'exclude' function to the WebInspector.
2808         (WebCore::ProfileClass):
2809         (WebCore::toJS):
2810         * page/JavaScriptProfileNode.cpp: Declare the ProfileNodeClass in the
2811         header so that ProfileClass can use it.
2812         (WebCore::getVisible): Expose a node's visiblity to the WebInspector.
2813         (WebCore::ProfileNodeClass):
2814         * page/JavaScriptProfileNode.h:
2815
2816 2008-05-22  Sam Weinig  <sam@webkit.org>
2817
2818         Reviewed by Anders Carlsson.
2819
2820         <rdar://problem/5838772> Support cross-site XMLHttpRequest
2821
2822         - Implement support for cross-site non-GET requests using the HTTP header
2823           Access-control mechanism.
2824
2825         Tests: http/tests/xmlhttprequest/access-control-basic-allow-async.html
2826                http/tests/xmlhttprequest/access-control-basic-not-get-allow-async.html
2827                http/tests/xmlhttprequest/access-control-basic-not-get-allow.html
2828
2829         * xml/XMLHttpRequest.cpp:
2830         (WebCore::XMLHttpRequest::XMLHttpRequest):
2831         (WebCore::XMLHttpRequest::send):
2832         Don't continue send if inside the method check preflight (only happens for async).
2833         
2834         (WebCore::XMLHttpRequest::crossSiteAccessRequest):
2835         Add support for non-GET requests, starting off a method check preflight.
2836
2837         (WebCore::XMLHttpRequest::handleAsynchronousMethodCheckResult):
2838         Handler for finishing up after an asynchronous method check has completed.
2839
2840         (WebCore::XMLHttpRequest::didFinishLoading):
2841         (WebCore::XMLHttpRequest::didFinishLoadingMethodCheck):
2842         (WebCore::XMLHttpRequest::didReceiveResponse):
2843         (WebCore::XMLHttpRequest::didReceiveResponseMethodCheck):
2844         (WebCore::XMLHttpRequest::didReceiveData):
2845         Do a limited set of access control when in the method check preflight.
2846         * xml/XMLHttpRequest.h:
2847
2848 2008-05-22  Timothy Hatcher  <timothy@apple.com>
2849
2850         Make sure we don't call findTreeElement with the same representedObject
2851         again, to prevent infinite recursion. Added many comments to this
2852         code so it can be understood later.
2853
2854         https://bugs.webkit.org/show_bug.cgi?id=19164
2855
2856         Reviewed by Adam Roben.
2857
2858         * page/inspector/treeoutline.js:
2859
2860 2008-05-22  Timothy Hatcher  <timothy@apple.com>
2861
2862         Re-word the "Attach Debugger" overlay to never say "Attach". The new
2863         wording is "Start Debugging". This makes the overlay consistent with
2864         other wording used for starting the debugger. Also fixes the tooltips
2865         for the Pause on Exceptions button.
2866
2867         Reviewed by Adam Roben and Dan Bernstein.
2868
2869         * English.lproj/localizedStrings.js: Adds new strings.
2870         * page/inspector/ScriptsPanel.js: Changes the wording. Flips the
2871         tooltips for the Pause on Exceptions buttons so the tooltip says
2872         what will happen when the button is pressed.
2873
2874 2008-05-22  Timothy Hatcher  <timothy@apple.com>
2875
2876         Remove some non-functional elements from the Scripts panel
2877         so they don't confuse users why they aren't working.
2878
2879         Reviewed by Adam Roben.
2880
2881         * page/inspector/ScriptsPanel.js: Removes the back/forward buttons
2882         and the function menu.
2883         * page/inspector/inspector.css: Make the files menu wider since there
2884         is more room now.
2885
2886 2008-05-22  Timothy Hatcher  <timothy@apple.com>
2887
2888         <rdar://problem/5956403> Update the Develop menu to match the new Inspector items
2889
2890         Reviewed by Adam Roben.
2891
2892         * English.lproj/localizedStrings.js:
2893         * WebCore.base.exp:
2894         * page/InspectorController.cpp:
2895         (WebCore::InspectorController::InspectorController):
2896         (WebCore::InspectorController::inspect):
2897         (WebCore::InspectorController::setWindowVisible):
2898         (WebCore::InspectorController::showPanel):
2899         (WebCore::InspectorController::startUserInitiatedProfiling):
2900         (WebCore::InspectorController::stopUserInitiatedProfiling):
2901         (WebCore::InspectorController::startDebuggingAndReloadInspectedPage):
2902         (WebCore::InspectorController::stopDebugging):
2903         * page/InspectorController.h:
2904         (WebCore::InspectorController::):
2905         (WebCore::InspectorController::isRecordingUserInitiatedProfile):
2906         * page/inspector/ProfilesPanel.js:
2907         * page/inspector/ScriptsPanel.js:
2908         * page/inspector/inspector.js:
2909
2910 2008-05-22  Josh Aas  <joshmoz@gmail.com>
2911
2912         Reviewed by Anders.
2913
2914         <rdar://problem/5956429> 
2915         https://bugs.webkit.org/show_bug.cgi?id=19192
2916         remove NPNVpluginEventModel, fix example plugin
2917         
2918         Remove NPNVpluginEventModel enum variable.
2919         
2920         * bridge/npapi.h:
2921
2922 2008-05-22  Stephanie Lewis  <slewis@apple.com>
2923
2924         Reviewed by Dan.
2925
2926         Fix <rdar://problem/5952405>.  The unbeforeunload count cannot be cleared when it is dispatched because it is possible to be called again.  Clear it after the unload event is dispatched.
2927
2928         Test: fast/events/onunload-clears-onbeforeunload.html
2929
2930         * loader/FrameLoader.cpp:
2931         (WebCore::FrameLoader::stopLoading):
2932         * page/Frame.cpp:
2933         (WebCore::Frame::shouldClose):
2934
2935 2008-05-22  Simon Hausmann  <hausmann@webkit.org>
2936
2937         Reviewed by Oliver.
2938
2939         Qt build fix.
2940
2941         * bindings/js/StringSourceProvider.h: Remove text at end of
2942         preprocessor statement.
2943         * bridge/qt/qt_instance.cpp:
2944         (KJS::Bindings::QtRuntimeObjectImp::getConstructData): Replaced
2945         implementsConstruct() with getConstructData().
2946         (KJS::Bindings::QtInstance::getCallData): Replaced implementsCall with
2947         getCallData().
2948         (KJS::Bindings::QtInstance::invokeDefaultMethod): Use getCallData()
2949         instead of implementsCall().
2950         * bridge/qt/qt_instance.h:
2951
2952 2008-05-22  Adam Roben  <aroben@apple.com>
2953
2954         Massively speed up date-format-tofte with the debugger attached
2955
2956         On a debug Windows build (I know, hardly a good testcase) this patch
2957         makes this test run 57.25x as fast.
2958
2959         Reviewed by Mark Rowe.
2960
2961         * page/inspector/ScriptsPanel.js:
2962         (WebInspector.ScriptsPanel.prototype.reset): Clear the
2963         _scriptsForURLsInFilesSelect object.
2964         (WebInspector.ScriptsPanel.prototype._showScriptOrResource): Instead
2965         of looping over all the options in the select to find the option we
2966         want, get the script object from _scriptsForURLsInFilesSelect and get
2967         the option element from the script object.
2968         (WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu): Use
2969         _scriptsForURLsInFilesSelect to cache the script objects. Store the
2970         option element for each script on the script object so we can quickly
2971         retrieve it later.
2972
2973 2008-05-22  Adam Roben  <aroben@apple.com>
2974
2975         Remove some dead code from ScriptsPanel.js
2976
2977         Reviewed by Mark Rowe.
2978
2979         * page/inspector/ScriptsPanel.js:
2980
2981 2008-05-21  Adam Roben  <aroben@apple.com>
2982
2983         Fix Bug 19178: Inspector should support sorting resources by latency
2984
2985         <https://bugs.webkit.org/show_bug.cgi?id=19178>
2986
2987         I replaced "Sort by Time" with the following sorting options:
2988           - Sort by Start Time
2989           - Sort by Response Time
2990           - Sort by End Time
2991           - Sort by Duration
2992           - Sort by Latency
2993
2994         You can no longer sort by Size when looking at the Time graph, and you
2995         can't use any of the time-based sorting functions when looking at the
2996         Size graph.
2997
2998         Reviewed by Tim Hatcher.
2999
3000         * page/inspector/Resource.js:
3001         (WebInspector.Resource.prototype.get duration): Added.
3002         (WebInspector.Resource.prototype.get latency): Added.
3003         (WebInspector.Resource.CompareByStartTime): Added.
3004         (WebInspector.Resource.CompareByResponseReceivedTime): Added.
3005         (WebInspector.Resource.CompareByEndTime): Added.
3006         (WebInspector.Resource.CompareByDuration): Added.
3007         (WebInspector.Resource.CompareByLatency): Added.
3008         * page/inspector/ResourcesPanel.js:
3009         (WebInspector.ResourcesPanel):
3010           - Each graph sidebar item now holds a list of sorting options
3011           - Graph sidebar items no longer have a calculator property. This is
3012             stored on the sorting options instead, to allow each kind of
3013             sorting to have a different calculator.
3014           - The sortingSelectElement starts out empty, and is populated in
3015             _graphSelected
3016           - The sortingFunction starts out uninitialized and is set as a
3017             side-effect of _graphSelected.
3018         (WebInspector.ResourcesPanel.prototype.set calculator): Don't do
3019         anything if the calculator hasn't changed.
3020         (WebInspector.ResourcesPanel.prototype.closeVisibleResource): Use the
3021         _lastSelectedGraphTreeElement property instead of getting the graph
3022         element from the calculator.
3023         (WebInspector.ResourcesPanel.prototype._graphSelected):
3024           - Store the tree element in the _lastSelectedGraphTreeElement
3025             property
3026           - Popuplate sortingSelectElement with the sortingOptions and select
3027             the option that was last selected
3028         (WebInspector.ResourcesPanel.prototype._changeSortingFunction): Set
3029         our calculator from the sorting option.
3030         (WebInspector.ResourceTimeCalculator): Renamed from
3031         ResourceTransferTimeCalculator. Now takes a parameter to specify
3032         whether the bars should all start at zero.
3033         (WebInspector.ResourceTimeCalculator.prototype.computeBarGraphPercentages):
3034         Take this.startAtZero into account.
3035         (WebInspector.ResourceTimeCalculator.prototype.updateBoundries):
3036         Abstracted the lower/upper bounds of a resource into methods.
3037         (WebInspector.ResourceTimeCalculator.prototype._lowerBound): Added.
3038         (WebInspector.ResourceTimeCalculator.prototype._upperBound): Added.
3039         (WebInspector.ResourceTransferTimeCalculator): Added. This is now a
3040         subclass of ResourceTimeCalculator
3041         (WebInspector.ResourceTransferDurationCalculator): Added.
3042         (WebInspector.ResourceSidebarTreeElement.CompareByAscendingStartTime): Added.
3043         (WebInspector.ResourceSidebarTreeElement.CompareByAscendingResponseReceivedTime): Added.
3044         (WebInspector.ResourceSidebarTreeElement.CompareByAscendingEndTime): Added.
3045         (WebInspector.ResourceSidebarTreeElement.CompareByDescendingDuration): Added.
3046         (WebInspector.ResourceSidebarTreeElement.CompareByDescendingLatency): Added.
3047         (WebInspector.ResourceSidebarTreeElement.CompareByDescendingSize):
3048         Changed to call CompareBySize.
3049
3050 2008-05-21  Adam Roben  <aroben@apple.com>
3051
3052         Fix Bug 19173: Tool tips for Inspector debugger status bar buttons are
3053         wrong/missing
3054
3055         <https://bugs.webkit.org/show_bug.cgi?id=19173>
3056
3057         Reviewed by Tim Hatcher.
3058
3059         * manual-tests/inspector/debugger-status-bar-buttons-state.html:
3060         Added.
3061         * page/inspector/ScriptsPanel.js:
3062         (WebInspector.ScriptsPanel.prototype._toggleDebugging): Call
3063         _clearInterface (which updates the buttons' tool tips) after
3064         attaching/detaching the debugger so that the buttons will reflect the
3065         new state.
3066         (WebInspector.ScriptsPanel.prototype._updatePauseOnExceptionsButton):
3067         Set the title of the pauseOnExceptionsButton, not the debuggingButton.
3068
3069 2008-05-20  Adam Roben  <aroben@apple.com>
3070
3071         Fix Bug 19153: Inspector should support console.debug
3072
3073         <https://bugs.webkit.org/show_bug.cgi?id=19153>
3074         <rdar://problem/5950856>
3075
3076         Reviewed by Tim Hatcher.
3077
3078         Test: manual-tests/inspector/console-log-formatting.html
3079
3080         * bindings/js/JSConsoleCustom.cpp:
3081         (WebCore::JSConsole::debug): Added.
3082         * manual-tests/inspector/console-log-formatting.html: Changed to test
3083         console.debug as well.
3084         * page/Console.cpp:
3085         (WebCore::Console::debug): Added. Just calls through to log().
3086         * page/Console.h:
3087         * page/Console.idl: Added debug() declaration.
3088
3089 2008-05-21  Kevin McCullough  <kmccullough@apple.com>
3090
3091         Reviewed by Adam.
3092
3093         <rdar://problem/5950867> JSProfiler: Allow the profiler to "Focus" a
3094         profile node.
3095         - Expose the Profile's 'focus' ability to WebCore and the WebInspector.
3096
3097         * page/JavaScriptProfile.cpp:
3098         (WebCore::focus):
3099         (WebCore::profileClass):
3100
3101 2008-05-21  Timothy Hatcher  <timothy@apple.com>
3102
3103         Remove the rest of the debug code inside DEBUG_DEBUGGER_CALLBACKS
3104         since the parts the remain aren't useful.
3105
3106         * page/JavaScriptDebugServer.cpp:
3107         (WebCore::JavaScriptDebugServer::sourceParsed):
3108
3109 2008-05-21  Beth Dakin  <bdakin@apple.com>
3110
3111         Reviewed by Anders.
3112
3113         Fix for <rdar://problem/5848161> REGRESSION (r31438?): Crash 
3114         beneath ResourceHandle::setDefersLoading while running fast/loader/
3115         simultaneous-reloads-assert.html (null CFURLConnection)
3116
3117         * platform/network/cf/ResourceHandleCFNet.cpp:
3118         (WebCore::ResourceHandle::setDefersLoading): Added simple null-
3119         check.
3120
3121 2008-05-21  Timothy Hatcher  <timothy@apple.com>
3122
3123         Adds the Request and Response headers to the Resource view.
3124
3125         <rdar://problem/5940782> REGRESSION: Resource Request and Response
3126         headers aren't shown (18451)
3127
3128         Reviewed by Adam Roben.
3129
3130         * English.lproj/localizedStrings.js: Added new strings.
3131         * css/view-source.css: Add comments to make sure a couple of
3132         style rules stay in sync with inspector.css.
3133         * page/inspector/Resource.js:
3134         (WebInspector.Resource.prototype.set url): Dispatch an event when
3135         this property changes.
3136         (WebInspector.Resource.prototype.set requestHeaders): Ditto.
3137         (WebInspector.Resource.prototype.set responseHeaders): Ditto.
3138         * page/inspector/ResourceView.js:
3139         (WebInspector.ResourceView): Add new elements for the headers
3140         and a headers TreeOutline. Add event listeners for resource
3141         property changes. Calls the three new refresh functions.
3142         (WebInspector.ResourceView.prototype.set headersVisible): Implemented.
3143         Toggles the headers-visible class name.
3144         (WebInspector.ResourceView.prototype._refreshURL): Update the URL
3145         tree element.
3146         (WebInspector.ResourceView.prototype._refreshRequestHeaders): Call _refreshHeaders.
3147         (WebInspector.ResourceView.prototype._refreshResponseHeaders): Ditto.
3148         (WebInspector.ResourceView.prototype._refreshHeaders): Remove the previous
3149         headers fromm the tree element. Loop throuh the headers and create new
3150         tree elements and append them.
3151         * page/inspector/ResourcesPanel.js:
3152         (WebInspector.ResourcesPanel.prototype._updateSidebarWidth): Call resize
3153         on the visible view if it is implemented.
3154         * page/inspector/SourceFrame.js:
3155         (WebInspector.SourceFrame.prototype.get autoSizesToFitContentHeight):
3156         (WebInspector.SourceFrame.prototype.set autoSizesToFitContentHeight):
3157         (WebInspector.SourceFrame.prototype.sizeToFitContentHeight):
3158         (WebInspector.SourceFrame.prototype._loaded): 
3159         (WebInspector.SourceFrame.prototype._windowResized): 
3160         * page/inspector/SourceView.js:
3161         (WebInspector.SourceView): Move the SourceFrame creation so it is
3162         available when headersVisible is set. Add a gutter element to fill
3163         the vertical space no covered by the SourceFrame now.
3164         (WebInspector.SourceView.prototype.set headersVisible): Set the
3165         SourceFrame.autoSizesToFitContentHeight when this property changes.
3166         (WebInspector.SourceView.prototype.resize): Call SourceFrame.sizeToFitContentHeight
3167         when autoSizesToFitContentHeight is true. This happens when resizing the 
3168         Resources sidebar.
3169         * page/inspector/inspector.css: Add a copy of webkit-line-gutter-backdrop
3170         and a comment to keep in sync with view-source.css. Adds other styles
3171         for the headers area of resource-view.
3172
3173 2008-05-21  Sam Weinig  <sam@webkit.org>
3174
3175         Reviewed by Anders Carlsson.
3176
3177         <rdar://problem/5838772> Support cross-site XMLHttpRequest
3178
3179         - Implement support for cross-site GET requests using the HTTP header
3180           Access-control mechanism.
3181
3182         Tests: http/tests/xmlhttprequest/access-control-basic-allow-headers.html
3183                http/tests/xmlhttprequest/access-control-basic-allow.html
3184                http/tests/xmlhttprequest/access-control-basic-denied.html
3185                http/tests/xmlhttprequest/access-control-basic-exclude.html
3186
3187         * xml/AccessControlList.cpp:
3188         (WebCore::AccessControlList::checkOrigin): Implement the list check algorithm.
3189         * xml/AccessControlList.h:
3190
3191         * xml/AccessItem.cpp:
3192         (WebCore::AccessItem::AccessItem):
3193         (WebCore::AccessItem::matches):
3194         * xml/AccessItem.h:
3195         Temporarily use a SecurityOrigin as the bases of AccessItem matching. Using
3196         the isSameSchemeHostPort test of the SecurityOrigin allows for a legal subset
3197         of the AccessItem match algorithm to be used, until the complete parsing of
3198         the wildcards and optional pieces is complete. 
3199
3200         * xml/AccessItemRule.cpp:
3201         (WebCore::matchesAny):
3202         (WebCore::AccessItemRule::allowListMatchesAny):
3203         (WebCore::AccessItemRule::excludeListMatchesAny):
3204         * xml/AccessItemRule.h:
3205         More of the implementation of the list check algorithm.  Check if any of the items
3206         in the rule match the control origin.
3207
3208         * xml/XMLHttpRequest.cpp:
3209         (WebCore::XMLHttpRequest::XMLHttpRequest):
3210         (WebCore::XMLHttpRequest::open): Don't throw a SECURITY_ERR for cross-domain requests anymore.
3211         (WebCore::XMLHttpRequest::send): Use different paths for same origin and cross-domain requests.
3212         (WebCore::XMLHttpRequest::crossSiteAccessRequest): Temporarily only support the GET method for
3213         cross-domain requests.  
3214         (WebCore::XMLHttpRequest::loadRequestSynchronously):
3215         (WebCore::XMLHttpRequest::processSyncLoadResults):
3216         This can now throw an exception if a cross-domain request is denied by the access control
3217         (WebCore::XMLHttpRequest::didFinishLoading):
3218         Add support for cross-domain GET request.  ASSERT temporarily that the method is GET, since we
3219         should have bailed out much earlier for non-GET methods.
3220         (WebCore::XMLHttpRequest::willSendRequest):
3221         (WebCore::XMLHttpRequest::didReceiveResponse):
3222         Do the HTTP header access-control check as soon as the headers arrive.
3223         * xml/XMLHttpRequest.h:
3224
3225 2008-05-21  Alp Toker  <alp@nuanti.com>
3226
3227         Rubber-stamped by Maciej.
3228
3229         Replace non-standard #pragma marks with comments to avoid compiler
3230         warnings.
3231
3232         * page/InspectorController.cpp:
3233
3234 === End merge of squirrelfish ===
3235
3236 2008-05-21  Geoffrey Garen  <ggaren@apple.com>
3237
3238         Reviewed by Tim Hatcher.
3239
3240         Merged with trunk WebCore's new debugger.
3241
3242         * page/InspectorController.cpp:
3243         (WebCore::currentCallFrame): Updated to use the DebuggerCallFrame API.
3244         (WebCore::InspectorController::pauseInDebugger): Updated for name change
3245         explained below.
3246         (WebCore::InspectorController::resumeDebugger): ditto
3247         (WebCore::InspectorController::didParseSource): Fixed a bug that would
3248         produce garbled text in some cases: Don't treat JS source as null-
3249         terminated UTF8; it's UTF16.
3250
3251         * page/JavaScriptCallFrame.cpp:
3252         * page/JavaScriptCallFrame.h: Changed this class to do all of its processing
3253         through a JavaScriptCore DebuggerCallFrame. We have to copy the DebuggerCallFrame
3254         because it's a temporary.
3255         (WebCore::JavaScriptCallFrame::update): Added an API for updating a call
3256         frame during execution: this is how we handle "with" and "eval".
3257
3258         * page/JavaScriptDebugServer.cpp: Separated "m_paused" from
3259         "m_doneProcessingDebuggerEvents", because they have different semantics:
3260         "m_paused" is the flag the debug server uses to indicate that new debugger
3261         callbacks should be ignored, because they come from the debugger's own
3262         JS code; "m_doneProcessingDebuggerEvents" is the flag the debugger UI
3263         uses to indicate that it's done processing events, and would like execution
3264         to continue. When these flags were one, the debugger would erroneously
3265         process callbacks that ocurred while unwinding from its own JS code.
3266
3267         (WebCore::toPage): Removed some unnecessary NULL checking. Added some
3268         missing NULL checking.
3269         
3270         (WebCore::JavaScriptDebugServer::pauseIfNeeded): Changed pause tracking
3271         to track a JavaScriptCallFrame instead of an ExecState, since ExecState
3272         is no longer a unique identifier for a call frame.
3273
3274         I removed the updateCurrentCallFrame scheme, and replaced it with
3275         individual tracking inside these callbacks:
3276         
3277         (WebCore::JavaScriptDebugServer::callEvent):
3278         (WebCore::JavaScriptDebugServer::atStatement):
3279         (WebCore::JavaScriptDebugServer::returnEvent):
3280         (WebCore::JavaScriptDebugServer::exception):
3281         
3282         The updateCurrentCallFrame scheme was just too incompatible with the
3283         squirrelfish execution model. Everything still works as before, except
3284         for eval, which no longer shows up as an independent call frame. We'll
3285         need to augment our debugger callbacks to bring back support for that.
3286
3287         * page/inspector/ScopeChainSidebarPane.js: Updated to use the activation
3288         class's new name.
3289
3290 2008-05-21  Maciej Stachowiak  <mjs@apple.com>
3291
3292         Reviewed by Oliver.
3293
3294         - write directly to the slot we used to check for override properties, when possible
3295         2.6% speedup on in-browser SunSpider
3296
3297         * bindings/js/JSDOMWindowCustom.h:
3298         (WebCore::JSDOMWindow::customPut):
3299
3300 2008-05-20  Maciej Stachowiak  <mjs@apple.com>
3301
3302         Reviewed by Oliver.
3303
3304         - inline JSDOMWindow security checks
3305         0.9% speedup to SunSpider in-browser
3306
3307         * bindings/js/JSDOMWindowBase.cpp:
3308         * bindings/js/JSDOMWindowCustom.h:
3309         (WebCore::JSDOMWindowBasePrivate::JSDOMWindowBasePrivate):
3310         (WebCore::JSDOMWindowBase::allowsAccessFrom):
3311         (WebCore::JSDOMWindowBase::allowsAccessFromNoErrorMessage):
3312         (WebCore::JSDOMWindowBase::allowsAccessFromPrivate):
3313         * bindings/js/kjs_binding.cpp:
3314
3315 2008-05-20  Maciej Stachowiak  <mjs@apple.com>
3316
3317         Reviewed by Adam.
3318
3319         - use ALWAYS_INLINE on customGetOwnPropertySlot since it wasn't inlining
3320         2% speedup to SunSpider in-browser
3321
3322         * bindings/js/JSDOMWindowCustom.h:
3323         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
3324
3325 2008-05-20  Maciej Stachowiak  <mjs@apple.com>
3326
3327         Reviewed by Adam.
3328
3329         - inline JSDOMWindow's customPut and customGetOwnPropertySlot methods
3330         1.2% speedup to SunSpider in-browser
3331         
3332         The approach here is to make the code generator include a
3333         JS{classname}Custom.h header in the autogenerated implementation,
3334         which we can use to provide inline versions.
3335
3336         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3337         * bindings/js/JSCSSStyleDeclarationCustom.h: Added.
3338         * bindings/js/JSDOMWindowCustom.cpp:
3339         * bindings/js/JSDOMWindowCustom.h:
3340         (WebCore::asJSDOMWindow):
3341         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
3342         (WebCore::JSDOMWindow::customPut):
3343         * bindings/js/JSHTMLAppletElementCustom.cpp:
3344         * bindings/js/JSHTMLAppletElementCustom.h: Added.
3345         * bindings/js/JSHTMLEmbedElementCustom.cpp:
3346         * bindings/js/JSHTMLEmbedElementCustom.h: Added.
3347         * bindings/js/JSHTMLObjectElementCustom.cpp:
3348         * bindings/js/JSHTMLObjectElementCustom.h: Added.
3349         * bindings/js/JSHistoryCustom.cpp:
3350         * bindings/js/JSHistoryCustom.h: Added.
3351         * bindings/js/JSLocationCustom.cpp:
3352         * bindings/js/JSLocationCustom.h: Added.
3353         * bindings/js/JSStorageCustom.cpp:
3354         * bindings/js/JSStorageCustom.h: Added.
3355         * bindings/scripts/CodeGeneratorJS.pm:
3356
3357 2008-05-19  Maciej Stachowiak  <mjs@apple.com>
3358
3359         Reviewed by Anders.
3360
3361         - inline asDOMWindow (using a new JSDOMWindowCustom.h header) since it is just a cast
3362         1% speedup to SunSpider in-browser
3363
3364         * WebCore.vcproj/WebCore.vcproj:
3365         * WebCore.xcodeproj/project.pbxproj:
3366         * bindings/js/JSCustomVoidCallback.cpp:
3367         * bindings/js/JSCustomXPathNSResolver.cpp:
3368         * bindings/js/JSDOMApplicationCacheCustom.cpp:
3369         * bindings/js/JSDOMWindowBase.cpp:
3370         * bindings/js/JSDOMWindowBase.h:
3371         * bindings/js/JSDOMWindowCustom.cpp:
3372         * bindings/js/JSDOMWindowCustom.h: Added.
3373         (WebCore::asJSDOMWindow):
3374         * bindings/js/JSDatabaseCustom.cpp:
3375         * bindings/js/JSDocumentCustom.cpp:
3376         * bindings/js/JSLocationCustom.cpp:
3377         * bindings/js/JSSQLTransactionCustom.cpp:
3378         * bindings/js/JSXMLHttpRequestCustom.cpp:
3379         * page/JavaScriptDebugServer.cpp:
3380
3381 2008-05-19  Maciej Stachowiak  <mjs@apple.com>
3382
3383         Reviewed by Oliver.
3384
3385         - obtain current inner window of outer window in a more efficient way
3386         1.6% speedup to SunSpider in-browser
3387
3388         * bindings/js/JSDOMWindowBase.cpp:
3389         (WebCore::JSDOMWindowBase::allowsAccessFromPrivate):
3390
3391 2008-05-19  Maciej Stachowiak  <mjs@apple.com>
3392
3393         Reviewed by Adam.
3394
3395         - make impl() method for JSWindow inline
3396         0.6% speedup to SunSpider in-browser
3397
3398         * WebCore.base.exp: Remove now-inline symbol
3399         * bindings/scripts/CodeGeneratorJS.pm: Make the codegen script inline impl()
3400         even for classes with a parent class.
3401
3402 2008-05-17  Geoffrey Garen  <ggaren@apple.com>
3403
3404         Reviewed by Oliver Hunt.
3405
3406         Updated for API changes in KJS::Debugger.
3407
3408 2008-05-13  Geoffrey Garen  <ggaren@apple.com>
3409
3410         Reviewed by Oliver Hunt.
3411
3412         Updated for API changes in KJS::Debugger.
3413
3414         * page/JavaScriptDebugServer.cpp:
3415         (WebCore::JavaScriptDebugServer::callEvent):
3416         (WebCore::JavaScriptDebugServer::atStatement):
3417         (WebCore::JavaScriptDebugServer::returnEvent):
3418         (WebCore::JavaScriptDebugServer::exception):
3419         * page/JavaScriptDebugServer.h:
3420
3421 2008-05-13  Geoffrey Garen  <ggaren@apple.com>
3422
3423         Reviewed by Oliver Hunt.
3424         
3425         Updated JavaScriptDebugServer API to accept a SourceProvider instead
3426         of a UString, to avoid copying.
3427
3428         * page/JavaScriptDebugServer.cpp:
3429         (WebCore::JavaScriptDebugServer::sourceParsed): Updated this function
3430         not to return a value.
3431
3432 2008-05-10  Maciej Stachowiak  <mjs@apple.com>
3433
3434         Build fix.
3435         
3436         - add missing forwarding header
3437
3438         * ForwardingHeaders/kjs/SourceProvider.h: Added.
3439
3440 2008-05-10  Maciej Stachowiak  <mjs@apple.com>
3441
3442         Reviewed by Oliver.
3443
3444         - WebCore part of fix for: "SQUIRRELFISH: function toString broken after calling"
3445         https://bugs.webkit.org/show_bug.cgi?id=18869
3446
3447         * bindings/js/StringSourceProvider.h: Added. SourceProvider subclass backed by a WebCore::String.
3448         (WebCore::StringSourceProvider::create):
3449         (WebCore::StringSourceProvider::getRange):
3450         (WebCore::StringSourceProvider::data):
3451         (WebCore::StringSourceProvider::length):
3452         (WebCore::StringSourceProvider::StringSourceProvider):
3453         * bindings/js/kjs_proxy.cpp:
3454         (WebCore::KJSProxy::evaluate): Pass a StringSourceProvider to
3455         evaluate() instead of UChar* / length.
3456         * html/HTMLScriptElement.cpp:
3457         (WebCore::HTMLScriptElement::text): Modified to return the
3458         original string as-is when the script element contains only a
3459         single text node, to avoid excess memory use.
3460         
3461         * WebCore.vcproj/WebCore.vcproj: Add new file to build.
3462         * WebCore.xcodeproj/project.pbxproj: ditto
3463
3464 2008-05-09  Oliver Hunt  <oliver@apple.com>
3465
3466         Reviewed by Geoff.
3467
3468         Build fixes for SquirrelFish on windows.
3469
3470         * bindings/js/JSNavigatorCustom.cpp:
3471
3472 2008-05-08  Geoffrey Garen  <ggaren@apple.com>
3473
3474         Reviewed by Oliver Hunt.
3475
3476         Fixed platform/mac/plugins/bindings-test-objc.html.
3477         
3478         I've restored -[WebScriptObject setException] and
3479         +[WebScriptObject throwException].
3480         
3481         Instead of mucking around in the JavaScript engine's execution state,
3482         throwing an exception sets a global exception string, along with the
3483         environment in which to throw it. An ObjC callback checks the global
3484         exception string and, if it's non-nil and the environment matches the
3485         current exceution environment, throws the global exception string as a
3486         JS exception.
3487
3488         I also removed the old currentGlobalObject infrastructure: it's no longer
3489         used.
3490
3491 2008-05-06  Oliver Hunt  <oliver@apple.com>
3492
3493         Reviewed by Maciej.
3494
3495         Bug 18866: SQUIRRELFISH: JS/ObjC bridge is broken <https://bugs.webkit.org/show_bug.cgi?id=18866>
3496         Bug 18867: SQUIRRELFISH: JS/NPRuntime bridge is broken <https://bugs.webkit.org/show_bug.cgi?id=18867>
3497
3498         This fixes function binding logic for the ObjC and NPRuntime by
3499         replacing incorrect implementations of implementsCall (which is
3500         no longer virtual) with implementations of getCallData.
3501
3502         * bindings/js/JSQuarantinedObjectWrapper.cpp:
3503         (WebCore::JSQuarantinedObjectWrapper::getCallData):
3504         * bindings/js/JSQuarantinedObjectWrapper.h:
3505         * bridge/c/c_instance.cpp:
3506         * bridge/c/c_instance.h:
3507         * bridge/objc/objc_instance.h:
3508         * bridge/objc/objc_instance.mm:
3509         * bridge/objc/objc_runtime.h:
3510         * bridge/objc/objc_runtime.mm:
3511         (ObjcFallbackObjectImp::getCallData):
3512         * bridge/runtime.h:
3513         * bridge/runtime_object.cpp:
3514         (RuntimeObjectImp::getCallData):
3515         * bridge/runtime_object.h:
3516
3517 2008-04-30  Geoffrey Garen  <ggaren@apple.com>
3518
3519         Build fix: supply a parameter that used to be implicit to
3520         Interpreter::evaluate.
3521
3522 2008-04-30  Geoffrey Garen  <ggaren@apple.com>
3523
3524         Build fix: #ifdef'd out some code that doesn't work anymore.
3525
3526         * bindings/objc/WebScriptObject.mm:
3527         (+[WebScriptObject throwException:]):
3528         (-[WebScriptObject setException:]):
3529
3530 2008-04-14  Gabor Loki  <loki@inf.u-szeged.hu>
3531
3532         Reviewed by Geoffrey Garen.
3533
3534         Bug 18489: Squirrelfish doesn't build on linux
3535         <https://bugs.webkit.org/show_bug.cgi?id=18489>
3536
3537         * WebCore.pro: Add JavaScriptCore/VM into include path
3538
3539 2008-04-10  Sam Weinig  <sam@webkit.org>
3540
3541         Reviewed by Geoffrey Garen.
3542
3543         Adjusted WebCore JS functions to the new "getConstructData" calling convention.
3544
3545 2008-03-30  Geoffrey Garen  <ggaren@apple.com>
3546
3547         Reviewed by Oliver Hunt.
3548         
3549         Adjusted WebCore JS functions to the new "getCallData" calling convention.
3550
3551 === Start merge of squirrelfish ===
3552
3553 2008-05-21  Anders Carlsson  <andersca@apple.com>
3554
3555         Reviewed by Mitz.
3556
3557         Add IconFetcher implementation.
3558