JavaScriptCore:
[WebKit-https.git] / WebCore / ChangeLog
1 2008-03-11  Steve Falkenburg  <sfalken@apple.com>
2
3         Disable LTCG/PGO for all of WebCore for now.
4         We'll re-enable this as part of follow-on PGO work.
5         
6         Reviewed by Oliver.
7
8         * WebCore.vcproj/WebCore.vcproj:
9
10 2008-03-11  Darin Adler  <darin@apple.com>
11
12         Reviewed by Sam.
13
14         - remove all bridge-related things from WebCore except the bridge itself
15
16         * WebCore.base.exp: Removed the bridge and setBridge functions.
17
18         * loader/FrameLoader.cpp:
19         (WebCore::FrameLoader::detachFromParent): Removed call to the bridge's
20         close method.
21
22         * page/Frame.cpp:
23         (WebCore::Frame::~Frame): Removed call to setBridge(0).
24         (WebCore::FramePrivate::FramePrivate): Removed initialization of m_bridge.
25         * page/Frame.h: Removed setBridge and bridge functions.
26         * page/FramePrivate.h: Removed m_bridge pointer.
27         * page/mac/FrameMac.mm: Removed setBridge and bridge functions.
28
29         * page/mac/WebCoreFrameBridge.h: Added setWebCoreFrame: method.
30         Removed bridgeForDOMDocument: and clearFrame methods.
31         * page/mac/WebCoreFrameBridge.mm: Ditto.
32         (-[WebCoreFrameBridge close]): Changed to set m_frame to 0 directly.
33         (-[WebCoreFrameBridge setWebCoreFrame:]): Added.
34
35 2008-03-11  Darin Adler  <darin@apple.com>
36
37         - restored some code I removed in the Range change; this code can't go
38           until the rest of the Range fix is in
39
40         * dom/Range.cpp:
41         (WebCore::Range::commonAncestorContainer): Added back the check for 0
42         that I removed erroneously in the Range patch.
43         (WebCore::Range::processContents): Left in assertions I used to debug
44         this.
45
46 2008-03-11  Darin Adler  <darin@apple.com>
47
48         - fix Release build
49
50         * platform/mac/ScrollViewMac.mm:
51         (WebCore::ScrollView::setContentsPos): Don't use NSMakePoint.
52
53 2008-03-11  Darin Adler  <darin@apple.com>
54
55         Reviewed by Anders.
56
57         - simplify Mac code for ScrollView, since it's used only for FrameView
58           and not in two different modes like it was historically
59         - remove code depending on the bridge to get from an NSView to a WebCore::Frame
60
61         * bindings/objc/DOMHTML.mm:
62         (-[DOMHTMLInputElement _rectOnScreen]): getDocumentView -> documentView.
63
64         * bridge/jni/jni_jsobject.cpp:
65         (createRootObject): Instead of using WebCoreViewFactory to find the frame given
66         and NSView, use the WebCoreFrameView interface to do it.
67
68         * editing/mac/EditorMac.mm:
69         (WebCore::Editor::paste): getDocumentView -> documentView.
70         * editing/mac/SelectionControllerMac.mm:
71         (WebCore::SelectionController::notifyAccessibilityForSelectionChange): Ditto.
72
73         * page/FrameView.h: Fixed comment.
74
75         * page/InspectorController.cpp:
76         (WebCore::InspectorController::drawNodeHighlight): Removed uneeded typecasts
77         to ScrollView* since FrameView is derived from ScrollView.
78
79         * page/mac/EventHandlerMac.mm:
80         (WebCore::EventHandler::focusDocumentView): getDocumentView -> documentView.
81         * page/mac/FrameMac.mm:
82         (WebCore::Frame::imageFromRect): Ditto.
83         * page/mac/WebCoreAXObject.mm:
84         (-[WebCoreAXObject position]): Ditto.
85         (-[WebCoreAXObject doAXTextMarkerForPosition:]): Ditto.
86         (-[WebCoreAXObject rendererForView:]): Updated code that used to use
87         WebCoreBridgeHolder to use WebCoreFrameView instead.
88
89         * page/mac/WebCoreFrameBridge.mm:
90         (-[WebCoreFrameBridge computePageRectsWithPrintWidthScaleFactor:printHeight:]):
91         getDocumentView -> documentView.
92
93         * page/mac/WebCoreFrameView.h: Removed the WebCoreScrollbarMode type; we just
94         use WebCore::ScrollbarMode directly. Renamed the WebCoreFrameView protocol to
95         WebCoreFrameScrollView, since it's a protocol for the scroll view, not the
96         frame view itself. Replaced WebCoreBridgeHolder protocol with WebCoreFrameView
97         protocol, which returns a WebCore::Frame directly rather than a bridge.
98
99         * page/mac/WebCoreViewFactory.h: Eliminated the bridgeForView method.
100
101         * platform/ScrollView.h: Moved the constructor and destructor out of the
102         class-specific #if blocks. Renamed Mac-specific function that gets the
103         NSView for from getDocumentView to documentView and a scrollView function
104         that returns an appropriately classed NSScrollView.
105
106         * platform/graphics/MediaPlayer.h: Changed type of parentWidget to FrameView
107         instead of Widget.
108         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
109         (WebCore::MediaPlayerPrivate::createQTMovieView): Removed unnecessary cast.
110
111         * platform/mac/PopupMenuMac.mm:
112         (WebCore::PopupMenu::show): getDocumentView -> documentView.
113         * platform/mac/ScrollViewMac.mm:
114         (WebCore::ScrollView::ScrollView): Added.
115         (WebCore::ScrollView::~ScrollView): Added.
116         (WebCore::ScrollView::scrollView): Added.
117         (WebCore::ScrollView::visibleWidth): Removed unused non-NSScrollView case.
118         (WebCore::ScrollView::visibleHeight): Ditto.
119         (WebCore::ScrollView::visibleContentRect): Ditto.
120         (WebCore::ScrollView::visibleContentRectConsideringExternalScrollers): Ditto.
121         (WebCore::ScrollView::contentsWidth): Ditto.
122         (WebCore::ScrollView::contentsHeight): Ditto.
123         (WebCore::ScrollView::contentsX): Ditto.
124         (WebCore::ScrollView::contentsY): Ditto.
125         (WebCore::ScrollView::scrollOffset): Ditto.
126         (WebCore::ScrollView::scrollRectIntoViewRecursively): Ditto.
127         (WebCore::ScrollView::setContentsPos): Ditto.
128         (WebCore::ScrollView::setVScrollbarMode): Ditto.
129         (WebCore::ScrollView::setHScrollbarMode): Ditto.
130         (WebCore::ScrollView::setScrollbarsMode): Ditto.
131         (WebCore::ScrollView::vScrollbarMode): Ditto.
132         (WebCore::ScrollView::hScrollbarMode): Ditto.
133         (WebCore::ScrollView::suppressScrollbars): Ditto.
134         (WebCore::ScrollView::addChild): Ditto.
135         (WebCore::ScrollView::resizeContents): Ditto.
136         (WebCore::ScrollView::updateContents): Ditto.
137         (WebCore::ScrollView::contentsToWindow): Ditto.
138         (WebCore::ScrollView::windowToContents): Ditto.
139         (WebCore::ScrollView::setStaticBackground): Ditto.
140         (WebCore::ScrollView::documentView): Renamed and removed unused case.
141         (WebCore::ScrollView::scrollbarUnderMouse): Removed incorrect comment.
142
143         * platform/mac/WidgetMac.mm:
144         (WebCore::Widget::getOuterView): Update for protocol name change.
145
146         * rendering/RenderThemeMac.mm:
147         (WebCore::RenderThemeMac::paintCheckbox): getDocumentView -> documentView.
148         (WebCore::RenderThemeMac::paintRadio): Ditto.
149         (WebCore::RenderThemeMac::paintButton): Ditto.
150         (WebCore::RenderThemeMac::paintMenuList): Ditto.
151         (WebCore::RenderThemeMac::paintSliderThumb): Ditto.
152         (WebCore::RenderThemeMac::paintSearchField): Ditto.
153         (WebCore::RenderThemeMac::paintSearchFieldCancelButton): Ditto.
154         (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration): Ditto.
155         (WebCore::RenderThemeMac::paintSearchFieldResultsButton): Ditto.
156
157 2008-03-11  Brent Fulgham  <bfulgham@gmail.com>
158
159         Reviewed by Adam Roben.
160
161         Split CookieJarWin.cpp into CFNet and non-CFNet versions to
162         reduce the massive amount of conditionalization in the file.
163         (see http://bugs.webkit.org/show_bug.cgi?id=17788)
164
165         * WebCore.vcproj/WebCore.vcproj:
166         * platform/network/win/CookieJarCFNetWin.cpp: Copied from WebCore/platform/network/win/CookieJarWin.cpp.
167         (WebCore::setCookies):
168         (WebCore::cookies):
169         (WebCore::cookiesEnabled):
170         * platform/network/win/CookieJarWin.cpp:
171         (WebCore::setCookies):
172         (WebCore::cookies):
173         (WebCore::cookiesEnabled):
174
175 2008-03-11  Darin Adler  <darin@apple.com>
176
177         Reviewed by Sam.
178
179         - eliminate the remaining parts of WebCoreBridge used for calls to WebKit from WebCore
180
181         * page/ChromeClient.h: Added new client functions to replace calls up to WebKit
182         that were formerly handled by the bridge.
183
184         * page/Frame.h: Removed unneeded declarations. Moved declarations of script-specific
185         functions to a ScriptController section. Removed willPopupMenu.
186
187         * page/mac/ChromeMac.mm:
188         (WebCore::Chrome::focusNSView): Changed to call firstResponder and makeFirstResponder
189         via the client instead of the bridge.
190
191         * page/mac/EventHandlerMac.mm:
192         (WebCore::EventHandler::passMouseDownEventToWidget): Changed to call firstResponder
193         and makeFirstResponder via the chrome client instead of the bridge.
194
195         * page/mac/FrameMac.mm: Removed willPopupMenu.
196
197         * page/mac/WebCoreFrameBridge.h: Removed WebCoreFrameBridge protocol and
198         SubclassResponsibility category. Also removed some unneeded imports.
199
200         * platform/mac/PopupMenuMac.mm:
201         (WebCore::PopupMenu::show): Call willPopUpMenu on chrome client instead of frame.
202
203         * platform/mac/WidgetMac.mm:
204         (WebCore::Widget::setIsSelected): Call functions directly on the view rather than
205         calling via the bridge.
206
207 2008-03-11  Darin Adler  <darin@apple.com>
208
209         Reviewed by Mitz.
210
211         - make some Range improvements (preparation for Range support for DOM mutation)
212
213         Made constructors private, added create functions.
214         Made refcount start at 1 rather than starting at 0 and being incremented.
215         Made Range use two Position objects for the start/end container/offset pairs.
216
217         * WebCore.base.exp: Updated.
218
219         * dom/Document.cpp:
220         (WebCore::Document::createRange): Changed to use Range::create.
221         (WebCore::Document::removeMarkers): Updated for Range::first/pastLastNode name change.
222
223         * dom/Position.cpp:
224         (WebCore::Position::formatForDebugger): Updated for member variable name change.
225         (WebCore::Position::showTreeForThis): Ditto.
226         (WebCore::startPosition): Changed to use Range::startPosition.
227         (WebCore::endPosition): Changed to use Range::endPosition.
228
229         * dom/Position.h: Made the data members public and renamed them to container
230         and offset. But since offset() is already a function, temporarily used posOffset
231         for the data member. Later we'll get rid of offset(). Made more functions inline.
232         Removed the constructor that takes a PositionIterator.
233
234         * dom/PositionIterator.cpp:
235         (WebCore::PositionIterator::operator Position): Added. Replaces the constructor
236         that used to be in Position.
237         * dom/PositionIterator.h: Added conversion operator to produce a Position.
238         Removed friend declaration for Position.
239
240         * dom/Range.cpp:
241         (WebCore::Range::Range): Updated constructors for data member changes and made
242         them use a refcount of 1.
243         (WebCore::Range::create): Added.
244         (WebCore::Range::startContainer): Updated to eliminate use of m_detached; detached
245         is now indicated by m_start.container of 0. Also updated to use m_start instead
246         of the old m_startContainer.
247         (WebCore::Range::startOffset): Ditto.
248         (WebCore::Range::endContainer): Ditto.
249         (WebCore::Range::endOffset): Ditto.
250         (WebCore::Range::commonAncestorContainer): Ditto.
251         (WebCore::Range::collapsed): Ditto.
252         (WebCore::Range::setStart): Ditto.
253         (WebCore::Range::setEnd): Ditto.
254         (WebCore::Range::collapse): Ditto.
255         (WebCore::Range::isPointInRange): Ditto.
256         (WebCore::Range::comparePoint): Ditto.
257         (WebCore::Range::compareNode): Ditto.
258         (WebCore::Range::compareBoundaryPoints): Ditto.
259         (WebCore::Range::boundaryPointsValid): Ditto.
260         (WebCore::Range::deleteContents): Ditto.
261         (WebCore::Range::intersectsNode): Ditto.
262         (WebCore::Range::processContents): Ditto.
263         (WebCore::Range::extractContents): Ditto.
264         (WebCore::Range::cloneContents): Ditto.
265         (WebCore::Range::insertNode): Ditto.
266         (WebCore::Range::toString): Ditto.
267         (WebCore::Range::text): Ditto.
268         (WebCore::Range::createContextualFragment): Ditto.
269         (WebCore::Range::detach): Ditto.
270         (WebCore::Range::checkNodeBA): Changed to use switch statements instead of
271         multiple calls to the virtual nodeType() function.
272         (WebCore::Range::cloneRange): Ditto.
273         (WebCore::Range::setStartAfter): Ditto.
274         (WebCore::Range::setEndBefore): Ditto.
275         (WebCore::Range::setEndAfter): Ditto.
276         (WebCore::Range::selectNode): Ditto.
277         (WebCore::Range::selectNodeContents): Ditto.
278         (WebCore::Range::surroundContents): Ditto.
279         (WebCore::Range::setStartBefore): Ditto.
280         (WebCore::Range::checkDeleteExtract): Ditto.
281         (WebCore::Range::containedByReadOnly): Ditto.
282         (WebCore::Range::firstNode): Ditto.
283         (WebCore::Range::editingStartPosition): Ditto.
284         (WebCore::Range::pastLastNode): Ditto.
285         (WebCore::Range::addLineBoxRects): Ditto.
286         (WebCore::Range::formatForDebugger): Ditto.
287         (WebCore::operator==): Ditto.
288         (WebCore::rangeOfContents): Ditto.
289         (WebCore::Range::maxStartOffset): Ditto.
290         (WebCore::Range::maxEndOffset): Ditto.
291
292         * dom/Range.h: Made constructors private. Added create functions.
293         Added getters for startContainer/Offset and endContainer/Offset that
294         return 0 instead of an exception for detached ranges that are inline
295         and don't require an ExceptionCode out parameter. Changed the parameters
296         to setStart and setEnd to PassRefPtr. Removed isDetached function.
297         Made ActionType and processContents private. Made startPosition and
298         endPosition inlines and have then return const&. Renamed startNode and
299         pastEndNode to firstNode and pastLastNode to reduce the chance of
300         confusion with startContainer/endContainer. Used Position for m_start
301         and m_end instead of separate container and offset members. Changed
302         maxStartOffset and maxEndOffset into int to match other offsets.
303
304         * editing/ApplyStyleCommand.cpp:
305         (WebCore::ApplyStyleCommand::applyBlockStyle): Changed to use Range::create.
306         (WebCore::ApplyStyleCommand::applyInlineStyle): Ditto.
307         * editing/CompositeEditCommand.cpp:
308         (WebCore::CompositeEditCommand::inputText): Ditto.
309         (WebCore::CompositeEditCommand::moveParagraphs): Ditto.
310         * editing/DeleteSelectionCommand.cpp:
311         (WebCore::DeleteSelectionCommand::mergeParagraphs): Ditto.
312         * editing/Editor.cpp:
313         (WebCore::Editor::fontForSelection): Changed for pastLastNode name change.
314         (WebCore::Editor::setComposition): Changed to use Range::create.
315         (WebCore::paragraphAlignedRangeForRange): Ditto.
316         (WebCore::markMisspellingsOrBadGrammar): Changed to get rid of check for
317         isDetached and check for 0 from startContainer instead.
318         (WebCore::Editor::compositionRange): Changed to use Range::create.
319         * editing/EditorCommand.cpp:
320         (WebCore::unionDOMRanges): Ditto.
321         * editing/Selection.cpp:
322         (WebCore::Selection::toRange): Ditto.
323         * editing/TextIterator.cpp:
324         (WebCore::TextIterator::TextIterator): Changed for firstNode and pastLastNode
325         name change.
326         (WebCore::TextIterator::range): Changed to use Range::create.
327         (WebCore::SimplifiedBackwardsTextIterator::range): Ditto.
328         (WebCore::TextIterator::subrange): Ditto.
329         * editing/VisiblePosition.cpp:
330         (WebCore::makeRange): Ditto.
331         * editing/VisiblePosition.h: Added now-needed include.
332         * editing/htmlediting.cpp:
333         (WebCore::indexForVisiblePosition): Changed to use Range::create.
334         (WebCore::avoidIntersectionWithNode): Changed to get rid of check for
335         isDetached and check for 0 instead and to use Range::create.
336         * editing/markup.cpp:
337         (WebCore::renderedText): Changed to use Range::create.
338         (WebCore::createMarkup): Changed to no longer use isDetached and also
339         for new firstNode/pastEndNode names.
340         (WebCore::createFragmentFromText): Ditto.
341         * editing/visible_units.cpp:
342         (WebCore::previousBoundary): Changed to use Range::create.
343         * page/mac/WebCoreFrameBridge.mm:
344         (-[WebCoreFrameBridge convertToNSRange:]): Changed to no longer use
345         isDetached().
346         * rendering/RenderTextControl.cpp:
347         (WebCore::RenderTextControl::visiblePositionForIndex): Changed to use Range::create.
348         (WebCore::RenderTextControl::indexForVisiblePosition): Ditto.
349
350 2008-03-11  Daniel Zucker <zucker@wake3.com>
351
352         Reviewed by Adam Roben.
353
354         There are a handful of placed where the use of CFNetwork-specific
355         calls are protected by PLATFORM(CF).  Revise to use the more specific
356         USE(CFNETWORK) macro.  (See http://bugs.webkit.org/show_bug.cgi?id=17783) 
357
358         * platform/network/ProtectionSpace.cpp:  Change PLATFORM(CF) to USE(CFNETWORK)
359         * platform/network/ResourceHandle.cpp: Change PLATFORM(CF) to USE(CFNETWORK)
360         * platform/network/win/CookieJarWin.cpp:  Correct error in
361           InternetGetCookie call.  Conditionalize 'cookiesEnabled' the same
362           as all other implementations in this file.
363
364 2008-03-11  Xan Lopez  <xan@gnome.org>
365
366         Reviewed by Alp Toker.
367
368         http://bugs.webkit.org/show_bug.cgi?id=16476
369
370         Add libsoup HTTP backend.
371         
372         * GNUmakefile.am:
373         * platform/network/ResourceHandleInternal.h:
374         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
375         * platform/network/soup/AuthenticationChallenge.h: Added.
376         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
377         * platform/network/soup/ResourceError.h: Added.
378         (WebCore::ResourceError::ResourceError):
379         * platform/network/soup/ResourceHandleSoup.cpp: Added.
380         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
381         (WebCore::ResourceHandle::~ResourceHandle):
382         (WebCore::dataCallback):
383         (WebCore::parseDataUrl):
384         (WebCore::ResourceHandle::start):
385         (WebCore::ResourceHandle::cancel):
386         (WebCore::ResourceHandle::bufferedData):
387         (WebCore::ResourceHandle::supportsBufferedData):
388         (WebCore::ResourceHandle::setDefersLoading):
389         (WebCore::ResourceHandle::loadsBlocked):
390         (WebCore::ResourceHandle::willLoadFromCache):
391         * platform/network/soup/ResourceRequest.h: Copied from WebCore/platform/network/curl/ResourceRequest.h.
392         (WebCore::ResourceRequest::ResourceRequest):
393         (WebCore::ResourceRequest::doUpdatePlatformRequest):
394         * platform/network/soup/ResourceResponse.h: Added.
395         (WebCore::ResourceResponse::ResourceResponse):
396         (WebCore::ResourceResponse::setResponseFired):
397         (WebCore::ResourceResponse::responseFired):
398         (WebCore::ResourceResponse::doUpdateResourceResponse):
399
400 2008-03-11  Rodney Dawes  <dobey@wayofthemonkey.com>
401
402         Fix Qt build.
403
404         * plugins/qt/PluginDataQt.cpp:
405         (PluginData::initPlugins)
406
407 2008-03-11  Adam Roben  <aroben@apple.com>
408
409         Make attribute quoting in DOM view more consistent with source view
410
411         Two changes which make the DOM view more consistent with source view:
412          1) We now quote all attribute values, including URLs
413          2) The quotes around the values are now purple, matching the left and
414             right angle brackets that surround the tag
415
416         One bug fixed by these changes:
417          1) The entire URL is selected for editing when you double-click a URL
418             that is an attribute value. Previously, the first and last
419             characters were not included in the selection.
420
421         Reviewed by Darin.
422
423         * page/inspector/DocumentPanel.js:
424         (WebInspector.DOMNodeTreeElement._startEditingAttribute): Don't need
425         to account for the quotes around attribute values anymore because the
426         quotes are now outside the webkit-html-attribute-value span.
427         * page/inspector/utilities.js:
428         (nodeTitleInfo): Quote all attribute values, including URLs, and place
429         the quotes outside the webkit-html-attribute-value span.
430
431 2008-03-11  Adam Roben  <aroben@apple.com>
432
433         Stop including pthread.h in WebCore on Windows
434
435         Reviewed by Darin.
436
437         * WebCore.vcproj/WebCore.vcproj:
438           - Changed the include path to not contain pthreads/
439           - Let VS remove a duplicate FileConfiguration element
440           - Let VS have its way with the file ordering
441         * WebCorePrefix.h: Made the #include of pthread.h be compiled out on
442         Windows.
443         * loader/FTPDirectoryDocument.cpp: Added a Windows-specific #define of
444         localtime_r (pthread.h was providing a macro that substituted plain
445         old localtime before, but localtime_s is "more secure", so I went with
446         that).
447         * loader/FTPDirectoryParser.cpp: Ditto for gmtime_r.
448
449 2008-03-11  Adam Roben  <aroben@apple.com>
450
451         Roll out r30961 since it broke the default site icon on Windows
452
453         * loader/icon/IconDatabase.cpp:
454         (WebCore::IconDatabase::defaultIcon):
455
456 2008-03-11  Dan Bernstein  <mitz@apple.com>
457
458         Reviewed by Darin Adler.
459
460         - clean up line layout code
461
462         * platform/graphics/GraphicsContext.cpp:
463         (WebCore::TextRunIterator::increment): Removed the resolver parameter.
464         (WebCore::GraphicsContext::drawBidiText): Adjusted for changes to
465         createBidiRunsForLine(), which no longer takes a start parameter.
466         * platform/text/BidiResolver.h:
467         (WebCore::BidiResolver::): Made Noncopyable and removed the
468         m_adjustEmbedding member variable.
469         (WebCore::BidiResolver::position): Added. Returns the resolver's current
470         position.
471         (WebCore::BidiResolver::setPosition): Added. Sets the resolver's current
472         position without changing any other state.
473         (WebCore::BidiResolver::increment): Added. Advances the resolver to the
474         next position, allowing the iterator to push and pop embedding.
475         (WebCore::BidiResolver::appendRun): Removed the resolver parameter in
476         the call to increment().
477         (WebCore::BidiResolver::embed): Removed code to save, set and restore
478         m_adjustEmbedding.
479         (WebCore::BidiResolver::createBidiRunsForLine): Changed to not take a
480         'start' iterator. Instead, start at the current position. Removed code
481         to set m_adjustEmbedding. Changed for noncopyability.
482         * rendering/RenderBlock.h:
483         * rendering/bidi.cpp:
484         (WebCore::bidiNext): Made the resolver parameter optional. Changed to
485         null-check the 'end of inline' pointer only twice.
486         (WebCore::bidiFirst): Made the resolver parameter optional.
487         (WebCore::BidiIterator::increment): Ditto.
488         (WebCore::BidiState::increment): Added. Overrides the default
489         BidiResolver::increment() method by passing the resolver to
490         BidiIterator::increment().
491         (WebCore::checkMidpoints): Removed the resolver parameter.
492         (WebCore::BidiState::appendRun): Removed code to save, set and restore
493         m_adjustEmbedding. Adjusted for change to increment().
494         (WebCore::RenderBlock::bidiReorderLine): Removed the 'start' parameter
495         and unreachable code.
496         (WebCore::buildCompactRuns): Adjusted for changes to BidiResolver/
497         (WebCore::RenderBlock::layoutInlineChildren): Moved code to initialize
498         the resolver from this method to determineStartPosition(). Unified the
499         resolver with the 'start' iterator. Removed unreachable code. Moved one
500         statement from the beginning of the while loop to the end.
501         (WebCore::RenderBlock::determineStartPosition): Moved code to initialize
502         the resolver from layoutInlineChildren() into this method.
503         (WebCore::RenderBlock::matchedEndLine): Adjusted for the resolver and
504         the 'start' iterator being one object.
505         (WebCore::skipNonBreakingSpace): Made the parameter const.
506         (WebCore::requiresLineBox): Ditto.
507         (WebCore::RenderBlock::generatesLineBoxesForInlineChild): Adjusted for
508         the change to BidiIterator::increment().
509         (WebCore::RenderBlock::skipWhitespace): Made two versions of this
510         method, one for BidiIterator and one for BidiState.
511         (WebCore::shouldSkipWhitespaceAfterStartObject): Removed the resolver
512         parameter.
513         (WebCore::RenderBlock::findNextLineBreak): Removed the resolver
514         parameter. Removed calls to setAdjustEmbedding(). Removed the 'previous'
515         variable and changed the 'last' variable to do its job.
516         * rendering/bidi.h:
517
518 2008-03-10  Adam Roben  <aroben@apple.com>
519
520         Part of Bug 17224: DOM nodes/attributes should be editable
521
522         <http://bugs.webkit.org/show_bug.cgi?id=17224>
523         <rdar://problem/5732825>
524
525         This patch makes text nodes editable via double-click.
526
527         Reviewed by Tim.
528
529         * page/inspector/DocumentPanel.js:
530         (WebInspector.DOMNodeTreeElement._startEditing):
531           - Moved most of this code to _startEditingAttribute
532           - Calls _startEditingTextNode or _startEditingAttribute as
533             appropriate
534         (WebInspector.DOMNodeTreeElement._startEditingAttribute): Added. Code
535         came from _startEditing.
536         (WebInspector.DOMNodeTreeElement._startEditingTextNode): Added.
537         (WebInspector.DOMNodeTreeElement._textNodeEditingCommitted): Added.
538         (WebInspector.DOMNodeTreeElement._editingCancelled): Renamed from
539         _attributeEditingCancelled.
540         * page/inspector/utilities.js:
541         (nodeTitleInfo): Wrap text nodes in a webkit-html-text-node span so
542         that we can easily recognize/edit them.
543
544 2008-03-11  Holger Hans Peter Freyther  <zecke@selfish.org>
545
546         Reviewed by Darin.
547
548         r25512 inlined the urlIcon to improve the startup time of Safari on Mac. Inlining is
549         not suitable for platforms where this icon is themable. E.g. the Qt platform is allowing
550         to theme this icon and the Gtk+ platform will probably end up with themable icons
551         as well.
552         
553         Remove dead code from the windows port and move the urlIcon from the windows
554         directory to the Resource directory to be used by Qt and other ports.
555         
556         Ifdef the usage of the built-in icon in IconDatabase.cpp and for Qt do not use
557         it. Gtk+ currently has no proper implementation of Image::loadPlatformResource but
558         once it does it wants to use this for getting the urlIcon as well.
559
560         * Resources/urlIcon.png: Renamed from WebKit/win/WebKit.vcproj/urlIcon.png.
561         * loader/icon/IconDatabase.cpp:
562         (WebCore::IconDatabase::defaultIcon):
563
564 2008-03-11  Tor Arne Vestbø  <tavestbo@trolltech.com>
565
566         Reviewed by Darin.
567
568         Implemented HTML media element support for QtWebKit, using Phonon.
569
570         http://bugs.webkit.org/show_bug.cgi?id=17766
571
572         * WebCore.pro:
573         * platform/graphics/MediaPlayer.cpp:
574         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp: Added.
575         (debugMediaObject):
576         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
577         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
578         (WebCore::MediaPlayerPrivate::getSupportedTypes):
579         (WebCore::MediaPlayerPrivate::hasVideo):
580         (WebCore::MediaPlayerPrivate::load):
581         (WebCore::MediaPlayerPrivate::cancelLoad):
582         (WebCore::MediaPlayerPrivate::play):
583         (WebCore::MediaPlayerPrivate::pause):
584         (WebCore::MediaPlayerPrivate::paused):
585         (WebCore::MediaPlayerPrivate::seek):
586         (WebCore::MediaPlayerPrivate::seeking):
587         (WebCore::MediaPlayerPrivate::duration):
588         (WebCore::MediaPlayerPrivate::currentTime):
589         (WebCore::MediaPlayerPrivate::setEndTime):
590         (WebCore::MediaPlayerPrivate::maxTimeBuffered):
591         (WebCore::MediaPlayerPrivate::maxTimeSeekable):
592         (WebCore::MediaPlayerPrivate::bytesLoaded):
593         (WebCore::MediaPlayerPrivate::totalBytesKnown):
594         (WebCore::MediaPlayerPrivate::totalBytes):
595         (WebCore::MediaPlayerPrivate::setRate):
596         (WebCore::MediaPlayerPrivate::setVolume):
597         (WebCore::MediaPlayerPrivate::setMuted):
598         (WebCore::MediaPlayerPrivate::dataRate):
599         (WebCore::MediaPlayerPrivate::networkState):
600         (WebCore::MediaPlayerPrivate::readyState):
601         (WebCore::MediaPlayerPrivate::updateStates):
602         (WebCore::MediaPlayerPrivate::setVisible):
603         (WebCore::MediaPlayerPrivate::setRect):
604         (WebCore::MediaPlayerPrivate::loadStateChanged):
605         (WebCore::MediaPlayerPrivate::rateChanged):
606         (WebCore::MediaPlayerPrivate::sizeChanged):
607         (WebCore::MediaPlayerPrivate::timeChanged):
608         (WebCore::MediaPlayerPrivate::volumeChanged):
609         (WebCore::MediaPlayerPrivate::didEnd):
610         (WebCore::MediaPlayerPrivate::loadingFailed):
611         (WebCore::MediaPlayerPrivate::naturalSize):
612         (WebCore::MediaPlayerPrivate::eventFilter):
613         (WebCore::MediaPlayerPrivate::repaint):
614         (WebCore::MediaPlayerPrivate::paint):
615         (WebCore::MediaPlayerPrivate::stateChanged):
616         (WebCore::MediaPlayerPrivate::tick):
617         (WebCore::MediaPlayerPrivate::metaDataChanged):
618         (WebCore::MediaPlayerPrivate::seekableChanged):
619         (WebCore::MediaPlayerPrivate::hasVideoChanged):
620         (WebCore::MediaPlayerPrivate::bufferStatus):
621         (WebCore::MediaPlayerPrivate::finished):
622         (WebCore::MediaPlayerPrivate::currentSourceChanged):
623         (WebCore::MediaPlayerPrivate::aboutToFinish):
624         (WebCore::MediaPlayerPrivate::prefinishMarkReached):
625         (WebCore::MediaPlayerPrivate::totalTimeChanged):
626         * platform/graphics/qt/MediaPlayerPrivatePhonon.h: Added.
627         (WebCore::MediaPlayerPrivate::):
628         (WebCore::MediaPlayerPrivate::isAvailable):
629
630 2008-03-10  Sam Weinig  <sam@webkit.org>
631
632         Reviewed by Beth Dakin.
633
634         Throw a SECURITY_ERR when accessing a tainted canvas
635         by CanvasRenderingContext2D::getImageData() and
636         HTMLCanvasElement::toDataURL().
637
638         * html/CanvasRenderingContext2D.cpp:
639         (WebCore::CanvasRenderingContext2D::getImageData):
640         * html/CanvasRenderingContext2D.h:
641         * html/CanvasRenderingContext2D.idl:
642         * html/HTMLCanvasElement.cpp:
643         (WebCore::HTMLCanvasElement::toDataURL):
644         * html/HTMLCanvasElement.h:
645         * html/HTMLCanvasElement.idl:
646
647 2008-03-10  Justin Garcia  <justin.garcia@apple.com>
648
649         Reviewed by Sam.
650
651         <rdar://problem/5779984> REGRESSION (r30391): GMail: Safari won't display the Edit Link dialog
652
653         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
654         (WebCore::hasCSSPropertyNamePrefix): Fixed a typo.  The code was only
655         comparing the first character of the prefix to the first character
656         of the property name.
657
658 2008-03-10  Andre Boule  <aboule@apple.com>
659
660         Reviewed by Beth.
661
662         Hold off on initializing the frame to avoid the RenderView getting 
663         a null FrameView. This could potentially cause problems.
664
665         * svg/graphics/SVGImage.cpp:
666         (WebCore::SVGImage::dataChanged):
667
668 2008-03-10  Darin Adler  <darin@apple.com>
669
670         - try to fix Qt build
671
672         * bridge/qt/qt_runtime.cpp:
673         (KJS::Bindings::convertQVariantToValue): Change KJS::UChar to UChar.
674
675 2008-03-10  Darin Adler  <darin@apple.com>
676
677         Reviewed by Antti.
678
679         - fix <rdar://problem/3059610> VIP: links opened in new frame, window, or tab
680           should be redrawn as visited immediately
681         - fix <rdar://problem/4382809> Going "back" a page doesn't change the color of
682           the visited URL at directory.umi
683         - fix http://bugs.webkit.org/show_bug.cgi?id=4941
684           Visited links should be marked as visited
685         - fix http://bugs.webkit.org/show_bug.cgi?id=7960
686           REGRESSION: Visited link color doesn't displayed after loading page from cache
687
688         We now mark all links on a page as "changed" at the appropriate times.
689
690         * WebCore.base.exp: Update since I made completeURL be a const member function.
691
692         * css/CSSStyleSelector.cpp: Got rid of some unneeded globals that could be turned
693         into locals. Also changed some static data members to file-scoped globals with
694         internal linkage. Renamed the globals to get rid of the m_ prefix. Changed the
695         prefix on m_styleNotYetAvailable to s_styleNotYetAvailable.
696         (WebCore::CSSStyleSelector::CSSStyleSelector): Updated for name changes.
697         (WebCore::parseUASheet): Tweak the comment.
698         (WebCore::CSSStyleSelector::loadDefaultStyle): Updated for name changes and to
699         use local variables instead of globals where possible.
700         (WebCore::CSSStyleSelector::checkPseudoState): Made this a member function so
701         it can store the link in a hash. Also changed it to have a return value instead
702         of having it modify a global variable. Added code to put the hash into a set so
703         we can tell later if this is one of the links that affects this page.
704         (WebCore::CSSStyleSelector::canShareStyleWithElement): Updated for the change to
705         checkPseudoState.
706         (WebCore::CSSStyleSelector::matchUARules): Updated for name changes.
707         (WebCore::CSSStyleSelector::styleForElement): Ditto.
708         (WebCore::CSSStyleSelector::adjustRenderStyle): Ditto.
709         (WebCore::CSSStyleSelector::pseudoStyleRulesForElement): Changed code to read
710         the SVG style sheet to use a boolean global and put it right here in the function
711         since this is the only code that needs to know about it.
712         (WebCore::CSSStyleSelector::checkOneSelector): Updated for name changes.
713         (WebCore::colorForCSSValue): Moved code inside the function that is not needed
714         anywhere else.
715         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Updaed for the change
716         to checkPseudoState.
717         (WebCore::CSSStyleSelector::allVisitedStateChanged): Added. Calls setChanged on
718         all links if there were any in the set.
719         (WebCore::CSSStyleSelector::visitedStateChanged): Added. Calls setChanged on all
720         links if the one that changed is in the set.
721
722         * css/CSSStyleSelector.h: Removed unused StyleSelector class and State enum. Made
723         CSSStyleSelector derive from Noncopyable. Made lots of member functions private that
724         didn't need to be public, and removed others that could be made into non-member
725         functions. Changed pseudoStyleRulesForElement to take a const String& instead of
726         a StringImpl*. Added new allVisitedStateChanged and visitedStateChanged functions.
727         Got rid of unneeded friend declarations.
728
729         * dom/Document.cpp:
730         (WebCore::Document::completeURL): Made const.
731         (WebCore::findSlashDotDotSlash): Moved here from PageGroup.
732         (WebCore::findSlashSlash): Ditto.
733         (WebCore::findSlashDotSlash): Ditto.
734         (WebCore::containsColonSlashSlash):
735         (WebCore::cleanPath): Ditto.
736         (WebCore::matchLetter): Ditto.
737         (WebCore::needsTrailingSlash): Ditto.
738         (WebCore::Document::visitedLinkHash): Moved this here from PageGroup. This is
739         the poor-man's completeURL function. The idea of putting it here is that this
740         way it can be alongside the real completeURL function. Later we should figure out
741         a way to make this function share more code with the real thing and match behavior.
742
743         * dom/Document.h: Marked completeURL function const. Added visitedLinkHash function.
744
745         * page/DOMWindow.cpp:
746         (WebCore::DOMWindow::getMatchedCSSRules): Updated for change to CSSStyleSelector.
747
748         * page/Page.cpp:
749         (WebCore::Page::allVisitedStateChanged): Added. Calls allVisitedStateChanged on all
750         style selectors.
751         (WebCore::Page::visitedStateChanged): Ditto.
752         * page/Page.h: Added the above functions.
753
754         * page/PageGroup.cpp:
755         (WebCore::PageGroup::isLinkVisited): Changed to take a visitedLinkHash parameter.
756         The CSSStyleSelector now handles actually computing the hash, and it does so by
757         calling code in Document.
758         (WebCore::PageGroup::addVisitedLink): Refactored so the two overloaded copies share
759         a bit more code. Added code that calls visitedStateChanged if a new link was added.
760         (WebCore::PageGroup::removeVisitedLinks): Added code to call allVisitedStateChanged
761         if any visited links are removed.
762         * page/PageGroup.h: Include StringHash.h instead of having the AlreadyHashed struct
763         definition here.
764
765         * platform/text/StringHash.h:
766         (WebCore::CaseFoldingHash::hash): Tweaked to make this a bit more consistent with
767         the StringImpl::computeHash function, using the same technique for avoiding 0.
768         (WebCore::AlreadyHashed::hash): Added. Was formerly in PageGroup.h.
769         (WebCore::AlreadyHashed::avoidDeletedValue): Added. Was formerly in PageGroup.cpp.
770
771         * rendering/RenderStyle.cpp:
772         (WebCore::RenderStyle::isStyleAvailable): Changed to use an inline function instead
773         of getting directly at a data member so the data member could be made private.
774
775         * loader/FrameLoader.cpp:
776         (WebCore::FrameLoader::scrollToAnchor): Added call to updateHistoryForAnchorScroll.
777         (WebCore::FrameLoader::updateHistoryForAnchorScroll): Added.
778         * loader/FrameLoader.h: Added updateHistoryForAnchorScroll.
779
780 2008-03-10  Adam Roben  <aroben@apple.com>
781
782         Part of Bug 17224: DOM nodes/attributes should be editable
783
784         <http://bugs.webkit.org/show_bug.cgi?id=17224>
785         <rdar://problem/5732825>
786
787         This patch makes DOM attributes editable via double-click.
788
789         Reviewed by Tim.
790
791         * page/inspector/DocumentPanel.js:
792         (WebInspector.DOMNodeTreeElement.onmousedown): Don't do anything if
793         we're being edited, since we want default editing behaviors to work.
794         (WebInspector.DOMNodeTreeElement.ondblclick): Try to start editing
795         before doing anything else.
796         (WebInspector.DOMNodeTreeElement._startEditing): Added. Currently only
797         lets you edit attributes.
798         (WebInspector.DOMNodeTreeElement._attributeEditingCommitted): Added.
799         Uses a scratch element to get the new attribute(s) parsed, then sets
800         the attribute(s) on the node in the inspected document.
801         (WebInspector.DOMNodeTreeElement._attributeEditingCancelled): Added.
802         (WebInspector.DOMNodeTreeElement._updateTitle): Added. Refreshes the
803         representation of the node in the Inspector's DOM tree to reflect
804         the node's current state.
805         * page/inspector/inspector.css: Made the .editing class apply
806         everywhere.
807         * page/inspector/utilities.js:
808         (nodeTitleInfo): Changed to surround attribute name/value pairs in a
809         webkit-html-attribute span so that we can easily edit the pair as a
810         whole.
811
812 2008-03-10  David Kilzer  <ddkilzer@apple.com>
813
814         Fix 64-bit builds.
815
816         Reviewed by Stephanie.
817
818         WebCore.exp only gets generated once for both 32-bit and 64-bit builds,
819         so we must exclude the _NPN symbols when creating WebCore.LP64.exp.
820
821         * WebCore.xcodeproj/project.pbxproj: Reverted build phase shell code to
822         r30826 to remove _NPN symbols from 64-bit builds in WebCore.LP64.exp.
823
824 2008-03-10  Eric Seidel  <eric@webkit.org>
825
826         Reviewed by Darin.
827
828         Remove KJS::UChar, use ::UChar instead
829         http://bugs.webkit.org/show_bug.cgi?id=17017
830
831         To functional changes, thus no tests.
832
833         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
834         (WebCore::hasCSSPropertyNamePrefix):
835         (WebCore::cssPropertyName):
836         * bindings/js/JSDOMWindowBase.cpp:
837         (WebCore::windowProtoFuncAToB):
838         (WebCore::windowProtoFuncBToA):
839         * bindings/js/JSSVGPODTypeWrapper.h:
840         * bindings/js/kjs_proxy.cpp:
841         (WebCore::KJSProxy::evaluate):
842         * bridge/objc/objc_utility.mm:
843         (KJS::Bindings::throwError):
844         * dom/Document.cpp:
845         (WebCore::Document::parseQualifiedName):
846         * platform/text/AtomicString.cpp:
847         (WebCore::AtomicString::add):
848         * platform/text/String.cpp:
849         (WebCore::String::String):
850         (WebCore::String::operator Identifier):
851         (WebCore::String::operator UString):
852         * platform/text/TextCodecICU.cpp:
853         (WebCore::TextCodecICU::decode):
854         * svg/SVGAnimatedTemplate.h:
855
856 2008-03-10  Darin Adler  <darin@apple.com>
857
858         Reviewed by Sam.
859
860         - eliminate keyboard UI mode method from WebCoreFrameBridge
861
862         * page/ChromeClient.h: Added keyboardUIMode function.
863         (WebCore::ChromeClient::keyboardUIMode): Ditto.
864         * page/mac/EventHandlerMac.mm:
865         (WebCore::EventHandler::tabsToAllControls): Call chrome client function instead
866         of bridge function.
867         * page/mac/WebCoreFrameBridge.h: Removed keyboardUIMode method, and other unused
868         ones.
869
870         * WebCore.xcodeproj/project.pbxproj: Allowed Xcode to change the project.
871         Do not try to fight the Xcode.
872
873 2008-03-10  Darin Adler  <darin@apple.com>
874
875         - oops, forgot to save last couple changes from the editor
876
877         * bindings/js/JSDOMWindowCustom.cpp:
878         (WebCore::markDOMObjectWrapper): Tweaked a tiny bit.
879         (WebCore::JSDOMWindow::mark): Sorted alphabetically.
880
881 2008-03-10  Darin Adler  <darin@apple.com>
882
883         Reviewed by Geoff.
884
885         - fix failing regression test (window.navigator is getting garbage
886           collected and thus losing its custom properties)
887
888         * bindings/js/JSDOMWindowCustom.cpp:
889         (WebCore::markDOMObject): Added helper function.
890         (WebCore::JSDOMWindow::mark): Added. Marks the wrappers for all the objects that hang
891         off the window object.
892
893         * page/DOMWindow.h:
894         (WebCore::DOMWindow::optionalScreen): Added so we can get the Screen object without
895         creating it if it's already there.
896         (WebCore::DOMWindow::optionalSelection): Ditto.
897         (WebCore::DOMWindow::optionalHistory): Ditto.
898         (WebCore::DOMWindow::optionalLocationbar): Ditto.
899         (WebCore::DOMWindow::optionalMenubar): Ditto.
900         (WebCore::DOMWindow::optionalPersonalbar): Ditto.
901         (WebCore::DOMWindow::optionalScrollbars): Ditto.
902         (WebCore::DOMWindow::optionalStatusbar): Ditto.
903         (WebCore::DOMWindow::optionalToolbar): Ditto.
904         (WebCore::DOMWindow::optionalConsole): Ditto.
905         (WebCore::DOMWindow::optionalNavigator): Ditto.
906
907         * page/DOMWindow.idl: Added the CustomMarkFunction flag. Sorted the flags in
908         alphabetical order since there are a lot of them.
909
910 2008-03-10  Darin Adler  <darin@apple.com>
911
912         Reviewed by Sam.
913
914         - eliminate Java applet methods from WebCoreFrameBridge
915
916         * loader/FrameLoaderClient.h: Added a javaApplet function.
917         * page/mac/FrameMac.mm:
918         (WebCore::Frame::createScriptInstanceForWidget): Streamlined the code.
919         Use the loader client instead of the bridge to get the applet.
920         * page/mac/WebCoreFrameBridge.h: Removed the getAppletInView and
921         pollForAppletInView methods. Also removed other unused things.
922
923 2008-03-10  Marc-Antoine Ruel  <maruel@gmail.com>
924
925         Reviewed by Eric, landed by Darin.
926
927         http://bugs.webkit.org/show_bug.cgi?id=16095
928         Move GraphicsContextPrivate to its own header file.
929
930         Moves GraphicsContextState and GraphicsContextPrivate to its
931         own header
932
933         * WebCore.vcproj/WebCore.vcproj:
934         * platform/graphics/GraphicsContext.cpp:
935         * platform/graphics/GraphicsContextPrivate.h: Added.
936         (WebCore::GraphicsContextState::GraphicsContextState):
937         (WebCore::GraphicsContextPrivate::GraphicsContextPrivate):
938
939 2008-03-10  Julien Chaffraix  <julien.chaffraix@gmail.com>
940
941         Reviewed and landed by Darin.
942
943         bug 12182 : XMLHttpRequest should raise SECURITY_ERR for same-origin policy violations
944
945         Removed reference to PERMISSION_DENIED (previous non standard exception) and replaced it
946         by DOM exception SECURITY_ERR. Updated XMLHttpRequest::open to raise SECURITY_ERR.
947
948         * bindings/js/kjs_binding.cpp:
949         (WebCore::setDOMException): Removed PERMISSION_DENIED code.
950         * dom/ExceptionCode.cpp: Added SECURITY_ERR exception.
951         * dom/ExceptionCode.h: Ditto.
952         * xml/XMLHttpRequest.cpp:
953         (WebCore::XMLHttpRequest::open): Returns SECURITY_ERR now.
954         * xml/XMLHttpRequestException.h: Removed PERMISSION_DENIED.
955
956 2008-03-09  Adam Roben  <aroben@apple.com>
957
958         Refactor CSS editing code so we can share it with DOM editing
959
960         Add WebInspector.startEditing, which takes the element to be edited, a
961         committedCallback, a cancelledCallback, and a context parameter. This
962         function takes care of setting up the element for editing, and calls
963         either the cancelledCallback or committedCallback when editing ends.
964
965         Reviewed by Tim.
966
967         * page/inspector/StylesSidebarPane.js:
968         (WebInspector.StylePropertyTreeElement.startEditing):
969           - Call WebInspector.isBeingEdited and WebInspector.startEditing
970           - Removed code now handled by WebInspector.startEditing
971         (WebInspector.StylePropertyTreeElement.editingEnded):
972           - Renamed from endEditing
973           - Removed code now handled by WebInspector.startEditing
974         (WebInspector.StylePropertyTreeElement.editingCancelled):
975           - Renamed from cancelEditing
976           - Changed parameters to match WebInspector.startEditing's
977             cancelledCallback
978         (WebInspector.StylePropertyTreeElement.editingCommitted):
979           - Renamed from commitEditing
980           - Changed parameters to match WebInspector.startEditing's
981             committedCallback
982         * page/inspector/inspector.js:
983         (WebInspector.changeFocus): Changed a call to firstParentWithClassName
984         to firstParentOrSelfWithClassName so that if the focusable element
985         itself is the target it will be recognized. I don't know why this
986         change wasn't needed before this.
987         (WebInspector.isBeingEdited): Added.
988         (WebInspector.startEditing): Added.
989
990 2008-03-10  Adam Roben  <aroben@apple.com>
991
992         Windows build fix
993
994         * WebCore.vcproj/WebCore.vcproj: Pick up generated source files out of
995         $(WebKitOutputDir) instead of hard-coding WebKitBuild.
996
997 2008-03-10  Darin Adler  <darin@apple.com>
998
999         * DerivedSources.make: Merge plug-in-related changes with the new way of handling
1000         autogenerated DOM classes.
1001
1002 2008-03-10  Johnny Ding  <johnnyding.webkit@gmail.com>
1003
1004         Reviewed, tweaked and landed by Alexey.
1005
1006         - fix http://bugs.webkit.org/show_bug.cgi?id=17732        
1007
1008         We didn't have a fallback to frame encoding in the case of loading a script via
1009         changing its src attribute.
1010
1011         Test: fast/dom/HTMLScriptElement/script-decoding-error-after-setting-src.html
1012
1013         * html/HTMLScriptElement.cpp:
1014         (WebCore::HTMLScriptElement::parseMappedAttribute): Use a helper function to get proper
1015         charset for correct decoding of script content.
1016         (WebCore::HTMLScriptElement::insertedIntoDocument):
1017         (WebCore::HTMLScriptElement::scriptCharset): A helper function for getting proper charset
1018         for the script (as much as can be determined prior to loading it).
1019         * html/HTMLScriptElement.h:
1020         * html/HTMLTokenizer.cpp:
1021         (WebCore::HTMLTokenizer::parseTag): Use a helper function to get proper charset for correct
1022         decoding of script content.
1023
1024 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
1025
1026         Reviewed by Lars.
1027
1028         Fix reference counting of returned MimeType and Plugin objects
1029         created in the array wrappers.
1030
1031         * plugins/MimeTypeArray.cpp:
1032         * plugins/MimeTypeArray.h:
1033         * plugins/Plugin.cpp:
1034         * plugins/Plugin.h:
1035         * plugins/PluginArray.cpp:
1036         * plugins/PluginArray.h:
1037
1038 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
1039
1040         Wx linking fix.
1041
1042         Added missing stubs for PluginData.
1043
1044         * platform/wx/TemporaryLinkStubs.cpp:
1045
1046 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
1047
1048         Windows build fix that I forgot to merge earlier ;(
1049
1050         Forward declare Page as class, not struct.
1051
1052         * plugins/PluginData.h:
1053
1054 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
1055
1056         Attempt to fix the Wx build.
1057
1058         * WebCoreSources.bkl:
1059
1060 2008-03-07  Simon Hausmann  <hausmann@webkit.org>
1061
1062         Reviewed by Darin.
1063
1064         Done with Lars.
1065
1066         http://bugs.webkit.org/show_bug.cgi?id=16815
1067
1068         Ported the manually written JS bindings of window.navigator,
1069         window.navigator.plugins and window.navigator.mimeTypes to
1070         auto-generated bindings.
1071
1072         Moved the globally cached plugin and mimetype information to a
1073         per WebCore::Page shared PluginData structure.
1074
1075         Implemented window.navigator.plugins.refresh() in a
1076         platform-independent way.
1077
1078         * DerivedSources.make:
1079         * GNUmakefile.am:
1080         * WebCore.pro:
1081         * WebCore.vcproj/WebCore.vcproj:
1082         * WebCore.xcodeproj/project.pbxproj:
1083         * bindings/js/JSDOMWindowBase.cpp:
1084         (WebCore::JSDOMWindowBase::getValueProperty):
1085         * bindings/js/JSMimeTypeArrayCustom.cpp: Added.
1086         (WebCore::JSMimeTypeArray::canGetItemsForName):
1087         (WebCore::JSMimeTypeArray::nameGetter):
1088         * bindings/js/JSNavigatorCustom.cpp: Added.
1089         (WebCore::needsYouTubeQuirk):
1090         (WebCore::JSNavigator::appVersion):
1091         * bindings/js/JSPluginArrayCustom.cpp: Added.
1092         (WebCore::JSPluginArray::canGetItemsForName):
1093         (WebCore::JSPluginArray::nameGetter):
1094         * bindings/js/JSPluginCustom.cpp: Added.
1095         (WebCore::JSPlugin::canGetItemsForName):
1096         (WebCore::JSPlugin::nameGetter):
1097         * bindings/js/kjs_navigator.cpp: Removed.
1098         * bindings/js/kjs_navigator.h: Removed.
1099         * dom/Clipboard.cpp:
1100         * dom/DOMImplementation.cpp:
1101         (WebCore::DOMImplementation::createDocument):
1102         * loader/FrameLoader.cpp:
1103         (WebCore::FrameLoader::shouldUsePlugin):
1104         * page/DOMWindow.cpp:
1105         (WebCore::DOMWindow::clear):
1106         (WebCore::DOMWindow::navigator):
1107         * page/DOMWindow.h:
1108         * page/DOMWindow.idl:
1109         * page/DragController.cpp:
1110         * page/Frame.cpp:
1111         * page/Frame.h:
1112         * page/Navigator.cpp: Added.
1113         (WebCore::Navigator::Navigator):
1114         (WebCore::Navigator::~Navigator):
1115         (WebCore::Navigator::disconnectFrame):
1116         (WebCore::Navigator::appCodeName):
1117         (WebCore::Navigator::appName):
1118         (WebCore::Navigator::appVersion):
1119         (WebCore::Navigator::language):
1120         (WebCore::Navigator::userAgent):
1121         (WebCore::Navigator::platform):
1122         (WebCore::Navigator::plugins):
1123         (WebCore::Navigator::mimeTypes):
1124         (WebCore::Navigator::product):
1125         (WebCore::Navigator::productSub):
1126         (WebCore::Navigator::vendor):
1127         (WebCore::Navigator::vendorSub):
1128         (WebCore::Navigator::cookieEnabled):
1129         (WebCore::Navigator::javaEnabled):
1130         * page/Navigator.h: Added.
1131         (WebCore::Navigator::create):
1132         (WebCore::Navigator::frame):
1133         * page/Navigator.idl: Added.
1134         * page/Page.cpp:
1135         (WebCore::Page::refreshPlugins):
1136         (WebCore::Page::pluginData):
1137         * page/Page.h:
1138         * page/Plugin.h: Removed.
1139         * page/mac/FrameMac.mm:
1140         * page/mac/WebCoreFrameBridge.mm:
1141         (-[WebCoreFrameBridge canProvideDocumentSource]):
1142         * page/mac/WebCoreViewFactory.h:
1143         * page/qt/FrameQt.cpp:
1144         * page/win/FrameWin.cpp:
1145         * platform/gtk/TemporaryLinkStubs.cpp:
1146         * platform/mac/PlugInInfoStoreMac.mm: Removed.
1147         * platform/qt/MIMETypeRegistryQt.cpp:
1148         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
1149         * plugins/MimeType.cpp: Added.
1150         (WebCore::MimeType::MimeType):
1151         (WebCore::MimeType::~MimeType):
1152         (WebCore::MimeType::type):
1153         (WebCore::MimeType::suffixes):
1154         (WebCore::MimeType::description):
1155         (WebCore::MimeType::enabledPlugin):
1156         * plugins/MimeType.h: Added.
1157         (WebCore::MimeType::create):
1158         * plugins/MimeType.idl: Added.
1159         * plugins/MimeTypeArray.cpp: Added.
1160         (WebCore::MimeTypeArray::MimeTypeArray):
1161         (WebCore::MimeTypeArray::~MimeTypeArray):
1162         (WebCore::MimeTypeArray::length):
1163         (WebCore::MimeTypeArray::item):
1164         (WebCore::MimeTypeArray::canGetItemsForName):
1165         (WebCore::MimeTypeArray::nameGetter):
1166         (WebCore::MimeTypeArray::getPluginData):
1167         * plugins/MimeTypeArray.h: Added.
1168         (WebCore::MimeTypeArray::create):
1169         (WebCore::MimeTypeArray::disconnectFrame):
1170         * plugins/MimeTypeArray.idl: Added.
1171         * plugins/Plugin.cpp: Added.
1172         (WebCore::Plugin::Plugin):
1173         (WebCore::Plugin::~Plugin):
1174         (WebCore::Plugin::name):
1175         (WebCore::Plugin::filename):
1176         (WebCore::Plugin::description):
1177         (WebCore::Plugin::length):
1178         (WebCore::Plugin::item):
1179         (WebCore::Plugin::canGetItemsForName):
1180         (WebCore::Plugin::nameGetter):
1181         * plugins/Plugin.h: Added.
1182         (WebCore::Plugin::create):
1183         * plugins/Plugin.idl: Added.
1184         * plugins/PluginArray.cpp: Added.
1185         (WebCore::PluginArray::PluginArray):
1186         (WebCore::PluginArray::~PluginArray):
1187         (WebCore::PluginArray::length):
1188         (WebCore::PluginArray::item):
1189         (WebCore::PluginArray::canGetItemsForName):
1190         (WebCore::PluginArray::nameGetter):
1191         (WebCore::PluginArray::refresh):
1192         (WebCore::PluginArray::getPluginData):
1193         * plugins/PluginArray.h: Added.
1194         (WebCore::PluginArray::create):
1195         (WebCore::PluginArray::disconnectFrame):
1196         * plugins/PluginArray.idl: Added.
1197         * plugins/PluginData.cpp: Added.
1198         (WebCore::PluginData::PluginData):
1199         (WebCore::PluginData::~PluginData):
1200         (WebCore::PluginData::supportsMimeType):
1201         (WebCore::PluginData::pluginNameForMimeType):
1202         * plugins/PluginData.h: Added.
1203         (WebCore::PluginData::create):
1204         (WebCore::PluginData::disconnectPage):
1205         (WebCore::PluginData::page):
1206         (WebCore::PluginData::plugins):
1207         (WebCore::PluginData::mimes):
1208         * plugins/mac/PluginDataMac.mm: Added.
1209         (WebCore::PluginData::initPlugins):
1210         (WebCore::PluginData::refresh):
1211         * plugins/qt/PluginDataQt.cpp: Added.
1212         (WebCore::PluginData::initPlugins):
1213         * plugins/win/PluginDataWin.cpp: Added.
1214         (WebCore::PluginData::initPlugins):
1215         (WebCore::PluginData::refresh):
1216
1217 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
1218
1219         Reviewed by Holger.
1220
1221         Replace two printfs() in the Qt port with notImplemented().
1222
1223         * html/CanvasRenderingContext2D.cpp:
1224         (WebCore::CanvasRenderingContext2D::applyStrokePattern):
1225         (WebCore::CanvasRenderingContext2D::applyFillPattern):
1226
1227 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
1228
1229         Reviewed by Alp.
1230
1231         Compilation fix with gcc 4.3: Include stdio.h for printf.
1232
1233         * html/CanvasRenderingContext2D.cpp:
1234         * html/HTMLCanvasElement.cpp:
1235
1236 2008-03-09  Steve Falkenburg  <sfalken@apple.com>
1237
1238         Stop Windows build if an error occurs in a prior project.
1239
1240         Rubber stamped by Darin.
1241
1242         * WebCore.vcproj/WebCore.vcproj:
1243         * WebCore.vcproj/WebCoreGenerated.vcproj:
1244
1245 2008-03-09  Darin Adler  <darin@apple.com>
1246
1247         * DerivedSources.make: Third try at fixing the build.
1248         * bindings/js/JSRGBColor.cpp: And touching this file.
1249
1250 2008-03-09  Darin Adler  <darin@apple.com>
1251
1252         * DerivedSources.make: One *more* try at fixing the build.
1253
1254 2008-03-09  Darin Adler  <darin@apple.com>
1255
1256         * DerivedSources.make: One more try at fixing the build.
1257
1258 2008-03-09  Darin Adler  <darin@apple.com>
1259
1260         * DerivedSources.make: Re-land the change, fixed, and with an attempt to fix the
1261         bots by removing the incorrect file.
1262
1263 2008-03-09  Oliver Hunt  <oliver@apple.com>
1264
1265         RS=Mark Rowe
1266
1267         Roll out r30909 -- it breaks the build and is a non-trivial fix (according to weinig)
1268
1269         * DerivedSources.make:
1270
1271 2008-03-09  Darin Adler  <darin@apple.com>
1272
1273         Reviewed by Adam.
1274
1275         * DerivedSources.make: Put the list of DOM classes into its own
1276         variable, and generate the JavaScript bindings and Objective-C
1277         bindings dependencies from that. Added some separators to make it
1278         a little easier to see the sections of the file. Moved all the
1279         Mac-specific rules (except for the SVG conditional part) down
1280         to the bottom of the file in a separate section.
1281
1282 2008-03-09  Adam Roben  <aroben@apple.com>
1283
1284         Windows build fix
1285
1286         * WebCore.vcproj/WebCore.vcproj: Make sure all Cairo files are
1287         excluded from all three CG-based configurations: Debug, Release, and
1288         Debug_Internal.
1289
1290 2008-03-08  Mark Rowe  <mrowe@apple.com>
1291
1292         Attempt to fix the Qt build.
1293
1294         * platform/MIMETypeRegistry.cpp:  Add missing include.
1295
1296 2008-03-08  Oliver Hunt  <oliver@apple.com>
1297
1298         Reviewed by Sam W.
1299
1300         Bug 16516: canvas image patterns stop working with some transformations
1301
1302         Simple fix.  We used x/yStep of FLT_MAX to fake a no-repeat-x/y pattern
1303         with CG.  However any transforms involving FLT_MAX immediately get
1304         consumed by the introduced floating point error.  yStep had already been
1305         clamped to a much smaller arbitrary value, and this patch makes us use
1306         that clamp value for xStep as well.
1307
1308         * html/CanvasPattern.cpp:
1309         (WebCore::CanvasPattern::createPattern):
1310
1311 2008-03-08  Oliver Hunt  <oliver@apple.com>
1312
1313         Reviewed by Mitz.
1314
1315         Bug 17728: Canvas.createPattern with null repeat argument throws an exception
1316
1317         Trivial fix, we were calling toString on null which produces the string "null",
1318         we just needed to switch to using valueToStringWithNullCheck rather than 
1319         JSValue::toString directly
1320
1321         Test: fast/canvas/canvas-pattern-behaviour.html
1322
1323         * WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp:
1324         (WebCore::JSCanvasRenderingContext2D::createPattern):
1325
1326 2008-03-08  Mark Rowe  <mrowe@apple.com>
1327
1328         Reviewed by Darin Adler.
1329
1330         Fix 64-bit build with GCC 4.2.
1331
1332         * bindings/objc/WebScriptObject.mm: Use NSUInteger in place of unsigned where required.
1333         * platform/mac/SharedBufferMac.mm: Ditto.
1334
1335 2008-03-08  Dan Bernstein  <mitz@apple.com>
1336
1337         Reviewed by Oliver Hunt.
1338
1339         - fix garbage in transparent areas in canvas.toDataURL results
1340
1341         * platform/graphics/cg/ImageBufferCG.cpp:
1342         (WebCore::ImageBuffer::toDataURL): Clear the bitmap context before
1343         painting the canvas image onto it.
1344
1345 2008-03-08  Darin Adler  <darin@apple.com>
1346
1347         Reviewed by Adele.
1348
1349         - eliminate custom highlight methods from WebCoreFrameBridge
1350
1351         * page/Chrome.cpp:
1352         (WebCore::ChromeClient::customHighlightRect): Added.
1353         (WebCore::ChromeClient::paintCustomHighlight): Added.
1354         * page/ChromeClient.h: Added custom highlight functions.
1355         * page/Frame.h: Removed custom highlight functions.
1356         * page/mac/FrameMac.mm: Ditto.
1357         * page/mac/WebCoreFrameBridge.h: Removed custom highlight methods.
1358         * rendering/InlineTextBox.cpp:
1359         (WebCore::InlineTextBox::paintCustomHighlight): Changed code to use
1360         the ChromeClient instead of WebCoreFrameBridge to do the custom highlight.
1361         * rendering/RenderBox.cpp:
1362         (WebCore::RenderBox::paintCustomHighlight): Ditto.
1363         * rendering/RootInlineBox.cpp:
1364         (WebCore::RootInlineBox::addHighlightOverflow): Ditto.
1365         (WebCore::RootInlineBox::paintCustomHighlight): Ditto.
1366
1367 2008-03-07  Stephanie Lewis  <slewis@apple.com>
1368
1369         Reviewed by Oliver.
1370
1371         Fix Windows build.
1372
1373         * platform/graphics/cg/ImageBufferCG.cpp:
1374         (WebCore::ImageBuffer::toDataURL):
1375
1376 2008-03-07  David D. Kilzer  <ddkilzer@apple.com>
1377
1378         Unify concept of enabling Netscape Plug-in API (NPAPI).
1379
1380         Reviewed by Darin.
1381
1382         No test cases since there is no change in functionality.
1383
1384         * DerivedSources.make: Added check for ENABLE_NETSCAPE_PLUGIN_API macro.
1385         If defined as "1", add WebCore.NPAPI.exp to WEBCORE_EXPORT_DEPENDENCIES.
1386         * WebCore.NPAPI.exp: Added.
1387         * WebCore.base.exp: Moved exported NPAPI methods to WebCore.NPAPI.exp.
1388         * WebCore.xcodeproj/project.pbxproj: Removed changes in r30826 (except
1389         comments) since we now handle exported NPAPI methods via DerivedSources.make.
1390
1391         * config.h: Removed USE(NPOBJECT) since we now use ENABLE(NETSCAPE_PLUGIN_API) as
1392         defined in Platform.h.
1393
1394         * bindings/objc/DOM.mm: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
1395         (-[DOMElement _NPObject]):
1396
1397         * bridge/NP_jsobject.cpp: Replaced !PLATFORM(DARWIN) || !defined(__LP64__) with
1398         ENABLE(NETSCAPE_PLUGIN_API).
1399         * bridge/NP_jsobject.h: Ditto.
1400         * bridge/c/c_class.cpp: Ditto.
1401         * bridge/c/c_class.h: Ditto.
1402         * bridge/c/c_instance.cpp: Ditto.
1403         * bridge/c/c_instance.h: Ditto.
1404         * bridge/c/c_runtime.cpp: Ditto.
1405         * bridge/c/c_runtime.h: Ditto.
1406         * bridge/c/c_utility.cpp: Ditto.
1407         * bridge/c/c_utility.h: Ditto.
1408         * bridge/npruntime.cpp: Ditto.
1409         * bridge/npruntime_impl.h: Ditto.
1410         * bridge/npruntime_priv.h: Ditto.
1411         * bridge/runtime.cpp: Ditto.
1412         (KJS::Bindings::Instance::createBindingForLanguageInstance):
1413
1414         * html/HTMLPlugInElement.cpp: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
1415         (WebCore::HTMLPlugInElement::HTMLPlugInElement):
1416         (WebCore::HTMLPlugInElement::~HTMLPlugInElement):
1417         * html/HTMLPlugInElement.h: Ditto.
1418
1419         * page/Frame.cpp: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
1420         (WebCore::Frame::clearScriptObjects):
1421         (WebCore::FramePrivate::FramePrivate): Also added #if ENABLE(NETSCAPE_PLUGIN_API)
1422         guard around m_windowScriptNPObject.
1423         * page/Frame.h: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
1424         * page/FramePrivate.h: Added #if ENABLE(NETSCAPE_PLUGIN_API) guard around
1425         m_windowScriptNPObject.
1426         * page/mac/FrameMac.mm: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
1427         (WebCore::Frame::createScriptInstanceForWidget):
1428
1429 2008-03-07  Alexey Proskuryakov  <ap@webkit.org>
1430
1431         Reviewed by Darin.
1432
1433         REGRESSION: Korean decoding doesn't support extended EUC-KR.
1434
1435         Test: fast/encoding/char-decoding.html
1436
1437         * platform/text/TextCodecICU.cpp:
1438         (WebCore::TextCodecICU::registerExtendedEncodingNames): Untangle the system of duplicate ICU
1439         encoding names by manually registering windows-939-2000, and mapping all other related
1440         encodings to it.
1441
1442 2008-03-07  Dan Bernstein  <mitz@apple.com>
1443
1444         Reviewed by Stephanie.
1445
1446         - try to fix leaks seen on Tiger after r30840
1447
1448         * css/CSSStyleSelector.cpp:
1449         (WebCore::CSSStyleSelector::~CSSStyleSelector): Use the default operator
1450         delete, rather than arena delete, to deallocate the root default style.
1451
1452 2008-03-07  Pierre-Luc Beaudoin  <pierre-luc.beaudoin@collabora.co.uk>
1453
1454         Reviewed by Alp Toker.
1455
1456         http://bugs.webkit.org/show_bug.cgi?id=17681
1457         GtkLauncher fails to render an element with position: fixed
1458
1459         Implement the required parts of PlatformScreenGtk.
1460
1461         * ChangeLog:
1462         * platform/gtk/PlatformScreenGtk.cpp:
1463         (WebCore::screenDepth):
1464         (WebCore::screenIsMonochrome):
1465         (WebCore::screenRect):
1466
1467 2008-03-07  Oliver Hunt  <oliver@apple.com>
1468
1469         Reviewed by Darin Adler.
1470
1471         Bug 16610: <canvas> restore() removes path segments created before it
1472
1473         The problem here is that WebKit stored the Path as part of the state, so
1474         restore would incorrectly lose changes made to the canvas path.  To match
1475         Firefox and HTML5 we make two real changes:
1476           * Move the context path from the state object directly onto the context.
1477             This is responsible for all the changes to the path manipulation functions
1478           * Add transform tracking to each state -- this is needed to correctly transform
1479             the current path when restore()-ing to a prior state.
1480
1481         Test: fast/canvas/canvas-save-restore-with-path.html
1482
1483         * html/CanvasRenderingContext2D.cpp:
1484         (WebCore::CanvasRenderingContext2D::restore):
1485         (WebCore::CanvasRenderingContext2D::scale):
1486         (WebCore::CanvasRenderingContext2D::rotate):
1487         (WebCore::CanvasRenderingContext2D::translate):
1488         (WebCore::CanvasRenderingContext2D::transform):
1489         (WebCore::CanvasRenderingContext2D::beginPath):
1490         (WebCore::CanvasRenderingContext2D::closePath):
1491         (WebCore::CanvasRenderingContext2D::moveTo):
1492         (WebCore::CanvasRenderingContext2D::lineTo):
1493         (WebCore::CanvasRenderingContext2D::quadraticCurveTo):
1494         (WebCore::CanvasRenderingContext2D::arcTo):
1495         (WebCore::CanvasRenderingContext2D::arc):
1496         (WebCore::CanvasRenderingContext2D::rect):
1497         (WebCore::CanvasRenderingContext2D::clearPathForDashboardBackwardCompatibilityMode):
1498         (WebCore::CanvasRenderingContext2D::fill):
1499         (WebCore::CanvasRenderingContext2D::stroke):
1500         (WebCore::CanvasRenderingContext2D::clip):
1501         (WebCore::CanvasRenderingContext2D::isPointInPath):
1502         * html/CanvasRenderingContext2D.h:
1503
1504 2008-03-07  Oliver Hunt  <oliver@apple.com>
1505
1506         Reviewed by Ada.
1507
1508         Fix for crash caused by FrameLoader incorrectly assuming it has
1509         a RenderWidget
1510
1511         In some circumstances an application embedding a WebView may 
1512         choose to prevent a webview from loading a resource.  If that
1513         resource was requested by an <object> element then we may 
1514         fallback to different content which may not produce a RenderWidget.
1515         Unfortunately FrameLoader::loadSubframe was assuming that if a
1516         renderer was produced it would always be a RenderWidget, and arbitrarily
1517         performed what could be an incorrect cast.  This could then lead to
1518         a crash.
1519
1520         We currently don't have anyway of making a test for this.
1521
1522         * loader/FrameLoader.cpp:
1523         (WebCore::FrameLoader::loadSubframe):
1524
1525 2008-03-07  Samuel Weinig  <sam@webkit.org>
1526
1527         Reviewed by Oliver Hunt.
1528
1529         Fix for http://bugs.webkit.org/show_bug.cgi?id=16673
1530         <canvas> lacks toDataURL()
1531
1532         Tests: fast/canvas/toDataURL-noData.html
1533                fast/canvas/toDataURL-supportedTypes.html
1534
1535         * html/CanvasRenderingContext2D.cpp:
1536         (WebCore::CanvasRenderingContext2D::printSecurityExceptionMessage): Make message non-global.
1537         * html/HTMLCanvasElement.cpp:
1538         (WebCore::HTMLCanvasElement::printSecurityExceptionMessage): Log error message indicating that toDataURL has
1539         been called on a tainted canvas. 
1540         (WebCore::HTMLCanvasElement::toDataURL): This does the tainted canvas check, ensures that the canvas has pixel
1541         data, checks to see if the MIME type is supported.  Unsupported MIME types and the null string (which is made
1542         by passing no argument/null/undefined in JavaScript) are treated as being PNG, as per the spec.  The actual 
1543         toDataURL logic is actually done in the ImageBuffer class.
1544         * html/HTMLCanvasElement.h: Add function declarations.
1545         * html/HTMLCanvasElement.idl: Add function declaration.
1546
1547         * platform/MIMETypeRegistry.cpp:
1548         (WebCore::initializeSupportedImageMIMETypes):
1549         (WebCore::initializeSupportedImageMIMETypesForEncoding):
1550         (WebCore::initializeSupportedJavaScriptMIMETypes):
1551         (WebCore::initializeSupportedNonImageMimeTypes):
1552         (WebCore::initializeSupportedMediaMIMETypes):
1553         (WebCore::initializeMIMETypeRegistry):
1554         (WebCore::MIMETypeRegistry::getMIMETypeForPath):
1555         (WebCore::MIMETypeRegistry::isSupportedImageMIMEType):
1556         (WebCore::MIMETypeRegistry::isSupportedImageResourceMIMEType):
1557         (WebCore::MIMETypeRegistry::isSupportedImageMIMETypeForEncoding):
1558         (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType):
1559         (WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType):
1560         (WebCore::MIMETypeRegistry::isSupportedMediaMIMEType):
1561         (WebCore::MIMETypeRegistry::isJavaAppletMIMEType):
1562         (WebCore::MIMETypeRegistry::getSupportedImageMIMETypes):
1563         (WebCore::MIMETypeRegistry::getSupportedImageResourceMIMETypes):
1564         (WebCore::MIMETypeRegistry::getSupportedImageMIMETypesForEncoding):
1565         (WebCore::MIMETypeRegistry::getSupportedNonImageMIMETypes):
1566         (WebCore::MIMETypeRegistry::getSupportedMediaMIMETypes):
1567         * platform/MIMETypeRegistry.h:
1568         Clean up and add new supportedImageMIMETypesForEncoding set which contains the set of
1569         MIME types the platform knows how to encode. Currently only implemented for CG and Qt.
1570
1571         * platform/graphics/ImageBuffer.h: Add toDataURL method.
1572         * platform/graphics/cairo/ImageBufferCairo.cpp:
1573         (WebCore::ImageBuffer::toDataURL): Add stub.
1574         * platform/graphics/cg/ImageBufferCG.cpp:
1575         (WebCore::ImageBuffer::create):
1576         (WebCore::ImageBuffer::getImageData):
1577         (WebCore::ImageBuffer::putImageData):
1578         (WebCore::ImageBuffer::toDataURL):
1579         Converts the current context to a data: url of the specified MIME type.  This method
1580         unfortunately has to flip the context, resulting in less than optimal code.
1581
1582         * platform/graphics/qt/ImageBufferQt.cpp:
1583         (WebCore::ImageBuffer::toDataURL): Add stub.
1584         * platform/graphics/wx/ImageBufferWx.cpp:
1585         (WebCore::ImageBuffer::toDataURL): Add stub.
1586
1587 2008-03-07  Steve Falkenburg  <sfalken@apple.com>
1588
1589         Build fix.
1590
1591         * WebCore.vcproj/WebCore.vcproj:
1592
1593 2008-03-07  Brent Fulgham  <bfulgham@gmail.com>
1594
1595         Reviewed by Mark Rowe.
1596
1597         Correct build intermediary output
1598         (http://bugs.webkit.org/show_bug.cgi?id=17713)
1599
1600         * WebCore/WebCore.vcproj:  Correct intermediary paths
1601
1602 2008-03-07  Brent Fulgham  <bfulgham@gmail.com>
1603
1604         Reviewed by Steve Falkenburg.
1605
1606         Add Cairo build requirements to WebCore.vcproj under a new
1607         set of targets.  Exclude Cairo elements from normal CG build.
1608         Exclude CG elements from Cairo builds.
1609         (http://bugs.webkit.org/show_bug.cgi?id=17300)
1610
1611         * WebCore.vcproj/WebCore.vcproj:
1612         * WebCore.vcproj/webcore.vsprops: Added.
1613
1614 2008-03-07  Darin Adler  <darin@apple.com>
1615
1616         Reviewed by Adam.
1617
1618         - eliminated WebCoreFrameBridge runOpenPanel
1619
1620         * page/ChromeClient.h: Added runOpenPanel function.
1621         * page/mac/ChromeMac.mm:
1622         (WebCore::ChromeClient::runOpenPanel): Added.
1623         * platform/FileChooser.cpp:
1624         (WebCore::FileChooser::FileChooser): Moved this here. It's no longer platform-specific.
1625         Also start the refcount at 1.
1626         (WebCore::FileChooser::create): Added adoptRef since the refcount no starts at one.
1627         (WebCore::FileChooser::~FileChooser): Moved here. No longer platform-specific.
1628         * platform/FileChooser.h: Removed m_controller, which was Macintosh-specific.
1629         * platform/gtk/FileChooserGtk.cpp: Removed FileChooser constructor and destructor,
1630         since they are no longer platform-specific.
1631         * platform/qt/FileChooserQt.cpp: Ditto.
1632         * platform/win/FileChooserWin.cpp: Ditto.
1633         * platform/wx/TemporaryLinkStubs.cpp: Ditto.
1634         * platform/mac/FileChooserMac.mm:
1635         (WebCore::FileChooser::openFileChooser): Call the chrome client instead of the
1636         bridge to run the open panel. Allows us to get rid of the WebCoreOpenPanelController
1637         class and m_controller data member and move the cosntrutor/destructor to platform-
1638         independent code.
1639
1640 2008-03-07  Adam Roben  <aroben@apple.com>
1641
1642         Add JavaScriptDebugServer
1643
1644         This class is a singleton which allows one or more
1645         JavaScriptDebugListeners to receive callbacks during JavaScript
1646         execution.
1647
1648         Right now all listeners receive callbacks for all Pages in the
1649         process. Eventually we will want to support listeners registering for
1650         callbacks for specific Pages (e.g., the Inspector will want to listen
1651         for execution in just the Page it's inspecting).
1652
1653         Pages notify the JavaScriptDebugServer when they are created so that
1654         it can install itself as the Page's debugger.
1655
1656         Reviewed by Darin.
1657
1658         * GNUMakefile.am: Added new files to project.
1659         * WebCore.pro: Ditto.
1660         * WebCore.vcproj/WebCore.vcproj: Ditto.
1661         * WebCore.xcodeproj/project.pbxproj: Ditto.
1662         * WebCoreSources.bkl: Ditto.
1663         * page/JavaScriptDebugListener.h: Added.
1664         * page/JavaScriptDebugServer.cpp: Added.
1665         (WebCore::toFrame):
1666         (WebCore::JavaScriptDebugServer::shared):
1667         (WebCore::JavaScriptDebugServer::JavaScriptDebugServer):
1668         (WebCore::JavaScriptDebugServer::~JavaScriptDebugServer):
1669         (WebCore::JavaScriptDebugServer::addListener): Registers as the
1670         debugger for all Pages if we're adding our first listener.
1671         (WebCore::JavaScriptDebugServer::removeListener): Deregisters as the
1672         debugger for all Pages if we're removing our last listner.
1673         (WebCore::JavaScriptDebugServer::pageCreated): Registers as the
1674         debugger for the newly created Page if we have any listeners.
1675         (WebCore::dispatchDidParseSource): Helper function.
1676         (WebCore::dispatchFailedToParseSource): Ditto.
1677         (WebCore::JavaScriptDebugServer::sourceParsed): Call
1678         dispatchDidParseSource or dispatchFailedToParseSource depending on
1679         whether there was an error or not.
1680         (WebCore::JavaScriptDebugServer::dispatchFunctionToListeners): Calls
1681         the passed-in JavaScriptExecutionCallback on each listener, guarding
1682         against re-entry.
1683         (WebCore::JavaScriptDebugServer::callEvent): Dispatch didEnterCallFrame.
1684         (WebCore::JavaScriptDebugServer::atStatement): Dispatch willExecuteStatement.
1685         (WebCore::JavaScriptDebugServer::returnEvent): Dispatch willLeaveCallFrame.
1686         (WebCore::JavaScriptDebugServer::exception): Dispatch exceptionWasRaised.
1687         * page/JavaScriptDebugServer.h: Added.
1688         * page/Page.cpp:
1689         (WebCore::Page::Page): Tell the shared JavaScriptDebugServer we were
1690         created so it can register as our debugger if needed.
1691
1692 2008-03-07  Darin Adler  <darin@apple.com>
1693
1694         Reviewed by Brady.
1695
1696         - fix a theoretical problem with the visited-link hash table by avoiding collision
1697           with the special "deleted" value
1698         - improve efficiency of with the visited-link hash table by not hashing twice
1699
1700         * page/PageGroup.cpp:
1701         (WebCore::avoidDeletedValue): Added. Makes sure we never try to use the "all ones"
1702         value, since the hash table uses that for deleted hash table entries.
1703         (WebCore::PageGroup::isLinkVisited): Call avoidDeletedValue before using the hash
1704         value with the HashSet.
1705         (WebCore::PageGroup::addVisitedLink): Ditto.
1706
1707         * page/PageGroup.h: Added a new hash function, AlreadyHashed, for unsigned integer
1708         values. This assumes that the value is already a hash value, and doesn't try to
1709         hash it again. Used this for m_visitedLinkHashes.
1710
1711 2008-03-07  Simon Hausmann  <hausmann@webkit.org>
1712
1713         Fix the Qt build.
1714
1715         * WebCore.pro:
1716
1717 2008-03-06  Sam Weinig  <sam@webkit.org> with a little help from Oliver Hunt  <oliver@apple.com>
1718
1719         Reviewed by Mitz.
1720
1721         Implement the HTML5 canvas tainting rules to prevent potential data leakage
1722
1723         Added originClean to HTMLCanvasElement and CanvasPattern
1724         to track whether a canvas (or pattern) is tainted by remote
1725         data.
1726         Use originClean flag to determine whether getImageData should
1727         return, well, image data.
1728
1729         Test: http/tests/security/canvas-remote-read-remote-image.html
1730
1731         * html/CanvasPattern.cpp:
1732         (WebCore::CanvasPattern::CanvasPattern):
1733         * html/CanvasPattern.h:
1734         * html/CanvasRenderingContext2D.cpp:
1735         (WebCore::CanvasRenderingContext2D::setStrokeStyle):
1736         (WebCore::CanvasRenderingContext2D::setFillStyle):
1737         (WebCore::CanvasRenderingContext2D::checkOrigin):
1738         (WebCore::CanvasRenderingContext2D::drawImage):
1739         (WebCore::CanvasRenderingContext2D::drawImageFromRect):
1740         (WebCore::CanvasRenderingContext2D::createPattern):
1741         (WebCore::CanvasRenderingContext2D::printSecurityExceptionMessage):
1742         (WebCore::CanvasRenderingContext2D::getImageData):
1743         * html/CanvasRenderingContext2D.h:
1744         * html/HTMLCanvasElement.cpp:
1745         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
1746         * html/HTMLCanvasElement.h:
1747         (WebCore::HTMLCanvasElement::setOriginTainted):
1748         (WebCore::HTMLCanvasElement::originClean):
1749
1750 2008-03-06  Anders Carlsson  <andersca@apple.com>
1751
1752         Reviewed by Jon.
1753
1754         Templatize the JNI call code to reduce the amount of code that has
1755         to be duplicated.
1756
1757         * bridge/jni/jni_class.cpp:
1758         (JavaClass::JavaClass):
1759         * bridge/jni/jni_instance.cpp:
1760         (JavaInstance::stringValue):
1761         (JavaInstance::numberValue):
1762         (JavaInstance::booleanValue):
1763         (JavaInstance::invokeMethod):
1764         * bridge/jni/jni_jsobject.cpp:
1765         (JavaJSObject::convertJObjectToValue):
1766         * bridge/jni/jni_runtime.cpp:
1767         (JavaField::JavaField):
1768         (JavaMethod::JavaMethod):
1769         * bridge/jni/jni_utility.cpp:
1770         * bridge/jni/jni_utility.h:
1771         (KJS::Bindings::):
1772         (KJS::Bindings::callJNIMethodIDA):
1773         (KJS::Bindings::callJNIMethodV):
1774         (KJS::Bindings::callJNIMethod):
1775         (KJS::Bindings::callJNIStaticMethod):
1776
1777 2008-03-06  Darin Adler  <darin@apple.com>
1778
1779         Reviewed by Mitz.
1780
1781         - fix regression test failures from the visited-link change
1782
1783         * WebCore.base.exp: Export PageGroup::setShouldTrackVisitedLinks.
1784         * page/PageGroup.cpp:
1785         (WebCore::PageGroup::addVisitedLink): Do nothing and return early
1786         if shouldTrackVisitedLinks is false.
1787         (WebCore::PageGroup::removeVisitedLinks): Reset m_visitedLinksPopulated
1788         so the next time a link is queried this will be populated from history.
1789         (WebCore::PageGroup::setShouldTrackVisitedLinks): Added.
1790         * page/PageGroup.h: Added setShouldTrackVisitedLinks. This is global
1791         for now, but it would be better if it was per-page-group instead.
1792
1793 2008-03-06  Adele Peterson  <adele@apple.com>
1794
1795         Reviewed by Darin.
1796
1797         Fixes for for <rdar://problem/5785892> Implement activeElement attribute for HTMLDocument (HTML5)
1798         and <rdar://problem/5785895> Implement hasFocus() for HTMLDocument (HTML5)
1799
1800         Tests: fast/dom/HTMLDocument/activeElement.html
1801                fast/dom/HTMLDocument/hasFocus.html
1802
1803         * html/HTMLDocument.cpp:
1804         (WebCore::HTMLDocument::activeElement): Added. Returns the focused element, or the body element if nothing's focused.
1805         (WebCore::HTMLDocument::hasFocus): Added. Returns whether or not the document has focus (inclusive of sub-frames).
1806         * html/HTMLDocument.h: Added methods for activeElement and hasFocus.
1807         * html/HTMLDocument.idl: Added definitions for activeElement and hasFocus.
1808
1809 2008-03-06  Dan Bernstein  <mitz@apple.com>
1810
1811         Reviewed by Darin Adler.
1812
1813         - fix <rdar://problem/5741981> 154008 WebKit: Some asian language font glyphs are not shown (in Mail and Entourage)
1814
1815         Test: fast/text/soft-hyphen-3.html
1816
1817         * rendering/bidi.cpp:
1818         (WebCore::checkMidpoints):
1819         (WebCore::RenderBlock::findNextLineBreak): Made 'pos' unsigned. Made the
1820         midpoint after a hyphen always be a valid iterator, not allowing an
1821         offset past the end of a text node. Changed the check for consecutive
1822         soft hyphens to account for that.
1823
1824 2008-03-06  Darin Adler  <darin@apple.com>
1825
1826         - try to fix Wx build
1827
1828         * WebCoreSources.bkl: Added PageGroup.cpp.
1829
1830 2008-03-06  Darin Adler  <darin@apple.com>
1831
1832         - fix some builds
1833
1834         * GNUmakefile.am: Added PageGroup.cpp.
1835         * WebCore.base.exp: Removed WebCoreHistory.
1836         * WebCore.pro: Added PageGroup.cpp.
1837
1838 2008-03-06  Alexey Proskuryakov  <ap@webkit.org>
1839
1840         Reviewed by Darin.
1841
1842         <rdar://problem/5687269> Need to create a Collator abstraction for WebCore and JavaScriptCore
1843         
1844         * ForwardingHeaders/wtf/unicode/Collator.h: Added.
1845         * xml/XSLTUnicodeSort.cpp:
1846         (WebCore::xsltUnicodeSortFunction):
1847         * xml/XSLTUnicodeSort.h:
1848
1849 2008-03-06  Darin Adler  <darin@apple.com>
1850
1851         Reviewed by Mitz.
1852
1853         - fix http://bugs.webkit.org/show_bug.cgi?id=17526
1854           REGRESSION: iframes are added to Safari's History menu
1855           by separating the visited link machinery from global history
1856
1857         This should also make page loading faster due to more efficient visited link coloring.
1858
1859         * WebCore.base.exp: Updated.
1860         * WebCore.vcproj/WebCore.vcproj: Added PageGroup.h/cpp, removed GlobalHistory.h/cpp.
1861         * WebCore.xcodeproj/project.pbxproj: Ditto. Also removed WebCoreHistory.h/m.
1862
1863         * css/CSSStyleSelector.cpp: Updated includes.
1864         (WebCore::CSSStyleSelector::initElementAndPseudoState): Eliminated code to set
1865         currentEncodedURL.
1866         (WebCore::checkPseudoState): Moved most of the code inside a new
1867         PageGroup::isLinkVisited function.
1868         (WebCore::CSSStyleSelector::canShareStyleWithElement): Tightened code a bit by using
1869         references and only getting colors when needed.
1870         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Ditto.
1871         * css/CSSStyleSelector.h: Removed EncodedURL, m_encodedURL, and setEncodedURL.
1872
1873         * dom/Document.cpp:
1874         (WebCore::Document::attach): Removed call to setEncodedURL.
1875         (WebCore::Document::setURL): Ditto.
1876         (WebCore::Document::recalcStyleSelector): Ditto.
1877
1878         * loader/FrameLoader.cpp:
1879         (WebCore::FrameLoader::addBackForwardItemClippedAtTarget): Changed code to use
1880         early exit idiom to be a little more readable.
1881         (WebCore::FrameLoader::urlsMatchItem): Change to use a reference for slightly
1882         better efficiency.
1883         (WebCore::FrameLoader::goToItem): Use early exit idiom to be a little more
1884         readable.
1885         (WebCore::FrameLoader::updateHistoryForStandardLoad): Moved history code back
1886         in here and got rid of the helper function updateGlobalHistory, restoring the
1887         logic before r30549. Also added a call to the new addVisitedLink function.
1888         (WebCore::FrameLoader::updateHistoryForClientRedirect): Added code to call
1889         addVisitedLink here.
1890         (WebCore::FrameLoader::updateHistoryForBackForwardNavigation): Removed comment.
1891         (WebCore::FrameLoader::updateHistoryForReload): Removed call to
1892         updateGlobalHistory; we can just go without updating global history or
1893         visited links here, at least for now, since it's not clear that a reload
1894         is a "history event".
1895         (WebCore::FrameLoader::updateHistoryForRedirectWithLockedHistory): Moved
1896         history code back where it was, and added the call to addVisitedLink, just
1897         as in updateHistoryForStandardLoad above.
1898         * loader/FrameLoader.h: Removed updateGlobalHistory function.
1899
1900         * page/Chrome.cpp:
1901         (WebCore::ChromeClient::populateVisitedLinks): Added. Empty placeholder so we
1902         don't have to implement this for every port all at once.
1903         (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer): Changed to use the
1904         new PageGroup class.
1905         * page/ChromeClient.h: Added populateVisitedLinks function, used to fill the
1906         visited links set from the global history at application startup time.
1907
1908         * page/FrameTree.cpp:
1909         (WebCore::FrameTree::find): Updated to use the new PageGroup class.
1910
1911         * page/GlobalHistory.h: Removed.
1912         * page/win/GlobalHistoryWin.cpp: Removed.
1913         * page/mac/GlobalHistoryMac.mm: Removed.
1914         * platform/mac/WebCoreHistory.h: Removed.
1915         * platform/mac/WebCoreHistory.m: Removed.
1916         * platform/win/WebCoreHistory.cpp: Removed.
1917         * platform/win/WebCoreHistory.h: Removed.
1918
1919         * page/Page.cpp:
1920         (WebCore::Page::Page): Set m_group to 0.
1921         (WebCore::Page::setGroupName): Set up m_group. If the page is not in any
1922         group, set it to 0 for now to postpone the cost of creating a group.
1923         (WebCore::Page::initGroup): Added. Sets m_group to point to a single-page
1924         group; used when getting a group.
1925         (WebCore::Page::removeAllVisitedLinks): Added. Calls removeVisitedLinks
1926         on all page groups.
1927         * page/Page.h: Moved enums inside the WebCore namespace. Removed the
1928         frameNamespace function and instead added the group and groupPtr functions.
1929
1930         * page/PageGroup.cpp: Added. Contains all the visited code from the
1931         CSSStyleSelector in the isVisitedLink function, but more efficient because
1932         we don't allocate memory for the buffer.
1933         * page/PageGroup.h: Added.
1934
1935         * platform/gtk/TemporaryLinkStubs.cpp: Removed historyContains.
1936         * platform/qt/TemporaryLinkStubs.cpp: Removed unneeded include.
1937         * platform/wx/TemporaryLinkStubs.cpp: Removed historyContains.
1938
1939 2008-03-06  Mark Rowe  <mrowe@apple.com>
1940
1941         Fix 64-bit Mac build.
1942
1943         * WebCore.xcodeproj/project.pbxproj:  Exclude _NPN symbols from the exports list as they
1944         are compiled out of 64-bit builds.
1945
1946 2008-03-06  Mark Rowe  <mrowe@apple.com>
1947
1948         Leopard build fix.
1949
1950         * WebCore.base.exp:
1951
1952 2008-03-05  Kevin Ollivier  <kevino@theolliviers.com>
1953
1954         Fix the wx build after the bindings move.
1955
1956         * WebCoreSources.bkl:
1957         * webcore-base.bkl:
1958         * webcore-wx.bkl:
1959
1960 2008-03-05  Dan Bernstein  <mitz@apple.com>
1961
1962         Reviewed by Adele Peterson.
1963
1964         - fix "background-position: inherit"
1965
1966         * css/CSSStyleSelector.cpp:
1967         Made HANDLE_MULTILAYER_INHERIT_AND_INITIAL fall through and added
1968         a return statement in HANDLE_MULTILAYER_VALUE. Also removed an unused
1969         macro.
1970
1971 2008-03-05  Alp Toker  <alp@atoker.com>
1972
1973         Add a missing make dependency for derived sources to improve
1974         autotools build dependency tracking.
1975
1976         Issue spotted by Ori Bernstein.
1977
1978         * GNUmakefile.am:
1979
1980 2008-03-05  Alp Toker  <alp@atoker.com>
1981
1982         GTK+ build fix for breakage introduced in r30800.
1983
1984         Track moved bridge sources from JavaScriptCore to WebCore.
1985
1986         * GNUmakefile.am:
1987
1988 2008-03-05  Justin Garcia  <justin.garcia@apple.com>
1989
1990         Reviewed by Darin.
1991
1992         One part of fix for:
1993         <rdar://problem/5780697> Copying content with percentage based rules in a style sheet will cause fidelity issues
1994
1995         * editing/markup.cpp:
1996         (WebCore::appendStartMarkup): Styles from matched rules should take precedence over those in
1997         inline style declarations, not the other way around. 
1998
1999 2008-03-05  Anders Carlsson  <andersca@apple.com>
2000
2001         Reviewed by Darin.
2002
2003         Move JNI specific code from runtime_root over to jni_jsobject, where it is used.
2004
2005         * bridge/jni/jni_jsobject.cpp:
2006         (completedJavaScriptAccess):
2007         (initializeJavaScriptAccessLock):
2008         (lockJavaScriptAccess):
2009         (unlockJavaScriptAccess):
2010         (dispatchToJavaScriptThread):
2011         (performJavaScriptAccess):
2012         (JavaJSObject::initializeJNIThreading):
2013         (isJavaScriptThread):
2014         (JavaJSObject::invoke):
2015         * bridge/jni/jni_jsobject.h:
2016         * bridge/runtime_root.cpp:
2017         * bridge/runtime_root.h:
2018         * page/mac/WebCoreFrameBridge.mm:
2019         (-[WebCoreFrameBridge init]):
2020
2021 2008-03-05  Darin Adler  <darin@apple.com>
2022
2023         Reviewed by Sam.
2024
2025         - add functions giving offsets within a KURL, slated to replace the
2026           EncodedURL object in CSSStyleSelector (in a future "visited link" change)
2027         - changed all KURL data members names to use the traditional m_ prefix
2028         - initialize all members to 0 in invalid KURLs rather than having all
2029           functions check m_isValid
2030
2031         * platform/KURL.cpp:
2032         (WebCore::KURL::invalidate): Added. Initializes all the fields except for
2033         m_string to the "invalid" values. For use in the empty constructor and
2034         in the init and parse functions.
2035         (WebCore::KURL::init): Tweaked comments. Changed all code paths that return
2036         early to use the invalidate() function. Updated for member variable name
2037         changes.
2038         (WebCore::KURL::hasPath): Updated for member variable name changes.
2039         Remove now-unneeded check of m_isValid.
2040         (WebCore::KURL::lastPathComponent): Ditto.
2041         (WebCore::KURL::protocol): Ditto.
2042         (WebCore::KURL::host): Ditto.
2043         (WebCore::KURL::port): Ditto.
2044         (WebCore::KURL::pass): Ditto.
2045         (WebCore::KURL::user): Ditto.
2046         (WebCore::KURL::ref): Ditto.
2047         (WebCore::KURL::hasRef): Ditto.
2048         (WebCore::KURL::protocolIs): Ditto.
2049         (WebCore::KURL::query): Ditto.
2050         (WebCore::KURL::path): Ditto.
2051         (WebCore::KURL::setProtocol): Ditto.
2052         (WebCore::KURL::setHost): Ditto.
2053         (WebCore::KURL::setPort): Ditto.
2054         (WebCore::KURL::setHostAndPort): Ditto.
2055         (WebCore::KURL::setUser): Ditto.
2056         (WebCore::KURL::setPass): Ditto.
2057         (WebCore::KURL::setRef): Ditto.
2058         (WebCore::KURL::setQuery): Ditto.
2059         (WebCore::KURL::setPath): Ditto.
2060         (WebCore::KURL::prettyURL): Ditto.
2061         (WebCore::copyPathRemovingDots): Removed braces to match our code style.
2062         (WebCore::KURL::parse): Changed all code paths that return early to use
2063         the invalidate function. Moved code to set m_isValid to true to the very
2064         end of the function. Removed braces to match our code style. Removed an
2065         extra copy of the path/query/fragment code (there were two identical copies
2066         in the two sides of an if statement). Removed some commented-out code.
2067         Reversed an if statment. Added code to set the new m_pathAfterLastSlash
2068         field. Updated for member variable name changes.
2069         (WebCore::equalIgnoringRef): Updated for member variable name changes.
2070         (WebCore::KURL::isHierarchical): Ditto.
2071
2072         * platform/KURL.h: Added a FIXME about ref vs. fragment. Made the empty
2073         constructor inline and called the new invalidate function. Added new
2074         pathStart, pathEnd, and pathAfterLastSlash functions, for use in the
2075         new visited link code. Added an invalidate function. Renamed all the
2076         data members to use the m_ prefix.
2077
2078         * WebCore.base.exp: Updated.
2079
2080 2008-03-05  Anders Carlsson  <andersca@apple.com>
2081
2082         Reviewed by Sam.
2083
2084         * WebCore.xcodeproj/project.pbxproj:
2085         Change jni_jsobject.cpp to be Obj-C++ for now. The plan is to merge 
2086         this with jni_objc.mm and create jni_jsobject.mm.
2087         
2088         * bridge/jni/jni_jsobject.cpp:
2089         (createRootObject):
2090         Move createRootObject here from WebCoreFrameBridge.
2091         
2092         (JavaJSObject::createNative):
2093         Call the newly added createRootObject function.
2094         
2095         * bridge/runtime_root.cpp:
2096         (KJS::Bindings::RootObject::initializeJNIThreading):
2097         * bridge/runtime_root.h:
2098         setCreateRootObject no longer takes a root object, rename it to initializeJNIThreading.
2099
2100         * page/mac/FrameMac.mm:
2101         (WebCore::Frame::createScriptInstanceForWidget):
2102         Just call Frame::createRootObject here.
2103         
2104         * page/mac/WebCoreFrameBridge.mm:
2105         (-[WebCoreFrameBridge init]):
2106         Call initializeJNIThreading.
2107
2108 2008-03-05  Anders Carlsson  <andersca@apple.com>
2109
2110         Reviewed by Sam.
2111
2112         Change some static class variables to be regular static variables,
2113         making it easier to move the chunk of mac-specific code out of runtime_root.[cpp|h]
2114
2115         * bridge/runtime_root.cpp:
2116         (KJS::Bindings::completedJavaScriptAccess):
2117         (KJS::Bindings::RootObject::dispatchToJavaScriptThread):
2118         (KJS::Bindings::performJavaScriptAccess):
2119         (KJS::Bindings::RootObject::createRootObject):
2120         (KJS::Bindings::RootObject::runLoop):
2121         (KJS::Bindings::RootObject::setCreateRootObject):
2122         * bridge/runtime_root.h:
2123
2124 2008-03-05  Brent Fulgham <bfulgham@gmail.com>
2125
2126         Reviewed by Adam Roben.
2127
2128         Modify source files to use the USE(SAFARI_THEME) macro, rather than
2129         USE_SAFARI_THEME.  (http://bugs.webkit.org/show_bug.cgi?id=17683)
2130
2131         * WebCore/platform/win/PlatformScrollBarSafari.cpp
2132         * WebCore/rendering/RenderThemeSafari.cpp
2133         * WebCore/rendering/RenderThemeSafari.h
2134         * config.h: Move definition of WTF_USE_SAFARI_THEME here 
2135
2136 2008-03-05  Brady Eidson  <beidson@apple.com>
2137
2138         Reviewed by Alexey and Mark Rowe
2139
2140         Fix for <rdar://problem/5778247> - Reproducible crash on storage/execute-sql-args.html
2141
2142         DatabaseThread::unscheduleDatabaseTasks() manually filters through a MessageQueue,
2143         removing particular items for Databases that were shutting down.
2144
2145         This filtering operation is not atomic, and therefore causes a race condition with the
2146         database thread waking up and reading from the message queue.  
2147
2148         The end result was an attempt to dereference a null DatabaseTask.  Timing-wise, this never
2149         seemed to happen in a debug build, otherwise an assertion would've caught it.  Replacing that
2150         assertion with a crash in a release build is what revealed this bug.
2151
2152         The fix for the above symptom was entirely in WTF::MessageQueue in JSCore.  With this fix in 
2153         place, another crash popped up in the layout tests that was related to dereferencing a 
2154         deallocated object - simply because SQLTransaction had a raw pointer to it's Database object 
2155         when it needed to be a ref pointer.
2156
2157         * storage/SQLTransaction.cpp:
2158         (WebCore::SQLTransaction::runCurrentStatement):
2159         * storage/SQLTransaction.h: Change m_database to be a RefPtr
2160         (WebCore::SQLTransaction::database):
2161
2162 2008-03-05  Mark Rowe  <mrowe@apple.com>
2163
2164         Build fix.
2165
2166         * WebCore.base.exp:  Remove symbol that no longer exists from the exports file.
2167
2168 2008-03-05  Adam Roben  <aroben@apple.com>
2169
2170         Export a header/symbol for WebKit
2171
2172         Reviewed by Kevin M.
2173
2174         * WebCore.base.exp:
2175         * WebCore.xcodeproj/project.pbxproj:
2176
2177 2008-03-05  Adam Roben  <aroben@apple.com>
2178
2179         Move WebCoreScriptDebugger up to WebKit
2180
2181         Reviewed by Darin.
2182
2183         * WebCore.base.exp: Exported some functions used by
2184         WebCoreScriptDebugger, and sorted the list.
2185         * WebCore.xcodeproj/project.pbxproj: Removed
2186         WebCoreScriptDebugger.{h,mm} from the project and marked
2187         a few headers private so that WebKit can use them.
2188         * page/mac/WebCoreScriptDebugger.h: Removed.
2189         * page/mac/WebCoreScriptDebugger.mm: Removed.
2190
2191 2008-03-05  Anders Carlsson  <andersca@apple.com>
2192
2193         Build bridge/. Copy some headers over to WebKit as part of the post-build step.
2194         
2195         * WebCore.vcproj/WebCore.vcproj:
2196
2197 2008-03-05  Anders Carlsson  <andersca@apple.com>
2198
2199         Reviewed by Geoff.
2200
2201         * WebCore.base.exp:
2202         Add the NPN and KJS methods.
2203         
2204         * WebCore.xcodeproj/project.pbxproj:
2205         Bring in bridge/
2206
2207         * config.h:
2208         Add HAVE_JNI define.
2209         
2210         * bindings/js/kjs_html.cpp:
2211         * bindings/objc/DOMInternal.mm:
2212         * bindings/objc/DOMUtility.mm:
2213         * bindings/objc/WebScriptObject.mm:
2214         * html/HTMLAppletElement.cpp:
2215         * html/HTMLEmbedElement.cpp:
2216         * html/HTMLObjectElement.cpp:
2217         * html/HTMLPlugInElement.cpp:
2218         * page/Frame.cpp:
2219         * page/mac/FrameMac.mm:
2220         * page/mac/WebCoreFrameBridge.mm:
2221         * page/mac/WebCoreScriptDebugger.mm:
2222         * plugins/win/PluginViewWin.cpp:
2223         Include file changes.
2224
2225 2008-03-04  Anders Carlsson  <andersca@apple.com>
2226
2227         Reviewed by Sam.
2228
2229         Rewrite NPRuntime string conversion routines to use WebCore::String
2230         
2231         * bridge/NP_jsobject.cpp:
2232         (_NPN_Evaluate):
2233         * bridge/c/c_utility.cpp:
2234         (KJS::Bindings::convertUTF8ToUTF16WithLatin1Fallback):
2235         (KJS::Bindings::convertNPVariantToValue):
2236         (KJS::Bindings::convertNPStringToUTF16):
2237         (KJS::Bindings::identifierFromNPIdentifier):
2238         * bridge/c/c_utility.h:
2239
2240 2008-03-05  Oliver Hunt  <oliver@apple.com>
2241
2242         Reviewed by Alexey P.
2243
2244         Small performance improvement to putImageData (3-5% on assignment in my tests)
2245
2246         * html/CanvasPixelArray.h:
2247         (WebCore::CanvasPixelArray::set):
2248
2249 2008-03-04  Sam Weinig  <sam@webkit.org>
2250
2251         Reviewed by Adele.
2252
2253         * bindings/js/JSXMLHttpRequest.h: Remove unnecessary override of toBoolean.
2254
2255 2008-03-04  Maciej Stachowiak  <mjs@apple.com>
2256
2257         Reviewed by Sam and Oliver.
2258
2259         - fixed http://bugs.webkit.org/show_bug.cgi?id=16289
2260         - fixed Acid3 tests 26 and 27 (not exactly the same issue but related)
2261
2262         * bindings/js/JSNodeCustom.cpp:
2263         (WebCore::JSNode::mark): When marking a node that's in-document,
2264         mark the owner document if it hasn't been already. This means holding on
2265         to a single node from an unreferenced document now keeps the whole document alive.
2266         
2267         We are now at 90/100 on Acid3.
2268
2269 2008-03-04  Sam Weinig  <sam@webkit.org>
2270
2271         Qt build fix.
2272
2273         * page/qt/FrameQt.cpp:
2274
2275 2008-03-04  Sam Weinig  <sam@webkit.org>
2276
2277         Reviewed by Mark Rowe.
2278
2279         Rename kjs_window to JSDOMWindowBase.
2280
2281         - Remove all unnecessary includes of JSDOMWindowBase.h, we prefer including
2282           JSDOMWindow.h
2283
2284         * ChangeLog:
2285         * DerivedSources.make:
2286         * GNUmakefile.am:
2287         * WebCore.pro:
2288         * WebCore.vcproj/WebCore.vcproj:
2289         * WebCore.xcodeproj/project.pbxproj:
2290         * WebCoreSources.bkl:
2291         * bindings/js/JSCustomVoidCallback.cpp:
2292         * bindings/js/JSCustomXPathNSResolver.cpp:
2293         * bindings/js/JSDOMWindowBase.cpp: Copied from bindings/js/kjs_window.cpp.
2294         * bindings/js/JSDOMWindowBase.h: Copied from bindings/js/kjs_window.h.
2295         * bindings/js/JSDOMWindowCustom.cpp:
2296         * bindings/js/JSDatabaseCustom.cpp:
2297         * bindings/js/JSEventTargetBase.cpp:
2298         * bindings/js/JSEventTargetBase.h:
2299         * bindings/js/JSEventTargetNode.cpp:
2300         * bindings/js/JSHTMLDocumentCustom.cpp:
2301         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
2302         * bindings/js/JSHistoryCustom.cpp:
2303         * bindings/js/JSLocation.cpp:
2304         * bindings/js/JSSQLTransactionCustom.cpp:
2305         * bindings/js/JSXMLHttpRequest.cpp:
2306         * bindings/js/ScheduledAction.cpp:
2307         * bindings/js/kjs_binding.cpp:
2308         * bindings/js/kjs_events.cpp:
2309         * bindings/js/kjs_navigator.cpp:
2310         * bindings/js/kjs_proxy.cpp:
2311         * bindings/js/kjs_window.cpp: Removed.
2312         * bindings/js/kjs_window.h: Removed.
2313         * bindings/scripts/CodeGeneratorJS.pm:
2314         * history/CachedPage.cpp:
2315         * loader/FrameLoader.cpp:
2316         * page/Chrome.cpp:
2317         * page/InspectorController.cpp:
2318         * page/mac/FrameMac.mm:
2319         * page/mac/WebCoreFrameBridge.mm:
2320         * page/qt/FrameQt.cpp:
2321         * page/win/FrameWin.cpp:
2322         * plugins/win/PluginViewWin.cpp:
2323
2324 2008-03-04  Mark Rowe  <mrowe@apple.com>
2325
2326         Speculative Qt build fix.
2327
2328         * platform/qt/PasteboardQt.cpp:
2329
2330 2008-03-04  Anders Carlsson  <andersca@apple.com>
2331
2332         Reviewed by Sam.
2333
2334         Update include paths. This code is not used yet.
2335
2336         * bridge/NP_jsobject.cpp:
2337         * bridge/c/c_class.cpp:
2338         * bridge/c/c_instance.cpp:
2339         * bridge/c/c_utility.cpp:
2340         (KJS::Bindings::convertUTF8ToUTF16WithLatin1Fallback):
2341         #if 0 this out for now. 
2342         
2343         * bridge/jni/jni_class.cpp:
2344         * bridge/jni/jni_jsobject.cpp:
2345         * bridge/jni/jni_objc.mm:
2346         * bridge/jni/jni_runtime.cpp:
2347         * bridge/jni/jni_utility.cpp:
2348         * bridge/jni/jni_utility.h:
2349         * bridge/npruntime.cpp:
2350         * bridge/objc/WebScriptObject.h:
2351         * bridge/objc/objc_class.h:
2352         * bridge/objc/objc_instance.h:
2353         * bridge/objc/objc_runtime.h:
2354         * bridge/objc/objc_utility.h:
2355         * bridge/objc/objc_utility.mm:
2356         * bridge/runtime.cpp:
2357         * bridge/runtime.h:
2358         * bridge/runtime_array.cpp:
2359         * bridge/runtime_array.h:
2360         * bridge/runtime_method.cpp:
2361         * bridge/runtime_method.h:
2362         * bridge/runtime_object.cpp:
2363         * bridge/runtime_object.h:
2364         * bridge/runtime_root.cpp:
2365         * bridge/runtime_root.h:
2366
2367 2008-03-04  Dan Bernstein  <mitz@apple.com>
2368
2369         Reviewed by Darin Adler.
2370
2371         - fix http://bugs.webkit.org/show_bug.cgi?id=17676
2372           <rdar://problem/5781091> REGRESSION (r30240-r30267): href attribute values with non-ASCII characters in the host part do not work
2373
2374         Test: fast/encoding/url-host-name-non-ascii.html
2375
2376         * platform/KURL.cpp:
2377         (WebCore::appendEncodedHostname): Added an early return in the all-ASCII
2378         case to avoid copying the host name twice and corrected the error
2379         checking after calling uidna_IDNToASCII().
2380
2381 2008-03-04  Sam Weinig  <sam@webkit.org>
2382
2383         Reviewed by Dan Bernstein.
2384
2385         Use JSDOMWindow exclusively instead of JSDOMWindowBase.
2386
2387         * bindings/js/ScheduledAction.cpp:
2388         (WebCore::ScheduledAction::execute):
2389         * bindings/js/ScheduledAction.h:
2390         * bindings/js/kjs_window.cpp:
2391         (WebCore::JSDOMWindowBase::timerFired):
2392
2393 2008-03-04  Timothy Hatcher  <timothy@apple.com>
2394
2395         Reviewed by Darin Adler.
2396
2397         <rdar://problem/5720160> Browser windows "do nothing" while modal
2398         dialog or menu is up due to run loop modes (or while scrolling)
2399
2400         Adds a new SchedulePair object that holds a runloop and the mode to use.
2401         A HashSet of SchedulePairs is tracked by Page so it can be used for resource
2402         loading and, in the future, maybe SharedTimerMac.
2403
2404         * WebCore.base.exp: Add new exports for WebKit.
2405         * WebCore.xcodeproj/project.pbxproj: Add new files.
2406         * loader/mac/DocumentLoaderMac.cpp: Added.
2407         (WebCore::scheduleAll): Call schedule all the ResourceLoader handles.
2408         (WebCore::unscheduleAll): Call unschedule all the ResourceLoader handles.
2409         (WebCore::DocumentLoader::schedule): Schedule all the ResourceLoaders owned by the DocumentLoader.
2410         (WebCore::DocumentLoader::unschedule): Unschedule all the ResourceLoaders owned by the DocumentLoader.
2411         * loader/DocumentLoader.h:
2412         * page/Page.h:
2413         (WebCore::Page::scheduledRunLoopPairs): Return m_scheduledRunLoopPairs.
2414         * page/mac/PageMac.cpp:
2415         (WebCore::Page::addSchedulePair): Add a SchedulePair to m_scheduledRunLoopPairs.
2416         (WebCore::Page::removeSchedulePair): Removes a SchedulePair from m_scheduledRunLoopPairs.
2417         * platform/cf/SchedulePair.cpp: Added.
2418         * platform/cf/SchedulePair.h: Added.
2419         * platform/mac/SchedulePairMac.mm: Added.
2420         * platform/network/ResourceHandle.h:
2421         * platform/network/mac/FormDataStreamMac.mm:
2422         (WebCore::advanceCurrentStream): Use the new SchedulePair.
2423         (WebCore::formCreate): Ditto.
2424         (WebCore::formFinalize): Ditto.
2425         (WebCore::formSchedule): Ditto.
2426         (WebCore::formUnschedule): Ditto.
2427         * platform/network/mac/ResourceHandleMac.mm:
2428         (WebCore::ResourceHandle::start): Schedule the connection with all the SchedulePairs
2429         that Page holds. If Page has no SchedulePairs, schedule with the current runloop, and
2430         pick the mode based on ResourceHandle::loadsDuringCommonRunLoopModes.
2431         (WebCore::ResourceHandle::schedule):
2432         (WebCore::ResourceHandle::unschedule):
2433
2434 2008-03-04  Sam Weinig  <sam@webkit.org>
2435
2436         Reviewed by Darin Adler.
2437
2438         Rename kjs_css to JSRGBColor.
2439
2440         * DerivedSources.make:
2441         * GNUmakefile.am:
2442         * WebCore.pro:
2443         * WebCore.vcproj/WebCore.vcproj:
2444         * WebCore.xcodeproj/project.pbxproj:
2445         * WebCoreSources.bkl:
2446         * bindings/js/JSRGBColor.cpp: Copied from bindings/js/kjs_css.cpp.
2447         * bindings/js/JSRGBColor.h: Copied from bindings/js/kjs_css.h.
2448         * bindings/js/kjs_css.cpp: Removed.
2449         * bindings/js/kjs_css.h: Removed.
2450         * bindings/js/kjs_window.cpp:
2451         * bindings/objc/DOMUtility.mm:
2452         * bindings/scripts/CodeGeneratorJS.pm:
2453
2454 2008-03-04  Anders Carlsson  <andersca@apple.com>
2455
2456         Fix 64-bit build.
2457         
2458         * html/HTMLPlugInElement.cpp:
2459
2460 2008-03-04  Nikolas Zimmermann  <zimmermann@kde.org>
2461
2462         Reviewed by Eric & David.
2463
2464         Fixes: http://bugs.webkit.org/show_bug.cgi?id=17078
2465
2466         Fix getSubStringLength() handling, verified by Acid3 test 77.
2467         Brings up Acid3 score to 88/100.
2468
2469         Added test: svg/custom/acid3-test-77.html
2470                     svg/custom/getSubStringLength.html
2471
2472         * svg/SVGTextContentElement.cpp:
2473         (WebCore::cummulatedCharacterRangeLength): Simplify some code.
2474         (WebCore::SVGTextContentElement::getSubStringLength):
2475
2476 2008-03-04  Anders Carlsson  <andersca@apple.com>
2477
2478         Mac build fix. Neither me, Sam nor Adam know why we need to do this though :(
2479
2480         * bindings/js/kjs_proxy.cpp:
2481         (WebCore::KJSProxy::attachDebugger):
2482         * page/Page.cpp:
2483         (WebCore::Page::setDebuggerForAllPages):
2484         (WebCore::Page::setDebugger):
2485
2486 2008-03-04  Adam Roben  <aroben@apple.com>
2487
2488         Add ExecState.h to ForwardingHeaders
2489
2490         Reviewed by Anders.
2491
2492         * ForwardingHeaders/kjs/ExecState.h: Added.
2493         * page/Page.cpp: Touch this to force WebCore to build and the headers
2494         to be copied.
2495
2496 2008-03-04  Adam Roben  <aroben@apple.com>
2497
2498         Make it possible to set a KJS::Debugger on all Frames in a Page and
2499         all Pages in the process
2500
2501         Reviewed by Kevin M.
2502
2503         * ForwardingHeaders/kjs/debugger.h: Added.
2504         * bindings/js/kjs_proxy.cpp:
2505         (WebCore::KJSProxy::initScript): Attach the Page's debugger if there
2506         is one.
2507         (WebCore::KJSProxy::attachDebugger): Attach the passed-in debugger, or
2508         detach any existing debugger if none was passed in.
2509         * bindings/js/kjs_proxy.h:
2510         * page/Page.cpp:
2511         (WebCore::Page::Page): Initialize new member.
2512         (WebCore::Page::setDebuggerForAllPages): Call setDebugger on each Page
2513         in the process.
2514         (WebCore::Page::setDebugger): Store the debugger and pass it off to
2515         all our Frames.
2516         * page/Page.h:
2517
2518 2008-03-04  Sam Weinig  <sam@webkit.org>
2519
2520         Reviewed by Darin Adler.
2521
2522         Add ClassInfo to custom constructors so that they toString properly
2523
2524         - Take this chance to remove the "Imp" from the end of JSXMLHttpRequestConstructorImp,
2525           and XSLTProcessorConstructorImp and prefix all the classes with JS. 
2526
2527         * bindings/js/JSAudioConstructor.cpp:
2528         (WebCore::): Added ClassInfo definition.
2529         (WebCore::JSAudioConstructor::JSAudioConstructor):
2530         (WebCore::JSAudioConstructor::construct): Cleanup.
2531         * bindings/js/JSAudioConstructor.h: Rename m_doc to m_document.
2532         (WebCore::JSAudioConstructor::classInfo): Added.
2533
2534         * bindings/js/JSHTMLInputElementBase.cpp: Rename HTMLInputElementBasePrototype 
2535         to JSHTMLInputElementBasePrototype as seen if toString'ed.
2536         (WebCore::):
2537
2538         * bindings/js/JSHTMLOptionElementConstructor.cpp:
2539         (WebCore::): Added ClassInfo definition.
2540         * bindings/js/JSHTMLOptionElementConstructor.h:
2541         (WebCore::JSHTMLOptionElementConstructor::classInfo): Added.
2542
2543         * bindings/js/JSImageConstructor.cpp:
2544         (WebCore::): Added ClassInfo definition.
2545         (WebCore::JSImageConstructor::implementsConstruct): Moved here from header.
2546         * bindings/js/JSImageConstructor.h:
2547         (WebCore::JSImageConstructor::classInfo): Added.
2548
2549         * bindings/js/JSXMLHttpRequest.cpp:
2550         (WebCore::): Rename XMLHttpRequestPrototype  to JSXMLHttpRequestPrototype 
2551         as seen if toString'ed.
2552         (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor):
2553         (WebCore::JSXMLHttpRequestConstructor::implementsConstruct):
2554         (WebCore::JSXMLHttpRequestConstructor::construct):
2555         * bindings/js/JSXMLHttpRequest.h: Renamed JSXMLHttpRequestConstructorImp to
2556         JSXMLHttpRequestConstructor and doc to m_document and 
2557         (WebCore::JSXMLHttpRequestConstructor::classInfo): Added.
2558
2559         * bindings/js/JSXSLTProcessor.cpp:
2560         (WebCore::): Renamed XSLTProcessorPrototype to JSXSLTProcessorPrototype and 
2561         XSLTProcessorConstructorImp to JSXSLTProcessorConstructor.
2562         (WebCore::JSXSLTProcessorConstructor::JSXSLTProcessorConstructor):
2563         (WebCore::JSXSLTProcessorConstructor::implementsConstruct):
2564         (WebCore::JSXSLTProcessorConstructor::construct):
2565         * bindings/js/JSXSLTProcessor.h:
2566         (WebCore::JSXSLTProcessorConstructor::classInfo): Added.
2567
2568         * bindings/js/kjs_window.cpp:
2569         (WebCore::JSDOMWindowBase::getValueProperty): Fixed to work with the new class names.
2570
2571 2008-03-04  Dan Bernstein  <mitz@apple.com>
2572
2573         Reviewed by Oliver Hunt and Geoffrey Garen.
2574
2575         - fix http://bugs.webkit.org/show_bug.cgi?id=17667
2576           <rdar://problem/5779658> REGRESSION (r30587): Document::implicitClose() not called when done loading page (Image does not get scaled to fit)
2577
2578         * loader/loader.cpp:
2579         (WebCore::Loader::didFinishLoading): Changed to call
2580         setLoadInProgress(false) even for 4xx errors, because that triggers
2581         load completion check.
2582
2583 2008-03-04  Adele Peterson  <adele@apple.com>
2584
2585         Reviewed by Beth.
2586
2587         Fix for <rdar://problem/5779718> focus() does not work for anchor elements with no content
2588
2589         If an anchor has zero size, don't exclude it from being focusable from JS, just exclude it
2590         from being keyboard focusable (using the tab key).
2591
2592         * html/HTMLAnchorElement.cpp:
2593         (WebCore::HTMLAnchorElement::isFocusable):
2594         (WebCore::HTMLAnchorElement::isKeyboardFocusable):
2595
2596 2008-03-04  Chris Fleizach  <cfleizach@apple.com>
2597
2598         Reviewed by Darin Adler.
2599
2600         - fix <rdar://problem/5119360> ER - Seed: Google results do not have AXHeading information
2601
2602         * page/mac/WebCoreAXObject.mm:
2603         (headingLevel):
2604         (-[WebCoreAXObject accessibilityIsIgnored]):
2605
2606 2008-03-04  Sam Weinig  <sam@webkit.org>
2607
2608         GTK+ build fix.
2609
2610         * GNUmakefile.am:
2611
2612 2008-03-04  Sam Weinig  <sam@webkit.org>
2613
2614         Reviewed by Darin Adler.
2615
2616         Remame ImageConstructorImp to JSImageConstructor and move it into its
2617         own file.
2618
2619         * GNUmakefile.am:
2620         * WebCore.pro:
2621         * WebCore.vcproj/WebCore.vcproj:
2622         * WebCore.xcodeproj/project.pbxproj:
2623         * WebCoreSources.bkl:
2624         * bindings/js/JSImageConstructor.cpp: Copied from bindings/js/kjs_html.cpp.
2625         (WebCore::JSImageConstructor::JSImageConstructor):
2626         (WebCore::JSImageConstructor::construct):
2627         * bindings/js/JSImageConstructor.h: Copied from bindings/js/kjs_html.h.
2628         * bindings/js/kjs_html.cpp:
2629         (WebCore::getRuntimeObject): Make this function static since it is only used
2630         in this file.
2631         * bindings/js/kjs_html.h:
2632         * bindings/js/kjs_window.cpp:
2633         (WebCore::JSDOMWindowBase::getValueProperty):
2634
2635 2008-03-04  Adam Roben  <aroben@apple.com>
2636
2637         Fix an uninitialized value warning in CodeGeneratorJS.pm
2638
2639         * bindings/scripts/CodeGeneratorJS.pm: Remove reference to
2640         non-existent $maybeOkParam (this was removed in r30753).
2641
2642 2008-03-04  Sam Weinig  <sam@webkit.org>
2643
2644         Reviewed by Darin Adler.
2645
2646         Remove kjs_dom.{h,cpp}.
2647
2648         - Removed custom toAttr, which took a boolean ok, and teach CodeGeneratorJS.pm
2649           to us a null return value as an indication of failure. (This new logic is used
2650           for toVoidCallback as well.)
2651         - Move getRuntimeObject to kjs_html where a bunch of other runtime object related
2652           functions currently live.
2653         - Move checkNodeSecurity to kjs_binding, where other frame security functions 
2654           currently live.
2655         - Remove getNodeConstructor.  It had no implementation.
2656
2657         * GNUmakefile.am:
2658         * WebCore.pro:
2659         * WebCore.vcproj/WebCore.vcproj:
2660         * WebCore.xcodeproj/project.pbxproj:
2661         * WebCoreSources.bkl:
2662         * bindings/js/JSAttrCustom.cpp:
2663         * bindings/js/JSCustomVoidCallback.cpp:
2664         (WebCore::toVoidCallback):
2665         * bindings/js/JSCustomVoidCallback.h:
2666         * bindings/js/JSDatabaseCustom.cpp:
2667         (WebCore::JSDatabase::changeVersion):
2668         (WebCore::JSDatabase::transaction):
2669         * bindings/js/JSElementCustom.cpp:
2670         (WebCore::JSElement::setAttributeNode):
2671         (WebCore::JSElement::setAttributeNodeNS):
2672         * bindings/js/JSEventTargetBase.cpp:
2673         (WebCore::toJS):
2674         * bindings/js/JSEventTargetBase.h:
2675         * bindings/js/JSHTMLAppletElementCustom.cpp:
2676         * bindings/js/JSHTMLElementCustom.cpp:
2677         * bindings/js/JSHTMLEmbedElementCustom.cpp:
2678         * bindings/js/JSHTMLFormElementCustom.cpp:
2679         * bindings/js/JSHTMLFrameElementCustom.cpp:
2680         * bindings/js/JSHTMLIFrameElementCustom.cpp:
2681         * bindings/js/JSHTMLObjectElementCustom.cpp:
2682         * bindings/js/JSNamedNodeMapCustom.cpp:
2683         * bindings/js/JSNamedNodesCollection.cpp:
2684         * bindings/js/JSNodeFilterCustom.cpp:
2685         * bindings/js/JSXSLTProcessor.cpp:
2686         * bindings/js/kjs_binding.cpp:
2687         (WebCore::checkNodeSecurity):
2688         * bindings/js/kjs_binding.h:
2689         * bindings/js/kjs_css.cpp:
2690         * bindings/js/kjs_dom.cpp: Removed.
2691         * bindings/js/kjs_dom.h: Removed.
2692         * bindings/js/kjs_events.cpp:
2693         * bindings/js/kjs_html.cpp:
2694         (WebCore::getRuntimeObject):
2695         * bindings/js/kjs_html.h:
2696         * bindings/js/kjs_window.cpp:
2697         * bindings/scripts/CodeGeneratorJS.pm:
2698         * dom/Attr.idl:
2699         * html/HTMLPlugInElement.cpp:
2700         * page/InspectorController.cpp:
2701
2702 2008-03-04  Adam Roben  <aroben@apple.com>
2703
2704         Win/Qt/GTK+/wx build fix after r30740
2705
2706         * editing/Editor.cpp: Added missing #include.
2707         * page/qt/FrameQt.cpp: Removed Frame::dashboardRegionsChanged.
2708         * page/win/FrameWin.cpp: Ditto.
2709         * platform/wx/TemporaryLinkStubs.cpp: Ditto.
2710
2711 2008-03-04  Alp Toker  <alp@atoker.com>
2712
2713         GTK+ build fix for breakage introduced in r30740.
2714
2715         Remove Frame::dashboardRegionsChanged(). There's now a default
2716         implementation at ChromeClient::dashboardRegionsChanged().
2717
2718         * page/gtk/FrameGtk.cpp:
2719
2720 2008-03-04  Alp Toker  <alp@atoker.com>
2721
2722         GTK+ build fix suggested by aroben. Remove an unused Mac-specific
2723         included introduced in r30740.
2724
2725         * page/ChromeClient.h:
2726
2727 2008-03-04  Dan Bernstein  <mitz@apple.com>
2728
2729         Reviewed by Sam Weinig.
2730
2731         - fix <rdar://problem/5622336> Burmese text does not render on http://www.myanmarbible.com/bible/Judson/html/index.html
2732
2733         Test: platform/win/fast/text/uniscribe-missing-glyph.html
2734
2735         Note that default installations of Windows do not have Myanmar fonts.
2736         What this patch does is ensure that the Myanmar and other complex
2737         scripts are rendered as missing glyphs rather than not rendered at all.
2738         The particular page in the bug measures the relative widths of two
2739         rendered strings and, if they are rendered as missing glyphs, detects
2740         that a Myanmar fonts is not available and substitutes the text with
2741         images. By not rendering (and measuring) missing glyphs, WebKit was
2742         throwing the page's detection code off.
2743
2744         * platform/graphics/win/UniscribeController.cpp:
2745         (WebCore::UniscribeController::shape): Removed an early return in case
2746         shaping resulted in missing glyphs. This is now expected if font
2747         fallback failed to produce a font containing glyphs for the character.
2748         Also changed two resize()s to shrink()s.
2749
2750 2008-03-04  Darin Adler  <darin@apple.com>
2751
2752         Reviewed by Adam.
2753
2754         - remove WebCoreFrameBridge reapplyStyles method
2755
2756         * WebCore.base.exp: Added exports.
2757         * page/mac/WebCoreFrameBridge.h: Removed WebCoreDeviceType and
2758         reapplyStylesForDeviceType: method.
2759         * page/mac/WebCoreFrameBridge.mm: Ditto.
2760
2761 2008-03-04  Darin Adler  <darin@apple.com>
2762
2763         Reviewed by Adam.
2764
2765         - eliminate WebCoreFrameBridge createFrameViewWithNSView
2766
2767         * WebCore.base.exp: Added some more exports.
2768         * page/mac/WebCoreFrameBridge.h: Deleted createFrameViewWithNSView.
2769         * page/mac/WebCoreFrameBridge.mm: Ditto.
2770
2771 2008-03-04  Darin Adler  <darin@apple.com>
2772
2773         Reviewed by Adam.
2774
2775         - removed WebCoreFrameBridge scrollOverflowInDirection
2776
2777         * WebCore.base.exp: Export function needed by WebKit.
2778         * page/mac/WebCoreFrameBridge.h: Removed WebScrollDirection, WebScrollGranularity,
2779         and scrollOverflowInDirection.
2780         * page/mac/WebCoreFrameBridge.mm: Removed method.
2781
2782 2008-03-04  Darin Adler  <darin@apple.com>
2783
2784         Reviewed by Adam.
2785
2786         - remove WebCoreFrameBridge installInFrame: method
2787
2788         * WebCore.base.exp: Export a few symbols.
2789         * WebCore.xcodeproj/project.pbxproj: Export a few files.
2790         * page/mac/WebCoreFrameBridge.h: Remove installInFrame:.
2791         * page/mac/WebCoreFrameBridge.mm: Ditto.
2792
2793 2008-03-04  Darin Adler  <darin@apple.com>
2794
2795         Reviewed by Adam.
2796
2797         - remove WebCoreFrameBridge window method
2798
2799         * page/mac/EventHandlerMac.mm:
2800         (WebCore::EventHandler::sendFakeEventsAfterWidgetTracking): Get the window by calling
2801         window on the NSView instead of using the bridge. The WebKit side wasn't doing anything
2802         special, so a call to -[NSView window] is fine.
2803
2804         * page/mac/WebCoreFrameBridge.h: Removed the window method.
2805
2806 2008-03-04  Darin Adler  <darin@apple.com>
2807
2808         Reviewed by Adam.
2809
2810         - remove -[WebCoreFrameBridge dashboardRegionsChanged:]
2811
2812         * WebCore.base.exp: Updated.
2813         * page/Chrome.cpp:
2814         (WebCore::ChromeClient::dashboardRegionsChanged): Added.
2815         * page/ChromeClient.h: Added virtual function for dashboardRegionsChanged.
2816         * page/Frame.h: Removed dashboardRegionsChanged function.
2817         * page/FrameView.cpp:
2818         (WebCore::FrameView::updateDashboardRegions): Changed to call dashboardRegionsChanged
2819         on ChromeClient and to only call it when the regions actually changed.
2820         * page/mac/FrameMac.mm: Removed dashboardRegionsChanged function.
2821         * page/mac/WebCoreFrameBridge.h: Removed dashboardRegionsChanged: method.
2822
2823 2008-03-04  Darin Adler  <darin@apple.com>
2824
2825         Reviewed by Adam.
2826
2827         - remove WebCoreFrameBridge issuePasteComand method
2828
2829         * editing/Editor.cpp:
2830         (WebCore::Editor::paste): Moved the Mac-specific part of this to EditorMac.
2831         * editing/mac/EditorMac.mm:
2832         (WebCore::Editor::paste): Added. Calls paste: on the document view (normally a
2833         WebHTMLView). We should get rid of this eventually.
2834         * page/Frame.h: Removed issuePasteCommand.
2835         * page/mac/FrameMac.mm: Ditto.
2836         * page/mac/WebCoreFrameBridge.h: Ditto.
2837
2838 2008-03-04  Alexey Proskuryakov  <ap@webkit.org>
2839
2840         Suggested by Darin, rubber-stamped by Mark.
2841
2842         http://bugs.webkit.org/show_bug.cgi?id=17569
2843         REGRESSION (r30571): Buzzword.com doesn't load
2844
2845         Rolling out r30571, as determining what is wrong with it proved tricky.
2846
2847         * loader/FrameLoader.cpp:
2848         (WebCore::FrameLoader::load):
2849         (WebCore::FrameLoader::tokenizerProcessedData):
2850         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
2851
2852 2008-03-04  Sam Weinig  <sam@webkit.org>
2853
2854         Build fix.
2855
2856         * bindings/js/kjs_events.cpp:
2857
2858 2008-03-03  Sam Weinig  <sam@webkit.org>
2859
2860         Reviewed by Mark Rowe.
2861
2862         Move JSClipboard into its own file.
2863
2864         * DerivedSources.make:
2865         * GNUmakefile.am:
2866         * WebCore.pro:
2867         * WebCore.vcproj/WebCore.vcproj:
2868         * WebCore.xcodeproj/project.pbxproj:
2869         * WebCoreSources.bkl:
2870         * bindings/js/JSAttrCustom.cpp:
2871         * bindings/js/JSClipboardCustom.cpp: Added.
2872         (WebCore::JSClipboard::types):
2873         (WebCore::JSClipboard::clearData):
2874         (WebCore::JSClipboard::getData):
2875         (WebCore::JSClipboard::setData):
2876         (WebCore::JSClipboard::setDragImage):
2877         * bindings/js/JSElementCustom.cpp:
2878         * bindings/js/JSEventCustom.cpp:
2879         * bindings/js/JSHTMLFrameElementCustom.cpp:
2880         * bindings/js/JSHTMLIFrameElementCustom.cpp:
2881         * bindings/js/kjs_events.cpp:
2882         * bindings/js/kjs_events.h:
2883         * bindings/js/kjs_window.cpp:
2884         * bindings/scripts/CodeGeneratorJS.pm:
2885         * dom/Clipboard.cpp:
2886         (WebCore::Clipboard::setDropEffect):
2887         (WebCore::Clipboard::setEffectAllowed):
2888         * dom/Clipboard.idl: Added.
2889
2890 2008-03-03  Sam Weinig  <sam@webkit.org>
2891
2892         Windows build-fix.
2893
2894         * page/Chrome.cpp:
2895         * plugins/win/PluginViewWin.cpp:
2896
2897 2008-03-03  Sam Weinig  <sam@webkit.org>
2898
2899         Reviewed by Darin Adler.
2900
2901         Cleanup and plumbing in preparation for the great Window split.
2902
2903         - Rename KJS::Window to WebCore::JSDOMWindowBase.
2904         - Remove KJS::Window::retrieve() and KJS::Window::retrieveWindow() and replace
2905           with the new toJSDOMWindow().
2906         - Remove KJS::Window::retrieveActive() and replace with explicit call to 
2907           exec->dynamicGlobalObject() and toJSDOMWindow().
2908
2909         * bindings/js/JSCustomVoidCallback.cpp:
2910         (WebCore::toVoidCallback):.
2911         * bindings/js/JSCustomXPathNSResolver.cpp:
2912         (WebCore::JSCustomXPathNSResolver::create):
2913         * bindings/js/JSDatabaseCustom.cpp:
2914         (WebCore::JSDatabase::changeVersion):
2915         (WebCore::JSDatabase::transaction):
2916         * bindings/js/JSDocumentCustom.cpp:
2917         (WebCore::JSDocument::location):
2918         (WebCore::toJS):
2919         * bindings/js/JSEventTargetBase.cpp:
2920         (WebCore::jsEventTargetAddEventListener):
2921         (WebCore::jsEventTargetRemoveEventListener):
2922         * bindings/js/JSEventTargetNode.cpp:
2923         (WebCore::JSEventTargetNode::setListener):
2924         * bindings/js/JSHTMLDocumentCustom.cpp:
2925         (WebCore::JSHTMLDocument::nameGetter):
2926         (WebCore::JSHTMLDocument::open):
2927         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
2928         (WebCore::JSHTMLFrameSetElement::nameGetter):
2929         * bindings/js/JSLocation.cpp:
2930         (WebCore::JSLocation::put):
2931         (WebCore::jsLocationProtoFuncReplace):
2932         (WebCore::jsLocationProtoFuncReload):
2933         (WebCore::jsLocationProtoFuncAssign):
2934         * bindings/js/JSLocation.h:
2935         * bindings/js/JSSQLTransactionCustom.cpp:
2936         (WebCore::JSSQLTransaction::executeSql):
2937         * bindings/js/JSSVGLazyEventListener.cpp:
2938         (WebCore::JSSVGLazyEventListener::JSSVGLazyEventListener):
2939         (WebCore::JSSVGLazyEventListener::eventParameterName):
2940         * bindings/js/JSSVGLazyEventListener.h:
2941         * bindings/js/JSXMLHttpRequest.cpp:
2942         (WebCore::JSXMLHttpRequest::putValueProperty):
2943         (WebCore::jsXMLHttpRequestPrototypeFunctionOpen):
2944         (WebCore::jsXMLHttpRequestPrototypeFunctionAddEventListener):
2945         (WebCore::jsXMLHttpRequestPrototypeFunctionRemoveEventListener):
2946         * bindings/js/ScheduledAction.cpp:
2947         (WebCore::ScheduledAction::execute):
2948         * bindings/js/ScheduledAction.h:
2949         * bindings/js/kjs_binding.cpp:
2950         (WebCore::allowsAccessFromFrame):
2951         (WebCore::printErrorMessageForFrame):
2952         * bindings/js/kjs_events.cpp:
2953         (WebCore::JSAbstractEventListener::handleEvent):
2954         (WebCore::JSUnprotectedEventListener::JSUnprotectedEventListener):
2955         (WebCore::JSUnprotectedEventListener::~JSUnprotectedEventListener):
2956         (WebCore::JSUnprotectedEventListener::windowObj):
2957         (WebCore::JSEventListener::JSEventListener):
2958         (WebCore::JSEventListener::~JSEventListener):
2959         (WebCore::JSEventListener::windowObj):
2960         (WebCore::JSLazyEventListener::JSLazyEventListener):
2961         (WebCore::JSLazyEventListener::parseCode):
2962         * bindings/js/kjs_events.h:
2963         * bindings/js/kjs_navigator.cpp:
2964         (WebCore::MimeType::getValueProperty):
2965         * bindings/js/kjs_proxy.cpp:
2966         (WebCore::KJSProxy::evaluate):
2967         (WebCore::KJSProxy::createHTMLEventHandler):
2968         (WebCore::KJSProxy::createSVGEventHandler):
2969         * bindings/js/kjs_window.cpp:
2970         (WebCore::JSDOMWindowBasePrivate::JSDOMWindowBasePrivate):
2971         (WebCore::DOMWindowTimer::DOMWindowTimer):
2972         (WebCore::DOMWindowTimer::action):
2973         (WebCore::DOMWindowTimer::takeAction):
2974         (WebCore::):
2975         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
2976         (WebCore::JSDOMWindowBase::~JSDOMWindowBase):
2977         (WebCore::JSDOMWindowBase::location):
2978         (WebCore::JSDOMWindowBase::mark):
2979         (WebCore::allowPopUp):
2980         (WebCore::createWindow):
2981         (WebCore::showModalDialog):
2982         (WebCore::JSDOMWindowBase::getValueProperty):
2983         (WebCore::JSDOMWindowBase::childFrameGetter):
2984         (WebCore::JSDOMWindowBase::indexGetter):
2985         (WebCore::JSDOMWindowBase::namedItemGetter):
2986         (WebCore::JSDOMWindowBase::getOwnPropertySlot):
2987         (WebCore::JSDOMWindowBase::put):
2988         (WebCore::JSDOMWindowBase::allowsAccessFrom):
2989         (WebCore::JSDOMWindowBase::allowsAccessFromNoErrorMessage):
2990         (WebCore::JSDOMWindowBase::allowsAccessFromPrivate):
2991         (WebCore::JSDOMWindowBase::crossDomainAccessErrorMessage):
2992         (WebCore::JSDOMWindowBase::printErrorMessage):
2993         (WebCore::JSDOMWindowBase::globalExec):
2994         (WebCore::JSDOMWindowBase::shouldInterruptScript):
2995         (WebCore::JSDOMWindowBase::setListener):
2996         (WebCore::JSDOMWindowBase::getListener):
2997         (WebCore::JSDOMWindowBase::findJSEventListener):
2998         (WebCore::JSDOMWindowBase::findOrCreateJSEventListener):
2999         (WebCore::JSDOMWindowBase::findJSUnprotectedEventListener):
3000         (WebCore::JSDOMWindowBase::findOrCreateJSUnprotectedEventListener):
3001         (WebCore::JSDOMWindowBase::clearHelperObjectProperties):
3002         (WebCore::JSDOMWindowBase::clear):
3003         (WebCore::JSDOMWindowBase::setCurrentEvent):
3004         (WebCore::JSDOMWindowBase::currentEvent):
3005         (WebCore::windowProtoFuncAToB):
3006         (WebCore::windowProtoFuncBToA):
3007         (WebCore::windowProtoFuncOpen):
3008         (WebCore::windowProtoFuncSetTimeout):
3009         (WebCore::windowProtoFuncClearTimeout):
3010         (WebCore::windowProtoFuncSetInterval):
3011         (WebCore::windowProtoFuncAddEventListener):
3012         (WebCore::windowProtoFuncRemoveEventListener):
3013         (WebCore::windowProtoFuncShowModalDialog):
3014         (WebCore::windowProtoFuncNotImplemented):
3015         (WebCore::JSDOMWindowBase::setReturnValueSlot):
3016         (WebCore::JSDOMWindowBase::clearAllTimeouts):
3017         (WebCore::JSDOMWindowBase::installTimeout):
3018         (WebCore::JSDOMWindowBase::pauseTimeouts):
3019         (WebCore::JSDOMWindowBase::resumeTimeouts):
3020         (WebCore::JSDOMWindowBase::clearTimeout):
3021         (WebCore::JSDOMWindowBase::timerFired):
3022         (WebCore::JSDOMWindowBase::disconnectFrame):
3023         (WebCore::JSDOMWindowBase::jsEventListeners):
3024         (WebCore::JSDOMWindowBase::jsHTMLEventListeners):
3025         (WebCore::JSDOMWindowBase::jsUnprotectedEventListeners):
3026         (WebCore::JSDOMWindowBase::jsUnprotectedHTMLEventListeners):
3027         (WebCore::toJS):
3028         (WebCore::toJSDOMWindow):
3029         (WebCore::toJSDOMWindow):
3030         * bindings/js/kjs_window.h:
3031         (WebCore::JSDOMWindowBase::impl):
3032         (WebCore::JSDOMWindowBase::classInfo):
3033         (WebCore::JSDOMWindowBase::):
3034         * bindings/objc/DOMUtility.mm:
3035         (KJS::createDOMWrapper):
3036         * bindings/scripts/CodeGeneratorJS.pm:
3037         * history/CachedPage.cpp:
3038         (WebCore::CachedPage::CachedPage):
3039         (WebCore::CachedPage::restore):
3040         * page/Chrome.cpp:
3041         (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
3042         (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
3043         * page/DOMWindow.idl:
3044         * page/Frame.cpp:
3045         (WebCore::Frame::~Frame):
3046         (WebCore::Frame::windowScriptNPObject):
3047         (WebCore::Frame::pageDestroyed):
3048         * page/InspectorController.cpp:
3049         (WebCore::inspectedWindow):
3050         * page/mac/FrameMac.mm:
3051         (WebCore::Frame::windowScriptObject):
3052         * page/mac/WebCoreFrameBridge.mm:
3053         (updateRenderingForBindings):
3054         * platform/SecurityOrigin.cpp:
3055         (WebCore::SecurityOrigin::canAccess):
3056
3057 2008-03-03  Kevin Ollivier  <kevino@theolliviers.com>
3058
3059         wx build fixes after recent Frame-related changes.
3060
3061         * platform/wx/PasteboardWx.cpp:
3062         * platform/wx/TemporaryLinkStubs.cpp:
3063
3064 2008-03-03  Dan Bernstein  <mitz@apple.com>
3065
3066         Reviewed by Darin Adler.
3067
3068         - make :first-letter apply to the first letter in normal flow, skipping
3069           floats and positioned objects
3070
3071         Test: fast/css/first-letter-skip-out-of-flow.html
3072
3073         * rendering/RenderBlock.cpp:
3074         (WebCore::RenderBlock::updateFirstLetter):
3075
3076 2008-03-03  Ada Chan  <adachan@apple.com>
3077
3078         Fix build.
3079
3080         * plugins/win/PluginViewWin.cpp:
3081
3082 2008-03-03  Mark Rowe  <mrowe@apple.com>
3083
3084         Reviewed by Dan Bernstein.
3085
3086         Fix http://bugs.webkit.org/show_bug.cgi?id=17313
3087         Bug 17313: querySelectorAll() causing crashes when called via dojo.query() wrapper
3088
3089         Node::querySelector and SelectorNodeList were not sufficiently initializing the CSSStyleSelector
3090         before using it to resolve styles, which lead to it having a stale m_style member in some situations.
3091         This stale m_style member resulted in a wild store that would write over whatever object now resided
3092         at the location m_style pointed to.
3093
3094         Test: fast/dom/SelectorAPI/bug-17313.html
3095
3096         * dom/Node.cpp:
3097         (WebCore::Node::querySelector): Call initForStyleResolve to further initialize the CSSStyleSelector.
3098         * dom/SelectorNodeList.cpp:
3099         (WebCore::SelectorNodeList::SelectorNodeList): Ditto.
3100
3101 2008-03-03  Anders Carlsson  <andersca@apple.com>
3102
3103         Reviewed by Darin and Sam.
3104
3105         Include fixes, in preparation of using the headers in WebCore/bridge.
3106         
3107         * bindings/js/kjs_binding.h:
3108         * bindings/js/kjs_dom.cpp:
3109         * bindings/objc/DOMInternal.mm:
3110         * bindings/objc/DOMUtility.mm:
3111         * bindings/objc/WebScriptObject.mm:
3112         * bindings/objc/WebScriptObjectPrivate.h:
3113         * bridge/objc/objc_class.h:
3114         * bridge/objc/objc_instance.h:
3115         * bridge/objc/objc_runtime.h:
3116         * bridge/objc/objc_utility.h:
3117         * bridge/runtime.h:
3118         * bridge/runtime_object.h:
3119         * bridge/runtime_root.h:
3120         * html/HTMLAppletElement.cpp:
3121         * html/HTMLAppletElement.h:
3122         * html/HTMLEmbedElement.cpp:
3123         * html/HTMLEmbedElement.h:
3124         * html/HTMLObjectElement.cpp:
3125         * html/HTMLPlugInElement.cpp:
3126         * html/HTMLPlugInElement.h:
3127         * page/mac/FrameMac.mm:
3128         * page/mac/WebCoreFrameBridge.h:
3129         * page/mac/WebCoreFrameBridge.mm:
3130         * page/mac/WebCoreScriptDebugger.mm:
3131
3132 2008-03-03  David Hyatt  <hyatt@apple.com>
3133
3134         Full page zoom plumbing.  Add a notion of whether or not a zoom is text only or a full zoom to the
3135         Frame.  setTextSizeMultiplier does a text only zoom.
3136
3137         Reviewed by Tim H.
3138
3139         * page/Frame.cpp:
3140         (WebCore::Frame::zoomFactor):
3141         (WebCore::Frame::isZoomFactorTextOnly):
3142         (WebCore::Frame::setZoomFactor):
3143         (WebCore::FramePrivate::FramePrivate):
3144         * page/Frame.h:
3145         * page/FramePrivate.h:
3146         * page/mac/WebCoreFrameBridge.mm:
3147         (-[WebCoreFrameBridge setTextSizeMultiplier:]):
3148         * svg/SVGSVGElement.cpp:
3149         (WebCore::SVGSVGElement::setCurrentScale):
3150
3151 2008-03-03  David Hyatt  <hyatt@apple.com>
3152
3153         Fix for <rdar://problem/5776161> REGRESSION: Google Docs Spreadsheet crash
3154
3155         This is also http://bugs.webkit.org/show_bug.cgi?id=17543, fixed table layout corrupts heap.
3156
3157         Make sure not to access position -1 of the size 0 vectors.
3158
3159         Reviewed by ggaren
3160
3161         * rendering/FixedTableLayout.cpp:
3162         (WebCore::FixedTableLayout::layout):
3163
3164 2008-03-03  David D. Kilzer  <ddkilzer@webkit.org>
3165
3166         Dynamically inserting CSS rule with @media query fails with DOM Exception 12
3167         <http://bugs.webkit.org/show_bug.cgi?id=15986>
3168
3169         Reviewed by Darin.
3170
3171         Allow any valid rule (@font-face, @import, @media, @page or style) to be
3172         parsed when using CSSStyleSheet.insertRule().  Previously only import and
3173         style rules were allowed.  Note that @page rules always throw an exception
3174         because they're not implemented yet, so no test case was added for them.
3175
3176         Tests: fast/css/insertRule-font-face.html
3177                fast/css/insertRule-media.html
3178
3179         * css/CSSGrammar.y: Extracted 'valid_rule' out of 'rule'.  Renamed
3180         'ruleset_or_import' to 'valid_rule_or_import' and changed its definition.
3181
3182 2008-03-03  Anders Carlsson  <andersca@apple.com>
3183
3184         Reviewed by Sam.
3185
3186         Copy JSC bindings directory over to WebCore/bridge.
3187
3188         * bridge: Copied from ../JavaScriptCore/bindings.
3189
3190 2008-03-03  Dan Bernstein  <mitz@apple.com>
3191
3192         Reviewed by Darin Adler.
3193
3194         - remove CSSMutableStyleDeclaration::setChanged()'s change type
3195           parameter
3196
3197         * css/CSSMutableStyleDeclaration.cpp:
3198         (WebCore::CSSMutableStyleDeclaration::setChanged): Removed the change
3199         type parameter and made this function determine the correct change type
3200         based on whether this is an inline style declaration.
3201         (WebCore::CSSMutableStyleDeclaration::setProperty):
3202         * css/CSSMutableStyleDeclaration.h:
3203         (WebCore::CSSMutableStyleDeclaration::clear): Removed this unused
3204         method.
3205         (WebCore::CSSMutableStyleDeclaration::setChanged): Made private.
3206
3207 2008-03-03  Darin Adler  <darin@apple.com>
3208
3209         Reviewed by Adam.
3210
3211         - some "cleanup" on the path to removing WebCoreFrameBridge
3212
3213         * WebCore.base.exp: Exported some stuff we either already use or
3214         I am about to use in an upcoming patch.
3215
3216         * WebCore.xcodeproj/project.pbxproj: Made FileChooser.h private rather
3217         than project, for future use in WebKit.
3218
3219         * bindings/objc/WebScriptObject.mm: Removed some dead code.
3220
3221         * dom/ContainerNode.cpp: Added a now-needed or soon-to-be-needed include.
3222         * editing/Editor.cpp: Ditto.
3223
3224         * editing/Editor.h: Removed many unneeded declarations and includes.
3225         Removed the unused userVisibleString function.
3226
3227         * editing/EditorCommand.cpp:
3228         (WebCore::executeYank): Added parameter for triggeringEvent, which no
3229         longer has a default value.
3230         (WebCore::executeYankAndSelect): Ditto.
3231
3232         * editing/mac/EditorMac.mm: Removed userVisibleString.
3233
3234         * page/mac/EventHandlerMac.mm:
3235         (WebCore::isKeyboardOptionTab): Tweaked formattin.
3236
3237         * page/mac/WebCoreFrameBridge.mm:
3238         (-[WebCoreFrameBridge dragSourceMovedTo:]): Get window from -[NSView window]
3239         rather than from the bridge. There's no special value in the bridge's window
3240         method and we can use NSView directly.
3241         (-[WebCoreFrameBridge dragSourceEndedAt:operation:]): Ditto.
3242
3243         * platform/graphics/mac/ImageMac.mm:
3244         (WebCore::Image::loadPlatformResource): Use a new WebCoreBundleFinder class to
3245         find the bundle rather than using WebCoreFrameBridge.
3246
3247         * platform/mac/ClipboardMac.mm: Added a now-needed or soon-to-be-needed include.
3248         * platform/mac/PasteboardMac.mm: Ditto.
3249
3250         * rendering/RenderObject.h:
3251         (WebCore::DashboardRegionValue::operator==): Fixed mistake where this wasn't
3252         comparing the clip rectangle.
3253         (WebCore::DashboardRegionValue::operator!=): Added. Needed by my future work.
3254
3255 2008-03-03  Oliver Hunt  <oliver@apple.com>
3256
3257         Reviewed by Mark Rowe.
3258
3259         Bug 17620: getImageData lies
3260         http://bugs.webkit.org/show_bug.cgi?id=17620
3261
3262         Correct logic to actually iterate over the source row
3263
3264         * platform/graphics/cg/ImageBufferCG.cpp:
3265         (WebCore::ImageBuffer::getImageData):
3266
3267 2008-03-03  Oliver Hunt  <oliver@apple.com>
3268
3269         Reviewed by Mark Rowe.
3270
3271         Correct incorrect assertion
3272
3273         * platform/graphics/cg/ImageBufferCG.cpp:
3274         (WebCore::ImageBuffer::putImageData):
3275
3276 2008-03-02  Alp Toker  <alp@atoker.com>
3277
3278         Another fix for non-database builds after changes in r30331.
3279
3280         Conditionalize a stopDatabases() call.
3281
3282         * loader/FrameLoader.cpp:
3283         (WebCore::FrameLoader::stopLoading):
3284
3285 2008-03-02  Kevin Ollivier  <kevino@theolliviers.com>
3286
3287         Reviewed by Alp Toker.
3288
3289         Scrolling fixes. Implement page scrolling, initialize mouse wheel
3290         event variables, and remove duplicate event binding for TOP
3291         scrolling event.
3292
3293         http://bugs.webkit.org/show_bug.cgi?id=17643
3294
3295         * platform/wx/MouseWheelEventWx.cpp:
3296         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
3297         * platform/wx/ScrollViewWx.cpp:
3298         (WebCore::ScrollView::ScrollViewPrivate::bindEvents):
3299         (WebCore::ScrollView::ScrollViewPrivate::OnScrollWinEvents):
3300
3301 2008-03-02  Alp Toker  <alp@atoker.com>
3302
3303         Fix building without database support after changes in r30331.
3304
3305         * dom/Document.cpp:
3306
3307 2008-03-02  Kevin Ollivier  <kevino@theolliviers.com>
3308
3309         wx build fix for Windows after PageWin.cpp move.
3310
3311         * webcore-wx.bkl:
3312
3313 2008-03-02  Kevin Ollivier  <kevino@theolliviers.com>
3314
3315         Reviewed by Dave Hyatt.
3316
3317         Gracefully handle a CSS rule containing an invalid value.
3318         (Fixes http://bugs.webkit.org/show_bug.cgi?id=16898)
3319
3320         * css/CSSGrammar.y:
3321
3322 2008-03-02  Alp Toker  <alp@atoker.com>
3323
3324         Reviewed by Mark Rowe.
3325
3326         Improve the Cairo Path::isEmpty() function
3327
3328         Use cairo_has_current_point() where available.
3329
3330         * platform/graphics/cairo/PathCairo.cpp:
3331         (WebCore::Path::isEmpty):
3332
3333 2008-03-01  Mark Rowe  <mrowe@apple.com>
3334
3335         Reviewed by Tim Hatcher.
3336
3337         Update Xcode configuration to support building debug and release from the mysterious future.
3338
3339         * Configurations/DebugRelease.xcconfig:
3340
3341 2008-03-01  Oliver Hunt  <oliver@apple.com>
3342
3343         Reviewed by Sam Weinig.
3344
3345         Bug 16954: Support putImageData
3346         
3347         Implement support for HTML5's putImageData for the CG port.  All other ports
3348         are currently just using stubs for the final blit.
3349
3350         Test: fast/canvas/canvas-putImageData.html
3351
3352         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
3353         (WebCore::JSCanvasRenderingContext2D::putImageData):
3354         * html/CanvasRenderingContext2D.cpp:
3355         (WebCore::CanvasRenderingContext2D::putImageData):
3356         * html/CanvasRenderingContext2D.h:
3357         * platform/graphics/ImageBuffer.h:
3358         * platform/graphics/cairo/ImageBufferCairo.cpp:
3359         * platform/graphics/cg/ImageBufferCG.cpp:
3360         (WebCore::ImageBuffer::putImageData):
3361         * platform/graphics/qt/ImageBufferQt.cpp:
3362         * platform/graphics/wx/ImageBufferWx.cpp:
3363
3364 2008-03-01  Jon Honeycutt  <jhoneycutt@apple.com>
3365
3366         Reviewed by Darin.
3367
3368         <rdar://problem/5772987> Crashing viewing page with two VLC plug-in
3369         instances
3370
3371         The VLC Netscape plug-in crashes if more than one instance is created.
3372
3373         Added a quirk that disallows a plug-in from having more than one
3374         instance and set this for the VLC plug-in.
3375
3376         In addition, we now sort plug-ins that handle the same MIME
3377         type to choose the most appropriate one. This sorting first sorts by
3378         whether a plug-in has an issue that should put it at the end of the
3379         list, then whether it appears in a "preferred" plug-in directory.
3380
3381         * plugins/PluginQuirkSet.h: Added PluginQuirkDontAllowMultipleInstances.
3382         * plugins/PluginDatabase.cpp:
3383         (WebCore::PluginDatabase::preferredPluginCompare): Comparator for
3384         sorting plug-ins; calls PluginPackage::compare().
3385         (WebCore::PluginDatabase::pluginForMIMEType): Add all of the plug-ins
3386         that handle this MIME type to a list, sort the list, and return the
3387         first item.
3388         (WebCore::PluginDatabase::MIMETypeForExtension): Add all of the plug-ins
3389         that handle this extension to a list, sort the list, and return the MIME
3390         type used by the plug-in at the beginning of the list.
3391         * plugins/PluginDatabase.h:
3392         * plugins/PluginPackage.h:
3393         (WebCore::PluginPackage::version): Added; returns the module version.
3394         * plugins/win/PluginDatabaseWin.cpp:
3395         (WebCore::PluginDatabase::isPreferredPluginPath): Made static; removed
3396         const.
3397         * plugins/win/PluginPackageWin.cpp:
3398         (WebCore::PluginPackage::compare): Sorts plug-ins with known issues to
3399         the end, then plug-ins in preferred directories to the beginning, then
3400         alphabetically by file name, numerically by version, and alphabetically
3401         by parent directory.
3402         (WebCore::PluginPackage::determineQuirks): Set the "don't allow multiple
3403         instances" quirk for VLC.
3404         (WebCore::PluginPackage::load): Return false if the plug-in library has
3405         already been loaded and the "don't allow multiple instances" quirk is
3406         set.
3407         * platform/gtk/TemporaryLinkStubs.cpp:
3408         (PluginPackage::compare): Added stub.
3409         (PluginDatabase::IsPreferredPluginPath): Update the GTK stub.
3410         * platform/qt/TemporaryLinkStubs.cpp:
3411         (PluginPackage::compare): Added stub.
3412         (PluginDatabase::IsPreferredPluginPath): Update the Qt stub.
3413         * platform/wx/TemporaryLinkStubs.cpp:
3414         (PluginPackage::compare): Added stub.
3415         (PluginDatabase::IsPreferredPluginPath): Update the wx stub.
3416
3417 2008-03-01  Sam Weinig  <sam@webkit.org>
3418
3419         Rubber-stamped by Mark Rowe.
3420
3421         Remove reference to the now non-existent bridge directory.
3422
3423         * WebCore.xcodeproj/project.pbxproj:
3424
3425 2008-03-01  Sam Weinig  <sam@webkit.org>
3426
3427         Reviewed by Darin Adler.
3428
3429         Search the entire prototype chain when doing early prototype lookup in
3430         the Window's getOwnPropertySlot method.
3431
3432         Makes fast/dom/Window/window-function-name-getter-precedence.html pass all tests.
3433
3434         * bindings/js/kjs_window.cpp:
3435         (KJS::Window::getOwnPropertySlot):
3436
3437 2008-03-01  Nikolas Zimmermann  <zimmermann@kde.org>
3438
3439         Reviewed by Oliver.
3440
3441         Fixes: http://bugs.webkit.org/show_bug.cgi?id=17568 (SVGForeignObjectElement can't react to width/height SVG DOM changes)
3442
3443         As the bug title says, fix all dynamic update problems that occour with SVGForeignObjectElement.
3444
3445         Tests: svg/dynamic-updates/SVGForeignObjectElement-dom-height-attr.html
3446                svg/dynamic-updates/SVGForeignObjectElement-dom-width-attr.html
3447                svg/dynamic-updates/SVGForeignObjectElement-dom-x-attr.html
3448                svg/dynamic-updates/SVGForeignObjectElement-dom-y-attr.html
3449                svg/dynamic-updates/SVGForeignObjectElement-svgdom-height-prop.html
3450                svg/dynamic-updates/SVGForeignObjectElement-svgdom-width-prop.html
3451                svg/dynamic-updates/SVGForeignObjectElement-svgdom-x-prop.html
3452                svg/dynamic-updates/SVGForeignObjectElement-svgdom-y-prop.html
3453
3454         * svg/SVGForeignObjectElement.cpp:
3455         (WebCore::SVGForeignObjectElement::parseMappedAttribute):
3456         (WebCore::addCSSPropertyAndNotifyAttributeMap):
3457         (WebCore::SVGForeignObjectElement::svgAttributeChanged):
3458         * svg/SVGForeignObjectElement.h:
3459
3460 2008-02-29  Brady Eidson  <beidson@apple.com>
3461
3462         Reviewed by build-fix karma
3463
3464         Bonehead mistake.  Revert function to previous version for all non-Windows+CFNetwork platforms
3465
3466         * platform/network/ProtectionSpace.cpp:
3467         (WebCore::ProtectionSpace::receivesCredentialSecurely): Make my previous change conditionally
3468
3469 2008-02-29  Brady Eidson  <beidson@apple.com>
3470
3471         Reviewed by Darin
3472         
3473         <rdar://problem/5771227> - Incorrect password handling text in credential sheet
3474
3475         * platform/network/ProtectionSpace.cpp:
3476         (WebCore::ProtectionSpace::receivesCredentialSecurely): Call functional CFNetwork method to
3477           get "secureness" of the auth challenge instead of figuring it out ourselves
3478
3479 2008-02-29  Brent Fulgham  <bfulgham@gmail.com>
3480
3481         http://bugs.webkit.org/show_bug.cgi?id=17483
3482         Implement scrollbars on Windows (Cairo)
3483
3484         Reviewed by Adam Roben.
3485
3486         * platform/win/PlatfromScrollBarWin.cpp: Duplicate implementation
3487           from PlatformScrollBarWinSafari.cpp, then modify to use the
3488           native Windows theme engine.  Use SOFT_LINK.  Use platform
3489           'GetSystemMetrics' call to decide size of scrollbars and buttons.
3490
3491 2008-02-29  Adam Roben  <aroben@apple.com>
3492
3493         Windows build fix
3494
3495         * WebCore.vcproj/WebCore.vcproj: Remove bridge/* from the include path
3496         and the post-build event, and add page/win to each. Also let VS have
3497         its way with the order of the files.
3498         * page/win/PageWin.cpp: Copied from bridge/win/PageWin.cpp in r30673
3499         * page/win/GlobalHistoryWin.cpp: Copied from
3500         bridge/win/GlobalHistoryWin.cpp in r30673
3501
3502 2008-02-29  Anders Carlsson  <andersca@apple.com>
3503
3504         Build fix.
3505
3506         * WebCore.xcodeproj/project.pbxproj:
3507
3508 2008-02-29  Mark Rowe  <mrowe@apple.com>
3509
3510         Reviewed by Tim Hatcher.
3511
3512         64-bit build fix.
3513
3514         * platform/graphics/mac/SimpleFontDataMac.mm:
3515         (WebCore::pathFromFont): Provide stub implementation of pathFromFont for 64-bit as
3516         FMGetATSFontRefFromFont is not available.
3517
3518 2008-02-29  Mark Rowe  <mrowe@apple.com>
3519
3520         Build fix.  Only declare pathFromFont in debug builds as it is unused in release builds.
3521
3522         * platform/graphics/mac/SimpleFontDataMac.mm:
3523
3524 2008-02-29  Anders Carlsson  <andersca@apple.com>
3525
3526         Reviewed by Adam.
3527         
3528         Copy the remaining files in bridge/ over to page/
3529
3530         * WebCore.vcproj/WebCore.vcproj:
3531         * WebCore.xcodeproj/project.pbxproj:
3532         * bridge: Removed.
3533         * bridge/AXObjectCache.h: Removed.
3534         * bridge/EditorClient.h: Removed.
3535         * bridge/GlobalHistory.h: Removed.
3536         * bridge/win: Removed.
3537         * bridge/win/FrameCGWin.cpp: Removed.
3538         * bridge/win/FrameCairoWin.cpp: Removed.
3539         * bridge/win/FrameWin.cpp: Removed.
3540         * bridge/win/FrameWin.h: Removed.
3541         * bridge/win/GlobalHistoryWin.cpp: Removed.
3542         * bridge/win/PageWin.cpp: Removed.
3543         * page/AXObjectCache.h: Copied from bridge/AXObjectCache.h.
3544         * page/EditorClient.h: Copied from bridge/EditorClient.h.
3545         * page/GlobalHistory.h: Copied from bridge/GlobalHistory.h.
3546         * page/win/FrameCGWin.cpp: Copied from bridge/win/FrameCGWin.cpp.
3547         * page/win/FrameCairoWin.cpp: Copied from bridge/win/FrameCairoWin.cpp.
3548         * page/win/FrameWin.cpp: Copied from bridge/win/FrameWin.cpp.
3549         * page/win/FrameWin.h: Copied from bridge/win/FrameWin.h.
3550
3551 2008-02-29  Robert Blaut  <webkit@blaut.biz>
3552
3553         Reviewed by Darin Adler.
3554
3555         - fix http://bugs.webkit.org/show_bug.cgi?id=17532
3556           Webkit imports styles from <link> element which doesn't have rel=stylesheet defined
3557
3558         Test: fast/html/link-rel-stylesheet.html
3559
3560         * html/HTMLLinkElement.cpp:
3561         (WebCore::HTMLLinkElement::process):
3562
3563 2008-02-29  Mark Rowe  <mrowe@apple.com>
3564
3565         Reviewed by Anders Carlsson.
3566
3567         Replace use of WKPathFromFont with implementation in terms of public API.