Passing alpha to DeferredImageDecoder once decoding completes
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-02-14  Min Qin  <qinmin@chromium.org>
2
3         Passing alpha to DeferredImageDecoder once decoding completes
4         https://bugs.webkit.org/show_bug.cgi?id=108892
5
6         Reviewed by Stephen White.
7
8         We should pass hasAlpha value back to the DeferredImageDecoder once decoding is completed
9         Added unit tests in ImageFrameGeneratorTest.
10
11         * platform/graphics/chromium/DeferredImageDecoder.cpp:
12         (WebCore::DeferredImageDecoder::frameHasAlphaAtIndex):
13         * platform/graphics/chromium/ImageFrameGenerator.cpp:
14         (WebCore::ImageFrameGenerator::tryToScale):
15         (WebCore::ImageFrameGenerator::decode):
16         * platform/graphics/chromium/LazyDecodingPixelRef.cpp:
17         (WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef):
18         (WebCore::LazyDecodingPixelRef::onUnlockPixels):
19         * platform/graphics/chromium/LazyDecodingPixelRef.h:
20         (WebCore::LazyDecodingPixelRef::hasAlpha):
21         (LazyDecodingPixelRef):
22         * platform/graphics/chromium/ScaledImageFragment.cpp:
23         (WebCore::ScaledImageFragment::ScaledImageFragment):
24         * platform/graphics/chromium/ScaledImageFragment.h:
25         (WebCore::ScaledImageFragment::create):
26         (ScaledImageFragment):
27         (WebCore::ScaledImageFragment::hasAlpha):
28
29 2013-02-14  David Grogan  <dgrogan@chromium.org>
30
31         IndexedDB: Add a few more histogram calls
32         https://bugs.webkit.org/show_bug.cgi?id=109762
33
34         Reviewed by Tony Chang.
35
36         A few places where commits could fail weren't being logged.
37
38         * Modules/indexeddb/IDBBackingStore.cpp:
39         (WebCore::IDBBackingStore::deleteDatabase):
40         (WebCore::IDBBackingStore::Transaction::commit):
41
42 2013-02-14  Tony Chang  <tony@chromium.org>
43
44         Padding and border changes doesn't trigger relayout of children
45         https://bugs.webkit.org/show_bug.cgi?id=109639
46
47         Reviewed by Kent Tamura.
48
49         In RenderBlock::layoutBlock, we only relayout our children if our logical width
50         changes. This misses cases where our logical width doesn't change (i.e., padding
51         or border changes), but our content width does change.
52
53         This is a more general case of bug 104997.
54
55         Test: fast/block/dynamic-padding-border.html
56
57         * rendering/RenderBox.cpp:
58         (WebCore::borderOrPaddingLogicalWidthChanged): Only check if the logical width changed.
59         (WebCore::RenderBox::styleDidChange): Drop the border-box condition since this can happen
60         even without border-box box sizing.
61
62 2013-02-14  Peter Rybin  <prybin@chromium.org>
63
64         Web Inspector: fix closure compilation warnings caused by setVariableValue change
65         https://bugs.webkit.org/show_bug.cgi?id=109488
66
67         Reviewed by Pavel Feldman.
68
69         Annotations are fixed as required by closure compiler.
70         Parameters in Inspector.json are reordered as required.
71
72         * inspector/InjectedScriptExterns.js:
73         (InjectedScriptHost.prototype.setFunctionVariableValue):
74         (JavaScriptCallFrame.prototype.setVariableValue):
75         * inspector/InjectedScriptSource.js:
76         (.):
77         * inspector/Inspector.json:
78         * inspector/InspectorDebuggerAgent.cpp:
79         (WebCore::InspectorDebuggerAgent::setVariableValue):
80         * inspector/InspectorDebuggerAgent.h:
81         (InspectorDebuggerAgent):
82
83 2013-02-14  Tommy Widenflycht  <tommyw@google.com>
84
85         MediaStream API: RTCDataChannel triggers a use-after-free
86         https://bugs.webkit.org/show_bug.cgi?id=109806
87
88         Reviewed by Adam Barth.
89
90         Making sure RTCPeerConnection::stop() is always called at least once.
91         Also making sure that RTCDataChannels state gets set to Closed correctly.
92
93         Hard to test in WebKit but covered by Chromium tests.
94
95         * Modules/mediastream/RTCDataChannel.cpp:
96         (WebCore::RTCDataChannel::stop):
97         * Modules/mediastream/RTCPeerConnection.cpp:
98         (WebCore::RTCPeerConnection::~RTCPeerConnection):
99         (WebCore::RTCPeerConnection::stop):
100
101 2013-02-14  Vsevolod Vlasov  <vsevik@chromium.org>
102
103         Web Inspector: [Regression] When several consecutive characters are typed each of them is marked as undoable state.
104         https://bugs.webkit.org/show_bug.cgi?id=109823
105
106         Reviewed by Pavel Feldman.
107
108         * inspector/front-end/TextEditorModel.js:
109         (WebInspector.TextEditorModel.endsWithBracketRegex.):
110
111 2013-02-14  Sheriff Bot  <webkit.review.bot@gmail.com>
112
113         Unreviewed, rolling out r142820.
114         http://trac.webkit.org/changeset/142820
115         https://bugs.webkit.org/show_bug.cgi?id=109839
116
117         Causing crashes on chromium canaries (Requested by atwilson_
118         on #webkit).
119
120         * dom/Document.cpp:
121         (WebCore::Document::updateLayout):
122         (WebCore::Document::implicitClose):
123         * rendering/RenderQuote.h:
124         (RenderQuote):
125         * rendering/RenderView.cpp:
126         * rendering/RenderView.h:
127
128 2013-02-14  Mario Sanchez Prada  <mario.prada@samsung.com>
129
130         [GTK] Missing call to g_object_ref while retrieving accessible table cells
131         https://bugs.webkit.org/show_bug.cgi?id=106903
132
133         Reviewed by Martin Robinson.
134
135         Add missing extra ref to implementation of atk_table_ref_at().
136
137         Test: accessibility/table-cell-for-column-and-row-crash.html
138
139         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
140         (webkitAccessibleTableRefAt): This method transfers full ownership
141         over the returned AtkObject, so an extra reference is needed here.
142
143 2013-02-14  Mike Fenton  <mifenton@rim.com>
144
145         [BlackBerry] Update keyboard event details to match platform details.
146         https://bugs.webkit.org/show_bug.cgi?id=109693
147
148         Reviewed by Yong Li.
149
150         PR 220170.
151
152         Update the keyboard event details to match the
153         platform details available.
154
155         Rename helper function to better describe the conversion.
156
157         Reviewed Internally by Nima Ghanavatian and Gen Mak.
158
159         * platform/blackberry/PlatformKeyboardEventBlackBerry.cpp:
160         (WebCore::windowsKeyCodeForBlackBerryKeycode):
161         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
162
163 2013-02-08  Andrey Kosyakov  <caseq@chromium.org>
164
165         Web Inspector: expose did{Begin,Cancel}Frame() and {will,did}Composite() on WebDebToolsAgent
166         https://bugs.webkit.org/show_bug.cgi?id=109192
167
168         Reviewed by Pavel Feldman.
169
170         - remove frame and compositing instrumentation methods from InspectorInstrumentation;
171         - expose those methods on InspectorController instead.
172
173         * WebCore.exp.in:
174         * inspector/InspectorController.cpp:
175         (WebCore::InspectorController::didBeginFrame):
176         (WebCore):
177         (WebCore::InspectorController::didCancelFrame):
178         (WebCore::InspectorController::willComposite):
179         (WebCore::InspectorController::didComposite):
180         * inspector/InspectorController.h:
181         (InspectorController):
182         * inspector/InspectorInstrumentation.cpp:
183         (WebCore):
184         * inspector/InspectorInstrumentation.h:
185         (InspectorInstrumentation):
186         * testing/Internals.cpp:
187         (WebCore::Internals::emitInspectorDidBeginFrame):
188         (WebCore::Internals::emitInspectorDidCancelFrame):
189
190 2013-02-14  Vladislav Kaznacheev  <kaznacheev@chromium.org>
191
192         Web Inspector: Fixed a layout regression in CanvasProfileView.
193         https://bugs.webkit.org/show_bug.cgi?id=109835
194
195         Reviewed by Pavel Feldman.
196
197         Changed splitView.css to supported nested SplitView instances.
198
199         * inspector/front-end/splitView.css:
200         (.split-view-vertical > .split-view-contents):
201         (.split-view-vertical > .split-view-contents-first):
202         (.split-view-vertical > .split-view-contents-first.maximized):
203         (.split-view-vertical > .split-view-contents-second):
204         (.split-view-vertical > .split-view-contents-second.maximized):
205         (.split-view-horizontal > .split-view-contents):
206         (.split-view-horizontal > .split-view-contents-first):
207         (.split-view-horizontal > .split-view-contents-first.maximized):
208         (.split-view-horizontal > .split-view-contents-second):
209         (.split-view-horizontal > .split-view-contents-second.maximized):
210         (.split-view-vertical > .split-view-sidebar.split-view-contents-first:not(.maximized)):
211         (.split-view-vertical > .split-view-sidebar.split-view-contents-second:not(.maximized)):
212         (.split-view-horizontal > .split-view-sidebar.split-view-contents-first:not(.maximized)):
213         (.split-view-horizontal > .split-view-sidebar.split-view-contents-second:not(.maximized)):
214         (.split-view-vertical > .split-view-resizer):
215         (.split-view-horizontal > .split-view-resizer):
216
217 2013-02-14  Vladislav Kaznacheev  <kaznacheev@chromium.org>
218
219         Web Inspector: Color picker should not be available in Computed Styles pane.
220         https://bugs.webkit.org/show_bug.cgi?id=109697
221
222         Reviewed by Alexander Pavlov.
223
224         Changed the parentPane parameter of WebInspector.ComputedStylePropertiesSection to the correct value
225         (the ComputedStyleSidebarPane instance).
226
227         * inspector/front-end/StylesSidebarPane.js:
228         (WebInspector.StylesSidebarPane.prototype._rebuildSectionsForStyleRules):
229
230 2013-02-14  Yury Semikhatsky  <yurys@chromium.org>
231
232         Web Inspector: don't create static local string for program literal in InspectorTimelineAgent
233         https://bugs.webkit.org/show_bug.cgi?id=109811
234
235         Reviewed by Pavel Feldman.
236
237         Use const char* constant value instead of creating String from it in thread-unsafe
238         static local variable.
239
240         * inspector/InspectorTimelineAgent.cpp:
241         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
242
243 2013-02-14  Pan Deng  <pan.deng@intel.com>
244
245         [Web Inspector] Fix initiator name issue in reload scenario for Network Panel.
246         https://bugs.webkit.org/show_bug.cgi?id=108746.
247
248         Reviewed by Vsevolod Vlasov.
249
250         WebInspector.displayNameForURL() does not work as expected in the reload scenario,
251         for example, "http://www.yahoo.com/" was trimed to "/" at one time, but at another,
252         the full host name will be displayed.
253         This fix return host + "/" in the issue scenario, and keep with get displayName() in ParsedURL.
254
255         No new tests.
256
257         * inspector/front-end/ParsedURL.js:
258         (WebInspector.ParsedURL.prototype.get displayName): append "/" in the display host scenario.
259         * inspector/front-end/ResourceUtils.js:
260         (WebInspector.displayNameForURL): add host in the head if url trimed as a "/".
261
262 2013-02-14  Alexei Filippov  <alph@chromium.org>
263
264         Web Inspector: fix to record button remaining red after heap snapshot is taken
265         https://bugs.webkit.org/show_bug.cgi?id=109804
266
267         Reviewed by Yury Semikhatsky.
268
269         Revert part of r142243 fix. Namely heap snapshot taking button made
270         stateless as it was before.
271
272         * inspector/front-end/HeapSnapshotView.js:
273         (WebInspector.HeapSnapshotProfileType.prototype.buttonClicked):
274         * inspector/front-end/ProfilesPanel.js:
275         (WebInspector.ProfilesPanel.prototype.toggleRecordButton):
276
277 2013-02-14  Alexander Pavlov  <apavlov@chromium.org>
278
279         Web Inspector: Consistently use SecurityOrigin::toRawString() for serialization across the backend code
280         https://bugs.webkit.org/show_bug.cgi?id=109801
281
282         Reviewed by Yury Semikhatsky.
283
284         No new tests, as existing tests cover the change.
285
286         * inspector/InspectorAgent.cpp:
287         (WebCore::InspectorAgent::didClearWindowObjectInWorld):
288         * inspector/InspectorIndexedDBAgent.cpp:
289         (WebCore::InspectorIndexedDBAgent::requestDatabaseNamesForFrame):
290         * inspector/InspectorPageAgent.cpp:
291         (WebCore::InspectorPageAgent::buildObjectForFrame):
292         * inspector/PageRuntimeAgent.cpp:
293         (WebCore::PageRuntimeAgent::notifyContextCreated):
294
295 2013-02-14  Sergio Villar Senin  <svillar@igalia.com>
296
297         Add logging support to IndexedDB for non-Chromium platforms
298         https://bugs.webkit.org/show_bug.cgi?id=109809
299
300         Reviewed by Kentaro Hara.
301
302         Enable logging of IndexedDB through the StorageAPI log channel for
303         non-Chromium architectures.
304
305         No new tests required, we're just enabling logging for IndexedDB
306         using the currently available logging framework.
307
308         * Modules/indexeddb/IDBTracing.h:
309
310 2013-02-14  Vsevolod Vlasov  <vsevik@chromium.org>
311
312         Web Inspector: Remove uriForFile and fileForURI methods from FileSystemMapping.
313         https://bugs.webkit.org/show_bug.cgi?id=109704
314
315         Reviewed by Alexander Pavlov.
316
317         Replaced this methods with one line implementation on the only call site.
318
319         * inspector/front-end/FileSystemMapping.js:
320         * inspector/front-end/FileSystemProjectDelegate.js:
321         (WebInspector.FileSystemProjectDelegate.prototype._filePathForURI):
322         (WebInspector.FileSystemProjectDelegate.prototype.setFileContent):
323         (WebInspector.FileSystemProjectDelegate.prototype._populate.filesLoaded):
324         (WebInspector.FileSystemProjectDelegate.prototype._populate):
325
326 2013-02-14  Anton Vayvod  <avayvod@chromium.org>
327
328         [Text Autosizing] Process narrow descendants with the same multiplier for the font size.
329         https://bugs.webkit.org/show_bug.cgi?id=109573
330
331         Reviewed by Julien Chaffraix.
332
333         Combine narrow descendants of the same autosizing cluster into a group that is autosized
334         with the same multiplier.
335
336         For example, on sites with a sidebar, sometimes the paragraphs next to the sidebar will have
337         a large margin individually applied (via a CSS selector), causing them all to individually
338         appear narrower than their enclosing blockContainingAllText. Rather than making each of
339         these paragraphs into a separate cluster, we want them all to share the same multiplier, as
340         if they were a single cluster.
341
342         Test: fast/text-autosizing/narrow-descendants-combined.html
343
344         * rendering/TextAutosizer.cpp:
345         (WebCore::TextAutosizer::processClusterInternal):
346
347             Common implementation for processCluster() and processCompositeCluster that accepts the
348             text width and whether the cluster should be autosized as parameters instead of
349             calculating it inline.
350
351         (WebCore::TextAutosizer::processCluster):
352
353             Calculates the text width for a single cluster and whether it should be autosized, then
354             calls processClusterInternal() to apply the multiplier and process the cluster's
355             descendants.
356
357         (WebCore::TextAutosizer::processCompositeCluster):
358
359             Calculates the text width for a group of renderers and if the group should be autosized,
360             then calls processClusterInternal() repeatedly with the same multiplier to apply it and
361             process all the descendants of the group.
362
363         (WebCore::TextAutosizer::clusterShouldBeAutosized):
364
365             Calls the multiple renderers version to avoid code duplication.
366
367         (WebCore::TextAutosizer::compositeClusterShouldBeAutosized):
368
369             The multiple renderers version of clusterShouldBeAutosized.
370
371         * rendering/TextAutosizer.h:
372
373             Updated method declarations.
374
375 2013-02-14  Andrey Adaikin  <aandrey@chromium.org>
376
377         Look into possibilities of typedef in webkit idl files
378         https://bugs.webkit.org/show_bug.cgi?id=52340
379
380         Reviewed by Kentaro Hara.
381
382         Add typedef support for WebKit IDL parser.
383         Drive by: fixed a bug of generating "unrestrictedfloat" without a space.
384
385         Added a new IDL test TestTypedefs.idl. The results were generated without typedefs.
386
387         * bindings/scripts/IDLParser.pm:
388         (assertNoExtendedAttributesInTypedef):
389         (parseDefinitions):
390         (applyTypedefs):
391         (applyTypedefsForSignature):
392         (parseTypedef):
393         (parseUnrestrictedFloatType):
394         * bindings/scripts/test/CPP/WebDOMTestTypedefs.cpp: Added.
395         (WebDOMTestTypedefs::WebDOMTestTypedefsPrivate::WebDOMTestTypedefsPrivate):
396         (WebDOMTestTypedefs::WebDOMTestTypedefsPrivate):
397         (WebDOMTestTypedefs::WebDOMTestTypedefs):
398         (WebDOMTestTypedefs::operator=):
399         (WebDOMTestTypedefs::impl):
400         (WebDOMTestTypedefs::~WebDOMTestTypedefs):
401         (WebDOMTestTypedefs::unsignedLongLongAttr):
402         (WebDOMTestTypedefs::setUnsignedLongLongAttr):
403         (WebDOMTestTypedefs::immutableSerializedScriptValue):
404         (WebDOMTestTypedefs::setImmutableSerializedScriptValue):
405         (WebDOMTestTypedefs::func):
406         (WebDOMTestTypedefs::multiTransferList):
407         (WebDOMTestTypedefs::setShadow):
408         (WebDOMTestTypedefs::nullableArrayArg):
409         (WebDOMTestTypedefs::immutablePointFunction):
410         (toWebCore):
411         (toWebKit):
412         * bindings/scripts/test/CPP/WebDOMTestTypedefs.h: Added.
413         (WebCore):
414         (WebDOMTestTypedefs):
415         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp: Added.
416         (_WebKitDOMTestTypedefsPrivate):
417         (WebKit):
418         (WebKit::kit):
419         (WebKit::core):
420         (WebKit::wrapTestTypedefs):
421         (webkit_dom_test_typedefs_finalize):
422         (webkit_dom_test_typedefs_set_property):
423         (webkit_dom_test_typedefs_get_property):
424         (webkit_dom_test_typedefs_constructor):
425         (webkit_dom_test_typedefs_class_init):
426         (webkit_dom_test_typedefs_init):
427         (webkit_dom_test_typedefs_func):
428         (webkit_dom_test_typedefs_multi_transfer_list):
429         (webkit_dom_test_typedefs_set_shadow):
430         (webkit_dom_test_typedefs_nullable_array_arg):
431         (webkit_dom_test_typedefs_immutable_point_function):
432         (webkit_dom_test_typedefs_string_array_function):
433         (webkit_dom_test_typedefs_get_unsigned_long_long_attr):
434         (webkit_dom_test_typedefs_set_unsigned_long_long_attr):
435         (webkit_dom_test_typedefs_get_immutable_serialized_script_value):
436         (webkit_dom_test_typedefs_set_immutable_serialized_script_value):
437         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h: Added.
438         (_WebKitDOMTestTypedefs):
439         (_WebKitDOMTestTypedefsClass):
440         * bindings/scripts/test/GObject/WebKitDOMTestTypedefsPrivate.h: Added.
441         (WebKit):
442         * bindings/scripts/test/JS/JSTestTypedefs.cpp: Added.
443         (WebCore):
444         (WebCore::JSTestTypedefsConstructor::constructJSTestTypedefs):
445         (WebCore::JSTestTypedefsConstructor::JSTestTypedefsConstructor):
446         (WebCore::JSTestTypedefsConstructor::finishCreation):
447         (WebCore::JSTestTypedefsConstructor::getOwnPropertySlot):
448         (WebCore::JSTestTypedefsConstructor::getOwnPropertyDescriptor):
449         (WebCore::JSTestTypedefsConstructor::getConstructData):
450         (WebCore::JSTestTypedefsPrototype::self):
451         (WebCore::JSTestTypedefsPrototype::getOwnPropertySlot):
452         (WebCore::JSTestTypedefsPrototype::getOwnPropertyDescriptor):
453         (WebCore::JSTestTypedefs::JSTestTypedefs):
454         (WebCore::JSTestTypedefs::finishCreation):
455         (WebCore::JSTestTypedefs::createPrototype):
456         (WebCore::JSTestTypedefs::destroy):
457         (WebCore::JSTestTypedefs::~JSTestTypedefs):
458         (WebCore::JSTestTypedefs::getOwnPropertySlot):
459         (WebCore::JSTestTypedefs::getOwnPropertyDescriptor):
460         (WebCore::jsTestTypedefsUnsignedLongLongAttr):
461         (WebCore::jsTestTypedefsImmutableSerializedScriptValue):
462         (WebCore::jsTestTypedefsConstructorTestSubObj):
463         (WebCore::jsTestTypedefsConstructor):
464         (WebCore::JSTestTypedefs::put):
465         (WebCore::setJSTestTypedefsUnsignedLongLongAttr):
466         (WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
467         (WebCore::JSTestTypedefs::getConstructor):
468         (WebCore::jsTestTypedefsPrototypeFunctionFunc):
469         (WebCore::jsTestTypedefsPrototypeFunctionMultiTransferList):
470         (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
471         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
472         (WebCore::jsTestTypedefsPrototypeFunctionNullableArrayArg):
473         (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp):
474         (WebCore::jsTestTypedefsPrototypeFunctionImmutablePointFunction):
475         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction):
476         (WebCore::isObservable):
477         (WebCore::JSTestTypedefsOwner::isReachableFromOpaqueRoots):
478         (WebCore::JSTestTypedefsOwner::finalize):
479         (WebCore::toJS):
480         (WebCore::toTestTypedefs):
481         * bindings/scripts/test/JS/JSTestTypedefs.h: Added.
482         (WebCore):
483         (JSTestTypedefs):
484         (WebCore::JSTestTypedefs::create):
485         (WebCore::JSTestTypedefs::createStructure):
486         (WebCore::JSTestTypedefs::impl):
487         (WebCore::JSTestTypedefs::releaseImpl):
488         (WebCore::JSTestTypedefs::releaseImplIfNotNull):
489         (JSTestTypedefsOwner):
490         (WebCore::wrapperOwner):
491         (WebCore::wrapperContext):
492         (JSTestTypedefsPrototype):
493         (WebCore::JSTestTypedefsPrototype::create):
494         (WebCore::JSTestTypedefsPrototype::createStructure):
495         (WebCore::JSTestTypedefsPrototype::JSTestTypedefsPrototype):
496         (JSTestTypedefsConstructor):
497         (WebCore::JSTestTypedefsConstructor::create):
498         (WebCore::JSTestTypedefsConstructor::createStructure):
499         * bindings/scripts/test/ObjC/DOMTestTypedefs.h: Added.
500         * bindings/scripts/test/ObjC/DOMTestTypedefs.mm: Added.
501         (-[DOMTestTypedefs dealloc]):
502         (-[DOMTestTypedefs finalize]):
503         (-[DOMTestTypedefs unsignedLongLongAttr]):
504         (-[DOMTestTypedefs setUnsignedLongLongAttr:]):
505         (-[DOMTestTypedefs immutableSerializedScriptValue]):
506         (-[DOMTestTypedefs setImmutableSerializedScriptValue:]):
507         (-[DOMTestTypedefs multiTransferList:tx:second:txx:]):
508         (-[DOMTestTypedefs setShadow:height:blur:color:alpha:]):
509         (-[DOMTestTypedefs immutablePointFunction]):
510         (core):
511         (kit):
512         * bindings/scripts/test/ObjC/DOMTestTypedefsInternal.h: Added.
513         (WebCore):
514         * bindings/scripts/test/TestTypedefs.idl: Added.
515         * bindings/scripts/test/V8/V8TestTypedefs.cpp: Added.
516         (WebCore):
517         (WebCore::checkTypeOrDieTrying):
518         (TestTypedefsV8Internal):
519         (WebCore::TestTypedefsV8Internal::V8_USE):
520         (WebCore::TestTypedefsV8Internal::unsignedLongLongAttrAttrGetter):
521         (WebCore::TestTypedefsV8Internal::unsignedLongLongAttrAttrSetter):
522         (WebCore::TestTypedefsV8Internal::immutableSerializedScriptValueAttrGetter):
523         (WebCore::TestTypedefsV8Internal::immutableSerializedScriptValueAttrSetter):
524         (WebCore::TestTypedefsV8Internal::TestTypedefsConstructorGetter):
525         (WebCore::TestTypedefsV8Internal::TestTypedefsReplaceableAttrSetter):
526         (WebCore::TestTypedefsV8Internal::funcCallback):
527         (WebCore::TestTypedefsV8Internal::multiTransferListCallback):
528         (WebCore::TestTypedefsV8Internal::setShadowCallback):
529         (WebCore::TestTypedefsV8Internal::methodWithSequenceArgCallback):
530         (WebCore::TestTypedefsV8Internal::nullableArrayArgCallback):
531         (WebCore::TestTypedefsV8Internal::funcWithClampCallback):
532         (WebCore::TestTypedefsV8Internal::immutablePointFunctionCallback):
533         (WebCore::TestTypedefsV8Internal::stringArrayFunctionCallback):
534         (WebCore::V8TestTypedefs::constructorCallback):
535         (WebCore::ConfigureV8TestTypedefsTemplate):
536         (WebCore::V8TestTypedefs::GetRawTemplate):
537         (WebCore::V8TestTypedefs::GetTemplate):
538         (WebCore::V8TestTypedefs::HasInstance):
539         (WebCore::V8TestTypedefs::createWrapper):
540         (WebCore::V8TestTypedefs::derefObject):
541         * bindings/scripts/test/V8/V8TestTypedefs.h: Added.
542         (WebCore):
543         (V8TestTypedefs):
544         (WebCore::V8TestTypedefs::toNative):
545         (WebCore::V8TestTypedefs::installPerContextProperties):
546         (WebCore::V8TestTypedefs::installPerContextPrototypeProperties):
547         (WebCore::wrap):
548         (WebCore::toV8):
549         (WebCore::toV8Fast):
550
551 2013-02-13  Kentaro Hara  <haraken@chromium.org>
552
553         [V8] Rename XXXAccessorGetter() to XXXAttrGetterCustom(),
554         and XXXAccessorSetter() to XXXAttrSetterCustom()
555         https://bugs.webkit.org/show_bug.cgi?id=109679
556
557         Reviewed by Adam Barth.
558
559         For naming consistency and clarification.
560
561         No tests. No change in behavior.
562
563         * bindings/scripts/CodeGeneratorV8.pm:
564         (GenerateHeader):
565         (GenerateHeaderCustomCall):
566         (GenerateNormalAttrGetter):
567         (GenerateNormalAttrSetter):
568         (GenerateImplementation):
569         * bindings/scripts/test/V8/V8TestInterface.cpp:
570         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrGetter):
571         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrSetter):
572         * bindings/scripts/test/V8/V8TestObj.cpp:
573         (WebCore::TestObjV8Internal::customAttrAttrGetter):
574         (WebCore::TestObjV8Internal::customAttrAttrSetter):
575         * bindings/scripts/test/V8/V8TestObj.h:
576         (V8TestObj):
577         * bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp:
578         (WebCore::V8AudioBufferSourceNode::bufferAttrSetterCustom):
579         * bindings/v8/custom/V8BiquadFilterNodeCustom.cpp:
580         (WebCore::V8BiquadFilterNode::typeAttrSetterCustom):
581         * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
582         (WebCore::V8CanvasRenderingContext2D::strokeStyleAttrGetterCustom):
583         (WebCore::V8CanvasRenderingContext2D::strokeStyleAttrSetterCustom):
584         (WebCore::V8CanvasRenderingContext2D::fillStyleAttrGetterCustom):
585         (WebCore::V8CanvasRenderingContext2D::fillStyleAttrSetterCustom):
586         * bindings/v8/custom/V8ClipboardCustom.cpp:
587         (WebCore::V8Clipboard::typesAttrGetterCustom):
588         * bindings/v8/custom/V8CoordinatesCustom.cpp:
589         (WebCore::V8Coordinates::altitudeAttrGetterCustom):
590         (WebCore::V8Coordinates::altitudeAccuracyAttrGetterCustom):
591         (WebCore::V8Coordinates::headingAttrGetterCustom):
592         (WebCore::V8Coordinates::speedAttrGetterCustom):
593         * bindings/v8/custom/V8CustomEventCustom.cpp:
594         (WebCore::V8CustomEvent::detailAttrGetterCustom):
595         * bindings/v8/custom/V8DOMWindowCustom.cpp:
596         (WebCore::V8DOMWindow::eventAttrGetterCustom):
597         (WebCore::V8DOMWindow::eventAttrSetterCustom):
598         (WebCore::V8DOMWindow::locationAttrSetterCustom):
599         (WebCore::V8DOMWindow::openerAttrSetterCustom):
600         * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
601         (WebCore::V8DeviceMotionEvent::accelerationAttrGetterCustom):
602         (WebCore::V8DeviceMotionEvent::accelerationIncludingGravityAttrGetterCustom):
603         (WebCore::V8DeviceMotionEvent::rotationRateAttrGetterCustom):
604         (WebCore::V8DeviceMotionEvent::intervalAttrGetterCustom):
605         * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
606         (WebCore::V8DeviceOrientationEvent::alphaAttrGetterCustom):
607         (WebCore::V8DeviceOrientationEvent::betaAttrGetterCustom):
608         (WebCore::V8DeviceOrientationEvent::gammaAttrGetterCustom):
609         (WebCore::V8DeviceOrientationEvent::absoluteAttrGetterCustom):
610         * bindings/v8/custom/V8DocumentLocationCustom.cpp:
611         (WebCore::V8Document::locationAttrGetterCustom):
612         (WebCore::V8Document::locationAttrSetterCustom):
613         * bindings/v8/custom/V8EventCustom.cpp:
614         (WebCore::V8Event::dataTransferAttrGetterCustom):
615         (WebCore::V8Event::clipboardDataAttrGetterCustom):
616         * bindings/v8/custom/V8FileReaderCustom.cpp:
617         (WebCore::V8FileReader::resultAttrGetterCustom):
618         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
619         (WebCore::V8HTMLDocument::allAttrSetterCustom):
620         * bindings/v8/custom/V8HTMLElementCustom.cpp:
621         (WebCore::V8HTMLElement::itemValueAttrGetterCustom):
622         (WebCore::V8HTMLElement::itemValueAttrSetterCustom):
623         * bindings/v8/custom/V8HTMLFrameElementCustom.cpp:
624         (WebCore::V8HTMLFrameElement::locationAttrSetterCustom):
625         * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
626         (WebCore::V8HTMLInputElement::selectionStartAttrGetterCustom):
627         (WebCore::V8HTMLInputElement::selectionStartAttrSetterCustom):
628         (WebCore::V8HTMLInputElement::selectionEndAttrGetterCustom):
629         (WebCore::V8HTMLInputElement::selectionEndAttrSetterCustom):
630         (WebCore::V8HTMLInputElement::selectionDirectionAttrGetterCustom):
631         (WebCore::V8HTMLInputElement::selectionDirectionAttrSetterCustom):
632         * bindings/v8/custom/V8HTMLLinkElementCustom.cpp:
633         (WebCore::V8HTMLLinkElement::sizesAttrGetterCustom):
634         (WebCore::V8HTMLLinkElement::sizesAttrSetterCustom):
635         * bindings/v8/custom/V8HTMLMediaElementCustom.cpp:
636         (WebCore::V8HTMLMediaElement::controllerAttrSetterCustom):
637         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
638         (WebCore::V8HTMLOptionsCollection::lengthAttrSetterCustom):
639         * bindings/v8/custom/V8HistoryCustom.cpp:
640         (WebCore::V8History::stateAttrGetterCustom):
641         * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp:
642         (WebCore::V8JavaScriptCallFrame::scopeChainAttrGetterCustom):
643         (WebCore::V8JavaScriptCallFrame::thisObjectAttrGetterCustom):
644         (WebCore::V8JavaScriptCallFrame::typeAttrGetterCustom):
645         * bindings/v8/custom/V8LocationCustom.cpp:
646         (WebCore::V8Location::hashAttrSetterCustom):
647         (WebCore::V8Location::hostAttrSetterCustom):
648         (WebCore::V8Location::hostnameAttrSetterCustom):
649         (WebCore::V8Location::hrefAttrSetterCustom):
650         (WebCore::V8Location::pathnameAttrSetterCustom):
651         (WebCore::V8Location::portAttrSetterCustom):
652         (WebCore::V8Location::protocolAttrSetterCustom):
653         (WebCore::V8Location::searchAttrSetterCustom):
654         (WebCore::V8Location::reloadAttrGetterCustom):
655         (WebCore::V8Location::replaceAttrGetterCustom):
656         (WebCore::V8Location::assignAttrGetterCustom):
657         * bindings/v8/custom/V8MessageEventCustom.cpp:
658         (WebCore::V8MessageEvent::dataAttrGetterCustom):
659         (WebCore::V8MessageEvent::portsAttrGetterCustom):
660         * bindings/v8/custom/V8OscillatorNodeCustom.cpp:
661         (WebCore::V8OscillatorNode::typeAttrSetterCustom):
662         * bindings/v8/custom/V8PannerNodeCustom.cpp:
663         (WebCore::V8PannerNode::panningModelAttrSetterCustom):
664         (WebCore::V8PannerNode::distanceModelAttrSetterCustom):
665         * bindings/v8/custom/V8PopStateEventCustom.cpp:
666         (WebCore::V8PopStateEvent::stateAttrGetterCustom):
667         * bindings/v8/custom/V8SVGLengthCustom.cpp:
668         (WebCore::V8SVGLength::valueAttrGetterCustom):
669         (WebCore::V8SVGLength::valueAttrSetterCustom):
670         * bindings/v8/custom/V8TrackEventCustom.cpp:
671         (WebCore::V8TrackEvent::trackAttrGetterCustom):
672         * bindings/v8/custom/V8WebKitAnimationCustom.cpp:
673         (WebCore::V8WebKitAnimation::iterationCountAttrGetterCustom):
674         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
675         (WebCore::V8XMLHttpRequest::responseTextAttrGetterCustom):
676         (WebCore::V8XMLHttpRequest::responseAttrGetterCustom):
677
678 2013-02-14  Yury Semikhatsky  <yurys@chromium.org>
679
680         Web Inspector: extract DOM counters graph implementation into its own class
681         https://bugs.webkit.org/show_bug.cgi?id=109796
682
683         Reviewed by Alexander Pavlov.
684
685         Extracted DOM counters graph implementation into DOMCountersGraph.js leaving
686         in MemoryStatistics.js only common parts shared with NativeMemoryGraph.js
687         Added some closure annotations and converted object literals into classes
688         with named constructors.
689
690         * WebCore.gypi:
691         * WebCore.vcproj/WebCore.vcproj:
692         * inspector/compile-front-end.py:
693         * inspector/front-end/DOMCountersGraph.js: Added.
694         (WebInspector.DOMCountersGraph):
695         (WebInspector.DOMCounterUI):
696         (WebInspector.DOMCountersGraph.Counter):
697         (WebInspector.DOMCounterUI.prototype.setRange):
698         (WebInspector.DOMCounterUI.prototype.updateCurrentValue):
699         (WebInspector.DOMCounterUI.prototype.clearCurrentValueAndMarker):
700         (WebInspector.DOMCounterUI.prototype.saveImageUnderMarker):
701         (WebInspector.DOMCounterUI.prototype.restoreImageUnderMarker):
702         (WebInspector.DOMCounterUI.prototype.discardImageUnderMarker):
703         (WebInspector.DOMCountersGraph.prototype._createCurrentValuesBar):
704         (WebInspector.DOMCountersGraph.prototype._createCounterUIList):
705         (WebInspector.DOMCountersGraph.prototype._createCounterUIList.getNodeCount):
706         (WebInspector.DOMCountersGraph.prototype._createCounterUIList.getListenerCount):
707         (WebInspector.DOMCountersGraph.prototype._canvasHeight):
708         (WebInspector.DOMCountersGraph.prototype._onRecordAdded):
709         (WebInspector.DOMCountersGraph.prototype._draw):
710         (WebInspector.DOMCountersGraph.prototype._restoreImageUnderMarker):
711         (WebInspector.DOMCountersGraph.prototype._saveImageUnderMarker):
712         (WebInspector.DOMCountersGraph.prototype._drawMarker):
713         (WebInspector.DOMCountersGraph.prototype._drawGraph):
714         (WebInspector.DOMCountersGraph.prototype._discardImageUnderMarker):
715         * inspector/front-end/MemoryStatistics.js:
716         (WebInspector.MemoryStatistics):
717         (WebInspector.MemoryStatistics.Counter):
718         (WebInspector.MemoryStatistics.prototype._createCurrentValuesBar):
719         (WebInspector.MemoryStatistics.prototype._createCounterUIList):
720         (WebInspector.MemoryStatistics.prototype.setTopPosition):
721         (WebInspector.MemoryStatistics.prototype._canvasHeight):
722         (WebInspector.MemoryStatistics.prototype._onRecordAdded):
723         (WebInspector.MemoryStatistics.prototype._draw):
724         (WebInspector.MemoryStatistics.prototype._onClick):
725         (WebInspector.MemoryStatistics.prototype._onMouseOut):
726         (WebInspector.MemoryStatistics.prototype._onMouseOver):
727         (WebInspector.MemoryStatistics.prototype._onMouseMove):
728         (WebInspector.MemoryStatistics.prototype._restoreImageUnderMarker):
729         (WebInspector.MemoryStatistics.prototype._drawMarker):
730         (WebInspector.MemoryStatistics.prototype._discardImageUnderMarker):
731         * inspector/front-end/NativeMemoryGraph.js:
732         (WebInspector.NativeMemoryGraph.Counter):
733         (WebInspector.NativeMemoryGraph.prototype._onRecordAdded.addStatistics):
734         (WebInspector.NativeMemoryGraph.prototype._onRecordAdded):
735         (WebInspector.NativeMemoryGraph.prototype._draw):
736         * inspector/front-end/TimelinePanel.js:
737         * inspector/front-end/WebKit.qrc:
738
739 2013-02-14  Aivo Paas  <aivopaas@gmail.com>
740
741         Updating mouse cursor on style changes without emitting fake mousemove event
742         https://bugs.webkit.org/show_bug.cgi?id=101857
743
744         Reviewed by Allan Sandfeld Jensen.
745
746         Mouse cursor changes in styles used to be reflected in UI through dispatching a fake
747         mousemove event. The old approach has some flaws: it emits a mousemove event in
748         javascript when there is no mouse movement involved (bug 85343); the fake mousemove
749         event is cancelled while there is a mouse button held down - cursor won't change
750         until mouse is moved or the button released (bug 53341); it has extra overhead of
751         using a timer which was introduced to make scrolling smoother.
752
753         The new approach does not use the fake mousemove event. Instead, it uses only the logic
754         needed for the actual cursor change to happen. This bypasses all the mousemove event related
755         overhead. The remaining code is a stripped version of what was run through the mousemove
756         event path. Everything that was not needed for changing a cursor is stripped off, everything
757         that is needed, remains the same.
758
759         The call to update cursor was moved up in the call tree from RenderObject::StyleDidChange
760         to RenderObject::SetStyle right after the StyleDidChange call. This allows to any updates
761         and style propagations in StyleDidChange to happen and makes sure that a cursor change is
762         not missed. Previous place was at the end of RenderObject::StyleDidChange, where it could
763         have been missed because of an early exit. For example, cursor change on mousedown/up on
764         a text node missed the correct cursor in the first pass.
765
766         Refactored EventHandler::selectCursor to not take a whole mouse event but instead work with
767         HitTestResult so that EventHandler::updateCursor must not create a useless PlatformEvent.
768
769         Fixes: https://bugs.webkit.org/show_bug.cgi?id=85343 (mousemove event on cursor change)
770                https://bugs.webkit.org/show_bug.cgi?id=53341 (no cursor change when mouse button down)
771
772         Tests: fast/events/mouse-cursor-change.html
773                fast/events/mouse-cursor-no-mousemove.html
774
775         * page/EventHandler.cpp:
776         (WebCore::EventHandler::updateCursor): Newly added method for updating mouse cursor
777         (WebCore):
778         (WebCore::EventHandler::selectCursor):
779         (WebCore::EventHandler::handleMouseMoveEvent):
780         * page/EventHandler.h:
781         (EventHandler):
782         * rendering/RenderObject.cpp:
783         (WebCore::areNonIdenticalCursorListsEqual):
784         (WebCore):
785         (WebCore::areCursorsEqual):
786         (WebCore::RenderObject::setStyle):
787         (WebCore::RenderObject::styleDidChange):
788
789 2013-02-13  Ilya Tikhonovsky  <loislo@chromium.org>
790
791         Web Inspector: Native Memory Instrumentation: Report child nodes as direct members of a container node to make them look like a tree in the snapshot.
792         https://bugs.webkit.org/show_bug.cgi?id=109703
793
794         Also we need to traverse the tree from the top root element down to the leaves.
795
796         Reviewed by Yury Semikhatsky.
797
798         * dom/ContainerNode.cpp:
799         (WebCore::ContainerNode::reportMemoryUsage):
800         * dom/Node.cpp:
801         (WebCore::Node::reportMemoryUsage):
802         * inspector/InspectorMemoryAgent.cpp:
803         (WebCore):
804
805 2013-02-13  Hayato Ito  <hayato@chromium.org>
806
807         [Shadow DOM] Implements a '::distributed()' pseudo element.
808         https://bugs.webkit.org/show_bug.cgi?id=82169
809
810         Reviewed by Dimitri Glazkov.
811
812         Implements a '::distributed()' pseudo element.
813         See the Shadow DOM specification and the filed bug for the detail.
814
815         - http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#selecting-nodes-distributed-to-insertion-points
816         - https://www.w3.org/Bugs/Public/show_bug.cgi?id=19684
817
818         For example, suppose we are given the following DOM tree and shadow tree:
819
820         - <A>
821           - <B>
822             - <C>
823
824         [A's ShadowRoot]
825           <D>
826           - <style>
827               E content::distributed(B C) { color: green; }
828           - <E>
829             - <content>  (Node B is distributed to this insertion point.)
830
831         In this case, the style rule defined in the shadow tree matches node 'C'.
832
833         A '::distributed()' pseudo element can not be a pseudo class since
834         an intersection between matched_elements(some_selector) and
835         matched_elements(some_selector::distributed(...)) is always an
836         empty set. A '::distributed()' pseudo element is the first-ever
837         *functional* pseudo element which takes a parameter, which can be
838         a selector.
839
840         This rule crosses the shadow boundary from a shadow tree to the
841         tree of its shadow host. That means a rule which includes
842         '::distributed()' pseudo element is defined in shadow tree, but
843         the node which is matched in the rule, the subject of the
844         selector, is outside of the shadow tree. Therefore, we cannot
845         predict where the subject of the selector will be beforehand.
846         Current CSS implementation assumes the subject of the selector
847         must exist in the current scope.
848
849         To overcome this issue, DocumentRuleSets now has a instance of
850         ShadowDistributedRules class.  A style rule will be stored in this
851         instance if the rule includes a '::distributed()' pseudo element.
852         This class also keeps track of each RuleSet by mapping it with a
853         scope where the rule was originally defined. In the example, the
854         scope is A's ShadowRoot.  The scope is used to check whether the
855         left-most matched element (in the example, it's a node 'E') exists
856         in the scope.
857
858         Internally, a '::distributed' pseudo element is represented by a
859         newly introduced 'ShadowDistributed' relation.  That makes an
860         implementation of SelectorChecker::checkSelector() much simpler.
861         A transformation from a distributed pseudo element to a
862         ShadowDistributed is done in parsing stage of CSS.
863
864         Since '::distributed()' is an experimental feature, it's actually
865         prefixed with '-webkit-' and guarded by SHADOW_DOM flag.
866
867         Tests: fast/dom/shadow/distributed-pseudo-element-for-shadow-element.html
868                fast/dom/shadow/distributed-pseudo-element-match-all.html
869                fast/dom/shadow/distributed-pseudo-element-match-descendant.html
870                fast/dom/shadow/distributed-pseudo-element-nested.html
871                fast/dom/shadow/distributed-pseudo-element-no-match.html
872                fast/dom/shadow/distributed-pseudo-element-reprojection.html
873                fast/dom/shadow/distributed-pseudo-element-scoped.html
874                fast/dom/shadow/distributed-pseudo-element-support-selector.html
875                fast/dom/shadow/distributed-pseudo-element-used-in-selector-list.html
876                fast/dom/shadow/distributed-pseudo-element-with-any.html
877                fast/dom/shadow/distributed-pseudo-element.html
878
879         * css/CSSGrammar.y.in:
880         CSS Grammar was updated to support '::distrbuted(selector)'.
881         This pseudo element is the first pseudo element which can take a selector as a parameter.
882         * css/CSSParser.cpp:
883         (WebCore::CSSParser::detectDashToken):
884         (WebCore::CSSParser::rewriteSpecifiersWithNamespaceIfNeeded):
885         (WebCore::CSSParser::rewriteSpecifiersWithElementName):
886         Here we are converting a '::distributed' pseudo element into a
887         ShadowDistributed relation internally.  To support the conversion,
888         these rewriteSpecifiersXXX functions (formally called
889         updateSpecifiersXXX) now return the specifiers which may be
890         converted.
891         (WebCore::CSSParser::rewriteSpecifiers):
892         * css/CSSParser.h:
893         * css/CSSParserValues.cpp:
894         (WebCore::CSSParserSelector::CSSParserSelector):
895         * css/CSSParserValues.h:
896         (CSSParserSelector):
897         (WebCore::CSSParserSelector::functionArgumentSelector):
898         To hold an intermediate selector which appears at the position of an argument in
899         functional pseudo element when parsing CSS.
900         (WebCore::CSSParserSelector::setFunctionArgumentSelector):
901         (WebCore::CSSParserSelector::isDistributedPseudoElement):
902         * css/CSSSelector.cpp:
903         Add new pseudo element, PseudoDistributed, and its internal representation, ShadowDistributed relation.
904         (WebCore::CSSSelector::pseudoId):
905         (WebCore::nameToPseudoTypeMap):
906         (WebCore::CSSSelector::extractPseudoType):
907         (WebCore::CSSSelector::selectorText):
908         * css/CSSSelector.h:
909         (CSSSelector):
910         (WebCore):
911         (WebCore::CSSSelector::isDistributedPseudoElement):
912         (WebCore::CSSSelector::isShadowDistributed):
913         * css/CSSSelectorList.cpp:
914         (WebCore):
915         (SelectorHasShadowDistributed):
916         (WebCore::SelectorHasShadowDistributed::operator()):
917         (WebCore::CSSSelectorList::hasShadowDistributedAt):
918         * css/CSSSelectorList.h:
919         (CSSSelectorList):
920         * css/DocumentRuleSets.cpp:
921         (WebCore):
922         (WebCore::ShadowDistributedRules::addRule):
923         Every CSS rule which includes '::distributed(...)' should be managed by calling this function.
924         (WebCore::ShadowDistributedRules::collectMatchRequests):
925         (WebCore::DocumentRuleSets::resetAuthorStyle):
926         * css/DocumentRuleSets.h:
927         (WebCore):
928         (ShadowDistributedRules):
929         (WebCore::ShadowDistributedRules::clear):
930         (DocumentRuleSets):
931         (WebCore::DocumentRuleSets::shadowDistributedRules)
932         DocumentRuleSets owns an instance of ShadowDistributedRules.
933         * css/RuleSet.cpp:
934         (WebCore::RuleSet::addChildRules):
935         Updated to check whether the rule contains '::distributed()' or not.
936         * css/SelectorChecker.cpp:
937         (WebCore::SelectorChecker::match):
938         Support ShadowDistributed relation. Check all possible insertion points where a node is distributed.
939         * css/SelectorChecker.h:
940         (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
941         Adds enum of BehaviorAtBoundary. '::distributed()' is the only
942         rule which uses 'CrossedBoundary' since it is the only rule which
943         crosses shadow boundaries.
944         (SelectorCheckingContext):
945         * css/SelectorFilter.cpp:
946         (WebCore::SelectorFilter::collectIdentifierHashes):
947         * css/StyleResolver.cpp:
948         (WebCore::StyleResolver::collectMatchingRules):
949         (WebCore::StyleResolver::matchAuthorRules):
950         (WebCore::StyleResolver::collectMatchingRulesForList):
951         (WebCore::StyleResolver::ruleMatches):
952         * css/StyleResolver.h:
953         (MatchRequest):
954         (WebCore::MatchRequest::MatchRequest): Add behaviorAtBoundary field.
955         (WebCore):
956         (StyleResolver):
957         * html/shadow/InsertionPoint.cpp:
958         (WebCore::collectInsertionPointsWhereNodeIsDistributed):
959         (WebCore):
960         * html/shadow/InsertionPoint.h:
961         (WebCore):
962
963 2013-02-13  Kentaro Hara  <haraken@chromium.org>
964
965         [V8] Generate wrapper methods for custom methods
966         https://bugs.webkit.org/show_bug.cgi?id=109678
967
968         Reviewed by Adam Barth.
969
970         Currently V8 directly calls back custom methods written
971         in custom binding files. This makes it impossible for code
972         generators to hook custom methods (e.g. Code generators cannot
973         insert a code for FeatureObservation into custom methods).
974         To solve the problem, we should generate wrapper methods for
975         custom methods.
976
977         No tests. No change in behavior.
978
979         * page/DOMWindow.idl: Removed overloaded methods. The fact that methods in an IDL
980         file are overloaded but they are not overloaded in custom bindings confuses code
981         generators. (For some reason, this problem hasn't appeared before this change.)
982         * xml/XMLHttpRequest.idl: Ditto.
983
984         * bindings/scripts/CodeGeneratorV8.pm:
985         (GenerateHeader):
986         (GenerateDomainSafeFunctionGetter):
987         (GenerateEventListenerCallback):
988         (GenerateFunctionCallback):
989         (GenerateNonStandardFunction):
990         (GenerateImplementation):
991         * bindings/scripts/test/V8/V8TestInterface.cpp:
992         (WebCore::TestInterfaceV8Internal::supplementalMethod3Callback):
993         (TestInterfaceV8Internal):
994         (WebCore):
995         * bindings/scripts/test/V8/V8TestObj.cpp:
996         (WebCore::TestObjV8Internal::customMethodCallback):
997         (TestObjV8Internal):
998         (WebCore::TestObjV8Internal::customMethodWithArgsCallback):
999         (WebCore::TestObjV8Internal::classMethod2Callback):
1000         (WebCore):
1001         (WebCore::ConfigureV8TestObjTemplate):
1002         * bindings/scripts/test/V8/V8TestObj.h:
1003         (V8TestObj):
1004         * bindings/v8/custom/V8ClipboardCustom.cpp:
1005         (WebCore::V8Clipboard::clearDataCallbackCustom):
1006         (WebCore::V8Clipboard::setDragImageCallbackCustom):
1007         * bindings/v8/custom/V8ConsoleCustom.cpp:
1008         (WebCore::V8Console::traceCallbackCustom):
1009         (WebCore::V8Console::assertCallbackCustom):
1010         (WebCore::V8Console::profileCallbackCustom):
1011         (WebCore::V8Console::profileEndCallbackCustom):
1012         * bindings/v8/custom/V8CryptoCustom.cpp:
1013         (WebCore::V8Crypto::getRandomValuesCallbackCustom):
1014         * bindings/v8/custom/V8DOMFormDataCustom.cpp:
1015         (WebCore::V8DOMFormData::appendCallbackCustom):
1016         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1017         (WebCore::V8DOMWindow::addEventListenerCallbackCustom):
1018         (WebCore::V8DOMWindow::removeEventListenerCallbackCustom):
1019         (WebCore::V8DOMWindow::postMessageCallbackCustom):
1020         (WebCore::V8DOMWindow::toStringCallbackCustom):
1021         (WebCore::V8DOMWindow::releaseEventsCallbackCustom):
1022         (WebCore::V8DOMWindow::captureEventsCallbackCustom):
1023         (WebCore::V8DOMWindow::showModalDialogCallbackCustom):
1024         (WebCore::V8DOMWindow::openCallbackCustom):
1025         (WebCore::V8DOMWindow::setTimeoutCallbackCustom):
1026         (WebCore::V8DOMWindow::setIntervalCallbackCustom):
1027         * bindings/v8/custom/V8DataViewCustom.cpp:
1028         (WebCore::V8DataView::getInt8CallbackCustom):
1029         (WebCore::V8DataView::getUint8CallbackCustom):
1030         (WebCore::V8DataView::setInt8CallbackCustom):
1031         (WebCore::V8DataView::setUint8CallbackCustom):
1032         * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
1033         (WebCore::V8DedicatedWorkerContext::postMessageCallbackCustom):
1034         * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
1035         (WebCore::V8DeviceMotionEvent::initDeviceMotionEventCallbackCustom):
1036         * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
1037         (WebCore::V8DeviceOrientationEvent::initDeviceOrientationEventCallbackCustom):
1038         * bindings/v8/custom/V8DocumentCustom.cpp:
1039         (WebCore::V8Document::evaluateCallbackCustom):
1040         (WebCore::V8Document::createTouchListCallbackCustom):
1041         * bindings/v8/custom/V8GeolocationCustom.cpp:
1042         (WebCore::V8Geolocation::getCurrentPositionCallbackCustom):
1043         (WebCore::V8Geolocation::watchPositionCallbackCustom):
1044         * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp:
1045         (WebCore::V8HTMLAllCollection::itemCallbackCustom):
1046         (WebCore::V8HTMLAllCollection::namedItemCallbackCustom):
1047         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
1048         (WebCore::V8HTMLCanvasElement::getContextCallbackCustom):
1049         (WebCore::V8HTMLCanvasElement::toDataURLCallbackCustom):
1050         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
1051         (WebCore::V8HTMLDocument::writeCallbackCustom):
1052         (WebCore::V8HTMLDocument::writelnCallbackCustom):
1053         (WebCore::V8HTMLDocument::openCallbackCustom):
1054         * bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp:
1055         (WebCore::V8HTMLFormControlsCollection::namedItemCallbackCustom):
1056         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
1057         (WebCore::v8HTMLImageElementConstructorCallbackCustom):
1058         (WebCore::V8HTMLImageElementConstructor::GetTemplate):
1059         * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
1060         (WebCore::V8HTMLInputElement::setSelectionRangeCallbackCustom):
1061         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
1062         (WebCore::V8HTMLOptionsCollection::namedItemCallbackCustom):
1063         (WebCore::V8HTMLOptionsCollection::removeCallbackCustom):
1064         (WebCore::V8HTMLOptionsCollection::addCallbackCustom):
1065         * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
1066         (WebCore::V8HTMLSelectElement::removeCallbackCustom):
1067         * bindings/v8/custom/V8HistoryCustom.cpp:
1068         (WebCore::V8History::pushStateCallbackCustom):
1069         (WebCore::V8History::replaceStateCallbackCustom):
1070         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
1071         (WebCore::V8InjectedScriptHost::inspectedObjectCallbackCustom):
1072         (WebCore::V8InjectedScriptHost::internalConstructorNameCallbackCustom):
1073         (WebCore::V8InjectedScriptHost::isHTMLAllCollectionCallbackCustom):
1074         (WebCore::V8InjectedScriptHost::typeCallbackCustom):
1075         (WebCore::V8InjectedScriptHost::functionDetailsCallbackCustom):
1076         (WebCore::V8InjectedScriptHost::getInternalPropertiesCallbackCustom):
1077         (WebCore::V8InjectedScriptHost::getEventListenersCallbackCustom):
1078         (WebCore::V8InjectedScriptHost::inspectCallbackCustom):
1079         (WebCore::V8InjectedScriptHost::databaseIdCallbackCustom):
1080         (WebCore::V8InjectedScriptHost::storageIdCallbackCustom):
1081         (WebCore::V8InjectedScriptHost::evaluateCallbackCustom):
1082         (WebCore::V8InjectedScriptHost::setFunctionVariableValueCallbackCustom):
1083         * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
1084         (WebCore::V8InspectorFrontendHost::platformCallbackCustom):
1085         (WebCore::V8InspectorFrontendHost::portCallbackCustom):
1086         (WebCore::V8InspectorFrontendHost::showContextMenuCallbackCustom):
1087         (WebCore::V8InspectorFrontendHost::recordActionTakenCallbackCustom):
1088         (WebCore::V8InspectorFrontendHost::recordPanelShownCallbackCustom):
1089         (WebCore::V8InspectorFrontendHost::recordSettingChangedCallbackCustom):
1090         * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp:
1091         (WebCore::V8JavaScriptCallFrame::evaluateCallbackCustom):
1092         (WebCore::V8JavaScriptCallFrame::restartCallbackCustom):
1093         (WebCore::V8JavaScriptCallFrame::setVariableValueCallbackCustom):
1094         (WebCore::V8JavaScriptCallFrame::scopeTypeCallbackCustom):
1095         * bindings/v8/custom/V8LocationCustom.cpp:
1096         (WebCore::V8Location::reloadAccessorGetter):
1097         (WebCore::V8Location::replaceAccessorGetter):
1098         (WebCore::V8Location::assignAccessorGetter):
1099         (WebCore::V8Location::reloadCallbackCustom):
1100         (WebCore::V8Location::replaceCallbackCustom):
1101         (WebCore::V8Location::assignCallbackCustom):
1102         (WebCore::V8Location::valueOfCallbackCustom):
1103         (WebCore::V8Location::toStringCallbackCustom):
1104         * bindings/v8/custom/V8MessageEventCustom.cpp:
1105         (WebCore::V8MessageEvent::initMessageEventCallbackCustom):
1106         (WebCore::V8MessageEvent::webkitInitMessageEventCallbackCustom):
1107         * bindings/v8/custom/V8MessagePortCustom.cpp:
1108         (WebCore::V8MessagePort::postMessageCallbackCustom):
1109         * bindings/v8/custom/V8NodeCustom.cpp:
1110         (WebCore::V8Node::insertBeforeCallbackCustom):
1111         (WebCore::V8Node::replaceChildCallbackCustom):
1112         (WebCore::V8Node::removeChildCallbackCustom):
1113         (WebCore::V8Node::appendChildCallbackCustom):
1114         * bindings/v8/custom/V8NotificationCenterCustom.cpp:
1115         (WebCore::V8NotificationCenter::requestPermissionCallbackCustom):
1116         * bindings/v8/custom/V8NotificationCustom.cpp:
1117         (WebCore::V8Notification::requestPermissionCallbackCustom):
1118         * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp:
1119         (WebCore::V8SQLResultSetRowList::itemCallbackCustom):
1120         * bindings/v8/custom/V8SQLTransactionCustom.cpp:
1121         (WebCore::V8SQLTransaction::executeSqlCallbackCustom):
1122         * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
1123         (WebCore::V8SQLTransactionSync::executeSqlCallbackCustom):
1124         * bindings/v8/custom/V8SVGLengthCustom.cpp:
1125         (WebCore::V8SVGLength::convertToSpecifiedUnitsCallbackCustom):
1126         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
1127         (WebCore::V8WebGLRenderingContext::getAttachedShadersCallbackCustom):
1128         (WebCore::V8WebGLRenderingContext::getBufferParameterCallbackCustom):
1129         (WebCore::V8WebGLRenderingContext::getExtensionCallbackCustom):
1130         (WebCore::V8WebGLRenderingContext::getFramebufferAttachmentParameterCallbackCustom):
1131         (WebCore::V8WebGLRenderingContext::getParameterCallbackCustom):
1132         (WebCore::V8WebGLRenderingContext::getProgramParameterCallbackCustom):
1133         (WebCore::V8WebGLRenderingContext::getRenderbufferParameterCallbackCustom):
1134         (WebCore::V8WebGLRenderingContext::getShaderParameterCallbackCustom):
1135         (WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallbackCustom):
1136         (WebCore::V8WebGLRenderingContext::getTexParameterCallbackCustom):
1137         (WebCore::V8WebGLRenderingContext::getUniformCallbackCustom):
1138         (WebCore::V8WebGLRenderingContext::getVertexAttribCallbackCustom):
1139         (WebCore::V8WebGLRenderingContext::uniform1fvCallbackCustom):
1140         (WebCore::V8WebGLRenderingContext::uniform1ivCallbackCustom):
1141         (WebCore::V8WebGLRenderingContext::uniform2fvCallbackCustom):
1142         (WebCore::V8WebGLRenderingContext::uniform2ivCallbackCustom):
1143         (WebCore::V8WebGLRenderingContext::uniform3fvCallbackCustom):
1144         (WebCore::V8WebGLRenderingContext::uniform3ivCallbackCustom):
1145         (WebCore::V8WebGLRenderingContext::uniform4fvCallbackCustom):
1146         (WebCore::V8WebGLRenderingContext::uniform4ivCallbackCustom):
1147         (WebCore::V8WebGLRenderingContext::uniformMatrix2fvCallbackCustom):
1148         (WebCore::V8WebGLRenderingContext::uniformMatrix3fvCallbackCustom):
1149         (WebCore::V8WebGLRenderingContext::uniformMatrix4fvCallbackCustom):
1150         (WebCore::V8WebGLRenderingContext::vertexAttrib1fvCallbackCustom):
1151         (WebCore::V8WebGLRenderingContext::vertexAttrib2fvCallbackCustom):
1152         (WebCore::V8WebGLRenderingContext::vertexAttrib3fvCallbackCustom):
1153         (WebCore::V8WebGLRenderingContext::vertexAttrib4fvCallbackCustom):
1154         * bindings/v8/custom/V8WorkerContextCustom.cpp:
1155         (WebCore::V8WorkerContext::importScriptsCallbackCustom):
1156         (WebCore::V8WorkerContext::setTimeoutCallbackCustom):
1157         (WebCore::V8WorkerContext::setIntervalCallbackCustom):
1158         * bindings/v8/custom/V8WorkerCustom.cpp:
1159         (WebCore::V8Worker::postMessageCallbackCustom):
1160         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
1161         (WebCore::V8XMLHttpRequest::openCallbackCustom):
1162         (WebCore::V8XMLHttpRequest::sendCallbackCustom):
1163         * bindings/v8/custom/V8XSLTProcessorCustom.cpp:
1164         (WebCore::V8XSLTProcessor::setParameterCallbackCustom):
1165         (WebCore::V8XSLTProcessor::getParameterCallbackCustom):
1166         (WebCore::V8XSLTProcessor::removeParameterCallbackCustom):
1167
1168 2013-02-13  Praveen R Jadhav  <praveen.j@samsung.com>
1169
1170         JSObject for ChannelSplitterNode and ChannelMergerNode are not created.
1171         https://bugs.webkit.org/show_bug.cgi?id=109542
1172
1173         Reviewed by Kentaro Hara.
1174
1175         "JSGenerateToJSObject" should be included in IDL files
1176         of ChannelSplitterNode and ChannelMergerNode in WebAudio.
1177         This ensures html files to access corresponding objects.
1178
1179         * Modules/webaudio/ChannelMergerNode.idl:
1180         * Modules/webaudio/ChannelSplitterNode.idl:
1181
1182 2013-02-13   Vineet Chaudhary  <rgf748@motorola.com>
1183
1184         [Regression] After r142831  collection-null-like-arguments.html layout test failing
1185         https://bugs.webkit.org/show_bug.cgi?id=109780
1186
1187         Reviewed by Kentaro Hara.
1188
1189         No new tests. LayoutTests/fast/dom/collection-null-like-arguments.html
1190         Should pass now.
1191
1192         * bindings/js/JSHTMLAllCollectionCustom.cpp: Return null for namedItem() only.
1193         (WebCore::getNamedItems):
1194         (WebCore::JSHTMLAllCollection::namedItem):
1195         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp: Ditto.
1196         (WebCore::getNamedItems):
1197         (WebCore::JSHTMLFormControlsCollection::namedItem):
1198         * bindings/js/JSHTMLOptionsCollectionCustom.cpp: Ditto.
1199         (WebCore::getNamedItems):
1200         (WebCore::JSHTMLOptionsCollection::namedItem):
1201
1202 2013-02-13  Soo-Hyun Choi  <sh9.choi@samsung.com>
1203
1204         Fix indentation error in MediaPlayerPrivateGStreamer.h
1205         https://bugs.webkit.org/show_bug.cgi?id=109768
1206
1207         Reviewed by Kentaro Hara.
1208
1209         No new tests as this patch just changes indentation style.
1210
1211         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1212         (MediaPlayerPrivateGStreamer):
1213         (WebCore::MediaPlayerPrivateGStreamer::hasVideo):
1214         (WebCore::MediaPlayerPrivateGStreamer::hasAudio):
1215         (WebCore::MediaPlayerPrivateGStreamer::engineDescription):
1216         (WebCore::MediaPlayerPrivateGStreamer::isLiveStream):
1217
1218 2013-02-13  Adam Barth  <abarth@webkit.org>
1219
1220         TokenPreloadScanner should be (mostly!) thread-safe
1221         https://bugs.webkit.org/show_bug.cgi?id=109760
1222
1223         Reviewed by Eric Seidel.
1224
1225         This patch makes the bulk of TokenPreloadScanner thread-safe.  The one
1226         remaining wart is processPossibleBaseTag because it wants to grub
1227         around in the base tag's attributes. I have a plan for that, but it's
1228         going to need to wait for the next patch.
1229
1230         * html/parser/HTMLPreloadScanner.cpp:
1231         (WebCore::isStartTag):
1232         (WebCore::isStartOrEndTag):
1233         (WebCore::TokenPreloadScanner::identifierFor):
1234         (WebCore::TokenPreloadScanner::inititatorFor):
1235         (WebCore::TokenPreloadScanner::StartTagScanner::StartTagScanner):
1236         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
1237         (TokenPreloadScanner::StartTagScanner):
1238         (WebCore::TokenPreloadScanner::processPossibleTemplateTag):
1239         (WebCore::TokenPreloadScanner::processPossibleStyleTag):
1240         (WebCore::TokenPreloadScanner::processPossibleBaseTag):
1241         (WebCore::TokenPreloadScanner::scan):
1242         (WebCore::HTMLPreloadScanner::scan):
1243         * html/parser/HTMLPreloadScanner.h:
1244         (WebCore):
1245
1246 2013-02-13  Adam Barth  <abarth@webkit.org>
1247
1248         StartTagScanner should be thread-safe
1249         https://bugs.webkit.org/show_bug.cgi?id=109750
1250
1251         Reviewed by Eric Seidel.
1252
1253         This patch weens the StartTagScanner off AtomicString using two
1254         techniques:
1255
1256         1) This patch creates an enum to represent the four tag names that the
1257            StartTagScanner needs to understand. Using an enum is better than
1258            using an AtomicString because we can use the enum on both the main
1259            thread and on the background thread.
1260
1261         2) For attributes, this patch uses threadSafeMatch. We're not able to
1262            use threadSafeMatch everywhere due to performance, but using it for
1263            attributes appears to be ok becaues we only call threadSafeMatch on
1264            the attributes of "interesting" tags.
1265
1266         I tested the performance of this patch using
1267         PerformanceTests/Parser/html-parser.html and did not see any slowdown.
1268         (There actually appeared to be a <1% speedup, but I'm attributing that
1269         to noise.)
1270
1271         * html/parser/HTMLPreloadScanner.cpp:
1272         (WebCore::identifierFor):
1273         (WebCore):
1274         (WebCore::inititatorFor):
1275         (WebCore::StartTagScanner::StartTagScanner):
1276         (WebCore::StartTagScanner::processAttributes):
1277         (StartTagScanner):
1278         (WebCore::StartTagScanner::createPreloadRequest):
1279         (WebCore::StartTagScanner::processAttribute):
1280         (WebCore::StartTagScanner::charset):
1281         (WebCore::StartTagScanner::resourceType):
1282         (WebCore::StartTagScanner::shouldPreload):
1283         (WebCore::HTMLPreloadScanner::processToken):
1284
1285 2013-02-13  Huang Dongsung  <luxtella@company100.net>
1286
1287         Coordinated Graphics: a long page is scaled vertically while loading.
1288         https://bugs.webkit.org/show_bug.cgi?id=109645
1289
1290         Reviewed by Noam Rosenthal.
1291
1292         When loading http://www.w3.org/TR/xpath-datamodel/, Coordinated Graphics draws
1293         vertically scaled contents. It is because there is the difference between the
1294         size of a layer and the size of CoordinatedBackingStore.
1295
1296         Currently, CoordinatedGraphicsScene notifies the size to CoordinatedBackingStore
1297         at the moment of creating, updating and removing a tile. However, it is not
1298         necessary to send tile-related messages when the size of layer is changed.
1299         So this patch resets the size of CoordinatedBackingStore when receiving the
1300         message that is created when the size is changed: SyncLayerState.
1301
1302         There is no current way to reliably test flicker issues.
1303
1304         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:
1305           Add m_pendingSize to set m_size at the moment of flushing.
1306           After http://webkit.org/b/108294, m_pendingSize will be removed
1307           because the bug makes CoordinatedGraphicsScene execute all messages at
1308           the moment of flushing.
1309         (WebCore::CoordinatedBackingStore::setSize):
1310         (WebCore::CoordinatedBackingStore::commitTileOperations):
1311         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.h:
1312         (CoordinatedBackingStore):
1313         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1314         (WebCore::CoordinatedGraphicsScene::prepareContentBackingStore):
1315         (WebCore::CoordinatedGraphicsScene::createBackingStoreIfNeeded):
1316         (WebCore::CoordinatedGraphicsScene::resetBackingStoreSizeToLayerSize):
1317         (WebCore::CoordinatedGraphicsScene::createTile):
1318         (WebCore::CoordinatedGraphicsScene::removeTile):
1319         (WebCore::CoordinatedGraphicsScene::updateTile):
1320
1321 2013-02-13  Kentaro Hara  <haraken@chromium.org>
1322
1323         [V8] Rename XXXAccessorGetter() to XXXAttrGetterCustom(),
1324         and XXXAccessorSetter() to XXXAttrSetterCustom()
1325         https://bugs.webkit.org/show_bug.cgi?id=109679
1326
1327         Reviewed by Adam Barth.
1328
1329         For naming consistency and clarification.
1330
1331         No tests. No change in behavior.
1332
1333         * bindings/scripts/CodeGeneratorV8.pm:
1334         (GenerateHeader):
1335         (GenerateHeaderCustomCall):
1336         (GenerateNormalAttrGetter):
1337         (GenerateNormalAttrSetter):
1338         (GenerateImplementation):
1339         * bindings/scripts/test/V8/V8TestInterface.cpp:
1340         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrGetter):
1341         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrSetter):
1342         * bindings/scripts/test/V8/V8TestObj.cpp:
1343         (WebCore::TestObjV8Internal::customAttrAttrGetter):
1344         (WebCore::TestObjV8Internal::customAttrAttrSetter):
1345         * bindings/scripts/test/V8/V8TestObj.h:
1346         (V8TestObj):
1347         * bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp:
1348         (WebCore::V8AudioBufferSourceNode::bufferAttrSetterCustom):
1349         * bindings/v8/custom/V8BiquadFilterNodeCustom.cpp:
1350         (WebCore::V8BiquadFilterNode::typeAttrSetterCustom):
1351         * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
1352         (WebCore::V8CanvasRenderingContext2D::strokeStyleAttrGetterCustom):
1353         (WebCore::V8CanvasRenderingContext2D::strokeStyleAttrSetterCustom):
1354         (WebCore::V8CanvasRenderingContext2D::fillStyleAttrGetterCustom):
1355         (WebCore::V8CanvasRenderingContext2D::fillStyleAttrSetterCustom):
1356         * bindings/v8/custom/V8ClipboardCustom.cpp:
1357         (WebCore::V8Clipboard::typesAttrGetterCustom):
1358         * bindings/v8/custom/V8CoordinatesCustom.cpp:
1359         (WebCore::V8Coordinates::altitudeAttrGetterCustom):
1360         (WebCore::V8Coordinates::altitudeAccuracyAttrGetterCustom):
1361         (WebCore::V8Coordinates::headingAttrGetterCustom):
1362         (WebCore::V8Coordinates::speedAttrGetterCustom):
1363         * bindings/v8/custom/V8CustomEventCustom.cpp:
1364         (WebCore::V8CustomEvent::detailAttrGetterCustom):
1365         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1366         (WebCore::V8DOMWindow::eventAttrGetterCustom):
1367         (WebCore::V8DOMWindow::eventAttrSetterCustom):
1368         (WebCore::V8DOMWindow::locationAttrSetterCustom):
1369         (WebCore::V8DOMWindow::openerAttrSetterCustom):
1370         * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
1371         (WebCore::V8DeviceMotionEvent::accelerationAttrGetterCustom):
1372         (WebCore::V8DeviceMotionEvent::accelerationIncludingGravityAttrGetterCustom):
1373         (WebCore::V8DeviceMotionEvent::rotationRateAttrGetterCustom):
1374         (WebCore::V8DeviceMotionEvent::intervalAttrGetterCustom):
1375         * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
1376         (WebCore::V8DeviceOrientationEvent::alphaAttrGetterCustom):
1377         (WebCore::V8DeviceOrientationEvent::betaAttrGetterCustom):
1378         (WebCore::V8DeviceOrientationEvent::gammaAttrGetterCustom):
1379         (WebCore::V8DeviceOrientationEvent::absoluteAttrGetterCustom):
1380         * bindings/v8/custom/V8DocumentLocationCustom.cpp:
1381         (WebCore::V8Document::locationAttrGetterCustom):
1382         (WebCore::V8Document::locationAttrSetterCustom):
1383         * bindings/v8/custom/V8EventCustom.cpp:
1384         (WebCore::V8Event::dataTransferAttrGetterCustom):
1385         (WebCore::V8Event::clipboardDataAttrGetterCustom):
1386         * bindings/v8/custom/V8FileReaderCustom.cpp:
1387         (WebCore::V8FileReader::resultAttrGetterCustom):
1388         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
1389         (WebCore::V8HTMLDocument::allAttrSetterCustom):
1390         * bindings/v8/custom/V8HTMLElementCustom.cpp:
1391         (WebCore::V8HTMLElement::itemValueAttrGetterCustom):
1392         (WebCore::V8HTMLElement::itemValueAttrSetterCustom):
1393         * bindings/v8/custom/V8HTMLFrameElementCustom.cpp:
1394         (WebCore::V8HTMLFrameElement::locationAttrSetterCustom):
1395         * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
1396         (WebCore::V8HTMLInputElement::selectionStartAttrGetterCustom):
1397         (WebCore::V8HTMLInputElement::selectionStartAttrSetterCustom):
1398         (WebCore::V8HTMLInputElement::selectionEndAttrGetterCustom):
1399         (WebCore::V8HTMLInputElement::selectionEndAttrSetterCustom):
1400         (WebCore::V8HTMLInputElement::selectionDirectionAttrGetterCustom):
1401         (WebCore::V8HTMLInputElement::selectionDirectionAttrSetterCustom):
1402         * bindings/v8/custom/V8HTMLLinkElementCustom.cpp:
1403         (WebCore::V8HTMLLinkElement::sizesAttrGetterCustom):
1404         (WebCore::V8HTMLLinkElement::sizesAttrSetterCustom):
1405         * bindings/v8/custom/V8HTMLMediaElementCustom.cpp:
1406         (WebCore::V8HTMLMediaElement::controllerAttrSetterCustom):
1407         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
1408         (WebCore::V8HTMLOptionsCollection::lengthAttrSetterCustom):
1409         * bindings/v8/custom/V8HistoryCustom.cpp:
1410         (WebCore::V8History::stateAttrGetterCustom):
1411         * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp:
1412         (WebCore::V8JavaScriptCallFrame::scopeChainAttrGetterCustom):
1413         (WebCore::V8JavaScriptCallFrame::thisObjectAttrGetterCustom):
1414         (WebCore::V8JavaScriptCallFrame::typeAttrGetterCustom):
1415         * bindings/v8/custom/V8LocationCustom.cpp:
1416         (WebCore::V8Location::hashAttrSetterCustom):
1417         (WebCore::V8Location::hostAttrSetterCustom):
1418         (WebCore::V8Location::hostnameAttrSetterCustom):
1419         (WebCore::V8Location::hrefAttrSetterCustom):
1420         (WebCore::V8Location::pathnameAttrSetterCustom):
1421         (WebCore::V8Location::portAttrSetterCustom):
1422         (WebCore::V8Location::protocolAttrSetterCustom):
1423         (WebCore::V8Location::searchAttrSetterCustom):
1424         (WebCore::V8Location::reloadAttrGetterCustom):
1425         (WebCore::V8Location::replaceAttrGetterCustom):
1426         (WebCore::V8Location::assignAttrGetterCustom):
1427         * bindings/v8/custom/V8MessageEventCustom.cpp:
1428         (WebCore::V8MessageEvent::dataAttrGetterCustom):
1429         (WebCore::V8MessageEvent::portsAttrGetterCustom):
1430         * bindings/v8/custom/V8OscillatorNodeCustom.cpp:
1431         (WebCore::V8OscillatorNode::typeAttrSetterCustom):
1432         * bindings/v8/custom/V8PannerNodeCustom.cpp:
1433         (WebCore::V8PannerNode::panningModelAttrSetterCustom):
1434         (WebCore::V8PannerNode::distanceModelAttrSetterCustom):
1435         * bindings/v8/custom/V8PopStateEventCustom.cpp:
1436         (WebCore::V8PopStateEvent::stateAttrGetterCustom):
1437         * bindings/v8/custom/V8SVGLengthCustom.cpp:
1438         (WebCore::V8SVGLength::valueAttrGetterCustom):
1439         (WebCore::V8SVGLength::valueAttrSetterCustom):
1440         * bindings/v8/custom/V8TrackEventCustom.cpp:
1441         (WebCore::V8TrackEvent::trackAttrGetterCustom):
1442         * bindings/v8/custom/V8WebKitAnimationCustom.cpp:
1443         (WebCore::V8WebKitAnimation::iterationCountAttrGetterCustom):
1444         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
1445         (WebCore::V8XMLHttpRequest::responseTextAttrGetterCustom):
1446         (WebCore::V8XMLHttpRequest::responseAttrGetterCustom):
1447
1448 2013-02-12  Kentaro Hara  <haraken@chromium.org>
1449
1450         [V8] Generate wrapper methods for custom getters/setters
1451         https://bugs.webkit.org/show_bug.cgi?id=109666
1452
1453         Reviewed by Adam Barth.
1454
1455         Currently V8 directly calls back custom getters/setters written
1456         in custom binding files. This makes it impossible for code generators
1457         to hook custom getters/setters (e.g. Code generators cannot insert a code
1458         for FeatureObservation into custom getters/setters). To solve the problem,
1459         we should generate wrapper methods for custom getters/setters.
1460
1461         No tests. No change in behavior.
1462
1463         * bindings/scripts/CodeGeneratorV8.pm:
1464         (GenerateNormalAttrGetter):
1465         (GenerateNormalAttrSetter):
1466         (GenerateSingleBatchedAttribute):
1467         (GenerateImplementation):
1468         * bindings/scripts/test/V8/V8TestInterface.cpp:
1469         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrGetter):
1470         (TestInterfaceV8Internal):
1471         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrSetter):
1472         (WebCore):
1473         * bindings/scripts/test/V8/V8TestObj.cpp:
1474         (WebCore::TestObjV8Internal::customAttrAttrGetter):
1475         (TestObjV8Internal):
1476         (WebCore::TestObjV8Internal::customAttrAttrSetter):
1477         (WebCore):
1478
1479 2013-02-13   Vineet Chaudhary  <rgf748@motorola.com>
1480
1481         HTMLCollections namedItem() methods should return null than undefined for empty collections.
1482         https://bugs.webkit.org/show_bug.cgi?id=104096
1483
1484         Reviewed by Kentaro Hara.
1485
1486         As per specification namedItem() should return null if collection is empty.
1487         Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#htmlallcollection
1488
1489         Test: fast/dom/htmlcollection-namedItem.html
1490
1491         * bindings/js/JSHTMLAllCollectionCustom.cpp: Returning null.
1492         (WebCore::getNamedItems):
1493         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp: Ditto.
1494         (WebCore::getNamedItems):
1495         * bindings/js/JSHTMLOptionsCollectionCustom.cpp: Ditto.
1496         (WebCore::getNamedItems):
1497         * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp: Ditto.
1498         (WebCore::V8HTMLAllCollection::namedItemCallback):
1499         * bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp: Ditto.
1500         (WebCore::V8HTMLFormControlsCollection::namedItemCallback):
1501         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp: Ditto.
1502         (WebCore::V8HTMLOptionsCollection::namedItemCallback):
1503
1504 2013-02-13  Tony Gentilcore  <tonyg@chromium.org>
1505
1506         Fix svg/in-html/script-write.html with threaded HTML parser
1507         https://bugs.webkit.org/show_bug.cgi?id=109495
1508
1509         Reviewed by Eric Seidel.
1510
1511         This patch makes the background parser's simulateTreeBuilder() more realistic.
1512         1. The HTMLTreeBuilder does not call the updateStateFor() setState()s when in foreign content mode so we shouldn't do it when simulating the tree builder.
1513         2. HTMLTreeBuilder::processTokenInForeignContent has a list of tags which exit foreign content mode. We need to respect those.
1514         3. Support the <foreignObject> tag which enters and leaves foreign content mode.
1515         4. The tree builder sets state to DataState upon a </script> tag when not in foreign content mode. We need to do the same.
1516
1517         This involved creating a namespace stack where we push upon entering each namespace and pop upon leaving.
1518         We are in foreign content if the topmost namespace is SVG or MathML.
1519
1520         This fixes svg/in-html/script-write.html and likely others.
1521
1522         * html/parser/BackgroundHTMLParser.cpp:
1523         (WebCore::BackgroundHTMLParser::simulateTreeBuilder):
1524         * html/parser/BackgroundHTMLParser.h:
1525         (BackgroundHTMLParser):
1526         * html/parser/CompactHTMLToken.cpp:
1527         (WebCore::CompactHTMLToken::getAttributeItem): Returns the attribute of the given name. Necessary to test for <font> attributes in simulateTreeBuilder.
1528         (WebCore):
1529         * html/parser/CompactHTMLToken.h:
1530         (WebCore):
1531         (CompactHTMLToken):
1532
1533 2013-02-13  Andreas Kling  <akling@apple.com>
1534
1535         Remove Element::getAttributeItem() overload that returned a mutable Attribute*.
1536         <http://webkit.org/b/109756>
1537
1538         Reviewed by Antti Koivisto.
1539
1540         Remove this to prevent callers from accidentally causing elements to convert to UniqueElementData.
1541         There are two call sites (Attr and HTMLSelectElement) that legitimately need to mutate Attribute
1542         objects in-place, they now use Element::ensureUniqueElementData()->getAttributeItem() directly instead.
1543
1544         Small progression on Membuster3, mostly for peace of mind.
1545
1546         * dom/Attr.cpp:
1547         (WebCore::Attr::elementAttribute):
1548         * dom/Element.h:
1549         (Element):
1550         * html/HTMLInputElement.cpp:
1551         (WebCore::HTMLInputElement::updateType):
1552         * html/HTMLSelectElement.cpp:
1553         (WebCore::HTMLSelectElement::parseAttribute):
1554         * svg/SVGStyledElement.cpp:
1555         (WebCore::SVGStyledElement::getPresentationAttribute):
1556
1557 2013-02-13  Andreas Kling  <akling@apple.com>
1558
1559         Stronger ElementData pointer typing.
1560         <http://webkit.org/b/109752>
1561
1562         Reviewed by Antti Koivisto.
1563
1564         Use ShareableElementData/UniqueElementData pointers instead of generic ElementData pointers
1565         where possible. Moved some methods from base class into leaf classes that don't make sense
1566         for both classes.
1567
1568         * dom/DocumentSharedObjectPool.cpp:
1569         (WebCore::ShareableElementDataCacheEntry::ShareableElementDataCacheEntry):
1570         (ShareableElementDataCacheEntry):
1571         (WebCore::DocumentSharedObjectPool::cachedShareableElementDataWithAttributes):
1572         * dom/DocumentSharedObjectPool.h:
1573         (DocumentSharedObjectPool):
1574         * dom/Element.cpp:
1575         (WebCore::Element::parserSetAttributes):
1576         (WebCore::Element::setAttributeNode):
1577         (WebCore::Element::removeAttributeInternal):
1578         (WebCore::Element::cloneAttributesFromElement):
1579         (WebCore::Element::createUniqueElementData):
1580         (WebCore::ShareableElementData::createWithAttributes):
1581         (WebCore::UniqueElementData::create):
1582         (WebCore::ElementData::makeUniqueCopy):
1583         (WebCore::UniqueElementData::makeShareableCopy):
1584         * dom/Element.h:
1585         (ElementData):
1586         (ShareableElementData):
1587         (UniqueElementData):
1588         (Element):
1589         (WebCore::Element::ensureUniqueElementData):
1590         * dom/StyledElement.cpp:
1591         (WebCore::StyledElement::rebuildPresentationAttributeStyle):
1592
1593 2013-02-13  Antti Koivisto  <antti@apple.com>
1594
1595         Reschedule shared CFRunLoopTimer instead of reconstructing it
1596         https://bugs.webkit.org/show_bug.cgi?id=109765
1597
1598         Reviewed by Andreas Kling and Anders Carlsson.
1599
1600         Using CFRunLoopTimerSetNextFireDate is over 2x faster than deleting and reconstructing timers.
1601
1602         * platform/mac/SharedTimerMac.mm:
1603         (WebCore):
1604         (WebCore::PowerObserver::restartSharedTimer):
1605         (WebCore::sharedTimer):
1606         (WebCore::setSharedTimerFireInterval):
1607         (WebCore::stopSharedTimer):
1608
1609 2013-02-13  Emil A Eklund  <eae@chromium.org>
1610
1611         getComputedStyle returns truncated value for margin-right
1612         https://bugs.webkit.org/show_bug.cgi?id=109759
1613
1614         Reviewed by Tony Chang.
1615         
1616         Due to an unfortunate cast in CSSComputedStyleDeclaration::
1617         getPropertyCSSValue getComputedStyle returns truncated styles
1618         for margin-right in cases where it isn't set to a specific pixel
1619         value.
1620
1621         Test: fast/sub-pixel/computedstylemargin.html
1622
1623         * css/CSSComputedStyleDeclaration.cpp:
1624         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1625         Change type of temporary value variable to float to prevent loss of precision.
1626
1627 2013-02-13  Max Vujovic  <mvujovic@adobe.com>
1628
1629         [CSS Filters] Refactor filter outsets into a class
1630         https://bugs.webkit.org/show_bug.cgi?id=109330
1631
1632         Reviewed by Dean Jackson.
1633
1634         In filters related code, we're often operating on 4 ints representing the top, right,
1635         bottom, and left filter outsets. These outsets come from a filter like blur or drop-shadow.
1636         This patch packages those ints and their related operations into a class called
1637         IntRectExtent.
1638
1639         Here are some signs that we should make a class to hold those 4 ints:
1640         1) In RenderLayer.cpp, we have a expandRectForFilterOutsets function, which looks like
1641            feature envy.
1642         2) RenderStyle and other classes have methods like getFilterOutsets which set the 4 ints by
1643            reference. The calling code has to define 4 ints, which looks bloated.
1644         3) To fix bug 109098, we will need to check if filter outsets changed, which sounds like a
1645            nice job for an inequality operator. (https://bugs.webkit.org/show_bug.cgi?id=109098)
1646
1647         No new tests. No change in behavior. Just refactoring.
1648
1649         * GNUmakefile.list.am:
1650         * Target.pri:
1651         * WebCore.gypi:
1652         * WebCore.xcodeproj/project.pbxproj:
1653         * platform/graphics/IntRectExtent.h: Added.
1654         (WebCore):
1655         (IntRectExtent):
1656         (WebCore::IntRectExtent::IntRectExtent):
1657         (WebCore::IntRectExtent::top):
1658         (WebCore::IntRectExtent::setTop):
1659         (WebCore::IntRectExtent::right):
1660         (WebCore::IntRectExtent::setRight):
1661         (WebCore::IntRectExtent::bottom):
1662         (WebCore::IntRectExtent::setBottom):
1663         (WebCore::IntRectExtent::left):
1664         (WebCore::IntRectExtent::setLeft):
1665         (WebCore::IntRectExtent::expandRect):
1666         (WebCore::IntRectExtent::isZero):
1667         (WebCore::operator==):
1668         (WebCore::operator!=):
1669         (WebCore::operator+=):
1670         * platform/graphics/filters/FilterOperations.cpp:
1671         (WebCore::FilterOperations::outsets):
1672         * platform/graphics/filters/FilterOperations.h:
1673         (FilterOperations):
1674         * platform/graphics/texmap/TextureMapperLayer.cpp:
1675         (WebCore::TextureMapperLayer::intermediateSurfaceRect):
1676         * rendering/FilterEffectRenderer.cpp:
1677         (WebCore::FilterEffectRenderer::FilterEffectRenderer):
1678         (WebCore::FilterEffectRenderer::build):
1679         (WebCore::FilterEffectRenderer::computeSourceImageRectForDirtyRect):
1680         * rendering/FilterEffectRenderer.h:
1681         (FilterEffectRenderer):
1682         * rendering/RenderLayer.cpp:
1683         (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
1684         (WebCore::transparencyClipBox):
1685         (WebCore::RenderLayer::calculateLayerBounds):
1686         * rendering/style/RenderStyle.h:
1687
1688 2013-02-13  Adam Barth  <abarth@webkit.org>
1689
1690         Factor HTMLTokenScanner out of HTMLPreloadScanner
1691         https://bugs.webkit.org/show_bug.cgi?id=109754
1692
1693         Reviewed by Eric Seidel.
1694
1695         This patch is just a mechanical separation of the per-token "scanning"
1696         logic from HTMLPreloadScanner into a separate class.
1697         HTMLPreloadScanner's job is now to keep track of the input stream and
1698         to pump the tokenizer.
1699
1700         This factorization class will let us use HTMLTokenScanner on the
1701         background thread (once we finish making it thread-safe). In a follow
1702         up patch, I'll move HTMLTokenScanner to its own file.
1703
1704         * html/parser/HTMLPreloadScanner.cpp:
1705         (WebCore::HTMLTokenScanner::HTMLTokenScanner):
1706         (WebCore::HTMLTokenScanner::~HTMLTokenScanner):
1707         (WebCore::HTMLTokenScanner::processPossibleTemplateTag):
1708         (WebCore::HTMLTokenScanner::processPossibleStyleTag):
1709         (WebCore::HTMLTokenScanner::processPossibleBaseTag):
1710         (WebCore::HTMLTokenScanner::scan):
1711         (WebCore::HTMLPreloadScanner::HTMLPreloadScanner):
1712         (WebCore):
1713         (WebCore::HTMLPreloadScanner::~HTMLPreloadScanner):
1714         (WebCore::HTMLPreloadScanner::appendToEnd):
1715         (WebCore::HTMLPreloadScanner::scan):
1716         * html/parser/HTMLPreloadScanner.h:
1717         (HTMLTokenScanner):
1718         (WebCore::HTMLTokenScanner::setPredictedBaseElementURL):
1719         (HTMLPreloadScanner):
1720         (WebCore):
1721
1722 2013-02-13  Elliott Sprehn  <esprehn@chromium.org>
1723
1724         ASSERT(!renderer()->needsLayout()) when calling Element::focus() with generated content
1725         https://bugs.webkit.org/show_bug.cgi?id=109616
1726
1727         Reviewed by Julien Chaffraix.
1728
1729         Test: fast/css-generated-content/quote-layout-focus-crash.html
1730
1731         In some cases RenderQuote may mark itself and containing blocks as needing layout
1732         during a layout, but then one of it's containing blocks will mark itself as having
1733         finished layout so the RenderQuote and potentially some of it's ancestor renderers
1734         needLayout(), but the ancestors above those do not.
1735
1736         Until we have proper pre-layout tasks we should just walk the list of quotes
1737         right before layout and mark all their ancestors as needing layout if the quote
1738         needs layout.
1739
1740         * dom/Document.cpp:
1741         (WebCore::Document::updateLayout): Call markQuoteContainingBlocksForLayoutIfNeeded.
1742         (WebCore::Document::implicitClose): Call markQuoteContainingBlocksForLayoutIfNeeded.
1743         * rendering/RenderQuote.h:
1744         (WebCore::RenderQuote::next): Added.
1745         * rendering/RenderView.cpp:
1746         (WebCore::RenderView::markQuoteContainingBlocksForLayoutIfNeeded): Added.
1747         * rendering/RenderView.h:
1748         (RenderView):
1749
1750 2013-02-13  Jer Noble  <jer.noble@apple.com>
1751
1752         EME: MediaPlayer::keyNeede() should return a bool indicating whether an event listener was triggered.
1753         https://bugs.webkit.org/show_bug.cgi?id=109701
1754
1755         Reviewed by Eric Carlson.
1756
1757         Clients of MediaPlayer may need to do cleanup if calling keyNeeded()
1758         results in no event listener being triggered. Return a bool (like the
1759         v1 equivalent keyNeeded method) to indicate this.
1760
1761         * html/HTMLMediaElement.cpp:
1762         (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded):
1763         * html/HTMLMediaElement.h:
1764         * platform/graphics/MediaPlayer.cpp:
1765         (WebCore::MediaPlayer::keyNeeded):
1766         * platform/graphics/MediaPlayer.h:
1767         (WebCore::MediaPlayerClient::mediaPlayerKeyNeeded):
1768
1769 2013-02-13  Abhishek Arya  <inferno@chromium.org>
1770
1771         ASSERTION FAILED: !object || object->isBox(), Bad cast in RenderBox::computeLogicalHeight
1772         https://bugs.webkit.org/show_bug.cgi?id=107748
1773
1774         Reviewed by Levi Weintraub.
1775
1776         Make sure that body renderer is not an inline-block display
1777         when determining that it stretches to viewport or when paginated
1778         content needs base height.
1779
1780         Test: fast/block/body-inline-block-crash.html
1781
1782         * rendering/RenderBox.cpp:
1783         (WebCore::RenderBox::computeLogicalHeight):
1784         * rendering/RenderBox.h:
1785         (WebCore::RenderBox::stretchesToViewport):
1786
1787 2013-02-13  Shawn Singh  <shawnsingh@chromium.org>
1788
1789         Fix debug assertion being triggered because we may access dirty normalFlowList.
1790         https://bugs.webkit.org/show_bug.cgi?id=109740
1791
1792         A debug assertion in RenderLayer.h is being hit when trying to
1793         access the normalFlowList when it is dirty.  This is caused by a
1794         new recursion that I added in RenderLayerBacking::hasVisibleNonCompositingDescendant(),
1795         but I overlooked the need to call updateLayerListsIfNeeded()
1796         recursively as well.
1797
1798         Reviewed by Simon Fraser.
1799
1800         No test, because there's no reliable way to test this (same as bug 85512).
1801
1802         * rendering/RenderLayerBacking.cpp:
1803         (WebCore::hasVisibleNonCompositingDescendant):
1804         (WebCore::RenderLayerBacking::hasVisibleNonCompositingDescendantLayers):
1805
1806 2013-02-13  Antti Koivisto  <antti@apple.com>
1807
1808         Don't restart shared timer if both the current and the new fire time are in the past
1809         https://bugs.webkit.org/show_bug.cgi?id=109731
1810
1811         Reviewed by Andreas Kling.
1812
1813         In 40-50% of cases we reschedule the shared timer both the old and the new fire time have already passed. This can happen at least when rescheduling 
1814         a zero duration timer and when stopping a timer that was ready to fire.
1815
1816         We can skip rescheduling in this case, the shared timer will fire immediately anyway.
1817         
1818         Scheduling timers calls into platform layer and can be slow. This about halves the time under setSharedTimerFireInterval in PLT3
1819         for ~0.1% total CPU time reduction.
1820
1821         * platform/ThreadTimers.cpp:
1822         (WebCore::ThreadTimers::ThreadTimers):
1823         (WebCore::ThreadTimers::setSharedTimer):
1824         (WebCore::ThreadTimers::updateSharedTimer):
1825         (WebCore::ThreadTimers::sharedTimerFiredInternal):
1826         * platform/ThreadTimers.h:
1827         (ThreadTimers):
1828
1829 2013-02-13  Zan Dobersek  <zdobersek@igalia.com>
1830
1831         The 'global isinf/isnan' compiler quirk required when using clang with libstdc++
1832         https://bugs.webkit.org/show_bug.cgi?id=109325
1833
1834         Reviewed by Anders Carlsson.
1835
1836         Prefix calls to the isinf and isnan methods with std::, declaring we want to use the
1837         two methods as they're provided by the C++ standard library being used.
1838
1839         No new tests as there's no change in functionality.
1840
1841         * Modules/mediasource/MediaSource.cpp:
1842         (WebCore::MediaSource::setDuration):
1843         * Modules/webaudio/AudioBufferSourceNode.cpp:
1844         (WebCore::AudioBufferSourceNode::totalPitchRate):
1845         * Modules/webaudio/AudioParam.cpp:
1846         (WebCore::AudioParam::setValue):
1847         * Modules/webaudio/AudioParamTimeline.cpp:
1848         (WebCore::isValidNumber):
1849         * Modules/webaudio/PannerNode.cpp:
1850         (WebCore::fixNANs):
1851         * bindings/js/IDBBindingUtilities.cpp:
1852         (WebCore::createIDBKeyFromValue):
1853         * bindings/js/JSDataViewCustom.cpp:
1854         (WebCore::getDataViewMember):
1855         * bindings/js/JSGeolocationCustom.cpp:
1856         (WebCore::setTimeout):
1857         (WebCore::setMaximumAge):
1858         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
1859         (WebCore::JSHTMLOptionsCollection::setLength):
1860         * bindings/js/JSWebKitPointCustom.cpp:
1861         (WebCore::JSWebKitPointConstructor::constructJSWebKitPoint):
1862         * bindings/scripts/CodeGeneratorJS.pm:
1863         (GenerateImplementation):
1864         (GenerateParametersCheck):
1865         * bindings/scripts/CodeGeneratorV8.pm:
1866         (GenerateParametersCheck):
1867         * bindings/scripts/test/JS/JSFloat64Array.cpp:
1868         (WebCore::JSFloat64Array::getByIndex):
1869         * bindings/scripts/test/JS/JSTestObj.cpp:
1870         (WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
1871         * bindings/scripts/test/V8/V8TestObj.cpp:
1872         (WebCore::TestObjV8Internal::classMethodWithClampCallback):
1873         * bindings/v8/IDBBindingUtilities.cpp:
1874         (WebCore::createIDBKeyFromValue):
1875         * bindings/v8/V8Binding.cpp:
1876         (WebCore::toInt32):
1877         (WebCore::toUInt32):
1878         * bindings/v8/custom/V8GeolocationCustom.cpp:
1879         (WebCore::createPositionOptions):
1880         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
1881         (WebCore::V8HTMLOptionsCollection::lengthAccessorSetter):
1882         * bindings/v8/custom/V8WebKitPointCustom.cpp:
1883         (WebCore::V8WebKitPoint::constructorCallbackCustom):
1884         * bridge/qt/qt_runtime.cpp:
1885         (JSC::Bindings::convertValueToQVariant):
1886         * css/WebKitCSSMatrix.cpp:
1887         (WebCore::WebKitCSSMatrix::translate):
1888         (WebCore::WebKitCSSMatrix::scale):
1889         (WebCore::WebKitCSSMatrix::rotate):
1890         (WebCore::WebKitCSSMatrix::rotateAxisAngle):
1891         (WebCore::WebKitCSSMatrix::skewX):
1892         (WebCore::WebKitCSSMatrix::skewY):
1893         * html/HTMLMediaElement.cpp:
1894         (WebCore::HTMLMediaElement::percentLoaded):
1895         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
1896         (WebCore::HTMLMediaElement::endedPlayback):
1897         * html/MediaController.cpp:
1898         (MediaController::duration):
1899         * html/canvas/WebGLRenderingContext.cpp:
1900         (WebCore):
1901         (WebCore::WebGLRenderingContext::clearColor):
1902         * html/track/TextTrack.cpp:
1903         (WebCore::TextTrack::addCue):
1904         * html/track/TextTrackCue.cpp:
1905         (WebCore::TextTrackCue::setStartTime):
1906         (WebCore::TextTrackCue::setEndTime):
1907         * page/DOMWindow.cpp:
1908         (WebCore::DOMWindow::adjustWindowRect):
1909         * page/WindowFeatures.cpp:
1910         (WebCore::WindowFeatures::floatFeature): Also include an opportunistic style fix.
1911         * platform/CalculationValue.cpp:
1912         (WebCore::CalculationValue::evaluate):
1913         * platform/Decimal.cpp:
1914         (WebCore::Decimal::fromDouble):
1915         * platform/Length.cpp:
1916         (WebCore::Length::nonNanCalculatedValue):
1917         * platform/audio/AudioResampler.cpp:
1918         (WebCore::AudioResampler::setRate):
1919         * platform/audio/DynamicsCompressorKernel.cpp:
1920         (WebCore::DynamicsCompressorKernel::process):
1921         * platform/audio/Reverb.cpp:
1922         (WebCore::calculateNormalizationScale):
1923         * platform/graphics/Font.cpp:
1924         (WebCore::Font::width):
1925         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1926         (WebCore::MediaPlayerPrivateAVFoundation::isLiveStream):
1927         * platform/graphics/gpu/LoopBlinnMathUtils.cpp:
1928         (LoopBlinnMathUtils):
1929         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1930         (WebCore::MediaPlayerPrivateGStreamer::buffered):
1931         (WebCore::MediaPlayerPrivateGStreamer::maxTimeSeekable):
1932         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1933         (WebCore::MediaPlayerPrivateQTKit::maxTimeSeekable):
1934         * platform/graphics/opentype/OpenTypeVerticalData.cpp:
1935         (WebCore::OpenTypeVerticalData::getVerticalTranslationsForGlyphs):
1936         * platform/graphics/transforms/TransformationMatrix.cpp:
1937         (WebCore::clampEdgeValue):
1938         (WebCore::TransformationMatrix::clampedBoundsOfProjectedQuad):
1939         * platform/network/ResourceResponseBase.cpp:
1940         (WebCore::ResourceResponseBase::parseCacheControlDirectives):
1941         * rendering/RenderMediaControlsChromium.cpp:
1942         (WebCore::paintMediaSlider):
1943         (WebCore::paintMediaVolumeSlider):
1944         * rendering/RenderThemeMac.mm:
1945         (WebCore::RenderThemeMac::paintMediaSliderTrack):
1946         * svg/SVGAnimationElement.cpp:
1947         (WebCore::SVGAnimationElement::beginElementAt):
1948         (WebCore::SVGAnimationElement::endElementAt):
1949         * svg/SVGSVGElement.cpp:
1950         (WebCore::SVGSVGElement::setCurrentTime):
1951         * svg/animation/SMILTime.h:
1952         (WebCore::SMILTime::SMILTime):
1953         * svg/animation/SVGSMILElement.cpp:
1954         (WebCore::SVGSMILElement::addBeginTime):
1955         (WebCore::SVGSMILElement::addEndTime):
1956         * xml/XPathFunctions.cpp:
1957         (WebCore::XPath::FunSubstring::evaluate):
1958         (WebCore::XPath::FunRound::round):
1959         * xml/XPathValue.cpp:
1960         (WebCore::XPath::Value::toBoolean): Also include an opportunistic style fix.
1961         (WebCore::XPath::Value::toString):
1962
1963 2013-02-13  Eric Carlson  <eric.carlson@apple.com>
1964
1965         [Mac] Caption menu should have only one item selected
1966         https://bugs.webkit.org/show_bug.cgi?id=109730
1967
1968         Reviewed by Dean Jackson.
1969
1970         No new tests, media/track/track-user-preferences.html was modified to test the changes.
1971
1972         * CMakeLists.txt: Add CaptionUserPreferences.cpp.
1973         * GNUmakefile.list.am: Ditto.
1974         * Target.pri: Ditto.
1975         * WebCore.gypi: Ditto.
1976         * WebCore.vcproj/WebCore.vcproj: Ditto.
1977         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
1978         * WebCore.xcodeproj/project.pbxproj: Ditto.
1979
1980         * html/HTMLMediaElement.cpp:
1981         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_processingPreferenceChange.
1982         (WebCore::HTMLMediaElement::configureTextTrackGroup): Only end up with one selected track when
1983             called because of a preferences change.
1984         (WebCore::HTMLMediaElement::captionPreferencesChanged): Call setClosedCaptionsVisible instead
1985             of calling markCaptionAndSubtitleTracksAsUnconfigured directly.
1986         (WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured): Process all tracks, 
1987             not just track elements.
1988         * html/HTMLMediaElement.h:
1989
1990         * page/CaptionUserPreferences.cpp: Added so the functionality can be tested in DRT.
1991         (WebCore::CaptionUserPreferences::registerForPreferencesChangedCallbacks):
1992         (WebCore::CaptionUserPreferences::unregisterForPreferencesChangedCallbacks):
1993         (WebCore::CaptionUserPreferences::setUserPrefersCaptions):
1994         (WebCore::CaptionUserPreferences::captionPreferencesChanged):
1995         (WebCore::CaptionUserPreferences::preferredLanguages):
1996         (WebCore::CaptionUserPreferences::setPreferredLanguage):
1997         (WebCore::CaptionUserPreferences::displayNameForTrack):
1998         * page/CaptionUserPreferences.h:
1999
2000         * page/CaptionUserPreferencesMac.h:
2001         * page/CaptionUserPreferencesMac.mm:
2002         (WebCore::CaptionUserPreferencesMac::registerForPreferencesChangedCallbacks): Moved some logic
2003             to base class.
2004         (WebCore::CaptionUserPreferencesMac::captionPreferencesChanged): Ditto.
2005
2006 2013-02-13  Hans Muller  <hmuller@adobe.com>
2007
2008         [CSS Exclusions] ExclusionPolygon reflex vertices should constrain the first fit location.
2009         https://bugs.webkit.org/show_bug.cgi?id=107568
2010
2011         Reviewed by Dirk Schulze.
2012
2013         The ExclusionPolygon::firstIncludedIntervalLogicalTop() method now includes offset edges
2014         for each of the polygon's reflex vertices. The motivation for this change is explained
2015         here: http://hansmuller-webkit.blogspot.com/2013/01/getting-to-point-reflex-vertices.html.
2016
2017         Test: fast/exclusions/shape-inside/shape-inside-first-fit-reflex.html
2018
2019         * rendering/ExclusionPolygon.cpp:
2020         (WebCore::isReflexVertex): Given three vertices that represent a pair of connected polygon edges, return true if the second vertex is a reflex vertex.
2021         (WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop): This method now includes offset edges for reflex vertices.
2022         * rendering/ExclusionPolygon.h:
2023         (WebCore::OffsetPolygonEdge::OffsetPolygonEdge): Added a constructor for creating an OffsetPolygonEdge given a reflex vertex.
2024         (WebCore::OffsetPolygonEdge::edgeIndex): Changed this property from unsigned to int. Now using -1 to indicate that the offset edge doesn't correspond to a single polygon edge.
2025
2026 2013-02-13  Adam Barth  <abarth@webkit.org>
2027
2028         CSSPreloadScanner should not depend on HTMLToken
2029         https://bugs.webkit.org/show_bug.cgi?id=109742
2030
2031         Reviewed by Eric Seidel.
2032
2033         There's no need for the CSSPreloadScanner to depend on HTMLToken. On
2034         the background thread, we'll likely want to use a CompactHTMLToken for
2035         preload scanning, so this dependency is problematic. This patch also
2036         teaches the CSSPreloadScanner how to scan LChars.
2037
2038         * html/parser/CSSPreloadScanner.cpp:
2039         (WebCore::CSSPreloadScanner::~CSSPreloadScanner):
2040         (WebCore):
2041         (WebCore::CSSPreloadScanner::scan):
2042         * html/parser/CSSPreloadScanner.h:
2043         (CSSPreloadScanner):
2044         * html/parser/HTMLPreloadScanner.cpp:
2045         (WebCore::HTMLPreloadScanner::processToken):
2046
2047 2013-02-13  Julien Chaffraix  <jchaffraix@webkit.org>
2048
2049         [CSS Grid Layout] Adding or removing grid items doesn't properly recompute the track sizes
2050         https://bugs.webkit.org/show_bug.cgi?id=109100
2051
2052         Reviewed by Ojan Vafai.
2053
2054         Test: fast/css-grid-layout/grid-item-removal-track-breadth-update.html
2055
2056         The test uncovered several bugs in our implementation that is fixed as part
2057         of this change. They will be detailed below.
2058
2059         * rendering/RenderGrid.cpp:
2060         (WebCore::RenderGrid::logicalContentHeightForChild):
2061         Added this function to share the code between minContentForChild and maxContentForChild.
2062         Also forced a relayout in this case to avoid getting a wrong answer (e.g. the logical height
2063         constrained by the previous layout's grid breadth).
2064
2065         (WebCore::RenderGrid::minContentForChild):
2066         (WebCore::RenderGrid::maxContentForChild):
2067         Updated to use logicalContentHeightForChild.
2068
2069         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
2070         Updated to match the specification and set max breadth to current breadth per the specification.
2071         This made us over-grow some cases in the test.
2072
2073         (WebCore::RenderGrid::distributeSpaceToTracks):
2074         Updated to match the specification and use an extra variable to do the intermediate spreading. Also removed
2075         a now unneeded max. This fixes the case of multiple grid items in the same grid area that was completely broken.
2076
2077         (WebCore::RenderGrid::layoutGridItems):
2078         Added a FIXME about always relaying out content sized tracks' children.
2079
2080         * rendering/RenderGrid.h:
2081         Added logicalContentHeightForChild.
2082
2083 2013-02-13  Adam Barth  <abarth@webkit.org>
2084
2085         Clean up some style nits in HTMLPreloadScanner
2086         https://bugs.webkit.org/show_bug.cgi?id=109738
2087
2088         Reviewed by Tony Gentilcore.
2089
2090         This patch just fixes a few style nits I noticed when reading through
2091         the code.
2092
2093         * html/parser/HTMLPreloadScanner.cpp:
2094         (WebCore::StartTagScanner::StartTagScanner):
2095         (WebCore::HTMLPreloadScanner::processPossibleStyleTag):
2096         (WebCore::HTMLPreloadScanner::processPossibleBaseTag):
2097         * html/parser/HTMLResourcePreloader.cpp:
2098         (WebCore::PreloadRequest::isSafeToSendToAnotherThread):
2099         * html/parser/HTMLResourcePreloader.h:
2100         (PreloadRequest):
2101         (WebCore::PreloadRequest::PreloadRequest):
2102         (WebCore::HTMLResourcePreloader::HTMLResourcePreloader):
2103
2104 2013-02-13  Sheriff Bot  <webkit.review.bot@gmail.com>
2105
2106         Unreviewed, rolling out r142747.
2107         http://trac.webkit.org/changeset/142747
2108         https://bugs.webkit.org/show_bug.cgi?id=109746
2109
2110         broke component build (Requested by alecf_gardening on
2111         #webkit).
2112
2113         * inspector/HeapGraphSerializer.cpp:
2114         (WebCore::HeapGraphSerializer::HeapGraphSerializer):
2115         (WebCore::HeapGraphSerializer::pushUpdate):
2116         (WebCore::HeapGraphSerializer::reportNode):
2117         (WebCore::HeapGraphSerializer::toNodeId):
2118         (WebCore::HeapGraphSerializer::addRootNode):
2119         * inspector/HeapGraphSerializer.h:
2120         (WebCore):
2121         (HeapGraphSerializer):
2122         * inspector/InspectorMemoryAgent.cpp:
2123         (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
2124
2125 2013-02-13  Levi Weintraub  <leviw@chromium.org>
2126
2127         Bidi-Isolated inlines can cause subsequent content to not be rendered
2128         https://bugs.webkit.org/show_bug.cgi?id=108137
2129
2130         Reviewed by Eric Seidel.
2131
2132         First step in fixing how inline isolates behave with collapsed spaces.
2133         webkit.org/b/109624 tracks the overarching issue.
2134
2135         Test: fast/text/content-following-inline-isolate-with-collapsed-whitespace.html
2136
2137         * rendering/InlineIterator.h:
2138         (WebCore::IsolateTracker::addFakeRunIfNecessary): If we enter an isolate while
2139         ignoring spaces, ensure we leave it considering them again. This can result in
2140         including spaces that should be ignored following the isolate on the line, but
2141         failing to do so results in those contents not being rendered at all.
2142
2143 2013-02-13  Andreas Kling  <akling@apple.com>
2144
2145         Better names for ElementAttributeData & subclasses.
2146         <http://webkit.org/b/109529>
2147
2148         Reviewed by Antti Koivisto.
2149
2150         - ElementAttributeData => ElementData
2151
2152             Because ElementAttributeData won't be a good name once we move some non-attribute related
2153             things to this structure.
2154
2155         - ImmutableElementAttributeData => ShareableElementData
2156
2157             These objects can be shared with other Elements that have the same attribute name/value pairs.
2158
2159         - MutableElementAttributeData => UniqueElementData
2160
2161             These objects contain data that is unique to a specific Element, and cannot be shared with
2162             other Elements. This is what's important about it, not that its underlying storage is mutable.
2163
2164         - attributeData() -> elementData()
2165         - updatedAttributeData() -> elementDataWithSynchronizedAttributes()
2166         - ensureUpdatedAttributeData() -> ensureElementDataWithSynchronizedAttributes()
2167         - mutableAttributeData() -> ensureUniqueElementData()
2168
2169             Ride-along renames. Much less vague than previous names IMO.
2170
2171         * css/StyleResolver.cpp:
2172         (WebCore::StyleResolver::canShareStyleWithControl):
2173         (WebCore::StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes):
2174         * dom/Attr.cpp:
2175         (WebCore::Attr::elementAttribute):
2176         * dom/DocumentSharedObjectPool.cpp:
2177         (WebCore::ShareableElementDataCacheKey::ShareableElementDataCacheKey):
2178         (WebCore::ShareableElementDataCacheKey::operator!=):
2179         (WebCore::ShareableElementDataCacheEntry::ShareableElementDataCacheEntry):
2180         (ShareableElementDataCacheEntry):
2181         (WebCore::DocumentSharedObjectPool::cachedShareableElementDataWithAttributes):
2182         * dom/DocumentSharedObjectPool.h:
2183         (DocumentSharedObjectPool):
2184         * dom/Element.cpp:
2185         (WebCore::Element::detachAttribute):
2186         (WebCore::Element::removeAttribute):
2187         (WebCore::Element::attributes):
2188         (WebCore::Element::getAttribute):
2189         (WebCore::Element::setAttribute):
2190         (WebCore::Element::setSynchronizedLazyAttribute):
2191         (WebCore::Element::setAttributeInternal):
2192         (WebCore::Element::attributeChanged):
2193         (WebCore::Element::classAttributeChanged):
2194         (WebCore::Element::shouldInvalidateDistributionWhenAttributeChanged):
2195         (WebCore::Element::parserSetAttributes):
2196         (WebCore::Element::hasAttributes):
2197         (WebCore::Element::hasEquivalentAttributes):
2198         (WebCore::Element::setAttributeNode):
2199         (WebCore::Element::removeAttributeNode):
2200         (WebCore::Element::removeAttributeInternal):
2201         (WebCore::Element::addAttributeInternal):
2202         (WebCore::Element::getAttributeNode):
2203         (WebCore::Element::getAttributeNodeNS):
2204         (WebCore::Element::hasAttribute):
2205         (WebCore::Element::hasAttributeNS):
2206         (WebCore::Element::computeInheritedLanguage):
2207         (WebCore::Element::getURLAttribute):
2208         (WebCore::Element::getNonEmptyURLAttribute):
2209         (WebCore::Element::cloneAttributesFromElement):
2210         (WebCore::Element::createUniqueElementData):
2211         (WebCore::Element::reportMemoryUsage):
2212         (WebCore::ElementData::deref):
2213         (WebCore::ElementData::ElementData):
2214         (WebCore::sizeForShareableElementDataWithAttributeCount):
2215         (WebCore::ElementData::createShareableWithAttributes):
2216         (WebCore::ElementData::createUnique):
2217         (WebCore::ShareableElementData::ShareableElementData):
2218         (WebCore::ShareableElementData::~ShareableElementData):
2219         (WebCore::UniqueElementData::UniqueElementData):
2220         (WebCore::ElementData::makeMutableCopy):
2221         (WebCore::ElementData::makeImmutableCopy):
2222         (WebCore::ElementData::setPresentationAttributeStyle):
2223         (WebCore::ElementData::addAttribute):
2224         (WebCore::ElementData::removeAttribute):
2225         (WebCore::ElementData::isEquivalent):
2226         (WebCore::ElementData::reportMemoryUsage):
2227         (WebCore::ElementData::getAttributeItemIndexSlowCase):
2228         * dom/Element.h:
2229         (ElementData):
2230         (WebCore::ElementData::isUnique):
2231         (ShareableElementData):
2232         (UniqueElementData):
2233         (WebCore::Element::getAttributeItemIndex):
2234         (WebCore::Element::elementData):
2235         (Element):
2236         (WebCore::Element::elementDataWithSynchronizedAttributes):
2237         (WebCore::Element::ensureElementDataWithSynchronizedAttributes):
2238         (WebCore::Element::fastHasAttribute):
2239         (WebCore::Element::fastGetAttribute):
2240         (WebCore::Element::hasAttributesWithoutUpdate):
2241         (WebCore::Element::idForStyleResolution):
2242         (WebCore::Element::classNames):
2243         (WebCore::Element::attributeCount):
2244         (WebCore::Element::attributeItem):
2245         (WebCore::Element::getAttributeItem):
2246         (WebCore::Element::updateInvalidAttributes):
2247         (WebCore::Element::hasID):
2248         (WebCore::Element::hasClass):
2249         (WebCore::Element::ensureUniqueElementData):
2250         (WebCore::ElementData::mutableAttributeVector):
2251         (WebCore::ElementData::immutableAttributeArray):
2252         (WebCore::ElementData::length):
2253         (WebCore::ElementData::presentationAttributeStyle):
2254         (WebCore::ElementData::getAttributeItem):
2255         (WebCore::ElementData::getAttributeItemIndex):
2256         (WebCore::ElementData::attributeItem):
2257         * dom/Node.cpp:
2258         (WebCore::Node::dumpStatistics):
2259         (WebCore::Node::compareDocumentPosition):
2260         * dom/StyledElement.cpp:
2261         (WebCore::StyledElement::updateStyleAttribute):
2262         (WebCore::StyledElement::ensureMutableInlineStyle):
2263         (WebCore::StyledElement::attributeChanged):
2264         (WebCore::StyledElement::inlineStyleCSSOMWrapper):
2265         (WebCore::StyledElement::setInlineStyleFromString):
2266         (WebCore::StyledElement::styleAttributeChanged):
2267         (WebCore::StyledElement::inlineStyleChanged):
2268         (WebCore::StyledElement::addSubresourceAttributeURLs):
2269         (WebCore::StyledElement::rebuildPresentationAttributeStyle):
2270         * dom/StyledElement.h:
2271         (WebCore::StyledElement::inlineStyle):
2272         (WebCore::StyledElement::invalidateStyleAttribute):
2273         (WebCore::StyledElement::presentationAttributeStyle):
2274         * html/ClassList.cpp:
2275         (WebCore::ClassList::classNames):
2276         * html/HTMLInputElement.cpp:
2277         (WebCore::HTMLInputElement::updateType):
2278         * html/parser/HTMLConstructionSite.cpp:
2279         (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
2280         * svg/SVGElement.cpp:
2281         (WebCore::SVGElement::updateAnimatedSVGAttribute):
2282         * svg/SVGElement.h:
2283         (WebCore::SVGElement::invalidateSVGAttributes):
2284         * xml/parser/XMLDocumentParserQt.cpp:
2285         (WebCore::XMLDocumentParser::XMLDocumentParser):
2286
2287 2013-02-13  Christian Biesinger  <cbiesinger@chromium.org>
2288
2289         Crash when encountering <object style="resize:both;">
2290         https://bugs.webkit.org/show_bug.cgi?id=109728
2291
2292         See also https://code.google.com/p/chromium/issues/detail?id=175535
2293         This bug can be reproduced on
2294         http://dramalink.net/tudou.y/?xink=162601060
2295
2296         Reviewed by Eric Seidel.
2297
2298         Test: fast/css/resize-object-crash.html
2299
2300         * rendering/RenderWidget.cpp:
2301         (WebCore::RenderWidget::paint):
2302         Only call paintResizer() if we have a layer and canResize() is true
2303
2304 2013-02-13  Arko Saha  <arko@motorola.com>
2305
2306         [Microdata] HTMLPropertiesCollection code cleanup
2307         https://bugs.webkit.org/show_bug.cgi?id=109721
2308
2309         Reviewed by Ryosuke Niwa.
2310
2311         Removed forward declaration of DOMStringList class.
2312         Removed unused findRefElements() method declaration.
2313         Also Removed unused parameter Element* from updatePropertyCache() method.
2314
2315         No new test since no change in behavior.
2316
2317         * html/HTMLPropertiesCollection.cpp:
2318         (WebCore::HTMLPropertiesCollection::updateNameCache):
2319         * html/HTMLPropertiesCollection.h:
2320         (WebCore):
2321         (HTMLPropertiesCollection):
2322         (WebCore::HTMLPropertiesCollection::updatePropertyCache):
2323
2324 2013-02-13  Kondapally Kalyan  <kalyan.kondapally@intel.com>
2325
2326         [WebGL][EFL][GTK][Qt]Add support for OES_vertex_array_object.
2327         https://bugs.webkit.org/show_bug.cgi?id=109382
2328
2329         Reviewed by Kenneth Russell.
2330
2331         Covered by fast/canvas/webgl/oes-vertex-array-object.html
2332
2333         This patch adds support for using Vertex Array Object with OpenGl.
2334         The patch adds support for loading necessary opengl functions
2335         and support for checking GL_ARB_vertex_array_object. The support
2336         for OES_vertex_array_object is advertised if GL_ARB_vertex_array_object is
2337         supported.
2338
2339         * platform/graphics/OpenGLShims.cpp:
2340         (WebCore::initializeOpenGLShims):
2341         * platform/graphics/OpenGLShims.h:
2342         (_OpenGLFunctionTable):
2343         Added support for loading the necessary functions.
2344
2345         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
2346         (WebCore::Extensions3DOpenGL::createVertexArrayOES):
2347         (WebCore::Extensions3DOpenGL::deleteVertexArrayOES):
2348         (WebCore::Extensions3DOpenGL::isVertexArrayOES):
2349         (WebCore::Extensions3DOpenGL::bindVertexArrayOES):
2350         (WebCore::Extensions3DOpenGL::supportsExtension):
2351
2352         (WebCore):
2353         (WebCore::Extensions3DOpenGL::isVertexArrayObjectSupported):
2354         * platform/graphics/opengl/Extensions3DOpenGL.h:
2355         (Extensions3DOpenGL):
2356
2357 2013-02-13  Eberhard Graether  <egraether@google.com>
2358
2359         chromium: remove CompositorHUDFontAtlas
2360         https://bugs.webkit.org/show_bug.cgi?id=109328
2361
2362         Reviewed by James Robinson.
2363
2364         After switching the HudLayer to use skia's font rendering the
2365         CompositorHUDFontAtlas has become obsolete. This change removes
2366         this class and the related WebLayerTreeView API.
2367
2368         No new tests.
2369
2370         * WebCore.gypi:
2371         * platform/graphics/chromium/CompositorHUDFontAtlas.cpp: Removed.
2372         * platform/graphics/chromium/CompositorHUDFontAtlas.h: Removed.
2373
2374 2013-02-13  Dean Jackson  <dino@apple.com>
2375
2376         Small update to speech bubble for captions menu [Mac]
2377         https://bugs.webkit.org/show_bug.cgi?id=109641
2378
2379         Reviewed by Eric Carlson
2380
2381         Small adjustment to the embedded SVG that draws a speech bubble
2382         for the captions button. Remove a polygon that was so small
2383         it looked like a rendering error.
2384
2385         * css/mediaControlsQuickTime.css:
2386         (video::-webkit-media-controls-toggle-closed-captions-button):
2387
2388 2013-02-13  Dean Jackson  <dino@apple.com>
2389
2390         Clicking outside captions menu should dismiss it
2391         https://bugs.webkit.org/show_bug.cgi?id=109648
2392
2393         Reviewed by Eric Carlson.
2394
2395         Add a virtual override to the platform-specific
2396         defaultEventHandler to intercept any click in the controls,
2397         and hide the captions menu if it is showing.
2398
2399         Test: media/video-controls-captions-trackmenu-hide-on-click.html
2400
2401         * html/shadow/MediaControlsApple.cpp:
2402         (WebCore::MediaControlsApple::defaultEventHandler): Override from MediaControls. Hide
2403             captions menu if a click event comes in.
2404         * html/shadow/MediaControlsApple.h:
2405
2406 2013-02-13  Tommy Widenflycht  <tommyw@google.com>
2407
2408         MediaStream API: Use the source id when creating new tracks
2409         https://bugs.webkit.org/show_bug.cgi?id=109688
2410
2411         Reviewed by Adam Barth.
2412
2413         This patch reuses the ids from the source when creating tracks instead of creating a new one.
2414         This was requested by the chromium port to greatly simplify their implementation.
2415         In the longer run the API should be rewritten to only use tracks instead of sources.
2416
2417         Covered by existing tests.
2418
2419         * platform/chromium/support/WebMediaStream.cpp:
2420         (WebKit::WebMediaStream::audioTracks):
2421         (WebKit::WebMediaStream::videoTracks):
2422         (WebKit::WebMediaStream::initialize):
2423         (WebKit):
2424         * platform/chromium/support/WebMediaStreamTrack.cpp:
2425         (WebKit::WebMediaStreamTrack::initialize):
2426         (WebKit):
2427         * platform/mediastream/MediaStreamComponent.h:
2428         (WebCore::MediaStreamComponent::create):
2429         (MediaStreamComponent):
2430         (WebCore::MediaStreamComponent::MediaStreamComponent):
2431         (WebCore):
2432         * platform/mediastream/MediaStreamDescriptor.h:
2433         (WebCore::MediaStreamDescriptor::create):
2434         (MediaStreamDescriptor):
2435         (WebCore::MediaStreamDescriptor::MediaStreamDescriptor):
2436
2437 2013-02-13  Eric Seidel  <eric@webkit.org>
2438
2439         Use fancy new Vector-based String constructors in the WebVTT parser
2440         https://bugs.webkit.org/show_bug.cgi?id=109619
2441
2442         Reviewed by Benjamin Poulain.
2443
2444         No change in behavior. Added some FIXMEs for future perf optimization.
2445
2446         * html/track/WebVTTParser.cpp:
2447         (WebCore::WebVTTParser::constructTreeFromToken):
2448
2449 2013-02-13  Morten Stenshorne  <mstensho@opera.com>
2450
2451         WebKit ignores column-rules wider than column-gap
2452         https://bugs.webkit.org/show_bug.cgi?id=15553
2453
2454         Paint column rules even if they are wider than the gap.
2455         Rules wider than the gap should just overlap with column contents.
2456
2457         Reviewed by Eric Seidel.
2458
2459         Test: fast/multicol/rule-thicker-than-gap.html
2460
2461         * rendering/RenderBlock.cpp:
2462         (WebCore::RenderBlock::paintColumnRules):
2463
2464 2013-02-13  Philip Rogers  <pdr@google.com>
2465
2466         Replace SVG bitmap cache with directly-rendered SVG
2467         https://bugs.webkit.org/show_bug.cgi?id=106159
2468
2469         Reviewed by Tim Horton.
2470
2471         This patch removes the caching of SVG bitmaps so SVG images are rendered directly. This
2472         enables WebKit to pass the IE Chalkboard demo in 10s on a Z620:
2473         http://ie.microsoft.com/testdrive/Performance/Chalkboard/
2474
2475         On a simple scaled SVG benchmark similar to the IE10 Chalkboard demo
2476         (http://philbit.com/SvgImagePerformance/viewport.html):
2477             without patch: ~20FPS
2478             with patch: ~55FPS
2479
2480         The bitmap SVG image cache had several shortcomings:
2481             - The bitmap cache prevented viewport rendering. (WK104693)
2482             - Bitmap memory usage was high. (WK106484)
2483             - Caching animating images was expensive.
2484
2485         This change removes almost all of the SVGImageCache implementation, replacing it with
2486         directly-rendered SVG. Instead of caching bitmaps, an SVGImageForContainer is cached which
2487         is a thin wrapper around an SVG image with the associated container size and scale.
2488         When rendering patterns (e.g., tiled backgrounds), a temporary bitmap is used for
2489         performance. This change also removes the redraw timer of the old cache, instead relying
2490         on the SVG image to notify clients if the image changes (e.g., during animations).
2491
2492         This patch fixes two existing bugs (WK99481 and WK104189) that were due to caching bitmaps
2493         at a fixed size. A test has been added for each of these bugs.
2494
2495         Tests: svg/as-image/svg-image-scaled.html
2496                svg/as-image/svg-image-viewbox.html
2497
2498         * CMakeLists.txt:
2499         * GNUmakefile.list.am:
2500         * Target.pri:
2501         * WebCore.gypi:
2502         * WebCore.vcproj/WebCore.vcproj:
2503         * WebCore.xcodeproj/project.pbxproj:
2504         * loader/cache/CachedImage.cpp:
2505         (WebCore::CachedImage::lookupOrCreateImageForRenderer):
2506         (WebCore::CachedImage::setContainerSizeForRenderer):
2507         (WebCore::CachedImage::clear):
2508         (WebCore::CachedImage::changedInRect):
2509
2510             SVG images are no longer special-cased here. When the SVG image changes, users are
2511             notified through this function, and users can then request their content to be redrawn.
2512
2513         * svg/graphics/SVGImage.cpp:
2514         (WebCore::SVGImage::setContainerSize):
2515         (WebCore::SVGImage::drawForContainer):
2516
2517             drawForContainer lays out the SVG content for a specific container size and renders it.
2518             The logic is fairly straightforward but a note about the scales and zooms here:
2519                 the destination rect parameter is zoomed but not scaled
2520                 the source rect parameter is zoomed but not scaled
2521                 the context is scaled but not zoomed
2522             SVGImage::draw(...) only accepts a source and destination rect but does not consider
2523             scale or zoom. Therefore, drawForContainer removes the zoom component from the source
2524             so SVGImage::draw(...) will draw from the pre-zoom source to the post-zoom destination.
2525
2526         (WebCore::SVGImage::drawPatternForContainer):
2527
2528             For performance, drawPatternForContainer renders the SVG content onto a bitmap, then
2529             has the bitmap image draw the pattern. This is necessary because drawPattern is used
2530             for tiling.
2531
2532         (WebCore):
2533         (WebCore::SVGImage::startAnimation):
2534         (WebCore::SVGImage::stopAnimation):
2535         (WebCore::SVGImage::resetAnimation):
2536         (WebCore::SVGImage::reportMemoryUsage):
2537         * svg/graphics/SVGImage.h:
2538         (WebCore):
2539         (SVGImage):
2540         * svg/graphics/SVGImageCache.cpp:
2541
2542             Instead of storing a SizeAndScales values for each renderer, a SVGImageForContainer
2543             is stored which is just a thin wrapper around an SVG image that contains container
2544             sizing information. By combining the image and size information, the two maps of
2545             SVGImageCache have been merged into one.
2546
2547             To make this patch easier to review, SVGImageCache still exists and works similar to
2548             how it did before the patch. Now, SVGImageCache simply stores the SVGImageForContainers.
2549             In a followup patch it will be removed.
2550
2551             Note: the redraw timer of SVGImageCache has been removed because animation
2552             invalidation is now properly propagated back to the image clients.
2553
2554         (WebCore):
2555         (WebCore::SVGImageCache::SVGImageCache):
2556         (WebCore::SVGImageCache::~SVGImageCache):
2557         (WebCore::SVGImageCache::removeClientFromCache):
2558         (WebCore::SVGImageCache::setContainerSizeForRenderer):
2559         (WebCore::SVGImageCache::imageSizeForRenderer):
2560
2561             Previously, this function returned the scaled image size which was incorrect. The image
2562             size is used by clients such as GraphicsContext2D to determine the source size
2563             for drawing the image. draw() accepts zoomed but not scaled values, so this has been
2564             changed.
2565
2566         (WebCore::SVGImageCache::imageForRenderer):
2567
2568             A FIXME has been added here to not set the scale on every lookup. This can be improved
2569             by setting the page scale factor in setContainerSizeForRenderer() in a future patch.
2570
2571         * svg/graphics/SVGImageCache.h:
2572         (WebCore):
2573         (SVGImageCache):
2574         * svg/graphics/SVGImageForContainer.cpp: Added.
2575         (WebCore):
2576
2577             SVGImageForContainer is a thin wrapper around an SVG image. The lifetime of the
2578             SVGImage will be longer than the image cache.
2579
2580         (WebCore::SVGImageForContainer::size):
2581
2582             This is the only logic in SVGImageForContainer. The size returned needs to be zoomed
2583             but not scaled because it is used (e.g., by RenderImage) to pass back into draw() which
2584             takes zoomed but not scaled values.
2585
2586         (WebCore::SVGImageForContainer::draw):
2587         (WebCore::SVGImageForContainer::drawPattern):
2588         * svg/graphics/SVGImageForContainer.h: Added.
2589         (WebCore):
2590         (SVGImageForContainer):
2591
2592             In a future patch SVGImageForContainer can be made immutable but without a refactoring
2593             for not setting the page scale factor in SVGImageCache::lookupOrCreateImageForRenderer,
2594             setters are needed.
2595
2596         (WebCore::SVGImageForContainer::create):
2597         (WebCore::SVGImageForContainer::containerSize):
2598         (WebCore::SVGImageForContainer::pageScale):
2599         (WebCore::SVGImageForContainer::zoom):
2600         (WebCore::SVGImageForContainer::setSize):
2601         (WebCore::SVGImageForContainer::setZoom):
2602         (WebCore::SVGImageForContainer::setPageScale):
2603         (WebCore::SVGImageForContainer::SVGImageForContainer):
2604         (WebCore::SVGImageForContainer::destroyDecodedData):
2605         (WebCore::SVGImageForContainer::decodedSize):
2606
2607 2013-02-12  Antti Koivisto  <antti@apple.com>
2608
2609         Avoid updating timer heap when nothing changes
2610         https://bugs.webkit.org/show_bug.cgi?id=109630
2611
2612         Reviewed by Andreas Kling.
2613
2614         When the fire time of a Timer is changed we remove it from the timer heap and reinsert it. This is pretty slow. 
2615         Turns out that in ~80% of cases we are already in the heap and the insertion position is the same as the 
2616         original position. We can check if anything is actually going to change before doing this work.
2617         
2618         This makes starting a timer ~30% faster in average, ~0.1% progression in PLT3.
2619         
2620         * platform/Timer.cpp:
2621         (TimerHeapLessThanFunction):
2622         (WebCore::TimerHeapLessThanFunction::operator()):
2623         (WebCore::parentHeapPropertyHolds):
2624         (WebCore):
2625         (WebCore::childHeapPropertyHolds):
2626         (WebCore::TimerBase::hasValidHeapPosition):
2627         
2628             The code here assumes that STL heap is a normal binary heap. If there is a different implementation
2629             somewhere the assertions will catch it.
2630
2631         (WebCore::TimerBase::updateHeapIfNeeded):
2632         
2633             Skip updating the heap if it is already valid.
2634
2635         (WebCore::TimerBase::setNextFireTime):
2636         * platform/Timer.h:
2637         (TimerBase):
2638
2639 2013-02-13  Martin Robinson  <mrobinson@igalia.com>
2640
2641         [GTK] Remove remaining dead code from the GLib unicode backend
2642         https://bugs.webkit.org/show_bug.cgi?id=109707
2643
2644         Reviewed by Philippe Normand.
2645
2646         * platform/KURL.cpp:
2647         (WebCore::appendEncodedHostname):
2648         * platform/text/TextEncoding.cpp:
2649         (WebCore::TextEncoding::encode):
2650         * platform/text/TextEncodingRegistry.cpp:
2651         (WebCore::buildBaseTextCodecMaps):
2652         (WebCore::extendTextCodecMaps):
2653
2654 2013-02-13  Xianzhu Wang  <wangxianzhu@chromium.org>
2655
2656         Heap-use-after-free in WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects
2657         https://bugs.webkit.org/show_bug.cgi?id=108695
2658
2659         See comments of RenderLayerModelObject::willBeDestroyed() below for details.
2660
2661         Reviewed by Abhishek Arya.
2662
2663         Test: ManulTests/scrolling-coordinator-viewport-constrained-crash.html
2664         Unable to write a normal layout test because
2665         1) must waitUntilDone() to reproduce the crash but the redirected URL can't notifyDone();
2666         2) Can't use a frame to contain the test because ScrollingCoordinator handles only the main frame.
2667
2668         * rendering/RenderBoxModelObject.cpp:
2669         (WebCore::RenderBoxModelObject::willBeDestroyed): Moved removeViewportConstrainedObject() call into RenderLayerModelObject::willBeDestroyed() because only RenderLayerModelObjects can be added as viewportConstrainedObjects.
2670         * rendering/RenderLayerModelObject.cpp:
2671         (WebCore::RenderLayerModelObject::willBeDestroyed): Changed this->view() (then view->frameView()) to this->frame() (then frame->view()) because when willBeDestroyed() is called, the document has set its renderView to 0 thus this->view() will return 0, causing removeViewportConstrainedObject() not called and a deleted RenderLayerModelObject in FrameView's viewportConstrainedObjects.
2672
2673 2013-02-13  Florin Malita  <fmalita@chromium.org>
2674
2675         [SVG] OOB access in SVGListProperty::replaceItemValues()
2676         https://bugs.webkit.org/show_bug.cgi?id=109293
2677
2678         Replacing a list property item with itself should be a no-op. This patch updates the related
2679         APIs and logic to detect the self-replace case and prevent removal of the item from the list.
2680
2681         To avoid scanning the list multiple times, removeItemFromList() is updated to operate on
2682         indices and a findItem() method is added to resolve an item to an index.
2683
2684         Reviewed by Dirk Schulze.
2685
2686         No new tests: updated existing tests cover the change.
2687
2688         * svg/properties/SVGAnimatedListPropertyTearOff.h:
2689         (WebCore::SVGAnimatedListPropertyTearOff::findItem):
2690         (SVGAnimatedListPropertyTearOff):
2691         (WebCore::SVGAnimatedListPropertyTearOff::removeItemFromList):
2692         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
2693         (WebCore::SVGAnimatedPathSegListPropertyTearOff::findItem):
2694         (SVGAnimatedPathSegListPropertyTearOff):
2695         (WebCore::SVGAnimatedPathSegListPropertyTearOff::removeItemFromList):
2696         Add a findItem() delegating method, and update removeItemFromList() to use the new
2697         index-based API.
2698
2699         * svg/properties/SVGListProperty.h:
2700         (WebCore::SVGListProperty::insertItemBeforeValues):
2701         (WebCore::SVGListProperty::insertItemBeforeValuesAndWrappers):
2702         (WebCore::SVGListProperty::replaceItemValues):
2703         (WebCore::SVGListProperty::replaceItemValuesAndWrappers):
2704         (SVGListProperty):
2705         Updated to handle the no-op case for insertItemBefore() & replaceItem().
2706
2707         * svg/properties/SVGListPropertyTearOff.h:
2708         (WebCore::SVGListPropertyTearOff::findItem):
2709         (WebCore::SVGListPropertyTearOff::removeItemFromList):
2710         Index-based API updates.
2711
2712         (WebCore::SVGListPropertyTearOff::processIncomingListItemValue):
2713         (WebCore::SVGListPropertyTearOff::processIncomingListItemWrapper):
2714         * svg/properties/SVGPathSegListPropertyTearOff.cpp:
2715         (WebCore::SVGPathSegListPropertyTearOff::processIncomingListItemValue):
2716         Detect the self-replace case and return without removing the item from the list.
2717
2718         * svg/properties/SVGPathSegListPropertyTearOff.h:
2719         (WebCore::SVGPathSegListPropertyTearOff::findItem):
2720         (WebCore::SVGPathSegListPropertyTearOff::removeItemFromList):
2721         (SVGPathSegListPropertyTearOff):
2722         (WebCore::SVGPathSegListPropertyTearOff::processIncomingListItemWrapper):
2723         * svg/properties/SVGStaticListPropertyTearOff.h:
2724         (WebCore::SVGStaticListPropertyTearOff::processIncomingListItemValue):
2725         (WebCore::SVGStaticListPropertyTearOff::processIncomingListItemWrapper):
2726         Index-based API updates.
2727
2728 2013-02-13  Takashi Sakamoto  <tasak@google.com>
2729
2730         [Refactoring] StyleResolver::State should have methods to access its member variables.
2731         https://bugs.webkit.org/show_bug.cgi?id=108563
2732
2733         Reviewed by Antti Koivisto.
2734
2735         Made all member variables private and added methods to access the
2736         variables, because most of the member variables are read-only.
2737         We don't need to update those read-only variables while resolving
2738         styles.
2739
2740         No new tests, because just refactoring.
2741
2742         * css/SVGCSSStyleSelector.cpp:
2743         (WebCore::StyleResolver::applySVGProperty):
2744         * css/StyleResolver.cpp:
2745         (WebCore):
2746         (WebCore::StyleResolver::collectMatchingRules):
2747         (WebCore::StyleResolver::collectMatchingRulesForRegion):
2748         (WebCore::StyleResolver::sortAndTransferMatchedRules):
2749         (WebCore::StyleResolver::matchScopedAuthorRules):
2750         (WebCore::StyleResolver::styleSharingCandidateMatchesHostRules):
2751         (WebCore::StyleResolver::matchHostRules):
2752         (WebCore::StyleResolver::matchAuthorRules):
2753         (WebCore::StyleResolver::matchUserRules):
2754         (WebCore::StyleResolver::matchUARules):
2755         (WebCore::StyleResolver::collectMatchingRulesForList):
2756         (WebCore::StyleResolver::sortMatchedRules):
2757         (WebCore::StyleResolver::matchAllRules):
2758         (WebCore::StyleResolver::State::initElement):
2759         (WebCore::StyleResolver::initElement):
2760         Modified to invoke m_state.initElement if a given element is
2761         different from current m_state's element.
2762         (WebCore::StyleResolver::State::initForStyleResolve):
2763         Moved from StyleResolver.
2764         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
2765         (WebCore::StyleResolver::canShareStyleWithControl):
2766         (WebCore::StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes):
2767         (WebCore::StyleResolver::canShareStyleWithElement):
2768         (WebCore::StyleResolver::locateSharedStyle):
2769         (WebCore::StyleResolver::styleForElement):
2770         (WebCore::StyleResolver::styleForKeyframe):
2771         (WebCore::StyleResolver::keyframeStylesForAnimation):
2772         (WebCore::StyleResolver::pseudoStyleForElement):
2773         Changed ASSERT in the first line. ASSERT(m_state.parentStyle) would be
2774         wrong, because it depends on previous resolving. However,
2775         initForStyleResolve will also update m_state.parentStyle. No code in
2776         pseudoStyleForElement depends on previous resolving state.
2777         (WebCore::StyleResolver::styleForPage):
2778         (WebCore::StyleResolver::defaultStyleForElement):
2779         (WebCore::StyleResolver::adjustRenderStyle):
2780         (WebCore::StyleResolver::updateFont):
2781         (WebCore::StyleResolver::pseudoStyleRulesForElement):
2782         (WebCore::StyleResolver::ruleMatches):
2783         Added one more parameter, dynamicPseudo, because dynamicPseudo in
2784         State class is just used for returning matched pseudo style from
2785         this ruleMatches to collectMatchingRulesForList. No need to keep
2786         dynamicPseudo while resolving styles.
2787         (WebCore::StyleResolver::checkRegionSelector):
2788         Removed m_pseudoStyle = NOPSEUDO, because this method uses just
2789         SelectorChecker::matched. SelectorChecker doesn't see StyleResolver's
2790         m_pseudoStyle directly. Need to use SelectorCheckerContext. So no
2791         need to set m_pseudoStyle to be NOPSEUDO.
2792         (WebCore::StyleResolver::applyProperties):
2793         (WebCore::StyleResolver::applyMatchedProperties):
2794         (WebCore::StyleResolver::isLeftPage):
2795         (WebCore::StyleResolver::applyPropertyToStyle):
2796         (WebCore::StyleResolver::useSVGZoomRules):
2797         (WebCore::createGridTrackBreadth):
2798         (WebCore::StyleResolver::resolveVariables):
2799         (WebCore::StyleResolver::applyProperty):
2800         (WebCore::StyleResolver::cachedOrPendingFromValue):
2801         (WebCore::StyleResolver::generatedOrPendingFromValue):
2802         (WebCore::StyleResolver::setOrPendingFromValue):
2803         (WebCore::StyleResolver::cursorOrPendingFromValue):
2804         (WebCore::StyleResolver::checkForTextSizeAdjust):
2805         (WebCore::StyleResolver::initializeFontStyle):
2806         (WebCore::StyleResolver::setFontSize):
2807         (WebCore::StyleResolver::colorFromPrimitiveValue):
2808         (WebCore::StyleResolver::loadPendingSVGDocuments):
2809         (WebCore::StyleResolver::cachedOrPendingStyleShaderFromValue):
2810         (WebCore::StyleResolver::loadPendingShaders):
2811         (WebCore::StyleResolver::parseCustomFilterTransformParameter):
2812         (WebCore::StyleResolver::createFilterOperations):
2813         (WebCore::StyleResolver::loadPendingImage):
2814         (WebCore::StyleResolver::loadPendingImages):
2815         * css/StyleResolver.h:
2816         (WebCore::StyleResolver::style):
2817         (WebCore::StyleResolver::parentStyle):
2818         (WebCore::StyleResolver::rootElementStyle):
2819         (WebCore::StyleResolver::element):
2820         (WebCore::StyleResolver::hasParentNode):
2821         (StyleResolver):
2822         (WebCore::StyleResolver::State::State):
2823         (State):
2824         (WebCore::StyleResolver::State::clear):
2825         Modified to use clear at the end of styleForElement.
2826         (WebCore::StyleResolver::State::document):
2827         (WebCore::StyleResolver::State::element):
2828         (WebCore::StyleResolver::State::styledElement):
2829         (WebCore::StyleResolver::State::setStyle):
2830         (WebCore::StyleResolver::State::style):
2831         (WebCore::StyleResolver::State::takeStyle):
2832         (WebCore::StyleResolver::State::ensureRuleList):
2833         (WebCore::StyleResolver::State::takeRuleList):
2834         (WebCore::StyleResolver::State::parentNode):
2835         (WebCore::StyleResolver::State::setParentStyle):
2836         (WebCore::StyleResolver::State::parentStyle):
2837         (WebCore::StyleResolver::State::rootElementStyle):
2838         (WebCore::StyleResolver::State::regionForStyling):
2839         (WebCore::StyleResolver::State::setSameOriginOnly):
2840         (WebCore::StyleResolver::State::isSameOriginOnly):
2841         (WebCore::StyleResolver::State::pseudoStyle):
2842         (WebCore::StyleResolver::State::elementLinkState):
2843         (WebCore::StyleResolver::State::distributedToInsertionPoint):
2844         (WebCore::StyleResolver::State::setElementAffectedByClassRules):
2845         (WebCore::StyleResolver::State::elementAffectedByClassRules):
2846         (WebCore::StyleResolver::State::setApplyPropertyToRegularStyle):
2847         (WebCore::StyleResolver::State::setApplyPropertyToVisitedLinkStyle):
2848         (WebCore::StyleResolver::State::applyPropertyToRegularStyle):
2849         (WebCore::StyleResolver::State::applyPropertyToVisitedLinkStyle):
2850         (WebCore::StyleResolver::State::pendingImageProperties):
2851         (WebCore::StyleResolver::State::pendingSVGDocuments):
2852         (WebCore::StyleResolver::State::setHasPendingShaders):
2853         (WebCore::StyleResolver::State::hasPendingShaders):
2854         (WebCore::StyleResolver::State::setLineHeightValue):
2855         (WebCore::StyleResolver::State::lineHeightValue):
2856         (WebCore::StyleResolver::State::setFontDirty):
2857         (WebCore::StyleResolver::State::fontDirty):
2858         (WebCore::StyleResolver::State::cacheBorderAndBackground):
2859         (WebCore::StyleResolver::State::hasUAAppearance):
2860         (WebCore::StyleResolver::State::borderData):
2861         (WebCore::StyleResolver::State::backgroundData):
2862         (WebCore::StyleResolver::State::backgroundColor):
2863         (WebCore::StyleResolver::State::fontDescription):
2864         (WebCore::StyleResolver::State::parentFontDescription):
2865         (WebCore::StyleResolver::State::setFontDescription):
2866         (WebCore::StyleResolver::State::setZoom):
2867         (WebCore::StyleResolver::State::setEffectiveZoom):
2868         (WebCore::StyleResolver::State::setTextSizeAdjust):
2869         (WebCore::StyleResolver::State::setWritingMode):
2870         (WebCore::StyleResolver::State::setTextOrientation):
2871         fontDescription, ... and setTextOrientation were moved from
2872         StyleResolver.
2873         (WebCore::StyleResolver::State::matchedRules):
2874         (WebCore::StyleResolver::State::addMatchedRule):
2875         Moved from StyleResolver.
2876         (WebCore::StyleResolver::applyPropertyToRegularStyle):
2877         (WebCore::StyleResolver::applyPropertyToVisitedLinkStyle):
2878         (WebCore::StyleResolver::fontDescription):
2879         (WebCore::StyleResolver::parentFontDescription):
2880         (WebCore::StyleResolver::setFontDescription):
2881         (WebCore::StyleResolver::setZoom):
2882         (WebCore::StyleResolver::setEffectiveZoom):
2883         (WebCore::StyleResolver::setTextSizeAdjust):
2884         (WebCore::StyleResolver::setWritingMode):
2885         (WebCore::StyleResolver::setTextOrientation):
2886         These fontDescription, ..., setTextOrientation are wrappers to
2887         invoke State's methods. StyleBuilder still depends on StyleResolver
2888         and invokes these methods. So we need these wrappers.
2889
2890 2013-02-13  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2891
2892         [Qt] window.open passes height and width parameters even if not defined in a page
2893         https://bugs.webkit.org/show_bug.cgi?id=107705
2894
2895         Reviewed by Kenneth Rohde Christiansen.
2896
2897         Do not override width or height of 0, as that indicates default size, and not minimum size.
2898
2899         Tested by tst_qwebpage.
2900
2901         * page/DOMWindow.cpp:
2902         (WebCore::DOMWindow::adjustWindowRect):
2903
2904 2013-02-13  Rashmi Shyamasundar  <rashmi.s2@samsung.com>
2905
2906         The 2D Canvas functions fillText()/strokeText() should display nothing when maxWidth is less then or equal to zero
2907         https://bugs.webkit.org/show_bug.cgi?id=102656
2908
2909         Reviewed by Dirk Schulze.
2910
2911         The functions fillText()/strokeText() should not display anything when 
2912         maxWidth is less than or equal to zero, according to spec :
2913         http://www.w3.org/TR/2dcontext/#text-preparation-algorithm
2914
2915         Test: fast/canvas/canvas-fillText-maxWidth-zero.html
2916
2917         * html/canvas/CanvasRenderingContext2D.cpp:
2918         (WebCore::CanvasRenderingContext2D::drawTextInternal):
2919
2920 2013-02-13  ChangSeok Oh  <shivamidow@gmail.com>
2921
2922         [GTK][AC] Implement basic transform animations with clutter ac backend
2923         https://bugs.webkit.org/show_bug.cgi?id=109363
2924
2925         Reviewed by Gustavo Noronha Silva.
2926
2927         Implement basic transform animation with clutter ac backend.
2928         GraphicsLayerClutter is almost same with GraphicsLayerCA. And PlatformClutterAnimation
2929         interfaces are also similar with PlatformCAAnimation, but they are implemented
2930         with native clutter APIs. Clutter backend AC supports a basic single transform animation
2931         with this patch now, but additive animation combination and keyframe animation
2932         are not supported yet.
2933
2934         Covered by existing animation tests.
2935
2936         * platform/graphics/clutter/GraphicsLayerActor.cpp:
2937         (graphicsLayerActorSetTransform):
2938         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
2939         (WebCore::isTransformTypeTransformationMatrix):
2940         (WebCore):
2941         (WebCore::isTransformTypeFloatPoint3D):
2942         (WebCore::isTransformTypeNumber):
2943         (WebCore::getTransformFunctionValue):
2944         (WebCore::getValueFunctionNameForTransformOperation):
2945         (WebCore::GraphicsLayerClutter::setTransformAnimationEndpoints):
2946         (WebCore::GraphicsLayerClutter::appendToUncommittedAnimations):
2947         (WebCore::GraphicsLayerClutter::createTransformAnimationsFromKeyframes):
2948         * platform/graphics/clutter/GraphicsLayerClutter.h:
2949         (GraphicsLayerClutter):
2950         * platform/graphics/clutter/PlatformClutterAnimation.cpp:
2951         (WebCore::toClutterActorPropertyString):
2952         (WebCore):
2953         (WebCore::PlatformClutterAnimation::supportsValueFunction):
2954         (WebCore::PlatformClutterAnimation::duration):
2955         (WebCore::PlatformClutterAnimation::setDuration):
2956         (WebCore::PlatformClutterAnimation::setAdditive):
2957         (WebCore::PlatformClutterAnimation::valueFunction):
2958         (WebCore::PlatformClutterAnimation::setValueFunction):
2959         (WebCore::PlatformClutterAnimation::setFromValue):
2960         (WebCore::PlatformClutterAnimation::setToValue):
2961         (WebCore::PlatformClutterAnimation::timeline):
2962         (WebCore::PlatformClutterAnimation::addClutterTransitionForProperty):
2963         (WebCore::PlatformClutterAnimation::addOpacityTransition):
2964         (WebCore::PlatformClutterAnimation::addTransformTransition):
2965         (WebCore::PlatformClutterAnimation::addAnimationForKey):
2966         * platform/graphics/clutter/PlatformClutterAnimation.h:
2967         (PlatformClutterAnimation):
2968
2969 2013-02-13  Ilya Tikhonovsky  <loislo@chromium.org>
2970
2971         Web Inspector: Native Memory Instrumentation: reportLeaf method doesn't report the leaf node properly.
2972         https://bugs.webkit.org/show_bug.cgi?id=109554
2973
2974         In some cases leaves have no pointer so with the old schema we can't generate nodeId for them because we
2975         can't insert 0 into hashmap. It happens when we call addPrivateBuffer method.
2976
2977         Drive by fix: I introduced a client interface for the HeapGraphSerializer.
2978         It helps me to do the tests for the serializer.
2979
2980         Reviewed by Yury Semikhatsky.
2981
2982         It is covered by newly added tests in TestWebKitAPI.
2983
2984         * inspector/HeapGraphSerializer.cpp:
2985         (WebCore::HeapGraphSerializer::HeapGraphSerializer):
2986         (WebCore::HeapGraphSerializer::pushUpdate):
2987         (WebCore::HeapGraphSerializer::reportNode):
2988         (WebCore::HeapGraphSerializer::toNodeId):
2989         (WebCore::HeapGraphSerializer::addRootNode):
2990         * inspector/HeapGraphSerializer.h:
2991         (HeapGraphSerializer):
2992         (Client):
2993         (WebCore::HeapGraphSerializer::Client::~Client):
2994         * inspector/InspectorMemoryAgent.cpp:
2995         (WebCore):
2996         (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
2997
2998 2013-02-13  Yury Semikhatsky  <yurys@chromium.org>
2999
3000         Web Inspector: add experimental native heap graph to Timeline panel
3001         https://bugs.webkit.org/show_bug.cgi?id=109687
3002
3003         Reviewed by Alexander Pavlov.
3004
3005         Added experimentatl support for native heap graph on the Timeline panel.
3006         Native memory usage data is collected after each top level task and can
3007         be displayed instead of DOM counters graph on the Timeline panel if
3008         corresponding experiment is enabled in the inspector settings.
3009
3010         * inspector/Inspector.json:
3011         * inspector/InspectorController.cpp:
3012         (WebCore::InspectorController::InspectorController):
3013         * inspector/InspectorTimelineAgent.cpp:
3014         (TimelineAgentState):
3015         (WebCore::InspectorTimelineAgent::setIncludeDomCounters):
3016         (WebCore):
3017         (WebCore::InspectorTimelineAgent::setIncludeNativeMemoryStatistics):
3018         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
3019         (WebCore::InspectorTimelineAgent::setDOMCounters):
3020         (WebCore::InspectorTimelineAgent::setNativeHeapStatistics):
3021         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
3022         * inspector/InspectorTimelineAgent.h:
3023         (WebCore):
3024         (WebCore::InspectorTimelineAgent::create):
3025         (InspectorTimelineAgent):
3026         * inspector/WorkerInspectorController.cpp:
3027         (WebCore::WorkerInspectorController::WorkerInspectorController):
3028         * inspector/front-end/MemoryStatistics.js:
3029         (WebInspector.MemoryStatistics):
3030         * inspector/front-end/NativeMemoryGraph.js:
3031         (WebInspector.NativeMemoryGraph):
3032         (WebInspector.NativeMemoryGraph.prototype._onRecordAdded.addStatistics):
3033         (WebInspector.NativeMemoryGraph.prototype._onRecordAdded):
3034         * inspector/front-end/Settings.js:
3035         (WebInspector.ExperimentsSettings):
3036         * inspector/front-end/TimelinePanel.js:
3037
3038 2013-02-13  Vladislav Kaznacheev  <kaznacheev@chromium.org>
3039
3040         Web Inspector: Fixed colorpicker editing and scrolling.
3041         https://bugs.webkit.org/show_bug.cgi?id=109434.
3042
3043         Reviewed by Alexander Pavlov.
3044
3045         The color picker scrolling logic relied on the fixed DOM structure which changed with the introduction of
3046         SidebarPaneStack (https://bugs.webkit.org/show_bug.cgi?id=108183).
3047         Added a special CSS class to mark the scroll target.
3048
3049         No new tests.
3050
3051         * inspector/front-end/SplitView.js:
3052         (WebInspector.SplitView):
3053         * inspector/front-end/StylesSidebarPane.js:
3054         (WebInspector.StylePropertyTreeElement.prototype.updateTitle.):
3055         * inspector/front-end/TabbedPane.js:
3056         (WebInspector.TabbedPane):
3057  
3058 2013-02-13  Andrey Lushnikov  <lushnikov@chromium.org>
3059
3060         Web Inspector: fix js compilation warnings in TextPrompt
3061         https://bugs.webkit.org/show_bug.cgi?id=109685
3062
3063         Reviewed by Alexander Pavlov.
3064
3065         Mark last argument of _applySuggestion function as optional.
3066
3067         No new tests: no change in behaviour.
3068
3069         * inspector/front-end/TextPrompt.js:
3070
3071 2013-02-13  Pablo Flouret  <pablof@motorola.com>
3072
3073         Implement css-conditional's CSS.supports()
3074         https://bugs.webkit.org/show_bug.cgi?id=100324
3075
3076         Reviewed by Antti Koivisto.
3077
3078         http://dev.w3.org/csswg/css3-conditional/#the-css-interface
3079
3080         The supports() method provides the css @supports rule's corresponding
3081         dom api.
3082         The patch also adds the CSS interface on DOMWindow, which holds "useful
3083         CSS-related functions that do not belong elsewhere". This is where
3084         supports() lives.
3085
3086         Test: css3/supports-dom-api.html
3087
3088         * CMakeLists.txt:
3089         * DerivedSources.cpp:
3090         * DerivedSources.make:
3091         * DerivedSources.pri:
3092         * GNUmakefile.list.am:
3093         * Target.pri:
3094         * WebCore.exp.in:
3095         * WebCore.gypi:
3096         * WebCore.vcproj/WebCore.vcproj:
3097         * WebCore.xcodeproj/project.pbxproj:
3098         * bindings/gobject/GNUmakefile.am:
3099         * bindings/scripts/CodeGeneratorGObject.pm:
3100         (SkipFunction):
3101             Add DOMWindowCSS.* to the build systems.
3102
3103         * bindings/scripts/CodeGenerator.pm:
3104         (WK_lcfirst):
3105             Handle CSS prefixes correctly (s/cSS/css/).
3106
3107         * css/CSSGrammar.y.in:
3108         * css/CSSParser.cpp:
3109         (WebCore::CSSParser::CSSParser):
3110         (WebCore::CSSParser::parseSupportsCondition):
3111         (WebCore::CSSParser::detectAtToken):
3112         * css/CSSParser.h:
3113             webkit_supports_condition parses just the condition part of an
3114             @supports rule and evaluates it, outputting whether the condition
3115             is supported or not.
3116
3117         * css/CSSAllInOne.cpp:
3118         * css/DOMWindowCSS.cpp: Added.
3119         * css/DOMWindowCSS.h: Added.
3120         * css/DOMWindowCSS.idl: Added.
3121             The CSS interface object.
3122
3123         * page/DOMWindow.cpp:
3124         (WebCore::DOMWindow::css):
3125         * page/DOMWindow.h:
3126         * page/DOMWindow.idl:
3127             window.CSS
3128
3129 2013-02-13  Vladislav Kaznacheev  <kaznacheev@chromium.org>
3130
3131         Web Inspector: Simplify SplitView to rely more on CSS
3132         https://bugs.webkit.org/show_bug.cgi?id=109426
3133
3134         Reviewed by Vsevolod Vlasov.
3135
3136         Simplified Javascript code by moving large part of the layout logic into CSS rules. The patch is larger than it
3137         should be because one of the clients (TimelinePanel) is breaking SplitView incapsulation by reparenting its
3138         resizer.
3139
3140         No new tests.
3141
3142         * inspector/front-end/SidebarView.js:
3143         (WebInspector.SidebarView):
3144         * inspector/front-end/SplitView.js:
3145         (WebInspector.SplitView):
3146         (WebInspector.SplitView.prototype._innerSetVertical):
3147         (WebInspector.SplitView.prototype.setSecondIsSidebar):
3148         (WebInspector.SplitView.prototype._showOnly):
3149         (WebInspector.SplitView.prototype._removeAllLayoutProperties):
3150         * inspector/front-end/TimelinePanel.js:
3151         * inspector/front-end/cssNamedFlows.css:
3152         (.css-named-flow-collections-view .split-view-sidebar):
3153         (.css-named-flow-collections-view .split-view-sidebar .sidebar-content):
3154         (.css-named-flow-collections-view .split-view-sidebar .selection):
3155         (.css-named-flow-collections-view .split-view-sidebar .named-flow-overflow::before, .css-named-flow-collections-view .region-empty:before, .css-named-flow-collections-view .region-fit::before, .css-named-flow-collections-view .region-overset::before):
3156         (.css-named-flow-collections-view .split-view-sidebar .named-flow-overflow::before):
3157         * inspector/front-end/splitView.css:
3158         (.split-view-contents.maximized):
3159         (.split-view-vertical .split-view-contents):
3160         (.split-view-vertical .split-view-contents-first):
3161         (.split-view-vertical .split-view-contents-first.maximized):
3162         (.split-view-vertical .split-view-contents-second):
3163         (.split-view-vertical .split-view-contents-second.maximized):
3164         (.split-view-horizontal .split-view-contents):
3165         (.split-view-horizontal .split-view-contents-first):
3166         (.split-view-horizontal .split-view-contents-first.maximized):
3167         (.split-view-horizontal .split-view-contents-second):
3168         (.split-view-horizontal .split-view-contents-second.maximized):
3169         (.split-view-vertical .split-view-sidebar.split-view-contents-first:not(.maximized)):
3170         (.split-view-vertical .split-view-sidebar.split-view-contents-second:not(.maximized)):
3171         (.split-view-horizontal .split-view-sidebar.split-view-contents-first:not(.maximized)):
3172         (.split-view-horizontal .split-view-sidebar.split-view-contents-second:not(.maximized)):
3173         (.split-view-vertical .split-view-resizer):
3174         (.split-view-horizontal .split-view-resizer):
3175         * inspector/front-end/timelinePanel.css:
3176         (.timeline.split-view-vertical .split-view-resizer):
3177         (#timeline-container .split-view-sidebar):
3178
3179 2013-02-13  Kentaro Hara  <haraken@chromium.org>
3180
3181         Unreviewed, rolling out r142730.
3182         http://trac.webkit.org/changeset/142730
3183         https://bugs.webkit.org/show_bug.cgi?id=109666
3184
3185         chromium browser tests are failing
3186
3187         * bindings/scripts/CodeGeneratorV8.pm:
3188         (GenerateNormalAttrGetter):
3189         (GenerateNormalAttrSetter):
3190         (GenerateSingleBatchedAttribute):
3191         (GenerateImplementation):
3192         * bindings/scripts/test/V8/V8TestInterface.cpp:
3193         (TestInterfaceV8Internal):
3194         (WebCore):
3195         * bindings/scripts/test/V8/V8TestObj.cpp:
3196         (WebCore):
3197
3198 2013-02-13  Tamas Czene  <tczene@inf.u-szeged.hu>
3199
3200         OpenCL implementation of Flood SVG filters.
3201         https://bugs.webkit.org/show_bug.cgi?id=109580
3202
3203         Reviewed by Zoltan Herczeg.
3204
3205         * Target.pri:
3206         * platform/graphics/filters/FEFlood.h:
3207         (FEFlood):
3208         * platform/graphics/gpu/opencl/FilterContextOpenCL.cpp:
3209         (WebCore):
3210         (WebCore::PROGRAM_STR):
3211         (WebCore::FilterContextOpenCL::compileFill):
3212         (WebCore::FilterContextOpenCL::fill):
3213         * platform/graphics/gpu/opencl/FilterContextOpenCL.h:
3214         (WebCore::FilterContextOpenCL::FilterContextOpenCL):
3215         (FilterContextOpenCL):
3216         * platform/graphics/gpu/opencl/OpenCLFEFlood.cpp: Added.
3217         (WebCore):
3218         (WebCore::FEFlood::platformApplyOpenCL):
3219
3220 2013-02-13  Mike West  <mkwst@chromium.org>
3221
3222         location.href does not throw SECURITY_ERR when accessed across origins with JSC bindings
3223         https://bugs.webkit.org/show_bug.cgi?id=43891
3224
3225         Reviewed by Adam Barth.
3226
3227         Other browsers (IE, Firefox, and Opera) throw an exception when accessing
3228         properties of a Location object across origins, as the spec suggests[1].
3229         WebKit is currently the outlier.
3230
3231         This has a few negative effects: developers are forced to hack around
3232         access violations in two ways rather than having a single code path, and
3233         (more annoyingly) developers are unable to avoid generating the error
3234         message. See every ad on the internet for the effect on the console. :)
3235
3236         This patch adds a SECURITY_ERR exception to these access violations,
3237         which is the first step towards getting rid of the console spam. Getting
3238         rid of the message entirely will require a solution to
3239         http://wkbug.com/98050.
3240
3241         A fairly inconclusive thread[2] on webkit-dev popped up in 2010 and
3242         trailed off without reaching conclusion. A more recent thread reached
3243         agreement that this patch seems like a reasonable thing to do[3].
3244
3245         This is the JSC half of the patch. V8 is coming in http://wkbug.com/43892
3246
3247         [1]: http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#security-location
3248         [2]: https://lists.webkit.org/pipermail/webkit-dev/2010-August/013880.html
3249         [2]: https://lists.webkit.org/pipermail/webkit-dev/2012-February/023636.html
3250
3251         * bindings/js/JSLocationCustom.cpp:
3252         (WebCore::JSLocation::getOwnPropertySlotDelegate):
3253
3254 2013-02-13  Andrew Wilson  <atwilson@chromium.org>
3255
3256         Unreviewed Chromium gyp-file cleanup after glib backend removal.
3257         https://bugs.webkit.org/show_bug.cgi?id=109672
3258
3259         Removed references to GLib unicode backend:
3260
3261         * WebCore.gypi:
3262
3263 2013-02-12  Kentaro Hara  <haraken@chromium.org>
3264
3265         [V8] Generate wrapper methods for custom getters/setters
3266         https://bugs.webkit.org/show_bug.cgi?id=109666
3267
3268         Reviewed by Adam Barth.
3269
3270         Currently V8 directly calls back custom getters/setters written
3271         in custom binding files. This makes it impossible for code generators
3272         to hook custom getters/setters (e.g. Code generators cannot insert a code
3273         for FeatureObservation into custom getters/setters). We should generate
3274         wrapper methods for custom getters/setters.
3275
3276         In the future, I will insert TRACE_EVENT() macros into these wrapper methods
3277         to profile DOM getters/setters/methods.
3278
3279         * bindings/scripts/CodeGeneratorV8.pm:
3280         (GenerateNormalAttrGetter):
3281         (GenerateNormalAttrSetter):
3282         (GenerateSingleBatchedAttribute):
3283         (GenerateImplementation):
3284         * bindings/scripts/test/V8/V8TestInterface.cpp:
3285         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrGetter):
3286         (TestInterfaceV8Internal):
3287         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrSetter):
3288         (WebCore):
3289         * bindings/scripts/test/V8/V8TestObj.cpp:
3290         (WebCore::TestObjV8Internal::customAttrAttrGetter):
3291         (TestObjV8Internal):
3292         (WebCore::TestObjV8Internal::customAttrAttrSetter):
3293         (WebCore):
3294
3295 2013-02-13  Sheriff Bot  <webkit.review.bot@gmail.com>
3296
3297         Unreviewed, rolling out r142611.
3298         http://trac.webkit.org/changeset/142611
3299         https://bugs.webkit.org/show_bug.cgi?id=109668
3300
3301         Suggest box is not shown anymore when user types "window." in
3302         inspector console. (Requested by vsevik on #webkit).
3303
3304         * inspector/front-end/TextPrompt.js:
3305         (WebInspector.TextPrompt.prototype.complete):
3306
3307 2013-02-13  Kentaro Hara  <haraken@chromium.org>
3308
3309         [V8] There is no XXXConstructor that requires a custom getter
3310         https://bugs.webkit.org/show_bug.cgi?id=109667
3311
3312         Reviewed by Adam Barth.
3313
3314         Currently '[Custom] attribute XXXConstructor xxx' generates
3315         XXXAttrGetter(). However, there is no XXXConstructor with [Custom].
3316         In addition, it does make no sense to generate XXXAttrGetter() for such cases.
3317         We can remove the logic from CodeGeneratorV8.pm.
3318
3319         * bindings/scripts/CodeGeneratorV8.pm:
3320         (GenerateSingleBatchedAttribute):
3321
3322 2013-02-12  Hajime Morrita  <morrita@google.com>
3323
3324         [Internals] setShadowDOMEnabled() shouldn't be used except a few tests.
3325         https://bugs.webkit.org/show_bug.cgi?id=109642
3326
3327         Reviewed by Kent Tamura.
3328
3329         InternalSettings.setShadowDOMEnabled() shouldn't be called after
3330         any relevant DOM bindings are touched. However for fuzzers, it
3331         isn't trivial to regulate its behavior.
3332
3333         This change whitelists the URL of running test for prevent
3334         unintended API calls. This doesn't hurt the Internals usability
3335         since the API is called from just a couple of tests and the number
3336         isn't expected to grow.
3337
3338         Test: fast/dom/shadow/shadow-dom-enabled-flag-whitelist.html
3339
3340         * testing/InternalSettings.cpp:
3341         (WebCore::urlIsWhitelisted):
3342         (WebCore):
3343         (WebCore::InternalSettings::setShadowDOMEnabled):
3344
3345 2013-02-12  Vsevolod Vlasov  <vsevik@chromium.org>
3346
3347         Web Inspector: Introduce version controller to migrate settings versions.
3348         https://bugs.webkit.org/show_bug.cgi?id=109553
3349
3350         Reviewed by Yury Semikhatsky.
3351
3352         This patch introduces version controller that could be used to migrate inspector settings.
3353
3354         Test: inspector/version-controller.html
3355
3356         * inspector/front-end/Settings.js:
3357         (WebInspector.Settings):
3358         (WebInspector.VersionController):
3359         (WebInspector.VersionController.prototype.set _methodsToRunToUpdateVersion):
3360         (WebInspector.VersionController.prototype._updateVersionFrom0To1):
3361         * inspector/front-end/inspector.js:
3362
3363 2013-02-12  Martin Robinson  <mrobinson@igalia.com>
3364
3365         [GTK] Remove the GLib unicode backend
3366         https://bugs.webkit.org/show_bug.cgi?id=109627
3367
3368         Reviewed by Benjamin Poulain.
3369
3370         Remove references to the GLib unicode backend from WebCore.
3371
3372         * GNUmakefile.list.am: Update the source list.
3373         * platform/text/gtk/TextBreakIteratorGtk.cpp: Removed.
3374         * platform/text/gtk/TextCodecGtk.cpp: Removed.
3375         * platform/text/gtk/TextCodecGtk.h: Removed.
3376
3377 2013-02-12  Chris Fleizach  <cfleizach@apple.com>
3378
3379          AX: crash when accessing AccessibilityScrollbar after page has been unloaded
3380          https://bugs.webkit.org/show_bug.cgi?id=109524
3381
3382          Reviewed by Ryosuke Niwa.
3383
3384          AX clients can hold onto AccesibilityScrollbar references that reference parent
3385          AccessibilityScrollViews that have already gone away.
3386
3387          AccessibilityScrollView is not calling detachFromParent after it is removed, which
3388          leads to a crash. The fix is to clearChildren() when an object is deallocated.
3389
3390          I could not create a test because the crash only manifests over multiple page loads.
3391
3392          * accessibility/AccessibilityObject.cpp:
3393          (WebCore::AccessibilityObject::detach):
3394
3395 2013-02-12  Hayato Ito  <hayato@chromium.org>
3396
3397         Use FocusEvent.relatedTarget in {FocusIn,FocusOut,Focus,Blur}EventDispatchMediator.
3398         https://bugs.webkit.org/show_bug.cgi?id=109650
3399
3400         Reviewed by Dimitri Glazkov.
3401
3402         Set FocusEvent.relatedTarget in its constructor so that each
3403         EventDispatchMediator can use FocusEvent.relatedTarget rather than
3404         its redundant m_{old,new}FocusedNode member variable.
3405
3406         I've also removed FIXME comments, mentioning bug 109261, since I
3407         can not reproduce the issue.
3408
3409         No new tests. No change in functionality.
3410
3411         * dom/FocusEvent.cpp:
3412         (WebCore::FocusEventDispatchMediator::create):
3413         (WebCore::FocusEventDispatchMediator::FocusEventDispatchMediator):
3414         (WebCore::FocusEventDispatchMediator::dispatchEvent):
3415         (WebCore::BlurEventDispatchMediator::create):
3416         (WebCore::BlurEventDispatchMediator::BlurEventDispatchMediator):
3417         (WebCore::BlurEventDispatchMediator::dispatchEvent):
3418         (WebCore::FocusInEventDispatchMediator::create):
3419         (WebCore::FocusInEventDispatchMediator::FocusInEventDispatchMediator):