2009-08-20 Eric Carlson <eric.carlson@apple.com>
[WebKit-https.git] / WebCore / ChangeLog
1 2009-08-20  Eric Carlson  <eric.carlson@apple.com>
2
3         Reviewed by Anders Carlsson.
4
5         HTML5 media elements must fire 'loadend' progress event
6         https://bugs.webkit.org/show_bug.cgi?id=28419
7
8         * dom/EventNames.h:
9             Define loadend.
10
11         * html/HTMLMediaElement.cpp:
12         (WebCore::HTMLMediaElement::parseMappedAttribute):
13             Deal with onloadend.
14         (WebCore::HTMLMediaElement::loadInternal):
15             Post 'loadend' immediately after 'abort'.
16         (WebCore::HTMLMediaElement::noneSupported):
17             Post 'loadend' immediately after 'error'.
18         (WebCore::HTMLMediaElement::mediaEngineError):
19             Ditto.
20         (WebCore::HTMLMediaElement::setNetworkState):
21             Post 'loadend' immediately after 'load'.
22         (WebCore::HTMLMediaElement::userCancelledLoad):
23             Post 'loadend' immediately after 'abort'.
24
25 2009-08-20  Ryosuke Niwa  <rniwa@webkit.org>
26
27         Reviewed by Darin Adler.
28
29         REGESSION(r45316), Crash: WebKit crashes in Google Sites when indenting a table
30         https://bugs.webkit.org/show_bug.cgi?id=28474
31
32         This patch fixes a crash when indenting at right after a table.
33         The bug was caused by Node* blockNode = enclosingBlock(endOfCurrentParagraph.deepEquivalent().node());
34         where node() is equal to blockNode. Because blockNode is the enclosing block node, this patch changes it to
35         enclosingBlock(endOfCurrentParagraph.deepEquivalent().node()->parentNode());
36
37         Test: editing/execCommand/indent-right-after-table.html
38
39         * editing/IndentOutdentCommand.cpp:
40         (WebCore::IndentOutdentCommand::indentRegion): Fixed so that blockNode != endOfCurrentParagraph.deepEquivalent().node()
41
42 2009-08-20  Andrew Scherkus  <scherkus@chromium.org>
43
44         Reviewed by David Levin.
45
46         Render disabled mute button during an error or if no audio is present.
47
48         https://bugs.webkit.org/show_bug.cgi?id=28475
49
50         Covered by existing layout tests:
51         media/video-controls-visible-audio-only.html
52         media/video-no-audio.html
53
54         * rendering/RenderThemeChromiumSkia.cpp:
55         (WebCore::RenderThemeChromiumSkia::paintMediaMuteButton):
56
57 2009-08-20  Dan Bernstein  <mitz@apple.com>
58
59         Reviewed by Darin Adler.
60
61         <rdar://problem/7154605> Loading page with 1px wide <select> makes the
62         toolbar go blank
63         and
64         <rdar://problem/7154521> Lots of "<Error>: doClip: empty path." spew in
65         the console with certain content
66
67         * rendering/RenderThemeMac.mm:
68         (WebCore::RenderThemeMac::paintMenuListButtonGradients): Return early
69         if the rectangle is empty. Use RenderStyle::getBorderRadiiForRect() to
70         adjust the radii in case the sides of the rectangle are smaller than sum
71         of the radii, so that the gradient background matches the border (which
72         already uses getBorderRadiiForRect()). Check if bottomGradient is empty
73         to avoid clipping to an empty path.
74         (WebCore::RenderThemeMac::paintMenuListButton): Moved a
75         GraphicContext::save() down to avoid a save/restore imbalance in the
76         early return case.
77
78         * rendering/RenderThemeSafari.cpp: Made the same changes.
79         (WebCore::RenderThemeSafari::paintMenuListButtonGradients):
80         (WebCore::RenderThemeSafari::paintMenuListButton):
81
82 2009-08-20  Jan Michael Alonzo  <jmalonzo@webkit.org>
83
84         Reviewed by Gustavo Noronha.
85
86         [Gtk][REGRESSION] XHR test failures after r45558
87         https://bugs.webkit.org/show_bug.cgi?id=27143
88
89         Disable sniffing if it's explicitly requested. Updated patch
90         originally by Gustavo Noronha.
91
92         * platform/network/soup/ResourceHandleSoup.cpp:
93         (WebCore::statusWillBeHandledBySoup):
94         (WebCore::gotHeadersCallback):
95         (WebCore::contentSniffedCallback):
96         (WebCore::gotChunkCallback):
97         (WebCore::startHttp):
98
99 2009-08-20  Ariya Hidayat  <ariya.hidayat@nokia.com>
100
101         Reviewed by Simon Hausmann.
102
103         [Qt] Swap the pixels since QImage expect ARGB while ImageData
104         stores them as RGBA.
105
106         This fixes the fast/canvas/canvas-copyPixels.html test.
107
108         * platform/graphics/qt/ImageBufferQt.cpp:
109         (WebCore::putImageData):
110
111 2009-08-20  Christian Plesner Hansen  <christian.plesner.hansen@gmail.com>
112
113         Reviewed by David Levin.
114
115         [v8] Use atomic string caching for createElement
116         Extend atomic string caching to createElement.  Fix a bug in idl
117         parser that caused incorrect parsing if a function argument
118         attribute list contained a comma.
119         https://bugs.webkit.org/show_bug.cgi?id=28449
120
121         * bindings/scripts/CodeGeneratorV8.pm:
122         * bindings/scripts/IDLParser.pm:
123         * bindings/v8/V8Binding.h:
124         (WebCore::v8ValueToAtomicWebCoreStringWithNullCheck):
125         * dom/Document.idl:
126
127 2009-08-20  Ariya Hidayat  <ariya.hidayat@nokia.com>
128
129         Not reviewed, build fix after r47515.
130
131         [Qt] There is no Phonon::MediaObject::hasAudio() function.
132
133         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
134         (WebCore::MediaPlayerPrivate::hasAudio): Assume true.
135
136 2009-08-20  Darin Fisher  <darin@chromium.org>
137
138         Reviewed by Eric Seidel.
139
140         https://bugs.webkit.org/show_bug.cgi?id=28483
141         The V8 ScriptController's cleanupScriptObjectsForPlugin should take a
142         Widget* instead of void* to avoid the need for manual casting to Widget*
143         at the callsite.
144
145         * bindings/v8/ScriptController.cpp:
146         (WebCore::ScriptController::cleanupScriptObjectsForPlugin):
147         * bindings/v8/ScriptController.h:
148
149 2009-08-19  David Levin  <levin@chromium.org>
150
151         Unreviewed speculative build fix for qt.
152
153         * page/OriginAccessEntry.cpp:
154
155 2009-08-19  Aaron Boodman  <aa@chromium.org>
156
157         Reviewed by David Levin.
158
159         https://bugs.webkit.org/show_bug.cgi?id=24853: Provide a way for WebKit clients to
160         specify a more granular policy for cross-origin XHR access.
161
162         Tests: http/tests/xmlhttprequest/origin-whitelisting-all.html
163                http/tests/xmlhttprequest/origin-whitelisting-exact-match.html
164                http/tests/xmlhttprequest/origin-whitelisting-https.html
165                http/tests/xmlhttprequest/origin-whitelisting-ip-addresses-with-subdomains.html
166                http/tests/xmlhttprequest/origin-whitelisting-ip-addresses.html
167                http/tests/xmlhttprequest/origin-whitelisting-subdomains.html
168
169         * WebCore.base.exp: Export methods to manipulate origin access whitelists to enable
170         testing via layout tests.
171
172         * WebCore.xcodeproj/project.pbxproj: Add OriginAccessEntry.*
173         * GNUmakefile.am: Ditto.
174         * WebCore.gypi: Ditto.
175         * WebCore.pro: Ditto.
176         * WebCore.vcproj/WebCore.vcproj: Ditto.
177         * WebCoreSources.blk: Ditto.
178
179         * page/SecurityOrigin.h: Implement origin access whitelists.
180         (WebCore::originAccessMap): Static getter for access whitelists.
181         (WebCore::SecurityOrigin::canRequest): Modify request checking logic to check whitelists.
182         (WebCore::SecurityOrigin::whiteListAccessFromOrigin): Add an entry to a whitelist.
183         (WebCore::SecurityOrigin::resetOriginAccessWhiteLists): Clear all the whitelists.
184
185         * page/OriginAccessEntry.h: Added. An entry in an origin access whitelist.
186         * page/OriginAccessEntry.cpp: Ditto.
187
188 2009-08-19  Kevin Ollivier  <kevino@theolliviers.com>
189
190         Non-precomp headers build fix.
191
192         * platform/image-decoders/ImageDecoder.cpp:
193
194 2009-08-19  Jeremy Orlow  <jorlow@chromium.org>
195
196         Reviewed by Darin Fisher.
197
198         Disable a bad SKIA assert
199         https://bugs.webkit.org/show_bug.cgi?id=28482
200
201         In http://trac.webkit.org/changeset/47386/ an assert was "fixed" in SKIA code. 
202         When this was pulled into Chromium, it started breaking the page cycler. 
203         Disable it again until we can figure out what's going on.
204
205         * platform/graphics/skia/PlatformContextSkia.cpp:
206         (PlatformContextSkia::setupPaintCommon):
207
208 2009-08-19  Ryosuke Niwa  <rniwa@webkit.org>
209
210         Reviewed by Darin Adler.
211
212         queryCommandState('underline') returns false if the selected text is also bold and italic
213         https://bugs.webkit.org/show_bug.cgi?id=11022
214
215         This patch modifies stateStrikethrough and stateUnderline to use the value -webkit-text-decorations-in-effect
216         instead of text-decoration.  Because text-decoration only retrieves explicit styling at the node on which
217         the query was sent, we need to use -webkit-text-decorations-in-effect to include decorations added by ancestors
218         and also u, s, and strike tags.
219
220         Test: editing/style/text-decoration-state.html
221
222         * editing/EditorCommand.cpp:
223         (WebCore::stateStrikethrough): Use -webkit-test-decorations-in-effect instead of text-decoration.
224         (WebCore::stateUnderline): Ditto.
225
226 2009-08-19  Anders Carlsson  <andersca@apple.com>
227
228         Reviewed by Darin Adler.
229
230         - Fix <rdar://problem/7155710>
231         HTML selects on windows cause containing window to become inactive when opened.
232
233         * platform/win/PopupMenuWin.cpp:
234         (WebCore::PopupMenu::show):
235         Pass SWP_NOACTIVATE to SetWindowPos, remove AW_ACTIVATE from AnimateWindow and pass
236         SW_SHOWNOACTIVATE to ShowWindow.
237         
238         (WebCore::PopupWndProc):
239         Prevent mouse activation from activating the window.
240
241 2009-08-19  Simon Fraser  <simon.fraser@apple.com>
242
243         Reviewed by Darin Adler.
244
245         Images flash as you hover them on http://www.atebits.com/scribbles/
246         <rdar://problem/7143958>
247         
248         Tag images with the device colorspace with the colorspace of the main display, rather than
249         GenericRGB, so that composited images color-match those rendered via Core Graphics.
250         
251         Covered by LayoutTests/compositing/color-matching/image-color-matching.html
252
253         * platform/graphics/mac/GraphicsLayerCA.mm:
254         (WebCore::GraphicsLayerCA::setContentsToImage):
255
256 2009-08-19  Anders Carlsson  <andersca@apple.com>
257
258         Reviewed by David Hyatt and Dan Bernstein.
259
260         - Fix <rdar://problem/7152589> Stylable scrollbar corners aren't working.
261
262         * page/FrameView.cpp:
263         (WebCore::FrameView::FrameView):
264         Initialize m_scrollCorner.
265
266         (WebCore::FrameView::~FrameView):
267         Assert that m_scrollCorner is null.
268
269         (WebCore::FrameView::detachCustomScrollbars):
270         Destroy m_scrollCorner.
271
272         (WebCore::FrameView::invalidateScrollCorner):
273         Invalidate the scroll corner.
274         
275         (WebCore::FrameView::updateScrollCorner):
276         Create/destroy the scroll corner.
277         
278         (WebCore::FrameView::paintScrollCorner):
279         Paint the scroll corner.
280         
281         * page/FrameView.h:
282         (WebCore::FrameView::isFrameViewScrollCorner):
283         Return whether a RenderScrollbarPart is the frame view scroll corner.
284         
285         * platform/ScrollView.cpp:
286         (WebCore::ScrollView::updateScrollbars):
287         Go ahead and update the scroll corner.
288         
289         (WebCore::ScrollView::setScrollbarsSuppressed):
290         Pass the scroll corner rect to invalidateRect.
291         
292         (WebCore::ScrollView::scrollCornerRect):
293         Return the scroll corner rect.
294         
295         * platform/ScrollView.h:
296         * rendering/RenderScrollbarPart.cpp:
297         (WebCore::RenderScrollbarPart::imageChanged):
298         If this scrollbar part is the frame view scroll corner, invalidate it.
299
300 2009-08-19  Dirk Schulze  <krit@webkit.org>
301
302         Reviewed by Oliver Hunt.
303
304         SVG feComponentTransfer needs to be implemented
305         [https://bugs.webkit.org/show_bug.cgi?id=27768]
306
307         Implementation of SVG Filter feComponentTransfer.
308
309         There is already a test case
310         Test: svg/W3C-SVG-1.1/filters-comptran-01-b.svg
311
312         * platform/graphics/filters/FEComponentTransfer.cpp:
313         (WebCore::identity):
314         (WebCore::table):
315         (WebCore::discrete):
316         (WebCore::linear):
317         (WebCore::gamma):
318         (WebCore::FEComponentTransfer::apply):
319
320 2009-08-19  Dan Bernstein  <mitz@apple.com>
321
322         Reviewed by Dave Hyatt.
323
324         <rdar://problem/7141522> Incorrect layout of product table at henry.com
325
326         Test: fast/block/basic/quirk-percent-height-table-cell.html
327
328         * rendering/RenderBox.cpp:
329         (WebCore::RenderBox::calcPercentageHeight): Tweak the quirk that allows
330         percentage-height children of auto-height blocks to look for an ancestor
331         with non-auto height and compute their height based on it. The change is
332         that if that ancestor is a table cell, it is ignored and the percent
333         height computes to zero (just like in strict mode). This matches Firefox
334         and IE.
335
336 2009-08-19  Jungshik Shin  <jshin@chromium.org>
337
338         Reviewed by Eric Seidel.
339
340         Add 'icu::' qualifier when refering to ICU C++ names to the other
341         file with this issue missed in the previous check-in.
342
343         https://bugs.webkit.org/show_bug.cgi?id=28410
344
345         No change in the test result.
346
347         * platform/graphics/chromium/FontUtilsChromiumWin.cpp:
348         (WebCore::):
349
350 2009-08-19  Peter Kasting  <pkasting@google.com>
351
352         Unreviewed (build fix for Skia).
353
354         https://bugs.webkit.org/show_bug.cgi?id=28268
355
356         * platform/graphics/skia/GraphicsContextSkia.cpp:
357         (WebCore::GraphicsContext::drawLine):
358
359 2009-08-19  Jan Michael Alonzo  <jmalonzo@webkit.org>
360
361         Reviewed by Eric Seidel.
362
363         [CAIRO] Remove setFont indirection
364         https://bugs.webkit.org/show_bug.cgi?id=28453
365
366         Remove the indirection and just set the font in Font::drawGlyphs.
367
368         * platform/graphics/SimpleFontData.h:
369         * platform/graphics/cairo/FontCairo.cpp:
370         (WebCore::Font::drawGlyphs):
371         * platform/graphics/gtk/FontPlatformData.h:
372         (WebCore::FontPlatformData::scaledFont):
373         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
374         (WebCore::FontPlatformData::~FontPlatformData):
375         * platform/graphics/gtk/FontPlatformDataPango.cpp:
376         * platform/graphics/gtk/SimpleFontDataGtk.cpp:
377         * platform/graphics/gtk/SimpleFontDataPango.cpp:
378         * platform/graphics/win/FontPlatformData.h:
379         * platform/graphics/win/FontPlatformDataCairoWin.cpp:
380         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
381
382 2009-08-19  Pavel Feldman  <pfeldman@chromium.org>
383
384         Reviewed by Timothy Hatcher.
385
386         WebInspector: When adding style selector, generate default name based
387         on id / class / type.
388
389         https://bugs.webkit.org/show_bug.cgi?id=28468
390
391         * inspector/front-end/StylesSidebarPane.js:
392         (WebInspector.StylesSidebarPane.prototype.appropriateSelectorForNode):
393
394 2009-08-19  David Hyatt  <hyatt@apple.com>
395
396         Reviewed by Dan Bernstein.
397
398         Rename combinedOverflow to visibleOverflow, since that's what it actually represents.
399
400         * rendering/InlineFlowBox.cpp:
401         (WebCore::InlineFlowBox::nodeAtPoint):
402         (WebCore::InlineFlowBox::paint):
403         * rendering/InlineFlowBox.h:
404         (WebCore::InlineFlowBox::topvisibleOverflow):
405         (WebCore::InlineFlowBox::bottomvisibleOverflow):
406         (WebCore::InlineFlowBox::leftvisibleOverflow):
407         (WebCore::InlineFlowBox::rightvisibleOverflow):
408         (WebCore::InlineFlowBox::visibleOverflowRect):
409         * rendering/RenderBlock.cpp:
410         (WebCore::RenderBlock::layoutBlock):
411         (WebCore::RenderBlock::paint):
412         (WebCore::RenderBlock::floatRect):
413         (WebCore::RenderBlock::nodeAtPoint):
414         * rendering/RenderBlock.h:
415         * rendering/RenderBlockLineLayout.cpp:
416         (WebCore::RenderBlock::layoutInlineChildren):
417         (WebCore::RenderBlock::matchedEndLine):
418         * rendering/RenderBox.cpp:
419         (WebCore::RenderBox::clippedOverflowRectForRepaint):
420         * rendering/RenderBox.h:
421         (WebCore::RenderBox::visibleOverflowRect):
422         (WebCore::RenderBox::topvisibleOverflow):
423         (WebCore::RenderBox::bottomvisibleOverflow):
424         (WebCore::RenderBox::leftvisibleOverflow):
425         (WebCore::RenderBox::rightvisibleOverflow):
426         * rendering/RenderLayer.cpp:
427         (WebCore::RenderLayer::localBoundingBox):
428         * rendering/RenderLineBoxList.cpp:
429         (WebCore::RenderLineBoxList::paint):
430         (WebCore::RenderLineBoxList::hitTest):
431         * rendering/RenderOverflow.h:
432         (WebCore::RenderOverflow::visibleOverflowRect):
433         * rendering/RenderReplaced.cpp:
434         (WebCore::RenderReplaced::shouldPaint):
435         (WebCore::RenderReplaced::clippedOverflowRectForRepaint):
436         * rendering/RenderTable.cpp:
437         (WebCore::RenderTable::layout):
438         (WebCore::RenderTable::paint):
439         * rendering/RenderTableCell.cpp:
440         (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
441
442 2009-08-19  Eric Carlson  <eric.carlson@apple.com>
443
444         Reviewed by Eric Seidel.
445
446         Sound button appears in controller with movies that have no audio
447         https://bugs.webkit.org/show_bug.cgi?id=28464
448
449         Test: media/video-no-audio.html
450
451         * html/HTMLMediaElement.cpp:
452         * html/HTMLMediaElement.h:
453         (WebCore::HTMLMediaElement::hasAudio):
454             Added hasAudio.
455
456         * platform/graphics/MediaPlayer.h:
457         * platform/graphics/MediaPlayer.cpp:
458         (WebCore::NullMediaPlayerPrivate::hasAudio):
459         (WebCore::MediaPlayer::hasVideo):
460             Make const.
461         (WebCore::MediaPlayer::hasAudio):
462             Added hasAudio.
463
464         * platform/graphics/MediaPlayerPrivate.h:
465             Add hasAudio.
466
467         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
468         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
469         (WebCore::MediaPlayerPrivate::hasAudio):
470             Ditto.
471
472         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
473         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
474         (WebCore::MediaPlayerPrivate::hasAudio):
475             Ditto.
476
477         * platform/graphics/qt/MediaPlayerPrivatePhonon.h:
478         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
479         (WebCore::MediaPlayerPrivate::hasAudio):
480             Ditto.
481
482         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
483         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
484         (WebCore::MediaPlayerPrivate::hasAudio):
485             Ditto.
486
487         * platform/graphics/win/QTMovieWin.h:
488         * platform/graphics/win/QTMovieWin.cpp:
489         (QTMovieWin::hasAudio):
490             Ditto.
491
492         * rendering/MediaControlElements.cpp:
493         (WebCore::MediaControlMuteButtonElement::disabled):
494             New, return true if media element doesn't have audio.
495         (WebCore::MediaControlMuteButtonElement::rendererIsNeeded):
496             Renderer is not needed if element has no audio.
497         * rendering/MediaControlElements.h:
498         (WebCore::MediaControlInputElement::disabled):
499
500         * rendering/RenderThemeMac.mm:
501         (WebCore::getMediaUIPartStateFlags):
502             Return MediaUIPartDisabledFlag if node is disabled.
503             
504
505 2009-08-19  Michelangelo De Simone  <micdesim@gmail.com>
506
507         Reviewed by Darin Adler.
508
509         https://bugs.webkit.org/show_bug.cgi?id=27357
510         Removed the two unnecessary overridden willValidate() methods introduced
511         in r47444.
512
513         * html/HTMLKeygenElement.h:
514         * html/HTMLObjectElement.h:
515
516 2009-08-19  Pavel Feldman  <pfeldman@chromium.org>
517
518         Reviewed by Timothy Hatcher.
519
520         WebInspector: Allow dumping dangling nodes to the console.
521
522         https://bugs.webkit.org/show_bug.cgi?id=28458
523
524         * bindings/js/JSInspectorBackendCustom.cpp:
525         * bindings/v8/custom/V8CustomBinding.h:
526         * bindings/v8/custom/V8InspectorBackendCustom.cpp:
527         * inspector/InspectorBackend.cpp:
528         * inspector/InspectorBackend.h:
529         * inspector/InspectorBackend.idl:
530         * inspector/InspectorController.cpp:
531         (WebCore::InspectorController::clearConsoleMessages):
532         * inspector/InspectorDOMAgent.cpp:
533         (WebCore::InspectorDOMAgent::releaseDanglingNodes):
534         (WebCore::InspectorDOMAgent::startListening):
535         (WebCore::InspectorDOMAgent::stopListening):
536         (WebCore::InspectorDOMAgent::handleEvent):
537         (WebCore::InspectorDOMAgent::bind):
538         (WebCore::InspectorDOMAgent::unbind):
539         (WebCore::InspectorDOMAgent::pushDocumentToFrontend):
540         (WebCore::InspectorDOMAgent::pushChildNodesToFrontend):
541         (WebCore::InspectorDOMAgent::discardBindings):
542         (WebCore::InspectorDOMAgent::pushNodePathToFrontend):
543         (WebCore::InspectorDOMAgent::buildObjectForNode):
544         (WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
545         * inspector/InspectorDOMAgent.h:
546         * inspector/InspectorFrontend.cpp:
547         (WebCore::InspectorFrontend::setDetachedRoot):
548         (WebCore::InspectorFrontend::childNodeCountUpdated):
549         * inspector/InspectorFrontend.h:
550         * inspector/front-end/ConsoleView.js:
551         (WebInspector.ConsoleView.prototype._formatnode):
552         * inspector/front-end/DOMAgent.js:
553         (WebInspector.DOMAgent.prototype._setDetachedRoot):
554         (WebInspector.DOMAgent.prototype._childNodeCountUpdated):
555         (WebInspector.setDetachedRoot):
556         (WebInspector.childNodeCountUpdated):
557         (InspectorController.pushNodeToFrontend):
558         * inspector/front-end/InjectedScript.js:
559         (InjectedScript.pushNodeToFrontend):
560         (InjectedScript.createProxyObject):
561
562 2009-08-19  Alexey Proskuryakov  <ap@apple.com>
563
564         Reviewed by Anders Carlsson.
565
566         https://bugs.webkit.org/show_bug.cgi?id=27464
567         Implement application cache online whitelist wildcard flag
568
569         Test: http/tests/appcache/whitelist-wildcard.html
570
571         A "*" in NETWORK section means that network loading needn't be blocked.
572
573         * loader/appcache/ApplicationCache.cpp:
574         (WebCore::ApplicationCache::isURLInOnlineWhitelist):
575         * loader/appcache/ApplicationCache.h:
576         (WebCore::ApplicationCache::setAllowsAllNetworkRequests):
577         (WebCore::ApplicationCache::allowsAllNetworkRequests):
578         * loader/appcache/ApplicationCacheGroup.cpp:
579         (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
580         * loader/appcache/ApplicationCacheStorage.cpp:
581         (WebCore::ApplicationCacheStorage::openDatabase):
582         (WebCore::ApplicationCacheStorage::store):
583         (WebCore::ApplicationCacheStorage::loadCache):
584         * loader/appcache/ManifestParser.cpp:
585         (WebCore::parseManifest):
586         * loader/appcache/ManifestParser.h:
587
588 2009-08-19  Brady Eidson <beidson@apple.com>
589
590         Reviewed by Kevin Decker.
591
592         <rdar://problem/7042555> Loading certain pages on Tiger will start a spurious download
593         
594         Get rid of method swizzling entirely. This created problems when lower level
595         Foundation code would call into our own swizzled method.
596         
597         * platform/network/mac/ResourceHandleMac.mm: 
598         (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]): 
599         * platform/network/mac/WebCoreURLResponse.h:
600         * platform/network/mac/WebCoreURLResponse.mm:
601         (-[NSURLResponse adjustMIMETypeIfNecessary]):
602
603 2009-08-19  Adam Roben  <aroben@apple.com>
604
605         Fix linker warnings on Windows
606
607         Reviewed by Anders Carlsson.
608
609         Fixes <http://webkit.org/b/28462> WebCore causes linker warnings on
610         Windows about multiply-defined JSHTMLDataListElement symbols
611
612         * WebCore.vcproj/WebCore.vcproj: Exclude JSHTMLDataListElement.cpp
613         from the build (just like we do for the other generated bindings
614         files) so that we don't get warnings about multiply-defined symbols in
615         JSHTMLDataListElement.cpp and DerivedSources.cpp. Also removed
616         duplicate versions of JSSVGElementWrapperFactory.cpp, and let VS
617         reorder a few files.
618
619 2009-08-19  Jungshik Shin  <jshin@chromium.org>
620
621         Reviewed by Eric Seidel
622
623         Add 'icu::' qualifier when refering to ICU C++ names.
624
625         https://bugs.webkit.org/show_bug.cgi?id=28410
626
627         No change in the test result.
628
629         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
630         (WebCore::fontContainsCharacter):
631
632 2009-08-19  David Hyatt  <hyatt@apple.com>
633
634         Reviewed by Dan Bernstein.
635
636         Cleanup from my patch thet rewrote overflow.  Remove unused member variables from RenderTableSection and
637         move the addition of overflow from children into a separate pass after the height of the section has been
638         set.  This prevents the RenderOverflow struct from being aggressively allocated for all table sections.
639         (Not a a correctness issue, just a memory issue.)
640
641         * rendering/RenderTableSection.cpp:
642         (WebCore::RenderTableSection::RenderTableSection):
643         (WebCore::RenderTableSection::layoutRows):
644         * rendering/RenderTableSection.h:
645
646 2009-08-19  Jan Michael Alonzo  <jmalonzo@webkit.org>
647
648         Reviewed by Xan Lopez.
649
650         [Gtk] Remove bogus dependency rules for built sources that derive
651         from HTMLTagNames.in, HTMLAttributeNames.in and xmlattrs.in. The
652         header files should be generated regardless of whether the source
653         file changed or not. We should only rely on the *.in files being
654         changed.
655
656         * GNUmakefile.am:
657
658 2009-08-18  Maciej Stachowiak  <mjs@apple.com>
659
660         Reviewed by Oliver Hunt.
661
662         convert FormatBlock candidate tag list from if chain to hash lookup
663         https://bugs.webkit.org/show_bug.cgi?id=28448
664
665         No behavior change, just cleanup.
666
667         * editing/htmlediting.cpp:
668         (WebCore::validBlockTag):
669         * editing/htmlediting.h:
670
671 2009-08-19  Mike Fenton  <mike.fenton@torchmobile.com>
672
673         Reviewed by Eric Seidel.
674
675         Update GraphicsContextSkia's version of drawLine to make use of the shared
676         adjustLineToPixelBoundaries function and elimination overlapping code.
677
678         https://bugs.webkit.org/show_bug.cgi?id=28268
679
680         * platform/graphics/skia/GraphicsContextSkia.cpp:
681         (WebCore::GraphicsContext::drawLine):
682
683 2009-08-18  Mike Fenton  <mike.fenton@torchmobile.com>
684
685         Reviewed by Eric Seidel.
686
687         Style fixes based on cpp_style.py and WebKit Style guide for
688         GraphicsContextSkia.cpp
689
690         https://bugs.webkit.org/show_bug.cgi?id=28268
691
692         * platform/graphics/skia/GraphicsContextSkia.cpp:
693         (WebCore::GraphicsContext::addInnerRoundedRectClip):
694         (WebCore::GraphicsContext::drawFocusRing):
695         (WebCore::GraphicsContext::roundToDevicePixels):
696         (WebCore::GraphicsContext::setLineDash):
697         (WebCore::GraphicsContext::setPlatformShadow):
698
699 2009-08-18  Alexey Proskuryakov  <ap@webkit.org>
700
701         Reviewed by Maciej Stachowiak.
702
703         https://bugs.webkit.org/show_bug.cgi?id=28446
704         Custom request headers shouldn't be sent with cross-origin preflight request
705
706         Tests: http/tests/xmlhttprequest/access-control-preflight-headers-async.html
707                http/tests/xmlhttprequest/access-control-preflight-headers-sync.html
708
709         * loader/DocumentThreadableLoader.cpp:
710         (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequestWithPreflight):
711         Don't copy headers to OPTIONS request. The spec is vague about this, but the intention was
712         that they shouldn't be sent, and Firefox doesn't send them.
713
714 2009-08-18  John Gregg  <johnnyg@google.com>
715
716         Reviewed by Dimitri Glazkov.
717
718         V8 Bindings for Desktop Notifications feature.
719         https://bugs.webkit.org/show_bug.cgi?id=28271
720
721         * WebCore.gypi: 
722         added notification files to build (all still behind a flag that's not on)
723         * bindings/scripts/CodeGeneratorV8.pm:
724         added special case in DOMWindow/AppCache style for named event handlers
725         * bindings/v8/DOMObjectsInclude.h:
726         * bindings/v8/DerivedSourcesAllInOne.cpp:
727         * bindings/v8/V8DOMWrapper.cpp:
728         (WebCore::V8DOMWrapper::getTemplate):
729         (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
730         * bindings/v8/V8Index.cpp:
731         * bindings/v8/V8Index.h:
732         * bindings/v8/V8Proxy.h:
733         * bindings/v8/WorkerContextExecutionProxy.cpp:
734         (WebCore::WorkerContextExecutionProxy::convertToV8Object):
735         * bindings/v8/custom/V8CustomBinding.h:
736         * bindings/v8/custom/V8NotificationCenterCustom.cpp: Added.
737         * notifications/Notification.h:
738         made event handler routines public (as they are in DOMWindow, eg) for
739         binding access.
740         * notifications/NotificationCenter.idl:
741         needed to make methods V8Custom to support different behaviors in 
742         worker/page context in chromium. 
743         * workers/WorkerThread.h:
744         (WebCore::WorkerThread::getNotificationPresenter):
745         (WebCore::WorkerThread::setNotificationPresenter):
746         needed to make these methods public as well so chromium can inject
747         the notification presenter into the worker thread.
748
749 2009-08-13  Maciej Stachowiak  <mjs@apple.com>
750
751         Reviewed by Sam Weinig.
752
753         - Implement HTML5 nav element
754         https://bugs.webkit.org/show_bug.cgi?id=27937
755
756         <nav> should behave essentially the same as <div> for parsing
757         etc. This is implemented by the changes below.
758         
759         Tests: fast/html/nav-element.html
760
761         * css/html.css:
762         * editing/htmlediting.cpp:
763         (WebCore::validBlockTag):
764         * html/HTMLElement.cpp:
765         (WebCore::HTMLElement::tagPriority):
766         (WebCore::blockTagList):
767         * html/HTMLParser.cpp:
768         (WebCore::HTMLParser::getNode):
769         * html/HTMLTagNames.in:
770
771 2009-08-18  Anders Carlsson  <andersca@apple.com>
772
773         Reviewed by Adele Peterson, David Hyatt and Dan Bernstein.
774
775         - Fix <rdar://problem/7152727>
776
777         If a page has custom scroll bars, they will not update correctly when the window is activated/deactivated.
778         
779         * page/FrameView.cpp:
780         (WebCore::FrameView::hasCustomScrollbars):
781         Check if the frame view or any of its subviews have custom scroll bars.
782         
783         (WebCore::FrameView::updateControlTints):
784         Go ahead and update control tints if the frame view has custom scroll bars.
785         
786         * page/FrameView.h:
787
788 2009-08-18  Mark Rowe  <mrowe@apple.com>
789
790         Roll out r47477 as it introduced assertion failures and crashes on the build bots.
791
792         * GNUmakefile.am:
793         * WebCore.gypi:
794         * WebCore.pro:
795         * WebCore.vcproj/WebCore.vcproj:
796         * WebCore.xcodeproj/project.pbxproj:
797         * WebCoreSources.bkl:
798         * storage/Database.cpp:
799         * storage/Database.h:
800         * storage/DatabaseThread.cpp:
801         (WebCore::DatabaseThread::DatabaseThread):
802         * storage/DatabaseThread.h:
803         * storage/SQLTransaction.cpp:
804         (WebCore::SQLTransaction::runCurrentStatement):
805         (WebCore::SQLTransaction::deliverQuotaIncreaseCallback):
806         (WebCore::SQLTransaction::postflightAndCommit):
807         * storage/SQLTransactionClient.cpp: Removed.
808         * storage/SQLTransactionClient.h: Removed.
809
810 2009-08-18  Maxime Simon  <simon.maxime@gmail.com>
811
812         Reviewed by Eric Seidel.
813
814         [Haiku] Adding the SharedTimer file for WebCore.
815         https://bugs.webkit.org/show_bug.cgi?id=28126
816
817         * platform/haiku/SharedTimerHaiku.cpp: Added.
818         (WebCore::):
819         (WebCore::SharedTimerHaiku::SharedTimerHaiku):
820         (WebCore::SharedTimerHaiku::~SharedTimerHaiku):
821         (WebCore::SharedTimerHaiku::instance):
822         (WebCore::SharedTimerHaiku::start):
823         (WebCore::SharedTimerHaiku::stop):
824         (WebCore::SharedTimerHaiku::Filter):
825         (WebCore::setSharedTimerFiredFunction):
826         (WebCore::setSharedTimerFireTime):
827         (WebCore::stopSharedTimer):
828
829 2009-08-18  Mark Rowe  <mrowe@apple.com>
830
831         Release build fix.
832
833         * xml/XMLHttpRequest.cpp: Sprinkle some #ifndef NDEBUG around.
834         (WebCore::XMLHttpRequest::XMLHttpRequest):
835         (WebCore::XMLHttpRequest::~XMLHttpRequest):
836
837 2009-08-18  Aaron Boodman  <aa@chromium.org>
838
839         Reviewed by Maciej Stachowiak.
840
841         https://bugs.webkit.org/show_bug.cgi?id=28412: Leak of WebCore::XMLHttpRequest object during layout tests.
842
843         No new tests: Already covered by existing tests.
844
845         * xml/XMLHttpRequest.cpp:
846         (WebCore::XMLHttpRequest::XMLHttpRequest): Add instrumentation for this kind of leak.
847         (WebCore::XMLHttpRequest::~XMLHttpRequest): Ditto.
848         (WebCore::XMLHttpRequest::createRequest): Only setPendingActivity() if we actually started a request. Also,
849         restore a call to nonCacheRequestInFlight() that got lost in a recent refactor.
850
851 2009-08-18  Dumitru Daniliuc  <dumi@chromium.org>
852
853         Reviewed by Dimitri Glazkov.
854
855         Added a client to SQLTransaction. In addition to being a place to
856         get notifications about certain events in a transaction, it is
857         also an abstraction layer that allows us to plug in different
858         implementations for each port for how transactions interract with
859         the main DB. For example, WebCore's default implementation will
860         make direct calls to DatabaseTracker's methods. At the same time,
861         Chromium's implementation will send IPCs to the browser process
862         whenever a transaction needs something from the main DB.
863
864         All storage tests pass.
865
866         https://bugs.webkit.org/show_bug.cgi?id=27967
867
868         * GNUmakefile.am:
869         * WebCore.gypi:
870         * WebCore.pro:
871         * WebCore.vcproj/WebCore.vcproj:
872         * WebCore.xcodeproj/project.pbxproj:
873         * WebCoreSources.bkl:
874         * storage/Database.cpp:
875         (WebCore::Database::transactionClient):
876         * storage/Database.h:
877         * storage/DatabaseThread.cpp:
878         (WebCore::DatabaseThread::DatabaseThread):
879         * storage/DatabaseThread.h:
880         (WebCore::DatabaseThread::transactionClient):
881         * storage/SQLTransaction.cpp:
882         (WebCore::SQLTransaction::runCurrentStatement):
883         (WebCore::SQLTransaction::deliverQuotaIncreaseCallback):
884         (WebCore::SQLTransaction::postflightAndCommit):
885         * storage/SQLTransactionClient.cpp: Added.
886         * storage/SQLTransactionClient.h: Added.
887
888 2009-08-18  Julie Parent  <jparent@chromium.org>
889
890         Not reviewed, build fix for Chromium.
891
892         Final change for v8 corresponding to http://trac.webkit.org/changeset/47469.
893
894         * bindings/v8/custom/V8HTMLFrameElementCustom.cpp: Added missing using statment
895
896 2009-08-18  Julie Parent  <jparent@chromium.org>
897
898         Not reviewed, build fix for Chromium.
899
900        More corresponding changes to V8 from http://trac.webkit.org/changeset/47469.
901
902         * bindings/v8/custom/V8HTMLIFrameElementCustom.cpp:
903         (WebCore::ACCESSOR_SETTER): Use srcAttr instead of the src function.
904
905 2009-08-18  Julie Parent  <jparent@chromium.org>
906
907         Not reviewed, build fix for Chromium.
908
909         Make corresponding changes to V8 from http://trac.webkit.org/changeset/47469.
910
911         * bindings/v8/custom/V8HTMLFrameElementCustom.cpp:
912         (WebCore::ACCESSOR_SETTER): Use srcAttr instead of the src function.
913
914 2009-08-18  Dan Bernstein  <mitz@apple.com>
915
916         Build fix.
917
918         * editing/ApplyStyleCommand.cpp:
919         (WebCore::getIdentifierValue):
920
921 2009-08-18  Darin Adler  <darin@apple.com>
922
923         Reviewed by Sam Weinig.
924
925         More work on making DOM classes start with reference count of 1
926         https://bugs.webkit.org/show_bug.cgi?id=28068
927
928         Some related clean-up and preparation steps so the subsequent
929         patches will be as small as possible.
930
931         * WebCore.base.exp: Sorted this file.
932
933         * accessibility/AccessibilityRenderObject.cpp:
934         (WebCore::AccessibilityRenderObject::accessibilityDescription):
935         Use nameAttr instead of the name function.
936
937         * bindings/js/JSHTMLFrameElementCustom.cpp:
938         (WebCore::JSHTMLFrameElement::setSrc):
939         Use srcAttr instead of the src function.
940
941         * bindings/js/JSHTMLIFrameElementCustom.cpp:
942         (WebCore::JSHTMLIFrameElement::setSrc):
943         Use srcAttr instead of the src function.
944
945         * bindings/objc/DOM.mm: Sorted includes.
946         * dom/Document.cpp: Ditto.
947
948         * dom/StyledElement.cpp: Made invalidateStyleAttribute inline.
949         * dom/StyledElement.h: Ditto.
950
951         * dom/make_names.pl: Changed default of createWithNew to 0.
952         Eventually all elements will be created with create instead of new.
953
954         * html/HTMLTagNames.in:
955         * svg/svgtags.in:
956         * wml/WMLTagNames.in:
957         Added createWithNew for every tag. We'll remove it as we convert
958         element classes to use create.
959
960         * html/HTMLAppletElement.h: Removed unneeded forward declarations.
961         * html/HTMLFrameElement.h: Ditto.
962
963         * html/HTMLEmbedElement.cpp: Removed many attribute get and
964         set functions.
965         * html/HTMLEmbedElement.h: Ditto.
966         * html/HTMLIFrameElement.cpp: Ditto.
967         * html/HTMLIFrameElement.h: Ditto.
968         * html/HTMLObjectElement.cpp: Ditto.
969         * html/HTMLObjectElement.h: Ditto.
970         * html/HTMLPlugInElement.cpp: Ditto.
971         * html/HTMLPlugInElement.h: Ditto.
972
973         * html/HTMLFrameElementBase.cpp: Removed many attribute get and
974         set functions.
975         (WebCore::HTMLFrameElementBase::location): Changed to use
976         srcAttr instead of src.
977         * html/HTMLFrameElementBase.h: Removed many attribute get and set
978         functions.
979
980         * loader/MediaDocument.cpp:
981         (WebCore::MediaDocument::replaceMediaElementTimerFired):
982         Use srcAttr and typeAttr instead of setSrc and setType.
983         * loader/PluginDocument.cpp:
984         (WebCore::PluginTokenizer::createDocumentStructure): Ditto.
985
986         * rendering/RenderPartObject.cpp:
987         (WebCore::RenderPartObject::updateWidget): Use nameAttr instead
988         of name -- this avoids an extra AtomicString round trip and a little
989         ref count churn too.
990
991 2009-08-18  Drew Wilson  <atwilson@google.com>
992
993         Reviewed by David Levin.
994
995         SharedWorkers need to support loading.
996         https://bugs.webkit.org/show_bug.cgi?id=28342
997
998         Added loader support to shared workers, and refactored worker tests to also test SharedWorkers
999
1000         * workers/DefaultSharedWorkerRepository.cpp:
1001         (WebCore::SharedWorkerProxy::postTaskToLoader):
1002         Forwards load requests to an arbitrary document from the list of worker's documents.
1003         (WebCore::SharedWorkerProxy::postTaskForModeToWorkerContext):
1004         Posts responses back to the shared worker thread.
1005
1006 2009-08-18  Ryosuke Niwa  <rniwa@webkit.org>
1007
1008         Reviewed by Darin Adler.
1009
1010         StyleChange::init needs clean up before fixing the bug 23892
1011         https://bugs.webkit.org/show_bug.cgi?id=27749
1012
1013         This patch simplifies StyleChange::init by removing the iteration on CSS properties,
1014         and adding functions reconcileTextDecorationProperties and extractTextStyle to handle the style.
1015
1016         Because there is a bug in how text decorations are processes in getPropertiesNotInComputedStyle,
1017         this patch simplifies the treatment in order to preserve the original behavior of WebKit.
1018         However, the current implementation is not best (adds redundant text-decorations) and we should fix it later.
1019
1020         No test is added since there is no change in behavior.
1021
1022         * editing/ApplyStyleCommand.cpp:
1023         (WebCore::StyleChange::init): Uses getPropertiesNotInComputedStyle instead of iterating through the properties
1024         (WebCore::StyleChange::reconcileTextDecorationProperties): Removes -webkit-text-decorations-in-effects and redundant "none"
1025         (WebCore::getIdentifierValue): Obtains the identifier of a CSSPrimitiveValue
1026         (WebCore::StyleChange::extractTextStyles): Converts properties in style to m_apply* and removes the property
1027         (WebCore::getPropertiesNotInComputedStyle): Fixed a bug with how text decorations are treated
1028
1029 2009-08-18  Dumitru Daniliuc  <dumi@chromium.org>
1030
1031         Reviewed by Dimitri Glazkov.
1032
1033         Fixing a DB file naming bug in Chromium. The origin should come
1034         before the DB name in the file name.
1035
1036         https://bugs.webkit.org/show_bug.cgi?id=28331
1037
1038         * storage/DatabaseTracker.cpp:
1039         (WebCore::DatabaseTracker::fullPathForDatabase):
1040
1041 2009-08-18  Maxime Simon  <simon.maxime@gmail.com>
1042
1043         Reviewed by Eric Seidel.
1044
1045         [Haiku] Adding four image-specific files to WebCore:
1046         IconHaiku.cpp, ImageBufferData.h, ImageBufferHaiku.cpp, ImageHaiku.cpp
1047         https://bugs.webkit.org/show_bug.cgi?id=28130
1048
1049         * platform/graphics/Icon.h:
1050         * platform/graphics/haiku/IconHaiku.cpp: Added.
1051         (WebCore::Icon::~Icon):
1052         (WebCore::Icon::createIconForFile):
1053         (WebCore::Icon::createIconForFiles):
1054         (WebCore::Icon::paint):
1055         * platform/graphics/haiku/ImageBufferData.h: Added.
1056         * platform/graphics/haiku/ImageBufferHaiku.cpp: Added.
1057         (WebCore::ImageBufferData::ImageBufferData):
1058         (WebCore::ImageBuffer::ImageBuffer):
1059         (WebCore::ImageBuffer::~ImageBuffer):
1060         (WebCore::ImageBuffer::context):
1061         (WebCore::ImageBuffer::getUnmultipliedImageData):
1062         (WebCore::ImageBuffer::getPremultipliedImageData):
1063         (WebCore::ImageBuffer::putUnmultipliedImageData):
1064         (WebCore::ImageBuffer::putPremultipliedImageData):
1065         (WebCore::ImageBuffer::toDataURL):
1066         (WebCore::ImageBuffer::image):
1067         (WebCore::ImageBuffer::platformTransformColorSpace):
1068         * platform/graphics/haiku/ImageHaiku.cpp: Added.
1069         (WebCore::FrameData::clear):
1070         (WebCore::Image::loadPlatformResource):
1071         (WebCore::BitmapImage::initPlatformData):
1072         (WebCore::BitmapImage::invalidatePlatformData):
1073         (WebCore::BitmapImage::draw):
1074         (WebCore::Image::drawPattern):
1075         (WebCore::BitmapImage::checkForSolidColor):
1076         (WebCore::BitmapImage::getBBitmap):
1077
1078 2009-08-18  Beth Dakin  <bdakin@apple.com>
1079
1080         Reviewed by Dan Bernstein.
1081
1082         Fix for https://bugs.webkit.org/show_bug.cgi?id=27575 [CSS3 
1083         Backgrounds and Borders] Drop the prefix from background-size
1084
1085         * css/CSSComputedStyleDeclaration.cpp:
1086         (WebCore::):
1087         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1088         * css/CSSParser.cpp:
1089         (WebCore::CSSParser::parseValue):
1090         (WebCore::CSSParser::parseFillProperty):
1091         (WebCore::cssPropertyID):
1092         * css/CSSPropertyNames.in:
1093         * css/CSSStyleSelector.cpp:
1094         (WebCore::CSSStyleSelector::applyProperty):
1095         * page/animation/AnimationBase.cpp:
1096         (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper):
1097         (WebCore::ensurePropertyMap):
1098
1099 2009-08-18  Drew Wilson  <atwilson@google.com>
1100
1101         Reviewed by David Levin.
1102
1103         SharedWorkers need to forward exceptions to parent documents
1104         https://bugs.webkit.org/show_bug.cgi?id=28320
1105
1106         Changed SharedWorkerProxy to have individual mutexes (so workers can interact with their parent documents without contention).
1107
1108         Updated SharedWorkerProxy to forward exceptions/console messages to all parent documents.
1109
1110         * bindings/js/JSSharedWorkerConstructor.cpp:
1111         Cleaned up bitrot - added missing include.
1112         * workers/DefaultSharedWorkerRepository.cpp:
1113         (WebCore::postExceptionTask):
1114         Callback used to deliver exceptions to a document.
1115         (WebCore::SharedWorkerProxy::postExceptionToWorkerObject):
1116         Forwards exceptions to all parent documents for presentation to the user.
1117         (WebCore::postConsoleMessageTask):
1118         (WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject):
1119         Forwards console messages to all parent documents for presentation to the user.
1120         (WebCore::SharedWorkerProxy::addToWorkerDocuments):
1121         Grabs the mutex before accessing workerDocuments.
1122         (WebCore::SharedWorkerProxy::documentDetached):
1123         Grabs the mutex before accessing workerDocuments.
1124
1125 2009-08-18  Anders Carlsson  <andersca@apple.com>
1126
1127         Reviewed by Adele Peterson.
1128
1129         <rdar://problem/7135588> HTMLMediaElement should ask WebPolicyLoadDelegate before loading resource
1130         
1131         * html/HTMLMediaElement.cpp:
1132         (WebCore::HTMLMediaElement::isSafeToLoadURL):
1133         Call FrameLoaderClient::shouldLoadMediaElementURL.
1134         
1135         * loader/FrameLoaderClient.h:
1136         (WebCore::FrameLoaderClient::shouldLoadMediaElementURL):
1137         Return true by default.
1138
1139 2009-08-18  Dumitru Daniliuc  <dumi@chromium.org>
1140
1141         Reviewed by Dimitri Glazkov.
1142
1143         openDatabase() should not execute any SQL statement on the
1144         database it's trying to open, unless there are no other open
1145         handles to the same database. Otherwise, we might run into a
1146         deadlock.
1147
1148         Test: storage/open-database-while-transaction-in-progress.html
1149
1150         https://bugs.webkit.org/show_bug.cgi?id=28207
1151
1152         * storage/Database.cpp:
1153         (WebCore::Database::performOpenAndVerify):
1154
1155 2009-08-18  Dirk Schulze  <krit@webkit.org>
1156
1157         Reviewed by Oliver Hunt.
1158
1159         SVG Filter feBlend implementation missing
1160         [https://bugs.webkit.org/show_bug.cgi?id=28133]
1161
1162         Implementation of SVG Filter feBlend.
1163
1164         FilterEffect.cp needed changes to optimize the rendering. With the old code
1165         we drew a subEffect on the current FilterEffect by drawImage, got the PixelArray,
1166         cleared the drawing area, drew the next FilterEffect with drawImage and picked this
1167         PixelArray again. This was unefficient and slow. Now we calculate the requested area
1168         of the subEffect and ask the FilterEffect's ImageBuffer for the PixelArray directly,
1169         without any drawing operations on GraphicsContext.
1170
1171         There is already a test case
1172         Test: svg/W3C-SVG-1.1/filters-blend-01-b.svg
1173
1174         * html/canvas/CanvasPixelArray.h:
1175         (WebCore::CanvasPixelArray::set):
1176         (WebCore::CanvasPixelArray::get):
1177         * platform/graphics/filters/FEBlend.cpp:
1178         (WebCore::unknown):
1179         (WebCore::normal):
1180         (WebCore::multiply):
1181         (WebCore::screen):
1182         (WebCore::darken):
1183         (WebCore::lighten):
1184         (WebCore::FEBlend::apply):
1185         * platform/graphics/filters/FEBlend.h:
1186         * platform/graphics/filters/FilterEffect.cpp:
1187         (WebCore::FilterEffect::calculateDrawingIntRect):
1188         * platform/graphics/filters/FilterEffect.h:
1189
1190 2009-08-18  Pavel Feldman  <pfeldman@chromium.org>
1191
1192         Reviewed by Timothy Hatcher.
1193
1194         WebInspector: Fix array formatter followup: node formatter.
1195
1196         https://bugs.webkit.org/show_bug.cgi?id=28427
1197
1198         * inspector/front-end/ConsoleView.js:
1199         (WebInspector.ConsoleView.prototype._format):
1200
1201 2009-08-18  Pavel Feldman  <pfeldman@chromium.org>
1202
1203         Reviewed by Timothy Hatcher.
1204
1205         WebInspector: Metrics sidebar broken
1206
1207         https://bugs.webkit.org/show_bug.cgi?id=28434
1208
1209         * inspector/front-end/MetricsSidebarPane.js:
1210
1211 2009-08-18  Alexey Proskuryakov  <ap@apple.com>
1212
1213         Reviewed by Darin Adler.
1214
1215         https://bugs.webkit.org/show_bug.cgi?id=28432
1216         String::createCFString() returns a non-retained empty string
1217
1218         No known change in functionality, so no test.
1219
1220         * platform/text/cf/StringCF.cpp: (WebCore::String::createCFString): Retain the CFSTR result.
1221
1222 2009-08-18  Brian Weinstein  <bweinstein@apple.com>
1223
1224         Reviewed by Oliver Hunt.
1225
1226         Fix of <https://bugs.webkit.org/show_bug.cgi?id=28326> DRT on Windows doesn't support 
1227         LayoutTestController::setQuota or print a callback on UIDelegate::exceededDatabaseQuota.
1228         
1229         Removed an early return that can cause deleteOrigin or deleteAllDatabases to fail when
1230         it doesn't have to.
1231
1232         * storage/DatabaseTracker.cpp:
1233         (WebCore::DatabaseTracker::deleteOrigin):
1234
1235 2009-08-18  Michelangelo De Simone  <micdesim@gmail.com>
1236
1237         Reviewed by Adele Peterson.
1238
1239         https://bugs.webkit.org/show_bug.cgi?id=27357
1240         Support for :valid and :invalid CSS selectors, from HTML5 specs.
1241         http://www.whatwg.org/specs/web-apps/current-work/#selector-valid
1242
1243         Tests: fast/css/pseudo-invalid-001.html
1244                fast/css/pseudo-invalid-002.html
1245                fast/css/pseudo-valid-001.html
1246                fast/css/pseudo-valid-002.html
1247                fast/css/pseudo-valid-003.html
1248                fast/css/pseudo-valid-004.html
1249                fast/css/pseudo-valid-005.html
1250                fast/css/pseudo-valid-006.html
1251                fast/css/pseudo-valid-007.html
1252
1253         * css/CSSSelector.cpp:
1254         (WebCore::CSSSelector::extractPseudoType): extracts new pseudo-classes
1255         * css/CSSSelector.h:
1256         (WebCore::CSSSelector::):
1257         * css/CSSStyleSelector.cpp:
1258         (WebCore::CSSStyleSelector::canShareStyleWithElement): Make sure we don't share style between
1259 form controls that have different validity states.
1260         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): applies
1261         style associated to new pseudo-classes
1262         * dom/Element.h:
1263         (WebCore::Element::willValidate): pushed up in hierarchy
1264         (WebCore::Element::isValidFormControlElement): checks for valid form
1265         control elements (wraps ValidityState::valid())
1266         * html/HTMLFormControlElement.cpp:
1267         (WebCore::HTMLFormControlElement::willValidate): minor clean up
1268         (WebCore::HTMLFormControlElement::isValidFormControlElement): ditto
1269         * html/HTMLFormControlElement.h:
1270         * html/HTMLKeygenElement.h:
1271         (WebCore::HTMLKeygenElement::willValidate): added
1272         * html/HTMLObjectElement.h:
1273         (WebCore::HTMLObjectElement::willValidate): added
1274         * html/HTMLObjectElement.idl:
1275
1276 2009-08-18  Pavel Feldman  <pfeldman@chromium.org>
1277
1278         Reviewed by Timothy Hatcher.
1279
1280         WebInspector: Fix array formatter.
1281
1282         https://bugs.webkit.org/show_bug.cgi?id=28427
1283
1284         * inspector/front-end/ConsoleView.js:
1285         (WebInspector.ConsoleView.prototype._formatarray):
1286
1287 2009-08-17  Joe Mason  <joe.mason@torchmobile.com>
1288
1289         Reviewed by George Staikos
1290
1291         Replace repeated string of PLATFORM(FOO) with a single define
1292         https://bugs.webkit.org/show_bug.cgi?id=27734
1293
1294         * loader/CachedFont.cpp:
1295         (WebCore::CachedFont::~CachedFont):
1296         (WebCore::CachedFont::ensureCustomFontData):
1297         (WebCore::CachedFont::platformDataFromCustomData):
1298         (WebCore::CachedFont::allClientsRemoved):
1299
1300 2009-08-16  David Hyatt  <hyatt@apple.com>
1301
1302         Reviewed by Dan Bernstein.
1303
1304         https://bugs.webkit.org/show_bug.cgi?id=20329, shadows and reflections incorrectly
1305         considered part of scrollable overflow.
1306
1307         This patch takes the engine's concept of overflow and splits it into two types:
1308         layout overflow and visual overflow.
1309         
1310         Layout overflow is about other boxes that spill out of an enclosing box,  For example,
1311         in the inline flow case a tall image could spill out of a line box. Examples of 
1312         visual overflow are shadows, text stroke (and eventually outline and
1313         border-image).
1314
1315         Three objects tracked overflow before this patch: RenderBlock had 
1316         m_overflowLeft/Top/Width/Height variables.  RootInlineBox had an Overflow*
1317         that also had four overflow values.  Finally RenderReplaced elements tracked shadow/reflection
1318         overflow using a map that cached four values.
1319         
1320         This patch takes all of these different overflow models and unifies them into a single
1321         new class called RenderOverflow.   This class is now a member variable in RenderBox and
1322         InlineFlowBoxes.  It is only allocated if overflow actually exists.  Instead of tracking
1323         four values, it tracks eight: left/top/right/bottom for layout overflow and 
1324         left/top/right/bottom for visual overflow.
1325         
1326         Overflow computation is now done after layout is finished rather than during layout
1327         (when child objects can be churning and moving around).  A number of layout tests progressed
1328         by deferring overflow computation to a separate pass.
1329         
1330         All inline flow boxes now track overflow (and not just the root line box).  This allows
1331         repainting of line boxes to actually be tight and bail early if the overflow rect of a box
1332         doesn't intersect.  The old code always visited all object on a line if the root line box
1333         intersected at all.
1334         
1335         Line box overflow no longer propagates across self-painting layers.  This fixes a number of
1336         issues with incorrect scrollbars appearing when relative positioned inlines were used in a page.
1337         
1338         Layer bounds have been modified to exclude visual overflow.  The width/height members only really
1339         have one reason for continued existence, and that is that they happen to be used in repaint()
1340         when an overflow clip object's height isn't accurate.  In this case, the bounds should exclude
1341         visual overflow anyway, so this change tightens that repaint up.
1342         
1343         Root lines have renamed m_selectionTop/Bottom to m_lineTop/Bottom and positionForPoint methods have
1344         been changed to use these instead of relying on overflow (which was totally wrong).
1345
1346         Significant changes have been made to the "almost strict mode" line box quirk where objects with no
1347         text children have no effect on the height of a line.  Instead of making the height() of the objects
1348         variable and dependent on overflow, the objects now have their full height and get placed on
1349         the baseline properly.  They simply don't contribute to overflow above lineTop/Bottom.
1350         
1351         Reflections are no longer considered overflow of any kind.  Because reflections have their own layers,
1352         it is not necessary to treat them as visual or layout overflow in the RenderObject tree.  The end result
1353         of not incorporating them into RenderOverflow is that they have no effect on scrolling.  transparencyClipBox
1354         has been extended to support fully reflecting the entire clip box when a reflection exists.  This fixes
1355         numerous repaint bugs in transparent objects with reflections when the transparent objects had self-painting
1356         sublayers.
1357
1358         * WebCore.xcodeproj/project.pbxproj:
1359         * dom/ContainerNode.cpp:
1360         (WebCore::ContainerNode::getUpperLeftCorner):
1361         * editing/visible_units.cpp:
1362         (WebCore::previousLinePosition):
1363         (WebCore::nextLinePosition):
1364         * page/FrameView.cpp:
1365         (WebCore::FrameView::adjustViewSize):
1366         (WebCore::FrameView::adjustPageHeight):
1367         * rendering/InlineBox.cpp:
1368         (WebCore::InlineBox::height):
1369         * rendering/InlineBox.h:
1370         * rendering/InlineFlowBox.cpp:
1371         (WebCore::InlineFlowBox::adjustPosition):
1372         (WebCore::InlineFlowBox::placeBoxesHorizontally):
1373         (WebCore::InlineFlowBox::placeBoxesVertically):
1374         (WebCore::InlineFlowBox::computeVerticalOverflow):
1375         (WebCore::InlineFlowBox::nodeAtPoint):
1376         (WebCore::InlineFlowBox::paint):
1377         * rendering/InlineFlowBox.h:
1378         (WebCore::InlineFlowBox::InlineFlowBox):
1379         (WebCore::InlineFlowBox::topCombinedOverflow):
1380         (WebCore::InlineFlowBox::bottomCombinedOverflow):
1381         (WebCore::InlineFlowBox::leftCombinedOverflow):
1382         (WebCore::InlineFlowBox::rightCombinedOverflow):
1383         (WebCore::InlineFlowBox::combinedOverflowRect):
1384         (WebCore::InlineFlowBox::topLayoutOverflow):
1385         (WebCore::InlineFlowBox::bottomLayoutOverflow):
1386         (WebCore::InlineFlowBox::leftLayoutOverflow):
1387         (WebCore::InlineFlowBox::rightLayoutOverflow):
1388         (WebCore::InlineFlowBox::layoutOverflowRect):
1389         (WebCore::InlineFlowBox::topVisualOverflow):
1390         (WebCore::InlineFlowBox::bottomVisualOverflow):
1391         (WebCore::InlineFlowBox::leftVisualOverflow):
1392         (WebCore::InlineFlowBox::rightVisualOverflow):
1393         (WebCore::InlineFlowBox::visualOverflowRect):
1394         (WebCore::InlineFlowBox::setHorizontalOverflowPositions):
1395         (WebCore::InlineFlowBox::setVerticalOverflowPositions):
1396         * rendering/InlineTextBox.cpp:
1397         (WebCore::InlineTextBox::paint):
1398         * rendering/RenderBlock.cpp:
1399         (WebCore::RenderBlock::RenderBlock):
1400         (WebCore::RenderBlock::layout):
1401         (WebCore::RenderBlock::layoutBlock):
1402         (WebCore::RenderBlock::addOverflowFromBlockChildren):
1403         (WebCore::RenderBlock::handleBottomOfBlock):
1404         (WebCore::RenderBlock::layoutBlockChildren):
1405         (WebCore::RenderBlock::paint):
1406         (WebCore::RenderBlock::fillInlineSelectionGaps):
1407         (WebCore::RenderBlock::floatRect):
1408         (WebCore::RenderBlock::lowestPosition):
1409         (WebCore::RenderBlock::rightmostPosition):
1410         (WebCore::RenderBlock::leftmostPosition):
1411         (WebCore::RenderBlock::addOverhangingFloats):
1412         (WebCore::RenderBlock::nodeAtPoint):
1413         (WebCore::RenderBlock::positionForPointWithInlineChildren):
1414         (WebCore::RenderBlock::layoutColumns):
1415         (WebCore::getHeightForLineCount):
1416         * rendering/RenderBlock.h:
1417         * rendering/RenderBlockLineLayout.cpp:
1418         (WebCore::RenderBlock::computeHorizontalPositionsForLine):
1419         (WebCore::RenderBlock::computeVerticalPositionsForLine):
1420         (WebCore::RenderBlock::layoutInlineChildren):
1421         (WebCore::RenderBlock::matchedEndLine):
1422         (WebCore::RenderBlock::addOverflowFromInlineChildren):
1423         * rendering/RenderBox.cpp:
1424         (WebCore::RenderBox::destroy):
1425         (WebCore::RenderBox::clippedOverflowRectForRepaint):
1426         (WebCore::RenderBox::localCaretRect):
1427         (WebCore::RenderBox::addShadowAndReflectionOverflow):
1428         (WebCore::RenderBox::addOverflowFromChild):
1429         (WebCore::RenderBox::addLayoutOverflow):
1430         (WebCore::RenderBox::addVisualOverflow):
1431         (WebCore::RenderBox::clearLayoutOverflow):
1432         * rendering/RenderBox.h:
1433         (WebCore::RenderBox::combinedOverflowRect):
1434         (WebCore::RenderBox::topCombinedOverflow):
1435         (WebCore::RenderBox::bottomCombinedOverflow):
1436         (WebCore::RenderBox::leftCombinedOverflow):
1437         (WebCore::RenderBox::rightCombinedOverflow):
1438         (WebCore::RenderBox::layoutOverflowRect):
1439         (WebCore::RenderBox::topLayoutOverflow):
1440         (WebCore::RenderBox::bottomLayoutOverflow):
1441         (WebCore::RenderBox::leftLayoutOverflow):
1442         (WebCore::RenderBox::rightLayoutOverflow):
1443         (WebCore::RenderBox::visualOverflowRect):
1444         (WebCore::RenderBox::topVisualOverflow):
1445         (WebCore::RenderBox::bottomVisualOverflow):
1446         (WebCore::RenderBox::leftVisualOverflow):
1447         (WebCore::RenderBox::rightVisualOverflow):
1448         * rendering/RenderFlexibleBox.cpp:
1449         (WebCore::RenderFlexibleBox::layoutBlock):
1450         (WebCore::RenderFlexibleBox::layoutHorizontalBox):
1451         (WebCore::RenderFlexibleBox::layoutVerticalBox):
1452         * rendering/RenderLayer.cpp:
1453         (WebCore::RenderLayer::updateLayerPosition):
1454         (WebCore::RenderLayer::localBoundingBox):
1455         * rendering/RenderLayerCompositor.cpp:
1456         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
1457         (WebCore::RenderLayerCompositor::ensureRootPlatformLayer):
1458         * rendering/RenderLineBoxList.cpp:
1459         (WebCore::RenderLineBoxList::paint):
1460         (WebCore::RenderLineBoxList::hitTest):
1461         * rendering/RenderListItem.cpp:
1462         (WebCore::RenderListItem::positionListMarker):
1463         * rendering/RenderObject.cpp:
1464         (WebCore::RenderObject::RenderObject):
1465         * rendering/RenderObject.h:
1466         * rendering/RenderOverflow.h: Added.
1467         (WebCore::RenderOverflow::RenderOverflow):
1468         (WebCore::RenderOverflow::topLayoutOverflow):
1469         (WebCore::RenderOverflow::bottomLayoutOverflow):
1470         (WebCore::RenderOverflow::leftLayoutOverflow):
1471         (WebCore::RenderOverflow::rightLayoutOverflow):
1472         (WebCore::RenderOverflow::topVisualOverflow):
1473         (WebCore::RenderOverflow::bottomVisualOverflow):
1474         (WebCore::RenderOverflow::leftVisualOverflow):
1475         (WebCore::RenderOverflow::rightVisualOverflow):
1476         (WebCore::RenderOverflow::setTopLayoutOverflow):
1477         (WebCore::RenderOverflow::setBottomLayoutOverflow):
1478         (WebCore::RenderOverflow::setLeftLayoutOverflow):
1479         (WebCore::RenderOverflow::setRightLayoutOverflow):
1480         (WebCore::RenderOverflow::setTopVisualOverflow):
1481         (WebCore::RenderOverflow::setBottomVisualOverflow):
1482         (WebCore::RenderOverflow::setLeftVisualOverflow):
1483         (WebCore::RenderOverflow::setRightVisualOverflow):
1484         (WebCore::RenderOverflow::layoutOverflowRect):
1485         (WebCore::RenderOverflow::visualOverflowRect):
1486         (WebCore::RenderOverflow::combinedOverflowRect):
1487         (WebCore::RenderOverflow::move):
1488         (WebCore::RenderOverflow::addLayoutOverflow):
1489         (WebCore::RenderOverflow::addVisualOverflow):
1490         (WebCore::RenderOverflow::resetLayoutOverflow):
1491         * rendering/RenderPartObject.cpp:
1492         (WebCore::RenderPartObject::layout):
1493         * rendering/RenderReplaced.cpp:
1494         (WebCore::RenderReplaced::~RenderReplaced):
1495         (WebCore::RenderReplaced::layout):
1496         (WebCore::RenderReplaced::shouldPaint):
1497         (WebCore::RenderReplaced::positionForPoint):
1498         (WebCore::RenderReplaced::clippedOverflowRectForRepaint):
1499         * rendering/RenderReplaced.h:
1500         * rendering/RenderScrollbarPart.cpp:
1501         (WebCore::RenderScrollbarPart::layout):
1502         (WebCore::RenderScrollbarPart::paintIntoRect):
1503         * rendering/RenderSlider.cpp:
1504         (WebCore::RenderSlider::layout):
1505         * rendering/RenderTable.cpp:
1506         (WebCore::RenderTable::layout):
1507         (WebCore::RenderTable::paint):
1508         * rendering/RenderTableCell.cpp:
1509         (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
1510         * rendering/RenderTableSection.cpp:
1511         (WebCore::RenderTableSection::layoutRows):
1512         * rendering/RenderTableSection.h:
1513         * rendering/RenderText.cpp:
1514         (WebCore::RenderText::positionForPoint):
1515         (WebCore::RenderText::localCaretRect):
1516         * rendering/RenderView.cpp:
1517         (WebCore::RenderView::layout):
1518         * rendering/RootInlineBox.cpp:
1519         (WebCore::RootInlineBox::addHighlightOverflow):
1520         (WebCore::RootInlineBox::adjustPosition):
1521         (WebCore::RootInlineBox::verticallyAlignBoxes):
1522         (WebCore::RootInlineBox::selectionTop):
1523         * rendering/RootInlineBox.h:
1524         (WebCore::RootInlineBox::RootInlineBox):
1525         (WebCore::RootInlineBox::nextRootBox):
1526         (WebCore::RootInlineBox::prevRootBox):
1527         (WebCore::RootInlineBox::lineTop):
1528         (WebCore::RootInlineBox::lineBottom):
1529         (WebCore::RootInlineBox::selectionBottom):
1530         (WebCore::RootInlineBox::selectionHeight):
1531         (WebCore::RootInlineBox::floats):
1532         (WebCore::RootInlineBox::floatsPtr):
1533         (WebCore::RootInlineBox::setLineTopBottomPositions):
1534         * rendering/SVGRootInlineBox.cpp:
1535         (WebCore::SVGRootInlineBox::layoutInlineBoxes):
1536
1537 2009-08-18  Alexey Proskuryakov  <ap@apple.com>
1538
1539         Reviewed by Darin Adler.
1540
1541         https://bugs.webkit.org/show_bug.cgi?id=28431
1542         <rdar://problem/7137610> Application Cache doesn't work with HTTP authentication
1543
1544         Test: http/tests/appcache/auth.html
1545
1546         * loader/appcache/ApplicationCacheGroup.h:
1547         (WebCore::ApplicationCacheGroup::shouldUseCredentialStorage): If appcache is enabled,
1548         always allow it to use stored credentials (we can't ask WebKit client, and maybe we
1549         shouldn't ask it, because it's not a document that's loading these resources).
1550
1551 2009-08-18  Anders Carlsson  <andersca@apple.com>
1552
1553         Reviewed by John Sullivan and David Hyatt.
1554
1555         Fix <rdar://problem/7147996>
1556
1557         * platform/ScrollView.cpp:
1558         (WebCore::ScrollView::setHasHorizontalScrollbar):
1559         (WebCore::ScrollView::setHasVerticalScrollbar):
1560         Update the style of the scroll bars.
1561         
1562         * rendering/RenderScrollbar.cpp:
1563         (WebCore::RenderScrollbar::RenderScrollbar):
1564         Calculate the size of the scrollbar and set it as the frame size.
1565
1566 2009-08-18  Eric Carlson  <eric.carlson@apple.com>
1567
1568         Reviewed by Simon Fraser.
1569
1570         HTMLMediaElement should fire 'progress' event before 'load'
1571         https://bugs.webkit.org/show_bug.cgi?id=28314
1572
1573         Test: media/progress-event-at-least-one.html
1574
1575         * html/HTMLMediaElement.cpp:
1576         (WebCore::HTMLMediaElement::setNetworkState):
1577             Schedule 'progress' event before 'load'.
1578
1579 2009-08-18  Peter Kasting  <pkasting@google.com>
1580
1581         Reviewed by Eric Seidel.
1582
1583         https://bugs.webkit.org/show_bug.cgi?id=28415
1584         Set svn:eol-style CRLF on all .sln and .vcproj files that don't already
1585         have it.
1586
1587         * WebCore.vcproj/QTMovieWin.vcproj:
1588         * WebCore.vcproj/WebCoreGenerated.vcproj:
1589
1590 2009-08-18  Drew Wilson  <atwilson@google.com>
1591
1592         Reviewed by Eric Seidel.
1593
1594         Need to extend DumpRenderTree to expose number of worker threads
1595         https://bugs.webkit.org/show_bug.cgi?id=28292
1596
1597         Expose WorkerThread::workerThreadCount() for DumpRenderTree so we can write worker lifecycle tests.
1598
1599         Tests: fast/workers/shared-worker-lifecycle.html-disabled
1600                fast/workers/worker-lifecycle.html
1601
1602         * WebCore.base.exp:
1603         Exported WorkerThread::workerThreadCount().
1604         * WebCore.xcodeproj/project.pbxproj:
1605         * workers/WorkerThread.cpp:
1606         Added tracking of the number of worker threads.
1607         (WebCore::threadCountMutex):
1608         (WebCore::WorkerThread::workerThreadCount):
1609         (WebCore::WorkerThread::WorkerThread):
1610         (WebCore::WorkerThread::~WorkerThread):
1611         * workers/WorkerThread.h:
1612
1613 2009-08-18  Ariya Hidayat  <ariya.hidayat@nokia.com>
1614
1615         Unreviewed, build fix.
1616
1617         [Qt] Add new files I forgot to add in r47424.
1618
1619 2009-08-18  Markus Goetz <Markus.Goetz@nokia.com>
1620
1621         Reviewed by Ariya Hidayat.
1622
1623         [Qt] Implement prefetchDNS() function.
1624
1625         * WebCore.pro:
1626         * platform/qt/TemporaryLinkStubs.cpp:
1627
1628 2009-08-18  Kent Tamura  <tkent@chromium.org>
1629
1630         Reviewed by Eric Seidel.
1631
1632         Support for parsing <datalist> element and generating HTMLDataListElement nodes.
1633         https://bugs.webkit.org/show_bug.cgi?id=26915
1634
1635         Tests: fast/forms/datalist-nonoption-child.html
1636                fast/forms/datalist.html
1637
1638         * WebCore.gypi:
1639         * WebCore.pro:
1640         * WebCore.vcproj/WebCore.vcproj:
1641         * WebCore.vcproj/WebCoreCommon.vsprops:
1642         * WebCore.vcproj/build-generated-files.sh:
1643         * WebCore.xcodeproj/project.pbxproj:
1644         * WebCoreSources.bkl:
1645         * css/html.css:
1646         * html/CollectionType.h:
1647         (WebCore::):
1648         * html/HTMLCollection.cpp:
1649         (WebCore::HTMLCollection::itemAfter):
1650         * html/HTMLDataListElement.cpp: Added.
1651         (WebCore::HTMLDataListElement::HTMLDataListElement):
1652         (WebCore::HTMLDataListElement::~HTMLDataListElement):
1653         (WebCore::HTMLDataListElement::checkDTD):
1654         (WebCore::HTMLDataListElement::options):
1655         * html/HTMLDataListElement.h: Added.
1656         * html/HTMLDataListElement.idl: Added.
1657         * html/HTMLElement.cpp:
1658         (WebCore::inlineTagList):
1659         * html/HTMLParser.cpp:
1660         (WebCore::HTMLParser::isAffectedByResidualStyle):
1661         * html/HTMLTagNames.in:
1662
1663 2009-08-17  Shinichiro Hamaji  <hamaji@chromium.org>
1664
1665         Reviewed by Eric Seidel.
1666
1667         -webkit-box-orient:horizontal doesn't work on <button> tag
1668         https://bugs.webkit.org/show_bug.cgi?id=34445
1669
1670         Make a flexible button's anonymous child flexible and pass the
1671         parent's box-orient to the anonymous child.
1672
1673         Also, added a renderName for anonymous flexible boxes.
1674
1675         Test: fast/flexbox/box-orient-button.html
1676
1677         * rendering/RenderBlock.cpp:
1678         (WebCore::RenderBlock::createAnonymousBlock):
1679         * rendering/RenderBlock.h:
1680         * rendering/RenderButton.cpp:
1681         (WebCore::RenderButton::addChild):
1682         (WebCore::RenderButton::setupInnerStyle):
1683         * rendering/RenderFlexibleBox.cpp:
1684         (WebCore::RenderFlexibleBox::renderName):
1685
1686 2009-08-17  Simon Fraser  <simon.fraser@apple.com>
1687
1688         Reviewed by Dave Hyatt.
1689         
1690         Render -webkit-mask via compositing layers when possible
1691         https://bugs.webkit.org/show_bug.cgi?id=28414
1692         
1693         Implement accelerated compositing of -webkit-mask, when combined
1694         with already-composited content.
1695         
1696         RenderLayerBacking now creates an additional GraphicsLayer for the mask contents,
1697         and sets this as the mask on another GraphicsLayer via the setMaskLayer() method.
1698         GraphicsLayerCA then applies the mask using -[CALayer setMask:].
1699         
1700         The enum values for GraphicsLayerPaintingPhase were renamed to avoid the
1701         confusion with "mask", and a new value, GraphicsLayerPaintMask, was added which
1702         indicates that just the mask is painting.
1703         
1704         When painting the composited mask, we need to paint with the normal compositing
1705         mode rather than CompositeDestinationIn, so InlineFlowBox and RenderBox now consult
1706         layer()->hasCompositedMask() to pick the mode. If the mask is composited, they no longer
1707         need to make transparency layers.
1708         
1709         We no longer have to throw video rendering into software because of masks.
1710         
1711         When a masked element has composited descendants, that element needs to
1712         become composited so that the mask can be applied via compositing.
1713
1714         Tests: compositing/masks/masked-ancestor.html
1715                compositing/masks/simple-composited-mask.html
1716
1717         * platform/graphics/GraphicsLayer.cpp:
1718         (WebCore::GraphicsLayer::GraphicsLayer):
1719         * platform/graphics/GraphicsLayer.h:
1720         (WebCore::GraphicsLayer::maskLayer):
1721         (WebCore::GraphicsLayer::setMaskLayer):
1722         (WebCore::GraphicsLayer::paintingPhase):
1723         (WebCore::GraphicsLayer::setPaintingPhase):
1724         * platform/graphics/GraphicsLayerClient.h:
1725         (WebCore::):
1726         * platform/graphics/mac/GraphicsLayerCA.h:
1727         (WebCore::GraphicsLayerCA::):
1728         * platform/graphics/mac/GraphicsLayerCA.mm:
1729         (WebCore::GraphicsLayerCA::setMaskLayer):
1730         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
1731         (WebCore::GraphicsLayerCA::commitLayerChanges):
1732         (WebCore::GraphicsLayerCA::updateMaskLayer):
1733         * rendering/InlineFlowBox.cpp:
1734         (WebCore::InlineFlowBox::paintMask):
1735         * rendering/RenderBox.cpp:
1736         (WebCore::RenderBox::paintMaskImages):
1737         * rendering/RenderLayer.cpp:
1738         (WebCore::RenderLayer::hasCompositedMask):
1739         * rendering/RenderLayer.h:
1740         (WebCore::RenderLayer::hasCompositedMask):
1741         * rendering/RenderLayerBacking.cpp:
1742         (WebCore::RenderLayerBacking::~RenderLayerBacking):
1743         (WebCore::RenderLayerBacking::destroyGraphicsLayer):
1744         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
1745         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1746         (WebCore::RenderLayerBacking::updateForegroundLayer):
1747         (WebCore::RenderLayerBacking::updateMaskLayer):
1748         (WebCore::RenderLayerBacking::paintingPhaseForPrimaryLayer):
1749         (WebCore::RenderLayerBacking::setContentsNeedDisplay):
1750         (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
1751         (WebCore::RenderLayerBacking::paintIntoLayer):
1752         (WebCore::RenderLayerBacking::paintContents):
1753         * rendering/RenderLayerBacking.h:
1754         (WebCore::RenderLayerBacking::hasMaskLayer):
1755         * rendering/RenderLayerCompositor.cpp:
1756         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1757         (WebCore::RenderLayerCompositor::canAccelerateVideoRendering):
1758         (WebCore::RenderLayerCompositor::requiresCompositingWhenDescendantsAreCompositing):
1759         * rendering/RenderLayerCompositor.h:
1760
1761 2009-08-17  Simon Fraser  <simon.fraser@apple.com>
1762
1763         Reviewed by Dave Hyatt.
1764
1765         Layer content misplaced with compositing, z-index and overflow
1766         https://bugs.webkit.org/show_bug.cgi?id=28361
1767         
1768         The foreground GraphicsLayer (used to render element foreground when the element has 
1769         negative z-order children) was misplaced when there is a clipping layer (which clips
1770         children). The foreground layer is parented under the clipping layer so that the foreground
1771         depth-sorts with the layer's children, so its geometry needs to be computed relative to
1772         that clipping layer.
1773         
1774         Also clarified some FIXME comments, and corrected a debug-only layer name.
1775
1776         Test: compositing/geometry/clipping-foreground.html
1777
1778         * platform/graphics/mac/GraphicsLayerCA.mm:
1779         (WebCore::GraphicsLayerCA::updateSublayerList):
1780         * rendering/RenderLayerBacking.cpp:
1781         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1782         (WebCore::RenderLayerBacking::updateForegroundLayer):
1783         * rendering/RenderLayerCompositor.cpp:
1784         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
1785
1786 2009-08-17  Mark Rowe  <mrowe@apple.com>
1787
1788         Reviewed by Sam Weinig.
1789
1790         Fix leaks of SVGElementInstance seen during regression tests.
1791
1792         r47313 made TreeShared types start with a ref-count of 1, but SVGElementInstance was mistakenly
1793         not updated to have a create method that adopted the initial reference.  This lead to the instances
1794         of SVGElementInstance allocated by SVGUseElement being leaked.
1795
1796         * svg/SVGElementInstance.h:
1797         (WebCore::SVGElementInstance::create):
1798         * svg/SVGUseElement.cpp:
1799         (WebCore::SVGUseElement::buildPendingResource):
1800         (WebCore::SVGUseElement::buildInstanceTree):
1801         (WebCore::SVGUseElement::handleDeepUseReferencing):
1802
1803 2009-08-17  Brady Eidson  <beidson@apple.com>
1804
1805         Reviewed by Sam Weinig.
1806
1807         Some cleanup towards https://bugs.webkit.org/show_bug.cgi?id=13631
1808         Page Cache should support pages with frames.
1809
1810         - Re-factor all remaining page cache code out of DocumentLoader, as CachedPage/CacheFrame loads
1811           are solely the responsibility of FrameLoader.
1812         - Enhance some page cache related Logging to help development.
1813
1814         * inspector/InspectorController.cpp:
1815         (WebCore::InspectorController::didCommitLoad):
1816         (WebCore::InspectorController::identifierForInitialRequest):
1817
1818         * loader/DocumentLoader.cpp:
1819         (WebCore::DocumentLoader::DocumentLoader):
1820         * loader/DocumentLoader.h:
1821
1822         * loader/FrameLoader.cpp:
1823         (WebCore::FrameLoader::FrameLoader):
1824         (WebCore::FrameLoader::commitProvisionalLoad):
1825         (WebCore::FrameLoader::continueLoadAfterWillSubmitForm):
1826         (WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
1827         * loader/FrameLoader.h:
1828         (WebCore::FrameLoader::isLoadingFromCachedPage):
1829
1830 2009-08-17  Roland Steiner  <rolandsteiner@google.com>
1831
1832         Reviewed by Eric Seidel.
1833
1834         Moved implementation of isAfterContent to RenderObject
1835         (as inline method to avoid potential performance regressions).
1836
1837         BUG 28376 -  [Cleanup] isAfterContent() implemented twice, should be member of RenderObject
1838         (https://bugs.webkit.org/show_bug.cgi?id=28376)
1839
1840         * rendering/RenderBox.cpp:
1841         * rendering/RenderBox.h:
1842         * rendering/RenderInline.cpp:
1843         * rendering/RenderObject.h:
1844         (WebCore::RenderObject::isAfterContent):
1845
1846 2009-08-17  Shinichiro Hamaji  <hamaji@chromium.org>
1847
1848         Reviewed by Darin Adler.
1849
1850         Assertion failure in WebCore::RenderHTMLCanvas::layout
1851         https://bugs.webkit.org/show_bug.cgi?id=12052
1852
1853         Don't handle run-in if the element is not a block element.
1854
1855         Test: fast/runin/nonblock-runin.html
1856
1857         * rendering/RenderBlock.cpp:
1858         (WebCore::RenderBlock::handleRunInChild):
1859
1860 2009-08-17  Benjamin C Meyer  <benjamin.meyer@torchmobile.com>
1861
1862         Reviewed by Darin Adler.
1863
1864         Fix createImageData to raise the NOT_SUPPORTED_ERR exception when
1865         either of the arguments are not finite.
1866
1867         According to
1868         http://www.whatwg.org/specs/web-apps/current-work/#pixel-manipulation:
1869         "If any of the arguments to createImageData() or getImageData() are
1870         infinite or NaN, or if the createImageData()  method is invoked with
1871         only one argument but that argument is null, the method must instead
1872         raise a NOT_SUPPORTED_ERR  exception."
1873
1874         Test: http://philip.html5.org/tests/canvas/suite/tests/2d.imageData.create.nonfinite.html
1875
1876         * html/canvas/CanvasRenderingContext2D.cpp:
1877         (WebCore::CanvasRenderingContext2D::createImageData):
1878         * html/canvas/CanvasRenderingContext2D.h:
1879         * html/canvas/CanvasRenderingContext2D.idl:
1880
1881 2009-08-17  Jeremy Orlow  <jorlow@chromium.org>
1882
1883         Reviewed by Darin Fisher.
1884
1885         Add a way to release the storage lock
1886         https://bugs.webkit.org/show_bug.cgi?id=28411
1887
1888         Two scripts within the same origin that are accessing LocalStorage must not do
1889         it simultaneously, according to the spec.  There are some cases, however, where
1890         a script might want to override this behavior.  navigator.getStorageUpdates()
1891         was added for this reason:
1892         http://dev.w3.org/html5/spec/Overview.html#manually-releasing-the-storage-mutex
1893
1894         Add this function to navigator and hook it up to DOM Storage.
1895
1896         * page/Navigator.cpp:
1897         (WebCore::Navigator::getStorageUpdates):
1898         * page/Navigator.h:
1899         * page/Navigator.idl:
1900         * storage/StorageNamespace.h:
1901         * storage/StorageNamespaceImpl.cpp:
1902         (WebCore::StorageNamespaceImpl::unlock):
1903         * storage/StorageNamespaceImpl.h:
1904
1905 2009-08-17  Mark Rowe  <mrowe@apple.com>
1906
1907         Build fix.
1908
1909         CFNetwork isn't present in the framework search path on Mac OS X so we can't directly include its headers.
1910         We include CoreServices.h, the umbrella framework that contains CFNetwork, from the prefix header which
1911         results in the CFNetwork headers being included on Mac OS X.  CoreServices.h doesn't include CFNetwork.h on
1912         Windows though so we explicitly include this header from the prefix header when on Windows.
1913
1914         * WebCorePrefix.h:
1915         * platform/network/cf/DNSCFNet.cpp: Remove #include that is no longer needed.
1916
1917 2009-08-17  Alexey Proskuryakov  <ap@apple.com>
1918
1919         Trying a better build fix (the previous one broke Leopard bots, although it did build for me).
1920
1921         * platform/network/cf/DNSCFNet.cpp: Include CFNetwork/CFNetwork.h instead.
1922
1923 2009-08-17  Alexey Proskuryakov  <ap@apple.com>
1924
1925         Trying to fix Windows build.
1926
1927         * platform/network/cf/DNSCFNet.cpp: Include CFNetwork/CFHost.h.
1928
1929 2009-08-17  Peter Kasting  <pkasting@google.com>
1930
1931         Reviewed by Steve Falkenburg.
1932
1933         https://bugs.webkit.org/show_bug.cgi?id=27323
1934         Only add Cygwin to the path when it isn't already there.  This avoids
1935         causing problems for people who purposefully have non-Cygwin versions of
1936         executables like svn in front of the Cygwin ones in their paths.
1937
1938         * WebCore.vcproj/QTMovieWin.vcproj:
1939         * WebCore.vcproj/WebCoreCommon.vsprops:
1940         * WebCore.vcproj/WebCoreGenerated.vcproj:
1941
1942 2009-08-17  Alexey Proskuryakov  <ap@apple.com>
1943
1944         Reviewed by Geoff Garen.
1945
1946         https://bugs.webkit.org/show_bug.cgi?id=28401
1947         Add support for DNS prefetching with CFNetwork
1948
1949         This is just an optimization, no behavior change, so no tests.
1950
1951         * platform/network/cf/DNSCFNet.cpp:
1952         (WebCore::clientCallback):
1953         (WebCore::prefetchDNS):
1954         Use async CFHostStartInfoResolution() for implementation.
1955
1956 2009-08-17  Aaron Boodman  <aa@chromium.org>
1957
1958         Reviewed by Alexey Proskuryakov.
1959
1960         https://bugs.webkit.org/show_bug.cgi?id=28313: Combine ThreadableLoaderOptions::crossOriginRequestPolicy and
1961         ThreadableLoaderOptions::crossOriginRedirectPolicy since they are always set the same way.
1962
1963         Also, tightened up behavior of XMLHttpRequest with cross-origin redirects and access control. We have not implemented
1964         redirects access control, so we should never redirect across origins. But in two edge cases, we were:
1965
1966         * Asynchronous XHR: Script on origin A requests resource from origin B. Server redirects (without sending access control
1967           authorization headers) to a resource on origin A.
1968         * Synchronous XHR: Script on origin A requests resource from origin B. Server redirects (without sending access control
1969           authorization headers) to another resource on origin B (this time sending access control authorization headers).
1970
1971         Test: http/tests/xmlhttprequest/access-control-and-redirects.html
1972
1973         * loader/DocumentThreadableLoader.cpp:
1974         (WebCore::DocumentThreadableLoader::willSendRequest): Refactor redirect checking code into shared location.
1975         (WebCore::DocumentThreadableLoader::loadRequest): Ditto.
1976         (WebCore::DocumentThreadableLoader::isAllowedRedirect): Ditto.
1977         * loader/DocumentThreadableLoader.h:
1978         * loader/ThreadableLoader.h:
1979         (WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions): Remove ThreadableLoaderOptions::crossOriginRedirectPolicy.
1980         * page/EventSource.cpp:
1981         (WebCore::EventSource::connect): Ditto.
1982         * workers/Worker.cpp: Ditto.
1983         (WebCore::Worker::Worker): Ditto.
1984         * workers/WorkerContext.cpp: Ditto.
1985         (WebCore::WorkerContext::importScripts): Ditto.
1986         * workers/WorkerScriptLoader.cpp:
1987         (WebCore::WorkerScriptLoader::loadSynchronously): Ditto.
1988         (WebCore::WorkerScriptLoader::loadAsynchronously): Ditto.
1989         * workers/WorkerScriptLoader.h: 
1990         * xml/XMLHttpRequest.cpp:
1991         (WebCore::XMLHttpRequest::createRequest): Ditto.
1992
1993 2009-08-17  Adam Langley  <agl@google.com>
1994
1995         Reviewed by Dan Bernstein (relanding of r47157).
1996
1997         Fix a typo in platform/graphics/skia/PlatformContextSkia.cpp
1998
1999         https://bugs.webkit.org/show_bug.cgi?id=28172
2000
2001         This was originally fixed in r47157, however it triggered a bug in
2002         Skia which caused Chromium Linux to fail layout tests in debug mode.
2003         It was reverted in r47189 while we sorted it out.
2004
2005         The Skia bug was fixed in Skia's r321 [1] and rolled into Chromium in
2006         Chromium's r23523. This is a reland of the original patch.
2007
2008         No new tests because it's a just typo fix.
2009
2010         [1] http://code.google.com/p/skia/source/detail?r=321
2011
2012         * platform/graphics/skia/PlatformContextSkia.cpp:
2013         (PlatformContextSkia::setupPaintCommon):
2014
2015 2009-08-17  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
2016
2017         Reviewed by Xan Lopez.
2018
2019         Protect ResourceHandle for g_file_query_info_async call, using the
2020         same technique we already use for HTTP requests that take the soup
2021         path.
2022
2023         * platform/network/soup/ResourceHandleSoup.cpp:
2024         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
2025         (WebCore::ResourceHandle::~ResourceHandle):
2026         (WebCore::finishedCallback):
2027         (WebCore::):
2028
2029 2009-08-17  Dan Bernstein  <mitz@apple.com>
2030
2031         Reviewed by Darin Adler.
2032
2033         REGRESSION (r47255): MediaWiki's (including Wikipedia) navigation pane
2034         appears below the main content
2035         https://bugs.webkit.org/show_bug.cgi?id=28350
2036
2037         A particular version of the MediaWiki software detects WebKit through
2038         user agent sniffing and imports a style sheet called KHTMLFixes.css,
2039         which contains a single rule that was meant to work around some KHTML
2040         bug, but currently has the sole effect of causing the float containing
2041         the main article content to extend all the way to the left and thus push
2042         down the left navigation pane.
2043
2044         * css/CSSImportRule.cpp:
2045         (WebCore::CSSImportRule::setCSSStyleSheet): If site specific hacks are
2046         enabled, check if the imported style sheet is the MediaWiki
2047         KHTMLFixes.css. If so, remove the offending rule.
2048
2049 2009-08-17  Brent Fulgham  <bfulgham@webkit.org>
2050
2051         Reviewed by Kevin Ollivier.
2052
2053         Correct crash when processing local cancelled requests.
2054
2055         No new tests. Existing fast/images/favicon-as-image.html
2056         displays the problem.
2057
2058         * platform/network/curl/ResourceHandleManager.cpp:
2059         (WebCore::writeCallback): Add check for m_cancelled after
2060           performing local-file processing.
2061         (WebCore::ResourceHandleManager::downloadTimerCallback): Add
2062           check for m_cancelled after performing local-file processing.
2063
2064 2009-08-17  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
2065
2066         Unreviewed. Reverts 47371, since it breaks GTK+.
2067
2068         * platform/graphics/ImageSource.cpp:
2069         (WebCore::ImageSource::setData):
2070         * platform/image-decoders/ImageDecoder.cpp: Removed.
2071         * platform/image-decoders/ImageDecoder.h:
2072         (WebCore::ImageDecoder::ImageDecoder):
2073         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
2074         (WebCore::convertCMYKToRGBA):
2075         (WebCore::convertRGBToRGBA):
2076         (WebCore::JPEGImageDecoder::outputScanlines):
2077         * platform/image-decoders/jpeg/JPEGImageDecoder.h:
2078         * platform/image-decoders/png/PNGImageDecoder.cpp:
2079         (WebCore::PNGImageDecoder::headerAvailable):
2080         (WebCore::PNGImageDecoder::rowAvailable):
2081
2082 2009-08-17  Yong Li  <yong.li@torchmobile.com>
2083
2084         Reviewed by Adam Treat.
2085
2086         Allow image decoders to down-sample the image directly
2087         to scaled output buffer. This can be enabled/disabled by
2088         macro ENABLE(IMAGE_DECODER_DOWN_SAMPLING).
2089         Only JPEG and PNG decoders are modified to support it now.
2090         https://bugs.webkit.org/show_bug.cgi?id=28308
2091
2092         * platform/graphics/ImageSource.cpp:
2093         (WebCore::ImageSource::setData):
2094         * platform/image-decoders/ImageDecoder.cpp: Added.
2095         * platform/image-decoders/ImageDecoder.h:
2096         (WebCore::ImageDecoder::ImageDecoder):
2097         (WebCore::ImageDecoder::setMaxNumPixels):
2098         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
2099         (WebCore::convertCMYKToRGBA):
2100         (WebCore::convertRGBToRGBA):
2101         (WebCore::JPEGImageDecoder::outputScanlines):
2102         * platform/image-decoders/jpeg/JPEGImageDecoder.h:
2103         (WebCore::JPEGImageDecoder::setSize):
2104         * platform/image-decoders/png/PNGImageDecoder.cpp:
2105         (WebCore::PNGImageDecoder::headerAvailable):
2106         (WebCore::PNGImageDecoder::rowAvailable):
2107
2108 2009-08-17  Simon Fraser  <simon.fraser@apple.com>
2109
2110         Build fix: fix float literals to avoid casting warnings.
2111
2112         * rendering/MediaControlElements.cpp:
2113
2114 2009-08-17  Simon Fraser  <simon.fraser@apple.com>
2115
2116         Reviewed by Eric Seidel.
2117
2118         Use OwnPtrs for GraphicsLayers
2119         https://bugs.webkit.org/show_bug.cgi?id=28399
2120
2121         Convert RenderLayerBacking and RenderLayerCompositor to use OwnPtrs
2122         for their references to GraphicsLayers.
2123
2124         * platform/graphics/GraphicsLayer.h:
2125         * platform/graphics/mac/GraphicsLayerCA.mm:
2126         (WebCore::GraphicsLayer::create):
2127         * rendering/RenderLayerBacking.cpp:
2128         (WebCore::RenderLayerBacking::RenderLayerBacking):
2129         (WebCore::RenderLayerBacking::createGraphicsLayer):
2130         (WebCore::RenderLayerBacking::destroyGraphicsLayer):
2131         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2132         (WebCore::RenderLayerBacking::updateInternalHierarchy):
2133         (WebCore::RenderLayerBacking::updateClippingLayers):
2134         (WebCore::RenderLayerBacking::updateForegroundLayer):
2135         (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
2136         * rendering/RenderLayerBacking.h:
2137         (WebCore::RenderLayerBacking::graphicsLayer):
2138         (WebCore::RenderLayerBacking::clippingLayer):
2139         (WebCore::RenderLayerBacking::ancestorClippingLayer):
2140         (WebCore::RenderLayerBacking::foregroundLayer):
2141         (WebCore::RenderLayerBacking::parentForSublayers):
2142         (WebCore::RenderLayerBacking::childForSuperlayers):
2143         * rendering/RenderLayerCompositor.cpp:
2144         (WebCore::RenderLayerCompositor::~RenderLayerCompositor):
2145         (WebCore::RenderLayerCompositor::rootPlatformLayer):
2146         (WebCore::RenderLayerCompositor::didMoveOnscreen):
2147         (WebCore::RenderLayerCompositor::ensureRootPlatformLayer):
2148         (WebCore::RenderLayerCompositor::destroyRootPlatformLayer):
2149         * rendering/RenderLayerCompositor.h:
2150
2151 2009-08-17  Pavel Feldman  <pfeldman@chromium.org>
2152
2153         Reviewed by Timothy Hatcher.
2154
2155         WebInspector: Reset InjectedScript styles cache on document change.
2156
2157         https://bugs.webkit.org/show_bug.cgi?id=28390
2158
2159         * inspector/InspectorController.cpp:
2160         (WebCore::InspectorController::close):
2161         (WebCore::InspectorController::populateScriptObjects):
2162         (WebCore::InspectorController::didCommitLoad):
2163         (WebCore::InspectorController::resetInjectedScript):
2164         * inspector/InspectorController.h:
2165         * inspector/InspectorDOMAgent.cpp:
2166         (WebCore::InspectorDOMAgent::setDocument):
2167         * inspector/InspectorDOMAgent.h:
2168         * inspector/front-end/InjectedScript.js:
2169         (InjectedScript._reset):
2170
2171 2009-08-17  Darin Adler  <darin@apple.com>
2172
2173         Reviewed by Sam Weinig.
2174
2175         * rendering/MediaControlElements.cpp: Removed unneeded include of CString.h,
2176         resorted includes, renamed "doc" to "document" and fixed formatting.
2177
2178 2009-08-17  Darin Adler  <darin@apple.com>
2179
2180         Reviewed by Sam Weinig.
2181
2182         Removed functions now unneeded due to use of Reflect to create
2183         language bindings.
2184
2185         * accessibility/AccessibilityRenderObject.cpp:
2186         (WebCore::AccessibilityRenderObject::accessibilityParentForImageMap):
2187         Get at usemap attribute directly.
2188
2189         * editing/DeleteButtonController.cpp:
2190         (WebCore::DeleteButtonController::createDeletionUI):
2191         Get at id attribute directly.
2192         * editing/EditorCommand.cpp:
2193         (WebCore::executeInsertHorizontalRule): Ditto.
2194
2195         * html/HTMLDocument.cpp:
2196         (WebCore::HTMLDocument::dir): Get at dir attribute of body directly.
2197         (WebCore::HTMLDocument::setDir): Ditto.
2198
2199         * html/HTMLElement.cpp: Deleted unused functions.
2200         * html/HTMLElement.h: Ditto.
2201
2202         * html/HTMLImageElement.cpp: Deleted unused functions.
2203         (WebCore::HTMLImageElement::alt): Changed to return const AtomicString&.
2204         (WebCore::HTMLImageElement::addSubresourceAttributeURLs): Changed to
2205         get at usemap attribute directly, but added a FIXME because although
2206         it is what the old code did, it looks to not be entirely correct.
2207
2208         * html/HTMLImageElement.h: Deleted unused functions.
2209
2210         * rendering/HitTestResult.cpp:
2211         (WebCore::HitTestResult::altDisplayString): Get at alt attribute directly.
2212
2213         * rendering/RenderImage.cpp:
2214         (WebCore::RenderImage::imageMap): Get at usemap attribute directly.
2215
2216         * rendering/RenderLayerBacking.cpp:
2217         (WebCore::RenderLayerBacking::createGraphicsLayer): Get at id attribute
2218         directly.
2219         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer): Removed
2220         explicit HTMLNames namespace qualification.
2221
2222 2009-08-17  Darin Adler  <darin@apple.com>
2223
2224         Reviewed by Sam Weinig.
2225
2226         * dom/Document.cpp:
2227         (WebCore::Document::setFocusedNode): Removed unneeded calls
2228         to RefPtr::get.
2229
2230 2009-08-17  Pavel Feldman  <pfeldman@chromium.org>
2231
2232         Reviewed by Timothy Hatcher.
2233
2234         WebInspector: Discard DOM Node bindings on any document change.
2235
2236         https://bugs.webkit.org/show_bug.cgi?id=28389
2237
2238         * inspector/InspectorDOMAgent.cpp:
2239         (WebCore::InspectorDOMAgent::setDocument):
2240
2241 2009-08-13  Joseph Pecoraro  <joepeck02@gmail.com>
2242
2243         Reviewed by Timothy Hatcher.
2244
2245         Inspector: Improve Cookie DataGrid to Show Hidden Data
2246         https://bugs.webkit.org/show_bug.cgi?id=28269
2247
2248         * English.lproj/localizedStrings.js: DataGrid Headers "Name", "Value", "Size", ...
2249         * WebCore.gypi: added missing files
2250
2251           Implemented Bindings for InspectorController.deleteCookie(name)
2252
2253         * inspector/InspectorBackend.idl:
2254         * bindings/js/JSInspectorBackendCustom.cpp:
2255         (WebCore::JSInspectorBackend::cookies):
2256         (WebCore::JSInspectorBackend::deleteCookie):
2257
2258           v8 Bindings Stubs
2259
2260         * bindings/v8/custom/V8CustomBinding.h:
2261         * bindings/v8/custom/V8InspectorBackendCustom.cpp:
2262         (WebCore::CALLBACK_FUNC_DECL):
2263
2264           Removed WebInspector.Cookie
2265
2266         * inspector/front-end/Cookie.js: Removed.
2267         * inspector/front-end/inspector.html:
2268         * inspector/front-end/WebKit.qrc:
2269
2270           Improved DataGrid and Kept Fallback Behavior for Platforms that don't
2271           yet provide access to raw cookies.
2272
2273         * inspector/front-end/CookieItemsView.js:
2274         (WebInspector.CookieItemsView):
2275         (WebInspector.CookieItemsView.prototype.get statusBarItems):
2276         (WebInspector.CookieItemsView.prototype.update):
2277         (WebInspector.CookieItemsView.prototype.buildCookies):
2278         (WebInspector.CookieItemsView.prototype.dataGridForCookies):
2279         (WebInspector.CookieItemsView.prototype.fallbackUpdate.callback):
2280         (WebInspector.CookieItemsView.prototype.fallbackUpdate):
2281         (WebInspector.CookieItemsView.prototype.fallbackBuildCookiesFromString):
2282         (WebInspector.CookieItemsView.prototype.fallbackDataGridForCookies):
2283         (WebInspector.CookieItemsView.prototype._deleteButtonClicked):
2284
2285           Interaction with the page through Injected Script (for fallback behavior)
2286
2287         * inspector/front-end/DOMAgent.js:
2288         (InspectorController.getCookies):
2289         * inspector/front-end/InjectedScript.js:
2290         (InjectedScript.setStyleProperty): style fix
2291         (InjectedScript.getCookies):
2292
2293           Allow alignment of text inside DataGrids.
2294
2295         * inspector/front-end/DataGrid.js:
2296         (WebInspector.DataGrid):
2297         (WebInspector.DataGridNode.prototype.createCell):
2298         * inspector/front-end/DatabasesPanel.js:
2299         (WebInspector.DatabasesPanel.prototype.dataGridForDOMStorage):
2300         * inspector/front-end/inspector.css:
2301
2302           Added deleteCookie(., ., String name)
2303           Modified getRawCookies to return a bool to know if its implemented
2304
2305         * platform/CookieJar.h:
2306
2307
2308           Implemented deleteCookie for Macs
2309
2310         * platform/mac/CookieJar.mm:
2311         (WebCore::getRawCookies):
2312         (WebCore::deleteCookie):
2313
2314           Stub Implementations for Other Platforms
2315
2316         * platform/haiku/CookieJarHaiku.cpp:
2317         (WebCore::getRawCookies):
2318         (WebCore::deleteCookie):
2319         * platform/network/chromium/CookieJarChromium.cpp:
2320         (WebCore::getRawCookies):
2321         (WebCore::deleteCookie):
2322         * platform/network/curl/CookieJarCurl.cpp:
2323         (WebCore::getRawCookies):
2324         (WebCore::deleteCookie):
2325         * platform/network/soup/CookieJarSoup.cpp:
2326         (WebCore::getRawCookies):
2327         (WebCore::deleteCookie):
2328         * platform/network/win/CookieJarCFNetWin.cpp:
2329         (WebCore::getRawCookies):
2330         (WebCore::deleteCookie):
2331         * platform/network/win/CookieJarWin.cpp:
2332         (WebCore::getRawCookies):
2333         (WebCore::deleteCookie):
2334         * platform/qt/CookieJarQt.cpp:
2335         (WebCore::getRawCookies):
2336         (WebCore::deleteCookie):
2337
2338 2009-08-17  Adam Treat  <adam.treat@torchmobile.com>
2339
2340         Blind build fix for Leopard.
2341
2342         * platform/graphics/GraphicsContext.cpp:
2343         (WebCore::GraphicsContext::adjustLineToPixelBoundaries):
2344
2345 2009-08-13  Mike Fenton  <mike.fenton@torchmobile.com>
2346
2347         Reviewed by Adam Treat.
2348
2349         Style fixes based on cpp_style.py and WebKit Style guide for
2350         GraphicsContextCG.cpp
2351
2352         https://bugs.webkit.org/show_bug.cgi?id=28268
2353
2354         * platform/graphics/cg/GraphicsContextCG.cpp:
2355         (WebCore::GraphicsContext::drawLine):
2356         (WebCore::GraphicsContext::drawEllipse):
2357         (WebCore::GraphicsContext::strokeArc):
2358         (WebCore::GraphicsContext::drawConvexPolygon):
2359         (WebCore::GraphicsContext::applyStrokePattern):
2360         (WebCore::GraphicsContext::drawPath):
2361         (WebCore::GraphicsContext::clipOut):
2362         (WebCore::GraphicsContext::clipOutEllipseInRect):
2363         (WebCore::GraphicsContext::addInnerRoundedRectClip):
2364         (WebCore::GraphicsContext::clipToImageBuffer):
2365         (WebCore::GraphicsContext::setPlatformShadow):
2366         (WebCore::GraphicsContext::setLineCap):
2367         (WebCore::GraphicsContext::setLineJoin):
2368         (WebCore::GraphicsContext::roundToDevicePixels):
2369         (WebCore::GraphicsContext::drawLineForText):
2370         (WebCore::GraphicsContext::setURLForRect):
2371         (WebCore::GraphicsContext::setImageInterpolationQuality):
2372         (WebCore::GraphicsContext::imageInterpolationQuality):
2373         (WebCore::GraphicsContext::setPlatformTextDrawingMode):
2374         (WebCore::GraphicsContext::setCompositeOperation):
2375
2376 2009-08-13  Mike Fenton  <mike.fenton@torchmobile.com>
2377
2378         Reviewed by Adam Treat.
2379
2380         Style fixes based on cpp_style.py and WebKit Style guide for
2381         GraphicsContext.cpp/h, GraphicsContextCairo.cpp and GraphicsContextQt.cpp.
2382
2383         https://bugs.webkit.org/show_bug.cgi?id=28268
2384
2385         * platform/graphics/GraphicsContext.cpp:
2386         (WebCore::GraphicsContext::save):
2387         (WebCore::GraphicsContext::restore):
2388         (GraphicsContext::drawText):
2389         (GraphicsContext::initFocusRing):
2390         (GraphicsContext::focusRingBoundingRect):
2391         (GraphicsContext::drawImage):
2392         * platform/graphics/GraphicsContext.h:
2393         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2394         (WebCore::GraphicsContext::drawLine):
2395         (WebCore::GraphicsContext::strokeArc):
2396         (WebCore::GraphicsContext::setLineCap):
2397         (WebCore::GraphicsContext::setLineJoin):
2398         (WebCore::toCairoOperator):
2399         * platform/graphics/qt/GraphicsContextQt.cpp:
2400
2401 2009-08-17  Darin Adler  <darin@apple.com>
2402
2403         Reviewed by Dan Bernstein.
2404
2405         Change HTMLAreaElement to use OwnArrayPtr
2406         https://bugs.webkit.org/show_bug.cgi?id=28386
2407
2408         * html/HTMLAreaElement.cpp:
2409         (WebCore::HTMLAreaElement::HTMLAreaElement): Removed unneeded initializer.
2410         (WebCore::HTMLAreaElement::~HTMLAreaElement): Removed unneeded delete call.
2411         (WebCore::HTMLAreaElement::parseMappedAttribute): Use the set function
2412         instead of deletion followed by assignment.
2413         * html/HTMLAreaElement.h: Use OwnArrayPtr.
2414
2415 2009-08-17  Darin Adler  <darin@apple.com>
2416
2417         Fix Windows build.
2418
2419         * dom/make_names.pl: Add back cast to (void*) needed on Windows.
2420
2421 2009-08-17  Darin Adler  <darin@apple.com>
2422
2423         Reviewed by Dan Bernstein.
2424
2425         Move noResize from HTMLFrameElementBase to HTMLFrameElement
2426         https://bugs.webkit.org/show_bug.cgi?id=28384
2427
2428         * html/HTMLFrameElement.cpp:
2429         (WebCore::HTMLFrameElement::HTMLFrameElement): Initialize m_noResize.
2430         (WebCore::HTMLFrameElement::parseMappedAttribute): Set m_noResize to true
2431         here if noresizeAttr is changed. This code was moved here from
2432         HTMLFrameElementBase, but I added some FIXME comments.
2433         (WebCore::HTMLFrameElement::setNoResize): Set the attribute based on
2434         boolean argument. Moved here from HTMLFrameElementBase.
2435
2436         * html/HTMLFrameElement.h: Moved noResize, setNoResize, and m_noResize
2437         here from HTMLFrameElementBase.
2438
2439         * html/HTMLFrameElementBase.cpp:
2440         (WebCore::HTMLFrameElementBase::HTMLFrameElementBase): Removed m_noResize.
2441         (WebCore::HTMLFrameElementBase::parseMappedAttribute): Removed code to parse
2442         noresizeAttr.
2443
2444         * html/HTMLFrameElementBase.h: Removed noResize, setNoResize, and m_noResize.
2445
2446 2009-08-17  Darin Adler  <darin@apple.com>
2447
2448         Reviewed by Dan Bernstein.
2449
2450         Tweak HTMLFrameElementBase so that m_URL can be private
2451         https://bugs.webkit.org/show_bug.cgi?id=28385
2452
2453         * html/HTMLFrameElement.cpp:
2454         (WebCore::HTMLFrameElement::rendererIsNeeded): Removed m_URL argument.
2455         * html/HTMLFrameElementBase.cpp:
2456         (WebCore::HTMLFrameElementBase::isURLAllowed): Use m_URL instead of
2457         taking an argument.
2458         (WebCore::HTMLFrameElementBase::openURL): Removed m_URL argument.
2459         * html/HTMLFrameElementBase.h: Removed argument from isURLAllowed function.
2460         * html/HTMLIFrameElement.cpp:
2461         (WebCore::HTMLIFrameElement::rendererIsNeeded): Removed m_URL argument.
2462
2463 2009-08-17  Darin Adler  <darin@apple.com>
2464
2465         Reviewed by Dan Bernstein.
2466
2467         HTMLViewSourceDocument should use smart pointers
2468         https://bugs.webkit.org/show_bug.cgi?id=28378
2469
2470         * html/HTMLViewSourceDocument.cpp:
2471         (WebCore::HTMLViewSourceDocument::HTMLViewSourceDocument): Don't initialize
2472         pointers any more since RefPtr starts 0 by default.
2473         (WebCore::HTMLViewSourceDocument::createContainingTable): Use more specific
2474         types for local variables.
2475         (WebCore::HTMLViewSourceDocument::addSpanWithClassName): Return a PassRefPtr,
2476         and use a RefPtr of a more specific type for a local variable.
2477         (WebCore::HTMLViewSourceDocument::addLine): Use more specific types for local
2478         variables, and use RefPtr as well.
2479         (WebCore::HTMLViewSourceDocument::addLink): Return a PassRefPtr, and use a
2480         RefPtr of a more specific type for a local variable.
2481
2482         * html/HTMLViewSourceDocument.h: Change return types to PassRefPtr and
2483         data member types to RefPtr.
2484
2485 2009-08-17  Darin Adler  <darin@apple.com>
2486
2487         Reviewed by Sam Weinig.
2488
2489         DOM attribute getter/setter functions should use const AtomicString& type
2490         https://bugs.webkit.org/show_bug.cgi?id=25425
2491
2492         Convert 4 more classes. These are classes I am going to make other changes
2493         to soon, so it's good to have this use of Reflect in the IDL out of the way.
2494
2495         * html/HTMLEmbedElement.idl: Use Reflect for many attributes.
2496         * html/HTMLFrameElement.idl: Ditto.
2497         * html/HTMLIFrameElement.idl: Ditto.
2498         * html/HTMLObjectElement.idl: Ditto.
2499
2500 2009-08-17  Darin Adler  <darin@apple.com>
2501
2502         Reviewed by Sam Weinig.
2503
2504         Script to create element factory needs changes to accommodate calling create
2505         https://bugs.webkit.org/show_bug.cgi?id=28379
2506
2507         * dom/make_names.pl: Tweak formatting. Remove lots of unneeded quotes
2508         around names used inside {}. Added new createWithNew property for tags
2509         that makes the factory use a create function instead of calling new.
2510         Renamed functions with initialize in their name to have default in their
2511         name, since they return an array full of default values and don't themselves
2512         initialize anything.
2513
2514 2009-08-16  Darin Adler  <darin@apple.com>
2515
2516         Reviewed by Dan Bernstein.
2517
2518         StyledElement should use ASCIICType instead of having its own toHex function
2519         https://bugs.webkit.org/show_bug.cgi?id=28377
2520
2521         * dom/StyledElement.cpp:
2522         (WebCore::StyledElement::addCSSColor): Use isASCIIHexDigit and toASCIIHexValue.
2523
2524 2009-08-16  Darin Adler  <darin@apple.com>
2525
2526         Reviewed by Dan Bernstein.
2527
2528         execCommand("InsertHorizontalRule") inserts a broken <hr> element
2529         https://bugs.webkit.org/show_bug.cgi?id=28375
2530
2531         * editing/EditorCommand.cpp:
2532         (WebCore::executeInsertHorizontalRule): Create an HTMLHRElement
2533         instead of just an HTMLElement.
2534
2535 2009-08-16  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
2536
2537         Reviewed by George Staikos.
2538
2539         [WML] <option> element & 'onpick' events - history navigation is broken
2540         https://bugs.webkit.org/show_bug.cgi?id=28371
2541
2542         After selecting an option element with an 'onpick' event associated with a 'go' task,
2543         the navigation is executed. When going back in history, the same 'onpick' event is fired
2544         again. Fix that problem, add wml/option-element-onpick-recursion.html covering the bug.
2545
2546         Test: wml/option-element-onpick-recursion.html
2547
2548         * wml/WMLOptionElement.cpp:
2549         (WebCore::WMLOptionElement::handleIntrinsicEventIfNeeded):
2550         * wml/WMLSelectElement.cpp:
2551         (WebCore::WMLSelectElement::WMLSelectElement):
2552         (WebCore::WMLSelectElement::selectInitialOptions):
2553         * wml/WMLSelectElement.h:
2554         (WebCore::WMLSelectElement::initialized):
2555
2556 2009-08-16  Anthony Ricaud  <rik@webkit.org>
2557
2558         Reviewed by Timothy Hatcher.
2559
2560         Inspector Resource filtering: keyboard Navigation always uses ALL resources
2561         https://bugs.webkit.org/show_bug.cgi?id=28231
2562         
2563         Determine if a resource is selectable on user action.
2564         
2565         * inspector/front-end/ResourcesPanel.js:
2566         (WebInspector.ResourceSidebarTreeElement.prototype.get selectable):
2567
2568 2009-08-16  David Kilzer  <ddkilzer@apple.com>
2569
2570         <http://webkit.org/b/28355> Replace MAX()/MIN() macros with type-safe std::max()/min() templates
2571
2572         Reviewed by Dan Bernstein.
2573
2574         * accessibility/mac/AccessibilityObjectWrapper.mm:
2575         (AXAttributeStringSetSpelling): Changed MIN() to min().
2576         * platform/graphics/mac/FontMacATSUI.mm:
2577         (WebCore::Font::selectionRectForComplexText): Changed MAX() to
2578         max() and MIN() to min().
2579         (WebCore::Font::floatWidthForComplexText): Ditto.
2580         * platform/graphics/mac/SimpleFontDataMac.mm: Added using
2581         std::max statement.
2582         (WebCore::SimpleFontData::platformInit): Changed MAX() to max().
2583         * platform/text/mac/TextCodecMac.cpp:
2584         (WebCore::TextCodecMac::decode): Changed MIN() to min().
2585
2586 2009-08-16  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
2587
2588         Reviewed by George Staikos.
2589
2590         [WML] Cleanup WMLIntrinsicEventHandling code
2591         https://bugs.webkit.org/show_bug.cgi?id=28358
2592
2593         Remove superflous "Event* evt" parameter from executeTask() methods. It's a leftover from the initial WML merge.
2594
2595         * wml/WMLAnchorElement.cpp:
2596         (WebCore::WMLAnchorElement::defaultEventHandler):
2597         * wml/WMLDoElement.cpp:
2598         (WebCore::WMLDoElement::defaultEventHandler):
2599         * wml/WMLGoElement.cpp:
2600         (WebCore::WMLGoElement::executeTask):
2601         * wml/WMLGoElement.h:
2602         * wml/WMLIntrinsicEventHandler.cpp:
2603         (WebCore::WMLIntrinsicEventHandler::triggerIntrinsicEvent):
2604         * wml/WMLPrevElement.cpp:
2605         (WebCore::WMLPrevElement::executeTask):
2606         * wml/WMLPrevElement.h:
2607         * wml/WMLRefreshElement.cpp:
2608         (WebCore::WMLRefreshElement::executeTask):
2609         * wml/WMLRefreshElement.h:
2610         * wml/WMLTaskElement.h:
2611
2612 2009-08-16  Pavel Feldman  <pfeldman@chromium.org>
2613
2614         Reviewed by Timothy Hatcher.
2615
2616         WebInspector: A handful of DOMAgent-related fixes and cleanups.
2617
2618         - renamed elementId to nodeId in operations on nodes.
2619         - added load listeners to frame owners in InspectorDOMAgent.
2620         - removed InspectorController::inspectedWindowScriptObjectCleared event.
2621         - preserved isViaInspector flag for 'via inspector' marker to survive styles update.
2622         - removed contentDocument-related logic from ElementsPanel since it is handled in
2623             the InspectorDOMAgent.
2624         - removed DOM listeners unregistration and corresponding events from InspectorController.
2625         - made this.styles 'private' in ElementsPanel.
2626         - added TODO for the handleCopy processing.
2627
2628         https://bugs.webkit.org/show_bug.cgi?id=28356
2629
2630         * WebCore.order:
2631         * inspector/InspectorBackend.cpp:
2632         (WebCore::InspectorBackend::getChildNodes):
2633         (WebCore::InspectorBackend::setTextNodeValue):
2634         * inspector/InspectorBackend.h:
2635         * inspector/InspectorBackend.idl:
2636         * inspector/InspectorController.cpp:
2637         * inspector/InspectorController.h:
2638         * inspector/InspectorDOMAgent.cpp:
2639         (WebCore::InspectorDOMAgent::startListening):
2640         (WebCore::InspectorDOMAgent::stopListening):
2641         (WebCore::InspectorDOMAgent::handleEvent):
2642         (WebCore::InspectorDOMAgent::pushChildNodesToFrontend):
2643         (WebCore::InspectorDOMAgent::getChildNodes):
2644         (WebCore::InspectorDOMAgent::pushNodePathToFrontend):
2645         (WebCore::InspectorDOMAgent::setTextNodeValue):
2646         (WebCore::InspectorDOMAgent::buildObjectForNode):
2647         (WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
2648         (WebCore::InspectorDOMAgent::innerParentNode):
2649         * inspector/InspectorDOMAgent.h:
2650         * inspector/InspectorFrontend.cpp:
2651         * inspector/InspectorFrontend.h:
2652         * inspector/front-end/DOMAgent.js:
2653         (WebInspector.DOMDocument.prototype.addEventListener):
2654         (WebInspector.DOMDocument.prototype.removeEventListener):
2655         (WebInspector.DOMDocument.prototype._fireDomEvent):
2656         (WebInspector.DOMAgent.prototype.getChildNodesAsync.mycallback):
2657         (WebInspector.DOMAgent.prototype.getChildNodesAsync):
2658         (WebInspector.DOMAgent.prototype._setChildNodes):
2659         (WebInspector.CSSStyleDeclaration.parseRule):
2660         (WebInspector.childNodeInserted):
2661         (WebInspector.childNodeRemoved):
2662         * inspector/front-end/ElementsPanel.js:
2663         (WebInspector.ElementsPanel):
2664         (WebInspector.ElementsPanel.prototype.reset):
2665         (WebInspector.ElementsPanel.prototype.addStyleChange):
2666         (WebInspector.ElementsPanel.prototype.removeStyleChange):
2667         (WebInspector.ElementsPanel.prototype._updateModifiedNodes):
2668         (WebInspector.ElementsPanel.prototype.updateBreadcrumb):
2669         (WebInspector.ElementsPanel.prototype.handleCopyEvent):
2670         * inspector/front-end/ElementsTreeOutline.js:
2671         (WebInspector.ElementsTreeOutline.prototype.set rootDOMNode):
2672         (WebInspector.ElementsTreeOutline.prototype.findTreeElement):
2673         (WebInspector.ElementsTreeElement):
2674         (WebInspector.ElementsTreeElement.prototype._updateChildren.updateChildrenOfNode):
2675         (WebInspector.ElementsTreeElement.prototype._updateChildren):
2676         (WebInspector.ElementsTreeElement.prototype.onexpand):
2677         * inspector/front-end/InjectedScript.js:
2678         (InjectedScript.addStyleSelector):
2679         (InjectedScript._serializeRule):
2680         * inspector/front-end/StylesSidebarPane.js:
2681         (WebInspector.StylePropertiesSection):
2682         * inspector/front-end/inspector.js:
2683         (WebInspector.set hoveredDOMNode):
2684         * inspector/front-end/treeoutline.js:
2685         (TreeOutline.prototype.findTreeElement):
2686         * inspector/front-end/utilities.js:
2687         (Node.prototype.enclosingNodeOrSelfWithNodeNameInArray):
2688         (Node.prototype.enclosingNodeOrSelfWithClass):
2689         (isAncestorNode):
2690         (firstCommonNodeAncestor):
2691         (traverseNextNode):
2692         (traversePreviousNode):
2693         ():
2694         * loader/FrameLoader.cpp:
2695         (WebCore::FrameLoader::dispatchWindowObjectAvailable):
2696         * page/android/InspectorControllerAndroid.cpp:
2697
2698 2009-08-15  Simon Fraser  <simon.fraser@apple.com>
2699
2700         Reviewed by Dave Hyatt
2701
2702         Optimize updateFillImages() to not add/remove clients every time
2703         https://bugs.webkit.org/show_bug.cgi?id=28334
2704
2705         Optimize the case where old and new just have a single layer pointing to the same (or no)
2706         image.
2707
2708         * rendering/RenderObject.cpp:
2709         (WebCore::RenderObject::updateFillImages):
2710
2711 2009-08-15  Simon Fraser  <simon.fraser@apple.com>
2712
2713         Reviewed by Anders Carlsson.
2714
2715         Implement animations of multiple text-shadows and -webkit-box-shadows.
2716         https://bugs.webkit.org/show_bug.cgi?id=28266
2717         
2718         Test: transitions/multiple-shadow-transitions.html
2719
2720         * page/animation/AnimationBase.cpp:
2721         (WebCore::PropertyWrapperShadow::equals):
2722         (WebCore::PropertyWrapperShadow::blend):
2723
2724 2009-08-15  Simon Fraser  <simon.fraser@apple.com>
2725
2726         Reviewed by Anders Carlsson.
2727
2728         Make transitions work for position and size of multiple backgrounds and masks.
2729         https://bugs.webkit.org/show_bug.cgi?id=28266
2730         
2731         Make background-position, background-size, -webkit-mask-position and -webkit-mask-size
2732         properties animatable with multiple backgrounds, rather than just animating the first one.
2733
2734         Tests: transitions/multiple-background-size-transitions.html
2735                transitions/multiple-background-transitions.html
2736                transitions/multiple-mask-transitions.html
2737
2738         * page/animation/AnimationBase.cpp:
2739         (WebCore::FillLayerPropertyWrapperBase::FillLayerPropertyWrapperBase):
2740         (WebCore::FillLayerPropertyWrapperBase::~FillLayerPropertyWrapperBase):
2741         (WebCore::FillLayerPropertyWrapperGetter::FillLayerPropertyWrapperGetter):
2742         (WebCore::FillLayerPropertyWrapperGetter::equals):
2743         (WebCore::FillLayerPropertyWrapper::FillLayerPropertyWrapper):
2744         (WebCore::FillLayerPropertyWrapper::blend):
2745         (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper):
2746         (WebCore::FillLayersPropertyWrapper::equals):
2747         (WebCore::FillLayersPropertyWrapper::blend):
2748         (WebCore::ensurePropertyMap):
2749         * rendering/style/FillLayer.h:
2750         (WebCore::FillLayer::setXPosition):
2751         (WebCore::FillLayer::setYPosition):
2752         (WebCore::FillLayer::setSize):
2753
2754 2009-08-15  George Staikos  <george.staikos@torchmobile.com>
2755
2756         Reviewed by Jan Alonzo.
2757
2758         Don't crash in fieldset code when WML is enabled.
2759         https://bugs.webkit.org/show_bug.cgi?id=28012
2760
2761         Test: fast/wml/html-fieldset-crash.html
2762
2763         * rendering/RenderFieldset.cpp:
2764         (WebCore::RenderFieldset::findLegend): ++brackets
2765
2766 2009-08-15  Sam Weinig  <sam@webkit.org>
2767
2768         Try and enable EventSource on Windows.
2769
2770         * WebCore.vcproj/WebCoreCommon.vsprops:
2771         * WebCore.vcproj/build-generated-files.sh:
2772
2773 2009-08-15  Sam Weinig  <sam@webkit.org>
2774
2775         Reviewed by Dan Bernstein.
2776
2777         Setting attribute event listeners to the body does not set them on the window
2778         https://bugs.webkit.org/show_bug.cgi?id=28343
2779
2780         Tests: fast/dom/Window/HTMLBodyElement-window-eventListener-attributes.html
2781                fast/dom/Window/HTMLFrameSetElement-window-eventListener-attributes.html
2782
2783         * html/HTMLBodyElement.cpp:
2784         (WebCore::HTMLBodyElement::setOnblur): Use setWindowAttributeEventListener instead of setAttributeEventListener.
2785         (WebCore::HTMLBodyElement::setOnerror): Ditto.
2786         (WebCore::HTMLBodyElement::setOnfocus): Ditto.
2787         (WebCore::HTMLBodyElement::setOnload): Ditto.
2788         (WebCore::HTMLBodyElement::setOnbeforeunload): Ditto.
2789         (WebCore::HTMLBodyElement::setOnmessage): Ditto.
2790         (WebCore::HTMLBodyElement::setOnoffline): Ditto.
2791         (WebCore::HTMLBodyElement::setOnonline): Ditto.
2792         (WebCore::HTMLBodyElement::setOnresize): Ditto.
2793         (WebCore::HTMLBodyElement::setOnstorage): Ditto.
2794         (WebCore::HTMLBodyElement::setOnunload): Ditto.
2795         * html/HTMLFrameSetElement.cpp:
2796         (WebCore::HTMLFrameSetElement::setOnblur): Ditto.
2797         (WebCore::HTMLFrameSetElement::setOnerror): Ditto.
2798         (WebCore::HTMLFrameSetElement::setOnfocus): Ditto.
2799         (WebCore::HTMLFrameSetElement::setOnload): Ditto.
2800         (WebCore::HTMLFrameSetElement::setOnbeforeunload): Ditto.
2801         (WebCore::HTMLFrameSetElement::setOnmessage): Ditto.
2802         (WebCore::HTMLFrameSetElement::setOnoffline): Ditto.
2803         (WebCore::HTMLFrameSetElement::setOnonline): Ditto.
2804         (WebCore::HTMLFrameSetElement::setOnresize): Ditto.
2805         (WebCore::HTMLFrameSetElement::setOnstorage): Ditto.
2806         (WebCore::HTMLFrameSetElement::setOnunload): Ditto.
2807
2808 2009-08-15  Sam Weinig  <sam@webkit.org>
2809
2810         Reviewed by Dan Bernstein.
2811
2812         Fix up some IDL comments.
2813
2814         * html/HTMLBodyElement.idl:
2815         * html/HTMLFrameSetElement.idl:
2816
2817 2009-08-15  Adam Bergkvist  <adam.bergkvist@ericsson.com>
2818
2819         Reviewed by Sam Weinig.
2820
2821         Added implementation of the EventSource object that enables
2822         server-sent events from HTML5.
2823         http://dev.w3.org/html5/eventsource/
2824         https://bugs.webkit.org/show_bug.cgi?id=14997
2825
2826         Tests: fast/eventsource/eventsource-attribute-listeners.html
2827                fast/eventsource/eventsource-constructor.html
2828                http/tests/eventsource/eventsource-bad-mime-type.html
2829                http/tests/eventsource/eventsource-parse-event-stream.html
2830                http/tests/eventsource/eventsource-reconnect.html
2831                http/tests/eventsource/eventsource-status-code-states.html
2832                http/tests/eventsource/workers/eventsource-simple.html
2833
2834         * Configurations/FeatureDefines.xcconfig:
2835         * DerivedSources.cpp:
2836         * DerivedSources.make:
2837         * GNUmakefile.am:
2838         * WebCore.pro:
2839         * WebCore.vcproj/WebCore.vcproj:
2840         * WebCore.xcodeproj/project.pbxproj:
2841         * bindings/js/JSDOMWindowCustom.cpp:
2842         (WebCore::JSDOMWindow::eventSource):
2843         * bindings/js/JSEventSourceConstructor.cpp: Added.
2844         (WebCore::):
2845         (WebCore::JSEventSourceConstructor::JSEventSourceConstructor):
2846         (WebCore::constructEventSource):
2847         (WebCore::JSEventSourceConstructor::getConstructData):
2848         * bindings/js/JSEventSourceConstructor.h: Added.
2849         (WebCore::JSEventSourceConstructor::classInfo):
2850         * bindings/js/JSEventSourceCustom.cpp: Added.
2851         (WebCore::JSEventSource::markChildren):
2852         (WebCore::JSEventSource::addEventListener):
2853         (WebCore::JSEventSource::removeEventListener):
2854         * bindings/js/JSEventTarget.cpp:
2855         (WebCore::toJS):
2856         (WebCore::toEventTarget):
2857         * bindings/js/JSWorkerContextCustom.cpp:
2858         (WebCore::JSWorkerContext::eventSource):
2859         * dom/EventNames.h:
2860         * dom/EventTarget.cpp:
2861         (WebCore::EventTarget::toEventSource):
2862         * dom/EventTarget.h:
2863         * page/DOMWindow.idl:
2864         * page/EventSource.cpp: Added.
2865         (WebCore::EventSource::EventSource):
2866         (WebCore::EventSource::~EventSource):
2867         (WebCore::EventSource::connect):
2868         (WebCore::EventSource::endRequest):
2869         (WebCore::EventSource::scheduleReconnect):
2870         (WebCore::EventSource::reconnectTimerFired):
2871         (WebCore::EventSource::url):
2872         (WebCore::EventSource::readyState):
2873         (WebCore::EventSource::close):
2874         (WebCore::EventSource::scriptExecutionContext):
2875         (WebCore::EventSource::addEventListener):
2876         (WebCore::EventSource::removeEventListener):
2877         (WebCore::EventSource::dispatchEvent):
2878         (WebCore::EventSource::didReceiveResponse):
2879         (WebCore::EventSource::didReceiveData):
2880         (WebCore::EventSource::didFinishLoading):
2881         (WebCore::EventSource::didFail):
2882         (WebCore::EventSource::didFailRedirectCheck):
2883         (WebCore::EventSource::parseEventStream):
2884         (WebCore::EventSource::parseEventStreamLine):
2885         (WebCore::EventSource::dispatchGenericEvent):
2886         (WebCore::EventSource::dispatchMessageEvent):
2887         (WebCore::EventSource::stop):
2888         * page/EventSource.h: Added.
2889         (WebCore::EventSource::create):
2890         (WebCore::EventSource::):
2891         (WebCore::EventSource::setOnopen):
2892         (WebCore::EventSource::onopen):
2893         (WebCore::EventSource::setOnmessage):
2894         (WebCore::EventSource::onmessage):
2895         (WebCore::EventSource::setOnerror):
2896         (WebCore::EventSource::onerror):
2897         (WebCore::EventSource::toEventSource):
2898         (WebCore::EventSource::eventListeners):
2899         (WebCore::EventSource::refEventTarget):
2900         (WebCore::EventSource::derefEventTarget):
2901         * page/EventSource.idl: Added.
2902         * workers/WorkerContext.idl:
2903
2904 2009-08-15  Pavel Feldman  <pfeldman@chromium.org>
2905
2906         Reviewed by Timothy Hatcher.
2907
2908         WebInspector: Minor DOMAgent bugfixes.
2909
2910         https://bugs.webkit.org/show_bug.cgi?id=28177
2911
2912         * inspector/InspectorDOMAgent.cpp:
2913         (WebCore::InspectorDOMAgent::nodeForId):
2914         * inspector/front-end/DOMAgent.js:
2915         (WebInspector.DOMAgent):
2916         * inspector/front-end/ElementsPanel.js:
2917         (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
2918
2919 2009-08-15  Pavel Feldman  <pfeldman@chromium.org>
2920
2921         Reviewed by Timothy Hatcher.
2922
2923         WebInspector: Evaluating objects while on a breakpoint dumps string
2924         representation instead of live object. 
2925
2926         https://bugs.webkit.org/show_bug.cgi?id=28280
2927
2928         * inspector/front-end/ConsoleView.js:
2929         (WebInspector.ConsoleView.prototype.completions.this._evalInInspectedWindow):
2930         (WebInspector.ConsoleView.prototype.completions):
2931         (WebInspector.ConsoleView.prototype._reportCompletions):
2932         * inspector/front-end/ScriptsPanel.js:
2933         (WebInspector.ScriptsPanel.prototype.doEvalInCallFrame.delayedEvaluation):
2934         (WebInspector.ScriptsPanel.prototype.doEvalInCallFrame):
2935         (WebInspector.ScriptsPanel.prototype.variablesInSelectedCallFrame):
2936
2937 2009-08-15  Maxime Simon  <simon.maxime@gmail.com>
2938
2939         Reviewed by Eric Seidel.
2940
2941         [Haiku] Adding two new files to WebCore/platform/haiku:
2942         LocalizedStringsHaiku.cpp and LoggingHaiku.cpp
2943         https://bugs.webkit.org/show_bug.cgi?id=28129
2944
2945         * platform/haiku/LocalizedStringsHaiku.cpp: Added.
2946         (WebCore::submitButtonDefaultLabel):
2947         (WebCore::inputElementAltText):
2948         (WebCore::resetButtonDefaultLabel):
2949         (WebCore::defaultLanguage):
2950         (WebCore::searchableIndexIntroduction):
2951         (WebCore::fileButtonChooseFileLabel):
2952         (WebCore::fileButtonNoFileSelectedLabel):
2953         (WebCore::contextMenuItemTagOpenLinkInNewWindow):
2954         (WebCore::contextMenuItemTagDownloadLinkToDisk):
2955         (WebCore::contextMenuItemTagCopyLinkToClipboard):
2956         (WebCore::contextMenuItemTagOpenImageInNewWindow):
2957         (WebCore::contextMenuItemTagDownloadImageToDisk):
2958         (WebCore::contextMenuItemTagCopyImageToClipboard):
2959         (WebCore::contextMenuItemTagOpenFrameInNewWindow):
2960         (WebCore::contextMenuItemTagCopy):
2961         (WebCore::contextMenuItemTagGoBack):
2962         (WebCore::contextMenuItemTagGoForward):
2963         (WebCore::contextMenuItemTagStop):
2964         (WebCore::contextMenuItemTagReload):
2965         (WebCore::contextMenuItemTagCut):
2966         (WebCore::contextMenuItemTagPaste):
2967         (WebCore::contextMenuItemTagNoGuessesFound):
2968         (WebCore::contextMenuItemTagIgnoreSpelling):
2969         (WebCore::contextMenuItemTagLearnSpelling):
2970         (WebCore::contextMenuItemTagSearchWeb):
2971         (WebCore::contextMenuItemTagLookUpInDictionary):
2972         (WebCore::contextMenuItemTagOpenLink):
2973         (WebCore::contextMenuItemTagIgnoreGrammar):
2974         (WebCore::contextMenuItemTagSpellingMenu):
2975         (WebCore::contextMenuItemTagShowSpellingPanel):
2976         (WebCore::contextMenuItemTagCheckSpelling):
2977         (WebCore::contextMenuItemTagCheckSpellingWhileTyping):
2978         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
2979         (WebCore::contextMenuItemTagFontMenu):
2980         (WebCore::contextMenuItemTagBold):
2981         (WebCore::contextMenuItemTagItalic):
2982         (WebCore::contextMenuItemTagUnderline):
2983         (WebCore::contextMenuItemTagOutline):
2984         (WebCore::contextMenuItemTagWritingDirectionMenu):
2985         (WebCore::contextMenuItemTagDefaultDirection):
2986         (WebCore::contextMenuItemTagLeftToRight):
2987         (WebCore::contextMenuItemTagRightToLeft):
2988         (WebCore::contextMenuItemTagInspectElement):
2989         (WebCore::searchMenuNoRecentSearchesText):
2990         (WebCore::searchMenuRecentSearchesText):
2991         (WebCore::searchMenuClearRecentSearchesText):
2992         (WebCore::unknownFileSizeText):
2993         (WebCore::AXWebAreaText):
2994         (WebCore::AXLinkText):
2995         (WebCore::AXListMarkerText):
2996         (WebCore::AXImageMapText):
2997         (WebCore::AXHeadingText):
2998         (WebCore::imageTitle):
2999         (WebCore::contextMenuItemTagTextDirectionMenu):
3000         (WebCore::AXButtonActionVerb):
3001         (WebCore::AXTextFieldActionVerb):
3002         (WebCore::AXRadioButtonActionVerb):
3003         (WebCore::AXCheckedCheckBoxActionVerb):
3004         (WebCore::AXUncheckedCheckBoxActionVerb):
3005         (WebCore::AXLinkActionVerb):
3006         (WebCore::AXDefinitionListTermText):
3007         (WebCore::AXDefinitionListDefinitionText):
3008         * platform/haiku/LoggingHaiku.cpp: Added.
3009         (WebCore::InitializeLoggingChannelsIfNecessary):
3010
3011 2009-08-15  Darin Adler  <darin@apple.com>
3012
3013         Fix GTK build.
3014
3015         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
3016         (fallbackObject): Pass 0 for document. Should be OK at least for now.
3017
3018 2009-08-15  Darin Adler  <darin@apple.com>
3019
3020         Fix Qt build.
3021
3022         * dom/XMLTokenizerQt.cpp: Use create functions instead of calling new
3023         directly to make CDATASection and Comment nodes.
3024
3025 2009-08-14  Darin Adler  <darin@apple.com>
3026
3027         Reviewed by Sam Weinig.
3028
3029         Make DOM classes start with a reference count of 1, like all other RefCounted
3030         https://bugs.webkit.org/show_bug.cgi?id=28068
3031
3032         First half, everything except for element classes.
3033
3034         * GNUmakefile.am: Removed DocPtr.h.
3035         * WebCore.gypi: Ditto.
3036         * WebCore.vcproj/WebCore.vcproj: Ditto.
3037         * WebCore.xcodeproj/project.pbxproj: Ditto.
3038
3039         * dom/Attr.cpp:
3040         (WebCore::Attr::Attr): Added a call to createTextChild here so callers don't
3041         have to call it explicitly.
3042         (WebCore::Attr::create): Added.
3043         (WebCore::Attr::setValue): Changed to take AtomicString.
3044         (WebCore::Attr::cloneNode): Use create.
3045
3046         * dom/Attr.h: Added a create function. Made the constructor private,
3047         and a lot of other functions private as well.
3048
3049         * dom/Attribute.cpp:
3050         (WebCore::Attribute::createAttrIfNeeded): Use Attr::create.
3051
3052         * dom/CDATASection.cpp:
3053         (WebCore::CDATASection::create): Added.
3054         (WebCore::CDATASection::cloneNode): Use create.
3055         (WebCore::CDATASection::virtualCreate): Ditto.
3056
3057         * dom/CDATASection.h: Added a create function. Made everything private.
3058         Removed unneeded destructor declaration.
3059
3060         * dom/CharacterData.cpp:
3061         (WebCore::CharacterData::CharacterData): Replaced the multiple constructors
3062         with a single one that takes ConstructionType.
3063
3064         * dom/CharacterData.h: Made more functions be protected and private.
3065         Made m_data be private.
3066
3067         * dom/Comment.cpp:
3068         (WebCore::Comment::Comment): Got rid of an extra constructor.
3069         (WebCore::Comment::create): Added.
3070         (WebCore::Comment::cloneNode): Call create.
3071
3072         * dom/Comment.h: Added a create function. Made everything private.
3073
3074         * dom/ContainerNode.cpp:
3075         (WebCore::dispatchChildInsertionEvents): Use RefPtr instead of DocPtr.
3076         (WebCore::dispatchChildRemovalEvents): Ditto.
3077
3078         * dom/ContainerNode.h: Made the constructor protected and passed
3079         ConstructionType instead of an isElement boolean.
3080
3081         * dom/DocPtr.h: Removed.
3082
3083         * dom/Document.cpp:
3084         (WebCore::Document::Document): Simplified the code that sets m_document
3085         since it's no longer a smart pointer.
3086         (WebCore::Document::removedLastRef): Use explicit calls to selfOnlyRef
3087         and selfOnlyDeref instead of a DocPtr in here.
3088         (WebCore::Document::~Document): Simplified the code that sets m_document
3089         since it's no longer a smart pointer.
3090         (WebCore::Document::createDocumentFragment): Call create.
3091         (WebCore::Document::createTextNode): Ditto.
3092         (WebCore::Document::createComment): Ditto.
3093         (WebCore::Document::createCDATASection): Ditto.
3094         (WebCore::Document::createProcessingInstruction): Ditto.
3095         (WebCore::Document::createEntityReference): Ditto.
3096         (WebCore::Document::createEditingTextNode): Ditto.
3097         (WebCore::Document::importNode): Call Attr::create.
3098         (WebCore::Document::createAttributeNS): Ditto.
3099
3100         * dom/Document.h: Call adoptRef. Made a lot of functions private and
3101         protected and sorted them so public functions come first.
3102
3103         * dom/DocumentFragment.cpp:
3104         (WebCore::DocumentFragment::create): Added.
3105         (WebCore::DocumentFragment::cloneNode): Call create.
3106         * dom/DocumentFragment.h: Added create.
3107
3108         * dom/DocumentType.cpp:
3109         (WebCore::DocumentType::DocumentType): Pass type to Node constructor.
3110         (WebCore::DocumentType::cloneNode): Use create.
3111         * dom/DocumentType.h:
3112         (WebCore::DocumentType::create): Call adoptRef.
3113
3114         * dom/EditingText.cpp:
3115         (WebCore::EditingText::create): Added.
3116         * dom/EditingText.h: Added a create function. Made everything private.
3117
3118         * dom/Element.cpp:
3119         (WebCore::Element::Element): Pass CreateElementZeroRefCount to preserve
3120         the zero reference count behavior for classes derived from Element.
3121
3122         * dom/EntityReference.cpp:
3123         (WebCore::EntityReference::create): Added.
3124         (WebCore::EntityReference::cloneNode): Call create.
3125         * dom/EntityReference.h: Added create. Made everything private.
3126
3127         * dom/Node.cpp:
3128         (WebCore::Node::initialRefCount): Added. Inline helper function for
3129         the constructor.
3130         (WebCore::Node::isContainer): Ditto.
3131         (WebCore::Node::isElement): Ditto.
3132         (WebCore::Node::isText): Ditto.
3133         (WebCore::Node::Node): Changed to take a construction type argument.
3134         Since m_document is now a normal pointer, added a call to selfOnlyRef.
3135         (WebCore::Node::~Node): Ditto, but selfOnlyDeref.
3136         (WebCore::Node::setDocument): Added selfOnlyRef/Deref calls.
3137         (WebCore::Node::appendTextContent): Use the data function instead of
3138         calling nodeValue functions, which do the same thing in a roundabout way.
3139
3140         * dom/Node.h: Made the constructor protected and replaced the multiple
3141         arguments iwth a single ConstructionType argument. Sorted the public
3142         things first.
3143
3144         * dom/Notation.h: Made most things private.
3145         * dom/Notation.cpp: Removed extra constructor.
3146
3147         * dom/ProcessingInstruction.cpp:
3148         (WebCore::ProcessingInstruction::create): Added.
3149         (WebCore::ProcessingInstruction::cloneNode): Call create.
3150         * dom/ProcessingInstruction.h: Added create function. Made many other
3151         members private.
3152
3153         * dom/Range.cpp:
3154         (WebCore::Range::processContents): Use DocumentFragment::create.
3155
3156         * dom/Text.cpp:
3157         (WebCore::Text::Text): Updated for base class change.
3158         (WebCore::Text::create): Added.
3159         (WebCore::Text::splitText): Changed to not require access to m_data.
3160         (WebCore::Text::cloneNode): Call create.
3161         (WebCore::Text::createRenderer): Call dataImpl.
3162         (WebCore::Text::attach): Call data.
3163         (WebCore::Text::recalcStyle): Call dataImpl.
3164         (WebCore::Text::virtualCreate): Call create.
3165         (WebCore::Text::createWithLengthLimit): Call create.
3166         (WebCore::Text::formatForDebugger): Call data.
3167
3168         * dom/Text.h: Added a create function. Made many other members private.
3169         Renamed createNew to virtualCreate.
3170
3171         * dom/XMLTokenizer.cpp:
3172         (WebCore::XMLTokenizer::enterText): Call Text::create.
3173
3174         * dom/XMLTokenizerLibxml2.cpp:
3175         (WebCore::XMLTokenizer::cdataBlock): Call CDATASection::create.
3176         (WebCore::XMLTokenizer::comment): Call Comment::create.
3177
3178         * editing/CompositeEditCommand.cpp:
3179         (WebCore::CompositeEditCommand::deleteInsignificantText):
3180         Call data instead of string.
3181
3182         * editing/CreateLinkCommand.cpp:
3183         (WebCore::CreateLinkCommand::doApply): Call Text::create.
3184
3185         * editing/EditorCommand.cpp:
3186         (WebCore::executeInsertNode): Call DocumentFragment::create.
3187
3188         * editing/SplitTextNodeCommand.cpp:
3189         (WebCore::SplitTextNodeCommand::doApply): Call Text::create.
3190
3191         * editing/markup.cpp:
3192         (WebCore::appendStartMarkup): Call data instead of nodeValue.
3193
3194         * html/HTMLDocument.h:
3195         (WebCore::HTMLDocument::create): Call adoptRef.
3196
3197         * html/HTMLElement.cpp:
3198         (WebCore::HTMLElement::createContextualFragment): Call DocumentFragment::create.
3199         (WebCore::replaceChildrenWithFragment): Call data instead of string.
3200         (WebCore::replaceChildrenWithText): Call Text::create.
3201         (WebCore::HTMLElement::setInnerText): Call DocumentFragment::create and
3202         Text::create.
3203         (WebCore::HTMLElement::setOuterText): Call Text::create.
3204
3205         * html/HTMLKeygenElement.cpp:
3206         (WebCore::HTMLKeygenElement::HTMLKeygenElement): Call Text::create.
3207
3208         * html/HTMLOptionElement.cpp:
3209         (WebCore::HTMLOptionElement::setText): Call Text::create.
3210
3211         * html/HTMLParser.cpp:
3212         (WebCore::HTMLParser::textCreateErrorCheck): Call Text::create.
3213         (WebCore::HTMLParser::commentCreateErrorCheck): Call Comment::create.
3214         (WebCore::HTMLParser::handleIsindex): Call Text::create.
3215
3216         * html/HTMLViewSourceDocument.cpp:
3217         (WebCore::HTMLViewSourceDocument::addText): Call Text::create.
3218
3219         * html/HTMLViewSourceDocument.h:
3220         (WebCore::HTMLViewSourceDocument::create): Call adoptRef.
3221
3222         * loader/FTPDirectoryDocument.cpp:
3223         (WebCore::FTPDirectoryTokenizer::appendEntry): Call Text::create.
3224         (WebCore::FTPDirectoryTokenizer::createTDForFilename): Call Text::create.
3225
3226         * loader/FTPDirectoryDocument.h:
3227         (WebCore::FTPDirectoryDocument::create): Call adoptRef.
3228         * loader/ImageDocument.h:
3229         (WebCore::ImageDocument::create): Ditto.
3230         * loader/MediaDocument.h:
3231         (WebCore::MediaDocument::create): Ditto.
3232         * loader/PlaceholderDocument.h:
3233         (WebCore::PlaceholderDocument::create): Ditto.
3234         * loader/PluginDocument.h:
3235         (WebCore::PluginDocument::create): Ditto.
3236         * loader/TextDocument.h:
3237         (WebCore::TextDocument::create): Ditto.
3238
3239         * loader/loader.cpp:
3240         (WebCore::Loader::Host::didFinishLoading): Use RefPtr instead of DocPtr.
3241         (WebCore::Loader::Host::didFail): Ditto.
3242
3243         * platform/TreeShared.h:
3244         (WebCore::TreeShared::TreeShared): Added an initialRefCount argument,
3245         defaulting to 1. Node still sometimes initializes it to 0 instead for now.
3246
3247         * rendering/RenderText.cpp:
3248         (WebCore::RenderText::originalText): Use dataImpl instead of string.
3249
3250         * rendering/RenderTextFragment.cpp:
3251         (WebCore::RenderTextFragment::originalText): Use dataImpl instead of string.
3252         (WebCore::RenderTextFragment::previousCharacter): Ditto.
3253
3254         * svg/SVGDocument.h:
3255         (WebCore::SVGDocument::create): Use adoptRef.
3256
3257         * svg/SVGElementInstance.cpp:
3258         (WebCore::SVGElementInstance::SVGElementInstance): Updated to take a
3259         PassRefPtr.
3260
3261         * svg/SVGElementInstance.h: Made everything private.
3262
3263         * wml/WMLDocument.h:
3264         (WebCore::WMLDocument::create): Called adoptRef.
3265
3266         * xml/XPathNamespace.cpp:
3267         (WebCore::XPathNamespace::XPathNamespace): Take AtomicString arguments.
3268         * xml/XPathNamespace.h: Made everything private.
3269
3270         * xml/XSLTProcessor.cpp:
3271         (WebCore::createFragmentFromSource): Use DocumentFragment::create and
3272         Text::create.
3273
3274 2009-08-13  Jon Honeycutt  <jhoneycutt@apple.com>
3275
3276         Part of <rdar://problem/6218721> No MSAA focus events fired for Webkit
3277         nightly (20866)
3278
3279         https://bugs.webkit.org/show_bug.cgi?id=20866
3280
3281         Reviewed by Oliver Hunt.
3282
3283         * accessibility/AXObjectCache.cpp:
3284         (WebCore::AXObjectCache::AXObjectCache):
3285         Changed to take a pointer to its owner document. This is used by
3286         AXObjectCache::handleFocusedUIElementChanged().
3287         (WebCore::AXObjectCache::focusedUIElementForPage):
3288         Code moved from AccessibilityRenderObject::focusedUIElement(). Modified
3289         to be a static function and to take a pointer to a Page.
3290         (WebCore::AXObjectCache::platformGenerateAXID):
3291         Moved the code to generate the next AXID from getAXID() to here. Added
3292         a #if to make this non-WIN only, because Windows has its own
3293         implementation.
3294         (WebCore::AXObjectCache::getAXID):
3295         Ensure that we generate a positive AXID, ranging from 1 to LONG_MAX.
3296
3297         * accessibility/AXObjectCache.h:
3298         Add a declaration for Document and Page. Removed the declaration of
3299         AccessibilityObject, because we include the header. Reordered the
3300         declaration of Node alphabetically. Moved the typedef for AXID to
3301         AccessibilityObject. Removed some trailing whitespace. Added a member
3302         variable to hold a pointer to the owner Document.
3303         (WebCore::AXObjectCache::AXObjectCache):
3304         Changed to take a pointer to its owner Document.
3305         (WebCore::AXObjectCache::focusedUIElementForPage):
3306         Added; code moved from AccessiblityRenderObject::focusedUIElement().
3307         Returns the focused element with respect to accessibility.
3308         (WebCore::AXObjectCache::platformGenerateAXID):
3309         Declare a function to generate an AXID.
3310         (WebCore::AXObjectCache::objectFromAXID):
3311         Return the AccessibilityObject with the given AXID.
3312
3313         * accessibility/AccessibilityObject.h:
3314         Moved the typedef for AXID from AXObjectCache to here. Made the m_id
3315         member use the typedef.
3316         (WebCore::AccessibilityObject::axObjectID):
3317         Changed the return type to use the typedef.
3318         (WebCore::AccessibilityObject::setAXObjectID):
3319         Changed the argument type to use the typedef.
3320
3321         * accessibility/AccessibilityRenderObject.cpp:
3322         Removed some unneeded #includes.
3323         (WebCore::AccessibilityRenderObject::focusedUIElement):
3324         Moved the code to AXObjectCache::focusedUIElementForPage(), which we now
3325         call.
3326
3327         * accessibility/win/AXObjectCacheWin.cpp:
3328         (WebCore::AXObjectCache::platformGenerateAXID):
3329         Ensure that we generate an AXID that is in the range 1 to LONG_MAX.
3330         (WebCore::AXObjectCache::handleFocusedUIElementChanged):
3331         If the Document has no Page, return. If the Page has not focused
3332         element (respecting accessibility), return. Assert that the
3333         accessibility of the focused element is not ignored, and that the
3334         object's AXID will be negative and fit into a LONG when negated.
3335         Broadcast a focus event for the object.
3336
3337         * dom/Document.cpp:
3338         (WebCore::Document::axObjectCache):
3339         Pass this when creating the AXObjectCache.
3340         (WebCore::Document::setFocusedNode):
3341         Call AXObjectCache::handleFocusedUIElementChanged() on Windows.
3342
3343 2009-08-14  Jiahua Huang  <jhuangjiahua@gmail.com>
3344
3345         Reviewed by Jan Alonzo.
3346
3347         [gtk] Pasteboard/GtkClipboard can't handle the "text/html" target.
3348         https://bugs.webkit.org/show_bug.cgi?id=27028
3349
3350         Remove the improper set of enum WebKitWebViewTargetInfo
3351         by grabbing the target infos via m_helper.
3352
3353         * manual-tests/gtk/copy-htmltext.html: Added.
3354         * platform/Pasteboard.h:
3355         * platform/gtk/PasteboardGtk.cpp:
3356         (WebCore::clipboard_get_contents_cb):
3357         * platform/gtk/PasteboardHelper.h:
3358
3359 2009-08-14  Simon Fraser  <simon.fraser@apple.com>
3360
3361         Reviewed by Dave Hyatt.
3362
3363         Fix an assertion when bringing up the Inspector.
3364         https://bugs.webkit.org/show_bug.cgi?id=28318
3365         
3366         The fix for bug 28295 assumed that image clients count the number of times
3367         addClient/removeClient is called. That was true for CachedResource clients,
3368         but not StyleGeneratedImage clients, which pass the call onto CSSImageGeneratorValue.
3369         
3370         Fix by making CSSImageGeneratorValue count the number of times a client is
3371         added/removed.
3372
3373         * css/CSSCanvasValue.cpp:
3374         (WebCore::CSSCanvasValue::canvasChanged):
3375         (WebCore::CSSCanvasValue::canvasResized):
3376         * css/CSSImageGeneratorValue.cpp:
3377         (WebCore::CSSImageGeneratorValue::addClient):
3378         (WebCore::CSSImageGeneratorValue::removeClient):
3379         (WebCore::CSSImageGeneratorValue::getImage):
3380         * css/CSSImageGeneratorValue.h:
3381
3382 2009-08-14  Brent Fulgham  <bfulgham@webkit.org>
3383
3384         Reviewed by Kevin Ollivier.
3385
3386         Correct libcurl crash when downloading local files.
3387         https://bugs.webkit.org/show_bug.cgi?id=28312
3388
3389         No new tests. Test is covered by fast/encoding/char-encoding-mac.html.
3390
3391         * platform/network/curl/ResourceHandleManager.cpp:
3392         (WebCore::handleLocalReceiveResponse): New static function that
3393           performs the local setting of valid URL and firing didReceiveResponse.
3394           This code was moved from writeCallback.
3395         (WebCore::writeCallback): Move local file handling to static function
3396           (above) and use the function instead.
3397         (WebCore::readCallback): Add check
3398           for responseFired, and handle as a local file if it was not.
3399
3400 2009-08-14  Maxime Simon  <simon.maxime@gmail.com>
3401
3402         Reviewed by Oliver Hunt.
3403
3404         [Haiku] Fix RenderThemeHaiku build.
3405         https://bugs.webkit.org/show_bug.cgi?id=28307
3406
3407         * platform/haiku/RenderThemeHaiku.cpp: Included RenderThemeHaiku.h
3408         instead of RenderTheme.h.
3409         (WebCore::RenderThemeHaiku::paintCheckbox): Removed the wrong 'virtual'
3410         before the function.
3411         (WebCore::RenderThemeHaiku::paintRadio): Removed the wrong 'virtual'
3412         before the function.
3413         * platform/haiku/RenderThemeHaiku.h: Corrected wrong function definitions.
3414
3415 2009-08-14  Maxime Simon  <simon.maxime@gmail.com>
3416
3417         Reviewed by Oliver Hunt.
3418
3419         [Haiku] Adding SharedBufferHaiku to WebCore.
3420         https://bugs.webkit.org/show_bug.cgi?id=28309
3421
3422         * platform/haiku/SharedBufferHaiku.cpp: Added.
3423         (WebCore::SharedBuffer::createWithContentsOfFile):
3424         * platform/haiku/TemporaryLinkStubs.cpp: Removed unnecessary headers
3425         and functions.
3426         (WebCore::signedPublicKeyAndChallengeString):
3427         (WebCore::getSupportedKeySizes):
3428
3429 2009-08-14  Nate Chapin  <japhet@chromium.org>
3430
3431         Reviewed by Dimitri Glazkov.
3432
3433         Ensure we're getting the right v8 context in the V8 DOMWindowEvent custom getter.
3434
3435         https://bugs.webkit.org/show_bug.cgi?id=28311
3436
3437         This should fix Chromium failing LayoutTests/fast/events/set-event-in-another-frame.html.
3438
3439         * bindings/v8/custom/V8DOMWindowCustom.cpp:
3440         (WebCore::ACCESSOR_GETTER):
3441
3442 2009-08-14  Aaron Boodman  <aa@chromium.org>
3443
3444         Reviewed by Alexey Proskuryakov.
3445
3446         BUG 28134: Move the remaining parts of Access Control from XMLHttpRequest to ThreadableDocumentLoader.
3447         https://bugs.webkit.org/show_bug.cgi?id=28134
3448
3449         No new tests added since Access Control was already well tested and this is a pure refactor.
3450
3451         * loader/DocumentThreadableLoader.cpp: Move a lot of the access control code from XHR in, preserving its
3452         basic strategy. Also, modify the synchronous path to not be a special case, but reuse more of the async
3453         path.
3454
3455         (WebCore::DocumentThreadableLoader::loadResourceSynchronously): Go through the async path and pass additional flags.
3456         (WebCore::DocumentThreadableLoader::create): Group enum params into an options struct.
3457         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader): Ditto.
3458         (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest): Brought mostly from XHR.
3459         (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequestWithPreflight): Ditto.
3460         (WebCore::DocumentThreadableLoader::willSendRequest): Handle preflight case.
3461         (WebCore::DocumentThreadableLoader::didReceiveResponse): Ditto.
3462         (WebCore::DocumentThreadableLoader::didFinishLoading): Ditto.
3463         (WebCore::DocumentThreadableLoader::getShouldUseCredentialStorage): Ditto.
3464         (WebCore::DocumentThreadableLoader::preflightSuccess): Preflight handling.
3465         (WebCore::DocumentThreadableLoader::preflightFailure): Ditto.
3466         (WebCore::DocumentThreadableLoader::loadRequest): Common request function that handles async/sync.
3467         * loader/DocumentThreadableLoader.h: Group enum params into an options struct.
3468         * loader/ThreadableLoader.cpp: Ditto.
3469         (WebCore::ThreadableLoader::create): Ditto.
3470         (WebCore::ThreadableLoader::loadResourceSynchronously): Ditto.
3471         * loader/ThreadableLoader.h: Ditto.
3472         (WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions): Ditto.
3473         * loader/WorkerThreadableLoader.cpp: Ditto.
3474         (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):Ditto.
3475         (WebCore::WorkerThreadableLoader::loadResourceSynchronously): Ditto.
3476         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge): Ditto.
3477         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader): Ditto.
3478         * loader/WorkerThreadableLoader.h: Ditto.
3479         (WebCore::WorkerThreadableLoader::create): Ditto.
3480         * platform/CrossThreadCopier.h: Allow ThreadableLoaderOptions to be copied across threads.
3481         (WebCore::):
3482         * workers/WorkerScriptLoader.cpp: More enum->struct grouping.
3483         (WebCore::WorkerScriptLoader::loadSynchronously): More enum->struct grouping.
3484         (WebCore::WorkerScriptLoader::loadAsynchronously): More enum->struct grouping.
3485         * xml/XMLHttpRequest.cpp: Remove all the access control code and some supporting state.
3486         (WebCore::XMLHttpRequest::XMLHttpRequest): Ditto.
3487         (WebCore::XMLHttpRequest::createRequest): Ditto.
3488         (WebCore::XMLHttpRequest::didFinishLoading): Ditto.
3489         (WebCore::XMLHttpRequest::didReceiveResponse): Ditto.
3490         (WebCore::XMLHttpRequest::didReceiveData): Ditto.
3491         * xml/XMLHttpRequest.h: Ditto.
3492
3493 2009-08-14  Darin Adler  <darin@apple.com>
3494
3495         Reviewed by Sam Weinig.
3496
3497         Rename the confusing isObject(<class>) to inherits(<class>).
3498         It still works on non-objects, returning false.
3499
3500         * bindings/js/JSEventTarget.cpp:
3501         (WebCore::toEventTarget):
3502         * bindings/js/JSGeolocationCustom.cpp:
3503         (WebCore::createPositionCallback):
3504         (WebCore::createPositionErrorCallback):
3505         * bindings/js/JSNodeFilterCustom.cpp:
3506         (WebCore::toNodeFilter):
3507         * bindings/js/JSXMLHttpRequestCustom.cpp:
3508         (WebCore::JSXMLHttpRequest::send):
3509         * bindings/js/JSXSLTProcessorCustom.cpp:
3510         (WebCore::JSXSLTProcessor::importStylesheet):
3511         (WebCore::JSXSLTProcessor::transformToFragment):
3512         (WebCore::JSXSLTProcessor::transformToDocument):
3513         * bindings/scripts/CodeGeneratorJS.pm:
3514         * bridge/objc/objc_runtime.mm:
3515         (JSC::Bindings::callObjCFallbackObject):
3516         * bridge/runtime_method.cpp:
3517         (JSC::callRuntimeMethod):
3518         Updated to new name, inherits, from old name, isObject.
3519
3520 2009-08-14  Yael Aharon  <yael.aharon@nokia.com>
3521
3522         Reviewed by Simon Hausmann.
3523
3524         Allow Qt API to list and to remove URL schemes that were registered as
3525         local URL schemes.
3526         [Qt] Allow applications to register their own local URL scheme.
3527         https://bugs.webkit.org/show_bug.cgi?id=28240
3528
3529         * page/SecurityOrigin.cpp:
3530         (WebCore::SecurityOrigin::removeURLSchemeRegisteredAsLocal):
3531         (WebCore::SecurityOrigin::localURLSchemes):
3532         * page/SecurityOrigin.h:
3533
3534 2009-08-14  Pavel Feldman  <pfeldman@chromium.org>
3535
3536         Reviewed by Timothy Hatcher.
3537
3538         WebInspector: Wrap console objects late (in the frontend) so that injected
3539         script was already in place.
3540
3541         https://bugs.webkit.org/show_bug.cgi?id=28297
3542
3543         * inspector/ConsoleMessage.cpp:
3544         (WebCore::ConsoleMessage::ConsoleMessage):
3545         * inspector/ConsoleMessage.h:
3546         * inspector/InspectorController.cpp:
3547         (WebCore::InspectorController::addMessageToConsole):
3548         (WebCore::InspectorController::startGroup):
3549         (WebCore::InspectorController::setFrontendProxyObject):
3550         * inspector/InspectorController.h:
3551         * inspector/InspectorFrontend.cpp:
3552         (WebCore::InspectorFrontend::InspectorFrontend):
3553         (WebCore::InspectorFrontend::addMessageToConsole):
3554         * inspector/InspectorFrontend.h:
3555
3556 2009-08-13  Simon Fraser  <simon.fraser@apple.com>
3557
3558         Reviewed by Dan Bernstein.
3559
3560         Fix logic in RenderObject::updateFillImages() that led to incorrect client
3561         counts if an image was used twice in the background-image property.
3562         https://bugs.webkit.org/show_bug.cgi?id=28295
3563
3564         Test: fast/backgrounds/multiple-backgrounds-assert.html
3565
3566         * rendering/RenderObject.cpp:
3567         (WebCore::RenderObject::updateFillImages):
3568         Simplify the logic to call addClient()/removeClient() for every background
3569         image, but go through the new layers first to avoid removing all the
3570         clients of an image.
3571
3572 2009-08-13  Oliver Hunt  <oliver@apple.com>
3573
3574         Reviewed by Maciej Stachowiak.
3575
3576         Devirtualise marking
3577         https://bugs.webkit.org/show_bug.cgi?id=28294
3578
3579         Make sure we override the JSObject createStructure method on those
3580         objects that have custom marking routines.
3581
3582         * bindings/scripts/CodeGeneratorJS.pm:
3583
3584 2009-08-13  Darin Adler  <darin@apple.com>
3585
3586         Reviewed by Mark Rowe.
3587
3588         Follow-up to earlier work to remove dependencies on JavaScriptCore.
3589
3590         * ForwardingHeaders/parser/Parser.h: Removed.
3591         * inspector/JavaScriptDebugServer.cpp: Removed now-unneeded includes
3592         of Parser.h.
3593