2011-04-25 Adam Barth <abarth@webkit.org>
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-04-25  Adam Barth  <abarth@webkit.org>
2
3         Re-land changes to ValidationMessage.
4
5         * html/ValidationMessage.cpp:
6         (WebCore::ValidationMessage::setMessage):
7         (WebCore::ValidationMessage::setMessageDOMAndStartTimer):
8         (WebCore::ValidationMessage::requestToHideMessage):
9
10 2011-04-25  Ojan Vafai  <ojan@chromium.org>
11
12         Reviewed by James Robinson.
13
14         fix OwnPtr strict error in FrameView.cpp
15         https://bugs.webkit.org/show_bug.cgi?id=59402
16
17         * page/FrameView.cpp:
18         (WebCore::FrameView::FrameView):
19         (WebCore::FrameView::addWidgetToUpdate):
20
21 2011-04-25  Adam Klein  <adamk@chromium.org>
22
23         Unreviewed, rolling out r84844.
24         http://trac.webkit.org/changeset/84844
25         https://bugs.webkit.org/show_bug.cgi?id=59395
26
27         Checked in too much.
28
29         * rendering/style/SVGRenderStyleDefs.cpp:
30         (WebCore::StyleShadowSVGData::StyleShadowSVGData):
31         * svg/SVGDocumentExtensions.cpp:
32         (WebCore::SVGDocumentExtensions::removePendingResource):
33         * svg/SVGSVGElement.cpp:
34         (WebCore::SVGSVGElement::SVGSVGElement):
35         * svg/SVGStyledTransformableElement.cpp:
36         (WebCore::SVGStyledTransformableElement::supplementalTransform):
37         * svg/SVGTextElement.cpp:
38         (WebCore::SVGTextElement::supplementalTransform):
39         * svg/graphics/SVGImage.cpp:
40         (WebCore::SVGImage::dataChanged):
41
42 2011-04-25  Adrienne Walker  <enne@google.com>
43
44         Reviewed by David Levin.
45
46         Make ActiveDOMCallback play nice with OwnPtr strict mode
47         https://bugs.webkit.org/show_bug.cgi?id=59398
48
49         * bindings/generic/ActiveDOMCallback.cpp:
50         (WebCore::ActiveDOMCallback::ActiveDOMCallback):
51
52 2011-04-25  Adam Klein  <adamk@chromium.org>
53
54         Reviewed by James Robinson.
55
56         Fix OwnPtr strict errors in some SVG classes.
57         https://bugs.webkit.org/show_bug.cgi?id=59395
58
59         * rendering/style/SVGRenderStyleDefs.cpp:
60         (WebCore::StyleShadowSVGData::StyleShadowSVGData):
61         * svg/SVGSVGElement.cpp:
62         (WebCore::SVGSVGElement::SVGSVGElement):
63         * svg/SVGStyledTransformableElement.cpp:
64         (WebCore::SVGStyledTransformableElement::supplementalTransform):
65         * svg/SVGTextElement.cpp:
66         (WebCore::SVGTextElement::supplementalTransform):
67         * svg/graphics/SVGImage.cpp:
68         (WebCore::SVGImage::dataChanged):
69
70 2011-04-25  James Robinson  <jamesr@chromium.org>
71
72         Unreviewed, rolling out r84835.
73         http://trac.webkit.org/changeset/84835
74         https://bugs.webkit.org/show_bug.cgi?id=59394
75
76         Breaks compile because Deque<OwnPtr> doesn't work
77
78         * dom/XMLDocumentParserLibxml2.cpp:
79         (WebCore::PendingCallbacks::~PendingCallbacks):
80         (WebCore::PendingCallbacks::appendStartElementNSCallback):
81         (WebCore::PendingCallbacks::appendEndElementNSCallback):
82         (WebCore::PendingCallbacks::appendCharactersCallback):
83         (WebCore::PendingCallbacks::appendProcessingInstructionCallback):
84         (WebCore::PendingCallbacks::appendCDATABlockCallback):
85         (WebCore::PendingCallbacks::appendCommentCallback):
86         (WebCore::PendingCallbacks::appendInternalSubsetCallback):
87         (WebCore::PendingCallbacks::appendErrorCallback):
88         (WebCore::XMLDocumentParser::XMLDocumentParser):
89         * html/ValidationMessage.cpp:
90         (WebCore::ValidationMessage::setMessage):
91         (WebCore::ValidationMessage::setMessageDOMAndStartTimer):
92         (WebCore::ValidationMessage::requestToHideMessage):
93
94 2011-04-25  James Robinson  <jamesr@chromium.org>
95
96         Reviewed by Sam Weinig.
97
98         Fix OwnPtr strict mode violation in ImageBufferCG
99         https://bugs.webkit.org/show_bug.cgi?id=59396
100
101         * platform/graphics/cg/ImageBufferCG.cpp:
102         (WebCore::ImageBuffer::ImageBuffer):
103
104 2011-04-25  Huang Dongsung  <luxtella@company100.net>
105
106         Reviewed by Dirk Schulze.
107
108         [Skia] Remove an unused local variable in PlatformContextSkia::readbackHardwareToSoftware().
109         https://bugs.webkit.org/show_bug.cgi?id=59308
110
111         An unused local variable is created and even allocates heap memory.
112
113         * platform/graphics/skia/PlatformContextSkia.cpp:
114         (WebCore::PlatformContextSkia::readbackHardwareToSoftware):
115
116 2011-04-25  Geoffrey Garen  <ggaren@apple.com>
117
118         Qt build fix: Updated files not used by other ports for rename.
119
120         * bindings/js/JSTouchCustom.cpp:
121         (WebCore::toJSNewlyCreated):
122         * bindings/js/JSTouchListCustom.cpp:
123         (WebCore::toJSNewlyCreated):
124
125 2011-04-25  Adrienne Walker  <enne@google.com>
126
127         Reviewed by David Levin.
128
129         WebCore/css/CSS* files should play nice with strict OwnPtrs
130         https://bugs.webkit.org/show_bug.cgi?id=59382
131
132         * css/CSSFontFaceSource.cpp:
133         (WebCore::CSSFontFaceSource::getFontData):
134         * css/CSSParser.cpp:
135         (WebCore::CSSParser::addProperty):
136         (WebCore::CSSParser::parseValue):
137
138 2011-04-25  Adam Barth  <abarth@webkit.org>
139
140         Reviewed by James Robinson.
141
142         ValidationMessage and XMLDocumentParserLibxml2 should play nice with strict OwnPtrs
143         https://bugs.webkit.org/show_bug.cgi?id=59394
144
145         * dom/XMLDocumentParserLibxml2.cpp:
146         (WebCore::PendingCallbacks::PendingCallbacks):
147         (WebCore::PendingCallbacks::appendStartElementNSCallback):
148         (WebCore::PendingCallbacks::appendEndElementNSCallback):
149         (WebCore::PendingCallbacks::appendCharactersCallback):
150         (WebCore::PendingCallbacks::appendProcessingInstructionCallback):
151         (WebCore::PendingCallbacks::appendCDATABlockCallback):
152         (WebCore::PendingCallbacks::appendCommentCallback):
153         (WebCore::PendingCallbacks::appendInternalSubsetCallback):
154         (WebCore::PendingCallbacks::appendErrorCallback):
155         (WebCore::XMLDocumentParser::XMLDocumentParser):
156         * html/ValidationMessage.cpp:
157         (WebCore::ValidationMessage::setMessage):
158         (WebCore::ValidationMessage::setMessageDOMAndStartTimer):
159         (WebCore::ValidationMessage::requestToHideMessage):
160
161 2011-04-25  James Robinson  <jamesr@chromium.org>
162
163         Reviewed by Adam Barth.
164
165         Fix OwnPtr strictness issues in WebCore/inspector/
166         https://bugs.webkit.org/show_bug.cgi?id=59387
167
168         * inspector/InspectorAgent.cpp:
169         (WebCore::InspectorAgent::InspectorAgent):
170         * inspector/InspectorController.cpp:
171         (WebCore::InspectorController::InspectorController):
172         * inspector/InspectorStyleSheet.cpp:
173         (WebCore::InspectorStyleSheet::ensureSourceData):
174
175 2011-04-25  Geoffrey Garen  <ggaren@apple.com>
176
177         Reviewed by Beth Dakin.
178
179         Removed XPathNamespace because it was unused
180         https://bugs.webkit.org/show_bug.cgi?id=59381
181         
182         This allows us to make Node::ownerDocument() non-virtual, though it has
183         the unhappy side-effect of rebuilding the world.
184
185         * CMakeLists.txt:
186         * GNUmakefile.list.am:
187         * WebCore.gypi:
188         * WebCore.pro:
189         * WebCore.vcproj/WebCore.vcproj:
190         * WebCore.xcodeproj/project.pbxproj: Bye bye dead code.
191
192         * dom/Node.h: Hello fast code!
193
194         * xml/XPathNamespace.cpp: Removed.
195         * xml/XPathNamespace.h: Removed.
196
197 2011-04-25  Adam Barth  <abarth@webkit.org>
198
199         Reviewed by Darin Adler.
200
201         HistoryItemMac should play nice with OwnPtrs
202         https://bugs.webkit.org/show_bug.cgi?id=59388
203
204         * history/mac/HistoryItemMac.mm:
205         (WebCore::HistoryItem::setTransientProperty):
206
207 2011-04-25  David Levin  <levin@chromium.org>
208
209         Reviewed by Kenneth Russell.
210
211         Fix strict OwnPtrs in ContextMenuController.cpp
212         https://bugs.webkit.org/show_bug.cgi?id=59375
213
214         * page/ContextMenuController.cpp:
215         (WebCore::ContextMenuController::createContextMenu):
216         (WebCore::separatorItem):
217
218 2011-04-25  Adam Barth  <abarth@webkit.org>
219
220         Reviewed by Darin Adler.
221
222         CheckedRadioButton should play nice with strict OwnPtr
223         https://bugs.webkit.org/show_bug.cgi?id=59386
224
225         * dom/CheckedRadioButtons.cpp:
226         (WebCore::CheckedRadioButtons::addButton):
227
228 2011-04-25  Adam Barth  <abarth@webkit.org>
229
230         Reviewed by David Levin.
231
232         Resource*.cpp should play nice with strict OwnPtrs
233         https://bugs.webkit.org/show_bug.cgi?id=59383
234
235         * bridge/runtime_method.cpp:
236         (JSC::RuntimeMethod::RuntimeMethod):
237         * platform/network/ResourceHandle.cpp:
238         (WebCore::ResourceHandle::ResourceHandle):
239         * platform/network/ResourceResponseBase.cpp:
240         (WebCore::ResourceResponseBase::adopt):
241         (WebCore::ResourceResponseBase::copyData):
242
243 2011-04-25  Adam Barth  <abarth@webkit.org>
244
245         Reviewed by David Levin.
246
247         Page*.cpp and objc_runtime.mm should play nice with strict OwnPtrs
248         https://bugs.webkit.org/show_bug.cgi?id=59374
249
250         * bridge/objc/objc_runtime.mm:
251         (JSC::Bindings::callObjCFallbackObject):
252         * page/Page.cpp:
253         (WebCore::Page::Page):
254         (WebCore::Page::initGroup):
255         * page/PageGroup.cpp:
256         (WebCore::PageGroup::addUserScriptToWorld):
257         (WebCore::PageGroup::addUserStyleSheetToWorld):
258         * page/mac/PageMac.cpp:
259         (WebCore::Page::addSchedulePair):
260
261 2011-04-25  Geoffrey Garen  <ggaren@apple.com>
262
263         Build fix: This time for sure!
264         
265         * dom/make_names.pl:
266
267 2011-04-25  Geoffrey Garen  <ggaren@apple.com>
268
269         Build fix: Let's edit the script instead of the autogenrated file. That
270         way, our change will stand the test of time.
271
272         * dom/make_names.pl:
273
274 2011-04-25  Adam Barth  <abarth@webkit.org>
275
276         Reviewed by David Levin.
277
278         Fix strict OwnPtrs in HTMLMediaElement and HTTPHeaderMap
279         https://bugs.webkit.org/show_bug.cgi?id=59368
280
281         * html/HTMLMediaElement.cpp:
282         (WebCore::HTMLMediaElement::HTMLMediaElement):
283         * platform/network/HTTPHeaderMap.cpp:
284         (WebCore::HTTPHeaderMap::copyData):
285
286 2011-04-25  James Robinson  <jamesr@chromium.org>
287
288         Reviewed by Adam Barth.
289
290         Fix strict OwnPtr violations in Render*.cpp
291         https://bugs.webkit.org/show_bug.cgi?id=59361
292
293         * rendering/RenderBlock.cpp:
294         (WebCore::RenderBlock::RenderBlock):
295         (WebCore::RenderBlock::finishDelayUpdateScrollInfo):
296         * rendering/RenderBox.cpp:
297         (WebCore::RenderBox::addLayoutOverflow):
298         (WebCore::RenderBox::addVisualOverflow):
299         * rendering/RenderButton.cpp:
300         (WebCore::RenderButton::styleDidChange):
301         * rendering/RenderLayer.cpp:
302         (WebCore::RenderLayer::updateTransform):
303         (WebCore::RenderLayer::paintChildLayerIntoColumns):
304         (WebCore::RenderLayer::hitTestChildLayerColumns):
305         (WebCore::RenderLayer::ensureBacking):
306         * rendering/RenderTable.cpp:
307         (WebCore::RenderTable::styleDidChange):
308         * rendering/RenderView.cpp:
309         (WebCore::RenderView::compositor):
310         * rendering/style/RenderStyle.cpp:
311         (WebCore::RenderStyle::addCachedPseudoStyle):
312         (WebCore::RenderStyle::accessCounterDirectives):
313         (WebCore::RenderStyle::accessAnimations):
314         (WebCore::RenderStyle::accessTransitions):
315         * rendering/svg/RenderSVGResourceFilter.cpp:
316         (WebCore::RenderSVGResourceFilter::applyResource):
317         * rendering/svg/SVGResources.cpp:
318         (WebCore::SVGResources::SVGResources):
319
320 2011-04-25  Adam Barth  <abarth@webkit.org>
321
322         Attempt to fix the compile.
323
324         * platform/graphics/MediaPlayer.cpp:
325         (WebCore::MediaPlayer::loadWithNextMediaEngine):
326
327 2011-04-25  Geoffrey Garen  <ggaren@apple.com>
328
329         Rubber-stamped by Beth Dakin.
330
331         Merged CREATE_DOM_NODE_WRAPPER and CREATE_DOM_OBJECT_WRAPPER into 
332         CREATE_DOM_WRAPPER because there's no meaningful difference between
333         them anymore.
334
335         * bindings/js/JSCDATASectionCustom.cpp:
336         (WebCore::toJSNewlyCreated):
337         * bindings/js/JSCSSRuleCustom.cpp:
338         (WebCore::toJS):
339         * bindings/js/JSCSSValueCustom.cpp:
340         (WebCore::toJS):
341         * bindings/js/JSDOMBinding.h:
342         * bindings/js/JSDocumentCustom.cpp:
343         (WebCore::toJS):
344         * bindings/js/JSElementCustom.cpp:
345         (WebCore::toJSNewlyCreated):
346         * bindings/js/JSEventCustom.cpp:
347         (WebCore::toJS):
348         * bindings/js/JSHTMLCollectionCustom.cpp:
349         (WebCore::toJS):
350         * bindings/js/JSImageDataCustom.cpp:
351         (WebCore::toJS):
352         * bindings/js/JSNodeCustom.cpp:
353         (WebCore::createWrapperInline):
354         * bindings/js/JSSVGPathSegCustom.cpp:
355         (WebCore::toJS):
356         * bindings/js/JSStyleSheetCustom.cpp:
357         (WebCore::toJS):
358         * bindings/js/JSTextCustom.cpp:
359         (WebCore::toJSNewlyCreated):
360         * bindings/js/JSWebKitCSSMatrixCustom.cpp:
361         (WebCore::JSWebKitCSSMatrixConstructor::constructJSWebKitCSSMatrix):
362         * bindings/js/JSWebSocketCustom.cpp:
363         (WebCore::JSWebSocketConstructor::constructJSWebSocket):
364         * bindings/js/JSXMLHttpRequestCustom.cpp:
365         (WebCore::JSXMLHttpRequestConstructor::constructJSXMLHttpRequest):
366         * bindings/js/JSXSLTProcessorCustom.cpp:
367         (WebCore::JSXSLTProcessorConstructor::constructJSXSLTProcessor):
368
369 2011-04-25  Adam Barth  <abarth@webkit.org>
370
371         Reviewed by James Robinson.
372
373         HTMLDocumentParser should play nice with OwnPtrs
374         https://bugs.webkit.org/show_bug.cgi?id=59363
375
376         * html/parser/HTMLDocumentParser.cpp:
377         (WebCore::HTMLDocumentParser::pumpTokenizer):
378
379 2011-04-25  Adam Barth  <abarth@webkit.org>
380
381         Reviewed by James Robinson.
382
383         Frame.cpp should work with strict OwnPtrs
384         https://bugs.webkit.org/show_bug.cgi?id=59360
385
386         * page/Frame.cpp:
387         (WebCore::createRegExpForLabels):
388
389 2011-04-25  Adam Barth  <abarth@webkit.org>
390
391         Reviewed by David Levin.
392
393         Fix strict OwnPtr in Element.cpp
394         https://bugs.webkit.org/show_bug.cgi?id=59357
395
396         * dom/NodeRareData.h:
397         (WebCore::NodeRareData::ensureEventTargetData):
398
399 2011-04-25  Adam Barth  <abarth@webkit.org>
400
401         Reviewed by David Levin.
402
403         Fix strict OwnPtr issues in Media*.cpp
404         https://bugs.webkit.org/show_bug.cgi?id=59354
405
406         There's still a tricky case in MediaPlayer.cpp, but we'll worry about
407         that later.
408
409         * css/MediaQueryMatcher.cpp:
410         (WebCore::MediaQueryMatcher::addListener):
411         * dom/Document.cpp:
412         * platform/graphics/MediaPlayer.cpp:
413         (WebCore::createNullMediaPlayer):
414
415 2011-04-25  James Robinson  <jamesr@chromium.org>
416
417         Reviewed by David Levin.
418
419         Fix strict OwnPtr violations in ListHashSet and RenderLayerCompositor
420         https://bugs.webkit.org/show_bug.cgi?id=59353
421
422         * rendering/RenderLayerCompositor.cpp:
423         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
424
425 2011-04-25  Adam Barth  <abarth@webkit.org>
426
427         Reviewed by James Robinson.
428
429         Worker*.cpp should work with strict OwnPtrs
430         https://bugs.webkit.org/show_bug.cgi?id=59346
431
432         * inspector/WorkerInspectorController.cpp:
433         (WebCore::WorkerInspectorController::WorkerInspectorController):
434         * workers/WorkerContext.cpp:
435         (WebCore::WorkerContext::WorkerContext):
436         * workers/WorkerRunLoop.cpp:
437         (WebCore::WorkerRunLoop::WorkerRunLoop):
438         * workers/WorkerScriptLoader.cpp:
439         (WebCore::WorkerScriptLoader::createResourceRequest):
440
441 2011-04-25  James Robinson  <jamesr@chromium.org>
442
443         Reviewed by Adam Barth.
444
445         Remove bad use of OwnPtr::set() in IconDatabase.cpp
446         https://bugs.webkit.org/show_bug.cgi?id=59344
447
448         Needed for strict OwnPtr compliance.
449
450         * loader/icon/IconDatabase.cpp:
451         (WebCore::readySQLiteStatement):
452
453 2011-04-25  Adam Barth  <abarth@webkit.org>
454
455         Reviewed by Maciej Stachowiak.
456
457         ImageBuffer.h should work with strict OwnPtrs
458         https://bugs.webkit.org/show_bug.cgi?id=59341
459
460         This patch is to prepare for the strict OwnPtr hack-a-thon.
461
462         * platform/graphics/ImageBuffer.h:
463         (WebCore::ImageBuffer::create):
464
465 2011-04-25  Steve Falkenburg  <sfalken@apple.com>
466
467         Reviewed by Brian Weinstein.
468
469         WebCore build on Windows should include windows.h in its precompiled header to speed builds
470         https://bugs.webkit.org/show_bug.cgi?id=59339
471
472         windows.h is included by several of the underlying wtf headers, including Atomics.h and
473         ThreadingPrimitives.h anyway, so include it in the WebCorePrefix.h to speed up compilation.
474         
475         On my 8 core Mac Pro, this reduces a clean rebuild of debug WebCore from 8 minutes to 7 minutes
476         (a 12% speedup).
477
478         * WebCorePrefix.h: Include windows.h
479
480 2011-04-25  Martin Robinson  <mrobinson@igalia.com>
481
482         Reviewed by Xan Lopez.
483
484         [GTK] Crash in WebCore::FrameView::notifyPageThatContentAreaWillPaint()
485         https://bugs.webkit.org/show_bug.cgi?id=59311
486
487         * platform/gtk/MainFrameScrollbarGtk.cpp:
488         (MainFrameScrollbarGtk::attachAdjustment): Before connecting an adjustment to a scrollbar
489         disconnect any lingering signal handlers. This prevents an adjustment from controlling the
490         active ScrollView and some zombie ScrollView.
491
492 2011-04-25  Geoffrey Garen  <ggaren@apple.com>
493
494         Another shot at fixing the EFL build.
495
496         * UseJSC.cmake:
497         * bindings/js/JSDOMBinding.cpp:
498
499 2011-04-25  Geoffrey Garen  <ggaren@apple.com>
500
501         Try to fix EFL build.
502
503         * UseJSC.cmake: Added a missing file.
504
505 2011-04-25  Geoffrey Garen  <ggaren@apple.com>
506
507         Reviewed by Oliver Hunt.
508
509         Removed a use of markDOMObjectWrapper: ActiveDOMObjects, Workers, and MessagePorts
510         https://bugs.webkit.org/show_bug.cgi?id=59333
511
512         * WebCore.xcodeproj/project.pbxproj: Added .idl files for easier editing.
513
514         * bindings/js/JSDOMBinding.cpp:
515         * bindings/js/JSDOMBinding.h:
516         * bindings/js/JSDocumentCustom.cpp:
517         * bindings/js/JSWorkerContextCustom.cpp:
518         (WebCore::JSWorkerContext::visitChildren): Removed now-unused functions.
519
520         * bindings/scripts/CodeGeneratorJS.pm: Added support for ActiveDOMObject
521         lifetime management.
522
523         * dom/Document.idl: No need for a custom mark function anymore, since
524         ActiveDOMObjets now manage their own lifetimes.
525
526         * dom/MessagePort.cpp:
527         (WebCore::MessagePort::hasPendingActivity): Correctly report that we
528         have pending activity when we're remotely entangled, instead of relying
529         on our clients to know this about us and do the check for us.
530
531         * dom/MessagePort.h: FIXME!
532
533         * dom/MessagePort.idl:
534         * fileapi/DOMFileSystem.idl:
535         * fileapi/FileReader.idl:
536         * fileapi/FileWriter.idl:
537         * notifications/Notification.idl:
538         * notifications/NotificationCenter.idl:
539         * page/EventSource.idl:
540         * storage/IDBDatabase.idl:
541         * storage/IDBRequest.idl:
542         * storage/IDBTransaction.idl:
543         * webaudio/AudioContext.idl:
544         * websockets/WebSocket.idl:
545         * workers/AbstractWorker.idl:
546         * workers/SharedWorker.idl:
547         * workers/Worker.idl: Opt in to ActiveDOMObject lifetime management.
548
549         * workers/WorkerContext.cpp:
550         (WebCore::WorkerContext::hasPendingActivity): No need to make up for
551         MessagePort::hasPendingActivity being wrong anymore, since it's now right.
552
553         * xml/XMLHttpRequest.idl: Opt in to ActiveDOMObject lifetime management.
554
555 2011-04-25  Yury Semikhatsky  <yurys@chromium.org>
556
557         Reviewed by Pavel Feldman.
558
559         Web Inspector: worker messages should be routed to corresponding worker front-end
560         https://bugs.webkit.org/show_bug.cgi?id=59323
561
562         Added WorkerManager which is responsible for routing messages between
563         Page inspector front-end and Worker inspector front-ends.
564
565         * WebCore.gypi:
566         * inspector/front-end/WebKit.qrc:
567         * inspector/front-end/WorkerManager.js: Added.
568         (WebInspector.WorkerManager):
569         (WebInspector.WorkerManager.loaded.InspectorFrontendHost.sendMessageToBackend):
570         (WebInspector.WorkerManager.loaded.InspectorFrontendHost.loaded):
571         (WebInspector.WorkerManager.loaded):
572         (WebInspector.WorkerFrontendStub):
573         (WebInspector.WorkerFrontendStub.prototype._receiveMessage):
574         (WebInspector.WorkerDispatcher):
575         (WebInspector.WorkerDispatcher.prototype._receiveMessage):
576         (WebInspector.WorkerDispatcher.prototype.workerCreated):
577         (WebInspector.WorkerDispatcher.prototype.dispatchMessageFromWorker):
578         * inspector/front-end/inspector.html:
579         * inspector/front-end/inspector.js:
580         (WebInspector.loaded):
581
582 2011-04-25  Annie Sullivan  <sullivan@chromium.org>
583
584         Reviewed by Pavel Feldman.
585
586         Web Inspector: [Resources panel] Should be easy to copy data.
587         https://bugs.webkit.org/show_bug.cgi?id=45662
588
589         Adds context menu items to copy resource location, resource request headers, and resource response headers.
590
591         * inspector/front-end/NetworkPanel.js:
592         (WebInspector.NetworkPanel.prototype._contextMenu): Add new items to context menu.
593         (WebInspector.NetworkPanel.prototype._exportLocation): Copy resource location to clipboard.
594         (WebInspector.NetworkPanel.prototype._exportRequestHeaders): Copy resource request headers to clipboard.
595         (WebInspector.NetworkPanel.prototype._exportResponseHeaders): Copy resource response headers to clipboard.
596         * inspector/front-end/Resource.js:
597         (WebInspector.Resource.prototype.get requestHeadersText): If _requestHeadersText is undefined, generate it from requestHeaders.
598         (WebInspector.Resource.prototype.get responseHeadersText): If _responseHeadersText is undefined, generate it form responseHeaders.
599
600 2011-04-25  Alexander Pavlov  <apavlov@chromium.org>
601
602         Reviewed by Yury Semikhatsky.
603
604         Web Inspector: CSS is parsed improperly when saved in UTF-8 with a BOM
605         https://bugs.webkit.org/show_bug.cgi?id=59322
606
607         Use TextResourceDecoder to determine external stylesheet charsets correctly.
608
609         Test: inspector/styles/parse-utf8-bom.html
610
611         * inspector/InspectorStyleSheet.cpp:
612         (WebCore::InspectorStyleSheet::originalStyleSheetText):
613
614 2011-04-25  Pavel Feldman  <pfeldman@google.com>
615
616         Not reviewed: Inspector.json cleanup.
617
618         * inspector/Inspector.json:
619
620 2011-04-25  Yury Semikhatsky  <yurys@chromium.org>
621
622         Reviewed by Pavel Feldman.
623
624         Web Inspector: introduce InspectorWorkerAgent
625         https://bugs.webkit.org/show_bug.cgi?id=59320
626
627         InspectorWorkerAgent is responsible for routing inspector messages
628         between worker context inspector agents and corresponding worker
629         inspector front-end.
630
631         * CMakeLists.txt:
632         * GNUmakefile.list.am:
633         * WebCore.gypi:
634         * WebCore.pro:
635         * WebCore.vcproj/WebCore.vcproj:
636         * WebCore.xcodeproj/project.pbxproj:
637         * inspector/CodeGeneratorInspector.pm:
638         * inspector/Inspector.json:
639         * inspector/InspectorAgent.cpp:
640         (WebCore::InspectorAgent::InspectorAgent):
641         (WebCore::InspectorAgent::setFrontend):
642         (WebCore::InspectorAgent::disconnectFrontend):
643         * inspector/InspectorAgent.h:
644         (WebCore::InspectorAgent::workerAgent):
645         * inspector/InspectorController.cpp:
646         (WebCore::InspectorController::connectFrontend):
647         (WebCore::InspectorController::disconnectFrontend):
648         * inspector/InspectorInstrumentation.cpp:
649         (WebCore::InspectorInstrumentation::didStartWorkerContextImpl):
650         * inspector/InspectorInstrumentation.h:
651         (WebCore::InspectorInstrumentation::willStartWorkerContext):
652         (WebCore::InspectorInstrumentation::didStartWorkerContext):
653         * inspector/InspectorWorkerAgent.cpp: Added.
654         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::WorkerFrontendChannel):
655         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::~WorkerFrontendChannel):
656         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::id):
657         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::inspectorProxy):
658         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::sendMessageToFrontend):
659         (WebCore::InspectorWorkerAgent::create):
660         (WebCore::InspectorWorkerAgent::InspectorWorkerAgent):
661         (WebCore::InspectorWorkerAgent::~InspectorWorkerAgent):
662         (WebCore::InspectorWorkerAgent::setFrontend):
663         (WebCore::InspectorWorkerAgent::clearFrontend):
664         (WebCore::InspectorWorkerAgent::dispatchMessageOnWorkerInspector):
665         (WebCore::InspectorWorkerAgent::didStartWorkerContext):
666         * inspector/InspectorWorkerAgent.h: Added.
667         * inspector/InstrumentingAgents.h:
668         (WebCore::InstrumentingAgents::InstrumentingAgents):
669         (WebCore::InstrumentingAgents::inspectorWorkerAgent):
670         (WebCore::InstrumentingAgents::setInspectorWorkerAgent):
671         * inspector/WorkerInspectorController.cpp:
672         (WebCore::WorkerInspectorController::connectFrontend):
673         * inspector/generate-inspector-idl:
674         * workers/Worker.cpp:
675         (WebCore::Worker::notifyFinished):
676         * workers/WorkerContextInspectorProxy.h: Added. Platform-specific transport for inspector
677         messages sent from the inspected page worker agent to the worker context inspector agents.
678         (WebCore::WorkerContextInspectorProxy::connectFrontend):
679         (WebCore::WorkerContextInspectorProxy::disconnectFrontend):
680         (WebCore::WorkerContextInspectorProxy::sendMessageToWorkerContextInspector):
681         (WebCore::WorkerContextInspectorProxy::~WorkerContextInspectorProxy):
682         * workers/WorkerContextProxy.h:
683         (WebCore::WorkerContextProxy::inspectorProxy):
684
685 2011-04-25  Pavel Feldman  <pfeldman@google.com>
686
687         Reviewed by Yury Semikhatsky.
688
689         Web Inspector: move Frame and Resource Tree management into the Page agent.
690         https://bugs.webkit.org/show_bug.cgi?id=59321
691
692         Network agent should only handle network-related activities.
693         Frame structure should be managed by the Page agent instead.
694
695         * inspector/Inspector.json:
696         * inspector/InspectorAgent.cpp:
697         (WebCore::InspectorAgent::InspectorAgent):
698         * inspector/InspectorDOMAgent.cpp:
699         (WebCore::InspectorDOMAgent::InspectorDOMAgent):
700         (WebCore::InspectorDOMAgent::setFrontend):
701         (WebCore::InspectorDOMAgent::restore):
702         (WebCore::InspectorDOMAgent::highlightFrame):
703         * inspector/InspectorDOMAgent.h:
704         (WebCore::InspectorDOMAgent::create):
705         * inspector/InspectorInstrumentation.cpp:
706         (WebCore::InspectorInstrumentation::domContentLoadedEventFiredImpl):
707         (WebCore::InspectorInstrumentation::loadEventFiredImpl):
708         (WebCore::InspectorInstrumentation::frameDetachedFromParentImpl):
709         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
710         * inspector/InspectorPageAgent.cpp:
711         (WebCore::InspectorPageAgent::create):
712         (WebCore::InspectorPageAgent::resourceContent):
713         (WebCore::InspectorPageAgent::resourceContentBase64):
714         (WebCore::InspectorPageAgent::resourceData):
715         (WebCore::InspectorPageAgent::cachedResource):
716         (WebCore::InspectorPageAgent::resourceTypeString):
717         (WebCore::InspectorPageAgent::cachedResourceType):
718         (WebCore::InspectorPageAgent::cachedResourceTypeString):
719         (WebCore::InspectorPageAgent::InspectorPageAgent):
720         (WebCore::InspectorPageAgent::setFrontend):
721         (WebCore::InspectorPageAgent::reload):
722         (WebCore::InspectorPageAgent::open):
723         (WebCore::InspectorPageAgent::getCookies):
724         (WebCore::InspectorPageAgent::deleteCookie):
725         (WebCore::InspectorPageAgent::getResourceTree):
726         (WebCore::InspectorPageAgent::getResourceContent):
727         (WebCore::InspectorPageAgent::restore):
728         (WebCore::InspectorPageAgent::domContentEventFired):
729         (WebCore::InspectorPageAgent::loadEventFired):
730         (WebCore::InspectorPageAgent::frameNavigated):
731         (WebCore::InspectorPageAgent::frameDetached):
732         (WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
733         (WebCore::InspectorPageAgent::mainFrame):
734         (WebCore::pointerAsId):
735         (WebCore::InspectorPageAgent::frameForId):
736         (WebCore::InspectorPageAgent::frameId):
737         (WebCore::InspectorPageAgent::loaderId):
738         (WebCore::InspectorPageAgent::buildObjectForFrame):
739         (WebCore::InspectorPageAgent::buildObjectForFrameTree):
740         * inspector/InspectorPageAgent.h:
741         * inspector/InspectorResourceAgent.cpp:
742         (WebCore::buildObjectForCachedResource):
743         (WebCore::InspectorResourceAgent::willSendRequest):
744         (WebCore::InspectorResourceAgent::didReceiveResponse):
745         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
746         (WebCore::InspectorResourceAgent::setInitialScriptContent):
747         (WebCore::InspectorResourceAgent::setInitialXHRContent):
748         (WebCore::InspectorResourceAgent::InspectorResourceAgent):
749         * inspector/InspectorResourceAgent.h:
750         (WebCore::InspectorResourceAgent::create):
751         * inspector/InspectorStyleSheet.cpp:
752         (WebCore::InspectorStyleSheet::resourceStyleSheetText):
753         * inspector/front-end/NetworkManager.js:
754         (WebInspector.NetworkManager.prototype.requestContent):
755         * inspector/front-end/NetworkPanel.js:
756         (WebInspector.NetworkPanel):
757         (WebInspector.NetworkPanel.prototype.frameNavigated):
758         * inspector/front-end/ResourceTreeModel.js:
759         (WebInspector.ResourceTreeModel):
760         (WebInspector.ResourceTreeModel.prototype.frontendReused):
761         (WebInspector.ResourceTreeModel.prototype.frameNavigated):
762         (WebInspector.ResourceTreeModel.prototype.frameDetached):
763         * inspector/front-end/inspector.js:
764         (WebInspector.domContentEventFired):
765         (WebInspector.loadEventFired):
766         (WebInspector.frameNavigated):
767         (WebInspector.frameDetached):
768
769 2011-04-25  Pavel Feldman  <pfeldman@google.com>
770
771         Reviewed by Yury Semikhatsky.
772
773         Web Inspector: few protocol improvements.
774         https://bugs.webkit.org/show_bug.cgi?id=59319
775
776         - Page domain is documented
777         - setUserAgentOverride is moved to the Network agent
778         - setSearchingForNode -> setInspectModeEnabled
779         - highlightDOMNode -> highlightNode
780         - reloadPage -> reload
781         - openInNewWindow -> open with optional parameter
782
783         * inspector/Inspector.json:
784         * inspector/InspectorDOMAgent.cpp:
785         (WebCore::InspectorDOMAgent::setInspectModeEnabled):
786         (WebCore::InspectorDOMAgent::highlightNode):
787         * inspector/InspectorDOMAgent.h:
788         (WebCore::InspectorDOMAgent::hideNodeHighlight):
789         * inspector/InspectorInstrumentation.cpp:
790         (WebCore::InspectorInstrumentation::applyUserAgentOverrideImpl):
791         * inspector/InspectorPageAgent.cpp:
792         (WebCore::InspectorPageAgent::clearFrontend):
793         (WebCore::InspectorPageAgent::reload):
794         (WebCore::InspectorPageAgent::open):
795         * inspector/InspectorPageAgent.h:
796         * inspector/InspectorResourceAgent.cpp:
797         (WebCore::InspectorResourceAgent::clearFrontend):
798         (WebCore::InspectorResourceAgent::applyUserAgentOverride):
799         (WebCore::InspectorResourceAgent::setUserAgentOverride):
800         * inspector/InspectorResourceAgent.h:
801         * inspector/front-end/AuditsPanel.js:
802         (WebInspector.AuditsPanel.prototype._reloadResources):
803         * inspector/front-end/ElementsPanel.js:
804         (WebInspector.ElementsPanel.prototype.setSearchingForNode):
805         * inspector/front-end/ExtensionServer.js:
806         (WebInspector.ExtensionServer.prototype._onReload):
807         * inspector/front-end/NetworkPanel.js:
808         (WebInspector.NetworkDataGridNode.prototype._openInNewTab):
809         * inspector/front-end/ResourcesPanel.js:
810         (WebInspector.FrameResourceTreeElement.prototype.ondblclick):
811         * inspector/front-end/inspector.js:
812         (WebInspector.highlightDOMNode):
813         (WebInspector.openResource):
814         (WebInspector.documentKeyDown):
815
816 2011-04-25  Jon Lee  <jonlee@apple.com>
817
818         Reviewed by Maciej Stachowiak.
819
820         Overlay scroller hard to see on pages with dark background (59183)
821         https://bugs.webkit.org/show_bug.cgi?id=59183
822         <rdar://problem/8975367>
823
824         Switch the scrollbar's overlay style depending on its frame's background color.
825         This refactors the getDocumentBackgroundColor method needed for gestures. The style
826         is determined and set on every paint() call to the Mac scrollbar theme.
827
828         * WebCore.exp.in: adding method to allow changing style
829         * page/Frame.cpp:
830         (WebCore::Frame::getDocumentBackgroundColor): moving code from WebFrame for reuse by FrameView
831         * page/Frame.h:
832         * page/FrameView.cpp:
833         (WebCore::FrameView::recommendedScrollbarOverlayStyle): overridden to suggest a style based on CSS background color
834         * page/FrameView.h:
835         * platform/ScrollTypes.h: new enum to represent different overlay scrollbar styles
836         * platform/ScrollableArea.h:
837         (WebCore::ScrollableArea::recommendedScrollbarOverlayStyle): new virtual function to return a suggested overlay style
838         * platform/mac/ScrollbarThemeMac.mm:
839         (WebCore::ScrollbarThemeMac::paint):
840         * platform/mac/WebCoreSystemInterface.h:
841         * platform/mac/WebCoreSystemInterface.mm:
842
843 2011-04-25  Dan Bernstein  <mitz@apple.com>
844
845         Reviewed by Maciej Stachowiak.
846
847         <rdar://problem/9113516> REGRESSION (WK2): Holding down Option while dragging scrollbar thumb has no effect (should make scroll distance equal mouse translation)
848         https://bugs.webkit.org/show_bug.cgi?id=59315
849
850         * platform/Scrollbar.cpp:
851         (WebCore::Scrollbar::Scrollbar): Initialize new member variables.
852         (WebCore::Scrollbar::moveThumb): Added a boolean draggingDocument parameter. When true, the document
853         is scrolled a distance equal to the change in the mouse position.
854         (WebCore::Scrollbar::mouseMoved): Check with the theme whether the mouse move event should drag
855         the document rather than the thumb, and pass the result to moveThumb.
856         (WebCore::Scrollbar::mouseUp): Reset m_draggingDocument.
857         * platform/Scrollbar.h:
858         * platform/ScrollbarTheme.h:
859         (WebCore::ScrollbarTheme::shouldDragDocumentInsteadOfThumb): Added. The base class implementation
860         returns false.
861         * platform/mac/ScrollbarThemeMac.h:
862         * platform/mac/ScrollbarThemeMac.mm:
863         (WebCore::ScrollbarThemeMac::shouldDragDocumentInsteadOfThumb): Overridden to return true if the
864         Option key is down.
865
866 2011-04-24  Geoffrey Garen  <ggaren@apple.com>
867
868         Reviewed by Sam Weinig.
869
870         Removed a use of markDOMObjectWrapper: WebGL, XHR, workers; plus, more autogeneration
871         https://bugs.webkit.org/show_bug.cgi?id=59307
872
873         * WebCore.xcodeproj/project.pbxproj: Added Blob.idl, so it's easier to edit.
874
875         * bindings/js/JSCSSRuleCustom.cpp:
876         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
877         * bindings/js/JSCanvasRenderingContextCustom.cpp:
878         * bindings/js/JSDOMApplicationCacheCustom.cpp: Autogenerate these instead
879         of hand-coding them.
880
881         * bindings/js/JSDOMBinding.h:
882         (WebCore::root): Moved some GC helpers here from JSNodeCustom.h, because
883         they're reasonably generic.
884
885         * bindings/js/JSDOMImplementationCustom.cpp:
886         * bindings/js/JSDOMStringMapCustom.cpp:
887         * bindings/js/JSDOMTokenListCustom.cpp:
888         * bindings/js/JSHTMLCollectionCustom.cpp:
889         * bindings/js/JSMediaListCustom.cpp: Autogenerate these instead of
890         hand-coding them.
891
892         * bindings/js/JSMessageChannelCustom.cpp:
893         (WebCore::JSMessageChannel::visitChildren):
894         * bindings/js/JSMessagePortCustom.cpp:
895         (WebCore::JSMessagePort::visitChildren): Use addOpaqueRoot instead of
896         markDOMObjectWrapper. This is one of the few cases where a DOM object is
897         considered a stand-alone root. It's not as efficient as the shared root
898         case, but workers and message ports are very rare objects, so it's no
899         big deal.
900
901         * bindings/js/JSNamedNodeMapCustom.cpp: Autogenerate!
902
903         * bindings/js/JSNodeCustom.h: Moved to JSDOMBinding.h.
904
905         * bindings/js/JSSharedWorkerCustom.cpp:
906         (WebCore::JSSharedWorker::visitChildren): Use addOpaqueRoot instead of
907         markDOMObjectWrapper, as above. Once again, a stand-alone root.
908
909         * bindings/js/JSStyleSheetCustom.cpp:
910         * bindings/js/JSStyleSheetListCustom.cpp: Autogenerate!
911
912         * bindings/js/JSWebGLRenderingContextCustom.cpp:
913         (WebCore::JSWebGLRenderingContext::visitChildren): Use the opaque roots
914         system for marking WebGL contexts and their associated satellite objects.
915
916         * bindings/js/JSWorkerContextCustom.cpp:
917         (WebCore::JSWorkerContext::visitChildren):
918         * bindings/js/JSXMLHttpRequestCustom.cpp: Use addOpaqueRoot instead of
919         markDOMObjectWrapper, as above. Once again, stand-alone roots.
920
921         (WebCore::JSXMLHttpRequest::visitChildren):
922         * bindings/js/JSXMLHttpRequestUploadCustom.cpp: No need to mark our owner
923         XHR because it is not reachable from us.
924
925         * bindings/scripts/CodeGeneratorJS.pm: Added autogeneration support for a
926         bunch of repetitive cases of isReachableFromOpaqueRoots callbacks.
927
928         * css/CSSRule.idl:
929         * css/CSSStyleDeclaration.idl:
930         * css/MediaList.idl:
931         * css/StyleMedia.idl:
932         * css/StyleSheet.idl:
933         * css/StyleSheetList.idl:
934         * dom/DOMImplementation.idl:
935         * dom/DOMStringMap.idl:
936         * dom/MessagePort.idl:
937         * dom/NamedNodeMap.idl:
938         * fileapi/Blob.idl:
939         * html/DOMTokenList.idl: Opt in to autogeneration.
940
941         * html/HTMLCanvasElement.cpp:
942         (WebCore::HTMLCanvasElement::getContext): Standardized on PassOwnPtr/OwnPtr
943         usage, to reduce human error and make ownership rules more obvious.
944
945         * html/HTMLCollection.idl:
946         * html/canvas/ArrayBuffer.idl: Opt in to autogeneration.
947
948         * html/canvas/CanvasRenderingContext.cpp:
949         * html/canvas/CanvasRenderingContext.h:
950         (WebCore::CanvasRenderingContext::ref):
951         (WebCore::CanvasRenderingContext::deref):
952         * html/canvas/CanvasRenderingContext2D.h:
953         (WebCore::CanvasRenderingContext2D::create):
954         (WebCore::CanvasRenderingContext2D::state): Standardized on PassOwnPtr/OwnPtr
955         usage, to reduce human error and make ownership rules more obvious.
956         
957         Inlined some functions to match our standard idiom and to make the code
958         in the header document itself.
959
960         * html/canvas/CanvasRenderingContext.idl: Opt in to autogeneration.
961
962         * html/canvas/OESStandardDerivatives.cpp:
963         (WebCore::OESStandardDerivatives::OESStandardDerivatives):
964         (WebCore::OESStandardDerivatives::create):
965         * html/canvas/OESStandardDerivatives.h:
966         * html/canvas/OESStandardDerivatives.idl:
967         * html/canvas/OESTextureFloat.cpp:
968         (WebCore::OESTextureFloat::OESTextureFloat):
969         (WebCore::OESTextureFloat::create):
970         * html/canvas/OESTextureFloat.h:
971         * html/canvas/OESTextureFloat.idl:
972         * html/canvas/OESVertexArrayObject.cpp:
973         (WebCore::OESVertexArrayObject::OESVertexArrayObject):
974         (WebCore::OESVertexArrayObject::create):
975         * html/canvas/OESVertexArrayObject.h:
976         * html/canvas/OESVertexArrayObject.idl:
977         * html/canvas/WebGLExtension.cpp:
978         (WebCore::WebGLExtension::WebGLExtension):
979         * html/canvas/WebGLExtension.h:
980         (WebCore::WebGLExtension::ref):
981         (WebCore::WebGLExtension::deref):
982         (WebCore::WebGLExtension::context):
983         * html/canvas/WebGLRenderingContext.cpp:
984         (WebCore::WebGLRenderingContext::~WebGLRenderingContext):
985         (WebCore::WebGLRenderingContext::getExtension):
986         * html/canvas/WebGLRenderingContext.h:
987         * html/canvas/WebKitLoseContext.cpp:
988         (WebCore::WebKitLoseContext::WebKitLoseContext):
989         (WebCore::WebKitLoseContext::create):
990         (WebCore::WebKitLoseContext::loseContext):
991         * html/canvas/WebKitLoseContext.h:
992         * html/canvas/WebKitLoseContext.idl: Updated the ownership model for WebGL
993         canavs rendering contexts to match the model for 2D canvas rendering
994         contexts. This makes garbage collection a lot more straightforward, but
995         it also makes the behavior of these objects more reliable. (Previously,
996         satellite objects would magically stop working when the last reference
997         to their owner object was dropped. Now, satellite objects keep their owner
998         alive through reference counting.)
999
1000         * loader/appcache/DOMApplicationCache.idl:
1001         * page/BarInfo.idl:
1002         * page/Console.idl:
1003         * page/DOMSelection.idl:
1004         * page/Geolocation.idl:
1005         * page/History.idl:
1006         * page/Location.idl:
1007         * page/Navigator.idl:
1008         * page/Screen.idl:
1009         * page/WorkerNavigator.idl:
1010         * plugins/DOMMimeTypeArray.h:
1011         (WebCore::DOMMimeTypeArray::frame):
1012         * plugins/DOMMimeTypeArray.idl:
1013         * plugins/DOMPluginArray.h:
1014         (WebCore::DOMPluginArray::frame):
1015         * plugins/DOMPluginArray.idl:
1016         * storage/Storage.idl:
1017         * workers/WorkerLocation.idl: Opt in to autogeneration.
1018
1019         * xml/XMLHttpRequest.cpp:
1020         (WebCore::XMLHttpRequest::~XMLHttpRequest):
1021         * xml/XMLHttpRequest.h:
1022         * xml/XMLHttpRequestUpload.cpp:
1023         (WebCore::XMLHttpRequestUpload::scriptExecutionContext):
1024         * xml/XMLHttpRequestUpload.h:
1025         (WebCore::XMLHttpRequestUpload::create):
1026         (WebCore::XMLHttpRequestUpload::ref):
1027         (WebCore::XMLHttpRequestUpload::deref):
1028         (WebCore::XMLHttpRequestUpload::xmlHttpRequest):
1029         (WebCore::XMLHttpRequestUpload::toXMLHttpRequestUpload):
1030         * xml/XMLHttpRequestUpload.idl: Updated the ownership model for XHR and
1031         its associated upload object to match the model for canvas. This makes
1032         garbage collection a lot more straightforward, but it also makes the
1033         behavior of these objects more reliable.
1034
1035 2011-04-24  Sheriff Bot  <webkit.review.bot@gmail.com>
1036
1037         Unreviewed, rolling out r84759.
1038         http://trac.webkit.org/changeset/84759
1039         https://bugs.webkit.org/show_bug.cgi?id=59306
1040
1041         Caused gc-shadow.html to start crashing in V8. (Requested by
1042         dglazkov|away on #webkit).
1043
1044         * dom/Node.cpp:
1045         (WebCore::NodeRendererFactory::createRendererAndStyle):
1046         (WebCore::Node::styleForRenderer):
1047
1048 2011-04-24  Maciej Stachowiak  <mjs@apple.com>
1049
1050         Reviewed by George Staikos.
1051
1052         Handling of URLs like http:/example.com/ is incorrect
1053         https://bugs.webkit.org/show_bug.cgi?id=59300
1054         <rdar://problem/9231956>
1055
1056         URLs like http:/example.com/ or http:example.com/ are now correctly
1057         canonicalized as http://example.com/
1058         
1059         The code still doesn't quite match other browsers - at least some
1060         other browsers seem to base parsing behavior on whether they
1061         recongize a scheme from a fixed list, and ignore whether // is
1062         present in the URL or not.
1063         
1064         * platform/KURL.cpp:
1065         (WebCore::isNonFileHierarchicalScheme): New helper function.
1066         (WebCore::KURL::parse): For a particular list of whitelisted schemes,
1067         assume they are hierarchical and need an authority even if there is no //
1068         after the :/
1069
1070 2011-04-24  Dan Bernstein  <mitz@apple.com>
1071
1072         LLVM Compiler build fix.
1073
1074         * page/ContentSecurityPolicy.cpp: Removed an unused function.
1075
1076 2011-04-24  Dominic Cooney  <dominicc@chromium.org>
1077
1078         Reviewed by Dimitri Glazkov.
1079
1080         Crash when adding a text node to a shadow root
1081         https://bugs.webkit.org/show_bug.cgi?id=59304
1082
1083         Text nodes need to consult their host element for style.
1084
1085         Test: fast/dom/shadow/append-child-text.html
1086
1087         * dom/Node.cpp:
1088         (WebCore::NodeRendererFactory::styleForRenderer):
1089         (WebCore::NodeRendererFactory::createRendererAndStyle):
1090         (WebCore::Node::styleForRenderer): forward to NodeRendererFactory
1091
1092 2011-04-24  Adam Barth  <abarth@webkit.org>
1093
1094         Reviewed by Eric Seidel.
1095
1096         Update Content-Security-Policy syntax to match new version of spec
1097         https://bugs.webkit.org/show_bug.cgi?id=59291
1098
1099         Brandon removed disable-xss-protection in favor of unsafe-inline and
1100         allow-eval in favor of unsafe-eval.  This change in syntax also means
1101         the options directive no longer exists.
1102
1103         * page/ContentSecurityPolicy.cpp:
1104         (WebCore::CSPSourceList::allowInline):
1105         (WebCore::CSPSourceList::allowEval):
1106         (WebCore::CSPSourceList::CSPSourceList):
1107         (WebCore::CSPSourceList::parseSource):
1108         (WebCore::CSPSourceList::addSourceUnsafeInline):
1109         (WebCore::CSPSourceList::addSourceUnsafeEval):
1110         (WebCore::CSPDirective::allowInline):
1111         (WebCore::CSPDirective::allowEval):
1112         (WebCore::ContentSecurityPolicy::allowJavaScriptURLs):
1113         (WebCore::ContentSecurityPolicy::allowInlineEventHandlers):
1114         (WebCore::ContentSecurityPolicy::allowInlineScript):
1115         (WebCore::ContentSecurityPolicy::allowEval):
1116         (WebCore::ContentSecurityPolicy::addDirective):
1117         * page/ContentSecurityPolicy.h:
1118
1119 2011-04-24  Dan Bernstein  <mitz@apple.com>
1120
1121         Reviewed by Maciej Stachowiak.
1122
1123         Manual test for <rdar://problem/9329741> Reproducible crash in WebChromeClient::invalidateContentsAndWindow() on simonscat.com
1124         https://bugs.webkit.org/show_bug.cgi?id=59299
1125
1126         * manual-tests/back-from-document-with-scrollbar.html: Added.
1127
1128 2011-04-24  Rik Cabanier  <cabanier@adobe.com>
1129
1130         Reviewed by Simon Fraser.
1131
1132         Tables are not rendered correctly
1133         https://bugs.webkit.org/show_bug.cgi?id=59138
1134
1135         Test: fast/table/auto-100-percent-width.html
1136
1137         * rendering/AutoTableLayout.cpp:
1138         (WebCore::AutoTableLayout::computePreferredLogicalWidths):
1139
1140 2011-04-23  Simon Fraser  <simon.fraser@apple.com>
1141
1142         Fix Windows build, which complains about unreachable code.
1143
1144         * platform/ScrollableArea.cpp:
1145         (WebCore::ScrollableArea::hasLayerForHorizontalScrollbar):
1146         (WebCore::ScrollableArea::hasLayerForVerticalScrollbar):
1147         (WebCore::ScrollableArea::hasLayerForScrollCorner):
1148
1149 2011-04-23  Simon Fraser  <simon.fraser@apple.com>
1150
1151         Reviewed by Dan Bernstein.
1152
1153         Area under composited scrollbars not repainted in WebKit2 on scrolling
1154         https://bugs.webkit.org/show_bug.cgi?id=59294
1155         <rdar://problem/9299062>
1156         
1157         When computing the rect that can be copied on scrolling, we normally
1158         exclude the areas occupied by overlay scrollbars to avoid smeared scrollbars;
1159         the assumption is that other code will repaint these areas. However, when
1160         scrollbars are in their own compositing layers, we can, and should
1161         copy the entire area.
1162
1163         Not testable in DRT because it does not allow tests to use overlay scrollbars.
1164
1165         * platform/ScrollView.h:
1166         * platform/ScrollView.cpp:
1167         (WebCore::ScrollView::rectToCopyOnScroll):
1168         New method, with code moved from scrollContents and fixed to look
1169         for scrollbars in layers.
1170         (WebCore::ScrollView::scrollContents):
1171         Call rectToCopyOnScroll().
1172         
1173         * platform/ScrollableArea.h:
1174         * platform/ScrollableArea.cpp:
1175         (WebCore::ScrollableArea::hasLayerForHorizontalScrollbar):
1176         (WebCore::ScrollableArea::hasLayerForVerticalScrollbar):
1177         (WebCore::ScrollableArea::hasLayerForScrollCorner):
1178         Methods we can call outside of the ACCELERATED_COMPOSITING #ifdef.
1179
1180 2011-04-23  Sheriff Bot  <webkit.review.bot@gmail.com>
1181
1182         Unreviewed, rolling out r84740.
1183         http://trac.webkit.org/changeset/84740
1184         https://bugs.webkit.org/show_bug.cgi?id=59290
1185
1186         change breaks apple internal builds and is incorrect
1187         (Requested by smfr on #webkit).
1188
1189         * WebCore.exp.in:
1190         * page/FrameView.cpp:
1191         * page/FrameView.h:
1192         * platform/ScrollTypes.h:
1193         * platform/ScrollableArea.h:
1194         * platform/mac/ScrollbarThemeMac.mm:
1195         (WebCore::ScrollbarThemeMac::paint):
1196         * platform/mac/WebCoreSystemInterface.h:
1197         * platform/mac/WebCoreSystemInterface.mm:
1198
1199 2011-04-23  Dan Bernstein  <mitz@apple.com>
1200
1201         Reviewed by Simon Fraser.
1202
1203         <rdar://problem/8970549> WebFindOptionsAtWordStarts fails with Japanese words
1204         https://bugs.webkit.org/show_bug.cgi?id=59288
1205
1206         * platform/text/mac/TextBoundaries.mm:
1207         (WebCore::wordStringTokenizer): Added this helper function.
1208         (WebCore::findNextWordFromIndex): Changed to use a CFStringTokenizer with kCFStringTokenizerUnitWord,
1209         whose behavior is not locale-dependent.
1210
1211 2011-04-23  Dominic Cooney  <dominicc@chromium.org>
1212
1213         Reviewed by Dimitri Glazkov.
1214
1215         [V8] Nodes in shadow DOM should not be GCed while their hosts are alive
1216         https://bugs.webkit.org/show_bug.cgi?id=59284
1217
1218         Test: fast/dom/shadow/gc-shadow.html
1219
1220         * bindings/v8/V8GCController.cpp:
1221         (WebCore::calculateGroupId): group shadow nodes with their hosts
1222
1223 2011-04-23  MORITA Hajime <morrita@google.com>
1224
1225         Reviewed by Dimitri Glazkov.
1226
1227         [Refactoring] NodeRenderParentDetector should be NodeRenderFactory
1228         https://bugs.webkit.org/show_bug.cgi?id=59280
1229         
1230         - Rename NodeRenderParentDetector to NodeRendererFactory
1231         - move createRendererAndStyle() and createRendererIfNeeded to
1232           NodeRendererFactory
1233
1234         No new test, no behavioral change.
1235         
1236         * dom/Node.cpp:
1237         (WebCore::NodeRendererFactory::NodeRendererFactory):
1238         (WebCore::NodeRendererFactory::document):
1239         (WebCore::NodeRendererFactory::nextRenderer):
1240         (WebCore::NodeRendererFactory::findVisualParent):
1241         (WebCore::NodeRendererFactory::shouldCreateRenderer):
1242         (WebCore::NodeRendererFactory::createRendererAndStyle):
1243         (WebCore::NodeRendererFactory::createRendererIfNeeded):
1244         (WebCore::Node::parentNodeForRenderingAndStyle):
1245         (WebCore::Node::createRendererIfNeeded):
1246         * dom/Node.h:
1247         * html/HTMLDetailsElement.cpp:
1248         (WebCore::DetailsSummaryElement::detailsElement): Added const_cast due to the chage on parentNodeForRenderingAndStyle() 
1249
1250 2011-04-23  MORITA Hajime  <morrita@google.com>
1251
1252         Reviewed by Kent Tamura.
1253
1254         REGRESSION: (non-Mac) <meter>'s bar part isn't rendered for with -webkit-writing-mode: vertical-lr from r82899
1255         https://bugs.webkit.org/show_bug.cgi?id=59281
1256
1257         Styles for -webkit-meter-bar and -webkit-progress-bar missed width property, which caused unexpected layout results
1258         for vertical writing modes. This fix added a width property for each of them.
1259         
1260         Tests: fast/dom/HTMLMeterElement/meter-writing-mode.html
1261                fast/dom/HTMLProgressElement/progress-writing-mode.html
1262
1263         * css/html.css:
1264         (meter::-webkit-meter-bar):
1265         (progress::-webkit-progress-bar):
1266
1267 2011-04-23  Kevin Ollivier  <kevino@theolliviers.com>
1268
1269         [wx] Unreviewed build fix. Added missing header.
1270         
1271         * platform/graphics/filters/FEDropShadow.h:
1272
1273 2011-04-23  Alexey Proskuryakov  <ap@apple.com>
1274
1275         Reviewed by Maciej Stachowiak.
1276
1277         REGRESSION (r80812): window.print();window.close() doesn't work in WebKit2
1278         https://bugs.webkit.org/show_bug.cgi?id=59241
1279         <rdar://problem/9150861>
1280
1281         Covered by manual-tests/print-after-window-close.html.
1282
1283         Re-fixing <https://bugs.webkit.org/show_bug.cgi?id=51357> in a way that doesn't cause the
1284         regression.
1285
1286         * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::didCancel): We shouldn't be
1287         doing complicated work while the loader is half-canceled.
1288
1289         * manual-tests/print-after-window-close.html: Extended to actually print a non-empty page,
1290         thus being more practical.
1291
1292         * page/Chrome.cpp: (WebCore::Chrome::print): Added a FIXME about a need for PageGroupLoadDeferrer.
1293         It's too scary for me to try now.
1294
1295         * page/DOMWindow.cpp:
1296         (WebCore::DOMWindow::DOMWindow):
1297         (WebCore::DOMWindow::finishedLoading):
1298         * page/DOMWindow.h:
1299         Reverted the previous fix for <https://bugs.webkit.org/show_bug.cgi?id=51357>.
1300
1301 2011-04-19  Vitaly Repeshko  <vitalyr@chromium.org>
1302
1303         Reviewed by Adam Barth.
1304
1305         [V8] Use implicit references for V8 listeners on DOM nodes.
1306         https://bugs.webkit.org/show_bug.cgi?id=58953
1307
1308         Instead of allocating an auxiliary V8 array referencing V8
1309         listener objects associated with a DOM node and using an extra
1310         pointer in every DOM node wrapper, we can register implicit
1311         references between nodes and their listeners during GC. This also
1312         makes V8 bindings more aligned with JSC bindings.
1313
1314         No new tests because this is a refactoring.
1315
1316         * bindings/scripts/CodeGeneratorV8.pm: Stopped generating the
1317         listener cache internal field for DOM nodes.
1318         * bindings/v8/V8AbstractEventListener.h: Exposed the lister handle
1319         to the GC.
1320         (WebCore::V8AbstractEventListener::existingListenerObjectPeristentHandle):
1321         * bindings/v8/V8GCController.cpp: Started using implicit references.
1322         (WebCore::GrouperVisitor::visitDOMWrapper):
1323         * dom/EventTarget.h: Implemented an iterator over all listeners.
1324         (WebCore::EventListenerIterator):
1325
1326 2011-04-22  Jon Lee  <jonlee@apple.com>
1327
1328         Reviewed by Beth Dakin.
1329
1330         Overlay scroller hard to see on pages with dark background (59183)
1331         https://bugs.webkit.org/show_bug.cgi?id=59183
1332         <rdar://problem/8975367>
1333
1334         * WebCore.exp.in: adding method to allow changing style
1335         * page/FrameView.cpp:
1336         (WebCore::FrameView::recommendedScrollbarOverlayStyle): overridden to suggest a style based on CSS background color
1337         * page/FrameView.h:
1338         * platform/ScrollTypes.h: new enum to represent different overlay scrollbar styles
1339         * platform/ScrollableArea.cpp:
1340         (WebCore::ScrollableArea::recommendedScrollbarOverlayStyle): new virtual function to return a suggested overlay style
1341         * platform/ScrollableArea.h:
1342         * platform/mac/ScrollbarThemeMac.mm:
1343         (WebCore::ScrollbarThemeMac::paint):
1344         * platform/mac/WebCoreSystemInterface.h:
1345         * platform/mac/WebCoreSystemInterface.mm:
1346
1347 2011-04-22  Chris Evans  <cevans@chromium.org>
1348
1349         Reviewed by Adam Barth.
1350
1351         Upgrade CSS loads from mixed content warning (displayed) to mixed
1352         content error (ran)
1353         https://bugs.webkit.org/show_bug.cgi?id=59056
1354
1355         Test: http/tests/security/mixedContent/insecure-css-in-iframe.html
1356         Test: http/tests/security/mixedContent/insecure-css-in-main-frame.html
1357
1358         * loader/cache/CachedResourceLoader.cpp:
1359         (WebCore::CachedResourceLoader::canRequest): CSS loads are running rather than displaying content.
1360
1361 2011-04-22  Geoffrey Garen  <ggaren@apple.com>
1362
1363         Fixed an upside-down conditional in my last check-in.
1364
1365         * bindings/js/JSDOMApplicationCacheCustom.cpp:
1366         (WebCore::isObservable):
1367
1368 2011-04-22  Geoffrey Garen  <ggaren@apple.com>
1369         
1370         Rolled back in r84725 and r84728 with appcache crash fixed.
1371
1372         Reviewed by Oliver Hunt.
1373
1374         Removed a use of markDOMObjectWrapper: DOMWindow
1375         https://bugs.webkit.org/show_bug.cgi?id=59260
1376
1377         * bindings/js/JSDOMWindowCustom.cpp:
1378         (WebCore::JSDOMWindow::visitChildren): No need to mark explicitly, since
1379         we use the opaque roots system now.
1380
1381         * bindings/js/JSNavigatorCustom.cpp: Ditto.
1382
1383         * bindings/scripts/CodeGeneratorJS.pm: Added autogeneration for objects
1384         whose opaque roots are frames.
1385
1386         * css/StyleMedia.h:
1387         (WebCore::StyleMedia::frame): Added an accessor for the sake of GC.
1388
1389         * css/StyleMedia.idl:
1390         * loader/appcache/DOMApplicationCache.idl:
1391         * page/BarInfo.idl:
1392         * page/Console.idl:
1393         * page/DOMSelection.idl:
1394         * page/Geolocation.idl:
1395         * page/History.idl:
1396         * page/Location.idl:
1397         * page/Navigator.idl:
1398         * page/Screen.idl:
1399         * storage/Storage.idl: Updated to use the opaque roots system.
1400
1401 2011-04-22  Nate Chapin  <japhet@chromium.org>
1402
1403         Reviewed by Adam Barth.
1404
1405         Don't use XMLTreeViewer when script is disabled (it uses Javascript
1406         to build a prettified version of the xml document).
1407         https://bugs.webkit.org/show_bug.cgi?id=59113
1408
1409         * xml/XMLTreeViewer.cpp:
1410         (WebCore::XMLTreeViewer::transformDocumentToTreeView):
1411
1412 2011-04-22  Sheriff Bot  <webkit.review.bot@gmail.com>
1413
1414         Unreviewed, rolling out r84725 and r84728.
1415         http://trac.webkit.org/changeset/84725
1416         http://trac.webkit.org/changeset/84728
1417         https://bugs.webkit.org/show_bug.cgi?id=59270
1418
1419         It broke http/tests/appcache tests (Requested by Ossy on
1420         #webkit).
1421
1422         * bindings/js/JSDOMWindowCustom.cpp:
1423         (WebCore::JSDOMWindow::visitChildren):
1424         * bindings/js/JSNavigatorCustom.cpp:
1425         (WebCore::JSNavigator::visitChildren):
1426         * bindings/scripts/CodeGeneratorJS.pm:
1427         * css/StyleMedia.h:
1428         * css/StyleMedia.idl:
1429         * loader/appcache/DOMApplicationCache.idl:
1430         * page/BarInfo.idl:
1431         * page/Console.idl:
1432         * page/DOMSelection.idl:
1433         * page/DOMWindow.h:
1434         (WebCore::DOMWindow::optionalScreen):
1435         (WebCore::DOMWindow::optionalSelection):
1436         (WebCore::DOMWindow::optionalHistory):
1437         (WebCore::DOMWindow::optionalCrypto):
1438         (WebCore::DOMWindow::optionalLocationbar):
1439         (WebCore::DOMWindow::optionalMenubar):
1440         (WebCore::DOMWindow::optionalPersonalbar):
1441         (WebCore::DOMWindow::optionalScrollbars):
1442         (WebCore::DOMWindow::optionalStatusbar):
1443         (WebCore::DOMWindow::optionalToolbar):
1444         (WebCore::DOMWindow::optionalConsole):
1445         (WebCore::DOMWindow::optionalNavigator):
1446         (WebCore::DOMWindow::optionalLocation):
1447         (WebCore::DOMWindow::optionalMedia):
1448         (WebCore::DOMWindow::optionalSessionStorage):
1449         (WebCore::DOMWindow::optionalLocalStorage):
1450         (WebCore::DOMWindow::optionalPerformance):
1451         * page/Geolocation.idl:
1452         * page/History.idl:
1453         * page/Location.idl:
1454         * page/Navigator.h:
1455         (WebCore::Navigator::optionalGeolocation):
1456         * page/Navigator.idl:
1457         * page/Screen.idl:
1458         * storage/Storage.idl:
1459
1460 2011-04-22  Dimitri Glazkov  <dglazkov@chromium.org>
1461
1462         Reviewed by Kent Tamura.
1463
1464         Change SVG-related shadow root checks to use isSVGShadowRoot.
1465         https://bugs.webkit.org/show_bug.cgi?id=59237
1466
1467         Covered by existing tests, no behavior change.
1468
1469         * css/CSSStyleSelector.cpp:
1470         (WebCore::CSSStyleSelector::SelectorChecker::checkSelector): Use isSVGShadowRoot.
1471         * svg/SVGUseElement.cpp:
1472         (WebCore::ShadowTreeUpdateBlocker::while): Ditto.
1473         * svg/animation/SVGSMILElement.cpp:
1474         (WebCore::SVGSMILElement::insertedIntoDocument): Ditto.
1475
1476 2011-04-22  Geoffrey Garen  <ggaren@apple.com>
1477
1478         Mac build fix.
1479
1480         * page/DOMWindow.h:
1481         (WebCore::DOMWindow::optionalApplicationCache): Restored this function,
1482         which is used after all.
1483
1484 2011-04-22  Geoffrey Garen  <ggaren@apple.com>
1485
1486         Mac build fix.
1487
1488         * page/DOMWindow.h:
1489         (WebCore::DOMWindow::optionalApplicationCache): Restored this function,
1490         which is used after all.
1491
1492 2011-04-22  Geoffrey Garen  <ggaren@apple.com>
1493
1494         Reviewed by Oliver Hunt.
1495
1496         Removed a use of markDOMObjectWrapper: DOMWindow
1497         https://bugs.webkit.org/show_bug.cgi?id=59260
1498
1499         * bindings/js/JSDOMWindowCustom.cpp:
1500         (WebCore::JSDOMWindow::visitChildren): No need to mark explicitly, since
1501         we use the opaque roots system now.
1502
1503         * bindings/js/JSNavigatorCustom.cpp: Ditto.
1504
1505         * bindings/scripts/CodeGeneratorJS.pm: Added autogeneration for objects
1506         whose opaque roots are frames.
1507
1508         * css/StyleMedia.h:
1509         (WebCore::StyleMedia::frame): Added an accessor for the sake of GC.
1510
1511         * css/StyleMedia.idl:
1512         * loader/appcache/DOMApplicationCache.idl:
1513         * page/BarInfo.idl:
1514         * page/Console.idl:
1515         * page/DOMSelection.idl:
1516         * page/Geolocation.idl:
1517         * page/History.idl:
1518         * page/Location.idl:
1519         * page/Navigator.idl:
1520         * page/Screen.idl:
1521         * storage/Storage.idl: Updated to use the opaque roots system.
1522
1523 2011-04-22  Xiaomei Ji  <xji@chromium.org>
1524
1525         Reviewed by Ryosuke Niwa.
1526
1527         move caret by word in visual order returns wrong result when caret itself is at word boundary.
1528         https://bugs.webkit.org/show_bug.cgi?id=58504.
1529
1530         positionBeforeNextWord should take care that the current position is after current word.
1531         positionAfterPreviousWord should take care that the current positin is before current word.
1532
1533         * editing/visible_units.cpp:
1534         (WebCore::positionBeforeNextWord):
1535         (WebCore::positionAfterPreviousWord):
1536
1537 2011-04-19  Jer Noble  <jer.noble@apple.com>
1538
1539         Reviewed by Daniel Bates.
1540
1541         Full Screen from within an <iframe> does not cause <iframe> to resize.
1542         https://bugs.webkit.org/show_bug.cgi?id=58638
1543
1544         Tests: fullscreen/full-screen-frameset.html
1545
1546         * css/CSSStyleSelector.cpp:
1547         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Add the 
1548             -webkit-full-screen pseudo class to frame elements which contain
1549             full screen elements.
1550         * css/fullscreen.css:
1551         (iframe:-webkit-full-screen): Add iframe-specific styling rules.
1552         * dom/Document.cpp:
1553         (WebCore::Document::setContainsFullScreenElementRecursively): Added.  Walk up each
1554             successive document owner element, calling setContainsFullScreenElement() if 
1555             owner is a frame element.
1556         (WebCore::Document::fullScreenIsAllowedForElement): Use the new Element::isFrameElementBase
1557             call instead of checking the element's tag name.
1558         (WebCore::Document::webkitWillEnterFullScreenForElement): Mark any containing
1559             iframes as containing a full screen element.
1560         (WebCore::Document::webkitWillExitFullScreenForElement): Ditto.
1561         * dom/Element.h:
1562         (WebCore::Element::isFrameElementBase): Added.
1563         * html/HTMLFrameElement.h:
1564         (WebCore::HTMLFrameElement::allowFullScreen): Disable full screen from within
1565             HTMLFrameElements.
1566         * html/HTMLFrameElementBase.cpp:
1567         (WebCore::HTMLFrameElementBase::setContainsFullScreenElement): Added.
1568         * html/HTMLFrameElementBase.h:
1569         (WebCore::HTMLFrameElementBase::containsFullScreenElement): Added.
1570         (WebCore::HTMLFrameElementBase::isFrameElementBase): Added.
1571
1572 2011-04-22  Michael Saboff  <msaboff@apple.com>
1573
1574         Reviewed by Maciej Stachowiak.
1575
1576         Creating copy of ContainerNode's when inserting or removing is inefficient
1577         https://bugs.webkit.org/show_bug.cgi?id=58695
1578
1579         Eliminated node copying in willRemove() and insertedIntoDocument().
1580
1581         No new tests as this is a more efficient implementation of
1582         existing code that is covered by existing tests.
1583
1584         * dom/ContainerNode.cpp:
1585         (WebCore::ContainerNode::willRemove): Changed method to use
1586         RefPtr<> to protect against modification during removal.
1587         (WebCore::ContainerNode::insertedIntoDocument): Changed method to use
1588         RefPtr<> and two other deletion checks to protect against 
1589         modification during insertion.
1590
1591 2011-04-22  Geoffrey Garen  <ggaren@apple.com>
1592
1593         Reviewed by Sam Weinig.
1594
1595         We have an autogenerator, so use it
1596         https://bugs.webkit.org/show_bug.cgi?id=59247
1597
1598         * bindings/js/JSCSSRuleCustom.cpp:
1599         * bindings/js/JSCSSRuleListCustom.cpp:
1600         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1601         * bindings/js/JSCSSValueCustom.cpp:
1602         * bindings/js/JSCanvasRenderingContextCustom.cpp:
1603         * bindings/js/JSDOMImplementationCustom.cpp:
1604         * bindings/js/JSDOMStringMapCustom.cpp:
1605         * bindings/js/JSHTMLCollectionCustom.cpp:
1606         * bindings/js/JSNamedNodeMapCustom.cpp:
1607         * bindings/js/JSNodeCustom.h:
1608         * bindings/js/JSNodeListCustom.cpp:
1609         * bindings/js/JSStyleSheetCustom.cpp:
1610         * bindings/js/JSStyleSheetListCustom.cpp: Removed repetitive hand-written code.
1611
1612         * bindings/scripts/CodeGeneratorJS.pm: Augmented autogenerator to do the job.
1613
1614         * css/CSSRule.idl:
1615         * css/CSSRuleList.idl:
1616         * css/CSSStyleDeclaration.idl:
1617         * css/CSSValue.idl:
1618         * css/MediaList.idl:
1619         * css/StyleSheet.idl:
1620         * css/StyleSheetList.idl:
1621         * dom/DOMImplementation.idl:
1622         * dom/DOMStringMap.idl:
1623         * dom/NamedNodeMap.idl:
1624         * dom/Node.idl:
1625         * dom/NodeList.idl:
1626         * html/DOMTokenList.idl:
1627         * html/HTMLCollection.idl:
1628         * html/canvas/CanvasRenderingContext.idl: Updated attributes to plug into
1629         the autogenerator.
1630
1631 2011-04-22  Beth Dakin  <bdakin@apple.com>
1632
1633         Reviewed by Maciej Stachowiak.
1634
1635         https://bugs.webkit.org/show_bug.cgi?id=59223
1636         REGRESSION (r82185): iframe not displayed after navigation back to cached page
1637
1638         Manual test added.
1639         * manual-tests/frame-layout-on-back.html: Added.
1640         * manual-tests/resources/empty-document-goes-back.html: Added.
1641         * manual-tests/resources/simple-iframe.html: Added.
1642
1643 2011-04-22  Yael Aharon  <yael.aharon@nokia.com>
1644
1645         Reviewed by Sam Weinig.
1646
1647         HTMLFormControlElement::labels should allow custom attributes.
1648         https://bugs.webkit.org/show_bug.cgi?id=59128
1649
1650         Cache the labels list when it is created and keep using it for future
1651         labels calls.
1652
1653         Test: fast/forms/labels-custom-property.html
1654
1655         * html/HTMLFormControlElement.cpp:
1656         (WebCore::HTMLFormControlElement::labels):
1657
1658 2011-04-22  Adrienne Walker  <enne@google.com>
1659
1660         Reviewed by James Robinson.
1661
1662         [chromium] Remove minimum texture size for compositor tiling
1663         https://bugs.webkit.org/show_bug.cgi?id=59236
1664
1665         This was mistakenly committed in r83915 and causes bad filtering
1666         on very small textures.
1667
1668         Tests: compositing/images/content-image-change.html
1669
1670         * platform/graphics/chromium/LayerTilerChromium.cpp:
1671         (WebCore::LayerTilerChromium::setTileSize):
1672
1673 2011-04-22  Beth Dakin  <bdakin@apple.com>
1674
1675         Reviewed by Maciej Stachowiak.
1676
1677         https://bugs.webkit.org/show_bug.cgi?id=59223
1678         REGRESSION (r82185): iframe not displayed after navigation back to cached page
1679         -and corresponding-
1680         <rdar://problem/9323763>
1681
1682         Cache the scroll position in Document::setInPageCache() instead of 
1683         FrameView::resetScrollbarsAndClearContentsSize(), and only clear the contents size 
1684         for the mainFrame(). Still resetScrollbars() for other frames, which matches pre-
1685         r82185 code.
1686         * dom/Document.cpp:
1687         (WebCore::Document::setInPageCache):
1688         * page/FrameView.cpp:
1689         (WebCore::FrameView::resetScrollbarsAndClearContentsSize):
1690
1691 2011-04-22  Joseph Pecoraro  <joepeck@webkit.org>
1692
1693         Reviewed by Kent Tamura.
1694
1695         Let the RenderTheme decide if an input type should have a spinner
1696         https://bugs.webkit.org/show_bug.cgi?id=59246
1697
1698         Whether an input should have a spinner or not should
1699         be a UI decision made by the RenderTheme. Remove
1700         WebCore's default hasSpinButton values and defer
1701         to the RenderTheme.
1702
1703         No change in functionality, covered by existing tests.
1704
1705         * html/HTMLInputElement.cpp:
1706         (WebCore::HTMLInputElement::isRangeControl): expose isRangeControl
1707         for possible RenderTheme queries.
1708         * html/HTMLInputElement.h:
1709
1710         * rendering/RenderTextControlSingleLine.cpp:
1711         (WebCore::RenderTextControlSingleLine::createSubtreeIfNeeded):
1712         (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
1713         For both of these ask the render theme if the input should
1714         have a spinner.
1715
1716         * rendering/RenderTheme.cpp:
1717         (WebCore::RenderTheme::shouldHaveSpinButtonForInputElement):
1718         Steppable inputs (number, date, and range) but not range
1719         should have spinners. This does not change existing behavior.
1720         * rendering/RenderTheme.h:
1721
1722         * dom/InputElement.h:
1723         * html/BaseDateAndTimeInputType.cpp: remove hasSpinButton.
1724         * html/BaseDateAndTimeInputType.h: remove hasSpinButton.
1725         * html/InputType.cpp: remove hasSpinButton.
1726         * html/InputType.h: remove hasSpinButton.
1727         * html/NumberInputType.cpp: remove hasSpinButton.
1728         * html/NumberInputType.h: remove hasSpinButton.
1729
1730 2011-04-22  Joseph Pecoraro  <joepeck@webkit.org>
1731
1732         Reviewed by Kent Tamura.
1733
1734         Don't rely on hasSpinButton to check if an input type can be stepped
1735         https://bugs.webkit.org/show_bug.cgi?id=59224
1736
1737         Add isSteppable to know for certain if an input type can
1738         be stepped or not. Previously we were checking if the input
1739         has a spin control or is the range input type. These are UI
1740         details, but the step functionality does not require there
1741         to be a UI.
1742
1743         No change in behavior, covered by existing tests.
1744
1745         * html/BaseDateAndTimeInputType.cpp:
1746         (WebCore::BaseDateAndTimeInputType::isSteppable):
1747         * html/BaseDateAndTimeInputType.h:
1748         * html/HTMLInputElement.cpp:
1749         (WebCore::HTMLInputElement::isSteppable):
1750         (WebCore::HTMLInputElement::stepUpFromRenderer): remove the
1751         check for a spinner and range control and instead ASSERT
1752         that the type is steppable.
1753         * html/HTMLInputElement.h:
1754         * html/InputType.cpp:
1755         (WebCore::InputType::isSteppable):
1756         * html/InputType.h:
1757         * html/NumberInputType.cpp:
1758         (WebCore::NumberInputType::isSteppable):
1759         * html/NumberInputType.h:
1760         * html/RangeInputType.cpp:
1761         (WebCore::RangeInputType::isSteppable):
1762         * html/RangeInputType.h:
1763
1764 2011-04-22  Adam Barth  <abarth@webkit.org>
1765
1766         Reviewed by Eric Seidel.
1767
1768         CSP frame-src is missing
1769         https://bugs.webkit.org/show_bug.cgi?id=58643
1770
1771         In this patch, I've audited all the callers to
1772         SecurityOrigin::canDisplay to make sure they all the appropriate
1773         Content-Security-Policy method as well.  I'm not sure how to test all
1774         these cases, but making this changes fixed the frame-src test.
1775
1776         * loader/SubframeLoader.cpp:
1777         (WebCore::SubframeLoader::loadMediaPlayerProxyPlugin):
1778         (WebCore::SubframeLoader::createJavaAppletWidget):
1779         (WebCore::SubframeLoader::loadSubframe):
1780         (WebCore::SubframeLoader::loadPlugin):
1781         * loader/SubresourceLoader.cpp:
1782         (WebCore::SubresourceLoader::create):
1783         * loader/cache/CachedResourceLoader.cpp:
1784         (WebCore::CachedResourceLoader::canRequest):
1785         (WebCore::CachedResourceLoader::requestResource):
1786             - While I was understanding this code, I fixed the FIXME here.
1787         * loader/cache/CachedResourceLoader.h:
1788
1789 2011-04-22  Adrienne Walker  <enne@google.com>
1790
1791         Reviewed by Simon Fraser.
1792
1793         Clear shared graphics context when destroying CanvasRenderingContext2D.
1794         https://bugs.webkit.org/show_bug.cgi?id=59212
1795
1796         * html/canvas/CanvasRenderingContext2D.cpp:
1797         (WebCore::CanvasRenderingContext2D::~CanvasRenderingContext2D):
1798
1799 2011-04-22  Levi Weintraub  <leviw@chromium.org>
1800
1801         Reviewed by Ryosuke Niwa.
1802
1803         End/Home keys do not work in a contentEditable element
1804         https://bugs.webkit.org/show_bug.cgi?id=50564
1805
1806         Changing logical[Start/End]OfLine to return a valid VisiblePosition for for editable contexts that are
1807         inline and share a line with non-editable content.
1808
1809         Test: editing/selection/modify-by-lineboundary-in-inline-editable-contexts.html
1810
1811         * editing/visible_units.cpp:
1812         (WebCore::logicalStartOfLine):
1813         (WebCore::logicalEndOfLine):
1814
1815 2011-04-22  Dimitri Glazkov  <dglazkov@chromium.org>
1816
1817         Reviewed by Kent Tamura.
1818
1819         Make showTree/showTreeForThis aware of the shadow DOM
1820         https://bugs.webkit.org/show_bug.cgi?id=52965
1821
1822         No new tests, because this code is only compiled in DEBUG.
1823
1824         * dom/Node.cpp:
1825         (WebCore::traverseTreeAndMark): Moved tree traversal logic here, adding
1826             recursive sub-traversal of the shadow tree.
1827         (WebCore::Node::showTreeAndMark): Changed to use the new tree traversal function.
1828
1829 2011-04-22  Sam Weinig  <sam@webkit.org>
1830
1831         Reviewed by Gavin Barraclough and Oliver Hunt.
1832
1833         Arrays should participate in global object forwarding fun
1834         https://bugs.webkit.org/show_bug.cgi?id=59215
1835
1836         Change callers of constructArray to use the new variant that takes
1837         a global object.
1838
1839         * bindings/js/JSClipboardCustom.cpp:
1840         (WebCore::JSClipboard::types):
1841         * bindings/js/JSConsoleCustom.cpp:
1842         (WebCore::JSConsole::profiles):
1843         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
1844         (WebCore::JSJavaScriptCallFrame::scopeChain):
1845         * bindings/js/JSMessageEventCustom.cpp:
1846         (WebCore::JSMessageEvent::ports):
1847         * bindings/js/JSScriptProfileNodeCustom.cpp:
1848         (WebCore::JSScriptProfileNode::children):
1849         * bindings/js/JSWebGLRenderingContextCustom.cpp:
1850         (WebCore::toJS):
1851         (WebCore::JSWebGLRenderingContext::getAttachedShaders):
1852         (WebCore::JSWebGLRenderingContext::getSupportedExtensions):
1853
1854 2011-04-22  Csaba Osztrogon√°c  <ossy@webkit.org>
1855
1856         [Qt] Unreviewed typo fix after r84522.
1857
1858         * WebCore.pro:
1859
1860 2011-04-22  Daniel Bates  <dbates@rim.com>
1861
1862         Fix misspelled word in comment; tagets => targets.
1863
1864         * page/EventHandler.cpp:
1865         (WebCore::EventHandler::handleTouchEvent):
1866
1867 2011-04-21  Geoffrey Garen  <ggaren@apple.com>
1868
1869         Reviewed by Oliver Hunt.
1870
1871         Removed a use of markDOMObjectWrapper: Element and Document
1872         https://bugs.webkit.org/show_bug.cgi?id=59178
1873
1874         * GNUmakefile.list.am:
1875         * UseJSC.cmake:
1876         * WebCore.gypi:
1877         * WebCore.pro:
1878         * WebCore.vcproj/WebCore.vcproj:
1879         * WebCore.xcodeproj/project.pbxproj:
1880         * bindings/js/JSBindingsAllInOne.cpp: Build!
1881
1882         * bindings/js/JSDOMImplementationCustom.cpp:
1883         (WebCore::JSDOMImplementationOwner::isReachableFromOpaqueRoots):
1884         (WebCore::JSDOMImplementationOwner::finalize):
1885         (WebCore::wrapperOwner):
1886         (WebCore::wrapperContext):
1887         (WebCore::toJS): Use the opaque roots system for DOMImplementation. Also,
1888         DOMImplementation does not need to keep its document wrapper alive, since
1889         there's no DOM API for getting a DOMImplementation's document.
1890
1891         * bindings/js/JSDOMStringMapCustom.cpp:
1892         (WebCore::JSDOMStringMapOwner::isReachableFromOpaqueRoots):
1893         (WebCore::JSDOMStringMapOwner::finalize):
1894         (WebCore::wrapperOwner):
1895         (WebCore::wrapperContext):
1896         (WebCore::toJS): Use the opaque roots system for DOMStringMap.
1897
1898         * bindings/js/JSDOMTokenListCustom.cpp: Added.
1899         (WebCore::JSDOMTokenListOwner::isReachableFromOpaqueRoots):
1900         (WebCore::JSDOMTokenListOwner::finalize):
1901         (WebCore::wrapperOwner):
1902         (WebCore::wrapperContext):
1903         (WebCore::toJS): Use the opaque roots system for DOMTokenList.
1904
1905         * bindings/js/JSDocumentCustom.cpp:
1906         (WebCore::JSDocument::visitChildren):
1907         * bindings/js/JSElementCustom.cpp: No more need for explicit marking.
1908
1909         * bindings/scripts/CodeGeneratorV8.pm: Boo on whoever made this design decision.
1910
1911         * dom/DOMImplementation.cpp:
1912         (WebCore::DOMImplementation::DOMImplementation):
1913         (WebCore::DOMImplementation::createDocument):
1914         (WebCore::DOMImplementation::createHTMLDocument):
1915         * dom/DOMImplementation.h:
1916         (WebCore::DOMImplementation::create):
1917         (WebCore::DOMImplementation::ref):
1918         (WebCore::DOMImplementation::deref):
1919         (WebCore::DOMImplementation::document): Fixed the DOMImplementation
1920         ownership model to match other satellite objects in the DOM. This was
1921         necessary to fix some crashes due to incorrect reference counting.
1922
1923         * dom/DOMImplementation.idl:
1924         * dom/DOMStringMap.idl:
1925         * dom/Document.cpp:
1926         (WebCore::Document::~Document):
1927         * dom/Document.h:
1928         * dom/Element.cpp:
1929         * dom/Element.h:
1930         * dom/Element.idl:
1931         * html/DOMTokenList.idl: Updated to match changes above.
1932
1933 2011-04-22  Simon Fraser  <simon.fraser@apple.com>
1934
1935         Reviewed by Dan Bernstein.
1936
1937         Rounded corners don't looks smooth when background-image is a gradient
1938         https://bugs.webkit.org/show_bug.cgi?id=59213
1939         
1940         Add the "shrink background" behavior to the slow background
1941         drawing code path.
1942
1943         Test: fast/backgrounds/gradient-background-leakage.html
1944
1945         * rendering/RenderBoxModelObject.cpp:
1946         (WebCore::backgroundRectAdjustedForBleedAvoidance):
1947         Utility function that returns a shrunk border rect based
1948         on the context scale.
1949         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1950         Use backgroundRectAdjustedForBleedAvoidance() in both the fast
1951         and slow paths.
1952
1953 2011-04-22  Xiaomei Ji  <xji@chromium.org>
1954
1955         Reviewed by David Hyatt.
1956
1957         Local caret rectangle calculation should be relative to its containing block.
1958         https://bugs.webkit.org/show_bug.cgi?id=49508.
1959
1960         InlineBox and caret rectangle are positioned relative to its containing block.
1961         So its left and right edge value should be relative to its containing block as well. 
1962
1963         Test: fast/forms/cursor-at-editable-content-boundary.html
1964
1965         * rendering/RenderText.cpp:
1966         (WebCore::RenderText::localCaretRect):
1967
1968 2011-04-22  Levi Weintraub  <leviw@chromium.org>
1969
1970         Reviewed by Darin Fisher.
1971
1972         REGRESSION: left property broken with position:fixed elements in RTL documents
1973         https://bugs.webkit.org/show_bug.cgi?id=59204
1974         http://code.google.com/p/chromium/issues/detail?id=80216
1975
1976         Test: fast/block/positioning/rtl-fixed-positioning.html
1977               fast/block/positioning/vertical-rl/fixed-positioning.html
1978
1979         Returning the proper scroll offsets for fixed position content in RTL documents.
1980         We regressed to X and Y offsets not updating while scrolling when we clamped to zero,
1981         but RTL documents scroll in negative space.
1982
1983         * page/FrameView.cpp:
1984         (WebCore::FrameView::scrollXForFixedPosition): Properly handling RTL documents where
1985         the scroll origin and offsets are negative.
1986         (WebCore::FrameView::scrollYForFixedPosition): Properly handling vertical writing-
1987         mode RTL documents, like above.
1988         * platform/ScrollView.h:
1989         (WebCore::ScrollView::scrollOrigin): Changing this accessor to const.
1990
1991 2011-04-22  Justin Schuh  <jschuh@chromium.org>
1992
1993         Reviewed by Eric Seidel.
1994
1995         Should assert on invalid type in FEComponentTransfer::apply
1996         https://bugs.webkit.org/show_bug.cgi?id=57959
1997
1998         No functional change. No new tests needed.
1999
2000         * platform/graphics/filters/FEComponentTransfer.cpp:
2001         (WebCore::FEComponentTransfer::apply):
2002
2003 2011-04-22  MORITA Hajime  <morrita@google.com>
2004
2005         Unreviewed crash fix.
2006
2007         * html/HTMLDetailsElement.cpp:
2008         (WebCore::DetailsSummaryElement::shouldInclude):
2009
2010 2011-04-22  Dan Bernstein  <mitz@apple.com>
2011
2012         Reviewed by Sam Weinig.
2013
2014         Exclude scrollbars from the dirty rect passed to the document
2015         https://bugs.webkit.org/show_bug.cgi?id=59206
2016
2017         No test added because functionality is unchanged.
2018
2019         * platform/ScrollView.cpp:
2020         (WebCore::ScrollView::paint): Compute a clip rectangle (analogous to the frame of the clip view
2021         in an NSScrollView) by subtracting non-overlay scrollbars, and intersect the document dirty rect
2022         with it. If the result is empty, avoid calling paintContents().
2023
2024 2011-04-22  Jer Noble  <jer.noble@apple.com>
2025
2026         Reviewed by Maciej Stachowiak.
2027
2028         Disable MediaPlayerPrivateAVFoundation when using old full screen mode.
2029         https://bugs.webkit.org/show_bug.cgi?id=59147
2030
2031         Add a new isAVFoundationEnabled setting and check it before adding 
2032         MediaPlayerPrivateAVFoundationObjC to the media engine registry.
2033
2034         * WebCore.exp.in:
2035         * page/Settings.cpp:
2036         * page/Settings.h:
2037         (WebCore::Settings::setAVFoundationEnabled): Added.
2038         (WebCore::Settings::isAVFoundationEnabled): Added.
2039         * platform/graphics/MediaPlayer.cpp:
2040         (WebCore::installedMediaEngines): Check the settings added above.
2041
2042 2011-04-22  Sam Weinig  <sam@webkit.org>
2043
2044         Reviewed by Gavin Barraclough.
2045
2046         Remove remaining uses of deprecated version of toJS
2047         https://bugs.webkit.org/show_bug.cgi?id=59170
2048
2049         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
2050         (WebCore::toJS):
2051         (WebCore::JSCanvasRenderingContext2D::strokeStyle):
2052         (WebCore::JSCanvasRenderingContext2D::fillStyle):
2053         (WebCore::JSCanvasRenderingContext2D::createPattern):
2054         * bindings/js/JSConsoleCustom.cpp:
2055         (WebCore::JSConsole::profiles):
2056         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
2057         (WebCore::JSSQLStatementErrorCallback::handleEvent):
2058         * bindings/js/JSDOMBinding.h:
2059         * bindings/js/JSDOMMimeTypeArrayCustom.cpp:
2060         (WebCore::JSDOMMimeTypeArray::nameGetter):
2061         * bindings/js/JSDOMPluginArrayCustom.cpp:
2062         (WebCore::JSDOMPluginArray::nameGetter):
2063         * bindings/js/JSDOMPluginCustom.cpp:
2064         (WebCore::JSDOMPlugin::nameGetter):
2065         * bindings/js/JSDOMWindowCustom.cpp:
2066         (WebCore::namedItemGetter):
2067         (WebCore::JSDOMWindow::event):
2068         * bindings/js/JSEventTarget.cpp:
2069         (WebCore::toJS):
2070         * bindings/js/JSInjectedScriptHostCustom.cpp:
2071         Propagate stored global object down access chain.
2072
2073         (WebCore::InjectedScriptHost::nodeAsScriptValue):
2074         Replace use of deprecated toJS overload with explicit call to deprecatedGlobalObjectForPrototype.
2075
2076         (WebCore::JSInjectedScriptHost::currentCallFrame):
2077         (WebCore::JSInjectedScriptHost::inspectedNode):
2078         * bindings/js/JSNamedNodeMapCustom.cpp:
2079         (WebCore::JSNamedNodeMap::nameGetter):
2080         * bindings/js/JSNodeListCustom.cpp:
2081         (WebCore::callNodeList):
2082         (WebCore::JSNodeList::nameGetter):
2083         * bindings/js/JSScriptProfileNodeCustom.cpp:
2084         (WebCore::JSScriptProfileNode::children):
2085         * bindings/js/JSStyleSheetListCustom.cpp:
2086         (WebCore::JSStyleSheetList::nameGetter):
2087         * bindings/js/JSXSLTProcessorCustom.cpp:
2088         (WebCore::JSXSLTProcessor::transformToFragment):
2089         (WebCore::JSXSLTProcessor::transformToDocument):
2090         * bindings/scripts/CodeGeneratorJS.pm:
2091         Propagate stored global object down access chain.
2092
2093         * css/MediaQueryListListener.cpp:
2094         (WebCore::MediaQueryListListener::queryChanged):
2095         Replace use of deprecated toJS overload with explicit call to deprecatedGlobalObjectForPrototype,
2096         we will want refactor this to match other callbacks so we can remove this.
2097
2098 2011-04-22  Naoki Takano  <takano.naoki@gmail.com>
2099
2100         Reviewed by Eric Seidel.
2101
2102         [Chromium]Mac UI polish to add left/right padding space for autofill popup window.
2103         https://bugs.webkit.org/show_bug.cgi?id=58960
2104         http://code.google.com/p/chromium/issues/detail?id=51077
2105
2106         No new test because Chromium Autofill popup window doesn't have any test framework.
2107         This assumes only AutofillPopupMenuClient gives TexFieldPart appearance.
2108         Only if Autofill popup window has right/left padding.
2109         The code should be removed after Autofill popup window logic is separated from WebKit to Chromium.
2110
2111         * rendering/RenderThemeChromiumMac.h: Add popupInternalPaddingRight() and popupInternalPaddingLeft().
2112         * rendering/RenderThemeChromiumMac.mm:
2113         (WebCore::RenderThemeChromiumMac::popupInternalPaddingLeft): Return padding size only if TextFieldPart is specified.
2114         (WebCore::RenderThemeChromiumMac::popupInternalPaddingRight): Return padding size only if TextFieldPart is specified.
2115
2116 2011-04-21  Adam Roben  <aroben@apple.com>
2117
2118         Add code to enumerate all the functions imported by a particular Windows binary
2119
2120         PEImage is where all the logic starts. It represents a single Portable Executable (PE)
2121         binary. The various enumerator classes are used in conjunction with PEImage to enumerate the
2122         modules and functions imported by that image.
2123
2124         I couldn't figure out how to write a test for this. :-(
2125
2126         Part of <http://webkit.org/b/51063> <rdar://problem/8769281> REGRESSION (WebKit2): No
2127         context menu appears when right-clicking on windowless Flash plugin
2128
2129         Reviewed by Sam Weinig, and given a good once-over by Jeff Miller.
2130
2131         * WebCore.vcproj/WebCore.vcproj: Added the new files.
2132
2133         * platform/win/PEImage.cpp: Added.
2134         (WebCore::PEImage::PEImage): Checks that the module contains the expected magic numbers,
2135         then initializes m_ntHeaders using the module.
2136         (WebCore::PEImage::convertRVAToAddress): Converts a relative virtual address (RVA) to a
2137         non-relative address, which can then be dereferenced. (The PE format uses RVAs in lots of
2138         places.)
2139         (WebCore::PEImage::dataDirectoryEntryAddress): Returns the address of the data associated
2140         with the given entry in the image's DataDirectory.
2141
2142         * platform/win/PEImage.h: Added.
2143         (WebCore::PEImage::isValid): We're a valid image if the validation code in our constructor
2144         succeeded, in which case m_ntHeaders will be set.
2145
2146         * platform/win/ImportedFunctionsEnumerator.cpp: Added. This class enumerates all the
2147         functions imported by the image from a single module by walking the Import Name Table (INT)
2148         and Import Address Table (IAT).
2149         (WebCore::ImportedFunctionsEnumerator::ImportedFunctionsEnumerator): Initialize our members.
2150         (WebCore::ImportedFunctionsEnumerator::isAtEnd): The INT and IAT are both 0-terminated
2151         arrays.
2152         (WebCore::ImportedFunctionsEnumerator::next): Step to the next entries in the INT and IAT.
2153         (WebCore::ImportedFunctionsEnumerator::currentFunctionName): Gets the address of the
2154         function's name, if possible, using the INT.
2155         (WebCore::ImportedFunctionsEnumerator::addressOfCurrentFunctionPointer): Returns the address
2156         of the function pointer for the current function. This function pointer is used whenever
2157         code in m_image calls the current function. (A future patch will take advantage of this by
2158         overwriting this function pointer with another, thereby redirecting calls to that function.)
2159
2160         * platform/win/ImportedFunctionsEnumerator.h: Added.
2161
2162         * platform/win/ImportedModulesEnumeratorBase.h: Added. This base class is used by
2163         ImportedModulesEnumerator and DelayLoadedModulesEnumerator, and allows code to be written
2164         that works with either one.
2165
2166         * platform/win/ImportedModulesEnumerator.cpp: Added. This class enumerates all the
2167         non-delay-loaded modules imported by the image by walking the image's import array.
2168         (WebCore::ImportedModulesEnumerator::ImportedModulesEnumerator): Module import information
2169         is stored in the IMAGE_DIRECTORY_ENTRY_IMPORT entry of the image's DataDirectory.
2170         (WebCore::ImportedModulesEnumerator::isAtEnd): The import array is 0-terminated.
2171         (WebCore::ImportedModulesEnumerator::next): Steps along the import array.
2172         (WebCore::ImportedModulesEnumerator::currentModuleName): Gets the address of the module's
2173         name.
2174         (WebCore::ImportedModulesEnumerator::functionsEnumerator): Get's the addresses of the INT
2175         and IAT for this module and wraps them in an ImportedFunctionsEnumerator.
2176
2177         * platform/win/ImportedModulesEnumerator.h: Added.
2178
2179         * platform/win/DelayLoadedModulesEnumerator.cpp: Added. This class enumerates all the
2180         delay-loaded modules that are imported by the given PEImage by walking the image's
2181         ImageDelayDescr array.
2182         (WebCore::DelayLoadedModulesEnumerator::DelayLoadedModulesEnumerator): Delay-load
2183         information is stored in the IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT entry of the image's
2184         DataDirectory.
2185         (WebCore::DelayLoadedModulesEnumerator::isAtEnd): The delay-loaded modules array is
2186         0-terminated.
2187         (WebCore::DelayLoadedModulesEnumerator::next): Steps along the delay-loaded modules array.
2188         (WebCore::DelayLoadedModulesEnumerator::currentModuleName): Gets the address of the module's
2189         name out of the descriptor.
2190         (WebCore::DelayLoadedModulesEnumerator::functionsEnumerator): Gets the INT and IAT for the
2191         current module out of the descriptor and makes an ImportedFunctionsEnumerator from them.
2192         (WebCore::DelayLoadedModulesEnumerator::convertPotentialRVAToAddress): Pre-VC7.0 images
2193         stored non-relative addresses in the ImageDelayDescr structures, while VC7.0 and later
2194         images store RVAs. This function abstracts away the difference.
2195
2196         * platform/win/DelayLoadedModulesEnumerator.h: Added.
2197
2198 2011-04-21  Adam Roben  <aroben@apple.com>
2199
2200         Add a shared do-nothing window class that anyone can use
2201
2202         Fixes <http://webkit.org/b/59102> WebKit has too many dummy window classes
2203
2204         Reviewed by Anders Carlsson.
2205
2206         * WebCore.vcproj/WebCore.vcproj: Added DefWndProcWindowClass.{cpp,h}. Moved Arena.cpp out of
2207         platform/win and into platform. Let VS reorder other files.
2208
2209         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
2210         (WebCore::CACFLayerTreeHost::acceleratedCompositingAvailable): Changed to use the shared
2211         dummy window class instead of creating our own.
2212
2213         * platform/win/DefWndProcWindowClass.cpp: Added.
2214         (WebCore::registerClass): Register it!
2215         (WebCore::defWndProcWindowClassName): Register it and return it!
2216
2217         * platform/win/DefWndProcWindowClass.h: Added.
2218
2219 2011-04-21  MORITA Hajime  <morrita@google.com>
2220
2221         Reviewed by Dimitri Glazkov.
2222         
2223         Content of <details> should be forwarded through the shadow DOM
2224         https://bugs.webkit.org/show_bug.cgi?id=59055
2225
2226         - Made ShadowContentElement abstract and added shouldInclude() pure virtual method.
2227         - Added SummaryContentElement, DetailsContentElement, DetailsSummaryElement as
2228           subclasses of ShadowContentElement.
2229         - Gave two shadow children for HTMLDetailsElement. One is DetailsContentElement, that
2230           handles non-summary contents of <details>. Another is SummaryContentElement, that
2231           handles the main summary element.
2232         - Removed most of RenderDetails custom layout mechanism, which is replaced by
2233           ShadowContentElement subclasses.
2234
2235         Tests: fast/html/details-add-child-1.html
2236                fast/html/details-add-child-2.html
2237                fast/html/details-remove-child-1.html
2238                fast/html/details-remove-child-2.html
2239
2240         * dom/ShadowRoot.cpp:
2241         (WebCore::ShadowRoot::contentContainerFor):
2242         (WebCore::ShadowRoot::hostChildrenChanged):
2243         (WebCore::ShadowRoot::hasContentElement):
2244         * dom/ShadowRoot.h:
2245         * html/HTMLDetailsElement.cpp:
2246         (WebCore::DetailsContentElement::DetailsContentElement):
2247         (WebCore::DetailsContentElement::create):
2248         (WebCore::DetailsContentElement::shouldInclude):
2249         (WebCore::DetailsSummaryElement::DetailsSummaryElement):
2250         (WebCore::DetailsSummaryElement::create):
2251         (WebCore::DetailsSummaryElement::shouldInclude):
2252         (WebCore::HTMLDetailsElement::create):
2253         (WebCore::HTMLDetailsElement::HTMLDetailsElement):
2254         (WebCore::HTMLDetailsElement::ensureShadowSubtreeOf):
2255         (WebCore::findSummaryFor):
2256         (WebCore::HTMLDetailsElement::ensureMainSummary):
2257         (WebCore::HTMLDetailsElement::refreshMainSummary):
2258         (WebCore::HTMLDetailsElement::createShadowSubtree):
2259         * html/HTMLDetailsElement.h:
2260         * html/HTMLSummaryElement.cpp:
2261         (WebCore::SummaryContentElement::SummaryContentElement):
2262         (WebCore::SummaryContentElement::shouldInclude):
2263         (WebCore::SummaryContentElement::create):
2264         (WebCore::HTMLSummaryElement::createShadowSubtree):
2265         * html/shadow/ShadowContentElement.h:
2266         * rendering/RenderDetails.cpp:
2267         (WebCore::RenderDetails::RenderDetails):
2268         (WebCore::RenderDetails::addChild):
2269         * rendering/RenderDetails.h:
2270         * rendering/RenderSummary.cpp:
2271         * rendering/RenderSummary.h:
2272
2273 2011-04-21  Simon Fraser  <simon.fraser@apple.com>
2274
2275         Reviewed by Dan Bernstein.
2276
2277         Extra GraphicsContext::save() in InlineTextBox::paintDecoration()
2278         https://bugs.webkit.org/show_bug.cgi?id=59109
2279         
2280         Remove an extraneous GraphicsContext::save() in InlineTextBox::paintDecoration().
2281         
2282         Add an assertion that fires when a GraphicsContext() is destroyed with a non-
2283         empty state stack. Fix canvas to avoid this assertion, since bad content might
2284         trigger it.
2285         
2286         Also add an assertion that fires for mismatched begin/endTransparencyLayers.
2287
2288         Test: fast/text/multiple-text-shadow-alpha.html
2289
2290         * html/HTMLCanvasElement.cpp:
2291         (WebCore::HTMLCanvasElement::~HTMLCanvasElement):
2292         Make sure that the CanvasRenderingContext goes away before the ImageBuffer,
2293         so that CanvasRenderingContext2D has a chance to unwind the state stack in
2294         the ImageBuffer's GraphicsContext.
2295         
2296         * html/canvas/CanvasRenderingContext2D.cpp:
2297         (WebCore::CanvasRenderingContext2D::~CanvasRenderingContext2D):
2298         Balance unmatched state saves in the canvas context.
2299         
2300         * platform/graphics/GraphicsContext.cpp:
2301         (WebCore::GraphicsContext::~GraphicsContext):
2302         Assert that the stack is empty.
2303         
2304         * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
2305         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
2306         (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
2307         (WebCore::GraphicsContextPlatformPrivate::beginTransparencyLayer):
2308         (WebCore::GraphicsContextPlatformPrivate::endTransparencyLayer):
2309         Changes to allow for asserting for unmatched transparency layer begin/ends.
2310         
2311         * rendering/InlineTextBox.cpp:
2312         (WebCore::InlineTextBox::paintDecoration):
2313         Remove an unbalanced save().
2314
2315 2011-04-22  Pavel Feldman  <pfeldman@google.com>
2316
2317         Reviewed by Yury Semikhatsky.
2318
2319         Web Inspector: add Save As context menu item to the TextViewer.
2320         https://bugs.webkit.org/show_bug.cgi?id=59196
2321
2322         * inspector/front-end/ResourceView.js:
2323         (WebInspector.ResourceSourceFrame.prototype.requestContent):
2324         (WebInspector.ResourceSourceFrame.prototype.suggestedFileName):
2325         (WebInspector.RevisionSourceFrame.prototype.requestContent):
2326         (WebInspector.RevisionSourceFrame.prototype.suggestedFileName):
2327         * inspector/front-end/ScriptsPanel.js:
2328         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
2329         (WebInspector.SourceFrameDelegateForScriptsPanel):
2330         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.formatSourceFilesToggled):
2331         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.suggestedFileName):
2332         * inspector/front-end/SourceFrame.js:
2333         (WebInspector.SourceFrame.prototype._initializeTextViewer):
2334         (WebInspector.SourceFrame.prototype.populateTextAreaContextMenu):
2335         (WebInspector.SourceFrame.prototype.suggestedFileName):
2336         (WebInspector.SourceFrameDelegate.prototype.formatSourceFilesToggled):
2337         (WebInspector.SourceFrameDelegate.prototype.suggestedFileName):
2338         * inspector/front-end/TextViewer.js:
2339         (WebInspector.TextViewer.prototype._contextMenu):
2340         (WebInspector.TextViewerDelegate.prototype.cancelEditing):
2341         (WebInspector.TextViewerDelegate.prototype.populateLineGutterContextMenu):
2342         (WebInspector.TextViewerDelegate.prototype.populateTextAreaContextMenu):
2343         (WebInspector.TextViewerDelegate.prototype.suggestedFileName):
2344
2345 2011-04-22  Mikhail Naganov  <mnaganov@chromium.org>
2346
2347         Reviewed by Pavel Feldman.
2348
2349         Web Inspector: [Chromium] Move detailed heap snapshots storage and processing into workers.
2350         https://bugs.webkit.org/show_bug.cgi?id=59094
2351
2352         * WebCore.gypi:
2353         * WebCore.vcproj/WebCore.vcproj:
2354         * gyp/streamline-inspector-source.sh:
2355         * inspector/front-end/DetailedHeapshotGridNodes.js:
2356         (WebInspector.HeapSnapshotGridNode.prototype.dispose):
2357         (WebInspector.HeapSnapshotObjectNode.prototype._createProvider):
2358         (WebInspector.HeapSnapshotInstanceNode.prototype._createProvider):
2359         (WebInspector.HeapSnapshotConstructorNode.prototype._createNodesProvider):
2360         (WebInspector.HeapSnapshotIteratorsTuple.prototype.dispose):
2361         (WebInspector.HeapSnapshotDiffNode.prototype.calculateDiff.diffCalculated):
2362         (WebInspector.HeapSnapshotDiffNode.prototype._createNodesProvider.createProvider):
2363         (WebInspector.HeapSnapshotDiffNode.prototype._createNodesProvider):
2364         (WebInspector.HeapSnapshotDominatorObjectNode.prototype._createProvider):
2365         (MixInSnapshotNodeFunctions):
2366         * inspector/front-end/DetailedHeapshotView.js:
2367         (WebInspector.HeapSnapshotSortableDataGrid.prototype.dispose):
2368         (WebInspector.HeapSnapshotSortableDataGrid.prototype.resetSortingCache):
2369         (WebInspector.HeapSnapshotDiffDataGrid.prototype.setBaseDataSource):
2370         (WebInspector.HeapSnapshotRetainingPathsList.prototype.dispose):
2371         (WebInspector.HeapSnapshotRetainingPathsList.prototype._resetPaths):
2372         (WebInspector.HeapSnapshotRetainingPathsList.prototype.setDataSource):
2373         (WebInspector.HeapSnapshotRetainingPathsList.prototype.showNext):
2374         (WebInspector.HeapSnapshotRetainingPathsList.prototype.searchCancelled):
2375         (WebInspector.HeapSnapshotRetainingPathsList.prototype._setRootChildrenForFinder):
2376         (WebInspector.DetailedHeapshotView.prototype.dispose):
2377         (WebInspector.DetailedHeapshotView.prototype.get profileWrapper):
2378         (WebInspector.DetailedHeapshotView.prototype.get baseProfileWrapper):
2379         * inspector/front-end/HeapSnapshot.js:
2380         (WebInspector.HeapSnapshotLoader):
2381         (WebInspector.HeapSnapshotLoader.prototype.finishLoading):
2382         (WebInspector.HeapSnapshotLoader.prototype.pushJSONChunk):
2383         (WebInspector.HeapSnapshot.prototype.pushBaseIds):
2384         (WebInspector.HeapSnapshot.prototype.createDiff):
2385         (WebInspector.HeapSnapshot.prototype._parseFilter):
2386         (WebInspector.HeapSnapshot.prototype.createEdgesProvider):
2387         (WebInspector.HeapSnapshot.prototype.createNodesProvider):
2388         (WebInspector.HeapSnapshot.prototype.createPathFinder):
2389         (WebInspector.HeapSnapshot.prototype.updateStaticData):
2390         (WebInspector.HeapSnapshotPathFinder):
2391         (WebInspector.HeapSnapshotPathFinder.prototype.updateRoots):
2392         (WebInspector.HeapSnapshotPathFinder.prototype._reset):
2393         * inspector/front-end/HeapSnapshotProxy.js:
2394         (WebInspector.HeapSnapshotRealWorker):
2395         (WebInspector.HeapSnapshotRealWorker.prototype._messageReceived):
2396         (WebInspector.HeapSnapshotRealWorker.prototype.postMessage):
2397         (WebInspector.HeapSnapshotRealWorker.prototype.terminate):
2398         (WebInspector.HeapSnapshotFakeWorker):
2399         (WebInspector.HeapSnapshotFakeWorker.prototype.postMessage):
2400         (WebInspector.HeapSnapshotFakeWorker.prototype.terminate):
2401         (WebInspector.HeapSnapshotFakeWorker.prototype._postMessageFromWorker):
2402         (WebInspector.HeapSnapshotWorker):
2403         (WebInspector.HeapSnapshotWorker.prototype.createObject):
2404         (WebInspector.HeapSnapshotWorker.prototype.dispose):
2405         (WebInspector.HeapSnapshotWorker.prototype.disposeObject):
2406         (WebInspector.HeapSnapshotWorker.prototype.callGetter):
2407         (WebInspector.HeapSnapshotWorker.prototype.callFactoryMethod.wrapCallback):
2408         (WebInspector.HeapSnapshotWorker.prototype.callFactoryMethod):
2409         (WebInspector.HeapSnapshotWorker.prototype.callMethod):
2410         (WebInspector.HeapSnapshotWorker.prototype._findFunction):
2411         (WebInspector.HeapSnapshotWorker.prototype._messageReceived):
2412         (WebInspector.HeapSnapshotWorker.prototype._postMessage):
2413         (WebInspector.HeapSnapshotProxyObject):
2414         (WebInspector.HeapSnapshotProxyObject.prototype._callWorker):
2415         (WebInspector.HeapSnapshotProxyObject.prototype.dispose):
2416         (WebInspector.HeapSnapshotProxyObject.prototype.disposeWorker):
2417         (WebInspector.HeapSnapshotProxyObject.prototype.callFactoryMethod):
2418         (WebInspector.HeapSnapshotProxyObject.prototype.callGetter):
2419         (WebInspector.HeapSnapshotProxyObject.prototype.callMethod):
2420         (WebInspector.HeapSnapshotLoaderProxy):
2421         (WebInspector.HeapSnapshotLoaderProxy.prototype.finishLoading.callLoadCallbacks):
2422         (WebInspector.HeapSnapshotLoaderProxy.prototype.finishLoading.updateStaticData):
2423         (WebInspector.HeapSnapshotLoaderProxy.prototype.finishLoading):
2424         (WebInspector.HeapSnapshotLoaderProxy.prototype.get loaded):
2425         (WebInspector.HeapSnapshotLoaderProxy.prototype.startLoading):
2426         (WebInspector.HeapSnapshotLoaderProxy.prototype.pushJSONChunk):
2427         (WebInspector.HeapSnapshotProxy):
2428         (WebInspector.HeapSnapshotProxy.prototype.aggregates):
2429         (WebInspector.HeapSnapshotProxy.prototype.createDiff):
2430         (WebInspector.HeapSnapshotProxy.prototype.createEdgesProvider):
2431         (WebInspector.HeapSnapshotProxy.prototype.createNodesProvider):
2432         (WebInspector.HeapSnapshotProxy.prototype.createPathFinder):
2433         (WebInspector.HeapSnapshotProxy.prototype.dispose):
2434         (WebInspector.HeapSnapshotProxy.prototype.finishLoading):
2435         (WebInspector.HeapSnapshotProxy.prototype.get loaded):
2436         (WebInspector.HeapSnapshotProxy.prototype.get nodeCount):
2437         (WebInspector.HeapSnapshotProxy.prototype.nodeFieldValuesByIndex):
2438         (WebInspector.HeapSnapshotProxy.prototype.pushBaseIds):
2439         (WebInspector.HeapSnapshotProxy.prototype.get rootNodeIndex):
2440         (WebInspector.HeapSnapshotProxy.prototype.updateStaticData):
2441         (WebInspector.HeapSnapshotProxy.prototype.startLoading):
2442         (WebInspector.HeapSnapshotProxy.prototype.get totalSize):
2443         (WebInspector.HeapSnapshotProxy.prototype.get uid):
2444         (WebInspector.HeapSnapshotProviderProxy):
2445         (WebInspector.HeapSnapshotProviderProxy.prototype.isEmpty):
2446         (WebInspector.HeapSnapshotProviderProxy.prototype.serializeNextItems):
2447         (WebInspector.HeapSnapshotProviderProxy.prototype.sortAndRewind):
2448         (WebInspector.HeapSnapshotPathFinderProxy):
2449         (WebInspector.HeapSnapshotPathFinderProxy.prototype.findNext):
2450         (WebInspector.HeapSnapshotPathFinderProxy.prototype.updateRoots):
2451         (WebInspector.HeapSnapshotsDiffProxy):
2452         (WebInspector.HeapSnapshotsDiffProxy.prototype.calculate):
2453         (WebInspector.HeapSnapshotsDiffProxy.prototype.pushBaseIds):
2454         (WebInspector.HeapSnapshotsDiffProxy.prototype.pushBaseSelfSizes):
2455         * inspector/front-end/HeapSnapshotWorker.js: Added.
2456         (WebInspector.UIString):
2457         (postMessageWrapper):
2458         * inspector/front-end/HeapSnapshotWorkerDispatcher.js: Added.
2459         (WebInspector.HeapSnapshotWorkerDispatcher):
2460         (WebInspector.HeapSnapshotWorkerDispatcher.prototype._findFunction):
2461         (WebInspector.HeapSnapshotWorkerDispatcher.prototype.dispatchMessage):
2462         * inspector/front-end/ProfilesPanel.js:
2463         (WebInspector.ProfilesPanel.prototype.loadHeapSnapshot):
2464         (WebInspector.ProfilesPanel.prototype._finishHeapSnapshot.else.parsed):
2465         (WebInspector.ProfilesPanel.prototype._finishHeapSnapshot):
2466         * inspector/front-end/WebKit.qrc:
2467         * inspector/front-end/inspector.html:
2468
2469 2011-04-22  Pavel Podivilov  <podivilov@chromium.org>
2470
2471         Reviewed by Pavel Feldman.
2472
2473         Web Inspector: fix de-obfuscation of scripts inlined in html.
2474         https://bugs.webkit.org/show_bug.cgi?id=58538
2475
2476         Use html tokenizer to find script boundaries instead of relying on scriptParsed events.
2477
2478         Test: inspector/debugger/script-formatter.html
2479
2480         * WebCore.gypi:
2481         * WebCore.vcproj/WebCore.vcproj:
2482         * inspector/front-end/JavaScriptFormatter.js: Renamed from Source/WebCore/inspector/front-end/UglifyJS/JavaScriptFormatter.js.
2483         * inspector/front-end/ScriptFormatter.js:
2484         (WebInspector.ScriptFormatter):
2485         (WebInspector.ScriptFormatter.prototype.formatContent):
2486         (WebInspector.ScriptFormatter.prototype._didFormatContent):
2487         * inspector/front-end/ScriptFormatterWorker.js:
2488         (onmessage):
2489         (formatScript):
2490         (HTMLScriptFormatter):
2491         (HTMLScriptFormatter.prototype.format):
2492         (HTMLScriptFormatter.prototype.scriptStarted):
2493         (HTMLScriptFormatter.prototype.scriptEnded):
2494         (HTMLScriptFormatter.prototype.styleSheetStarted):
2495         (HTMLScriptFormatter.prototype.styleSheetEnded):
2496         * inspector/front-end/SourceFile.js:
2497         (WebInspector.FormattedSourceFile.prototype._didRequestContent):
2498         * inspector/front-end/SourceHTMLTokenizer.js:
2499         (WebInspector.SourceHTMLTokenizer.prototype.scriptStarted):
2500         (WebInspector.SourceHTMLTokenizer.prototype.scriptEnded):
2501         (WebInspector.SourceHTMLTokenizer.prototype.styleSheetStarted):
2502         (WebInspector.SourceHTMLTokenizer.prototype.styleSheetEnded):
2503         (WebInspector.SourceHTMLTokenizer.prototype.nextToken):
2504         * inspector/front-end/SourceHTMLTokenizer.re2js:
2505         * inspector/front-end/WebKit.qrc:
2506
2507 2011-04-22  Andrey Kosyakov  <caseq@chromium.org>
2508
2509         Reviewed by Pavel Feldman.
2510
2511         Web Inspector: [Extensions API] misc API cleanup
2512         https://bugs.webkit.org/show_bug.cgi?id=59194
2513
2514         * inspector/front-end/ExtensionAPISchema.json:
2515         * inspector/front-end/ExtensionPanel.js:
2516         (WebInspector.ExtensionSidebarPane.prototype._setObject):
2517
2518 2011-04-21  Pavel Feldman  <pfeldman@google.com>
2519
2520         Reviewed by Yury Semikhatsky.
2521
2522         Web Inspector: group content scripts in the scripts panel drop down.
2523         https://bugs.webkit.org/show_bug.cgi?id=59108
2524
2525         * English.lproj/localizedStrings.js:
2526         * inspector/front-end/ScriptsPanel.js:
2527         (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect.optionCompare):
2528         (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect):
2529
2530 2011-04-22  Mike West  <mkwst@google.com>
2531
2532         Reviewed by Pavel Feldman.
2533
2534         Web Inspector: Tiny improvement to UI for adding an XHR breakpoint
2535         https://bugs.webkit.org/show_bug.cgi?id=59100
2536
2537         Improve web inspector UI around adding XHR breakpoints by adding
2538         a textual label to the input-like `span` used to specify which
2539         XHR requests the breakpoint ought to target.
2540
2541         * inspector/front-end/BreakpointsSidebarPane.js:
2542         (WebInspector.XHRBreakpointsSidebarPane.prototype._addButtonClicked.finishEditing):
2543         (WebInspector.XHRBreakpointsSidebarPane.prototype._addButtonClicked):
2544         * inspector/front-end/inspector.css:
2545         (#breakpoint-condition-input):
2546
2547 2011-04-22  Pavel Podivilov  <podivilov@chromium.org>
2548
2549         Reviewed by Pavel Feldman.
2550
2551         Web Inspector: js formatter should never insert new tokens or remove existing tokens and comments.
2552         https://bugs.webkit.org/show_bug.cgi?id=59191
2553
2554         * WebCore.gypi:
2555         * WebCore.vcproj/WebCore.vcproj:
2556         * inspector/front-end/ScriptFormatter.js:
2557         (WebInspector.ScriptFormatter.prototype.formatContent.didFormatChunks):
2558         (WebInspector.ScriptFormatter.prototype.formatContent):
2559         * inspector/front-end/ScriptFormatterWorker.js:
2560         (onmessage):
2561         * inspector/front-end/SourceFile.js:
2562         (WebInspector.SourceFile.prototype._loadResourceContent):
2563         (WebInspector.FormattedSourceFile.prototype._didRequestContent):
2564         (WebInspector.FormattedSourceMapping):
2565         (WebInspector.FormattedSourceMapping.prototype.scriptLocationToSourceLine):
2566         (WebInspector.FormattedSourceMapping.prototype.sourceLineToScriptLocation):
2567         (WebInspector.FormattedSourceMapping.prototype._convertPosition):
2568         * inspector/front-end/UglifyJS/JavaScriptFormatter.js: Added.
2569         (FormattedContentBuilder): Helper class for building formatted script content.
2570         (FormattedContentBuilder.prototype.addToken):
2571         (FormattedContentBuilder.prototype.addSpace):
2572         (FormattedContentBuilder.prototype.addNewLine):
2573         (FormattedContentBuilder.prototype.increaseNestingLevel):
2574         (FormattedContentBuilder.prototype.decreaseNestingLevel):
2575         (FormattedContentBuilder.prototype.content):
2576         (FormattedContentBuilder.prototype.mapping):
2577         (Tokenizer): Wrapper class for UglifyJS tokenizer.
2578         (Tokenizer.prototype.content):
2579         (Tokenizer.prototype.next):
2580         (Tokenizer.prototype._convertUglifyToken):
2581         (JavaScriptFormatter): New formatter based on UglifyJS tokenizer.
2582         (JavaScriptFormatter.prototype.format):
2583         * inspector/front-end/UglifyJS/process.js: Removed.
2584         * inspector/front-end/WebKit.qrc:
2585
2586 2011-04-22  Mikhail Naganov  <mnaganov@chromium.org>
2587
2588         Reviewed by Pavel Feldman.
2589
2590         Web Inspector: [Chromium] Refactor code prior to moving detailed heap snapshots into workers.
2591         https://bugs.webkit.org/show_bug.cgi?id=59189
2592
2593         * WebCore.gypi:
2594         * WebCore.vcproj/WebCore.vcproj:
2595         * inspector/front-end/BinarySearch.js: Added.
2596         * inspector/front-end/DetailedHeapshotGridNodes.js:
2597         (WebInspector.HeapSnapshotGridNode.prototype._populate.sorted):
2598         (WebInspector.HeapSnapshotGridNode.prototype._populate):
2599         (WebInspector.HeapSnapshotGridNode.prototype.populateChildren):
2600         (WebInspector.HeapSnapshotGridNode.prototype.sort.afterSort.afterPopulate):
2601         (WebInspector.HeapSnapshotGridNode.prototype.sort.afterSort):
2602         (WebInspector.HeapSnapshotGridNode.prototype.sort):
2603         (WebInspector.HeapSnapshotObjectNode):
2604         (WebInspector.HeapSnapshotObjectNode.prototype._createChildNode):
2605         (WebInspector.HeapSnapshotInstanceNode.prototype._createChildNode):
2606         (WebInspector.HeapSnapshotInstanceNode.prototype._enhanceData):
2607         (WebInspector.HeapSnapshotInstanceNode.prototype.get isDeletedNode):
2608         (WebInspector.HeapSnapshotDiffNode.prototype.calculateDiff.diffCalculated):
2609         (WebInspector.HeapSnapshotDiffNode.prototype.calculateDiff.baseIdsReceived):
2610         (WebInspector.HeapSnapshotDiffNode.prototype.get data):
2611         * inspector/front-end/DetailedHeapshotView.js:
2612         (WebInspector.HeapSnapshotSortableDataGrid.prototype.sortingChanged.sort):
2613         (WebInspector.HeapSnapshotSortableDataGrid.prototype.sortingChanged):
2614         (WebInspector.HeapSnapshotSortableDataGrid.prototype._performSorting):
2615         (WebInspector.HeapSnapshotSortableDataGrid.prototype.recursiveSortingEnter):
2616         (WebInspector.HeapSnapshotSortableDataGrid.prototype.recursiveSortingLeave):
2617         (WebInspector.HeapSnapshotContainmentDataGrid):
2618         (WebInspector.HeapSnapshotContainmentDataGrid.prototype._defaultPopulateCount.100.setDataSource):
2619         (WebInspector.HeapSnapshotContainmentDataGrid.prototype.sortingChanged):
2620         (WebInspector.HeapSnapshotDiffDataGrid.prototype.setBaseDataSource):
2621         (WebInspector.HeapSnapshotDiffDataGrid.prototype.populateChildren.baseAggregatesReceived.aggregatesReceived.addNodeIfNonZeroDiff):
2622         (WebInspector.HeapSnapshotDiffDataGrid.prototype.populateChildren.baseAggregatesReceived.aggregatesReceived):
2623         (WebInspector.HeapSnapshotDiffDataGrid.prototype.populateChildren):
2624         (WebInspector.HeapSnapshotDominatorsDataGrid):
2625         (WebInspector.HeapSnapshotDominatorsDataGrid.prototype._defaultPopulateCount.25.setDataSource):
2626         (WebInspector.HeapSnapshotDominatorsDataGrid.prototype.sortingChanged):
2627         (WebInspector.HeapSnapshotRetainingPathsList.prototype._performSorting):
2628         (WebInspector.DetailedHeapshotView.prototype._changeBase.baseProfileLoaded):
2629         (WebInspector.DetailedHeapshotView.prototype._changeBase):
2630         (WebInspector.DetailedHeapshotView.prototype._changeView):
2631         (WebInspector.DetailedHeapshotView.prototype._showStringContentPopup.displayString):
2632         (WebInspector.DetailedHeapshotView.prototype._showStringContentPopup):
2633         * inspector/front-end/HeapSnapshot.js:
2634         (WebInspector.HeapSnapshot.prototype.dispose):
2635         (WebInspector.HeapSnapshot.prototype.pushBaseNodeIds):
2636         (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.serializeNextItems):
2637         (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.sortAndRewind):
2638         (WebInspector.HeapSnapshotEdgesProvider.prototype._serialize):
2639         (WebInspector.HeapSnapshotNodesProvider.prototype._serialize):
2640         (WebInspector.HeapSnapshotsDiff.prototype.calculate):
2641         (WebInspector.HeapSnapshotsDiff.prototype.pushBaseIds):
2642         (WebInspector.HeapSnapshotsDiff.prototype.pushBaseSelfSizes):
2643         * inspector/front-end/HeapSnapshotProxy.js:
2644         (WebInspector.HeapSnapshotProxy.prototype.createEdgesProvider):
2645         (WebInspector.HeapSnapshotProxy.prototype.createNodesProvider):
2646         (WebInspector.HeapSnapshotProxy.prototype.pushBaseIds):
2647         (WebInspector.HeapSnapshotProviderProxy):
2648         (WebInspector.HeapSnapshotProviderProxy.prototype.serializeNextItems):
2649         (WebInspector.HeapSnapshotProviderProxy.prototype.sortAndRewind):
2650         (WebInspector.HeapSnapshotsDiffProxy.prototype.pushBaseIds):
2651         (WebInspector.HeapSnapshotsDiffProxy.prototype.pushBaseSelfSizes):
2652         * inspector/front-end/PleaseWaitMessage.js:
2653         (WebInspector.PleaseWaitMessage.prototype.showAndWaitFor):
2654         (WebInspector.PleaseWaitMessage.prototype.unlistenAndHide):
2655         * inspector/front-end/WebKit.qrc:
2656         * inspector/front-end/inspector.html:
2657         * inspector/front-end/utilities.js:
2658
2659 2011-04-22  Mikhail Naganov  <mnaganov@chromium.org>
2660
2661         Unreviewed fix after r84484 -- conditional statement was inverted incorrectly.
2662
2663         * inspector/front-end/ProfilesPanel.js:
2664         (WebInspector.ProfilesPanel.prototype.handleShortcut):
2665
2666 2011-04-22  Annie Sullivan  <sullivan@chromium.org>
2667
2668         Reviewed by Pavel Feldman.
2669
2670         Web Inspector: Timeline is too narrow
2671         https://bugs.webkit.org/show_bug.cgi?id=58399
2672
2673         Changed Network Panel widths so that Timeline is 50%.
2674         Added titles to the values in the other columns, so that a tooltip will show the value if the column is too narrow.
2675
2676         * inspector/front-end/NetworkPanel.js:
2677         (WebInspector.NetworkPanel.prototype._createTable):  Changed column widths.
2678         (WebInspector.NetworkPanel.prototype._toggleGridMode): Changed column widths.
2679         (WebInspector.NetworkDataGridNode.prototype.refreshResource): Added titles to column values.
2680         (WebInspector.NetworkDataGridNode.prototype._refreshStatusCell): Ditto
2681         (WebInspector.NetworkDataGridNode.prototype._refreshSizeCell): Ditto
2682         (WebInspector.NetworkDataGridNode.prototype._refreshTimeCell): Ditto
2683         * inspector/front-end/utilities.js:
2684         (Element.prototype.setTextAndTitle): Added new method to set the textContent and title of an Element at the same time, so that it can have a tooltip.
2685
2686 2011-04-22  Dan Bernstein  <mitz@apple.com>
2687
2688         Reviewed by Maciej Stachowiak.
2689
2690         <rdar://problem/9322486> REGRESSION (r83397): Default controls fade out when playing audio-only media
2691         https://bugs.webkit.org/show_bug.cgi?id=59180
2692
2693         Test: media/audio-controls-do-not-fade-out.html
2694
2695         * html/HTMLMediaElement.cpp:
2696         (WebCore::HTMLMediaElement::playbackProgressTimerFired): Only start fading out the controls if there is
2697         a video track.
2698
2699 2011-04-22  Luke Macpherson   <macpherson@chromium.org>
2700
2701         Reviewed by Eric Seidel.
2702
2703         Add FontItalics and FontSmallCaps enums to be used instead of boolean values.
2704         https://bugs.webkit.org/show_bug.cgi?id=59080
2705
2706         No new tests as no new functionality added.
2707
2708         * css/CSSPrimitiveValueMappings.h:
2709         Add casts to/from FontItalics and FontSmallCaps
2710         * css/CSSStyleSelector.cpp:
2711         Use new casts defined in PrimitiveValueMappings.h
2712         * platform/graphics/Font.h:
2713         Use FontItalics enum.
2714         * platform/graphics/FontDescription.h:
2715         Define and use FontItalics and FontSmallCaps enums.
2716
2717 2011-04-21  Andrey Kosyakov  <caseq@chromium.org>
2718
2719         Reviewed by Yury Semikhatsky.
2720
2721         Web Inspector: exception in front-end when user selects resource info for resource that does not have response headers yet
2722         https://bugs.webkit.org/show_bug.cgi?id=59123
2723
2724         * inspector/front-end/ResourceCookiesView.js:
2725         (WebInspector.ResourceCookiesView):
2726         (WebInspector.ResourceCookiesView.prototype.show):
2727         (WebInspector.ResourceCookiesView.prototype.get _gotCookies):
2728         (WebInspector.ResourceCookiesView.prototype._buildCookiesTable):
2729
2730 2011-04-21  Beth Dakin  <bdakin@apple.com>
2731
2732         Reviewed by Dan Bernstein.
2733
2734         https://bugs.webkit.org/show_bug.cgi?id=57898
2735         REGRESSION (r82185): Scroll position not restored on navigation back to a page in 
2736         the page cache
2737         -and corresponding-
2738         <rdar://problem/9226652>
2739
2740         The original fix for this change broke scroll-position restore for pages that are 
2741         *not* in the page cache. This patch fixes both cached and non-cached pages by 
2742         using the cachedScrollPosition() only for cached pages.
2743         * loader/HistoryController.cpp:
2744         (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
2745
2746 2011-04-21  Luke Macpherson   <macpherson@chromium.org>
2747
2748         Reviewed by Eric Seidel.
2749
2750         Remove redundant calls to RenderStyle::setDisplay()
2751         https://bugs.webkit.org/show_bug.cgi?id=59060
2752
2753         No new tests / no new functionality added.
2754
2755         * css/CSSStyleSelector.cpp:
2756         (WebCore::CSSStyleSelector::applyProperty):
2757         Remove redundant calls to RenderStyle::setDisplay()
2758
2759 2011-04-21  John Bauman  <jbauman@chromium.org>
2760
2761         Reviewed by Kenneth Russell.
2762
2763         WebGL context drawing buffer may not be cleared if FBO bound
2764         https://bugs.webkit.org/show_bug.cgi?id=58956
2765
2766         Clear the drawing buffer even if it's not currently bound, by
2767         switching between FBOs around the clear. Also, make sure that we
2768         handle depth and stencil masks properly.
2769
2770         No new tests, because testing this under DRT doesn't work.
2771
2772         * html/canvas/WebGLRenderingContext.cpp:
2773         (WebCore::WebGLRenderingContext::initializeNewContext):
2774         (WebCore::WebGLRenderingContext::clearIfComposited):
2775         (WebCore::WebGLRenderingContext::depthMask):
2776         * html/canvas/WebGLRenderingContext.h:
2777         *
2778 2011-04-21  Chris Fleizach  <cfleizach@apple.com>
2779
2780         Reviewed by Beth Dakin.
2781
2782         WebKit is erroneously modifying the DOM; adding 'aria-selected' to tables
2783         https://bugs.webkit.org/show_bug.cgi?id=59140
2784
2785         WebKit should not modify the DOM when the screen reader requests certain things be set. There is no
2786         specification that allows this behavior yet, but we are working on something for the future.
2787
2788         * accessibility/AccessibilityRenderObject.cpp:
2789         (WebCore::AccessibilityRenderObject::setARIAGrabbed):
2790         (WebCore::AccessibilityRenderObject::setIsExpanded):
2791         (WebCore::AccessibilityRenderObject::setSelected):
2792         (WebCore::AccessibilityRenderObject::setValue):
2793
2794 2011-04-21  Chris Fleizach  <cfleizach@apple.com>
2795
2796         Reviewed by Beth Dakin.
2797
2798         AX: order AccessibilityRole alphabetically
2799         https://bugs.webkit.org/show_bug.cgi?id=31524
2800
2801         * accessibility/AccessibilityObject.h:
2802
2803 2011-04-21  Jia Pu  <jpu@apple.com>
2804
2805         Reviewed by Maciej Stachowiak.
2806
2807         [Mac] correctionPanelTimerFired() crashes due to rangeToBeReplaced being cleared.
2808         https://bugs.webkit.org/show_bug.cgi?id=59155
2809         <rdar://problem/9261698>
2810
2811         Make sure the range isn't cleared before calling windowRectForRange() on it. Also removed unused functions in Editor.h,
2812         and fixed a typo in function name.
2813
2814         * editing/Editor.h:
2815         * editing/SpellingCorrectionController.cpp:
2816         (WebCore::SpellingCorrectionController::correctionPanelTimerFired):
2817         (WebCore::SpellingCorrectionController::respondToChangedSelection):
2818         * editing/SpellingCorrectionController.h:
2819         (WebCore::SpellingCorrectionController::shouldStartTimerFor):
2820
2821 2011-04-21  Maciej Stachowiak  <mjs@apple.com>
2822
2823         Reviewed by Adam Roben.
2824
2825         Add a feature define to allow <details> and <summary> to be disabled
2826         https://bugs.webkit.org/show_bug.cgi?id=59118
2827         <rdar://problem/9257045>
2828
2829         No new tests; no behavior change.
2830
2831         * Configurations/FeatureDefines.xcconfig:
2832         * DerivedSources.make:
2833         * GNUmakefile.am:
2834         * features.pri:
2835         * html/HTMLDetailsElement.cpp:
2836         * html/HTMLSummaryElement.cpp:
2837         * html/HTMLTagNames.in:
2838         * html/shadow/DetailsMarkerControl.cpp:
2839         * rendering/RenderBlock.cpp:
2840         (WebCore::canMergeContiguousAnonymousBlocks):
2841         * rendering/RenderDetails.cpp:
2842         * rendering/RenderDetails.h:
2843         * rendering/RenderDetailsMarker.cpp:
2844         * rendering/RenderDetailsMarker.h:
2845         * rendering/RenderObject.h:
2846         * rendering/RenderSummary.cpp:
2847         * rendering/RenderSummary.h:
2848         * rendering/RenderTreeAsText.cpp:
2849         (WebCore::RenderTreeAsText::writeRenderObject):
2850
2851 2011-04-21  Dimitri Glazkov  <dglazkov@chromium.org>
2852
2853         Reviewed by Adele Peterson.
2854
2855         REGRESSION (r83386): Typing in WSJ.com search field doesn't clear placeholder text
2856         https://bugs.webkit.org/show_bug.cgi?id=59053
2857
2858         Turns out, the relatedTarget of an event could be also an ancestor of an event,
2859         not just its parent. Duh.
2860
2861         * dom/EventDispatcher.cpp:
2862         (WebCore::EventDispatcher::adjustToShadowBoundaries): Changed to use shadowHost
2863             explicitly.
2864
2865 2011-04-21  Michael Saboff  <msaboff@apple.com>
2866
2867         Reviewed by Maciej Stachowiak.
2868
2869         Qualified names used for all TagName access, yet namespace usage is rare
2870         https://bugs.webkit.org/show_bug.cgi?id=58997
2871
2872         The methods getElementsByTagName and getElementsByTagNameNS where
2873         always creating and using QualifiedNames.  QualifiedName::init
2874         was consistently in the top 3 routines when running the Dromaeo
2875         DOM-query benchmark.  Split out the functionality so that
2876         getElementsByTagName uses just the local name, an implied "*"
2877         namespace and a separate TagNodeListCache keyed by an atomic name
2878         instead of a QualifiedName.  Access to elements via
2879         getElementsByTagNameNS that have "*" namespace are forwarded to
2880         getElementsByTagName as well.  This provides ~10% speed up in that
2881         Dromaeo test.
2882
2883         No new tests added, existing tests have coverage.  The changes are
2884         an optimization of existing functionality.
2885
2886         * dom/Node.cpp:
2887         (WebCore::Node::removeCachedTagNodeList):
2888         (WebCore::Node::getElementsByTagName):
2889         (WebCore::Node::getElementsByTagNameNS):
2890         (WebCore::NodeListsNodeData::invalidateCaches):
2891         (WebCore::NodeListsNodeData::isEmpty):
2892         * dom/Node.h:
2893         * dom/NodeRareData.h:
2894         * dom/TagNodeList.cpp:
2895         (WebCore::TagNodeList::~TagNodeList):
2896
2897 2011-04-21  Geoffrey Garen  <ggaren@apple.com>
2898
2899         Reviewed by Oliver Hunt.
2900
2901         Removed a use of markDOMObjectWrapper: more style- and node-related stuff
2902         https://bugs.webkit.org/show_bug.cgi?id=59127
2903
2904         * bindings/js/JSCanvasRenderingContextCustom.cpp:
2905         * bindings/js/JSCanvasRenderingContextCustom.cpp:
2906         (WebCore::JSCanvasRenderingContextOwner::isReachableFromOpaqueRoots):
2907         (WebCore::JSCanvasRenderingContextOwner::finalize):
2908         (WebCore::wrapperOwner):
2909         (WebCore::wrapperContext): Use opaque roots for marking canvas rendering
2910         contexts, so JSNode isn't responsible for it.
2911
2912         * bindings/js/JSElementCustom.cpp:
2913         (WebCore::JSElement::markChildren):
2914         * bindings/js/JSHTMLCanvasElementCustom.cpp:
2915         * bindings/js/JSHTMLLinkElementCustom.cpp:
2916         * bindings/js/JSHTMLStyleElementCustom.cpp: Removed obsolete marking code.
2917
2918         * bindings/js/JSNodeCustom.cpp:
2919         (WebCore::isObservable):
2920         (WebCore::isReachableFromDOM):
2921         (WebCore::JSNodeOwner::isReachableFromOpaqueRoots): Removed a bunch of
2922         CSS object model related special cases, since the CSS object model
2923         now tracks its own lifetime through the opaque roots system. Removed
2924         canvas special case, covered above.
2925
2926         * bindings/js/JSProcessingInstructionCustom.cpp:
2927         * bindings/js/JSWebKitAnimationListCustom.cpp:
2928         * dom/ProcessingInstruction.idl:
2929         * html/HTMLCanvasElement.idl:
2930         * html/HTMLLinkElement.idl:
2931         * html/HTMLStyleElement.idl:
2932         * page/WebKitAnimationList.idl: Removed obsolete marking code.
2933
2934 2011-04-21  Vangelis Kokkevis  <vangelis@chromium.org>
2935
2936         Reviewed by James Robinson.
2937
2938         [chromium] Only update the contents of layers that are going to
2939         be drawn. Remove individual texture unreserves that happen
2940         after the layer draw calls with a single unreserve for all the
2941         textures in the texture manager.
2942         https://bugs.webkit.org/show_bug.cgi?id=59129
2943
2944         Tests: No new functionality.  Covered by existing layout tests.
2945
2946         * platform/graphics/chromium/ContentLayerChromium.cpp:
2947         (WebCore::ContentLayerChromium::draw):
2948         * platform/graphics/chromium/ContentLayerChromium.h:
2949         * platform/graphics/chromium/ImageLayerChromium.cpp:
2950         (WebCore::ImageLayerChromium::paintContentsIfDirty):
2951         (WebCore::ImageLayerChromium::updateCompositorResources):
2952         * platform/graphics/chromium/LayerRendererChromium.cpp:
2953         (WebCore::LayerRendererChromium::drawRootLayer):
2954         (WebCore::LayerRendererChromium::updateAndDrawLayers):
2955         (WebCore::LayerRendererChromium::updateLayers):
2956         (WebCore::LayerRendererChromium::paintLayerContents):
2957         * platform/graphics/chromium/LayerRendererChromium.h:
2958         * platform/graphics/chromium/LayerTexture.cpp:
2959         * platform/graphics/chromium/LayerTexture.h:
2960         * platform/graphics/chromium/LayerTilerChromium.cpp:
2961         * platform/graphics/chromium/LayerTilerChromium.h:
2962         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
2963         (WebCore::RenderSurfaceChromium::drawSurface):
2964         * platform/graphics/chromium/TextureManager.cpp:
2965         (WebCore::TextureManager::unprotectAllTextures):
2966         * platform/graphics/chromium/TextureManager.h:
2967         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
2968         (WebCore::CCHeadsUpDisplay::draw):
2969         * platform/graphics/chromium/cc/CCLayerImpl.h:
2970         (WebCore::CCLayerImpl::owner):
2971
2972 2011-04-21  Ryosuke Niwa  <rniwa@webkit.org>
2973
2974         Reviewed by Sam Weinig.
2975
2976         Add Frame* to the argument lists of canCopyCut and canPaste
2977         https://bugs.webkit.org/show_bug.cgi?id=59153
2978
2979         canCopyCut and canPaste now takes Frame* for which supportedCopyCut and supportedPaste are called.
2980         This allows editor client to grant copy/cut and paste permissions per origin.
2981
2982         * editing/EditorCommand.cpp:
2983         (WebCore::supportedCopyCut):
2984         (WebCore::supportedPaste):
2985         * loader/EmptyClients.h:
2986         (WebCore::EmptyEditorClient::canCopyCut):
2987         (WebCore::EmptyEditorClient::canPaste):
2988         * page/EditorClient.h:
2989
2990 2011-04-21  Oliver Hunt  <oliver@apple.com>
2991
2992         Whoops, change lost during merge
2993
2994         * bindings/js/JSEventListener.h:
2995
2996 2011-04-21  Geoffrey Garen  <ggaren@apple.com>
2997
2998         Reviewed by Sam Weinig.
2999
3000         Fixed a failure seen in fast/dom/prototype-inheritance-2.html due to
3001         wrong global object use.
3002
3003         * bindings/js/JSHTMLDocumentCustom.cpp:
3004         (WebCore::JSHTMLDocument::nameGetter):
3005         (WebCore::JSHTMLDocument::all):
3006         * bindings/js/JSHTMLFormElementCustom.cpp:
3007         (WebCore::JSHTMLFormElement::nameGetter): Use the right global object.
3008
3009 2011-04-21  Oliver Hunt  <oliver@apple.com>
3010
3011         Reviewed by Geoffrey Garen.
3012
3013         Start moving to a general visitor pattern for GC traversal
3014         https://bugs.webkit.org/show_bug.cgi?id=59141
3015
3016         This is just a rename:
3017             markChildren -> visitChildren
3018             markAggregate -> visitAggregate
3019             markStack -> visitor
3020             MarkStack -> typedef'd to SlotVisitor
3021
3022         * bindings/js/JSAttrCustom.cpp:
3023         (WebCore::JSAttr::visitChildren):
3024         * bindings/js/JSAudioConstructor.cpp:
3025         (WebCore::constructAudio):
3026         * bindings/js/JSCSSRuleCustom.cpp:
3027         (WebCore::JSCSSRule::visitChildren):
3028         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3029         (WebCore::JSCSSStyleDeclaration::visitChildren):
3030         * bindings/js/JSDOMBinding.cpp:
3031         (WebCore::visitActiveObjectsForContext):
3032         (WebCore::markDOMObjectWrapper):
3033         * bindings/js/JSDOMBinding.h:
3034         * bindings/js/JSDOMGlobalObject.cpp:
3035         (WebCore::JSDOMGlobalObject::visitChildren):
3036         * bindings/js/JSDOMGlobalObject.h:
3037         * bindings/js/JSDOMImplementationCustom.cpp:
3038         (WebCore::JSDOMImplementation::visitChildren):
3039         * bindings/js/JSDOMWindowCustom.cpp:
3040         (WebCore::JSDOMWindow::visitChildren):
3041         * bindings/js/JSDOMWindowShell.cpp:
3042         (WebCore::JSDOMWindowShell::visitChildren):
3043         * bindings/js/JSDOMWindowShell.h:
3044         * bindings/js/JSDocumentCustom.cpp:
3045         (WebCore::JSDocument::visitChildren):
3046         * bindings/js/JSElementCustom.cpp:
3047         (WebCore::JSElement::visitChildren):
3048         * bindings/js/JSEventListener.cpp:
3049         (WebCore::JSEventListener::markJSFunction):
3050         * bindings/js/JSEventListener.h:
3051         * bindings/js/JSHTMLCanvasElementCustom.cpp:
3052         (WebCore::JSHTMLCanvasElement::visitChildren):
3053         * bindings/js/JSHTMLLinkElementCustom.cpp:
3054         (WebCore::JSHTMLLinkElement::visitChildren):
3055         * bindings/js/JSHTMLStyleElementCustom.cpp:
3056         (WebCore::JSHTMLStyleElement::visitChildren):
3057         * bindings/js/JSImageConstructor.cpp:
3058         (WebCore::constructImage):
3059         * bindings/js/JSJavaScriptAudioNodeCustom.cpp:
3060         (WebCore::JSJavaScriptAudioNode::visitChildren):
3061         * bindings/js/JSMessageChannelCustom.cpp:
3062         (WebCore::JSMessageChannel::visitChildren):
3063         * bindings/js/JSMessagePortCustom.cpp:
3064         (WebCore::JSMessagePort::visitChildren):
3065         * bindings/js/JSNamedNodeMapCustom.cpp:
3066         (WebCore::JSNamedNodeMapOwner::isReachableFromOpaqueRoots):
3067         (WebCore::JSNamedNodeMap::visitChildren):
3068         * bindings/js/JSNavigatorCustom.cpp:
3069         (WebCore::JSNavigator::visitChildren):
3070         * bindings/js/JSNodeCustom.cpp:
3071         (WebCore::isObservable):
3072         (WebCore::isReachableFromDOM):
3073         (WebCore::JSNodeOwner::isReachableFromOpaqueRoots):
3074         (WebCore::JSNode::visitChildren):
3075         * bindings/js/JSNodeCustom.h:
3076         * bindings/js/JSNodeFilterCondition.cpp:
3077         (WebCore::JSNodeFilterCondition::WeakOwner::isReachableFromOpaqueRoots):
3078         * bindings/js/JSNodeFilterCondition.h:
3079         * bindings/js/JSNodeFilterCustom.cpp:
3080         (WebCore::JSNodeFilter::visitChildren):
3081         * bindings/js/JSNodeIteratorCustom.cpp:
3082         (WebCore::JSNodeIterator::visitChildren):
3083         * bindings/js/JSNodeListCustom.cpp:
3084         (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
3085         * bindings/js/JSProcessingInstructionCustom.cpp:
3086         (WebCore::JSProcessingInstruction::visitChildren):
3087         * bindings/js/JSSVGElementInstanceCustom.cpp:
3088         (WebCore::JSSVGElementInstance::visitChildren):
3089         * bindings/js/JSSharedWorkerCustom.cpp:
3090         (WebCore::JSSharedWorker::visitChildren):
3091         * bindings/js/JSStyleSheetCustom.cpp:
3092         (WebCore::JSStyleSheet::visitChildren):
3093         * bindings/js/JSTreeWalkerCustom.cpp:
3094         (WebCore::JSTreeWalker::visitChildren):
3095         * bindings/js/JSWebGLRenderingContextCustom.cpp:
3096         (WebCore::JSWebGLRenderingContext::visitChildren):
3097         * bindings/js/JSWebKitAnimationListCustom.cpp:
3098         (WebCore::JSWebKitAnimationList::visitChildren):
3099         * bindings/js/JSWorkerContextCustom.cpp:
3100         (WebCore::JSWorkerContext::visitChildren):
3101         * bindings/js/JSXMLHttpRequestCustom.cpp:
3102         (WebCore::JSXMLHttpRequest::visitChildren):
3103         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
3104         (WebCore::JSXMLHttpRequestUpload::visitChildren):
3105         * bindings/scripts/CodeGeneratorJS.pm:
3106         * bridge/qt/qt_instance.cpp:
3107         (JSC::Bindings::QtRuntimeObject::visitChildren):
3108         (JSC::Bindings::QtInstance::markAggregate):
3109         * bridge/qt/qt_instance.h:
3110         * bridge/qt/qt_pixmapruntime.cpp:
3111         * bridge/qt/qt_runtime.cpp:
3112         (JSC::Bindings::QtRuntimeMetaMethod::visitChildren):
3113         * bridge/qt/qt_runtime.h:
3114         * dom/EventListener.h:
3115         (WebCore::EventListener::visitJSFunction):
3116         * dom/EventTarget.h:
3117         (WebCore::EventTarget::visitJSEventListeners):
3118         * dom/Node.h:
3119         * dom/NodeFilterCondition.h:
3120         (WebCore::NodeFilterCondition::visitAggregate):
3121         * page/DOMWindow.h:
3122         * workers/WorkerContext.h:
3123
3124 2011-04-21  Beth Dakin  <bdakin@apple.com>
3125
3126         Reviewed by Dan Bernstein.
3127
3128         https://bugs.webkit.org/show_bug.cgi?id=59048
3129         Need to track whether overlay scrollbar is currently visible and in lower-
3130         righthand corner
3131         -and corresponding-
3132         <rdar://problem/9211232>
3133
3134         Whenever we start a new ScrollbarPartAnimation, check if the scrollbar is vertical 
3135         and showing (alpha of 1), and if so, call setVisibleScrollerThumbRect with the 
3136         knob rect, otherwise with an empty rect. ScrollAnimatorMac has a local rect to 
3137         track this value so that it can avoid sending messages across the ChromeClient to 
3138         the UIProcess if the rect has not changed.
3139         * platform/mac/ScrollAnimatorMac.h:
3140         * platform/mac/ScrollAnimatorMac.mm:
3141         (-[ScrollbarPainterDelegate setUpAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
3142         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
3143         (WebCore::ScrollAnimatorMac::setVisibleScrollerThumbRect):
3144
3145         Plumbing for the chrome client.
3146         * page/ChromeClient.h:
3147         (WebCore::ChromeClient::notifyScrollerThumbIsVisibleInRect):
3148         * page/FrameView.cpp:
3149         (WebCore::FrameView::setVisibleScrollerThumbRect):
3150         * page/FrameView.h:
3151         * platform/ScrollableArea.h:
3152         (WebCore::ScrollableArea::setVisibleScrollerThumbRect):
3153
3154         New WebCoreSystemInterface function to get the knob rect.
3155         * WebCore.exp.in:
3156         * platform/mac/WebCoreSystemInterface.h:
3157         * platform/mac/WebCoreSystemInterface.mm:
3158
3159 2011-04-21  Nat Duca  <nduca@chromium.org>
3160
3161         Reviewed by James Robinson.
3162
3163         [chromium] Fix artefacts in compositor HUD when resizing
3164         https://bugs.webkit.org/show_bug.cgi?id=58969
3165
3166         HUD was using the tiler program and not setting the texture
3167         transform. The HUD would thus draw with a texture transform based
3168         on the last tile drawn, leading sometimes to distortion.
3169
3170         * platform/graphics/chromium/LayerRendererChromium.cpp:
3171         (WebCore::LayerRendererChromium::initializeSharedObjects):
3172         (WebCore::LayerRendererChromium::cleanupSharedObjects):
3173         * platform/graphics/chromium/LayerRendererChromium.h:
3174         (WebCore::LayerRendererChromium::headsUpDisplayProgram):
3175         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
3176         (WebCore::CCHeadsUpDisplay::draw):
3177         * platform/graphics/chromium/cc/CCHeadsUpDisplay.h:
3178
3179 2011-04-21  Mike Reed  <reed@google.com>
3180
3181         Reviewed by Kenneth Russell.
3182
3183         only return false if we actually in a skia-gpu accelerated canvas for isNativeFontRenderingAllowed
3184         https://bugs.webkit.org/show_bug.cgi?id=59024
3185
3186         No new tests. The bug (and fix) depend on enabling SKIA_GPU. When that is enabled, the bug
3187         shows all text w/o lcd rendering. This is a regression from a recent CL when we switch to
3188         calling skia::SupportsPlatformPaint. This CL fixes that.
3189         There should be no change for the default builds when SKIA_GPU is not enabled.
3190
3191         * platform/graphics/skia/PlatformContextSkia.cpp:
3192         (WebCore::PlatformContextSkia::isNativeFontRenderingAllowed):
3193
3194 2011-04-21  Adrienne Walker  <enne@google.com>
3195
3196         Reviewed by James Robinson.
3197
3198         [chromium] Don't upload partially drawn tiles in the compositor
3199         https://bugs.webkit.org/show_bug.cgi?id=59112
3200
3201         Use the same set of tiles for painting as is used for updating.
3202         Before, a larger set of tiles were being uploaded, causing some to
3203         only be partially undirtied because they were not fully painted.
3204         As tiles are clear their dirty rect after being unpainted, this caused
3205         artifacts to appear when scrolling.
3206
3207         Unfortunately, no layout test can test this behavior yet because
3208         scrolling invalidations are done differently in test shell.
3209
3210         * platform/graphics/chromium/ImageLayerChromium.cpp:
3211         (WebCore::ImageLayerChromium::updateCompositorResources):
3212         * platform/graphics/chromium/LayerTilerChromium.cpp:
3213         (WebCore::LayerTilerChromium::update):
3214         (WebCore::LayerTilerChromium::uploadCanvas):
3215         (WebCore::LayerTilerChromium::updateFromPixels):
3216         * platform/graphics/chromium/LayerTilerChromium.h:
3217
3218 2011-04-21  Ben Taylor  <bentaylor.solx86@gmail.com>
3219
3220         Reviewed by Alexey Proskuryakov.
3221
3222         https://bugs.webkit.org/show_bug.cgi?id=58725
3223
3224         Fix a compile issue on Solaris 10 with Sun Studio 12,
3225         ternary operators (?:) must have the same types
3226
3227         * loader/DocumentLoader.cpp:
3228         (WebCore::DocumentLoader::popArchiveForSubframe):
3229         * loader/archive/ArchiveFactory.cpp:
3230         (WebCore::ArchiveFactory::create):
3231         * loader/icon/IconDatabase.cpp:
3232         (WebCore::IconDatabase::setIconDataForIconURL):
3233         * page/animation/AnimationBase.cpp:
3234         (WebCore::blendFunc):
3235         * rendering/RenderLayer.cpp:
3236         (WebCore::RenderLayer::updateScrollCornerStyle):
3237         (WebCore::RenderLayer::updateResizerStyle):
3238         * rendering/RenderScrollbar.cpp:
3239         (WebCore::RenderScrollbar::updateScrollbarPart):
3240         * rendering/RenderTextFragment.cpp:
3241         (WebCore::RenderTextFragment::RenderTextFragment):
3242
3243 2011-04-21  Mike Reed  <reed@google.com>
3244
3245         Reviewed by Kenneth Russell.
3246
3247         [chromium, win] Multiple failures of shadow rendering layout tests
3248         https://bugs.webkit.org/show_bug.cgi?id=58772
3249
3250         No new tests. This CL fixes a regression in the following tests
3251         fast/multicol/shadow-breaking.html
3252         fast/repaint/shadow-multiple-horizontal.html
3253         fast/repaint/shadow-multiple-strict-horizontal.html
3254         fast/repaint/shadow-multiple-strict-vertical.html
3255         fast/repaint/shadow-multiple-vertical.html
3256         fast/text/shadow-translucent-fill.html
3257         fast/transforms/shadows.html
3258         svg/css/group-with-shadow.svg
3259         svg/css/shadow-changes.svg
3260         svg/css/text-shadow-multiple.xhtml
3261         transitions/svg-text-shadow-transition.html
3262         svg/css/composite-shadow-text.svg
3263  
3264
3265         * platform/graphics/skia/GraphicsContextSkia.cpp:
3266         (WebCore::GraphicsContext::setPlatformShadow):
3267
3268 2011-04-21  Geoffrey Garen  <ggaren@apple.com>
3269
3270         Try to fix the Qt build.
3271
3272         * UseJSC.cmake:
3273         * WebCore.pro: Use correct file name.
3274
3275 2011-04-21  Dirk Schulze  <krit@webkit.org>
3276
3277         Unreviewed Qt build fix.
3278
3279         SVG feDropShadow implementation of SVG Filters 1.2
3280         https://bugs.webkit.org/show_bug.cgi?id=52513
3281
3282         * CodeGenerators.pri:
3283
3284 2011-04-21  Adrienne Walker  <enne@google.com>
3285
3286         Reviewed by James Robinson.
3287
3288         [chromium] Clamp dirty regions on content layers to layer bounds
3289         https://bugs.webkit.org/show_bug.cgi?id=58933
3290
3291         This prevents garbage being rendered when layers are resized and a
3292         previous invalidation (now off-layer) is no longer valid.
3293
3294         * platform/graphics/chromium/ContentLayerChromium.cpp:
3295         (WebCore::ContentLayerChromium::paintContentsIfDirty):
3296
3297 2011-04-21  Roland Steiner  <rolandsteiner@chromium.org>
3298
3299         Reviewed by Kent Tamura.
3300
3301         Bug 59012 - Shadows should be imported along with their host nodes
3302         https://bugs.webkit.org/show_bug.cgi?id=59012
3303
3304         Copy the shadow tree of an element (even on a shallow copy!).
3305
3306         Test: fast/dom/shadow/import-shadowroot.html
3307
3308         * dom/Element.cpp:
3309         (WebCore::Element::copyNonAttributeProperties):
3310         * dom/Element.h:
3311
3312 2011-04-20  Geoffrey Garen  <ggaren@apple.com>
3313
3314         Reviewed by Oliver Hunt.
3315
3316         Removed a use of markDOMObjectWrapper: CSS Object Model
3317         https://bugs.webkit.org/show_bug.cgi?id=59057
3318
3319         This is 24 hours of my life I will never get back. Thank you, W3C.
3320
3321         * GNUmakefile.list.am:
3322         * WebCore.gypi:
3323         * WebCore.vcproj/WebCore.vcproj:
3324         * WebCore.xcodeproj/project.pbxproj: Build!
3325
3326         * bindings/js/JSCSSFontFaceRuleCustom.cpp:
3327         * bindings/js/JSCSSImportRuleCustom.cpp:
3328         * bindings/js/JSCSSMediaRuleCustom.cpp:
3329         * bindings/js/JSCSSPageRuleCustom.cpp:
3330         * bindings/js/JSCSSRuleCustom.cpp:
3331         (WebCore::JSCSSRuleOwner::isReachableFromOpaqueRoots):
3332         (WebCore::JSCSSRuleOwner::finalize):
3333         (WebCore::wrapperOwner):
3334         (WebCore::wrapperContext):
3335         (WebCore::JSCSSRule::markChildren):
3336         * bindings/js/JSCSSRuleListCustom.cpp:
3337         (WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots):
3338         (WebCore::JSCSSRuleListOwner::finalize):
3339         (WebCore::wrapperOwner):
3340         (WebCore::wrapperContext):
3341         (WebCore::toJS):
3342         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3343         (WebCore::JSCSSStyleDeclarationOwner::isReachableFromOpaqueRoots):
3344         (WebCore::JSCSSStyleDeclarationOwner::finalize):
3345         (WebCore::wrapperOwner):
3346         (WebCore::wrapperContext):
3347         (WebCore::JSCSSStyleDeclaration::markChildren): Removed custom mark functions,
3348         and replaced with use of the opaque roots system. This has the nice benefit
3349         of allowing us to eagerly recycle far more CSS wrappers and their associated
3350         DOM wrappers.
3351
3352         (WebCore::JSCSSStyleDeclaration::getPropertyCSSValue): Made this function
3353         custom because it must maintain the sorrowful invariant that primitive
3354         values can be mapped back to objects that are reachable through the DOM.
3355         We maintain this invariant through an external hash table because
3356         making all primitive values bigger would be a too-large memory use
3357         penalty. Luckily, nobody uses this feature, so the cost of the hash table
3358         is no big deal.
3359
3360         (WebCore::toJS): We need a custom toJS so we can specify our own WeakHandleOwner.
3361
3362         * bindings/js/JSCSSStyleRuleCustom.cpp: Removed custom mark, as above.
3363
3364         * bindings/js/JSCSSValueCustom.cpp:
3365         (WebCore::cssValueRoots):
3366         (WebCore::JSCSSValueOwner::isReachableFromOpaqueRoots):
3367         (WebCore::JSCSSValueOwner::finalize):
3368         (WebCore::wrapperOwner):
3369         (WebCore::wrapperContext): Use the opaque roots system. Piggy-back on
3370         the external hash table filled by JSCSSStyleDeclaration::getPropertyCSSValue.
3371
3372         * bindings/js/JSDocumentCustom.cpp:
3373         (WebCore::JSDocument::markChildren): No need to mark our stylesheet list,
3374         since all style-related objects can use our opaque root to determine
3375         liveness.
3376
3377         * bindings/js/JSMediaListCustom.cpp: Added.
3378         (WebCore::JSMediaListOwner::isReachableFromOpaqueRoots):
3379         (WebCore::JSMediaListOwner::finalize):
3380         (WebCore::wrapperOwner):
3381         (WebCore::wrapperContext):
3382         (WebCore::toJS): Use the opaque roots system.
3383
3384         * bindings/js/JSNodeCustom.h:
3385         (WebCore::root): Added helpers for computing style-related roots.
3386
3387         * bindings/js/JSStyleSheetCustom.cpp:
3388         (WebCore::JSStyleSheetOwner::isReachableFromOpaqueRoots):
3389         (WebCore::JSStyleSheetOwner::finalize):
3390         (WebCore::wrapperOwner):
3391         (WebCore::wrapperContext):
3392         (WebCore::JSStyleSheet::markChildren): Use the opaque roots system instead
3393         of direct marking.
3394         
3395         * bindings/js/JSStyleSheetListCustom.cpp:
3396         (WebCore::JSStyleSheetListOwner::isReachableFromOpaqueRoots):
3397         (WebCore::JSStyleSheetListOwner::finalize):
3398         (WebCore::wrapperOwner):
3399         (WebCore::wrapperContext):
3400         (WebCore::toJS): Ditto.
3401
3402         * bindings/js/JSWebKitCSSKeyframeRuleCustom.cpp:
3403         * bindings/js/JSWebKitCSSKeyframesRuleCustom.cpp:
3404         * css/CSSFontFaceRule.idl:
3405         * css/CSSImportRule.idl: No more custom mark, since we use the opaque
3406         roots system instead.
3407
3408         * css/CSSMediaRule.cpp:
3409         (WebCore::CSSMediaRule::CSSMediaRule): Fixed a bug where a media rule
3410         would incorrectly have no parent, since this got in the way of correctly
3411         computing the media rule's root.
3412
3413         * css/CSSMediaRule.idl:
3414         * css/CSSPageRule.idl:
3415         * css/CSSRuleList.idl:
3416         * css/CSSStyleDeclaration.idl:
3417         * css/CSSStyleRule.idl:
3418         * css/MediaList.idl: Match behavior changes above.
3419
3420         * css/StyleBase.cpp:
3421         (WebCore::StyleBase::node): Helper function for computing roots of the
3422         style system. This object model is pretty weird and not very well factored,
3423         but I'm pretty sure this covers all the relevant cases.
3424
3425         * css/StyleBase.h:
3426         * css/StyleSheetList.idl:
3427         * css/WebKitCSSKeyframeRule.idl:
3428         * css/WebKitCSSKeyframesRule.idl: Updated to match the behavior changes above.
3429
3430 2011-04-21  Dirk Schulze  <krit@webkit.org>
3431
3432         Reviewed by Nikolas Zimmermann.
3433
3434         SVG feDropShadow implementation of SVG Filters 1.2
3435         https://bugs.webkit.org/show_bug.cgi?id=52513
3436
3437         This is the implementation of feDropShadow, a shorthand filter and a combination of feGaussianBlur,
3438         feOffset, feFlood and feComposite to create a drop shadow of an input effect.
3439         Creating this new filter effect makes it possible to optimize the often used workflow. ShadowBlur, with its
3440         fast blurring algorithm, is used to blur the shadow and composite operators are responsible for combining the
3441         source with different colored shadows.
3442         Shadow color and opacity can be set with the properties flood-color and flood-opacity.
3443
3444         Tests: svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr.html
3445                svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr.html
3446                svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr.html
3447                svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-color-attr.html
3448                svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-opacity-attr.html
3449                svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr.html
3450                svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop.html
3451                svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop.html
3452                svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop.html
3453                svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-color-prop.html
3454                svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-opacity-prop.html
3455                svg/dynamic-updates/SVGFEDropShadowElement-svgdom-stdDeviation-prop.html
3456                svg/filters/feDropShadow.svg
3457
3458         * Android.mk:
3459         * CMakeLists.txt:
3460         * DerivedSources.cpp:
3461         * DerivedSources.make:
3462         * GNUmakefile.list.am:
3463         * WebCore.exp.in:
3464         * WebCore.gypi:
3465         * WebCore.pro:
3466         * WebCore.vcproj/WebCore.vcproj:
3467         * WebCore.xcodeproj/project.pbxproj:
3468         * bindings/objc/DOM.mm:
3469         (WebCore::createElementClassMap):
3470         * bindings/objc/DOMSVG.h:
3471         * page/DOMWindow.idl:
3472         * platform/graphics/ShadowBlur.cpp: Added missing copyright after r84410.
3473         * platform/graphics/ShadowBlur.h: Made blurLayerImage public.
3474         * platform/graphics/filters/FEDropShadow.cpp: Added.
3475         (WebCore::FEDropShadow::FEDropShadow):
3476         (WebCore::FEDropShadow::create):
3477         (WebCore::FEDropShadow::determineAbsolutePaintRect):
3478         (WebCore::FEDropShadow::apply):
3479         (WebCore::FEDropShadow::dump):
3480         (WebCore::FEDropShadow::externalRepresentation):
3481         * platform/graphics/filters/FEDropShadow.h: Added.
3482         (WebCore::FEDropShadow::stdDeviationX):
3483         (WebCore::FEDropShadow::setStdDeviationX):
3484         (WebCore::FEDropShadow::stdDeviationY):
3485         (WebCore::FEDropShadow::setStdDeviationY):
3486         (WebCore::FEDropShadow::dx):
3487         (WebCore::FEDropShadow::setDx):
3488         (WebCore::FEDropShadow::dy):
3489         (WebCore::FEDropShadow::setDy):
3490         (WebCore::FEDropShadow::shadowColor):
3491         (WebCore::FEDropShadow::setShadowColor):