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