2011-04-22 Jer Noble <jer.noble@apple.com>
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-04-22  Jer Noble  <jer.noble@apple.com>
2
3         Reviewed by Maciej Stachowiak.
4
5         Disable MediaPlayerPrivateAVFoundation when using old full screen mode.
6         https://bugs.webkit.org/show_bug.cgi?id=59147
7
8         Add a new isAVFoundationEnabled setting and check it before adding 
9         MediaPlayerPrivateAVFoundationObjC to the media engine registry.
10
11         * WebCore.exp.in:
12         * page/Settings.cpp:
13         * page/Settings.h:
14         (WebCore::Settings::setAVFoundationEnabled): Added.
15         (WebCore::Settings::isAVFoundationEnabled): Added.
16         * platform/graphics/MediaPlayer.cpp:
17         (WebCore::installedMediaEngines): Check the settings added above.
18
19 2011-04-22  Sam Weinig  <sam@webkit.org>
20
21         Reviewed by Gavin Barraclough.
22
23         Remove remaining uses of deprecated version of toJS
24         https://bugs.webkit.org/show_bug.cgi?id=59170
25
26         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
27         (WebCore::toJS):
28         (WebCore::JSCanvasRenderingContext2D::strokeStyle):
29         (WebCore::JSCanvasRenderingContext2D::fillStyle):
30         (WebCore::JSCanvasRenderingContext2D::createPattern):
31         * bindings/js/JSConsoleCustom.cpp:
32         (WebCore::JSConsole::profiles):
33         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
34         (WebCore::JSSQLStatementErrorCallback::handleEvent):
35         * bindings/js/JSDOMBinding.h:
36         * bindings/js/JSDOMMimeTypeArrayCustom.cpp:
37         (WebCore::JSDOMMimeTypeArray::nameGetter):
38         * bindings/js/JSDOMPluginArrayCustom.cpp:
39         (WebCore::JSDOMPluginArray::nameGetter):
40         * bindings/js/JSDOMPluginCustom.cpp:
41         (WebCore::JSDOMPlugin::nameGetter):
42         * bindings/js/JSDOMWindowCustom.cpp:
43         (WebCore::namedItemGetter):
44         (WebCore::JSDOMWindow::event):
45         * bindings/js/JSEventTarget.cpp:
46         (WebCore::toJS):
47         * bindings/js/JSInjectedScriptHostCustom.cpp:
48         Propagate stored global object down access chain.
49
50         (WebCore::InjectedScriptHost::nodeAsScriptValue):
51         Replace use of deprecated toJS overload with explicit call to deprecatedGlobalObjectForPrototype.
52
53         (WebCore::JSInjectedScriptHost::currentCallFrame):
54         (WebCore::JSInjectedScriptHost::inspectedNode):
55         * bindings/js/JSNamedNodeMapCustom.cpp:
56         (WebCore::JSNamedNodeMap::nameGetter):
57         * bindings/js/JSNodeListCustom.cpp:
58         (WebCore::callNodeList):
59         (WebCore::JSNodeList::nameGetter):
60         * bindings/js/JSScriptProfileNodeCustom.cpp:
61         (WebCore::JSScriptProfileNode::children):
62         * bindings/js/JSStyleSheetListCustom.cpp:
63         (WebCore::JSStyleSheetList::nameGetter):
64         * bindings/js/JSXSLTProcessorCustom.cpp:
65         (WebCore::JSXSLTProcessor::transformToFragment):
66         (WebCore::JSXSLTProcessor::transformToDocument):
67         * bindings/scripts/CodeGeneratorJS.pm:
68         Propagate stored global object down access chain.
69
70         * css/MediaQueryListListener.cpp:
71         (WebCore::MediaQueryListListener::queryChanged):
72         Replace use of deprecated toJS overload with explicit call to deprecatedGlobalObjectForPrototype,
73         we will want refactor this to match other callbacks so we can remove this.
74
75 2011-04-22  Naoki Takano  <takano.naoki@gmail.com>
76
77         Reviewed by Eric Seidel.
78
79         [Chromium]Mac UI polish to add left/right padding space for autofill popup window.
80         https://bugs.webkit.org/show_bug.cgi?id=58960
81         http://code.google.com/p/chromium/issues/detail?id=51077
82
83         No new test because Chromium Autofill popup window doesn't have any test framework.
84         This assumes only AutofillPopupMenuClient gives TexFieldPart appearance.
85         Only if Autofill popup window has right/left padding.
86         The code should be removed after Autofill popup window logic is separated from WebKit to Chromium.
87
88         * rendering/RenderThemeChromiumMac.h: Add popupInternalPaddingRight() and popupInternalPaddingLeft().
89         * rendering/RenderThemeChromiumMac.mm:
90         (WebCore::RenderThemeChromiumMac::popupInternalPaddingLeft): Return padding size only if TextFieldPart is specified.
91         (WebCore::RenderThemeChromiumMac::popupInternalPaddingRight): Return padding size only if TextFieldPart is specified.
92
93 2011-04-21  Adam Roben  <aroben@apple.com>
94
95         Add code to enumerate all the functions imported by a particular Windows binary
96
97         PEImage is where all the logic starts. It represents a single Portable Executable (PE)
98         binary. The various enumerator classes are used in conjunction with PEImage to enumerate the
99         modules and functions imported by that image.
100
101         I couldn't figure out how to write a test for this. :-(
102
103         Part of <http://webkit.org/b/51063> <rdar://problem/8769281> REGRESSION (WebKit2): No
104         context menu appears when right-clicking on windowless Flash plugin
105
106         Reviewed by Sam Weinig, and given a good once-over by Jeff Miller.
107
108         * WebCore.vcproj/WebCore.vcproj: Added the new files.
109
110         * platform/win/PEImage.cpp: Added.
111         (WebCore::PEImage::PEImage): Checks that the module contains the expected magic numbers,
112         then initializes m_ntHeaders using the module.
113         (WebCore::PEImage::convertRVAToAddress): Converts a relative virtual address (RVA) to a
114         non-relative address, which can then be dereferenced. (The PE format uses RVAs in lots of
115         places.)
116         (WebCore::PEImage::dataDirectoryEntryAddress): Returns the address of the data associated
117         with the given entry in the image's DataDirectory.
118
119         * platform/win/PEImage.h: Added.
120         (WebCore::PEImage::isValid): We're a valid image if the validation code in our constructor
121         succeeded, in which case m_ntHeaders will be set.
122
123         * platform/win/ImportedFunctionsEnumerator.cpp: Added. This class enumerates all the
124         functions imported by the image from a single module by walking the Import Name Table (INT)
125         and Import Address Table (IAT).
126         (WebCore::ImportedFunctionsEnumerator::ImportedFunctionsEnumerator): Initialize our members.
127         (WebCore::ImportedFunctionsEnumerator::isAtEnd): The INT and IAT are both 0-terminated
128         arrays.
129         (WebCore::ImportedFunctionsEnumerator::next): Step to the next entries in the INT and IAT.
130         (WebCore::ImportedFunctionsEnumerator::currentFunctionName): Gets the address of the
131         function's name, if possible, using the INT.
132         (WebCore::ImportedFunctionsEnumerator::addressOfCurrentFunctionPointer): Returns the address
133         of the function pointer for the current function. This function pointer is used whenever
134         code in m_image calls the current function. (A future patch will take advantage of this by
135         overwriting this function pointer with another, thereby redirecting calls to that function.)
136
137         * platform/win/ImportedFunctionsEnumerator.h: Added.
138
139         * platform/win/ImportedModulesEnumeratorBase.h: Added. This base class is used by
140         ImportedModulesEnumerator and DelayLoadedModulesEnumerator, and allows code to be written
141         that works with either one.
142
143         * platform/win/ImportedModulesEnumerator.cpp: Added. This class enumerates all the
144         non-delay-loaded modules imported by the image by walking the image's import array.
145         (WebCore::ImportedModulesEnumerator::ImportedModulesEnumerator): Module import information
146         is stored in the IMAGE_DIRECTORY_ENTRY_IMPORT entry of the image's DataDirectory.
147         (WebCore::ImportedModulesEnumerator::isAtEnd): The import array is 0-terminated.
148         (WebCore::ImportedModulesEnumerator::next): Steps along the import array.
149         (WebCore::ImportedModulesEnumerator::currentModuleName): Gets the address of the module's
150         name.
151         (WebCore::ImportedModulesEnumerator::functionsEnumerator): Get's the addresses of the INT
152         and IAT for this module and wraps them in an ImportedFunctionsEnumerator.
153
154         * platform/win/ImportedModulesEnumerator.h: Added.
155
156         * platform/win/DelayLoadedModulesEnumerator.cpp: Added. This class enumerates all the
157         delay-loaded modules that are imported by the given PEImage by walking the image's
158         ImageDelayDescr array.
159         (WebCore::DelayLoadedModulesEnumerator::DelayLoadedModulesEnumerator): Delay-load
160         information is stored in the IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT entry of the image's
161         DataDirectory.
162         (WebCore::DelayLoadedModulesEnumerator::isAtEnd): The delay-loaded modules array is
163         0-terminated.
164         (WebCore::DelayLoadedModulesEnumerator::next): Steps along the delay-loaded modules array.
165         (WebCore::DelayLoadedModulesEnumerator::currentModuleName): Gets the address of the module's
166         name out of the descriptor.
167         (WebCore::DelayLoadedModulesEnumerator::functionsEnumerator): Gets the INT and IAT for the
168         current module out of the descriptor and makes an ImportedFunctionsEnumerator from them.
169         (WebCore::DelayLoadedModulesEnumerator::convertPotentialRVAToAddress): Pre-VC7.0 images
170         stored non-relative addresses in the ImageDelayDescr structures, while VC7.0 and later
171         images store RVAs. This function abstracts away the difference.
172
173         * platform/win/DelayLoadedModulesEnumerator.h: Added.
174
175 2011-04-21  Adam Roben  <aroben@apple.com>
176
177         Add a shared do-nothing window class that anyone can use
178
179         Fixes <http://webkit.org/b/59102> WebKit has too many dummy window classes
180
181         Reviewed by Anders Carlsson.
182
183         * WebCore.vcproj/WebCore.vcproj: Added DefWndProcWindowClass.{cpp,h}. Moved Arena.cpp out of
184         platform/win and into platform. Let VS reorder other files.
185
186         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
187         (WebCore::CACFLayerTreeHost::acceleratedCompositingAvailable): Changed to use the shared
188         dummy window class instead of creating our own.
189
190         * platform/win/DefWndProcWindowClass.cpp: Added.
191         (WebCore::registerClass): Register it!
192         (WebCore::defWndProcWindowClassName): Register it and return it!
193
194         * platform/win/DefWndProcWindowClass.h: Added.
195
196 2011-04-21  MORITA Hajime  <morrita@google.com>
197
198         Reviewed by Dimitri Glazkov.
199         
200         Content of <details> should be forwarded through the shadow DOM
201         https://bugs.webkit.org/show_bug.cgi?id=59055
202
203         - Made ShadowContentElement abstract and added shouldInclude() pure virtual method.
204         - Added SummaryContentElement, DetailsContentElement, DetailsSummaryElement as
205           subclasses of ShadowContentElement.
206         - Gave two shadow children for HTMLDetailsElement. One is DetailsContentElement, that
207           handles non-summary contents of <details>. Another is SummaryContentElement, that
208           handles the main summary element.
209         - Removed most of RenderDetails custom layout mechanism, which is replaced by
210           ShadowContentElement subclasses.
211
212         Tests: fast/html/details-add-child-1.html
213                fast/html/details-add-child-2.html
214                fast/html/details-remove-child-1.html
215                fast/html/details-remove-child-2.html
216
217         * dom/ShadowRoot.cpp:
218         (WebCore::ShadowRoot::contentContainerFor):
219         (WebCore::ShadowRoot::hostChildrenChanged):
220         (WebCore::ShadowRoot::hasContentElement):
221         * dom/ShadowRoot.h:
222         * html/HTMLDetailsElement.cpp:
223         (WebCore::DetailsContentElement::DetailsContentElement):
224         (WebCore::DetailsContentElement::create):
225         (WebCore::DetailsContentElement::shouldInclude):
226         (WebCore::DetailsSummaryElement::DetailsSummaryElement):
227         (WebCore::DetailsSummaryElement::create):
228         (WebCore::DetailsSummaryElement::shouldInclude):
229         (WebCore::HTMLDetailsElement::create):
230         (WebCore::HTMLDetailsElement::HTMLDetailsElement):
231         (WebCore::HTMLDetailsElement::ensureShadowSubtreeOf):
232         (WebCore::findSummaryFor):
233         (WebCore::HTMLDetailsElement::ensureMainSummary):
234         (WebCore::HTMLDetailsElement::refreshMainSummary):
235         (WebCore::HTMLDetailsElement::createShadowSubtree):
236         * html/HTMLDetailsElement.h:
237         * html/HTMLSummaryElement.cpp:
238         (WebCore::SummaryContentElement::SummaryContentElement):
239         (WebCore::SummaryContentElement::shouldInclude):
240         (WebCore::SummaryContentElement::create):
241         (WebCore::HTMLSummaryElement::createShadowSubtree):
242         * html/shadow/ShadowContentElement.h:
243         * rendering/RenderDetails.cpp:
244         (WebCore::RenderDetails::RenderDetails):
245         (WebCore::RenderDetails::addChild):
246         * rendering/RenderDetails.h:
247         * rendering/RenderSummary.cpp:
248         * rendering/RenderSummary.h:
249
250 2011-04-21  Simon Fraser  <simon.fraser@apple.com>
251
252         Reviewed by Dan Bernstein.
253
254         Extra GraphicsContext::save() in InlineTextBox::paintDecoration()
255         https://bugs.webkit.org/show_bug.cgi?id=59109
256         
257         Remove an extraneous GraphicsContext::save() in InlineTextBox::paintDecoration().
258         
259         Add an assertion that fires when a GraphicsContext() is destroyed with a non-
260         empty state stack. Fix canvas to avoid this assertion, since bad content might
261         trigger it.
262         
263         Also add an assertion that fires for mismatched begin/endTransparencyLayers.
264
265         Test: fast/text/multiple-text-shadow-alpha.html
266
267         * html/HTMLCanvasElement.cpp:
268         (WebCore::HTMLCanvasElement::~HTMLCanvasElement):
269         Make sure that the CanvasRenderingContext goes away before the ImageBuffer,
270         so that CanvasRenderingContext2D has a chance to unwind the state stack in
271         the ImageBuffer's GraphicsContext.
272         
273         * html/canvas/CanvasRenderingContext2D.cpp:
274         (WebCore::CanvasRenderingContext2D::~CanvasRenderingContext2D):
275         Balance unmatched state saves in the canvas context.
276         
277         * platform/graphics/GraphicsContext.cpp:
278         (WebCore::GraphicsContext::~GraphicsContext):
279         Assert that the stack is empty.
280         
281         * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
282         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
283         (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
284         (WebCore::GraphicsContextPlatformPrivate::beginTransparencyLayer):
285         (WebCore::GraphicsContextPlatformPrivate::endTransparencyLayer):
286         Changes to allow for asserting for unmatched transparency layer begin/ends.
287         
288         * rendering/InlineTextBox.cpp:
289         (WebCore::InlineTextBox::paintDecoration):
290         Remove an unbalanced save().
291
292 2011-04-22  Pavel Feldman  <pfeldman@google.com>
293
294         Reviewed by Yury Semikhatsky.
295
296         Web Inspector: add Save As context menu item to the TextViewer.
297         https://bugs.webkit.org/show_bug.cgi?id=59196
298
299         * inspector/front-end/ResourceView.js:
300         (WebInspector.ResourceSourceFrame.prototype.requestContent):
301         (WebInspector.ResourceSourceFrame.prototype.suggestedFileName):
302         (WebInspector.RevisionSourceFrame.prototype.requestContent):
303         (WebInspector.RevisionSourceFrame.prototype.suggestedFileName):
304         * inspector/front-end/ScriptsPanel.js:
305         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
306         (WebInspector.SourceFrameDelegateForScriptsPanel):
307         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.formatSourceFilesToggled):
308         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.suggestedFileName):
309         * inspector/front-end/SourceFrame.js:
310         (WebInspector.SourceFrame.prototype._initializeTextViewer):
311         (WebInspector.SourceFrame.prototype.populateTextAreaContextMenu):
312         (WebInspector.SourceFrame.prototype.suggestedFileName):
313         (WebInspector.SourceFrameDelegate.prototype.formatSourceFilesToggled):
314         (WebInspector.SourceFrameDelegate.prototype.suggestedFileName):
315         * inspector/front-end/TextViewer.js:
316         (WebInspector.TextViewer.prototype._contextMenu):
317         (WebInspector.TextViewerDelegate.prototype.cancelEditing):
318         (WebInspector.TextViewerDelegate.prototype.populateLineGutterContextMenu):
319         (WebInspector.TextViewerDelegate.prototype.populateTextAreaContextMenu):
320         (WebInspector.TextViewerDelegate.prototype.suggestedFileName):
321
322 2011-04-22  Mikhail Naganov  <mnaganov@chromium.org>
323
324         Reviewed by Pavel Feldman.
325
326         Web Inspector: [Chromium] Move detailed heap snapshots storage and processing into workers.
327         https://bugs.webkit.org/show_bug.cgi?id=59094
328
329         * WebCore.gypi:
330         * WebCore.vcproj/WebCore.vcproj:
331         * gyp/streamline-inspector-source.sh:
332         * inspector/front-end/DetailedHeapshotGridNodes.js:
333         (WebInspector.HeapSnapshotGridNode.prototype.dispose):
334         (WebInspector.HeapSnapshotObjectNode.prototype._createProvider):
335         (WebInspector.HeapSnapshotInstanceNode.prototype._createProvider):
336         (WebInspector.HeapSnapshotConstructorNode.prototype._createNodesProvider):
337         (WebInspector.HeapSnapshotIteratorsTuple.prototype.dispose):
338         (WebInspector.HeapSnapshotDiffNode.prototype.calculateDiff.diffCalculated):
339         (WebInspector.HeapSnapshotDiffNode.prototype._createNodesProvider.createProvider):
340         (WebInspector.HeapSnapshotDiffNode.prototype._createNodesProvider):
341         (WebInspector.HeapSnapshotDominatorObjectNode.prototype._createProvider):
342         (MixInSnapshotNodeFunctions):
343         * inspector/front-end/DetailedHeapshotView.js:
344         (WebInspector.HeapSnapshotSortableDataGrid.prototype.dispose):
345         (WebInspector.HeapSnapshotSortableDataGrid.prototype.resetSortingCache):
346         (WebInspector.HeapSnapshotDiffDataGrid.prototype.setBaseDataSource):
347         (WebInspector.HeapSnapshotRetainingPathsList.prototype.dispose):
348         (WebInspector.HeapSnapshotRetainingPathsList.prototype._resetPaths):
349         (WebInspector.HeapSnapshotRetainingPathsList.prototype.setDataSource):
350         (WebInspector.HeapSnapshotRetainingPathsList.prototype.showNext):
351         (WebInspector.HeapSnapshotRetainingPathsList.prototype.searchCancelled):
352         (WebInspector.HeapSnapshotRetainingPathsList.prototype._setRootChildrenForFinder):
353         (WebInspector.DetailedHeapshotView.prototype.dispose):
354         (WebInspector.DetailedHeapshotView.prototype.get profileWrapper):
355         (WebInspector.DetailedHeapshotView.prototype.get baseProfileWrapper):
356         * inspector/front-end/HeapSnapshot.js:
357         (WebInspector.HeapSnapshotLoader):
358         (WebInspector.HeapSnapshotLoader.prototype.finishLoading):
359         (WebInspector.HeapSnapshotLoader.prototype.pushJSONChunk):
360         (WebInspector.HeapSnapshot.prototype.pushBaseIds):
361         (WebInspector.HeapSnapshot.prototype.createDiff):
362         (WebInspector.HeapSnapshot.prototype._parseFilter):
363         (WebInspector.HeapSnapshot.prototype.createEdgesProvider):
364         (WebInspector.HeapSnapshot.prototype.createNodesProvider):
365         (WebInspector.HeapSnapshot.prototype.createPathFinder):
366         (WebInspector.HeapSnapshot.prototype.updateStaticData):
367         (WebInspector.HeapSnapshotPathFinder):
368         (WebInspector.HeapSnapshotPathFinder.prototype.updateRoots):
369         (WebInspector.HeapSnapshotPathFinder.prototype._reset):
370         * inspector/front-end/HeapSnapshotProxy.js:
371         (WebInspector.HeapSnapshotRealWorker):
372         (WebInspector.HeapSnapshotRealWorker.prototype._messageReceived):
373         (WebInspector.HeapSnapshotRealWorker.prototype.postMessage):
374         (WebInspector.HeapSnapshotRealWorker.prototype.terminate):
375         (WebInspector.HeapSnapshotFakeWorker):
376         (WebInspector.HeapSnapshotFakeWorker.prototype.postMessage):
377         (WebInspector.HeapSnapshotFakeWorker.prototype.terminate):
378         (WebInspector.HeapSnapshotFakeWorker.prototype._postMessageFromWorker):
379         (WebInspector.HeapSnapshotWorker):
380         (WebInspector.HeapSnapshotWorker.prototype.createObject):
381         (WebInspector.HeapSnapshotWorker.prototype.dispose):
382         (WebInspector.HeapSnapshotWorker.prototype.disposeObject):
383         (WebInspector.HeapSnapshotWorker.prototype.callGetter):
384         (WebInspector.HeapSnapshotWorker.prototype.callFactoryMethod.wrapCallback):
385         (WebInspector.HeapSnapshotWorker.prototype.callFactoryMethod):
386         (WebInspector.HeapSnapshotWorker.prototype.callMethod):
387         (WebInspector.HeapSnapshotWorker.prototype._findFunction):
388         (WebInspector.HeapSnapshotWorker.prototype._messageReceived):
389         (WebInspector.HeapSnapshotWorker.prototype._postMessage):
390         (WebInspector.HeapSnapshotProxyObject):
391         (WebInspector.HeapSnapshotProxyObject.prototype._callWorker):
392         (WebInspector.HeapSnapshotProxyObject.prototype.dispose):
393         (WebInspector.HeapSnapshotProxyObject.prototype.disposeWorker):
394         (WebInspector.HeapSnapshotProxyObject.prototype.callFactoryMethod):
395         (WebInspector.HeapSnapshotProxyObject.prototype.callGetter):
396         (WebInspector.HeapSnapshotProxyObject.prototype.callMethod):
397         (WebInspector.HeapSnapshotLoaderProxy):
398         (WebInspector.HeapSnapshotLoaderProxy.prototype.finishLoading.callLoadCallbacks):
399         (WebInspector.HeapSnapshotLoaderProxy.prototype.finishLoading.updateStaticData):
400         (WebInspector.HeapSnapshotLoaderProxy.prototype.finishLoading):
401         (WebInspector.HeapSnapshotLoaderProxy.prototype.get loaded):
402         (WebInspector.HeapSnapshotLoaderProxy.prototype.startLoading):
403         (WebInspector.HeapSnapshotLoaderProxy.prototype.pushJSONChunk):
404         (WebInspector.HeapSnapshotProxy):
405         (WebInspector.HeapSnapshotProxy.prototype.aggregates):
406         (WebInspector.HeapSnapshotProxy.prototype.createDiff):
407         (WebInspector.HeapSnapshotProxy.prototype.createEdgesProvider):
408         (WebInspector.HeapSnapshotProxy.prototype.createNodesProvider):
409         (WebInspector.HeapSnapshotProxy.prototype.createPathFinder):
410         (WebInspector.HeapSnapshotProxy.prototype.dispose):
411         (WebInspector.HeapSnapshotProxy.prototype.finishLoading):
412         (WebInspector.HeapSnapshotProxy.prototype.get loaded):
413         (WebInspector.HeapSnapshotProxy.prototype.get nodeCount):
414         (WebInspector.HeapSnapshotProxy.prototype.nodeFieldValuesByIndex):
415         (WebInspector.HeapSnapshotProxy.prototype.pushBaseIds):
416         (WebInspector.HeapSnapshotProxy.prototype.get rootNodeIndex):
417         (WebInspector.HeapSnapshotProxy.prototype.updateStaticData):
418         (WebInspector.HeapSnapshotProxy.prototype.startLoading):
419         (WebInspector.HeapSnapshotProxy.prototype.get totalSize):
420         (WebInspector.HeapSnapshotProxy.prototype.get uid):
421         (WebInspector.HeapSnapshotProviderProxy):
422         (WebInspector.HeapSnapshotProviderProxy.prototype.isEmpty):
423         (WebInspector.HeapSnapshotProviderProxy.prototype.serializeNextItems):
424         (WebInspector.HeapSnapshotProviderProxy.prototype.sortAndRewind):
425         (WebInspector.HeapSnapshotPathFinderProxy):
426         (WebInspector.HeapSnapshotPathFinderProxy.prototype.findNext):
427         (WebInspector.HeapSnapshotPathFinderProxy.prototype.updateRoots):
428         (WebInspector.HeapSnapshotsDiffProxy):
429         (WebInspector.HeapSnapshotsDiffProxy.prototype.calculate):
430         (WebInspector.HeapSnapshotsDiffProxy.prototype.pushBaseIds):
431         (WebInspector.HeapSnapshotsDiffProxy.prototype.pushBaseSelfSizes):
432         * inspector/front-end/HeapSnapshotWorker.js: Added.
433         (WebInspector.UIString):
434         (postMessageWrapper):
435         * inspector/front-end/HeapSnapshotWorkerDispatcher.js: Added.
436         (WebInspector.HeapSnapshotWorkerDispatcher):
437         (WebInspector.HeapSnapshotWorkerDispatcher.prototype._findFunction):
438         (WebInspector.HeapSnapshotWorkerDispatcher.prototype.dispatchMessage):
439         * inspector/front-end/ProfilesPanel.js:
440         (WebInspector.ProfilesPanel.prototype.loadHeapSnapshot):
441         (WebInspector.ProfilesPanel.prototype._finishHeapSnapshot.else.parsed):
442         (WebInspector.ProfilesPanel.prototype._finishHeapSnapshot):
443         * inspector/front-end/WebKit.qrc:
444         * inspector/front-end/inspector.html:
445
446 2011-04-22  Pavel Podivilov  <podivilov@chromium.org>
447
448         Reviewed by Pavel Feldman.
449
450         Web Inspector: fix de-obfuscation of scripts inlined in html.
451         https://bugs.webkit.org/show_bug.cgi?id=58538
452
453         Use html tokenizer to find script boundaries instead of relying on scriptParsed events.
454
455         Test: inspector/debugger/script-formatter.html
456
457         * WebCore.gypi:
458         * WebCore.vcproj/WebCore.vcproj:
459         * inspector/front-end/JavaScriptFormatter.js: Renamed from Source/WebCore/inspector/front-end/UglifyJS/JavaScriptFormatter.js.
460         * inspector/front-end/ScriptFormatter.js:
461         (WebInspector.ScriptFormatter):
462         (WebInspector.ScriptFormatter.prototype.formatContent):
463         (WebInspector.ScriptFormatter.prototype._didFormatContent):
464         * inspector/front-end/ScriptFormatterWorker.js:
465         (onmessage):
466         (formatScript):
467         (HTMLScriptFormatter):
468         (HTMLScriptFormatter.prototype.format):
469         (HTMLScriptFormatter.prototype.scriptStarted):
470         (HTMLScriptFormatter.prototype.scriptEnded):
471         (HTMLScriptFormatter.prototype.styleSheetStarted):
472         (HTMLScriptFormatter.prototype.styleSheetEnded):
473         * inspector/front-end/SourceFile.js:
474         (WebInspector.FormattedSourceFile.prototype._didRequestContent):
475         * inspector/front-end/SourceHTMLTokenizer.js:
476         (WebInspector.SourceHTMLTokenizer.prototype.scriptStarted):
477         (WebInspector.SourceHTMLTokenizer.prototype.scriptEnded):
478         (WebInspector.SourceHTMLTokenizer.prototype.styleSheetStarted):
479         (WebInspector.SourceHTMLTokenizer.prototype.styleSheetEnded):
480         (WebInspector.SourceHTMLTokenizer.prototype.nextToken):
481         * inspector/front-end/SourceHTMLTokenizer.re2js:
482         * inspector/front-end/WebKit.qrc:
483
484 2011-04-22  Andrey Kosyakov  <caseq@chromium.org>
485
486         Reviewed by Pavel Feldman.
487
488         Web Inspector: [Extensions API] misc API cleanup
489         https://bugs.webkit.org/show_bug.cgi?id=59194
490
491         * inspector/front-end/ExtensionAPISchema.json:
492         * inspector/front-end/ExtensionPanel.js:
493         (WebInspector.ExtensionSidebarPane.prototype._setObject):
494
495 2011-04-21  Pavel Feldman  <pfeldman@google.com>
496
497         Reviewed by Yury Semikhatsky.
498
499         Web Inspector: group content scripts in the scripts panel drop down.
500         https://bugs.webkit.org/show_bug.cgi?id=59108
501
502         * English.lproj/localizedStrings.js:
503         * inspector/front-end/ScriptsPanel.js:
504         (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect.optionCompare):
505         (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect):
506
507 2011-04-22  Mike West  <mkwst@google.com>
508
509         Reviewed by Pavel Feldman.
510
511         Web Inspector: Tiny improvement to UI for adding an XHR breakpoint
512         https://bugs.webkit.org/show_bug.cgi?id=59100
513
514         Improve web inspector UI around adding XHR breakpoints by adding
515         a textual label to the input-like `span` used to specify which
516         XHR requests the breakpoint ought to target.
517
518         * inspector/front-end/BreakpointsSidebarPane.js:
519         (WebInspector.XHRBreakpointsSidebarPane.prototype._addButtonClicked.finishEditing):
520         (WebInspector.XHRBreakpointsSidebarPane.prototype._addButtonClicked):
521         * inspector/front-end/inspector.css:
522         (#breakpoint-condition-input):
523
524 2011-04-22  Pavel Podivilov  <podivilov@chromium.org>
525
526         Reviewed by Pavel Feldman.
527
528         Web Inspector: js formatter should never insert new tokens or remove existing tokens and comments.
529         https://bugs.webkit.org/show_bug.cgi?id=59191
530
531         * WebCore.gypi:
532         * WebCore.vcproj/WebCore.vcproj:
533         * inspector/front-end/ScriptFormatter.js:
534         (WebInspector.ScriptFormatter.prototype.formatContent.didFormatChunks):
535         (WebInspector.ScriptFormatter.prototype.formatContent):
536         * inspector/front-end/ScriptFormatterWorker.js:
537         (onmessage):
538         * inspector/front-end/SourceFile.js:
539         (WebInspector.SourceFile.prototype._loadResourceContent):
540         (WebInspector.FormattedSourceFile.prototype._didRequestContent):
541         (WebInspector.FormattedSourceMapping):
542         (WebInspector.FormattedSourceMapping.prototype.scriptLocationToSourceLine):
543         (WebInspector.FormattedSourceMapping.prototype.sourceLineToScriptLocation):
544         (WebInspector.FormattedSourceMapping.prototype._convertPosition):
545         * inspector/front-end/UglifyJS/JavaScriptFormatter.js: Added.
546         (FormattedContentBuilder): Helper class for building formatted script content.
547         (FormattedContentBuilder.prototype.addToken):
548         (FormattedContentBuilder.prototype.addSpace):
549         (FormattedContentBuilder.prototype.addNewLine):
550         (FormattedContentBuilder.prototype.increaseNestingLevel):
551         (FormattedContentBuilder.prototype.decreaseNestingLevel):
552         (FormattedContentBuilder.prototype.content):
553         (FormattedContentBuilder.prototype.mapping):
554         (Tokenizer): Wrapper class for UglifyJS tokenizer.
555         (Tokenizer.prototype.content):
556         (Tokenizer.prototype.next):
557         (Tokenizer.prototype._convertUglifyToken):
558         (JavaScriptFormatter): New formatter based on UglifyJS tokenizer.
559         (JavaScriptFormatter.prototype.format):
560         * inspector/front-end/UglifyJS/process.js: Removed.
561         * inspector/front-end/WebKit.qrc:
562
563 2011-04-22  Mikhail Naganov  <mnaganov@chromium.org>
564
565         Reviewed by Pavel Feldman.
566
567         Web Inspector: [Chromium] Refactor code prior to moving detailed heap snapshots into workers.
568         https://bugs.webkit.org/show_bug.cgi?id=59189
569
570         * WebCore.gypi:
571         * WebCore.vcproj/WebCore.vcproj:
572         * inspector/front-end/BinarySearch.js: Added.
573         * inspector/front-end/DetailedHeapshotGridNodes.js:
574         (WebInspector.HeapSnapshotGridNode.prototype._populate.sorted):
575         (WebInspector.HeapSnapshotGridNode.prototype._populate):
576         (WebInspector.HeapSnapshotGridNode.prototype.populateChildren):
577         (WebInspector.HeapSnapshotGridNode.prototype.sort.afterSort.afterPopulate):
578         (WebInspector.HeapSnapshotGridNode.prototype.sort.afterSort):
579         (WebInspector.HeapSnapshotGridNode.prototype.sort):
580         (WebInspector.HeapSnapshotObjectNode):
581         (WebInspector.HeapSnapshotObjectNode.prototype._createChildNode):
582         (WebInspector.HeapSnapshotInstanceNode.prototype._createChildNode):
583         (WebInspector.HeapSnapshotInstanceNode.prototype._enhanceData):
584         (WebInspector.HeapSnapshotInstanceNode.prototype.get isDeletedNode):
585         (WebInspector.HeapSnapshotDiffNode.prototype.calculateDiff.diffCalculated):
586         (WebInspector.HeapSnapshotDiffNode.prototype.calculateDiff.baseIdsReceived):
587         (WebInspector.HeapSnapshotDiffNode.prototype.get data):
588         * inspector/front-end/DetailedHeapshotView.js:
589         (WebInspector.HeapSnapshotSortableDataGrid.prototype.sortingChanged.sort):
590         (WebInspector.HeapSnapshotSortableDataGrid.prototype.sortingChanged):
591         (WebInspector.HeapSnapshotSortableDataGrid.prototype._performSorting):
592         (WebInspector.HeapSnapshotSortableDataGrid.prototype.recursiveSortingEnter):
593         (WebInspector.HeapSnapshotSortableDataGrid.prototype.recursiveSortingLeave):
594         (WebInspector.HeapSnapshotContainmentDataGrid):
595         (WebInspector.HeapSnapshotContainmentDataGrid.prototype._defaultPopulateCount.100.setDataSource):
596         (WebInspector.HeapSnapshotContainmentDataGrid.prototype.sortingChanged):
597         (WebInspector.HeapSnapshotDiffDataGrid.prototype.setBaseDataSource):
598         (WebInspector.HeapSnapshotDiffDataGrid.prototype.populateChildren.baseAggregatesReceived.aggregatesReceived.addNodeIfNonZeroDiff):
599         (WebInspector.HeapSnapshotDiffDataGrid.prototype.populateChildren.baseAggregatesReceived.aggregatesReceived):
600         (WebInspector.HeapSnapshotDiffDataGrid.prototype.populateChildren):
601         (WebInspector.HeapSnapshotDominatorsDataGrid):
602         (WebInspector.HeapSnapshotDominatorsDataGrid.prototype._defaultPopulateCount.25.setDataSource):
603         (WebInspector.HeapSnapshotDominatorsDataGrid.prototype.sortingChanged):
604         (WebInspector.HeapSnapshotRetainingPathsList.prototype._performSorting):
605         (WebInspector.DetailedHeapshotView.prototype._changeBase.baseProfileLoaded):
606         (WebInspector.DetailedHeapshotView.prototype._changeBase):
607         (WebInspector.DetailedHeapshotView.prototype._changeView):
608         (WebInspector.DetailedHeapshotView.prototype._showStringContentPopup.displayString):
609         (WebInspector.DetailedHeapshotView.prototype._showStringContentPopup):
610         * inspector/front-end/HeapSnapshot.js:
611         (WebInspector.HeapSnapshot.prototype.dispose):
612         (WebInspector.HeapSnapshot.prototype.pushBaseNodeIds):
613         (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.serializeNextItems):
614         (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.sortAndRewind):
615         (WebInspector.HeapSnapshotEdgesProvider.prototype._serialize):
616         (WebInspector.HeapSnapshotNodesProvider.prototype._serialize):
617         (WebInspector.HeapSnapshotsDiff.prototype.calculate):
618         (WebInspector.HeapSnapshotsDiff.prototype.pushBaseIds):
619         (WebInspector.HeapSnapshotsDiff.prototype.pushBaseSelfSizes):
620         * inspector/front-end/HeapSnapshotProxy.js:
621         (WebInspector.HeapSnapshotProxy.prototype.createEdgesProvider):
622         (WebInspector.HeapSnapshotProxy.prototype.createNodesProvider):
623         (WebInspector.HeapSnapshotProxy.prototype.pushBaseIds):
624         (WebInspector.HeapSnapshotProviderProxy):
625         (WebInspector.HeapSnapshotProviderProxy.prototype.serializeNextItems):
626         (WebInspector.HeapSnapshotProviderProxy.prototype.sortAndRewind):
627         (WebInspector.HeapSnapshotsDiffProxy.prototype.pushBaseIds):
628         (WebInspector.HeapSnapshotsDiffProxy.prototype.pushBaseSelfSizes):
629         * inspector/front-end/PleaseWaitMessage.js:
630         (WebInspector.PleaseWaitMessage.prototype.showAndWaitFor):
631         (WebInspector.PleaseWaitMessage.prototype.unlistenAndHide):
632         * inspector/front-end/WebKit.qrc:
633         * inspector/front-end/inspector.html:
634         * inspector/front-end/utilities.js:
635
636 2011-04-22  Mikhail Naganov  <mnaganov@chromium.org>
637
638         Unreviewed fix after r84484 -- conditional statement was inverted incorrectly.
639
640         * inspector/front-end/ProfilesPanel.js:
641         (WebInspector.ProfilesPanel.prototype.handleShortcut):
642
643 2011-04-22  Annie Sullivan  <sullivan@chromium.org>
644
645         Reviewed by Pavel Feldman.
646
647         Web Inspector: Timeline is too narrow
648         https://bugs.webkit.org/show_bug.cgi?id=58399
649
650         Changed Network Panel widths so that Timeline is 50%.
651         Added titles to the values in the other columns, so that a tooltip will show the value if the column is too narrow.
652
653         * inspector/front-end/NetworkPanel.js:
654         (WebInspector.NetworkPanel.prototype._createTable):  Changed column widths.
655         (WebInspector.NetworkPanel.prototype._toggleGridMode): Changed column widths.
656         (WebInspector.NetworkDataGridNode.prototype.refreshResource): Added titles to column values.
657         (WebInspector.NetworkDataGridNode.prototype._refreshStatusCell): Ditto
658         (WebInspector.NetworkDataGridNode.prototype._refreshSizeCell): Ditto
659         (WebInspector.NetworkDataGridNode.prototype._refreshTimeCell): Ditto
660         * inspector/front-end/utilities.js:
661         (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.
662
663 2011-04-22  Dan Bernstein  <mitz@apple.com>
664
665         Reviewed by Maciej Stachowiak.
666
667         <rdar://problem/9322486> REGRESSION (r83397): Default controls fade out when playing audio-only media
668         https://bugs.webkit.org/show_bug.cgi?id=59180
669
670         Test: media/audio-controls-do-not-fade-out.html
671
672         * html/HTMLMediaElement.cpp:
673         (WebCore::HTMLMediaElement::playbackProgressTimerFired): Only start fading out the controls if there is
674         a video track.
675
676 2011-04-22  Luke Macpherson   <macpherson@chromium.org>
677
678         Reviewed by Eric Seidel.
679
680         Add FontItalics and FontSmallCaps enums to be used instead of boolean values.
681         https://bugs.webkit.org/show_bug.cgi?id=59080
682
683         No new tests as no new functionality added.
684
685         * css/CSSPrimitiveValueMappings.h:
686         Add casts to/from FontItalics and FontSmallCaps
687         * css/CSSStyleSelector.cpp:
688         Use new casts defined in PrimitiveValueMappings.h
689         * platform/graphics/Font.h:
690         Use FontItalics enum.
691         * platform/graphics/FontDescription.h:
692         Define and use FontItalics and FontSmallCaps enums.
693
694 2011-04-21  Andrey Kosyakov  <caseq@chromium.org>
695
696         Reviewed by Yury Semikhatsky.
697
698         Web Inspector: exception in front-end when user selects resource info for resource that does not have response headers yet
699         https://bugs.webkit.org/show_bug.cgi?id=59123
700
701         * inspector/front-end/ResourceCookiesView.js:
702         (WebInspector.ResourceCookiesView):
703         (WebInspector.ResourceCookiesView.prototype.show):
704         (WebInspector.ResourceCookiesView.prototype.get _gotCookies):
705         (WebInspector.ResourceCookiesView.prototype._buildCookiesTable):
706
707 2011-04-21  Beth Dakin  <bdakin@apple.com>
708
709         Reviewed by Dan Bernstein.
710
711         https://bugs.webkit.org/show_bug.cgi?id=57898
712         REGRESSION (r82185): Scroll position not restored on navigation back to a page in 
713         the page cache
714         -and corresponding-
715         <rdar://problem/9226652>
716
717         The original fix for this change broke scroll-position restore for pages that are 
718         *not* in the page cache. This patch fixes both cached and non-cached pages by 
719         using the cachedScrollPosition() only for cached pages.
720         * loader/HistoryController.cpp:
721         (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
722
723 2011-04-21  Luke Macpherson   <macpherson@chromium.org>
724
725         Reviewed by Eric Seidel.
726
727         Remove redundant calls to RenderStyle::setDisplay()
728         https://bugs.webkit.org/show_bug.cgi?id=59060
729
730         No new tests / no new functionality added.
731
732         * css/CSSStyleSelector.cpp:
733         (WebCore::CSSStyleSelector::applyProperty):
734         Remove redundant calls to RenderStyle::setDisplay()
735
736 2011-04-21  John Bauman  <jbauman@chromium.org>
737
738         Reviewed by Kenneth Russell.
739
740         WebGL context drawing buffer may not be cleared if FBO bound
741         https://bugs.webkit.org/show_bug.cgi?id=58956
742
743         Clear the drawing buffer even if it's not currently bound, by
744         switching between FBOs around the clear. Also, make sure that we
745         handle depth and stencil masks properly.
746
747         No new tests, because testing this under DRT doesn't work.
748
749         * html/canvas/WebGLRenderingContext.cpp:
750         (WebCore::WebGLRenderingContext::initializeNewContext):
751         (WebCore::WebGLRenderingContext::clearIfComposited):
752         (WebCore::WebGLRenderingContext::depthMask):
753         * html/canvas/WebGLRenderingContext.h:
754         *
755 2011-04-21  Chris Fleizach  <cfleizach@apple.com>
756
757         Reviewed by Beth Dakin.
758
759         WebKit is erroneously modifying the DOM; adding 'aria-selected' to tables
760         https://bugs.webkit.org/show_bug.cgi?id=59140
761
762         WebKit should not modify the DOM when the screen reader requests certain things be set. There is no
763         specification that allows this behavior yet, but we are working on something for the future.
764
765         * accessibility/AccessibilityRenderObject.cpp:
766         (WebCore::AccessibilityRenderObject::setARIAGrabbed):
767         (WebCore::AccessibilityRenderObject::setIsExpanded):
768         (WebCore::AccessibilityRenderObject::setSelected):
769         (WebCore::AccessibilityRenderObject::setValue):
770
771 2011-04-21  Chris Fleizach  <cfleizach@apple.com>
772
773         Reviewed by Beth Dakin.
774
775         AX: order AccessibilityRole alphabetically
776         https://bugs.webkit.org/show_bug.cgi?id=31524
777
778         * accessibility/AccessibilityObject.h:
779
780 2011-04-21  Jia Pu  <jpu@apple.com>
781
782         Reviewed by Maciej Stachowiak.
783
784         [Mac] correctionPanelTimerFired() crashes due to rangeToBeReplaced being cleared.
785         https://bugs.webkit.org/show_bug.cgi?id=59155
786         <rdar://problem/9261698>
787
788         Make sure the range isn't cleared before calling windowRectForRange() on it. Also removed unused functions in Editor.h,
789         and fixed a typo in function name.
790
791         * editing/Editor.h:
792         * editing/SpellingCorrectionController.cpp:
793         (WebCore::SpellingCorrectionController::correctionPanelTimerFired):
794         (WebCore::SpellingCorrectionController::respondToChangedSelection):
795         * editing/SpellingCorrectionController.h:
796         (WebCore::SpellingCorrectionController::shouldStartTimerFor):
797
798 2011-04-21  Maciej Stachowiak  <mjs@apple.com>
799
800         Reviewed by Adam Roben.
801
802         Add a feature define to allow <details> and <summary> to be disabled
803         https://bugs.webkit.org/show_bug.cgi?id=59118
804         <rdar://problem/9257045>
805
806         No new tests; no behavior change.
807
808         * Configurations/FeatureDefines.xcconfig:
809         * DerivedSources.make:
810         * GNUmakefile.am:
811         * features.pri:
812         * html/HTMLDetailsElement.cpp:
813         * html/HTMLSummaryElement.cpp:
814         * html/HTMLTagNames.in:
815         * html/shadow/DetailsMarkerControl.cpp:
816         * rendering/RenderBlock.cpp:
817         (WebCore::canMergeContiguousAnonymousBlocks):
818         * rendering/RenderDetails.cpp:
819         * rendering/RenderDetails.h:
820         * rendering/RenderDetailsMarker.cpp:
821         * rendering/RenderDetailsMarker.h:
822         * rendering/RenderObject.h:
823         * rendering/RenderSummary.cpp:
824         * rendering/RenderSummary.h:
825         * rendering/RenderTreeAsText.cpp:
826         (WebCore::RenderTreeAsText::writeRenderObject):
827
828 2011-04-21  Dimitri Glazkov  <dglazkov@chromium.org>
829
830         Reviewed by Adele Peterson.
831
832         REGRESSION (r83386): Typing in WSJ.com search field doesn't clear placeholder text
833         https://bugs.webkit.org/show_bug.cgi?id=59053
834
835         Turns out, the relatedTarget of an event could be also an ancestor of an event,
836         not just its parent. Duh.
837
838         * dom/EventDispatcher.cpp:
839         (WebCore::EventDispatcher::adjustToShadowBoundaries): Changed to use shadowHost
840             explicitly.
841
842 2011-04-21  Michael Saboff  <msaboff@apple.com>
843
844         Reviewed by Maciej Stachowiak.
845
846         Qualified names used for all TagName access, yet namespace usage is rare
847         https://bugs.webkit.org/show_bug.cgi?id=58997
848
849         The methods getElementsByTagName and getElementsByTagNameNS where
850         always creating and using QualifiedNames.  QualifiedName::init
851         was consistently in the top 3 routines when running the Dromaeo
852         DOM-query benchmark.  Split out the functionality so that
853         getElementsByTagName uses just the local name, an implied "*"
854         namespace and a separate TagNodeListCache keyed by an atomic name
855         instead of a QualifiedName.  Access to elements via
856         getElementsByTagNameNS that have "*" namespace are forwarded to
857         getElementsByTagName as well.  This provides ~10% speed up in that
858         Dromaeo test.
859
860         No new tests added, existing tests have coverage.  The changes are
861         an optimization of existing functionality.
862
863         * dom/Node.cpp:
864         (WebCore::Node::removeCachedTagNodeList):
865         (WebCore::Node::getElementsByTagName):
866         (WebCore::Node::getElementsByTagNameNS):
867         (WebCore::NodeListsNodeData::invalidateCaches):
868         (WebCore::NodeListsNodeData::isEmpty):
869         * dom/Node.h:
870         * dom/NodeRareData.h:
871         * dom/TagNodeList.cpp:
872         (WebCore::TagNodeList::~TagNodeList):
873
874 2011-04-21  Geoffrey Garen  <ggaren@apple.com>
875
876         Reviewed by Oliver Hunt.
877
878         Removed a use of markDOMObjectWrapper: more style- and node-related stuff
879         https://bugs.webkit.org/show_bug.cgi?id=59127
880
881         * bindings/js/JSCanvasRenderingContextCustom.cpp:
882         * bindings/js/JSCanvasRenderingContextCustom.cpp:
883         (WebCore::JSCanvasRenderingContextOwner::isReachableFromOpaqueRoots):
884         (WebCore::JSCanvasRenderingContextOwner::finalize):
885         (WebCore::wrapperOwner):
886         (WebCore::wrapperContext): Use opaque roots for marking canvas rendering
887         contexts, so JSNode isn't responsible for it.
888
889         * bindings/js/JSElementCustom.cpp:
890         (WebCore::JSElement::markChildren):
891         * bindings/js/JSHTMLCanvasElementCustom.cpp:
892         * bindings/js/JSHTMLLinkElementCustom.cpp:
893         * bindings/js/JSHTMLStyleElementCustom.cpp: Removed obsolete marking code.
894
895         * bindings/js/JSNodeCustom.cpp:
896         (WebCore::isObservable):
897         (WebCore::isReachableFromDOM):
898         (WebCore::JSNodeOwner::isReachableFromOpaqueRoots): Removed a bunch of
899         CSS object model related special cases, since the CSS object model
900         now tracks its own lifetime through the opaque roots system. Removed
901         canvas special case, covered above.
902
903         * bindings/js/JSProcessingInstructionCustom.cpp:
904         * bindings/js/JSWebKitAnimationListCustom.cpp:
905         * dom/ProcessingInstruction.idl:
906         * html/HTMLCanvasElement.idl:
907         * html/HTMLLinkElement.idl:
908         * html/HTMLStyleElement.idl:
909         * page/WebKitAnimationList.idl: Removed obsolete marking code.
910
911 2011-04-21  Vangelis Kokkevis  <vangelis@chromium.org>
912
913         Reviewed by James Robinson.
914
915         [chromium] Only update the contents of layers that are going to
916         be drawn. Remove individual texture unreserves that happen
917         after the layer draw calls with a single unreserve for all the
918         textures in the texture manager.
919         https://bugs.webkit.org/show_bug.cgi?id=59129
920
921         Tests: No new functionality.  Covered by existing layout tests.
922
923         * platform/graphics/chromium/ContentLayerChromium.cpp:
924         (WebCore::ContentLayerChromium::draw):
925         * platform/graphics/chromium/ContentLayerChromium.h:
926         * platform/graphics/chromium/ImageLayerChromium.cpp:
927         (WebCore::ImageLayerChromium::paintContentsIfDirty):
928         (WebCore::ImageLayerChromium::updateCompositorResources):
929         * platform/graphics/chromium/LayerRendererChromium.cpp:
930         (WebCore::LayerRendererChromium::drawRootLayer):
931         (WebCore::LayerRendererChromium::updateAndDrawLayers):
932         (WebCore::LayerRendererChromium::updateLayers):
933         (WebCore::LayerRendererChromium::paintLayerContents):
934         * platform/graphics/chromium/LayerRendererChromium.h:
935         * platform/graphics/chromium/LayerTexture.cpp:
936         * platform/graphics/chromium/LayerTexture.h:
937         * platform/graphics/chromium/LayerTilerChromium.cpp:
938         * platform/graphics/chromium/LayerTilerChromium.h:
939         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
940         (WebCore::RenderSurfaceChromium::drawSurface):
941         * platform/graphics/chromium/TextureManager.cpp:
942         (WebCore::TextureManager::unprotectAllTextures):
943         * platform/graphics/chromium/TextureManager.h:
944         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
945         (WebCore::CCHeadsUpDisplay::draw):
946         * platform/graphics/chromium/cc/CCLayerImpl.h:
947         (WebCore::CCLayerImpl::owner):
948
949 2011-04-21  Ryosuke Niwa  <rniwa@webkit.org>
950
951         Reviewed by Sam Weinig.
952
953         Add Frame* to the argument lists of canCopyCut and canPaste
954         https://bugs.webkit.org/show_bug.cgi?id=59153
955
956         canCopyCut and canPaste now takes Frame* for which supportedCopyCut and supportedPaste are called.
957         This allows editor client to grant copy/cut and paste permissions per origin.
958
959         * editing/EditorCommand.cpp:
960         (WebCore::supportedCopyCut):
961         (WebCore::supportedPaste):
962         * loader/EmptyClients.h:
963         (WebCore::EmptyEditorClient::canCopyCut):
964         (WebCore::EmptyEditorClient::canPaste):
965         * page/EditorClient.h:
966
967 2011-04-21  Oliver Hunt  <oliver@apple.com>
968
969         Whoops, change lost during merge
970
971         * bindings/js/JSEventListener.h:
972
973 2011-04-21  Geoffrey Garen  <ggaren@apple.com>
974
975         Reviewed by Sam Weinig.
976
977         Fixed a failure seen in fast/dom/prototype-inheritance-2.html due to
978         wrong global object use.
979
980         * bindings/js/JSHTMLDocumentCustom.cpp:
981         (WebCore::JSHTMLDocument::nameGetter):
982         (WebCore::JSHTMLDocument::all):
983         * bindings/js/JSHTMLFormElementCustom.cpp:
984         (WebCore::JSHTMLFormElement::nameGetter): Use the right global object.
985
986 2011-04-21  Oliver Hunt  <oliver@apple.com>
987
988         Reviewed by Geoffrey Garen.
989
990         Start moving to a general visitor pattern for GC traversal
991         https://bugs.webkit.org/show_bug.cgi?id=59141
992
993         This is just a rename:
994             markChildren -> visitChildren
995             markAggregate -> visitAggregate
996             markStack -> visitor
997             MarkStack -> typedef'd to SlotVisitor
998
999         * bindings/js/JSAttrCustom.cpp:
1000         (WebCore::JSAttr::visitChildren):
1001         * bindings/js/JSAudioConstructor.cpp:
1002         (WebCore::constructAudio):
1003         * bindings/js/JSCSSRuleCustom.cpp:
1004         (WebCore::JSCSSRule::visitChildren):
1005         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1006         (WebCore::JSCSSStyleDeclaration::visitChildren):
1007         * bindings/js/JSDOMBinding.cpp:
1008         (WebCore::visitActiveObjectsForContext):
1009         (WebCore::markDOMObjectWrapper):
1010         * bindings/js/JSDOMBinding.h:
1011         * bindings/js/JSDOMGlobalObject.cpp:
1012         (WebCore::JSDOMGlobalObject::visitChildren):
1013         * bindings/js/JSDOMGlobalObject.h:
1014         * bindings/js/JSDOMImplementationCustom.cpp:
1015         (WebCore::JSDOMImplementation::visitChildren):
1016         * bindings/js/JSDOMWindowCustom.cpp:
1017         (WebCore::JSDOMWindow::visitChildren):
1018         * bindings/js/JSDOMWindowShell.cpp:
1019         (WebCore::JSDOMWindowShell::visitChildren):
1020         * bindings/js/JSDOMWindowShell.h:
1021         * bindings/js/JSDocumentCustom.cpp:
1022         (WebCore::JSDocument::visitChildren):
1023         * bindings/js/JSElementCustom.cpp:
1024         (WebCore::JSElement::visitChildren):
1025         * bindings/js/JSEventListener.cpp:
1026         (WebCore::JSEventListener::markJSFunction):
1027         * bindings/js/JSEventListener.h:
1028         * bindings/js/JSHTMLCanvasElementCustom.cpp:
1029         (WebCore::JSHTMLCanvasElement::visitChildren):
1030         * bindings/js/JSHTMLLinkElementCustom.cpp:
1031         (WebCore::JSHTMLLinkElement::visitChildren):
1032         * bindings/js/JSHTMLStyleElementCustom.cpp:
1033         (WebCore::JSHTMLStyleElement::visitChildren):
1034         * bindings/js/JSImageConstructor.cpp:
1035         (WebCore::constructImage):
1036         * bindings/js/JSJavaScriptAudioNodeCustom.cpp:
1037         (WebCore::JSJavaScriptAudioNode::visitChildren):
1038         * bindings/js/JSMessageChannelCustom.cpp:
1039         (WebCore::JSMessageChannel::visitChildren):
1040         * bindings/js/JSMessagePortCustom.cpp:
1041         (WebCore::JSMessagePort::visitChildren):
1042         * bindings/js/JSNamedNodeMapCustom.cpp:
1043         (WebCore::JSNamedNodeMapOwner::isReachableFromOpaqueRoots):
1044         (WebCore::JSNamedNodeMap::visitChildren):
1045         * bindings/js/JSNavigatorCustom.cpp:
1046         (WebCore::JSNavigator::visitChildren):
1047         * bindings/js/JSNodeCustom.cpp:
1048         (WebCore::isObservable):
1049         (WebCore::isReachableFromDOM):
1050         (WebCore::JSNodeOwner::isReachableFromOpaqueRoots):
1051         (WebCore::JSNode::visitChildren):
1052         * bindings/js/JSNodeCustom.h:
1053         * bindings/js/JSNodeFilterCondition.cpp:
1054         (WebCore::JSNodeFilterCondition::WeakOwner::isReachableFromOpaqueRoots):
1055         * bindings/js/JSNodeFilterCondition.h:
1056         * bindings/js/JSNodeFilterCustom.cpp:
1057         (WebCore::JSNodeFilter::visitChildren):
1058         * bindings/js/JSNodeIteratorCustom.cpp:
1059         (WebCore::JSNodeIterator::visitChildren):
1060         * bindings/js/JSNodeListCustom.cpp:
1061         (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
1062         * bindings/js/JSProcessingInstructionCustom.cpp:
1063         (WebCore::JSProcessingInstruction::visitChildren):
1064         * bindings/js/JSSVGElementInstanceCustom.cpp:
1065         (WebCore::JSSVGElementInstance::visitChildren):
1066         * bindings/js/JSSharedWorkerCustom.cpp:
1067         (WebCore::JSSharedWorker::visitChildren):
1068         * bindings/js/JSStyleSheetCustom.cpp:
1069         (WebCore::JSStyleSheet::visitChildren):
1070         * bindings/js/JSTreeWalkerCustom.cpp:
1071         (WebCore::JSTreeWalker::visitChildren):
1072         * bindings/js/JSWebGLRenderingContextCustom.cpp:
1073         (WebCore::JSWebGLRenderingContext::visitChildren):
1074         * bindings/js/JSWebKitAnimationListCustom.cpp:
1075         (WebCore::JSWebKitAnimationList::visitChildren):
1076         * bindings/js/JSWorkerContextCustom.cpp:
1077         (WebCore::JSWorkerContext::visitChildren):
1078         * bindings/js/JSXMLHttpRequestCustom.cpp:
1079         (WebCore::JSXMLHttpRequest::visitChildren):
1080         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
1081         (WebCore::JSXMLHttpRequestUpload::visitChildren):
1082         * bindings/scripts/CodeGeneratorJS.pm:
1083         * bridge/qt/qt_instance.cpp:
1084         (JSC::Bindings::QtRuntimeObject::visitChildren):
1085         (JSC::Bindings::QtInstance::markAggregate):
1086         * bridge/qt/qt_instance.h:
1087         * bridge/qt/qt_pixmapruntime.cpp:
1088         * bridge/qt/qt_runtime.cpp:
1089         (JSC::Bindings::QtRuntimeMetaMethod::visitChildren):
1090         * bridge/qt/qt_runtime.h:
1091         * dom/EventListener.h:
1092         (WebCore::EventListener::visitJSFunction):
1093         * dom/EventTarget.h:
1094         (WebCore::EventTarget::visitJSEventListeners):
1095         * dom/Node.h:
1096         * dom/NodeFilterCondition.h:
1097         (WebCore::NodeFilterCondition::visitAggregate):
1098         * page/DOMWindow.h:
1099         * workers/WorkerContext.h:
1100
1101 2011-04-21  Beth Dakin  <bdakin@apple.com>
1102
1103         Reviewed by Dan Bernstein.
1104
1105         https://bugs.webkit.org/show_bug.cgi?id=59048
1106         Need to track whether overlay scrollbar is currently visible and in lower-
1107         righthand corner
1108         -and corresponding-
1109         <rdar://problem/9211232>
1110
1111         Whenever we start a new ScrollbarPartAnimation, check if the scrollbar is vertical 
1112         and showing (alpha of 1), and if so, call setVisibleScrollerThumbRect with the 
1113         knob rect, otherwise with an empty rect. ScrollAnimatorMac has a local rect to 
1114         track this value so that it can avoid sending messages across the ChromeClient to 
1115         the UIProcess if the rect has not changed.
1116         * platform/mac/ScrollAnimatorMac.h:
1117         * platform/mac/ScrollAnimatorMac.mm:
1118         (-[ScrollbarPainterDelegate setUpAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
1119         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
1120         (WebCore::ScrollAnimatorMac::setVisibleScrollerThumbRect):
1121
1122         Plumbing for the chrome client.
1123         * page/ChromeClient.h:
1124         (WebCore::ChromeClient::notifyScrollerThumbIsVisibleInRect):
1125         * page/FrameView.cpp:
1126         (WebCore::FrameView::setVisibleScrollerThumbRect):
1127         * page/FrameView.h:
1128         * platform/ScrollableArea.h:
1129         (WebCore::ScrollableArea::setVisibleScrollerThumbRect):
1130
1131         New WebCoreSystemInterface function to get the knob rect.
1132         * WebCore.exp.in:
1133         * platform/mac/WebCoreSystemInterface.h:
1134         * platform/mac/WebCoreSystemInterface.mm:
1135
1136 2011-04-21  Nat Duca  <nduca@chromium.org>
1137
1138         Reviewed by James Robinson.
1139
1140         [chromium] Fix artefacts in compositor HUD when resizing
1141         https://bugs.webkit.org/show_bug.cgi?id=58969
1142
1143         HUD was using the tiler program and not setting the texture
1144         transform. The HUD would thus draw with a texture transform based
1145         on the last tile drawn, leading sometimes to distortion.
1146
1147         * platform/graphics/chromium/LayerRendererChromium.cpp:
1148         (WebCore::LayerRendererChromium::initializeSharedObjects):
1149         (WebCore::LayerRendererChromium::cleanupSharedObjects):
1150         * platform/graphics/chromium/LayerRendererChromium.h:
1151         (WebCore::LayerRendererChromium::headsUpDisplayProgram):
1152         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
1153         (WebCore::CCHeadsUpDisplay::draw):
1154         * platform/graphics/chromium/cc/CCHeadsUpDisplay.h:
1155
1156 2011-04-21  Mike Reed  <reed@google.com>
1157
1158         Reviewed by Kenneth Russell.
1159
1160         only return false if we actually in a skia-gpu accelerated canvas for isNativeFontRenderingAllowed
1161         https://bugs.webkit.org/show_bug.cgi?id=59024
1162
1163         No new tests. The bug (and fix) depend on enabling SKIA_GPU. When that is enabled, the bug
1164         shows all text w/o lcd rendering. This is a regression from a recent CL when we switch to
1165         calling skia::SupportsPlatformPaint. This CL fixes that.
1166         There should be no change for the default builds when SKIA_GPU is not enabled.
1167
1168         * platform/graphics/skia/PlatformContextSkia.cpp:
1169         (WebCore::PlatformContextSkia::isNativeFontRenderingAllowed):
1170
1171 2011-04-21  Adrienne Walker  <enne@google.com>
1172
1173         Reviewed by James Robinson.
1174
1175         [chromium] Don't upload partially drawn tiles in the compositor
1176         https://bugs.webkit.org/show_bug.cgi?id=59112
1177
1178         Use the same set of tiles for painting as is used for updating.
1179         Before, a larger set of tiles were being uploaded, causing some to
1180         only be partially undirtied because they were not fully painted.
1181         As tiles are clear their dirty rect after being unpainted, this caused
1182         artifacts to appear when scrolling.
1183
1184         Unfortunately, no layout test can test this behavior yet because
1185         scrolling invalidations are done differently in test shell.
1186
1187         * platform/graphics/chromium/ImageLayerChromium.cpp:
1188         (WebCore::ImageLayerChromium::updateCompositorResources):
1189         * platform/graphics/chromium/LayerTilerChromium.cpp:
1190         (WebCore::LayerTilerChromium::update):
1191         (WebCore::LayerTilerChromium::uploadCanvas):
1192         (WebCore::LayerTilerChromium::updateFromPixels):
1193         * platform/graphics/chromium/LayerTilerChromium.h:
1194
1195 2011-04-21  Ben Taylor  <bentaylor.solx86@gmail.com>
1196
1197         Reviewed by Alexey Proskuryakov.
1198
1199         https://bugs.webkit.org/show_bug.cgi?id=58725
1200
1201         Fix a compile issue on Solaris 10 with Sun Studio 12,
1202         ternary operators (?:) must have the same types
1203
1204         * loader/DocumentLoader.cpp:
1205         (WebCore::DocumentLoader::popArchiveForSubframe):
1206         * loader/archive/ArchiveFactory.cpp:
1207         (WebCore::ArchiveFactory::create):
1208         * loader/icon/IconDatabase.cpp:
1209         (WebCore::IconDatabase::setIconDataForIconURL):
1210         * page/animation/AnimationBase.cpp:
1211         (WebCore::blendFunc):
1212         * rendering/RenderLayer.cpp:
1213         (WebCore::RenderLayer::updateScrollCornerStyle):
1214         (WebCore::RenderLayer::updateResizerStyle):
1215         * rendering/RenderScrollbar.cpp:
1216         (WebCore::RenderScrollbar::updateScrollbarPart):
1217         * rendering/RenderTextFragment.cpp:
1218         (WebCore::RenderTextFragment::RenderTextFragment):
1219
1220 2011-04-21  Mike Reed  <reed@google.com>
1221
1222         Reviewed by Kenneth Russell.
1223
1224         [chromium, win] Multiple failures of shadow rendering layout tests
1225         https://bugs.webkit.org/show_bug.cgi?id=58772
1226
1227         No new tests. This CL fixes a regression in the following tests
1228         fast/multicol/shadow-breaking.html
1229         fast/repaint/shadow-multiple-horizontal.html
1230         fast/repaint/shadow-multiple-strict-horizontal.html
1231         fast/repaint/shadow-multiple-strict-vertical.html
1232         fast/repaint/shadow-multiple-vertical.html
1233         fast/text/shadow-translucent-fill.html
1234         fast/transforms/shadows.html
1235         svg/css/group-with-shadow.svg
1236         svg/css/shadow-changes.svg
1237         svg/css/text-shadow-multiple.xhtml
1238         transitions/svg-text-shadow-transition.html
1239         svg/css/composite-shadow-text.svg
1240  
1241
1242         * platform/graphics/skia/GraphicsContextSkia.cpp:
1243         (WebCore::GraphicsContext::setPlatformShadow):
1244
1245 2011-04-21  Geoffrey Garen  <ggaren@apple.com>
1246
1247         Try to fix the Qt build.
1248
1249         * UseJSC.cmake:
1250         * WebCore.pro: Use correct file name.
1251
1252 2011-04-21  Dirk Schulze  <krit@webkit.org>
1253
1254         Unreviewed Qt build fix.
1255
1256         SVG feDropShadow implementation of SVG Filters 1.2
1257         https://bugs.webkit.org/show_bug.cgi?id=52513
1258
1259         * CodeGenerators.pri:
1260
1261 2011-04-21  Adrienne Walker  <enne@google.com>
1262
1263         Reviewed by James Robinson.
1264
1265         [chromium] Clamp dirty regions on content layers to layer bounds
1266         https://bugs.webkit.org/show_bug.cgi?id=58933
1267
1268         This prevents garbage being rendered when layers are resized and a
1269         previous invalidation (now off-layer) is no longer valid.
1270
1271         * platform/graphics/chromium/ContentLayerChromium.cpp:
1272         (WebCore::ContentLayerChromium::paintContentsIfDirty):
1273
1274 2011-04-21  Roland Steiner  <rolandsteiner@chromium.org>
1275
1276         Reviewed by Kent Tamura.
1277
1278         Bug 59012 - Shadows should be imported along with their host nodes
1279         https://bugs.webkit.org/show_bug.cgi?id=59012
1280
1281         Copy the shadow tree of an element (even on a shallow copy!).
1282
1283         Test: fast/dom/shadow/import-shadowroot.html
1284
1285         * dom/Element.cpp:
1286         (WebCore::Element::copyNonAttributeProperties):
1287         * dom/Element.h:
1288
1289 2011-04-20  Geoffrey Garen  <ggaren@apple.com>
1290
1291         Reviewed by Oliver Hunt.
1292
1293         Removed a use of markDOMObjectWrapper: CSS Object Model
1294         https://bugs.webkit.org/show_bug.cgi?id=59057
1295
1296         This is 24 hours of my life I will never get back. Thank you, W3C.
1297
1298         * GNUmakefile.list.am:
1299         * WebCore.gypi:
1300         * WebCore.vcproj/WebCore.vcproj:
1301         * WebCore.xcodeproj/project.pbxproj: Build!
1302
1303         * bindings/js/JSCSSFontFaceRuleCustom.cpp:
1304         * bindings/js/JSCSSImportRuleCustom.cpp:
1305         * bindings/js/JSCSSMediaRuleCustom.cpp:
1306         * bindings/js/JSCSSPageRuleCustom.cpp:
1307         * bindings/js/JSCSSRuleCustom.cpp:
1308         (WebCore::JSCSSRuleOwner::isReachableFromOpaqueRoots):
1309         (WebCore::JSCSSRuleOwner::finalize):
1310         (WebCore::wrapperOwner):
1311         (WebCore::wrapperContext):
1312         (WebCore::JSCSSRule::markChildren):
1313         * bindings/js/JSCSSRuleListCustom.cpp:
1314         (WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots):
1315         (WebCore::JSCSSRuleListOwner::finalize):
1316         (WebCore::wrapperOwner):
1317         (WebCore::wrapperContext):
1318         (WebCore::toJS):
1319         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1320         (WebCore::JSCSSStyleDeclarationOwner::isReachableFromOpaqueRoots):
1321         (WebCore::JSCSSStyleDeclarationOwner::finalize):
1322         (WebCore::wrapperOwner):
1323         (WebCore::wrapperContext):
1324         (WebCore::JSCSSStyleDeclaration::markChildren): Removed custom mark functions,
1325         and replaced with use of the opaque roots system. This has the nice benefit
1326         of allowing us to eagerly recycle far more CSS wrappers and their associated
1327         DOM wrappers.
1328
1329         (WebCore::JSCSSStyleDeclaration::getPropertyCSSValue): Made this function
1330         custom because it must maintain the sorrowful invariant that primitive
1331         values can be mapped back to objects that are reachable through the DOM.
1332         We maintain this invariant through an external hash table because
1333         making all primitive values bigger would be a too-large memory use
1334         penalty. Luckily, nobody uses this feature, so the cost of the hash table
1335         is no big deal.
1336
1337         (WebCore::toJS): We need a custom toJS so we can specify our own WeakHandleOwner.
1338
1339         * bindings/js/JSCSSStyleRuleCustom.cpp: Removed custom mark, as above.
1340
1341         * bindings/js/JSCSSValueCustom.cpp:
1342         (WebCore::cssValueRoots):
1343         (WebCore::JSCSSValueOwner::isReachableFromOpaqueRoots):
1344         (WebCore::JSCSSValueOwner::finalize):
1345         (WebCore::wrapperOwner):
1346         (WebCore::wrapperContext): Use the opaque roots system. Piggy-back on
1347         the external hash table filled by JSCSSStyleDeclaration::getPropertyCSSValue.
1348
1349         * bindings/js/JSDocumentCustom.cpp:
1350         (WebCore::JSDocument::markChildren): No need to mark our stylesheet list,
1351         since all style-related objects can use our opaque root to determine
1352         liveness.
1353
1354         * bindings/js/JSMediaListCustom.cpp: Added.
1355         (WebCore::JSMediaListOwner::isReachableFromOpaqueRoots):
1356         (WebCore::JSMediaListOwner::finalize):
1357         (WebCore::wrapperOwner):
1358         (WebCore::wrapperContext):
1359         (WebCore::toJS): Use the opaque roots system.
1360
1361         * bindings/js/JSNodeCustom.h:
1362         (WebCore::root): Added helpers for computing style-related roots.
1363
1364         * bindings/js/JSStyleSheetCustom.cpp:
1365         (WebCore::JSStyleSheetOwner::isReachableFromOpaqueRoots):
1366         (WebCore::JSStyleSheetOwner::finalize):
1367         (WebCore::wrapperOwner):
1368         (WebCore::wrapperContext):
1369         (WebCore::JSStyleSheet::markChildren): Use the opaque roots system instead
1370         of direct marking.
1371         
1372         * bindings/js/JSStyleSheetListCustom.cpp:
1373         (WebCore::JSStyleSheetListOwner::isReachableFromOpaqueRoots):
1374         (WebCore::JSStyleSheetListOwner::finalize):
1375         (WebCore::wrapperOwner):
1376         (WebCore::wrapperContext):
1377         (WebCore::toJS): Ditto.
1378
1379         * bindings/js/JSWebKitCSSKeyframeRuleCustom.cpp:
1380         * bindings/js/JSWebKitCSSKeyframesRuleCustom.cpp:
1381         * css/CSSFontFaceRule.idl:
1382         * css/CSSImportRule.idl: No more custom mark, since we use the opaque
1383         roots system instead.
1384
1385         * css/CSSMediaRule.cpp:
1386         (WebCore::CSSMediaRule::CSSMediaRule): Fixed a bug where a media rule
1387         would incorrectly have no parent, since this got in the way of correctly
1388         computing the media rule's root.
1389
1390         * css/CSSMediaRule.idl:
1391         * css/CSSPageRule.idl:
1392         * css/CSSRuleList.idl:
1393         * css/CSSStyleDeclaration.idl:
1394         * css/CSSStyleRule.idl:
1395         * css/MediaList.idl: Match behavior changes above.
1396
1397         * css/StyleBase.cpp:
1398         (WebCore::StyleBase::node): Helper function for computing roots of the
1399         style system. This object model is pretty weird and not very well factored,
1400         but I'm pretty sure this covers all the relevant cases.
1401
1402         * css/StyleBase.h:
1403         * css/StyleSheetList.idl:
1404         * css/WebKitCSSKeyframeRule.idl:
1405         * css/WebKitCSSKeyframesRule.idl: Updated to match the behavior changes above.
1406
1407 2011-04-21  Dirk Schulze  <krit@webkit.org>
1408
1409         Reviewed by Nikolas Zimmermann.
1410
1411         SVG feDropShadow implementation of SVG Filters 1.2
1412         https://bugs.webkit.org/show_bug.cgi?id=52513
1413
1414         This is the implementation of feDropShadow, a shorthand filter and a combination of feGaussianBlur,
1415         feOffset, feFlood and feComposite to create a drop shadow of an input effect.
1416         Creating this new filter effect makes it possible to optimize the often used workflow. ShadowBlur, with its
1417         fast blurring algorithm, is used to blur the shadow and composite operators are responsible for combining the
1418         source with different colored shadows.
1419         Shadow color and opacity can be set with the properties flood-color and flood-opacity.
1420
1421         Tests: svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr.html
1422                svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr.html
1423                svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr.html
1424                svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-color-attr.html
1425                svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-opacity-attr.html
1426                svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr.html
1427                svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop.html
1428                svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop.html
1429                svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop.html
1430                svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-color-prop.html
1431                svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-opacity-prop.html
1432                svg/dynamic-updates/SVGFEDropShadowElement-svgdom-stdDeviation-prop.html
1433                svg/filters/feDropShadow.svg
1434
1435         * Android.mk:
1436         * CMakeLists.txt:
1437         * DerivedSources.cpp:
1438         * DerivedSources.make:
1439         * GNUmakefile.list.am:
1440         * WebCore.exp.in:
1441         * WebCore.gypi:
1442         * WebCore.pro:
1443         * WebCore.vcproj/WebCore.vcproj:
1444         * WebCore.xcodeproj/project.pbxproj:
1445         * bindings/objc/DOM.mm:
1446         (WebCore::createElementClassMap):
1447         * bindings/objc/DOMSVG.h:
1448         * page/DOMWindow.idl:
1449         * platform/graphics/ShadowBlur.cpp: Added missing copyright after r84410.
1450         * platform/graphics/ShadowBlur.h: Made blurLayerImage public.
1451         * platform/graphics/filters/FEDropShadow.cpp: Added.
1452         (WebCore::FEDropShadow::FEDropShadow):
1453         (WebCore::FEDropShadow::create):
1454         (WebCore::FEDropShadow::determineAbsolutePaintRect):
1455         (WebCore::FEDropShadow::apply):
1456         (WebCore::FEDropShadow::dump):
1457         (WebCore::FEDropShadow::externalRepresentation):
1458         * platform/graphics/filters/FEDropShadow.h: Added.
1459         (WebCore::FEDropShadow::stdDeviationX):
1460         (WebCore::FEDropShadow::setStdDeviationX):
1461         (WebCore::FEDropShadow::stdDeviationY):
1462         (WebCore::FEDropShadow::setStdDeviationY):
1463         (WebCore::FEDropShadow::dx):
1464         (WebCore::FEDropShadow::setDx):
1465         (WebCore::FEDropShadow::dy):
1466         (WebCore::FEDropShadow::setDy):
1467         (WebCore::FEDropShadow::shadowColor):
1468         (WebCore::FEDropShadow::setShadowColor):
1469         (WebCore::FEDropShadow::shadowOpacity):
1470         (WebCore::FEDropShadow::setShadowOpacity):
1471         * platform/graphics/filters/FEGaussianBlur.cpp:
1472         (WebCore::FEGaussianBlur::calculateKernelSize): Make kernel calculations accessible for feDropShadow.
1473         * platform/graphics/filters/FEGaussianBlur.h:
1474         * svg/SVGAllInOne.cpp:
1475         * svg/SVGFEDropShadowElement.cpp: Added.
1476         (WebCore::SVGFEDropShadowElement::SVGFEDropShadowElement):
1477         (WebCore::SVGFEDropShadowElement::create):
1478         (WebCore::SVGFEDropShadowElement::stdDeviationXIdentifier):
1479         (WebCore::SVGFEDropShadowElement::stdDeviationYIdentifier):
1480         (WebCore::SVGFEDropShadowElement::setStdDeviation):
1481         (WebCore::SVGFEDropShadowElement::parseMappedAttribute):
1482         (WebCore::SVGFEDropShadowElement::svgAttributeChanged):
1483         (WebCore::SVGFEDropShadowElement::synchronizeProperty):
1484         (WebCore::SVGFEDropShadowElement::build):
1485         * svg/SVGFEDropShadowElement.h: Added.
1486         * svg/SVGFEDropShadowElement.idl: Added.
1487         * svg/svgtags.in:
1488
1489 2011-04-21  Roland Steiner  <rolandsteiner@chromium.org>
1490
1491         Reviewed by Dimitri Glazkov.
1492
1493         Bug 58704 - Decide on node type for ShadowRoot
1494         https://bugs.webkit.org/show_bug.cgi?id=58704
1495
1496         Add a new node type SHADOW_ROOT_NODE.
1497         Adapt all calling sites of nodeType(). 
1498
1499         Test: fast/dom/shadow/nodetype.html
1500
1501         * bindings/js/JSNodeCustom.cpp:
1502         (WebCore::createWrapperInline):
1503         * bindings/objc/DOM.mm:
1504         (kitClass):
1505         * bindings/v8/custom/V8NodeCustom.cpp:
1506         (WebCore::toV8Slow):
1507         * dom/Document.cpp:
1508         (WebCore::Document::importNode):
1509         (WebCore::Document::childTypeAllowed):
1510         (WebCore::Document::canReplaceChild):
1511         * dom/Node.cpp:
1512         (WebCore::Node::dumpStatistics):
1513         (WebCore::Node::isDefaultNamespace):
1514         (WebCore::Node::lookupPrefix):
1515         (WebCore::Node::lookupNamespaceURI):
1516         (WebCore::appendTextContent):
1517         (WebCore::Node::setTextContent):
1518         * dom/Node.h:
1519         * dom/Range.cpp:
1520         (WebCore::lengthOfContentsInNode):
1521         (WebCore::Range::processContentsBetweenOffsets):
1522         (WebCore::Range::insertNode):
1523         (WebCore::Range::checkNodeWOffset):
1524         (WebCore::Range::checkNodeBA):
1525         (WebCore::Range::selectNode):
1526         (WebCore::Range::selectNodeContents):
1527         (WebCore::Range::surroundContents):
1528         * dom/ShadowRoot.cpp:
1529         (WebCore::ShadowRoot::nodeType):
1530         * dom/Traversal.cpp:
1531         (WebCore::Traversal::acceptNode):
1532         * editing/MarkupAccumulator.cpp:
1533         (WebCore::MarkupAccumulator::appendStartMarkup):
1534         * html/parser/HTMLElementStack.cpp:
1535         (WebCore::HTMLNames::isRootNode):
1536         (WebCore::HTMLElementStack::pushRootNode):
1537         * html/parser/HTMLElementStack.h:
1538         (WebCore::isInHTMLNamespace):
1539         * xml/XPathUtil.cpp:
1540         (WebCore::XPath::isValidContextNode):
1541
1542 2011-04-20  Dimitri Glazkov  <dglazkov@chromium.org>
1543
1544         Reviewed by Kent Tamura.
1545
1546         REGRESSION (r75543): Styles bleed into new shadow DOM (like slider and video)
1547         https://bugs.webkit.org/show_bug.cgi?id=52917
1548
1549         In order to determine whether a rule should apply inside of a shadow DOM subtree,
1550         we collect three pieces of information:
1551
1552         1) Are we parsing UA sheets?
1553         2) Does the current tree scope allows applying author sheets?
1554         3) Does the rule explicitly reach into shadow DOM (using pseudo-elements, for example)?
1555
1556         If the answer to all of these is no, we ignore the rule.
1557
1558         Test: fast/css/shadow-dom-scope.html
1559
1560         * css/CSSStyleSelector.cpp:
1561         (WebCore::MatchingUARulesScope::MatchingUARulesScope): Added a scope helper to
1562             track whether we are currently matching UA rules.
1563         (WebCore::CSSStyleSelector::matchRulesForList): Added the check for three
1564             conditions mentioned above.
1565         (WebCore::CSSStyleSelector::SelectorChecker::SelectorChecker): Added
1566             initializer for the flag, which helps us determine whether the rule
1567             explicitly reaches into shadow DOM.
1568         (WebCore::CSSStyleSelector::matchUARules): Started using the scope helper.
1569         (WebCore::CSSStyleSelector::checkSelector): Added initializing of the
1570             flag.
1571         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Added setting
1572             of the flag when we encounter unknown pseudo-elements.
1573         * css/CSSStyleSelector.h: Adjusted decls.
1574         * dom/ShadowRoot.cpp:
1575         (WebCore::ShadowRoot::applyAuthorSheets): Added.
1576         * dom/ShadowRoot.h: Adjusted decls.
1577         * dom/TreeScope.cpp:
1578         (WebCore::TreeScope::applyAuthorSheets): Added.
1579         * dom/TreeScope.h: Adjusted decls.
1580
1581 2011-04-21  Levi Weintraub  <leviw@chromium.org>
1582
1583         Reviewed by Simon Fraser.
1584
1585         position fixed element does not render properly when dynamically updated via javascript
1586         https://bugs.webkit.org/show_bug.cgi?id=54297
1587
1588         Disabling the LayoutState fast-path for fixed-position content.
1589
1590         Tests: fast/repaint/fixed-contents-changed-after-scroll.html
1591                fast/repaint/transformed-contents-changed-after-scroll.html
1592
1593         * rendering/RenderBox.cpp:
1594         (WebCore::RenderBox::computeRectForRepaint):
1595
1596 2011-04-20  Matthew Delaney  <mdelaney@apple.com>
1597
1598         Reviewed by Maciej Stachowiak.
1599
1600         arc() should add a circle to the path when start and end angles are far enough apart
1601         https://bugs.webkit.org/show_bug.cgi?id=58934
1602
1603         Test: fast/canvas/canvas_arc_largeangles.html
1604
1605         * html/canvas/CanvasRenderingContext2D.cpp:
1606         (WebCore::CanvasRenderingContext2D::arc):
1607
1608 2011-04-20  MORITA Hajime  <morrita@google.com>
1609
1610         Reviewed by Dimitri Glazkov.
1611
1612         Content of <summary> should be forwarded through the shadow DOM
1613         https://bugs.webkit.org/show_bug.cgi?id=58914
1614
1615         - Introduced ShadowContentElement which hosts forwarded children of <summary>
1616         - Encapsulated Node::parentNodeForRenderingAndStyle() and shouldCreateRendererFor()
1617           into NodeVisualParentLookupResult class.
1618         - The parent lookup is also aware of node forwarding. If the visual parent node has
1619           a shadow root, the node is possibly forwarded to ShadowContentElement
1620         - ShadowContentElement lookup is implemented inside ShadowRoot.
1621         
1622         Tests: fast/html/details-add-summary-child-1.html
1623                fast/html/details-add-summary-child-2.html
1624                fast/html/details-remove-summary-child-1.html
1625                fast/html/details-remove-summary-child-2.html
1626
1627         * GNUmakefile.list.am:
1628         * WebCore.gypi:
1629         * WebCore.vcproj/WebCore.vcproj:
1630         * WebCore.xcodeproj/project.pbxproj:
1631         * dom/Element.cpp:
1632         (WebCore::Element::childrenChanged):
1633         * dom/Node.cpp:
1634         (WebCore::NodeRenderParentDetector::NodeRenderParentDetector):
1635         (WebCore::NodeRenderParentDetector::parentNodeForRenderingAndStyle):
1636         (WebCore::NodeRenderParentDetector::findVisualParent):
1637         (WebCore::NodeRenderParentDetector::shouldCreateRenderer):
1638         (WebCore::Node::parentNodeForRenderingAndStyle):
1639         (WebCore::Node::createRendererAndStyle):
1640         * dom/ShadowRoot.cpp:
1641         (WebCore::ShadowRoot::contentContainerFor):
1642         (WebCore::ShadowRoot::hostChildrenChanged):
1643         (WebCore::ShadowRoot::firstContentElement):
1644         * dom/ShadowRoot.h:
1645         * html/HTMLSummaryElement.cpp:
1646         (WebCore::HTMLSummaryElement::createShadowSubtree):
1647         * html/HTMLSummaryElement.h:
1648         * html/shadow/ShadowContentElement.h: Copied from Source/WebCore/dom/ShadowRoot.h.
1649         (WebCore::ShadowContentElement::ShadowContentElement):
1650         (WebCore::ShadowContentElement::isShadowBoundary):
1651         (WebCore::ShadowContentElement::createRenderer):
1652         (WebCore::ShadowContentElement::create):
1653
1654 2011-04-21  Andrey Kosyakov  <caseq@chromium.org>
1655
1656         Reviewed by Pavel Feldman.
1657
1658         Web Inspector: fix calls to WebInspector.ObjectPropertiesSection constructor
1659         https://bugs.webkit.org/show_bug.cgi?id=59105
1660
1661         * inspector/front-end/ConsoleView.js:
1662         (WebInspector.ConsoleView.prototype._formatobject):
1663         * inspector/front-end/ExtensionPanel.js:
1664         (WebInspector.ExtensionSidebarPane.prototype._setObject):
1665         * inspector/front-end/ResourceJSONView.js:
1666         (WebInspector.ResourceJSONView.parseJSON.WebInspector.ResourceJSONView.prototype._initialize):
1667         * inspector/front-end/SourceFrame.js:
1668         (WebInspector.SourceFrame.prototype._showPopup.showObjectPopup):
1669         (WebInspector.SourceFrame.prototype._showPopup):
1670
1671 2011-04-21  Adam Barth  <abarth@webkit.org>
1672
1673         Remove support for CSP's frame-src.  This approach causes too many
1674         extra console messages to be logged.  I'm leaving in the test (which
1675         now shows failure).
1676
1677         * html/HTMLFrameElementBase.cpp:
1678         (WebCore::HTMLFrameElementBase::isURLAllowed):
1679
1680 2011-04-21  Eunsol Park  <eunsol47.park@samsung.com>
1681
1682         Reviewed by Antonio Gomes.
1683
1684         [EFL] Scroll doesn't work on tiled backing store.
1685         https://bugs.webkit.org/show_bug.cgi?id=55021
1686
1687         It was added from Changeset 72242, but it worked wrong in EFL port.
1688         The visible rect should not be returned as content rect for scrolling in EFL tiled backing store, 
1689         because it works differently from QT.
1690
1691         * platform/ScrollView.cpp:
1692         (WebCore::ScrollView::visibleContentRect):
1693
1694 2011-04-21  Simon Fraser  <simon.fraser@apple.com>
1695
1696         Reviewed by Eric Seidel.
1697
1698         Create RIAA class for GraphicsContext::save() and restore()
1699         https://bugs.webkit.org/show_bug.cgi?id=58807
1700
1701         Use GraphicsContextStateSaver in a lot more places.
1702
1703         * html/canvas/CanvasRenderingContext2D.cpp:
1704         (WebCore::CanvasRenderingContext2D::drawImage):
1705         (WebCore::CanvasRenderingContext2D::drawTextInternal):
1706         * platform/ScrollView.cpp:
1707         (WebCore::ScrollView::wheelEvent):
1708         * platform/graphics/GeneratedImage.cpp:
1709         (WebCore::GeneratedImage::draw):
1710         * platform/graphics/GraphicsContext.h:
1711         (WebCore::GraphicsContextStateSaver::save):
1712         (WebCore::GraphicsContextStateSaver::restore):
1713         * platform/graphics/ShadowBlur.cpp:
1714         (WebCore::ShadowBlur::drawShadowBuffer):
1715         (WebCore::ShadowBlur::drawRectShadowWithoutTiling):
1716         (WebCore::ShadowBlur::drawInsetShadowWithoutTiling):
1717         (WebCore::ShadowBlur::drawInsetShadowWithTiling):
1718         (WebCore::ShadowBlur::drawRectShadowWithTiling):
1719         (WebCore::ShadowBlur::drawLayerPieces):
1720         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
1721         (WebCore::MediaPlayerPrivateAVFoundationObjC::paint):
1722         * platform/graphics/cg/ImageCG.cpp:
1723         (WebCore::BitmapImage::draw):
1724         (WebCore::Image::drawPattern):
1725         * platform/graphics/cg/PDFDocumentImage.cpp:
1726         (WebCore::PDFDocumentImage::draw):
1727         * platform/graphics/filters/FEComposite.cpp:
1728         (WebCore::FEComposite::apply):
1729         * platform/graphics/filters/SourceAlpha.cpp:
1730         (WebCore::SourceAlpha::apply):
1731         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1732         (WebCore::MediaPlayerPrivateQTKit::paint):
1733         * platform/mac/ScrollbarThemeMac.mm:
1734         (WebCore::ScrollbarThemeMac::paint):
1735         * platform/mac/ThemeMac.mm:
1736         (WebCore::paintCheckbox):
1737         (WebCore::paintRadio):
1738         (WebCore::paintStepper):
1739         * rendering/EllipsisBox.cpp:
1740         (WebCore::EllipsisBox::paintSelection):
1741         * rendering/InlineFlowBox.cpp:
1742         (WebCore::InlineFlowBox::paintFillLayer):
1743         (WebCore::InlineFlowBox::paintBoxDecorations):
1744         (WebCore::InlineFlowBox::paintMask):
1745         * rendering/InlineTextBox.cpp:
1746         (WebCore::InlineTextBox::paint):
1747         (WebCore::InlineTextBox::paintSelection):
1748         (WebCore::InlineTextBox::paintCompositionBackground):
1749         (WebCore::InlineTextBox::paintDecoration):
1750         (WebCore::InlineTextBox::paintTextMatchMarker):
1751         * rendering/RenderBlock.cpp:
1752         (WebCore::RenderBlock::paintColumnContents):
1753         (WebCore::RenderBlock::paintSelection):
1754         * rendering/RenderBox.cpp:
1755         (WebCore::RenderBox::paintBoxDecorationsWithSize):
1756         * rendering/RenderBoxModelObject.cpp:
1757         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1758         (WebCore::RenderBoxModelObject::paintBorder):
1759         * rendering/RenderEmbeddedObject.cpp:
1760         (WebCore::RenderEmbeddedObject::paintReplaced):
1761         * rendering/RenderFieldset.cpp:
1762         (WebCore::RenderFieldset::paintBoxDecorations):
1763         * rendering/RenderFileUploadControl.cpp:
1764         (WebCore::RenderFileUploadControl::paintObject):
1765         * rendering/RenderLayer.cpp:
1766         (WebCore::RenderLayer::paintResizer):
1767         (WebCore::RenderLayer::paintLayer):
1768         (WebCore::RenderLayer::paintChildLayerIntoColumns):
1769         * rendering/RenderListMarker.cpp:
1770         (WebCore::RenderListMarker::paint):
1771         * rendering/RenderMediaControls.cpp:
1772         (WebCore::RenderMediaControls::paintMediaControlsPart):
1773         * rendering/RenderTableCell.cpp:
1774         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
1775         * rendering/RenderTextControl.cpp:
1776         (WebCore::RenderTextControl::paintPlaceholder):
1777         * rendering/RenderThemeMac.mm:
1778         (WebCore::RenderThemeMac::paintMenuList):
1779         (WebCore::RenderThemeMac::paintMeter):
1780         (WebCore::RenderThemeMac::paintProgressBar):
1781         (WebCore::RenderThemeMac::paintMenuListButtonGradients):
1782         (WebCore::RenderThemeMac::paintMenuListButton):
1783         (WebCore::RenderThemeMac::paintSliderTrack):
1784         (WebCore::RenderThemeMac::paintSliderThumb):
1785         (WebCore::RenderThemeMac::paintSearchField):
1786         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
1787         (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
1788         (WebCore::RenderThemeMac::paintMediaSliderTrack):
1789         (WebCore::RenderThemeMac::paintMediaCurrentTime):
1790         (WebCore::RenderThemeMac::paintMediaTimeRemaining):
1791         * rendering/mathml/RenderMathMLBlock.cpp:
1792         (WebCore::RenderMathMLBlock::paint):
1793         * rendering/mathml/RenderMathMLFraction.cpp:
1794         (WebCore::RenderMathMLFraction::paint):
1795         * rendering/mathml/RenderMathMLRoot.cpp:
1796         (WebCore::RenderMathMLRoot::paint):
1797         * rendering/mathml/RenderMathMLSquareRoot.cpp:
1798         (WebCore::RenderMathMLSquareRoot::paint):
1799         * rendering/svg/RenderSVGContainer.cpp:
1800         (WebCore::RenderSVGContainer::paint):
1801         * rendering/svg/RenderSVGForeignObject.cpp:
1802         (WebCore::RenderSVGForeignObject::paint):
1803         * rendering/svg/RenderSVGImage.cpp:
1804         (WebCore::RenderSVGImage::paint):
1805         * rendering/svg/RenderSVGPath.cpp:
1806         (WebCore::RenderSVGPath::fillAndStrokePath):
1807         (WebCore::RenderSVGPath::paint):
1808         * rendering/svg/RenderSVGResourceClipper.cpp:
1809         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
1810         * rendering/svg/RenderSVGResourceMarker.cpp:
1811         (WebCore::RenderSVGResourceMarker::draw):
1812         * rendering/svg/RenderSVGText.cpp:
1813         (WebCore::RenderSVGText::paint):
1814         * rendering/svg/SVGInlineFlowBox.cpp:
1815         (WebCore::SVGInlineFlowBox::paint):
1816         * rendering/svg/SVGInlineTextBox.cpp:
1817         (WebCore::SVGInlineTextBox::paintSelectionBackground):
1818         (WebCore::SVGInlineTextBox::paint):
1819         (WebCore::SVGInlineTextBox::paintDecorationWithStyle):
1820         * rendering/svg/SVGRootInlineBox.cpp:
1821         (WebCore::SVGRootInlineBox::paint):
1822         * svg/SVGFont.cpp:
1823         (WebCore::Font::drawTextUsingSVGFont):
1824         * svg/graphics/SVGImage.cpp:
1825         (WebCore::SVGImage::draw):
1826
1827 2011-04-20  Andrey Kosyakov  <caseq@chromium.org>
1828
1829         Reviewed by Pavel Feldman.
1830
1831         Web Inspector: [Extensions API] console API is not exposed to code evaluated by sidebar.setExpression()
1832         https://bugs.webkit.org/show_bug.cgi?id=59006
1833
1834         * inspector/front-end/ExtensionPanel.js:
1835         (WebInspector.ExtensionSidebarPane.prototype.setExpression):
1836
1837 2011-04-21  Nikolas Zimmermann  <nzimmermann@rim.com>
1838
1839         Reviewed by Dirk Schulze.
1840
1841         Split SVGGlyphIdentifier class out of SVGGlyphElement.h
1842         https://bugs.webkit.org/show_bug.cgi?id=59101
1843
1844         Move SVGGlyphIdentifier class out of SVGGlyphElement.h, place it in platform/graphics/SVGGlyph.h
1845         and rename the contained struct to SVGGlyph. It will be used in follow-up patches that will integrate SVGGlyph & GlyphPage.
1846
1847         Several utility functions are moved from SVGFont.cpp to SVGGlyph.cpp, as that's the place where they really belong to.
1848         Renamed nameLength to unicodeStringLength in the SVGGlyph struct for clarity.
1849
1850         * Android.mk: Add SVGGlyph.cpp/h to build.
1851         * CMakeLists.txt: Ditto.
1852         * GNUmakefile.list.am: Ditto.
1853         * WebCore.gypi: Ditto.
1854         * WebCore.pro: Ditto.
1855         * WebCore.vcproj/WebCore.vcproj: Ditto.
1856         * WebCore.xcodeproj/project.pbxproj: Ditto.
1857         * platform/graphics/SVGGlyph.cpp: Copied from svg/SVGFont.cpp. Removed everything except the methods listed below, that belong here.
1858         (WebCore::processArabicFormDetection):
1859         (WebCore::charactersWithArabicForm):
1860         (WebCore::isCompatibleArabicForm):
1861         (WebCore::isCompatibleGlyph):
1862         * platform/graphics/SVGGlyph.h: Copied from svg/SVGGlyphElement.h. Renamed SVGGlyphIdentifier to SVGGlyph.
1863         (WebCore::SVGGlyph::SVGGlyph):
1864         (WebCore::SVGGlyph::operator==):
1865         * platform/graphics/SimpleFontData.cpp: Adapt for SVGGlyphIdentifier -> SVGGlyph and nameLength -> unicodeStringLength rename.
1866         (WebCore::SimpleFontData::SimpleFontData):
1867         * svg/SVGFont.cpp: Ditto. Remove helper functions that are now living in SVGGlyph.cpp
1868         (WebCore::SVGTextRunWalker::walk):
1869         (WebCore::floatWidthUsingSVGFontCallback):
1870         (WebCore::drawTextUsingSVGFontCallback):
1871         (WebCore::drawTextMissingGlyphCallback):
1872         (WebCore::Font::drawTextUsingSVGFont):
1873         * svg/SVGFontElement.cpp: Ditto.
1874         (WebCore::SVGFontElement::getGlyphIdentifiersForString):
1875         * svg/SVGFontElement.h: Ditto.
1876         * svg/SVGGlyphElement.cpp: Ditto.
1877         (WebCore::parseArabicForm):
1878         (WebCore::parseOrientation):
1879         (WebCore::SVGGlyphElement::inheritUnspecifiedAttributes):
1880         (WebCore::parseSVGGlyphAttribute):
1881         (WebCore::SVGGlyphElement::buildGenericGlyphIdentifier):
1882         (WebCore::SVGGlyphElement::buildGlyphIdentifier):
1883         * svg/SVGGlyphElement.h: Ditto.
1884         * svg/SVGGlyphMap.h: Ditto.
1885         (WebCore::SVGGlyphMap::add):
1886         (WebCore::SVGGlyphMap::compareGlyphPriority):
1887         (WebCore::SVGGlyphMap::get):
1888
1889 2011-04-21  Eric Carlson  <eric.carlson@apple.com>
1890
1891         Reviewed by Dan Bernstein.
1892
1893         Live streams won't play with AVFoundation backend
1894         https://bugs.webkit.org/show_bug.cgi?id=58961
1895         rdar://problem/9284748
1896
1897         Tested manually because we don't have any live streams to test in DRT.
1898
1899         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1900         (WebCore::MediaPlayerPrivateAVFoundation::seek): Do nothing when asked to seek to the
1901             current time.
1902         (WebCore::MediaPlayerPrivateAVFoundation::updateStates): If the readyState is HaveEnoughData,
1903             don't revert when the new state is "ready to play" or "buffer full".
1904         (WebCore::MediaPlayerPrivateAVFoundation::movieLoadType): Use new convenience function isLiveStream.
1905         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1906         (WebCore::MediaPlayerPrivateAVFoundation::isLiveStream): New.
1907
1908         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
1909         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Don't use AVAsset's
1910             tracksWithMediaCharacteristic because it doesn't give us what we need with live
1911             streams.
1912
1913 2011-04-21  Pavel Feldman  <pfeldman@google.com>
1914
1915         Reviewed by Yury Semikhatsky.
1916
1917         Web Inspector: Cookies section in empty on page re-launch.
1918         https://bugs.webkit.org/show_bug.cgi?id=59095
1919
1920         * inspector/front-end/ResourcesPanel.js:
1921         (WebInspector.ResourcesPanel.prototype._reset):
1922         (WebInspector.ResourcesPanel.prototype._frameNavigated):
1923
1924 2011-04-21  Pavel Feldman  <pfeldman@google.com>
1925
1926         Reviewed by Yury Semikhatsky.
1927
1928         Web Inspector: rename De-obfuscate to Pretty print.
1929         https://bugs.webkit.org/show_bug.cgi?id=59093
1930
1931         * English.lproj/localizedStrings.js:
1932         * inspector/front-end/SourceFrame.js:
1933         (WebInspector.SourceFrame.prototype._populateTextAreaContextMenu):
1934
1935 2011-04-21  Pavel Feldman  <pfeldman@google.com>
1936
1937         Reviewed by Yury Semikhatsky.
1938
1939         Web Inspector: following Image URL link in the network panel does nothing.
1940         https://bugs.webkit.org/show_bug.cgi?id=59092
1941
1942         * inspector/front-end/ImageView.js:
1943         (WebInspector.ImageView.prototype._createContentIfNeeded.onImageLoad):
1944         (WebInspector.ImageView.prototype._createContentIfNeeded):
1945         * inspector/front-end/inspector.js:
1946         (WebInspector.linkifyURLAsNode):
1947
1948 2011-04-21  Pavel Feldman  <pfeldman@google.com>
1949
1950         Reviewed by Yury Semikhatsky.
1951
1952         Web Inspector: implement Go To Line for network panel.
1953         https://bugs.webkit.org/show_bug.cgi?id=59090
1954
1955         * inspector/front-end/GoToLineDialog.js:
1956         (WebInspector.GoToLineDialog.prototype._highlightSelectedLine):
1957         * inspector/front-end/NetworkItemView.js:
1958         (WebInspector.NetworkItemView.prototype._tabSelected):
1959         (WebInspector.NetworkItemView.prototype._installHighlightSupport):
1960         * inspector/front-end/NetworkPanel.js:
1961         (WebInspector.NetworkPanel):
1962         * inspector/front-end/TabbedPane.js:
1963         (WebInspector.TabbedPane.prototype.appendTab):
1964         (WebInspector.TabbedPane.prototype.selectTab):
1965         * inspector/front-end/TextViewer.js:
1966         (WebInspector.TextViewer.prototype.highlightLine):
1967
1968 2011-04-21  Nikolas Zimmermann  <nzimmermann@rim.com>
1969
1970         Reviewed by Dirk Schulze.
1971
1972         Split GlyphPage from GlyphPageTreeNode.h into its own header
1973         https://bugs.webkit.org/show_bug.cgi?id=59096
1974
1975         * GNUmakefile.list.am: Add GlyphPage.h to build.
1976         * WebCore.gypi: Ditto.
1977         * WebCore.vcproj/WebCore.vcproj: Ditto.
1978         * WebCore.xcodeproj/project.pbxproj: Ditto.
1979         * platform/graphics/GlyphPage.h: Copied from platform/graphics/GlyphPageTreeNode.h. Removed GlyphPageTreeNode class, leaving only GlyphPage.
1980         * platform/graphics/GlyphPageTreeNode.h: Removed GlyphPage class.
1981
1982 2011-04-21  Nikolas Zimmermann  <nzimmermann@rim.com>
1983
1984         Reviewed by Dirk Schulze.
1985
1986         Centralize typedef unsigned short Glyph in Glyph.h
1987         https://bugs.webkit.org/show_bug.cgi?id=59087
1988
1989         * GNUmakefile.list.am: Add Glyph.h to build.
1990         * WebCore.gypi: Ditto.
1991         * WebCore.vcproj/WebCore.vcproj: Ditto.
1992         * WebCore.xcodeproj/project.pbxproj: Ditto.
1993         * platform/graphics/Glyph.h: Added.
1994         * platform/graphics/GlyphBuffer.h: Include Glyph.h instead of duplicating the Glyph typedef.
1995         * platform/graphics/GlyphMetricsMap.h: Ditto.
1996         * platform/graphics/GlyphPageTreeNode.h: Ditto.
1997
1998 2011-04-21  Pavel Feldman  <pfeldman@google.com>
1999
2000         Reviewed by Yury Semikhatsky.
2001
2002         Web Inspector: toolbar background is blank on Mac Chromium port.
2003         https://bugs.webkit.org/show_bug.cgi?id=59089
2004
2005         * inspector/front-end/inspector.css:
2006         (body.detached.platform-mac-snowleopard:not(.remote) #toolbar):
2007
2008 2011-04-21  Pavel Feldman  <pfeldman@chromium.org>
2009
2010         Reviewed by Yury Semikhatsky.
2011
2012         Web Inspector: add support for Go To Line in Resources panel.
2013         https://bugs.webkit.org/show_bug.cgi?id=59077
2014
2015         * inspector/front-end/CallStackSidebarPane.js:
2016         (WebInspector.CallStackSidebarPane.prototype.registerShortcuts):
2017         * inspector/front-end/GoToLineDialog.js:
2018         (WebInspector.GoToLineDialog.show):
2019         (WebInspector.GoToLineDialog.createShortcut):
2020         (WebInspector.GoToLineDialog.prototype._onKeyDown):
2021         * inspector/front-end/NetworkPanel.js:
2022         (WebInspector.NetworkPanel.prototype.handleShortcut):
2023         * inspector/front-end/Panel.js:
2024         (WebInspector.Panel):
2025         (WebInspector.Panel.prototype._restoreScrollPositions):
2026         (WebInspector.Panel.prototype.handleShortcut):
2027         (WebInspector.Panel.prototype.registerShortcuts):
2028         (WebInspector.Panel.prototype._showGoToLineDialog):
2029         * inspector/front-end/ProfilesPanel.js:
2030         (WebInspector.ProfilesPanel.prototype.handleShortcut):
2031         * inspector/front-end/ResourcesPanel.js:
2032         (WebInspector.ResourcesPanel):
2033         * inspector/front-end/ScriptsPanel.js:
2034         (WebInspector.ScriptsPanel.prototype._registerShortcuts):
2035         (WebInspector.ScriptsPanel.prototype.jumpToPreviousSearchResult):
2036         * inspector/front-end/inspector.js:
2037         (WebInspector._registerShortcuts):
2038         (WebInspector.documentKeyDown):
2039
2040 2011-04-21  Pavel Feldman  <pfeldman@google.com>
2041
2042         Reviewed by Yury Semikhatsky.
2043
2044         Web Inspector: persist local resource history between inspector / browser launches.
2045         https://bugs.webkit.org/show_bug.cgi?id=58993
2046
2047         * inspector/front-end/Resource.js:
2048         (WebInspector.Resource.prototype._restoreRevisions):
2049
2050 2011-04-20  Alexander Pavlov  <apavlov@chromium.org>
2051
2052         Reviewed by Pavel Feldman.
2053
2054         Web Inspector: Metrics pane editing and visual feedback improvements
2055         https://bugs.webkit.org/show_bug.cgi?id=58992
2056
2057         Added visual feedback when hovering over the box model components of the Metrics pane
2058         and handling of the [Page]Up/Down keys when editing the box model values.
2059
2060         * inspector/DOMNodeHighlighter.cpp:
2061         (WebCore::DOMNodeHighlighter::DrawNodeHighlight):
2062         * inspector/DOMNodeHighlighter.h:
2063         * inspector/Inspector.json:
2064         * inspector/InspectorDOMAgent.cpp:
2065         (WebCore::InspectorDOMAgent::mouseDidMoveOverElement):
2066         (WebCore::InspectorDOMAgent::highlight):
2067         (WebCore::InspectorDOMAgent::highlightDOMNode):
2068         (WebCore::InspectorDOMAgent::highlightFrame):
2069         (WebCore::InspectorDOMAgent::drawNodeHighlight):
2070         * inspector/InspectorDOMAgent.h:
2071         * inspector/front-end/CSSStyleModel.js:
2072         (WebInspector.CSSProperty.prototype.setText.callback):
2073         (WebInspector.CSSProperty.prototype.setText):
2074         (WebInspector.CSSProperty.prototype.setValue):
2075         (WebInspector.CSSProperty.prototype.setDisabled.callback):
2076         (WebInspector.CSSProperty.prototype.setDisabled):
2077         * inspector/front-end/ElementsPanel.js:
2078         (WebInspector.ElementsPanel.prototype.startEditingStyle):
2079         (WebInspector.ElementsPanel.prototype.endEditingStyle):
2080         (WebInspector.ElementsPanel.prototype._attributesUpdated):
2081         * inspector/front-end/MetricsSidebarPane.js:
2082         (WebInspector.MetricsSidebarPane):
2083         (WebInspector.MetricsSidebarPane.prototype._highlightDOMNode):
2084         (WebInspector.MetricsSidebarPane.prototype._highlightDOMNode.getBoxRectangleElement):
2085         (WebInspector.MetricsSidebarPane.prototype._update.createBoxPartElement):
2086         (WebInspector.MetricsSidebarPane.prototype._update):
2087         (WebInspector.MetricsSidebarPane.prototype.startEditing):
2088         (WebInspector.MetricsSidebarPane.prototype._handleKeyDown):
2089         (WebInspector.MetricsSidebarPane.prototype.editingEnded):
2090         (WebInspector.MetricsSidebarPane.prototype.editingCancelled):
2091         (WebInspector.MetricsSidebarPane.prototype._applyUserInput.callback):
2092         (WebInspector.MetricsSidebarPane.prototype._applyUserInput):
2093         (WebInspector.MetricsSidebarPane.prototype.editingCommitted):
2094         * inspector/front-end/StylesSidebarPane.js:
2095         (WebInspector.StylesSidebarPane.alteredFloatNumber):
2096         (WebInspector.StylesSidebarPane.alteredHexNumber):
2097         (WebInspector.StylePropertyTreeElement.prototype):
2098         (WebInspector.StylePropertyTreeElement.prototype.element.userInput.previousContent.context.moveDirection):
2099         * inspector/front-end/inspector.css:
2100         (.metrics .hovered > .label):
2101         (.metrics .position):
2102         (.metrics .margin):
2103         (.metrics .margin.hovered):
2104         (.metrics .border):
2105         (.metrics .border.hovered):
2106         (.metrics .padding):
2107         (.metrics .padding.hovered):
2108         (.metrics .content):
2109         (.metrics .content.hovered):
2110         * inspector/front-end/inspector.js:
2111         (WebInspector.highlightDOMNode):
2112
2113 2011-04-21  Adam Barth  <abarth@webkit.org>
2114
2115         Reviewed by Eric Seidel.
2116
2117         CSP report-uri is missing
2118         https://bugs.webkit.org/show_bug.cgi?id=58639
2119
2120         Our implementation of report-uri differs from what's currently in the
2121         spec.  I sent the working group an email explaining why.  Generally,
2122         we're using normal form encoding instead of JSON and we're sending less
2123         information to a wider set of URLs.  Specifically, we send the current
2124         document's URL as well as the directive that was violated.  The spec
2125         (currently) tells us to send the raw HTTP headers and the URL that
2126         caused the violation, but both of these pieces of data could contain
2127         information that's sensitive, so we omit them for now.
2128
2129         Test: http/tests/security/contentSecurityPolicy/report-uri.html
2130
2131         * loader/PingLoader.cpp:
2132         (WebCore::PingLoader::reportContentSecurityPolicyViolation):
2133         * loader/PingLoader.h:
2134         * page/ContentSecurityPolicy.cpp:
2135         (WebCore::CSPDirective::CSPDirective):
2136         (WebCore::CSPDirective::text):
2137         (WebCore::ContentSecurityPolicy::reportViolation):
2138         (WebCore::ContentSecurityPolicy::allowJavaScriptURLs):
2139         (WebCore::ContentSecurityPolicy::allowInlineEventHandlers):
2140         (WebCore::ContentSecurityPolicy::allowInlineScript):
2141         (WebCore::ContentSecurityPolicy::allowEval):
2142         (WebCore::ContentSecurityPolicy::allowScriptFromSource):
2143         (WebCore::ContentSecurityPolicy::allowObjectFromSource):
2144         (WebCore::ContentSecurityPolicy::allowChildFrameFromSource):
2145         (WebCore::ContentSecurityPolicy::allowImageFromSource):
2146         (WebCore::ContentSecurityPolicy::allowStyleFromSource):
2147         (WebCore::ContentSecurityPolicy::allowFontFromSource):
2148         (WebCore::ContentSecurityPolicy::allowMediaFromSource):
2149         (WebCore::ContentSecurityPolicy::parseReportURI):
2150         (WebCore::ContentSecurityPolicy::addDirective):
2151         * page/ContentSecurityPolicy.h:
2152
2153 2011-04-21  Jon Lee  <jonlee@apple.com>
2154
2155         Reviewed by Maciej Stachowiak.
2156
2157         remove unneeded function from graphicscontext3d.cpp (59076)
2158         https://bugs.webkit.org/show_bug.cgi?id=59076
2159         <rdar://problem/9315681>
2160
2161         * platform/graphics/GraphicsContext3D.cpp: removing unused function unpackOneRowOfRGBA8ToRGBA8
2162
2163 2011-04-21  Alexey Proskuryakov  <ap@apple.com>
2164
2165         Reviewed by Dan Bernstein.
2166
2167         REGRESSION: Korean encoding alias KSC5601 does not work
2168         https://bugs.webkit.org/show_bug.cgi?id=59075
2169         <rdar://problem/9303233>
2170
2171         * platform/text/TextCodecICU.cpp: (WebCore::TextCodecICU::registerEncodingNames): Added a
2172         KSC5601 alias for KSC_5601, which effectively makes it windows-949.
2173
2174 2011-04-20  Dominic Cooney  <dominicc@chromium.org>
2175
2176         Reviewed by Dimitri Glazkov.
2177
2178         layoutTestController can create and destroy shadow DOM
2179         https://bugs.webkit.org/show_bug.cgi?id=59058
2180
2181         Test: fast/dom/shadow/layout-tests-can-access-shadow.html
2182
2183         * WebCore.exp.in: Mac DRT needs to see Element::ensure/removeShadowRoot
2184
2185 2011-04-20  Pratik Solanki  <psolanki@apple.com>
2186
2187         Reviewed by Ryosuke Niwa.
2188
2189         Follow on fix for https://bugs.webkit.org/show_bug.cgi?id=58926
2190
2191         Fix assertions in Chromium builds.
2192
2193         * platform/graphics/Image.cpp:
2194         (WebCore::Image::drawTiled): Skia and Wx do not have proper implementations of
2195         BitmapImage::checkForSolidColor() so we shouldn't assert on those platforms.
2196
2197 2011-04-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2198
2199         Reviewed by Eric Seidel.
2200
2201         [EFL] Add timeline to mediaControlsEfl.css
2202         https://bugs.webkit.org/show_bug.cgi?id=58865
2203
2204         Add timeline to mediaControlsEfl.css in order to show playing time of media
2205         content.
2206
2207         * css/mediaControlsEfl.css:
2208         (audio):
2209         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
2210         (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
2211         (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
2212         (audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container):
2213         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
2214         (audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline):
2215         (audio::-webkit-media-controls-seek-back-button, video::-webkit-media-controls-seek-back-button):
2216         (audio::-webkit-media-controls-seek-forward-button, video::-webkit-media-controls-seek-forward-button):
2217         (audio::-webkit-media-controls-fullscreen-button, video::-webkit-media-controls-fullscreen-button):
2218         (audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button):
2219
2220 2011-04-20  Simon Fraser  <simon.fraser@apple.com>
2221
2222         Reviewed by Eric Seidel.
2223
2224         Create RIAA class for GraphicsContext::save() and restore()
2225         https://bugs.webkit.org/show_bug.cgi?id=58807
2226         
2227         Make a stack-based class that can be used to save and restore
2228         the graphics state. It has conditional behavior to deal with the many cases
2229         where we decide to save/restore based on some runtime condition.
2230
2231         Change RenderBoxModelObject to use it for now; it can be used more widely
2232         once committed.
2233
2234         * platform/graphics/GraphicsContext.h:
2235         (WebCore::GraphicsContextStateSaver::GraphicsContextStateSaver):
2236         (WebCore::GraphicsContextStateSaver::~GraphicsContextStateSaver):
2237         (WebCore::GraphicsContextStateSaver::saveState):
2238         * rendering/RenderBoxModelObject.cpp:
2239         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2240         (WebCore::RenderBoxModelObject::paintOneBorderSide):
2241         (WebCore::RenderBoxModelObject::paintBorder):
2242         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
2243         (WebCore::RenderBoxModelObject::paintBoxShadow):
2244
2245 2011-04-20  Adam Barth  <abarth@webkit.org>
2246
2247         Reviewed by Eric Seidel.
2248
2249         CSP frame-src is missing
2250         https://bugs.webkit.org/show_bug.cgi?id=58643
2251
2252         This is a first cut at an implementation of frame-src.  There are a
2253         couple things that will need to be improved:
2254
2255           1) I don't think we're handling in-frame navigation properly.  This
2256              patch only covers setting the src attribute of the frame, but I
2257              think the intent of the spec is to cover navigation as well.
2258
2259           2) The console message is printed twice, once when we try to load the
2260              frame and again when we attach the frame to the render tree.
2261
2262         I'll file bugs about these issues (blocking
2263         https://bugs.webkit.org/show_bug.cgi?id=53572) once this patch lands.
2264
2265         Tests: http/tests/security/contentSecurityPolicy/frame-src-allowed.html
2266                http/tests/security/contentSecurityPolicy/frame-src-blocked.html
2267
2268         * html/HTMLFrameElementBase.cpp:
2269         (WebCore::HTMLFrameElementBase::isURLAllowed):
2270         * page/ContentSecurityPolicy.cpp:
2271         (WebCore::ContentSecurityPolicy::allowChildFrameFromSource):
2272         (WebCore::ContentSecurityPolicy::addDirective):
2273         * page/ContentSecurityPolicy.h:
2274
2275 2011-04-20  Jia Pu  <jpu@apple.com>
2276
2277         Reviewed by Maciej Stachowiak.
2278
2279         [Mac] Correction panel shows up at incorrect location after webpage is scrolled.
2280         https://bugs.webkit.org/show_bug.cgi?id=59052
2281         <rdar://problem/9312513>
2282         
2283         Fixed a regression caused by interaction between patch for bug 57353 and patch for bug 55571.
2284         See bug webpage for detail.
2285
2286         * editing/Editor.cpp:
2287         (WebCore::Editor::selectionStartHasMarkerFor):
2288         * editing/SpellingCorrectionController.cpp:
2289         (WebCore::SpellingCorrectionController::windowRectForRange):
2290
2291 2011-04-20  Adam Barth  <abarth@webkit.org>
2292
2293         Reviewed by Eric Seidel.
2294
2295         CSP policy violations should log to the console
2296         https://bugs.webkit.org/show_bug.cgi?id=58646
2297
2298         We now log policy violations to the JavaScript console to help
2299         developers debug what's going on with their Content-Security-Policy.
2300
2301         Tests: http/tests/security/contentSecurityPolicy/inline-script-blocked-javascript-url.html
2302                http/tests/security/contentSecurityPolicy/javascript-url-allowed.html
2303                http/tests/security/contentSecurityPolicy/javascript-url-blocked.html
2304                http/tests/security/contentSecurityPolicy/object-src-none-allowed.html
2305                http/tests/security/contentSecurityPolicy/object-src-none-blocked.html
2306                http/tests/security/contentSecurityPolicy/script-src-self-blocked-01.html
2307                http/tests/security/contentSecurityPolicy/script-src-self-blocked-02.html
2308                http/tests/security/contentSecurityPolicy/script-src-self-blocked-03.html
2309
2310         * dom/Document.cpp:
2311         (WebCore::Document::initSecurityContext):
2312         * page/ContentSecurityPolicy.cpp:
2313         (WebCore::ContentSecurityPolicy::ContentSecurityPolicy):
2314         (WebCore::ContentSecurityPolicy::allowJavaScriptURLs):
2315         (WebCore::ContentSecurityPolicy::allowInlineEventHandlers):
2316         (WebCore::ContentSecurityPolicy::allowInlineScript):
2317         (WebCore::ContentSecurityPolicy::allowEval):
2318         (WebCore::ContentSecurityPolicy::allowScriptFromSource):
2319         (WebCore::ContentSecurityPolicy::allowObjectFromSource):
2320         (WebCore::ContentSecurityPolicy::allowImageFromSource):
2321         (WebCore::ContentSecurityPolicy::allowStyleFromSource):
2322         (WebCore::ContentSecurityPolicy::allowFontFromSource):
2323         (WebCore::ContentSecurityPolicy::allowMediaFromSource):
2324         (WebCore::ContentSecurityPolicy::addDirective):
2325         * page/ContentSecurityPolicy.h:
2326         (WebCore::ContentSecurityPolicy::create):
2327
2328 2011-04-20  Dan Bernstein  <mitz@apple.com>
2329
2330         Reviewed by Maciej Stachowiak.
2331
2332         <rdar://problem/9095366> With a non-1 page scale, scrolling to reveal selection fails
2333         https://bugs.webkit.org/show_bug.cgi?id=59046
2334
2335         Test: fast/transforms/selection-bounds-in-transformed-view.html
2336
2337         * rendering/RenderObject.cpp:
2338         (WebCore::RenderObject::repaintUsingContainer): If the repaint container is the RenderView, and
2339         it has a composited layer that paints straight to the window, then translate from view coordinates
2340         to window coordinates here.
2341         * rendering/RenderView.cpp:
2342         (WebCore::RenderView::mapLocalToContainer): Do not apply our transform if we are the painting root.
2343         (WebCore::RenderView::computeRectForRepaint): Ditto. Applying the transform here was compensating
2344         for not applying it in RenderObject::repaintUsingContainer(), but for purposes other than repainting,
2345         such as computing selection bounds, this function was returning the wrong results.
2346
2347 2011-04-20  Dan Bernstein  <mitz@apple.com>
2348
2349         Reviewed by Eric Carlson.
2350
2351         <rdar://problem/9304956> media/broken-video.html crashes
2352
2353         * platform/graphics/MediaPlayer.cpp:
2354         (WebCore::nextMediaEngine): Fixed an off-by-one error.
2355
2356 2011-04-20  Eric Seidel  <eric@webkit.org>
2357
2358         Reviewed by Adam Barth.
2359
2360         Split out isIteratorTarget from bidiNext and bidiFirst
2361         https://bugs.webkit.org/show_bug.cgi?id=59033
2362
2363         This is the first (tiny) step of many.  When I tried to
2364         make larger changes to this function I broke stuff, so
2365         doing this in tiny pieces so we know it's right.
2366
2367         * rendering/InlineIterator.h:
2368         (WebCore::isIteratorTarget):
2369         (WebCore::bidiNext):
2370         (WebCore::bidiFirstSkippingInlines):
2371         (WebCore::bidiFirstNotSkippingInlines):
2372
2373 2011-04-20  Alexey Marinichev  <amarinichev@chromium.org>
2374
2375         Reviewed by Kenneth Russell.
2376
2377         Check for null m_context in WebGLLayerChromium and add resetting platform layer's context in the destructor of GraphicsContext3D.
2378         https://bugs.webkit.org/show_bug.cgi?id=59045
2379
2380         Lose context extension test might not catch this bug, more reliable
2381         way is forcing the crash of the GPU process, which is done by Chromium
2382         browser tests.
2383
2384         * platform/graphics/chromium/WebGLLayerChromium.cpp:
2385         (WebCore::WebGLLayerChromium::updateCompositorResources):
2386         (WebCore::WebGLLayerChromium::setContext):
2387         * platform/graphics/chromium/WebGLLayerChromium.h:
2388
2389 2011-04-20  Jia Pu  <jpu@apple.com>
2390
2391         Reviewed by Maciej Stachowiak.
2392
2393         [Mac]Regression: extending word that is already marked misspelled doesn't remove misspelling underline.
2394         https://bugs.webkit.org/show_bug.cgi?id=59032
2395         <rdar://problem/9312444>
2396
2397         This fixes a regression introduced in recent refactoring work in Editor. See bug webpage for detail.
2398
2399         manual test: Source/WebCore/manual-tests/autocorrection/remove-misspelling-marker-after-appending-letter.html
2400
2401         * editing/Editor.cpp:
2402         (WebCore::Editor::insertTextWithoutSendingTextEvent):
2403         * manual-tests/autocorrection/remove-misspelling-marker-after-appending-letter.html: Added.
2404
2405 2011-04-20  Chris Fleizach  <cfleizach@apple.com>
2406
2407         Reviewed by Beth Dakin.
2408
2409         CrashTracer: 301 crashes in Safari at com.apple.WebCore: WebCore::AccessibilityRenderObject::visiblePositionForPoint const + 297
2410         https://bugs.webkit.org/show_bug.cgi?id=57405
2411
2412         The offending line in this crash was a null pointer access in
2413            m_renderer->document()->topDocument()->renderer()->view()->frameView();
2414         It seems likely that one of those calls was invalid. I could not reproduce and there was no
2415         information on reproducible steps, hence the absence of a layout test.
2416
2417         * accessibility/AccessibilityRenderObject.cpp:
2418         (WebCore::AccessibilityRenderObject::topRenderer):
2419         (WebCore::AccessibilityRenderObject::topDocument):
2420         (WebCore::AccessibilityRenderObject::topDocumentFrameView):
2421         (WebCore::AccessibilityRenderObject::visiblePositionForPoint):
2422         * accessibility/AccessibilityRenderObject.h:
2423
2424 2011-04-20  Andy Estes  <aestes@apple.com>
2425
2426         Reviewed by Maciej Stachowiak.
2427
2428         REGRESSION (WK2): Animated GIF stops when navigating forward, back
2429         https://bugs.webkit.org/show_bug.cgi?id=59042
2430         
2431         When loading the page from the b/f cache,
2432         document()->view()->isOffscreen() returns true in
2433         RenderObject::willRenderImage(), so BitmapImage::startAnimation()
2434         returns without actually kicking off the animation.
2435         
2436         In WebKit1, the ScrollView is a platform widget, so
2437         ScrollView::isOffscreen() calls [NSWindow isVisible]. In WebKit2, the
2438         ScrollView isn't a platform widget so it asks the WebCore Widget
2439         whether or not it is visible. It always returns false since
2440         setParentVisible(false) was called on the old ScrollView before
2441         navigating to a new page, but setParentVisible(true) is never called
2442         when restoring it from the back/forward cache. This is probably a
2443         long-standing bug.
2444         
2445         Fix this by calling setParentVisible(true) when a cached main frame is
2446         being restored.
2447
2448         Test: fast/images/animated-gif-restored-from-bfcache.html
2449
2450         * history/CachedFrame.cpp:
2451         (WebCore::CachedFrameBase::restore): If the cached frame is the main
2452         frame, call setParentVisible(true) on the frame's view.
2453
2454 2011-04-20  Sam Weinig  <sam@webkit.org>
2455
2456         Reviewed by Anders Carlsson.
2457
2458         WebKit2: Can't scroll page after printing on Yahoo.com and other sites
2459         <rdar://problem/9233291>
2460         https://bugs.webkit.org/show_bug.cgi?id=59049
2461
2462         * page/Frame.cpp:
2463         (WebCore::Frame::setPrinting): Match Mac WebKit1 code when ending printing,
2464         and call forceLayout() instead of forceLayoutForPagination().
2465
2466 2011-04-20  Kenneth Russell  <kbr@google.com>
2467
2468         Reviewed by James Robinson.
2469
2470         Reduce size of GraphicsContext3D's compiled code
2471         https://bugs.webkit.org/show_bug.cgi?id=59029
2472
2473         Changed format conversion operations to work line-by-line instead
2474         of pixel-by-pixel, and passed them as function pointers rather
2475         than template parameters. Simplified computation of source
2476         increment, since elements per row is now all that is needed.
2477
2478         These changes reduce the size of GraphicsContext3D.o in release
2479         mode on Linux from 299 KB to 53 KB.
2480
2481         No new tests. Existing layout tests cover these format conversions
2482         well, and caught one typo in the restructuring. Also ran WebGL
2483         conformance suite and other demos.
2484
2485         * platform/graphics/GraphicsContext3D.cpp:
2486         (WebCore::doUnpackingAndPacking):
2487         (WebCore::computeSourceElementsPerRow):
2488         (WebCore::doPacking):
2489         (WebCore::doFloatingPointPacking):
2490         (WebCore::GraphicsContext3D::packPixels):
2491
2492 2011-04-20  Dimitri Glazkov  <dglazkov@chromium.org>
2493
2494         Reviewed by Kent Tamura.
2495
2496         REGRESSION(r82376): Clicking on a label, associated with a disabled input element changes state of the element.
2497         https://bugs.webkit.org/show_bug.cgi?id=59037
2498
2499         Test: fast/events/simulated-click-disabled.html
2500
2501         * dom/EventDispatcher.cpp:
2502         (WebCore::EventDispatcher::dispatchSimulatedClick): Added check for disabled element.
2503
2504 2011-04-20  Eric Seidel  <eric@webkit.org>
2505
2506         Reviewed by Ryosuke Niwa.
2507
2508         Split bidiFirst into two functions
2509         https://bugs.webkit.org/show_bug.cgi?id=59025
2510
2511         I don't have a full understanding of the skipInlines case yet
2512         (hence it's not as pretty as the non-skipping case), but
2513         this is clearly a win, as both functions are much simpler
2514         than their combined version.
2515
2516         Both of these functions still have bad names.  However the
2517         bidiNext/bidiFirst names date all the way back to revision 1
2518         of the WebKit repository. :)  So I don't feel too bad keeping
2519         them for the moment.
2520
2521         * rendering/InlineIterator.h:
2522         (WebCore::bidiNext):
2523         (WebCore::bidiFirstSkippingInlines):
2524         (WebCore::bidiFirstNotSkippingInlines):
2525         * rendering/RenderBlock.cpp:
2526         (WebCore::RenderBlock::simplifiedNormalFlowLayout):
2527         * rendering/RenderBlockLineLayout.cpp:
2528         (WebCore::RenderBlock::layoutInlineChildren):
2529         (WebCore::RenderBlock::determineStartPosition):
2530
2531 2011-04-20  Jia Pu  <jpu@apple.com>
2532
2533         Reviewed by Adele Peterson.
2534     
2535         [Mac] Like autocorrection, other types of substitution need to respect undo.
2536         https://bugs.webkit.org/show_bug.cgi?id=59009
2537         <rdar://problem/8601537>
2538
2539         Similar to autocorrection, we use SpellingCorrectionCommand to carry out other types of text substitution, so that
2540         if user undoes the substitution, it will not be applied again. For CreateLinkCommand,  we add marker when it's undone
2541         so that we won't automatically add link again.
2542
2543         * editing/CreateLinkCommand.h:
2544         (WebCore::CreateLinkCommand::isCreateLinkCommand):
2545         * editing/EditCommand.cpp:
2546         (WebCore::EditCommand::isCreateLinkCommand):
2547         * editing/EditCommand.h:
2548         * editing/Editor.cpp:
2549         (WebCore::Editor::unappliedEditing):
2550         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
2551         * editing/SpellingCorrectionController.cpp:
2552         (WebCore::SpellingCorrectionController::respondToAppliedEditing):
2553         (WebCore::SpellingCorrectionController::respondToUnappliedEditing):
2554         * editing/SpellingCorrectionController.h:
2555         (WebCore::SpellingCorrectionController::UNLESS_ENABLED):
2556
2557 2011-04-20  Steve Lacey  <sjl@chromium.org>
2558
2559         Reviewed by Eric Carlson.
2560
2561         [chromium] Move Chromium media controls into own root element.
2562         https://bugs.webkit.org/show_bug.cgi?id=59018
2563
2564         No new tests as there is no functional change
2565
2566         * WebCore.gypi:
2567         * css/mediaControlsChromium.css:
2568         (audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container):
2569         * html/shadow/MediaControlRootElementChromium.cpp: Added.
2570         Clone of html/shadow/MediaControlRootElement.cpp with all unused code removed.
2571         * html/shadow/MediaControlRootElementChromium.h: Added.
2572
2573 2011-04-20  Charlie Lee  <chocobo@chromium.org>
2574
2575         Reviewed by Dirk Schulze.
2576
2577         LEFilter change doesn't compile on ARM neon targets
2578         https://bugs.webkit.org/show_bug.cgi?id=58671
2579
2580         Build fix for Chromium ARM/NEON platform. Added platform/graphics/filters/arm directory to build system.
2581
2582         * WebCore.gyp/WebCore.gyp:
2583
2584 2011-04-20  Xiaomei Ji  <xji@chromium.org>
2585
2586         Reviewed by Ryosuke Niwa.
2587
2588         Continue (3rd) experiment with moving caret by word in visual order.
2589         https://bugs.webkit.org/show_bug.cgi?id=58294
2590
2591         This patch along with r82588 and r83483 implements moving caret by
2592         word in visual order.
2593         
2594         The overall algorithm is:
2595         1. First get the InlineBox and offset of the pass-in VisiblePosition.
2596         2. Based on the position (left boundary, middle, right boundary) of the offset and the
2597            direction of the movement, look for visually adjacent word breaks.
2598         2.1 If the offset is the minimum offset of the box,
2599             return the rightmost word boundary in previous boxes if moving left.
2600             return the leftmost word boundary in box and next boxes if moving right.
2601         2.2 Similar for the case when offset is at the maximum offset of the box.
2602         2.3 When offset is inside the box (not at boundaries), first find the previousWordPosition 
2603             or nextWordPosition based on the directionality of the box. If this word break position 
2604             is also inside the same box, return it. Otherwise (the nextWordPosition or 
2605             previousWordPosition is not in the same box or is at the box boundary), collect all the 
2606             word breaks in the box and search for the one closest to the input "offset" based on 
2607             box directionality, block directionality, and movement direction. Continue search in 
2608             adjacent boxes if needed.
2609
2610         Notes:
2611         1. Word boundaries are collected one box at a time. Only when a boundary that is closest to 
2612            the input position (in the moving direction) is not available in current box, word 
2613            boundaries in adjacent box will be collected. So, there is no need to save InlineBox in 
2614            word boundaries. Instead, the word boundaries are saved as a pair 
2615            (VisiblePosition, offset) to avoid recomputing VisiblePosition.
2616  
2617         2. We only collect boundaries of the right kind (i.e. left boundary of a word in LTR block
2618            and right boundary of a word in RTL block). And word boundaries are collected using 
2619            previousWordPosition() and nextWordPosition(). So when box directionality is the same as 
2620            block directionality, word boundaries are collected from right to left visually in a LTR 
2621            box, and word boundaries are collected from left to right visually in a RTL box. It is
2622            the other way around when box directionality is different from block directionality.
2623
2624         3. To find the right kinds of word boundaries, we must move back and forth between words
2625            in some situations. For example, if we're moving to the right in a LTR box in LTR block,
2626            we cannot simply return nextWordPosition() because it would return the right boundary
2627            of a word. Instead, we return nextWordPosition()'s nextWordPosition()'s previousWordPosition().
2628
2629         4. When collecting word breaks inside a box, it first computes a start position, then
2630            collect the right kind of word breaks until it reaches the end of (or beyond) the box.
2631            In the meanwhile, it might need special handling on the rightmost or leftmost position 
2632            based on the directionality of the box and block. These computations do not consider the 
2633            box's bidi level.
2634
2635         * editing/visible_units.cpp:
2636         (WebCore::nextWordBreakInBoxInsideBlockWithDifferentDirectionality):
2637         (WebCore::collectWordBreaksInBox):
2638         (WebCore::previousWordBoundaryInBox):
2639         (WebCore::nextWordBoundaryInBox):
2640         (WebCore::visuallyLastWordBoundaryInBox):
2641         (WebCore::leftWordBoundary):
2642         (WebCore::rightWordBoundary):
2643         (WebCore::leftWordPosition):
2644         (WebCore::rightWordPosition):
2645
2646 2011-04-20  Cris Neckar  <cdn@chromium.org>
2647
2648         Reviewed by Dirk Schulze.
2649
2650         Return early when the paint rect and the source rect do not overlap as no bytes need to be copied.
2651         https://bugs.webkit.org/show_bug.cgi?id=57885
2652
2653         Test: svg/filters/svg-transform-blur-crash.xhtml
2654
2655         * platform/graphics/filters/FilterEffect.cpp:
2656         (WebCore::FilterEffect::copyImageBytes):
2657
2658 2011-04-20  Jian Li  <jianli@chromium.org>
2659
2660         Reviewed by Kenneth Russell.
2661
2662         Support DataView in workers
2663         https://bugs.webkit.org/show_bug.cgi?id=59014
2664
2665         Test: fast/canvas/webgl/worker-data-view-test.html
2666
2667         * workers/WorkerContext.idl: Expose DataView constructor.
2668
2669 2011-04-20  Chris Marrin  <cmarrin@apple.com>
2670
2671         Reviewed by Adam Roben.
2672
2673         REGRESSION (WebKit2): CSS animations on pages that use accelerated compositing stop after switching tabs
2674         https://bugs.webkit.org/show_bug.cgi?id=57868
2675         
2676         Running CACFAnimations aren't remembered when layer tree is unparented and 
2677         then reparented. Added a new ensureAnimationsSubmitted function to 
2678         PlatformCALayer to traverse the tree and resubmit animations, setting the 
2679         beginTime to the original start time of the animation. This is called in WK2
2680         when layer tree is newly parented.
2681         
2682         I also consolidated currentTimeToMediaTime into PlatformCALayer so it can be shared
2683         between PlatformCALayer and GraphicsLayerCA.
2684
2685         * platform/graphics/ca/GraphicsLayerCA.cpp:
2686         * platform/graphics/ca/PlatformCAAnimation.h:
2687             Remember actual animation start time in CACFAnimation beginTime property
2688         * platform/graphics/ca/PlatformCALayer.h:
2689             New ensureAnimationsSubmitted function which traverses layers and resubmits all animations
2690         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2691         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
2692
2693 2011-04-20  Eric Carlson  <eric.carlson@apple.com>
2694
2695         Reviewed by Dan Bernstein.
2696
2697         Adopt QTKit API for listing and deleting file in its media cache.
2698         <rdar://problem/9130029> 
2699         https://bugs.webkit.org/show_bug.cgi?id=58795
2700
2701         Not possible to test automatically, verified manually.
2702
2703         * WebCore.exp.in: Export new media download cache functions.
2704
2705         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
2706         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2707         (WebCore::MediaPlayerPrivateQTKit::registerMediaEngine): Register cache management functions.
2708         (WebCore::MediaPlayerPrivateQTKit::getSitesInMediaCache): New, return cache origins.
2709         (WebCore::MediaPlayerPrivateQTKit::clearMediaCache): New, empty the media cache.
2710         (WebCore::MediaPlayerPrivateQTKit::clearMediaCacheForSite): New, delete files in the media
2711             cache for one origin.
2712
2713         * platform/mac/WebCoreSystemInterface.h: Add new WKSI functions.
2714         * platform/mac/WebCoreSystemInterface.mm: Ditto.
2715
2716 2011-04-20  Dirk Schulze  <krit@webkit.org>
2717
2718         Reviewed by Simon Fraser.
2719
2720         SVG feDropShadow implementation of SVG Filters 1.2
2721         https://bugs.webkit.org/show_bug.cgi?id=52513
2722
2723         Support different radii for horizontal and vertical blurring in ShadowBlur. This is a preperation for feDropShadow.
2724         feDropShadow is a new shorthand filter effect for the up-comming Filter 1.0 specification and will use ShadowBlur.
2725         feGaussianBlur might make use of ShadowBlur as well later (on SourceAlpha input).
2726         Added ShadowBlur to remaining platforms.
2727
2728         The changes can't be tested before the changes in feGaussianBlur or feDropShadow. Current behavior is not affected.
2729
2730         * Android.mk:
2731         * CMakeLists.txt:
2732         * GNUmakefile.list.am:
2733         * WebCore.pro:
2734         * platform/graphics/FloatSize.h:
2735         (WebCore::FloatSize::scale):
2736         * platform/graphics/ShadowBlur.cpp:
2737         (WebCore::ScratchBuffer::ScratchBuffer):
2738         (WebCore::ScratchBuffer::setLastShadowValues):
2739         (WebCore::ScratchBuffer::setLastInsetShadowValues):
2740         (WebCore::ScratchBuffer::matchesLastShadow):
2741         (WebCore::ScratchBuffer::matchesLastInsetShadow):
2742         (WebCore::ScratchBuffer::clearScratchBuffer):
2743         (WebCore::ShadowBlur::ShadowBlur):
2744         (WebCore::calculateLobes):
2745         (WebCore::ShadowBlur::blurLayerImage):
2746         (WebCore::ShadowBlur::adjustBlurRadius):
2747         (WebCore::ShadowBlur::calculateLayerBoundingRect):
2748         (WebCore::computeSliceSizesFromRadii):
2749         (WebCore::ShadowBlur::templateSize):
2750         (WebCore::ShadowBlur::drawInsetShadowWithTiling):
2751         (WebCore::ShadowBlur::drawRectShadowWithTiling):
2752         (WebCore::ShadowBlur::drawLayerPieces):
2753         * platform/graphics/ShadowBlur.h:
2754         * platform/graphics/cg/GraphicsContextCG.cpp:
2755         (WebCore::GraphicsContext::fillRect):
2756         (WebCore::GraphicsContext::fillRoundedRect):
2757         (WebCore::GraphicsContext::fillRectWithRoundedHole):
2758
2759 2011-04-19  Roland Steiner  <rolandsteiner@chromium.org>
2760
2761         Reviewed by Dimitri Glazkov.
2762
2763         Bug 52963 - Enable O(1) access to root from any node in shadow DOM subtree
2764         https://bugs.webkit.org/show_bug.cgi?id=52963
2765
2766         .) Change base class of ShadowRoot from DocumentFragment to TreeScope.
2767         .) Re-enable tree scope handling in Node (had ASSERT_NOT_REACHED, etc.).
2768         .) Merged setTreeScope() with setTreeScopeRecursively()
2769         .) Call setTreeScopeRecursively in DOM manipulation functions where applicable.
2770         .) Adapt JavaScript Node wrappers (temporary code - see https://bugs.webkit.org/show_bug.cgi?id=58704).
2771
2772         No new tests. (refactoring)
2773
2774         * bindings/js/JSNodeCustom.cpp:
2775         (WebCore::createWrapperInline):
2776         * bindings/v8/custom/V8NodeCustom.cpp:
2777         (WebCore::toV8Slow):
2778         * dom/ContainerNode.cpp:
2779         (WebCore::ContainerNode::takeAllChildrenFrom):
2780         (WebCore::ContainerNode::removeBetween):
2781         (WebCore::ContainerNode::removeChildren):
2782         (WebCore::ContainerNode::parserAddChild):
2783         * dom/Document.cpp:
2784         (WebCore::Document::Document):
2785         (WebCore::Document::~Document):
2786         (WebCore::Document::setDocType):
2787         * dom/Element.h:
2788         * dom/Node.cpp:
2789         (WebCore::Node::treeScope):
2790         (WebCore::Node::setTreeScopeRecursively):
2791         * dom/Node.h:
2792         (WebCore::Node::document):
2793         * dom/ShadowRoot.cpp:
2794         (WebCore::ShadowRoot::ShadowRoot):
2795         (WebCore::ShadowRoot::~ShadowRoot):
2796         (WebCore::ShadowRoot::nodeType):
2797         (WebCore::ShadowRoot::cloneNode):
2798         (WebCore::ShadowRoot::childTypeAllowed):
2799         * dom/ShadowRoot.h:
2800         (WebCore::toShadowRoot):
2801         * dom/TreeScope.cpp:
2802         (WebCore::TreeScope::TreeScope):
2803         (WebCore::TreeScope::setParentTreeScope):
2804         * dom/TreeScope.h:
2805         * rendering/RenderSlider.cpp:
2806
2807 2011-04-20  Vsevolod Vlasov  <vsevik@chromium.org>
2808
2809         Reviewed by Pavel Feldman.
2810
2811         Web Inspector: Update front-end files list in WebCore.vcproj
2812         https://bugs.webkit.org/show_bug.cgi?id=58896
2813
2814         * WebCore.vcproj/WebCore.vcproj:
2815
2816 2011-04-20  Dimitri Glazkov  <dglazkov@chromium.org>
2817
2818         Qt build fix after r84380.
2819
2820         * css/CSSPrimitiveValueMappings.h: Moved EBorderCollapse-related casts from under ENABLE(SVG) guard.
2821
2822 2011-04-20  Carlos Garcia Campos  <cgarcia@igalia.com>
2823
2824         Reviewed by Martin Robinson.
2825
2826         [GTK] Build libWebCore with the gtk sources too
2827         https://bugs.webkit.org/show_bug.cgi?id=58968
2828
2829         In some cases webcore files are compiled twice, so it improves the
2830         build time.
2831
2832         * GNUmakefile.am: Add webcore gtk sources to libWebCore sources.
2833
2834 2011-04-20  Luke Macpherson   <macpherson@chromium.org>
2835
2836         Reviewed by Dimitri Glazkov.
2837
2838         Allow casting between CSSPrimitiveValue and EBorderCollapse to remove special-case logic from CSSStyleSelector.
2839         https://bugs.webkit.org/show_bug.cgi?id=58964
2840
2841         No new tests as no new functionality added.
2842
2843         * css/CSSPrimitiveValueMappings.h:
2844         Support casting to/from EBorderCollapse.
2845         * css/CSSStyleSelector.cpp:
2846         Use new casting ability to simplify code.
2847         * rendering/style/RenderStyle.h:
2848         Use EBorderCollapse instead of a bool for representing border collapse member variable.
2849         * rendering/style/RenderStyleConstants.h:
2850         Added EBorderCollapse enum.
2851
2852 2011-04-19  Stephen White  <senorblanco@chromium.org>
2853
2854         Reviewed by Kenneth Russell.
2855
2856         Move and rename GLES2Canvas.
2857         https://bugs.webkit.org/show_bug.cgi?id=58927
2858
2859         Move GLES2Canvas to platform/graphcs/gpu, where all the other
2860         gpu-related files live, and rename it to GraphicsContextGPU to better
2861         reflect its purpose.
2862
2863         Covered by existing tests.
2864
2865         * WebCore.gypi:
2866         * platform/graphics/chromium/GLES2Canvas.cpp:
2867         * platform/graphics/chromium/GLES2Canvas.h:
2868         * platform/graphics/skia/GraphicsContextSkia.cpp:
2869         (WebCore::GraphicsContext::fillPath):
2870         (WebCore::GraphicsContext::setPlatformShadow):
2871         * platform/graphics/skia/ImageBufferSkia.cpp:
2872         * platform/graphics/skia/ImageSkia.cpp:
2873         (WebCore::drawBitmapGLES2):
2874         * platform/graphics/skia/PlatformContextSkia.cpp:
2875         (WebCore::PlatformContextSkia::setSharedGraphicsContext3D):
2876         * platform/graphics/skia/PlatformContextSkia.h:
2877         (WebCore::PlatformContextSkia::gpuCanvas):
2878
2879 2011-04-20  Benjamin Poulain  <benjamin.poulain@nokia.com>
2880
2881         Reviewed by Andreas Kling.
2882
2883         [Qt] Clean the style of our cookie methods
2884         https://bugs.webkit.org/show_bug.cgi?id=58987
2885
2886         Got rid of the variables named "u" in favor just converting the url when needed.
2887
2888         * platform/qt/CookieJarQt.cpp:
2889         (WebCore::setCookies): The variable p was unused.
2890         The ::toAscii() depends on the default codec, use toLatin1() instead.
2891         (WebCore::cookies): foreach() should use const reference.
2892         (WebCore::cookieRequestHeaderFieldValue):
2893
2894 2011-04-19  Mihai Parparita  <mihaip@chromium.org>
2895
2896         Reviewed by Adam Barth.
2897
2898         ScriptController.h is included in too many places
2899         https://bugs.webkit.org/show_bug.cgi?id=58963
2900
2901         Remove ScriptController.h #includes from a bunch of .cpp files where it
2902         doesn't appear to be necessary.
2903
2904         * bindings/js/JSCustomPositionCallback.cpp:
2905         * bindings/js/JSCustomPositionErrorCallback.cpp:
2906         * bindings/js/JSCustomVoidCallback.cpp:
2907         * bindings/js/JSCustomXPathNSResolver.cpp:
2908         * bindings/js/JSDOMWindowBase.cpp:
2909         * bindings/js/JSDOMWindowShell.cpp:
2910         * bindings/js/JSDocumentCustom.cpp:
2911         * bindings/js/ScriptDebugServer.cpp:
2912         * bindings/v8/NPV8Object.cpp:
2913         * bindings/v8/ScriptCachedFrameData.cpp:
2914         * bindings/v8/V8DOMWindowShell.cpp:
2915         * bindings/v8/V8DOMWrapper.cpp:
2916         * bindings/v8/V8IsolatedContext.cpp:
2917         * bindings/v8/V8Proxy.cpp:
2918         * bindings/v8/custom/V8LocationCustom.cpp:
2919         * dom/Node.cpp:
2920         * dom/ScriptElement.cpp:
2921         * dom/XMLDocumentParser.cpp:
2922         * dom/XMLDocumentParserQt.cpp:
2923         * html/HTMLEmbedElement.cpp:
2924         * html/HTMLObjectElement.cpp:
2925         * html/HTMLPlugInElement.cpp:
2926         * html/parser/HTMLConstructionSite.cpp:
2927         * html/parser/HTMLTreeBuilder.cpp:
2928         * inspector/InspectorProfilerAgent.cpp:
2929         * loader/icon/IconDatabase.cpp:
2930         * page/Chrome.cpp:
2931         * page/Navigator.cpp:
2932         * page/Page.cpp:
2933         * plugins/PluginView.cpp:
2934         * plugins/gtk/PluginViewGtk.cpp:
2935         * plugins/qt/PluginViewQt.cpp:
2936         * plugins/symbian/PluginViewSymbian.cpp:
2937         * plugins/win/PluginViewWin.cpp:
2938         * svg/SVGDocumentExtensions.cpp:
2939         * xml/XMLTreeViewer.cpp:
2940
2941 2011-04-20  Pavel Feldman  <pfeldman@google.com>
2942
2943         Reviewed by Yury Semikhatsky.
2944
2945         Web Inspector: add Save As to the Resources panel context menu.
2946         https://bugs.webkit.org/show_bug.cgi?id=58983
2947
2948         * English.lproj/localizedStrings.js:
2949         * inspector/front-end/ResourcesPanel.js:
2950         (WebInspector.FrameResourceTreeElement.prototype.onattach):
2951         (WebInspector.FrameResourceTreeElement.prototype._handleContextMenuEvent.save):
2952         (WebInspector.FrameResourceTreeElement.prototype._handleContextMenuEvent):
2953         (WebInspector.ResourceRevisionTreeElement.prototype._handleContextMenuEvent.save):
2954         (WebInspector.ResourceRevisionTreeElement.prototype._handleContextMenuEvent):
2955
2956 2011-04-20  Balazs Kelemen  <kbalazs@webkit.org>
2957
2958         Reviewed by Csaba Osztrogon√°c.
2959
2960         [Qt] Cleanup includepath adjustment for generated files
2961         https://bugs.webkit.org/show_bug.cgi?id=58869
2962
2963         Build cleanup, no new tests.
2964
2965         * WebCore.pri: Add the directory of generated files to the include path
2966         with absolute path to make it valid in the final build step. Remove
2967         unnecessary logic.
2968
2969 2011-04-20  Mariusz Grzegorczyk  <mariusz.g@samsung.com>
2970
2971         Reviewed by Andreas Kling.
2972
2973         [EFL] Initializing m_window member field in PluginView.cpp for efl port
2974         https://bugs.webkit.org/show_bug.cgi?id=58311
2975
2976         No new tests needed: only initializing class member.
2977
2978         * plugins/PluginView.cpp:
2979         (WebCore::PluginView::PluginView):
2980
2981 2011-04-20  Pavel Feldman  <pfeldman@google.com>
2982
2983         Not reviewed: fix Leopard compile.
2984
2985         * inspector/InspectorFrontendClient.h:
2986         * inspector/InspectorFrontendClientLocal.h:
2987         (WebCore::InspectorFrontendClientLocal::saveAs):
2988
2989 2011-04-20  Pavel Feldman  <pfeldman@google.com>
2990
2991         Reviewed by Yury Semikhatsky.
2992
2993         Web Inspector: add saveAs into the InspectorFrontendHost binding.
2994         https://bugs.webkit.org/show_bug.cgi?id=58979
2995
2996         * English.lproj/localizedStrings.js:
2997         * inspector/InspectorFrontendClient.h:
2998         (WebCore::InspectorFrontendClient::saveAs):
2999         (WebCore::InspectorFrontendClient::saveSessionSetting):
3000         (WebCore::InspectorFrontendClient::loadSessionSetting):
3001         * inspector/InspectorFrontendHost.cpp:
3002         (WebCore::InspectorFrontendHost::saveAs):
3003         * inspector/InspectorFrontendHost.h:
3004         * inspector/InspectorFrontendHost.idl:
3005         * inspector/front-end/InspectorFrontendHostStub.js:
3006         (.WebInspector.InspectorFrontendHostStub.prototype.saveAs.fr.onload):
3007         (.WebInspector.InspectorFrontendHostStub.prototype.saveAs):
3008         * inspector/front-end/NetworkPanel.js:
3009         (WebInspector.NetworkPanel.prototype._contextMenu):
3010         (WebInspector.NetworkPanel.prototype._copyAll):
3011         (WebInspector.NetworkPanel.prototype._copyResource):
3012         (WebInspector.NetworkPanel.prototype._exportAll):
3013         (WebInspector.NetworkPanel.prototype._exportResource):
3014         * inspector/front-end/Settings.js:
3015         * inspector/front-end/utilities.js:
3016         ():
3017
3018 2011-04-20  Yury Semikhatsky  <yurys@chromium.org>
3019
3020         Reviewed by Tony Gentilcore.
3021
3022         Error event in <script> element shouldn't bubble
3023         https://bugs.webkit.org/show_bug.cgi?id=51040
3024
3025         Test: svg/dom/SVGScriptElement/script-onerror-bubbling.svg
3026
3027         * dom/ScriptElement.cpp:
3028         (WebCore::ScriptElement::dispatchErrorEvent): the method now has same implementation for all script
3029         elements, script load error event doesn' bubble.
3030         * dom/ScriptElement.h:
3031         * html/HTMLScriptElement.cpp:
3032         * html/HTMLScriptElement.h:
3033         * html/parser/HTMLScriptRunner.cpp:
3034         (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
3035         * svg/SVGScriptElement.cpp:
3036         (WebCore::SVGScriptElement::parseMappedAttribute): SVG script element now supports onerror
3037         hanlder which behaves the same way as onerror in HTML script element: it's invoked when
3038         script loading fails and the event doesn't bubble.
3039         * svg/SVGScriptElement.h:
3040
3041 2011-04-20  Pavel Feldman  <pfeldman@google.com>
3042
3043         Reviewed by Yury Semikhatsky.
3044
3045         Web Inspector: minor protocol cleanups (refined types).
3046         https://bugs.webkit.org/show_bug.cgi?id=58970
3047
3048         * inspector/InjectedScriptSource.js:
3049         * inspector/Inspector.json:
3050
3051 2011-04-20  Leo Yang  <leo.yang@torchmobile.com.cn>
3052
3053         Reviewed by Eric Seidel.
3054
3055         Leaks beneath RenderSVGShadowTreeRootContainer::updateFromElement seen on SnowLeopard Intel Leaks
3056         https://bugs.webkit.org/show_bug.cgi?id=56672
3057
3058         ~RenderSVGShadowTreeRootContainer() cleared shadow host only if
3059         the shadow root is attached. This is wrong because it will
3060         leak shadow root when the root is not attached. For example, it
3061         leaks shadow root of <use> element which is pending on resource.
3062
3063         This patch is clearing shadow host if m_shadowRoot is valid to
3064         prevent leaking.
3065
3066         Fixing leaking, no new tests.
3067
3068         * rendering/svg/RenderSVGShadowTreeRootContainer.cpp:
3069         (WebCore::RenderSVGShadowTreeRootContainer::~RenderSVGShadowTreeRootContainer):
3070
3071 2011-04-19  Maciej Stachowiak  <mjs@apple.com>
3072
3073         Reviewed by Antti Koivisto.
3074
3075         Reproducible crash two-finger zooming at multiple sites in WebCore::RenderLayer::isTransparent
3076         https://bugs.webkit.org/show_bug.cgi?id=58868
3077
3078         I could not figure out how to make a test.
3079
3080         * rendering/RenderLayer.cpp:
3081         (WebCore::RenderLayer::paintLayer): Check for existence of a
3082         parent before calling a method on it.
3083
3084 2011-04-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3085
3086         Reviewed by Daniel Bates.
3087
3088         [EFL] Add current time to media control panel.
3089         https://bugs.webkit.org/show_bug.cgi?id=58866
3090
3091         Implement paintMediaCurrentTime() to show playing time of media content.
3092
3093         * platform/efl/RenderThemeEfl.cpp:
3094         (WebCore::RenderThemeEfl::RenderThemeEfl):
3095         (WebCore::RenderThemeEfl::formatMediaControlsCurrentTime):
3096         (WebCore::RenderThemeEfl::paintMediaCurrentTime):
3097         * platform/efl/RenderThemeEfl.h:
3098
3099 2011-04-19  Jungshik Shin  <jshin@chromium.org>
3100
3101         Reviewed by Adam Barth
3102
3103         Update the list of Unicode blocks to treat as complex scripts
3104         per Unicode 6.0. Also, make [U+02E5..U+02E9] (IPA tone marks)
3105         go through the complex script code path.
3106
3107         Test: fast/text/ipa-tone-letters.html
3108
3109         http://bugs.webkit.org/show_bug.cgi?id=39799
3110
3111         * platform/graphics/Font.cpp:
3112         (WebCore::Font::codePath):
3113
3114 2011-04-19  Pratik Solanki  <psolanki@apple.com>
3115
3116         Reviewed by Simon Fraser.
3117
3118         Follow on fix for https://bugs.webkit.org/show_bug.cgi?id=58926
3119
3120         Move the assert from Image::drawPattern() to Image::drawTiled() so we don't hit it when
3121         trying to paint GeneratedImages.
3122
3123         * platform/graphics/Image.cpp:
3124         (WebCore::Image::drawTiled):
3125         * platform/graphics/cg/ImageCG.cpp:
3126         (WebCore::Image::drawPattern):
3127
3128 2011-04-19  Simon Fraser  <simon.fraser@apple.com>
3129
3130         Fix 32-bit builds.
3131
3132         * rendering/RenderBox.cpp:
3133         (WebCore::RenderBox::determineBackgroundBleedAvoidance):
3134         * rendering/RenderBoxModelObject.cpp:
3135         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3136
3137 2011-04-19  Naoki Takano  <takano.naoki@gmail.com>
3138
3139         Reviewed by Kent Tamura.
3140
3141         [Chromium]UI polishes and tweaks to Autofill dropdown menu.
3142         https://bugs.webkit.org/show_bug.cgi?id=58505
3143         http://code.google.com/p/chromium/issues/detail?id=51077
3144
3145         No new tests. Because this is autofill looking problem in Chromium.
3146         Add m_menuType as PopupMenuStyle to change popup style change.
3147         Put kLinePaddingHeight at the top and bottom of each line if m_menuType is AutofillPopup.
3148         Change separator color to #dcdcdc and remove sparatorPadding at the edge if m_menuType is AutofillPopup.
3149         Change the line height of separator as only the piece if m_menuType is AutofillPopup.
3150         Change the label font size 0.9 time smaller than regular font size if m_menuType is AutofillPopup.
3151
3152         * platform/PopupMenuStyle.h: Add enum PopupMenuType;
3153         (WebCore::PopupMenuStyle::PopupMenuStyle): Add m_menuType.
3154         (WebCore::PopupMenuStyle::menuType): Add to change the style according to the return value.
3155         * platform/chromium/PopupMenuChromium.cpp:
3156         (WebCore::PopupListBox::paintRow):Change the separator color to #dcdcdc.
3157         Change the edge padding according to menuStyle().
3158         (WebCore::PopupListBox::getRowHeight): Add kLineHeightMargin*2 for each line height.
3159
3160 2011-04-19  Simon Fraser  <simon.fraser@apple.com>
3161
3162         Reviewed by Dan Bernstein.
3163
3164         background color of elements with border-radius shows around outer edge of border at corners
3165         https://bugs.webkit.org/show_bug.cgi?id=21819
3166         
3167         When drawing a background followed by a border with the same rounded
3168         clip, some border color leaks out because of antialiasing.
3169         
3170         Fix this by using two different strategies depending on the colors.
3171         If the border is opaque on all sides, we can inset the background by
3172         a device pixel. If not, then we have to draw the unclipped background
3173         and border into a transparency layer, and then clip that.
3174         
3175         A futher possible solution is mentioned in a comment in
3176         determineBackgroundBleedAvoidance() but not yet implemented.
3177         
3178         Also don't try to paint shadows with zero offset, spread and blur.
3179
3180         Test: fast/backgrounds/background-leakage.html,
3181               fast/backgrounds/background-leakage-transforms.html
3182
3183         * rendering/RenderBoxModelObject.h:
3184         Add a BackgroundBleedAvoidance enum with a value for each
3185         strategy.
3186         * rendering/RenderBoxModelObject.cpp:
3187         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3188         Pass BackgroundBleedAvoidance, bail early if the border rect is empty.
3189         If using the transparency layer solution, don't bother to clip
3190         to the rounded rect for the background. If the strategy is to
3191         shrink the background, do that.
3192         (WebCore::BorderEdge::BorderEdge):
3193         (WebCore::BorderEdge::obscuresBackgroundEdge):
3194         Helper method to determine if this border side will totally
3195         obscured by the border edge, allowing us to inset it.
3196         (WebCore::RenderBoxModelObject::paintOneBorderSide):
3197         Pass BackgroundBleedAvoidance through.
3198         (WebCore::RenderBoxModelObject::paintBorderSides):
3199         Ditto.
3200         (WebCore::RenderBoxModelObject::paintTranslucentBorderSides):
3201         Ditto.
3202         (WebCore::RenderBoxModelObject::paintBorder):
3203         Fill BorderEdges using getBorderEdgeInfo now.
3204         Don't clip to the rounded border if we are using the
3205         transparency layer solution.
3206         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
3207         Pass bleedAvoidance through, and use it for double borders.
3208         (WebCore::RenderBoxModelObject::getBorderEdgeInfo):
3209         Helper to fill in the BorderEdge array.
3210         (WebCore::RenderBoxModelObject::borderObscuresBackgroundEdge):
3211         Used to determine if we can use the background shrinkage solution.
3212         (WebCore::RenderBoxModelObject::paintBoxShadow):
3213         Don't paint shadows that should not be visible.
3214
3215         * rendering/RenderBox.h:
3216         * rendering/RenderBox.cpp:
3217         (WebCore::RenderBox::paintRootBoxFillLayers):
3218         Pass BackgroundBleedNone for the root box.
3219         
3220         (WebCore::RenderBox::determineBackgroundBleedAvoidance):
3221         Determine which bleed strategy we can use.
3222         
3223         (WebCore::RenderBox::paintBoxDecorationsWithSize):
3224         Based on the bleedAvoidance, make a transparency layer
3225         which will be clipped to the rounded border outside edge,
3226         and pass bleedAvoidance to the background and border-painting
3227         methods.        
3228         (WebCore::RenderBox::paintMaskImages):
3229         Use BackgroundBleedNone.
3230         (WebCore::RenderBox::paintFillLayers):
3231         (WebCore::RenderBox::paintFillLayer):
3232         Pass bleedAvoidance through.
3233
3234         * rendering/InlineFlowBox.cpp:
3235         (WebCore::InlineFlowBox::paintFillLayer):
3236         (WebCore::InlineFlowBox::paintBoxDecorations):
3237         Pass BackgroundBleedNone. At some point we may want to do the right
3238         thing for split inlines.
3239
3240         * rendering/RenderFieldset.cpp:
3241         (WebCore::RenderFieldset::paintBoxDecorations):
3242         * rendering/RenderTableCell.cpp:
3243         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
3244         Pass BackgroundBleedNone.
3245
3246 2011-04-19  Yuta Kitamura  <yutak@chromium.org>
3247
3248         Reviewed by Alexey Proskuryakov.
3249
3250         WebSocket: Add assertion for SocketStreamError::failingURL.
3251         https://bugs.webkit.org/show_bug.cgi?id=58765
3252
3253         No new tests, because an existing test http/tests/inspector/console-websocket-error.html should cover this.
3254
3255         * websockets/WebSocketChannel.cpp:
3256         (WebCore::WebSocketChannel::didFail): If error.failingURL() is provided, it must be the same as
3257         m_handshake.url(). failingURL may be null if SocketStreamHandle has created a SocketStreamError
3258         using zero- or one-argument constructor (which is old version but some ports are still using it).
3259         In that case, m_handshake.url() is passed to addMessage().
3260
3261 2011-04-19  Eric Carlson  <eric.carlson@apple.com>
3262
3263         Reviewed by Dimitri Glazkov.
3264
3265         Media controls status display should not be hidden for live streams
3266         https://bugs.webkit.org/show_bug.cgi?id=58952
3267
3268         Tested manually because we don't have any live streams to test in DRT.
3269
3270         * html/shadow/MediaControlElements.cpp:
3271         (WebCore::MediaControlStatusDisplayElement::update): Set the status to "Loading" only until
3272             there is something to display (readyState exceeds HAVE_METADATA).
3273         * html/shadow/MediaControlRootElement.cpp:
3274         (WebCore::MediaControlRootElement::loadedMetadata): Don't hide the status display for
3275             live streams.
3276
3277 2011-04-19  Julien Chaffraix  <jchaffraix@codeaurora.org>
3278
3279         Reviewed by Alexey Proskuryakov.
3280
3281         https://bugs.webkit.org/show_bug.cgi?id=45425
3282         HTMLLinkElement.disabled does not forward value to the Stylesheet's disabled attribute on setting
3283
3284         Test: fast/html/htmllink-disable.html
3285         Test: fast/dom/HTMLLinkElement/disabled-attribute.html
3286
3287         Match the HTML5 specification by forwarding the 'disabled' attribute to our stylesheet.
3288
3289         Based on previous work by Bijan Amirzada <bijana@codeaurora.org>.
3290
3291         * html/HTMLLinkElement.cpp:
3292         (WebCore::HTMLLinkElement::disabled): Return our stylesheet's 'disabled' value or
3293         false if we don't have a stylesheet.
3294         (WebCore::HTMLLinkElement::setDisabled): Set our stylesheet's 'disabled' value or
3295         ignore the call if we don't have a stylesheet.
3296         * html/HTMLLinkElement.h:
3297         * html/HTMLLinkElement.idl: Remove 'Reflect' as it is not a reflected attribute anymore in HTML5.
3298         This matches the way FF4, Opera and IE9 handle the attribute.
3299
3300 2011-04-19  Ryosuke Niwa  <rniwa@webkit.org>
3301
3302         Reviewed by Eric Seidel.
3303
3304         Remove calls to deprecatedOffset and deprecatedNode in TypingCommand
3305         https://bugs.webkit.org/show_bug.cgi?id=58569
3306
3307         Removed all calls to deprecatedOffset and deprecatedNode.
3308
3309         * editing/TypingCommand.cpp:
3310         (WebCore::TypingCommand::insertText):
3311         (WebCore::TypingCommand::deleteKeyPressed):
3312         (WebCore::TypingCommand::forwardDeleteKeyPressed):
3313
3314 2011-04-19  Adrienne Walker  <enne@google.com>
3315
3316         Reviewed by Kenneth Russell.
3317
3318         [chromium] Initialize depth mask to known value before getBooleanv call
3319         https://bugs.webkit.org/show_bug.cgi?id=58948
3320
3321         This trips an assert in the GPU command buffer client code if the
3322         pointed-to value is not initialized to 0 or -1.
3323
3324         * platform/graphics/gpu/DrawingBuffer.cpp:
3325         (WebCore::DrawingBuffer::clearFramebuffer):
3326
3327 2011-04-19  Pratik Solanki  <psolanki@apple.com>
3328
3329         Reviewed by Simon Fraser.
3330
3331         BitmapImage::destroyMetadataAndNotify should clear m_checkedForSolidColor
3332         https://bugs.webkit.org/show_bug.cgi?id=58926
3333
3334         * platform/graphics/BitmapImage.cpp:
3335         (WebCore::BitmapImage::destroyMetadataAndNotify): Set m_checkedForSolidColor to false.
3336         * platform/graphics/BitmapImage.h:
3337         (WebCore::BitmapImage::assertNotSolidColor):
3338         * platform/graphics/cg/ImageCG.cpp:
3339         (WebCore::Image::drawPattern): Add assert to make sure this is not called for a 1x1 image.
3340
3341 2011-04-19  Ryosuke Niwa  <rniwa@webkit.org>
3342
3343         Reviewed by Ojan Vafai.
3344
3345         REGRESSION(r83967): Crash in selectionExtentRespectingEditingBoundary
3346         https://bugs.webkit.org/show_bug.cgi?id=58910
3347
3348         The crash was caused by selectionExtentRespectingEditingBoundary's incorrectly assuming that
3349         targetNode always have renderer when there selection has an editable root and the target node
3350         is outside of the editable root.
3351         
3352         Fixed the bug by adding an early exit when the target node is null.
3353
3354         No new tests are added since we don't have a reduction for this crash.
3355
3356         * page/EventHandler.cpp:
3357         (WebCore::selectionExtentRespectingEditingBoundary):
3358
3359 2011-04-19  Geoffrey Garen  <ggaren@apple.com>
3360
3361         Try to fix v8 build.
3362
3363         * bindings/scripts/CodeGeneratorV8.pm: This is a pretty bad system.
3364
3365 2011-04-19  Enrica Casucci  <enrica@apple.com>
3366
3367         Reviewed by Ryosuke Niwa.
3368
3369         REGRESSION(r55762): Highlight color can't be copied in gmail.
3370         https://bugs.webkit.org/show_bug.cgi?id=58925
3371         <rdar://problem/9253057>
3372
3373         Test: editing/pasteboard/copy-text-with-backgroundcolor.html
3374
3375         The changes of r55762 uncovered the underlying issue here. The markup fragment
3376         placed in the pasteboard does not contain the background color style.
3377         This occurs only if the selection is limited to a single text node, whereas if the
3378         selection spans across multiple nodes, the style is preserved correctly.
3379         The fix consists in changing the logic that decides whether we should include the wrapping
3380         node in the markup. That logic is based on the code in highestAncestorToWrapMarkup which relies
3381         on isElementPresentational to choose candidates to be the wrapping node.
3382         I've extended it to accept nodes that have non fully transparent background colors.
3383
3384         * editing/Editor.cpp:
3385         (WebCore::Editor::hasTransparentBackgroundColor): Now is a static method of the class.
3386         * editing/Editor.h:
3387         * editing/markup.cpp:
3388         (WebCore::isElementPresentational): Modified to use hasTransparentBackgroundColor.
3389
3390 2011-04-19  Geoffrey Garen  <ggaren@apple.com>
3391
3392         Reviewed by Oliver Hunt.
3393
3394         Removed a use of markDOMObjectWrapper: NodeLists
3395         https://bugs.webkit.org/show_bug.cgi?id=58939
3396
3397         * bindings/js/JSDocumentCustom.cpp:
3398         (WebCore::JSDocument::markChildren): No need to mark node lists, because
3399         now they use the opaque roots system to decide their lifetimes.
3400
3401         * bindings/js/JSNamedNodeMapCustom.cpp: Removed stray newline.
3402
3403         * bindings/js/JSNodeListCustom.cpp:
3404         (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
3405         (WebCore::JSNodeListOwner::finalize):
3406         (WebCore::wrapperOwner):
3407         (WebCore::wrapperContext):
3408         (WebCore::toJS): Use the opaque roots system to avoid relying on
3409         markDOMObjectWrapper.
3410
3411         * dom/DynamicNodeList.cpp:
3412         (WebCore::DynamicNodeList::isDynamicNodeList):
3413         * dom/DynamicNodeList.h:
3414         (WebCore::DynamicNodeList::rootNode): Added the ability to get the node
3415         backing a NodeList, for use in the opaque roots system.
3416
3417         * dom/Node.cpp:
3418         * dom/Node.h:
3419         * dom/NodeList.h:
3420         (WebCore::NodeList::isDynamicNodeList): Ditto. Removed cruft related
3421         to the old way of marking NodeLists.
3422
3423         * dom/NodeList.idl: We need a custom toJS so we can specify a custom
3424         WeakHandleOwner at construction time.
3425
3426 2011-04-19  Antoine Labour  <piman@chromium.org>
3427
3428         Reviewed by James Robinson.
3429
3430         For invisible iframes, propagate compositing to parent instead of setting self
3431         as root.
3432         https://bugs.webkit.org/show_bug.cgi?id=58414
3433
3434         Tests: compositing/iframes/invisible-iframe.html
3435                compositing/iframes/invisible-nested-iframe-hide.html
3436                compositing/iframes/invisible-nested-iframe-show.html
3437                compositing/iframes/invisible-nested-iframe.html
3438
3439         * rendering/RenderLayerCompositor.cpp:
3440         (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame):