b8cc9267662ee5f0a3c251a9e5478e512f2a6586
[WebKit-https.git] / WebCore / ChangeLog
1 2008-03-15  Mark Mentovai  <mark@moxienet.com>
2
3         Reviewed and landed by Darin.
4
5         - http://bugs.webkit.org/show_bug.cgi?id=17833
6           use file extensions instead of explicit file types in WebCore's Xcode project
7
8         * WebCore.xcodeproj/project.pbxproj: Remove unnecessary
9           uses of explicitFileType, preferring lastKnownFileType ("File Type:
10           Default for File" in Xcode's File Info's General tab).  Files below
11           that relied on an explicit file type setting other than what would
12           be implied by their extensions have been renamed to have correct
13           extensions.
14         * bridge/jni/jni_jsobject.cpp: Removed.
15         * bridge/jni/jni_jsobject.mm: Copied from bridge/jni/jni_jsobject.cpp.
16         * loader/mac/LoaderNSURLExtras.m: Removed.
17         * loader/mac/LoaderNSURLExtras.mm: Copied from loader/mac/LoaderNSURLExtras.m.
18         * platform/mac/SharedTimerMac.cpp: Removed.
19         * platform/mac/SharedTimerMac.mm: Copied from platform/mac/SharedTimerMac.cpp.
20
21 2008-03-15  Darin Adler  <darin@apple.com>
22
23         Reviewed by Sam.
24
25         - fix http://bugs.webkit.org/show_bug.cgi?id=11997
26           Ranges are not fixed after mutation (affects Acid3 test 13)
27
28         Test: fast/dom/Range/mutation.html
29
30         * WebCore.xcodeproj/project.pbxproj: Added NodeWithIndex.h, NodeWithIndexAfter.h,
31         and NodeWithIndexBefore.h.
32
33         * dom/CharacterData.cpp:
34         (WebCore::CharacterData::setData): Replaced call to Document::removeMarkers
35         with call to Document::textRemoved.
36         (WebCore::CharacterData::insertData): Replaced call to Document::shiftMarkers
37         with call to Document::textInserted.
38         (WebCore::CharacterData::deleteData): Replaced call to Document::removeMarkers
39         and Document::shiftMarkers with call to Document::textRemoved.
40         (WebCore::CharacterData::replaceData): Replaced call to Document::removeMarkers
41         and Document::shiftMarkers with call to Document::textRemoved and
42         Document::textInserted.
43         (WebCore::CharacterData::containsOnlyWhitespace): Tweaked a bit.
44
45         * dom/ContainerNode.cpp:
46         (WebCore::ContainerNode::childrenChanged): Added a call to
47         Document::nodeChildrenChanged when the nmber of children was changed (and not
48         by the parser).
49         (WebCore::dispatchChildRemovalEvents): Updated for name change.
50
51         * dom/Document.cpp:
52         (WebCore::Document::~Document): Assert that all ranges are gone.
53         (WebCore::Document::nodeChildrenChanged): Added. Calls nodeChildrenChanged on
54         all ranges.
55         (WebCore::Document::nodeWillBeRemoved): Renamed from notifyBeforeNodeRemoval.
56         Added code to call nodeWillBeRemoved on all ranges.
57         (WebCore::Document::textInserted): Added. Calls textInserted on all ranges and
58         also calls shiftMarkers.
59         (WebCore::Document::textRemoved): Added. Calls textRemoved on all ranges and also
60         calls removeMarkers and shiftMarkers.
61         (WebCore::Document::textNodesMerged): Added. Calls textNodesMerged on all ranges.
62         (WebCore::Document::textNodeSplit): Added. Calls textNodeSplit on all ranges.
63         (WebCore::Document::attachRange): Added. Adds range to the HashSet of all ranges
64         for this document.
65         (WebCore::Document::detachRange): Added. Removes range from the HashSet.
66         * dom/Document.h: Added the new functions and the data member.
67
68         * dom/Element.cpp:
69         (WebCore::Element::normalizeAttributes): Added. Contains the part of the
70         normalize function that's specific to Element. Better encapsulation to have it
71         here rather than in Node::normalize.
72         * dom/Element.h: Added the new function.
73
74         * dom/Node.cpp:
75         (WebCore::Node::normalize): Rewrote so it's no longer recursive. Also added
76         a call to textNodesMerged after each pair of nodes is merged but before the
77         second node is removed.
78         (WebCore::Node::traverseNextNodePostOrder): Added. Helper function used by
79         normalize, but also useful elsewhere.
80         * dom/Node.h: Added the new function.
81
82         * dom/NodeIterator.cpp:
83         (WebCore::NodeIterator::nodeWillBeRemoved): Renamed from notifyBeforeNodeRemoval.
84         * dom/NodeIterator.h: Ditto.
85
86         * dom/ProcessingInstruction.cpp:
87         (WebCore::ProcessingInstruction::setData): Call textRemoved.
88
89         * dom/Range.cpp:
90         (WebCore::NodeWithIndex::index): Added. Computes and stores index.
91         (WebCore::NodeWithIndexBefore::indexBefore): Added. Computes and stores index.
92         (WebCore::NodeWithIndexAfter::indexAfter): Added. Computes and stores index.
93         (WebCore::Range::Range): Call attachRange.
94         (WebCore::Range::~Range): Call detachRange unless the range is already detached.
95         (WebCore::Range::commonAncestorContainer): Removed check for WRONG_DOCUMENT_ERR.
96         It's no longer possible to create a range where the two containers are non-zero
97         and have no common ancestor.
98         (WebCore::Range::isPointInRange): Rewrote expression to be more readable.
99         (WebCore::Range::compareNode): Changed local variable to use int for consistency.
100         (WebCore::Range::compareBoundaryPoints): Replaced ASSERT with ASSERT_NOT_REACHED.
101         (WebCore::Range::deleteContents): Removed check for INVALID_STATE_ERR and
102         initialization of ec to 0; both are now inside checkDeleteExtract.
103         (WebCore::Range::intersectsNode): Changed local variable to use int for consistency.
104         Also changed comparison to use < 0 and >= 0 rather than checking explicitly for 1
105         and -1.
106         (WebCore::Range::processContents): Changed code to not get the nodeType multiple
107         times on the same node, and tweaked formatting. Removed code to update the range
108         on deletion, because the normal delete logic will take care of that now.
109         (WebCore::Range::extractContents): Removed check for INVALID_STATE_ERR and
110         initialization of ec to 0; both are now inside checkDeleteExtract.
111         (WebCore::Range::insertNode): Changed local variable to use int for consistency.
112         (WebCore::Range::toString): Changed variable name to pastLast.
113         (WebCore::Range::detach): Call detachRange.
114         (WebCore::Range::checkDeleteExtract): Added check for detached range and code to
115         set ec to 0; moved here from the two callers. Also changed variable name to pastLast.
116         (WebCore::endpointNodeChildrenChanged): Added.
117         (WebCore::Range::nodeChildrenChanged): Added.
118         (WebCore::endpointNodeWillBeRemoved): Added.
119         (WebCore::Range::nodeWillBeRemoved): Added.
120         (WebCore::endpointTextInserted): Added.
121         (WebCore::Range::textInserted): Added.
122         (WebCore::endpointTextRemoved): Added.
123         (WebCore::Range::textRemoved): Added.
124         (WebCore::endpointTextNodesMerged): Added.
125         (WebCore::Range::textNodesMerged): Added.
126         (WebCore::endpointTextNodesSplit): Added.
127         (WebCore::Range::textNodeSplit): Added.
128
129         * dom/Range.h: Added new member functions.
130
131         * dom/NodeWithIndex.h: Added. Makes it so we won't find the index for the same
132         node more than once.
133         * dom/NodeWithIndexAfter.h: Added. Similar to NodeWithIndex but gives the index after a
134         node and treats a node pointer of 0 as meaning "before first node in parent container".
135         * dom/NodeWithIndexBefore.h: Added.  Similar to NodeWithIndex but treats a node pointer of 0
136         as meaning "after last node in parent container".
137
138         * dom/Text.cpp:
139         (WebCore::Text::splitText): Call textNodeSplit.
140
141         * editing/ApplyStyleCommand.cpp:
142         (WebCore::ApplyStyleCommand::applyInlineStyle): Changed variable name to pastLast.
143
144 2008-03-15  Julien Chaffraix  <julien.chaffraix@gmail.com>
145
146         Reviewed by Holger.
147
148         [CURL] Crash below ResourceHandleManager::setupPOST when job->request().httpBody() is NULL
149         http://bugs.webkit.org/show_bug.cgi?id=16906
150
151         Add null checks for httpBody() to match other ports.
152
153         Test: http/tests/xmlhttprequest/xmlhttprequest-post-crash.html
154
155         * platform/network/curl/ResourceHandleManager.cpp:
156         (WebCore::readCallback): Add null check.
157         (WebCore::ResourceHandleManager::setupPOST): Ditto.
158
159 2008-03-14  Steve Falkenburg  <sfalken@apple.com>
160
161         PGO build fixes.
162
163         * WebCore.vcproj/WebCore.vcproj:
164
165 2008-03-14  Anders Carlsson  <andersca@apple.com>
166
167         Reviewed by Sam.
168
169         <rdar://problem/5794989>
170         https://bugs.webkit.org/show_bug.cgi?id=17792
171         REGRESSION (Safari 3.0.4-3.1): Ordering tickets from Sweden's biggest train operator doesn't work
172
173         Pass the frame loader that should be used for looking up the frame name to FrameLoader::createWindow
174         so that somewindow.open calls where the active window and 'somewindow' differ return the correct frame.
175         
176         * bindings/js/JSDOMWindowBase.cpp:
177         (WebCore::createWindow):
178         * loader/FrameLoader.cpp:
179         (WebCore::FrameLoader::createWindow):
180         * loader/FrameLoader.h:
181
182 2008-03-14  Dan Bernstein  <mitz@apple.com>
183
184         Reviewed by Mark Rowe.
185
186         - fix <rdar://problem/5797836> shadow offsets are smaller than specified
187
188         * platform/graphics/cg/GraphicsContextCG.cpp:
189         (WebCore::GraphicsContext::setShadow): Made the workaround for
190         <rdar://problem/5539388> unconditional.
191
192 2008-03-14  Adam Roben  <aroben@apple.com>
193
194         Fix it right this time
195
196         * platform/MainThread.cpp: Cast to unsigned so we can use %u in the
197         format string.
198         * platform/mac/MainThreadMac.mm:
199
200 2008-03-14  Adam Roben  <aroben@apple.com>
201
202         Mac build fix
203
204         * platform/mac/MainThreadMac.mm: Corrected a typo.
205
206 2008-03-14  Dan Bernstein  <mitz@apple.com>
207
208         Reviewed by Darin Adler.
209
210         - fix http://bugs.webkit.org/show_bug.cgi?id=17834
211           REGRESSION: floated first-letter does not work when included in table
212
213         Test: fast/css/first-letter-float.html
214
215         * rendering/RenderBlock.cpp:
216         (WebCore::RenderBlock::updateFirstLetter): Changed the search for the
217         first text node to stop at a float if that float is an existing first-
218         letter.
219
220 2008-03-14  Sam Weinig  <sam@webkit.org>
221
222         Fix Mac build
223
224         * WebCore.xcodeproj/project.pbxproj:
225
226 2008-03-13  Adam Roben  <aroben@apple.com>
227
228         Make most of callOnMainThread's implementation be cross-platform
229
230         I took the non-platform-specific parts of MainThreadWin.cpp and moved
231         them to a new MainThread.cpp. Each platform is now responsible for
232         implementing one function, scheduleDispatchFunctionsOnMainThread,
233         which is supposed to set things up so that
234         dispatchFunctionsFromMainThread gets called from the main thread in
235         the near future.
236
237         Reviewed by Alexey.
238
239         * GNUmakefile.am: Added MainThread.cpp to the project.
240         * WebCore.pro: Ditto.
241         * WebCore.vcproj/WebCore.vcproj: Ditto.
242         * WebCore.xcodeproj/project.pbxproj: Ditto.
243         * WebCoreSources.bkl: Ditto.
244         * platform/MainThread.cpp:
245           - Copied from WebCore/platform/win/MainThreadWin.cpp.
246           - Removed the Windows-specific parts.
247         (WebCore::callOnMainThread): Changed to call
248         scheduleDispatchFunctionsOnMainThread instead of PostMessage.
249         * platform/gtk/MainThreadGtk.cpp:
250         (WebCore::timeoutFired): Renamed from callFunctionOnMainThread. Now
251         just calls dispatchFunctionsFromMainThread.
252         (WebCore::scheduleDispatchFunctionsOnMainThread): Added. Calls through
253         to g_timeout_add.
254         * platform/mac/MainThreadMac.mm: Renamed WebCoreFunctionWrapper to
255         WebCoreMainThreadCaller.
256         (-[WebCoreMainThreadCaller call]): Calls through to
257         dispatchFunctionsFromMainThread.
258         (WebCore::scheduleDispatchFunctionsOnMainThread): Makes a new
259         WebCoreMainThreadCaller and calls performSelectorOnMainThread on it.
260         * platform/qt/MainThreadQt.cpp: Removed PerformFunctionEvent.
261         (WebCore::MainThreadInvoker::event): Chagned to call through to
262         dispatchFunctionsFromMainThread.
263         (WebCore::scheduleDispatchFunctionsOnMainThread): Sends an empty event
264         to the MainThreadInvoker.
265         * platform/win/MainThreadWin.cpp:
266           - Removed the non-Windows-specific parts.
267           - Removed some unnecessary initialization of static variables to 0.
268         (WebCore::ThreadingWindowWndProc): Changed to call
269         dispatchFunctionsFromMainThread.
270         (WebCore::scheduleDispatchFunctionsOnMainThread): Calls through to
271         PostMessage.
272         * platform/wx/MainThreadWx.cpp:
273         (WebCore::scheduleDispatchFunctionsOnMainThread): Added.
274
275 2008-03-14  Beth Dakin  <bdakin@apple.com>
276
277         Reviewed by Geoff.
278
279         Fix for <rdar://problem/5728171> Potential PLT speedup: don't 
280         realloc every time inside NamedAttrMap::addAttribute
281
282         The speed-up for this turned out to be so small that it is mostly 
283         imperceptible. It is likely that it is a tiny boost, though, and 
284         the new code is much cleaner.
285
286         * dom/Element.cpp:
287         (WebCore::Element::setAttributeMap): attrs is now called 
288         m_attributes
289         * dom/NamedAttrMap.cpp: The array attrs is now the Vector of 
290         RefPtrs called m_attributes, and there is no longer any need for 
291         the len member variable. 
292         (WebCore::NamedAttrMap::NamedAttrMap): 
293         (WebCore::NamedAttrMap::item):
294         (WebCore::NamedAttrMap::getAttributeItem):
295         (WebCore::NamedAttrMap::clearAttributes):
296         (WebCore::NamedAttrMap::operator=):
297         (WebCore::NamedAttrMap::addAttribute):
298         (WebCore::NamedAttrMap::removeAttribute):
299         (WebCore::NamedAttrMap::mapsEquivalent):
300         * dom/NamedAttrMap.h: Same.
301         (WebCore::NamedAttrMap::length):
302         (WebCore::NamedAttrMap::attributeItem):
303         (WebCore::NamedAttrMap::shrinkToLength):
304         (WebCore::NamedAttrMap::reserveCapacity):
305         * html/HTMLTokenizer.cpp: One of the benefits of the old array was 
306         that it never took up more memory than it needed to. So the 
307         tokenizer utilizes new member functions on NamedAttrMap 
308         (shrinkToLength and reserveCapacity) to try to keep memory usage at 
309         a minimum. 
310         (WebCore::Token::addAttribute):
311         (WebCore::HTMLTokenizer::processToken):
312
313 2008-03-14  David D. Kilzer  <ddkilzer@apple.com>
314
315         BUILD FIX when ENABLE(MAC_JAVA_BRIDGE) set to 0.
316
317         * page/mac/FrameMac.mm: Move up #if ENABLE(MAC_JAVA_BRIDGE) guard
318         to comment out unused code.
319
320 2008-03-14  David D. Kilzer  <ddkilzer@apple.com>
321
322         Unify concept of enabling the Mac Java bridge.
323
324         Reviewed by Darin and Anders.
325
326         No test cases added since there is no change in functionality.
327
328         * DerivedSources.make: Added check for ENABLE_MAC_JAVA_BRIDGE macro.
329         If defined as "1", add WebCore.JNI.exp to WEBCORE_EXPORT_DEPENDENCIES.
330         * WebCore.JNI.exp: Added.
331         * WebCore.base.exp: Moved exported JNI methods to WebCore.JNI.exp.
332
333         * bridge/jni/jni_class.cpp: Added #if ENABLE(MAC_JAVA_BRIDGE) guard.
334         * bridge/jni/jni_class.h: Ditto.
335         * bridge/jni/jni_instance.cpp: Ditto.
336         * bridge/jni/jni_instance.h: Ditto.
337         * bridge/jni/jni_jsobject.cpp: Ditto.
338         * bridge/jni/jni_jsobject.h: Ditto.
339         * bridge/jni/jni_objc.mm: Ditto.
340         * bridge/jni/jni_runtime.cpp: Ditto.
341         * bridge/jni/jni_runtime.h: Ditto.
342         * bridge/jni/jni_utility.cpp: Ditto.
343         * bridge/jni/jni_utility.h: Ditto.
344
345         * bridge/runtime.cpp: Removed unused #include statements.
346         * bridge/runtime.h:
347         (KJS::Bindings::Instance::BindingLanguage): Added #if ENABLE(MAC_JAVA_BRIDGE)
348         guard for JavaLanguage enum.  Also added #if PLATFORM(MAC) guard for
349         ObjectiveCLanguage enum to match corresponding code in runtime.cpp.
350
351         * config.h: Removed definition of HAVE_JNI.
352
353         * loader/FrameLoaderClient.h:
354         (WebCore::FrameLoaderClient::javaApplet): Added #if ENABLE(MAC_JAVA_BRIDGE) guard.
355         * page/Frame.cpp:
356         (WebCore::Frame::Frame): Ditto.
357         * page/Frame.h:
358         (WebCore::Frame::initJavaJSBindings): Ditto.
359         * page/mac/FrameMac.mm:
360         (WebCore::Frame::createScriptInstanceForWidget): Ditto.
361         (WebCore::Frame::initJavaJSBindings): Ditto.
362
363 2008-03-13  Darin Adler  <darin@apple.com>
364
365         * html/PreloadScanner.h: Corrected license.
366         * html/PreloadScanner.cpp: Corrected license.
367
368 2008-03-13  Mark Mentovai  <mark@moxienet.com>
369
370         Reviewed by darin.  Landed by eseidel.
371
372         * platform/FloatConversion.h: Include a header to get CoreGraphics
373         types when using CoreGraphics types.
374
375 2008-03-13  Mark Mentovai  <mark@moxienet.com>
376
377         Reviewed by eseidel.  Landed by eseidel.
378
379         * WebCore.xcodeproj/project.pbxproj:
380         * css/CSSParser.cpp:
381         * css/makeprop.pl:
382         Move CSSPropertyNames.c to CSSPropertyNames.cpp
383
384 2008-03-13  Mark Mentovai  <mark@moxienet.com>
385
386         Reviewed by eseidel.  Landed by eseidel.
387
388         * platform/Arena.h: Use statement1;statement2 instead of
389         (statement1,statement2) in CLEAR_UNUSED.
390
391 2008-03-13  Tommi Komulainen  <tommi.komulainen@iki.fi>
392
393         Reviewed by Alp Toker.
394
395         http://bugs.webkit.org/show_bug.cgi?id=17821
396         [SOUP] POST requests are empty
397
398         Send the HTTP request body as well.
399
400         * platform/network/soup/ResourceHandleSoup.cpp:
401         (WebCore::ResourceHandle::start):
402
403 2008-03-13  Dan Bernstein  <mitz@apple.com>
404
405         Reviewed by Dave Hyatt.
406
407         - fix http://bugs.webkit.org/show_bug.cgi?id=17819
408           Border-collapse: collapse later cell wins on PC, earlier cell on Mac
409
410         Test: fast/table/border-collapsing/equal-precedence-resolution.html
411
412         * rendering/RenderTableCell.cpp:
413         (WebCore::RenderTableCell::collapsedLeftBorder): When calling
414         compareBorders() with borders that may have the same precedence, made
415         sure to pass the border belonging to the earlier (in document order)
416         element first, since compareBorders() prefers the first argument when
417         there is a tie.
418         (WebCore::RenderTableCell::collapsedRightBorder): Ditto.
419         (WebCore::RenderTableCell::collapsedTopBorder): Ditto.
420
421 2008-03-13  Adam Roben  <aroben@apple.com>
422
423         wx build fix and Windows leak fix after r31034
424
425         * platform/graphics/wx/ImageWx.cpp:
426         (WebCore::Image::loadPlatformResource): Use SharedBuffer::create.
427         * platform/win/SharedBufferWin.cpp:
428         (WebCore::SharedBuffer::createWithContentsOfFile): Ditto (we were
429         leaking the SharedBuffer here before).
430
431 2008-03-13  Antti Koivisto  <antti@apple.com>
432
433         Reviewed by Eric.
434
435         Correct a few issues spotted by Mike Belshe. 
436
437         * html/PreloadScanner.cpp:
438         (WebCore::PreloadScanner::tokenize):
439         * loader/loader.cpp:
440         (WebCore::Loader::cancelRequests):
441
442 2008-03-13  Rodney Dawes  <dobey@wayofthemonkey.com>
443
444         Fix GTK+ build for SharedBuffer changes.
445
446         * platform/graphics/gtk/ImageGtk.cpp:
447         (Image::loadPlatformResource):
448
449 2008-03-13  Steve Falkenburg  <sfalken@apple.com>
450
451         More PGO build fixes.
452
453         * WebCorePrefix.cpp:
454
455 2008-03-13  Antti Koivisto  <antti@apple.com>
456
457         Reviewed by Darin.
458         
459         Make page loads go fast.
460         
461         http://bugs.webkit.org/show_bug.cgi?id=17480
462
463         - Implement speculative preloading. When a script load blocks the main parser, use a side 
464           parser to pick up more resources.
465         - Implement per-host load queues, prioritize scripts and stylesheets over images.
466         
467         Depending on content and network latency this may speed things up quite a bit.
468
469         * WebCore.xcodeproj/project.pbxproj:
470         * dom/Document.cpp:
471         (WebCore::Document::implicitClose):
472         Clear the preloads after laoding completes.
473         
474         * html/HTMLLinkElement.cpp:
475         (WebCore::HTMLLinkElement::parseMappedAttribute):
476         (WebCore::HTMLLinkElement::tokenizeRelAttribute):
477         * html/HTMLLinkElement.h:
478         Make tokenizeRelAttribute() public static so it can be used from elsewhere.
479         Eliminate a pointless bitfield so I can get references.
480         
481         * html/HTMLTokenizer.cpp:
482         (WebCore::HTMLTokenizer::scriptHandler):
483         (WebCore::HTMLTokenizer::scriptExecution):
484         (WebCore::HTMLTokenizer::write):
485         * html/HTMLTokenizer.h:
486         Spin up the preload scanner whenever a script load blocks the parser. One scanner tracks the end of 
487         the document while temporary ones are created as needed to scan document.write() output.
488         
489         * html/PreloadScanner.cpp: Added.
490         (WebCore::PreloadScanner::PreloadScanner):
491         (WebCore::PreloadScanner::~PreloadScanner):
492         (WebCore::PreloadScanner::begin):
493         (WebCore::PreloadScanner::end):
494         (WebCore::PreloadScanner::reset):
495         (WebCore::PreloadScanner::write):
496         (WebCore::isWhitespace):
497         (WebCore::PreloadScanner::clearLastCharacters):
498         (WebCore::PreloadScanner::rememberCharacter):
499         (WebCore::PreloadScanner::lastCharactersMatch):
500         (WebCore::legalEntityFor):
501         (WebCore::PreloadScanner::consumeEntity):
502         (WebCore::PreloadScanner::tokenize):
503         (WebCore::PreloadScanner::processAttribute):
504         (WebCore::PreloadScanner::emitCharacter):
505         (WebCore::PreloadScanner::tokenizeCSS):
506         (WebCore::PreloadScanner::emitTag):
507         (WebCore::PreloadScanner::emitCSSRule):
508         * html/PreloadScanner.h: Added.
509         (WebCore::PreloadScanner::inProgress):
510         (WebCore::PreloadScanner::):
511         HTML5 tokenization plus some glue code. Fake CSS parsing thrown in just for fun.
512         
513         * loader/Cache.cpp:
514         (WebCore::Cache::pruneDeadResources):
515         Preloads have zero refcount, avoid kicking them out too early.
516         
517         * loader/CachedResource.cpp:
518         (WebCore::CachedResource::CachedResource):
519         (WebCore::CachedResource::ref):
520         * loader/CachedResource.h:
521         (WebCore::CachedResource::):
522         (WebCore::CachedResource::preloadResult):
523         (WebCore::CachedResource::setRequestedFromNetworkingLayer):
524         (WebCore::CachedResource::canDelete):
525         (WebCore::CachedResource::isPreloaded):
526         (WebCore::CachedResource::increasePreloadCount):
527         (WebCore::CachedResource::decreasePreloadCount):
528         Keep track which resources are preloads. Avoid deleting them. Track
529         at which point of the loading preloads get utilized to enable some interesting 
530         statistics.
531         
532         * loader/DocLoader.cpp:
533         (WebCore::DocLoader::~DocLoader):
534         (WebCore::DocLoader::checkForReload):
535         (WebCore::DocLoader::registerPreload):
536         (WebCore::DocLoader::clearPreloads):
537         (WebCore::DocLoader::printPreloadStats):
538         * loader/DocLoader.h:
539         Ensure we utilize preloaded resources during reloads.
540         Keep a list of all preloads in the document. Clear the preloads after
541         parsing is complete. Some debug statistics.
542         
543         * loader/DocumentLoader.cpp:
544         (WebCore::DocumentLoader::isLoadingInAPISense):
545         Avoid signaling that loading is complete too early. 
546         
547         * loader/loader.cpp:
548         (WebCore::Loader::Loader):
549         (WebCore::Loader::~Loader):
550         (WebCore::Loader::determinePriority):
551         (WebCore::Loader::load):
552         (WebCore::Loader::scheduleServePendingRequests):
553         (WebCore::Loader::requestTimerFired):
554         (WebCore::Loader::servePendingRequests):
555         (WebCore::Loader::cancelRequests):
556         (WebCore::Loader::Host::Host):
557         (WebCore::Loader::Host::~Host):
558         (WebCore::Loader::Host::addRequest):
559         (WebCore::Loader::Host::hasRequests):
560         (WebCore::Loader::Host::servePendingRequests):
561         (WebCore::Loader::Host::didFinishLoading):
562         (WebCore::Loader::Host::didFail):
563         (WebCore::Loader::Host::didReceiveResponse):
564         (WebCore::Loader::Host::didReceiveData):
565         (WebCore::Loader::Host::cancelPendingRequests):
566         (WebCore::Loader::Host::cancelRequests):
567         * loader/loader.h:
568         (WebCore::Loader::):
569         Distribute load requests to per-host priority queues. Limit the number of loads issued to the 
570         networking layer so we have better changes of getting important requests through first.
571         Prioritize scripts > stylesheets > images.
572
573 2008-03-13  David Hyatt  <hyatt@apple.com>
574
575         This patch makes full page zoom work pretty well. It fixes repainting so that it works when transforms
576         are set on the RenderView. It also implements the "smart layout" behavior that other browsers support when
577         zooming. The page will still try to constrain to the viewport size even when zoomed.
578
579         Reviewed by john
580
581         * dom/Document.cpp:
582         (WebCore::Document::recalcStyle):
583         Make sure to test for transform changes even when there is no zoom.  This fixes repainting issues
584         caused by jumping from a zoomed state back to the standard size.
585
586         * page/FrameView.cpp:
587         (WebCore::FrameView::adjustViewSize):
588         Adjust for the zoom factor (the render tree is in unzoomed coordinates, but the scrollbars of the view
589         need to handle zoomed coordinates).
590
591         * rendering/RenderBox.cpp:
592         (WebCore::RenderBox::calcHeight):
593         Fix the body-sizing-to-the-view-height quirk so that it takes the zoom factor into account when
594         stretching to fill the viewport.
595
596         * rendering/RenderLayer.cpp:
597         (WebCore::RenderLayer::updateLayerPositions):
598         (WebCore::RenderLayer::setHasVisibleContent):
599         Remove the FIXMEs now that absoluteClippedOverflowRect works with transforms on the RenderView.
600
601         * rendering/RenderView.cpp:
602         (WebCore::RenderView::calcHeight):
603         (WebCore::RenderView::calcWidth):
604         Make sure the calculated width/height take the zoom factor into account in order to get the "smart layout"
605         behavior.
606
607         (WebCore::RenderView::layout):
608         When deciding whether children have to get a relayout, we need to check the zoomed width/height and not just
609         the viewport size.
610
611         (WebCore::RenderView::computeAbsoluteRepaintRect):
612         Patched to take into account transforms set on the RenderView.
613
614         (WebCore::RenderView::docHeight):
615         (WebCore::RenderView::docWidth):
616         Patched to just always use m_width and m_height initially, since those have already been adjusted for
617         the zoom factor.
618
619         (WebCore::RenderView::zoomedHeight):
620         (WebCore::RenderView::zoomedWidth):
621         * rendering/RenderView.h:
622         New helper methods for obtaining the adjusted width/height of the viewport taking into account the
623         zoom factor.
624
625 2008-03-13  Anders Carlsson  <andersca@apple.com>
626
627         Build fix.
628
629         * WebCore.base.exp:
630
631 2008-03-13  Anders Carlsson  <andersca@apple.com>
632
633         Reviewed by Adam.
634
635         Get rid of actualRequest, it is not used anymore. Also, get rid of 
636         initialRequest and replace all uses with originalRequest because those are
637         the same thing.
638         
639         * loader/DocumentLoader.cpp:
640         * loader/DocumentLoader.h:
641         * loader/FrameLoader.cpp:
642         (WebCore::FrameLoader::initialRequest):
643         (WebCore::FrameLoader::originalRequestURL):
644
645 2008-03-13  Brady Eidson  <beidson@apple.com>
646
647         Reviewed by Anders
648
649         Convert SharedBuffer to start with a refCount of 1
650
651         * loader/ImageDocument.cpp:
652         (WebCore::ImageTokenizer::finish):
653
654         * loader/ResourceLoader.cpp:
655         (WebCore::ResourceLoader::addData):
656         (WebCore::ResourceLoader::willStopBufferingData):
657
658         * loader/icon/IconDatabase.cpp:
659         (WebCore::IconDatabase::defaultIcon):
660         (WebCore::IconDatabase::getImageDataForIconURLFromSQLDatabase):
661
662         * loader/loader.cpp:
663         (WebCore::Loader::didReceiveData):
664
665         * platform/SharedBuffer.h:
666         (WebCore::SharedBuffer::create): Make all constructors private, add ::create() calls
667         * platform/SharedBuffer.cpp:
668         (WebCore::SharedBuffer::SharedBuffer): Revert to default RefCounted constructor to start with a ref count of 1
669         (WebCore::SharedBuffer::copy):
670         * platform/mac/SharedBufferMac.mm:
671         (WebCore::SharedBuffer::wrapNSData):
672         (WebCore::SharedBuffer::SharedBuffer): Revert to default RefCounted constructor to start with a ref count of 1
673
674 2008-03-13  Steve Falkenburg  <sfalken@apple.com>
675
676         PGO build fixes.
677         
678         Disable PGO for normal release builds.
679         Added work-in-progress Release_PGOInstrument/Release_PGOOptimize targets.
680
681         * WebCore.vcproj/WebCore.vcproj:
682
683 2008-03-13  Anders Carlsson  <andersca@apple.com>
684
685         Reviewed by Darin.
686
687         Make a bunch of DocumentLoader setters/getters inline.
688         
689         * loader/DocumentLoader.cpp:
690         * loader/DocumentLoader.h:
691         (WebCore::DocumentLoader::isStopping):
692         (WebCore::DocumentLoader::setCommitted):
693         (WebCore::DocumentLoader::isCommitted):
694         (WebCore::DocumentLoader::isLoading):
695         (WebCore::DocumentLoader::setLoading):
696         (WebCore::DocumentLoader::response):
697         (WebCore::DocumentLoader::mainDocumentError):
698         (WebCore::DocumentLoader::setResponse):
699         (WebCore::DocumentLoader::isClientRedirect):
700         (WebCore::DocumentLoader::setIsClientRedirect):
701         (WebCore::DocumentLoader::overrideEncoding):
702         (WebCore::DocumentLoader::responses):
703         (WebCore::DocumentLoader::triggeringAction):
704         (WebCore::DocumentLoader::setTriggeringAction):
705         (WebCore::DocumentLoader::setOverrideEncoding):
706         (WebCore::DocumentLoader::setLastCheckedRequest):
707         (WebCore::DocumentLoader::lastCheckedRequest):
708         (WebCore::DocumentLoader::title):
709         (WebCore::DocumentLoader::setLoadingFromCachedPage):
710         (WebCore::DocumentLoader::isLoadingFromCachedPage):
711
712 2008-03-13  Rodney Dawes  <dobey@wayofthemonkey.com>
713
714         Fix builds without SVG enabled.
715
716         * page/Frame.cpp:
717         (Frame::shouldApplyTextZoom):
718         (Frame::shouldApplyPageZoom):
719
720 2008-03-13  Simon Hausmann  <hausmann@webkit.org>
721
722         Fix the Qt build.
723
724         * bridge/qt/qt_instance.cpp:
725         (KJS::Bindings::QtInstance::getQtInstance):
726         (KJS::Bindings::QtInstance::getRuntimeObject):
727         * bridge/qt/qt_instance.h:
728         (KJS::Bindings::QtInstance::create):
729         * bridge/qt/qt_runtime.cpp:
730         (KJS::Bindings::convertQVariantToValue):
731         (KJS::Bindings::QtConnectionObject::execute):
732         * page/qt/FrameQt.cpp:
733         (WebCore::Frame::createScriptInstanceForWidget):
734
735 2008-03-12  Sam Weinig  <sam@webkit.org>
736
737         Reviewed by Darin Adler.
738
739         Fix <rdar://problem/5784773>
740         Crash loading QT movies @ apple.com/ipodtouch/features.html with a PAC file (WebKitThreadingException)
741
742         Make bridged RuntimeObjects get collected on the main thread only. This is necessary
743         because clients of the bridged objects are unlikely to prepared for a collection on 
744         non-main thread, which can happen with a PAC file.
745
746         * bridge/runtime_object.cpp:
747         (RuntimeObjectImp::RuntimeObjectImp):
748
749 2008-03-12  Adam Roben  <aroben@apple.com>
750
751         Fix Bug 17815: Inspector's DOM tree should descend into subframes
752
753         <http://bugs.webkit.org/show_bug.cgi?id=17815>
754
755         Reviewed by Tim.
756
757         * page/inspector/DocumentPanel.js:
758         (WebInspector.DocumentPanel.revealNode): Changed to provide
759         _isAncestorIncludingParentFramesWithinPanel and
760         _parentNodeOrFrameElementWithinPanel for the isAncestor and getParent
761         parameters to findTreeElement so that parent frames will be searched.
762         (WebInspector.DocumentPanel.updateBreadcrumb):
763           - Changed while loop to for loop
764           - Use _parentNodeOrFrameElementWithinPanel instead of
765             Node.parentNode to move to the next node
766           - The loop now ends when we reach the DocumentPanel's document node
767           - Traversal past other Document nodes is now allowed
768           - We add the "start" class to the final crumb after the loop exits
769         (WebInspector.DocumentPanel._getDocumentForNode): Added. Simple helper
770         that returns the node itself if the node is a Document node, or the
771         node's ownerDocument otherwise.
772         (WebInspector.DocumentPanel._parentNodeOrFrameElementWithinPanel):
773         Added. Returns the node's parent node or, in the case of a Document
774         node, the node's window's owning frame element, but will not return a
775         node that is in a parent frame of the DocumentPanel's Document.
776         (WebInspector.DocumentPanel._isAncestorIncludingParentFramesWithinPanel):
777         Added. Returns true if a is an ancestor of b if a is an ancestor of a
778         frame element whose subframe(s) contain b.
779         (WebInspector.DOMNodeTreeElement): We now consider ourselves to have
780         children if we have a contentDocument.
781         (WebInspector.DOMNodeTreeElement.onpopulate): Moved the appendChild
782         loop into a function so that we can add both children of our
783         contentDocument and children of our node to the tree.
784         (WebInspector.DOMNodeTreeElement.ondblclick): Changed so that we get
785         the rootDOMNode by traversing the tree outline hierarchy instead of
786         the DOM hierarchy so that we can easily jump up to a parent frame.
787
788 2008-03-12  Adam Roben  <aroben@apple.com>
789
790         Update the styles/metrics panes and breadcrumb after editing DOM
791         attributes
792
793         Reviewed by Tim.
794
795         * page/inspector/DocumentPanel.js:
796         (WebInspector.DocumentPanel.set focusedDOMNode): Moved code to update
797         the parts of the DocumentPanel other than the DOM tree into a new
798         function, _focusedNodeChanged.
799         (WebInspector.DocumentPanel._focusedNodeChanged): Added. The
800         forceUpdate parameter specifies whether the update should occur even
801         if the focused node hasn't changed since the last update.
802         (WebInspector.DocumentPanel.updateBreadcrumb): Added a forceUpdate
803         parameter. If forceUpdate is true, we always rebuild the breadcrumbs.
804         (WebInspector.DocumentPanel.updateStyles): Added a forceUpdate
805         parameter. If forceUpdate is true, we always rebuild the styles pane.
806         (WebInspector.DOMNodeTreeElement._attributeEditingCommitted): Added a
807         call to DocumentPanel._focusedNodeChanged. We have to force the update
808         because we haven't changed the focused node (the attributes of the
809         node have changed).
810         * page/inspector/StylesSidebarPane.js:
811         (WebInspector.StylesSidebarPane.update): Added a forceUpdate
812         parameter. If forceUpdate is true we always rebuild the styles.
813
814 2008-03-12  Mark Rowe  <mrowe@apple.com>
815
816         Further Gtk and Qt build fixes.
817
818         * bridge/runtime.cpp:
819         (KJS::Bindings::Instance::createRuntimeObject): Adapt Qt-only code for change to PassRefPtr.
820         * page/gtk/FrameGtk.cpp: Add missing include.
821
822 2008-03-12  Mark Rowe  <mrowe@apple.com>
823
824         Fix Gtk and Qt builds.
825
826         * page/gtk/FrameGtk.cpp:
827         * page/qt/FrameQt.cpp:
828
829 2008-03-12  Mark Rowe  <mrowe@apple.com>
830
831         Mac build fix.
832
833         * WebCore.base.exp:  Remove symbol.
834
835 2008-03-12  Steve Falkenburg  <sfalken@apple.com>
836
837         Build fix.
838
839         * page/win/FrameWin.cpp:
840
841 2008-03-12  Steve Falkenburg  <sfalken@apple.com>
842
843         Build fix.
844
845         * plugins/win/PluginViewWin.cpp:
846         (WebCore::PluginView::bindingInstance):
847
848 2008-03-12  Darin Adler  <darin@apple.com>
849
850         Reviewed by Anders.
851
852         - http://bugs.webkit.org/show_bug.cgi?id=17640
853           eliminate WebCoreFrameBridge
854
855         * WebCore.base.exp: Added more exports, needed by code moved from WebCoreFrameBridge
856         to WebFrame in WebKit.
857         * WebCore.xcodeproj/project.pbxproj: Added more headers, same reason. Also deleted
858         WebCoreFrameBridge.h and WebCoreFrameBridge.mm.
859
860         * page/Frame.cpp:
861         (WebCore::Frame::Frame): Added call to initJavaJSBindings(), formerly handled by
862         the WebCoreFrameBridge.
863         * page/Frame.h: Added initJavaJSBindings function.
864
865         * page/mac/FrameMac.mm:
866         (WebCore::updateRenderingForBindings): Moved here from WebCoreFrameBridge.
867         (WebCore::Frame::initJavaJSBindings): Ditto; code was in the init function.
868
869         * page/mac/WebCoreFrameBridge.h: Removed.
870         * page/mac/WebCoreFrameBridge.mm: Removed.
871
872 2008-03-12  Sam Weinig  <sam@webkit.org>
873
874         Reviewed by Anders Carlsson.
875
876         Don't go through the Document just to get the frame Element.
877
878         * page/DOMWindow.cpp:
879         (WebCore::DOMWindow::frameElement):
880
881 2008-03-12  Anders Carlsson  <andersca@apple.com>
882
883         Reviewed by Geoff and Sam.
884
885         More Instance cleanup:
886         
887         * Make Instance inherit from RefCounted instead of doing its own refcounting.        
888         * Make all Instance subclasses private, add static create methods.         
889         * Have Instance start out with a refcount of 1.
890         * Get rid of Instance::createBindingForLanguageInstance and call the individual 
891           instance constructor methods instead.
892         * Fix many methods to take and return PassRefPtr<Instance> to ensure that the
893           refcounting is done correctly.
894          
895         * bridge/c/c_instance.h:
896         (KJS::Bindings::CInstance::create):
897         * bridge/c/c_utility.cpp:
898         (KJS::Bindings::convertNPVariantToValue):
899         * bridge/jni/jni_instance.cpp:
900         (JavaInstance::invokeMethod):
901         * bridge/jni/jni_instance.h:
902         (KJS::Bindings::JavaInstance::create):
903         * bridge/jni/jni_jsobject.cpp:
904         (JavaJSObject::convertJObjectToValue):
905         * bridge/jni/jni_runtime.cpp:
906         (JavaField::valueFromInstance):
907         (JavaArray::valueAt):
908         * bridge/objc/objc_instance.h:
909         (KJS::Bindings::ObjcInstance::create):
910         * bridge/objc/objc_utility.mm:
911         (KJS::Bindings::convertObjcValueToValue):
912         * bridge/qt/qt_instance.cpp:
913         (KJS::Bindings::QtRuntimeObjectImp::QtRuntimeObjectImp):
914         (KJS::Bindings::QtInstance::getQtInstance):
915         (KJS::Bindings::QtInstance::getRuntimeObject):
916         * bridge/qt/qt_instance.h:
917         * bridge/runtime.cpp:
918         (KJS::Bindings::Instance::Instance):
919         (KJS::Bindings::Instance::createRuntimeObject):
920         * bridge/runtime.h:
921         * bridge/runtime_object.cpp:
922         (RuntimeObjectImp::RuntimeObjectImp):
923         * bridge/runtime_object.h:
924         * page/Frame.h:
925         * page/mac/FrameMac.mm:
926         (WebCore::Frame::createScriptInstanceForWidget):
927         * page/win/FrameWin.cpp:
928         (WebCore::Frame::createScriptInstanceForWidget):
929         * plugins/PluginView.h:
930         * plugins/win/PluginViewWin.cpp:
931         (WebCore::PluginView::bindingInstance):
932
933 2008-03-12  Dan Bernstein  <mitz@apple.com>
934
935         Suggested by Darin Adler. Reviewed by Dave Hyatt.
936
937         - speed up BidiIterator::direction()
938
939         * rendering/bidi.cpp:
940         (WebCore::BidiIterator::current): Made inline and corrected the
941         out-of-bounds condition to work with 0-length text and offsets beyond
942         the end of the text.
943         (WebCore::BidiIterator::direction): Changed to call current() and not
944         call the virtual method isListMarker() most of the time.
945         (WebCore::addMidpoint): Removed unnecessary null-check of smidpoints.
946         (WebCore::appendRunsForObject): Ditto.
947
948 2008-03-12  Adam Roben  <aroben@apple.com>
949
950         Make URLs not be underlined while editing them in the DOM view
951
952         Reviewed by Tim.
953
954         * page/inspector/inspector.css:
955
956 2008-03-12  Adam Roben  <aroben@apple.com>
957
958         Part of Bug 17224: DOM nodes/attributes should be editable
959
960         <http://bugs.webkit.org/show_bug.cgi?id=17224>
961         <rdar://problem/5732825>
962
963         We now start editing if the user single-clicks on an attribute,
964         attribute value, or text node while the parent element is selected.
965         Previously, we started editing on double-click regardless of the
966         selection state of the element.
967
968         URLs in the DOM tree are now followed on Alt/Option-click, rather than
969         on just click.
970
971         Reviewed by Tim.
972
973         * English.lproj/InspectorLocalizedStrings.js: Added four new localized
974         strings.
975         * page/inspector/DocumentPanel.js:
976         (WebInspector.DOMNodeTreeElement.onattach): Call new
977         _makeURLSActivateOnModifiedClick.
978         (WebInspector.DOMNodeTreeElement._makeURLsActivateOnModifiedClick):
979         Added. Changes the tooltip of each link in this element to indicate
980         that Alt/Option-click will follow the URL, and sets the
981         followOnAltClick property on each link.
982         (WebInspector.DOMNodeTreeElement.onselect): Mark that we're being
983         selected.
984         (WebInspector.DOMNodeTreeElement.onmousedown): If we're not currently
985         being selected, start editing.
986         (WebInspector.DOMNodeTreeElement.ondblclick): We no longer start
987         editing here. We block re-rooting of the tree if we're currently
988         editing.
989         (WebInspector.DOMNodeTreeElement._startEditing):
990           - Don't do anything if we're not focused
991           - Pass the event down to _startEditingAttribute.
992         (WebInspector.DOMNodeTreeElement._startEditingAttribute): Don't do
993         anything if the event target is a URL and the Alt/Option key is
994         pressed -- in this case we want to follow the link.
995         (WebInspector.DOMNodeTreeElement._updateTitle): Call
996         _makeURLsActivateOnClick again since the anchor elements have all been
997         recreated.
998         * page/inspector/inspector.js:
999         (WebInspector.documentClick): If the anchor as a followOnAltClick
1000         property and the Alt/Option key is not pressed, do nothing.
1001
1002 2008-03-12  Ada Chan  <adachan@apple.com>
1003
1004         Fixed the initial value of zoom factor.
1005
1006         Reviewed by Adam.
1007
1008         * page/Frame.cpp:
1009         (WebCore::FramePrivate::FramePrivate):
1010
1011 2008-03-12  David Hyatt  <hyatt@apple.com>
1012
1013         Make full page zoom vaguely work.  This patch uses the CSS transform system to turn on full page zoom at the
1014         document level.  There are many many bugs that I'm going to file to track all the issues (most of the issues
1015         are just bugs with transforms themselves).
1016
1017         Reviewed by Adam Roben
1018
1019         * css/CSSStyleSelector.cpp:
1020         (WebCore::CSSStyleSelector::applyProperty):
1021         (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
1022         * dom/Document.cpp:
1023         (WebCore::Document::recalcStyle):
1024         * page/Frame.cpp:
1025         (WebCore::Frame::shouldApplyTextZoom):
1026         (WebCore::Frame::shouldApplyPageZoom):
1027         * page/Frame.h:
1028         * rendering/RenderLayer.cpp:
1029         (WebCore::RenderLayer::updateLayerPositions):
1030         (WebCore::RenderLayer::setHasVisibleContent):
1031         (WebCore::RenderLayer::paintLayer):
1032         (WebCore::RenderLayer::hitTestLayer):
1033         * rendering/RenderLayer.h:
1034
1035 2008-03-12  David Hyatt  <hyatt@apple.com>
1036
1037         Make the zoom factor a float and not a percent.
1038
1039         Reviewed by antti
1040
1041         * WebCore.base.exp:
1042         * css/CSSStyleSelector.cpp:
1043         (WebCore::CSSStyleSelector::applyProperty):
1044         (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
1045         * page/Frame.cpp:
1046         (WebCore::Frame::zoomFactor):
1047         (WebCore::Frame::setZoomFactor):
1048         * page/Frame.h:
1049         * page/FramePrivate.h:
1050         * svg/SVGSVGElement.cpp:
1051         (WebCore::SVGSVGElement::currentScale):
1052         (WebCore::SVGSVGElement::setCurrentScale):
1053
1054 2008-03-12  David Hyatt  <hyatt@apple.com>
1055
1056         Eliminate setTextMultiplier from the bridge.  Make Webkit just call setZoomFactor on the frame directly.
1057
1058         Reviewed by Tim H.
1059
1060         * WebCore.base.exp:
1061         * page/mac/WebCoreFrameBridge.h:
1062         * page/mac/WebCoreFrameBridge.mm:
1063
1064 2008-03-12  Dan Bernstein  <mitz@apple.com>
1065
1066         Reviewed by Darin Adler and Sam Weinig.
1067
1068         - <rdar://problem/4433248> use CoreText API instead of SPI on Leopard
1069
1070         Use CTFontCopyGraphicsFont and CTFontGetPlatformFont on Leopard instead
1071         of wkGetCGFontFromNSFont and wkGetNSFontATSUFontId, relying on NSFont
1072         and CTFontRef being toll-free bridged.
1073
1074         * WebCore.Tiger.exp:
1075         * WebCore.base.exp:
1076         * platform/graphics/mac/FontMac.mm:
1077         (WebCore::Font::drawGlyphs): Changed to use the cgFont() accessor.
1078         * platform/graphics/mac/FontPlatformData.h:
1079         Made m_cgFont a RetainPtr on Leopard.
1080         (WebCore::toCTFontRef): Added a function that encapsulates the
1081         toll-free bridging.
1082         (WebCore::FontPlatformData::FontPlatformData):
1083         (WebCore::FontPlatformData::cgFont): Added this accessor method.
1084         * platform/graphics/mac/FontPlatformDataMac.mm:
1085         (WebCore::FontPlatformData::FontPlatformData): Changed to use
1086         CoreText API on Leopard.
1087         (WebCore::FontPlatformData::setFont): Ditto.
1088         * platform/graphics/mac/SimpleFontDataMac.mm:
1089         (WebCore::initFontData):
1090         (WebCore::pathFromFont):
1091         (WebCore::SimpleFontData::platformInit):
1092         (WebCore::SimpleFontData::platformWidthForGlyph):
1093         * platform/mac/WebCoreSystemInterface.mm:
1094
1095 2008-03-12  David Harrison  <harrison@apple.com>
1096
1097         Reviewed by Darin.
1098
1099         <rdar://problem/5607382> CrashTracer: [REGRESSION] 2290 crashes in Safari at com.apple.WebCore: -[WebCoreAXObject isWebArea] + 8
1100
1101         The problem was that we lost track of the AX cache for a subframe when Frame::disconnectOwnerElement() was
1102         called, so we were unable to locate the AXObjects to de-register from AppKit's accessibility registry.
1103         Also saw that cache clearing was missing from Document::detach(), and fixed that.
1104         
1105         Also added a debug-only check that AXObjectCache::remove() not finding the AXObject is expected.
1106         
1107         Lastly, RenderWidget::destroy() now skips trying to remove the AXObject if accessibility has never been enabled.
1108        
1109         * dom/Document.cpp:
1110         (WebCore::Document::attach):
1111         Assert that there is no AX cache (since there is no renderer).
1112         
1113         (WebCore::Document::detach):
1114         Destroy the AX cache installed on this document.
1115         
1116         (WebCore::Document::clearAXObjectCache):
1117         New. Destroy the AX cache associated with this document.
1118         
1119         (WebCore::Document::axObjectCache):
1120         Added some comments.
1121         
1122         * dom/Document.h:
1123         Declare clearAXObjectCache().
1124         
1125         * page/Frame.cpp:
1126         (WebCore::Frame::disconnectOwnerElement):
1127         Destroy the AX cache associated with this frame's document.
1128         
1129         * page/mac/AXObjectCacheMac.mm:
1130         (WebCore::AXObjectCache::remove):        
1131         * page/mac/WebCoreAXObject.mm:
1132         (-[WebCoreAXObject initWithRenderer:]):
1133         (-[WebCoreAXObject detach]):
1134         * rendering/RenderObject.cpp:
1135         (WebCore::RenderObject::RenderObject):
1136         (WebCore::RenderObject::~RenderObject):
1137         * rendering/RenderObject.h:
1138         (WebCore::RenderObject::setHasAXObject):
1139         (WebCore::RenderObject::hasAXObject):
1140         Add debug-only check that AXObjectCache::remove() not finding the AXObject is expected.
1141         
1142         * rendering/RenderWidget.cpp:
1143         (WebCore::RenderWidget::destroy):
1144         Skip call to remove the AXObject if accessibility has never been enabled. A simple speed optimization in the
1145         very common case that the accessibility APIs are not being used. Same as in RenderObject::destroy().
1146
1147 2008-03-12  Xan Lopez  <xan@gnome.org>
1148
1149         Reviewed by Alp Toker.
1150
1151         http://bugs.webkit.org/show_bug.cgi?id=15229
1152
1153         Add Pango font backend.
1154
1155         Original patch by Sven Herzberg <sven@imendio.com>
1156
1157         * GNUmakefile.am:
1158         * platform/graphics/gtk/FontCacheGtk.cpp:
1159         (WebCore::FontCache::fontExists):
1160         * platform/graphics/gtk/FontCustomPlatformDataPango.cpp: Added.
1161         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
1162         (WebCore::FontCustomPlatformData::fontPlatformData):
1163         (WebCore::releaseData):
1164         (WebCore::createFontCustomPlatformData):
1165         * platform/graphics/gtk/FontPlatformData.h:
1166         (WebCore::FontPlatformData::FontPlatformData):
1167         (WebCore::FontPlatformData::hash):
1168         * platform/graphics/gtk/FontPlatformDataPango.cpp: Added.
1169         (WebCore::FontPlatformData::FontPlatformData):
1170         (WebCore::FontPlatformData::init):
1171         (WebCore::FontPlatformData::~FontPlatformData):
1172         (WebCore::FontPlatformData::isFixedPitch):
1173         (WebCore::FontPlatformData::setFont):
1174         (WebCore::FontPlatformData::operator==):
1175         * platform/graphics/gtk/GlyphPageTreeNodePango.cpp: Added.
1176         (WebCore::pango_font_get_glyph):
1177         (WebCore::GlyphPage::fill):
1178         * platform/graphics/gtk/SimpleFontDataPango.cpp: Added.
1179         (WebCore::SimpleFontData::platformInit):
1180         (WebCore::SimpleFontData::platformDestroy):
1181         (WebCore::SimpleFontData::smallCapsFontData):
1182         (WebCore::SimpleFontData::containsCharacters):
1183         (WebCore::SimpleFontData::determinePitch):
1184         (WebCore::SimpleFontData::platformWidthForGlyph):
1185         (WebCore::SimpleFontData::setFont):
1186
1187 2008-03-12  Justin Garcia  <justin.garcia@apple.com>
1188
1189         Reviewed by Oliver.
1190         
1191         <rdar://problem/5770834> Crash at InsertTextCommand::prepareForTextInsertion() doing RemoveFormat in a certain list
1192         
1193         Fixes some (but not all) of the instances of:
1194         <rdar://problem/5659795> CrashTracer: [REGRESSION] 187 crashes in Safari at com.apple.WebCore: WebCore::InsertTextCommand::prepareForTextInsertion + 241
1195         <rdar://problem/5779631> CrashTracer: [USER] 25 crashes in Mail at WebCore::InsertTextCommand::prepareForTextInsertion
1196
1197         * editing/InsertLineBreakCommand.cpp:
1198         (WebCore::InsertLineBreakCommand::doApply): applyStyle may have destroyed content that held
1199         the old endingSelection(), so we must recompute it.  Added a FIXME.  Added a few comments.
1200         * editing/RemoveFormatCommand.cpp:
1201         (WebCore::RemoveFormatCommand::doApply): Added a FIXME.
1202
1203 2008-03-11  Alexey Proskuryakov  <ap@webkit.org>
1204
1205         Reviewed by Darin.
1206
1207         <rdar://problem/5640615> REGRESSION (Safari 2-3): Changing subframe encoding rules broke
1208         some sites.
1209
1210         Other browsers' behavior keeps changing; let's implement what Firefox and Opera do now:
1211         if the frame and subframe belong to the same site, then the encoding is inherited from parent
1212         frame to subframe. Otherwise, it is not.
1213
1214         Always inheriting the encoding would cause a security problem.
1215
1216         Tests: http/tests/misc/frame-default-enc-different-domain.html
1217                http/tests/misc/frame-default-enc-same-domain.html
1218                fast/encoding/frame-default-enc.html
1219
1220         * loader/FrameLoader.cpp:
1221         (WebCore::FrameLoader::write): Also removed a check for m_frame->document() being non-null -
1222         this function also has code that uses it without checking, so it must be safe.
1223
1224 2008-03-12  Mark Rowe  <mrowe@apple.com>
1225
1226         Gtk build fix.
1227
1228         * page/Frame.h: Forward-declare FramePrivate.
1229
1230 2008-03-11  Steve Falkenburg  <sfalken@apple.com>
1231
1232         Disable LTCG/PGO for all of WebCore for now.
1233         We'll re-enable this as part of follow-on PGO work.
1234         
1235         Reviewed by Oliver.
1236
1237         * WebCore.vcproj/WebCore.vcproj:
1238
1239 2008-03-11  Darin Adler  <darin@apple.com>
1240
1241         Reviewed by Sam.
1242
1243         - remove all bridge-related things from WebCore except the bridge itself
1244
1245         * WebCore.base.exp: Removed the bridge and setBridge functions.
1246
1247         * loader/FrameLoader.cpp:
1248         (WebCore::FrameLoader::detachFromParent): Removed call to the bridge's
1249         close method.
1250
1251         * page/Frame.cpp:
1252         (WebCore::Frame::~Frame): Removed call to setBridge(0).
1253         (WebCore::FramePrivate::FramePrivate): Removed initialization of m_bridge.
1254         * page/Frame.h: Removed setBridge and bridge functions.
1255         * page/FramePrivate.h: Removed m_bridge pointer.
1256         * page/mac/FrameMac.mm: Removed setBridge and bridge functions.
1257
1258         * page/mac/WebCoreFrameBridge.h: Added setWebCoreFrame: method.
1259         Removed bridgeForDOMDocument: and clearFrame methods.
1260         * page/mac/WebCoreFrameBridge.mm: Ditto.
1261         (-[WebCoreFrameBridge close]): Changed to set m_frame to 0 directly.
1262         (-[WebCoreFrameBridge setWebCoreFrame:]): Added.
1263
1264 2008-03-11  Darin Adler  <darin@apple.com>
1265
1266         - restored some code I removed in the Range change; this code can't go
1267           until the rest of the Range fix is in
1268
1269         * dom/Range.cpp:
1270         (WebCore::Range::commonAncestorContainer): Added back the check for 0
1271         that I removed erroneously in the Range patch.
1272         (WebCore::Range::processContents): Left in assertions I used to debug
1273         this.
1274
1275 2008-03-11  Darin Adler  <darin@apple.com>
1276
1277         - fix Release build
1278
1279         * platform/mac/ScrollViewMac.mm:
1280         (WebCore::ScrollView::setContentsPos): Don't use NSMakePoint.
1281
1282 2008-03-11  Darin Adler  <darin@apple.com>
1283
1284         Reviewed by Anders.
1285
1286         - simplify Mac code for ScrollView, since it's used only for FrameView
1287           and not in two different modes like it was historically
1288         - remove code depending on the bridge to get from an NSView to a WebCore::Frame
1289
1290         * bindings/objc/DOMHTML.mm:
1291         (-[DOMHTMLInputElement _rectOnScreen]): getDocumentView -> documentView.
1292
1293         * bridge/jni/jni_jsobject.cpp:
1294         (createRootObject): Instead of using WebCoreViewFactory to find the frame given
1295         and NSView, use the WebCoreFrameView interface to do it.
1296
1297         * editing/mac/EditorMac.mm:
1298         (WebCore::Editor::paste): getDocumentView -> documentView.
1299         * editing/mac/SelectionControllerMac.mm:
1300         (WebCore::SelectionController::notifyAccessibilityForSelectionChange): Ditto.
1301
1302         * page/FrameView.h: Fixed comment.
1303
1304         * page/InspectorController.cpp:
1305         (WebCore::InspectorController::drawNodeHighlight): Removed uneeded typecasts
1306         to ScrollView* since FrameView is derived from ScrollView.
1307
1308         * page/mac/EventHandlerMac.mm:
1309         (WebCore::EventHandler::focusDocumentView): getDocumentView -> documentView.
1310         * page/mac/FrameMac.mm:
1311         (WebCore::Frame::imageFromRect): Ditto.
1312         * page/mac/WebCoreAXObject.mm:
1313         (-[WebCoreAXObject position]): Ditto.
1314         (-[WebCoreAXObject doAXTextMarkerForPosition:]): Ditto.
1315         (-[WebCoreAXObject rendererForView:]): Updated code that used to use
1316         WebCoreBridgeHolder to use WebCoreFrameView instead.
1317
1318         * page/mac/WebCoreFrameBridge.mm:
1319         (-[WebCoreFrameBridge computePageRectsWithPrintWidthScaleFactor:printHeight:]):
1320         getDocumentView -> documentView.
1321
1322         * page/mac/WebCoreFrameView.h: Removed the WebCoreScrollbarMode type; we just
1323         use WebCore::ScrollbarMode directly. Renamed the WebCoreFrameView protocol to
1324         WebCoreFrameScrollView, since it's a protocol for the scroll view, not the
1325         frame view itself. Replaced WebCoreBridgeHolder protocol with WebCoreFrameView
1326         protocol, which returns a WebCore::Frame directly rather than a bridge.
1327
1328         * page/mac/WebCoreViewFactory.h: Eliminated the bridgeForView method.
1329
1330         * platform/ScrollView.h: Moved the constructor and destructor out of the
1331         class-specific #if blocks. Renamed Mac-specific function that gets the
1332         NSView for from getDocumentView to documentView and a scrollView function
1333         that returns an appropriately classed NSScrollView.
1334
1335         * platform/graphics/MediaPlayer.h: Changed type of parentWidget to FrameView
1336         instead of Widget.
1337         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1338         (WebCore::MediaPlayerPrivate::createQTMovieView): Removed unnecessary cast.
1339
1340         * platform/mac/PopupMenuMac.mm:
1341         (WebCore::PopupMenu::show): getDocumentView -> documentView.
1342         * platform/mac/ScrollViewMac.mm:
1343         (WebCore::ScrollView::ScrollView): Added.
1344         (WebCore::ScrollView::~ScrollView): Added.
1345         (WebCore::ScrollView::scrollView): Added.
1346         (WebCore::ScrollView::visibleWidth): Removed unused non-NSScrollView case.
1347         (WebCore::ScrollView::visibleHeight): Ditto.
1348         (WebCore::ScrollView::visibleContentRect): Ditto.
1349         (WebCore::ScrollView::visibleContentRectConsideringExternalScrollers): Ditto.
1350         (WebCore::ScrollView::contentsWidth): Ditto.
1351         (WebCore::ScrollView::contentsHeight): Ditto.
1352         (WebCore::ScrollView::contentsX): Ditto.
1353         (WebCore::ScrollView::contentsY): Ditto.
1354         (WebCore::ScrollView::scrollOffset): Ditto.
1355         (WebCore::ScrollView::scrollRectIntoViewRecursively): Ditto.
1356         (WebCore::ScrollView::setContentsPos): Ditto.
1357         (WebCore::ScrollView::setVScrollbarMode): Ditto.
1358         (WebCore::ScrollView::setHScrollbarMode): Ditto.
1359         (WebCore::ScrollView::setScrollbarsMode): Ditto.
1360         (WebCore::ScrollView::vScrollbarMode): Ditto.
1361         (WebCore::ScrollView::hScrollbarMode): Ditto.
1362         (WebCore::ScrollView::suppressScrollbars): Ditto.
1363         (WebCore::ScrollView::addChild): Ditto.
1364         (WebCore::ScrollView::resizeContents): Ditto.
1365         (WebCore::ScrollView::updateContents): Ditto.
1366         (WebCore::ScrollView::contentsToWindow): Ditto.
1367         (WebCore::ScrollView::windowToContents): Ditto.
1368         (WebCore::ScrollView::setStaticBackground): Ditto.
1369         (WebCore::ScrollView::documentView): Renamed and removed unused case.
1370         (WebCore::ScrollView::scrollbarUnderMouse): Removed incorrect comment.
1371
1372         * platform/mac/WidgetMac.mm:
1373         (WebCore::Widget::getOuterView): Update for protocol name change.
1374
1375         * rendering/RenderThemeMac.mm:
1376         (WebCore::RenderThemeMac::paintCheckbox): getDocumentView -> documentView.
1377         (WebCore::RenderThemeMac::paintRadio): Ditto.
1378         (WebCore::RenderThemeMac::paintButton): Ditto.
1379         (WebCore::RenderThemeMac::paintMenuList): Ditto.
1380         (WebCore::RenderThemeMac::paintSliderThumb): Ditto.
1381         (WebCore::RenderThemeMac::paintSearchField): Ditto.
1382         (WebCore::RenderThemeMac::paintSearchFieldCancelButton): Ditto.
1383         (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration): Ditto.
1384         (WebCore::RenderThemeMac::paintSearchFieldResultsButton): Ditto.
1385
1386 2008-03-11  Brent Fulgham  <bfulgham@gmail.com>
1387
1388         Reviewed by Adam Roben.
1389
1390         Split CookieJarWin.cpp into CFNet and non-CFNet versions to
1391         reduce the massive amount of conditionalization in the file.
1392         (see http://bugs.webkit.org/show_bug.cgi?id=17788)
1393
1394         * WebCore.vcproj/WebCore.vcproj:
1395         * platform/network/win/CookieJarCFNetWin.cpp: Copied from WebCore/platform/network/win/CookieJarWin.cpp.
1396         (WebCore::setCookies):
1397         (WebCore::cookies):
1398         (WebCore::cookiesEnabled):
1399         * platform/network/win/CookieJarWin.cpp:
1400         (WebCore::setCookies):
1401         (WebCore::cookies):
1402         (WebCore::cookiesEnabled):
1403
1404 2008-03-11  Darin Adler  <darin@apple.com>
1405
1406         Reviewed by Sam.
1407
1408         - eliminate the remaining parts of WebCoreBridge used for calls to WebKit from WebCore
1409
1410         * page/ChromeClient.h: Added new client functions to replace calls up to WebKit
1411         that were formerly handled by the bridge.
1412
1413         * page/Frame.h: Removed unneeded declarations. Moved declarations of script-specific
1414         functions to a ScriptController section. Removed willPopupMenu.
1415
1416         * page/mac/ChromeMac.mm:
1417         (WebCore::Chrome::focusNSView): Changed to call firstResponder and makeFirstResponder
1418         via the client instead of the bridge.
1419
1420         * page/mac/EventHandlerMac.mm:
1421         (WebCore::EventHandler::passMouseDownEventToWidget): Changed to call firstResponder
1422         and makeFirstResponder via the chrome client instead of the bridge.
1423
1424         * page/mac/FrameMac.mm: Removed willPopupMenu.
1425
1426         * page/mac/WebCoreFrameBridge.h: Removed WebCoreFrameBridge protocol and
1427         SubclassResponsibility category. Also removed some unneeded imports.
1428
1429         * platform/mac/PopupMenuMac.mm:
1430         (WebCore::PopupMenu::show): Call willPopUpMenu on chrome client instead of frame.
1431
1432         * platform/mac/WidgetMac.mm:
1433         (WebCore::Widget::setIsSelected): Call functions directly on the view rather than
1434         calling via the bridge.
1435
1436 2008-03-11  Darin Adler  <darin@apple.com>
1437
1438         Reviewed by Mitz.
1439
1440         - make some Range improvements (preparation for Range support for DOM mutation)
1441
1442         Made constructors private, added create functions.
1443         Made refcount start at 1 rather than starting at 0 and being incremented.
1444         Made Range use two Position objects for the start/end container/offset pairs.
1445
1446         * WebCore.base.exp: Updated.
1447
1448         * dom/Document.cpp:
1449         (WebCore::Document::createRange): Changed to use Range::create.
1450         (WebCore::Document::removeMarkers): Updated for Range::first/pastLastNode name change.
1451
1452         * dom/Position.cpp:
1453         (WebCore::Position::formatForDebugger): Updated for member variable name change.
1454         (WebCore::Position::showTreeForThis): Ditto.
1455         (WebCore::startPosition): Changed to use Range::startPosition.
1456         (WebCore::endPosition): Changed to use Range::endPosition.
1457
1458         * dom/Position.h: Made the data members public and renamed them to container
1459         and offset. But since offset() is already a function, temporarily used posOffset
1460         for the data member. Later we'll get rid of offset(). Made more functions inline.
1461         Removed the constructor that takes a PositionIterator.
1462
1463         * dom/PositionIterator.cpp:
1464         (WebCore::PositionIterator::operator Position): Added. Replaces the constructor
1465         that used to be in Position.
1466         * dom/PositionIterator.h: Added conversion operator to produce a Position.
1467         Removed friend declaration for Position.
1468
1469         * dom/Range.cpp:
1470         (WebCore::Range::Range): Updated constructors for data member changes and made
1471         them use a refcount of 1.
1472         (WebCore::Range::create): Added.
1473         (WebCore::Range::startContainer): Updated to eliminate use of m_detached; detached
1474         is now indicated by m_start.container of 0. Also updated to use m_start instead
1475         of the old m_startContainer.
1476         (WebCore::Range::startOffset): Ditto.
1477         (WebCore::Range::endContainer): Ditto.
1478         (WebCore::Range::endOffset): Ditto.
1479         (WebCore::Range::commonAncestorContainer): Ditto.
1480         (WebCore::Range::collapsed): Ditto.
1481         (WebCore::Range::setStart): Ditto.
1482         (WebCore::Range::setEnd): Ditto.
1483         (WebCore::Range::collapse): Ditto.
1484         (WebCore::Range::isPointInRange): Ditto.
1485         (WebCore::Range::comparePoint): Ditto.
1486         (WebCore::Range::compareNode): Ditto.
1487         (WebCore::Range::compareBoundaryPoints): Ditto.
1488         (WebCore::Range::boundaryPointsValid): Ditto.
1489         (WebCore::Range::deleteContents): Ditto.
1490         (WebCore::Range::intersectsNode): Ditto.
1491         (WebCore::Range::processContents): Ditto.
1492         (WebCore::Range::extractContents): Ditto.
1493         (WebCore::Range::cloneContents): Ditto.
1494         (WebCore::Range::insertNode): Ditto.
1495         (WebCore::Range::toString): Ditto.
1496         (WebCore::Range::text): Ditto.
1497         (WebCore::Range::createContextualFragment): Ditto.
1498         (WebCore::Range::detach): Ditto.
1499         (WebCore::Range::checkNodeBA): Changed to use switch statements instead of
1500         multiple calls to the virtual nodeType() function.
1501         (WebCore::Range::cloneRange): Ditto.
1502         (WebCore::Range::setStartAfter): Ditto.
1503         (WebCore::Range::setEndBefore): Ditto.
1504         (WebCore::Range::setEndAfter): Ditto.
1505         (WebCore::Range::selectNode): Ditto.
1506         (WebCore::Range::selectNodeContents): Ditto.
1507         (WebCore::Range::surroundContents): Ditto.
1508         (WebCore::Range::setStartBefore): Ditto.
1509         (WebCore::Range::checkDeleteExtract): Ditto.
1510         (WebCore::Range::containedByReadOnly): Ditto.
1511         (WebCore::Range::firstNode): Ditto.
1512         (WebCore::Range::editingStartPosition): Ditto.
1513         (WebCore::Range::pastLastNode): Ditto.
1514         (WebCore::Range::addLineBoxRects): Ditto.
1515         (WebCore::Range::formatForDebugger): Ditto.
1516         (WebCore::operator==): Ditto.
1517         (WebCore::rangeOfContents): Ditto.
1518         (WebCore::Range::maxStartOffset): Ditto.
1519         (WebCore::Range::maxEndOffset): Ditto.
1520
1521         * dom/Range.h: Made constructors private. Added create functions.
1522         Added getters for startContainer/Offset and endContainer/Offset that
1523         return 0 instead of an exception for detached ranges that are inline
1524         and don't require an ExceptionCode out parameter. Changed the parameters
1525         to setStart and setEnd to PassRefPtr. Removed isDetached function.
1526         Made ActionType and processContents private. Made startPosition and
1527         endPosition inlines and have then return const&. Renamed startNode and
1528         pastEndNode to firstNode and pastLastNode to reduce the chance of
1529         confusion with startContainer/endContainer. Used Position for m_start
1530         and m_end instead of separate container and offset members. Changed
1531         maxStartOffset and maxEndOffset into int to match other offsets.
1532
1533         * editing/ApplyStyleCommand.cpp:
1534         (WebCore::ApplyStyleCommand::applyBlockStyle): Changed to use Range::create.
1535         (WebCore::ApplyStyleCommand::applyInlineStyle): Ditto.
1536         * editing/CompositeEditCommand.cpp:
1537         (WebCore::CompositeEditCommand::inputText): Ditto.
1538         (WebCore::CompositeEditCommand::moveParagraphs): Ditto.
1539         * editing/DeleteSelectionCommand.cpp:
1540         (WebCore::DeleteSelectionCommand::mergeParagraphs): Ditto.
1541         * editing/Editor.cpp:
1542         (WebCore::Editor::fontForSelection): Changed for pastLastNode name change.
1543         (WebCore::Editor::setComposition): Changed to use Range::create.
1544         (WebCore::paragraphAlignedRangeForRange): Ditto.
1545         (WebCore::markMisspellingsOrBadGrammar): Changed to get rid of check for
1546         isDetached and check for 0 from startContainer instead.
1547         (WebCore::Editor::compositionRange): Changed to use Range::create.
1548         * editing/EditorCommand.cpp:
1549         (WebCore::unionDOMRanges): Ditto.
1550         * editing/Selection.cpp:
1551         (WebCore::Selection::toRange): Ditto.
1552         * editing/TextIterator.cpp:
1553         (WebCore::TextIterator::TextIterator): Changed for firstNode and pastLastNode
1554         name change.
1555         (WebCore::TextIterator::range): Changed to use Range::create.
1556         (WebCore::SimplifiedBackwardsTextIterator::range): Ditto.
1557         (WebCore::TextIterator::subrange): Ditto.
1558         * editing/VisiblePosition.cpp:
1559         (WebCore::makeRange): Ditto.
1560         * editing/VisiblePosition.h: Added now-needed include.
1561         * editing/htmlediting.cpp:
1562         (WebCore::indexForVisiblePosition): Changed to use Range::create.
1563         (WebCore::avoidIntersectionWithNode): Changed to get rid of check for
1564         isDetached and check for 0 instead and to use Range::create.
1565         * editing/markup.cpp:
1566         (WebCore::renderedText): Changed to use Range::create.
1567         (WebCore::createMarkup): Changed to no longer use isDetached and also
1568         for new firstNode/pastEndNode names.
1569         (WebCore::createFragmentFromText): Ditto.
1570         * editing/visible_units.cpp:
1571         (WebCore::previousBoundary): Changed to use Range::create.
1572         * page/mac/WebCoreFrameBridge.mm:
1573         (-[WebCoreFrameBridge convertToNSRange:]): Changed to no longer use
1574         isDetached().
1575         * rendering/RenderTextControl.cpp:
1576         (WebCore::RenderTextControl::visiblePositionForIndex): Changed to use Range::create.
1577         (WebCore::RenderTextControl::indexForVisiblePosition): Ditto.
1578
1579 2008-03-11  Daniel Zucker <zucker@wake3.com>
1580
1581         Reviewed by Adam Roben.
1582
1583         There are a handful of placed where the use of CFNetwork-specific
1584         calls are protected by PLATFORM(CF).  Revise to use the more specific
1585         USE(CFNETWORK) macro.  (See http://bugs.webkit.org/show_bug.cgi?id=17783) 
1586
1587         * platform/network/ProtectionSpace.cpp:  Change PLATFORM(CF) to USE(CFNETWORK)
1588         * platform/network/ResourceHandle.cpp: Change PLATFORM(CF) to USE(CFNETWORK)
1589         * platform/network/win/CookieJarWin.cpp:  Correct error in
1590           InternetGetCookie call.  Conditionalize 'cookiesEnabled' the same
1591           as all other implementations in this file.
1592
1593 2008-03-11  Xan Lopez  <xan@gnome.org>
1594
1595         Reviewed by Alp Toker.
1596
1597         http://bugs.webkit.org/show_bug.cgi?id=16476
1598
1599         Add libsoup HTTP backend.
1600         
1601         * GNUmakefile.am:
1602         * platform/network/ResourceHandleInternal.h:
1603         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
1604         * platform/network/soup/AuthenticationChallenge.h: Added.
1605         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
1606         * platform/network/soup/ResourceError.h: Added.
1607         (WebCore::ResourceError::ResourceError):
1608         * platform/network/soup/ResourceHandleSoup.cpp: Added.
1609         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
1610         (WebCore::ResourceHandle::~ResourceHandle):
1611         (WebCore::dataCallback):
1612         (WebCore::parseDataUrl):
1613         (WebCore::ResourceHandle::start):
1614         (WebCore::ResourceHandle::cancel):
1615         (WebCore::ResourceHandle::bufferedData):
1616         (WebCore::ResourceHandle::supportsBufferedData):
1617         (WebCore::ResourceHandle::setDefersLoading):
1618         (WebCore::ResourceHandle::loadsBlocked):
1619         (WebCore::ResourceHandle::willLoadFromCache):
1620         * platform/network/soup/ResourceRequest.h: Copied from WebCore/platform/network/curl/ResourceRequest.h.
1621         (WebCore::ResourceRequest::ResourceRequest):
1622         (WebCore::ResourceRequest::doUpdatePlatformRequest):
1623         * platform/network/soup/ResourceResponse.h: Added.
1624         (WebCore::ResourceResponse::ResourceResponse):
1625         (WebCore::ResourceResponse::setResponseFired):
1626         (WebCore::ResourceResponse::responseFired):
1627         (WebCore::ResourceResponse::doUpdateResourceResponse):
1628
1629 2008-03-11  Rodney Dawes  <dobey@wayofthemonkey.com>
1630
1631         Fix Qt build.
1632
1633         * plugins/qt/PluginDataQt.cpp:
1634         (PluginData::initPlugins)
1635
1636 2008-03-11  Adam Roben  <aroben@apple.com>
1637
1638         Make attribute quoting in DOM view more consistent with source view
1639
1640         Two changes which make the DOM view more consistent with source view:
1641          1) We now quote all attribute values, including URLs
1642          2) The quotes around the values are now purple, matching the left and
1643             right angle brackets that surround the tag
1644
1645         One bug fixed by these changes:
1646          1) The entire URL is selected for editing when you double-click a URL
1647             that is an attribute value. Previously, the first and last
1648             characters were not included in the selection.
1649
1650         Reviewed by Darin.
1651
1652         * page/inspector/DocumentPanel.js:
1653         (WebInspector.DOMNodeTreeElement._startEditingAttribute): Don't need
1654         to account for the quotes around attribute values anymore because the
1655         quotes are now outside the webkit-html-attribute-value span.
1656         * page/inspector/utilities.js:
1657         (nodeTitleInfo): Quote all attribute values, including URLs, and place
1658         the quotes outside the webkit-html-attribute-value span.
1659
1660 2008-03-11  Adam Roben  <aroben@apple.com>
1661
1662         Stop including pthread.h in WebCore on Windows
1663
1664         Reviewed by Darin.
1665
1666         * WebCore.vcproj/WebCore.vcproj:
1667           - Changed the include path to not contain pthreads/
1668           - Let VS remove a duplicate FileConfiguration element
1669           - Let VS have its way with the file ordering
1670         * WebCorePrefix.h: Made the #include of pthread.h be compiled out on
1671         Windows.
1672         * loader/FTPDirectoryDocument.cpp: Added a Windows-specific #define of
1673         localtime_r (pthread.h was providing a macro that substituted plain
1674         old localtime before, but localtime_s is "more secure", so I went with
1675         that).
1676         * loader/FTPDirectoryParser.cpp: Ditto for gmtime_r.
1677
1678 2008-03-11  Adam Roben  <aroben@apple.com>
1679
1680         Roll out r30961 since it broke the default site icon on Windows
1681
1682         * loader/icon/IconDatabase.cpp:
1683         (WebCore::IconDatabase::defaultIcon):
1684
1685 2008-03-11  Dan Bernstein  <mitz@apple.com>
1686
1687         Reviewed by Darin Adler.
1688
1689         - clean up line layout code
1690
1691         * platform/graphics/GraphicsContext.cpp:
1692         (WebCore::TextRunIterator::increment): Removed the resolver parameter.
1693         (WebCore::GraphicsContext::drawBidiText): Adjusted for changes to
1694         createBidiRunsForLine(), which no longer takes a start parameter.
1695         * platform/text/BidiResolver.h:
1696         (WebCore::BidiResolver::): Made Noncopyable and removed the
1697         m_adjustEmbedding member variable.
1698         (WebCore::BidiResolver::position): Added. Returns the resolver's current
1699         position.
1700         (WebCore::BidiResolver::setPosition): Added. Sets the resolver's current
1701         position without changing any other state.
1702         (WebCore::BidiResolver::increment): Added. Advances the resolver to the
1703         next position, allowing the iterator to push and pop embedding.
1704         (WebCore::BidiResolver::appendRun): Removed the resolver parameter in
1705         the call to increment().
1706         (WebCore::BidiResolver::embed): Removed code to save, set and restore
1707         m_adjustEmbedding.
1708         (WebCore::BidiResolver::createBidiRunsForLine): Changed to not take a
1709         'start' iterator. Instead, start at the current position. Removed code
1710         to set m_adjustEmbedding. Changed for noncopyability.
1711         * rendering/RenderBlock.h:
1712         * rendering/bidi.cpp:
1713         (WebCore::bidiNext): Made the resolver parameter optional. Changed to
1714         null-check the 'end of inline' pointer only twice.
1715         (WebCore::bidiFirst): Made the resolver parameter optional.
1716         (WebCore::BidiIterator::increment): Ditto.
1717         (WebCore::BidiState::increment): Added. Overrides the default
1718         BidiResolver::increment() method by passing the resolver to
1719         BidiIterator::increment().
1720         (WebCore::checkMidpoints): Removed the resolver parameter.
1721         (WebCore::BidiState::appendRun): Removed code to save, set and restore
1722         m_adjustEmbedding. Adjusted for change to increment().
1723         (WebCore::RenderBlock::bidiReorderLine): Removed the 'start' parameter
1724         and unreachable code.
1725         (WebCore::buildCompactRuns): Adjusted for changes to BidiResolver/
1726         (WebCore::RenderBlock::layoutInlineChildren): Moved code to initialize
1727         the resolver from this method to determineStartPosition(). Unified the
1728         resolver with the 'start' iterator. Removed unreachable code. Moved one
1729         statement from the beginning of the while loop to the end.
1730         (WebCore::RenderBlock::determineStartPosition): Moved code to initialize
1731         the resolver from layoutInlineChildren() into this method.
1732         (WebCore::RenderBlock::matchedEndLine): Adjusted for the resolver and
1733         the 'start' iterator being one object.
1734         (WebCore::skipNonBreakingSpace): Made the parameter const.
1735         (WebCore::requiresLineBox): Ditto.
1736         (WebCore::RenderBlock::generatesLineBoxesForInlineChild): Adjusted for
1737         the change to BidiIterator::increment().
1738         (WebCore::RenderBlock::skipWhitespace): Made two versions of this
1739         method, one for BidiIterator and one for BidiState.
1740         (WebCore::shouldSkipWhitespaceAfterStartObject): Removed the resolver
1741         parameter.
1742         (WebCore::RenderBlock::findNextLineBreak): Removed the resolver
1743         parameter. Removed calls to setAdjustEmbedding(). Removed the 'previous'
1744         variable and changed the 'last' variable to do its job.
1745         * rendering/bidi.h:
1746
1747 2008-03-10  Adam Roben  <aroben@apple.com>
1748
1749         Part of Bug 17224: DOM nodes/attributes should be editable
1750
1751         <http://bugs.webkit.org/show_bug.cgi?id=17224>
1752         <rdar://problem/5732825>
1753
1754         This patch makes text nodes editable via double-click.
1755
1756         Reviewed by Tim.
1757
1758         * page/inspector/DocumentPanel.js:
1759         (WebInspector.DOMNodeTreeElement._startEditing):
1760           - Moved most of this code to _startEditingAttribute
1761           - Calls _startEditingTextNode or _startEditingAttribute as
1762             appropriate
1763         (WebInspector.DOMNodeTreeElement._startEditingAttribute): Added. Code
1764         came from _startEditing.
1765         (WebInspector.DOMNodeTreeElement._startEditingTextNode): Added.
1766         (WebInspector.DOMNodeTreeElement._textNodeEditingCommitted): Added.
1767         (WebInspector.DOMNodeTreeElement._editingCancelled): Renamed from
1768         _attributeEditingCancelled.
1769         * page/inspector/utilities.js:
1770         (nodeTitleInfo): Wrap text nodes in a webkit-html-text-node span so
1771         that we can easily recognize/edit them.
1772
1773 2008-03-11  Holger Hans Peter Freyther  <zecke@selfish.org>
1774
1775         Reviewed by Darin.
1776
1777         r25512 inlined the urlIcon to improve the startup time of Safari on Mac. Inlining is
1778         not suitable for platforms where this icon is themable. E.g. the Qt platform is allowing
1779         to theme this icon and the Gtk+ platform will probably end up with themable icons
1780         as well.
1781         
1782         Remove dead code from the windows port and move the urlIcon from the windows
1783         directory to the Resource directory to be used by Qt and other ports.
1784         
1785         Ifdef the usage of the built-in icon in IconDatabase.cpp and for Qt do not use
1786         it. Gtk+ currently has no proper implementation of Image::loadPlatformResource but
1787         once it does it wants to use this for getting the urlIcon as well.
1788
1789         * Resources/urlIcon.png: Renamed from WebKit/win/WebKit.vcproj/urlIcon.png.
1790         * loader/icon/IconDatabase.cpp:
1791         (WebCore::IconDatabase::defaultIcon):
1792
1793 2008-03-11  Tor Arne Vestbø  <tavestbo@trolltech.com>
1794
1795         Reviewed by Darin.
1796
1797         Implemented HTML media element support for QtWebKit, using Phonon.
1798
1799         http://bugs.webkit.org/show_bug.cgi?id=17766
1800
1801         * WebCore.pro:
1802         * platform/graphics/MediaPlayer.cpp:
1803         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp: Added.
1804         (debugMediaObject):
1805         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
1806         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
1807         (WebCore::MediaPlayerPrivate::getSupportedTypes):
1808         (WebCore::MediaPlayerPrivate::hasVideo):
1809         (WebCore::MediaPlayerPrivate::load):
1810         (WebCore::MediaPlayerPrivate::cancelLoad):
1811         (WebCore::MediaPlayerPrivate::play):
1812         (WebCore::MediaPlayerPrivate::pause):
1813         (WebCore::MediaPlayerPrivate::paused):
1814         (WebCore::MediaPlayerPrivate::seek):
1815         (WebCore::MediaPlayerPrivate::seeking):
1816         (WebCore::MediaPlayerPrivate::duration):
1817         (WebCore::MediaPlayerPrivate::currentTime):
1818         (WebCore::MediaPlayerPrivate::setEndTime):
1819         (WebCore::MediaPlayerPrivate::maxTimeBuffered):
1820         (WebCore::MediaPlayerPrivate::maxTimeSeekable):
1821         (WebCore::MediaPlayerPrivate::bytesLoaded):
1822         (WebCore::MediaPlayerPrivate::totalBytesKnown):
1823         (WebCore::MediaPlayerPrivate::totalBytes):
1824         (WebCore::MediaPlayerPrivate::setRate):
1825         (WebCore::MediaPlayerPrivate::setVolume):
1826         (WebCore::MediaPlayerPrivate::setMuted):
1827         (WebCore::MediaPlayerPrivate::dataRate):
1828         (WebCore::MediaPlayerPrivate::networkState):
1829         (WebCore::MediaPlayerPrivate::readyState):
1830         (WebCore::MediaPlayerPrivate::updateStates):
1831         (WebCore::MediaPlayerPrivate::setVisible):
1832         (WebCore::MediaPlayerPrivate::setRect):
1833         (WebCore::MediaPlayerPrivate::loadStateChanged):
1834         (WebCore::MediaPlayerPrivate::rateChanged):
1835         (WebCore::MediaPlayerPrivate::sizeChanged):
1836         (WebCore::MediaPlayerPrivate::timeChanged):
1837         (WebCore::MediaPlayerPrivate::volumeChanged):
1838         (WebCore::MediaPlayerPrivate::didEnd):
1839         (WebCore::MediaPlayerPrivate::loadingFailed):
1840         (WebCore::MediaPlayerPrivate::naturalSize):
1841         (WebCore::MediaPlayerPrivate::eventFilter):
1842         (WebCore::MediaPlayerPrivate::repaint):
1843         (WebCore::MediaPlayerPrivate::paint):
1844         (WebCore::MediaPlayerPrivate::stateChanged):
1845         (WebCore::MediaPlayerPrivate::tick):
1846         (WebCore::MediaPlayerPrivate::metaDataChanged):
1847         (WebCore::MediaPlayerPrivate::seekableChanged):
1848         (WebCore::MediaPlayerPrivate::hasVideoChanged):
1849         (WebCore::MediaPlayerPrivate::bufferStatus):
1850         (WebCore::MediaPlayerPrivate::finished):
1851         (WebCore::MediaPlayerPrivate::currentSourceChanged):
1852         (WebCore::MediaPlayerPrivate::aboutToFinish):
1853         (WebCore::MediaPlayerPrivate::prefinishMarkReached):
1854         (WebCore::MediaPlayerPrivate::totalTimeChanged):
1855         * platform/graphics/qt/MediaPlayerPrivatePhonon.h: Added.
1856         (WebCore::MediaPlayerPrivate::):
1857         (WebCore::MediaPlayerPrivate::isAvailable):
1858
1859 2008-03-10  Sam Weinig  <sam@webkit.org>
1860
1861         Reviewed by Beth Dakin.
1862
1863         Throw a SECURITY_ERR when accessing a tainted canvas
1864         by CanvasRenderingContext2D::getImageData() and
1865         HTMLCanvasElement::toDataURL().
1866
1867         * html/CanvasRenderingContext2D.cpp:
1868         (WebCore::CanvasRenderingContext2D::getImageData):
1869         * html/CanvasRenderingContext2D.h:
1870         * html/CanvasRenderingContext2D.idl:
1871         * html/HTMLCanvasElement.cpp:
1872         (WebCore::HTMLCanvasElement::toDataURL):
1873         * html/HTMLCanvasElement.h:
1874         * html/HTMLCanvasElement.idl:
1875
1876 2008-03-10  Justin Garcia  <justin.garcia@apple.com>
1877
1878         Reviewed by Sam.
1879
1880         <rdar://problem/5779984> REGRESSION (r30391): GMail: Safari won't display the Edit Link dialog
1881
1882         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1883         (WebCore::hasCSSPropertyNamePrefix): Fixed a typo.  The code was only
1884         comparing the first character of the prefix to the first character
1885         of the property name.
1886
1887 2008-03-10  Andre Boule  <aboule@apple.com>
1888
1889         Reviewed by Beth.
1890
1891         Hold off on initializing the frame to avoid the RenderView getting 
1892         a null FrameView. This could potentially cause problems.
1893
1894         * svg/graphics/SVGImage.cpp:
1895         (WebCore::SVGImage::dataChanged):
1896
1897 2008-03-10  Darin Adler  <darin@apple.com>
1898
1899         - try to fix Qt build
1900
1901         * bridge/qt/qt_runtime.cpp:
1902         (KJS::Bindings::convertQVariantToValue): Change KJS::UChar to UChar.
1903
1904 2008-03-10  Darin Adler  <darin@apple.com>
1905
1906         Reviewed by Antti.
1907
1908         - fix <rdar://problem/3059610> VIP: links opened in new frame, window, or tab
1909           should be redrawn as visited immediately
1910         - fix <rdar://problem/4382809> Going "back" a page doesn't change the color of
1911           the visited URL at directory.umi
1912         - fix http://bugs.webkit.org/show_bug.cgi?id=4941
1913           Visited links should be marked as visited
1914         - fix http://bugs.webkit.org/show_bug.cgi?id=7960
1915           REGRESSION: Visited link color doesn't displayed after loading page from cache
1916
1917         We now mark all links on a page as "changed" at the appropriate times.
1918
1919         * WebCore.base.exp: Update since I made completeURL be a const member function.
1920
1921         * css/CSSStyleSelector.cpp: Got rid of some unneeded globals that could be turned
1922         into locals. Also changed some static data members to file-scoped globals with
1923         internal linkage. Renamed the globals to get rid of the m_ prefix. Changed the
1924         prefix on m_styleNotYetAvailable to s_styleNotYetAvailable.
1925         (WebCore::CSSStyleSelector::CSSStyleSelector): Updated for name changes.
1926         (WebCore::parseUASheet): Tweak the comment.
1927         (WebCore::CSSStyleSelector::loadDefaultStyle): Updated for name changes and to
1928         use local variables instead of globals where possible.
1929         (WebCore::CSSStyleSelector::checkPseudoState): Made this a member function so
1930         it can store the link in a hash. Also changed it to have a return value instead
1931         of having it modify a global variable. Added code to put the hash into a set so
1932         we can tell later if this is one of the links that affects this page.
1933         (WebCore::CSSStyleSelector::canShareStyleWithElement): Updated for the change to
1934         checkPseudoState.
1935         (WebCore::CSSStyleSelector::matchUARules): Updated for name changes.
1936         (WebCore::CSSStyleSelector::styleForElement): Ditto.
1937         (WebCore::CSSStyleSelector::adjustRenderStyle): Ditto.
1938         (WebCore::CSSStyleSelector::pseudoStyleRulesForElement): Changed code to read
1939         the SVG style sheet to use a boolean global and put it right here in the function
1940         since this is the only code that needs to know about it.
1941         (WebCore::CSSStyleSelector::checkOneSelector): Updated for name changes.
1942         (WebCore::colorForCSSValue): Moved code inside the function that is not needed
1943         anywhere else.
1944         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Updaed for the change
1945         to checkPseudoState.
1946         (WebCore::CSSStyleSelector::allVisitedStateChanged): Added. Calls setChanged on
1947         all links if there were any in the set.
1948         (WebCore::CSSStyleSelector::visitedStateChanged): Added. Calls setChanged on all
1949         links if the one that changed is in the set.
1950
1951         * css/CSSStyleSelector.h: Removed unused StyleSelector class and State enum. Made
1952         CSSStyleSelector derive from Noncopyable. Made lots of member functions private that
1953         didn't need to be public, and removed others that could be made into non-member
1954         functions. Changed pseudoStyleRulesForElement to take a const String& instead of
1955         a StringImpl*. Added new allVisitedStateChanged and visitedStateChanged functions.
1956         Got rid of unneeded friend declarations.
1957
1958         * dom/Document.cpp:
1959         (WebCore::Document::completeURL): Made const.
1960         (WebCore::findSlashDotDotSlash): Moved here from PageGroup.
1961         (WebCore::findSlashSlash): Ditto.
1962         (WebCore::findSlashDotSlash): Ditto.
1963         (WebCore::containsColonSlashSlash):
1964         (WebCore::cleanPath): Ditto.
1965         (WebCore::matchLetter): Ditto.
1966         (WebCore::needsTrailingSlash): Ditto.
1967         (WebCore::Document::visitedLinkHash): Moved this here from PageGroup. This is
1968         the poor-man's completeURL function. The idea of putting it here is that this
1969         way it can be alongside the real completeURL function. Later we should figure out
1970         a way to make this function share more code with the real thing and match behavior.
1971
1972         * dom/Document.h: Marked completeURL function const. Added visitedLinkHash function.
1973
1974         * page/DOMWindow.cpp:
1975         (WebCore::DOMWindow::getMatchedCSSRules): Updated for change to CSSStyleSelector.
1976
1977         * page/Page.cpp:
1978         (WebCore::Page::allVisitedStateChanged): Added. Calls allVisitedStateChanged on all
1979         style selectors.
1980         (WebCore::Page::visitedStateChanged): Ditto.
1981         * page/Page.h: Added the above functions.
1982
1983         * page/PageGroup.cpp:
1984         (WebCore::PageGroup::isLinkVisited): Changed to take a visitedLinkHash parameter.
1985         The CSSStyleSelector now handles actually computing the hash, and it does so by
1986         calling code in Document.
1987         (WebCore::PageGroup::addVisitedLink): Refactored so the two overloaded copies share
1988         a bit more code. Added code that calls visitedStateChanged if a new link was added.
1989         (WebCore::PageGroup::removeVisitedLinks): Added code to call allVisitedStateChanged
1990         if any visited links are removed.
1991         * page/PageGroup.h: Include StringHash.h instead of having the AlreadyHashed struct
1992         definition here.
1993
1994         * platform/text/StringHash.h:
1995         (WebCore::CaseFoldingHash::hash): Tweaked to make this a bit more consistent with
1996         the StringImpl::computeHash function, using the same technique for avoiding 0.
1997         (WebCore::AlreadyHashed::hash): Added. Was formerly in PageGroup.h.
1998         (WebCore::AlreadyHashed::avoidDeletedValue): Added. Was formerly in PageGroup.cpp.
1999
2000         * rendering/RenderStyle.cpp:
2001         (WebCore::RenderStyle::isStyleAvailable): Changed to use an inline function instead
2002         of getting directly at a data member so the data member could be made private.
2003
2004         * loader/FrameLoader.cpp:
2005         (WebCore::FrameLoader::scrollToAnchor): Added call to updateHistoryForAnchorScroll.
2006         (WebCore::FrameLoader::updateHistoryForAnchorScroll): Added.
2007         * loader/FrameLoader.h: Added updateHistoryForAnchorScroll.
2008
2009 2008-03-10  Adam Roben  <aroben@apple.com>
2010
2011         Part of Bug 17224: DOM nodes/attributes should be editable
2012
2013         <http://bugs.webkit.org/show_bug.cgi?id=17224>
2014         <rdar://problem/5732825>
2015
2016         This patch makes DOM attributes editable via double-click.
2017
2018         Reviewed by Tim.
2019
2020         * page/inspector/DocumentPanel.js:
2021         (WebInspector.DOMNodeTreeElement.onmousedown): Don't do anything if
2022         we're being edited, since we want default editing behaviors to work.
2023         (WebInspector.DOMNodeTreeElement.ondblclick): Try to start editing
2024         before doing anything else.
2025         (WebInspector.DOMNodeTreeElement._startEditing): Added. Currently only
2026         lets you edit attributes.
2027         (WebInspector.DOMNodeTreeElement._attributeEditingCommitted): Added.
2028         Uses a scratch element to get the new attribute(s) parsed, then sets
2029         the attribute(s) on the node in the inspected document.
2030         (WebInspector.DOMNodeTreeElement._attributeEditingCancelled): Added.
2031         (WebInspector.DOMNodeTreeElement._updateTitle): Added. Refreshes the
2032         representation of the node in the Inspector's DOM tree to reflect
2033         the node's current state.
2034         * page/inspector/inspector.css: Made the .editing class apply
2035         everywhere.
2036         * page/inspector/utilities.js:
2037         (nodeTitleInfo): Changed to surround attribute name/value pairs in a
2038         webkit-html-attribute span so that we can easily edit the pair as a
2039         whole.
2040
2041 2008-03-10  David Kilzer  <ddkilzer@apple.com>
2042
2043         Fix 64-bit builds.
2044
2045         Reviewed by Stephanie.
2046
2047         WebCore.exp only gets generated once for both 32-bit and 64-bit builds,
2048         so we must exclude the _NPN symbols when creating WebCore.LP64.exp.
2049
2050         * WebCore.xcodeproj/project.pbxproj: Reverted build phase shell code to
2051         r30826 to remove _NPN symbols from 64-bit builds in WebCore.LP64.exp.
2052
2053 2008-03-10  Eric Seidel  <eric@webkit.org>
2054
2055         Reviewed by Darin.
2056
2057         Remove KJS::UChar, use ::UChar instead
2058         http://bugs.webkit.org/show_bug.cgi?id=17017
2059
2060         To functional changes, thus no tests.
2061
2062         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2063         (WebCore::hasCSSPropertyNamePrefix):
2064         (WebCore::cssPropertyName):
2065         * bindings/js/JSDOMWindowBase.cpp:
2066         (WebCore::windowProtoFuncAToB):
2067         (WebCore::windowProtoFuncBToA):
2068         * bindings/js/JSSVGPODTypeWrapper.h:
2069         * bindings/js/kjs_proxy.cpp:
2070         (WebCore::KJSProxy::evaluate):
2071         * bridge/objc/objc_utility.mm:
2072         (KJS::Bindings::throwError):
2073         * dom/Document.cpp:
2074         (WebCore::Document::parseQualifiedName):
2075         * platform/text/AtomicString.cpp:
2076         (WebCore::AtomicString::add):
2077         * platform/text/String.cpp:
2078         (WebCore::String::String):
2079         (WebCore::String::operator Identifier):
2080         (WebCore::String::operator UString):
2081         * platform/text/TextCodecICU.cpp:
2082         (WebCore::TextCodecICU::decode):
2083         * svg/SVGAnimatedTemplate.h:
2084
2085 2008-03-10  Darin Adler  <darin@apple.com>
2086
2087         Reviewed by Sam.
2088
2089         - eliminate keyboard UI mode method from WebCoreFrameBridge
2090
2091         * page/ChromeClient.h: Added keyboardUIMode function.
2092         (WebCore::ChromeClient::keyboardUIMode): Ditto.
2093         * page/mac/EventHandlerMac.mm:
2094         (WebCore::EventHandler::tabsToAllControls): Call chrome client function instead
2095         of bridge function.
2096         * page/mac/WebCoreFrameBridge.h: Removed keyboardUIMode method, and other unused
2097         ones.
2098
2099         * WebCore.xcodeproj/project.pbxproj: Allowed Xcode to change the project.
2100         Do not try to fight the Xcode.
2101
2102 2008-03-10  Darin Adler  <darin@apple.com>
2103
2104         - oops, forgot to save last couple changes from the editor
2105
2106         * bindings/js/JSDOMWindowCustom.cpp:
2107         (WebCore::markDOMObjectWrapper): Tweaked a tiny bit.
2108         (WebCore::JSDOMWindow::mark): Sorted alphabetically.
2109
2110 2008-03-10  Darin Adler  <darin@apple.com>
2111
2112         Reviewed by Geoff.
2113
2114         - fix failing regression test (window.navigator is getting garbage
2115           collected and thus losing its custom properties)
2116
2117         * bindings/js/JSDOMWindowCustom.cpp:
2118         (WebCore::markDOMObject): Added helper function.
2119         (WebCore::JSDOMWindow::mark): Added. Marks the wrappers for all the objects that hang
2120         off the window object.
2121
2122         * page/DOMWindow.h:
2123         (WebCore::DOMWindow::optionalScreen): Added so we can get the Screen object without
2124         creating it if it's already there.
2125         (WebCore::DOMWindow::optionalSelection): Ditto.
2126         (WebCore::DOMWindow::optionalHistory): Ditto.
2127         (WebCore::DOMWindow::optionalLocationbar): Ditto.
2128         (WebCore::DOMWindow::optionalMenubar): Ditto.
2129         (WebCore::DOMWindow::optionalPersonalbar): Ditto.
2130         (WebCore::DOMWindow::optionalScrollbars): Ditto.
2131         (WebCore::DOMWindow::optionalStatusbar): Ditto.
2132         (WebCore::DOMWindow::optionalToolbar): Ditto.
2133         (WebCore::DOMWindow::optionalConsole): Ditto.
2134         (WebCore::DOMWindow::optionalNavigator): Ditto.
2135
2136         * page/DOMWindow.idl: Added the CustomMarkFunction flag. Sorted the flags in
2137         alphabetical order since there are a lot of them.
2138
2139 2008-03-10  Darin Adler  <darin@apple.com>
2140
2141         Reviewed by Sam.
2142
2143         - eliminate Java applet methods from WebCoreFrameBridge
2144
2145         * loader/FrameLoaderClient.h: Added a javaApplet function.
2146         * page/mac/FrameMac.mm:
2147         (WebCore::Frame::createScriptInstanceForWidget): Streamlined the code.
2148         Use the loader client instead of the bridge to get the applet.
2149         * page/mac/WebCoreFrameBridge.h: Removed the getAppletInView and
2150         pollForAppletInView methods. Also removed other unused things.
2151
2152 2008-03-10  Marc-Antoine Ruel  <maruel@gmail.com>
2153
2154         Reviewed by Eric, landed by Darin.
2155
2156         http://bugs.webkit.org/show_bug.cgi?id=16095
2157         Move GraphicsContextPrivate to its own header file.
2158
2159         Moves GraphicsContextState and GraphicsContextPrivate to its
2160         own header
2161
2162         * WebCore.vcproj/WebCore.vcproj:
2163         * platform/graphics/GraphicsContext.cpp:
2164         * platform/graphics/GraphicsContextPrivate.h: Added.
2165         (WebCore::GraphicsContextState::GraphicsContextState):
2166         (WebCore::GraphicsContextPrivate::GraphicsContextPrivate):
2167
2168 2008-03-10  Julien Chaffraix  <julien.chaffraix@gmail.com>
2169
2170         Reviewed and landed by Darin.
2171
2172         bug 12182 : XMLHttpRequest should raise SECURITY_ERR for same-origin policy violations
2173
2174         Removed reference to PERMISSION_DENIED (previous non standard exception) and replaced it
2175         by DOM exception SECURITY_ERR. Updated XMLHttpRequest::open to raise SECURITY_ERR.
2176
2177         * bindings/js/kjs_binding.cpp:
2178         (WebCore::setDOMException): Removed PERMISSION_DENIED code.
2179         * dom/ExceptionCode.cpp: Added SECURITY_ERR exception.
2180         * dom/ExceptionCode.h: Ditto.
2181         * xml/XMLHttpRequest.cpp:
2182         (WebCore::XMLHttpRequest::open): Returns SECURITY_ERR now.
2183         * xml/XMLHttpRequestException.h: Removed PERMISSION_DENIED.
2184
2185 2008-03-09  Adam Roben  <aroben@apple.com>
2186
2187         Refactor CSS editing code so we can share it with DOM editing
2188
2189         Add WebInspector.startEditing, which takes the element to be edited, a
2190         committedCallback, a cancelledCallback, and a context parameter. This
2191         function takes care of setting up the element for editing, and calls
2192         either the cancelledCallback or committedCallback when editing ends.
2193
2194         Reviewed by Tim.
2195
2196         * page/inspector/StylesSidebarPane.js:
2197         (WebInspector.StylePropertyTreeElement.startEditing):
2198           - Call WebInspector.isBeingEdited and WebInspector.startEditing
2199           - Removed code now handled by WebInspector.startEditing
2200         (WebInspector.StylePropertyTreeElement.editingEnded):
2201           - Renamed from endEditing
2202           - Removed code now handled by WebInspector.startEditing
2203         (WebInspector.StylePropertyTreeElement.editingCancelled):
2204           - Renamed from cancelEditing
2205           - Changed parameters to match WebInspector.startEditing's
2206             cancelledCallback
2207         (WebInspector.StylePropertyTreeElement.editingCommitted):
2208           - Renamed from commitEditing
2209           - Changed parameters to match WebInspector.startEditing's
2210             committedCallback
2211         * page/inspector/inspector.js:
2212         (WebInspector.changeFocus): Changed a call to firstParentWithClassName
2213         to firstParentOrSelfWithClassName so that if the focusable element
2214         itself is the target it will be recognized. I don't know why this
2215         change wasn't needed before this.
2216         (WebInspector.isBeingEdited): Added.
2217         (WebInspector.startEditing): Added.
2218
2219 2008-03-10  Adam Roben  <aroben@apple.com>
2220
2221         Windows build fix
2222
2223         * WebCore.vcproj/WebCore.vcproj: Pick up generated source files out of
2224         $(WebKitOutputDir) instead of hard-coding WebKitBuild.
2225
2226 2008-03-10  Darin Adler  <darin@apple.com>
2227
2228         * DerivedSources.make: Merge plug-in-related changes with the new way of handling
2229         autogenerated DOM classes.
2230
2231 2008-03-10  Johnny Ding  <johnnyding.webkit@gmail.com>
2232
2233         Reviewed, tweaked and landed by Alexey.
2234
2235         - fix http://bugs.webkit.org/show_bug.cgi?id=17732        
2236
2237         We didn't have a fallback to frame encoding in the case of loading a script via
2238         changing its src attribute.
2239
2240         Test: fast/dom/HTMLScriptElement/script-decoding-error-after-setting-src.html
2241
2242         * html/HTMLScriptElement.cpp:
2243         (WebCore::HTMLScriptElement::parseMappedAttribute): Use a helper function to get proper
2244         charset for correct decoding of script content.
2245         (WebCore::HTMLScriptElement::insertedIntoDocument):
2246         (WebCore::HTMLScriptElement::scriptCharset): A helper function for getting proper charset
2247         for the script (as much as can be determined prior to loading it).
2248         * html/HTMLScriptElement.h:
2249         * html/HTMLTokenizer.cpp:
2250         (WebCore::HTMLTokenizer::parseTag): Use a helper function to get proper charset for correct
2251         decoding of script content.
2252
2253 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
2254
2255         Reviewed by Lars.
2256
2257         Fix reference counting of returned MimeType and Plugin objects
2258         created in the array wrappers.
2259
2260         * plugins/MimeTypeArray.cpp:
2261         * plugins/MimeTypeArray.h:
2262         * plugins/Plugin.cpp:
2263         * plugins/Plugin.h:
2264         * plugins/PluginArray.cpp:
2265         * plugins/PluginArray.h:
2266
2267 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
2268
2269         Wx linking fix.
2270
2271         Added missing stubs for PluginData.
2272
2273         * platform/wx/TemporaryLinkStubs.cpp:
2274
2275 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
2276
2277         Windows build fix that I forgot to merge earlier ;(
2278
2279         Forward declare Page as class, not struct.
2280
2281         * plugins/PluginData.h:
2282
2283 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
2284
2285         Attempt to fix the Wx build.
2286
2287         * WebCoreSources.bkl:
2288
2289 2008-03-07  Simon Hausmann  <hausmann@webkit.org>
2290
2291         Reviewed by Darin.
2292
2293         Done with Lars.
2294
2295         http://bugs.webkit.org/show_bug.cgi?id=16815
2296
2297         Ported the manually written JS bindings of window.navigator,
2298         window.navigator.plugins and window.navigator.mimeTypes to
2299         auto-generated bindings.
2300
2301         Moved the globally cached plugin and mimetype information to a
2302         per WebCore::Page shared PluginData structure.
2303
2304         Implemented window.navigator.plugins.refresh() in a
2305         platform-independent way.
2306
2307         * DerivedSources.make:
2308         * GNUmakefile.am:
2309         * WebCore.pro:
2310         * WebCore.vcproj/WebCore.vcproj:
2311         * WebCore.xcodeproj/project.pbxproj:
2312         * bindings/js/JSDOMWindowBase.cpp:
2313         (WebCore::JSDOMWindowBase::getValueProperty):
2314         * bindings/js/JSMimeTypeArrayCustom.cpp: Added.
2315         (WebCore::JSMimeTypeArray::canGetItemsForName):
2316         (WebCore::JSMimeTypeArray::nameGetter):
2317         * bindings/js/JSNavigatorCustom.cpp: Added.
2318         (WebCore::needsYouTubeQuirk):
2319         (WebCore::JSNavigator::appVersion):
2320         * bindings/js/JSPluginArrayCustom.cpp: Added.
2321         (WebCore::JSPluginArray::canGetItemsForName):
2322         (WebCore::JSPluginArray::nameGetter):
2323         * bindings/js/JSPluginCustom.cpp: Added.
2324         (WebCore::JSPlugin::canGetItemsForName):
2325         (WebCore::JSPlugin::nameGetter):
2326         * bindings/js/kjs_navigator.cpp: Removed.
2327         * bindings/js/kjs_navigator.h: Removed.
2328         * dom/Clipboard.cpp:
2329         * dom/DOMImplementation.cpp:
2330         (WebCore::DOMImplementation::createDocument):
2331         * loader/FrameLoader.cpp:
2332         (WebCore::FrameLoader::shouldUsePlugin):
2333         * page/DOMWindow.cpp:
2334         (WebCore::DOMWindow::clear):
2335         (WebCore::DOMWindow::navigator):
2336         * page/DOMWindow.h:
2337         * page/DOMWindow.idl:
2338         * page/DragController.cpp:
2339         * page/Frame.cpp:
2340         * page/Frame.h:
2341         * page/Navigator.cpp: Added.
2342         (WebCore::Navigator::Navigator):
2343         (WebCore::Navigator::~Navigator):
2344         (WebCore::Navigator::disconnectFrame):
2345         (WebCore::Navigator::appCodeName):
2346         (WebCore::Navigator::appName):
2347         (WebCore::Navigator::appVersion):
2348         (WebCore::Navigator::language):
2349         (WebCore::Navigator::userAgent):
2350         (WebCore::Navigator::platform):
2351         (WebCore::Navigator::plugins):
2352         (WebCore::Navigator::mimeTypes):
2353         (WebCore::Navigator::product):
2354         (WebCore::Navigator::productSub):
2355         (WebCore::Navigator::vendor):
2356         (WebCore::Navigator::vendorSub):
2357         (WebCore::Navigator::cookieEnabled):
2358         (WebCore::Navigator::javaEnabled):
2359         * page/Navigator.h: Added.
2360         (WebCore::Navigator::create):
2361         (WebCore::Navigator::frame):
2362         * page/Navigator.idl: Added.
2363         * page/Page.cpp:
2364         (WebCore::Page::refreshPlugins):
2365         (WebCore::Page::pluginData):
2366         * page/Page.h:
2367         * page/Plugin.h: Removed.
2368         * page/mac/FrameMac.mm:
2369         * page/mac/WebCoreFrameBridge.mm:
2370         (-[WebCoreFrameBridge canProvideDocumentSource]):
2371         * page/mac/WebCoreViewFactory.h:
2372         * page/qt/FrameQt.cpp:
2373         * page/win/FrameWin.cpp:
2374         * platform/gtk/TemporaryLinkStubs.cpp:
2375         * platform/mac/PlugInInfoStoreMac.mm: Removed.
2376         * platform/qt/MIMETypeRegistryQt.cpp:
2377         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
2378         * plugins/MimeType.cpp: Added.
2379         (WebCore::MimeType::MimeType):
2380         (WebCore::MimeType::~MimeType):
2381         (WebCore::MimeType::type):
2382         (WebCore::MimeType::suffixes):
2383         (WebCore::MimeType::description):
2384         (WebCore::MimeType::enabledPlugin):
2385         * plugins/MimeType.h: Added.
2386         (WebCore::MimeType::create):
2387         * plugins/MimeType.idl: Added.
2388         * plugins/MimeTypeArray.cpp: Added.
2389         (WebCore::MimeTypeArray::MimeTypeArray):
2390         (WebCore::MimeTypeArray::~MimeTypeArray):
2391         (WebCore::MimeTypeArray::length):
2392         (WebCore::MimeTypeArray::item):
2393         (WebCore::MimeTypeArray::canGetItemsForName):
2394         (WebCore::MimeTypeArray::nameGetter):
2395         (WebCore::MimeTypeArray::getPluginData):
2396         * plugins/MimeTypeArray.h: Added.
2397         (WebCore::MimeTypeArray::create):
2398         (WebCore::MimeTypeArray::disconnectFrame):
2399         * plugins/MimeTypeArray.idl: Added.
2400         * plugins/Plugin.cpp: Added.
2401         (WebCore::Plugin::Plugin):
2402         (WebCore::Plugin::~Plugin):
2403         (WebCore::Plugin::name):
2404         (WebCore::Plugin::filename):
2405         (WebCore::Plugin::description):
2406         (WebCore::Plugin::length):
2407         (WebCore::Plugin::item):
2408         (WebCore::Plugin::canGetItemsForName):
2409         (WebCore::Plugin::nameGetter):
2410         * plugins/Plugin.h: Added.
2411         (WebCore::Plugin::create):
2412         * plugins/Plugin.idl: Added.
2413         * plugins/PluginArray.cpp: Added.
2414         (WebCore::PluginArray::PluginArray):
2415         (WebCore::PluginArray::~PluginArray):
2416         (WebCore::PluginArray::length):
2417         (WebCore::PluginArray::item):
2418         (WebCore::PluginArray::canGetItemsForName):
2419         (WebCore::PluginArray::nameGetter):
2420         (WebCore::PluginArray::refresh):
2421         (WebCore::PluginArray::getPluginData):
2422         * plugins/PluginArray.h: Added.
2423         (WebCore::PluginArray::create):
2424         (WebCore::PluginArray::disconnectFrame):
2425         * plugins/PluginArray.idl: Added.
2426         * plugins/PluginData.cpp: Added.
2427         (WebCore::PluginData::PluginData):
2428         (WebCore::PluginData::~PluginData):
2429         (WebCore::PluginData::supportsMimeType):
2430         (WebCore::PluginData::pluginNameForMimeType):
2431         * plugins/PluginData.h: Added.
2432         (WebCore::PluginData::create):
2433         (WebCore::PluginData::disconnectPage):
2434         (WebCore::PluginData::page):
2435         (WebCore::PluginData::plugins):
2436         (WebCore::PluginData::mimes):
2437         * plugins/mac/PluginDataMac.mm: Added.
2438         (WebCore::PluginData::initPlugins):
2439         (WebCore::PluginData::refresh):
2440         * plugins/qt/PluginDataQt.cpp: Added.
2441         (WebCore::PluginData::initPlugins):
2442         * plugins/win/PluginDataWin.cpp: Added.
2443         (WebCore::PluginData::initPlugins):
2444         (WebCore::PluginData::refresh):
2445
2446 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
2447
2448         Reviewed by Holger.
2449
2450         Replace two printfs() in the Qt port with notImplemented().
2451
2452         * html/CanvasRenderingContext2D.cpp:
2453         (WebCore::CanvasRenderingContext2D::applyStrokePattern):
2454         (WebCore::CanvasRenderingContext2D::applyFillPattern):
2455
2456 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
2457
2458         Reviewed by Alp.
2459
2460         Compilation fix with gcc 4.3: Include stdio.h for printf.
2461
2462         * html/CanvasRenderingContext2D.cpp:
2463         * html/HTMLCanvasElement.cpp:
2464
2465 2008-03-09  Steve Falkenburg  <sfalken@apple.com>
2466
2467         Stop Windows build if an error occurs in a prior project.
2468
2469         Rubber stamped by Darin.
2470
2471         * WebCore.vcproj/WebCore.vcproj:
2472         * WebCore.vcproj/WebCoreGenerated.vcproj:
2473
2474 2008-03-09  Darin Adler  <darin@apple.com>
2475
2476         * DerivedSources.make: Third try at fixing the build.
2477         * bindings/js/JSRGBColor.cpp: And touching this file.
2478
2479 2008-03-09  Darin Adler  <darin@apple.com>
2480
2481         * DerivedSources.make: One *more* try at fixing the build.
2482
2483 2008-03-09  Darin Adler  <darin@apple.com>
2484
2485         * DerivedSources.make: One more try at fixing the build.
2486
2487 2008-03-09  Darin Adler  <darin@apple.com>
2488
2489         * DerivedSources.make: Re-land the change, fixed, and with an attempt to fix the
2490         bots by removing the incorrect file.
2491
2492 2008-03-09  Oliver Hunt  <oliver@apple.com>
2493
2494         RS=Mark Rowe
2495
2496         Roll out r30909 -- it breaks the build and is a non-trivial fix (according to weinig)
2497
2498         * DerivedSources.make:
2499
2500 2008-03-09  Darin Adler  <darin@apple.com>
2501
2502         Reviewed by Adam.
2503
2504         * DerivedSources.make: Put the list of DOM classes into its own
2505         variable, and generate the JavaScript bindings and Objective-C
2506         bindings dependencies from that. Added some separators to make it
2507         a little easier to see the sections of the file. Moved all the
2508         Mac-specific rules (except for the SVG conditional part) down
2509         to the bottom of the file in a separate section.
2510
2511 2008-03-09  Adam Roben  <aroben@apple.com>
2512
2513         Windows build fix
2514
2515         * WebCore.vcproj/WebCore.vcproj: Make sure all Cairo files are
2516         excluded from all three CG-based configurations: Debug, Release, and
2517         Debug_Internal.
2518
2519 2008-03-08  Mark Rowe  <mrowe@apple.com>
2520
2521         Attempt to fix the Qt build.
2522
2523         * platform/MIMETypeRegistry.cpp:  Add missing include.
2524
2525 2008-03-08  Oliver Hunt  <oliver@apple.com>
2526
2527         Reviewed by Sam W.
2528
2529         Bug 16516: canvas image patterns stop working with some transformations
2530
2531         Simple fix.  We used x/yStep of FLT_MAX to fake a no-repeat-x/y pattern
2532         with CG.  However any transforms involving FLT_MAX immediately get
2533         consumed by the introduced floating point error.  yStep had already been
2534         clamped to a much smaller arbitrary value, and this patch makes us use
2535         that clamp value for xStep as well.
2536
2537         * html/CanvasPattern.cpp:
2538         (WebCore::CanvasPattern::createPattern):
2539
2540 2008-03-08  Oliver Hunt  <oliver@apple.com>
2541
2542         Reviewed by Mitz.
2543
2544         Bug 17728: Canvas.createPattern with null repeat argument throws an exception
2545
2546         Trivial fix, we were calling toString on null which produces the string "null",
2547         we just needed to switch to using valueToStringWithNullCheck rather than 
2548         JSValue::toString directly
2549
2550         Test: fast/canvas/canvas-pattern-behaviour.html
2551
2552         * WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp:
2553         (WebCore::JSCanvasRenderingContext2D::createPattern):
2554
2555 2008-03-08  Mark Rowe  <mrowe@apple.com>
2556
2557         Reviewed by Darin Adler.
2558
2559         Fix 64-bit build with GCC 4.2.
2560
2561         * bindings/objc/WebScriptObject.mm: Use NSUInteger in place of unsigned where required.
2562         * platform/mac/SharedBufferMac.mm: Ditto.
2563
2564 2008-03-08  Dan Bernstein  <mitz@apple.com>
2565
2566         Reviewed by Oliver Hunt.
2567
2568         - fix garbage in transparent areas in canvas.toDataURL results
2569
2570         * platform/graphics/cg/ImageBufferCG.cpp:
2571         (WebCore::ImageBuffer::toDataURL): Clear the bitmap context before
2572         painting the canvas image onto it.
2573
2574 2008-03-08  Darin Adler  <darin@apple.com>
2575
2576         Reviewed by Adele.
2577
2578         - eliminate custom highlight methods from WebCoreFrameBridge
2579
2580         * page/Chrome.cpp:
2581         (WebCore::ChromeClient::customHighlightRect): Added.
2582         (WebCore::ChromeClient::paintCustomHighlight): Added.
2583         * page/ChromeClient.h: Added custom highlight functions.
2584         * page/Frame.h: Removed custom highlight functions.
2585         * page/mac/FrameMac.mm: Ditto.
2586         * page/mac/WebCoreFrameBridge.h: Removed custom highlight methods.
2587         * rendering/InlineTextBox.cpp:
2588         (WebCore::InlineTextBox::paintCustomHighlight): Changed code to use
2589         the ChromeClient instead of WebCoreFrameBridge to do the custom highlight.
2590         * rendering/RenderBox.cpp:
2591         (WebCore::RenderBox::paintCustomHighlight): Ditto.
2592         * rendering/RootInlineBox.cpp:
2593         (WebCore::RootInlineBox::addHighlightOverflow): Ditto.
2594         (WebCore::RootInlineBox::paintCustomHighlight): Ditto.
2595
2596 2008-03-07  Stephanie Lewis  <slewis@apple.com>
2597
2598         Reviewed by Oliver.
2599
2600         Fix Windows build.
2601
2602         * platform/graphics/cg/ImageBufferCG.cpp:
2603         (WebCore::ImageBuffer::toDataURL):
2604
2605 2008-03-07  David D. Kilzer  <ddkilzer@apple.com>
2606
2607         Unify concept of enabling Netscape Plug-in API (NPAPI).
2608
2609         Reviewed by Darin.
2610
2611         No test cases since there is no change in functionality.
2612
2613         * DerivedSources.make: Added check for ENABLE_NETSCAPE_PLUGIN_API macro.
2614         If defined as "1", add WebCore.NPAPI.exp to WEBCORE_EXPORT_DEPENDENCIES.
2615         * WebCore.NPAPI.exp: Added.
2616         * WebCore.base.exp: Moved exported NPAPI methods to WebCore.NPAPI.exp.
2617         * WebCore.xcodeproj/project.pbxproj: Removed changes in r30826 (except
2618         comments) since we now handle exported NPAPI methods via DerivedSources.make.
2619
2620         * config.h: Removed USE(NPOBJECT) since we now use ENABLE(NETSCAPE_PLUGIN_API) as
2621         defined in Platform.h.
2622
2623         * bindings/objc/DOM.mm: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
2624         (-[DOMElement _NPObject]):
2625
2626         * bridge/NP_jsobject.cpp: Replaced !PLATFORM(DARWIN) || !defined(__LP64__) with
2627         ENABLE(NETSCAPE_PLUGIN_API).
2628         * bridge/NP_jsobject.h: Ditto.
2629         * bridge/c/c_class.cpp: Ditto.
2630         * bridge/c/c_class.h: Ditto.
2631         * bridge/c/c_instance.cpp: Ditto.
2632         * bridge/c/c_instance.h: Ditto.
2633         * bridge/c/c_runtime.cpp: Ditto.
2634         * bridge/c/c_runtime.h: Ditto.
2635         * bridge/c/c_utility.cpp: Ditto.
2636         * bridge/c/c_utility.h: Ditto.
2637         * bridge/npruntime.cpp: Ditto.
2638         * bridge/npruntime_impl.h: Ditto.
2639         * bridge/npruntime_priv.h: Ditto.
2640         * bridge/runtime.cpp: Ditto.
2641         (KJS::Bindings::Instance::createBindingForLanguageInstance):
2642
2643         * html/HTMLPlugInElement.cpp: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
2644         (WebCore::HTMLPlugInElement::HTMLPlugInElement):
2645         (WebCore::HTMLPlugInElement::~HTMLPlugInElement):
2646         * html/HTMLPlugInElement.h: Ditto.
2647
2648         * page/Frame.cpp: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
2649         (WebCore::Frame::clearScriptObjects):
2650         (WebCore::FramePrivate::FramePrivate): Also added #if ENABLE(NETSCAPE_PLUGIN_API)
2651         guard around m_windowScriptNPObject.
2652         * page/Frame.h: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
2653         * page/FramePrivate.h: Added #if ENABLE(NETSCAPE_PLUGIN_API) guard around
2654         m_windowScriptNPObject.
2655         * page/mac/FrameMac.mm: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
2656         (WebCore::Frame::createScriptInstanceForWidget):
2657
2658 2008-03-07  Alexey Proskuryakov  <ap@webkit.org>
2659
2660         Reviewed by Darin.
2661
2662         REGRESSION: Korean decoding doesn't support extended EUC-KR.
2663
2664         Test: fast/encoding/char-decoding.html
2665
2666         * platform/text/TextCodecICU.cpp:
2667         (WebCore::TextCodecICU::registerExtendedEncodingNames): Untangle the system of duplicate ICU
2668         encoding names by manually registering windows-939-2000, and mapping all other related
2669         encodings to it.
2670
2671 2008-03-07  Dan Bernstein  <mitz@apple.com>
2672
2673         Reviewed by Stephanie.
2674
2675         - try to fix leaks seen on Tiger after r30840
2676
2677         * css/CSSStyleSelector.cpp:
2678         (WebCore::CSSStyleSelector::~CSSStyleSelector): Use the default operator
2679         delete, rather than arena delete, to deallocate the root default style.
2680
2681 2008-03-07  Pierre-Luc Beaudoin  <pierre-luc.beaudoin@collabora.co.uk>
2682
2683         Reviewed by Alp Toker.
2684
2685         http://bugs.webkit.org/show_bug.cgi?id=17681
2686         GtkLauncher fails to render an element with position: fixed
2687
2688         Implement the required parts of PlatformScreenGtk.
2689
2690         * ChangeLog:
2691         * platform/gtk/PlatformScreenGtk.cpp:
2692         (WebCore::screenDepth):
2693         (WebCore::screenIsMonochrome):
2694         (WebCore::screenRect):
2695
2696 2008-03-07  Oliver Hunt  <oliver@apple.com>
2697
2698         Reviewed by Darin Adler.
2699
2700         Bug 16610: <canvas> restore() removes path segments created before it
2701
2702         The problem here is that WebKit stored the Path as part of the state, so
2703         restore would incorrectly lose changes made to the canvas path.  To match
2704         Firefox and HTML5 we make two real changes:
2705           * Move the context path from the state object directly onto the context.
2706             This is responsible for all the changes to the path manipulation functions
2707           * Add transform tracking to each state -- this is needed to correctly transform
2708             the current path when restore()-ing to a prior state.
2709
2710         Test: fast/canvas/canvas-save-restore-with-path.html
2711
2712         * html/CanvasRenderingContext2D.cpp:
2713         (WebCore::CanvasRenderingContext2D::restore):
2714         (WebCore::CanvasRenderingContext2D::scale):
2715         (WebCore::CanvasRenderingContext2D::rotate):
2716         (WebCore::CanvasRenderingContext2D::translate):
2717         (WebCore::CanvasRenderingContext2D::transform):
2718         (WebCore::CanvasRenderingContext2D::beginPath):
2719         (WebCore::CanvasRenderingContext2D::closePath):
2720         (WebCore::CanvasRenderingContext2D::moveTo):
2721         (WebCore::CanvasRenderingContext2D::lineTo):
2722         (WebCore::CanvasRenderingContext2D::quadraticCurveTo):
2723         (WebCore::CanvasRenderingContext2D::arcTo):
2724         (WebCore::CanvasRenderingContext2D::arc):
2725         (WebCore::CanvasRenderingContext2D::rect):
2726         (WebCore::CanvasRenderingContext2D::clearPathForDashboardBackwardCompatibilityMode):
2727         (WebCore::CanvasRenderingContext2D::fill):
2728         (WebCore::CanvasRenderingContext2D::stroke):
2729         (WebCore::CanvasRenderingContext2D::clip):
2730         (WebCore::CanvasRenderingContext2D::isPointInPath):
2731         * html/CanvasRenderingContext2D.h:
2732
2733 2008-03-07  Oliver Hunt  <oliver@apple.com>
2734
2735         Reviewed by Ada.
2736
2737         Fix for crash caused by FrameLoader incorrectly assuming it has
2738         a RenderWidget
2739
2740         In some circumstances an application embedding a WebView may 
2741         choose to prevent a webview from loading a resource.  If that
2742         resource was requested by an <object> element then we may 
2743         fallback to different content which may not produce a RenderWidget.
2744         Unfortunately FrameLoader::loadSubframe was assuming that if a
2745         renderer was produced it would always be a RenderWidget, and arbitrarily
2746         performed what could be an incorrect cast.  This could then lead to
2747         a crash.
2748
2749         We currently don't have anyway of making a test for this.
2750
2751         * loader/FrameLoader.cpp:
2752         (WebCore::FrameLoader::loadSubframe):
2753
2754 2008-03-07  Samuel Weinig  <sam@webkit.org>
2755
2756         Reviewed by Oliver Hunt.
2757
2758         Fix for http://bugs.webkit.org/show_bug.cgi?id=16673
2759         <canvas> lacks toDataURL()
2760
2761         Tests: fast/canvas/toDataURL-noData.html
2762                fast/canvas/toDataURL-supportedTypes.html
2763
2764         * html/CanvasRenderingContext2D.cpp:
2765         (WebCore::CanvasRenderingContext2D::printSecurityExceptionMessage): Make message non-global.
2766         * html/HTMLCanvasElement.cpp:
2767         (WebCore::HTMLCanvasElement::printSecurityExceptionMessage): Log error message indicating that toDataURL has
2768         been called on a tainted canvas. 
2769         (WebCore::HTMLCanvasElement::toDataURL): This does the tainted canvas check, ensures that the canvas has pixel
2770         data, checks to see if the MIME type is supported.  Unsupported MIME types and the null string (which is made
2771         by passing no argument/null/undefined in JavaScript) are treated as being PNG, as per the spec.  The actual 
2772         toDataURL logic is actually done in the ImageBuffer class.
2773         * html/HTMLCanvasElement.h: Add function declarations.
2774         * html/HTMLCanvasElement.idl: Add function declaration.
2775
2776         * platform/MIMETypeRegistry.cpp:
2777         (WebCore::initializeSupportedImageMIMETypes):
2778         (WebCore::initializeSupportedImageMIMETypesForEncoding):
2779         (WebCore::initializeSupportedJavaScriptMIMETypes):
2780         (WebCore::initializeSupportedNonImageMimeTypes):
2781         (WebCore::initializeSupportedMediaMIMETypes):
2782         (WebCore::initializeMIMETypeRegistry):
2783         (WebCore::MIMETypeRegistry::getMIMETypeForPath):
2784         (WebCore::MIMETypeRegistry::isSupportedImageMIMEType):
2785         (WebCore::MIMETypeRegistry::isSupportedImageResourceMIMEType):
2786         (WebCore::MIMETypeRegistry::isSupportedImageMIMETypeForEncoding):
2787         (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType):
2788         (WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType):
2789         (WebCore::MIMETypeRegistry::isSupportedMediaMIMEType):
2790         (WebCore::MIMETypeRegistry::isJavaAppletMIMEType):
2791         (WebCore::MIMETypeRegistry::getSupportedImageMIMETypes):
2792         (WebCore::MIMETypeRegistry::getSupportedImageResourceMIMETypes):
2793         (WebCore::MIMETypeRegistry::getSupportedImageMIMETypesForEncoding):
2794         (WebCore::MIMETypeRegistry::getSupportedNonImageMIMETypes):
2795         (WebCore::MIMETypeRegistry::getSupportedMediaMIMETypes):
2796         * platform/MIMETypeRegistry.h:
2797         Clean up and add new supportedImageMIMETypesForEncoding set which contains the set of
2798         MIME types the platform knows how to encode. Currently only implemented for CG and Qt.
2799
2800         * platform/graphics/ImageBuffer.h: Add toDataURL method.
2801         * platform/graphics/cairo/ImageBufferCairo.cpp:
2802         (WebCore::ImageBuffer::toDataURL): Add stub.
2803         * platform/graphics/cg/ImageBufferCG.cpp:
2804         (WebCore::ImageBuffer::create):
2805         (WebCore::ImageBuffer::getImageData):
2806         (WebCore::ImageBuffer::putImageData):
2807         (WebCore::ImageBuffer::toDataURL):
2808         Converts the current context to a data: url of the specified MIME type.  This method
2809         unfortunately has to flip the context, resulting in less than optimal code.
2810
2811         * platform/graphics/qt/ImageBufferQt.cpp:
2812         (WebCore::ImageBuffer::toDataURL): Add stub.
2813         * platform/graphics/wx/ImageBufferWx.cpp:
2814         (WebCore::ImageBuffer::toDataURL): Add stub.
2815
2816 2008-03-07  Steve Falkenburg  <sfalken@apple.com>
2817
2818         Build fix.
2819
2820         * WebCore.vcproj/WebCore.vcproj:
2821
2822 2008-03-07  Brent Fulgham  <bfulgham@gmail.com>
2823
2824         Reviewed by Mark Rowe.
2825
2826         Correct build intermediary output
2827         (http://bugs.webkit.org/show_bug.cgi?id=17713)
2828
2829         * WebCore/WebCore.vcproj:  Correct intermediary paths
2830
2831 2008-03-07  Brent Fulgham  <bfulgham@gmail.com>
2832
2833         Reviewed by Steve Falkenburg.
2834
2835         Add Cairo build requirements to WebCore.vcproj under a new
2836         set of targets.  Exclude Cairo elements from normal CG build.
2837         Exclude CG elements from Cairo builds.
2838         (http://bugs.webkit.org/show_bug.cgi?id=17300)
2839
2840         * WebCore.vcproj/WebCore.vcproj:
2841         * WebCore.vcproj/webcore.vsprops: Added.
2842
2843 2008-03-07  Darin Adler  <darin@apple.com>
2844
2845         Reviewed by Adam.
2846
2847         - eliminated WebCoreFrameBridge runOpenPanel
2848
2849         * page/ChromeClient.h: Added runOpenPanel function.
2850         * page/mac/ChromeMac.mm:
2851         (WebCore::ChromeClient::runOpenPanel): Added.
2852         * platform/FileChooser.cpp:
2853         (WebCore::FileChooser::FileChooser): Moved this here. It's no longer platform-specific.
2854         Also start the refcount at 1.
2855         (WebCore::FileChooser::create): Added adoptRef since the refcount no starts at one.
2856         (WebCore::FileChooser::~FileChooser): Moved here. No longer platform-specific.
2857         * platform/FileChooser.h: Removed m_controller, which was Macintosh-specific.
2858         * platform/gtk/FileChooserGtk.cpp: Removed FileChooser constructor and destructor,
2859         since they are no longer platform-specific.
2860         * platform/qt/FileChooserQt.cpp: Ditto.
2861         * platform/win/FileChooserWin.cpp: Ditto.
2862         * platform/wx/TemporaryLinkStubs.cpp: Ditto.
2863         * platform/mac/FileChooserMac.mm:
2864         (WebCore::FileChooser::openFileChooser): Call the chrome client instead of the
2865         bridge to run the open panel. Allows us to get rid of the WebCoreOpenPanelController
2866         class and m_controller data member and move the cosntrutor/destructor to platform-
2867         independent code.
2868
2869 2008-03-07  Adam Roben  <aroben@apple.com>
2870
2871         Add JavaScriptDebugServer
2872
2873         This class is a singleton which allows one or more
2874         JavaScriptDebugListeners to receive callbacks during JavaScript
2875         execution.
2876
2877         Right now all listeners receive callbacks for all Pages in the
2878         process. Eventually we will want to support listeners registering for
2879         callbacks for specific Pages (e.g., the Inspector will want to listen
2880         for execution in just the Page it's inspecting).
2881
2882         Pages notify the JavaScriptDebugServer when they are created so that
2883         it can install itself as the Page's debugger.
2884
2885         Reviewed by Darin.
2886
2887         * GNUMakefile.am: Added new files to project.
2888         * WebCore.pro: Ditto.
2889         * WebCore.vcproj/WebCore.vcproj: Ditto.
2890         * WebCore.xcodeproj/project.pbxproj: Ditto.
2891         * WebCoreSources.bkl: Ditto.
2892         * page/JavaScriptDebugListener.h: Added.
2893         * page/JavaScriptDebugServer.cpp: Added.
2894         (WebCore::toFrame):
2895         (WebCore::JavaScriptDebugServer::shared):
2896         (WebCore::JavaScriptDebugServer::JavaScriptDebugServer):
2897         (WebCore::JavaScriptDebugServer::~JavaScriptDebugServer):
2898         (WebCore::JavaScriptDebugServer::addListener): Registers as the
2899         debugger for all Pages if we're adding our first listener.
2900         (WebCore::JavaScriptDebugServer::removeListener): Deregisters as the
2901         debugger for all Pages if we're removing our last listner.
2902         (WebCore::JavaScriptDebugServer::pageCreated): Registers as the
2903         debugger for the newly created Page if we have any listeners.
2904         (WebCore::dispatchDidParseSource): Helper function.
2905         (WebCore::dispatchFailedToParseSource): Ditto.
2906         (WebCore::JavaScriptDebugServer::sourceParsed): Call
2907         dispatchDidParseSource or dispatchFailedToParseSource depending on
2908         whether there was an error or not.
2909         (WebCore::JavaScriptDebugServer::dispatchFunctionToListeners): Calls
2910         the passed-in JavaScriptExecutionCallback on each listener, guarding
2911         against re-entry.
2912         (WebCore::JavaScriptDebugServer::callEvent): Dispatch didEnterCallFrame.
2913         (WebCore::JavaScriptDebugServer::atStatement): Dispatch willExecuteStatement.
2914         (WebCore::JavaScriptDebugServer::returnEvent): Dispatch willLeaveCallFrame.
2915         (WebCore::JavaScriptDebugServer::exception): Dispatch exceptionWasRaised.
2916         * page/JavaScriptDebugServer.h: Added.
2917         * page/Page.cpp:
2918         (WebCore::Page::Page): Tell the shared JavaScriptDebugServer we were
2919         created so it can register as our debugger if needed.
2920
2921 2008-03-07  Darin Adler  <darin@apple.com>
2922
2923         Reviewed by Brady.
2924
2925         - fix a theoretical problem with the visited-link hash table by avoiding collision
2926           with the special "deleted" value
2927         - improve efficiency of with the visited-link hash table by not hashing twice
2928
2929         * page/PageGroup.cpp:
2930         (WebCore::avoidDeletedValue): Added. Makes sure we never try to use the "all ones"
2931         value, since the hash table uses that for deleted hash table entries.
2932         (WebCore::PageGroup::isLinkVisited): Call avoidDeletedValue before using the hash
2933         value with the HashSet.
2934         (WebCore::PageGroup::addVisitedLink): Ditto.
2935
2936         * page/PageGroup.h: Added a new hash function, AlreadyHashed, for unsigned integer
2937         values. This assumes that the value is already a hash value, and doesn't try to
2938         hash it again. Used this for m_visitedLinkHashes.
2939
2940 2008-03-07  Simon Hausmann  <hausmann@webkit.org>
2941
2942         Fix the Qt build.
2943
2944         * WebCore.pro:
2945
2946 2008-03-06  Sam Weinig  <sam@webkit.org> with a little help from Oliver Hunt  <oliver@apple.com>
2947
2948         Reviewed by Mitz.
2949
2950         Implement the HTML5 canvas tainting rules to prevent potential data leakage
2951
2952         Added originClean to HTMLCanvasElement and CanvasPattern
2953         to track whether a canvas (or pattern) is tainted by remote
2954         data.
2955         Use originClean flag to determine whether getImageData should
2956         return, well, image data.
2957
2958         Test: http/tests/security/canvas-remote-read-remote-image.html
2959
2960         * html/CanvasPattern.cpp:
2961         (WebCore::CanvasPattern::CanvasPattern):
2962         * html/CanvasPattern.h:
2963         * html/CanvasRenderingContext2D.cpp:
2964         (WebCore::CanvasRenderingContext2D::setStrokeStyle):
2965         (WebCore::CanvasRenderingContext2D::setFillStyle):
2966         (WebCore::CanvasRenderingContext2D::checkOrigin):
2967         (WebCore::CanvasRenderingContext2D::drawImage):
2968         (WebCore::CanvasRenderingContext2D::drawImageFromRect):
2969         (WebCore::CanvasRenderingContext2D::createPattern):
2970         (WebCore::CanvasRenderingContext2D::printSecurityExceptionMessage):
2971         (WebCore::CanvasRenderingContext2D::getImageData):
2972         * html/CanvasRenderingContext2D.h:
2973         * html/HTMLCanvasElement.cpp:
2974         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
2975         * html/HTMLCanvasElement.h:
2976         (WebCore::HTMLCanvasElement::setOriginTainted):
2977         (WebCore::HTMLCanvasElement::originClean):
2978
2979 2008-03-06  Anders Carlsson  <andersca@apple.com>
2980
2981         Reviewed by Jon.
2982
2983         Templatize the JNI call code to reduce the amount of code that has
2984         to be duplicated.
2985
2986         * bridge/jni/jni_class.cpp:
2987         (JavaClass::JavaClass):
2988         * bridge/jni/jni_instance.cpp:
2989         (JavaInstance::stringValue):
2990         (JavaInstance::numberValue):
2991         (JavaInstance::booleanValue):
2992         (JavaInstance::invokeMethod):
2993         * bridge/jni/jni_jsobject.cpp:
2994         (JavaJSObject::convertJObjectToValue):
2995         * bridge/jni/jni_runtime.cpp:
2996         (JavaField::JavaField):
2997         (JavaMethod::JavaMethod):
2998         * bridge/jni/jni_utility.cpp:
2999         * bridge/jni/jni_utility.h:
3000         (KJS::Bindings::):
3001         (KJS::Bindings::callJNIMethodIDA):
3002         (KJS::Bindings::callJNIMethodV):
3003         (KJS::Bindings::callJNIMethod):
3004         (KJS::Bindings::callJNIStaticMethod):
3005
3006 2008-03-06  Darin Adler  <darin@apple.com>
3007
3008         Reviewed by Mitz.
3009
3010         - fix regression test failures from the visited-link change
3011
3012         * WebCore.base.exp: Export PageGroup::setShouldTrackVisitedLinks.
3013         * page/PageGroup.cpp:
3014         (WebCore::PageGroup::addVisitedLink): Do nothing and return early
3015         if shouldTrackVisitedLinks is false.
3016         (WebCore::PageGroup::removeVisitedLinks): Reset m_visitedLinksPopulated
3017         so the next time a link is queried this will be populated from history.
3018         (WebCore::PageGroup::setShouldTrackVisitedLinks): Added.
3019         * page/PageGroup.h: Added setShouldTrackVisitedLinks. This is global
3020         for now, but it would be better if it was per-page-group instead.
3021
3022 2008-03-06  Adele Peterson  <adele@apple.com>
3023
3024         Reviewed by Darin.
3025
3026         Fixes for for <rdar://problem/5785892> Implement activeElement attribute for HTMLDocument (HTML5)
3027         and <rdar://problem/5785895> Implement hasFocus() for HTMLDocument (HTML5)
3028
3029         Tests: fast/dom/HTMLDocument/activeElement.html
3030                fast/dom/HTMLDocument/hasFocus.html
3031
3032         * html/HTMLDocument.cpp:
3033         (WebCore::HTMLDocument::activeElement): Added. Returns the focused element, or the body element if nothing's focused.
3034         (WebCore::HTMLDocument::hasFocus): Added. Returns whether or not the document has focus (inclusive of sub-frames).
3035         * html/HTMLDocument.h: Added methods for activeElement and hasFocus.
3036         * html/HTMLDocument.idl: Added definitions for activeElement and hasFocus.
3037
3038 2008-03-06  Dan Bernstein  <mitz@apple.com>
3039
3040         Reviewed by Darin Adler.
3041
3042         - fix <rdar://problem/5741981> 154008 WebKit: Some asian language font glyphs are not shown (in Mail and Entourage)
3043
3044         Test: fast/text/soft-hyphen-3.html
3045
3046         * rendering/bidi.cpp:
3047         (WebCore::checkMidpoints):
3048         (WebCore::RenderBlock::findNextLineBreak): Made 'pos' unsigned. Made the
3049         midpoint after a hyphen always be a valid iterator, not allowing an
3050         offset past the end of a text node. Changed the check for consecutive
3051         soft hyphens to account for that.
3052
3053 2008-03-06  Darin Adler  <darin@apple.com>
3054
3055         - try to fix Wx build
3056
3057         * WebCoreSources.bkl: Added PageGroup.cpp.
3058
3059 2008-03-06  Darin Adler  <darin@apple.com>
3060
3061         - fix some builds
3062
3063         * GNUmakefile.am: Added PageGroup.cpp.
3064         * WebCore.base.exp: Removed WebCoreHistory.
3065         * WebCore.pro: Added PageGroup.cpp.
3066
3067 2008-03-06  Alexey Proskuryakov  <ap@webkit.org>
3068
3069         Reviewed by Darin.
3070
3071         <rdar://problem/5687269> Need to create a Collator abstraction for WebCore and JavaScriptCore
3072         
3073         * ForwardingHeaders/wtf/unicode/Collator.h: Added.
3074         * xml/XSLTUnicodeSort.cpp:
3075         (WebCore::xsltUnicodeSortFunction):
3076         * xml/XSLTUnicodeSort.h:
3077
3078 2008-03-06  Darin Adler  <darin@apple.com>
3079
3080         Reviewed by Mitz.
3081
3082         - fix http://bugs.webkit.org/show_bug.cgi?id=17526
3083           REGRESSION: iframes are added to Safari's History menu
3084           by separating the visited link machinery from global history
3085
3086         This should also make page loading faster due to more efficient visited link coloring.
3087
3088         * WebCore.base.exp: Updated.
3089         * WebCore.vcproj/WebCore.vcproj: Added PageGroup.h/cpp, removed GlobalHistory.h/cpp.
3090         * WebCore.xcodeproj/project.pbxproj: Ditto. Also removed WebCoreHistory.h/m.
3091
3092         * css/CSSStyleSelector.cpp: Updated includes.
3093         (WebCore::CSSStyleSelector::initElementAndPseudoState): Eliminated code to set
3094         currentEncodedURL.
3095         (WebCore::checkPseudoState): Moved most of the code inside a new
3096         PageGroup::isLinkVisited function.
3097         (WebCore::CSSStyleSelector::canShareStyleWithElement): Tightened code a bit by using
3098         references and only getting colors when needed.
3099         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Ditto.
3100         * css/CSSStyleSelector.h: Removed EncodedURL, m_encodedURL, and setEncodedURL.
3101
3102         * dom/Document.cpp:
3103         (WebCore::Document::attach): Removed call to setEncodedURL.
3104         (WebCore::Document::setURL): Ditto.
3105         (WebCore::Document::recalcStyleSelector): Ditto.
3106
3107         * loader/FrameLoader.cpp:
3108         (WebCore::FrameLoader::addBackForwardItemClippedAtTarget): Changed code to use
3109         early exit idiom to be a little more readable.
3110         (WebCore::FrameLoader::urlsMatchItem): Change to use a reference for slightly
3111         better efficiency.
3112         (WebCore::FrameLoader::goToItem): Use early exit idiom to be a little more
3113         readable.
3114         (WebCore::FrameLoader::updateHistoryForStandardLoad): Moved history code back
3115         in here and got rid of the helper function updateGlobalHistory, restoring the
3116         logic before r30549. Also added a call to the new addVisitedLink function.
3117         (WebCore::FrameLoader::updateHistoryForClientRedirect): Added code to call
3118         addVisitedLink here.
3119         (WebCore::FrameLoader::updateHistoryForBackForwardNavigation): Removed comment.
3120         (WebCore::FrameLoader::updateHistoryForReload): Removed call to
3121         updateGlobalHistory; we can just go without updating global history or
3122         visited links here, at least for now, since it's not clear that a reload
3123         is a "history event".
3124         (WebCore::FrameLoader::updateHistoryForRedirectWithLockedHistory): Moved
3125         history code back where it was, and added the call to addVisitedLink, just
3126         as in updateHistoryForStandardLoad above.
3127         * loader/FrameLoader.h: Removed updateGlobalHistory function.
3128
3129         * page/Chrome.cpp:
3130         (WebCore::ChromeClient::populateVisitedLinks): Added. Empty placeholder so we
3131         don't have to implement this for every port all at once.
3132         (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer): Changed to use the
3133         new PageGroup class.
3134         * page/ChromeClient.h: Added populateVisitedLinks function, used to fill the
3135         visited links set from the global history at application startup time.
3136
3137         * page/FrameTree.cpp:
3138         (WebCore::FrameTree::find): Updated to use the new PageGroup class.
3139
3140         * page/GlobalHistory.h: Removed.
3141         * page/win/GlobalHistoryWin.cpp: Removed.
3142         * page/mac/GlobalHistoryMac.mm: Removed.
3143         * platform/mac/WebCoreHistory.h: Removed.
3144         * platform/mac/WebCoreHistory.m: Removed.
3145         * platform/win/WebCoreHistory.cpp: Removed.
3146         * platform/win/WebCoreHistory.h: Removed.
3147
3148         * page/Page.cpp:
3149         (WebCore::Page::Page): Set m_group to 0.
3150         (WebCore::Page::setGroupName): Set up m_group. If the page is not in any
3151         group, set it to 0 for now to postpone the cost of creating a group.
3152         (WebCore::Page::initGroup): Added. Sets m_group to point to a single-page
3153         group; used when getting a group.
3154         (WebCore::Page::removeAllVisitedLinks): Added. Calls removeVisitedLinks
3155         on all page groups.
3156         * page/Page.h: Moved enums inside the WebCore namespace. Removed the
3157         frameNamespace function and instead added the group and groupPtr functions.
3158
3159         * page/PageGroup.cpp: Added. Contains all the visited code from the
3160         CSSStyleSelector in the isVisitedLink function, but more efficient because
3161         we don't allocate memory for the buffer.
3162         * page/PageGroup.h: Added.
3163
3164         * platform/gtk/TemporaryLinkStubs.cpp: Removed historyContains.
3165         * platform/qt/TemporaryLinkStubs.cpp: Removed unneeded include.
3166         * platform/wx/TemporaryLinkStubs.cpp: Removed historyContains.
3167
3168 2008-03-06  Mark Rowe  <mrowe@apple.com>
3169
3170         Fix 64-bit Mac build.
3171
3172         * WebCore.xcodeproj/project.pbxproj:  Exclude _NPN symbols from the exports list as they
3173         are compiled out of 64-bit builds.
3174
3175 2008-03-06  Mark Rowe  <mrowe@apple.com>
3176
3177         Leopard build fix.
3178
3179         * WebCore.base.exp:
3180
3181 2008-03-05  Kevin Ollivier  <kevino@theolliviers.com>
3182
3183         Fix the wx build after the bindings move.
3184
3185         * WebCoreSources.bkl:
3186         * webcore-base.bkl:
3187         * webcore-wx.bkl:
3188
3189 2008-03-05  Dan Bernstein  <mitz@apple.com>
3190
3191         Reviewed by Adele Peterson.
3192
3193         - fix "background-position: inherit"
3194
3195         * css/CSSStyleSelector.cpp:
3196         Made HANDLE_MULTILAYER_INHERIT_AND_INITIAL fall through and added
3197         a return statement in HANDLE_MULTILAYER_VALUE. Also removed an unused
3198         macro.
3199
3200 2008-03-05  Alp Toker  <alp@atoker.com>
3201
3202         Add a missing make dependency for derived sources to improve
3203         autotools build dependency tracking.
3204
3205         Issue spotted by Ori Bernstein.
3206
3207         * GNUmakefile.am:
3208
3209 2008-03-05  Alp Toker  <alp@atoker.com>
3210
3211         GTK+ build fix for breakage introduced in r30800.
3212
3213         Track moved bridge sources from JavaScriptCore to WebCore.
3214
3215         * GNUmakefile.am:
3216
3217 2008-03-05  Justin Garcia  <justin.garcia@apple.com>
3218
3219         Reviewed by Darin.
3220
3221         One part of fix for:
3222         <rdar://problem/5780697> Copying content with percentage based rules in a style sheet will cause fidelity issues
3223
3224         * editing/markup.cpp:
3225         (WebCore::appendStartMarkup): Styles from matched rules should take precedence over those in
3226         inline style declarations, not the other way around. 
3227
3228 2008-03-05  Anders Carlsson  <andersca@apple.com>
3229
3230         Reviewed by Darin.
3231
3232         Move JNI specific code from runtime_root over to jni_jsobject, where it is used.
3233
3234         * bridge/jni/jni_jsobject.cpp:
3235         (completedJavaScriptAccess):
3236         (initializeJavaScriptAccessLock):
3237         (lockJavaScriptAccess):
3238         (unlockJavaScriptAccess):
3239         (dispatchToJavaScriptThread):
3240         (performJavaScriptAccess):
3241         (JavaJSObject::initializeJNIThreading):
3242         (isJavaScriptThread):
3243         (JavaJSObject::invoke):
3244         * bridge/jni/jni_jsobject.h:
3245         * bridge/runtime_root.cpp:
3246         * bridge/runtime_root.h:
3247         * page/mac/WebCoreFrameBridge.mm:
3248         (-[WebCoreFrameBridge init]):
3249
3250 2008-03-05  Darin Adler  <darin@apple.com>
3251
3252         Reviewed by Sam.
3253
3254         - add functions giving offsets within a KURL, slated to replace the
3255           EncodedURL object in CSSStyleSelector (in a future "visited link" change)
3256         - changed all KURL data members names to use the traditional m_ prefix
3257         - initialize all members to 0 in invalid KURLs rather than having all
3258           functions check m_isValid
3259
3260         * platform/KURL.cpp:
3261         (WebCore::KURL::invalidate): Added. Initializes all the fields except for
3262         m_string to the "invalid" values. For use in the empty constructor and
3263         in the init and parse functions.
3264         (WebCore::KURL::init): Tweaked comments. Changed all code paths that return
3265         early to use the invalidate() function. Updated for member variable name
3266         changes.
3267         (WebCore::KURL::hasPath): Updated for member variable name changes.
3268         Remove now-unneeded check of m_isValid.
3269         (WebCore::KURL::lastPathComponent): Ditto.
3270         (WebCore::KURL::protocol): Ditto.
3271         (WebCore::KURL::host): Ditto.
3272         (WebCore::KURL::port): Ditto.
3273         (WebCore::KURL::pass): Ditto.
3274         (WebCore::KURL::user): Ditto.
3275         (WebCore::KURL::ref): Ditto.
3276         (WebCore::KURL::hasRef): Ditto.
3277         (WebCore::KURL::protocolIs): Ditto.
3278         (WebCore::KURL::query): Ditto.
3279         (WebCore::KURL::path): Ditto.
3280         (WebCore::KURL::setProtocol): Ditto.
3281         (WebCore::KURL::setHost): Ditto.
3282         (WebCore::KURL::setPort): Ditto.
3283         (WebCore::KURL::setHostAndPort): Ditto.
3284         (WebCore::KURL::setUser): Ditto.
3285         (WebCore::KURL::setPass): Ditto.
3286         (WebCore::KURL::setRef): Ditto.
3287         (WebCore::KURL::setQuery): Ditto.
3288         (WebCore::KURL::setPath): Ditto.
3289         (WebCore::KURL::prettyURL): Ditto.
3290         (WebCore::copyPathRemovingDots): Removed braces to match our code style.
3291         (WebCore::KURL::parse): Changed all code paths that return early to use
3292         the invalidate function. Moved code to set m_isValid to true to the very
3293         end of the function. Removed braces to match our code style. Removed an
3294         extra copy of the path/query/fragment code (there were two identical copies
3295         in the two sides of an if statement). Removed some commented-out code.
3296         Reversed an if statment. Added code to set the new m_pathAfterLastSlash
3297         field. Updated for member variable name changes.
3298         (WebCore::equalIgnoringRef): Updated for member variable name changes.
3299         (WebCore::KURL::isHierarchical): Ditto.
3300
3301         * platform/KURL.h: Added a FIXME about ref vs. fragment. Made the empty
3302         constructor inline and called the new invalidate function. Added new
3303         pathStart, pathEnd, and pathAfterLastSlash functions, for use in the
3304         new visited link code. Added an invalidate function. Renamed all the
3305         data members to use the m_ prefix.
3306
3307         * WebCore.base.exp: Updated.
3308
3309 2008-03-05  Anders Carlsson  <andersca@apple.com>
3310
3311         Reviewed by Sam.
3312
3313         * WebCore.xcodeproj/project.pbxproj:
3314         Change jni_jsobject.cpp to be Obj-C++ for now. The plan is to merge 
3315         this with jni_objc.mm and create jni_jsobject.mm.
3316         
3317         * bridge/jni/jni_jsobject.cpp:
3318         (createRootObject):
3319         Move createRootObject here from WebCoreFrameBridge.
3320         
3321         (JavaJSObject::createNative):
3322         Call the newly added createRootObject function.
3323         
3324         * bridge/runtime_root.cpp:
3325         (KJS::Bindings::RootObject::initializeJNIThreading):
3326         * bridge/runtime_root.h:
3327         setCreateRootObject no longer takes a root object, rename it to initializeJNIThreading.
3328
3329         * page/mac/FrameMac.mm:
3330         (WebCore::Frame::createScriptInstanceForWidget):
3331         Just call Frame::createRootObject here.
3332         
3333         * page/mac/WebCoreFrameBridge.mm:
3334         (-[WebCoreFrameBridge init]):
3335         Call initializeJNIThreading.
3336
3337 2008-03-05  Anders Carlsson  <andersca@apple.com>
3338
3339         Reviewed by Sam.
3340
3341         Change some static class variables to be regular static variables,
3342         making it easier to move the chunk of mac-specific code out of runtime_root.[cpp|h]
3343
3344         * bridge/runtime_root.cpp:
3345         (KJS::Bindings::completedJavaScriptAccess):
3346         (KJS::Bindings::RootObject::dispatchToJavaScriptThread):
3347         (KJS::Bindings::performJavaScriptAccess):
3348         (KJS::Bindings::RootObject::createRootObject):
3349         (KJS::Bindings::RootObject::runLoop):
3350         (KJS::Bindings::RootObject::setCreateRootObject):
3351         * bridge/runtime_root.h:
3352
3353 2008-03-05  Brent Fulgham <bfulgham@gmail.com>
3354
3355         Reviewed by Adam Roben.
3356
3357         Modify source files to use the USE(SAFARI_THEME) macro, rather than
3358         USE_SAFARI_THEME.  (http://bugs.webkit.org/show_bug.cgi?id=17683)
3359
3360         * WebCore/platform/win/PlatformScrollBarSafari.cpp
3361         * WebCore/rendering/RenderThemeSafari.cpp
3362         * WebCore/rendering/RenderThemeSafari.h
3363         * config.h: Move definition of WTF_USE_SAFARI_THEME here 
3364
3365 2008-03-05  Brady Eidson  <beidson@apple.com>
3366
3367         Reviewed by Alexey and Mark Rowe
3368
3369         Fix for <rdar://problem/5778247> - Reproducible crash on storage/execute-sql-args.html
3370
3371         DatabaseThread::unscheduleDatabaseTasks() manually filters through a MessageQueue,
3372         removing particular items for Databases that were shutting down.
3373
3374         This filtering operation is not atomic, and therefore causes a race condition with the
3375         database thread waking up and reading from the message queue.  
3376
3377         The end result was an attempt to dereference a null DatabaseTask.  Timing-wise, this never
3378         seemed to happen in a debug build, otherwise an assertion would've caught it.  Replacing that
3379         assertion with a crash in a release build is what revealed this bug.
3380
3381         The fix for the above symptom was entirely in WTF::MessageQueue in JSCore.  With this fix in 
3382         place, another crash popped up in the layout tests that was related to dereferencing a 
3383         deallocated object - simply because SQLTransaction had a raw pointer to it's Database object 
3384         when it needed to be a ref pointer.
3385
3386         * storage/SQLTransaction.cpp:
3387         (WebCore::SQLTransaction::runCurrentStatement):
3388         * storage/SQLTransaction.h: Change m_database to be a RefPtr
3389         (WebCore::SQLTransaction::database):
3390
3391 2008-03-05  Mark Rowe  <mrowe@apple.com>
3392
3393         Build fix.
3394
3395         * WebCore.base.exp:  Remove symbol that no longer exists from the exports file.
3396
3397 2008-03-05  Adam Roben  <aroben@apple.com>
3398
3399         Export a header/symbol for WebKit
3400
3401         Reviewed by Kevin M.
3402
3403         * WebCore.base.exp:
3404         * WebCore.xcodeproj/project.pbxproj:
3405
3406 2008-03-05  Adam Roben  <aroben@apple.com>
3407
3408         Move WebCoreScriptDebugger up to WebKit
3409
3410         Reviewed by Darin.
3411
3412         * WebCore.base.exp: Exported some functions used by
3413         WebCoreScriptDebugger, and sorted the list.
3414         * WebCore.xcodeproj/project.pbxproj: Removed
3415         WebCoreScriptDebugger.{h,mm} from the project and marked
3416         a few headers private so that WebKit can use them.
3417         * page/mac/WebCoreScriptDebugger.h: Removed.
3418         * page/mac/WebCoreScriptDebugger.mm: Removed.
3419
3420 2008-03-05  Anders Carlsson  <andersca@apple.com>
3421
3422         Build bridge/. Copy some headers over to WebKit as part of the post-build step.
3423         
3424         * WebCore.vcproj/WebCore.vcproj:
3425
3426 2008-03-05  Anders Carlsson  <andersca@apple.com>
3427
3428         Reviewed by Geoff.
3429
3430         * WebCore.base.exp:
3431         Add the NPN and KJS methods.
3432         
3433         * WebCore.xcodeproj/project.pbxproj:
3434         Bring in bridge/
3435
3436         * config.h:
3437         Add HAVE_JNI define.
3438         
3439         * bindings/js/kjs_html.cpp:
3440         * bindings/objc/DOMInternal.mm:
3441         * bindings/objc/DOMUtility.mm:
3442         * bindings/objc/WebScriptObject.mm:
3443         * html/HTMLAppletElement.cpp:
3444         * html/HTMLEmbedElement.cpp:
3445         * html/HTMLObjectElement.cpp:
3446         * html/HTMLPlugInElement.cpp:
3447         * page/Frame.cpp:
3448         * page/mac/FrameMac.mm:
3449         * page/mac/WebCoreFrameBridge.mm:
3450         * page/mac/WebCoreScriptDebugger.mm:
3451         * plugins/win/PluginViewWin.cpp:
3452         Include file changes.
3453
3454 2008-03-04  Anders Carlsson  <andersca@apple.com>
3455
3456         Reviewed by Sam.
3457
3458         Rewrite NPRuntime string conversion routines to use WebCore::String
3459         
3460         * bridge/NP_jsobject.cpp:
3461         (_NPN_Evaluate):
3462         * bridge/c/c_utility.cpp:
3463         (KJS::Bindings::convertUTF8ToUTF16WithLatin1Fallback):
3464         (KJS::Bindings::convertNPVariantToValue):
3465         (KJS::Bindings::convertNPStringToUTF16):
3466         (KJS::Bindings::identifierFromNPIdentifier):
3467         * bridge/c/c_utility.h:
3468
3469 2008-03-05  Oliver Hunt  <oliver@apple.com>
3470
3471         Reviewed by Alexey P.
3472
3473         Small performance improvement to putImageData (3-5% on assignment in my tests)
3474
3475         * html/CanvasPixelArray.h:
3476         (WebCore::CanvasPixelArray::set):
3477
3478 2008-03-04  Sam Weinig  <sam@webkit.org>
3479
3480         Reviewed by Adele.
3481
3482         * bindings/js/JSXMLHttpRequest.h: Remove unnecessary override of toBoolean.
3483
3484 2008-03-04  Maciej Stachowiak  <mjs@apple.com>
3485
3486         Reviewed by Sam and Oliver.
3487
3488         - fixed http://bugs.webkit.org/show_bug.cgi?id=16289
3489         - fixed Acid3 tests 26 and 27 (not exactly the same issue but related)
3490
3491         * bindings/js/JSNodeCustom.cpp:
3492         (WebCore::JSNode::mark): When marking a node that's in-document,
3493         mark the owner document if it hasn't been already. This means holding on
3494         to a single node from an unreferenced document now keeps the whole document alive.
3495         
3496         We are now at 90/100 on Acid3.
3497
3498 2008-03-04  Sam Weinig  <sam@webkit.org>
3499
3500         Qt build fix.
3501
3502         * page/qt/FrameQt.cpp:
3503
3504 2008-03-04  Sam Weinig  <sam@webkit.org>
3505
3506         Reviewed by Mark Rowe.
3507
3508         Rename kjs_window to JSDOMWindowBase.
3509
3510         - Remove all unnecessary includes of JSDOMWindowBase.h, we prefer including
3511           JSDOMWindow.h
3512
3513         * ChangeLog:
3514         * DerivedSources.make:
3515         * GNUmakefile.am:
3516         * WebCore.pro:
3517         * WebCore.vcproj/WebCore.vcproj:
3518         * WebCore.xcodeproj/project.pbxproj:
3519         * WebCoreSources.bkl:
3520         * bindings/js/JSCustomVoidCallback.cpp:
3521         * bindings/js/JSCustomXPathNSResolver.cpp:
3522         * bindings/js/JSDOMWindowBase.cpp: Copied from bindings/js/kjs_window.cpp.
3523         * bindings/js/JSDOMWindowBase.h: Copied from bindings/js/kjs_window.h.
3524         * bindings/js/JSDOMWindowCustom.cpp:
3525         * bindings/js/JSDatabaseCustom.cpp:
3526         * bindings/js/JSEventTargetBase.cpp:
3527         * bindings/js/JSEventTargetBase.h:
3528         * bindings/js/JSEventTargetNode.cpp:
3529         * bindings/js/JSHTMLDocumentCustom.cpp:
3530         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
3531         * bindings/js/JSHistoryCustom.cpp:
3532         * bindings/js/JSLocation.cpp:
3533         * bindings/js/JSSQLTransactionCustom.cpp:
3534         * bindings/js/JSXMLHttpRequest.cpp:
3535         * bindings/js/ScheduledAction.cpp:
3536         * bindings/js/kjs_binding.cpp:
3537         * bindings/js/kjs_events.cpp:
3538         * bindings/js/kjs_navigator.cpp:
3539         * bindings/js/kjs_proxy.cpp:
3540         * bindings/js/kjs_window.cpp: Removed.
3541         * bindings/js/kjs_window.h: Removed.
3542         * bindings/scripts/CodeGeneratorJS.pm:
3543         * history/CachedPage.cpp:
3544         * loader/FrameLoader.cpp:
3545         * page/Chrome.cpp:
3546         * page/InspectorController.cpp:
3547         * page/mac/FrameMac.mm:
3548         * page/mac/WebCoreFrameBridge.mm:
3549         * page/qt/FrameQt.cpp:
3550         * page/win/FrameWin.cpp:
3551         * plugins/win/PluginViewWin.cpp:
3552
3553 2008-03-04  Mark Rowe  <mrowe@apple.com>
3554
3555         Speculative Qt build fix.
3556
3557         * platform/qt/PasteboardQt.cpp:
3558
3559 2008-03-04  Anders Carlsson  <andersca@apple.com>
3560
3561         Reviewed by Sam.
3562
3563         Update include paths. This code is not used yet.
3564
3565         * bridge/NP_jsobject.cpp:
3566         * bridge/c/c_class.cpp:
3567         * bridge/c/c_instance.cpp:
3568         * bridge/c/c_utility.cpp:
3569         (KJS::Bindings::convertUTF8ToUTF16WithLatin1Fallback):
3570         #if 0 this out for now. 
3571         
3572         * bridge/jni/jni_class.cpp:
3573         * bridge/jni/jni_jsobject.cpp:
3574         * bridge/jni/jni_objc.mm:
3575         * bridge/jni/jni_runtime.cpp:
3576         * bridge/jni/jni_utility.cpp:
3577         * bridge/jni/jni_utility.h:
3578         * bridge/npruntime.cpp:
3579         * bridge/objc/WebScriptObject.h:
3580         * bridge/objc/objc_class.h:
3581         * bridge/objc/objc_instance.h:
3582         * bridge/objc/objc_runtime.h:
3583         * bridge/objc/objc_utility.h:
3584         * bridge/objc/objc_utility.mm:
3585         * bridge/runtime.cpp:
3586         * bridge/runtime.h:
3587         * bridge/runtime_array.cpp:
3588         * bridge/runtime_array.h:
3589         * bridge/runtime_method.cpp:
3590         * bridge/runtime_method.h:
3591         * bridge/runtime_object.cpp:
3592         * bridge/runtime_object.h:
3593         * bridge/runtime_root.cpp:
3594         * bridge/runtime_root.h:
3595
3596 2008-03-04  Dan Bernstein  <mitz@apple.com>
3597
3598         Reviewed by Darin Adler.
3599
3600         - fix http://bugs.webkit.org/show_bug.cgi?id=17676
3601           <rdar://problem/5781091> REGRESSION (r30240-r30267): href attribute values with non-ASCII characters in the host part do not work
3602
3603         Test: fast/encoding/url-host-name-non-ascii.html
3604
3605         * platform/KURL.cpp:
3606         (WebCore::appendEncodedHostname): Added an early return in the all-ASCII
3607         case to avoid copying the host name twice and corrected the error
3608         checking after calling uidna_IDNToASCII().
3609
3610 2008-03-04  Sam Weinig  <sam@webkit.org>
3611
3612         Reviewed by Dan Bernstein.
3613
3614         Use JSDOMWindow exclusively instead of JSDOMWindowBase.
3615
3616         * bindings/js/ScheduledAction.cpp:
3617         (WebCore::ScheduledAction::execute):
3618         * bindings/js/ScheduledAction.h:
3619         * bindings/js/kjs_window.cpp:
3620         (WebCore::JSDOMWindowBase::timerFired):
3621
3622 2008-03-04  Timothy Hatcher  <timothy@apple.com>
3623
3624         Reviewed by Darin Adler.
3625
3626         <rdar://problem/5720160> Browser windows "do nothing" while modal
3627         dialog or menu is up due to run loop modes (or while scrolling)
3628
3629         Adds a new SchedulePair object that holds a runloop and the mode to use.
3630         A HashSet of SchedulePairs is tracked by Page so it can be used for resource
3631         loading and, in the future, maybe SharedTimerMac.
3632
3633         * WebCore.base.exp: Add new exports for WebKit.
3634         * WebCore.xcodeproj/project.pbxproj: Add new files.
3635         * loader/mac/DocumentLoaderMac.cpp: Added.
3636         (WebCore::scheduleAll): Call schedule all the ResourceLoader handles.
3637         (WebCore::unscheduleAll): Call unschedule all the ResourceLoader handles.
3638         (WebCore::DocumentLoader::schedule): Schedule all the ResourceLoaders owned by the DocumentLoader.
3639         (WebCore::DocumentLoader::unschedule): Unschedule all the ResourceLoaders owned by the DocumentLoader.
3640         * loader/DocumentLoader.h:
3641         * page/Page.h:
3642         (WebCore::Page::scheduledRunLoopPairs): Return m_scheduledRunLoopPairs.
3643         * page/mac/PageMac.cpp:
3644         (WebCore::Page::addSchedulePair): Add a SchedulePair to m_scheduledRunLoopPairs.
3645         (WebCore::Page::removeSchedulePair): Removes a SchedulePair from m_scheduledRunLoopPairs.
3646         * platform/cf/SchedulePair.cpp: Added.
3647         * platform/cf/SchedulePair.h: Added.
3648         * platform/mac/SchedulePairMac.mm: Added.
3649         * platform/network/ResourceHandle.h:
3650         * platform/network/mac/FormDataStreamMac.mm:
3651         (WebCore::advanceCurrentStream): Use the new SchedulePair.
3652         (WebCore::formCreate): Ditto.
3653         (WebCore::formFinalize): Ditto.
3654         (WebCore::formSchedule): Ditto.
3655         (WebCore::formUnschedule): Ditto.
3656         * platform/network/mac/ResourceHandleMac.mm:
3657         (WebCore::ResourceHandle::start): Schedule the connection with all the SchedulePairs
3658         that Page holds. If Page has no SchedulePairs, schedule with the current runloop, and
3659         pick the mode based on ResourceHandle::loadsDuringCommonRunLoopModes.
3660         (WebCore::ResourceHandle::schedule):
3661         (WebCore::ResourceHandle::unschedule):
3662
3663 2008-03-04  Sam Weinig  <sam@webkit.org>
3664
3665         Reviewed by Darin Adler.
3666
3667         Rename kjs_css to JSRGBColor.
3668
3669         * DerivedSources.make:
3670         * GNUmakefile.am:
3671         * WebCore.pro:
3672         * WebCore.vcproj/WebCore.vcproj:
3673         * WebCore.xcodeproj/project.pbxproj:
3674         * WebCoreSources.bkl:
3675         * bindings/js/JSRGBColor.cpp: Copied from bindings/js/kjs_css.cpp.
3676         * bindings/js/JSRGBColor.h: Copied from bindings/js/kjs_css.h.
3677         * bindings/js/kjs_css.cpp: Removed.
3678         * bindings/js/kjs_css.h: Removed.
3679         * bindings/js/kjs_window.cpp:
3680         * bindings/objc/DOMUtility.mm:
3681         * bindings/scripts/CodeGeneratorJS.pm:
3682
3683 2008-03-04  Anders Carlsson  <andersca@apple.com>
3684
3685         Fix 64-bit build.
3686         
3687         * html/HTMLPlugInElement.cpp:
3688
3689 2008-03-04  Nikolas Zimmermann  <zimmermann@kde.org>
3690
3691         Reviewed by Eric & David.
3692
3693         Fixes: http://bugs.webkit.org/show_bug.cgi?id=17078
3694
3695         Fix getSubStringLength() handling, verified by Acid3 test 77.
3696         Brings up Acid3 score to 88/100.
3697
3698         Added test: svg/custom/acid3-test-77.html
3699                     svg/custom/getSubStringLength.html
3700
3701         * svg/SVGTextContentElement.cpp:
3702         (WebCore::cummulatedCharacterRangeLength): Simplify some code.
3703         (WebCore::SVGTextContentElement::getSubStringLength):
3704
3705 2008-03-04  Anders Carlsson  <andersca@apple.com>
3706
3707         Mac build fix. Neither me, Sam nor Adam know why we need to do this though :(
3708
3709         * bindings/js/kjs_proxy.cpp:
3710         (WebCore::KJSProxy::attachDebugger):
3711         * page/Page.cpp:
3712         (WebCore::Page::setDebuggerForAllPages):
3713         (WebCore::Page::setDebugger):
3714
3715 2008-03-04  Adam Roben  <aroben@apple.com>
3716
3717         Add ExecState.h to ForwardingHeaders
3718
3719         Reviewed by Anders.
3720
3721         * ForwardingHeaders/kjs/ExecState.h: Added.
3722         * page/Page.cpp: Touch this to force WebCore to build and the headers
3723         to be copied.
3724
3725 2008-03-04  Adam Roben  <aroben@apple.com>
3726
3727         Make it possible to set a KJS::Debugger on all Frames in a Page and
3728         all Pages in the process
3729
3730         Reviewed by Kevin M.
3731
3732         * ForwardingHeaders/kjs/debugger.h: Added.
3733         * bindings/js/kjs_proxy.cpp:
3734         (WebCore::KJSProxy::initScript): Attach the Page's debugger if there
3735         is one.
3736         (WebCore::KJSProxy::attachDebugger): Attach the passed-in debugger, or
3737         detach any existing debugger if none was passed in.
3738         * bindings/js/kjs_proxy.h:
3739         * page/Page.cpp:
3740         (WebCore::Page::Page): Initialize new member.
3741         (WebCore::Page::setDebuggerForAllPages): Call setDebugger on each Page
3742         in the process.
3743         (WebCore::Page::setDebugger): Store the debugger and pass it off to
3744         all our Frames.
3745         * page/Page.h:
3746
3747 2008-03-04  Sam Weinig  <sam@webkit.org>
3748
3749         Reviewed by Darin Adler.
3750
3751         Add ClassInfo to custom constructors so that they toString properly
3752
3753         - Take this chance to remove the "Imp" from the end of JSXMLHttpRequestConstructorImp,
3754           and XSLTProcessorConstructorImp and prefix all the classes with JS. 
3755
3756         * bindings/js/JSAudioConstructor.cpp:
3757         (WebCore::): Added ClassInfo definition.
3758         (WebCore::JSAudioConstructor::JSAudioConstructor):
3759         (WebCore::JSAudioConstructor::construct): Cleanup.
3760         * bindings/js/JSAudioConstructor.h: Rename m_doc to m_document.
3761         (WebCore::JSAudioConstructor::classInfo): Added.
3762
3763         * bindings/js/JSHTMLInputElementBase.cpp: Rename HTMLInputElementBasePrototype 
3764         to JSHTMLInputElementBasePrototype as seen if toString'ed.
3765         (WebCore::):
3766
3767         * bindings/js/JSHTMLOptionElementConstructor.cpp:
3768         (WebCore::): Added ClassInfo definition.
3769         * bindings/js/JSHTMLOptionElementConstructor.h:
3770         (WebCore::JSHTMLOptionElementConstructor::classInfo): Added.
3771
3772         * bindings/js/JSImageConstructor.cpp:
3773         (WebCore::): Added ClassInfo definition.
3774         (WebCore::JSImageConstructor::implementsConstruct): Moved here from header.
3775         * bindings/js/JSImageConstructor.h:
3776         (WebCore::JSImageConstructor::classInfo): Added.
3777
3778         * bindings/js/JSXMLHttpRequest.cpp:
3779         (WebCore::): Rename XMLHttpRequestPrototype  to JSXMLHttpRequestPrototype 
3780         as seen if toString'ed.
3781         (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor):
3782         (WebCore::JSXMLHttpRequestConstructor::implementsConstruct):
3783         (WebCore::JSXMLHttpRequestConstructor::construct):
3784         * bindings/js/JSXMLHttpRequest.h: Renamed JSXMLHttpRequestConstructorImp to
3785         JSXMLHttpRequestConstructor and doc to m_document and 
3786         (WebCore::JSXMLHttpRequestConstructor::classInfo): Added.
3787
3788         * bindings/js/JSXSLTProcessor.cpp:
3789         (WebCore::): Renamed XSLTProcessorPrototype to JSXSLTProcessorPrototype and 
3790         XSLTProcessorConstructorImp to JSXSLTProcessorConstructor.
3791         (WebCore::JSXSLTProcessorConstructor::JSXSLTProcessorConstructor):
3792         (WebCore::JSXSLTProcessorConstructor::implementsConstruct):
3793         (WebCore::JSXSLTProcessorConstructor::construct):
3794         * bindings/js/JSXSLTProcessor.h:
3795         (WebCore::JSXSLTProcessorConstructor::classInfo): Added.
3796
3797         * bindings/js/kjs_window.cpp:
3798         (WebCore::JSDOMWindowBase::getValueProperty): Fixed to work with the new class names.
3799
3800 2008-03-04  Dan Bernstein  <mitz@apple.com>
3801
3802         Reviewed by Oliver Hunt and Geoffrey Garen.
3803
3804         - fix http://bugs.webkit.org/show_bug.cgi?id=17667
3805           <rdar://problem/5779658> REGRESSION (r30587): Document::implicitClose() not called when done loading page (Image does not get scaled to fit)
3806
3807         * loader/loader.cpp:
3808         (WebCore::Loader::didFinishLoading): Changed to call
3809         setLoadInProgress(false) even for 4xx errors, because that triggers
3810         load completion check.
3811
3812 2008-03-04  Adele Peterson  <adele@apple.com>
3813
3814         Reviewed by Beth.
3815
3816         Fix for <rdar://problem/5779718> focus() does not work for anchor elements with no content
3817
3818         If an anchor has zero size, don't exclude it from being focusable from JS, just exclude it
3819         from being keyboard focusable (using the tab key).
3820
3821         * html/HTMLAnchorElement.cpp:
3822         (WebCore::HTMLAnchorElement::isFocusable):
3823         (WebCore::HTMLAnchorElement::isKeyboardFocusable):
3824
3825 2008-03-04  Chris Fleizach  <cfleizach@apple.com>
3826
3827         Reviewed by Darin Adler.
3828
3829         - fix <rdar://problem/5119360> ER - Seed: Google results do not have AXHeading information
3830
3831         * page/mac/WebCoreAXObject.mm:
3832         (headingLevel):
3833         (-[WebCoreAXObject accessibilityIsIgnored]):
3834
3835 2008-03-04  Sam Weinig  <sam@webkit.org>
3836
3837         GTK+ build fix.
3838
3839         * GNUmakefile.am:
3840
3841 2008-03-04  Sam Weinig  <sam@webkit.org>
3842
3843         Reviewed by Darin Adler.
3844
3845         Remame ImageConstructorImp to JSImageConstructor and move it into its
3846         own file.
3847
3848         * GNUmakefile.am:
3849         * WebCore.pro:
3850         * WebCore.vcproj/WebCore.vcproj:
3851         * WebCore.xcodeproj/project.pbxproj:
3852         * WebCoreSources.bkl:
3853         * bindings/js/JSImageConstructor.cpp: Copied from bindings/js/kjs_html.cpp.
3854         (WebCore::JSImageConstructor::JSImageConstructor):
3855         (WebCore::JSImageConstructor::construct):
3856         * bindings/js/JSImageConstructor.h: Copied from bindings/js/kjs_html.h.
3857         * bindings/js/kjs_html.cpp:
3858         (WebCore::getRuntimeObject): Make this function static since it is only used
3859         in this file.
3860         * bindings/js/kjs_html.h:
3861         * bindings/js/kjs_window.cpp:
3862         (WebCore::JSDOMWindowBase::getValueProperty):
3863
3864 2008-03-04  Adam Roben  <aroben@apple.com>
3865
3866         Fix an uninitialized value warning in CodeGeneratorJS.pm
3867
3868         * bindings/scripts/CodeGeneratorJS.pm: Remove reference to
3869         non-existent $maybeOkParam (this was removed in r30753).
3870
3871 2008-03-04  Sam Weinig  <sam@webkit.org>
3872
3873         Reviewed by Darin Adler.
3874
3875         Remove kjs_dom.{h,cpp}.
3876
3877         - Removed custom toAttr, which took a boolean ok, and teach CodeGeneratorJS.pm
3878           to us a null return value as an indication of failure. (This new logic is used
3879           for toVoidCallback as well.)
3880         - Move getRuntimeObject to kjs_html where a bunch of other runtime object related
3881           functions currently live.
3882         - Move checkNodeSecurity to kjs_binding, where other frame security functions 
3883           currently live.
3884         - Remove getNodeConstructor.  It had no implementation.
3885
3886         * GNUmakefile.am:
3887         * WebCore.pro:
3888         * WebCore.vcproj/WebCore.vcproj:
3889         * WebCore.xcodeproj/project.pbxproj:
3890         * WebCoreSources.bkl:
3891         * bindings/js/JSAttrCustom.cpp:
3892         * bindings/js/JSCustomVoidCallback.cpp:
3893         (WebCore::toVoidCallback):
3894         * bindings/js/JSCustomVoidCallback.h:
3895         * bindings/js/JSDatabaseCustom.cpp:
3896         (WebCore::JSDatabase::changeVersion):
3897         (WebCore::JSDatabase::transaction):
3898         * bindings/js/JSElementCustom.cpp:
3899         (WebCore::JSElement::setAttributeNode):
3900         (WebCore::JSElement::setAttributeNodeNS):
3901         * bindings/js/JSEventTargetBase.cpp:
3902         (WebCore::toJS):
3903         * bindings/js/JSEventTargetBase.h:
3904         * bindings/js/JSHTMLAppletElementCustom.cpp:
3905         * bindings/js/JSHTMLElementCustom.cpp:
3906         * bindings/js/JSHTMLEmbedElementCustom.cpp:
3907         * bindings/js/JSHTMLFormElementCustom.cpp:
3908         * bindings/js/JSHTMLFrameElementCustom.cpp:
3909         * bindings/js/JSHTMLIFrameElementCustom.cpp:
3910         * bindings/js/JSHTMLObjectElementCustom.cpp:
3911         * bindings/js/JSNamedNodeMapCustom.cpp:
3912         * bindings/js/JSNamedNodesCollection.cpp:
3913         * bindings/js/JSNodeFilterCustom.cpp:
3914         * bindings/js/JSXSLTProcessor.cpp:
3915         * bindings/js/kjs_binding.cpp:
3916         (WebCore::checkNodeSecurity):
3917         * bindings/js/kjs_binding.h:
3918         * bindings/js/kjs_css.cpp:
3919         * bindings/js/kjs_dom.cpp: Removed.
3920         * bindings/js/kjs_dom.h: Removed.
3921         * bindings/js/kjs_events.cpp:
3922         * bindings/js/kjs_html.cpp:
3923         (WebCore::getRuntimeObject):
3924         * bindings/js/kjs_html.h:
3925         * bindings/js/kjs_window.cpp:
3926         * bindings/scripts/CodeGeneratorJS.pm:
3927         * dom/Attr.idl:
3928         * html/HTMLPlugInElement.cpp:
3929         * page/InspectorController.cpp:
3930
3931 2008-03-04  Adam Roben  <aroben@apple.com>
3932
3933         Win/Qt/GTK+/wx build fix after r30740
3934
3935         * editing/Editor.cpp: Added missing #include.
3936         * page/qt/FrameQt.cpp: Removed Frame::dashboardRegionsChanged.
3937         * page/win/FrameWin.cpp: Ditto.
3938         * platform/wx/TemporaryLinkStubs.cpp: Ditto.
3939
3940 2008-03-04  Alp Toker  <alp@atoker.com>
3941
3942         GTK+ build fix for breakage introduced in r30740.
3943
3944         Remove Frame::dashboardRegionsChanged(). There's now a default
3945         implementation at ChromeClient::dashboardRegionsChanged().
3946
3947         * page/gtk/FrameGtk.cpp:
3948
3949 2008-03-04  Alp Toker  <alp@atoker.com>
3950
3951         GTK+ build fix suggested by aroben. Remove an unused Mac-specific
3952         included introduced in r30740.
3953
3954         * page/ChromeClient.h:
3955
3956 2008-03-04  Dan Bernstein  <mitz@apple.com>
3957
3958         Reviewed by Sam Weinig.
3959
3960         - fix <rdar://problem/5622336> Burmese text does not render on http://www.myanmarbible.com/bible/Judson/html/index.html
3961
3962         Test: platform/win/fast/text/uniscribe-missing-glyph.html
3963
3964         Note that default installations of Windows do not have Myanmar fonts.
3965         What this patch does is ensure that the Myanmar and other complex
3966         scripts are rendered as missing glyphs rather than not rendered at all.
3967         The particular page in the bug measures the relative widths of two
3968         rendered strings and, if they are rendered as missing glyphs, detects
3969         that a Myanmar fonts is not available and substitutes the text with
3970         images. By not rendering (and measuring) missing glyphs, WebKit was
3971         throwing the page's detection code off.
3972
3973         * platform/graphics/win/UniscribeController.cpp:
3974         (WebCore::UniscribeController::shape): Removed an early return in case
3975         shaping resulted in missing glyphs. This is now expected if font
3976         fallback failed to produce a font containing glyphs for the character.
3977         Also changed two resize()s to shrink()s.
3978
3979 2008-03-04  Darin Adler  <darin@apple.com>
3980
3981         Reviewed by Adam.
3982
3983         - remove WebCoreFrameBridge reapplyStyles method
3984
3985         * WebCore.base.exp: Added exports.
3986         * page/mac/WebCoreFrameBridge.h: Removed WebCoreDeviceType and
3987         reapplyStylesForDeviceType: method.
3988         * page/mac/WebCoreFrameBridge.mm: Ditto.
3989
3990 2008-03-04  Darin Adler  <darin@apple.com>
3991
3992         Reviewed by Adam.
3993
3994         - eliminate WebCoreFrameBridge createFrameViewWithNSView
3995
3996         * WebCore.base.exp: Added some more exports.
3997         * page/mac/WebCoreFrameBridge.h: Deleted createFrameViewWithNSView.
3998         * page/mac/WebCoreFrameBridge.mm: Ditto.
3999
4000 2008-03-04  Darin Adler  <darin@apple.com>
4001
4002         Reviewed by Adam.
4003
4004         - removed WebCoreFrameBridge scrollOverflowInDirection
4005
4006         * WebCore.base.exp: Export function needed by WebKit.
4007         * page/mac/WebCoreFrameBridge.h: Removed WebScrollDirection, WebScrollGranularity,
4008         and scrollOverflowInDirection.
4009         * page/mac/WebCoreFrameBridge.mm: Removed method.
4010
4011 2008-03-04  Darin Adler  <darin@apple.com>
4012
4013         Reviewed by Adam.
4014
4015         - remove WebCoreFrameBridge installInFrame: method
4016
4017         * WebCore.base.exp: Export a few symbols.
4018         * WebCore.xcodeproj/project.pbxproj: Export a few files.
4019         * page/mac/WebCoreFrameBridge.h: Remove installInFrame:.
4020         * page/mac/WebCoreFrameBridge.mm: Ditto.
4021
4022 2008-03-04  Darin Adler  <darin@apple.com>
4023
4024         Reviewed by Adam.
4025
4026         - remove WebCoreFrameBridge window method
4027
4028         * page/mac/EventHandlerMac.mm:
4029         (WebCore::EventHandler::sendFakeEventsAfterWidgetTracking): Get the window by calling
4030         window on the NSView instead of using the bridge. The WebKit side wasn't doing anything
4031         special, so a call to -[NSView window] is fine.
4032
4033         * page/mac/WebCoreFrameBridge.h: Removed the window method.
4034
4035 2008-03-04  Darin Adler  <darin@apple.com>
4036
4037         Reviewed by Adam.
4038
4039         - remove -[WebCoreFrameBridge dashboardRegionsChanged:]
4040
4041         * WebCore.base.exp: Updated.
4042         * page/Chrome.cpp:
4043         (WebCore::ChromeClient::dashboardRegionsChanged): Added.
4044         * page/ChromeClient.h: Added virtual function for dashboardRegionsChanged.
4045         * page/Frame.h: Removed dashboardRegionsChanged function.
4046         * page/FrameView.cpp:
4047         (WebCore::FrameView::updateDashboardRegions): Changed to call dashboardRegionsChanged
4048         on ChromeClient and to only call it when the regions actually changed.
4049         * page/mac/FrameMac.mm: Removed dashboardRegionsChanged function.
4050         * page/mac/WebCoreFrameBridge.h: Removed dashboardRegionsChanged: method.
4051
4052 2008-03-04  Darin Adler  <darin@apple.com>
4053
4054         Reviewed by Adam.
4055
4056         - remove WebCoreFrameBridge issuePasteComand method
4057
4058         * editing/Editor.cpp:
4059         (WebCore::Editor::paste): Moved the Mac-specific part of this to EditorMac.
4060         * editing/mac/EditorMac.mm:
4061         (WebCore::Editor::paste): Added. Calls paste: on the document view (normally a
4062         WebHTMLView). We should get rid of this eventually.
4063         * page/Frame.h: Removed issuePasteCommand.
4064         * page/mac/FrameMac.mm: Ditto.
4065         * page/mac/WebCoreFrameBridge.h: Ditto.
4066
4067 2008-03-04  Alexey Proskuryakov  <ap@webkit.org>
4068
4069         Suggested by Darin, rubber-stamped by Mark.
4070
4071         http://bugs.webkit.org/show_bug.cgi?id=17569
4072         REGRESSION (r30571): Buzzword.com doesn't load
4073
4074         Rolling out r30571, as determining what is wrong with it proved tricky.
4075
4076         * loader/FrameLoader.cpp:
4077         (WebCore::FrameLoader::load):
4078         (WebCore::FrameLoader::tokenizerProcessedData):
4079         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
4080
4081 2008-03-04  Sam Weinig  <sam@webkit.org>
4082
4083         Build fix.
4084
4085         * bindings/js/kjs_events.cpp:
4086
4087 2008-03-03  Sam Weinig  <sam@webkit.org>
4088
4089         Reviewed by Mark Rowe.
4090
4091         Move JSClipboard into its own file.
4092
4093         * DerivedSources.make:
4094         * GNUmakefile.am:
4095         * WebCore.pro:
4096         * WebCore.vcproj/WebCore.vcproj:
4097         * WebCore.xcodeproj/project.pbxproj:
4098         * WebCoreSources.bkl:
4099         * bindings/js/JSAttrCustom.cpp:
4100         * bindings/js/JSClipboardCustom.cpp: Added.
4101         (WebCore::JSClipboard::types):
4102         (WebCore::JSClipboard::clearData):
4103         (WebCore::JSClipboard::getData):
4104         (WebCore::JSClipboard::setData):
4105         (WebCore::JSClipboard::setDragImage):
4106         * bindings/js/JSElementCustom.cpp:
4107         * bindings/js/JSEventCustom.cpp:
4108         * bindings/js/JSHTMLFrameElementCustom.cpp:
4109         * bindings/js/JSHTMLIFrameElementCustom.cpp:
4110         * bindings/js/kjs_events.cpp:
4111         * bindings/js/kjs_events.h:
4112         * bindings/js/kjs_window.cpp:
4113         * bindings/scripts/CodeGeneratorJS.pm:
4114         * dom/Clipboard.cpp:
4115         (WebCore::Clipboard::setDropEffect):
4116         (WebCore::Clipboard::setEffectAllowed):
4117         * dom/Clipboard.idl: Added.
4118
4119 2008-03-03  Sam Weinig  <sam@webkit.org>
4120
4121         Windows build-fix.
4122
4123         * page/Chrome.cpp:
4124         * plugins/win/PluginViewWin.cpp:
4125
4126 2008-03-03  Sam Weinig  <sam@webkit.org>
4127
4128         Reviewed by Darin Adler.
4129
4130         Cleanup and plumbing in preparation for the great Window split.
4131
4132         - Rename KJS::Window to WebCore::JSDOMWindowBase.
4133         - Remove KJS::Window::retrieve() and KJS::Window::retrieveWindow() and replace
4134           with the new toJSDOMWindow().
4135         - Remove KJS::Window::retrieveActive() and replace with explicit call to 
4136           exec->dynamicGlobalObject() and toJSDOMWindow().
4137
4138         * bindings/js/JSCustomVoidCallback.cpp:
4139         (WebCore::toVoidCallback):.
4140         * bindings/js/JSCustomXPathNSResolver.cpp:
4141         (WebCore::JSCustomXPathNSResolver::create):
4142         * bindings/js/JSDatabaseCustom.cpp:
4143         (WebCore::JSDatabase::changeVersion):
4144         (WebCore::JSDatabase::transaction):
4145         * bindings/js/JSDocumentCustom.cpp:
4146         (WebCore::JSDocument::location):
4147         (WebCore::toJS):
4148         * bindings/js/JSEventTargetBase.cpp:
4149         (WebCore::jsEventTargetAddEventListener):
4150         (WebCore::jsEventTargetRemoveEventListener):
4151         * bindings/js/JSEventTargetNode.cpp:
4152         (WebCore::JSEventTargetNode::setListener):
4153         * bindings/js/JSHTMLDocumentCustom.cpp:
4154         (WebCore::JSHTMLDocument::nameGetter):
4155         (WebCore::JSHTMLDocument::open):
4156         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
4157         (WebCore::JSHTMLFrameSetElement::nameGetter):
4158         * bindings/js/JSLocation.cpp:
4159         (WebCore::JSLocation::put):
4160         (WebCore::jsLocationProtoFuncReplace):
4161         (WebCore::jsLocationProtoFuncReload):
4162         (WebCore::jsLocationProtoFuncAssign):
4163         * bindings/js/JSLocation.h:
4164         * bindings/js/JSSQLTransactionCustom.cpp:
4165         (WebCore::JSSQLTransaction::executeSql):
4166         * bindings/js/JSSVGLazyEventListener.cpp:
4167         (WebCore::JSSVGLazyEventListener::JSSVGLazyEventListener):
4168         (WebCore::JSSVGLazyEventListener::eventParameterName):
4169         * bindings/js/JSSVGLazyEventListener.h:
4170         * bindings/js/JSXMLHttpRequest.cpp:
4171         (WebCore::JSXMLHttpRequest::putValueProperty):
4172         (WebCore::jsXMLHttpRequestPrototypeFunctionOpen):
4173         (WebCore::jsXMLHttpRequestPrototypeFunctionAddEventListener):
4174         (WebCore::jsXMLHttpRequestPrototypeFunctionRemoveEventListener):
4175        &n