e8e0583f8cba8a6a0cc36b68eec176b35723ee94
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-08-08  Matt Arsenault  <arsenm2@gmail.com>
2
3         Crash when inspecting an element with border-image
4         https://bugs.webkit.org/show_bug.cgi?id=93380
5
6         Reviewed by Tim Horton.
7
8         The second value in the CSSPair should be the same as the first if
9         we are in a shorthand and the next value is not a
10         border-image-repeat keyword.
11
12         Test: fast/css/parse-border-image-repeat-null-crash.html
13
14         * css/CSSParser.cpp:
15         (WebCore::CSSParser::parseBorderImageRepeat):
16
17 2012-08-08  Kentaro Hara  <haraken@chromium.org>
18
19         [V8] Factor out V8BindingPerIsolateData from V8Binding to a separate file
20         https://bugs.webkit.org/show_bug.cgi?id=93333
21
22         Reviewed by Adam Barth.
23
24         This patch moves V8BindingPerIsolateData to V8BindingPerIsolateData.{h,cpp}.
25
26         To avoid circular #include dependency, I used OwnPtrs for m_stringCache,
27         m_integerCache, m_hiddenPropertyName and m_gcEventData.
28
29         No tests. No change in behavior.
30
31         * UseV8.cmake:
32         * WebCore.gypi:
33         * bindings/v8/ScriptGCEvent.cpp:
34         (WebCore::isolateGCEventData):
35         (WebCore::ScriptGCEvent::addEventListener):
36         (WebCore::ScriptGCEvent::removeEventListener):
37         (WebCore::ScriptGCEvent::gcPrologueCallback):
38         (WebCore::ScriptGCEvent::gcEpilogueCallback):
39         * bindings/v8/V8Binding.cpp:
40         * bindings/v8/V8Binding.h:
41         (GCEventData):
42         (WebCore):
43         * bindings/v8/V8BindingPerIsolateData.cpp: Added.
44         (WebCore):
45         (WebCore::V8BindingPerIsolateData::V8BindingPerIsolateData):
46         (WebCore::V8BindingPerIsolateData::~V8BindingPerIsolateData):
47         (WebCore::V8BindingPerIsolateData::create):
48         (WebCore::V8BindingPerIsolateData::ensureInitialized):
49         (WebCore::V8BindingPerIsolateData::dispose):
50         (WebCore::V8BindingPerIsolateData::reportMemoryUsage):
51         * bindings/v8/V8BindingPerIsolateData.h: Added.
52         (WebCore):
53         (V8BindingPerIsolateData):
54         (WebCore::V8BindingPerIsolateData::current):
55         (WebCore::V8BindingPerIsolateData::rawTemplateMap):
56         (WebCore::V8BindingPerIsolateData::templateMap):
57         (WebCore::V8BindingPerIsolateData::toStringName):
58         (WebCore::V8BindingPerIsolateData::toStringTemplate):
59         (WebCore::V8BindingPerIsolateData::lazyEventListenerToStringTemplate):
60         (WebCore::V8BindingPerIsolateData::stringCache):
61         (WebCore::V8BindingPerIsolateData::integerCache):
62         (WebCore::V8BindingPerIsolateData::allStores):
63         (WebCore::V8BindingPerIsolateData::hiddenPropertyName):
64         (WebCore::V8BindingPerIsolateData::auxiliaryContext):
65         (WebCore::V8BindingPerIsolateData::registerDOMDataStore):
66         (WebCore::V8BindingPerIsolateData::unregisterDOMDataStore):
67         (WebCore::V8BindingPerIsolateData::domDataStore):
68         (WebCore::V8BindingPerIsolateData::setDOMDataStore):
69         (WebCore::V8BindingPerIsolateData::recursionLevel):
70         (WebCore::V8BindingPerIsolateData::incrementRecursionLevel):
71         (WebCore::V8BindingPerIsolateData::decrementRecursionLevel):
72         (WebCore::V8BindingPerIsolateData::globalHandleMap):
73         (WebCore::V8BindingPerIsolateData::internalScriptRecursionLevel):
74         (WebCore::V8BindingPerIsolateData::incrementInternalScriptRecursionLevel):
75         (WebCore::V8BindingPerIsolateData::decrementInternalScriptRecursionLevel):
76         (WebCore::V8BindingPerIsolateData::gcEventData):
77         (WebCore::V8BindingPerIsolateData::setShouldCollectGarbageSoon):
78         (WebCore::V8BindingPerIsolateData::clearShouldCollectGarbageSoon):
79         (WebCore::V8BindingPerIsolateData::shouldCollectGarbageSoon):
80
81 2012-08-08  Pavel Feldman  <pfeldman@chromium.org>
82
83         Web Inspector: show whitespace nodes if they are the only tag's children.
84         https://bugs.webkit.org/show_bug.cgi?id=93441
85
86         Reviewed by Vsevolod Vlasov.
87
88         Pass whitespace node info into the front-end when it is the only element's child.
89
90         * inspector/InspectorDOMAgent.cpp:
91         (WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
92
93 2012-08-08  Kentaro Hara  <haraken@chromium.org>
94
95         [V8] Pass Isolate to ArrayValue and Dictionary
96         https://bugs.webkit.org/show_bug.cgi?id=93315
97
98         Reviewed by Adam Barth.
99
100         This patch passes Isolate to ArrayValue and Dictionary.
101
102         Rationale 1: We want to replace V8Proxy::throwError(ExceptionCode)
103         with setDOMException(ExceptionCode, Isolate*). For the replacement,
104         we need to pass Isolate to V8Utilities::extractTransferables().
105         To pass Isolate to V8Utilities::extractTransferables(), ( ...omitted... ),
106         we need to pass Isolate to ArrayValue and Dictionary.
107
108         Rationale 2: JSC already passes ExecState to ArrayValue and Dictionary.
109
110         Tests: storage/indexeddb/*
111                fast/files/*
112
113         * bindings/scripts/CodeGeneratorV8.pm:
114         (GenerateEventConstructorCallback):
115         (JSValueToNative):
116         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
117         (WebCore::V8TestEventConstructor::constructorCallback):
118         * bindings/scripts/test/V8/V8TestObj.cpp:
119         (WebCore::TestObjV8Internal::optionsObjectCallback):
120         * bindings/v8/ArrayValue.cpp:
121         (WebCore::ArrayValue::operator=):
122         (WebCore::ArrayValue::get):
123         * bindings/v8/ArrayValue.h:
124         (WebCore::ArrayValue::ArrayValue):
125         (ArrayValue):
126         * bindings/v8/Dictionary.cpp:
127         (WebCore::Dictionary::Dictionary):
128         (WebCore::Dictionary::operator=):
129         (WebCore::Dictionary::get):
130         * bindings/v8/Dictionary.h:
131         (Dictionary):
132         * bindings/v8/custom/V8BlobCustom.cpp:
133         (WebCore::V8Blob::constructorCallback):
134         * bindings/v8/custom/V8IntentConstructor.cpp:
135         (WebCore::V8Intent::constructorCallback):
136
137 2012-08-08  Yury Semikhatsky  <yurys@chromium.org>
138
139         Web Inspector: cached images memory instrumentation regression after r124744
140         https://bugs.webkit.org/show_bug.cgi?id=93366
141
142         Reviewed by Vsevolod Vlasov.
143
144         CachedImage memory usage data no includes size of both encoded and
145         decoded data.
146
147         Test: inspector/profiler/memory-instrumentation-cached-images.html
148
149         * loader/cache/CachedImage.cpp:
150         (WebCore::CachedImage::reportMemoryUsage):
151
152 2012-08-08  Kentaro Hara  <haraken@chromium.org>
153
154         Optimize Element::hasAttribute() by replacing String with AtomicString
155         https://bugs.webkit.org/show_bug.cgi?id=90273
156
157         Reviewed by Adam Barth.
158
159         Based on the observation described in this ChangeLog
160         (http://trac.webkit.org/changeset/121439), this patch optimizes the
161         performance of Element::hasAttribute() by replacing String with AtomicString.
162
163         Performance test: https://bugs.webkit.org/attachment.cgi?id=150144
164
165         hasAttribute (Chromium/Linux):
166         329.60ms => 259.00ms
167
168         hasAttributeNS (Chromium/Linux):
169         549.60ms => 435.80ms
170
171         * dom/Element.cpp:
172         (WebCore::Element::hasAttribute):
173         (WebCore::Element::hasAttributeNS):
174         * dom/Element.h:
175         (Element):
176
177 2012-08-08  Kentaro Hara  <haraken@chromium.org>
178
179         Optimize Element::removeAttribute() by replacing String with AtomicString
180         https://bugs.webkit.org/show_bug.cgi?id=90265
181
182         Reviewed by Adam Barth.
183
184         Based on the observation described in this ChangeLog
185         (http://trac.webkit.org/changeset/121439), this patch optimizes
186         Element::removeAttribute() by replacing String with AtomicString.
187
188         Performance test: https://bugs.webkit.org/attachment.cgi?id=150140
189
190         removeAttribute (Chromium/Linux):
191         334.20ms => 240.60ms
192
193         removeAttributeNS (Chromium/Linux):
194         552.80ms => 421.60ms
195
196         * dom/Element.cpp:
197         (WebCore::Element::removeAttribute):
198         (WebCore::Element::removeAttributeNS):
199         * dom/Element.h:
200         (Element):
201
202 2012-08-08  Shinya Kawanaka  <shinyak@chromium.org>
203
204         Remove Element::ensureShadowRoot
205         https://bugs.webkit.org/show_bug.cgi?id=77608
206
207         Reviewed by Ryosuke Niwa.
208
209         Since Element::ensureShadowRoot is not used anymore, we can remove this safely.
210
211         No new tests, no change in behavior.
212
213         * WebCore.order:
214         * dom/Element.cpp:
215         * dom/Element.h:
216         (Element):
217
218 2012-08-08  Kentaro Hara  <haraken@chromium.org>
219
220         Remove an unused member variable.
221
222         Unreviewed, build fix for r124990.
223
224         * dom/ContainerNode.h:
225         (WebCore::ChildNodesLazySnapshot::ChildNodesLazySnapshot):
226         (ChildNodesLazySnapshot):
227
228 2012-08-07  Vsevolod Vlasov  <vsevik@chromium.org>
229
230         Web Inspector: TabbedPane should use floating point width values for measuring.
231         https://bugs.webkit.org/show_bug.cgi?id=93349
232
233         Reviewed by Pavel Feldman.
234
235         TabbedPane now uses getBoundingClientRect().width instead of offsetWidth for more precise calculation.
236
237         * inspector/front-end/TabbedPane.js:
238         (WebInspector.TabbedPane.prototype._totalWidth):
239         (WebInspector.TabbedPane.prototype._updateTabsDropDown):
240         (WebInspector.TabbedPane.prototype._measureDropDownButton):
241         (WebInspector.TabbedPane.prototype._updateWidths):
242         (WebInspector.TabbedPaneTab.prototype._measure):
243
244 2012-08-08  Douglas Stockwell  <dstockwell@chromium.org>
245
246         'highlight' should not be parsed for a composite operation
247         https://bugs.webkit.org/show_bug.cgi?id=92615
248
249         Reviewed by Ryosuke Niwa.
250
251         r88144 removed support for highlight as a composite operation but did
252         not update the parser.
253
254         Test: fast/backgrounds/composite-highlight-is-invalid.html
255
256         * css/CSSParser.cpp:
257         (WebCore::CSSParser::parseFillProperty):
258
259 2012-08-08  Takashi Sakamoto  <tasak@google.com>
260
261         showNodePath should show the age of ShadowRoot
262         https://bugs.webkit.org/show_bug.cgi?id=93347
263
264         Reviewed by Ryosuke Niwa.
265
266         No new tests, because this patch is for fixing a bug of a method for
267         debugging. If NDEBUG is defined, the method is not compiled.
268
269         * dom/Node.cpp:
270         (WebCore::Node::showNodePathForThis):
271         Fixed the bug to obtain the oldest shadow root from a shadow root.
272         oldestShadowRootFor only works for an element node, not for a shadow root.
273
274 2012-08-07  Kent Tamura  <tkent@chromium.org>
275
276         Remove fractionDigits argument of WebCore::convertToLocalizedNumber()
277         https://bugs.webkit.org/show_bug.cgi?id=93435
278
279         Reviewed by Kentaro Hara.
280
281         Remove the fractionDigits argument of convertToLocalizedNumber because
282         we don't use it any more. Also, we can remove
283         parseToDoubleForNumberTypeWithDecimalPlaces() functions, which are used
284         to obtain the fractionDigits argument.
285
286         No new tests because of no behavior changes.
287
288         * platform/text/LocalizedNumber.h:
289         (WebCore): Remove the fractionDigits argument of convertToLocalizedNumber.
290         * platform/text/LocalizedNumberICU.cpp:
291         (WebCore::convertToLocalizedNumber): ditto.
292         * platform/text/LocalizedNumberNone.cpp:
293         (WebCore::convertToLocalizedNumber): ditto.
294         * platform/text/mac/LocalizedNumberMac.mm:
295         (WebCore::convertToLocalizedNumber): ditto.
296         * platform/text/win/LocalizedNumberWin.cpp:
297         (WebCore::convertToLocalizedNumber): ditto.
298
299         * html/NumberInputType.cpp:
300         (WebCore::NumberInputType::localizeValue):
301         Remove the code to make the decimalPlace value.
302         * html/parser/HTMLParserIdioms.cpp:
303         Remove parseToDoubleForNumberTypeWithDecimalPlaces.
304         * html/parser/HTMLParserIdioms.h: ditto.
305
306 2012-08-08  Mario Sanchez Prada  <msanchez@igalia.com>
307
308         REGRESSION(r65062): out of bound access in TextIterator (5 editing tests) on GTK
309         https://bugs.webkit.org/show_bug.cgi?id=63611
310
311         Reviewed by Ryosuke Niwa.
312
313         Ensure document's layout is up-to-date before using TextIterator
314         to properly calculate the offset for a text change when emitting
315         accessibility related signals in GTK.
316
317         * accessibility/gtk/AXObjectCacheAtk.cpp:
318         (WebCore::AXObjectCache::nodeTextChangePlatformNotification): Call
319         to document->updateLayout() before using TextIterator.
320
321 2012-08-07  Hayato Ito  <hayato@chromium.org>
322
323         Unreviewed build fix after http://trac.webkit.org/changeset/124975
324
325         Remove assertion introduced in r124975.
326
327         * dom/EventDispatcher.cpp:
328         (WebCore::EventDispatcher::EventDispatcher):
329         (WebCore::EventDispatcher::dispatchEvent):
330         * dom/EventDispatcher.h:
331         (EventDispatcher):
332
333 2012-08-07  Sheriff Bot  <webkit.review.bot@gmail.com>
334
335         Unreviewed, rolling out r124969.
336         http://trac.webkit.org/changeset/124969
337         https://bugs.webkit.org/show_bug.cgi?id=93436
338
339         Causes assertion failure in RenderQueue (Requested by toyoshim
340         on #webkit).
341
342         * rendering/RenderObjectChildList.cpp:
343         (WebCore::RenderObjectChildList::removeChildNode):
344         (WebCore::RenderObjectChildList::appendChildNode):
345         (WebCore::RenderObjectChildList::insertChildNode):
346         * rendering/RenderQuote.cpp:
347         (WebCore::adjustDepth):
348         (WebCore::RenderQuote::RenderQuote):
349         (WebCore::RenderQuote::~RenderQuote):
350         (WebCore::RenderQuote::willBeDestroyed):
351         (WebCore::RenderQuote::renderName):
352         (WebCore):
353         (WebCore::RenderQuote::placeQuote):
354         (WebCore::RenderQuote::originalText):
355         (WebCore::RenderQuote::computePreferredLogicalWidths):
356         (WebCore::RenderQuote::rendererSubtreeAttached):
357         (WebCore::RenderQuote::rendererRemovedFromTree):
358         (WebCore::RenderQuote::styleDidChange):
359         * rendering/RenderQuote.h:
360         (RenderQuote):
361         (WebCore::RenderQuote::isQuote):
362         * rendering/RenderView.cpp:
363         (WebCore::RenderView::RenderView):
364         * rendering/RenderView.h:
365         (WebCore):
366         (RenderView):
367         (WebCore::RenderView::addRenderQuote):
368         (WebCore::RenderView::removeRenderQuote):
369         (WebCore::RenderView::hasRenderQuotes):
370         * rendering/style/RenderStyle.cpp:
371         (WebCore::RenderStyle::diff):
372
373 2012-08-07  Kentaro Hara  <haraken@chromium.org>
374
375         Optimize ChildNode{Insertion,Removal}Notifier::notify() by lazily taking a snapshot of child nodes
376         https://bugs.webkit.org/show_bug.cgi?id=92965
377
378         Reviewed by Adam Barth.
379
380         This patch improves performance of Dromaeo/dom-modify by 8.2% in both Chromium and Safari.
381
382         [Mac/Safari]     4590.33 runs/s  =>  4965.79 runs/s  (+8.18%)
383         [Chromium/Linux] 3970.63 runs/s  =>  4299.65 runs/s  (+8.29%)
384
385         notifyDescendantRemovedFromDocument() cannot iterate child nodes in this way:
386
387         void notifyDescendantRemovedFromDocument(Node* node) {
388             for (Node* child = node->firstChild(); child; child = child->nextSibling()) {
389                 ...;
390                 notifyNodeRemovedFromDocument(child);
391             }
392         }
393
394         This is because notifyNodeRemovedFromDocument(child) might dispatch events
395         and the events might change child trees. To avoid security issues, the current
396         code takes a snapshot of child nodes before starting the iteration.
397
398         void notifyDescendantRemovedFromDocument(Node* node) {
399             NodeVector children;
400             getChildNodes(node, children); // Take a snapshot.
401             for (int i = 0; i < children.size(); i++) {
402                 ...;
403                 notifyNodeRemovedFromDocument(children[i]);
404             }
405         }
406
407         Based on the observation that in almost all cases events won't be dispatched
408         from inside notifyNodeRemovedFromDocument(), this patch implements
409         a "lazy" snapshot. The snapshot is taken at the point where
410         EventDispatcher::dispatchEvent() is invoked. The snapshot is not taken unless
411         any event is dispatched.
412
413         No tests. Confirm that all existing tests pass.
414         Actually, at present there is (should be) no case where an event is
415         dispatched from inside notifyNodeRemovedFromDocument(). Even DOMNodeInserted
416         and DOMNodeRemoved events are not dispatched. Originally the snapshot was
417         implemented "just in case" to protect the code from future attacks.
418         I manually confirmed that the lazy snapshot works correctly by inserting
419         takeChildNodesSnapshot() to notifyDescendantRemovedFromDocument()
420         in a random manner.
421
422         * dom/ContainerNode.cpp:
423         (WebCore):
424         * dom/ContainerNode.h:
425         (ChildNodesLazySnapshot):
426         (WebCore::ChildNodesLazySnapshot::ChildNodesLazySnapshot):
427         (WebCore::ChildNodesLazySnapshot::~ChildNodesLazySnapshot):
428         (WebCore::ChildNodesLazySnapshot::nextNode):
429         (WebCore::ChildNodesLazySnapshot::takeSnapshot):
430         (WebCore::ChildNodesLazySnapshot::nextSnapshot):
431         (WebCore::ChildNodesLazySnapshot::hasSnapshot):
432         (WebCore::ChildNodesLazySnapshot::takeChildNodesLazySnapshot):
433         (WebCore):
434         * dom/ContainerNodeAlgorithms.cpp:
435         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
436         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
437         * dom/EventDispatcher.cpp:
438         (WebCore::EventDispatcher::dispatchEvent):
439
440 2012-08-07  Ojan Vafai  <ojan@chromium.org>
441
442         percentage margins + flex incorrectly overflows the flexbox
443         https://bugs.webkit.org/show_bug.cgi?id=93411
444
445         Reviewed by Tony Chang.
446
447         Percent margins should always be computed with respect to the containing
448         block's width, not it's height. We were getting this wrong in column flows.
449
450         Test: css3/flexbox/percent-margins.html
451
452         * rendering/RenderFlexibleBox.cpp:
453         (WebCore::RenderFlexibleBox::computeMarginValue):
454         (WebCore):
455         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
456         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
457         * rendering/RenderFlexibleBox.h:
458
459 2012-08-07  Kentaro Hara  <haraken@chromium.org>
460
461         [V8] Replace throwError(ExceptionCode, Isolate*) with setDOMException(ExceptionCode, Isolate*) in v8/* and v8/custom/*
462         https://bugs.webkit.org/show_bug.cgi?id=93226
463
464         Reviewed by Eric Seidel.
465
466         Now throwError(ExceptionCode, Isolate*) is equivalent to
467         setDOMException(ExceptionCode, Isolate*). We can replace the former with
468         the latter. After this replacement, the rule becomes simple and sane:
469         "Use throwError() for throwing JavaScript errors, use setDOMException()
470         for throwing DOM exceptions".
471
472         No tests. No change in behavior.
473
474         * bindings/v8/SerializedScriptValue.cpp:
475         (WebCore::SerializedScriptValue::transferArrayBuffers):
476         (WebCore::SerializedScriptValue::SerializedScriptValue):
477         * bindings/v8/custom/V8AudioContextCustom.cpp:
478         (WebCore::V8AudioContext::constructorCallback):
479         * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
480         (WebCore::V8CSSStyleDeclaration::namedPropertySetter):
481         * bindings/v8/custom/V8DOMStringMapCustom.cpp:
482         (WebCore::V8DOMStringMap::namedPropertySetter):
483         * bindings/v8/custom/V8DOMWindowCustom.cpp:
484         (WebCore::handlePostMessageCallback):
485         * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
486         (WebCore::handlePostMessageCallback):
487         * bindings/v8/custom/V8DirectoryEntryCustom.cpp:
488         (WebCore::V8DirectoryEntry::getDirectoryCallback):
489         (WebCore::V8DirectoryEntry::getFileCallback):
490         * bindings/v8/custom/V8DocumentCustom.cpp:
491         (WebCore::V8Document::evaluateCallback):
492         * bindings/v8/custom/V8HistoryCustom.cpp:
493         (WebCore::V8History::pushStateCallback):
494         (WebCore::V8History::replaceStateCallback):
495         * bindings/v8/custom/V8IntentConstructor.cpp:
496         (WebCore::V8Intent::constructorCallback):
497         * bindings/v8/custom/V8MessagePortCustom.cpp:
498         (WebCore::handlePostMessageCallback):
499         * bindings/v8/custom/V8MutationObserverCustom.cpp:
500         (WebCore::V8MutationObserver::constructorCallback):
501         * bindings/v8/custom/V8NotificationCenterCustom.cpp:
502         (WebCore::V8NotificationCenter::createHTMLNotificationCallback):
503         (WebCore::V8NotificationCenter::createNotificationCallback):
504         (WebCore::V8NotificationCenter::requestPermissionCallback):
505         * bindings/v8/custom/V8SQLTransactionCustom.cpp:
506         (WebCore::V8SQLTransaction::executeSqlCallback):
507         * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
508         (WebCore::V8SQLTransactionSync::executeSqlCallback):
509         * bindings/v8/custom/V8StorageCustom.cpp:
510         (WebCore::storageSetter):
511         * bindings/v8/custom/V8WebSocketCustom.cpp:
512         (WebCore::V8WebSocket::constructorCallback):
513         (WebCore::V8WebSocket::sendCallback):
514         * bindings/v8/custom/V8WorkerContextCustom.cpp:
515         (WebCore::V8WorkerContext::importScriptsCallback):
516         * bindings/v8/custom/V8WorkerCustom.cpp:
517         (WebCore::handlePostMessageCallback):
518         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
519         (WebCore::V8XMLHttpRequest::responseTextAccessorGetter):
520         (WebCore::V8XMLHttpRequest::openCallback):
521         (WebCore::V8XMLHttpRequest::sendCallback):
522
523 2012-08-07  Kentaro Hara  <haraken@chromium.org>
524
525         [V8] Replace v8::Handle<v8::Value>() in custom bindings with v8Undefined()
526         https://bugs.webkit.org/show_bug.cgi?id=93215
527
528         Reviewed by Eric Seidel.
529
530         We should use v8Undefined() everywhere in V8 bindings.
531
532         No tests. No change in behavior.
533
534         * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
535         (WebCore::V8CSSStyleDeclaration::namedPropertyGetter):
536         (WebCore::V8CSSStyleDeclaration::namedPropertySetter):
537         * bindings/v8/custom/V8ConsoleCustom.cpp:
538         (WebCore::V8Console::traceCallback):
539         (WebCore::V8Console::assertCallback):
540         (WebCore::V8Console::profileCallback):
541         (WebCore::V8Console::profileEndCallback):
542         * bindings/v8/custom/V8DOMStringMapCustom.cpp:
543         (WebCore::V8DOMStringMap::namedPropertyGetter):
544         * bindings/v8/custom/V8DOMWindowCustom.cpp:
545         (WebCore::V8DOMWindow::indexedPropertyGetter):
546         (WebCore::V8DOMWindow::namedPropertyGetter):
547         * bindings/v8/custom/V8DataViewCustom.cpp:
548         (WebCore::V8DataView::setInt8Callback):
549         (WebCore::V8DataView::setUint8Callback):
550         * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
551         (WebCore::V8DeviceMotionEvent::initDeviceMotionEventCallback):
552         * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
553         (WebCore::V8DeviceOrientationEvent::initDeviceOrientationEventCallback):
554         * bindings/v8/custom/V8DirectoryEntryCustom.cpp:
555         (WebCore::V8DirectoryEntry::getDirectoryCallback):
556         (WebCore::V8DirectoryEntry::getFileCallback):
557         * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp:
558         (WebCore::getNamedItems):
559         (WebCore::V8HTMLAllCollection::namedPropertyGetter):
560         * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
561         (WebCore::getNamedItems):
562         (WebCore::V8HTMLCollection::namedPropertyGetter):
563         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
564         (WebCore::V8HTMLDocument::GetNamedProperty):
565         * bindings/v8/custom/V8HTMLFormElementCustom.cpp:
566         (WebCore::V8HTMLFormElement::indexedPropertyGetter):
567         (WebCore::V8HTMLFormElement::namedPropertyGetter):
568         * bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp:
569         (WebCore::V8HTMLFrameSetElement::namedPropertyGetter):
570         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
571         (WebCore::V8HTMLOptionsCollection::indexedPropertyGetter):
572         * bindings/v8/custom/V8HTMLPlugInElementCustom.cpp:
573         (WebCore::npObjectNamedGetter):
574         (WebCore::npObjectNamedSetter):
575         (WebCore::npObjectIndexedGetter):
576         (WebCore::npObjectIndexedSetter):
577         * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
578         (WebCore::V8HTMLSelectElement::indexedPropertyGetter):
579         * bindings/v8/custom/V8LocationCustom.cpp:
580         (WebCore::V8Location::reloadAccessorGetter):
581         (WebCore::V8Location::replaceAccessorGetter):
582         (WebCore::V8Location::assignAccessorGetter):
583         * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
584         (WebCore::V8NamedNodeMap::indexedPropertyGetter):
585         (WebCore::V8NamedNodeMap::namedPropertyGetter):
586         * bindings/v8/custom/V8NodeListCustom.cpp:
587         (WebCore::V8NodeList::namedPropertyGetter):
588         * bindings/v8/custom/V8SVGLengthCustom.cpp:
589         (WebCore::V8SVGLength::convertToSpecifiedUnitsCallback):
590         * bindings/v8/custom/V8StorageCustom.cpp:
591         (WebCore::storageGetter):
592         (WebCore::V8Storage::namedPropertyGetter):
593         (WebCore::storageSetter):
594         * bindings/v8/custom/V8StyleSheetListCustom.cpp:
595         (WebCore::V8StyleSheetList::namedPropertyGetter):
596
597 2012-08-07  Kentaro Hara  <haraken@chromium.org>
598
599         [V8] Replace v8::Handle<v8::Value>() in bindings/v8/* with v8Undefined()
600         https://bugs.webkit.org/show_bug.cgi?id=93211
601
602         Reviewed by Eric Seidel.
603
604         We should use v8Undefined() everywhere in V8 bindings.
605         Replacing v8::Local<v8::Value>() etc with v8Undefined() can cause build
606         errors due to type conversion mismatch. I'll do the replacement in follow-up
607         patches.
608
609         No tests. No change in behavior.
610
611         * bindings/v8/IDBBindingUtilities.cpp:
612         (WebCore):
613         * bindings/v8/ScriptDebugServer.cpp:
614         (WebCore::ScriptDebugServer::pauseOnExceptionsState):
615         (WebCore::ScriptDebugServer::handleV8DebugEvent):
616         * bindings/v8/SerializedScriptValue.cpp:
617         * bindings/v8/V8Binding.cpp:
618         (WebCore::batchConfigureCallbacks):
619         * bindings/v8/V8Collection.h:
620         (WebCore::getV8Object):
621         (WebCore::collectionNamedPropertyGetter):
622         * bindings/v8/V8DOMWrapper.cpp:
623         (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
624         * bindings/v8/V8NPObject.cpp:
625         (WebCore::npObjectGetProperty):
626         (WebCore::npObjectSetProperty):
627         * bindings/v8/V8Proxy.cpp:
628         (WebCore::V8Proxy::setDOMException):
629         (WebCore::V8Proxy::throwError):
630         * bindings/v8/WorkerScriptDebugServer.cpp:
631         (WebCore::WorkerScriptDebugServer::addListener):
632
633 2012-08-07  Joe Mason  <jmason@rim.com>
634
635         Fix regression in credential storage when using Negotiate auth
636         https://bugs.webkit.org/show_bug.cgi?id=93386
637
638         Reviewed by George Staikos.
639
640         r124205 regressed credential storage and lookup.  It added code to update the scheme used in
641         credential storage if the scheme chosen by the network stack is different from that requested by
642         webkit (currently this is only used when webkit requests Negotiate auth, but the Negotiate
643         infrastructure isn't set up correctly, so the network stack falls back to another auth type, usually
644         NTLM).  But the credentials are saved when a "success" status is received, and the scheme in the
645         credentials is not updated until notifyAuthReceived is called to report the actual auth scheme used.
646         The result is that the credentials are stored with the wrong auth scheme and can never be retreived.
647
648         Fixed by delaying the credential save until notifyAuthReceived.
649
650         RIM PR 166514
651         Internally reviewed by George Staikos
652
653         * platform/network/blackberry/NetworkJob.cpp:
654         (WebCore::NetworkJob::handleNotifyStatusReceived): Stop storing credentials here.
655         (WebCore::NetworkJob::notifyAuthReceived): Store credentials here instead.
656
657 2012-08-07  Kent Tamura  <tkent@chromium.org>
658
659         [Mac] Do not reformat numbers in <input type=number>
660         https://bugs.webkit.org/show_bug.cgi?id=93236
661
662         Reviewed by Hajime Morita.
663
664         We had bugs such as stripping leading zeros, dropping lower digits of
665         large numbers because we parse a user-input string to a double value,
666         and generate a string from the double value.
667
668         In order to avoid such reformatting, we use
669         platform/text/NumberLocalizer, which maps ASCII digits to the
670         corresponding localized digits.
671
672         Test: fast/forms/number/number-lossless-localization.html
673
674         * WebCore.xcodeproj/project.pbxproj:
675         Add the following files:
676          - platform/text/NumberLocalizer.cpp
677          - platform/text/NumberLocalizer.h
678          - platform/mac/LocaleMac.h
679          - platform/mac/LocaleMac.mm
680         * platform/text/mac/LocaleMac.h:
681         (LocaleMac): Inherit NumberLocalizer, and declare
682         initializeNumberLocalizerData() for it.
683         Add m_didInitializeNumberData flag.
684         * platform/text/mac/LocaleMac.mm:
685         (WebCore::LocaleMac::LocaleMac): Initialize m_didInitializeNumberData
686         (WebCore::LocaleMac::initializeNumberLocalizerData):
687         Added. Prepare data for number localization, and call
688         NumberLocalizer::setNumberLocalizerData().
689         A tricky part is to format 9876543210 for m_locale. It seems OSX doesn't
690         have API to get localized digits.
691         * platform/text/mac/LocalizedNumberMac.mm:
692         Remove many lines, and calls the corresponding functions of LocaleMac.
693         (WebCore::convertToLocalizedNumber):
694         (WebCore::convertFromLocalizedNumber):
695         (WebCore::localizedDecimalSeparator):
696
697 2012-08-07  Kentaro Hara  <haraken@chromium.org>
698
699         [V8] Move V8BindingMacros.h from bindings/v8/custom/ to bindings/v8/
700         https://bugs.webkit.org/show_bug.cgi?id=93254
701
702         Reviewed by Eric Seidel.
703
704         V8BindingMacros.h should exist in bindings/v8/.
705         This patch also moves related enums from V8Binding.h to V8BindingMacros.h.
706
707         No tests. No change in behavior.
708
709         * WebCore.gypi:
710         * bindings/v8/V8BindingMacros.h: Renamed from Source/WebCore/bindings/v8/custom/V8BindingMacros.h.
711         (WebCore):
712
713 2012-08-07  Kentaro Hara  <haraken@chromium.org>
714
715         [V8] StringCache::m_lastStringImpl and StringCache::m_lastV8String should be in sync
716         https://bugs.webkit.org/show_bug.cgi?id=93065
717
718         Reviewed by Eric Seidel.
719
720         StringCache::m_lastStringImpl caches a StringImpl that was accessed most
721         recently. StringCache::m_lastV8String caches Persistent<String> corresponding
722         to the StringImpl. Hence m_lastStringImpl and m_lastV8String should be in sync.
723
724         However, StringCache::remove() breaks the sync. StringCache::remove() clears
725         m_lastStringImpl but does not clear m_lastV8String. As far as I analyze the code,
726         this won't cause any problem, but we should fix it just in case.
727
728         No tests. No change in behavior.
729
730         * bindings/v8/V8Binding.cpp:
731         (WebCore::StringCache::remove):
732
733 2012-08-07  Hayato Ito  <hayato@chromium.org>
734
735         Don't re-use the same EventDispatcher instance to dispatch events.
736         https://bugs.webkit.org/show_bug.cgi?id=93322
737
738         Reviewed by Dimitri Glazkov.
739
740         It is potentially dangerous to call
741         EventDispatcher::dispatchEvent(PassRefPtr<Event>) twice for the
742         same EventDispatcher instance.  Some member functions in
743         EventDispatcher assume that dispatchEvent(PassRefPtr<Event>) is
744         never called more than once in its life cycle.
745
746         For example, EventDispatcher::ensureEventAncestor never
747         recalculates ancestors of node even when
748         dispatchEvent(PassRefPtr<Event)) is called again with a different
749         event parameter.
750
751         A 'dblclick' event violates this rule. A 'dblclick' dispatching
752         reuses the same dispatcher instance.  So stop re-using the same
753         dispatcher and add ASSERT to make sure dispatchEvent() is never
754         called more than once.
755
756         No new tests, no change in functionality.
757
758         * dom/EventDispatcher.cpp:
759         (WebCore::EventDispatcher::EventDispatcher):
760         (WebCore::EventDispatcher::dispatchEvent):
761         * dom/EventDispatcher.h:
762         (EventDispatcher):
763         * dom/MouseEvent.cpp:
764         (WebCore::MouseEventDispatchMediator::dispatchEvent):
765
766 2012-08-07  Joshua Bell  <jsbell@chromium.org>
767
768         Layout Test storage/indexeddb/intversion-omit-parameter.html is flaky
769         https://bugs.webkit.org/show_bug.cgi?id=92952
770
771         Reviewed by Tony Chang.
772
773         Account for events being propagated from the back-end to front-end after
774         front-end context is stopped (i.e. document is being destroyed). The IDBRequest
775         lifecycle was tightened up in http://trac.webkit.org/changeset/123275 with more
776         asserts but the stopped state wasn't accounted for.
777
778         Test: [chromium] webkit_unit_tests --gtest_filter='IDBRequestTest.EventsAfterStopping'
779
780         * Modules/indexeddb/IDBRequest.cpp:
781         (WebCore::IDBRequest::abort):
782         (WebCore::IDBRequest::onError):
783         (WebCore::IDBRequest::onSuccess):
784         (WebCore::IDBRequest::onSuccessWithContinuation):
785
786 2012-08-07  Kentaro Hara  <haraken@chromium.org>
787
788         Optimize Element::getAttributeNode() by replacing String with AtomicString
789         https://bugs.webkit.org/show_bug.cgi?id=90274
790
791         Reviewed by Adam Barth.
792
793         Based on the observation described in this ChangeLog
794         (http://trac.webkit.org/changeset/121439), this patch optimizes
795         the performance of Element::getAttributeNode() by replacing String
796         with AtomicString.
797
798         Performance test: https://bugs.webkit.org/attachment.cgi?id=150147
799
800         getAttributeNode (Chromium/Linux):
801         375.20ms => 310.80ms
802
803         getAttributeNodeNS (Chromium/Linux):
804         684.40ms => 539.00ms
805
806         * dom/Element.cpp:
807         (WebCore::Element::getAttributeNode):
808         (WebCore::Element::getAttributeNodeNS):
809         * dom/Element.h:
810         (Element):
811
812 2012-08-07  Michelangelo De Simone  <michelangelo@webkit.org>
813
814         CSSParser::parseTransform() refactor to accept valueList as argument
815         https://bugs.webkit.org/show_bug.cgi?id=93295
816
817         Reviewed by Darin Adler.
818
819         CSS::parseTranform() is now accepting the related CSSParserValueList as
820         argument. This change will be used by the code to parse the 3d-transforms
821         within the custom() function, see bug #71443.
822
823         * css/CSSParser.cpp:
824         (WebCore::CSSParser::parseValue):
825         (WebCore::CSSParser::parseTransform):
826         * css/CSSParser.h:
827
828 2012-08-07  Elliott Sprehn  <esprehn@gmail.com>
829
830         Reimplement RenderQuote placement algorithm
831         https://bugs.webkit.org/show_bug.cgi?id=93056
832
833         Reviewed by Eric Seidel.
834
835         Greatly simplify the code that maintains the linked list of RenderQuotes. Now RenderQuote
836         is placed into the linked list in computePreferredLogicalWidths on first access and is
837         detached when destroyed (or explicitly removed).
838
839         The new algorithm doesn't require walking up the tree of renderers when there are no
840         RenderQuotes in the tree yet, and also removes the need to walk over every subtree
841         when inserting in rendererSubtreeAttached.
842
843         No new tests because this patch doesn't change any behavior.
844
845         * rendering/RenderObjectChildList.cpp:
846         (WebCore::RenderObjectChildList::removeChildNode): Call detachQuote when removing from a child list.
847         (WebCore::RenderObjectChildList::appendChildNode):
848         (WebCore::RenderObjectChildList::insertChildNode):
849         * rendering/RenderQuote.cpp:
850         (WebCore::RenderQuote::RenderQuote):
851         (WebCore::RenderQuote::~RenderQuote):
852         (WebCore::RenderQuote::willBeDestroyed): Call detachQuote to ensure all destroyed quotes are detached.
853         (WebCore::RenderQuote::originalText):
854         (WebCore::RenderQuote::computePreferredLogicalWidths): Attach quote before computing the width.
855         (WebCore):
856         (WebCore::RenderQuote::attachQuote): Puts the RenderQuote in the linked list of quotes and computes the depth.
857         (WebCore::RenderQuote::detachQuote): Removes the quote from the linked list.
858         (WebCore::RenderQuote::updateDepth):
859         * rendering/RenderQuote.h:
860         (RenderQuote):
861         * rendering/style/RenderStyle.cpp:
862         (WebCore::RenderStyle::diff): Return StyleDifferenceLayout if quotes change and remove check in styleDidChange in RenderQuote.
863         * rendering/RenderView.cpp:
864         (WebCore::RenderView::RenderView):
865         * rendering/RenderView.h:
866         (WebCore):
867         (WebCore::RenderView::setRenderQuoteHead):
868         (WebCore::RenderView::renderQuoteHead): Stores the first quote in the document.
869         (RenderView):
870
871 2012-08-07  Kentaro Hara  <haraken@chromium.org>
872
873         [V8] Remove a bunch of Persistent::New()s on setJSWrapperForXXXObject()
874         https://bugs.webkit.org/show_bug.cgi?id=93342
875
876         Reviewed by Adam Barth.
877
878         There are a lot of custom bindings like this:
879
880             V8DOMWrapper::setJSWrapperForDOMObject(impl.release(), v8::Persistent<v8::Object>::New(args.Holder()));
881
882         Manually written Persistent::New() is error-prone. We can remove the
883         Persistent::New() by allocating the Persistent handle inside
884         setJSWrapperForDOMObject().
885
886         A new setJSWrapperForDOMObject() receives a wrapper object, allocates
887         the Persistent handle of the wrapper object, and return the Persistent handle.
888
889         No tests. No change in behavior.
890
891         * bindings/scripts/CodeGeneratorV8.pm:
892         (GenerateConstructorCallback):
893         (GenerateEventConstructorCallback):
894         (GenerateNamedConstructorCallback):
895         (GenerateToV8Converters):
896         * bindings/scripts/test/V8/V8Float64Array.cpp:
897         (WebCore::V8Float64Array::wrapSlow):
898         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
899         (WebCore::V8TestActiveDOMObject::wrapSlow):
900         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
901         (WebCore::V8TestCustomNamedGetter::wrapSlow):
902         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
903         (WebCore::V8TestEventConstructor::constructorCallback):
904         (WebCore::V8TestEventConstructor::wrapSlow):
905         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
906         (WebCore::V8TestEventTarget::wrapSlow):
907         * bindings/scripts/test/V8/V8TestException.cpp:
908         (WebCore::V8TestException::wrapSlow):
909         * bindings/scripts/test/V8/V8TestInterface.cpp:
910         (WebCore::V8TestInterface::constructorCallback):
911         (WebCore::V8TestInterface::wrapSlow):
912         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
913         (WebCore::V8TestMediaQueryListListener::wrapSlow):
914         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
915         (WebCore::V8TestNamedConstructorConstructorCallback):
916         (WebCore::V8TestNamedConstructor::wrapSlow):
917         * bindings/scripts/test/V8/V8TestNode.cpp:
918         (WebCore::V8TestNode::constructorCallback):
919         (WebCore::V8TestNode::wrapSlow):
920         * bindings/scripts/test/V8/V8TestObj.cpp:
921         (WebCore::V8TestObj::constructorCallback):
922         (WebCore::V8TestObj::wrapSlow):
923         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
924         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
925         (WebCore::V8TestSerializedScriptValueInterface::wrapSlow):
926         * bindings/v8/V8DOMWindowShell.cpp:
927         (WebCore::V8DOMWindowShell::installDOMWindow):
928         * bindings/v8/V8DOMWrapper.cpp:
929         (WebCore::V8DOMWrapper::setJSWrapperForDOMNode):
930         (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMNode):
931         * bindings/v8/V8DOMWrapper.h:
932         (V8DOMWrapper):
933         (WebCore::V8DOMWrapper::setJSWrapperForDOMObject):
934         (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject):
935         * bindings/v8/WorkerContextExecutionProxy.cpp:
936         (WebCore::WorkerContextExecutionProxy::initContextIfNeeded):
937         * bindings/v8/custom/V8ArrayBufferCustom.cpp:
938         (WebCore::V8ArrayBuffer::constructorCallback):
939         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
940         (WebCore::wrapArrayBufferView):
941         (WebCore::constructWebGLArray):
942         * bindings/v8/custom/V8DOMFormDataCustom.cpp:
943         (WebCore::V8DOMFormData::constructorCallback):
944         * bindings/v8/custom/V8DataViewCustom.cpp:
945         (WebCore::V8DataView::constructorCallback):
946         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
947         (WebCore::v8HTMLImageElementConstructorCallback):
948         * bindings/v8/custom/V8IntentConstructor.cpp:
949         (WebCore::V8Intent::constructorCallback):
950         * bindings/v8/custom/V8MessageChannelConstructor.cpp:
951         (WebCore::V8MessageChannel::constructorCallback):
952         * bindings/v8/custom/V8MutationObserverCustom.cpp:
953         (WebCore::V8MutationObserver::constructorCallback):
954         * bindings/v8/custom/V8WebKitPointConstructor.cpp:
955         (WebCore::V8WebKitPoint::constructorCallback):
956         * bindings/v8/custom/V8WebSocketCustom.cpp:
957         (WebCore::V8WebSocket::constructorCallback):
958         * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
959         (WebCore::V8XMLHttpRequest::constructorCallback):
960
961 2012-08-07  Erik Arvidsson  <arv@chromium.org>
962
963         Evolution, empathy no longer build with webkint 1.9.6:  webkit_dom_html_element_set_class_name is gone
964         https://bugs.webkit.org/show_bug.cgi?id=93384
965
966         Reviewed by Adam Barth.
967
968         The GObject bindings do not do inheritance so when className was moved from HTMLElement to Element,
969         webkit_dom_html_element_set_class_name was no longer defined. This patch re-adds the binding for the
970         GObject bindings to HTMLElement.
971
972         No new tests.
973
974         * html/HTMLElement.idl:
975
976 2012-08-07  Dirk Pranke  <dpranke@chromium.org>
977
978         fix chromium win build after r124945
979         https://bugs.webkit.org/show_bug.cgi?id=93421
980
981         Unreviewed, build fix.
982
983         Two Efl files were removed in r124945 but we forgot to remove
984         them from WebCore.gypi.
985
986         * WebCore.gypi:
987
988 2012-08-07  Dean Jackson  <dino@apple.com>
989
990         Unreviewed build fix for Mac port after http://trac.webkit.org/changeset/124954
991
992         * html/HTMLPlugInElement.cpp:
993         (WebCore::HTMLPlugInElement::isKeyboardFocusable):
994
995 2012-08-07  Kentaro Hara  <haraken@chromium.org>
996
997         [V8] Move setIsolatedWorldSecurityOrigin() from V8Proxy to ScriptController
998         https://bugs.webkit.org/show_bug.cgi?id=93334
999
1000         Reviewed by Adam Barth.
1001
1002         The goal is to move factor out V8Proxy methods to ScriptController.
1003         As a starting point, this patch moves setIsolatedWorldSecurityOrigin().
1004
1005         isolatedWorlds() and isolatedWorldSecurityOrigins() are temporary methods.
1006         They will be soon removed after moving all related methods
1007         and m_isolatedWorlds and m_isolatedWorldSecurityOrigins.
1008
1009         No tests. No change in behavior.
1010
1011         * bindings/v8/ScriptController.cpp:
1012         (WebCore::ScriptController::setIsolatedWorldSecurityOrigin):
1013         * bindings/v8/V8Proxy.cpp:
1014         * bindings/v8/V8Proxy.h:
1015         (WebCore):
1016         (V8Proxy):
1017         (WebCore::V8Proxy::isolatedWorlds):
1018         (WebCore::V8Proxy::isolatedWorldSecurityOrigins):
1019
1020 2012-08-07  Yoshifumi Inoue  <yosin@chromium.org>
1021
1022         translateZ(0) shifts file name in file input
1023         https://bugs.webkit.org/show_bug.cgi?id=69248
1024
1025         Reviewed by Simon Fraser.
1026
1027         This patch changes to use relative y-coordinate rather than absolute
1028         y-coordinate for baseline of text of input type "file" what we've already
1029         done for file icon y-coordinate.
1030
1031         Test: file-appearance-transform-no-effects.html
1032
1033         * rendering/RenderFileUploadControl.cpp:
1034         (WebCore::RenderFileUploadControl::paintObject): Changed to use paintOffset
1035         instead of absoluteBoundingBoxRectIgnoringTransforms().
1036
1037 2012-08-07  Kentaro Hara  <haraken@chromium.org>
1038
1039         [V8] Replace throwError(ExceptionCode, Isolate*) with
1040         setDOMException(ExceptionCode, Isolate*) in CodeGeneratorV8.pm
1041         https://bugs.webkit.org/show_bug.cgi?id=93223
1042
1043         Reviewed by Adam Barth.
1044
1045         Now throwError(ExceptionCode, Isolate*) is equivalent to
1046         setDOMException(ExceptionCode, Isolate*). We can replace the former
1047         with the latter. After this replacement, the rule becomes simple
1048         and sane: "Use throwError() for throwing JavaScript errors, use
1049         setDOMException() for throwing DOM exceptions".
1050
1051         Test: bindings/scripts/test/TestObj.idl
1052
1053         * bindings/scripts/CodeGeneratorV8.pm:
1054         (GenerateParametersCheck):
1055         (GenerateConstructorCallback):
1056         (GenerateNamedConstructorCallback):
1057         * bindings/scripts/test/V8/V8TestInterface.cpp:
1058         (WebCore::V8TestInterface::constructorCallback):
1059         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
1060         (WebCore::V8TestNamedConstructorConstructorCallback):
1061         * bindings/scripts/test/V8/V8TestObj.cpp:
1062         (WebCore::TestObjV8Internal::methodWithCallbackArgCallback):
1063         (WebCore::TestObjV8Internal::methodWithNonCallbackArgAndCallbackArgCallback):
1064         (WebCore::TestObjV8Internal::methodWithCallbackAndOptionalArgCallback):
1065         (WebCore::TestObjV8Internal::overloadedMethod5Callback):
1066         (WebCore::V8TestObj::constructorCallback):
1067
1068 2012-08-07  Fady Samuel  <fsamuel@chromium.org>
1069
1070         Allow plugins to decide whether they are keyboard focusable
1071         https://bugs.webkit.org/show_bug.cgi?id=88958
1072
1073         Reviewed by Anders Carlsson.
1074
1075         * dom/Node.h:
1076         (WebCore::Node::isPluginElement):
1077         * html/HTMLEmbedElement.cpp:
1078         (WebCore::HTMLEmbedElement::renderWidgetForJSBindings):
1079         * html/HTMLEmbedElement.h:
1080         (HTMLEmbedElement):
1081         * html/HTMLObjectElement.cpp:
1082         (WebCore::HTMLObjectElement::renderWidgetForJSBindings):
1083         * html/HTMLObjectElement.h:
1084         (HTMLObjectElement):
1085         * html/HTMLPlugInElement.cpp:
1086         (WebCore::HTMLPlugInElement::pluginWidget):
1087         (WebCore::HTMLPlugInElement::isKeyboardFocusable):
1088         (WebCore):
1089         (WebCore::HTMLPlugInElement::isPluginElement):
1090         * html/HTMLPlugInElement.h:
1091         (HTMLPlugInElement):
1092         * page/FocusController.cpp:
1093         (WebCore::FocusController::advanceFocusInDocumentOrder):
1094         * plugins/PluginViewBase.h:
1095         (WebCore::PluginViewBase::supportsKeyboardFocus):
1096
1097 2012-08-07  Anna Cavender  <annacc@chromium.org>
1098
1099         Create a MediaSource object.
1100         https://bugs.webkit.org/show_bug.cgi?id=91773
1101
1102         Reviewed by Eric Carlson.
1103
1104         MediaSource object is needed in order to implement the new
1105         object-oriented MediaSource API:
1106         http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html
1107
1108         No new tests - will be able to test after landing:
1109         https://bugs.webkit.org/show_bug.cgi?id=91775
1110
1111         Adding new files to build files:
1112         * CMakeLists.txt:
1113         * DerivedSources.cpp:
1114         * DerivedSources.make:
1115         * DerivedSources.pri:
1116         * GNUmakefile.list.am:
1117         * Target.pri:
1118         * WebCore.gypi:
1119         * WebCore.vcproj/WebCore.vcproj:
1120         * WebCore.xcodeproj/project.pbxproj:
1121
1122         New MediaSource object:
1123         * Modules/mediasource/MediaSource.cpp: Added.
1124         * Modules/mediasource/MediaSource.h: Added.
1125         * Modules/mediasource/MediaSource.idl: Added.
1126
1127         Create a registry for the blob storage and lookup:
1128         * Modules/mediasource/MediaSourceRegistry.cpp: Added.
1129         * Modules/mediasource/MediaSourceRegistry.h: Added.
1130
1131         Connect SourceBuffer to MediaSource:
1132         * Modules/mediasource/SourceBuffer.cpp:
1133         (WebCore::SourceBuffer::SourceBuffer):
1134         (WebCore::SourceBuffer::buffered): Forward call to MediaSource.
1135         (WebCore::SourceBuffer::append): Ditto.
1136         (WebCore::SourceBuffer::abort): Ditto.
1137         * Modules/mediasource/SourceBuffer.h:
1138         (WebCore::SourceBuffer::create): Add a MediaSource to the constructor.
1139         (WebCore::SourceBuffer::clear): Clear the MediaSource.
1140         (SourceBuffer):
1141         * Modules/mediasource/SourceBufferList.cpp: include SourceBuffer.h
1142         * Modules/mediasource/SourceBufferList.h:
1143
1144         Make MediaSource an EventTarget:
1145         * dom/EventTarget.h:
1146         (WebCore):
1147         * dom/EventTargetFactory.in:
1148
1149         Enable creation of MediaSource object URL from JavaScript:
1150         * html/DOMURL.cpp:
1151         (WebCore):
1152         (WebCore::DOMURL::createObjectURL):
1153         (WebCore::DOMURL::revokeObjectURL):
1154         * html/DOMURL.h:
1155         (WebCore):
1156         (DOMURL):
1157         * html/DOMURL.idl:
1158         * html/PublicURLManager.h: create a new sourceURLs list for storing
1159             reigstered MediaSource URLS.
1160         (WebCore::PublicURLManager::contextDestroyed): make sure everything is
1161             removed from the sourceURLs list upon destruction.
1162         (PublicURLManager):
1163         (WebCore::PublicURLManager::sourceURLs): getter for the sourceURLs list.
1164
1165         New MediaSource constructor:
1166         * page/DOMWindow.idl:
1167
1168 2012-08-07  Kentaro Hara  <haraken@chromium.org>
1169
1170         [V8] Implement V8Proxy::registerExtensionIfNeeded() and remove redundant methods
1171         https://bugs.webkit.org/show_bug.cgi?id=93209
1172
1173         Reviewed by Adam Barth.
1174
1175         By implementing V8Proxy::registerExtensionIfNeeded(), we can remove
1176         registeredExtensionWithV8() and registerExtension().
1177
1178         No tests. No change in behavior.
1179
1180         * bindings/v8/V8DOMWindowShell.cpp:
1181         (WebCore::V8DOMWindowShell::createNewContext):
1182         * bindings/v8/V8Proxy.cpp:
1183         (WebCore::V8Proxy::registerExtensionIfNeeded):
1184         * bindings/v8/V8Proxy.h:
1185         (V8Proxy):
1186
1187 2012-08-07  Ryuan Choi  <ryuan.choi@samsung.com>
1188
1189         [EFL] Remove PlatformTouchEventEfl and PlatformTouchPointEfl
1190         https://bugs.webkit.org/show_bug.cgi?id=93270
1191
1192         Reviewed by Eric Seidel.
1193
1194         PlatformTouchEventEfl and PlatformTouchPointEfl initialize PlatformTouchEvent
1195         directly from Ewk_TouchEvent which is WebKit1/Efl API and they can not be
1196         shared with WebKit2/Efl.
1197
1198         In order to remove this WebKit dependency from WebCore, this patch removes Efl
1199         specific codes from PlatformTouchXXX and adds the classes which convert
1200         Ewk_Touch_XXX to PlatformTouchXXX.
1201
1202         No new tests. Just a refactoring.
1203
1204         * PlatformEfl.cmake: Removed PlatformTouchEventEfl.cpp and PlatformTouchPointEfl.cpp
1205         * platform/PlatformTouchEvent.h: Removed Efl specific codes.
1206         (PlatformTouchEvent):
1207         * platform/PlatformTouchPoint.h: Ditto.
1208         (PlatformTouchPoint):
1209         * platform/efl/PlatformTouchEventEfl.cpp: Removed.
1210         * platform/efl/PlatformTouchPointEfl.cpp: Removed.
1211
1212 2012-08-07  James Robinson  <jamesr@chromium.org>
1213
1214         [chromium] Avoid dependending on implicit WebString -> String conversion in compositor
1215         https://bugs.webkit.org/show_bug.cgi?id=93408
1216
1217         Reviewed by Adrienne Walker.
1218
1219         * platform/graphics/chromium/LayerRendererChromium.cpp:
1220         (WebCore::LayerRendererChromium::initialize):
1221         * platform/graphics/chromium/cc/CCResourceProvider.cpp:
1222         (WebCore::CCResourceProvider::initialize):
1223
1224 2012-08-07  Kentaro Hara  <haraken@chromium.org>
1225
1226         [V8] Factor out V8Binding methods that configures DOM attributes and methods
1227         https://bugs.webkit.org/show_bug.cgi?id=93239
1228
1229         Reviewed by Adam Barth.
1230
1231         V8Binding is messy. This patch factors out V8Binding methods that configures
1232         DOM attributes and methods into another file. This patch just moves the methods
1233         from V8Binding.{h,cpp} to V8ConfigureDOMAttributesAndMethods.{h,cpp}.
1234
1235         No tests. No change in behavior.
1236
1237         * UseV8.cmake:
1238         * WebCore.gypi:
1239         * bindings/v8/V8Binding.cpp:
1240         * bindings/v8/V8Binding.h:
1241         (WebCore):
1242         * bindings/v8/V8ConfigureDOMAttributesAndMethods.cpp: Added.
1243         (WebCore):
1244         (WebCore::batchConfigureAttributes):
1245         (WebCore::batchConfigureConstants):
1246         (WebCore::batchConfigureCallbacks):
1247         (WebCore::configureTemplate):
1248         * bindings/v8/V8ConfigureDOMAttributesAndMethods.h: Added.
1249         (WebCore):
1250         (BatchedAttribute):
1251         (WebCore::configureAttribute):
1252         (BatchedConstant):
1253         (BatchedCallback):
1254
1255 2012-08-07  Kentaro Hara  <haraken@chromium.org>
1256
1257         [V8] Replace all V8 undefined values in the rest of custom bindings with v8Undefined()
1258         https://bugs.webkit.org/show_bug.cgi?id=93220
1259
1260         Reviewed by Eric Seidel.
1261
1262         We should use v8Undefined() everywhere in V8 bindings.
1263         This patch replaces all V8 undefined values in the rest of custom bindings
1264         with v8Undefined().
1265
1266         No tests. No change in behavior.
1267
1268         * bindings/v8/custom/V8DOMStringMapCustom.cpp:
1269         (WebCore::V8DOMStringMap::namedPropertyQuery): Simple refactoring not related to
1270         this patch. Since other bindings are using 0 instead of v8::None, we should use 0 here too.
1271         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1272         (WebCore::toV8):
1273         * bindings/v8/custom/V8ScriptProfileCustom.cpp:
1274         (WebCore::toV8):
1275         * bindings/v8/custom/V8ScriptProfileNodeCustom.cpp:
1276         (WebCore::toV8):
1277
1278 2012-08-07  Kentaro Hara  <haraken@chromium.org>
1279
1280         [V8] Remove #include V8BindingMacros.h
1281         https://bugs.webkit.org/show_bug.cgi?id=93312
1282
1283         Reviewed by Eric Seidel.
1284
1285         We are factoring out V8Binding methods to separate files.
1286         After the refactoring, V8Binding.h will include binding related
1287         header files (e.g. V8BindingMacros.h, V8BindingHelper.h, etc), so that
1288         custom V8 binding files just need to include V8Binding.h only.
1289
1290         We can remove '#include V8BindingMacros.h' from V8 binding files.
1291
1292         No tests. No change in behavior.
1293
1294         * bindings/scripts/CodeGeneratorV8.pm:
1295         (GenerateNormalAttrSetter):
1296         (GenerateParametersCheck):
1297         (GenerateEventConstructorCallback):
1298         (ConvertToV8Parameter):
1299         * bindings/scripts/test/V8/V8Float64Array.cpp:
1300         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
1301         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
1302         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
1303         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
1304         * bindings/scripts/test/V8/V8TestInterface.cpp:
1305         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
1306         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
1307         * bindings/scripts/test/V8/V8TestObj.cpp:
1308         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1309         * bindings/v8/ScriptController.cpp:
1310         * bindings/v8/custom/V8BlobCustom.cpp:
1311         * bindings/v8/custom/V8ConsoleCustom.cpp:
1312         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1313         * bindings/v8/custom/V8DataViewCustom.cpp:
1314         * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
1315         * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
1316         * bindings/v8/custom/V8DirectoryEntryCustom.cpp:
1317         * bindings/v8/custom/V8DirectoryEntrySyncCustom.cpp:
1318         * bindings/v8/custom/V8IntentConstructor.cpp:
1319         * bindings/v8/custom/V8MutationObserverCustom.cpp:
1320         * bindings/v8/custom/V8PerformanceCustom.cpp:
1321         * bindings/v8/custom/V8SQLTransactionCustom.cpp:
1322         * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
1323         * bindings/v8/custom/V8SVGLengthCustom.cpp:
1324         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
1325         * bindings/v8/custom/V8WebKitAnimationCustom.cpp:
1326         * bindings/v8/custom/V8WorkerContextCustom.cpp:
1327
1328 2012-08-07  Kentaro Hara  <haraken@chromium.org>
1329
1330         [V8] Remove #include Frame.h from V8Binding.h
1331         https://bugs.webkit.org/show_bug.cgi?id=93326
1332
1333         Reviewed by Adam Barth.
1334
1335         We want to remove unnecessary #include in V8Binding.h
1336         to avoid circular include dependency.
1337
1338         No tests. No change in behavior.
1339
1340         * bindings/scripts/CodeGeneratorV8.pm:
1341         (GenerateDomainSafeFunctionGetter):
1342         (GenerateNormalAttrGetter):
1343         (GenerateReplaceableAttrSetter):
1344         (GenerateFunctionCallback):
1345         (GenerateNamedConstructorCallback):
1346         (GenerateToV8Converters):
1347         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
1348         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
1349         * bindings/scripts/test/V8/V8TestNode.cpp:
1350         * bindings/v8/ScheduledAction.cpp:
1351         * bindings/v8/V8Binding.h:
1352         * bindings/v8/V8DOMWrapper.cpp:
1353         * bindings/v8/custom/V8DocumentCustom.cpp:
1354         * bindings/v8/custom/V8SVGDocumentCustom.cpp:
1355         * testing/v8/WebCoreTestSupport.cpp:
1356
1357 2012-08-07  Kentaro Hara  <haraken@chromium.org>
1358
1359         [V8] Factor out V8Binding classes that manage V8 value's cache
1360         https://bugs.webkit.org/show_bug.cgi?id=93343
1361
1362         Reviewed by Adam Barth.
1363
1364         We are factoring out V8Binding methods to separate files.
1365         This patch moves V8Binding classes that manage V8 value's cache
1366         to V8ValueCache.{h,cpp}.
1367
1368         No tests. No change in behavior.
1369
1370         * UseV8.cmake:
1371         * WebCore.gypi:
1372         * bindings/v8/V8Binding.cpp:
1373         * bindings/v8/V8Binding.h:
1374         (WebCore):
1375         * bindings/v8/V8ValueCache.cpp: Added.
1376         (WebCore):
1377         (WebCore::makeExternalString):
1378         (WebCore::cachedStringCallback):
1379         (WebCore::StringCache::remove):
1380         (WebCore::StringCache::v8ExternalStringSlow):
1381         (WebCore::IntegerCache::createSmallIntegers):
1382         (WebCore::IntegerCache::~IntegerCache):
1383         * bindings/v8/V8ValueCache.h: Added.
1384         (WebCore):
1385         (StringCache):
1386         (WebCore::StringCache::StringCache):
1387         (WebCore::StringCache::v8ExternalString):
1388         (WebCore::StringCache::clearOnGC):
1389         (WebCoreStringResource):
1390         (WebCore::WebCoreStringResource::WebCoreStringResource):
1391         (WebCore::WebCoreStringResource::~WebCoreStringResource):
1392         (WebCore::WebCoreStringResource::data):
1393         (WebCore::WebCoreStringResource::length):
1394         (WebCore::WebCoreStringResource::webcoreString):
1395         (WebCore::WebCoreStringResource::atomicString):
1396         (WebCore::WebCoreStringResource::visitStrings): This method is used by inspector
1397         and thus is not performance-critical. To avoid circular #include dependency,
1398         I moved the implementation to cpp.
1399         (WebCore::WebCoreStringResource::toStringResource):
1400         (IntegerCache):
1401         (WebCore::IntegerCache::IntegerCache):
1402         (WebCore::IntegerCache::v8Integer):
1403         (WebCore::IntegerCache::v8UnsignedInteger):
1404
1405 2012-08-07  James Robinson  <jamesr@chromium.org>
1406
1407         [chromium] Switch PlatformLayer typedef to Platform API type for PLATFORM(CHROMIUM)
1408         https://bugs.webkit.org/show_bug.cgi?id=93335
1409
1410         Reviewed by Adrienne Walker.
1411
1412         This converts the PlatformLayer typedef to WebKit::WebLayer (part of the chromium Platform API) for the
1413         Chromium port. This involves some odd const_cast<>s in places since cross-platform interfaces assume that
1414         PlatformLayer is a potentially heavy implementation class, but WebLayer is a thin smart pointer type.
1415
1416         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
1417         (WebCore::createScrollbarLayer):
1418         (WebCore::ScrollingCoordinator::setScrollLayer):
1419         (WebCore::ScrollingCoordinator::setNonFastScrollableRegion):
1420         (WebCore::ScrollingCoordinator::setLayerIsContainerForFixedPositionLayers):
1421         (WebCore::ScrollingCoordinator::setLayerIsFixedToContainerLayer):
1422         * platform/graphics/PlatformLayer.h:
1423         (WebKit):
1424         (WebCore):
1425         * platform/graphics/chromium/Canvas2DLayerBridge.cpp:
1426         (WebCore::Canvas2DLayerBridge::layer):
1427         * platform/graphics/chromium/Canvas2DLayerBridge.h:
1428         (Canvas2DLayerBridge):
1429         * platform/graphics/chromium/DrawingBufferChromium.cpp:
1430         (WebCore::DrawingBufferPrivate::layer):
1431         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1432         (WebCore::GraphicsLayerChromium::removeFromParent):
1433         (WebCore::GraphicsLayerChromium::setDrawsContent):
1434         (WebCore::GraphicsLayerChromium::setContentsVisible):
1435         (WebCore::GraphicsLayerChromium::setMaskLayer):
1436         (WebCore::GraphicsLayerChromium::setContentsToCanvas):
1437         (WebCore::GraphicsLayerChromium::setContentsToMedia):
1438         (WebCore::GraphicsLayerChromium::primaryLayer):
1439         (WebCore::GraphicsLayerChromium::platformLayer):
1440         (WebCore::GraphicsLayerChromium::updateChildList):
1441         * platform/graphics/chromium/GraphicsLayerChromium.h:
1442         (GraphicsLayerChromium):
1443
1444 2012-08-07  James Robinson  <jamesr@chromium.org>
1445
1446         [chromium] Use WebCompositor interface in Platform API instead of CCProxy to query threaded compositor status
1447         https://bugs.webkit.org/show_bug.cgi?id=93398
1448
1449         Reviewed by Adam Barth.
1450
1451         Converts non-compositor code that cares about threaded compositing status over to query WebCompositor instead of
1452         CCProxy.
1453
1454         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
1455         * platform/chromium/support/WebCompositorImpl.cpp:
1456         (WebKit):
1457         (WebKit::WebCompositor::threadingEnabled):
1458         (WebKit::WebCompositor::onCompositorThread):
1459         (WebKit::WebCompositorImpl::threadingEnabled):
1460         * platform/chromium/support/WebCompositorImpl.h:
1461         (WebCompositorImpl):
1462         * platform/graphics/chromium/Canvas2DLayerBridge.cpp:
1463         (WebCore::Canvas2DLayerBridge::Canvas2DLayerBridge):
1464         * platform/graphics/chromium/DrawingBufferChromium.cpp:
1465         (WebCore::DrawingBuffer::DrawingBuffer):
1466
1467 2012-08-07  Anders Carlsson  <andersca@apple.com>
1468
1469         Knob slot animation is flipped
1470         https://bugs.webkit.org/show_bug.cgi?id=93396
1471
1472         Reviewed by Beth Dakin.
1473
1474         When painting the scrollbar knob slot, use rectForPart: since it correctly takes the expansion transition state into account.
1475
1476         * platform/mac/ScrollbarThemeMac.mm:
1477         (WebCore::scrollbarPainterPaint):
1478
1479 2012-08-07  Adrienne Walker  <enne@google.com>
1480
1481         50% fixed position coverage slow scroll heuristic is incorrect when invalidations aren't clipped
1482         https://bugs.webkit.org/show_bug.cgi?id=92011
1483
1484         Reviewed by Simon Fraser.
1485
1486         The heuristic in scrollContentsFastPath to slow scroll by invalidating
1487         the entire frame if fixed position elements cover 50% of the frame
1488         takes away the ability of ports to make their own decisions about how
1489         to best handle invalidations. Therefore, remove this heuristic.
1490
1491         * page/FrameView.cpp:
1492         (WebCore::FrameView::scrollContentsFastPath):
1493
1494 2012-08-07  Konrad Piascik  <kpiascik@rim.com>
1495
1496         [BlackBerry] Change how devicePixelRatio is set.
1497         https://bugs.webkit.org/show_bug.cgi?id=93385
1498
1499         Reviewed by Antonio Gomes.
1500
1501         Update the theme to adjust to a constant devicePixelRatio.
1502
1503         Not testable.
1504
1505         * platform/blackberry/RenderThemeBlackBerry.cpp:
1506         (WebCore::determineFullScreenMultiplier):
1507
1508 2012-08-07  James Robinson  <jamesr@chromium.org>
1509
1510         [chromium] Move WebCompositor interface into Platform API
1511         https://bugs.webkit.org/show_bug.cgi?id=93391
1512
1513         Reviewed by Adam Barth.
1514
1515         Moves the support files for WebCompositor into WebCore/platform/support/. CCThreadImpl is a helper class used
1516         only by WebCompositorImpl.
1517
1518         Refactor/renaming only, so no new tests.
1519
1520         * WebCore.gypi:
1521         * platform/chromium/support/CCThreadImpl.cpp: Renamed from Source/WebKit/chromium/src/CCThreadImpl.cpp.
1522         (WebKit):
1523         (GetThreadIDTask):
1524         (WebKit::GetThreadIDTask::GetThreadIDTask):
1525         (WebKit::GetThreadIDTask::~GetThreadIDTask):
1526         (WebKit::GetThreadIDTask::run):
1527         (CCThreadTaskAdapter):
1528         (WebKit::CCThreadTaskAdapter::CCThreadTaskAdapter):
1529         (WebKit::CCThreadTaskAdapter::~CCThreadTaskAdapter):
1530         (WebKit::CCThreadTaskAdapter::run):
1531         (WebKit::CCThreadImpl::create):
1532         (WebKit::CCThreadImpl::~CCThreadImpl):
1533         (WebKit::CCThreadImpl::postTask):
1534         (WebKit::CCThreadImpl::postDelayedTask):
1535         (WebKit::CCThreadImpl::threadID):
1536         (WebKit::CCThreadImpl::CCThreadImpl):
1537         * platform/chromium/support/CCThreadImpl.h: Renamed from Source/WebKit/chromium/src/CCThreadImpl.h.
1538         (WebKit):
1539         (CCThreadImpl):
1540         * platform/chromium/support/WebCompositorImpl.cpp: Renamed from Source/WebKit/chromium/src/WebCompositorImpl.cpp.
1541         (WebKit):
1542         (WebKit::WebCompositor::initialize):
1543         (WebKit::WebCompositor::shutdown):
1544         (WebKit::WebCompositor::setPerTilePaintingEnabled):
1545         (WebKit::WebCompositor::setPartialSwapEnabled):
1546         (WebKit::WebCompositor::setAcceleratedAnimationEnabled):
1547         (WebKit::WebCompositorImpl::initialize):
1548         (WebKit::WebCompositorImpl::initialized):
1549         (WebKit::WebCompositorImpl::shutdown):
1550         * platform/chromium/support/WebCompositorImpl.h: Renamed from Source/WebKit/chromium/src/WebCompositorImpl.h.
1551         (WebCore):
1552         (WebKit):
1553         (WebCompositorImpl):
1554
1555 2012-08-07  Abhishek Arya  <inferno@chromium.org>
1556
1557         Crash in ContainerNode::cloneChildNodes.
1558         https://bugs.webkit.org/show_bug.cgi?id=93378
1559
1560         Reviewed by Levi Weintraub.
1561
1562         Re-enabling the editing delete button controller in cloneChildNode was causing style changes,
1563         thereby causing load events to fire. The load event can blow our nodes from underneath. This causes
1564         crashes when we are nested inside cloneChildNodes. The patch just skips the delete button controller's
1565         container element from being cloned and removes the hacky enable/disable logic. 
1566
1567         Test: fast/dom/clone-node-load-event-crash.html
1568
1569         * dom/ContainerNode.cpp:
1570         (WebCore::ContainerNode::cloneChildNodes):
1571
1572 2012-08-07  No'am Rosenthal  <noam.rosenthal@nokia.com>
1573
1574         GraphicsLayerAnimation shouldn't use HashMap<String>
1575         https://bugs.webkit.org/show_bug.cgi?id=93284
1576
1577         Reviewed by Kenneth Rohde Christiansen.
1578
1579         Use a vector containing all the animations instead of a map of String to Vector.
1580         The HashMap contains very few elements, which makes it inefficient relatively to a vector.
1581         This has been shown to be a bottleneck in valgrind.
1582
1583         Covered by existing animation tests.
1584
1585         * platform/graphics/GraphicsLayerAnimation.cpp:
1586         (WebCore::GraphicsLayerAnimation::GraphicsLayerAnimation):
1587         (WebCore::GraphicsLayerAnimations::hasActiveAnimationsOfType):
1588         (WebCore::GraphicsLayerAnimations::hasRunningAnimations):
1589         (WebCore::GraphicsLayerAnimations::add):
1590         (WebCore::GraphicsLayerAnimations::pause):
1591         (WebCore::GraphicsLayerAnimations::remove):
1592         (WebCore::GraphicsLayerAnimations::apply):
1593         * platform/graphics/GraphicsLayerAnimation.h:
1594         (GraphicsLayerAnimation):
1595         (WebCore::GraphicsLayerAnimation::name):
1596         (GraphicsLayerAnimations):
1597         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1598         (WebCore::GraphicsLayerTextureMapper::addAnimation):
1599
1600 2012-08-07  Marcelo Lira  <marcelo.lira@openbossa.org>
1601
1602         [Qt] Add support for the Gamepad API
1603         https://bugs.webkit.org/show_bug.cgi?id=90637
1604
1605         Reviewed by Alexis Menard.
1606
1607         Adds support for Gamepad API on the Qt port.
1608
1609         The implementation of this class relies on the Linux
1610         kernel joystick API.
1611
1612         Gamepad devices are recognized through the GamepadsQt
1613         class, which uses the udev library to watch for connection,
1614         disconnection and other gamepad related events.
1615
1616         Tests for this feature already exist.
1617
1618         * DerivedSources.pri:
1619         * Target.pri:
1620         * WebCore.pri:
1621         * platform/qt/GamepadsQt.cpp: Added.
1622         (WebCore):
1623         (GamepadDeviceLinuxQt):
1624         (WebCore::GamepadDeviceLinuxQt::create):
1625         (WebCore::GamepadDeviceLinuxQt::GamepadDeviceLinuxQt):
1626         (WebCore::GamepadDeviceLinuxQt::~GamepadDeviceLinuxQt):
1627         (WebCore::GamepadDeviceLinuxQt::readCallback):
1628         (GamepadsQt):
1629         (WebCore::GamepadsQt::GamepadsQt):
1630         (WebCore::GamepadsQt::~GamepadsQt):
1631         (WebCore::GamepadsQt::isGamepadDevice):
1632         (WebCore::GamepadsQt::onGamePadChange):
1633         (WebCore::GamepadsQt::registerDevice):
1634         (WebCore::GamepadsQt::unregisterDevice):
1635         (WebCore::GamepadsQt::updateGamepadList):
1636         (WebCore::sampleGamepads):
1637
1638 2012-08-07  Mike Reed  <reed@google.com>
1639
1640         reimplement fastMod w/o (soon to be) private skia macros
1641         https://bugs.webkit.org/show_bug.cgi?id=93370
1642
1643         Reviewed by Adrienne Walker.
1644
1645         fastMod() reimplemented (same functionality) to stop using soon-to-be private macros in
1646         SkMath.h. The new version is functionally identical.
1647
1648         No new tests -- existing layouttests exercise GraphicsContext::strokeArc(), the only caller
1649
1650         * platform/graphics/skia/GraphicsContextSkia.cpp:
1651
1652 2012-08-07  Brian Anderson  <brianderson@chromium.org>
1653
1654         Add CCDelayBasedTimeSource::setTimebaseAndInterval
1655         https://bugs.webkit.org/show_bug.cgi?id=92825
1656
1657         Reviewed by James Robinson.
1658
1659         Allows CCDelayBaseTimeSource to have it's timebase and interval updated
1660         on the fly.  Accounts for double ticking due to jitter or resetting the
1661         timer multiple times quickly.
1662
1663         CCDelayBasedTimeSourceTest updated with two tests for proper handling
1664         of jittery timebase/interval source and immediate handling of
1665         significant timebase/interval changes.
1666
1667         * platform/graphics/chromium/cc/CCDelayBasedTimeSource.cpp:
1668         (WebCore::CCDelayBasedTimeSource::CCDelayBasedTimeSource):
1669         (WebCore::CCDelayBasedTimeSource::nextTickTime):
1670         (WebCore):
1671         (WebCore::CCDelayBasedTimeSource::onTimerFired):
1672         (WebCore::CCDelayBasedTimeSource::setTimebaseAndInterval):
1673         (WebCore::CCDelayBasedTimeSource::postNextTickTask):
1674         * platform/graphics/chromium/cc/CCDelayBasedTimeSource.h:
1675
1676 2012-07-23  Alexandru Chiculita  <achicu@adobe.com>
1677
1678         [CSS Shaders] Reuse precompiled shaders across elements
1679         https://bugs.webkit.org/show_bug.cgi?id=88427
1680
1681         Reviewed by Dean Jackson.
1682
1683         Added CustomFilterProgramInfo as a link between the CustomFilterProgram and the CustomFilterCompiledProgram.
1684         CustomFilterGlobalContext now acts as a cache for the compiled shaders. Note that only the shaders displayed on the page
1685         are cached, making it useful in animations or when more elements share the same shader filter.
1686
1687         For CSS Shaders we need two files, vertex and fragment shaders, so that's why we have a CustomFilterProgram. 
1688         CustomFilterProgram is the platform object, so StyleCustomFilterProgram implements it and is referenced from the RenderStyle.
1689
1690         StyleCustomFilterProgram is also the one that actually keeps references to the CachedShaders and has all the loading logic.
1691         The only problem is that there might be multiple StyleCustomFilterProgram with the same set of CachedShaders.
1692         That's why in this patch I've added CustomFilterProgramInfo as a simple class to be used as a key in a hash map.
1693
1694         For now CustomFilterProgramInfo should act similar to a pair<String, String>. There's only one exception: one of the strings
1695         is allowed to be null. A null string is the placeholder for the default shader.
1696
1697         Note that alpha compositing and blending will be added to the CustomFilterProgramInfo after the mix() 
1698         function parsing will land in https://bugs.webkit.org/show_bug.cgi?id=90101 .
1699
1700         Test: css3/filters/custom/custom-filter-shader-reuse.html
1701
1702         * CMakeLists.txt:
1703         * GNUmakefile.list.am:
1704         * WebCore.gypi:
1705         * WebCore.vcproj/WebCore.vcproj:
1706         * WebCore.xcodeproj/project.pbxproj:
1707         * platform/graphics/filters/CustomFilterCompiledProgram.cpp:
1708         (WebCore::CustomFilterCompiledProgram::CustomFilterCompiledProgram):
1709         (WebCore::CustomFilterCompiledProgram::getDefaultShaderString): Returns the default shader based on the type.
1710         (WebCore):
1711         (WebCore::CustomFilterCompiledProgram::compileShader): Added check for isNull and used the default shader in that case.
1712         (WebCore::CustomFilterCompiledProgram::~CustomFilterCompiledProgram): Added call to CustomFilterGlobalContext::removeCompiledProgram.
1713         * platform/graphics/filters/CustomFilterCompiledProgram.h:
1714         (WebCore::CustomFilterCompiledProgram::detachFromGlobalContext): Called from ~CustomFilterGlobalContext, so that it doesn't call into a deleted object later when ~CustomFilterCompiledProgram is called. It should only happen when CustomFilterGlobalContext dies before the 
1715         CustomFilterCompiledPrograms that it caches.
1716         (WebCore):
1717         * platform/graphics/filters/CustomFilterGlobalContext.cpp:
1718         (WebCore::CustomFilterGlobalContext::~CustomFilterGlobalContext):
1719         (WebCore::CustomFilterGlobalContext::getCompiledProgram): Gets or creates a compiled shader for a specific CustomFilterProgramInfo.
1720         (WebCore):
1721         (WebCore::CustomFilterGlobalContext::removeCompiledProgram): Called by ~CustomFilterCompiledProgram.
1722         * platform/graphics/filters/CustomFilterGlobalContext.h:
1723         (WebCore):
1724         (CustomFilterGlobalContext):
1725         * platform/graphics/filters/CustomFilterProgram.cpp:
1726         (WebCore::CustomFilterProgram::programInfo):
1727         * platform/graphics/filters/CustomFilterProgram.h:
1728         (WebCore):
1729         * platform/graphics/filters/CustomFilterProgramInfo.cpp: Added.
1730         (WebCore):
1731         (WebCore::hashPossiblyNullString): We need to allow null strings in the hash, so this is a helper to check for isNull 
1732         before asking for the hash.
1733         (WebCore::CustomFilterProgramInfo::CustomFilterProgramInfo):
1734         (WebCore::CustomFilterProgramInfo::isEmptyValue):
1735         (WebCore::CustomFilterProgramInfo::isHashTableDeletedValue):
1736         (WebCore::CustomFilterProgramInfo::hash):
1737         (WebCore::CustomFilterProgramInfo::operator==):
1738         * platform/graphics/filters/CustomFilterProgramInfo.h: Added.
1739         (WebCore):
1740         (CustomFilterProgramInfo):
1741         (WebCore::CustomFilterProgramInfo::vertexShaderString):
1742         (WebCore::CustomFilterProgramInfo::fragmentShaderString):
1743         (WebCore::CustomFilterProgramInfoHash::hash):
1744         (WebCore::CustomFilterProgramInfoHash::equal):
1745         (CustomFilterProgramInfoHash): Structures needed to make this a key in the hash map.
1746         (CustomFilterProgramInfoHashTraits):
1747         (WebCore::CustomFilterProgramInfoHashTraits::isEmptyValue): I've used the deleted strings value to mark a deleted
1748         CustomFilterProgramInfo object. Those are not safe to compare to deleted, so there's a need to set safeToCompareToEmptyOrDeleted to false, meaning that there's a need to manually check for empty values.
1749         (WTF):
1750         * platform/graphics/filters/FECustomFilter.cpp:
1751         (WebCore::FECustomFilter::initializeContext): Moved to using the cached shader instead.
1752
1753 2012-08-07  Florin Malita  <fmalita@chromium.org>
1754
1755         [Chromium] Unreviewed build fix after r124879.
1756
1757         * WebCore.gypi: Remove deleted file references.
1758
1759 2012-08-07  George Staikos  <staikos@webkit.org>
1760
1761         [BlackBerry] We should fail the HTTP auth silently for non-main loads
1762         in the non-viewer process.
1763         https://bugs.webkit.org/show_bug.cgi?id=93230
1764
1765         Reviewed by Rob Buis.
1766
1767         No way to test this in WebKit.
1768
1769         * platform/network/blackberry/NetworkJob.cpp: Add early return.
1770         (WebCore::NetworkJob::sendRequestWithCredentials):
1771
1772 2012-08-07  Alexander Pavlov  <apavlov@chromium.org>
1773
1774         Web Inspector: Typing backslash in Console traverses the panel history when using German keyboard layout
1775         https://bugs.webkit.org/show_bug.cgi?id=93357
1776
1777         Reviewed by Vsevolod Vlasov.
1778
1779         For some reason, in the German keyboard layout keyIdentifier for '\' is the same as that for '['
1780         in the ordinary English-US layout.
1781         Remove a too-safe-side check and never switch panels on key combinations that result in "keypress" events.
1782
1783         * inspector/front-end/InspectorView.js:
1784         (WebInspector.InspectorView):
1785         (WebInspector.InspectorView.prototype._keyPress):
1786
1787 2012-08-07  Robin Cao  <robin.cao@torchmobile.com.cn>
1788
1789         [BlackBerry] GL scissor test is accidentally turned off
1790         https://bugs.webkit.org/show_bug.cgi?id=93360
1791         PR #161020
1792
1793         Reviewed by Antonio Gomes.
1794
1795         The GL scissor test is accidentally turned off inside drawTextures().
1796         This is wrong and should be removed.
1797
1798         * platform/graphics/blackberry/LayerCompositingThread.cpp:
1799         (WebCore::LayerCompositingThread::drawTextures):
1800
1801 2012-08-07  Abhishek Arya  <inferno@chromium.org>
1802
1803         Crash in InlineFlowBox::deleteLine.
1804         https://bugs.webkit.org/show_bug.cgi?id=88795
1805
1806         Reviewed by Tony Chang.
1807
1808         When we move the fullscreen object from its parent to RenderFullScreen, we forgot to clear the
1809         line box tree underneath the object's containing block and mark it for layout. Before the patch,
1810         the containing block never got laid out and maintained references to removed line boxes (since the
1811         object moved under RenderFullScreen did get laid out and its lineboxes replaced with new ones).
1812
1813         Test: fullscreen/full-screen-line-boxes-crash.html
1814
1815         * rendering/RenderFullScreen.cpp:
1816         (RenderFullScreen::wrapRenderer):
1817
1818 2012-08-07  Vsevolod Vlasov  <vsevik@chromium.org>
1819
1820         Web Inspector: Do not disable network tracking while profiling cpu.
1821         https://bugs.webkit.org/show_bug.cgi?id=93359
1822
1823         Reviewed by Yury Semikhatsky.
1824
1825         Removed network tracking enabling/disabling machinery.
1826
1827         * inspector/front-end/CPUProfileView.js:
1828         (WebInspector.CPUProfileType.prototype.buttonClicked):
1829         * inspector/front-end/NetworkManager.js:
1830         (WebInspector.NetworkManager.get this):
1831         (WebInspector.NetworkManager.get NetworkAgent):
1832         (WebInspector.NetworkManager):
1833         * inspector/front-end/ResourceTreeModel.js:
1834         (WebInspector.ResourceTreeModel):
1835
1836 2012-08-07  Alexei Filippov  <alexeif@chromium.org>
1837
1838         Web Inspector: make the MemoryClassInfo class a not-template
1839         https://bugs.webkit.org/show_bug.cgi?id=93265
1840
1841         Reviewed by Yury Semikhatsky.
1842
1843         * bindings/js/ScriptWrappable.h:
1844         (WebCore::ScriptWrappable::reportMemoryUsage):
1845         * bindings/v8/DOMDataStore.cpp:
1846         (WebCore::DOMDataStore::reportMemoryUsage):
1847         * bindings/v8/IntrusiveDOMWrapperMap.h:
1848         (WebCore::ChunkedTable::reportMemoryUsage):
1849         * bindings/v8/ScriptWrappable.h:
1850         (WebCore::ScriptWrappable::reportMemoryUsage):
1851         * bindings/v8/V8Binding.cpp:
1852         (WebCore::V8BindingPerIsolateData::reportMemoryUsage):
1853         (WebCore::StringCache::reportMemoryUsage):
1854         * bindings/v8/V8DOMMap.h:
1855         * css/CSSAspectRatioValue.cpp:
1856         (WebCore::CSSAspectRatioValue::reportDescendantMemoryUsage):
1857         * css/CSSBorderImageSliceValue.cpp:
1858         (WebCore::CSSBorderImageSliceValue::reportDescendantMemoryUsage):
1859         * css/CSSCalculationValue.cpp:
1860         (WebCore::CSSCalcValue::reportDescendantMemoryUsage):
1861         * css/CSSCanvasValue.cpp:
1862         (WebCore::CSSCanvasValue::reportDescendantMemoryUsage):
1863         * css/CSSCharsetRule.cpp:
1864         (WebCore::CSSCharsetRule::reportDescendantMemoryUsage):
1865         * css/CSSComputedStyleDeclaration.cpp:
1866         (WebCore::CSSComputedStyleDeclaration::reportMemoryUsage):
1867         * css/CSSCrossfadeValue.cpp:
1868         (WebCore::CSSCrossfadeValue::reportDescendantMemoryUsage):
1869         * css/CSSCursorImageValue.cpp:
1870         (WebCore::CSSCursorImageValue::reportDescendantMemoryUsage):
1871         * css/CSSFontFaceRule.cpp:
1872         (WebCore::CSSFontFaceRule::reportDescendantMemoryUsage):
1873         * css/CSSFontFaceSrcValue.cpp:
1874         (WebCore::CSSFontFaceSrcValue::reportDescendantMemoryUsage):
1875         * css/CSSFunctionValue.cpp:
1876         (WebCore::CSSFunctionValue::reportDescendantMemoryUsage):
1877         * css/CSSGradientValue.cpp:
1878         (WebCore::CSSGradientColorStop::reportMemoryUsage):
1879         (WebCore::CSSGradientValue::reportBaseClassMemoryUsage):
1880         (WebCore::CSSLinearGradientValue::reportDescendantMemoryUsage):
1881         (WebCore::CSSRadialGradientValue::reportDescendantMemoryUsage):
1882         * css/CSSImageGeneratorValue.cpp:
1883         (WebCore::CSSImageGeneratorValue::reportBaseClassMemoryUsage):
1884         * css/CSSImageSetValue.cpp:
1885         (WebCore::CSSImageSetValue::reportDescendantMemoryUsage):
1886         (WebCore::CSSImageSetValue::ImageWithScale::reportMemoryUsage):
1887         * css/CSSImageValue.cpp:
1888         (WebCore::CSSImageValue::reportDescendantMemoryUsage):
1889         * css/CSSImportRule.cpp:
1890         (WebCore::CSSImportRule::reportDescendantMemoryUsage):
1891         * css/CSSInheritedValue.cpp:
1892         (WebCore::CSSInheritedValue::reportDescendantMemoryUsage):
1893         * css/CSSInitialValue.cpp:
1894         (WebCore::CSSInitialValue::reportDescendantMemoryUsage):
1895         * css/CSSLineBoxContainValue.cpp:
1896         (WebCore::CSSLineBoxContainValue::reportDescendantMemoryUsage):
1897         * css/CSSMediaRule.cpp:
1898         (WebCore::CSSMediaRule::reportDescendantMemoryUsage):
1899         * css/CSSPageRule.cpp:
1900         (WebCore::CSSPageRule::reportDescendantMemoryUsage):
1901         * css/CSSPrimitiveValue.cpp:
1902         (WebCore::CSSPrimitiveValue::reportDescendantMemoryUsage):
1903         * css/CSSProperty.cpp:
1904         (WebCore::CSSProperty::reportMemoryUsage):
1905         * css/CSSReflectValue.cpp:
1906         (WebCore::CSSReflectValue::reportDescendantMemoryUsage):
1907         * css/CSSRule.cpp:
1908         (WebCore::CSSRule::reportBaseClassMemoryUsage):
1909         * css/CSSRuleList.cpp:
1910         (WebCore::StaticCSSRuleList::reportMemoryUsage):
1911         * css/CSSRuleList.h:
1912         * css/CSSSelectorList.cpp:
1913         (WebCore::CSSSelectorList::reportMemoryUsage):
1914         * css/CSSStyleRule.cpp:
1915         (WebCore::CSSStyleRule::reportDescendantMemoryUsage):
1916         * css/CSSStyleSheet.cpp:
1917         (WebCore::CSSStyleSheet::reportMemoryUsage):
1918         * css/CSSTimingFunctionValue.cpp:
1919         (WebCore::CSSLinearTimingFunctionValue::reportDescendantMemoryUsage):
1920         (WebCore::CSSCubicBezierTimingFunctionValue::reportDescendantMemoryUsage):
1921         (WebCore::CSSStepsTimingFunctionValue::reportDescendantMemoryUsage):
1922         * css/CSSUnicodeRangeValue.cpp:
1923         (WebCore::CSSUnicodeRangeValue::reportDescendantMemoryUsage):
1924         * css/CSSUnknownRule.h:
1925         (WebCore::CSSUnknownRule::reportDescendantMemoryUsage):
1926         * css/CSSValue.cpp:
1927         (WebCore::TextCloneCSSValue::reportDescendantMemoryUsage):
1928         * css/CSSValueList.cpp:
1929         (WebCore::CSSValueList::reportDescendantMemoryUsage):
1930         * css/CSSVariableValue.h:
1931         (WebCore::CSSVariableValue::reportDescendantMemoryUsage):
1932         * css/FontFeatureValue.cpp:
1933         (WebCore::FontFeatureValue::reportDescendantMemoryUsage):
1934         * css/FontValue.cpp:
1935         (WebCore::FontValue::reportDescendantMemoryUsage):
1936         * css/MediaList.cpp:
1937         (WebCore::MediaQuerySet::reportMemoryUsage):
1938         (WebCore::MediaList::reportMemoryUsage):
1939         * css/MediaQuery.cpp:
1940         (WebCore::MediaQuery::reportMemoryUsage):
1941         * css/MediaQueryExp.cpp:
1942         (WebCore::MediaQueryExp::reportMemoryUsage):
1943         * css/PropertySetCSSStyleDeclaration.cpp:
1944         (WebCore::PropertySetCSSStyleDeclaration::reportMemoryUsage):
1945         (WebCore::StyleRuleCSSStyleDeclaration::reportMemoryUsage):
1946         (WebCore::InlineCSSStyleDeclaration::reportMemoryUsage):
1947         * css/ShadowValue.cpp:
1948         (WebCore::ShadowValue::reportDescendantMemoryUsage):
1949         * css/StylePropertySet.cpp:
1950         (WebCore::StylePropertySet::reportMemoryUsage):
1951         * css/StyleResolver.cpp:
1952         (WebCore::StyleResolver::Features::reportMemoryUsage):
1953         (WebCore::StyleResolver::collectMatchingRulesForList):
1954         * css/StyleRule.cpp:
1955         (WebCore::StyleRuleBase::reportMemoryUsage):
1956         (WebCore::StyleRule::reportDescendantMemoryUsage):
1957         (WebCore::StyleRulePage::reportDescendantMemoryUsage):
1958         (WebCore::StyleRuleFontFace::reportDescendantMemoryUsage):
1959         (WebCore::StyleRuleBlock::reportDescendantMemoryUsage):
1960         (WebCore::StyleRuleMedia::reportDescendantMemoryUsage):
1961         (WebCore::StyleRuleRegion::reportDescendantMemoryUsage):
1962         * css/StyleRuleImport.cpp:
1963         (WebCore::StyleRuleImport::reportDescendantMemoryUsage):
1964         * css/StyleSheetContents.cpp:
1965         (WebCore::StyleSheetContents::reportMemoryUsage):
1966         * css/WebKitCSSFilterValue.cpp:
1967         (WebCore::WebKitCSSFilterValue::reportDescendantMemoryUsage):
1968         * css/WebKitCSSKeyframeRule.cpp:
1969         (WebCore::StyleKeyframe::reportMemoryUsage):
1970         (WebCore::WebKitCSSKeyframeRule::reportDescendantMemoryUsage):
1971         * css/WebKitCSSKeyframesRule.cpp:
1972         (WebCore::StyleRuleKeyframes::reportDescendantMemoryUsage):
1973         (WebCore::WebKitCSSKeyframesRule::reportDescendantMemoryUsage):
1974         * css/WebKitCSSMixFunctionValue.cpp:
1975         (WebCore::WebKitCSSMixFunctionValue::reportDescendantMemoryUsage):
1976         * css/WebKitCSSRegionRule.cpp:
1977         (WebCore::WebKitCSSRegionRule::reportDescendantMemoryUsage):
1978         * css/WebKitCSSSVGDocumentValue.cpp:
1979         (WebCore::WebKitCSSSVGDocumentValue::reportDescendantMemoryUsage):
1980         * css/WebKitCSSShaderValue.cpp:
1981         (WebCore::WebKitCSSShaderValue::reportDescendantMemoryUsage):
1982         * css/WebKitCSSTransformValue.cpp:
1983         (WebCore::WebKitCSSTransformValue::reportDescendantMemoryUsage):
1984         * dom/CharacterData.cpp:
1985         (WebCore::CharacterData::reportMemoryUsage):
1986         * dom/ContainerNode.h:
1987         (WebCore::ContainerNode::reportMemoryUsage):
1988         * dom/Document.cpp:
1989         (WebCore::Document::reportMemoryUsage):
1990         * dom/Element.h:
1991         (WebCore::Element::reportMemoryUsage):
1992         * dom/ElementAttributeData.cpp:
1993         (WebCore::ElementAttributeData::reportMemoryUsage):
1994         * dom/MemoryInstrumentation.h:
1995         (MemoryInstrumentation):
1996         (MemoryObjectInfo):
1997         (WebCore::MemoryObjectInfo::reportObjectInfo):
1998         (MemoryClassInfo):
1999         (WebCore::MemoryClassInfo::MemoryClassInfo):
2000         * dom/Node.cpp:
2001         (WebCore::Node::reportMemoryUsage):
2002         * dom/QualifiedName.h:
2003         (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
2004         (WebCore::QualifiedName::reportMemoryUsage):
2005         * loader/DocumentLoader.cpp:
2006         (WebCore::DocumentLoader::reportMemoryUsage):
2007         * loader/FrameLoader.cpp:
2008         (WebCore::FrameLoader::reportMemoryUsage):
2009         * loader/ResourceLoader.cpp:
2010         (WebCore::ResourceLoader::reportMemoryUsage):
2011         * loader/cache/CachedCSSStyleSheet.cpp:
2012         (WebCore::CachedCSSStyleSheet::reportMemoryUsage):
2013         * loader/cache/CachedFont.cpp:
2014         (WebCore::CachedFont::reportMemoryUsage):
2015         * loader/cache/CachedImage.cpp:
2016         (WebCore::CachedImage::reportMemoryUsage):
2017         * loader/cache/CachedRawResource.cpp:
2018         (WebCore::CachedRawResource::reportMemoryUsage):
2019         * loader/cache/CachedResource.cpp:
2020         (WebCore::CachedResource::reportMemoryUsage):
2021         * loader/cache/CachedResourceHandle.cpp:
2022         (WebCore::CachedResourceHandleBase::reportMemoryUsage):
2023         * loader/cache/CachedResourceLoader.cpp:
2024         (WebCore::CachedResourceLoader::reportMemoryUsage):
2025         * loader/cache/CachedSVGDocument.cpp:
2026         (WebCore::CachedSVGDocument::reportMemoryUsage):
2027         * loader/cache/CachedScript.cpp:
2028         (WebCore::CachedScript::reportMemoryUsage):
2029         * loader/cache/CachedShader.cpp:
2030         (WebCore::CachedShader::reportMemoryUsage):
2031         * loader/cache/CachedXSLStyleSheet.cpp:
2032         (WebCore::CachedXSLStyleSheet::reportMemoryUsage):
2033         * loader/cache/MemoryCache.cpp:
2034         (WebCore::MemoryCache::reportMemoryUsage):
2035         * page/Frame.cpp:
2036         (WebCore::Frame::reportMemoryUsage):
2037         * platform/SharedBuffer.cpp:
2038         (WebCore::SharedBuffer::reportMemoryUsage):
2039         * platform/TreeShared.h:
2040         (WebCore::TreeShared::reportMemoryUsage):
2041         * rendering/style/RenderStyle.cpp:
2042         (WebCore::RenderStyle::reportMemoryUsage):
2043         * rendering/style/StyleRareInheritedData.cpp:
2044         (WebCore::StyleRareInheritedData::reportMemoryUsage):
2045         * rendering/style/StyleRareNonInheritedData.cpp:
2046         (WebCore::StyleRareNonInheritedData::reportMemoryUsage):
2047         * svg/SVGColor.cpp:
2048         (WebCore::SVGColor::reportDescendantMemoryUsage):
2049         * svg/SVGPaint.cpp:
2050         (WebCore::SVGPaint::reportDescendantMemoryUsage):
2051
2052 2012-08-02  Simon Hausmann  <simon.hausmann@nokia.com>
2053
2054         [Qt] Remove Qt 4 specific code paths
2055         https://bugs.webkit.org/show_bug.cgi?id=88161
2056
2057         Reviewed by Kenneth Rohde Christiansen.
2058
2059         * Target.pri:
2060         * WebCore.pri:
2061         * bridge/qt/qt_class.cpp:
2062         (JSC::Bindings::QtClass::fallbackObject):
2063         * bridge/qt/qt_instance.cpp:
2064         (JSC::Bindings::QtInstance::getPropertyNames):
2065         (JSC::Bindings::QtInstance::stringValue):
2066         (JSC::Bindings::QtField::setValueToInstance):
2067         * bridge/qt/qt_runtime.h:
2068         (QtConnectionObject):
2069         * bridge/qt/qt_runtime_qt4.cpp: Removed.
2070         * editing/qt/SmartReplaceQt.cpp: Removed.
2071         * page/qt/EventHandlerQt.cpp:
2072         (WebCore::EventHandler::tabsToAllFormControls):
2073         * platform/graphics/GraphicsContext3D.h:
2074         * platform/graphics/OpenGLShims.cpp:
2075         (WebCore::getProcAddress):
2076         * platform/graphics/OpenGLShims.h:
2077         * platform/graphics/gstreamer/PlatformVideoWindowPrivate.h:
2078         * platform/graphics/gstreamer/PlatformVideoWindowQt.cpp:
2079         (FullScreenVideoWindow::FullScreenVideoWindow):
2080         (FullScreenVideoWindow::keyPressEvent):
2081         (FullScreenVideoWindow::event):
2082         (FullScreenVideoWindow::showFullScreen):
2083         (PlatformVideoWindow::PlatformVideoWindow):
2084         * platform/graphics/qt/GraphicsContext3DQt.cpp:
2085         (WebCore::GraphicsContext3DPrivate::blitMultisampleFramebufferAndRestoreContext):
2086         (WebCore::GraphicsContext3DPrivate::makeCurrentIfNeeded):
2087         * platform/graphics/qt/GraphicsContextQt.cpp:
2088         (WebCore::GraphicsContext::releaseWindowsContext):
2089         * platform/graphics/qt/ImageQt.cpp:
2090         (WebCore::BitmapImage::create):
2091         * platform/graphics/qt/SimpleFontDataQt.cpp:
2092         (WebCore::SimpleFontData::platformInit):
2093         * platform/graphics/texmap/TextureMapper.h:
2094         * platform/graphics/texmap/TextureMapperGL.cpp:
2095         (WebCore::TextureMapperGLData::SharedGLData::getCurrentGLContext):
2096         * platform/qt/DeviceMotionProviderQt.h:
2097         * platform/qt/DeviceOrientationProviderQt.h:
2098         * platform/qt/KURLQt.cpp:
2099         (WebCore::KURL::operator QUrl):
2100         * platform/qt/PlatformScreenQt.cpp:
2101         (WebCore::screenDepth):
2102         (WebCore::screenDepthPerComponent):
2103         (WebCore::screenIsMonochrome):
2104         (WebCore::screenRect):
2105         (WebCore::screenAvailableRect):
2106         * platform/qt/QWebPageClient.h:
2107         (QWebPageClient):
2108         * platform/qt/RenderThemeQt.cpp:
2109         * platform/text/qt/TextBreakIteratorQt.cpp: Removed.
2110         * plugins/qt/PluginContainerQt.cpp: Removed.
2111         * plugins/qt/PluginContainerQt.h: Removed.
2112         * plugins/qt/PluginPackageQt.cpp:
2113         (WebCore::PluginPackage::isPluginBlacklisted):
2114         * plugins/qt/PluginViewQt.cpp:
2115         (WebCore::PluginView::setFocus):
2116         (WebCore::PluginView::paintUsingXPixmap):
2117         (WebCore::setSharedXEventFields):
2118         (WebCore::PluginView::setNPWindowIfNeeded):
2119         (WebCore::PluginView::setParentVisible):
2120         (WebCore::PluginView::platformGetValue):
2121         (WebCore::PluginView::invalidateRect):
2122         (WebCore::getVisualAndColormap):
2123         (WebCore::PluginView::platformStart):
2124         * plugins/win/PluginViewWin.cpp:
2125         (windowHandleForPageClient):
2126
2127 2012-08-06  Andrey Kosyakov  <caseq@chromium.org>
2128
2129         Web Inspector: implement reusable progress bar
2130         https://bugs.webkit.org/show_bug.cgi?id=93267
2131
2132         - Generic progress bar implementation to be used
2133             by various long-running operations in inspector.
2134
2135         Test: inspector/progress-bar.html
2136
2137         Reviewed by Pavel Feldman.
2138
2139         * WebCore.gypi: Added ProgressBar.js
2140         * WebCore.vcproj/WebCore.vcproj: ditto.
2141         * inspector/compile-front-end.py: ditto.
2142         * inspector/front-end/AdvancedSearchController.js: renamed style for stop button.
2143         (WebInspector.SearchView):
2144         * inspector/front-end/ProgressBar.js: Added.
2145         (WebInspector.Progress): Interface for both ProgressIndicator and SubProgress.
2146         (WebInspector.Progress.prototype.setTotalWork):
2147         (WebInspector.Progress.prototype.setTitle):
2148         (WebInspector.Progress.prototype.setWorked):
2149         (WebInspector.Progress.prototype.done):
2150         (WebInspector.Progress.prototype.isCanceled):
2151         (WebInspector.ProgressIndicator): A UI control that implements Progress.
2152         (WebInspector.ProgressIndicator.prototype.show):
2153         (WebInspector.ProgressIndicator.prototype.hide):
2154         (WebInspector.ProgressIndicator.prototype.done):
2155         (WebInspector.ProgressIndicator.prototype._cancel):
2156         (WebInspector.ProgressIndicator.prototype.isCanceled):
2157         (WebInspector.ProgressIndicator.prototype.setTitle):
2158         (WebInspector.ProgressIndicator.prototype.setTotalWork):
2159         (WebInspector.ProgressIndicator.prototype.setWorked):
2160         (WebInspector.CompositeProgress): A progress bar that is composed of several SubProgress bars and uses a Progress to display total progress of all tasks.
2161         (WebInspector.CompositeProgress.prototype._childDone):
2162         (WebInspector.CompositeProgress.prototype.createSubProgress):
2163         (WebInspector.CompositeProgress.prototype._update):
2164         (WebInspector.SubProgress): A child of CompositeProgress, implements Progress interface.
2165         (WebInspector.SubProgress.prototype.isCanceled):
2166         (WebInspector.SubProgress.prototype.setTitle):
2167         (WebInspector.SubProgress.prototype.done):
2168         (WebInspector.SubProgress.prototype.setTotalWork):
2169         (WebInspector.SubProgress.prototype.setWorked):
2170         * inspector/front-end/WebKit.qrc: Added ProgressBar.js
2171         * inspector/front-end/inspector.css:
2172         (.progress-bar-stop-button-item):
2173         (.progress-bar-stop-button .glyph):
2174         (.progress-bar-container):
2175         (.progress-bar-container span):
2176         (.progress-bar-container progress):
2177         (.progress-bar-container button.status-bar-item):
2178         * inspector/front-end/inspector.html:
2179
2180 2012-08-07  Peter Rybin  <peter.rybin@gmail.com>
2181
2182         Web Inspector: display function scope in UI
2183         https://bugs.webkit.org/show_bug.cgi?id=90631
2184
2185         Reviewed by Yury Semikhatsky.
2186
2187         Two new tree element types added: function scope group node and scope node.
2188         Scope node is only used to represent closure and catch scopes. Scopes that
2189         have a real object beneath are represented as a property node.
2190         A method that reads properties from RemoteObject and populate tree element
2191         is factored out from RemoteObjectTreeElement for reuse.
2192
2193         * inspector/front-end/ObjectPropertiesSection.js:
2194         (WebInspector.ObjectPropertyTreeElement.prototype.onpopulate):
2195         (WebInspector.ObjectPropertyTreeElement.Populate.callback):
2196         (WebInspector.ObjectPropertyTreeElement.Populate):
2197         (WebInspector.FunctionScopeMainTreeElement):
2198         (WebInspector.FunctionScopeMainTreeElement.prototype.onpopulate.didGetDetails):
2199         (WebInspector.FunctionScopeMainTreeElement.prototype.onpopulate):
2200         (WebInspector.FunctionScopeMainTreeElement.prototype.onattach):
2201         (WebInspector.FunctionScopeMainTreeElement.prototype.update):
2202         (WebInspector.ScopeTreeElement):
2203         (WebInspector.ScopeTreeElement.prototype.onpopulate):
2204         (WebInspector.ScopeTreeElement.prototype.onattach):
2205         (WebInspector.ScopeTreeElement.prototype.update):
2206         * inspector/front-end/RemoteObject.js:
2207         (WebInspector.RemoteObjectProperty.fromScopeValue):
2208
2209
2210 2012-08-07  Vineet Chaudhary  <rgf748@motorola.com>
2211
2212         [V8] Remove custom toV8() calls for TypedArray.
2213         https://bugs.webkit.org/show_bug.cgi?id=93248
2214
2215         Reviewed by Kentaro Hara.
2216
2217         With the support of [TypedArray] we can remove the custom calls toV8().
2218         TypedArray spec : http://www.khronos.org/registry/typedarray/specs/latest/#7
2219
2220         Tests: TestTypedArray.idl
2221         Tests under below folders should pass as this does not cause any behavioral changes.
2222                fast/canvas/webgl
2223                compositing/webgl
2224
2225         * bindings/js/JSInt8ArrayCustom.cpp:
2226         * bindings/js/JSUint8ArrayCustom.cpp:
2227         * bindings/js/JSUint8ClampedArrayCustom.cpp:
2228         * bindings/scripts/CodeGeneratorV8.pm:
2229         (GenerateImplementation): Modified Generator code to generate bindings for toV8().
2230         (IsWrapperType):
2231         (GetTypeNameOfExternalTypedArray): Method to get view type of TypedArray.
2232         * bindings/scripts/test/V8/V8Float64Array.cpp: Tests results.
2233         (WebCore::toV8):
2234         * bindings/v8/custom/V8Float32ArrayCustom.cpp: Removed custom call toV8().
2235         * bindings/v8/custom/V8Float64ArrayCustom.cpp: Ditto.
2236         * bindings/v8/custom/V8Int16ArrayCustom.cpp: Ditto.
2237         * bindings/v8/custom/V8Int32ArrayCustom.cpp: Ditto.
2238         * bindings/v8/custom/V8Int8ArrayCustom.cpp: Ditto.
2239         * bindings/v8/custom/V8Uint16ArrayCustom.cpp: Ditto.
2240         * bindings/v8/custom/V8Uint32ArrayCustom.cpp: Ditto.
2241         * bindings/v8/custom/V8Uint8ArrayCustom.cpp: Ditto.
2242         * bindings/v8/custom/V8Uint8ClampedArrayCustom.cpp: Ditto.
2243         * html/canvas/Int8Array.idl: Using TypedArray.
2244         * html/canvas/Uint8Array.idl: Ditto.
2245         * html/canvas/Uint8ClampedArray.idl: Ditto.
2246
2247 2012-08-07  Pavel Feldman  <pfeldman@chromium.org>
2248
2249         Web Inspector: [regression r121673] restore link between the command and the result.
2250         https://bugs.webkit.org/show_bug.cgi?id=93280
2251
2252         Reviewed by Vsevolod Vlasov.
2253
2254         Passing lost parameter along.
2255
2256         Test: inspector/console/console-originating-command.html
2257
2258         * inspector/front-end/ConsoleView.js:
2259         (WebInspector.ConsoleView.prototype.runScript.runCallback):
2260         (WebInspector.ConsoleView.prototype.runScript):
2261         (WebInspector.ConsoleView.prototype._printResult):
2262
2263 2012-08-07  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2264
2265         CUSTOM_SCHEME_HANDLER flag should depend on REGISTER_PROTOCOL_HANDLER
2266         https://bugs.webkit.org/show_bug.cgi?id=93081
2267
2268         Reviewed by Adam Barth.
2269
2270         CUSTOM_SCHEME_HANDLER #if guards are enclosed in the REGISTER_PROTOCOL_HANDLER guards.
2271         The whole NavigatorRegisterProtocolHandler interface is conditional on REGISTER_PROTOCOL_HANDLER
2272         CUSTOM_SCHEME_HANDLER-specific methods only are conditional on CUSTOM_SCHEME_HANDLER.
2273
2274         No new tests. No new functionality is added.
2275
2276         * Modules/protocolhandler/NavigatorRegisterProtocolHandler.cpp:
2277         (WebCore::NavigatorRegisterProtocolHandler::registerProtocolHandler):
2278         * Modules/protocolhandler/NavigatorRegisterProtocolHandler.h:
2279         (NavigatorRegisterProtocolHandler):
2280         * Modules/protocolhandler/NavigatorRegisterProtocolHandler.idl:
2281         * Modules/protocolhandler/RegisterProtocolHandlerClient.h:
2282
2283 2012-08-07  Xingnan Wang  <xingnan.wang@intel.com>
2284
2285         IndexedDB: Size the Vector in encodeInt/encodeVarInt/encodeString
2286         https://bugs.webkit.org/show_bug.cgi?id=91813
2287
2288         Reviewed by Kentaro Hara.
2289
2290         To avoid memory re-allocation in Vector, init the capability or size of Vector in encodeInt(), encodeVarInt(),
2291         encodeBool(), encodeIDBKey() etc.
2292
2293         No new tests - Low level functions covered by existing layout tests and also covered by Chromium
2294         webkit_unit_tests IDBLevelIDBCodingTest.* which validates the sizes of buffers returned by encodeVarInt.
2295
2296         * Modules/indexeddb/IDBLevelDBCoding.cpp:
2297         (WebCore::IDBLevelDBCoding::encodeInt):
2298         (WebCore::IDBLevelDBCoding::encodeVarInt):
2299         (WebCore::IDBLevelDBCoding::encodeString):
2300
2301 2012-08-06  Arko Saha  <arko@motorola.com>
2302
2303         Microdata: itemType[index] must be undefined for out-of-range index.
2304         https://bugs.webkit.org/show_bug.cgi?id=92988
2305
2306         Reviewed by Kentaro Hara.
2307
2308         Made changes in IndexedGetter property so that it returns undefined
2309         for out-of-range index.
2310         Spec: http://www.w3.org/TR/WebIDL/#idl-indexed-properties
2311         Firefox and Opera's behavior is consistent with the spec. Both returns
2312         undefined for out-of-range index.
2313
2314         Also renamed the function name collectionStringOrNullIndexedPropertyGetter and
2315         setCollectionStringOrNullIndexedGetter to collectionStringOrUndefinedIndexedPropertyGetter
2316         and setCollectionStringOrUndefinedIndexedGetter respectively.
2317
2318         Test: fast/dom/MicroData/domsettabletokenlist-attributes-out-of-range-index.html
2319
2320         * bindings/scripts/CodeGeneratorJS.pm:
2321         (GenerateImplementation):
2322         * bindings/scripts/CodeGeneratorV8.pm:
2323         (GenerateImplementationIndexer):
2324         * bindings/v8/V8Collection.h:
2325         (WebCore::collectionStringOrUndefinedIndexedPropertyGetter):
2326         (WebCore::setCollectionStringOrUndefinedIndexedGetter):
2327
2328 2012-08-06  David Grogan  <dgrogan@chromium.org>
2329
2330         IndexedDB: Make leveldb store integer versions and migrate old schemas
2331         https://bugs.webkit.org/show_bug.cgi?id=92883
2332
2333         Reviewed by Tony Chang.
2334
2335         Our first schema change. If an existing DB doesn't have integer
2336         versions, this will add one to all object stores in the origin.
2337
2338         No new tests - chrome test for the migration forthcoming. Will involve
2339         starting with a leveldb directory from an old build of chrome, opening
2340         it up with the migration code in place, and checking the new database.
2341         http://codereview.chromium.org/10826159/
2342
2343         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
2344         (WebCore::putVarInt):
2345         (WebCore):
2346         (WebCore::setUpMetadata):
2347         Uses the ASSERT-but-still-handle-corruption pattern recently discussed
2348         in https://bugs.webkit.org/show_bug.cgi?id=92725#c13.
2349
2350         (WebCore::IDBLevelDBBackingStore::open):
2351         (WebCore::IDBLevelDBBackingStore::getIDBDatabaseMetaData):
2352         Because we can't store negative numbers, store 0 instead of -1.
2353
2354         (WebCore::IDBLevelDBBackingStore::createIDBDatabaseMetaData):
2355         (WebCore::IDBLevelDBBackingStore::updateIDBDatabaseIntVersion):
2356         * Modules/indexeddb/IDBLevelDBCoding.h:
2357         * Modules/indexeddb/IDBMetadata.h:
2358
2359 2012-08-06  Sheriff Bot  <webkit.review.bot@gmail.com>
2360
2361         Unreviewed, rolling out r124780.
2362         http://trac.webkit.org/changeset/124780
2363         https://bugs.webkit.org/show_bug.cgi?id=93340
2364
2365         We don't want an incomplete feature set for the chromium
2366         branch cut. (Requested by annacc on #webkit).
2367
2368         * CMakeLists.txt:
2369         * DerivedSources.cpp:
2370         * DerivedSources.make:
2371         * DerivedSources.pri:
2372         * GNUmakefile.list.am:
2373         * Modules/mediasource/MediaSource.cpp: Removed.
2374         * Modules/mediasource/MediaSource.h: Removed.
2375         * Modules/mediasource/MediaSource.idl: Removed.
2376         * Modules/mediasource/MediaSourceRegistry.cpp: Removed.
2377         * Modules/mediasource/MediaSourceRegistry.h: Removed.
2378         * Modules/mediasource/SourceBuffer.cpp:
2379         (WebCore::SourceBuffer::SourceBuffer):
2380         (WebCore::SourceBuffer::buffered):
2381         (WebCore::SourceBuffer::append):
2382         (WebCore::SourceBuffer::abort):
2383         * Modules/mediasource/SourceBuffer.h:
2384         (WebCore::SourceBuffer::create):
2385         (WebCore::SourceBuffer::clear):
2386         (SourceBuffer):
2387         * Modules/mediasource/SourceBufferList.cpp:
2388         * Modules/mediasource/SourceBufferList.h:
2389         * Target.pri:
2390         * WebCore.gypi:
2391         * WebCore.vcproj/WebCore.vcproj:
2392         * WebCore.xcodeproj/project.pbxproj:
2393         * dom/EventTarget.h:
2394         (WebCore):
2395         * dom/EventTargetFactory.in:
2396         * html/DOMURL.cpp:
2397         * html/DOMURL.h:
2398         (WebCore):
2399         (DOMURL):
2400         * html/DOMURL.idl:
2401         * page/DOMWindow.idl:
2402
2403 2012-08-06  Sheriff Bot  <webkit.review.bot@gmail.com>
2404
2405         Unreviewed, rolling out r124798.
2406         http://trac.webkit.org/changeset/124798
2407         https://bugs.webkit.org/show_bug.cgi?id=93337
2408
2409         We don't want an incomplete feature set for the chromium
2410         branch cut. (Requested by annacc on #webkit).
2411
2412         * html/DOMURL.cpp:
2413         (WebCore::DOMURL::createObjectURL):
2414         * html/PublicURLManager.h:
2415         (WebCore::PublicURLManager::contextDestroyed):
2416         (PublicURLManager):
2417
2418 2012-08-06  Sheriff Bot  <webkit.review.bot@gmail.com>
2419
2420         Unreviewed, rolling out r124848.
2421         http://trac.webkit.org/changeset/124848
2422         https://bugs.webkit.org/show_bug.cgi?id=93336
2423
2424         Caused 3 tests to crash on chromium Linux32/Mac10.6/Linux
2425         (Requested by toyoshim on #webkit).
2426
2427         * html/HTMLMediaElement.cpp:
2428         (WebCore):
2429         (WebCore::HTMLMediaElement::HTMLMediaElement):
2430         (WebCore::HTMLMediaElement::parseAttribute):
2431         (WebCore::HTMLMediaElement::prepareForLoad):
2432         (WebCore::HTMLMediaElement::loadResource):
2433         (WebCore::HTMLMediaElement::noneSupported):
2434         (WebCore::HTMLMediaElement::mediaEngineError):
2435         (WebCore::HTMLMediaElement::mediaPlayerSourceOpened):
2436         (WebCore::HTMLMediaElement::isValidSourceId):
2437         (WebCore::HTMLMediaElement::seek):
2438         (WebCore::HTMLMediaElement::webkitSourceAddId):
2439         (WebCore::HTMLMediaElement::webkitSourceRemoveId):
2440         (WebCore::HTMLMediaElement::webkitSourceBuffered):
2441         (WebCore::HTMLMediaElement::webkitSourceAppend):
2442         (WebCore::HTMLMediaElement::webkitSourceAbort):
2443         (WebCore::HTMLMediaElement::webkitSourceEndOfStream):
2444         (WebCore::HTMLMediaElement::webkitSourceState):
2445         (WebCore::HTMLMediaElement::setSourceState):
2446         (WebCore::HTMLMediaElement::userCancelledLoad):
2447         (WebCore::HTMLMediaElement::createMediaPlayer):
2448         * html/HTMLMediaElement.h:
2449         (HTMLMediaElement):
2450         * html/HTMLMediaElement.idl:
2451
2452 2012-08-06  Anna Cavender  <annacc@chromium.org>
2453
2454         Update HTMLMediaElement to the new OO MediaSource API.
2455         https://bugs.webkit.org/show_bug.cgi?id=91775
2456
2457         Reviewed by Eric Carlson.
2458
2459         This patch rips out the old-style MediaSource API and allows a
2460         MediaSource object to be attached to HTMLMediaElement.
2461         http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html
2462
2463         Test: http/tests/media/media-source/video-media-source-add-and-remove-buffers.html
2464
2465         Tests: updates to http/tests/media/media-source/*
2466
2467         * html/HTMLMediaElement.cpp:
2468         (WebCore):
2469         (WebCore::HTMLMediaElement::HTMLMediaElement): Remove old style API resources.
2470         (WebCore::HTMLMediaElement::parseAttribute): Remove old style event attributes.
2471         (WebCore::HTMLMediaElement::prepareForLoad): Set source state to "closed".
2472         (WebCore::HTMLMediaElement::loadResource): Get MediaSource object from blob registry
2473             look up and, if found, set it's MediaPlayer pointer to the current MediaPlayer.
2474         (WebCore::HTMLMediaElement::noneSupported): Set source state to "closed".
2475         (WebCore::HTMLMediaElement::mediaEngineError): Set source state to "closed".
2476         (WebCore::HTMLMediaElement::mediaPlayerSourceOpened): Set source state to "open".
2477         (WebCore::HTMLMediaElement::mediaPlayerSourceURL): Change to new blob URL.
2478         (WebCore::HTMLMediaElement::seek): Check if source state is "closed".
2479         (WebCore::HTMLMediaElement::setSourceState): Helper function so that we don't have to
2480             keep checking for m_mediaSource.
2481         (WebCore::HTMLMediaElement::userCancelledLoad): Set source state to "closed".
2482         (WebCore::HTMLMediaElement::createMediaPlayer): If the current MediaPlayer is re-
2483             created, notify the MediaSource and reset its MediaPlayer.
2484
2485         * html/HTMLMediaElement.h: Remove old style API code and add a MediaSource object.
2486         (HTMLMediaElement):
2487         * html/HTMLMediaElement.idl: Remove old style API.
2488
2489 2012-08-06  Adam Barth  <abarth@webkit.org>
2490
2491         BindingSecurity::shouldAllowAccessToFrame shouldn't use a raw boolean parameter
2492         https://bugs.webkit.org/show_bug.cgi?id=93323
2493
2494         Reviewed by Eric Seidel.
2495
2496         As requested by Eric. This patch also renames the function to match its
2497         counterpart in the JavaScriptCore bindings.
2498
2499         * bindings/generic/BindingSecurity.cpp:
2500         (WebCore::canAccessDocument):
2501         (WebCore::BindingSecurity::shouldAllowAccessToFrame):
2502         (WebCore::BindingSecurity::shouldAllowAccessToNode):
2503         (WebCore::BindingSecurity::allowSettingFrameSrcToJavascriptUrl):
2504         * bindings/generic/BindingSecurity.h:
2505         (BindingSecurity):
2506         * bindings/scripts/CodeGeneratorV8.pm:
2507         (GenerateDomainSafeFunctionGetter):
2508         (GenerateReplaceableAttrSetter):
2509         (GenerateFunctionCallback):
2510         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
2511         (WebCore::TestActiveDOMObjectV8Internal::excitingFunctionCallback):
2512         (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter):
2513         * bindings/v8/ScriptController.cpp:
2514         (WebCore::ScriptController::canAccessFromCurrentOrigin):
2515         * bindings/v8/custom/V8DOMWindowCustom.cpp:
2516         (WebCore::WindowSetTimeoutImpl):
2517         (WebCore::V8DOMWindow::eventAccessorGetter):
2518         (WebCore::V8DOMWindow::eventAccessorSetter):
2519         (WebCore::V8DOMWindow::openerAccessorSetter):
2520         (WebCore::V8DOMWindow::addEventListenerCallback):
2521         (WebCore::V8DOMWindow::removeEventListenerCallback):
2522         (WebCore::V8DOMWindow::showModalDialogCallback):
2523         (WebCore::V8DOMWindow::openCallback):
2524         (WebCore::V8DOMWindow::namedSecurityCheck):
2525         (WebCore::V8DOMWindow::indexedSecurityCheck):
2526         * bindings/v8/custom/V8HistoryCustom.cpp:
2527         (WebCore::V8History::indexedSecurityCheck):
2528         (WebCore::V8History::namedSecurityCheck):
2529         * bindings/v8/custom/V8InjectedScriptManager.cpp:
2530         (WebCore::InjectedScriptManager::canAccessInspectedWindow):
2531         * bindings/v8/custom/V8LocationCustom.cpp:
2532         (WebCore::V8Location::reloadAccessorGetter):
2533         (WebCore::V8Location::replaceAccessorGetter):
2534         (WebCore::V8Location::assignAccessorGetter):
2535         (WebCore::V8Location::toStringCallback):
2536         (WebCore::V8Location::indexedSecurityCheck):
2537         (WebCore::V8Location::namedSecurityCheck):
2538
2539 2012-08-06  Yuta Kitamura  <yutak@chromium.org>
2540
2541         WebSocket.send() should accept ArrayBufferView
2542         https://bugs.webkit.org/show_bug.cgi?id=90877
2543
2544         Reviewed by Kent Tamura.
2545
2546         Accept ArrayBufferView as an argument of WebSocket.send() to comply with recent change
2547         in specification: <http://html5.org/tools/web-apps-tracker?from=7084&to=7085>.
2548
2549         Once WebSocket.send(ArrayBuffer) was removed from the specification, but added back
2550         in <http://html5.org/tools/web-apps-tracker?from=7202&to=7203>. Thus the functionality
2551         of send(ArrayBuffer) is kept as-is.
2552
2553         Tests: http/tests/websocket/tests/hybi/send-arraybufferview.html
2554                http/tests/websocket/tests/hybi/workers/send-arraybufferview.html
2555
2556         * Modules/websockets/ThreadableWebSocketChannel.h:
2557         Change the signature of send() to receive offset and length so the clients can send
2558         subrange of an ArrayBuffer.
2559         * Modules/websockets/WebSocket.cpp:
2560         (WebCore::WebSocket::send):
2561         WebSocket.send(ArrayBufferView) is added, which puts the sub region of the given
2562         ArrayBuffer into the outgoing frame queue.
2563         * Modules/websockets/WebSocket.h:
2564         * Modules/websockets/WebSocket.idl:
2565         * Modules/websockets/WebSocketChannel.cpp:
2566         (WebCore::WebSocketChannel::send):
2567         * Modules/websockets/WebSocketChannel.h:
2568         (WebSocketChannel):
2569         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
2570         (WebCore::WorkerThreadableWebSocketChannel::send):
2571         (WebCore::WorkerThreadableWebSocketChannel::Peer::send):
2572         (WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
2573         Send only necessary part of data to the main thread.
2574         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
2575         (WorkerThreadableWebSocketChannel):
2576         (Bridge):
2577         * bindings/js/JSWebSocketCustom.cpp:
2578         (WebCore::JSWebSocket::send): Accept ArrayBufferView in send().
2579         * bindings/v8/custom/V8WebSocketCustom.cpp:
2580         (WebCore::V8WebSocket::sendCallback): Ditto.
2581
2582 2012-08-06  James Robinson  <jamesr@chromium.org>
2583
2584         [chromium] Add gyp variable to control which compositor target is depended on
2585         https://bugs.webkit.org/show_bug.cgi?id=93165
2586
2587         Reviewed by Adam Barth.
2588
2589         This adds a use_libcc_for_compositor gyp variable to control whether webcore_platform links in the compositor
2590         code from the webcore_chromium_compositor target or from cc from the chromium repo.
2591
2592         * WebCore.gyp/WebCore.gyp:
2593         * WebCore.gypi:
2594
2595 2012-08-06  Shinya Kawanaka  <shinyak@chromium.org>
2596
2597         Crash in GenericEventQueue::timerFired since the owner of GenericEventQueue is deleted during dispatching events.
2598         https://bugs.webkit.org/show_bug.cgi?id=92946
2599
2600         Reviewed by Eric Carlson.
2601
2602         In GenericEventQueue::timerFired(), the owner of GenericEventQueue might be deleted.
2603         We have to protect the owner of GenericEventQueue during dispatching events.
2604
2605         Test: media/event-queue-crash.html
2606
2607         * dom/GenericEventQueue.cpp:
2608         (WebCore::GenericEventQueue::timerFired): Added a protection.
2609
2610 2012-08-06  Joshua Bell  <jsbell@chromium.org>
2611
2612         IndexedDB: Remove IDBRequest::finishCursor() and plumbing
2613         https://bugs.webkit.org/show_bug.cgi?id=93274
2614
2615         Reviewed by Tony Chang.
2616
2617         Delete an unused flag and code for setting it, rendered obsolete in r123275.
2618
2619         No new tests - no functional changes.
2620
2621         * Modules/indexeddb/IDBCursor.cpp:
2622         (WebCore::IDBCursor::close):
2623         * Modules/indexeddb/IDBRequest.cpp:
2624         (WebCore::IDBRequest::IDBRequest):
2625         * Modules/indexeddb/IDBRequest.h:
2626         (IDBRequest):
2627
2628 2012-08-06  James Robinson  <jamesr@chromium.org>
2629
2630         [chromium] Remove lingering unwrap<>() calls in GraphicsLayerChromium.cpp
2631         https://bugs.webkit.org/show_bug.cgi?id=93319
2632
2633         Reviewed by Adrienne Walker.
2634
2635         Gets rid of all (but one) of the remaining unwrap<LayerChromium>() calls in GraphicsLayer chromium to avoid
2636         punching through the WebLayer API.  Covered by many layout tests, mostly in compositing/
2637
2638         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
2639         (WebCore::GraphicsLayerChromium::willBeDestroyed):
2640         (WebCore::GraphicsLayerChromium::setName):
2641         (WebCore::GraphicsLayerChromium::updateNames):
2642         (WebCore::GraphicsLayerChromium::setMaskLayer):
2643         (WebCore::GraphicsLayerChromium::setReplicatedByLayer):
2644         (WebCore::GraphicsLayerChromium::setContentsToImage):
2645         (WebCore::GraphicsLayerChromium::setContentsToCanvas):
2646         (WebCore::GraphicsLayerChromium::setContentsToMedia):
2647         (WebCore::GraphicsLayerChromium::updateChildList):
2648         (WebCore::GraphicsLayerChromium::setupContentsLayer):
2649         * platform/graphics/chromium/GraphicsLayerChromium.h:
2650         (GraphicsLayerChromium):
2651
2652 2012-08-06  Adrienne Walker  <enne@google.com>
2653
2654         [chromium] Convert WebScrollbarThemeGeometry from a concrete class to an interface
2655         https://bugs.webkit.org/show_bug.cgi?id=93308
2656
2657         Reviewed by James Robinson.
2658
2659         Convert WebScrollbarThemeGeometry to be an interface. Create a new
2660         WebScrollbarThemeGeometryNative implementation to wrap a native theme
2661         pointer.
2662
2663         Update ScrollbarLayerChromium/CCScrollbarLayerImpl to use a pointer to
2664         this interface rather than a concrete member variable. Because both
2665         layer types need to access the theme during painting or compositing
2666         and either layer could go away at any time, the theme is cloned during
2667         commit rather than dealing with refcounting across threads or having
2668         one layer type be the sole owner.
2669
2670         * WebCore.gypi:
2671         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
2672         (WebCore::createScrollbarLayer):
2673         * platform/chromium/support/WebScrollbarThemeGeometryNative.cpp: Renamed from Source/WebKit/chromium/src/WebScrollbarThemeGeometry.cpp.
2674         (WebKit):
2675         (WebKit::WebScrollbarThemeGeometryNative::create):
2676         (WebKit::WebScrollbarThemeGeometryNative::WebScrollbarThemeGeometryNative):
2677         (WebKit::WebScrollbarThemeGeometryNative::clone):
2678         (WebKit::WebScrollbarThemeGeometryNative::thumbPosition):
2679         (WebKit::WebScrollbarThemeGeometryNative::thumbLength):
2680         (WebKit::WebScrollbarThemeGeometryNative::trackPosition):
2681         (WebKit::WebScrollbarThemeGeometryNative::trackLength):
2682         (WebKit::WebScrollbarThemeGeometryNative::hasButtons):
2683         (WebKit::WebScrollbarThemeGeometryNative::hasThumb):
2684         (WebKit::WebScrollbarThemeGeometryNative::trackRect):
2685         (WebKit::WebScrollbarThemeGeometryNative::thumbRect):
2686         (WebKit::WebScrollbarThemeGeometryNative::minimumThumbLength):
2687         (WebKit::WebScrollbarThemeGeometryNative::scrollbarThickness):
2688         (WebKit::WebScrollbarThemeGeometryNative::backButtonStartRect):
2689         (WebKit::WebScrollbarThemeGeometryNative::backButtonEndRect):
2690         (WebKit::WebScrollbarThemeGeometryNative::forwardButtonStartRect):
2691         (WebKit::WebScrollbarThemeGeometryNative::forwardButtonEndRect):
2692         (WebKit::WebScrollbarThemeGeometryNative::constrainTrackRectToTrackPieces):
2693         (WebKit::WebScrollbarThemeGeometryNative::splitTrack):
2694         * platform/chromium/support/WebScrollbarThemeGeometryNative.h: Added.
2695         (WebKit):
2696         (WebScrollbarThemeGeometryNative):
2697         * platform/graphics/chromium/ScrollbarLayerChromium.cpp:
2698         (WebCore::ScrollbarLayerChromium::create):
2699         (WebCore::ScrollbarLayerChromium::ScrollbarLayerChromium):
2700         (WebCore::ScrollbarLayerChromium::pushPropertiesTo):
2701         (WebCore::ScrollbarBackgroundPainter::create):
2702         (WebCore::ScrollbarBackgroundPainter::ScrollbarBackgroundPainter):
2703         (ScrollbarBackgroundPainter):
2704         (WebCore::ScrollbarThumbPainter::create):
2705         (WebCore::ScrollbarThumbPainter::ScrollbarThumbPainter):
2706         (ScrollbarThumbPainter):
2707         (WebCore::ScrollbarLayerChromium::createTextureUpdaterIfNeeded):
2708         (WebCore::ScrollbarLayerChromium::setTexturePriorities):
2709         (WebCore::ScrollbarLayerChromium::update):
2710         * platform/graphics/chromium/ScrollbarLayerChromium.h:
2711         (ScrollbarLayerChromium):
2712         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
2713         (WebCore::CCScrollbarLayerImpl::setScrollbarGeometry):
2714         (WebCore::CCScrollbarLayerImpl::setScrollbarData):
2715         (WebCore::CCScrollbarLayerImpl::appendQuads):
2716         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
2717         (WebCore::CCScrollbarLayerImpl::scrollbarGeometry):
2718         (CCScrollbarLayerImpl):
2719
2720 2012-08-06  Adam Barth  <abarth@webkit.org>
2721
2722         JSC should use BindingState to determine the activeDOMWindow
2723         https://bugs.webkit.org/show_bug.cgi?id=93307
2724
2725         Reviewed by Eric Seidel.
2726
2727         This patch moves activeDOMWindow from JSDOMBindings.cpp to
2728         BindingState.cpp. This is a first step towards sharing the core
2729         security logic in the bindings between JavaScriptCore and V8. Once the
2730         logic is shared, we will be able to refactor the logic to avoid the
2731         need for DOMWindow::m_securityOrigin.
2732
2733         This patch doesn't actually share any code (yet). It just sets the
2734         stage by creating BindingState as a typedef of ExecState and adding the
2735         appropriate files to the build systems.
2736
2737         This patch also renames activeWindow and firstWindow in the V8 bindings
2738         to activeDOMWindow and firstDOMWindow to match the names in the
2739         JavaScriptCore bindings.
2740
2741         * GNUmakefile.list.am:
2742         * Target.pri:
2743         * UseJSC.cmake:
2744         * WebCore.gypi:
2745         * WebCore.vcproj/WebCore.vcproj:
2746         * WebCore.xcodeproj/project.pbxproj:
2747         * bindings/generic/BindingSecurity.cpp:
2748         (WebCore::canAccessDocument):
2749         * bindings/js/JSBindingsAllInOne.cpp:
2750         * bindings/js/JSDOMBinding.cpp:
2751         (WebCore):
2752         * bindings/js/JSDOMBinding.h:
2753         (WebCore):
2754         * bindings/v8/BindingState.cpp:
2755         (WebCore::activeDOMWindow):
2756         (WebCore::firstDOMWindow):
2757         * bindings/v8/BindingState.h:
2758         (WebCore):
2759         * bindings/v8/custom/V8DOMWindowCustom.cpp:
2760         (WebCore::V8DOMWindow::locationAccessorSetter):
2761         (WebCore::handlePostMessageCallback):
2762         (WebCore::V8DOMWindow::showModalDialogCallback):
2763         (WebCore::V8DOMWindow::openCallback):
2764         * bindings/v8/custom/V8DocumentLocationCustom.cpp:
2765         (WebCore::V8Document::locationAccessorSetter):
2766         * bindings/v8/custom/V8LocationCustom.cpp:
2767         (WebCore::V8Location::hashAccessorSetter):
2768         (WebCore::V8Location::hostAccessorSetter):
2769         (WebCore::V8Location::hostnameAccessorSetter):
2770         (WebCore::V8Location::hrefAccessorSetter):
2771         (WebCore::V8Location::pathnameAccessorSetter):
2772         (WebCore::V8Location::portAccessorSetter):
2773         (WebCore::V8Location::protocolAccessorSetter):
2774         (WebCore::V8Location::searchAccessorSetter):
2775         (WebCore::V8Location::reloadCallback):
2776         (WebCore::V8Location::replaceCallback):
2777         (WebCore::V8Location::assignCallback):
2778
2779 2012-08-05  Kent Tamura  <tkent@chromium.org>
2780
2781         [Chromium-Mac] Use the default locale only if the browser locale matches to it
2782         https://bugs.webkit.org/show_bug.cgi?id=93227
2783
2784         Reviewed by Hajime Morita.
2785
2786         For a calendar picker, we have used month names and day-of-week names
2787         obtained from the OS default locale. However, the year-month format and
2788         [Today] [Clear] labels are decided with the browser locale. It made
2789         calendar pickers with mixed languages.
2790
2791         To make calendar pickers with a single language, we use the OS default
2792         locale only if the browser locale matches to it.
2793
2794         No new tests. Behavior for locale setting is not testable in WebKit.
2795
2796         * platform/text/mac/LocaleMac.mm:
2797         (WebCore::languageFromLocale):
2798         A helper for determineLocale. This returns the language part of the
2799         specified locale identifier.
2800         (WebCore::determineLocale):
2801         If the browser language matches to the language of the current NSLocale,
2802         returns the current NSLocale. Otherwise, returns a NSLocale with the
2803         browser language.
2804         Note that [NSLolca localeIdentifier] returns a string in
2805         <language>_<country> format though defaultLanguage() in Chromium returns
2806         a string in <language>-<country> format.
2807         (WebCore::LocaleMac::currentLocale):
2808         Use determineLocale.
2809
2810 2012-08-06  Luke Macpherson   <macpherson@chromium.org>
2811
2812         Handle variables in CSSParser::parseValidPrimitive(), preventing null return value.
2813         https://bugs.webkit.org/show_bug.cgi?id=93235
2814
2815         Reviewed by Tony Chang.
2816
2817         By returning null here (and failing to handle the variable) the current code would cause null pointer dereferences in StyleResolver at several points.
2818         Instead we create a primitive value for the variable reference and return it.
2819
2820         Test: fast/css/variables/invalid-font-reference.html
2821
2822         * css/CSSParser.cpp:
2823         (WebCore::CSSParser::parseValidPrimitive):
2824
2825 2012-08-06  David Reveman  <reveman@chromium.org>
2826
2827         [Chromium] Rename CCTextureUpdater to CCTextureUpdateQueue.
2828         https://bugs.webkit.org/show_bug.cgi?id=93293
2829
2830         Reviewed by Adrienne Walker.
2831
2832         No new tests.
2833
2834         * WebCore.gypi:
2835         * platform/graphics/chromium/ContentLayerChromium.cpp:
2836         (WebCore::ContentLayerChromium::update):
2837         * platform/graphics/chromium/ContentLayerChromium.h:
2838         (ContentLayerChromium):
2839         * platform/graphics/chromium/HeadsUpDisplayLayerChromium.cpp:
2840         (WebCore::HeadsUpDisplayLayerChromium::update):
2841         * platform/graphics/chromium/HeadsUpDisplayLayerChromium.h:
2842         (HeadsUpDisplayLayerChromium):
2843         * platform/graphics/chromium/ImageLayerChromium.cpp:
2844         (WebCore::ImageLayerChromium::update):
2845         * platform/graphics/chromium/ImageLayerChromium.h:
2846         (ImageLayerChromium):
2847         * platform/graphics/chromium/LayerChromium.h:
2848         (WebCore):
2849         (WebCore::LayerChromium::update):
2850         * platform/graphics/chromium/ScrollbarLayerChromium.cpp:
2851         (WebCore::ScrollbarLayerChromium::updatePart):
2852         (WebCore::ScrollbarLayerChromium::update):
2853         * platform/graphics/chromium/ScrollbarLayerChromium.h:
2854         (WebCore):
2855         (ScrollbarLayerChromium):
2856         * platform/graphics/chromium/TextureLayerChromium.cpp:
2857         (WebCore::TextureLayerChromium::update):
2858         * platform/graphics/chromium/TextureLayerChromium.h:
2859         (TextureLayerChromiumClient):
2860         (TextureLayerChromium):
2861         * platform/graphics/chromium/TiledLayerChromium.cpp:
2862         (WebCore::TiledLayerChromium::updateTiles):
2863         (WebCore::TiledLayerChromium::updateContentRect):
2864         * platform/graphics/chromium/TiledLayerChromium.h:
2865         (TiledLayerChromium):
2866         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2867         (WebCore::CCLayerTreeHost::updateLayers):
2868         (WebCore::CCLayerTreeHost::paintMasksForRenderSurface):
2869         (WebCore::CCLayerTreeHost::paintLayerContents):
2870         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2871         (WebCore):
2872         (CCLayerTreeHost):
2873         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
2874         (WebCore::CCSingleThreadProxy::doCommit):
2875         (WebCore::CCSingleThreadProxy::commitAndComposite):
2876         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
2877         * platform/graphics/chromium/cc/CCTextureUpdateController.cpp:
2878         (WebCore::CCTextureUpdateController::updateTextures):
2879         (WebCore::CCTextureUpdateController::CCTextureUpdateController):
2880         (WebCore::CCTextureUpdateController::hasMoreUpdates):
2881         (WebCore::CCTextureUpdateController::updateMoreTextures):
2882         * platform/graphics/chromium/cc/CCTextureUpdateController.h:
2883         (WebCore::CCTextureUpdateController::create):
2884         (CCTextureUpdateController):
2885         * platform/graphics/chromium/cc/CCTextureUpdateQueue.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCTextureUpdater.cpp.
2886         (WebCore):
2887         (WebCore::CCTextureUpdateQueue::CCTextureUpdateQueue):
2888         (WebCore::CCTextureUpdateQueue::~CCTextureUpdateQueue):
2889         (WebCore::CCTextureUpdateQueue::appendFullUpload):
2890         (WebCore::CCTextureUpdateQueue::appendPartialUpload):
2891         (WebCore::CCTextureUpdateQueue::appendCopy):
2892         (WebCore::CCTextureUpdateQueue::takeFirstFullUpload):
2893         (WebCore::CCTextureUpdateQueue::takeFirstPartialUpload):
2894         (WebCore::CCTextureUpdateQueue::takeFirstCopy):
2895         (WebCore::CCTextureUpdateQueue::hasMoreUpdates):
2896         * platform/graphics/chromium/cc/CCTextureUpdateQueue.h: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCTextureUpdater.h.
2897         (WebCore):
2898         (CCTextureUpdateQueue):
2899         (WebCore::CCTextureUpdateQueue::fullUploadSize):
2900         (WebCore::CCTextureUpdateQueue::partialUploadSize):
2901         (WebCore::CCTextureUpdateQueue::copySize):
2902         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
2903         (WebCore::CCThreadProxy::beginFrame):
2904         (WebCore::CCThreadProxy::beginFrameCompleteOnImplThread):
2905         * platform/graphics/chromium/cc/CCThreadProxy.h:
2906         (WebCore):
2907         (CCThreadProxy):
2908
2909 2012-08-06  Anders Carlsson  <andersca@apple.com>
2910
2911         Clear out the TileCache backpointer for all tile layers when the tile cache is destroyed
2912         https://bugs.webkit.org/show_bug.cgi?id=93317
2913         <rdar://problem/11566543>
2914
2915         Reviewed by Dean Jackson.
2916
2917         It seems that in some rare cases, the tile cache layer can be destroyed in the same transaction as tile layers
2918         are being asked to paint. Make sure to null out the TileCache back pointer for all layers in the TileCache destructor.
2919
2920         * platform/graphics/ca/mac/TileCache.mm:
2921         (WebCore::TileCache::~TileCache):
2922
2923 2012-08-06  Sheriff Bot  <webkit.review.bot@gmail.com>
2924
2925         Unreviewed, rolling out r124816.
2926         http://trac.webkit.org/changeset/124816
2927         https://bugs.webkit.org/show_bug.cgi?id=93311
2928
2929         made some tests crash (Requested by noamr on #webkit).
2930
2931         * platform/graphics/GraphicsLayerAnimation.cpp:
2932         (WebCore::GraphicsLayerAnimation::GraphicsLayerAnimation):
2933         (WebCore::GraphicsLayerAnimations::hasActiveAnimationsOfType):
2934         (WebCore::GraphicsLayerAnimations::hasRunningAnimations):
2935         (WebCore::GraphicsLayerAnimations::add):
2936         (WebCore::GraphicsLayerAnimations::pause):
2937         (WebCore::GraphicsLayerAnimations::apply):
2938         * platform/graphics/GraphicsLayerAnimation.h:
2939         (GraphicsLayerAnimation):
2940         (GraphicsLayerAnimations):
2941         (WebCore::GraphicsLayerAnimations::remove):
2942         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2943         (WebCore::GraphicsLayerTextureMapper::addAnimation):
2944
2945 2012-08-06  Max Vujovic  <mvujovic@adobe.com>
2946
2947         [CSS Shaders] Parse mix function
2948         https://bugs.webkit.org/show_bug.cgi?id=90101
2949
2950         Reviewed by Dirk Schulze.
2951
2952         Parse the mix function syntax for CSS Shaders as defined in the Filter Effects spec:
2953         https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#FilterFunction
2954
2955         The fragment shader argument of the custom filter function can now be a mix function with
2956         the following syntax:
2957         mix(<uri> [ <blend-mode> || <alpha-compositing> ]?)
2958
2959         For example:
2960         -webkit-filter: custom(url(shader.vert) mix(url(shader.frag multiply source-over))
2961
2962         The Filter Effects spec references the Compositing and Blending spec, which defines the
2963         supported blend modes and alpha compositing modes.
2964
2965         Blend modes:
2966         https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#blend-mode
2967
2968         This patch adds all of the blend modes in the spec.
2969
2970         Alpha compositing modes:
2971         https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#alpha-compositing
2972
2973         This patch does not add any new CSS values for alpha compositing. Currently, we parse the
2974         values that are the same between the spec and the -webkit-background-composite property,
2975         including:
2976             clear
2977             copy
2978             source-over
2979             source-in
2980             source-out
2981             source-atop
2982             destination-over
2983             destination-in
2984             destination-out
2985             destination-atop
2986             xor
2987
2988         In the future, we may need to add the following CSS values for alpha compositing:
2989             lighter
2990             destination
2991
2992         This is currently under discussion on the www-style mailing list:
2993         http://lists.w3.org/Archives/Public/www-style/2012Aug/0123.html
2994
2995         No new test files. Add test cases in:
2996             css3/filters/script-tests/custom-filter-property-computed-style.js:
2997             css3/filters/script-tests/custom-filter-property-parsing-invalid.js:
2998             css3/filters/script-tests/custom-filter-property-parsing.js:
2999
3000         * GNUmakefile.list.am:
3001         * Target.pri:
3002         * WebCore.gypi:
3003         * WebCore.vcproj/WebCore.vcproj:
3004         * WebCore.xcodeproj/project.pbxproj:
3005         * css/CSSComputedStyleDeclaration.cpp:
3006         (WebCore::CSSComputedStyleDeclaration::valueForFilter):
3007         * css/CSSParser.cpp:
3008         (WebCore::CSSParser::isBlendMode):
3009         (WebCore):
3010         (WebCore::CSSParser::isCompositeOperator):
3011         (WebCore::CSSParser::parseMixFunction):
3012         (WebCore::CSSParser::parseCustomFilter):
3013         * css/CSSParser.h:
3014         (WebCore):
3015         * css/CSSParserValues.h:
3016         (WebCore::CSSParserValueList::currentIndex):
3017         * css/CSSPrimitiveValueMappings.h:
3018         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3019         (WebCore):
3020         (WebCore::CSSPrimitiveValue::operator BlendMode):
3021         * css/CSSValue.cpp:
3022         (WebCore::CSSValue::reportMemoryUsage):
3023         (WebCore::CSSValue::cssText):
3024         (WebCore::CSSValue::destroy):
3025         (WebCore::CSSValue::cloneForCSSOM):
3026         * css/CSSValue.h:
3027         (WebCore::CSSValue::isWebKitCSSMixFunctionValue):
3028         (CSSValue):
3029         * css/CSSValueKeywords.in:
3030         * css/StyleResolver.cpp:
3031         (WebCore::StyleResolver::collectMatchingRulesForList):
3032         * css/WebKitCSSMixFunctionValue.cpp: Added.
3033         (WebCore):
3034         (WebCore::WebKitCSSMixFunctionValue::WebKitCSSMixFunctionValue):
3035         (WebCore::WebKitCSSMixFunctionValue::customCssText):
3036         (WebCore::WebKitCSSMixFunctionValue::cloneForCSSOM):
3037         (WebCore::WebKitCSSMixFunctionValue::reportDescendantMemoryUsage):
3038         * css/WebKitCSSMixFunctionValue.h: Added.
3039         (WebCore):
3040         (WebKitCSSMixFunctionValue):
3041         (WebCore::WebKitCSSMixFunctionValue::create):
3042         * platform/graphics/GraphicsTypes.h:
3043         * platform/graphics/filters/CustomFilterProgram.cpp:
3044         (WebCore::CustomFilterProgram::CustomFilterProgram):
3045         * platform/graphics/filters/CustomFilterProgram.h:
3046         (WebCore::CustomFilterProgramMixSettings::CustomFilterProgramMixSettings):
3047         (CustomFilterProgramMixSettings):
3048         (WebCore):
3049         * rendering/style/StyleCustomFilterProgram.h:
3050         (WebCore::StyleCustomFilterProgram::create):
3051         (WebCore::StyleCustomFilterProgram::StyleCustomFilterProgram):
3052
3053 2012-08-06  No'am Rosenthal  <noam.rosenthal@nokia.com>
3054
3055         GraphicsLayerAnimation shouldn't use HashMap<String>
3056         https://bugs.webkit.org/show_bug.cgi?id=93284
3057
3058         Reviewed by Kenneth Rohde Christiansen.
3059
3060         Use a vector containing all the animations instead of a map of String to Vector.
3061         The HashMap contains very few elements, which makes it inefficient relatively to a vector.
3062         This has been shown to be a bottleneck in valgrind.
3063
3064         Covered by existing animation tests.
3065
3066         * platform/graphics/GraphicsLayerAnimation.cpp:
3067         (WebCore::GraphicsLayerAnimation::GraphicsLayerAnimation):
3068         (WebCore::GraphicsLayerAnimations::hasActiveAnimationsOfType):
3069         (WebCore::GraphicsLayerAnimations::hasRunningAnimations):
3070         (WebCore::GraphicsLayerAnimations::add):
3071         (WebCore::GraphicsLayerAnimations::pause):
3072         (WebCore::GraphicsLayerAnimations::remove):
3073         (WebCore::GraphicsLayerAnimations::apply):
3074         * platform/graphics/GraphicsLayerAnimation.h:
3075         (GraphicsLayerAnimation):
3076         (WebCore::GraphicsLayerAnimation::name):
3077         (GraphicsLayerAnimations):
3078         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
3079         (WebCore::GraphicsLayerTextureMapper::addAnimation):
3080
3081 2012-08-06  Beth Dakin  <bdakin@apple.com>
3082
3083         https://bugs.webkit.org/show_bug.cgi?id=93199
3084         REGRESSION (r124489): Crash in FrameView::scrollContentsFastPath when 
3085         scrolling Facebook and Google image search
3086         -and corresponding-
3087         <rdar://problem/12035066>
3088
3089         Reviewed by Anders Carlsson.
3090
3091         As the comment in setShouldUpdateScrollLayerPositionOnMainThread() 
3092         indicates, the goal of adding a call to 
3093         updateMainFrameScrollPositionAndScrollLayerPosition() within that 
3094         function was just to make sure the layer position was up-to-date 
3095         since that is what is not kept up to date when scrolling is happening 
3096         on the scrolling thread. So I'm fixing this crash by having that code 
3097         ONLY update the layer position instead of also updating the scroll 
3098         position, since it was updating the scroll position that led to this 
3099         crash.
3100
3101         New function updateMainFrameScrollLayerPosition() will update JUST 
3102         the layer position.
3103         * page/scrolling/ScrollingCoordinator.h:
3104         (ScrollingCoordinator):        
3105         * page/scrolling/ScrollingCoordinator.cpp:
3106         (WebCore::ScrollingCoordinator::updateMainFrameScrollLayerPosition):
3107
3108         Update just the layer position here instead of the layer position and 
3109         the scroll position.
3110         (WebCore)::
3111 (WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):
3112
3113 2012-08-06  Anna Cavender  <annacc@chromium.org>
3114
3115         MediaSource should use it's own list of source URLs
3116         https://bugs.webkit.org/show_bug.cgi?id=93285
3117
3118         Reviewed by Eric Carlson.
3119
3120         r124780 added MediaSource objects to PublicURLManager's streamURLs list,
3121         piggy-backing on MEDIA_STREAM.  This patch creates a sourceURLs list so
3122         that MediaSource can stand on its own.
3123
3124         Test: builds on Andriod even when MEDIA_STREAM is disabled.
3125
3126         * html/DOMURL.cpp:
3127         (WebCore::DOMURL::createObjectURL):
3128         * html/PublicURLManager.h:
3129         (WebCore::PublicURLManager::contextDestroyed):
3130         (PublicURLManager):
3131         (WebCore::PublicURLManager::sourceURLs):
3132
3133 2012-08-06  Nico Weber  <thakis@chromium.org>
3134
3135         [chromium/mac] Unbreak debug builds with the 10.7 SDK
3136         https://bugs.webkit.org/show_bug.cgi?id=93202
3137
3138         Reviewed by James Robinson.
3139
3140         FMGetATSFontRefFromFont() is not available with the 10.7 SDK
3141         when targetting 10.6. Don't delete this code completely yet,
3142         it's still used with the 10.6 SDK when targetting 10.6 (which
3143         chromium's build bots use).
3144
3145         * platform/graphics/mac/SimpleFontDataMac.mm:
3146         (WebCore):
3147
3148 2012-07-31  Ojan Vafai  <ojan@chromium.org>
3149
3150         need tests to ensure flexboxes play nicely with box-sizing
3151         https://bugs.webkit.org/show_bug.cgi?id=70771
3152
3153         Reviewed by Tony Chang.
3154
3155         Anytime we grab the width/height off of the RenderStyle, we need to adjust
3156         it for box-sizing. Fortunately, we only do this two places in RenderFlexibleBox.
3157         Also, delete crossAxisLength since it's unused.
3158
3159         Test: css3/flexbox/box-sizing.html
3160
3161         * rendering/RenderFlexibleBox.cpp:
3162         (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
3163         * rendering/RenderFlexibleBox.h:
3164
3165 2012-08-06  John J. Barton  <johnjbarton@chromium.org>
3166
3167         Web Inspector: WebInspector.linkifyStringAsFragment gives wrong typeof lineNumber
3168         https://bugs.webkit.org/show_bug.cgi?id=93019
3169
3170         Reviewed by Pavel Feldman.
3171
3172         Add test for WebInspector.linkifyStringAsFragment()
3173
3174         * inspector/front-end/ResourceUtils.js:
3175         (WebInspector.linkifyStringAsFragmentWithCustomLinkifier):
3176
3177 2012-08-06  David Reveman  <reveman@chromium.org>
3178
3179         [Chromium] Refactor CCTextureUpdater into CCTextureUpdater and CCTextureUpdateController.
3180         https://bugs.webkit.org/show_bug.cgi?id=92596
3181
3182         Reviewed by Adrienne Walker.
3183
3184         The CCTextureUpdater interface is used by the main thread to queue
3185         texture updates. The CCTextureUpdateController constructor takes a
3186         CCTextureUpdater and contains the logic required to perform texture
3187         uploads and texture copies. This class is only used by the impl thread.
3188
3189         No new tests.
3190
3191         * WebCore.gypi:
3192         * platform/graphics/chromium/LayerRendererChromium.cpp:
3193         * platform/graphics/chromium/ScrollbarLayerChromium.cpp:
3194         (WebCore::ScrollbarLayerChromium::updatePart):
3195         * platform/graphics/chromium/TextureCopier.cpp:
3196         (WebCore::AcceleratedTextureCopier::copyTexture):
3197         * platform/graphics/chromium/TextureCopier.h:
3198         (Parameters):
3199         (TextureCopier):
3200         (AcceleratedTextureCopier):
3201         * platform/graphics/chromium/TextureUploader.h:
3202         (Parameters):
3203         (TextureUploader):
3204         * platform/graphics/chromium/ThrottledTextureUploader.cpp:
3205         (WebCore::ThrottledTextureUploader::uploadTexture):
3206         * platform/graphics/chromium/ThrottledTextureUploader.h:
3207         (ThrottledTextureUploader):
3208         * platform/graphics/chromium/TiledLayerChromium.cpp:
3209         (WebCore::TiledLayerChromium::updateTiles):
3210         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
3211         (WebCore::CCSingleThreadProxy::doCommit):
3212         * platform/graphics/chromium/cc/CCTextureUpdateController.cpp: Added.
3213         (WebCore):
3214         (WebCore::CCTextureUpdateController::maxPartialTextureUpdates):
3215         (WebCore::CCTextureUpdateController::updateTextures):
3216         (WebCore::CCTextureUpdateController::CCTextureUpdateController):
3217         (WebCore::CCTextureUpdateController::~CCTextureUpdateController):
3218         (WebCore::CCTextureUpdateController::hasMoreUpdates):
3219         (WebCore::CCTextureUpdateController::updateMoreTextures):
3220         (WebCore::CCTextureUpdateController::updateMoreTexturesSize):
3221         * platform/graphics/chromium/cc/CCTextureUpdateController.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCTextureUpdater.h.
3222         (WebCore):
3223         (CCTextureUpdateController):
3224         (WebCore::CCTextureUpdateController::create):
3225         * platform/graphics/chromium/cc/CCTextureUpdater.cpp:
3226         (WebCore::CCTextureUpdater::appendFullUpload):
3227         (WebCore::CCTextureUpdater::appendPartialUpload):
3228         (WebCore::CCTextureUpdater::appendCopy):
3229         (WebCore::CCTextureUpdater::takeFirstFullUpload):
3230         (WebCore::CCTextureUpdater::takeFirstPartialUpload):
3231         (WebCore::CCTextureUpdater::takeFirstCopy):
3232         (WebCore::CCTextureUpdater::hasMoreUpdates):
3233         * platform/graphics/chromium/cc/CCTextureUpdater.h:
3234         (CCTextureUpdater):
3235         (WebCore::CCTextureUpdater::fullUploadSize):
3236         (WebCore::CCTextureUpdater::partialUploadSize):
3237         (WebCore::CCTextureUpdater::copySize):
3238         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
3239         (WebCore::CCThreadProxy::scheduledActionBeginFrame):
3240         (WebCore::CCThreadProxy::beginFrame):
3241         (WebCore::CCThreadProxy::beginFrameCompleteOnImplThread):
3242         (WebCore::CCThreadProxy::hasMoreResourceUpdates):
3243         (WebCore::CCThreadProxy::scheduledActionUpdateMoreResources):
3244         (WebCore::CCThreadProxy::scheduledActionCommit):
3245         (WebCore::CCThreadProxy::maxPartialTextureUpdates):
3246         * platform/graphics/chromium/cc/CCThreadProxy.h:
3247         (WebCore):
3248         (WebCore::CCThreadProxy::BeginFrameAndCommitState::BeginFrameAndCommitState):
3249         (BeginFrameAndCommitState):
3250         (CCThreadProxy):
3251
3252 2012-08-06  Douglas Stockwell  <dstockwell@chromium.org>
3253
3254         Crash in WebCore::RenderListItem::updateMarkerLocation
3255         https://bugs.webkit.org/show_bug.cgi?id=90476
3256
3257         Reviewed by Abhishek Arya.
3258
3259         In some cases an anonymous block is destroyed when its last child is
3260         removed. RenderListItem did not expect this and has it's own logic for
3261         cleaning up such blocks when the list marker is removed. Detect this
3262         case in RenderBlock::removeChild to defer to the logic in RenderListItem::updateListMarker.
3263
3264         Test: fast/lists/list-marker-remove-crash.html
3265
3266         * rendering/RenderBlock.cpp:
3267         (WebCore::RenderBlock::removeChild):
3268
3269 2012-08-06  Shawn Singh  <shawnsingh@chromium.org>
3270
3271         [chromium] Non-preserves-3d requires explicit flattening of screen-space transform.
3272         https://bugs.webkit.org/show_bug.cgi?id=85808
3273
3274         Reviewed by Adrienne Walker.
3275
3276         When computing the screen-space transforms, z values were not
3277         being flattened when they should be. This caused incorrect
3278         clipping due to occlusion tracking that relied on the screen-space
3279         transform. The fix is to flatten the screen-space transform just
3280         like the "sublayerMatrix" is flattened, when the layer does not
3281         preserve-3d.
3282
3283         In addition to making the simple fix, it was convenient to make a
3284         helper function for the flattening code.
3285
3286         Additional unit test added to exercise that flattening code:
3287           CCLayerTreeHostCommonTest.verifyTransformsForFlatteningLayer
3288
3289         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
3290         (WebCore::calculateDrawTransformsInternal):
3291         * platform/graphics/chromium/cc/CCMathUtil.cpp:
3292         (WebCore::CCMathUtil::flattenTransformTo2d):
3293         (WebCore):
3294         * platform/graphics/chromium/cc/CCMathUtil.h:
3295         (CCMathUtil):
3296
3297 2012-08-06  Anna Cavender  <annacc@chromium.org>
3298
3299         Create a MediaSource object.
3300         https://bugs.webkit.org/show_bug.cgi?id=91773
3301
3302         Reviewed by Eric Carlson.
3303
3304         MediaSource object is needed in order to implement the new
3305         object-oriented MediaSource API:
3306         http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html
3307
3308         No new tests - will be able to test after landing:
3309         https://bugs.webkit.org/show_bug.cgi?id=91775
3310  
3311         Adding new files to build files:
3312         * CMakeLists.txt:
3313         * DerivedSources.cpp:
3314         * DerivedSources.make:
3315         * DerivedSources.pri:
3316         * GNUmakefile.list.am:
3317         * Target.pri:
3318         * WebCore.gypi:
3319         * WebCore.vcproj/WebCore.vcproj:
3320         * WebCore.xcodeproj/project.pbxproj:
3321
3322         New MediaSource object:
3323         * Modules/mediasource/MediaSource.cpp: Added.
3324         * Modules/mediasource/MediaSource.h: Added.
3325         * Modules/mediasource/MediaSource.idl: Added.
3326
3327         Create a registry for the blob storage and lookup:
3328         * Modules/mediasource/MediaSourceRegistry.cpp: Added.
3329         * Modules/mediasource/MediaSourceRegistry.h: Added.
3330
3331         Connect SourceBuffer to MediaSource:
3332         * Modules/mediasource/SourceBuffer.cpp:
3333         (WebCore::SourceBuffer::SourceBuffer):
3334         (WebCore::SourceBuffer::buffered): Forward call to MediaSource.
3335         (WebCore::SourceBuffer::append): Ditto.
3336         (WebCore::SourceBuffer::abort): Ditto.
3337         * Modules/mediasource/SourceBuffer.h:
3338         (WebCore::SourceBuffer::create): Add a MediaSource to the constructor.
3339         (WebCore::SourceBuffer::clear): Clear the MediaSource.
3340         (SourceBuffer):
3341         * Modules/mediasource/SourceBufferList.cpp: include SourceBuffer.h
3342         * Modules/mediasource/SourceBufferList.h:
3343  
3344         Make MediaSource an EventTarget:
3345         * dom/EventTarget.h:
3346         (WebCore):
3347         * dom/EventTargetFactory.in:
3348
3349         Enable creation of MediaSource object URL from JavaScript:
3350         * html/DOMURL.cpp:
3351         (WebCore):
3352         (WebCore::DOMURL::createObjectURL):
3353         * html/DOMURL.h:
3354         (WebCore):
3355         (DOMURL):
3356         * html/DOMURL.idl:
3357
3358         New MediaSource constructor:
3359         * page/DOMWindow.idl:
3360
3361 2012-08-06  Andreas Kling  <kling@webkit.org>
3362
3363         Simplify CSSOM style declaration's grabbing at internals.
3364         <http://webkit.org/b/93261>
3365
3366         Reviewed by Antti Koivisto.
3367
3368         It was already the case that StylePropertySets exposed in CSSOM were guaranteed mutable,
3369         so remove the mechanism to convert immutable backing objects to mutable ones.
3370
3371         Made ensureCSSStyleDeclaration() non-const to prevent callers that may have an
3372         immutable StylePropertySet from wrapping a CSSOM object around it.
3373
3374         * css/PropertySetCSSStyleDeclaration.h:
3375         (PropertySetCSSStyleDeclaration):
3376         * css/PropertySetCSSStyleDeclaration.cpp:
3377         (WebCore::PropertySetCSSStyleDeclaration::length):
3378         (WebCore::PropertySetCSSStyleDeclaration::item):
3379         (WebCore::PropertySetCSSStyleDeclaration::cssText):
3380         (WebCore::PropertySetCSSStyleDeclaration::setCssText):
3381         (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue):
3382         (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue):
3383         (WebCore::PropertySetCSSStyleDeclaration::getPropertyPriority):
3384         (WebCore::PropertySetCSSStyleDeclaration::getPropertyShorthand):
3385         (WebCore::PropertySetCSSStyleDeclaration::isPropertyImplicit):
3386         (WebCore::PropertySetCSSStyleDeclaration::setProperty):
3387         (WebCore::PropertySetCSSStyleDeclaration::removeProperty):
3388         (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal):
3389         (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal):
3390         (WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal):
3391         (WebCore::PropertySetCSSStyleDeclaration::copy):
3392         (WebCore::PropertySetCSSStyleDeclaration::makeMutable):
3393         (WebCore::PropertySetCSSStyleDeclaration::cssPropertyMatches):
3394
3395             Remove indirection and access StylePropertySet member directly.
3396
3397         * css/StylePropertySet.h:
3398         * css/StylePropertySet.cpp:
3399         (WebCore::StylePropertySet::ensureCSSStyleDeclaration):
3400         (WebCore::StylePropertySet::ensureInlineCSSStyleDeclaration):
3401
3402             Made these two non-const. CSSOM wrappers should only ever be constructed around
3403             mutable StylePropertySets.
3404             Also added ASSERT(isMutable()).
3405
3406         * inspector/InspectorCSSAgent.cpp:
3407         (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
3408
3409             Cast away the constness of StyledElement::attributeStyle(). It's not pretty,
3410             but these objects are guaranteed mutable, and there's an assertion to protect
3411             us in ensureCSSStyleDeclaration() if something changes in the future.
3412
3413 2012-08-06  Andrei Poenaru  <poenaru@adobe.com>
3414
3415         Web Inspector: Protocol: Add "namedFlowCreated" and "namedFlowRemoved" events
3416         https://bugs.webkit.org/show_bug.cgi?id=92739
3417
3418         Reviewed by Pavel Feldman.
3419
3420         Implemented "namedFlowCreated" and "namedFlowRemoved" events.
3421
3422         Modified test: inspector/styles/protocol-css-regions-commands.html.
3423
3424         * dom/WebKitNamedFlowCollection.cpp:
3425         (WebCore::WebKitNamedFlowCollection::ensureFlowWithName):
3426         (WebCore::WebKitNamedFlowCollection::discardNamedFlow):
3427         * inspector/Inspector.json:
3428         * inspector/InspectorCSSAgent.cpp:
3429         (WebCore::InspectorCSSAgent::reset):
3430         (WebCore::InspectorCSSAgent::didCreateNamedFlow):
3431         (WebCore):
3432         (WebCore::InspectorCSSAgent::didRemoveNamedFlow):
3433         (WebCore::InspectorCSSAgent::getNamedFlowCollection):
3434         * inspector/InspectorCSSAgent.h:
3435         (InspectorCSSAgent):
3436         * inspector/InspectorInstrumentation.cpp:
3437         (WebCore):
3438         (WebCore::InspectorInstrumentation::didCreateNamedFlowImpl):
3439         (WebCore::InspectorInstrumentation::didRemoveNamedFlowImpl):
3440         * inspector/InspectorInstrumentation.h:
3441         (InspectorInstrumentation):
3442         (WebCore::InspectorInstrumentation::didCreateNamedFlow):
3443         (WebCore):
3444         (WebCore::InspectorInstrumentation::didRemoveNamedFlow):
3445         * inspector/front-end/CSSStyleModel.js:
3446         (WebInspector.CSSStyleModel.prototype._namedFlowCreated.callback):
3447         (WebInspector.CSSStyleModel.prototype._namedFlowCreated):
3448         (WebInspector.CSSStyleModel.prototype._namedFlowRemoved.callback):
3449         (WebInspector.CSSStyleModel.prototype._namedFlowRemoved):
3450         (WebInspector.CSSDispatcher.prototype.styleSheetChanged):
3451         (WebInspector.CSSDispatcher.prototype.namedFlowCreated):
3452         (WebInspector.CSSDispatcher.prototype.namedFlowRemoved):
3453
3454 2012-08-06  Abhishek Arya  <inferno@chromium.org>
3455
3456         Crash in FrameLoader::stopAllLoaders.
3457         https://bugs.webkit.org/show_bug.cgi?id=90805
3458
3459         Reviewed by Nate Chapin.
3460
3461         Calling m_provisionalDocumentLoader->stopLoading() can blow away the frame
3462         from underneath. Protect it with a RefPtr.
3463
3464         No new tests. We don't have a reliable testcase to reproduce this. However,
3465         the crash and free stack from ClusterFuzz point clearly at the bug.
3466
3467         * loader/FrameLoader.cpp:
3468         (WebCore::FrameLoader::stopAllLoaders):
3469
3470 2012-08-06  Hironori Bono  <hbono@chromium.org>
3471
3472         Rolling out my r123067 and r123572
3473         https://bugs.webkit.org/show_bug.cgi?id=93234
3474
3475         Reviewed by Ryosuke Niwa.
3476
3477         This change manually rolls out my r123067 and r123572 (except layout tests)
3478         because it renders RTL text to a wrong place when an RTL element shows a
3479         vertical scrollbar at its left side.
3480
3481         No new tests because this change rolls out my changes.
3482
3483         * dom/Element.cpp:
3484         (WebCore::Element::clientLeft):
3485         * rendering/RenderBlock.cpp:
3486         (WebCore::RenderBlock::addOverflowFromPositionedObjects):
3487         (WebCore::RenderBlock::determineLogicalLeftPositionForChild):
3488         (WebCore::RenderBlock::paintObject):
3489         * rendering/RenderBox.cpp:
3490         (WebCore::RenderBox::topLeftLocationOffset):
3491
3492 2012-08-06  Andrei Bucur  <abucur@adobe.com>
3493
3494         [CSS Regions] Add the NamedFlow.getRegions() API
3495         https://bugs.webkit.org/show_bug.cgi?id=93240
3496
3497         Reviewed by Andreas Kling.
3498
3499         This patch adds the NamedFlow.getRegions() API call as specified by http://www.w3.org/TR/2012/WD-css3-regions-20120503/#dom-named-flow .
3500         For now, WebKit supports only one type of regions, Element. The Region interface will be introduced when other interfaces will be capable
3501         of becoming regions.
3502
3503         New test: fast/regions/webkit-named-flow-get-regions.html
3504
3505         * dom/WebKitNamedFlow.cpp:
3506         (WebCore::WebKitNamedFlow::getRegionsByContent): Add a check not to include the pseudo-elements that are regions; those don't have a node attached.
3507         (WebCore::WebKitNamedFlow::getRegions):
3508         (WebCore):
3509         * dom/WebKitNamedFlow.h:
3510         (WebKitNamedFlow):
3511         * dom/WebKitNamedFlow.idl:
3512
3513 2012-08-06  Andrei Bucur  <abucur@adobe.com>
3514
3515         [CSS Regions] Rename regionOverflow to regionOverset
3516         https://bugs.webkit.org/show_bug.cgi?id=93256
3517
3518         Reviewed by Andreas Kling.
3519
3520         Link to spec: http://www.w3.org/TR/2012/WD-css3-regions-20120503/#dom-region-regionoverset
3521         The regionOverflow property has been renamed to regionOverset in the latest working draft. This patch applies the change both externally and
3522         internally in the code.
3523
3524         Tests: No new tests because this is not a functional change.
3525
3526         * dom/Element.cpp:
3527         (WebCore::Element::renderRegion): Convenience method to access the renderer for a region element.
3528         (WebCore):
3529         (WebCore::Element::webkitRegionOverset):
3530         * dom/Element.h:
3531         (WebCore):
3532         * dom/Element.idl:
3533         * rendering/RenderFlowThread.cpp:
3534         (WebCore::RenderFlowThread::paintIntoRegion):
3535         (WebCore::RenderFlowThread::hitTestRegion):
3536         (WebCore::RenderFlowThread::repaintRectangleInRegions):
3537         (WebCore::RenderFlowThread::computeOverflowStateForRegions):
3538         * rendering/RenderRegion.cpp:
3539         (WebCore::RenderRegion::regionOversetRect):
3540         * rendering/RenderRegion.h:
3541         (RenderRegion):
3542
3543 2012-08-06  Sergey Rogulenko  <rogulenko@google.com>
3544
3545         Web Inspector: a tiny refactoring of Highlighter in InspectorDOMAgent
3546         https://bugs.webkit.org/show_bug.cgi?id=93257
3547
3548         Reviewed by Pavel Feldman.
3549
3550         Moving error string setting inside highlightConfigFromInspectorObject.
3551
3552         * inspector/InspectorDOMAgent.cpp:
3553         (WebCore::InspectorDOMAgent::setSearchingForNode):
3554         (WebCore::InspectorDOMAgent::highlightConfigFromInspectorObject):
3555         (WebCore::InspectorDOMAgent::highlightNode):
3556         * inspector/InspectorDOMAgent.h:
3557         (InspectorDOMAgent):
3558
3559 2012-08-03  Yury Semikhatsky  <yurys@chromium.org>
3560
3561         Web Inspector: add memory instrumentation for CSSValue and its descendants
3562         https://bugs.webkit.org/show_bug.cgi?id=93130
3563
3564         Reviewed by Pavel Feldman.
3565
3566         Added memory footprint reporting routine to CSSValue and its descendants.
3567
3568         Memory reporing for CSSValue is organized in a following way:
3569         - CSSValue implements reportMemoryUsage method that switches by the value
3570           type and calls reportDescendantMemoryUsage on the concrete type
3571         - There may be some intermediate classes in the inheritance chain between
3572           CSSValue and the leaf class implementing reportDescendantMemoryUsage. Those
3573           intermediate classes implement reportBaseClassMemoryUsage method that can
3574           be called from a descendant to collect memory information for the base class
3575           members. Having reportDescendantMemoryUsage only on the leaf classes prevents
3576           us from accidentally adding the intermediate classes to the switch block
3577           in the CSSValue::reportMemoryUsage.
3578
3579         * css/CSSAspectRatioValue.cpp:
3580         (WebCore::CSSAspectRatioValue::reportDescendantMemoryUsage):
3581         (WebCore):
3582         * css/CSSAspectRatioValue.h:
3583         (CSSAspectRatioValue):
3584         * css/CSSBorderImageSliceValue.cpp:
3585         (WebCore::CSSBorderImageSliceValue::reportDescendantMemoryUsage):
3586         (WebCore):
3587         * css/CSSBorderImageSliceValue.h:
3588         (CSSBorderImageSliceValue):
3589         * css/CSSCalculationValue.cpp:
3590         (WebCore):
3591         (WebCore::CSSCalcValue::reportDescendantMemoryUsage):
3592         (CSSCalcPrimitiveValue):
3593         * css/CSSCalculationValue.h:
3594         (CSSCalcExpressionNode):
3595         (CSSCalcValue):
3596         * css/CSSCanvasValue.cpp:
3597         (WebCore::CSSCanvasValue::reportDescendantMemoryUsage):
3598         (WebCore):
3599         * css/CSSCanvasValue.h:
3600         (CSSCanvasValue):
3601         * css/CSSCrossfadeValue.cpp:
3602         (WebCore::CSSCrossfadeValue::reportDescendantMemoryUsage):
3603         (WebCore):
3604         * css/CSSCrossfadeValue.h:
3605         (CSSCrossfadeValue):
3606         * css/CSSCursorImageValue.cpp:
3607         (WebCore::CSSCursorImageValue::reportDescendantMemoryUsage):
3608         (WebCore):
3609         * css/CSSCursorImageValue.h:
3610         (CSSCursorImageValue):
3611         * css/CSSFontFaceSrcValue.cpp:
3612         (WebCore::CSSFontFaceSrcValue::reportDescendantMemoryUsage):
3613         (WebCore):
3614         * css/CSSFontFaceSrcValue.h:
3615         (CSSFontFaceSrcValue):
3616         * css/CSSFunctionValue.cpp:
3617         (WebCore::CSSFunctionValue::reportDescendantMemoryUsage):
3618         (WebCore):
3619         * css/CSSFunctionValue.h:
3620         (CSSFunctionValue):
3621         * css/CSSGradientValue.cpp:
3622         (WebCore::CSSGradientColorStop::reportMemoryUsage):
3623         (WebCore):
3624         (WebCore::CSSGradientValue::reportBaseClassMemoryUsage):
3625         (WebCore::CSSLinearGradientValue::reportDescendantMemoryUsage):
3626         (WebCore::CSSRadialGradientValue::reportDescendantMemoryUsage):
3627         * css/CSSGradientValue.h:
3628         (CSSGradientColorStop):
3629         (CSSGradientValue):
3630         (CSSLinearGradientValue):
3631         (CSSRadialGradientValue):
3632         * css/CSSImageGeneratorValue.cpp:
3633         (WebCore::CSSImageGeneratorValue::reportBaseClassMemoryUsage):
3634         (WebCore):
3635         * css/CSSImageGeneratorValue.h:
3636         (CSSImageGeneratorValue):
3637         * css/CSSImageSetValue.cpp:
3638         (WebCore::CSSImageSetValue::reportDescendantMemoryUsage):
3639         (WebCore):
3640         (WebCore::CSSImageSetValue::ImageWithScale::reportMemoryUsage):
3641         * css/CSSImageSetValue.h:
3642         (ImageWithScale):
3643         (CSSImageSetValue):
3644         * css/CSSImageValue.cpp:
3645         (WebCore::CSSImageValue::reportDescendantMemoryUsage):
3646         (WebCore):
3647         * css/CSSImageValue.h:
3648         (CSSImageValue):
3649         * css/CSSInheritedValue.cpp:
3650         (WebCore::CSSInheritedValue::reportDescendantMemoryUsage):
3651         (WebCore):
3652         * css/CSSInheritedValue.h:
3653         (CSSInheritedValue):
3654         * css/CSSInitialValue.cpp:
3655         (WebCore::CSSInitialValue::reportDescendantMemoryUsage):
3656         (WebCore):
3657         * css/CSSInitialValue.h:
3658         (CSSInitialValue):
3659         * css/CSSLineBoxContainValue.cpp:
3660         (WebCore::CSSLineBoxContainValue::reportDescendantMemoryUsage):
3661         (WebCore):
3662         * css/CSSLineBoxContainValue.h:
3663         (CSSLineBoxContainValue):
3664         * css/CSSPrimitiveValue.cpp:
3665         (WebCore::CSSPrimitiveValue::reportDescendantMemoryUsage):
3666         (WebCore):
3667         * css/CSSPrimitiveValue.h:
3668         (CSSPrimitiveValue):
3669         * css/CSSReflectValue.cpp:
3670         (WebCore::CSSReflectValue::reportDescendantMemoryUsage):
3671         (WebCore):
3672         * css/CSSReflectValue.h:
3673         (CSSReflectValue):
3674         * css/CSSTimingFunctionValue.cpp:
3675         (WebCore::CSSLinearTimingFunctionValue::reportDescendantMemoryUsage):
3676         (WebCore):
3677         (WebCore::CSSCubicBezierTimingFunctionValue::reportDescendantMemoryUsage):
3678         (WebCore::CSSStepsTimingFunctionValue::reportDescendantMemoryUsage):
3679         * css/CSSTimingFunctionValue.h:
3680         (CSSLinearTimingFunctionValue):
3681         (CSSCubicBezierTimingFunctionValue):
3682         (CSSStepsTimingFunctionValue):
3683         * css/CSSUnicodeRangeValue.cpp:
3684         (WebCore::CSSUnicodeRangeValue::reportDescendantMemoryUsage):
3685         (WebCore):
3686         * css/CSSUnicodeRangeValue.h:
3687         (CSSUnicodeRangeValue):
3688         * css/CSSValue.cpp:
3689         (WebCore::TextCloneCSSValue::reportDescendantMemoryUsage):
3690         (TextCloneCSSValue):
3691         (WebCore::CSSValue::reportMemoryUsage):
3692         (WebCore):
3693         * css/CSSValue.h:
3694         (WebCore):
3695         (CSSValue):
3696         * css/CSSValueList.cpp:
3697         (WebCore::CSSValueList::reportDescendantMemoryUsage):
3698         (WebCore):
3699         * css/CSSValueList.h:
3700         (CSSValueList):
3701         * css/CSSVariableValue.h:
3702         (WebCore::CSSVariableValue::reportDescendantMemoryUsage):
3703         (CSSVariableValue):
3704         * css/FontFeatureValue.cpp:
3705         (WebCore::FontFeatureValue::reportDescendantMemoryUsage):
3706         (WebCore):
3707         * css/FontFeatureValue.h:
3708         (FontFeatureValue):
3709         * css/FontValue.cpp:
3710         (WebCore::FontValue::reportDescendantMemoryUsage):
3711         (WebCore):
3712         * css/FontValue.h:
3713         (FontValue):
3714         * css/MediaQueryExp.cpp:
3715         (WebCore::MediaQueryExp::reportMemoryUsage):
3716         * css/ShadowValue.cpp:
3717         (WebCore::ShadowValue::reportDescendantMemoryUsage):
3718         (WebCore):
3719         * css/ShadowValue.h:
3720         (ShadowValue):
3721         * css/StyleResolver.cpp:
3722         (WebCore::StyleResolver::collectMatchingRulesForList):
3723         * css/WebKitCSSFilterValue.cpp:
3724         (WebCore::WebKitCSSFilterValue::reportDescendantMemoryUsage):
3725         (WebCore):
3726         * css/WebKitCSSFilterValue.h:
3727         (WebKitCSSFilterValue):
3728         * css/WebKitCSSSVGDocumentValue.cpp:
3729         (WebCore::WebKitCSSSVGDocumentValue::reportDescendantMemoryUsage):
3730         (WebCore):
3731         * css/WebKitCSSSVGDocumentValue.h:
3732         (WebKitCSSSVGDocumentValue):
3733         * css/WebKitCSSShaderValue.cpp:
3734         (WebCore::WebKitCSSShaderValue::reportDescendantMemoryUsage):
3735         (WebCore):
3736         * css/WebKitCSSShaderValue.h:
3737         (WebKitCSSShaderValue):
3738         * css/WebKitCSSTransformValue.cpp:
3739         (WebCore::WebKitCSSTransformValue::reportDescendantMemoryUsage):
3740         (WebCore):
3741         * css/WebKitCSSTransformValue.h:
3742         (WebKitCSSTransformValue):
3743         * dom/MemoryInstrumentation.cpp:
3744         (WebCore::MemoryInstrumentation::addString):
3745         (WebCore):
3746         * dom/MemoryInstrumentation.h:
3747         (MemoryInstrumentation):
3748         (WebCore::MemoryClassInfo::addHashCountedSet):
3749         (WebCore::MemoryClassInfo::addMember):
3750         * svg/SVGColor.cpp:
3751         (WebCore::SVGColor::reportDescendantMemoryUsage):
3752         (WebCore):
3753         * svg/SVGColor.h:
3754         (SVGColor):
3755         * svg/SVGPaint.cpp:
3756         (WebCore::SVGPaint::reportDescendantMemoryUsage):
3757         (WebCore):
3758         * svg/SVGPaint.h:
3759         (SVGPaint):
3760
3761 2012-08-06  Yury Semikhatsky  <yurys@chromium.org>
3762
3763         Web Inspector: rename WorkerAgent.setWorkerInspectionEnabled to WorkerAgent.enable and make it return error
3764         https://bugs.webkit.org/show_bug.cgi?id=92545
3765
3766         Reviewed by Pavel Feldman.
3767
3768         - Replaced WorkerAgent.setWorkerInspectionEnabled with WorkerAgent.enable/disable
3769         - Replaced Preferences.exposeWorkersInspection with InspectorFrontendHost.canInspectWorkers()
3770           that tells if inspector front-end on the given platform can launch dedicated worker
3771           front-end.
3772
3773         * inspector/Inspector.json:
3774         * inspector/InspectorFrontendClient.h:
3775         (InspectorFrontendClient):
3776         * inspector/InspectorFrontendClientLocal.h:
3777         (WebCore::InspectorFrontendClientLocal::canInspectWorkers):
3778         * inspector/InspectorFrontendHost.cpp:
3779         (WebCore::InspectorFrontendHost::canInspectWorkers):
3780         (WebCore):
3781         * inspector/InspectorFrontendHost.h:
3782         (InspectorFrontendHost):
3783         * inspector/InspectorFrontendHost.idl:
3784         * inspector/InspectorWorkerAgent.cpp:
3785         (WebCore::InspectorWorkerAgent::enable):
3786         (WebCore):
3787         (WebCore::InspectorWorkerAgent::disable):
3788         * inspector/InspectorWorkerAgent.h:
3789         (InspectorWorkerAgent):
3790         * inspector/front-end/InspectorFrontendHostStub.js:
3791         (.WebInspector.InspectorFrontendHostStub.prototype.setZoomFactor):
3792         (.WebInspector.InspectorFrontendHostStub.prototype.canInspectWorkers):
3793         * inspector/front-end/ScriptsPanel.js:
3794         * inspector/front-end/Settings.js:
3795
3796 2012-08-06  Mario Sanchez Prada  <msanchez@igalia.com>
3797
3798         [WK2][GTK] Improvements for the new spell-checking API
3799         https://bugs.webkit.org/show_bug.cgi?id=93262
3800
3801         Reviewed by Carlos Garcia Campos.
3802
3803         Provide a way to ask TextCheckerEnchant helper class for the list
3804         of languages currently available for the spell checking feature.
3805
3806         * platform/text/gtk/TextCheckerEnchant.cpp:
3807         (enchantDictDescribeCallback): Renamed from
3808         getAvailableDictionariesCallback, for consistency.
3809         (TextCheckerEnchant::updateSpellCheckingLanguages): Updated usage
3810         of getAvailableDictionariesCallback to enchantDictDescribeCallback.
3811         (TextCheckerEnchant::getSpellCheckingLanguages): New. Will build
3812         and return a String with a comma-separated list of languages
3813         currently in use by the spell checking feature.
3814         * platform/text/gtk/TextCheckerEnchant.h:
3815         (TextCheckerEnchant): Added new function getSpellCheckingLanguages.
3816
3817 2012-08-06  Andreas Kling  <kling@webkit.org>
3818
3819         Pass presentational attribute StylePropertySets by const pointer where possible.
3820         <http://webkit.org/b/93187>
3821
3822         Reviewed by Antti Koivisto.
3823
3824         Minor cleanup to enforce (at compile time) the fact that no methods that have the
3825         side-effect of incurring immutable-to-mutable-StylePropertySet conversion.
3826
3827         This was already covered by assertions, we're just making it stricter and adding
3828         some documentational flavor.
3829
3830         * css/StyleResolver.cpp:
3831         (WebCore::StyleResolver::addElementStyleProperties):
3832         (WebCore::StyleResolver::collectMatchingRulesForList):
3833         * css/StyleResolver.h:
3834         (StyleResolver):
3835         * dom/ElementAttributeData.h:
3836         (WebCore::ElementAttributeData::attributeStyle):
3837         * dom/StyledElement.h:
3838         (WebCore::StyledElement::additionalAttributeStyle):
3839         (StyledElement):
3840         (WebCore::StyledElement::attributeStyle):
3841         * html/HTMLTableCellElement.cpp:
3842         (WebCore::HTMLTableCellElement::additionalAttributeStyle):
3843         * html/HTMLTableCellElement.h:
3844         (HTMLTableCellElement):
3845         * html/HTMLTableColElement.cpp:
3846         (WebCore::HTMLTableColElement::additionalAttributeStyle):
3847         * html/HTMLTableColElement.h:
3848         (HTMLTableColElement):
3849         * html/HTMLTableElement.cpp:
3850         (WebCore::HTMLTableElement::additionalAttributeStyle):
3851         (WebCore::HTMLTableElement::additionalCellStyle):
3852         (WebCore::HTMLTableElement::additionalGroupStyle):
3853         * html/HTMLTableElement.h:
3854         (HTMLTableElement):
3855         * html/HTMLTableSectionElement.cpp:
3856         (WebCore::HTMLTableSectionElement::additionalAttributeStyle):
3857         * html/HTMLTableSectionElement.h:
3858         (HTMLTableSectionElement):
3859         * inspector/InspectorCSSAgent.cpp:
3860         (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
3861
3862 2012-08-06  Kihong Kwon  <kihong.kwon@samsung.com>
3863
3864         Add DeviceProximityEvent interface
3865         https://bugs.webkit.org/show_bug.cgi?id=92942
3866
3867         Reviewed by Kentaro Hara.
3868
3869         Spec : http://www.w3.org/TR/proximity/#idl-def-DeviceProximityEvent
3870
3871         Add DeviceProximityEvent interface of Proximity Events.
3872         And add onwebkitdeviceproximity event handler to the DOMWindow.
3873
3874         Tests: fast/dom/Proximity/check-event-deviceproximity.html
3875                fast/dom/Proximity/create-event-deviceproximity.html
3876                fast/events/constructors/device-proximity-event-constructor.html
3877
3878         * CMakeLists.txt:
3879         * Modules/proximity/DeviceProximityEvent.cpp: Added.
3880         (WebCore):
3881         (WebCore::DeviceProximityEvent::DeviceProximityEvent):
3882         * Modules/proximity/DeviceProximityEvent.h: Added.
3883         (WebCore):
3884         (WebCore::DeviceProximityEventInit::DeviceProximityEventInit):
3885         (DeviceProximityEventInit):
3886         (DeviceProximityEvent):
3887         (WebCore::DeviceProximityEvent::~DeviceProximityEvent):
3888         (WebCore::DeviceProximityEvent::create):
3889         (WebCore::DeviceProximityEvent::value):
3890         (WebCore::DeviceProximityEvent::min):
3891         (WebCore::DeviceProximityEvent::max):
3892         (WebCore::DeviceProximityEvent::interfaceName):
3893         * Modules/proximity/DeviceProximityEvent.idl: Added.
3894         * dom/EventNames.h:
3895         (WebCore):
3896         * dom/EventNames.in:
3897         * page/DOMWindow.h:
3898         (DOMWindow):
3899         * page/DOMWindow.idl:
3900
3901 2012-08-06  Carlos Garcia Campos  <cgarcia@igalia.com>
3902
3903         Unreviewed. Fix make distcheck.
3904
3905         * GNUmakefile.list.am: Remove unexistent header file.
3906
3907 2012-08-06  Vineet Chaudhary  <rgf748@motorola.com>
3908
3909         [JSC] Remove custom JSBindings for constructArrayBufferView()
3910         https://bugs.webkit.org/show_bug.cgi?id=93097
3911
3912         Reviewed by Kentaro Hara.
3913
3914         Currently TypedArray files have the custom implementation of constructArrayBufferView().
3915         We can can remove these modifying CodeGeneratorJS.pm
3916
3917         Tests: TestTypedArray.idl
3918
3919         * bindings/js/JSFloat32ArrayCustom.cpp: Removed custom call constructArrayBufferView().
3920         * bindings/js/JSFloat64ArrayCustom.cpp: Ditto.
3921         * bindings/js/JSInt16ArrayCustom.cpp: Ditto.
3922         * bindings/js/JSInt32ArrayCustom.cpp: Ditto.
3923         * bindings/js/JSUint16ArrayCustom.cpp: Ditto.
3924         * bindings/js/JSUint32ArrayCustom.cpp: Ditto.
3925         * bindings/scripts/CodeGeneratorJS.pm: Modified Generator code to generate bindings for
3926         constructArrayBufferView()
3927         (GenerateConstructorDefinition):
3928         * bindings/scripts/IDLAttributes.txt: Added [TypedArray] attribute.
3929         * bindings/scripts/test/JS/JSFloat64Array.cpp: Tests result.
3930         (WebCore::JSFloat64ArrayConstructor::getConstructData):
3931         (WebCore::JSFloat64ArrayConstructor::constructJSFloat64Array):
3932         * bindings/scripts/test/TestTypedArray.idl: Test.
3933         * html/canvas/Float32Array.idl: Using [TypedArray].
3934         * html/canvas/Float64Array.idl: Ditto.
3935         * html/canvas/Int16Array.idl: Ditto.
3936         * html/canvas/Int32Array.idl: Ditto.
3937         * html/canvas/Uint16Array.idl: Ditto.
3938         * html/canvas/Uint32Array.idl: Ditto.
3939
3940 2012-08-06  Shinya Kawanaka  <shinyak@chromium.org>
3941
3942         AuthorShadowDOM for progress element
3943         https://bugs.webkit.org/show_bug.cgi?id=91969
3944
3945         Reviewed by Hajime Morita.
3946
3947         We add support for AuthorShadowDOM for progress element.
3948
3949         According to the Shadow DOM spec, a progress element should behave like having a UserAgentShadowRoot and
3950         an element in UserAgentShadowRoot draws a real 'progress' bar. In this patch, we change the inner structure
3951         of a progress element so that we can distribute an element having RenderProgress to AuthorShadowDOM.
3952
3953         Before this patch, a progress element has the following inner structure.
3954
3955             <progress>--UserAgentShadowRoot -- -- -- -- -- -- -- -- -- -- AuthorShadowRoot
3956                                |
3957                                +-- ProgressBarElement
3958                                |
3959                                +-- ProgressValueElement
3960
3961         After this patch, a progress element will have the following inner structure.
3962
3963             <progress>--UserAgentShadowRoot -- -- -- -- -- -- -- -- -- -- AuthorShadowRoot
3964                                |
3965                                +-- ProgressInnerElement
3966                                            |
3967                                            +-- ProgressBarElement
3968                                            |
3969                                            +-- ProgressValueElement
3970
3971
3972         Tests: fast/dom/shadow/shadowdom-for-progress-dynamic.html
3973                fast/dom/shadow/shadowdom-for-progress-multiple.html
3974                fast/dom/shadow/shadowdom-for-progress-with-style.html
3975                fast/dom/shadow/shadowdom-for-progress-without-appearance.html
3976                fast/dom/shadow/shadowdom-for-progress-without-shadow-element.html
3977                fast/dom/shadow/shadowdom-for-progress.html
3978
3979         * css/html.css:
3980         (progress::-webkit-progress-inner-element):
3981         * html/HTMLProgressElement.cpp:
3982         (WebCore::HTMLProgressElement::HTMLProgressElement):
3983         (WebCore::HTMLProgressElement::createRenderer):
3984         (WebCore::HTMLProgressElement::renderProgress): Returns RenderProgress gotten from UserAgentShadowDOM.
3985         (WebCore):
3986         (WebCore::HTMLProgressElement::willAddAuthorShadowRoot):
3987         (WebCore::HTMLProgressElement::didElementStateChange):
3988         (WebCore::HTMLProgressElement::createShadowSubtree): Creates a new Shadow DOM structure.
3989         * html/HTMLProgressElement.h:
3990         (WebCore):
3991         (WebCore::HTMLProgressElement::hasAuthorShadowRoot):
3992         (HTMLProgressElement):
3993         (WebCore::isHTMLProgressElement):
3994         (WebCore::toHTMLProgressElement):
3995         * html/shadow/ProgressShadowElement.cpp:
3996         (WebCore::ProgressShadowElement::ProgressShadowElement):
3997         (WebCore::ProgressShadowElement::progressElement):
3998         (WebCore::ProgressInnerElement::ProgressInnerElement): We introduce a new element having RenderProgress
3999         so that we can distribute an element having RenderProgress to AuthorShadowDOM.
4000         (WebCore):
4001         (WebCore::ProgressInnerElement::create):
4002         (WebCore::ProgressInnerElement::shadowPseudoId):
4003         (WebCore::ProgressInnerElement::createRenderer):
4004         (WebCore::ProgressInnerElement::rendererIsNeeded):
4005         * html/shadow/ProgressShadowElement.h:
4006         (ProgressShadowElement):
4007         (WebCore):
4008         (ProgressInnerElement):
4009         * rendering/RenderProgress.cpp:
4010         (WebCore::RenderProgress::RenderProgress):
4011         (WebCore::RenderProgress::progressElement):
4012         * rendering/RenderProgress.h:
4013         (RenderProgress):
4014
4015 2012-08-06  Keishi Hattori  <keishi@webkit.org>
4016
4017         Remove minimum window size for PagePopup
4018         https://bugs.webkit.org/show_bug.cgi?id=93100
4019
4020         Reviewed by Kent Tamura.
4021
4022         DOMWindow had a minimum size of 100x100 pixels. We need to remove that limit for PagePopup window.
4023
4024         No new tests. Covered in platform/chromium/fast/forms/color/color-suggestion-picker-{one,two}-row-appearance.html.
4025
4026         * Resources/colorSuggestionPicker.css:
4027         (.color-swatch-container):
4028         * page/ChromeClient.h:
4029         (WebCore::ChromeClient::minimumWindowSize):
4030         (ChromeClient):
4031         * page/DOMWindow.cpp:
4032         (WebCore):
4033         (WebCore::DOMWindow::adjustWindowRect): Asks Chrome::minimumWindowSize for minimum window size.
4034         * page/DOMWindow.h:
4035         (DOMWindow):
4036
4037 2012-08-06  Arko Saha  <arko@motorola.com>
4038
4039         Microdata: document.getItems() must treat no token as no parameter.
4040         https://bugs.webkit.org/show_bug.cgi?id=93071
4041
4042         Reviewed by Ryosuke Niwa.
4043
4044         document.getItems() must return all top-level microdata items in the
4045         document when no tokens specified in the argument.
4046         Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/microdata.html#dom-document-getitems
4047
4048         Test: fast/dom/MicroData/getitems-empty-string-as-arg.html
4049
4050         * dom/Document.cpp:
4051         (WebCore::Document::getItems): Create an empty string identifier when typeNames is null string
4052         to map such request in the cache.
4053         * dom/MicroDataItemList.cpp:
4054         (WebCore::MicroDataItemList::undefinedItemType): Changed undefinedItemType() to empty string.
4055         (WebCore::MicroDataItemList::nodeMatches): Return true if m_typeNames contains no token.
4056
4057 2012-08-06  Sergey Rogulenko  <rogulenko@google.com>
4058
4059         Web Inspector: extracting HighlightInfo from HighlightData in DOMNodeHighlighter
4060         https://bugs.webkit.org/show_bug.cgi?id=91632
4061
4062         Reviewed by Pavel Feldman.
4063
4064         Extracted struct HighlightInfo from struct HighlightData in DOMNodeHi