[CSS Filters] Move m_filter and related fields from RenderLayer to a different struct...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-04-24  Alexandru Chiculita  <achicu@adobe.com>
2
3         [CSS Filters] Move m_filter and related fields from RenderLayer to a different structure and only allocate it when needed
4         https://bugs.webkit.org/show_bug.cgi?id=84460
5
6         Reviewed by Dean Jackson.
7
8         The new RenderLayerFilterInfo is meant to be allocated only when needed by filters. The link to the RenderLayerFilterInfo
9         is maintained using a HashMap and a single boolean in the RenderLayer class.
10
11         No new tests, just extracted a couple of fields inside the RenderLayer to a separate class.
12
13         * GNUmakefile.list.am:
14         * Target.pri:
15         * WebCore.gypi:
16         * WebCore.vcproj/WebCore.vcproj:
17         * WebCore.xcodeproj/project.pbxproj:
18         * rendering/FilterEffectRenderer.cpp:
19         (WebCore::FilterEffectRendererHelper::prepareFilterEffect):
20         (WebCore::FilterEffectRendererHelper::beginFilterEffect):
21         (WebCore::FilterEffectRendererHelper::applyFilterEffect):
22         * rendering/RenderLayer.cpp:
23         (WebCore::RenderLayer::RenderLayer):
24         (WebCore::RenderLayer::~RenderLayer):
25         (WebCore::RenderLayer::paintsWithFilters):
26         (WebCore::RenderLayer::requiresFullLayerImageForFilters):
27         (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
28         (WebCore::RenderLayer::paintLayerContents):
29         (WebCore::RenderLayer::updateOrRemoveFilterEffect):
30         * rendering/RenderLayer.h:
31         (WebCore::RenderLayer::filterRenderer):
32         (RenderLayer):
33         (WebCore::RenderLayer::filterInfo):
34         (WebCore::RenderLayer::ensureFilterInfo):
35         (WebCore::RenderLayer::removeFilterInfoIfNeeded):
36         (WebCore::RenderLayer::hasFilterInfo):
37         (WebCore::RenderLayer::setHasFilterInfo):
38         * rendering/RenderLayerFilterInfo.cpp: Added.
39         (WebCore):
40         (WebCore::RenderLayerFilterInfo::filterInfoForRenderLayer):
41         (WebCore::RenderLayerFilterInfo::createFilterInfoForRenderLayerIfNeeded):
42         (WebCore::RenderLayerFilterInfo::removeFilterInfoForRenderLayer):
43         (WebCore::RenderLayerFilterInfo::RenderLayerFilterInfo):
44         (WebCore::RenderLayerFilterInfo::~RenderLayerFilterInfo):
45         (WebCore::RenderLayerFilterInfo::setRenderer):
46         * rendering/RenderLayerFilterInfo.h: Added.
47         (WebCore):
48         (RenderLayerFilterInfo):
49         (WebCore::RenderLayerFilterInfo::dirtySourceRect):
50         (WebCore::RenderLayerFilterInfo::addDirtySourceRect):
51         (WebCore::RenderLayerFilterInfo::resetDirtySourceRect):
52         (WebCore::RenderLayerFilterInfo::renderer):
53
54 2012-04-24  Kentaro Hara  <haraken@chromium.org>
55
56         [V8] Pass Isolate around in SerializedScriptValue.cpp (Part1)
57         https://bugs.webkit.org/show_bug.cgi?id=84663
58
59         Reviewed by Nate Chapin.
60
61         The objective is to pass Isolate to toV8() in SerializedScriptValue.cpp.
62
63         Part1: Add an Isolate argument to SerializedScriptValue::create(),
64         SerializedScriptValue::deserialize(), etc.
65         Part2: Add an m_isolate member to SerializedScriptValue::Writer()
66         and SerializedScriptValue::Reader().
67         Part3: Pass Isolate to toV8().
68
69         This patch fixes Part1.
70
71         No tests. No change in behavior.
72
73         * bindings/v8/SerializedScriptValue.cpp:
74         (WebCore::SerializedScriptValue::create):
75         (WebCore::SerializedScriptValue::undefinedValue):
76         (WebCore::SerializedScriptValue::booleanValue):
77         (WebCore::SerializedScriptValue::numberValue):
78         (WebCore::SerializedScriptValue::SerializedScriptValue):
79         (WebCore::SerializedScriptValue::deserialize):
80         (WebCore::SerializedScriptValue::deserializeForInspector):
81         * bindings/v8/SerializedScriptValue.h:
82         (SerializedScriptValue):
83
84 2012-04-24  Kentaro Hara  <haraken@chromium.org>
85
86         [V8][Refactoring] Remove deserializeAndSetProperty()
87         from SerializedScriptValue.cpp
88         https://bugs.webkit.org/show_bug.cgi?id=84662
89
90         Reviewed by Nate Chapin.
91
92         SerializedScriptValue::deserializeAndSetProperty() is no
93         longer used. This patch removes it.
94
95         No tests. No change in behavior.
96
97         * bindings/v8/SerializedScriptValue.cpp:
98         * bindings/v8/SerializedScriptValue.h:
99
100 2012-04-24  Kentaro Hara  <haraken@chromium.org>
101
102         [V8] Pass Isolate to setDOMException() in CodeGeneratorV8.pm
103         https://bugs.webkit.org/show_bug.cgi?id=84660
104
105         Reviewed by Nate Chapin.
106
107         The objective is to pass Isolate around in V8 bindings.
108         This patch passes Isolate to setDOMException() in CodeGeneratorV8.pm.
109
110         Test: bindings/scripts/test/TestEventTarget.idl
111               bindings/scripts/test/TestObj.idl
112               bindings/scripts/test/TestInterface.idl
113
114         * bindings/scripts/CodeGeneratorV8.pm: Modified as described above.
115         (GenerateSetDOMException):
116         (GenerateNormalAttrGetter):
117         (GenerateNormalAttrSetter):
118         (GenerateFunctionCallback):
119         (GenerateParametersCheck):
120         (GenerateFunctionCallString):
121
122         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
123         Updated run-bindings-tests results.
124         (WebCore::TestEventTargetV8Internal::itemCallback):
125         (WebCore::TestEventTargetV8Internal::dispatchEventCallback):
126         * bindings/scripts/test/V8/V8TestInterface.cpp: Ditto.
127         (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):
128         * bindings/scripts/test/V8/V8TestObj.cpp: Ditto.
129         (WebCore::TestObjV8Internal::attrWithGetterExceptionAttrGetter):
130         (WebCore::TestObjV8Internal::attrWithGetterExceptionAttrSetter):
131         (WebCore::TestObjV8Internal::attrWithSetterExceptionAttrSetter):
132         (WebCore::TestObjV8Internal::stringAttrWithGetterExceptionAttrGetter):
133         (WebCore::TestObjV8Internal::stringAttrWithGetterExceptionAttrSetter):
134         (WebCore::TestObjV8Internal::stringAttrWithSetterExceptionAttrSetter):
135         (WebCore::TestObjV8Internal::withScriptStateAttributeRaisesAttrGetter):
136         (WebCore::TestObjV8Internal::withScriptStateAttributeRaisesAttrSetter):
137         (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrGetter):
138         (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrSetter):
139         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrGetter):
140         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrSetter):
141         (WebCore::TestObjV8Internal::methodThatRequiresAllArgsAndThrowsCallback):
142         (WebCore::TestObjV8Internal::methodWithExceptionCallback):
143         (WebCore::TestObjV8Internal::withScriptStateVoidExceptionCallback):
144         (WebCore::TestObjV8Internal::withScriptStateObjExceptionCallback):
145         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateObjExceptionCallback):
146         (WebCore::TestObjV8Internal::getSVGDocumentCallback):
147         (WebCore::TestObjV8Internal::strictFunctionCallback):
148
149 2012-04-24  Kentaro Hara  <haraken@chromium.org>
150
151         [V8] Pass Isolate to setDOMException() (Part2)
152         https://bugs.webkit.org/show_bug.cgi?id=84658
153
154         Reviewed by Nate Chapin.
155
156         The objective is to pass Isolate around in V8 bindings.
157         This patch passes Isolate to setDOMException() in custom
158         binding code.
159
160         No tests. No change in behavior.
161
162         * bindings/v8/V8Collection.cpp:
163         (WebCore::toOptionsCollectionSetter):
164         * bindings/v8/V8Collection.h:
165         (WebCore):
166         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
167         (WebCore::constructWebGLArrayWithArrayBufferArgument):
168         (WebCore::setWebGLArrayHelper):
169         * bindings/v8/custom/V8DOMWindowCustom.cpp:
170         (WebCore::WindowSetTimeoutImpl):
171         * bindings/v8/custom/V8DataViewCustom.cpp:
172         (WebCore::V8DataView::getInt8Callback):
173         (WebCore::V8DataView::getUint8Callback):
174         (WebCore::V8DataView::setInt8Callback):
175         (WebCore::V8DataView::setUint8Callback):
176         * bindings/v8/custom/V8DirectoryEntrySyncCustom.cpp:
177         (WebCore::V8DirectoryEntrySync::getDirectoryCallback):
178         (WebCore::V8DirectoryEntrySync::getFileCallback):
179         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
180         (WebCore::V8HTMLCanvasElement::toDataURLCallback):
181         * bindings/v8/custom/V8HTMLElementCustom.cpp:
182         (WebCore::V8HTMLElement::itemValueAccessorSetter):
183         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
184         (WebCore::V8HTMLOptionsCollection::addCallback):
185         (WebCore::V8HTMLOptionsCollection::lengthAccessorSetter):
186         (WebCore::V8HTMLOptionsCollection::indexedPropertySetter):
187         * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
188         (WebCore::V8HTMLSelectElement::indexedPropertySetter):
189         * bindings/v8/custom/V8NodeCustom.cpp:
190         (WebCore::V8Node::insertBeforeCallback):
191         (WebCore::V8Node::replaceChildCallback):
192         (WebCore::V8Node::removeChildCallback):
193         (WebCore::V8Node::appendChildCallback):
194         * bindings/v8/custom/V8SQLTransactionCustom.cpp:
195         (WebCore::V8SQLTransaction::executeSqlCallback):
196         * bindings/v8/custom/V8WebKitMutationObserverCustom.cpp:
197         (WebCore::V8WebKitMutationObserver::observeCallback):
198         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
199         (WebCore::V8XMLHttpRequest::responseAccessorGetter):
200
201 2012-04-24  Kentaro Hara  <haraken@chromium.org>
202
203         [V8] Pass Isolate to setDOMException() (Part1)
204         https://bugs.webkit.org/show_bug.cgi?id=84656
205
206         Reviewed by Nate Chapin.
207
208         The objective is to pass Isolate around in V8 bindings.
209         This patch passes Isolate to setDOMException() in custom binding code.
210
211         No tests. No change in behavior.
212
213         * bindings/v8/custom/V8LocationCustom.cpp:
214         (WebCore::V8Location::protocolAccessorSetter):
215         * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
216         (WebCore::V8SQLTransactionSync::executeSqlCallback):
217         * bindings/v8/custom/V8SVGLengthCustom.cpp:
218         (WebCore::V8SVGLength::valueAccessorGetter):
219         (WebCore::V8SVGLength::valueAccessorSetter):
220         (WebCore::V8SVGLength::convertToSpecifiedUnitsCallback):
221         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
222         (WebCore::getObjectParameter):
223         (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback):
224         (WebCore::V8WebGLRenderingContext::getExtensionCallback):
225         (WebCore::V8WebGLRenderingContext::getFramebufferAttachmentParameterCallback):
226         (WebCore::V8WebGLRenderingContext::getParameterCallback):
227         (WebCore::V8WebGLRenderingContext::getProgramParameterCallback):
228         (WebCore::V8WebGLRenderingContext::getShaderParameterCallback):
229         (WebCore::V8WebGLRenderingContext::getUniformCallback):
230         (WebCore::vertexAttribAndUniformHelperf):
231         (WebCore::uniformHelperi):
232         (WebCore::uniformMatrixHelper):
233
234 2012-04-24  Pavel Feldman  <pfeldman@chromium.org>
235
236         Web Inspector: encapsulate live location into the Script.
237         https://bugs.webkit.org/show_bug.cgi?id=84722
238
239         Reviewed by Yury Semikhatsky.
240
241         Live location is just a location on the script. The way it is implemented today involves too many indirections.
242
243         * inspector/front-end/CompilerScriptMapping.js:
244         * inspector/front-end/DebuggerModel.js:
245         (WebInspector.DebuggerModel.prototype.setBreakpointByScriptLocation):
246         (WebInspector.DebuggerModel.prototype.scriptForId):
247         * inspector/front-end/DebuggerPresentationModel.js:
248         (WebInspector.DebuggerPresentationModel.prototype.createLiveLocation):
249         (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessageToScript):
250         (WebInspector.DebuggerPresentationModel.prototype._debuggerPaused):
251         (WebInspector.DebuggerPresentationModel.prototype.set selectedCallFrame):
252         (WebInspector.PresentationCallFrame.prototype.uiLocation):
253         (WebInspector.DebuggerPresentationModel.CallFramePlacard):
254         (WebInspector.DebuggerPresentationModel.Linkifier.prototype.linkifyRawLocation):
255         * inspector/front-end/RawSourceCode.js:
256         * inspector/front-end/ResourceScriptMapping.js:
257         (WebInspector.ResourceScriptMapping.prototype.addScript):
258         (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeChanged):
259         (WebInspector.ResourceScriptMapping.prototype._bindScriptToRawSourceCode):
260         * inspector/front-end/Script.js:
261         (WebInspector.Script):
262         (WebInspector.Script.prototype.isInlineScript):
263         (WebInspector.Script.prototype.setSourceMapping):
264         (WebInspector.Script.prototype.createLocation):
265         (WebInspector.Script.Location):
266         (WebInspector.Script.Location.prototype.dispose):
267         (WebInspector.Script.Location.prototype._update):
268         * inspector/front-end/ScriptMapping.js:
269         (WebInspector.UILocation):
270         (WebInspector.SourceMapping):
271         (WebInspector.SourceMapping.prototype.rawLocationToUILocation):
272         (WebInspector.SourceMapping.prototype.uiLocationToRawLocation):
273         (WebInspector.MainScriptMapping):
274         (WebInspector.MainScriptMapping.prototype.addScript):
275         (WebInspector.MainScriptMapping.prototype.reset):
276         * inspector/front-end/SnippetsModel.js:
277         (WebInspector.SnippetsScriptMapping.prototype._createUISourceCodeForScript):
278
279 2012-04-24  Yury Semikhatsky  <yurys@chromium.org>
280
281         Web Inspector: a bunch of heap profiler cleanups
282         https://bugs.webkit.org/show_bug.cgi?id=84730
283
284         - HeapSnapshotProviderProxy passed explicitely as a parameter to HeapSnapshotGridNode
285         constructor
286         - Removed dead code
287         - Removed unused parameters
288         - Added more closure compiler annotations
289         - Extracted code finding cycled among node ancestors into a separate method
290
291         Reviewed by Pavel Feldman.
292
293         * inspector/front-end/HeapSnapshot.js:
294         (WebInspector.HeapSnapshot.prototype.createEdgesProvider):
295         (WebInspector.HeapSnapshot.prototype.createRetainingEdgesProvider):
296         (WebInspector.HeapSnapshot.prototype.createNodesProviderForDominator):
297         (WebInspector.HeapSnapshotEdgesProvider):
298         * inspector/front-end/HeapSnapshotDataGrids.js:
299         * inspector/front-end/HeapSnapshotGridNodes.js:
300         (WebInspector.HeapSnapshotGridNode):
301         (WebInspector.HeapSnapshotGenericObjectNode):
302         (WebInspector.HeapSnapshotObjectNode):
303         (WebInspector.HeapSnapshotObjectNode.prototype._findAncestorWithSameSnapshotNodeId):
304         (WebInspector.HeapSnapshotInstanceNode):
305         (WebInspector.HeapSnapshotConstructorNode):
306         (WebInspector.HeapSnapshotDiffNode):
307         (WebInspector.HeapSnapshotDiffNode._createProvider):
308         (WebInspector.HeapSnapshotDominatorObjectNode):
309         * inspector/front-end/HeapSnapshotProxy.js:
310         (WebInspector.HeapSnapshotWorker):
311         (WebInspector.HeapSnapshotProxy.prototype.createNodesProviderForDominator):
312         * inspector/front-end/utilities.js:
313
314 2012-04-24  Adam Klein  <adamk@chromium.org>
315
316         Fix includes in StrongInlines.h and ScriptValue.h
317         https://bugs.webkit.org/show_bug.cgi?id=84659
318
319         Reviewed by Geoffrey Garen.
320
321         This change was prompted by an attempt to use ScriptValue.h from a
322         WebCore header file and running into trouble with the (as it turns out
323         unnecessary) include of JSDOMBinding.h.
324
325         * bindings/js/ScriptValue.cpp: Add include of JSDOMBinding.h, now that
326         it's not included by the header.
327         * bindings/js/ScriptValue.h: Remove unnecessary include of JSDOMBinding.h.
328
329 2012-04-24  Antti Koivisto  <antti@apple.com>
330
331         Move MediaList CSSOM wrapper ownership to parent rule or stylesheet
332         https://bugs.webkit.org/show_bug.cgi?id=84716
333
334         Reviewed by Anders Carlsson.
335
336         MediaList CSSOM wrapper should be owned by a rule or a stylesheet, not by the underlying 
337         MediaQuerySet.
338         
339         Remove the ref forwarding from MediaList in favor of regular refcounting. Use the usual
340         pattern where the parent wrapper refs the child wrapper and zeroes the backpointer
341         on destruction. 
342
343         * bindings/js/JSDOMBinding.h:
344         (WebCore::root):
345         * css/CSSImportRule.cpp:
346         (WebCore::CSSImportRule::~CSSImportRule):
347         (WebCore::CSSImportRule::media):
348         * css/CSSImportRule.h:
349         (StyleRuleImport):
350         (CSSImportRule):
351         * css/CSSMediaRule.cpp:
352         (WebCore::CSSMediaRule::~CSSMediaRule):
353         (WebCore::CSSMediaRule::media):
354         * css/CSSMediaRule.h:
355         (CSSMediaRule):
356         * css/CSSStyleSheet.cpp:
357         (WebCore::CSSStyleSheet::~CSSStyleSheet):
358         (WebCore::CSSStyleSheet::media):
359         * css/CSSStyleSheet.h:
360         (CSSStyleSheet):
361         * css/MediaList.cpp:
362         (WebCore::MediaQuerySet::mediaText):
363         (WebCore::MediaList::MediaList):
364         (WebCore):
365         (WebCore::MediaList::notifyChanged):
366         * css/MediaList.h:
367         (MediaQuerySet):
368         (WebCore::MediaList::create):
369         (WebCore::MediaList::parentRule):
370         (WebCore::MediaList::clearParentStyleSheet):
371         (WebCore::MediaList::clearParentRule):
372         (WebCore::MediaList::queries):
373         (MediaList):
374         * css/StyleRule.h:
375         (WebCore::StyleRuleMedia::mediaQueries):
376
377 2012-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>
378
379         [GTK] Should pass canvas/philip/tests/toDataURL.jpeg.alpha.html
380         https://bugs.webkit.org/show_bug.cgi?id=83973
381
382         Reviewed by Philippe Normand.
383
384         Test: canvas/philip/tests/toDataURL.jpeg.alpha.html
385
386         * platform/graphics/gtk/ImageBufferGtk.cpp:
387         (WebCore::encodeImage): Convert ARGB32 cairo surface into RGB24
388         when encoding JPEG images since JPEG encoder doesn't support alpha
389         channel.
390
391 2012-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>
392
393         [GTK] Add WebKitCookieManager::changed signal to WebKit2 GTK+ API
394         https://bugs.webkit.org/show_bug.cgi?id=82598
395
396         Reviewed by Philippe Normand.
397
398         * GNUmakefile.list.am: Add new files to compilation.
399         * platform/gtk/TemporaryLinkStubs.cpp: Remove stubs for
400         setCookieStoragePrivateBrowsingEnabled,
401         startObservingCookieChanges and stopObservingCookieChanges.
402         * platform/network/soup/CookieStorageSoup.cpp: Added.
403         (WebCore::setCookieStoragePrivateBrowsingEnabled):
404         (WebCore::soupCookiesChanged): Notify cookies changes using
405         platform strategies.
406         (WebCore::startObservingCookieChanges): Connect to changed signal
407         of the soup cookie jar.
408         (WebCore::stopObservingCookieChanges): Disconnect signals handlers
409         for changed signals of the soup cookie jar.
410
411 2012-04-24  Alexis Menard  <alexis.menard@openbossa.org>
412
413         Rename CSSStyleApplyProperty files to StyleBuilder.
414         https://bugs.webkit.org/show_bug.cgi?id=84721
415
416         Reviewed by Antti Koivisto.
417
418         r115043 renamed CSSStyleApplyProperty class to StyleBuilder. This
419         patch rename the files to match the new class name.
420
421         No new tests : renaming of files, no behavior changes expected.
422
423         * CMakeLists.txt:
424         * GNUmakefile.list.am:
425         * Target.pri:
426         * WebCore.gypi:
427         * WebCore.vcproj/WebCore.vcproj:
428         * WebCore.xcodeproj/project.pbxproj:
429         * css/CSSAllInOne.cpp:
430         * css/CSSStyleSelector.cpp:
431         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
432         * css/StyleBuilder.cpp: Renamed from Source/WebCore/css/CSSStyleApplyProperty.cpp.
433         (WebCore):
434         (ApplyPropertyExpanding):
435         (WebCore::ApplyPropertyExpanding::applyInheritValue):
436         (WebCore::ApplyPropertyExpanding::applyInitialValue):
437         (WebCore::ApplyPropertyExpanding::applyValue):
438         (WebCore::ApplyPropertyExpanding::createHandler):
439         (ApplyPropertyDefaultBase):
440         (WebCore::ApplyPropertyDefaultBase::setValue):
441         (WebCore::ApplyPropertyDefaultBase::value):
442         (WebCore::ApplyPropertyDefaultBase::initial):
443         (WebCore::ApplyPropertyDefaultBase::applyInheritValue):
444         (WebCore::ApplyPropertyDefaultBase::applyInitialValue):
445         (WebCore::ApplyPropertyDefaultBase::applyValue):
446         (WebCore::ApplyPropertyDefaultBase::createHandler):
447         (ApplyPropertyDefault):
448         (WebCore::ApplyPropertyDefault::setValue):
449         (WebCore::ApplyPropertyDefault::applyValue):
450         (WebCore::ApplyPropertyDefault::createHandler):
451         (ApplyPropertyNumber):
452         (WebCore::ApplyPropertyNumber::setValue):
453         (WebCore::ApplyPropertyNumber::applyValue):
454         (WebCore::ApplyPropertyNumber::createHandler):
455         (ApplyPropertyStyleImage):
456         (WebCore::ApplyPropertyStyleImage::applyValue):
457         (WebCore::ApplyPropertyStyleImage::createHandler):
458         (ApplyPropertyAuto):
459         (WebCore::ApplyPropertyAuto::setValue):
460         (WebCore::ApplyPropertyAuto::value):
461         (WebCore::ApplyPropertyAuto::hasAuto):
462         (WebCore::ApplyPropertyAuto::setAuto):
463         (WebCore::ApplyPropertyAuto::applyInheritValue):
464         (WebCore::ApplyPropertyAuto::applyInitialValue):
465         (WebCore::ApplyPropertyAuto::applyValue):
466         (WebCore::ApplyPropertyAuto::createHandler):
467         (ApplyPropertyClip):
468         (WebCore::ApplyPropertyClip::convertToLength):
469         (WebCore::ApplyPropertyClip::applyInheritValue):
470         (WebCore::ApplyPropertyClip::applyInitialValue):
471         (WebCore::ApplyPropertyClip::applyValue):
472         (WebCore::ApplyPropertyClip::createHandler):
473         (WebCore::defaultInitialColor):
474         (ApplyPropertyColor):
475         (WebCore::ApplyPropertyColor::applyInheritValue):
476         (WebCore::ApplyPropertyColor::applyInitialValue):
477         (WebCore::ApplyPropertyColor::applyValue):
478         (WebCore::ApplyPropertyColor::applyColorValue):
479         (WebCore::ApplyPropertyColor::createHandler):
480         (ApplyPropertyDirection):
481         (WebCore::ApplyPropertyDirection::applyValue):
482         (WebCore::ApplyPropertyDirection::createHandler):
483         (ApplyPropertyLength):
484         (WebCore::ApplyPropertyLength::setValue):
485         (WebCore::ApplyPropertyLength::applyValue):
486         (WebCore::ApplyPropertyLength::createHandler):
487         (ApplyPropertyString):
488         (WebCore::ApplyPropertyString::setValue):
489         (WebCore::ApplyPropertyString::applyValue):
490         (WebCore::ApplyPropertyString::createHandler):
491         (ApplyPropertyBorderRadius):
492         (WebCore::ApplyPropertyBorderRadius::setValue):
493         (WebCore::ApplyPropertyBorderRadius::applyValue):
494         (WebCore::ApplyPropertyBorderRadius::createHandler):
495         (FillLayerAccessorTypes):
496         (ApplyPropertyFillLayer):
497         (WebCore::ApplyPropertyFillLayer::applyInheritValue):
498         (WebCore::ApplyPropertyFillLayer::applyInitialValue):
499         (WebCore::ApplyPropertyFillLayer::applyValue):
500         (WebCore::ApplyPropertyFillLayer::createHandler):
501         (ApplyPropertyComputeLength):
502         (WebCore::ApplyPropertyComputeLength::setValue):
503         (WebCore::ApplyPropertyComputeLength::applyValue):
504         (WebCore::ApplyPropertyComputeLength::createHandler):
505         (ApplyPropertyFont):
506         (WebCore::ApplyPropertyFont::applyInheritValue):
507         (WebCore::ApplyPropertyFont::applyInitialValue):
508         (WebCore::ApplyPropertyFont::applyValue):
509         (WebCore::ApplyPropertyFont::createHandler):
510         (ApplyPropertyFontSize):
511         (WebCore::ApplyPropertyFontSize::largerFontSize):
512         (WebCore::ApplyPropertyFontSize::smallerFontSize):
513         (WebCore::ApplyPropertyFontSize::applyInheritValue):
514         (WebCore::ApplyPropertyFontSize::applyInitialValue):
515         (WebCore::ApplyPropertyFontSize::applyValue):
516         (WebCore::ApplyPropertyFontSize::createHandler):
517         (ApplyPropertyFontWeight):
518         (WebCore::ApplyPropertyFontWeight::applyValue):
519         (WebCore::ApplyPropertyFontWeight::createHandler):
520         (ApplyPropertyFontVariantLigatures):
521         (WebCore::ApplyPropertyFontVariantLigatures::applyInheritValue):
522         (WebCore::ApplyPropertyFontVariantLigatures::applyInitialValue):
523         (WebCore::ApplyPropertyFontVariantLigatures::applyValue):
524         (WebCore::ApplyPropertyFontVariantLigatures::createHandler):
525         (ApplyPropertyBorderImage):
526         (WebCore::ApplyPropertyBorderImage::applyValue):
527         (WebCore::ApplyPropertyBorderImage::createHandler):
528         (ApplyPropertyBorderImageModifier):
529         (WebCore::ApplyPropertyBorderImageModifier::getValue):
530         (WebCore::ApplyPropertyBorderImageModifier::setValue):
531         (WebCore::ApplyPropertyBorderImageModifier::applyInheritValue):
532         (WebCore::ApplyPropertyBorderImageModifier::applyInitialValue):
533         (WebCore::ApplyPropertyBorderImageModifier::applyValue):
534         (WebCore::ApplyPropertyBorderImageModifier::createHandler):
535         (ApplyPropertyBorderImageSource):
536         (WebCore::ApplyPropertyBorderImageSource::applyValue):
537         (WebCore::ApplyPropertyBorderImageSource::createHandler):
538         (ApplyPropertyCounter):
539         (WebCore::ApplyPropertyCounter::emptyFunction):
540         (WebCore::ApplyPropertyCounter::applyInheritValue):
541         (WebCore::ApplyPropertyCounter::applyValue):
542         (WebCore::ApplyPropertyCounter::createHandler):
543         (ApplyPropertyCursor):
544         (WebCore::ApplyPropertyCursor::applyInheritValue):
545         (WebCore::ApplyPropertyCursor::applyInitialValue):
546         (WebCore::ApplyPropertyCursor::applyValue):
547         (WebCore::ApplyPropertyCursor::createHandler):
548         (ApplyPropertyTextAlign):
549         (WebCore::ApplyPropertyTextAlign::applyValue):
550         (WebCore::ApplyPropertyTextAlign::createHandler):
551         (ApplyPropertyTextDecoration):
552         (WebCore::ApplyPropertyTextDecoration::applyValue):
553         (WebCore::ApplyPropertyTextDecoration::createHandler):
554         (ApplyPropertyUnicodeBidi):
555         (WebCore::ApplyPropertyUnicodeBidi::applyValue):
556         (WebCore::ApplyPropertyUnicodeBidi::createHandler):
557         (ApplyPropertyLineHeight):
558         (WebCore::ApplyPropertyLineHeight::applyValue):
559         (WebCore::ApplyPropertyLineHeight::createHandler):
560         (ApplyPropertyPageSize):
561         (WebCore::ApplyPropertyPageSize::mmLength):
562         (WebCore::ApplyPropertyPageSize::inchLength):
563         (WebCore::ApplyPropertyPageSize::getPageSizeFromName):
564         (WebCore::ApplyPropertyPageSize::applyInheritValue):
565         (WebCore::ApplyPropertyPageSize::applyInitialValue):
566         (WebCore::ApplyPropertyPageSize::applyValue):
567         (WebCore::ApplyPropertyPageSize::createHandler):
568         (ApplyPropertyTextEmphasisStyle):
569         (WebCore::ApplyPropertyTextEmphasisStyle::applyInheritValue):
570         (WebCore::ApplyPropertyTextEmphasisStyle::applyInitialValue):
571         (WebCore::ApplyPropertyTextEmphasisStyle::applyValue):
572         (WebCore::ApplyPropertyTextEmphasisStyle::createHandler):
573         (ApplyPropertyAnimation):
574         (WebCore::ApplyPropertyAnimation::setValue):
575         (WebCore::ApplyPropertyAnimation::value):
576         (WebCore::ApplyPropertyAnimation::test):
577         (WebCore::ApplyPropertyAnimation::clear):
578         (WebCore::ApplyPropertyAnimation::initial):
579         (WebCore::ApplyPropertyAnimation::map):
580         (WebCore::ApplyPropertyAnimation::accessAnimations):
581         (WebCore::ApplyPropertyAnimation::animations):
582         (WebCore::ApplyPropertyAnimation::applyInheritValue):
583         (WebCore::ApplyPropertyAnimation::applyInitialValue):
584         (WebCore::ApplyPropertyAnimation::applyValue):
585         (WebCore::ApplyPropertyAnimation::createHandler):
586         (ApplyPropertyOutlineStyle):
587         (WebCore::ApplyPropertyOutlineStyle::applyInheritValue):
588         (WebCore::ApplyPropertyOutlineStyle::applyInitialValue):
589         (WebCore::ApplyPropertyOutlineStyle::applyValue):
590         (WebCore::ApplyPropertyOutlineStyle::createHandler):
591         (ApplyPropertyResize):
592         (WebCore::ApplyPropertyResize::applyValue):
593         (WebCore::ApplyPropertyResize::createHandler):
594         (ApplyPropertyVerticalAlign):
595         (WebCore::ApplyPropertyVerticalAlign::applyValue):
596         (WebCore::ApplyPropertyVerticalAlign::createHandler):
597         (ApplyPropertyAspectRatio):
598         (WebCore::ApplyPropertyAspectRatio::applyInheritValue):
599         (WebCore::ApplyPropertyAspectRatio::applyInitialValue):
600         (WebCore::ApplyPropertyAspectRatio::applyValue):
601         (WebCore::ApplyPropertyAspectRatio::createHandler):
602         (ApplyPropertyZoom):
603         (WebCore::ApplyPropertyZoom::resetEffectiveZoom):
604         (WebCore::ApplyPropertyZoom::applyInheritValue):
605         (WebCore::ApplyPropertyZoom::applyInitialValue):
606         (WebCore::ApplyPropertyZoom::applyValue):
607         (WebCore::ApplyPropertyZoom::createHandler):
608         (ApplyPropertyDisplay):
609         (WebCore::ApplyPropertyDisplay::isValidDisplayValue):
610         (WebCore::ApplyPropertyDisplay::applyInheritValue):
611         (WebCore::ApplyPropertyDisplay::applyInitialValue):
612         (WebCore::ApplyPropertyDisplay::applyValue):
613         (WebCore::ApplyPropertyDisplay::createHandler):
614         (ApplyPropertyFlex):
615         (WebCore::ApplyPropertyFlex::applyInheritValue):
616         (WebCore::ApplyPropertyFlex::applyInitialValue):
617         (WebCore::ApplyPropertyFlex::applyValue):
618         (WebCore::ApplyPropertyFlex::createHandler):
619         (WebCore::ApplyPropertyFlex::getFlexValue):
620         (WebCore::StyleBuilder::sharedStyleBuilder):
621         (WebCore::StyleBuilder::StyleBuilder):
622         * css/StyleBuilder.h: Renamed from Source/WebCore/css/CSSStyleApplyProperty.h.
623         (WebCore):
624         (PropertyHandler):
625         (WebCore::PropertyHandler::PropertyHandler):
626         (WebCore::PropertyHandler::applyInheritValue):
627         (WebCore::PropertyHandler::applyInitialValue):
628         (WebCore::PropertyHandler::applyValue):
629         (WebCore::PropertyHandler::isValid):
630         (WebCore::PropertyHandler::inheritFunction):
631         (WebCore::PropertyHandler::initialFunction):
632         (WebCore::PropertyHandler::applyFunction):
633         (StyleBuilder):
634         (WebCore::StyleBuilder::propertyHandler):
635         (WebCore::StyleBuilder::index):
636         (WebCore::StyleBuilder::valid):
637         (WebCore::StyleBuilder::setPropertyHandler):
638
639 2012-04-24  Florin Malita  <fmalita@chromium.org>
640
641         WebCore::EventTarget::addEventListener crash
642         https://bugs.webkit.org/show_bug.cgi?id=84171
643
644         Reviewed by Nikolas Zimmermann.
645
646         Test: svg/custom/use-tref-crash.svg
647
648         Adding tref target event listeners while building the shadow tree is
649         problematic, because SVGUseElement::buildShadowAndInstanceTree() only
650         sets the element instance<->shadow element association at a later time.
651
652         Fortunately, buildShadowAndInstanceTree() also propagates the event
653         handlers (transferEventListenersToShadowTree) - so we can simply skip
654         them in SVGTRefElement::buildPendingResource() for shadow elements.
655
656         * svg/SVGTRefElement.cpp:
657         (WebCore::SVGTRefElement::buildPendingResource):
658
659 2012-04-24  Kent Tamura  <tkent@chromium.org>
660
661         Clickable area of a calendar picker indicator is too small.
662         https://bugs.webkit.org/show_bug.cgi?id=84677
663
664         Reviewed by Kentaro Hara.
665
666         Test: fast/forms/date/date-appearance.html is affected.
667
668         * css/html.css:
669         (input::-webkit-calendar-picker-indicator):
670         - Remove unnecessary disaplay:inline-block.
671         - Add paddings instead of the margin.
672         (input::-webkit-calendar-picker-indicator:hover):
673         Add hover style.
674
675 2012-04-24  Alexis Menard  <alexis.menard@openbossa.org>
676
677         Another unreviewed build fix for Mac.
678
679         * css/CSSStyleSelector.h:
680         (CSSStyleSelector):
681
682 2012-04-24  Alexis Menard  <alexis.menard@openbossa.org>
683
684         Unreviewed build fix attempt for Mac.
685
686         * rendering/style/RenderStyle.h:
687
688 2012-04-24  Alexis Menard  <alexis.menard@openbossa.org>
689
690         Rename CSSStyleApplyProperty class to StyleBuilder.
691         https://bugs.webkit.org/show_bug.cgi?id=84711
692
693         Reviewed by Antti Koivisto.
694
695         As per discussion on bug https://bugs.webkit.org/show_bug.cgi?id=42764
696         the name is a bit confusing. This first patch rename the class and a
697         following one will rename the files. We also drop the CSS prefix of the
698         class to keep CSS prefixed classes for CSSOM types.
699
700         No new tests : renaming, no behavior changes should appear.
701
702         * css/CSSStyleApplyProperty.cpp:
703         (WebCore::ApplyPropertyExpanding::applyInheritValue):
704         (WebCore::ApplyPropertyExpanding::applyInitialValue):
705         (WebCore::ApplyPropertyExpanding::applyValue):
706         (WebCore::StyleBuilder::sharedStyleBuilder):
707         (WebCore::StyleBuilder::StyleBuilder):
708         * css/CSSStyleApplyProperty.h:
709         (WebCore):
710         (StyleBuilder):
711         * css/CSSStyleSelector.cpp:
712         (WebCore::CSSStyleSelector::CSSStyleSelector):
713         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
714         * css/CSSStyleSelector.h:
715         (CSSStyleSelector):
716
717 2012-04-24  Kent Tamura  <tkent@chromium.org>
718
719         Merge LocalizedCalendar into LocalizedDate
720         https://bugs.webkit.org/show_bug.cgi?id=84685
721
722         Reviewed by Kentaro Hara.
723
724         The functionality of LocalizedCalendar is very related to
725         LocalizedDate. We should merge them.
726
727         No new tests. Just refactoring.
728
729         * WebCore.gypi: Remove LocalizedCalendar.h and LocalizedCalenderICU.cpp.
730         * html/shadow/CalendarPickerElement.cpp:
731         Include LocalizedDate.h instead of LocalizedCalendar.h.
732         * platform/text/LocalizedCalendar.h:
733         Removed. Merged into LocalizedDate.h.
734         * platform/text/LocalizedCalendarICU.cpp:
735         Removed. Merged into LocalizedDateICU.h.
736         * platform/text/LocalizedDate.h:
737         (WebCore): Move some functions from LocalizedCalendar.h.
738         * platform/text/LocalizedDateICU.cpp:
739         Move some functions from LocalizedCalendarICU.cpp.
740
741 2012-04-24  Pavel Feldman  <pfeldman@chromium.org>
742
743         Web Inspector: remove pure delegation code from DebuggerPresentationModel
744         https://bugs.webkit.org/show_bug.cgi?id=84704
745
746         Reviewed by Yury Semikhatsky.
747
748         This change removes the code that delegates calls to breakpoint manager and exposes the breakpoint
749         manager in debugger presentation model itself. It allows narrowing dpm dependencies.
750
751         * inspector/front-end/BreakpointsSidebarPane.js:
752         (WebInspector.JavaScriptBreakpointsSidebarPane):
753         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointCheckboxClicked):
754         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointContextMenu):
755         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._contextMenu):
756         * inspector/front-end/DebuggerModel.js:
757         (WebInspector.DebuggerModel.prototype.debuggerPausedDetails):
758         (WebInspector.DebuggerModel.prototype.createRawLocationByURL):
759         (WebInspector.DebuggerModel.prototype.isPaused):
760         * inspector/front-end/DebuggerPresentationModel.js:
761         (WebInspector.DebuggerPresentationModel.prototype.get breakpointManager):
762         (WebInspector.DebuggerPresentationModel.prototype._debuggerPaused):
763         (WebInspector.DebuggerPresentationModelResourceBinding.prototype._setContentWithInitialContent):
764         * inspector/front-end/JavaScriptSource.js:
765         (WebInspector.JavaScriptSource):
766         (WebInspector.JavaScriptSource.prototype.consoleMessagesCleared):
767         (WebInspector.JavaScriptSource.prototype.findBreakpoint):
768         (WebInspector.JavaScriptSource.prototype.setBreakpoint):
769         (WebInspector.JavaScriptSource.prototype.setBreakpointEnabled):
770         (WebInspector.JavaScriptSource.prototype.removeBreakpoint):
771         (WebInspector.JavaScriptSource.prototype.updateBreakpoint):
772         (WebInspector.JavaScriptSource.prototype.continueToLine):
773         (WebInspector.JavaScriptSource.prototype.canSetContent):
774         (WebInspector.JavaScriptSource.prototype.setContent):
775         (WebInspector.JavaScriptSource.prototype.updateBreakpointsAfterLiveEdit):
776         * inspector/front-end/JavaScriptSourceFrame.js:
777         (WebInspector.JavaScriptSourceFrame.prototype.canEditSource):
778         (WebInspector.JavaScriptSourceFrame.prototype.editContent):
779         (WebInspector.JavaScriptSourceFrame.prototype._onContentChanged):
780         (WebInspector.JavaScriptSourceFrame.prototype.populateLineGutterContextMenu.else.editBreakpointCondition.didEditBreakpointCondition):
781         (WebInspector.JavaScriptSourceFrame.prototype.populateLineGutterContextMenu.else):
782         (WebInspector.JavaScriptSourceFrame.prototype.populateLineGutterContextMenu):
783         (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged):
784         (WebInspector.JavaScriptSourceFrame.prototype._getPopoverAnchor):
785         (WebInspector.JavaScriptSourceFrame.prototype._resolveObjectForPopover.showObjectPopover):
786         (WebInspector.JavaScriptSourceFrame.prototype._resolveObjectForPopover):
787         (WebInspector.JavaScriptSourceFrame.prototype._setBreakpoint):
788         (WebInspector.JavaScriptSourceFrame.prototype._onMouseDown):
789         * inspector/front-end/ScopeChainSidebarPane.js:
790         (WebInspector.ScopeChainSidebarPane.prototype.update):
791         * inspector/front-end/ScriptsPanel.js:
792         (WebInspector.ScriptsPanel.prototype._debuggerPaused.else.didGetUILocation):
793         (WebInspector.ScriptsPanel.prototype._debuggerPaused):
794
795 2012-04-24  Yury Semikhatsky  <yurys@chromium.org>
796
797         Web Inspector: native nodes may have snapshot id less than base snapshot max JS object id
798         https://bugs.webkit.org/show_bug.cgi?id=84681
799
800         Make sure new nodes whose IDs less than base snapshot max JS object id will
801         get into snapshot delta.
802
803         Reviewed by Pavel Feldman.
804
805         Test: inspector/profiler/heap-snapshot-comparison-dom-groups-change.html
806
807         * inspector/front-end/HeapSnapshot.js:
808         (WebInspector.HeapSnapshot.prototype._calculateDiffForClass):
809         * inspector/front-end/HeapSnapshotDataGrids.js:
810         (WebInspector.HeapSnapshotSortableDataGrid): Drive-by fix, made recursion counter
811         a normal field on HeapSnapshotSortableDataGrid.
812         (WebInspector.HeapSnapshotSortableDataGrid.prototype.recursiveSortingEnter):
813         (WebInspector.HeapSnapshotSortableDataGrid.prototype.recursiveSortingLeave):
814
815 2012-04-24  Sheriff Bot  <webkit.review.bot@gmail.com>
816
817         Unreviewed, rolling out r115000.
818         http://trac.webkit.org/changeset/115000
819         https://bugs.webkit.org/show_bug.cgi?id=84703
820
821         Breaks webkit_unit_tests on Mac in Chromium:
822         http://build.chromium.org/p/chromium.webkit/builders/Webkit%20Mac10.6/builds/15157
823         (Requested by mnaganov on #webkit).
824
825         * platform/graphics/skia/OpaqueRegionSkia.cpp:
826         (WebCore::paintIsOpaque):
827         (WebCore::OpaqueRegionSkia::popCanvasLayer):
828         (WebCore::OpaqueRegionSkia::didDraw):
829         (WebCore::OpaqueRegionSkia::didDrawUnbounded):
830         (WebCore::OpaqueRegionSkia::markRectAsOpaque):
831         (WebCore::OpaqueRegionSkia::markRectAsNonOpaque):
832         * platform/graphics/skia/OpaqueRegionSkia.h:
833         (OpaqueRegionSkia):
834         (WebCore::OpaqueRegionSkia::CanvasLayerState::CanvasLayerState):
835         (CanvasLayerState):
836         * platform/graphics/skia/PlatformContextSkia.cpp:
837         (WebCore::PlatformContextSkia::restoreLayer):
838
839 2012-04-23  Antti Koivisto  <antti@apple.com>
840
841         Consolidate external stylesheet quirks handling to StyleSheetInternal
842         https://bugs.webkit.org/show_bug.cgi?id=84632
843
844         Reviewed by Andreas Kling.
845
846         Move the repeated code from StyleImportRule and HTMLLinkElement to StyleSheetInternal::parseUserStyleSheet.
847         
848         Remove a BUILDING_ON_LEOPARD-only quirk.
849
850         * css/CSSImportRule.cpp:
851         (WebCore::StyleRuleImport::setCSSStyleSheet):
852         * css/CSSParser.cpp:
853         (WebCore):
854         (WebCore::CSSParserContext::CSSParserContext):
855         
856             Add new settings bits to the CSSParserContext. These are used for external stylesheet parsing quirks.
857
858         * css/CSSParserMode.h:
859         (CSSParserContext):
860         * css/CSSStyleSheet.cpp:
861         (WebCore::StyleSheetInternal::parseUserStyleSheet):
862         (WebCore::StyleSheetInternal::parseString):
863         (WebCore):
864         (WebCore::StyleSheetInternal::parseStringAtLine):
865         * css/CSSStyleSheet.h:
866         (WebCore):
867         (StyleSheetInternal):
868         * html/HTMLLinkElement.cpp:
869         (WebCore::HTMLLinkElement::setCSSStyleSheet):
870
871 2012-04-24  Yael Aharon  <yael.aharon@nokia.com>
872
873         [Qt] Move notification icon download out of WebCore
874         https://bugs.webkit.org/show_bug.cgi?id=80700
875
876         Reviewed by Simon Hausmann.
877
878         Remove the code that downloads the notification's icon out of WebCore.
879         Other ports let the client decide if to download the icon or not.
880         No new tests. This patch is only removing code.
881
882         * notifications/Notification.cpp:
883         (WebCore::Notification::~Notification):
884         (WebCore::Notification::show):
885         (WebCore::Notification::close):
886         (WebCore::Notification::contextDestroyed):
887         * notifications/Notification.h:
888         (Notification):
889
890 2012-04-24  Rakesh KN  <rakesh.kn@motorola.com>
891
892         RadioNodeList support in HTMLFormElement::elements
893         https://bugs.webkit.org/show_bug.cgi?id=81854
894
895         Implement RadioNodeList support spec'ed at
896         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#radionodelist
897
898         Reviewed by Ryosuke Niwa.
899
900         Test: fast/forms/form-collection-radio-node-list.html
901
902         * CMakeLists.txt:
903         Added entries for new files.
904         * DerivedSources.cpp: Ditto.
905         * DerivedSources.make: Ditto.
906         * DerivedSources.pri: Ditto.
907         * GNUmakefile.list.am: Ditto.
908         * Target.pri: Ditto.
909         * WebCore.gypi: Ditto.
910         * WebCore.vcproj/WebCore.vcproj: Ditto.
911         * WebCore.xcodeproj/project.pbxproj: Ditto.
912         * bindings/js/JSHTMLCollectionCustom.cpp:
913         (WebCore::getNamedItems):
914         Modified to create RadioNodeList object when FormControlCollection has more than
915         one element of same name/id.
916         * bindings/scripts/CodeGeneratorJS.pm:
917         (GenerateImplementation):
918         Added code to include Node.h and JSNode.h in JSRadioNodeElement.cpp.
919         * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
920         (WebCore::getNamedItems):
921         Modified to create RadioNodeList object when FormControlCollection has more than
922         one element of same name/id.
923         * html/CollectionType.h:
924         Added new FormControls type.
925         * html/HTMLCollection.cpp:
926         (WebCore::HTMLCollection::shouldIncludeChildren):
927         (WebCore::HTMLCollection::isAcceptableElement):
928         Handle FormControls collection type.
929         * html/HTMLFormCollection.cpp:
930         (WebCore::HTMLFormCollection::HTMLFormCollection):
931         Contruct collection of FormControls type.
932         * html/RadioNodeList.cpp: Added.
933         (WebCore):
934         (WebCore::RadioNodeList::RadioNodeList):
935         (WebCore::RadioNodeList::~RadioNodeList):
936         (WebCore::toRadioButtonInputElement):
937         (WebCore::RadioNodeList::value):
938         (WebCore::RadioNodeList::setValue):
939         (WebCore::RadioNodeList::nodeMatches):
940         * html/RadioNodeList.h: Added.
941         (WebCore):
942         (RadioNodeList):
943         (WebCore::RadioNodeList::create):
944         RadioNodeList implementation.
945         * html/RadioNodeList.idl: Added.
946         Idl for generating RadioNodeList JS/V8 bindings.
947
948 2012-04-24  Benjamin Poulain  <bpoulain@apple.com>
949
950         Implement the field cache of ObjcClass in WebKit types
951         https://bugs.webkit.org/show_bug.cgi?id=84667
952
953         Reviewed by Geoffrey Garen.
954
955         Every time we get a field through the Objective-C bridge, we waste some time converting
956         the incoming string to an CFString.
957
958         This patch implement the field cache based on WTF types so that we can return directly
959         in case of a positive match.
960
961         When we do not have a match on the Identifier, we allocate the memory and find the valid field
962         as before.
963
964         * bridge/objc/objc_class.h:
965         (ObjcClass):
966         * bridge/objc/objc_class.mm:
967         (JSC::Bindings::deleteMethod):
968         (Bindings):
969         (JSC::Bindings::ObjcClass::ObjcClass):
970         (JSC::Bindings::ObjcClass::fieldNamed):
971
972 2012-04-23  Andy Estes  <aestes@apple.com>
973
974         Incremental rendering should be unsuppressed after the load event or a configurable timeout, whichever occurs first.
975         https://bugs.webkit.org/show_bug.cgi?id=84583
976
977         Reviewed by Anders Carlsson.
978
979         In high-latency situations, having incremental rendering suppression
980         enabled makes for a worse experience due to the excessively long time
981         it takes for the load event to fire. So that clients that opt in to
982         incremental rendering suppression can mitigate this, add a configurable
983         timeout in which rendering is re-enabled if the load event has yet to
984         fire.
985
986         * dom/Document.cpp:
987         (WebCore::Document::Document):
988         (WebCore::Document::setReadyState): When the document transitions to
989         the loading state, start a timer; when it transitions to the completed
990         state, allow visual updates.
991         (WebCore::Document::setVisualUpdatesAllowed): If visual updates are
992         allowed, force a repaint. Otherwise, set a flag that suppresses
993         rendering.
994         (WebCore::Document::visualUpdatesSuppressionTimerFired): When the timer
995         fires, allow visual updates.
996         (WebCore::Document::implicitClose): Remove code that is now called in
997         setVisualUpdatesAllowed().
998         * dom/Document.h:
999         (WebCore::Document::visualUpdatesAllowed):
1000         * page/Settings.cpp:
1001         (WebCore::Settings::Settings):
1002         * page/Settings.h:
1003         (WebCore::Settings::setIncrementalRenderingSuppressionTimeoutInSeconds):
1004         (WebCore::Settings::incrementalRenderingSuppressionTimeoutInSeconds):
1005
1006 2012-04-23  Dana Jansens  <danakj@chromium.org>
1007
1008         [chromium] Image masks are considered opaque incorrectly
1009         https://bugs.webkit.org/show_bug.cgi?id=84275
1010
1011         Reviewed by Adrienne Walker.
1012
1013         Match the behaviour of SkCanvas layers more closely while tracking
1014         opaque paints. SkCanvas layers actually act as a separate device
1015         (ie. pixels) and when the layer is popped off, the pixels are copied
1016         down to the layer below.
1017
1018         While we can use the total clip to decide what pixels the the
1019         drawing operation will affect in the final device, the blending
1020         down through layers needs to consider each layer carefully.
1021
1022         In this case the image mask is drawn into a layer which is copied
1023         down using the DestinationIn operation. Since the layer contains
1024         non-opaque pixels, the DestinationIn copy can destroy opaque
1025         areas in the next layer. We add OpaqueRegionSkia::FillByCopy to
1026         distinguish the case where we are copying a block of pixels, and the
1027         alpha values are essentially unknown.
1028
1029         Unit test: PlatformContextSkiaTest.trackImageMask
1030                    PlatformContextSkiaTest.trackImageMaskWithOpaqueRect
1031
1032         * platform/graphics/skia/OpaqueRegionSkia.cpp:
1033         (WebCore::paintIsOpaque):
1034         (WebCore::OpaqueRegionSkia::applyOpaqueRegionFromLayer):
1035         (WebCore::OpaqueRegionSkia::pushCanvasLayer):
1036         (WebCore::OpaqueRegionSkia::popCanvasLayer):
1037         (WebCore::OpaqueRegionSkia::didDrawRect):
1038         (WebCore::OpaqueRegionSkia::didDrawPath):
1039         (WebCore::OpaqueRegionSkia::didDrawPoints):
1040         (WebCore::OpaqueRegionSkia::didDrawBounded):
1041         (WebCore::OpaqueRegionSkia::didDraw):
1042         (WebCore::OpaqueRegionSkia::didDrawUnbounded):
1043         (WebCore::OpaqueRegionSkia::markRectAsOpaque):
1044         (WebCore::OpaqueRegionSkia::markRectAsNonOpaque):
1045         (WebCore::OpaqueRegionSkia::markAllAsNonOpaque):
1046         * platform/graphics/skia/OpaqueRegionSkia.h:
1047         (OpaqueRegionSkia):
1048         (CanvasLayerState):
1049         * platform/graphics/skia/PlatformContextSkia.cpp:
1050         (WebCore::PlatformContextSkia::restoreLayer):
1051
1052 2012-04-23  Kent Tamura  <tkent@chromium.org>
1053
1054         Show the format indicator in a date field
1055         https://bugs.webkit.org/show_bug.cgi?id=83872
1056
1057         Reviewed by Hajime Morita.
1058
1059         Enable the fixed placeholder feature for the date type, and show
1060         the editable date format as the fixed placeholder.
1061         The format string is created by the following steps.
1062         1. Obtain a pattern string from ICU
1063           http://icu-project.org/apiref/icu4c/classSimpleDateFormat.html#details
1064         2. Replace a sequence of 'y', 'Y', 'M', or 'd' in the pattern with
1065           a natural language string such as "year", "month", or "day".
1066
1067         Test: fast/forms/date/date-fixed-placeholder.html
1068
1069         * html/DateInputType.cpp:
1070         (WebCore::DateInputType::supportsPlaceholder): Added. Returns true.
1071         (WebCore::DateInputType::usesFixedPlaceholder): Added. Returns true.
1072         (WebCore::DateInputType::fixedPlaceholder):
1073         Added. Calls localizedDateFormatText() provided by LocalizedDate.h.
1074         * html/DateInputType.h:
1075         (DateInputType): Add declarations of new override functions.
1076         * platform/LocalizedStrings.h:
1077         (WebCore): Add dateFormat{Year,Month,DayInMonth}Text()
1078         * platform/text/ICULocale.cpp:
1079         (WebCore::isICUYearSymbol): A function to improve redability.
1080         (WebCore::isICUMonthSymbol): ditto.
1081         (WebCore::isICUDayInMonthSymbol): ditto.
1082         (WebCore::localizeFormat): Step 2 of the above description.
1083         (WebCore::ICULocale::initializeLocalizedDateFormatText):
1084         Step 1 of the above description.
1085         (WebCore::ICULocale::localizedDateFormatText):
1086         * platform/text/ICULocale.h:
1087         (ICULocale): Add new functions and a data member.
1088         * platform/text/LocalizedDate.h:
1089         (WebCore): Add localizedDateFormatText().
1090         * platform/text/LocalizedDateICU.cpp:
1091         (WebCore::localizedDateFormatText):
1092         Just call ICULocale::localizedDateFormatText().
1093
1094 2012-04-23  Kentaro Hara  <haraken@chromium.org>
1095
1096         [V8] Pass Isolate to v8Array()
1097         https://bugs.webkit.org/show_bug.cgi?id=84295
1098
1099         Reviewed by Nate Chapin.
1100
1101         The final objective is to pass Isolate around in V8 bindings.
1102         This patch passes the Isolate to v8Array().
1103
1104         (GenerateNormalAttrGetter):
1105         (NativeToJSValue):
1106         * bindings/scripts/test/V8/V8TestObj.cpp:
1107         (WebCore::TestObjV8Internal::sequenceAttrAttrGetter):
1108         (WebCore::TestObjV8Internal::methodReturningSequenceCallback):
1109         * bindings/v8/V8Binding.h:
1110         (WebCore::v8Array):
1111
1112 2012-04-23  Kentaro Hara  <haraken@chromium.org>
1113
1114         [V8] Pass Isolate to GetNamedProperty()
1115         https://bugs.webkit.org/show_bug.cgi?id=84277
1116
1117         Reviewed by Nate Chapin.
1118
1119         The objective is to pass Isolate around in V8 bindings.
1120         This patch passes Isolate to GetNamedProperty().
1121
1122         (GenerateHeader):
1123         * bindings/v8/V8DOMWindowShell.cpp:
1124         (WebCore::getter):
1125         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
1126         (WebCore::V8HTMLDocument::GetNamedProperty):
1127         (WebCore::V8HTMLDocument::allAccessorGetter):
1128
1129 2012-04-23  Michael Nordman  <michaeln@google.com>
1130
1131         [chromium] DomStorage event handling mods.
1132         https://bugs.webkit.org/show_bug.cgi?id=84387
1133
1134         Add a few simple inline getters to allow the source Document of a storage
1135         event to be identified given a pointer to the source StorageArea so those
1136         Documents can be excluded by the event dispatching logic.
1137
1138         Reviewed by Dimitri Glazkov.
1139
1140         No new tests. No new functionality or change in behavior.
1141
1142         * page/DOMWindow.h:
1143         (WebCore::DOMWindow::optionalSessionStorage): simple inline getter to avoid construction where possible
1144         (WebCore::DOMWindow::optionalLocalStorage): ditto
1145         * storage/Storage.h:
1146         (WebCore::Storage::area): simple inline getter
1147
1148 2012-04-23  Kenneth Russell  <kbr@google.com>
1149
1150         Change ImageData to reference Uint8ClampedArray rather than CanvasPixelArray
1151         https://bugs.webkit.org/show_bug.cgi?id=73011
1152
1153         Reviewed by Oliver Hunt.
1154
1155         Changed ImageData to contain Uint8ClampedArray instead of ByteArray
1156         per current HTML5 spec.
1157
1158         In order to avoid introducing large data copies, it was necessary to
1159         switch a few other places in WebKit to use Uint8ClampedArray at the
1160         same time, most notably the FilterEffect implementation, portions of
1161         ImageBuffer, and a couple of places in the image encoders.
1162
1163         Note that the change in method name from "get" to "item" occurred
1164         because JSC's autogenerated indexed getters reference a method
1165         called "item". If desired, a convenience method could be
1166         introduced to avoid the renamings in the FilterEffect classes.
1167
1168         With these changes, ByteArray and some custom code in JavaScriptCore
1169         actually become unreferenced, and can be deleted. This deletion will
1170         be done separately in Bug 83655, to keep the size of this patch
1171         manageable.
1172
1173         Test: fast/canvas/imagedata-contains-uint8clampedarray.html
1174
1175         * bindings/js/JSImageDataCustom.cpp:
1176         (WebCore::toJS):
1177         * bindings/js/SerializedScriptValue.cpp:
1178         (WebCore::CloneSerializer::dumpIfTerminal):
1179         (WebCore::CloneDeserializer::readTerminal):
1180         * bindings/v8/SerializedScriptValue.cpp:
1181         * bindings/v8/custom/V8ImageDataCustom.cpp:
1182         (WebCore::toV8):
1183         * bridge/qt/qt_pixmapruntime.cpp:
1184         (JSC::Bindings::QtPixmapToImageDataMethod::invoke):
1185         * html/ImageData.cpp:
1186         (WebCore::ImageData::create):
1187         (WebCore::ImageData::ImageData):
1188         * html/ImageData.h:
1189         (ImageData):
1190         (WebCore::ImageData::data):
1191         * html/ImageData.idl:
1192         * html/canvas/CanvasRenderingContext2D.cpp:
1193         (WebCore::createEmptyImageData):
1194         (WebCore::CanvasRenderingContext2D::getImageData):
1195         (WebCore::CanvasRenderingContext2D::putImageData):
1196         * platform/graphics/GraphicsContext3D.cpp:
1197         (WebCore::GraphicsContext3D::extractImageData):
1198         * platform/graphics/ImageBuffer.cpp:
1199         (WebCore::ImageBuffer::genericConvertToLuminanceMask):
1200         * platform/graphics/ImageBuffer.h:
1201         * platform/graphics/ShadowBlur.cpp:
1202         (WebCore::ShadowBlur::blurShadowBuffer):
1203         * platform/graphics/cairo/ImageBufferCairo.cpp:
1204         (WebCore::getImageData):
1205         (WebCore::ImageBuffer::getUnmultipliedImageData):
1206         (WebCore::ImageBuffer::getPremultipliedImageData):
1207         (WebCore::ImageBuffer::putByteArray):
1208         * platform/graphics/cg/ImageBufferCG.cpp:
1209         (WebCore::ImageBuffer::getUnmultipliedImageData):
1210         (WebCore::ImageBuffer::getPremultipliedImageData):
1211         (WebCore::ImageBuffer::putByteArray):
1212         (WebCore::ImageBuffer::toDataURL):
1213         (WebCore::ImageDataToDataURL):
1214         * platform/graphics/cg/ImageBufferDataCG.cpp:
1215         (WebCore::ImageBufferData::getData):
1216         (WebCore::ImageBufferData::putData):
1217         * platform/graphics/cg/ImageBufferDataCG.h:
1218         (ImageBufferData):
1219         * platform/graphics/filters/FEBlend.cpp:
1220         (WebCore::FEBlend::platformApplySoftware):
1221         * platform/graphics/filters/FEColorMatrix.cpp:
1222         (WebCore::effectType):
1223         (WebCore::FEColorMatrix::platformApplySoftware):
1224         * platform/graphics/filters/FEComponentTransfer.cpp:
1225         (WebCore::FEComponentTransfer::platformApplySoftware):
1226         * platform/graphics/filters/FEComposite.cpp:
1227         (WebCore::FEComposite::platformArithmeticSoftware):
1228         (WebCore::FEComposite::platformApplySoftware):
1229         * platform/graphics/filters/FEComposite.h:
1230         * platform/graphics/filters/FEConvolveMatrix.cpp:
1231         (WebCore::setDestinationPixels):
1232         (WebCore::FEConvolveMatrix::fastSetInteriorPixels):
1233         (WebCore::FEConvolveMatrix::fastSetOuterPixels):
1234         (WebCore::FEConvolveMatrix::platformApplySoftware):
1235         * platform/graphics/filters/FEConvolveMatrix.h:
1236         (PaintingData):
1237         * platform/graphics/filters/FECustomFilter.cpp:
1238         (WebCore::FECustomFilter::platformApplySoftware):
1239         (WebCore::FECustomFilter::bindProgramAndBuffers):
1240         * platform/graphics/filters/FECustomFilter.h:
1241         (JSC):
1242         (FECustomFilter):
1243         * platform/graphics/filters/FEDisplacementMap.cpp:
1244         (WebCore::FEDisplacementMap::platformApplySoftware):
1245         * platform/graphics/filters/FEDropShadow.cpp:
1246         (WebCore::FEDropShadow::platformApplySoftware):
1247         * platform/graphics/filters/FEGaussianBlur.cpp:
1248         (WebCore::boxBlur):
1249         (WebCore::FEGaussianBlur::platformApplyGeneric):
1250         (WebCore::FEGaussianBlur::platformApply):
1251         (WebCore::FEGaussianBlur::platformApplySoftware):
1252         * platform/graphics/filters/FEGaussianBlur.h:
1253         (PlatformApplyParameters):
1254         (FEGaussianBlur):
1255         * platform/graphics/filters/FELighting.cpp:
1256         (WebCore::FELighting::LightingData::topLeft):
1257         (WebCore::FELighting::LightingData::topRow):
1258         (WebCore::FELighting::LightingData::topRight):
1259         (WebCore::FELighting::LightingData::leftColumn):
1260         (WebCore::FELighting::LightingData::interior):
1261         (WebCore::FELighting::LightingData::rightColumn):
1262         (WebCore::FELighting::LightingData::bottomLeft):
1263         (WebCore::FELighting::LightingData::bottomRow):
1264         (WebCore::FELighting::LightingData::bottomRight):
1265         (WebCore::FELighting::inlineSetPixel):
1266         (WebCore::FELighting::drawLighting):
1267         (WebCore::FELighting::platformApplySoftware):
1268         * platform/graphics/filters/FELighting.h:
1269         (LightingData):
1270         (FELighting):
1271         * platform/graphics/filters/FEMorphology.cpp:
1272         (WebCore::FEMorphology::platformApplyGeneric):
1273         (WebCore::FEMorphology::platformApplySoftware):
1274         * platform/graphics/filters/FEMorphology.h:
1275         (PaintingData):
1276         * platform/graphics/filters/FETurbulence.cpp:
1277         (WebCore::FETurbulence::fillRegion):
1278         (WebCore::FETurbulence::platformApplySoftware):
1279         * platform/graphics/filters/FETurbulence.h:
1280         (FillRegionParameters):
1281         (FETurbulence):
1282         * platform/graphics/filters/FilterEffect.cpp:
1283         (WebCore::FilterEffect::forceValidPreMultipliedPixels):
1284         (WebCore::FilterEffect::asUnmultipliedImage):
1285         (WebCore::FilterEffect::asPremultipliedImage):
1286         (WebCore::FilterEffect::copyImageBytes):
1287         (WebCore::FilterEffect::copyUnmultipliedImage):
1288         (WebCore::FilterEffect::copyPremultipliedImage):
1289         (WebCore::FilterEffect::createUnmultipliedImageResult):
1290         (WebCore::FilterEffect::createPremultipliedImageResult):
1291         * platform/graphics/filters/FilterEffect.h:
1292         (FilterEffect):
1293         * platform/graphics/filters/arm/FEGaussianBlurNEON.h:
1294         (WebCore::FEGaussianBlur::platformApplyNeon):
1295         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1296         (WebCore::GraphicsContext3D::paintRenderingResultsToImageData):
1297         * platform/graphics/qt/ImageBufferQt.cpp:
1298         (WebCore::getImageData):
1299         (WebCore::ImageBuffer::getUnmultipliedImageData):
1300         (WebCore::ImageBuffer::getPremultipliedImageData):
1301         (WebCore::ImageBuffer::putByteArray):
1302         * platform/graphics/skia/ImageBufferSkia.cpp:
1303         (WebCore::getImageData):
1304         (WebCore::ImageBuffer::getUnmultipliedImageData):
1305         (WebCore::ImageBuffer::getPremultipliedImageData):
1306         (WebCore::ImageBuffer::putByteArray):
1307         * platform/graphics/texmap/TextureMapperGL.cpp:
1308         * platform/graphics/wince/ImageBufferWinCE.cpp:
1309         (WebCore::getImageData):
1310         (WebCore::ImageBuffer::getUnmultipliedImageData):
1311         (WebCore::ImageBuffer::getPremultipliedImageData):
1312         (WebCore::ImageBuffer::putByteArray):
1313         * platform/graphics/wx/ImageBufferWx.cpp:
1314         (WebCore::ImageBuffer::getUnmultipliedImageData):
1315         (WebCore::ImageBuffer::getPremultipliedImageData):
1316         (WebCore::ImageBuffer::putByteArray):
1317         * platform/image-encoders/skia/JPEGImageEncoder.cpp:
1318         (WebCore::JPEGImageEncoder::encode):
1319         * platform/image-encoders/skia/PNGImageEncoder.cpp:
1320         (WebCore::PNGImageEncoder::encode):
1321         * platform/image-encoders/skia/WEBPImageEncoder.cpp:
1322         (WebCore::WEBPImageEncoder::encode):
1323
1324 2012-04-23  Ryan Sleevi  <rsleevi@chromium.org>
1325
1326         [chromium] Remove deleted files from WebCore.gypi and fix typo
1327         https://bugs.webkit.org/show_bug.cgi?id=84651
1328
1329         Reviewed by Ryosuke Niwa.
1330
1331         No new tests. No behavior change.
1332
1333         * WebCore.gypi:
1334         Remove references to PlatformMouseEventQt.cpp and WheelEventQt.cpp. Add a missing comma.
1335
1336 2012-04-23  Erik Arvidsson  <arv@chromium.org>
1337
1338         [V8] Fix issue with trying to access a constructor in a frame that has been removed
1339         https://bugs.webkit.org/show_bug.cgi?id=84640
1340
1341         Reviewed by Kentaro Hara.
1342
1343         This regressed in r113250. Now we do what we did before and return undefined if the frame
1344         does not have a context.
1345
1346         Test: fast/dom/constructor-in-removed-frame.html
1347
1348         * bindings/v8/V8DOMWrapper.cpp:
1349         (WebCore::V8DOMWrapper::constructorForType):
1350
1351 2012-04-23  Chris Rogers  <crogers@google.com>
1352
1353         Oscillator::setWaveTable() should not reset oscillator phase
1354         https://bugs.webkit.org/show_bug.cgi?id=84647
1355         
1356         Reviewed by Kenneth Russell.
1357
1358         * Modules/webaudio/Oscillator.cpp:
1359         (WebCore::Oscillator::setWaveTable):
1360
1361 2012-04-23  Kentaro Hara  <haraken@chromium.org>
1362
1363         [V8][Refactoring] Remove V8Proxy::throwSyntaxError()
1364         https://bugs.webkit.org/show_bug.cgi?id=84627
1365
1366         Reviewed by Nate Chapin.
1367
1368         This patch removes V8Proxy::throwSyntaxError()
1369         since it is no longer used.
1370
1371         No tests. No change in behavior.
1372
1373         * bindings/v8/V8Proxy.cpp:
1374         * bindings/v8/V8Proxy.h:
1375         (V8Proxy):
1376
1377 2012-04-18  James Robinson  <jamesr@chromium.org>
1378
1379         [chromium] Use TextureLayerChromium for WebGL content instead of a dedicated layer type
1380         https://bugs.webkit.org/show_bug.cgi?id=84311
1381
1382         Reviewed by Adrienne Walker.
1383
1384         WebGL content's interface with the compositor can be expressed in terms of two basic operations:
1385         1.) Do some stuff
1386         2.) Provide a texture ID for the compositor to use
1387
1388         This implements (1) in DrawingBufferChromium and uses the already-existing TextureLayerChromium to handle (2).
1389         This cuts down the compositor interface significantly and allows for more code reuse in exchange for more code
1390         in TextureLayerChromium to handle the features WebGL needs.
1391
1392         * WebCore.gypi:
1393         * platform/graphics/chromium/DrawingBufferChromium.cpp:
1394         (WebCore::DrawingBuffer::~DrawingBuffer):
1395         (DrawingBufferPrivate):
1396         (WebCore::DrawingBufferPrivate::DrawingBufferPrivate):
1397         (WebCore::DrawingBufferPrivate::~DrawingBufferPrivate):
1398         (WebCore::DrawingBufferPrivate::layer):
1399         (WebCore):
1400         (WebCore::DrawingBuffer::platformLayer):
1401         * platform/graphics/chromium/LayerRendererChromium.cpp:
1402         * platform/graphics/chromium/TextureLayerChromium.h:
1403         (TextureLayerChromiumClient):
1404         (WebCore::TextureLayerChromiumClient::~TextureLayerChromiumClient):
1405         (WebCore):
1406         (TextureLayerChromium):
1407         (WebCore::TextureLayerChromium::clearClient):
1408         * platform/graphics/chromium/WebGLLayerChromium.cpp: Removed.
1409         * platform/graphics/chromium/WebGLLayerChromium.h: Removed.
1410         * platform/graphics/gpu/DrawingBuffer.h:
1411         (WebCore):
1412         (WebCore::DrawingBuffer::graphicsContext3D):
1413         (DrawingBuffer):
1414
1415 2012-04-23  Alec Flett  <alecflett@chromium.org>
1416
1417         IndexedDB: remove IDB(Index|ObjectStore)BackendImpl::get/getKey for IDBKey
1418         https://bugs.webkit.org/show_bug.cgi?id=84285
1419
1420         Reviewed by Dimitri Glazkov.
1421
1422         No new tests required, this code is no longer called.
1423
1424         This is old code supporting IDBKey-based lookup, supplanted by
1425         IDBKeyRange. Now that chromium IPC/proxy code has landed,
1426         these functions can be removed.
1427
1428         * Modules/indexeddb/IDBIndexBackendInterface.h:
1429         (IDBIndexBackendInterface):
1430         * Modules/indexeddb/IDBObjectStoreBackendInterface.h:
1431         (IDBObjectStoreBackendInterface):
1432
1433 2012-04-22  Martin Robinson  <mrobinson@igalia.com>
1434
1435         REGRESSION(113604): [Soup] Some pages that use synchronous XMLHttpRequests freeze the browser
1436         https://bugs.webkit.org/show_bug.cgi?id=84560
1437
1438         Reviewed by Xan Lopez.
1439
1440         When kicking off a synchronous XMLHttpRequest, add one to the connection
1441         limit. This ensures that when a page starts a synchronous request, while
1442         already at the connection limit the request will not deadlock.
1443
1444         * platform/network/soup/ResourceHandleSoup.cpp:
1445         (WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader): Accept a new SoupSession
1446         argument so that we can get the correct SoupSession for the networking context. Bump
1447         the connection limit.
1448         (WebCore::WebCoreSynchronousLoader::~WebCoreSynchronousLoader): Decrement the connection limit.
1449         (WebCore::WebCoreSynchronousLoader::adjustMaxConnections): Added this helper.
1450         (WebCoreSynchronousLoader): Added a new SoupSession member.
1451         (WebCore::sessionFromContext): Added this helper.
1452         (WebCore::ResourceHandleInternal::soupSession): Use the new sessionFromContext helper.
1453         (WebCore::ResourceHandle::loadResourceSynchronously): Pass the SoupSession from the NetworkingContext
1454         to the synchronous loader.
1455
1456 2012-04-23  Sheriff Bot  <webkit.review.bot@gmail.com>
1457
1458         Unreviewed, rolling out r114965.
1459         http://trac.webkit.org/changeset/114965
1460         https://bugs.webkit.org/show_bug.cgi?id=84665
1461
1462         Four new resource load delegate test failures (Requested by
1463         jernoble on #webkit).
1464
1465         * loader/SubresourceLoader.cpp:
1466         (WebCore::SubresourceLoader::didFinishLoading):
1467         (WebCore::SubresourceLoader::didFail):
1468         (WebCore::SubresourceLoader::willCancel):
1469         (WebCore::SubresourceLoader::releaseResources):
1470
1471 2012-04-23  Beth Dakin  <bdakin@apple.com>
1472
1473         https://bugs.webkit.org/show_bug.cgi?id=84649
1474         RenderMathMLOperator currently ignores font families, fails 
1475         to use Stix
1476
1477         Reviewed by Dan Bernstein.
1478
1479         This patch makes RenderMathMLOperator honor the font-family 
1480         list. This means that by default, Stix glyphs will now be 
1481         used for operators just like for other MathML content. 
1482         Unfortunately, just doing that resulted in a bug because of 
1483         the fragile hardcoded glyph sizes. The Stix vertical bar 
1484         glyph is much smaller than the code assumed any glyphs would 
1485         be. That code should be re-written, but in the meantime, I 
1486         put a fix in place to try to make it work for small glyphs.
1487
1488         These new functions should be used instead of accessing
1489         gGlyphHeight or gGlyphLineHeight directly. If the glyph is
1490         smaller than the expected hardcoded value, then the actual
1491         glyph height is used, and a new line height based on the
1492         glyph height is used.
1493         (WebCore::RenderMathMLOperator::glyphHeightForCharacter):
1494         (WebCore::RenderMathMLOperator::lineHeightForCharacter):
1495
1496         Use the style's FontDescription to honor the font family
1497         list and the style's FontSelector to honor @font-face.
1498         Also use glyphHeightForCharacter() instead of gGlyphHeight. 
1499         And now that createGlyph() takes a lineHeight, use 
1500         lineHeightForCharacter() to determine the right value. 
1501         (WebCore::RenderMathMLOperator::updateFromElement):
1502
1503         size was an ambiguous variable name, so I renamed it to the 
1504         more accurate maxHeightForRenderer. This function also now
1505         takes a lineHeight instead of using gGlyphLineHeight. And
1506         again, use the style's FontDescription and FontSelector.
1507         (WebCore::RenderMathMLOperator::createStackableStyle):
1508
1509         Re-name size to maxHeightForRenderer, and take lineHeight as 
1510         a parameter.
1511         (WebCore::RenderMathMLOperator::createGlyph):
1512         * rendering/mathml/RenderMathMLOperator.h:
1513         (RenderMathMLOperator):
1514
1515 2012-04-23  Eriq Augustine  <eaugusti@chromium.org>
1516
1517         Return value from executed script in Chromium.
1518         https://bugs.webkit.org/show_bug.cgi?id=79851
1519
1520         Reviewed by Adam Barth.
1521
1522         Providing a varaiant of evaluateScriptInIsolatedWorld that
1523         returns the value of the evaluated script.
1524
1525         Test: platform/chromium/http/tests/misc/execute-and-return-value.html
1526
1527         * bindings/v8/ScriptController.cpp:
1528         (WebCore::ScriptController::evaluateInIsolatedWorld):
1529         * bindings/v8/ScriptController.h:
1530         (ScriptController):
1531         * bindings/v8/V8Proxy.cpp:
1532         (WebCore::V8Proxy::evaluateInIsolatedWorld):
1533         * bindings/v8/V8Proxy.h:
1534         (V8Proxy):
1535
1536 2012-04-23  Kent Tamura  <tkent@chromium.org>
1537
1538         RenderDetailsMarker should draw the triangle inside the content box
1539         https://bugs.webkit.org/show_bug.cgi?id=84557
1540
1541         Reviewed by Hajime Morita.
1542
1543         RenderDetailsMarker didn't support cases in which a marker has
1544         borders and/or padings, or non-square size.
1545
1546         Test: fast/html/details-marker-style.html
1547
1548         * rendering/RenderDetailsMarker.cpp:
1549         (WebCore::RenderDetailsMarker::getPath):
1550         Scale by contentWidth() and contentHeight().
1551         (WebCore::RenderDetailsMarker::paint):
1552         Move the trianle origin by the ammount of left/top borders and paddings.
1553
1554 2012-04-23  Kentaro Hara  <haraken@chromium.org>
1555
1556         [V8] Pass Isolate to toV8() (Part6)
1557         https://bugs.webkit.org/show_bug.cgi?id=84273
1558
1559         Reviewed by Nate Chapin.
1560
1561         The objective is to pass Isolate to all toV8()s.
1562         Since there are a lot of toV8()s, I'll make the change
1563         step by step. This patch passes Isolate to toV8() in
1564         several custom bindings.
1565
1566         No tests. No change in behavior.
1567
1568         * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp:
1569         (WebCore::getNamedItems):
1570         (WebCore::getItem):
1571         (WebCore::V8HTMLAllCollection::namedPropertyGetter):
1572         (WebCore::V8HTMLAllCollection::itemCallback):
1573         (WebCore::V8HTMLAllCollection::namedItemCallback):
1574         (WebCore::V8HTMLAllCollection::callAsFunctionCallback):
1575         * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
1576         (WebCore::getNamedItems):
1577         (WebCore::V8HTMLCollection::namedPropertyGetter):
1578         (WebCore::V8HTMLCollection::namedItemCallback):
1579         (WebCore::toV8):
1580         * bindings/v8/custom/V8SVGPathSegCustom.cpp:
1581         (WebCore::toV8):
1582         * bindings/v8/custom/V8StyleSheetCustom.cpp:
1583         (WebCore::toV8):
1584         * bindings/v8/custom/V8StyleSheetListCustom.cpp:
1585         (WebCore::V8StyleSheetList::namedPropertyGetter):
1586         * bindings/v8/custom/V8TrackEventCustom.cpp:
1587         (WebCore::V8TrackEvent::trackAccessorGetter):
1588         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
1589         (WebCore::toV8Object):
1590         (WebCore::getObjectParameter):
1591         (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback):
1592         (WebCore::V8WebGLRenderingContext::getExtensionCallback):
1593         (WebCore::V8WebGLRenderingContext::getFramebufferAttachmentParameterCallback):
1594         (WebCore::V8WebGLRenderingContext::getParameterCallback):
1595         (WebCore::V8WebGLRenderingContext::getProgramParameterCallback):
1596         (WebCore::V8WebGLRenderingContext::getShaderParameterCallback):
1597         (WebCore::V8WebGLRenderingContext::getUniformCallback):
1598         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
1599         (WebCore::V8XMLHttpRequest::responseAccessorGetter):
1600         * bindings/v8/custom/V8XSLTProcessorCustom.cpp:
1601         (WebCore::V8XSLTProcessor::transformToFragmentCallback):
1602         (WebCore::V8XSLTProcessor::transformToDocumentCallback):
1603
1604 2012-04-23  Kent Tamura  <tkent@chromium.org>
1605
1606         Move the content of LocalizedCalendarICU.cpp and LocalizedDateICU.cpp to ICULocale.cpp.
1607         https://bugs.webkit.org/show_bug.cgi?id=84568
1608
1609         Reviewed by Hajime Morita.
1610
1611         Move it to ICULocal.cpp because we want to share UDateFormat
1612         object in LocalizedDate functions and LocalizedCalendar functions,
1613         and it becomes easier to cache the UDateFormat object, and making
1614         unit tests for these functions easier.
1615
1616         No new tests because of no bahevior changes.
1617
1618         * platform/text/ICULocale.cpp:
1619         (WebCore::ICULocale::ICULocale): Initialize new members.
1620         (WebCore::ICULocale::~ICULocale): Delete m_shortDateFormat.
1621         (WebCore::ICULocale::initializeShortDateFormat):
1622         Moved from creteShortDateFormatter of LocalizedDateICU.cpp.
1623         (WebCore::ICULocale::parseLocalizedDate):
1624         Moved from LocalizedDate.cpp, use m_shortDateFormat.
1625         (WebCore::ICULocale::formatLocalizedDate): ditto.
1626         (WebCore::ICULocale::createLabelVector):
1627         Moved from LocalizedCalendarICU.cpp, use m_shortDateFormat.
1628         (WebCore::createFallbackMonthLabels): Moved from LocalizedCalendarICU.cpp.
1629         (WebCore::createFallbackWeekDayShortLabels): ditto.
1630         (WebCore::ICULocale::initializeCalendar):
1631         lazy initialization of m_monthLabels, m_weekDayShortLabels, and m_firstDayOfWeek.
1632         (WebCore::ICULocale::monthLabels):
1633         (WebCore::ICULocale::weekDayShortLabels):
1634         (WebCore::ICULocale::firstDayOfWeek):
1635         * platform/text/ICULocale.h:
1636         (ICULocale): Add declarations.
1637         * platform/text/LocalizedCalendarICU.cpp:
1638         (WebCore::monthLabels): Use ICULocale::currentLocale().
1639         (WebCore::weekDayShortLabels): ditto.
1640         (WebCore::firstDayOfWeek): ditto.
1641         * platform/text/LocalizedDateICU.cpp:
1642         (WebCore::parseLocalizedDate): ditto.
1643         (WebCore::formatLocalizedDate): ditto.
1644
1645 2012-04-23  Raymond Toy  <rtoy@google.com>
1646
1647         Move AudioDestinationChromium FIFO class to its own class.
1648         https://bugs.webkit.org/show_bug.cgi?id=84058
1649
1650         Reviewed by Chris Rogers.
1651
1652         Current tests cover the changes.
1653
1654         * WebCore.gypi: Update with new files.
1655         * platform/audio/AudioPullFIFO.cpp: Copied from Source/WebKit/chromium/src/AudioDestinationChromium.cpp.
1656         (WebCore): Renamed old class the AudioPullFIFO.
1657         (WebCore::AudioPullFIFO::AudioPullFIFO):
1658         (WebCore::AudioPullFIFO::consume):
1659         (WebCore::AudioPullFIFO::findWrapLengths):
1660         (WebCore::AudioPullFIFO::fillBuffer):
1661         * platform/audio/AudioPullFIFO.h: Added.
1662         (WebCore):
1663         (AudioPullFIFO):
1664         (WebCore::AudioPullFIFO::updateIndex):
1665
1666 2012-04-23  Nate Chapin  <japhet@chromium.org>
1667
1668         REGRESSION (r100311): YummySoup app crashes when trying to print
1669         https://bugs.webkit.org/show_bug.cgi?id=83918
1670
1671         Reviewed by Alexey Proskuryakov.
1672
1673         Test: http/tests/xmlhttprequest/cancel-during-failure-crash.html
1674
1675         * loader/SubresourceLoader.cpp:
1676         (WebCore::SubresourceLoader::didFinishLoading):
1677         (WebCore::SubresourceLoader::didFail):
1678         (WebCore::SubresourceLoader::willCancel): Now that we might enter the function if we're already Finishing,
1679             some cleanup needs to be done in the Initialized state only.
1680         (WebCore::SubresourceLoader::releaseResources): Move requesting counting decrement and laodDone() to
1681             the finishing functions.
1682
1683 2012-04-23  Shawn Singh  <shawnsingh@chromium.org>
1684
1685         [chromium] Visualize accelerated compositor rects.
1686         https://bugs.webkit.org/show_bug.cgi?id=79400
1687
1688         Reviewed by Adrienne Walker.
1689
1690         No tests, all the code added is only debugging code.
1691
1692         This patch adds support for visualizing three different types of
1693         rects on the chromium heads-up display:
1694         1. updateRects that indicate what was painted/uploaded to a resource
1695         2. propertyChangedRects that indicate layers that has property changes
1696         3. surfaceDamageRects that are the accumulation of updateRects and
1697            propertyChangedRects, indicating what pixels on the screen have
1698            actually changed.  (Surface damage also accounts for newly exposed
1699            areas but that is not explicitly visualized.)
1700
1701         In addition to adding support for visualizing this, the
1702         CCHeadsUpDisplay was significantly refactored, separating the FPS
1703         Counter functionality into a different class, so that the heads-up
1704         display is all about visualizing annotations, and those
1705         annotations (frame rate, debug rects) are logged separately.
1706
1707         * WebCore.gypi:
1708         * platform/graphics/chromium/cc/CCDebugRectHistory.cpp: Added.
1709         (WebCore):
1710         (WebCore::CCDebugRectHistory::CCDebugRectHistory):
1711         (WebCore::CCDebugRectHistory::enabled):
1712         (WebCore::CCDebugRectHistory::saveDebugRectsForCurrentFrame):
1713         (WebCore::CCDebugRectHistory::savePaintRects):
1714         (WebCore::CCDebugRectHistory::savePropertyChangedRects):
1715         (WebCore::CCDebugRectHistory::saveSurfaceDamageRects):
1716         * platform/graphics/chromium/cc/CCDebugRectHistory.h: Added.
1717         (WebCore):
1718         (WebCore::CCDebugRect::CCDebugRect):
1719         (CCDebugRect):
1720         (CCDebugRectHistory):
1721         (WebCore::CCDebugRectHistory::create):
1722         (WebCore::CCDebugRectHistory::debugRects):
1723         * platform/graphics/chromium/cc/CCFrameRateCounter.cpp: Added.
1724         (WebCore):
1725         (WebCore::safeMod):
1726         (WebCore::CCFrameRateCounter::frameIndex):
1727         (WebCore::CCFrameRateCounter::CCFrameRateCounter):
1728         (WebCore::CCFrameRateCounter::markBeginningOfFrame):
1729         (WebCore::CCFrameRateCounter::markEndOfFrame):
1730         (WebCore::CCFrameRateCounter::isBadFrameInterval):
1731         (WebCore::CCFrameRateCounter::isBadFrame):
1732         (WebCore::CCFrameRateCounter::getAverageFPSAndStandardDeviation):
1733         (WebCore::CCFrameRateCounter::timeStampOfRecentFrame):
1734         * platform/graphics/chromium/cc/CCFrameRateCounter.h: Added.
1735         (WebCore):
1736         (CCFrameRateCounter):
1737         (WebCore::CCFrameRateCounter::create):
1738         (WebCore::CCFrameRateCounter::currentFrameNumber):
1739         (WebCore::CCFrameRateCounter::timeStampHistorySize):
1740         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
1741         (WebCore):
1742         (WebCore::CCHeadsUpDisplay::enabled):
1743         (WebCore::CCHeadsUpDisplay::showDebugRects):
1744         (WebCore::CCHeadsUpDisplay::draw):
1745         (WebCore::CCHeadsUpDisplay::drawHudContents):
1746         (WebCore::CCHeadsUpDisplay::drawFPSCounter):
1747         (WebCore::CCHeadsUpDisplay::drawFPSCounterText):
1748         (WebCore::CCHeadsUpDisplay::drawDebugRects):
1749         * platform/graphics/chromium/cc/CCHeadsUpDisplay.h:
1750         (WebCore):
1751         (CCHeadsUpDisplay):
1752         (WebCore::CCHeadsUpDisplay::CCHeadsUpDisplay):
1753         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1754         (WebCore::CCSettings::CCSettings):
1755         (CCSettings):
1756         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1757         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
1758         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
1759         (WebCore::CCLayerTreeHostImpl::drawLayers):
1760         (WebCore::CCLayerTreeHostImpl::swapBuffers):
1761         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1762         (WebCore):
1763         (WebCore::CCLayerTreeHostImpl::fpsCounter):
1764         (WebCore::CCLayerTreeHostImpl::debugRectHistory):
1765         (CCLayerTreeHostImpl):
1766
1767 2012-04-23  Julien Chaffraix  <jchaffraix@webkit.org>
1768
1769         Cut dependency on RenderLayer::scrollRectToVisible outside rendering
1770         https://bugs.webkit.org/show_bug.cgi?id=84607
1771
1772         Reviewed by Simon Fraser.
1773
1774         Layering fix only, there should be no change behavior.
1775
1776         Because we don't have an accessor on RenderObject, a lot of the code needs
1777         to know about RenderLayer. This is not necessary and exposes RenderLayer to
1778         objects that shouldn't know about it.
1779
1780         This patch adds a RenderObject::scrollRectToVisible with the ad-hoc explanation
1781         as to why it isn't on RenderBox (scrolling is a RenderBox concept).
1782
1783         * WebCore.exp.in:
1784         * WebCore.order:
1785         Updated to expose the new method.
1786
1787         * dom/Element.cpp:
1788         (WebCore::Element::scrollIntoView):
1789         (WebCore::Element::scrollIntoViewIfNeeded):
1790         (WebCore::Element::updateFocusAppearance):
1791         * editing/Editor.cpp:
1792         (WebCore::Editor::findStringAndScrollToVisible):
1793         * editing/FrameSelection.cpp:
1794         (WebCore::FrameSelection::revealSelection):
1795         * page/FrameView.cpp:
1796         (WebCore::FrameView::scrollToAnchor):
1797         Updated those call sites to use the new function.
1798
1799         * rendering/RenderLayer.h:
1800         Removed ScrollBehavior.h #include and default argument values
1801         as we are always called through RenderObject now.
1802
1803         * rendering/RenderObject.cpp:
1804         (WebCore::RenderObject::scrollRectToVisible):
1805         * rendering/RenderObject.h:
1806         Added a new function that just forwards to the enclosing layer
1807         if any. We return whether we actually tried to scroll to match
1808         some call sites expectations.
1809
1810 2012-04-23  Zhenyao Mo  <zmo@google.com>
1811
1812         framebuffer binding should not be changed after canvas resize or compositing
1813         https://bugs.webkit.org/show_bug.cgi?id=84609
1814
1815         Reviewed by Kenneth Russell.
1816
1817         Test: fast/canvas/webgl/framebuffer-bindings-unaffected-on-resize.html
1818
1819         * html/canvas/WebGLRenderingContext.cpp: set framebuffer binding to DrawingBuffer.
1820         (WebCore):
1821         (WebCore::WebGLRenderingContext::bindFramebuffer):
1822         (WebCore::WebGLRenderingContext::deleteFramebuffer):
1823         (WebCore::WebGLRenderingContext::loseContextImpl):
1824         * platform/graphics/cairo/DrawingBufferCairo.cpp: initialize m_framebufferBinding.
1825         (WebCore::DrawingBuffer::DrawingBuffer):
1826         * platform/graphics/chromium/DrawingBufferChromium.cpp: Ditto.
1827         (WebCore::DrawingBuffer::DrawingBuffer):
1828         * platform/graphics/chromium/WebGLLayerChromium.cpp: Recover framebuffer binding after update().
1829         (WebCore::WebGLLayerChromium::update):
1830         * platform/graphics/gpu/DrawingBuffer.cpp: Add a function to restore framebuffer binding.
1831         (WebCore::DrawingBuffer::restoreFramebufferBinding):
1832         (WebCore):
1833         * platform/graphics/gpu/DrawingBuffer.h: Ditto.
1834         (WebCore::DrawingBuffer::setTexture2DBinding):
1835         (DrawingBuffer):
1836         (WebCore::DrawingBuffer::setFramebufferBinding):
1837         * platform/graphics/gpu/mac/DrawingBufferMac.mm: initialize m_framebufferBinding.
1838         (WebCore::DrawingBuffer::DrawingBuffer):
1839         * platform/graphics/gpu/qt/DrawingBufferQt.cpp: initialize m_framebufferBinding.
1840         (WebCore::DrawingBuffer::DrawingBuffer):
1841
1842 2012-04-23  Victor Carbune  <vcarbune@adobe.com>
1843
1844         Simplify volume slider rendering
1845         https://bugs.webkit.org/show_bug.cgi?id=82150
1846
1847         Reviewed by Eric Carlson.
1848
1849         Test: media/video-controls-rendering-toggle-display-none.html
1850
1851         * css/mediaControlsChromium.css: Update controls css for Chromium.
1852         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
1853         (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
1854         (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container):
1855         * css/mediaControlsGtk.css: Update controls css for GTK.
1856         (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
1857         (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container):
1858         * css/mediaControlsQuickTime.css: Update controls css for Safari.
1859         (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
1860         (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container):
1861         (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
1862         * html/shadow/MediaControlElements.cpp: Removed particular renderer.
1863         (WebCore):
1864         * html/shadow/MediaControlElements.h:
1865         (MediaControlVolumeSliderContainerElement): Remoed particular renderer.
1866         * html/shadow/MediaControlRootElement.cpp:
1867         (WebCore::MediaControlRootElement::create): Added a div element as a container. Removed extra unused mute button.
1868         * html/shadow/MediaControlRootElementChromium.cpp: Added an extra div
1869         element as a container for the mute button and the volume slider to
1870         easily position them relative to each other.
1871         (WebCore::MediaControlRootElementChromium::create):
1872
1873 2012-04-23  Sheriff Bot  <webkit.review.bot@gmail.com>
1874
1875         Unreviewed, rolling out r109981.
1876         http://trac.webkit.org/changeset/109981
1877         https://bugs.webkit.org/show_bug.cgi?id=84630
1878
1879         Broke Twitter map buddy icon (see
1880         https://bugs.webkit.org/show_bug.cgi?id=84558) (Requested by
1881         thorton on #webkit).
1882
1883         * rendering/RenderLayerCompositor.cpp:
1884         (WebCore::RenderLayerCompositor::addToOverlapMap):
1885         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1886
1887 2012-04-23  Emil A Eklund  <eae@chromium.org>
1888
1889         Crash in RenderInline::clippedOverflowRectForRepaint for PrintPreview
1890         https://bugs.webkit.org/show_bug.cgi?id=84300
1891
1892         Reviewed by Simon Fraser.
1893
1894         No new tests, have not been able to come up with a reliable reduction.
1895
1896         * rendering/RenderInline.cpp:
1897         (WebCore::RenderInline::clippedOverflowRectForRepaint):
1898         Add NULL check for containingBlock() as it can return NULL when detached
1899         from the tree.
1900
1901 2012-04-23  Sheriff Bot  <webkit.review.bot@gmail.com>
1902
1903         Unreviewed, rolling out r114929.
1904         http://trac.webkit.org/changeset/114929
1905         https://bugs.webkit.org/show_bug.cgi?id=84623
1906
1907         Broke 35 canvas/webgl tests (Requested by jernoble on
1908         #webkit).
1909
1910         * html/canvas/WebGLRenderingContext.cpp:
1911         (WebCore):
1912         (WebCore::WebGLRenderingContext::bindFramebuffer):
1913         (WebCore::WebGLRenderingContext::deleteFramebuffer):
1914         (WebCore::WebGLRenderingContext::loseContextImpl):
1915         * platform/graphics/cairo/DrawingBufferCairo.cpp:
1916         (WebCore::DrawingBuffer::DrawingBuffer):
1917         * platform/graphics/chromium/DrawingBufferChromium.cpp:
1918         (WebCore::DrawingBuffer::DrawingBuffer):
1919         * platform/graphics/chromium/WebGLLayerChromium.cpp:
1920         (WebCore::WebGLLayerChromium::update):
1921         * platform/graphics/gpu/DrawingBuffer.cpp:
1922         * platform/graphics/gpu/DrawingBuffer.h:
1923         (WebCore::DrawingBuffer::setTexture2DBinding):
1924         (DrawingBuffer):
1925         * platform/graphics/gpu/mac/DrawingBufferMac.mm:
1926         (WebCore::DrawingBuffer::DrawingBuffer):
1927         * platform/graphics/gpu/qt/DrawingBufferQt.cpp:
1928         (WebCore::DrawingBuffer::DrawingBuffer):
1929
1930 2012-04-23  Kentaro Hara  <haraken@chromium.org>
1931
1932         [V8] Pass Isolate around in V8Collection.h
1933         https://bugs.webkit.org/show_bug.cgi?id=84299
1934
1935         Reviewed by Nate Chapin.
1936
1937         The objective is to pass Isolate around in V8 bindings.
1938         This patch passes Isolate around in V8Collection.h.
1939
1940         No tests. No change in behavior.
1941
1942         * bindings/v8/V8Collection.h:
1943         (WebCore::getV8Object):
1944         (WebCore::getNamedPropertyOfCollection):
1945         (WebCore::collectionNamedPropertyGetter):
1946         (WebCore::getIndexedPropertyOfCollection):
1947         (WebCore::collectionIndexedPropertyGetter):
1948
1949 2012-04-23  Kentaro Hara  <haraken@chromium.org>
1950
1951         [V8] Pass Isolate to toV8() (Part5)
1952         https://bugs.webkit.org/show_bug.cgi?id=84271
1953
1954         Reviewed by Nate Chapin.
1955
1956         The objective is to pass Isolate to all toV8()s.
1957         Since there are a lot of toV8(), I'll make the change
1958         step by step. This patch passes Isolate to toV8()
1959         in several custom bindings.
1960
1961         No tests. No change in behavior.
1962
1963         * bindings/v8/custom/V8MessageChannelConstructor.cpp:
1964         (WebCore::V8MessageChannel::constructorCallback):
1965         * bindings/v8/custom/V8MessageEventCustom.cpp:
1966         (WebCore::V8MessageEvent::dataAccessorGetter):
1967         (WebCore::V8MessageEvent::portsAccessorGetter):
1968         * bindings/v8/custom/V8MutationCallbackCustom.cpp:
1969         (WebCore::V8MutationCallback::handleEvent):
1970         * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
1971         (WebCore::V8NamedNodeMap::indexedPropertyGetter):
1972         (WebCore::V8NamedNodeMap::namedPropertyGetter):
1973         (WebCore::toV8):
1974         * bindings/v8/custom/V8NodeListCustom.cpp:
1975         (WebCore::V8NodeList::namedPropertyGetter):
1976         * bindings/v8/custom/V8NotificationCenterCustom.cpp:
1977         (WebCore::V8NotificationCenter::createHTMLNotificationCallback):
1978         (WebCore::V8NotificationCenter::createNotificationCallback):
1979         * bindings/v8/custom/V8PerformanceCustom.cpp:
1980         (WebCore::V8Performance::memoryAccessorGetter):
1981         * bindings/v8/custom/V8PopStateEventCustom.cpp:
1982         (WebCore::V8PopStateEvent::stateAccessorGetter):
1983         * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
1984         (WebCore::V8SQLTransactionSync::executeSqlCallback):
1985         * bindings/v8/custom/V8SVGPathSegCustom.cpp:
1986         (WebCore::toV8):
1987
1988 2012-04-23  Zhenyao Mo  <zmo@google.com>
1989
1990         framebuffer binding should not be changed after canvas resize or compositing
1991         https://bugs.webkit.org/show_bug.cgi?id=84609
1992
1993         Reviewed by Kenneth Russell.
1994
1995         Test: fast/canvas/webgl/framebuffer-bindings-unaffected-on-resize.html
1996
1997         * html/canvas/WebGLRenderingContext.cpp: set framebuffer binding to DrawingBuffer.
1998         (WebCore):
1999         (WebCore::WebGLRenderingContext::bindFramebuffer):
2000         (WebCore::WebGLRenderingContext::deleteFramebuffer):
2001         (WebCore::WebGLRenderingContext::loseContextImpl):
2002         * platform/graphics/cairo/DrawingBufferCairo.cpp: initialize m_framebufferBinding.
2003         (WebCore::DrawingBuffer::DrawingBuffer):
2004         * platform/graphics/chromium/DrawingBufferChromium.cpp: Ditto.
2005         (WebCore::DrawingBuffer::DrawingBuffer):
2006         * platform/graphics/chromium/WebGLLayerChromium.cpp: Recover framebuffer binding after update().
2007         (WebCore::WebGLLayerChromium::update):
2008         * platform/graphics/gpu/DrawingBuffer.cpp: Add a function to restore framebuffer binding.
2009         (WebCore::DrawingBuffer::restoreFramebufferBinding):
2010         (WebCore):
2011         * platform/graphics/gpu/DrawingBuffer.h: Ditto.
2012         (WebCore::DrawingBuffer::setTexture2DBinding):
2013         (DrawingBuffer):
2014         (WebCore::DrawingBuffer::setFramebufferBinding):
2015         * platform/graphics/gpu/mac/DrawingBufferMac.mm: initialize m_framebufferBinding.
2016         (WebCore::DrawingBuffer::DrawingBuffer):
2017         * platform/graphics/gpu/qt/DrawingBufferQt.cpp: initialize m_framebufferBinding.
2018         (WebCore::DrawingBuffer::DrawingBuffer):
2019
2020 2012-04-23  Kentaro Hara  <haraken@chromium.org>
2021
2022         [V8] Pass Isolate to toV8() (Part4)
2023         https://bugs.webkit.org/show_bug.cgi?id=84269
2024
2025         Reviewed by Nate Chapin.
2026
2027         The objective is to pass Isolate to all toV8()s.
2028         Since there are a lot of toV8()s, I'll make the change
2029         step by step. This patch passes Isolate to toV8() in
2030         several custom bindings.
2031
2032         No tests. No change in behavior.
2033
2034         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
2035         (WebCore::V8HTMLCanvasElement::getContextCallback):
2036         * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
2037         (WebCore::toV8):
2038         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
2039         (WebCore::V8HTMLDocument::allAccessorGetter):
2040         * bindings/v8/custom/V8HTMLElementCustom.cpp:
2041         (WebCore::toV8Object):
2042         (WebCore::V8HTMLElement::itemValueAccessorGetter):
2043         * bindings/v8/custom/V8HTMLFormElementCustom.cpp:
2044         (WebCore::V8HTMLFormElement::indexedPropertyGetter):
2045         (WebCore::V8HTMLFormElement::namedPropertyGetter):
2046         * bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp:
2047         (WebCore::V8HTMLFrameSetElement::namedPropertyGetter):
2048         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
2049         (WebCore::v8HTMLImageElementConstructorCallback):
2050         * bindings/v8/custom/V8HTMLLinkElementCustom.cpp:
2051         (WebCore::V8HTMLLinkElement::sizesAccessorGetter):
2052         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
2053         (WebCore::V8HTMLOptionsCollection::indexedPropertyGetter):
2054         * bindings/v8/custom/V8HTMLOutputElementCustom.cpp:
2055         (WebCore::V8HTMLOutputElement::htmlForAccessorGetter):
2056         * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
2057         (WebCore::V8HTMLSelectElement::indexedPropertyGetter):
2058         * bindings/v8/custom/V8ImageDataCustom.cpp:
2059         (WebCore::toV8):
2060
2061 2012-04-23  Emil A Eklund  <eae@chromium.org>
2062
2063         Clean up subpixel unit handling in hit testing code
2064         https://bugs.webkit.org/show_bug.cgi?id=84496
2065
2066         Reviewed by Eric Seidel.
2067
2068         Fix use of IntRect and LayoutRect in hit testing code in preparation for
2069         subpixel layout.
2070
2071         No new tests, no change in functionality.
2072
2073         * rendering/HitTestResult.cpp:
2074         (WebCore::HitTestResult::rectForPoint):
2075         Revert rectForPoint to IntRect as all call sites converted it to an
2076         IntRect anyway to compare it with an IntPoint or another IntRect.
2077
2078         * rendering/HitTestingTransformState.cpp:
2079         (WebCore::HitTestingTransformState::boundsOfMappedQuad):
2080         * rendering/HitTestingTransformState.h:
2081         Convert boundsOfMappedQuad to LayoutRect as the TransformationMatrix now
2082         has subpixel precision.
2083
2084 2012-04-23  Kentaro Hara  <haraken@chromium.org>
2085
2086         [V8] Pass Isolate to toV8() (Part3)
2087         https://bugs.webkit.org/show_bug.cgi?id=84261
2088
2089         Reviewed by Nate Chapin.
2090
2091         The objective is to pass Isolate to all toV8()s.
2092         Since there are a lot of toV8(), I'll make the change
2093         step by step. This patch passes Isolate to toV8()
2094         in several custom bindings.
2095
2096         No tests. No change in behavior.
2097
2098         * bindings/v8/custom/V8DOMWindowCustom.cpp:
2099         (WebCore::V8DOMWindow::openCallback):
2100         (WebCore::V8DOMWindow::indexedPropertyGetter):
2101         (WebCore::V8DOMWindow::namedPropertyGetter):
2102         * bindings/v8/custom/V8DirectoryEntrySyncCustom.cpp:
2103         (WebCore::V8DirectoryEntrySync::getDirectoryCallback):
2104         (WebCore::V8DirectoryEntrySync::getFileCallback):
2105         * bindings/v8/custom/V8DocumentCustom.cpp:
2106         (WebCore::V8Document::evaluateCallback):
2107         (WebCore::V8Document::getCSSCanvasContextCallback):
2108         (WebCore::V8Document::createTouchListCallback):
2109         * bindings/v8/custom/V8DocumentLocationCustom.cpp:
2110         (WebCore::V8Document::locationAccessorGetter):
2111         * bindings/v8/custom/V8EntryCustom.cpp:
2112         (WebCore::toV8):
2113         * bindings/v8/custom/V8EntrySyncCustom.cpp:
2114         (WebCore::toV8):
2115         * bindings/v8/custom/V8EventCustom.cpp:
2116         (WebCore::V8Event::dataTransferAccessorGetter):
2117         (WebCore::V8Event::clipboardDataAccessorGetter):
2118         (WebCore):
2119         * bindings/v8/custom/V8FileReaderCustom.cpp:
2120         (WebCore::V8FileReader::resultAccessorGetter):
2121         * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp:
2122         (WebCore::getItem):
2123         (WebCore::V8HTMLAllCollection::callAsFunctionCallback):
2124
2125 2012-04-23  Kentaro Hara  <haraken@chromium.org>
2126
2127         [V8] Pass Isolate to toV8() (Part2)
2128         https://bugs.webkit.org/show_bug.cgi?id=84259
2129
2130         Reviewed by Nate Chapin.
2131
2132         The objective is to pass Isolate to all toV8()s.
2133         Since there are a lot of toV8(), I'll make the change
2134         step by step. This patch passes Isolate to toV8() in
2135         several custom bindings.
2136
2137         No tests. No change in behavior.
2138
2139         * bindings/v8/custom/V8BlobCustom.cpp:
2140         (WebCore::toV8):
2141         * bindings/v8/custom/V8CSSRuleCustom.cpp:
2142         (WebCore::toV8):
2143         * bindings/v8/custom/V8CSSStyleSheetCustom.cpp:
2144         (WebCore::toV8):
2145         * bindings/v8/custom/V8CSSValueCustom.cpp:
2146         (WebCore::toV8):
2147         * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
2148         (WebCore::toV8Object):
2149         (WebCore::V8CanvasRenderingContext2D::strokeStyleAccessorGetter):
2150         (WebCore::V8CanvasRenderingContext2D::fillStyleAccessorGetter):
2151         * bindings/v8/custom/V8ConsoleCustom.cpp:
2152         (WebCore::V8Console::memoryAccessorGetter):
2153         * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp:
2154         (WebCore::V8SQLStatementErrorCallback::handleEvent):
2155         * bindings/v8/custom/V8DOMStringMapCustom.cpp:
2156         (WebCore::toV8):
2157         * bindings/v8/custom/V8DOMTokenListCustom.cpp:
2158         (WebCore::toV8):
2159
2160 2012-04-23  Kentaro Hara  <haraken@chromium.org>
2161
2162         [V8][Refactoring] Remove V8Proxy::toV8()
2163         https://bugs.webkit.org/show_bug.cgi?id=84257
2164
2165         Reviewed by Nate Chapin.
2166
2167         Some constructorCallback()s are using V8Proxy::toV8(),
2168         other constructorCallback()s are directly using setJSWrapperForXXX()
2169         (XXX can be DOMObject, ActiveDOMObject, Node or ActiveNode).
2170         We should unify them.
2171
2172         Considering the fact that V8Proxy::toV8() just supports
2173         XXX=DOMObject and thus is not flexible, replacing V8Proxy::toV8()
2174         with setJSWrapperForDOMObject() would make sense.
2175
2176         No tests. No change in behavior.
2177
2178         * bindings/v8/V8Proxy.h: Removed toV8().
2179
2180         * bindings/scripts/CodeGeneratorV8.pm: Replaced toV8() with setJSWrapperForDOMObject().
2181         (GenerateEventConstructorCallback):
2182         * bindings/v8/custom/V8ArrayBufferCustom.cpp: Ditto.
2183         (WebCore::V8ArrayBuffer::constructorCallback):
2184         * bindings/v8/custom/V8ArrayBufferViewCustom.h: Ditto.
2185         (WebCore::constructWebGLArrayWithArrayBufferArgument):
2186         (WebCore::constructWebGLArray):
2187         * bindings/v8/custom/V8DOMFormDataCustom.cpp: Ditto.
2188         (WebCore::V8DOMFormData::constructorCallback):
2189         * bindings/v8/custom/V8DataViewCustom.cpp: Ditto.
2190         (WebCore::V8DataView::constructorCallback):
2191         * bindings/v8/custom/V8MessageChannelConstructor.cpp: Ditto.
2192         (WebCore::V8MessageChannel::constructorCallback):
2193         * bindings/v8/custom/V8WebKitPointConstructor.cpp: Ditto.
2194         (WebCore::V8WebKitPoint::constructorCallback):
2195
2196         * bindings/scripts/test/V8/V8TestEventConstructor.cpp: Updated run-bindings-tests results.
2197         (WebCore::V8TestEventConstructor::constructorCallback):
2198
2199 2012-04-23  Kentaro Hara  <haraken@chromium.org>
2200
2201         [V8] Pass Isolate to toV8() (Part1)
2202         https://bugs.webkit.org/show_bug.cgi?id=84250
2203
2204         Reviewed by Nate Chapin.
2205
2206         The final objective is to pass Isolate around in V8 bindings.
2207         This patch makes a change in CodeGeneratorV8.pm so that the
2208         generated code passes Isolate to toV8().
2209
2210         No tests. No change in behavior.
2211
2212         * bindings/scripts/CodeGeneratorV8.pm: Modified as described above.
2213         (GenerateNormalAttrGetter):
2214         (GenerateNamedConstructorCallback):
2215         (GenerateCallbackImplementation):
2216         (GenerateFunctionCallString):
2217         (NativeToJSValue):
2218
2219         * bindings/scripts/test/V8/V8Float64Array.cpp: Updated run-bindings-tests results.
2220         (WebCore::Float64ArrayV8Internal::fooCallback):
2221         * bindings/scripts/test/V8/V8TestCallback.cpp:
2222         (WebCore::V8TestCallback::callbackWithClass1Param):
2223         (WebCore::V8TestCallback::callbackWithClass2Param):
2224         (WebCore::V8TestCallback::callbackWithStringList):
2225         (WebCore::V8TestCallback::callbackRequiresThisToPass):
2226         * bindings/scripts/test/V8/V8TestInterface.cpp:
2227         (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):
2228         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
2229         (WebCore::V8TestNamedConstructorConstructorCallback):
2230         * bindings/scripts/test/V8/V8TestObj.cpp:
2231         (WebCore::TestObjV8Internal::readOnlyTestObjAttrAttrGetter):
2232         (WebCore::TestObjV8Internal::testObjAttrAttrGetter):
2233         (WebCore::TestObjV8Internal::XMLObjAttrAttrGetter):
2234         (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeAttrGetter):
2235         (WebCore::TestObjV8Internal::withScriptStateAttributeRaisesAttrGetter):
2236         (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrGetter):
2237         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrGetter):
2238         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrGetter):
2239         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrGetter):
2240         (WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrGetter):
2241         (WebCore::TestObjV8Internal::cachedAttribute1AttrGetter):
2242         (WebCore::TestObjV8Internal::cachedAttribute2AttrGetter):
2243         (WebCore::TestObjV8Internal::mutablePointAttrGetter):
2244         (WebCore::TestObjV8Internal::immutablePointAttrGetter):
2245         (WebCore::TestObjV8Internal::objMethodCallback):
2246         (WebCore::TestObjV8Internal::objMethodWithArgsCallback):
2247         (WebCore::TestObjV8Internal::methodThatRequiresAllArgsAndThrowsCallback):
2248         (WebCore::TestObjV8Internal::withScriptStateObjCallback):
2249         (WebCore::TestObjV8Internal::withScriptStateObjExceptionCallback):
2250         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateObjExceptionCallback):
2251         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesCallback):
2252         (WebCore::TestObjV8Internal::mutablePointFunctionCallback):
2253         (WebCore::TestObjV8Internal::immutablePointFunctionCallback):
2254         (WebCore::TestObjV8Internal::strictFunctionCallback):
2255         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2256         (WebCore::TestSerializedScriptValueInterfaceV8Internal::portsAttrGetter):
2257
2258 2012-04-23  Kentaro Hara  <haraken@chromium.org>
2259
2260         [V8] Add an optional Isolate argument to setDOMException() and throwError()
2261         https://bugs.webkit.org/show_bug.cgi?id=84310
2262
2263         Reviewed by Nate Chapin.
2264
2265         The objective is to pass Isolate to setDOMException()
2266         and throwError(). This patch adds an optional Isolate argument
2267         to setDOMException() and throwError(). I'll pass the Isolate
2268         to these methods in the following patches.
2269
2270         No tests. No change in behavior.
2271
2272         * bindings/v8/V8Proxy.cpp:
2273         (WebCore):
2274         (WebCore::V8Proxy::setDOMException):
2275         (WebCore::V8Proxy::throwError):
2276         * bindings/v8/V8Proxy.h:
2277         (V8Proxy):
2278         (WebCore):
2279         (WebCore::throwError):
2280
2281 2012-04-23  Ian Vollick  <vollick@chromium.org>
2282
2283         [chromium] Properly ignore unsupported animation directions.
2284         https://bugs.webkit.org/show_bug.cgi?id=84599
2285
2286         Reviewed by Adrienne Walker.
2287
2288         Tested in CCLayerAnimationControllerTest.ignoreUnsupportedAnimationDirections.
2289
2290         * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
2291
2292 2012-04-17  Kentaro Hara  <haraken@chromium.org>
2293
2294         [Performance][V8] Skip Isolate look-up to find StringCache
2295         https://bugs.webkit.org/show_bug.cgi?id=84103
2296
2297         Reviewed by Nate Chapin.
2298
2299         This patch improves the performance of a lot of DOM attribute
2300         getters that return a string.
2301
2302         - Improves the performance of Dromaeo/dom-attr.html(element.property)
2303           by 27.7%.
2304         - Improves the performance of Dromaeo/dom-attr.html(getAttribute)
2305           by 10.6%.
2306         - Improves the performance of div.id, div.className,
2307           div.nodeName, text.nodeValue, text.textContent by 12% -- 21%.
2308
2309         The followings are the test results in my Linux desktop.
2310
2311         Performance test: Dromaeo/dom-attr.html
2312         Total:                     674.64runs/s ->  707.03runs/s (+ 4.8%)
2313         getAttribute:             1537.60runs/s -> 1700.20runs/s (+10.6%)
2314         element.property:         1389.00runs/s -> 1774.20runs/s (+27.7%)
2315         setAttribute:              538.88runs/s ->  548.87runs/s (+ 1.9%)
2316         element.property = value:  644.07runs/s ->  656.67runs/s (+ 2.0%)
2317         element.expando = value:   219.76runs/s ->  207.14runs/s (- 6.8%)
2318         element.expando:           578.77runs/s ->  554.67runs/s (- 4.2%)
2319
2320         Performance test: https://bugs.webkit.org/attachment.cgi?id=137440
2321         div.id:           30.70ns -> 26.70ns (+15%)
2322         div.className:    31.10ns -> 26.40ns (+18%)
2323         div.nodeName:     37.70ns -> 33.00ns (+14%)
2324         text.nodeValue:   31.40ns -> 25.90ns (+21%)
2325         text.textContent: 51.50ns -> 45.90ns (+12%)
2326
2327         Previously V8 bindings need to look up an Isolate to find
2328         an Isolate-local StringCache. This patch skips the look-up
2329         by getting the Isolate from AccessorInfo.GetIsolate()
2330         or Arguments.GetIsolate().
2331
2332         No tests. No change in behavior.
2333
2334         * bindings/scripts/CodeGeneratorV8.pm:
2335         (GenerateNormalAttrGetter):
2336         (GenerateFunctionCallString):
2337         (NativeToJSValue):
2338         * bindings/v8/V8Binding.cpp:
2339         (WebCore::getElementStringAttr):
2340         * bindings/v8/V8Binding.h:
2341         (WebCore::v8ExternalString): Make 'isolate' an optional argument.
2342         Ideally we want to make 'isolate' a non-optional argument,
2343         but it is difficult to rewrite all v8ExternalString() callers
2344         at a breath. We can rewrite them incrementally.
2345         (WebCore::v8String): Ditto.
2346         (WebCore::v8StringOrNull): Ditto.
2347         (WebCore::v8StringOrUndefined): Ditto.
2348         (WebCore::v8StringOrFalse): Ditto.
2349
2350         * bindings/scripts/test/V8/V8TestEventConstructor.cpp: Updated run-bindings-tests results.
2351         (WebCore::TestEventConstructorV8Internal::attr1AttrGetter):
2352         (WebCore::TestEventConstructorV8Internal::attr2AttrGetter):
2353         * bindings/scripts/test/V8/V8TestInterface.cpp:
2354         (WebCore::TestInterfaceV8Internal::supplementalStr1AttrGetter):
2355         (WebCore::TestInterfaceV8Internal::supplementalStr2AttrGetter):
2356         * bindings/scripts/test/V8/V8TestObj.cpp:
2357         (WebCore::TestObjV8Internal::readOnlyStringAttrAttrGetter):
2358         (WebCore::TestObjV8Internal::stringAttrAttrGetter):
2359         (WebCore::TestObjV8Internal::reflectedStringAttrAttrGetter):
2360         (WebCore::TestObjV8Internal::reflectedURLAttrAttrGetter):
2361         (WebCore::TestObjV8Internal::reflectedCustomURLAttrAttrGetter):
2362         (WebCore::TestObjV8Internal::stringAttrWithGetterExceptionAttrGetter):
2363         (WebCore::TestObjV8Internal::stringAttrWithSetterExceptionAttrGetter):
2364         (WebCore::TestObjV8Internal::hashAttrGetter):
2365         (WebCore::TestObjV8Internal::conditionalMethod1Callback):
2366
2367 2012-04-17  Kentaro Hara  <haraken@chromium.org>
2368
2369         [V8] Add an optional Isolate argument to wrap()
2370         https://bugs.webkit.org/show_bug.cgi?id=84202
2371
2372         Reviewed by Nate Chapin.
2373
2374         The final objective is to pass Isolate around in V8 bindings.
2375         This patch adds an optional Isolate argument to wrap().
2376         After rewriting all wrap() callers so that they pass Isolate
2377         to wrap(), I'll make the Isolate argument non-optional.
2378
2379         No tests. No change in behavior.
2380
2381         * bindings/scripts/CodeGeneratorV8.pm: Modified as described above.
2382         (GenerateHeader):
2383         * bindings/v8/custom/V8DocumentCustom.cpp: Ditto.
2384         (WebCore::toV8):
2385         * bindings/v8/custom/V8HTMLDocumentCustom.cpp: Ditto.
2386         (WebCore::toV8):
2387         * bindings/v8/custom/V8NodeCustom.cpp: Ditto.
2388         (WebCore::toV8Slow):
2389         * bindings/v8/custom/V8SVGDocumentCustom.cpp: Ditto.
2390         (WebCore::toV8):
2391         * dom/make_names.pl: Ditto.
2392         (printWrapperFactoryCppFile):
2393
2394         * bindings/scripts/test/V8/V8Float64Array.h:
2395         Updated run-bindings-tests results.
2396         (V8Float64Array):
2397         (WebCore::V8Float64Array::wrap):
2398         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
2399         (V8TestActiveDOMObject):
2400         (WebCore::V8TestActiveDOMObject::wrap):
2401         (WebCore::toV8):
2402         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
2403         (V8TestCustomNamedGetter):
2404         (WebCore::V8TestCustomNamedGetter::wrap):
2405         (WebCore::toV8):
2406         * bindings/scripts/test/V8/V8TestEventConstructor.h:
2407         (V8TestEventConstructor):
2408         (WebCore::V8TestEventConstructor::wrap):
2409         (WebCore::toV8):
2410         * bindings/scripts/test/V8/V8TestEventTarget.h:
2411         (V8TestEventTarget):
2412         (WebCore::V8TestEventTarget::wrap):
2413         (WebCore::toV8):
2414         * bindings/scripts/test/V8/V8TestInterface.h:
2415         (V8TestInterface):
2416         (WebCore::V8TestInterface::wrap):
2417         (WebCore::toV8):
2418         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
2419         (V8TestMediaQueryListListener):
2420         (WebCore::V8TestMediaQueryListListener::wrap):
2421         (WebCore::toV8):
2422         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
2423         (V8TestNamedConstructor):
2424         (WebCore::V8TestNamedConstructor::wrap):
2425         (WebCore::toV8):
2426         * bindings/scripts/test/V8/V8TestNode.h:
2427         (V8TestNode):
2428         (WebCore::V8TestNode::wrap):
2429         (WebCore::toV8):
2430         * bindings/scripts/test/V8/V8TestObj.h:
2431         (V8TestObj):
2432         (WebCore::V8TestObj::wrap):
2433         (WebCore::toV8):
2434         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
2435         (V8TestSerializedScriptValueInterface):
2436         (WebCore::V8TestSerializedScriptValueInterface::wrap):
2437         (WebCore::toV8):
2438
2439 2012-04-17  Kentaro Hara  <haraken@chromium.org>
2440
2441         [V8] Pass Isolate to toV8Slow()
2442         https://bugs.webkit.org/show_bug.cgi?id=84173
2443
2444         Reviewed by Nate Chapin.
2445
2446         The final objective is to pass Isolate around in V8 bindings.
2447         This patch passes the Isolate to toV8Slow().
2448
2449         No tests. No change in behavior.
2450
2451         * bindings/scripts/CodeGeneratorV8.pm:
2452         (GenerateHeader):
2453         * bindings/v8/custom/V8NodeCustom.cpp:
2454         (WebCore::toV8Slow):
2455
2456 2012-04-17  Kentaro Hara  <haraken@chromium.org>
2457
2458         [V8] Add an optional Isolate argument to toV8().
2459         https://bugs.webkit.org/show_bug.cgi?id=84161
2460
2461         Reviewed by Nate Chapin.
2462
2463         The final objective is to pass Isolate around in V8 bindings.
2464         This patch adds an optional Isolate argument to toV8().
2465         After rewriting all toV8() callers so that they pass Isolate,
2466         I will make the Isolate argument non-optional.
2467
2468         No tests. No change in behavior.
2469
2470         * bindings/scripts/CodeGeneratorV8.pm:
2471         Modified as described above.
2472         (GenerateHeader):
2473         (NativeToJSValue):
2474         * bindings/v8/custom/V8BlobCustom.cpp:
2475         (WebCore::toV8):
2476         * bindings/v8/custom/V8CSSRuleCustom.cpp:
2477         (WebCore::toV8):
2478         * bindings/v8/custom/V8CSSStyleSheetCustom.cpp:
2479         (WebCore::toV8):
2480         * bindings/v8/custom/V8CSSValueCustom.cpp:
2481         (WebCore::toV8):
2482         * bindings/v8/custom/V8CanvasPixelArrayCustom.cpp:
2483         (WebCore::toV8):
2484         * bindings/v8/custom/V8DOMStringMapCustom.cpp:
2485         (WebCore::toV8):
2486         * bindings/v8/custom/V8DOMTokenListCustom.cpp:
2487         (WebCore::toV8):
2488         * bindings/v8/custom/V8DOMWindowCustom.cpp:
2489         (WebCore::toV8):
2490         * bindings/v8/custom/V8DataViewCustom.cpp:
2491         (WebCore::toV8):
2492         * bindings/v8/custom/V8DocumentCustom.cpp:
2493         (WebCore::toV8):
2494         * bindings/v8/custom/V8EntryCustom.cpp:
2495         (WebCore::toV8):
2496         * bindings/v8/custom/V8EntrySyncCustom.cpp:
2497         (WebCore::toV8):
2498         * bindings/v8/custom/V8EventCustom.cpp:
2499         (WebCore::toV8):
2500         * bindings/v8/custom/V8Float32ArrayCustom.cpp:
2501         (WebCore::toV8):
2502         * bindings/v8/custom/V8Float64ArrayCustom.cpp:
2503         (WebCore::toV8):
2504         * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
2505         (WebCore::toV8):
2506         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
2507         (WebCore::toV8):
2508         * bindings/v8/custom/V8HTMLElementCustom.cpp:
2509         (WebCore::toV8):
2510         * bindings/v8/custom/V8IDBAnyCustom.cpp:
2511         (WebCore::toV8):
2512         * bindings/v8/custom/V8IDBKeyCustom.cpp:
2513         (WebCore::toV8):
2514         * bindings/v8/custom/V8ImageDataCustom.cpp:
2515         (WebCore::toV8):
2516         * bindings/v8/custom/V8Int16ArrayCustom.cpp:
2517         (WebCore::toV8):
2518         * bindings/v8/custom/V8Int32ArrayCustom.cpp:
2519         (WebCore::toV8):
2520         * bindings/v8/custom/V8Int8ArrayCustom.cpp:
2521         (WebCore::toV8):
2522         * bindings/v8/custom/V8LocationCustom.cpp:
2523         (WebCore::toV8):
2524         * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
2525         (WebCore::toV8):
2526         * bindings/v8/custom/V8NodeCustom.cpp:
2527         (WebCore::toV8Slow):
2528         * bindings/v8/custom/V8SVGDocumentCustom.cpp:
2529         (WebCore::toV8):
2530         * bindings/v8/custom/V8SVGElementCustom.cpp:
2531         (WebCore::toV8):
2532         * bindings/v8/custom/V8SVGPathSegCustom.cpp:
2533         (WebCore::toV8):
2534         * bindings/v8/custom/V8ScriptProfileCustom.cpp:
2535         (WebCore::toV8):
2536         * bindings/v8/custom/V8ScriptProfileNodeCustom.cpp:
2537         (WebCore::toV8):
2538         * bindings/v8/custom/V8StyleSheetCustom.cpp:
2539         (WebCore::toV8):
2540         * bindings/v8/custom/V8Uint16ArrayCustom.cpp:
2541         (WebCore::toV8):
2542         * bindings/v8/custom/V8Uint32ArrayCustom.cpp:
2543         (WebCore::toV8):
2544         * bindings/v8/custom/V8Uint8ArrayCustom.cpp:
2545         (WebCore::toV8):
2546         * bindings/v8/custom/V8Uint8ClampedArrayCustom.cpp:
2547         (WebCore::toV8):
2548         * bindings/v8/custom/V8WorkerContextCustom.cpp:
2549         (WebCore::toV8):
2550
2551         * bindings/scripts/test/V8/V8Float64Array.h:
2552         Updated run-bindings-tests results.
2553         (WebCore):
2554         (WebCore::toV8):
2555         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
2556         (WebCore::toV8):
2557         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
2558         (WebCore::toV8):
2559         * bindings/scripts/test/V8/V8TestEventConstructor.h:
2560         (WebCore::toV8):
2561         * bindings/scripts/test/V8/V8TestEventTarget.h:
2562         (WebCore::toV8):
2563         * bindings/scripts/test/V8/V8TestInterface.h:
2564         (WebCore::toV8):
2565         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
2566         (WebCore::toV8):
2567         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
2568         (WebCore::toV8):
2569         * bindings/scripts/test/V8/V8TestNode.h:
2570         (WebCore::toV8):
2571         * bindings/scripts/test/V8/V8TestObj.h:
2572         (WebCore::toV8):
2573         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
2574         (WebCore::toV8):
2575
2576 2012-04-23  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
2577         [EFL][WK2] Fix build break when non-cross platform CONTEXT_MENUS are enabled.
2578         https://bugs.webkit.org/show_bug.cgi?id=84136
2579
2580         Reviewed by Andreas Kling.
2581
2582         There was a mismatch between contextMenuItemVector declaration and definition.
2583         Fixed by changing PlatformMenuDescription for EFL port by adding a const modifier.
2584
2585         No new tests required.
2586
2587         * platform/PlatformMenuDescription.h:
2588         (WebCore): Added const modifier to PlatformMenuDescription definition.
2589
2590 2012-04-23  Pierre Rossi  <pierre.rossi@gmail.com>
2591
2592         [Qt] Ensure zero-width space effectively accounts for a width of zero.
2593         https://bugs.webkit.org/show_bug.cgi?id=84595
2594
2595         Reviewed by Simon Hausmann.
2596
2597         The logic so far relies on FontCache::getFontDataForCharacters to
2598         return a valid fontData in the case where the fonts specified don't
2599         have a glyph for the zero-width space character.
2600         QTextLayout::glyphRuns simply ignores characters that don't render in
2601         the glyph runs it returns, so we need to ensure that the subsequent
2602         call to platformWidthForGlyph doesn't lead to a non-zero width.
2603
2604         Covered by tests containing control characters such as
2605         a soft-hyphen like it's the case in:
2606         svg/as-image/img-preserveAspectRatio-support-1.html
2607
2608         * platform/graphics/qt/SimpleFontDataQt.cpp:
2609         (WebCore::SimpleFontData::platformWidthForGlyph):
2610
2611 2012-04-23  Ian Vollick  <vollick@chromium.org>
2612
2613         [chromium] When prepareToDraw fails due to animation checkerboard, we need to call setNeedsCommit
2614         https://bugs.webkit.org/show_bug.cgi?id=84520
2615
2616         Reviewed by Adrienne Walker.
2617
2618         Tested in CCLayerTreeHostImplTest.prepareToDrawFailsWhenAnimationUsesCheckerboard
2619
2620         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2621         (WebCore::CCLayerTreeHostImpl::prepareToDraw):
2622
2623 2012-04-23  Alexis Menard  <alexis.menard@openbossa.org>
2624
2625         Simplify CSSParser::parseFont.
2626         https://bugs.webkit.org/show_bug.cgi?id=78698
2627
2628         Reviewed by Antti Koivisto.
2629
2630         Simplify parseFont by sharing the code we have for
2631         the longhands of the font property.
2632
2633         No new tests : Extend the existing font shorthand test and modify expected files
2634         as now the order of the longhands added in the property list of the style
2635         has changed. It's very unlikely that some code is relying on this order though. It will
2636         also match the way the spec order them http://www.w3.org/TR/css3-fonts/#font-prop
2637         even though the order is arbitrary for some values.
2638
2639         * css/CSSParser.cpp:
2640         (WebCore::CSSParser::parseValue):
2641         (WebCore::CSSParser::parseFont):
2642         (WebCore::CSSParser::parseLineHeight):
2643         (WebCore):
2644         (WebCore::CSSParser::parseFontSize):
2645         (WebCore::CSSParser::parseFontWeight):  Fix a bug discovered while using parseFontWeight from
2646         the parseFont (case font: 0/0, Arial, sans-serif; in a layout test), we should return true only
2647         when we add something in the property list.
2648         * css/CSSParser.h:
2649
2650 2012-04-23  Yury Semikhatsky  <yurys@chromium.org>
2651
2652         Web Inspector: improve the way heap snapshot diff is calculated
2653         https://bugs.webkit.org/show_bug.cgi?id=84590
2654
2655         Diff calculation now consists of the following steps:
2656         1. Collect data about nodes in the base heap snapshot
2657         2. Pass it to the second snapshot.
2658         3. Calculate delta for each class.
2659
2660         Reviewed by Pavel Feldman.
2661
2662         * inspector/front-end/HeapSnapshot.js:
2663         (WebInspector.HeapSnapshot):
2664         (WebInspector.HeapSnapshot.prototype.dispose):
2665         (WebInspector.HeapSnapshot.prototype.aggregatesForDiff):
2666         (WebInspector.HeapSnapshot.prototype.calculateSnapshotDiff):
2667         (WebInspector.HeapSnapshot.prototype._calculateDiffForClass):
2668         (WebInspector.HeapSnapshot.prototype.createAddedNodesProvider):
2669         (WebInspector.HeapSnapshot.prototype.createDeletedNodesProvider):
2670         * inspector/front-end/HeapSnapshotDataGrids.js:
2671         (WebInspector.HeapSnapshotDiffDataGrid.prototype._populateChildren.aggregatesForDiffReceived.didCalculateSnapshotDiff):
2672         (WebInspector.HeapSnapshotDiffDataGrid.prototype._populateChildren):
2673         * inspector/front-end/HeapSnapshotGridNodes.js:
2674         (WebInspector.HeapSnapshotIteratorsTuple):
2675         (WebInspector.HeapSnapshotDiffNode):
2676         (WebInspector.HeapSnapshotDiffNode.prototype._createChildNode):
2677         (WebInspector.HeapSnapshotDiffNode.prototype._createNodesProvider):
2678         * inspector/front-end/HeapSnapshotProxy.js:
2679         (WebInspector.HeapSnapshotProxy.prototype.aggregatesForDiff):
2680         (WebInspector.HeapSnapshotProxy.prototype.calculateSnapshotDiff):
2681         (WebInspector.HeapSnapshotProxy.prototype.createAddedNodesProvider):
2682         (WebInspector.HeapSnapshotProxy.prototype.createDeletedNodesProvider):
2683         * inspector/front-end/HeapSnapshotView.js:
2684         (WebInspector.HeapSnapshotView.prototype._changeBase):
2685
2686 2012-04-23  Pavel Feldman  <pfeldman@chromium.org>
2687
2688         Web Inspector: Rename and extract UISourceCodeImpl into JavaScriptSource
2689         https://bugs.webkit.org/show_bug.cgi?id=84587
2690
2691         Reviewed by Yury Semikhatsky.
2692
2693         No changes other than extraction here. This is the first step in the Resource
2694         hierarchy refactoring described in bug 84586.
2695
2696         * WebCore.gypi:
2697         * WebCore.vcproj/WebCore.vcproj:
2698         * inspector/compile-front-end.py:
2699         * inspector/front-end/CompilerScriptMapping.js:
2700         (WebInspector.CompilerScriptMapping.prototype.addScript):
2701         * inspector/front-end/DebuggerPresentationModel.js:
2702         * inspector/front-end/JavaScriptSource.js: Added.
2703         (WebInspector.JavaScriptSource):
2704         (WebInspector.JavaScriptSource.prototype.breakpoints):
2705         (WebInspector.JavaScriptSource.prototype.breakpointAdded):
2706         (WebInspector.JavaScriptSource.prototype.breakpointRemoved):
2707         (WebInspector.JavaScriptSource.prototype.consoleMessages):
2708         (WebInspector.JavaScriptSource.prototype.consoleMessageAdded):
2709         (WebInspector.JavaScriptSource.prototype.consoleMessagesCleared):
2710         * inspector/front-end/RawSourceCode.js:
2711         (WebInspector.RawSourceCode.prototype._createUISourceCode):
2712         * inspector/front-end/SnippetsModel.js:
2713         (WebInspector.SnippetsScriptMapping.prototype._snippetAdded):
2714         (WebInspector.SnippetsScriptMapping.prototype._createUISourceCodeForScript):
2715         * inspector/front-end/WebKit.qrc:
2716         * inspector/front-end/inspector.html:
2717
2718 2012-04-23  Gavin Peters  <gavinp@chromium.org>
2719
2720         Move ReferrerPolicy out of SecurityPolicy class into its own header in platform.
2721         https://bugs.webkit.org/show_bug.cgi?id=84516
2722
2723         Reviewed by Adam Barth.
2724
2725         No change in behaviour; same enum, different class.
2726
2727         * GNUmakefile.list.am:
2728         * Target.pri:
2729         * WebCore.exp.in:
2730         * WebCore.gypi:
2731         * WebCore.vcproj/WebCore.vcproj:
2732         * WebCore.xcodeproj/project.pbxproj:
2733         * dom/Document.cpp:
2734         (WebCore::Document::Document):
2735         (WebCore::Document::processReferrerPolicy):
2736         * dom/Document.h:
2737         (WebCore::Document::referrerPolicy):
2738         (Document):
2739         * page/SecurityPolicy.h:
2740         * platform/ReferrerPolicy.h: Added.
2741         (WebCore):
2742
2743 2012-04-23  Vineet Chaudhary  <rgf748@motorola.com>
2744
2745         JS binding code generator doesn't handle "attribute unsigned long[]" well
2746         https://bugs.webkit.org/show_bug.cgi?id=84540
2747
2748         Reviewed by Kentaro Hara.
2749
2750         Codegenerator should handle spaces with the sequence<> to support
2751         numeric types like "unsigned long", "int" .. etc. and primitive types
2752         like "boolean", "Date" etc.
2753
2754         Tests: bindings/scripts/test/TestObj.idl
2755
2756         * bindings/scripts/CodeGenerator.pm:
2757         (SkipIncludeHeader): Rename AvoidInclusionOfType to SkipIncludeHeader.
2758         (GetArrayType):
2759         * bindings/scripts/CodeGeneratorJS.pm:
2760         (AddIncludesForType):
2761         (NativeToJSValue):
2762         * bindings/scripts/CodeGeneratorObjC.pm:
2763         (AddIncludesForType):
2764         (GenerateImplementation):
2765         * bindings/scripts/CodeGeneratorV8.pm:
2766         (AddIncludesForType):
2767         (GetHeaderClassInclude):
2768         (GenerateNormalAttrGetter):
2769         (NativeToJSValue):
2770         * bindings/scripts/IDLStructure.pm:
2771         * bindings/scripts/test/JS/JSTestObj.cpp:
2772         (WebCore):
2773         (WebCore::jsTestObjIntSequenceAttr):
2774         (WebCore::jsTestObjShortSequenceAttr):
2775         (WebCore::jsTestObjLongSequenceAttr):
2776         (WebCore::jsTestObjLongLongSequenceAttr):
2777         (WebCore::jsTestObjUnsignedIntSequenceAttr):
2778         (WebCore::jsTestObjUnsignedShortSequenceAttr):
2779         (WebCore::jsTestObjUnsignedLongSequenceAttr):
2780         (WebCore::jsTestObjUnsignedLongLongSequenceAttr):
2781         (WebCore::jsTestObjFloatSequenceAttr):
2782         (WebCore::jsTestObjDoubleSequenceAttr):
2783         (WebCore::jsTestObjBooleanSequenceAttr):
2784         (WebCore::jsTestObjVoidSequenceAttr):
2785         (WebCore::jsTestObjDateSequenceAttr):
2786         (WebCore::setJSTestObjSequenceAttr):
2787         (WebCore::setJSTestObjIntSequenceAttr):
2788         (WebCore::setJSTestObjShortSequenceAttr):
2789         (WebCore::setJSTestObjLongSequenceAttr):
2790         (WebCore::setJSTestObjLongLongSequenceAttr):
2791         (WebCore::setJSTestObjUnsignedIntSequenceAttr):
2792         (WebCore::setJSTestObjUnsignedShortSequenceAttr):
2793         (WebCore::setJSTestObjUnsignedLongSequenceAttr):
2794         (WebCore::setJSTestObjUnsignedLongLongSequenceAttr):
2795         (WebCore::setJSTestObjFloatSequenceAttr):
2796         (WebCore::setJSTestObjDoubleSequenceAttr):
2797         (WebCore::setJSTestObjBooleanSequenceAttr):
2798         (WebCore::setJSTestObjVoidSequenceAttr):
2799         (WebCore::setJSTestObjDateSequenceAttr):
2800         * bindings/scripts/test/JS/JSTestObj.h:
2801         (WebCore):
2802         * bindings/scripts/test/ObjC/DOMTestObj.h:
2803         * bindings/scripts/test/TestObj.idl:
2804         * bindings/scripts/test/V8/V8TestObj.cpp:
2805         (WebCore::TestObjV8Internal::intSequenceAttrAttrGetter):
2806         (TestObjV8Internal):
2807         (WebCore::TestObjV8Internal::intSequenceAttrAttrSetter):
2808         (WebCore::TestObjV8Internal::shortSequenceAttrAttrGetter):
2809         (WebCore::TestObjV8Internal::shortSequenceAttrAttrSetter):
2810         (WebCore::TestObjV8Internal::longSequenceAttrAttrGetter):
2811         (WebCore::TestObjV8Internal::longSequenceAttrAttrSetter):
2812         (WebCore::TestObjV8Internal::longLongSequenceAttrAttrGetter):
2813         (WebCore::TestObjV8Internal::longLongSequenceAttrAttrSetter):
2814         (WebCore::TestObjV8Internal::unsignedIntSequenceAttrAttrGetter):
2815         (WebCore::TestObjV8Internal::unsignedIntSequenceAttrAttrSetter):
2816         (WebCore::TestObjV8Internal::unsignedShortSequenceAttrAttrGetter):
2817         (WebCore::TestObjV8Internal::unsignedShortSequenceAttrAttrSetter):
2818         (WebCore::TestObjV8Internal::unsignedLongSequenceAttrAttrGetter):
2819         (WebCore::TestObjV8Internal::unsignedLongSequenceAttrAttrSetter):
2820         (WebCore::TestObjV8Internal::unsignedLongLongSequenceAttrAttrGetter):
2821         (WebCore::TestObjV8Internal::unsignedLongLongSequenceAttrAttrSetter):
2822         (WebCore::TestObjV8Internal::floatSequenceAttrAttrGetter):
2823         (WebCore::TestObjV8Internal::floatSequenceAttrAttrSetter):
2824         (WebCore::TestObjV8Internal::doubleSequenceAttrAttrGetter):
2825         (WebCore::TestObjV8Internal::doubleSequenceAttrAttrSetter):
2826         (WebCore::TestObjV8Internal::booleanSequenceAttrAttrGetter):
2827         (WebCore::TestObjV8Internal::booleanSequenceAttrAttrSetter):
2828         (WebCore::TestObjV8Internal::voidSequenceAttrAttrGetter):
2829         (WebCore::TestObjV8Internal::voidSequenceAttrAttrSetter):
2830         (WebCore::TestObjV8Internal::dateSequenceAttrAttrGetter):
2831         (WebCore::TestObjV8Internal::dateSequenceAttrAttrSetter):
2832         (WebCore):
2833
2834 2012-04-23  Andreas Kling  <kling@webkit.org>
2835
2836         Unreviewed assertion fix for Chromium bots.
2837
2838         Skip unnecessary Attr::attachToElement() after constructing an Attr using the
2839         constructor that attaches to an Element.
2840
2841         * dom/ElementAttributeData.cpp:
2842         (WebCore::ElementAttributeData::ensureAttr):
2843
2844 2012-04-23  Andreas Kling  <kling@webkit.org>
2845
2846         REGRESSION(r114870): Assertion failure in ElementAttributeData::setAttr().
2847         <http://webkit.org/b/84581>
2848
2849         Reviewed by Antti Koivisto.
2850
2851         Attach the Attr and bump m_attrCount manually in ensureAttr() instead of calling
2852         setAttr(). The latter asserts that the Attr isn't present in the map, which
2853         obviously isn't true after we've just added it.
2854
2855         This has the added effect of removing one unnecessary hash lookup.
2856
2857         * dom/ElementAttributeData.cpp:
2858         (WebCore::ElementAttributeData::ensureAttr):
2859
2860 2012-04-23  Pavel Feldman  <pfeldman@chromium.org>
2861
2862         Web Inspector: make ParsedURL.prototype.displayName data url friendly.
2863         https://bugs.webkit.org/show_bug.cgi?id=84578
2864
2865         Reviewed by Yury Semikhatsky.
2866
2867         We'd like to define valid URL as the one that has scheme, host and path.
2868         We can append to this URL and manipulate its content. We still want 
2869         possibly invalid specs (such as data or about) to exist and have nice
2870         display names.
2871
2872         * inspector/front-end/ResourceUtils.js:
2873         (WebInspector.ParsedURL):
2874         (WebInspector.ParsedURL.prototype.get displayName):
2875
2876 2012-04-23  Pavel Feldman  <pfeldman@chromium.org>
2877
2878         Web Inspector: introduce String.prototype.starts/endsWith and use it all over the place.
2879         https://bugs.webkit.org/show_bug.cgi?id=84574
2880
2881         Reviewed by Yury Semikhatsky.
2882
2883         * inspector/front-end/AuditRules.js:
2884         (WebInspector.AuditRules.VendorPrefixedCSSProperties.prototype.visitProperty):
2885         * inspector/front-end/BreakpointsSidebarPane.js:
2886         (WebInspector.EventListenerBreakpointsSidebarPane.prototype._setBreakpoint):
2887         (WebInspector.EventListenerBreakpointsSidebarPane.prototype._removeBreakpoint):
2888         * inspector/front-end/CSSCompletions.js:
2889         (WebInspector.CSSCompletions.prototype.startsWith):
2890         (WebInspector.CSSCompletions.prototype._firstIndexOfPrefix):
2891         * inspector/front-end/ConsoleView.js:
2892         (WebInspector.ConsoleView.prototype._reportCompletions):
2893         * inspector/front-end/CookieItemsView.js:
2894         (WebInspector.Cookies.cookieMatchesResourceURL):
2895         * inspector/front-end/DatabaseQueryView.js:
2896         (WebInspector.DatabaseQueryView.prototype.completions):
2897         * inspector/front-end/ElementsTreeOutline.js:
2898         (WebInspector.ElementsTreeElement.prototype._buildAttributeDOM):
2899         * inspector/front-end/ProfileView.js:
2900         * inspector/front-end/ProfilesPanel.js:
2901         (WebInspector.ProfilesPanel.prototype.addProfileHeader):
2902         (WebInspector.ProfilesPanel.prototype.displayTitleForProfileLink):
2903         (WebInspector.ProfileSidebarTreeElement):
2904         (WebInspector.ProfileSidebarTreeElement.prototype.get mainTitle):
2905         * inspector/front-end/ResourceUtils.js:
2906         (WebInspector.ParsedURL):
2907         (WebInspector.displayNameForURL):
2908         (WebInspector.linkifyStringAsFragmentWithCustomLinkifier):
2909         (WebInspector.completeURL):
2910         * inspector/front-end/SnippetsModel.js:
2911         (WebInspector.SnippetsModel.prototype.snippetIdForSourceURL):
2912         * inspector/front-end/SourceCSSTokenizer.js:
2913         (WebInspector.SourceCSSTokenizer.prototype.nextToken):
2914         * inspector/front-end/SourceCSSTokenizer.re2js:
2915         * inspector/front-end/TextPrompt.js:
2916         (WebInspector.TextPrompt.prototype._completeCommonPrefix):
2917         * inspector/front-end/UIUtils.js:
2918         (WebInspector.startEditing):
2919         * inspector/front-end/utilities.js:
2920
2921 2012-04-23  Andreas Kling  <kling@webkit.org>
2922
2923         REGRESSION(r114870): Performance hit on DOM/CloneNodes and DOM/CreateNodes.
2924         <http://webkit.org/b/84575>
2925
2926         Reviewed by Antti Koivisto.
2927
2928         Simplify the cloning of Attributes from one Element to another by simply
2929         assigning to m_attributes. This avoids default-constructing a bunch of
2930         Attribute objects that we overwrite immediately anyway (this used to be
2931         fine because they were RefPtr<Attribute> but now that a default-constructed
2932         Attribute contains a QualifiedName, we were doing a bunch of extra hash
2933         lookups, etc.)
2934
2935         * dom/ElementAttributeData.cpp:
2936         (WebCore::ElementAttributeData::setAttributes):
2937
2938 2012-04-20  Pavel Feldman  <pfeldman@chromium.org>
2939
2940         Web Inspector: implement "open stylesheet" dialog.
2941         https://bugs.webkit.org/show_bug.cgi?id=84466
2942
2943         Reviewed by Yury Semikhatsky.
2944
2945         This change introduces abstract OpenResourceDialog and re-uses it in OpenScriptDialog and OpenStylesheetDialog.
2946         Drive-by fix for data: url representation in the navigator and open resource dialogs.
2947
2948         * inspector/front-end/FilteredItemSelectionDialog.js:
2949         (WebInspector.FilteredItemSelectionDialog.prototype.position):
2950         (WebInspector.OpenResourceDialog.filterOutEmptyURLs):
2951         (WebInspector.OpenResourceDialog.compareFunction):
2952         (WebInspector.OpenResourceDialog):
2953         (WebInspector.OpenResourceDialog.prototype.itemTitleAt):
2954         (WebInspector.OpenResourceDialog.prototype.itemKeyAt):
2955         (WebInspector.OpenResourceDialog.prototype.itemsCount):
2956         (WebInspector.OpenResourceDialog.prototype.requestItems):
2957         (WebInspector.OpenResourceDialog.prototype.selectItem):
2958         (WebInspector.OpenScriptDialog):
2959         (WebInspector.OpenScriptDialog.install):
2960         (WebInspector.OpenScriptDialog._show):
2961         (WebInspector.OpenScriptDialog.prototype.selectItem):
2962         * inspector/front-end/ResourceUtils.js:
2963         (WebInspector.ParsedURL):
2964         * inspector/front-end/ScriptsPanel.js:
2965         * inspector/front-end/StylesPanel.js:
2966         (WebInspector.StylesPanel):
2967         (WebInspector.StylesPanel.prototype._showOpenStylesheetDialog):
2968         (WebInspector.OpenStylesheetDialog):
2969         (WebInspector.OpenStylesheetDialog.prototype.selectItem):
2970         * inspector/front-end/inspector.html:
2971
2972 2012-04-23  Kent Tamura  <tkent@chromium.org>
2973
2974         Add test function to get placeholder string
2975         https://bugs.webkit.org/show_bug.cgi?id=84536
2976
2977         Reviewed by Ryosuke Niwa.
2978
2979         Add window.internals.visiblePlaceholder(element), which returns a
2980         placeholder string only when it's visible.
2981
2982         * WebCore.exp.in: Expose HTMLTextFormControlElement::placeholderShouldBeVisible().
2983         * testing/Internals.cpp:
2984         (WebCore::Internals::visiblePlaceholder): Added.
2985         (WebCore::Internals::selectColorInColorChooser): Omit HTMLNames::.
2986         * testing/Internals.h:
2987         (Internals): Add visiblePlaceholder().
2988         * testing/Internals.idl: ditto.
2989
2990 2012-04-23  Szilard Ledan  <szledan@inf.u-szeged.hu>
2991
2992         Incorrect handling of CSS escape sequences that encode surrogates
2993         https://bugs.webkit.org/show_bug.cgi?id=76152
2994
2995         Reviewed by Kent Tamura.
2996
2997         Test: fast/css/parsing-css-surrogate-pairs.html
2998
2999         * css/CSSParser.cpp:
3000         (WebCore::CSSParser::parseEscape):
3001
3002 2012-04-22  Yury Semikhatsky  <yurys@chromium.org>
3003
3004         Web Inspector: make populateChildren methods private in heap profiler front-end
3005         https://bugs.webkit.org/show_bug.cgi?id=84562
3006
3007         - populateChildren method on HeapSnapshotConstructorsDataGrid and
3008         HeapSnapshotDiffDataGrid now is private.
3009         - Made _defaultPopulateCount a public method on HeapSnapshotSortableDataGrid which
3010         is overriden in some descendants
3011         - Removed unused HeapSnapshotPathFinderProxy
3012         - added closure compiler annotations
3013
3014         Reviewed by Pavel Feldman.
3015
3016         * inspector/front-end/HeapSnapshotDataGrids.js:
3017         (WebInspector.HeapSnapshotSortableDataGrid.prototype.defaultPopulateCount):
3018         (WebInspector.HeapSnapshotConstructorsDataGrid.prototype.setDataSource):
3019         (WebInspector.HeapSnapshotConstructorsDataGrid.prototype._filterSelectIndexChanged):
3020         (WebInspector.HeapSnapshotDiffDataGrid.prototype.defaultPopulateCount):
3021         (WebInspector.HeapSnapshotDiffDataGrid.prototype.setBaseDataSource):
3022         (WebInspector.HeapSnapshotDominatorsDataGrid.prototype.defaultPopulateCount):
3023         * inspector/front-end/HeapSnapshotGridNodes.js:
3024         (WebInspector.HeapSnapshotGridNode):
3025         (WebInspector.HeapSnapshotGridNode.prototype.populateChildren.callSerialize):
3026         (WebInspector.HeapSnapshotDiffNode):
3027         (WebInspector.HeapSnapshotDiffNode.prototype.populateChildren.firstProviderPopulated):
3028         * inspector/front-end/HeapSnapshotProxy.js:
3029
3030 2012-04-22  Andreas Kling  <kling@webkit.org>
3031
3032         Unreviewed build fix, remove Attribute.cpp from DOMAllInOne.cpp.
3033
3034         * dom/DOMAllInOne.cpp: My nemesis.
3035
3036 2012-04-22  Andreas Kling  <kling@webkit.org>
3037
3038         Optimize Element attribute storage for the common case (no Attr objects.)
3039         <http://webkit.org/b/83440>
3040
3041         Reviewed by Antti Koivisto.
3042
3043         Reduce Attribute to its smallest possible size; a qname/value pair.
3044         They are no-longer ref-counted, which allows us to store them in Vectors.
3045
3046         Refactored the DOM Attr object to go with the new Attribute:
3047         Attr now wraps either {element, qname} or {qname, value}. The latter is for
3048         the case where a standalone Attr object is instantiated via DOM APIs.
3049
3050         ElementAttributeData.cpp manages a map of pair<element, qname> => Attr.
3051         Each Element (well, ElementAttributeData) keeps track of how many Attr
3052         objects are pointing to it. This is so we can avoid hash lookups during
3053         common operations in the typical case where you have zero Attrs.
3054
3055         Also removed the inline capacity (was 4) from AttributeVector as that
3056         would significantly increase bloat now that we store Attribute (2 pointers)
3057         rather than RefPtr<Attribute>. We trade this one piece of indirection
3058         for the removal of per-Attribute indirection.
3059
3060         * CMakeLists.txt:
3061         * GNUmakefile.list.am:
3062         * Target.pri:
3063         * WebCore.gypi:
3064         * WebCore.vcproj/WebCore.vcproj:
3065         * WebCore.xcodeproj/project.pbxproj:
3066         * dom/Attr.cpp:
3067         (WebCore::Attr::Attr):
3068         (WebCore):
3069         (WebCore::Attr::create):
3070         (WebCore::Attr::~Attr):
3071         (WebCore::Attr::createTextChild):
3072         (WebCore::Attr::setPrefix):
3073         (WebCore::Attr::setValue):
3074         (WebCore::Attr::cloneNode):
3075         (WebCore::Attr::childrenChanged):
3076         (WebCore::Attr::style):
3077         (WebCore::Attr::value):
3078         (WebCore::Attr::elementAttribute):
3079         (WebCore::Attr::detachFromElementWithValue):
3080         (WebCore::Attr::attachToElement):
3081         * dom/Attr.h:
3082         (WebCore):
3083         (Attr):
3084         (WebCore::Attr::qualifiedName):
3085         (WebCore::Attr::localName):
3086         (WebCore::Attr::namespaceURI):
3087         (WebCore::Attr::prefix):
3088         * dom/Attribute.cpp: Removed.
3089         * dom/Attribute.h:
3090         (WebCore::Attribute::Attribute):
3091         (Attribute):
3092         * dom/Document.cpp:
3093         (WebCore::Document::importNode):
3094         (WebCore::Document::createAttributeNS):
3095         * dom/Element.cpp:
3096         (WebCore::Element::~Element):
3097         (WebCore::Element::detachAttribute):
3098         (WebCore):
3099         (WebCore::Element::removeAttribute):
3100         (WebCore::Element::setAttributeInternal):
3101         (WebCore::Element::parserSetAttributes):
3102         (WebCore::Element::setAttributeNode):
3103         (WebCore::Element::removeAttributeNode):
3104         (WebCore::Element::normalizeAttributes):
3105         (WebCore::Element::didRemoveAttribute):
3106         (WebCore::Element::attrIfExists):
3107         (WebCore::Element::ensureAttr):
3108         * dom/Element.h:
3109         (Element):
3110         (WebCore::Element::getAttributeItemIndex):
3111         * dom/ElementAttributeData.cpp:
3112         (WebCore):
3113         (WebCore::attrMap):
3114         (WebCore::ElementAttributeData::attrIfExists):
3115         (WebCore::ElementAttributeData::ensureAttr):
3116         (WebCore::ElementAttributeData::setAttr):
3117         (WebCore::ElementAttributeData::removeAttr):
3118         (WebCore::AttributeVector::removeAttribute):
3119         (WebCore::ElementAttributeData::~ElementAttributeData):
3120         (WebCore::ElementAttributeData::addAttribute):
3121         (WebCore::ElementAttributeData::removeAttribute):
3122         (WebCore::ElementAttributeData::isEquivalent):
3123         (WebCore::ElementAttributeData::detachAttributesFromElement):
3124         (WebCore::ElementAttributeData::getAttributeItemIndexSlowCase):
3125         (WebCore::ElementAttributeData::setAttributes):
3126         (WebCore::ElementAttributeData::clearAttributes):
3127         (WebCore::ElementAttributeData::replaceAttribute):
3128         (WebCore::ElementAttributeData::getAttributeNode):
3129         * dom/ElementAttributeData.h:
3130         (WebCore):
3131         (WebCore::AttributeVector::AttributeVector):
3132         (AttributeVector):
3133         (WebCore::AttributeVector::getAttributeItem):
3134         (WebCore::AttributeVector::getAttributeItemIndex):
3135         (WebCore::AttributeVector::insertAttribute):
3136         (WebCore::ElementAttributeData::attributeItem):
3137         (ElementAttributeData):
3138         (WebCore::ElementAttributeData::ElementAttributeData):
3139         (WebCore::ElementAttributeData::attributeVector):
3140         (WebCore::ElementAttributeData::clonedAttributeVector):
3141         (WebCore::ElementAttributeData::removeAttribute):
3142         (WebCore::ElementAttributeData::getAttributeItem):
3143         (WebCore::ElementAttributeData::getAttributeItemIndex):
3144         * dom/NamedNodeMap.cpp:
3145         (WebCore::NamedNodeMap::getNamedItem):
3146         (WebCore::NamedNodeMap::getNamedItemNS):
3147         (WebCore::NamedNodeMap::removeNamedItem):
3148         (WebCore::NamedNodeMap::removeNamedItemNS):
3149         (WebCore::NamedNodeMap::item):
3150         * dom/Node.cpp:
3151         (WebCore::Node::compareDocumentPosition):
3152         * html/HTMLAnchorElement.cpp:
3153         (WebCore::HTMLAnchorElement::parseAttribute):
3154         * html/HTMLSelectElement.cpp:
3155         (WebCore::HTMLSelectElement::parseAttribute):
3156         * html/parser/HTMLConstructionSite.cpp:
3157         (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
3158         (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
3159         (WebCore::HTMLConstructionSite::insertScriptElement):
3160         (WebCore::HTMLConstructionSite::createElement):
3161         (WebCore::HTMLConstructionSite::createHTMLElement):
3162         (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
3163         * html/parser/HTMLToken.h:
3164         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
3165         * html/parser/HTMLTreeBuilder.cpp:
3166         (WebCore::HTMLTreeBuilder::processFakeStartTag):
3167         (WebCore::HTMLTreeBuilder::attributesForIsindexInput):
3168         (WebCore::HTMLTreeBuilder::processIsindexStartTagForInBody):
3169         (WebCore):
3170         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
3171         * html/parser/HTMLTreeBuilder.h:
3172         * html/parser/TextDocumentParser.cpp:
3173         (WebCore::TextDocumentParser::insertFakePreElement):
3174         * page/PageSerializer.cpp:
3175         (WebCore::SerializerMarkupAccumulator::appendCustomAttributes):
3176         * svg/SVGFitToViewBox.cpp:
3177         * svg/properties/SVGAnimatedPropertySynchronizer.h:
3178         * xml/XMLErrors.cpp:
3179         (WebCore::createXHTMLParserErrorHeader):
3180         (WebCore::XMLErrors::insertErrorMessageBlock):
3181         * xml/XPathNodeSet.cpp:
3182         (WebCore::XPath::NodeSet::traversalSort):
3183         * xml/XPathStep.cpp:
3184         (WebCore::XPath::Step::nodesInAxis):
3185         * xml/parser/MarkupTokenBase.h:
3186         (WebCore::AtomicMarkupTokenBase::AtomicMarkupTokenBase):
3187         (WebCore::AtomicMarkupTokenBase::getAttributeItem):
3188         (WebCore::AtomicMarkupTokenBase::attributes):
3189         (AtomicMarkupTokenBase):
3190         (WebCore::::initializeAttributes):
3191         * xml/parser/XMLToken.h:
3192         (WebCore::AtomicXMLToken::AtomicXMLToken):
3193         * xml/parser/XMLTreeBuilder.cpp:
3194         (WebCore::XMLTreeBuilder::processNamespaces):
3195         (WebCore::XMLTreeBuilder::processAttributes):
3196
3197 2012-04-22  Sriram Neelakandan  <sriram.neelakandan@gmail.com>
3198
3199         Sync the MOZ_X11 changes from r14 of http://code.google.com/p/npapi-sdk/
3200         also, modified required build flags for Qt,Gtk and CMake
3201         [Qt]  Added MOZ_X11 build flag for !embedded
3202         https://bugs.webkit.org/show_bug.cgi?id=40785
3203
3204         Reviewed by Anders Carlsson.
3205
3206         No new tests. This does not change functionality. Affects all X11 Ports. Build should break if MOZ_X11 is not passed where required
3207
3208         * WebCore.pri:
3209         * plugins/npapi.h:
3210
3211 2012-04-22  Pablo Flouret  <pablof@motorola.com>
3212
3213         Reset event propagation and canceled flags in Event.initEvent
3214         https://bugs.webkit.org/show_bug.cgi?id=83964
3215
3216         Reviewed by Ryosuke Niwa.
3217
3218         Step 3 in http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-event-initevent
3219         Useful for re-configuring an event before dispatching.
3220
3221         Test: fast/events/flags-unset-on-init-event.html
3222
3223         * dom/Event.cpp:
3224         (WebCore::Event::initEvent):
3225
3226 2012-04-22  Martin Robinson  <mrobinson@igalia.com>
3227
3228         [Cairo] Implement CompositeDifference
3229         https://bugs.webkit.org/show_bug.cgi?id=77354
3230
3231         Reviewed by Alejandro G. Castro.
3232
3233         No new tests. The difference compositing operator are not exposed
3234         to web content, so this change is simply in preparation for a time
3235         in which it is used.
3236
3237         Properly map the difference compositing blend modes to a Cairo operator.
3238
3239         * platform/graphics/cairo/CairoUtilities.cpp:
3240         (WebCore::toCairoOperator): Add a mapping for difference. Remove
3241         code supporting versions of Cairo before 1.10, since the Cairo backend
3242         requires 1.10 or greater already.
3243
3244 2012-04-22  Jon Lee  <jonlee@apple.com>
3245
3246         Remove notifications support on Mac Lion.
3247         https://bugs.webkit.org/show_bug.cgi?id=84554
3248         <rdar://problem/11297128>
3249
3250         Reviewed by Sam Weinig.
3251
3252         * Configurations/FeatureDefines.xcconfig:
3253
3254 2012-04-22  Shawn Singh  <shawnsingh@chromium.org>
3255
3256         [chromium] Damage Tracker needs to use CCMathUtil transforms
3257         https://bugs.webkit.org/show_bug.cgi?id=84070
3258
3259         Reviewed by Adrienne Walker.
3260
3261         Unit test added to CCDamageTracker.cpp.
3262
3263         This patch makes CCDamageTracker use CCMathUtil transforms, so
3264         that perspective w < 0 problem is correctly handled.
3265
3266         * platform/graphics/chromium/cc/CCDamageTracker.cpp:
3267         (WebCore::CCDamageTracker::extendDamageForLayer):
3268         (WebCore::CCDamageTracker::extendDamageForRenderSurface):
3269
3270 2012-04-20  Jon Lee  <jonlee@apple.com>
3271
3272         Add Notification constructor
3273         https://bugs.webkit.org/show_bug.cgi?id=80477
3274         <rdar://problem/10912431>
3275
3276         Reviewed by Jian Li.
3277
3278         Tests will be added once there is support for web notifications on the Mac ports.
3279
3280         * WebCore.exp.in: Export finalize() function.
3281
3282         Modify Dictionary to support creation of event listeners.
3283         * bindings/js/Dictionary.h:
3284         (WebCore::Dictionary::isObject): Return true if the JSDictionary is valid.
3285         (WebCore::Dictionary::isUndefinedOrNull): Return true if the JSDictionary is not valid.
3286         (WebCore::Dictionary::get): Add convenience function to take const char* for
3287         property name, to prevent having to do implicit conversion to WTF::String.
3288         (WebCore::Dictionary::getEventListener): Add function to create event listener
3289         from the dictionary.
3290         (WebCore::Dictionary::asJSObject): Helper to convert WebCore objects to JS wrapper.
3291         * bindings/js/Dictionary.cpp:
3292         (WebCore::Notification): Implement asJSObject() for Notification.
3293         * bindings/js/JSDictionary.h:
3294         (WebCore::JSDictionary::execState): Expose the exec state so that the Dictionary
3295         can obtain its world for creating the event listener.
3296
3297         * bindings/v8/Dictionary.h:
3298         (WebCore::Dictionary::getEventListener): Stub implementation.
3299
3300         Add new constructor to idl definitions.
3301         * notifications/DOMWindowNotifications.idl: Add Notification constructor, if
3302         ENABLE(NOTIFICATIONS) is on.
3303         * notifications/Notification.idl: If ENABLE(NOTIFICATIONS) is turned on, define
3304         the constructor. Otherwise, use OmitConstructor.
3305         * notifications/NotificationCenter.idl: Wrap creation functions in
3306         ENABLE(LEGACY_NOTIFICATIONS).
3307         * notifications/NotificationCenter.h: Ditto.
3308         (NotificationCenter):
3309
3310         * notifications/Notification.h:
3311         (Notification): Wrap legacy constructors in ENABLE(LEGACY_NOTIFICATIONS).
3312         (WebCore::Notification::create): New creation function based on discussions in WG.
3313         * notifications/Notification.cpp:
3314         (WebCore::getAndAddEventListener): Helper function to get the listener from the
3315         dictionary, and attach to the notification.
3316         (WebCore::Notification::create): Create the notification, then apply whatever
3317         properties can be found in the dictionary to the notification. In order to
3318         attach the event listeners, the notification has to have been created, which is
3319         why this all happens in the factory method and not in the constructor.
3320         (WebCore::Notification::setBody): Added so that it can be set if we find it in the
3321         dictionary.
3322
3323         The new constructor queues a task to show when it is created. To support this, we
3324         use a one-shot timer that calls show() in the next iteration of the run loop.
3325         (WebCore::Notification::Notification): Start the timer.
3326         (WebCore::Notification::showTaskTimerFired): Call show().
3327
3328         Notifications, not being attached to the DOM, could be GC'ed by the JS engine
3329         before its life cycle has completed. We add calls to setPendingActivity() when the
3330         notification has been shown, and when it is closed, we unsetPendingActivity().
3331         To guarantee that we only call this once, we add a new state to the Notification
3332         state machine, called NotificationState::Closed.
3333         (WebCore::Notification::show): Call setPendingActivity() for all ports. Remove conditional on Mac.
3334         (WebCore::Notification::close): Include Closed state to machine; do nothing.
3335         (WebCore::Notification::dispatchCloseEvent): Call finalize().
3336         (WebCore::Notification::finalize): If the state is not Closed, we unsetPendingActivity()
3337         to make it available for GC.
3338         (WebCore::Notification::finishLoading): Remove the unsetPendingActivity(). That call
3339         was to balance the setPendingActivity() called for loading the icon. Instead of wrapping
3340         around the icon load, we wrap around the show() -> finalize() loop.
3341
3342         In Notification, rename some of the stages and functions to more clearly communicate
3343         that they mostly deal with the icon of the notification, instead of general loading.
3344         (WebCore::Notification::show): Refactored to use LoadingIcon and CancelledIcon.
3345         (WebCore::Notification::close): Refactored to use LoadingIcon and CancelledIcon.
3346         (WebCore::Notification::~Notification): Refactor to use LoadingIcon.
3347         (WebCore::Notification::startLoadingIcon): Renamed from startLoading().
3348         (WebCore::Notification::stopLoadingIcon): Renamed from stopLoading().
3349         (WebCore::Notification::finishLoadingIcon): Renamed from finishLoading().
3350         (WebCore::Notification::didFinishLoading):
3351         (WebCore::Notification::didFail):
3352         (WebCore::Notification::didFailRedirectCheck):
3353         (WebCore::Notification::didReceiveResponse):
3354         (WebCore::Notification::finishLoading):
3355
3356         Add Dictionary.cpp.
3357         * GNUmakefile.list.am:
3358         * Target.pri:
3359         * UseJSC.cmake:
3360         * WebCore.gypi:
3361
3362         Fix bug in V8 bindings generation code. If the constructor doesn't raise an exception,
3363         don't use an exception code.
3364         * bindings/scripts/CodeGeneratorV8.pm:
3365         (GenerateParametersCheck):
3366         * bindings/scripts/test/V8/V8TestObj.cpp: Reset results.
3367         (WebCore::TestObjV8Internal::optionsObjectCallback):
3368
3369 2012-04-21  Benjamin C Meyer  <bmeyer@rim.com>
3370
3371         Support loading the same plugin in multiple locations in the Blackberry port.
3372         https://bugs.webkit.org/show_bug.cgi?id=84537
3373
3374         The hash for the plugin is only based upon the plugin meta information
3375         which will be the same for the same plugin in the system and user's
3376         plugin folders.
3377
3378         It looks like this code was copied/based on the windows port
3379         which doesn't allow the same plugin to be loaded more than once.
3380
3381         Because we want to support multiple copies of the same plugin
3382         in the blackberry port we want to incorperate the path of the plugin
3383         into the hash.
3384
3385         PR 150404
3386
3387         Reviewed by Adam Treat.
3388
3389         * plugins/blackberry/PluginPackageBlackBerry.cpp:
3390         (WebCore::PluginPackage::hash):
3391
3392 2012-04-21  Benjamin C Meyer  <bmeyer@rim.com>
3393
3394         System plugins are preferred over application plugins
3395         https://bugs.webkit.org/show_bug.cgi?id=84538
3396
3397         Set the preferred paths for plugins so that plugins that reside
3398         inside of the bar will be preferred over plugins that are in the
3399         system folder.
3400
3401         PR 150404
3402
3403         Reviewed by Adam Treat.
3404
3405         * plugins/PluginDatabase.cpp:
3406         (WebCore::PluginDatabase::isPreferredPluginDirectory):
3407
3408 2012-04-21  Darin Adler  <darin@apple.com>
3409
3410         Improve performance of removing user and password from URLs
3411         https://bugs.webkit.org/show_bug.cgi?id=84525
3412
3413         Reviewed by Dan Bernstein.
3414
3415         Performance improvement only. Correctness covered by existing regression tests.
3416
3417         The most common use of KURL::setUser and KURL::setPass, by far, is to remove
3418         the user and password from a URL that already has neither. Optimize this by
3419         not re-parsing the URL in that case.
3420
3421         * platform/KURL.cpp:
3422         (WebCore::KURL::setUser): Restructure code so that the code path that removes
3423         the user does no work when there is nothing to remove. Otherwise, leave the
3424         logic of the function untouched.
3425         (WebCore::KURL::setPass): Same thing, only for password rather than user.
3426
3427 2012-04-20  Sheriff Bot  <webkit.review.bot@gmail.com>
3428
3429         Unreviewed, rolling out r114768.
3430         http://trac.webkit.org/changeset/114768
3431         https://bugs.webkit.org/show_bug.cgi?id=84521
3432
3433         Original patch was not the problem, re-applying (Requested by
3434         pfeldman_ on #webkit).
3435
3436         * bindings/v8/V8IsolatedContext.cpp:
3437         (WebCore::setInjectedScriptContextDebugId):
3438         (WebCore):
3439         (WebCore::V8IsolatedContext::V8IsolatedContext):
3440         * bindings/v8/V8Proxy.cpp:
3441         (WebCore::V8Proxy::evaluateInIsolatedWorld):
3442         * bindings/v8/V8Proxy.h:
3443         (V8Proxy):
3444
3445 2012-04-20  Adrienne Walker  <enne@google.com>
3446
3447         [chromium] Refactor opaque content transform out of Skia context
3448         https://bugs.webkit.org/show_bug.cgi?id=83608
3449
3450         Reviewed by James Robinson.
3451
3452         Having PlatformContextSkia know about the transform into content space
3453         for a layer is a layering violation. This change lets the
3454         PlatformContextSkia deal with opaque rects in its own space and lets
3455         the caller handle transforming it into its own space. This also
3456         prevents a matrix multiply per draw into the Skia canvas and does it