Web Inspector: more robust treeoutline.findTreeElement
[WebKit.git] / Source / WebCore / ChangeLog
1 2012-12-05  John J. Barton  <johnjbarton@chromium.org>
2
3         Web Inspector: more robust treeoutline.findTreeElement
4         https://bugs.webkit.org/show_bug.cgi?id=103911
5
6         Reviewed by Vsevolod Vlasov.
7
8         Non-recursive algorithm to populate the treeoutline given an DOMNode
9         as representedObject. Walk up the parents from the desired object
10         until we find one that is currently represented in the treeoutline 
11         cache. Then walk down, putting children in the cache until we get 
12         to the desired object again. 
13         With Pavel Feldeman <pfeldman@chromium.org>
14
15         No new tests, refactoring, no new function
16
17        * inspector/front-end/treeoutline.js:
18         (TreeOutline.prototype.findTreeElement):
19
20 2012-12-05  Alexander Shalamov  <alexander.shalamov@intel.com>
21
22         [EFL][GTK] List value response headers are not handled in RespourceResponse (libsoup specific)
23         https://bugs.webkit.org/show_bug.cgi?id=95181
24
25         Reviewed by Martin Robinson.
26
27         When list-value response headers are received, they are handled as single
28         value headers. This patch fixes incorrect behavior. New test was added to
29         verify list-value header handling.
30
31         Test: http/tests/xmlhttprequest/xmlhttprequest-test-custom-headers.html
32
33         * platform/network/soup/ResourceResponseSoup.cpp:
34         (WebCore::ResourceResponse::updateFromSoupMessage):
35
36 2012-12-05  Pavel Feldman  <pfeldman@chromium.org>
37
38         Web Inspector: Don't include error message text in the editor buffer.
39         https://bugs.webkit.org/show_bug.cgi?id=103932
40
41         Reviewed by Alexander Pavlov.
42
43         Skip entire decoration content when collecting dirty regions.
44         
45         * inspector/front-end/DefaultTextEditor.js:
46         (WebInspector.TextEditorMainPanel.prototype._collectLinesFromDOM):
47
48 2012-12-05  Joshua Bell  <jsbell@chromium.org>
49
50         IndexedDB: Replace use of ScriptExecutionContext::Task (Part 2)
51         https://bugs.webkit.org/show_bug.cgi?id=103931
52
53         Reviewed by Tony Chang.
54
55         Actually drop use of ScriptExecutionContext::Task and remove incorrect usage of
56         ThreadSafeRefCounted<>. Define a new IDBTransactionBackendImpl::Operation base class
57         for operations; storage of per-operation data becomes explicit.
58
59         No new tests - just a refactor.
60
61         * Modules/indexeddb/IDBCallbacks.h: Remove bogus "ThreadSafe"
62         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
63         (WebCore::IDBCursorBackendImpl::CursorIterationOperation::create):
64         (IDBCursorBackendImpl::CursorIterationOperation):
65         (WebCore::IDBCursorBackendImpl::CursorIterationOperation::CursorIterationOperation):
66         (WebCore::IDBCursorBackendImpl::CursorAdvanceOperation::create):
67         (IDBCursorBackendImpl::CursorAdvanceOperation):
68         (WebCore::IDBCursorBackendImpl::CursorAdvanceOperation::CursorAdvanceOperation):
69         (WebCore::IDBCursorBackendImpl::CursorPrefetchIterationOperation::create):
70         (IDBCursorBackendImpl::CursorPrefetchIterationOperation):
71         (WebCore::IDBCursorBackendImpl::CursorPrefetchIterationOperation::CursorPrefetchIterationOperation):
72         (WebCore::IDBCursorBackendImpl::CursorAdvanceOperation::perform):
73         (WebCore::IDBCursorBackendImpl::CursorIterationOperation::perform):
74         (WebCore::IDBCursorBackendImpl::CursorPrefetchIterationOperation::perform):
75         * Modules/indexeddb/IDBCursorBackendInterface.h: Remove bogus "ThreadSafe"
76         * Modules/indexeddb/IDBDatabase.cpp:
77         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
78         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreOperation::create):
79         (IDBDatabaseBackendImpl::CreateObjectStoreOperation):
80         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreOperation::CreateObjectStoreOperation):
81         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::create):
82         (IDBDatabaseBackendImpl::DeleteObjectStoreOperation):
83         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::DeleteObjectStoreOperation):
84         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::create):
85         (IDBDatabaseBackendImpl::VersionChangeOperation):
86         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::VersionChangeOperation):
87         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreAbortOperation::create):
88         (IDBDatabaseBackendImpl::CreateObjectStoreAbortOperation):
89         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreAbortOperation::CreateObjectStoreAbortOperation):
90         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreAbortOperation::create):
91         (IDBDatabaseBackendImpl::DeleteObjectStoreAbortOperation):
92         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreAbortOperation::DeleteObjectStoreAbortOperation):
93         (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::create):
94         (IDBDatabaseBackendImpl::VersionChangeAbortOperation):
95         (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::VersionChangeAbortOperation):
96         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
97         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreOperation::perform):
98         (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
99         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::perform):
100         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
101         (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
102         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreAbortOperation::perform):
103         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreAbortOperation::perform):
104         (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::perform):
105         * Modules/indexeddb/IDBDatabaseBackendInterface.h: Remove bogus "ThreadSafe"
106         * Modules/indexeddb/IDBDatabaseCallbacks.h: Remove bogus "ThreadSafe"
107         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
108         * Modules/indexeddb/IDBFactoryBackendInterface.h: Remove bogus "ThreadSafe"
109         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
110         (WebCore::IDBIndexBackendImpl::OpenIndexCursorOperation::create):
111         (IDBIndexBackendImpl::OpenIndexCursorOperation):
112         (WebCore::IDBIndexBackendImpl::OpenIndexCursorOperation::OpenIndexCursorOperation):
113         (WebCore::IDBIndexBackendImpl::IndexCountOperation::create):
114         (IDBIndexBackendImpl::IndexCountOperation):
115         (WebCore::IDBIndexBackendImpl::IndexCountOperation::IndexCountOperation):
116         (WebCore::IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation::create):
117         (IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation):
118         (WebCore::IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation::IndexReferencedValueRetrievalOperation):
119         (WebCore::IDBIndexBackendImpl::IndexValueRetrievalOperation::create):
120         (IDBIndexBackendImpl::IndexValueRetrievalOperation):
121         (WebCore::IDBIndexBackendImpl::IndexValueRetrievalOperation::IndexValueRetrievalOperation):
122         (WebCore::IDBIndexBackendImpl::OpenIndexCursorOperation::perform):
123         (WebCore::IDBIndexBackendImpl::openCursor):
124         (WebCore::IDBIndexBackendImpl::openKeyCursor):
125         (WebCore::IDBIndexBackendImpl::IndexCountOperation::perform):
126         (WebCore::IDBIndexBackendImpl::count):
127         (WebCore::IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation::perform):
128         (WebCore::IDBIndexBackendImpl::IndexValueRetrievalOperation::perform):
129         (WebCore::IDBIndexBackendImpl::get):
130         (WebCore::IDBIndexBackendImpl::getKey):
131         * Modules/indexeddb/IDBIndexBackendInterface.h: Remove bogus "ThreadSafe"
132         * Modules/indexeddb/IDBKey.h: Remove bogus "ThreadSafe"
133         (IDBKey):
134         * Modules/indexeddb/IDBKeyRange.h: Remove bogus "ThreadSafe"
135         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
136         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation::create):
137         (IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation):
138         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation::ObjectStoreRetrievalOperation):
139         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::create):
140         (IDBObjectStoreBackendImpl::ObjectStoreStorageOperation):
141         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::ObjectStoreStorageOperation):
142         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreIndexesReadyOperation::create):
143         (IDBObjectStoreBackendImpl::ObjectStoreIndexesReadyOperation):
144         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreIndexesReadyOperation::ObjectStoreIndexesReadyOperation):
145         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreDeletionOperation::create):
146         (IDBObjectStoreBackendImpl::ObjectStoreDeletionOperation):
147         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreDeletionOperation::ObjectStoreDeletionOperation):
148         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreClearOperation::create):
149         (IDBObjectStoreBackendImpl::ObjectStoreClearOperation):
150         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreClearOperation::ObjectStoreClearOperation):
151         (WebCore::IDBObjectStoreBackendImpl::CreateIndexOperation::create):
152         (IDBObjectStoreBackendImpl::CreateIndexOperation):
153         (WebCore::IDBObjectStoreBackendImpl::CreateIndexOperation::CreateIndexOperation):
154         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexOperation::create):
155         (IDBObjectStoreBackendImpl::DeleteIndexOperation):
156         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexOperation::DeleteIndexOperation):
157         (WebCore::IDBObjectStoreBackendImpl::OpenObjectStoreCursorOperation::create):
158         (IDBObjectStoreBackendImpl::OpenObjectStoreCursorOperation):
159         (WebCore::IDBObjectStoreBackendImpl::OpenObjectStoreCursorOperation::OpenObjectStoreCursorOperation):
160         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreCountOperation::create):
161         (IDBObjectStoreBackendImpl::ObjectStoreCountOperation):
162         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreCountOperation::ObjectStoreCountOperation):
163         (WebCore::IDBObjectStoreBackendImpl::CreateIndexAbortOperation::create):
164         (IDBObjectStoreBackendImpl::CreateIndexAbortOperation):
165         (WebCore::IDBObjectStoreBackendImpl::CreateIndexAbortOperation::CreateIndexAbortOperation):
166         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexAbortOperation::create):
167         (IDBObjectStoreBackendImpl::DeleteIndexAbortOperation):
168         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexAbortOperation::DeleteIndexAbortOperation):
169         (WebCore::IDBObjectStoreBackendImpl::get):
170         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation::perform):
171         (WebCore::IDBObjectStoreBackendImpl::put):
172         (WebCore):
173         (WebCore::IDBObjectStoreBackendImpl::setIndexesReady):
174         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreIndexesReadyOperation::perform):
175         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::perform):
176         (WebCore::IDBObjectStoreBackendImpl::deleteFunction):
177         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreDeletionOperation::perform):
178         (WebCore::IDBObjectStoreBackendImpl::clear):
179         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreClearOperation::perform):
180         (WebCore::IDBObjectStoreBackendImpl::createIndex):
181         (WebCore::IDBObjectStoreBackendImpl::CreateIndexOperation::perform):
182         (WebCore::IDBObjectStoreBackendImpl::deleteIndex):
183         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexOperation::perform):
184         (WebCore::IDBObjectStoreBackendImpl::openCursor):
185         (WebCore::IDBObjectStoreBackendImpl::OpenObjectStoreCursorOperation::perform):
186         (WebCore::IDBObjectStoreBackendImpl::count):
187         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreCountOperation::perform):
188         (WebCore::IDBObjectStoreBackendImpl::CreateIndexAbortOperation::perform):
189         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexAbortOperation::perform):
190         * Modules/indexeddb/IDBObjectStoreBackendInterface.h: Remove bogus "ThreadSafe"
191         * Modules/indexeddb/IDBRequest.h: Remove bogus "ThreadSafe"
192         (IDBRequest):
193         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
194         (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl): Appease RefPtr<> adoption strictness.
195         (WebCore::IDBTransactionBackendImpl::scheduleTask):
196         (WebCore::IDBTransactionBackendImpl::abort):
197         (WebCore::IDBTransactionBackendImpl::taskTimerFired):
198         * Modules/indexeddb/IDBTransactionBackendImpl.h:
199         (Operation):
200         (WebCore::IDBTransactionBackendImpl::Operation::~Operation):
201         (IDBTransactionBackendImpl):
202         (WebCore::IDBTransactionBackendImpl::scheduleTask):
203         * Modules/indexeddb/IDBTransactionBackendInterface.h: Remove bogus "ThreadSafe"
204
205 2012-12-05  Noel Gordon  <noel.gordon@gmail.com>
206
207         ENABLE(IMAGE_DECODER_DOWN_SAMPLING): Don't swizzle decode down sampled images
208         https://bugs.webkit.org/show_bug.cgi?id=103856
209
210         Reviewed by Yong Li.
211
212         For ports using ENABLE(IMAGE_DECODER_DOWN_SAMPLING), turbo swizzle decodes provide
213         no speed-up when the decoded image will be down sampled because the data must pass
214         through the buffer.setRGBA() slow path. That is not the swizzled path. Instead use
215         JCS_RGB decodes to clarify the output color space handling in outputScanlines().
216
217         No new tests. Covered by existing JPEG decoding tests.
218
219         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
220         (WebCore::JPEGImageReader::decode): libjpeg-turbo swizzle decodes provides no real
221         speed-up if the image will be down sampled. Revert to using JCS_RGA in this case.
222         (WebCore::setPixel): Remove the libjpeg-turbo JCS_EXT_BGRA and JCS_EXT_RGBA cases.
223         (WebCore::JPEGImageDecoder::outputScanlines): ditto.
224         * platform/image-decoders/jpeg/JPEGImageDecoder.h:
225         (WebCore::JPEGImageDecoder::willDownSample): Return true if image down sampling 
226         will be applied to the decoded image (m_scaled). Note: the willDownSample() return
227         value is valid only after setSize() has been called: add an ASSERT for that.
228
229 2012-12-05  Michael Pruett  <michael@68k.org>
230
231         IndexedDB: Implement IndexedDB bindings for JSC
232         https://bugs.webkit.org/show_bug.cgi?id=103484
233
234         Reviewed by Kentaro Hara.
235
236         IndexedDB is currently implemented only for V8. This change adds
237         the bindings necessary for IndexedDB to work with JSC. With this
238         patch, IndexedDB for JSC passes 112 out of the 196 layout tests in
239         storage/indexeddb. IndexedDB is still not enabled for any JSC port.
240
241         Tests: storage/indexeddb/*
242
243         * CMakeLists.txt:
244         * GNUmakefile.list.am:
245         * Modules/indexeddb/IDBOpenDBRequest.idl:
246         * Modules/indexeddb/IDBVersionChangeRequest.idl:
247         * UseJSC.cmake:
248         * WebCore.xcodeproj/project.pbxproj:
249         * bindings/js/DOMRequestState.h: Added to match bindings/v8/DOMRequestState.h.
250         (WebCore):
251         (DOMRequestState):
252         (WebCore::DOMRequestState::DOMRequestState):
253         (WebCore::DOMRequestState::clear):
254         (Scope):
255         (WebCore::DOMRequestState::Scope::Scope):
256         (WebCore::DOMRequestState::exec):
257         * bindings/js/IDBBindingUtilities.cpp: Add utility functions matching those in bindings/v8/IDBBindingUtilities.cpp.
258         (WebCore::get):
259         (WebCore):
260         (WebCore::canSet):
261         (WebCore::set):
262         (WebCore::createIDBKeyFromValue):
263         (WebCore::getNthValueOnKeyPath):
264         (WebCore::createIDBKeyFromScriptValueAndKeyPath):
265         (WebCore::ensureNthValueOnKeyPath):
266         (WebCore::canInjectNthValueOnKeyPath):
267         (WebCore::injectIDBKeyIntoScriptValue):
268         (WebCore::canInjectIDBKeyIntoScriptValue):
269         (WebCore::deserializeIDBValue):
270         (WebCore::idbKeyToScriptValue):
271         * bindings/js/IDBBindingUtilities.h: Add utility functions matching those in bindings/v8/IDBBindingUtilities.h.
272         (WebCore):
273         * bindings/js/JSIDBAnyCustom.cpp:
274         (WebCore::toJS):
275         * bindings/js/JSIDBKeyCustom.cpp:
276         (WebCore::toJS):
277         * bindings/js/JSIDBVersionChangeRequestCustom.cpp: Removed.
278
279 2012-12-05  Antoine Quint  <graouts@apple.com>
280
281         TextTrackCue's .endTime property should fire a TypeError when NaN is assigned
282         https://bugs.webkit.org/show_bug.cgi?id=103413
283
284         Reviewed by Eric Carlson.
285
286         Check whether the new time passed to setStartTime() and setEndTime() is none of NaN or Infinity,
287         otherwise throwing a TypeError.
288         
289         Thanks to this fix, we're no longer skipping media/track/opera/interfaces/TextTrackCue/endTime.html and
290         media/track/opera/interfaces/TextTrackCue/startTime.html.
291
292         * html/track/TextTrackCue.cpp:
293         (WebCore::TextTrackCue::setStartTime):
294         (WebCore::TextTrackCue::setEndTime):
295         * html/track/TextTrackCue.h:
296         (TextTrackCue):
297         * html/track/TextTrackCue.idl:
298
299 2012-12-05  Alexis Menard  <alexis@webkit.org>
300
301         [CSS3 Backgrounds and Borders] Allow the CSS3 background position offset for background shorthand.
302         https://bugs.webkit.org/show_bug.cgi?id=104014
303
304         Reviewed by Dirk Schulze.
305
306         Add the support of the new <position> type if set from within the
307         background shorthand. The patch just modify the way we count the values
308         of the current context by checking wether we encounter a comma (it is
309         then the next background layer), or if we encounter a '/' (which is in the
310         background shorthand context the background-size) or any value that is
311         not a valid background-position keyword or length (which means we are
312         already parsing the next property of the background shorthand).
313
314         Tests: LayoutTests/fast/backgrounds/background-position-parsing-2.html
315         has been modified to cover this use case.
316
317         * css/CSSParser.cpp:
318         (WebCore::CSSParser::isPositionValue):
319         (WebCore):
320         (WebCore::CSSParser::parseFillBackgroundPosition):
321         (WebCore::CSSParser::parseFillProperty):
322         * css/CSSParser.h:
323
324 2012-12-05  Elliott Sprehn  <esprehn@gmail.com>
325
326         ShadowRoot should recalcStyle for itself
327         https://bugs.webkit.org/show_bug.cgi?id=103933
328
329         Reviewed by Hajime Morita.
330
331         ShadowRoot should support recalcStyle just like Element instead of
332         having the code inside ElementShadow. This was once the case and
333         the dead method prototype for recalcShadowTreeStyle is still in
334         ShadowRoot.h.
335
336         No new tests, just refactoring.
337
338         * dom/ElementShadow.cpp:
339         (WebCore::ElementShadow::recalcStyle):
340         * dom/ShadowRoot.cpp:
341         (WebCore::ShadowRoot::recalcStyle):
342         * dom/ShadowRoot.h:
343
344 2012-12-05  Keishi Hattori  <keishi@webkit.org>
345
346         Fix text direction in datalist popup for time controls
347         https://bugs.webkit.org/show_bug.cgi?id=103853
348
349         Reviewed by Kent Tamura.
350
351         The datalist entry value should be displayed with the same text direction as the date/time format.
352
353         Tests: platform/chromium/fast/forms/suggestion-picker/datetime-suggestion-picker-appearance-locale-hebrew.html
354                platform/chromium/fast/forms/suggestion-picker/datetimelocal-suggestion-picker-appearance-locale-hebrew.html
355                platform/chromium/fast/forms/suggestion-picker/time-suggestion-picker-appearance-locale-hebrew.html
356
357         * Resources/pagepopups/calendarPicker.js: Renamed isCalendarRTL to isLocaleRTL.
358         (CalendarPicker.prototype._layout):
359         (CalendarPicker.prototype.fixWindowSize):
360         (DaysTable.prototype._handleKey):
361         (MonthPickerDaysTable.prototype._handleKey):
362         (WeekPickerDaysTable.prototype._handleKey):
363         * Resources/pagepopups/suggestionPicker.css:
364         (.suggestion-list-entry .title): Title should have the same text direction as the locale.
365         (.locale-rtl .suggestion-list-entry .title):
366         * Resources/pagepopups/suggestionPicker.js:
367         (SuggestionPicker.prototype._layout): Add locale-rtl class if the isLocaleRTL is true.
368
369 2012-12-05  Keishi Hattori  <keishi@webkit.org>
370
371         Fix flickering when hiding page popup
372         https://bugs.webkit.org/show_bug.cgi?id=104100
373
374         Reviewed by Kent Tamura.
375
376         Moving the page popup while hiding was causing flickering in some environments.
377
378         No new tests. Can't reproduce in layout test.
379
380         * Resources/pagepopups/pickerCommon.js:
381         (hideWindow): Don't move and just resize.
382
383 2012-12-05  Allan Sandfeld Jensen  <allan.jensen@digia.com>
384
385         [Qt] Don't rely on QMimeDatabase for essential MIME types
386         https://bugs.webkit.org/show_bug.cgi?id=103865
387
388         Based on patch by Pierre Rossi.
389         Reviewed by Jocelyn Turcotte.
390
391         Extend the short static list to also include MIME types essential to WebKit,
392         and detect these first before checking the system mimedatabase.
393
394         * platform/qt/MIMETypeRegistryQt.cpp:
395         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
396         (WebCore::MIMETypeRegistry::getMIMETypeForPath):
397
398 2012-12-05  Zoltan Herczeg  <zherczeg@webkit.org>
399
400         Optimize ColorMatrix filter
401         https://bugs.webkit.org/show_bug.cgi?id=103728
402
403         Reviewed by Dirk Schulze.
404
405         ColorMatrix filter recalculates several constants for
406         every pixel. It is enough to do these calculations only
407         once during the initialization. Style issues also fixed.
408
409         Existing tests cover this feature.
410
411         * platform/graphics/filters/FEColorMatrix.cpp:
412         (WebCore::matrix):
413         (WebCore::saturateAndHueRotate):
414         (WebCore::effectType):
415
416 2012-12-05  Carlos Garcia Campos  <cgarcia@igalia.com>
417
418         Flex item auto margins in the cross direction should safe center
419         https://bugs.webkit.org/show_bug.cgi?id=103919
420
421         Reviewed by Ojan Vafai.
422
423         Do not apply auto margins for cross axis if there's no alignment
424         space available.
425
426         Test: css3/flexbox/flex-flow-auto-margins-no-available-space.html
427
428         * rendering/RenderFlexibleBox.cpp:
429         (WebCore::RenderFlexibleBox::alignChildren): Make sure we pass a
430         positive value for availableAlignmentSpace to
431         updateAutoMarginsInCrossAxis().
432
433 2012-12-05  Mike West  <mkwst@chromium.org>
434
435         Web Inspector: Autogenerate stack traces and line numbers when possible.
436         https://bugs.webkit.org/show_bug.cgi?id=100650
437
438         Reviewed by Yury Semikhatsky.
439
440         Console messages generated in WebCore generally are asked to do a bit of
441         work in order to provide a developer with a detailed report. We ask the
442         caller to either generate stack traces, or pass in a url/line number
443         pair, which can be a bit of work. Predictably, most callers don't pass
444         in what we'd like to see.
445
446         This patch creates a new, simpler console message generation API that we
447         expect most call sites to use. Source, type, level, and message are
448         required, and an optional request ID can be passed in. Everything else
449         will be autogenerated inside ConsoleMessage when appropriate.
450
451         In a subsequent patch, we expect to be able to trim down more of the
452         external call sites (ContentSecurityPolicy springs to mind) in order to
453         further consolidate the external interface. Simple is good.
454
455         * Modules/websockets/WebSocket.cpp:
456         (WebCore::WebSocket::connect):
457         * Modules/websockets/WebSocketChannel.cpp:
458         (WebCore::WebSocketChannel::didFailSocketStream):
459             Drop the now-redundant URL parameter from various WebSocket errors.
460         * css/MediaList.cpp:
461         (WebCore::addResolutionWarningMessageToConsole):
462             Switch to Document::addConsoleMessage, which means that we can move
463             line-number generation out of MediaList.
464         * dom/Document.cpp:
465         (WebCore::Document::logExceptionToConsole):
466             Use the long-form 'addMessage()' rather than the public interface.
467         (WebCore::Document::processHttpEquiv):
468             Drop the URL parameter, as it's now autogenerated.
469         (WebCore::Document::addConsoleMessage):
470         (WebCore):
471         * dom/Document.h:
472         (Document):
473             Override the pure virtual method on ScriptExecutionContext, and pass
474             the call through to the new Console::addMessage, which accepts a
475             pointer to the Document in order to do line-number generation.
476         * dom/ScriptExecutionContext.h:
477         (ScriptExecutionContext):
478             Add a pure virtual variant of addConsoleMessage which accepts only
479             bare minimum data, and expects autogeneration of the rest.
480             Additionally, ensure that the other variants always have either a
481             URL/line number, or a stack trace.
482         * dom/ViewportArguments.cpp:
483         (WebCore::reportViewportWarning):
484             Drop line numbers and URLs from Viewport warnings. We can generate
485             these now.
486         * html/HTMLFormElement.cpp:
487         (WebCore::HTMLFormElement::validateInteractively):
488             Drop the URL from form autofocus warnings
489         * html/HTMLIFrameElement.cpp:
490         (WebCore::HTMLIFrameElement::parseAttribute):
491             Drop the URL and line from sandbox attribute warnings.
492         * html/canvas/WebGLRenderingContext.cpp:
493         (WebCore):
494         (WebCore::WebGLRenderingContext::printWarningToConsole):
495             Drop the URL from WebGL warnings.
496         * inspector/ConsoleMessage.cpp:
497         (WebCore::ConsoleMessage::ConsoleMessage):
498             Call 'autogenerateMetadata' to ensure that a stack trace is
499             generated if one isn't provided. Create a new constructor that
500             accepts a ScriptState/ScriptArguments pair, and use it for console
501             API calls.
502         (WebCore):
503         (WebCore::ConsoleMessage::autogenerateMetadata):
504             Generate a stack trace given whatever information we've got.
505         * inspector/ConsoleMessage.h:
506         (ConsoleMessage):
507             Create a new constructor that accepts a ScriptState/ScriptArguments
508             pair, and use it for console API calls.
509         * inspector/InspectorConsoleAgent.cpp:
510         (WebCore::InspectorConsoleAgent::enable):
511             Use the short-form ConsoleMessage constructor.
512         (WebCore::InspectorConsoleAgent::addMessageToConsole):
513             Use the stack-only constructor, or the ScriptState
514             constructor, as appropriate.
515         (WebCore::InspectorConsoleAgent::count):
516             We generated a stack, pass it in.
517         * inspector/InspectorConsoleAgent.cpp:
518         (WebCore::InspectorConsoleAgent::isWorkerAgent):
519         * inspector/PageConsoleAgent.h:
520         (WebCore::PageConsoleAgent::isWorkerAgent):
521         * inspector/PageConsoleAgent.h:
522         (WebCore::PageConsoleAgent::isWorkerAgent):
523             We only want to generate call stacks for non-Workers (because
524             createScriptCallStack explodes in JSC if we're not on the main
525             thread). This method will allow us to distinguish between those
526             messages generated from Workers, and those from Pages.
527         * loader/FrameLoader.cpp:
528         (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
529         * loader/MainResourceLoader.cpp:
530         (WebCore::MainResourceLoader::didReceiveResponse):
531             Drop the URL parameter from the console message for X-Frame-Options
532             parsing errors.
533         * page/Console.cpp:
534         (WebCore::Console::addMessage):
535             When given a Document*, generate a line number if: 1) the document
536             is still being parsed, 2) the document is not in document.write(),
537             3) the parser isn't waiting for script, and 4) the parser isn't
538             executing script. Many callsites didn't check all of these, which
539             is why the SVG rebaseline (for example) drops lots and lots of line
540             numbers which point at a closing '</script>' tag.
541         (WebCore):
542         * page/Console.h:
543         (WebCore):
544         (Console):
545             Update the public API to accept a Document* and little else.
546         * page/DOMWindow.cpp:
547         (WebCore::DOMWindow::printErrorMessage):
548             Don't generate a stack here. We can do it later.
549         * svg/SVGDocumentExtensions.cpp:
550         (WebCore::reportMessage):
551             Drop the URL and line number. We'll generate them. It'll be sweet.
552         * workers/WorkerContext.cpp:
553         (WebCore::WorkerContext::addConsoleMessage):
554         (WebCore):
555         * workers/WorkerContext.h:
556         (WorkerContext):
557             Implement the new addConsoleMessage variant.
558
559 2012-12-04  Carlos Garcia Campos  <cgarcia@igalia.com>
560
561         Reduce the children repaints when moved multiple times during the layout
562         https://bugs.webkit.org/show_bug.cgi?id=103510
563
564         Reviewed by Darin Adler.
565
566         Cache the children positions before the layout and move to the
567         final position after the layout.
568
569         Test: css3/flexbox/repaint-column-reverse.html
570
571         * rendering/RenderFlexibleBox.cpp:
572         (WebCore::RenderFlexibleBox::OrderIterator::OrderIterator): Do not
573         call first() on the consructor.
574         (WebCore::RenderFlexibleBox::layoutBlock): Use a Vector with the
575         children frame rects before the layout and call
576         repaintChildrenDuringLayoutIfMoved() to repaint the children that
577         have been moved.
578         (WebCore::RenderFlexibleBox::appendChildrenFrameRects): Return a
579         Vector with children frame rects.
580         (WebCore::RenderFlexibleBox::repaintChildrenDuringLayoutIfMoved):
581         Call repaintDuringLayoutIfMoved() for every children using the old
582         frame rects.
583         (WebCore::RenderFlexibleBox::setFlowAwareLocationForChild): Do not
584         call repaintDuringLayoutIfMoved().
585         (WebCore::RenderFlexibleBox::layoutFlexItems): Make sure the
586         passed iterator points to the first child.
587         * rendering/RenderFlexibleBox.h:
588
589 2012-12-05  Dan Carney  <dcarney@google.com>
590
591         [V8] toV8Fast for all classes with ScriptWrapper Holder objects
592         https://bugs.webkit.org/show_bug.cgi?id=102686
593
594         Reviewed by Adam Barth.
595
596         This patch makes most generated bindings use toV8Fast
597         by adding a fast path to the main world DOMDataStore.
598         Additionally, toV8Fast is now being called on callbacks
599         which use v8::Arguments.
600
601         No new tests. No change in functionality.
602
603         * bindings/scripts/CodeGeneratorV8.pm:
604         (GenerateHeader):
605         (GenerateNormalAttrGetter):
606         (GenerateFunctionCallString):
607         (NativeToJSValue):
608         * bindings/v8/DOMDataStore.cpp:
609         (WebCore::DOMDataStore::mainWorldStore):
610         (WebCore::DOMDataStore::current):
611         * bindings/v8/DOMDataStore.h:
612
613 2012-12-05  Andrey Adaikin  <aandrey@chromium.org>
614
615         Web Inspector: [Canvas] nit: add more typization for js compiler
616         https://bugs.webkit.org/show_bug.cgi?id=103994
617
618         Reviewed by Pavel Feldman.
619
620         * inspector/InjectedScriptCanvasModuleSource.js:
621         (.):
622
623 2012-12-05  Hans Muller  <hmuller@adobe.com>
624
625         [CSS Exclusions] ExclusionShape inlines should use isFlippedBlocksWritingMode()
626         https://bugs.webkit.org/show_bug.cgi?id=103939
627
628         Reviewed by Dirk Schulze.
629
630         Just a minor cleanup: the protected ExclusionShape inlines, like minYForLogicalLine(),
631         now use isFlippedBlocksWritingMode() instead of testing for RightToLeftWritingMode directly.
632         This changeimproves consistency with the rest of WebKit and will work correctly
633         if "horizontal-bt" writing-mode support is ever added.
634
635         No new tests were added since the existing tests cover these methods.
636
637         * rendering/ExclusionShape.h:
638         (WebCore::ExclusionShape::minYForLogicalLine):
639         (WebCore::ExclusionShape::maxYForLogicalLine):
640         (WebCore::ExclusionShape::internalToLogicalBoundingBox):
641
642 2012-12-05  Bear Travis  <betravis@adobe.com>
643
644         Absolutely positioned non-replaced elements should resolve vertical margins against
645         their containing block's logical width
646         https://bugs.webkit.org/show_bug.cgi?id=103576
647
648         Reviewed by Emil A Eklund.
649
650         According to the CSS box model specification, all percentage margin & padding values,
651         including top & bottom, should be resolved based on the containing block's width.
652         http://www.w3.org/TR/CSS2/box.html#margin-properties
653         The writing modes specification has refined this definition to use the containing
654         block's logical width to resolve percentage margin & padding values.
655         http://dev.w3.org/csswg/css3-writing-modes/#dimension-mapping
656
657         Previously, positioned elements measured their container in the element's block
658         direction (containerLogicalHeight) to resolve margin-before/after, and in the inline
659         direction (containerLogicalWidth) to resolve margin-start/end. This patch measures the
660         container's logical width in its own inline direction (containerRelativeLogicalWidth)
661         to resolve all margin percentage values.
662
663         Test: fast/writing-mode/percentage-margins-absolute.html
664
665         * rendering/RenderBox.cpp:
666         (WebCore::RenderBox::computePositionedLogicalWidthUsing): Calculate the logical width
667         of the container, and use it to calculate margins.
668         (WebCore::RenderBox::computePositionedLogicalHeightUsing): Ditto.
669
670 2012-12-04  Kentaro Hara  <haraken@chromium.org>
671
672         [V8] Replace String::New("symbol") with String::NewSymbol("symbol") (part 2)
673         https://bugs.webkit.org/show_bug.cgi?id=104082
674
675         Reviewed by Adam Barth.
676
677         V8 can look up symbols faster than strings.
678
679         No tests. No change in behavior.
680
681         * bindings/v8/custom/V8ArrayBufferViewCustom.cpp:
682         (WebCore::getHiddenCopyMethod):
683         (WebCore::installHiddenCopyMethod):
684         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
685         (WebCore::constructWebGLArray):
686         (WebCore::setWebGLArrayHelper):
687         * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
688         (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
689         * bindings/v8/custom/V8DOMWindowCustom.cpp:
690         (WebCore::DialogHandler::dialogCreated):
691         (WebCore::DialogHandler::returnValue):
692         * bindings/v8/custom/V8GeolocationCustom.cpp:
693         (WebCore::createPositionOptions):
694         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
695         (WebCore::V8HTMLDocument::wrapInShadowObject):
696         (WebCore::V8HTMLDocument::openCallback):
697         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
698         (WebCore::V8HTMLImageElementConstructor::GetTemplate):
699         * bindings/v8/custom/V8SQLTransactionCustom.cpp:
700         (WebCore::V8SQLTransaction::executeSqlCallback):
701
702 2012-12-04  Elliott Sprehn  <esprehn@chromium.org>
703
704         Clicking a scrollbar unfocuses the current activeElement
705         https://bugs.webkit.org/show_bug.cgi?id=96335
706
707         Reviewed by Ojan Vafai.
708
709         Previously we only tested for clicks inside frame scrollbars before
710         moving the focus, this patch expands the check to overflow scrollbars.
711         Now clicking inside a scrollbar only moves the focus when the scrollbar
712         has an ancestor that is mouse focusable.
713
714         This matches Gecko behavior, and was agreed to be the most sensible for now:
715         http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-October/037759.html
716
717         Test: fast/overflow/scrollbar-click-retains-focus.html
718
719         * page/EventHandler.cpp:
720         (WebCore::EventHandler::handleMousePressEvent):
721           Never start selections inside scrollbars because it would cause asserts. 
722           This wasn't a problem before because we always moved the focus when clicking a scrollbar.        
723         (WebCore::EventHandler::dispatchMouseEvent): 
724           Check that the click is not inside a scrollbar before moving the focus.
725         (WebCore::EventHandler::isInsideScrollbar): Tests if a point is in a scrollbar.
726         (WebCore):
727         (WebCore::EventHandler::sendContextMenuEvent):
728           Never start selections inside scrollbars because it would cause asserts.
729         * page/EventHandler.h:
730         (EventHandler):
731         * rendering/RenderLayer.cpp:
732         (WebCore::RenderLayer::hitTestOverflowControls):
733
734 2012-12-04  Kentaro Hara  <haraken@chromium.org>
735
736         [V8] Replace String::New("symbol") with String::NewSymbol("symbol")
737         https://bugs.webkit.org/show_bug.cgi?id=104084
738
739         Reviewed by Adam Barth.
740
741         V8 can look up symbols faster than strings. This is a final patch for the replacement.
742
743         No tests. No change in behavior.
744
745         * bindings/v8/DateExtension.cpp:
746         (WebCore::DateExtension::setAllowSleep):
747         (WebCore::DateExtension::GetNativeFunction):
748         * bindings/v8/NPV8Object.cpp:
749         (WebCore::npIdentifierToV8Identifier):
750         (_NPN_Invoke):
751         * bindings/v8/PageScriptDebugServer.cpp:
752         (WebCore::PageScriptDebugServer::addListener):
753         * bindings/v8/ScriptController.cpp:
754         (WebCore::ScriptController::setContextDebugId):
755         * bindings/v8/ScriptDebugServer.cpp:
756         (WebCore::ScriptDebugServer::callDebuggerMethod):
757         (WebCore::ScriptDebugServer::setBreakpoint):
758         (WebCore::ScriptDebugServer::removeBreakpoint):
759         (WebCore::ScriptDebugServer::clearBreakpoints):
760         (WebCore::ScriptDebugServer::setBreakpointsActivated):
761         (WebCore::ScriptDebugServer::handleV8DebugEvent):
762         (WebCore::ScriptDebugServer::dispatchDidParseSource):
763         * bindings/v8/ScriptObject.cpp:
764         (WebCore::ScriptGlobalObject::set):
765         (WebCore::ScriptGlobalObject::get):
766         (WebCore::ScriptGlobalObject::remove):
767         * bindings/v8/V8Binding.h:
768         (WebCore::toV8Sequence):
769         * bindings/v8/V8DOMWindowShell.cpp:
770         (WebCore::setInjectedScriptContextDebugId):
771         (WebCore::V8DOMWindowShell::updateDocumentProperty):
772         (WebCore::V8DOMWindowShell::clearDocumentProperty):
773         * bindings/v8/V8NPObject.cpp:
774         (WebCore::npObjectPropertyEnumerator):
775         * bindings/v8/V8NodeFilterCondition.cpp:
776         (WebCore::V8NodeFilterCondition::acceptNode):
777         * bindings/v8/V8PerIsolateData.cpp:
778         (WebCore::V8PerIsolateData::constructorOfToString):
779         * bindings/v8/WorkerScriptController.cpp:
780         (WebCore::WorkerScriptController::initializeContextIfNeeded):
781         * bindings/v8/WorkerScriptDebugServer.cpp:
782         (WebCore::WorkerScriptDebugServer::addListener):
783
784 2012-12-04  Dan Bernstein  <mitz@apple.com>
785
786         Support text-orientation: sideways-right (and sideways when it maps to sideways-right)
787         https://bugs.webkit.org/show_bug.cgi?id=104035
788
789         Reviewed by Anders Carlsson.
790
791         Test: fast/text/orientation-sideways.html
792
793         * GNUmakefile.list.am: Updated for rename of TextOrientation.h.
794
795         * WebCore.gypi: Ditto.
796
797         * WebCore.xcodeproj/project.pbxproj: Ditto.
798
799         * css/CSSComputedStyleDeclaration.cpp:
800         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Changed to retrieve
801         text-orientation from RenderStyle rather than from the font description.
802
803         * css/CSSParser.cpp:
804         (WebCore::CSSParser::parseValue): Added sideways and sideways-right as acceptable
805         text-orientation values.
806
807         * css/CSSPrimitiveValueMappings.h:
808         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added mappings for sideways and
809         sideways-right.
810         (WebCore::CSSPrimitiveValue::operator TextOrientation): Ditto.
811
812         * css/CSSValueKeywords.in: Added sideways and sideways-right.
813
814         * css/StyleBuilder.cpp:
815         (WebCore::StyleBuilder::StyleBuilder): Removed text-orientation property handler, as it is
816         now handled in CSSStyleResolver.
817
818         * css/StyleResolver.cpp:
819         (WebCore::getFontAndGlyphOrientation): Added this helper function that determines the font
820         orientation and non-CJK glyph orientation based on writing-mode and text-orientation.
821         (WebCore::StyleResolver::styleForDocument): Added code to set the font orientation and
822         non-CJK glyph orientation in the document style.
823         (WebCore::checkForOrientationChange): Added. Sets the font orientation and non-CJK glyph
824         orientation in the child style if the difference between the parent and child styles requires
825         doing so.
826         (WebCore::StyleResolver::updateFont): Added call to checkForOrientationChange().
827         (WebCore::StyleResolver::applyProperty): Changed the writing-mode case to call the new
828         setWritingMode helper, which dirties the font as needed, rather than changing the font
829         here. Moved handling of text-orientation here, by calling setTextOrientation, which also
830         dirties the font as needed.
831
832         * css/StyleResolver.h:
833         (WebCore::StyleResolver::setWritingMode): Added. Dirties the font if the writing mode changes.
834         (WebCore::StyleResolver::setTextOrientation): Ditto for text orientation.
835
836         * platform/graphics/FontDescription.h:
837         (WebCore::FontDescription::FontDescription): Updated initializer for rename.
838         (WebCore::FontDescription::nonCJKGlyphOrientation): Renamed textOrientation to this.
839         (WebCore::FontDescription::setNonCJKGlyphOrientation): Renamed setTextOrientation to this.
840         (FontDescription): Renamed member variable m_textOrientation to m_nonCJKGlyphOrientation.
841         (WebCore::FontDescription::operator==): Updated for rename.
842
843         * platform/graphics/FontFastPath.cpp:
844         (WebCore::glyphDataAndPageForNonCJKCharacterWithGlyphOrientation): Renamed
845         glyphDataAndPageForCharacterWithTextOrientation to this and changed the parameter type from
846         TextOrientation to NonCJKGlyphOrientation.
847         (WebCore::Font::glyphDataAndPageForCharacter): Updated for above rename.
848
849         * platform/graphics/mac/FontComplexTextMac.cpp:
850         (WebCore::Font::fontDataForCombiningCharacterSequence): Updated for rename of
851         FontDescription::textOrientation().
852
853         * platform/text/NonCJKGlyphOrientation.h: Renamed TextOrientation.h to this, and renamed
854         the enum and its values to better reflect that they describe how glyphs for non-CJK
855         characters are to be rendered in vertical text.
856
857         * rendering/InlineFlowBox.cpp:
858         (WebCore::InlineFlowBox::requiresIdeographicBaseline): Updated for rename of
859         FontDescription::textOrientation().
860
861         * rendering/style/RenderStyle.cpp:
862         (WebCore::RenderStyle::diff): Made text-orientation change a layout change.
863
864         * rendering/style/RenderStyle.h:
865         (WebCore::RenderStyle::setTextOrientation): Added.
866
867         * rendering/style/RenderStyleConstants.h: Added a new TextOrientation enum here.
868
869         * rendering/style/StyleRareInheritedData.cpp:
870         (WebCore::StyleRareInheritedData::StyleRareInheritedData): Added initialization and copying
871         of m_textOrientation member variable.
872         (WebCore::StyleRareInheritedData::operator==): Added comparing of m_textOrientation.
873
874         * rendering/style/StyleRareInheritedData.h:
875         (StyleRareInheritedData): Added m_textOrientation member variable.
876
877 2012-12-04  Kentaro Hara  <haraken@chromium.org>
878
879         [V8] Use ScopedPersistent for IntegerCache::smallIntegers
880         https://bugs.webkit.org/show_bug.cgi?id=104066
881
882         Reviewed by Adam Barth.
883
884         We can use ScopedPersistent for IntegerCache::smallIntegers
885         instead of manual Persistent::New().
886
887         I confirmed no performance regression in Bindings/scroll-top.html
888
889         No tests. No change in behavior.
890
891         * bindings/v8/V8PerIsolateData.cpp:
892         (WebCore::V8PerIsolateData::V8PerIsolateData):
893         * bindings/v8/V8ValueCache.cpp:
894         (WebCore::IntegerCache::IntegerCache):
895         * bindings/v8/V8ValueCache.h:
896         (IntegerCache):
897         (WebCore::IntegerCache::v8Integer):
898         (WebCore::IntegerCache::v8UnsignedInteger):
899
900 2012-12-04  Eugene Klyuchnikov  <eustas@chromium.org>
901
902         Web Inspector: Resources: domain cookies are not shown for sub-sub domain pages.
903         https://bugs.webkit.org/show_bug.cgi?id=104016
904
905         Reviewed by Pavel Feldman.
906
907         Fixed regexp to allow zero or more subdomain prefix (was zero or one).
908
909         * inspector/front-end/CookieParser.js:
910         (WebInspector.Cookies.cookieDomainMatchesResourceDomain): Fixed regexp.
911
912 2012-12-04  Alpha Lam  <hclam@chromium.org>
913
914         Not reviewed. Build fix.
915
916         Fix Chromium Windows build.
917
918         * platform/graphics/chromium/ImageDecodingStore.h:
919         (CacheEntry):
920
921 2012-12-04  Kentaro Hara  <haraken@chromium.org>
922
923         [V8] Remove toV8Object()
924         https://bugs.webkit.org/show_bug.cgi?id=103987
925
926         Reviewed by Adam Barth.
927
928         toV8Object() is used only for MessagePort and ArrayBuffer
929         only by SerializedScriptValue. It is wasteful to generate
930         toV8Object() for all interfaces.
931
932         No tests. No change in behavior.
933
934         * bindings/scripts/CodeGeneratorV8.pm:
935         (GenerateHeader):
936         * bindings/scripts/test/V8/V8Float64Array.h:
937         (WebCore):
938         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
939         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
940         * bindings/scripts/test/V8/V8TestEventConstructor.h:
941         * bindings/scripts/test/V8/V8TestEventTarget.h:
942         * bindings/scripts/test/V8/V8TestException.h:
943         * bindings/scripts/test/V8/V8TestInterface.h:
944         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
945         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
946         * bindings/scripts/test/V8/V8TestNode.h:
947         * bindings/scripts/test/V8/V8TestObj.h:
948         * bindings/scripts/test/V8/V8TestOverloadedConstructors.h:
949         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
950         * bindings/v8/SerializedScriptValue.cpp:
951
952 2012-12-04  Kentaro Hara  <haraken@chromium.org>
953
954         [V8] Replace v8::Null(isolate) with v8Null(isolate)
955         https://bugs.webkit.org/show_bug.cgi?id=104070
956
957         Reviewed by Adam Barth.
958
959         v8Null(isolate) is a faster version of v8::Null(isolate).
960
961         No tests. No change in behavior.
962
963         * bindings/v8/V8Binding.h:
964         (WebCore::v8StringOrNull):
965         * bindings/v8/custom/V8ClipboardCustom.cpp:
966         (WebCore::V8Clipboard::typesAccessorGetter):
967         * bindings/v8/custom/V8CoordinatesCustom.cpp:
968         (WebCore::V8Coordinates::altitudeAccessorGetter):
969         (WebCore::V8Coordinates::altitudeAccuracyAccessorGetter):
970         (WebCore::V8Coordinates::headingAccessorGetter):
971         (WebCore::V8Coordinates::speedAccessorGetter):
972         * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
973         (WebCore::V8DeviceMotionEvent::accelerationAccessorGetter):
974         (WebCore::V8DeviceMotionEvent::accelerationIncludingGravityAccessorGetter):
975         (WebCore::V8DeviceMotionEvent::rotationRateAccessorGetter):
976         (WebCore::V8DeviceMotionEvent::intervalAccessorGetter):
977         * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
978         (WebCore::V8DeviceOrientationEvent::alphaAccessorGetter):
979         (WebCore::V8DeviceOrientationEvent::betaAccessorGetter):
980         (WebCore::V8DeviceOrientationEvent::gammaAccessorGetter):
981         (WebCore::V8DeviceOrientationEvent::absoluteAccessorGetter):
982         * bindings/v8/custom/V8DocumentLocationCustom.cpp:
983         (WebCore::V8Document::locationAccessorGetter):
984         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
985         (WebCore::V8HTMLCanvasElement::getContextCallback):
986         * bindings/v8/custom/V8HistoryCustom.cpp:
987         (WebCore::V8History::stateAccessorGetter):
988         * bindings/v8/custom/V8MessageEventCustom.cpp:
989         (WebCore::V8MessageEvent::dataAccessorGetter):
990         * bindings/v8/custom/V8MicroDataItemValueCustom.cpp:
991         (WebCore::toV8):
992         * bindings/v8/custom/V8NodeCustom.cpp:
993         (WebCore::V8Node::insertBeforeCallback):
994         (WebCore::V8Node::replaceChildCallback):
995         (WebCore::V8Node::removeChildCallback):
996         (WebCore::V8Node::appendChildCallback):
997         * bindings/v8/custom/V8PopStateEventCustom.cpp:
998         (WebCore::V8PopStateEvent::stateAccessorGetter):
999         * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp:
1000         (WebCore::V8SQLResultSetRowList::itemCallback):
1001         * bindings/v8/custom/V8TrackEventCustom.cpp:
1002         (WebCore::V8TrackEvent::trackAccessorGetter):
1003         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
1004         (WebCore::toV8Object):
1005         (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback):
1006         (WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallback):
1007
1008 2012-12-04  Min Qin  <qinmin@chromium.org>
1009
1010         Make LazyDecodingPixelRef inherit from skia::LazyPixelRef so that cc thread can access it
1011         https://bugs.webkit.org/show_bug.cgi?id=103555
1012
1013         Reviewed by Stephen White.
1014
1015         Expose LazyDecodingPixelRef to the cc thread by inheriting from skia::LazyPixelRef.
1016         No test added for now as impl side paiting is still WIP.
1017
1018         * platform/graphics/chromium/LazyDecodingPixelRef.cpp:
1019         (WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef):
1020         (WebCore::LazyDecodingPixelRef::PrepareToDecode):
1021         (WebCore):
1022         (WebCore::LazyDecodingPixelRef::Decode):
1023         * platform/graphics/chromium/LazyDecodingPixelRef.h:
1024         (LazyDecodingPixelRef):
1025
1026 2012-12-04  Takashi Sakamoto  <tasak@google.com>
1027
1028         Fix compile error when SVG is disabled.
1029
1030         Unreviewed gardening.
1031
1032         * css/StyleResolver.cpp:
1033         (WebCore::StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes):
1034
1035 2012-12-04  Anthony Scian  <ascian@rim.com>
1036
1037         Static code analysis warning fixes
1038         https://bugs.webkit.org/show_bug.cgi?id=103837
1039
1040         Reviewed by Rob Buis.
1041
1042         172,174: disable copy ctor, op= in AutofillBackingStore
1043         504,506: disable copy ctor, op= in CookieManager
1044         1488,1491: disable copy ctor, op= in RSSParserBase
1045         1489,1490: disable copy ctor, op= in RSSItem
1046         514,516: disable copy ctor, op= in CredentialBackingStore
1047         1363: m_state not initialized in ctor
1048
1049         * platform/blackberry/CookieManager.h:
1050         * platform/blackberry/PlatformTouchPointBlackBerry.cpp:
1051         (WebCore::PlatformTouchPoint::PlatformTouchPoint):
1052         * platform/network/blackberry/AutofillBackingStore.h:
1053         (AutofillBackingStore):
1054         * platform/network/blackberry/CredentialBackingStore.h:
1055         (CredentialBackingStore):
1056         * platform/network/blackberry/rss/RSSParserBase.h:
1057         (RSSParserBase):
1058
1059 2012-12-04  Noel Gordon  <noel.gordon@gmail.com>
1060
1061         [v8] Improve worker.postMessage() string performance: avoid utf8 conversion
1062         https://bugs.webkit.org/show_bug.cgi?id=102230
1063
1064         Reviewed by Eric Seidel.
1065
1066         Avoid utf8 conversion when serializing strings with SerializedScriptValue. Provide 
1067         Ascii and UChar writers for v8 string serialization and provide a UChar reader for
1068         deserialization. Define/use serialization StringUCharTag to indicate UChar strings
1069         in the wire format. Increment the SerializedScriptValue wire format version.
1070
1071         In the wire format, StringUCharTag is followed by the string length in bytes, then
1072         the length/2 UChars of the string.
1073
1074         Note the string length is VarInt encoded. During serialization, compute the number
1075         of bytes used to encode the length and prepend a PaddingTag if needed so the UChar
1076         data appears on an even-byte boundary. This prevents unaligned reads of UChar data
1077         during deserialization (the deserialization buffer is even-byte aligned).
1078
1079         Testing transfers of large strings to and from workers indicates a 10X improvement
1080         in transfer rate for strings, and strings within js objects, with this change. For
1081         example, 500 MByte/s on my test machine (50 MByte/s without this change) for flat,
1082         32 MByte string postMessage() transfers.
1083
1084         Covered by platform/chromium/fast/storage/serialized-script-value.html
1085
1086         * bindings/v8/SerializedScriptValue.cpp:
1087
1088 2012-12-04  Kentaro Hara  <haraken@chromium.org>
1089
1090         [V8] V8Binding::v8ExternalString() is redundant
1091         https://bugs.webkit.org/show_bug.cgi?id=103979
1092
1093         Reviewed by Adam Barth.
1094
1095         v8String(), v8StringOrNull() and v8StringOrUndefined() are enough.
1096         We can remove V8Binding::v8ExternalString().
1097
1098         No tests. No change in behavior.
1099
1100         * bindings/scripts/CodeGeneratorV8.pm:
1101         (GenerateNormalAttrGetter):
1102         * bindings/v8/ScriptController.cpp:
1103         (WebCore::ScriptController::compileAndRunScript):
1104         * bindings/v8/ScriptDebugServer.cpp:
1105         (WebCore::ScriptDebugServer::compileScript):
1106         * bindings/v8/V8Binding.h:
1107         (WebCore):
1108         (WebCore::v8String):
1109         (WebCore::v8StringOrNull):
1110         (WebCore::v8StringOrUndefined):
1111         * bindings/v8/V8LazyEventListener.cpp:
1112         (WebCore::V8LazyEventListener::prepareListenerObject):
1113         * bindings/v8/WorkerScriptController.cpp:
1114         (WebCore::WorkerScriptController::evaluate):
1115
1116 2012-12-04  Kentaro Hara  <haraken@chromium.org>
1117
1118         [V8] Remove v8NonStringValueToWebCoreString() and v8NonStringValueToAtomicWebCoreString()
1119         https://bugs.webkit.org/show_bug.cgi?id=103981
1120
1121         Reviewed by Adam Barth.
1122
1123         v8NonStringValueToWebCoreString() and v8NonStringValueToAtomicWebCoreString()
1124         are equivalent to what StringResource does.
1125
1126         No tests. No change in behavior.
1127
1128         * bindings/v8/V8Binding.cpp:
1129         * bindings/v8/V8Binding.h:
1130         (WebCore::toWebCoreString):
1131         (WebCore):
1132         (WebCore::toWebCoreStringWithNullCheck):
1133         (WebCore::toWebCoreStringWithUndefinedOrNullCheck):
1134         (WebCore::toWebCoreAtomicString):
1135         (WebCore::toWebCoreAtomicStringWithNullCheck):
1136         * bindings/v8/V8StringResource.h:
1137         (WebCore::V8StringResource::V8StringResource):
1138         (V8StringResource):
1139
1140 2012-12-04  Abhishek Arya  <inferno@chromium.org>
1141
1142         Crash in WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode
1143         https://bugs.webkit.org/show_bug.cgi?id=103515
1144
1145         Reviewed by Ryosuke Niwa.
1146
1147         |current| is weak node pointer that iterates in the hierarchy chain
1148         between |highestAncestor| and |targetNode|. Script executed as part
1149         of iframe onload event can blow away the nodes and we no longer have
1150         |targetNode| in our descendants chain. So, we RefPtr |current| and bail
1151         out when |targetNode| stops being a part of descendant chain.
1152
1153         Test blocked on https://bugs.webkit.org/show_bug.cgi?id=104044.
1154
1155         * editing/ApplyStyleCommand.cpp:
1156         (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
1157
1158 2012-12-04  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
1159
1160         Avoid repeated calls to decorationColor on RenderObject::getTextDecorationColors
1161         https://bugs.webkit.org/show_bug.cgi?id=94131
1162
1163         Reviewed by Brent Fulgham.
1164
1165         Replaces repeated calls to decorationColor by adding a variable that reads the
1166         return value from that function just once on each loop and gets used upon need.
1167
1168         This change won't affect text decoration behavior, so current tests suffice.
1169
1170         * rendering/RenderObject.cpp:
1171         (WebCore::RenderObject::getTextDecorationColors):
1172
1173 2012-12-04  Alpha Lam  <hclam@chromium.org>
1174
1175         [chromium] Implement cache eviction logic in ImageDecodingStore
1176         https://bugs.webkit.org/show_bug.cgi?id=103480
1177
1178         Reviewed by James Robinson.
1179
1180         This patch implements these features in the new image cache:
1181         - Least-recently-used eviction logic
1182         - Setting cache limit (default is 32MB)
1183         - Remove cache entries when ImageFrameGenerator is removed
1184
1185         New tests in ImageDecodingTestTest. Also covered by platform/chromium/virtual/deferred.
1186
1187         * platform/graphics/chromium/ImageDecodingStore.cpp:
1188         (WebCore::ImageDecodingStore::ImageDecodingStore):
1189         (WebCore::ImageDecodingStore::~ImageDecodingStore):
1190         Code to assert that everything is cleaned up.
1191         (WebCore::ImageDecodingStore::lockCompleteCache):
1192         (WebCore::ImageDecodingStore::unlockCache):
1193         (WebCore::ImageDecodingStore::insertAndLockCache):
1194         (WebCore::ImageDecodingStore::removeCacheIndexedByGenerator):
1195         New method to remove all cache entries index by ImageFrameGenerator.
1196         (WebCore):
1197         (WebCore::ImageDecodingStore::setCacheLimitInBytes):
1198         (WebCore::ImageDecodingStore::memoryUsageInBytes):
1199         (WebCore::ImageDecodingStore::cacheEntries):
1200         (WebCore::ImageDecodingStore::prune):
1201         New code to implement LRU eviction logic.
1202         (WebCore::ImageDecodingStore::insertCacheInternal):
1203         New method to help new cache insertion. This is separately because it touches 3 containers.
1204         (WebCore::ImageDecodingStore::removeFromCacheInternal):
1205         New method to help remove a cache entry from containers.
1206         (WebCore::ImageDecodingStore::removeFromCacheListInternal):
1207         New helper method to help remove cache entry from doubly linked list.
1208         * platform/graphics/chromium/ImageDecodingStore.h:
1209         (ImageDecodingStore):
1210         (CacheEntry):
1211         (WebCore::ImageDecodingStore::CacheEntry::createAndUse):
1212         (WebCore::ImageDecodingStore::CacheEntry::CacheEntry):
1213         (WebCore::ImageDecodingStore::CacheEntry::~CacheEntry):
1214         (WebCore::ImageDecodingStore::CacheEntry::cacheKey):
1215         (WebCore::ImageDecodingStore::CacheEntry::cachedImage):
1216         (WebCore::ImageDecodingStore::CacheEntry::useCount):
1217         (WebCore::ImageDecodingStore::CacheEntry::incrementUseCount):
1218         (WebCore::ImageDecodingStore::CacheEntry::decrementUseCount):
1219         (WebCore::ImageDecodingStore::CacheEntry::memoryUsageInBytes):
1220         (WebCore::ImageDecodingStore::incrementMemoryUsage):
1221         (WebCore::ImageDecodingStore::decrementMemoryUsage):
1222         New helper methods.
1223         * platform/graphics/chromium/ImageFrameGenerator.cpp:
1224         (WebCore::ImageFrameGenerator::~ImageFrameGenerator):
1225
1226 2012-12-04  Andreas Kling  <akling@apple.com>
1227
1228         Style sharing: Allow sharing between elements with classes not referenced by any selectors.
1229         <http://webkit.org/b/103925>
1230
1231         Reviewed by Antti Koivisto.
1232
1233         When looking for elements that can share style, instead of blindly rejecting candidates with
1234         a different "class" attribute, check if it's actually referenced by any of the tracked style rules.
1235         It's surprisingly common for web pages to have elements with classes to which no rules apply,
1236         mediawiki content is especially good at this.
1237
1238         ~2100 new sharing "hits" on <https://en.wikipedia.org/wiki/Steve_Jobs>.
1239
1240         * css/StyleResolver.cpp:
1241         (WebCore::StyleResolver::canShareStyleWithElement):
1242
1243             Don't bail early if the two elements have different return values for hasClass().
1244
1245         (WebCore::StyleResolver::classNamesAffectedByRules):
1246
1247             Helper function that returns whether a SpaceSplitString contains a class name referenced
1248             by any style rules.
1249
1250         (WebCore::StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes):
1251
1252             Make this a member function since we need access to m_features.classesInRules.
1253
1254         * css/StyleResolver.h:
1255         (StyleResolver):
1256         * css/StyleResolver.cpp:
1257         (WebCore::StyleResolver::locateSharedStyle):
1258
1259             Cache whether the element we're resolving style for has a "class" attribute referenced by style rules.
1260
1261 2012-12-04  Silvia Pfeiffer  <silviapf@chromium.org>
1262
1263         Refactor Media Control Elements to remove code duplication.
1264         https://bugs.webkit.org/show_bug.cgi?id=101877
1265
1266         Reviewed by Eric Carlson.
1267
1268         Instead of having two different types of inheritance trees for
1269         MediaControlElement and MediaControlInputElement, this
1270         creates a stand-alone virtual class MediaControlElement that
1271         provides the common functions: show(), hide(), isShowing(),
1272         setMediaController(), displayType(), isMediaControlElement(),
1273         shadowPseudoId(), mediaController(), setDisplayType().
1274
1275         The individual elements inherit from MediaControlElement and
1276         either HTMLInputElement or HTMLDivElement. They extend/override
1277         the base functions as appropriate.
1278
1279         As part of this, the RenderXXX classes mixed in between the media
1280         controls in MediaControlElements.cpp are also moved to
1281         rendering/RenderMediaControls.h/cpp to follow common code separation.
1282
1283         No new tests since this is just a refactoring.
1284
1285         * CMakeLists.txt:
1286         * GNUmakefile.list.am:
1287         * Target.pri:
1288         * WebCore.gypi:
1289         * WebCore.vcproj/WebCore.vcproj:
1290         * WebCore.xcodeproj/project.pbxproj:
1291         Build files extended with new files.
1292
1293         * html/HTMLMediaElement.h:
1294         (WebCore::HTMLMediaElement::textTracksIndexNotFound):
1295         Replaced const with function, since it is used in multiple files.
1296
1297         * html/shadow/MediaControlElementTypes.cpp: new file
1298         * html/shadow/MediaControlElementTypes.h: new file
1299         Added new MediaControlElement class. Moved MediaControlDivElement and MediaControlInputElement
1300         classes into these files from MediaControlElements.cpp/h. Moved MediaControlElementTypes enum
1301         into these. Moved other media control element classes that are the basis for inheriting media
1302         control elements into these (MediaControlTimeDisplayElement, MediaControlMuteButtonElement,
1303         MediaControlSeekButtonElement, MediaControlVolumeSliderElement).
1304
1305         * html/shadow/MediaControlElements.cpp:
1306         * html/shadow/MediaControlElements.h:
1307         Removed common functions between media elements that are now in the common
1308         base class MediaControlElement.
1309         Also moved common base classes to MediaControlElementTypes.h/cpp
1310
1311         * html/shadow/MediaControls.cpp:
1312         * html/shadow/MediaControls.h:
1313         Renamed MediaControlVolumeSliderElement to MediaControlPanelVolumeSliderElement
1314         to be consistent in inheritance tree. Updated copyright date.
1315
1316         * html/shadow/MediaControlsApple.cpp:
1317         * html/shadow/MediaControlsApple.h:
1318         Renamed MediaControlVolumeSliderElement to MediaControlPanelVolumeSliderElement
1319         to be consistent in inheritance tree. Updated copyright dates.n
1320
1321         * html/shadow/MediaControlsChromium.cpp:
1322         * html/shadow/MediaControlsChromium.h:
1323         Renamed MediaControlVolumeSliderElement to MediaControlPanelVolumeSliderElement
1324         to be consistent in inheritance tree.
1325         Moved enclosure element definitions to common MediaControlElements.cpp/h
1326         file through which different media elements are made available to different ports.
1327
1328         * html/shadow/MediaControlsChromiumAndroid.cpp:
1329         * html/shadow/MediaControlsChromiumAndroid.h:
1330         Moved enclosure for overlay button to MediaControlElements.cpp/h files
1331         through which different media elements are made available to different ports.
1332
1333         * rendering/RenderMediaControlElements.cpp: new file
1334         * rendering/RenderMediaControlElements.h: new file
1335         Moved rendering classes for media control elements into these files from
1336         MediaControlElements.cpp/h.
1337
1338         * rendering/RenderThemeMac.mm:
1339         Added new RenderMediaControlElements.h file.
1340
1341         * rendering/RenderingAllInOne.cpp:
1342         Added new RenderMediaControlEleemnt.cpp file.
1343
1344 2012-12-04  Kenneth Russell  <kbr@google.com>
1345
1346         Associate URLs with GraphicsContext3D instances created for WebGL
1347         https://bugs.webkit.org/show_bug.cgi?id=103793
1348
1349         Reviewed by Adam Barth.
1350
1351         Pass down the URL of the topmost frame's document creating the
1352         WebGL context to the platform layer through
1353         GraphicsContext3D::Attributes.
1354
1355         Not feasible to write a layout test for this change; has no
1356         user-visible effect. Tested manually with failure injection in
1357         Chromium port.
1358
1359         * html/canvas/WebGLRenderingContext.cpp:
1360         (WebCore):
1361         (WebCore::WebGLRenderingContext::create):
1362             Pass top document's URL in context creation attributes.
1363         * platform/chromium/support/GraphicsContext3DChromium.cpp:
1364         (WebCore::GraphicsContext3D::create):
1365             Pass URL through WebKit API.
1366         * platform/graphics/GraphicsContext3D.h:
1367         (Attributes):
1368             Add top document's URL to context creation attributes.
1369
1370 2012-12-04  Yury Semikhatsky  <yurys@chromium.org>
1371
1372         Web Inspector: simplify reportMemoryUsage signature
1373         https://bugs.webkit.org/show_bug.cgi?id=104028
1374
1375         Reviewed by Vsevolod Vlasov.
1376
1377         Removed const& modifier from instrumented pointer type. Was const T* const&,
1378         now it is const T*
1379
1380         * platform/graphics/NativeImagePtr.h:
1381         (WebCore):
1382         * platform/graphics/skia/NativeImageSkia.cpp:
1383         (WebCore::reportMemoryUsage):
1384
1385 2012-12-04  Adam Barth  <abarth@webkit.org>
1386
1387         [V8] Rename V8DOMWrapper member functions to be more descriptive
1388         https://bugs.webkit.org/show_bug.cgi?id=104069
1389
1390         Reviewed by Eric Seidel.
1391
1392         In addition to the renames, this patch also inline lookupDOMWrapper
1393         into its callers.
1394
1395         * bindings/scripts/CodeGeneratorV8.pm:
1396         (GenerateDomainSafeFunctionGetter):
1397         (GenerateDomainSafeFunctionSetter):
1398         (GenerateNormalAttrGetter):
1399         (GenerateSingleConstructorCallback):
1400         (GenerateEventConstructorCallback):
1401         (GenerateNamedConstructorCallback):
1402         (GenerateToV8Converters):
1403         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1404         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
1405         * bindings/v8/Dictionary.cpp:
1406         (WebCore::Dictionary::get):
1407         * bindings/v8/PageScriptDebugServer.cpp:
1408         (WebCore::retrieveFrameWithGlobalObjectCheck):
1409         * bindings/v8/V8Binding.cpp:
1410         (WebCore::toDOMWindow):
1411         (WebCore::toScriptExecutionContext):
1412         * bindings/v8/V8DOMWindowShell.cpp:
1413         (WebCore::V8DOMWindowShell::clearForNavigation):
1414         (WebCore::V8DOMWindowShell::installDOMWindow):
1415         * bindings/v8/V8DOMWrapper.cpp:
1416         (WebCore::V8DOMWrapper::create):
1417         * bindings/v8/V8DOMWrapper.h:
1418         (V8DOMWrapper):
1419         (WebCore::V8DOMWrapper::setNativeInfo):
1420         (WebCore::V8DOMWrapper::clearNativeInfo):
1421         (WebCore::V8DOMWrapper::associateObjectWithWrapper):
1422         * bindings/v8/V8Initializer.cpp:
1423         (WebCore::findFrame):
1424         * bindings/v8/V8NPObject.cpp:
1425         (WebCore::createV8ObjectForNPObject):
1426         (WebCore::forgetV8ObjectForNPObject):
1427         * bindings/v8/WorkerScriptController.cpp:
1428         (WebCore::WorkerScriptController::initializeContextIfNeeded):
1429         (WebCore::WorkerScriptController::controllerForContext):
1430         * bindings/v8/custom/V8ArrayBufferCustom.cpp:
1431         (WebCore::V8ArrayBuffer::constructorCallbackCustom):
1432         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
1433         (WebCore::wrapArrayBufferView):
1434         (WebCore::constructWebGLArray):
1435         * bindings/v8/custom/V8AudioContextCustom.cpp:
1436         (WebCore::V8AudioContext::constructorCallbackCustom):
1437         * bindings/v8/custom/V8DOMFormDataCustom.cpp:
1438         (WebCore::V8DOMFormData::constructorCallbackCustom):
1439         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1440         (WebCore::V8DOMWindow::eventAccessorGetter):
1441         (WebCore::V8DOMWindow::eventAccessorSetter):
1442         (WebCore::V8DOMWindow::toStringCallback):
1443         (WebCore::V8DOMWindow::namedSecurityCheck):
1444         (WebCore::V8DOMWindow::indexedSecurityCheck):
1445         (WebCore::toV8):
1446         * bindings/v8/custom/V8DataViewCustom.cpp:
1447         (WebCore::V8DataView::constructorCallbackCustom):
1448         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
1449         (WebCore::V8HTMLDocument::wrapInShadowObject):
1450         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
1451         (WebCore::v8HTMLImageElementConstructorCallback):
1452         * bindings/v8/custom/V8InjectedScriptManager.cpp:
1453         (WebCore::createInjectedScriptHostV8Wrapper):
1454         (WebCore::InjectedScriptManager::canAccessInspectedWindow):
1455         * bindings/v8/custom/V8IntentCustom.cpp:
1456         (WebCore::V8Intent::constructorCallbackCustom):
1457         * bindings/v8/custom/V8LocationCustom.cpp:
1458         (WebCore::V8Location::reloadAccessorGetter):
1459         (WebCore::V8Location::replaceAccessorGetter):
1460         (WebCore::V8Location::assignAccessorGetter):
1461         * bindings/v8/custom/V8MessageChannelCustom.cpp:
1462         (WebCore::V8MessageChannel::constructorCallbackCustom):
1463         * bindings/v8/custom/V8MessageEventCustom.cpp:
1464         (WebCore::V8MessageEvent::initMessageEventCallback):
1465         * bindings/v8/custom/V8MutationObserverCustom.cpp:
1466         (WebCore::V8MutationObserver::constructorCallbackCustom):
1467         * bindings/v8/custom/V8ScriptProfileCustom.cpp:
1468         (WebCore::toV8):
1469         * bindings/v8/custom/V8ScriptProfileNodeCustom.cpp:
1470         (WebCore::toV8):
1471         * bindings/v8/custom/V8WebKitPointCustom.cpp:
1472         (WebCore::V8WebKitPoint::constructorCallbackCustom):
1473         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
1474         (WebCore::V8XMLHttpRequest::constructorCallbackCustom):
1475
1476 2012-12-04  Adam Barth  <abarth@webkit.org>
1477
1478         [V8] Cleanup style in V8DOMWrapper
1479         https://bugs.webkit.org/show_bug.cgi?id=104062
1480
1481         Reviewed by Kentaro Hara.
1482
1483         This patch moves a number of functions from inside the class
1484         declaration to below the class declaration. I've also inlined
1485         domWrapperType into each of its callers and renamed a few functions.
1486         A subsequent patch will improve the names of the remaining functions.
1487
1488         * bindings/scripts/CodeGeneratorV8.pm:
1489         (GenerateToV8Converters):
1490         * bindings/v8/ScriptProfiler.cpp:
1491         (WebCore::ScriptProfiler::visitExternalArrays):
1492         * bindings/v8/V8Collection.h:
1493         (WebCore::getNamedPropertyOfCollection):
1494         (WebCore::getIndexedPropertyOfCollection):
1495         * bindings/v8/V8DOMWrapper.cpp:
1496         (WebCore::V8DOMWrapper::instantiateDOMWrapper):
1497         (WebCore::V8DOMWrapper::isWrapperOfType):
1498         * bindings/v8/V8DOMWrapper.h:
1499         (V8DOMWrapper):
1500         (WebCore::V8DOMWrapper::setWrapperClass):
1501         (WebCore::V8DOMWrapper::setDOMWrapper):
1502         (WebCore):
1503         (WebCore::V8DOMWrapper::clearDOMWrapper):
1504         (WebCore::V8DOMWrapper::lookupDOMWrapper):
1505         (WebCore::V8DOMWrapper::createDOMWrapper):
1506         * bindings/v8/V8GCController.cpp:
1507         * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
1508         (WebCore::V8InspectorFrontendHost::showContextMenuCallback):
1509
1510 2012-12-04  Sheriff Bot  <webkit.review.bot@gmail.com>
1511
1512         Unreviewed, rolling out r136597.
1513         http://trac.webkit.org/changeset/136597
1514         https://bugs.webkit.org/show_bug.cgi?id=104065
1515
1516         broke Windows compilation (Requested by yurys on #webkit).
1517
1518         * platform/graphics/NativeImagePtr.h:
1519         (WebCore):
1520         * platform/graphics/skia/NativeImageSkia.cpp:
1521         (WebCore::reportMemoryUsage):
1522
1523 2012-12-04  Yury Semikhatsky  <yurys@chromium.org>
1524
1525         Web Inspector: simplify reportMemoryUsage signature
1526         https://bugs.webkit.org/show_bug.cgi?id=104028
1527
1528         Reviewed by Vsevolod Vlasov.
1529
1530         Removed const& modifier from instrumented pointer type. Was const T* const&,
1531         now it is const T*
1532
1533         * platform/graphics/NativeImagePtr.h:
1534         (WebCore):
1535         * platform/graphics/skia/NativeImageSkia.cpp:
1536         (WebCore::reportMemoryUsage):
1537
1538 2012-12-04  Adam Barth  <abarth@webkit.org>
1539
1540         [V8] V8DOMWrapper shouldn't know about NodeFilter
1541         https://bugs.webkit.org/show_bug.cgi?id=104057
1542
1543         Reviewed by Kentaro Hara.
1544
1545         This patch just moves this code into V8Bindings.h, which is where we
1546         have our other type conversion functions. It's too bad that we still
1547         need to special case NodeFilter, but fixing that is going to be a bit
1548         more work.
1549
1550         * bindings/scripts/CodeGeneratorV8.pm:
1551         (JSValueToNative):
1552         * bindings/v8/V8Binding.cpp:
1553         (WebCore::toNodeFilter):
1554         (WebCore):
1555         * bindings/v8/V8Binding.h:
1556         (WebCore):
1557         * bindings/v8/V8DOMWrapper.cpp:
1558         * bindings/v8/V8DOMWrapper.h:
1559         (WebCore):
1560         (V8DOMWrapper):
1561
1562 2012-12-04  Simon Fraser  <simon.fraser@apple.com>
1563
1564         Show a mini visualizer for the tile cache tiles
1565         https://bugs.webkit.org/show_bug.cgi?id=104053
1566
1567         Reviewed by Beth Dakin.
1568
1569         Replace the current red/green/yellow scrolling indicator with a
1570         mini map of the tile cache that shows the current tiles, and the
1571         visible rect.
1572         
1573         Visibility is controlled via a new preference.
1574
1575         * WebCore.exp.in: Add Settings::setShowTiledScrollingIndicator(bool),
1576         and remove ScrollingTree::setDebugRootLayer(CALayer*)
1577         * WebCore.xcodeproj/project.pbxproj: Remove ScrollingTreeMac.mm which
1578         is no longer needed; it just contained debug layer stuff.
1579         * page/Settings.cpp:
1580         (WebCore::Settings::Settings): Support the new setting.
1581         (WebCore::Settings::setShowTiledScrollingIndicator):
1582         * page/Settings.h:
1583         (WebCore::Settings::showTiledScrollingIndicator):
1584         * page/scrolling/ScrollingTree.cpp:
1585         (WebCore::ScrollingTree::commitNewTreeState): We no longer update the debug
1586         indicator on tree commit.
1587         * page/scrolling/ScrollingTree.h:
1588         (WebCore::ScrollingTree::hasWheelEventHandlers): Needed for the tiled
1589         scrolling indicator.
1590         (ScrollingTree):
1591         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1592         (WebCore::ScrollingCoordinatorMac::commitTreeState): Tell the TiledBacking
1593         about the current scrolling mode.
1594         * page/scrolling/mac/ScrollingTreeMac.mm: Removed.
1595         * platform/graphics/TiledBacking.h: Add functions to set the indicator scrolling
1596         mode, and to get the tiled scrolling indicator layer. This has to be parented by
1597         the DrawingArea, to ensure that it's in front of all other layers.
1598         * platform/graphics/ca/mac/TileCache.h:
1599         (WebCore::TileCache::scale): Exposed for the indicator drawing code to use.
1600         * platform/graphics/ca/mac/TileCache.mm:
1601         (-[WebTileCacheMapLayer init]): The indicator has a sublayer which renders the
1602         visible rect frame, owned by it.
1603         (-[WebTileCacheMapLayer drawInContext:]):
1604         (WebCore::TileCache::TileCache): The indicator mode has to be stored here,
1605         since it can be pushed down before we have an indicator layer.
1606         (WebCore::TileCache::~TileCache): Clear the TileCache on the indicator layer, which
1607         may outlive us.
1608         (WebCore::TileCache::revalidateTiles): Call updateTileCoverageMap().
1609         (WebCore::TileCache::updateTileCoverageMap): Resize the indicator layer to fit
1610         within the window, and update the indicator color.
1611         (WebCore::TileCache::tiledScrollingIndicatorLayer): Create and initialize the layer.
1612         (WebCore::TileCache::setScrollingModeIndication):
1613         (WebCore::TileCache::drawTileMapContents): Draw small white rects for the tiles over
1614         an translucent gray background.
1615
1616 2012-12-04  David Grogan  <dgrogan@chromium.org>
1617
1618         IndexedDB: Propagate more leveldb errors to IDBIndex and IDBObjectStore
1619         https://bugs.webkit.org/show_bug.cgi?id=103782
1620
1621         Reviewed by Tony Chang.
1622
1623         index.get[Key]() and objectStore.get() will receive more error events.
1624
1625         * Modules/indexeddb/IDBBackingStore.cpp:
1626         (WebCore::IDBBackingStore::getRecord):
1627         (WebCore::versionExists):
1628         (WebCore::IDBBackingStore::findKeyInIndex):
1629         (WebCore::IDBBackingStore::getPrimaryKeyViaIndex):
1630         (WebCore::IDBBackingStore::keyExistsInIndex):
1631         * Modules/indexeddb/IDBBackingStore.h:
1632         (IDBBackingStore):
1633         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
1634         (WebCore::IDBIndexBackendImpl::getInternal):
1635         (WebCore::IDBIndexBackendImpl::getKeyInternal):
1636         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
1637         (WebCore::IDBObjectStoreBackendImpl::getInternal):
1638         (WebCore):
1639
1640 2012-12-04  Kentaro Hara  <haraken@chromium.org>
1641
1642         [V8] Remove IntegerCache::m_initialized
1643         https://bugs.webkit.org/show_bug.cgi?id=103978
1644
1645         Reviewed by Adam Barth.
1646
1647         Thanks to r136479, we can now initialize V8 integers in IntegerCache's
1648         constructor. We can remove IntegerCache::m_initialized, which slightly
1649         improves performance.
1650
1651         [Bindings/scroll-top.html in Chromium/Linux]
1652         Before this patch: 285 runs/sec, 281 runs/sec, 281 runs/sec, 280 runs/sec
1653         After this patch : 290 runs/sec, 291 runs/sec, 297 runs/sec, 291 runs/sec
1654
1655         No tests. No change in behavior.
1656
1657         * bindings/v8/V8ValueCache.cpp:
1658         (WebCore::IntegerCache::IntegerCache):
1659         (WebCore::IntegerCache::~IntegerCache):
1660         * bindings/v8/V8ValueCache.h:
1661         (IntegerCache):
1662         (WebCore::IntegerCache::v8Integer):
1663         (WebCore::IntegerCache::v8UnsignedInteger):
1664         (WebCore):
1665
1666 2012-12-04  Kentaro Hara  <haraken@chromium.org>
1667
1668         [V8] Replace String::New("symbol") with String::NewSymbol("symbol")
1669         https://bugs.webkit.org/show_bug.cgi?id=103989
1670
1671         Reviewed by Adam Barth.
1672
1673         In V8, a symbol lookup is faster than a string lookup. We should use
1674         String::NewSymbol("symbol") for symbols.
1675
1676         No tests. No change in behavior.
1677
1678         * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
1679         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
1680         (WebCore::V8HTMLCanvasElement::getContextCallback):
1681         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
1682         (WebCore::V8InjectedScriptHost::typeCallback):
1683         (WebCore::V8InjectedScriptHost::functionDetailsCallback):
1684         (WebCore::getJSListenerFunctions):
1685         * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
1686         (WebCore::populateContextMenuItems):
1687
1688 2012-12-04  Julien Chaffraix  <jchaffraix@webkit.org>
1689
1690         [CSS Grid Layout] Implement CSS parsing and handling for <track-minmax>
1691         https://bugs.webkit.org/show_bug.cgi?id=103799
1692
1693         Reviewed by Tony Chang.
1694
1695         This change adds support for:
1696         <track-minmax> => minmax( <track-breadth> , <track-breadth> ) | auto | <track-breadth>
1697         (note that we already supported auto | <track-breadth>).
1698
1699         The change is mostly mechanical, the only newness is that GridTrackSize was updated to
1700         hold 2 Lengths internally and we map the single Length case to 2 by duplicating the value
1701         as this matches the rendering algorithm in the spec.
1702
1703         Tests: fast/css-grid-layout/grid-columns-rows-get-set-multiple.html
1704                fast/css-grid-layout/resources/grid-columns-rows-get-set-multiple.js
1705
1706         * css/CSSComputedStyleDeclaration.cpp:
1707         (WebCore::valueForGridTrackBreadth):
1708         Changed the function to do the conversion of one track breadth (one Length).
1709         This was forgotten in the preparatory change in bug 103703.
1710
1711         (WebCore::valueForGridTrackMinMax):
1712         Convert the value back using valueForGridTrackBreadth.
1713
1714         * css/CSSFunctionValue.cpp:
1715         (WebCore::CSSFunctionValue::CSSFunctionValue):
1716         * css/CSSFunctionValue.h:
1717         (WebCore::CSSFunctionValue::create):
1718         (CSSFunctionValue):
1719         Added a new constructor. This enables us to return minmax(..., ...) when queried
1720         from JavaScript. I couldn't find a better way to serialize inside CSSComputedStyleDeclaration
1721         so that it properly match the function output.
1722
1723         * css/CSSParser.cpp:
1724         (WebCore::CSSParser::parseGridTrackMinMax):
1725         Added parsing for the new syntax. We convert the 2 values into a Pair if we manage to
1726         parse both values correctly.
1727
1728         * css/StyleResolver.cpp:
1729         (WebCore::createGridTrackMinMax):
1730         Updated to handle a Pair - for minmax - and set the 2 values on GridTrackSize.
1731
1732         * rendering/RenderGrid.cpp:
1733         (WebCore::RenderGrid::computedUsedBreadthOfGridTracks):
1734         Updated to check the style. For now, we don't handle minmax values.
1735
1736         * rendering/style/GridTrackSize.h:
1737         (WebCore::GridTrackSize::GridTrackSize):
1738         (WebCore::GridTrackSize::length):
1739         (WebCore::GridTrackSize::setLength):
1740         (WebCore::GridTrackSize::minTrackBreadth):
1741         (WebCore::GridTrackSize::maxTrackBreadth):
1742         (WebCore::GridTrackSize::setMinMax):
1743         (WebCore::GridTrackSize::operator==):
1744         Updated the class to handle minmax values. This means that we now always store
1745         2 values (the <length> case being a subset of minmax, however we kept the distinction
1746         to be able to reconstruct a <length> for getComputedStyle).
1747
1748 2012-12-04  Elliott Sprehn  <esprehn@chromium.org>
1749
1750         parser* methods in ContainerNode should not support DocumentFragment
1751         https://bugs.webkit.org/show_bug.cgi?id=103965
1752
1753         Reviewed by Darin Adler.
1754
1755         Only parserInsertBefore ever supported DocumentFragment and this feature
1756         is never used. It appears this code ended up in parserInsertBefore when
1757         it was created as a copy of insertBefore that didn't fire events. This
1758         patch removes that code and adds assertions that we never pass
1759         DocumentFragments since doing so would cause a corrupted tree as we never
1760         check checkAcceptChild or do other validation in the parser methods.
1761
1762         No new tests, just refactoring.
1763
1764         * dom/ContainerNode.cpp:
1765         (WebCore::ContainerNode::parserInsertBefore):
1766         (WebCore::ContainerNode::parserRemoveChild):
1767         (WebCore::ContainerNode::parserAppendChild):
1768
1769 2012-12-04  Elliott Sprehn  <esprehn@gmail.com>
1770
1771         Simplify ShadowRoot::cloneNode(bool,ExceptionCode)
1772         https://bugs.webkit.org/show_bug.cgi?id=103928
1773
1774         Reviewed by Dimitri Glazkov.
1775
1776         ShadowRoot can never be cloned and ShadowRoot::cloneNode(bool) always
1777         returns null so there's no reason to have code in the cloneNode method
1778         for script that acts as if it may not return null.
1779
1780         * dom/ShadowRoot.cpp:
1781         (WebCore::ShadowRoot::cloneNode):
1782
1783 2012-12-04  Elliott Sprehn  <esprehn@chromium.org>
1784
1785         setIsInTopLayer is not really a setter
1786         https://bugs.webkit.org/show_bug.cgi?id=103912
1787
1788         Reviewed by Eric Seidel.
1789
1790         Element::setInTopLayer isn't just a setter, it also adds the element
1791         to the top layer vector in the document which changes it's display and
1792         causes a reattach.
1793
1794         To make this more obvious make HTMLDialogElement use the methods on
1795         Document and make those update the state boolean.
1796
1797         There also doesn't seem to be any reason for setInTopLayer
1798         or isInTopLayer to be virtual, it appears it was a typo.
1799
1800         No new tests, just refactoring.
1801
1802         * dom/Document.cpp:
1803         (WebCore::Document::addToTopLayer):
1804         (WebCore::Document::removeFromTopLayer):
1805         * dom/Element.cpp:
1806         (WebCore::Element::setIsInTopLayer):
1807         * dom/Element.h:
1808         * html/HTMLDialogElement.cpp:
1809         (WebCore::HTMLDialogElement::close):
1810         (WebCore::HTMLDialogElement::showModal):
1811
1812 2012-12-04  Elliott Sprehn  <esprehn@chromium.org>
1813
1814         Automatically handle suspend and resume of post attach callbacks
1815         https://bugs.webkit.org/show_bug.cgi?id=103910
1816
1817         Reviewed by Eric Seidel.
1818
1819         Use RAII to handle suspend and resume of post attach callbacks since
1820         they should always be called in pairs.
1821
1822         No new tests, just refactoring.
1823
1824         * dom/ContainerNode.h:
1825         (PostAttachCallbackDisabler):
1826         (WebCore::PostAttachCallbackDisabler::PostAttachCallbackDisabler):
1827         (WebCore::PostAttachCallbackDisabler::~PostAttachCallbackDisabler):
1828         (ContainerNode):
1829         * dom/Document.cpp:
1830         (WebCore::Document::recalcStyle):
1831         * dom/Element.cpp:
1832         (WebCore::Element::attach):
1833         * html/HTMLFormControlElement.cpp:
1834         (WebCore::HTMLFormControlElement::attach):
1835         * html/HTMLInputElement.cpp:
1836         (WebCore::HTMLInputElement::attach):
1837         * html/HTMLPlugInImageElement.cpp:
1838         (WebCore::HTMLPlugInImageElement::attach):
1839         (WebCore):
1840
1841 2012-12-04  Elliott Sprehn  <esprehn@chromium.org>
1842
1843         createRareData should return a PassOwnPtr
1844         https://bugs.webkit.org/show_bug.cgi?id=103851
1845
1846         Reviewed by Eric Seidel.
1847
1848         createRareData should return a PassOwnPtr, not an OwnPtr since it's
1849         transfering ownership.
1850
1851         * dom/Element.cpp:
1852         (WebCore::Element::createRareData):
1853         * dom/Element.h:
1854         (Element):
1855         * dom/Node.cpp:
1856         (WebCore::Node::createRareData):
1857         * dom/Node.h:
1858
1859 2012-12-04  Filip Pizlo  <fpizlo@apple.com>
1860
1861         Rename Profiler to LegacyProfiler
1862         https://bugs.webkit.org/show_bug.cgi?id=104031
1863
1864         Rubber stamped by Mark Hahnenberg
1865
1866         Just renaming, no new tests.
1867
1868         * ForwardingHeaders/profiler/LegacyProfiler.h: Copied from Source/WebCore/ForwardingHeaders/profiler/Profiler.h.
1869         * ForwardingHeaders/profiler/Profiler.h: Removed.
1870         * bindings/js/ScriptProfiler.cpp:
1871         (WebCore::ScriptProfiler::start):
1872         (WebCore::ScriptProfiler::stop):
1873
1874 2012-12-04  James Simonsen  <simonjam@chromium.org>
1875
1876         [User Timing] Fix clang build by removing need for exit time destructor
1877         https://bugs.webkit.org/show_bug.cgi?id=104036
1878
1879         Reviewed by Tony Gentilcore.
1880
1881         Modeled after r99588.
1882
1883         No new tests. No change in functionality.
1884
1885         * page/PerformanceUserTiming.cpp:
1886         (WebCore::UserTiming::UserTiming):
1887         (WebCore::UserTiming::mark):
1888         (WebCore::UserTiming::findExistingMarkStartTime):
1889         * page/PerformanceUserTiming.h:
1890         (UserTiming):
1891
1892 2012-12-04  James Simonsen  <simonjam@chromium.org>
1893
1894         [User Timing] Fix negative durations
1895         https://bugs.webkit.org/show_bug.cgi?id=104038
1896
1897         Reviewed by Tony Gentilcore.
1898
1899         At some point, we went from passing in a duration to passing in the end time. User Timing
1900         wasn't updated.
1901
1902         Tests: http/tests/w3c/webperf/submission/Intel/user-timing
1903
1904         * page/PerformanceMark.h:
1905         (WebCore::PerformanceMark::PerformanceMark):
1906         * page/PerformanceUserTiming.cpp:
1907         (WebCore::UserTiming::measure):
1908
1909 2012-12-04  Abhishek Arya  <inferno@chromium.org>
1910
1911         Heap-use-after-free in WebCore::StyleCachedImageSet::cssValue
1912         https://bugs.webkit.org/show_bug.cgi?id=100621
1913
1914         Reviewed by Eric Seidel.
1915
1916         r115639 fixed a memory leak caused by reference cycle between StyleCachedImageSet
1917         and its owner CSSImageSetValue. The fix caused StyleCachedImageSet to maintain
1918         a weak pointer to CSSImageSetValue. This patch makes sure that the weak pointer
1919         is cleared when CSSImageSetValue is going away.
1920
1921         Test: fast/css/image-set-value-not-removed-crash.html
1922
1923         * css/CSSImageSetValue.cpp:
1924         (WebCore::CSSImageSetValue::~CSSImageSetValue):
1925         * rendering/style/StyleCachedImageSet.h:
1926         (WebCore::StyleCachedImageSet::clearImageSetValue):
1927         (StyleCachedImageSet):
1928
1929 2012-12-04  Adam Barth  <abarth@webkit.org>
1930
1931         NodeFilter leaks memory in V8
1932         https://bugs.webkit.org/show_bug.cgi?id=104027
1933
1934         Reviewed by Eric Seidel.
1935
1936         NodeFilter holds a RefPtr to NodeFilterCondition, which holds a
1937         ScopedPersistent to its callback function. If the callback function can
1938         see the NodeFilter wrapper, we have a cycle and a leak.
1939
1940         This patch makes the NodeFilterCondition hold a weak pointer to the
1941         callback function and ties the lifetime of that callback function to
1942         the NodeFilter wrapper (so they live and die together).
1943
1944         * bindings/v8/V8GCController.cpp:
1945         * bindings/v8/V8NodeFilterCondition.cpp:
1946         (WebCore::V8NodeFilterCondition::V8NodeFilterCondition):
1947         (WebCore::V8NodeFilterCondition::weakCallback):
1948         (WebCore):
1949         (WebCore::V8NodeFilterCondition::acceptNode):
1950         * bindings/v8/V8NodeFilterCondition.h:
1951         (WebCore::V8NodeFilterCondition::create):
1952         (V8NodeFilterCondition):
1953         (WebCore::V8NodeFilterCondition::callback):
1954         * dom/NodeFilter.h:
1955         (WebCore::NodeFilter::condition):
1956
1957 2012-12-04  Abhishek Arya  <inferno@chromium.org>
1958
1959         Crash in CachedResource::checkNotify due to -webkit-crossfade.
1960         https://bugs.webkit.org/show_bug.cgi?id=98068
1961
1962         Reviewed by Nate Chapin.
1963
1964         Make sure to not re-add the same client again for |m_cachedFromImage|
1965         and |m_cachedToImage|. This would otherwise cause the CSSCrossfadeValue
1966         client to not get removed from its cached image resource (when it is
1967         going away).
1968
1969         Test: fast/images/crossfade-client-not-removed-crash.html
1970
1971         * css/CSSCrossfadeValue.cpp:
1972         (WebCore::CSSCrossfadeValue::loadSubimages):
1973
1974 2012-12-04  Julien Chaffraix  <jchaffraix@webkit.org>
1975
1976         Heap-use-after-free in WebCore::RenderLayer::paintList [MathML]
1977         https://bugs.webkit.org/show_bug.cgi?id=100764
1978
1979         Reviewed by Eric Seidel.
1980
1981         Test: mathml/mfenced-root-layer.html
1982
1983         * rendering/RenderLayer.cpp:
1984         (WebCore::RenderLayer::stackingContext):
1985         Fixed this function to ensure that it always returns a stacking context, the bug
1986         was that the document element's layer wasn't guaranteed to be a stacking context.
1987
1988 2012-12-04  Adam Barth  <abarth@webkit.org>
1989
1990         [V8] GetNativeType in CodeGeneratorV8.pm needs a bath
1991         https://bugs.webkit.org/show_bug.cgi?id=104022
1992
1993         Reviewed by Eric Seidel.
1994
1995         This change shouldn't have any effect on the generated code.
1996
1997         * bindings/scripts/CodeGeneratorV8.pm:
1998         (GetNativeType):
1999             - DOMUserData was removed in 2005. There's no need for the code
2000               generator to still know about it.
2001         (JSValueToNative):
2002         (ConvertToV8StringResource):
2003
2004 2012-12-04  Adam Barth  <abarth@webkit.org>
2005
2006         [V8] EventTarget shouldn't be a special snowflake
2007         https://bugs.webkit.org/show_bug.cgi?id=104018
2008
2009         Reviewed by Eric Seidel.
2010
2011         Previously we special-cased the toV8 operation for event targets.
2012         There's no need for that. We can use IDL attribute to handle
2013         EventTarget using the same general-purpose code that we use for other
2014         interfaces.
2015
2016         * WebCore.gypi:
2017         * bindings/scripts/CodeGeneratorV8.pm:
2018         (NativeToJSValue):
2019         * bindings/v8/V8AbstractEventListener.cpp:
2020         (WebCore::V8AbstractEventListener::getReceiverObject):
2021         * bindings/v8/V8DOMWrapper.cpp:
2022         * bindings/v8/V8DOMWrapper.h:
2023         (V8DOMWrapper):
2024         * bindings/v8/V8WorkerContextEventListener.cpp:
2025         (WebCore::V8WorkerContextEventListener::getReceiverObject):
2026         * bindings/v8/custom/V8EventTargetCustom.cpp: Added.
2027         (WebCore):
2028         (WebCore::toV8):
2029         * dom/EventTarget.idl:
2030
2031 2012-12-04  Florin Malita  <fmalita@chromium.org>
2032
2033         Stale SVGUseElement reference in CachedResource::checkNotify()
2034         https://bugs.webkit.org/show_bug.cgi?id=104004
2035
2036         Reviewed by Eric Seidel.
2037
2038         SVGUseElement tracks one CachedSVGDocument at a time (for external references), but when
2039         the href attribute is updated it fails to unregister with the current CachedSVGDocument
2040         and only updates its CachedSVGDocument with the new instance. This leaves an untracked
2041         reference with the original CachedSVGDocument.
2042
2043         The patch adds the missing removeClient() call on href change, and encapsulates the
2044         CachedSVGDocument manipulation in a helper method which handles the necessary cleanup.
2045
2046         Test: svg/custom/use-href-update-crash.svg
2047
2048         * svg/SVGUseElement.cpp:
2049         (WebCore::SVGUseElement::~SVGUseElement):
2050         (WebCore::SVGUseElement::svgAttributeChanged):
2051         (WebCore::SVGUseElement::setCachedDocument):
2052         (WebCore):
2053         * svg/SVGUseElement.h:
2054         (SVGUseElement):
2055
2056 2012-12-04  Yury Semikhatsky  <yurys@chromium.org>
2057
2058         Web Inspector: Can't take a heap snapshot in chromium ("Uncaught ReferenceError")
2059         https://bugs.webkit.org/show_bug.cgi?id=103997
2060
2061         Reviewed by Pavel Feldman.
2062
2063         utilities.js used in both page and worker contexts should not access window
2064         object as there is no one in case of workers. NonLeakingMutationObserver implementation
2065         has moved to DOMExtension.js
2066
2067         * inspector/front-end/DOMExtension.js:
2068         (NonLeakingMutationObserver.NonLeakingMutationObserver._unloadListener):
2069         (NonLeakingMutationObserver):
2070         (NonLeakingMutationObserver.prototype.observe):
2071         (NonLeakingMutationObserver.prototype.disconnect):
2072         * inspector/front-end/utilities.js:
2073
2074 2012-12-04  Sheriff Bot  <webkit.review.bot@gmail.com>
2075
2076         Unreviewed, rolling out r136509.
2077         http://trac.webkit.org/changeset/136509
2078         https://bugs.webkit.org/show_bug.cgi?id=104015
2079
2080         broke layout tests (Requested by eae on #webkit).
2081
2082         * platform/graphics/IntSize.h:
2083         (WebCore::IntSize::scale):
2084
2085 2012-12-04  Antoine Quint  <graouts@apple.com>
2086
2087         INVALID_STATE_ERR error upon calling .addCue() for an already-in-use cue
2088         https://bugs.webkit.org/show_bug.cgi?id=103264
2089
2090         Reviewed by Eric Carlson.
2091
2092         Adhere to the latest spec for TextTrack's .addCue() method. This also fixes
2093         https://bugs.webkit.org/show_bug.cgi?id=103265 and we've removed
2094         media/track/opera/interfaces/TextTrack/addCue.html from the Skipped list.
2095
2096         * html/track/TextTrack.cpp:
2097         (WebCore::TextTrack::addCue):
2098         * html/track/TextTrack.h:
2099         (TextTrack):
2100         * html/track/TextTrack.idl:
2101
2102 2012-12-04  Mike West  <mkwst@chromium.org>
2103
2104         Log to console when forms and popups are blocked by 'sandbox'.
2105         https://bugs.webkit.org/show_bug.cgi?id=103615
2106
2107         Reviewed by Adam Barth.
2108
2109         Adds two console messages to cover form submissions blocked by a
2110         sandboxed frame lacking the 'allow-forms' permission, and window
2111         creation blocked by a sandboxed frame lacking the 'allow-popups'
2112         permission.
2113
2114         * loader/FrameLoader.cpp:
2115         (WebCore::FrameLoader::submitForm):
2116             Log a warning when form submission is blocked by sandboxing flags.
2117         (WebCore::createWindow):
2118             Log a warning when window.open is blocked due to sandboxing flags.
2119
2120 2012-12-04  Kentaro Hara  <haraken@chromium.org>
2121
2122         [V8] Make v8::Null(isolate) faster by caching the value in V8 bindings
2123         https://bugs.webkit.org/show_bug.cgi?id=103862
2124
2125         Reviewed by Adam Barth.
2126
2127         Performance comparison between V8 and JSC revealed that DOM attributes
2128         that return v8::Null(isolate) are much slower than JSC.
2129         (https://docs.google.com/a/chromium.org/spreadsheet/ccc?key=0AlobCOyvTnPKdDg5S0dMdGRGRTRSaW53V1ppVzh6eXc#gid=2)
2130
2131         We can optimize v8::Null(isolate) by caching the value to V8PerIsolateData.
2132         (Although I don't like the optimization, it looks difficult to optimize
2133         v8::Null(isolate) more.)
2134
2135         [Bindings/undefined-first-child.html]
2136         Before: 969 runs/sec, 970 runs/sec, 962 runs/sec
2137         After:  1086 runs/sec, 1085 runs/sec, 1086 runs/sec
2138
2139         No tests. No change in behavior.
2140
2141         * bindings/scripts/CodeGeneratorV8.pm:
2142         (GenerateHeader):
2143         (GenerateNormalAttrGetter):
2144         (GenerateFunctionCallback):
2145         (NativeToJSValue):
2146         * bindings/scripts/test/V8/V8TestNode.h:
2147         (WebCore::toV8Fast):
2148         * bindings/scripts/test/V8/V8TestObj.cpp:
2149         (WebCore::TestObjV8Internal::contentDocumentAttrGetter):
2150         (WebCore::TestObjV8Internal::getSVGDocumentCallback):
2151         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2152         (WebCore::TestSerializedScriptValueInterfaceV8Internal::valueAttrGetter):
2153         (WebCore::TestSerializedScriptValueInterfaceV8Internal::readonlyValueAttrGetter):
2154         (WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedValueAttrGetter):
2155         (WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedReadonlyValueAttrGetter):
2156         * bindings/v8/V8Binding.h:
2157         (WebCore):
2158         (WebCore::v8Null):
2159         (WebCore::v8NullWithCheck):
2160         * bindings/v8/V8PerIsolateData.cpp:
2161         (WebCore::V8PerIsolateData::V8PerIsolateData):
2162         * bindings/v8/V8PerIsolateData.h:
2163         (WebCore::V8PerIsolateData::v8Null):
2164         (V8PerIsolateData):
2165
2166 2012-12-04  Alexis Menard  <alexis@webkit.org>
2167
2168         Add an helper function in CSSParser to check for '/' character.
2169         https://bugs.webkit.org/show_bug.cgi?id=104009
2170
2171         Reviewed by Ryosuke Niwa.
2172
2173         Remove unwanted null check from r136525
2174
2175         No new tests : just a refactor, existing tests should cover.
2176
2177         * css/CSSParser.cpp:
2178         (WebCore::isForwardSlashOperator):
2179
2180 2012-12-04  Alexis Menard  <alexis@webkit.org>
2181
2182         Add an helper function in CSSParser to check for '/' character.
2183         https://bugs.webkit.org/show_bug.cgi?id=104009
2184
2185         Reviewed by Ryosuke Niwa.
2186
2187         I'm about to add the same pattern in a following patch. Let's do an
2188         helper function first. We also did that for the comma. The slash
2189         character is pretty used in shorthands definitions.
2190
2191         No new tests : just a refactor, existing tests should cover.
2192
2193         * css/CSSParser.cpp:
2194         (WebCore::isForwardSlashOperator):
2195         (WebCore):
2196         (WebCore::CSSParser::parseFillShorthand):
2197         (WebCore::CSSParser::parseFont):
2198         (WebCore::CSSParser::parseBorderImage):
2199         (WebCore::CSSParser::parseAspectRatio):
2200
2201 2012-12-04  Ken Kania  <kkania@chromium.org>
2202
2203         Inspector: Introduce Input.dispatchKeyEvent and DOM.focus for typing simulation.
2204         https://bugs.webkit.org/show_bug.cgi?id=103530
2205
2206         Reviewed by Yury Semikhatsky.
2207
2208         Input.dispatchKeyEvent simply calls EventHandler::keyEvent with the key event data
2209         from the command parameters. The client will be responsible for providing proper
2210         events to simulate desired typing behavior.
2211         DOM.focus calls focus on a dom element.
2212
2213         Tests: inspector-protocol/dom-focus.html
2214                inspector-protocol/input-dispatchKeyEvent.html
2215
2216         * CMakeLists.txt:
2217         * GNUmakefile.list.am:
2218         * Target.pri:
2219         * WebCore.gypi:
2220         * WebCore.vcproj/WebCore.vcproj:
2221         * WebCore.xcodeproj/project.pbxproj:
2222         * inspector/Inspector.json:
2223         * inspector/InspectorAllInOne.cpp:
2224         * inspector/InspectorController.cpp:
2225         (WebCore::InspectorController::InspectorController):
2226         * inspector/InspectorDOMAgent.cpp:
2227         (WebCore::InspectorDOMAgent::focus):
2228         (WebCore):
2229         (WebCore::InspectorDOMAgent::resolveNode):
2230         * inspector/InspectorDOMAgent.h:
2231         (InspectorDOMAgent):
2232         * inspector/InspectorInputAgent.cpp: Added.
2233         (WebCore):
2234         (WebCore::InspectorInputAgent::InspectorInputAgent):
2235         (WebCore::InspectorInputAgent::~InspectorInputAgent):
2236         (WebCore::InspectorInputAgent::dispatchKeyEvent):
2237         * inspector/InspectorInputAgent.h: Added.
2238         (WebCore):
2239         (InspectorInputAgent):
2240         (WebCore::InspectorInputAgent::create):
2241
2242 2012-12-04  Dan Bernstein  <mitz@apple.com>
2243
2244         FontPlatformData has unnecessary m_textOrientation member
2245         https://bugs.webkit.org/show_bug.cgi?id=103971
2246
2247         Reviewed by Darin Adler.
2248
2249         Nothing in SimpleFontData depends on the FontPlatformData’s textOrientation, so we don’t
2250         need separate data for vertical-right and upright. We simply choose between
2251         verticalRightOrientationFontData() and uprightOrientationFontData() based on the
2252         textOrientation in the FontDescription.
2253
2254         * WebCore.exp.in: Updated FontPlatformData constructor exports.
2255
2256         * css/CSSFontFaceSource.cpp:
2257         (WebCore::CSSFontFaceSource::getFontData): Removed the text orientation bit from the hash key,
2258         and updated for the removal of the TextOrientation parameter to
2259         CachedFont::platformDataFromCustomData().
2260
2261         * loader/cache/CachedFont.cpp:
2262         (WebCore::CachedFont::platformDataFromCustomData): Removed the TextOrientation parameter.
2263         * loader/cache/CachedFont.h:
2264
2265         * platform/graphics/FontCache.cpp:
2266         (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey): Removed the TextOrientation
2267         parameter and initializer.
2268         (WebCore::FontPlatformDataCacheKey::operator==): Updated for removal of m_textOrientation
2269         member variable.
2270         (FontPlatformDataCacheKey): Removed m_textOrientation member variable.
2271         (WebCore::computeHash): Removed text orientation bit from the hash.
2272         (WebCore::FontCache::getCachedFontPlatformData): Updated for FontPlatformDataCacheKey
2273         change.
2274
2275         * platform/graphics/FontPlatformData.cpp:
2276         (WebCore::FontPlatformData::FontPlatformData): Removed TextOrientation parameters and
2277         initializers.
2278         (WebCore::FontPlatformData::operator=): Updated for removal of m_textOrientation
2279         member variable.
2280         * platform/graphics/FontPlatformData.h:
2281         (FontPlatformData): Removed m_textOrientation member variable, removed TextOrientation
2282         parameters from constructors.
2283         (WebCore::FontPlatformData::hash): Removed text orientation bit.
2284         (WebCore::FontPlatformData::operator==): Updated for removed member variable.
2285
2286         * platform/graphics/cairo/FontCustomPlatformData.h:
2287         (FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter.
2288
2289         * platform/graphics/chromium/FontCacheAndroid.cpp:
2290         (WebCore::FontCache::createFontPlatformData): Updated for FontPlatformData change.
2291
2292         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2293         (WebCore::FontPlatformData::FontPlatformData): Removed TextOrientation parameter and
2294         initializer.
2295
2296         * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
2297         (WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter.
2298         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
2299         (WebCore::FontPlatformData::FontPlatformData): Removed TextOrientation parameter and
2300         initializers.
2301         (WebCore::FontPlatformData::operator=): Updated for removed member variable.
2302         (WebCore::FontPlatformData::operator==): Ditto.
2303         (WebCore::FontPlatformData::hash): Removed text orientation bit.
2304
2305         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h:
2306         (FontPlatformData): Removed TextOrientation parameter from the constructor declaration.
2307
2308         * platform/graphics/mac/FontCacheMac.mm:
2309         (WebCore::FontCache::createFontPlatformData): Updated for FontPlatformData change.
2310
2311         * platform/graphics/mac/FontCustomPlatformData.cpp:
2312         (WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter.
2313
2314         * platform/graphics/mac/FontCustomPlatformData.h:
2315         (FontCustomPlatformData): Removed TextOrientation parameter from declaration of
2316         fontPlatformData().
2317
2318         * platform/graphics/mac/SimpleFontDataMac.mm:
2319         (WebCore::SimpleFontData::getCompositeFontReferenceFontData): Updated for FontPlatformData
2320         change.
2321
2322         * platform/graphics/pango/FontCustomPlatformDataPango.cpp:
2323         (WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter.
2324         * platform/graphics/qt/FontCustomPlatformData.h:
2325
2326         * platform/graphics/qt/FontCustomPlatformDataQt.cpp:
2327         (WebCore::FontCustomPlatformData::fontPlatformData): Ditto.
2328
2329         * platform/graphics/skia/FontCacheSkia.cpp:
2330         (WebCore::FontCache::createFontPlatformData): Updated for FontPlatformData change.
2331
2332         * platform/graphics/skia/FontCustomPlatformData.cpp:
2333         (WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter.
2334         * platform/graphics/skia/FontCustomPlatformData.h:
2335
2336         * platform/graphics/win/FontCustomPlatformData.cpp:
2337         (WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter.
2338         * platform/graphics/win/FontCustomPlatformData.h:
2339
2340         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
2341         (WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter.
2342         * platform/graphics/win/FontCustomPlatformDataCairo.h:
2343
2344         * platform/graphics/win/FontPlatformDataCGWin.cpp:
2345         (WebCore::FontPlatformData::FontPlatformData): Removed m_textOrientation initializer.
2346
2347         * platform/graphics/win/FontPlatformDataCairoWin.cpp:
2348         (WebCore::FontPlatformData::FontPlatformData): Ditto.
2349
2350         * platform/graphics/win/FontPlatformDataWin.cpp:
2351         (WebCore::FontPlatformData::FontPlatformData): Ditto.
2352
2353         * platform/graphics/wince/FontCustomPlatformData.cpp:
2354         (WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter.
2355         * platform/graphics/wince/FontCustomPlatformData.h:
2356
2357 2012-12-04  Charlie Reis  <creis@chromium.org>
2358
2359         Add FrameLoaderClient::didDisownOpener
2360         https://bugs.webkit.org/show_bug.cgi?id=103789
2361
2362         Reviewed by Darin Fisher.
2363
2364         Adds a didDisownOwner notification when a frame's opener is cleared,
2365         so that FrameLoaderClients can react.
2366
2367         No new tests.
2368
2369         * loader/FrameLoader.cpp:
2370         (WebCore::FrameLoader::setOpener): Calls didDisownOpener if opener is cleared.
2371         * loader/FrameLoaderClient.h:
2372         (FrameLoaderClient):
2373         (WebCore::FrameLoaderClient::didDisownOpener):
2374
2375 2012-12-04  Robert Hogan  <robert@webkit.org>
2376
2377         Redrawing issue with inserting new inline element between existing inline elements
2378         https://bugs.webkit.org/show_bug.cgi?id=50315
2379
2380         Reviewed by Levi Weintraub.
2381
2382         When inserting an element such as '<span>text<br></span>' between two lineboxes, the second of which has leading space
2383         collapsed away after a line-break, dirtyLinesFromChangeChild() needs to ensure that the linebox the fragment is inserted into (the second 
2384         of the two lineboxes) gets dirtied. 
2385         
2386         Since the element has been inserted before the first element in the linebox, but after the collapsed leading
2387         space, the search for the new element's linebox will go past the leading space to the previous linebox and select that
2388         one by mistake.
2389         
2390         So in order to ensure the element's linebox is dirtied make sure its previous sibling is not the line-break object of the
2391         linebox we selected when searching for a linebox to dirty. If the previous sibling is the linebox's line-break object then
2392         the element is in the one after the one we selected and we should dirty that linebox too. 
2393
2394         Test: fast/inline/layout-after-inserting-nested-br.html
2395
2396         * rendering/RenderLineBoxList.cpp:
2397         (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
2398
2399 2012-12-04  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2400
2401         IntSize::scale() should return rounded value
2402         https://bugs.webkit.org/show_bug.cgi?id=103984
2403
2404         Reviewed by Kenneth Rohde Christiansen.
2405
2406         IntSize::scale() is now rounding float value to the nearest integer instead of blind type casting.
2407
2408         Test: css3/device-adapt/viewport-width-not-affecting-next-page.html
2409
2410         * platform/graphics/IntSize.h:
2411         (WebCore::IntSize::scale):
2412
2413 2012-12-04  Adam Bergkvist  <adam.bergkvist@ericsson.com>
2414
2415         Add support for generic types in arrays and sequences to the code generators
2416         https://bugs.webkit.org/show_bug.cgi?id=103642
2417
2418         Reviewed by Kentaro Hara.
2419
2420         Updated the bindings generators to support arrays and sequences of host objects.
2421
2422         - Arrays and sequences of host objects are mapped to Vector<RefPtr<%RefPtrType%> >.
2423         - Fixed issue where "sequence<String>" was used in IDL files instead of "sequence<DOMString>".
2424
2425         Updated existing test results.
2426
2427         * Modules/indexeddb/IDBDatabase.idl:
2428         * Modules/indexeddb/IDBObjectStore.idl:
2429         * Modules/mediastream/RTCStatsElement.idl:
2430         * Modules/websockets/WebSocket.idl:
2431         * bindings/js/JSDOMBinding.h:
2432         (WebCore::toRefPtrNativeArray):
2433         (WebCore):
2434         * bindings/scripts/CodeGenerator.pm:
2435         (IsRefPtrType):
2436         * bindings/scripts/CodeGeneratorJS.pm:
2437         (AddIncludesForType):
2438         (GetNativeType):
2439         (GetNativeVectorInnerType):
2440         (JSValueToNative):
2441         (NativeToJSValue):
2442         * bindings/scripts/CodeGeneratorV8.pm:
2443         (GenerateNormalAttrGetter):
2444         (GenerateNormalAttrSetter):
2445         (GenerateParametersCheckExpression):
2446         (GenerateFunctionCallString):
2447         (GetNativeType):
2448         (JSValueToNative):
2449         (CreateCustomSignature):
2450         (NativeToJSValue):
2451         * bindings/scripts/test/JS/JSTestObj.cpp:
2452         (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
2453         * bindings/scripts/test/V8/V8TestObj.cpp:
2454         (WebCore::TestObjV8Internal::longLongAttrAttrSetter):
2455         (WebCore::TestObjV8Internal::unsignedLongLongAttrAttrSetter):
2456         (WebCore::TestObjV8Internal::methodWithSequenceArgCallback):
2457         (WebCore::TestObjV8Internal::overloadedMethod10Callback):
2458         * bindings/v8/V8Binding.h:
2459         (WebCore::toRefPtrNativeArray):
2460         * testing/Internals.idl:
2461
2462 2012-12-04  Antoine Quint  <graouts@apple.com>
2463
2464         TextTrack's .kind property should return lower-case values
2465         https://bugs.webkit.org/show_bug.cgi?id=103411
2466
2467         Reviewed by Eric Carlson.
2468
2469         While the HTML "kind" attribute on the <track> element allows upper-case values, the related APIs
2470         on HTMLMediaElement and TextTrack expect only to deal with lower-case values. As such, we're updating
2471         TextTrack::isValidKindKeyword() to be case-sensitive and ensure that values fed from the DOM (the values
2472         read from HTML attributes) are lower-case'd.
2473
2474         Thanks to this fix, we're no longer skipping media/track/opera/interfaces/TextTrack/kind.html and
2475         media/track/opera/interfaces/HTMLElement/HTMLMediaElement/addTextTrack.html 
2476
2477         This patch also fixes https://bugs.webkit.org/show_bug.cgi?id=103256.
2478
2479         * html/HTMLTrackElement.cpp:
2480         (WebCore::HTMLTrackElement::parseAttribute):
2481         (WebCore::HTMLTrackElement::ensureTrack):
2482         * html/track/TextTrack.cpp:
2483         (WebCore::TextTrack::isValidKindKeyword):
2484
2485 2012-12-04  Sheriff Bot  <webkit.review.bot@gmail.com>
2486
2487         Unreviewed, rolling out r136498.
2488         http://trac.webkit.org/changeset/136498
2489         https://bugs.webkit.org/show_bug.cgi?id=103992
2490
2491         Patch causes a lot of tests to crash in GTK+ bots (Requested
2492         by KaL on #webkit).
2493
2494         * bindings/scripts/CodeGeneratorGObject.pm:
2495         (GenerateProperties):
2496         (GenerateHeader):
2497         (GenerateCFile):
2498         (GenerateEventTargetIface):
2499         (WriteData):
2500         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:
2501         (WebKit::core):
2502         (WebKit::wrapFloat64Array):
2503         (webkit_dom_float64array_finalize):
2504         (webkit_dom_float64array_class_init):
2505         (webkit_dom_float64array_init):
2506         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.h:
2507         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
2508         (WebKit::core):
2509         (WebKit::wrapTestActiveDOMObject):
2510         (webkit_dom_test_active_dom_object_finalize):
2511         (webkit_dom_test_active_dom_object_class_init):
2512         (webkit_dom_test_active_dom_object_init):
2513         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h:
2514         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
2515         (WebKit::core):
2516         (WebKit::wrapTestCallback):
2517         (webkit_dom_test_callback_finalize):
2518         (webkit_dom_test_callback_class_init):
2519         (webkit_dom_test_callback_init):
2520         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
2521         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
2522         (WebKit::core):
2523         (WebKit::wrapTestCustomNamedGetter):
2524         (webkit_dom_test_custom_named_getter_finalize):
2525         (webkit_dom_test_custom_named_getter_class_init):
2526         (webkit_dom_test_custom_named_getter_init):
2527         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h:
2528         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
2529         (WebKit::core):
2530         (WebKit::wrapTestEventConstructor):
2531         (webkit_dom_test_event_constructor_finalize):
2532         (webkit_dom_test_event_constructor_class_init):
2533         (webkit_dom_test_event_constructor_init):
2534         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h:
2535         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
2536         (WebKit::core):
2537         (WebKit::wrapTestEventTarget):
2538         (webkit_dom_test_event_target_dispatch_event):
2539         (webkit_dom_test_event_target_add_event_listener):
2540         (webkit_dom_test_event_target_remove_event_listener):
2541         (webkit_dom_test_event_target_finalize):
2542         (webkit_dom_test_event_target_class_init):
2543         (webkit_dom_test_event_target_init):
2544         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
2545         * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
2546         (WebKit::core):
2547         (WebKit::wrapTestException):
2548         (webkit_dom_test_exception_finalize):
2549         (webkit_dom_test_exception_class_init):
2550         (webkit_dom_test_exception_init):
2551         * bindings/scripts/test/GObject/WebKitDOMTestException.h:
2552         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
2553         (WebKit::core):
2554         (WebKit::wrapTestInterface):
2555         (webkit_dom_test_interface_finalize):
2556         (webkit_dom_test_interface_class_init):
2557         (webkit_dom_test_interface_init):
2558         * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
2559         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
2560         (WebKit::core):
2561         (WebKit::wrapTestMediaQueryListListener):
2562         (webkit_dom_test_media_query_list_listener_finalize):
2563         (webkit_dom_test_media_query_list_listener_class_init):
2564         (webkit_dom_test_media_query_list_listener_init):
2565         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h:
2566         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
2567         (WebKit::core):
2568         (WebKit::wrapTestNamedConstructor):
2569         (webkit_dom_test_named_constructor_finalize):
2570         (webkit_dom_test_named_constructor_class_init):
2571         (webkit_dom_test_named_constructor_init):
2572         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.h:
2573         * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
2574         (WebKit::core):
2575         (WebKit::wrapTestNode):
2576         (webkit_dom_test_node_dispatch_event):
2577         (webkit_dom_test_node_add_event_listener):
2578         (webkit_dom_test_node_remove_event_listener):
2579         (webkit_dom_test_node_finalize):
2580         (webkit_dom_test_node_class_init):
2581         (webkit_dom_test_node_init):
2582         * bindings/scripts/test/GObject/WebKitDOMTestNode.h:
2583         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2584         (WebKit::core):
2585         (WebKit::wrapTestObj):
2586         (webkit_dom_test_obj_finalize):
2587         (webkit_dom_test_obj_class_init):
2588         (webkit_dom_test_obj_init):
2589         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2590         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.cpp:
2591         (WebKit::core):
2592         (WebKit::wrapTestOverloadedConstructors):
2593         (webkit_dom_test_overloaded_constructors_finalize):
2594         (webkit_dom_test_overloaded_constructors_class_init):
2595         (webkit_dom_test_overloaded_constructors_init):
2596         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.h:
2597         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
2598         (WebKit::core):
2599         (WebKit::wrapTestSerializedScriptValueInterface):
2600         (webkit_dom_test_serialized_script_value_interface_finalize):
2601         (webkit_dom_test_serialized_script_value_interface_class_init):
2602         (webkit_dom_test_serialized_script_value_interface_init):
2603         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
2604
2605 2012-12-04  Markus Heintz  <markusheintz@chromium.org>
2606
2607         Web Inspector: Viewport console warnings cleanup.
2608         https://bugs.webkit.org/show_bug.cgi?id=102890
2609
2610         Reviewed by Jochen Eisinger.
2611
2612         Improve the console message text for a viewport console warning and
2613         change the log level to warning.
2614
2615         No new tests added, as this change is covered by updates to existing
2616         test expectations.
2617
2618         * dom/ViewportArguments.cpp:
2619         (WebCore::viewportErrorMessageTemplate):
2620             Improve the console message text for invalid values.
2621         (WebCore::viewportErrorMessageLevel):
2622             Upgraded the TruncatedViewportArgumentValueError and the
2623             TargetDensityDpiUnsupported messages's MessageLeval to warning.
2624         (WebCore::reportViewportWarning):
2625             Adding only a comment for a FIXIT reminder.
2626
2627 2012-12-04  Carlos Garcia Campos  <cgarcia@igalia.com>
2628
2629         [GTK] Use a private struct and placement new syntax in GObject DOM bindings
2630         https://bugs.webkit.org/show_bug.cgi?id=101074
2631
2632         Reviewed by Xan Lopez.
2633
2634         It allows to use RefPtr for the wrapped object and it simplifies
2635         the code.
2636
2637         * bindings/scripts/CodeGeneratorGObject.pm:
2638         (GenerateProperties):
2639         (GenerateHeader):
2640         (GenerateCFile):
2641         (GenerateEventTargetIface):
2642         (WriteData):
2643         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:
2644         (_WebKitDOMFloat64ArrayPrivate):
2645         (WebKit::core):
2646         (WebKit::wrapFloat64Array):
2647         (webkit_dom_float64array_finalize):
2648         (webkit_dom_float64array_constructor):
2649         (webkit_dom_float64array_class_init):
2650         (webkit_dom_float64array_init):
2651         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.h:
2652         (_WebKitDOMFloat64Array):
2653         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
2654         (_WebKitDOMTestActiveDOMObjectPrivate):
2655         (WebKit::core):
2656         (WebKit::wrapTestActiveDOMObject):
2657         (webkit_dom_test_active_dom_object_finalize):
2658         (webkit_dom_test_active_dom_object_constructor):
2659         (webkit_dom_test_active_dom_object_class_init):
2660         (webkit_dom_test_active_dom_object_init):
2661         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h:
2662         (_WebKitDOMTestActiveDOMObject):
2663         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
2664         (_WebKitDOMTestCallbackPrivate):
2665         (WebKit::core):
2666         (WebKit::wrapTestCallback):
2667         (webkit_dom_test_callback_finalize):
2668         (webkit_dom_test_callback_constructor):
2669         (webkit_dom_test_callback_class_init):
2670         (webkit_dom_test_callback_init):
2671         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
2672         (_WebKitDOMTestCallback):
2673         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
2674         (_WebKitDOMTestCustomNamedGetterPrivate):
2675         (WebKit::core):
2676         (WebKit::wrapTestCustomNamedGetter):
2677         (webkit_dom_test_custom_named_getter_finalize):
2678         (webkit_dom_test_custom_named_getter_constructor):
2679         (webkit_dom_test_custom_named_getter_class_init):
2680         (webkit_dom_test_custom_named_getter_init):
2681         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h:
2682         (_WebKitDOMTestCustomNamedGetter):
2683         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
2684         (_WebKitDOMTestEventConstructorPrivate):
2685         (WebKit::core):
2686         (WebKit::wrapTestEventConstructor):
2687         (webkit_dom_test_event_constructor_finalize):
2688         (webkit_dom_test_event_constructor_constructor):
2689         (webkit_dom_test_event_constructor_class_init):
2690         (webkit_dom_test_event_constructor_init):
2691         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h:
2692         (_WebKitDOMTestEventConstructor):
2693         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
2694         (_WebKitDOMTestEventTargetPrivate):
2695         (WebKit::core):
2696         (WebKit::wrapTestEventTarget):
2697         (webkit_dom_test_event_target_dispatch_event):
2698         (webkit_dom_test_event_target_add_event_listener):
2699         (webkit_dom_test_event_target_remove_event_listener):
2700         (webkit_dom_test_event_target_finalize):
2701         (webkit_dom_test_event_target_constructor):
2702         (webkit_dom_test_event_target_class_init):
2703         (webkit_dom_test_event_target_init):
2704         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
2705         (_WebKitDOMTestEventTarget):
2706         * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
2707         (_WebKitDOMTestExceptionPrivate):
2708         (WebKit::core):
2709         (WebKit::wrapTestException):
2710         (webkit_dom_test_exception_finalize):
2711         (webkit_dom_test_exception_constructor):
2712         (webkit_dom_test_exception_class_init):
2713         (webkit_dom_test_exception_init):
2714         * bindings/scripts/test/GObject/WebKitDOMTestException.h:
2715         (_WebKitDOMTestException):
2716         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
2717         (_WebKitDOMTestInterfacePrivate):
2718         (WebKit::core):
2719         (WebKit::wrapTestInterface):
2720         (webkit_dom_test_interface_finalize):
2721         (webkit_dom_test_interface_constructor):
2722         (webkit_dom_test_interface_class_init):
2723         (webkit_dom_test_interface_init):
2724         * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
2725         (_WebKitDOMTestInterface):
2726         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
2727         (_WebKitDOMTestMediaQueryListListenerPrivate):
2728         (WebKit::core):
2729         (WebKit::wrapTestMediaQueryListListener):
2730         (webkit_dom_test_media_query_list_listener_finalize):
2731         (webkit_dom_test_media_query_list_listener_constructor):
2732         (webkit_dom_test_media_query_list_listener_class_init):
2733         (webkit_dom_test_media_query_list_listener_init):
2734         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h:
2735         (_WebKitDOMTestMediaQueryListListener):
2736         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
2737         (_WebKitDOMTestNamedConstructorPrivate):
2738         (WebKit::core):
2739         (WebKit::wrapTestNamedConstructor):
2740         (webkit_dom_test_named_constructor_finalize):
2741         (webkit_dom_test_named_constructor_constructor):
2742         (webkit_dom_test_named_constructor_class_init):
2743         (webkit_dom_test_named_constructor_init):
2744         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.h:
2745         (_WebKitDOMTestNamedConstructor):
2746         * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
2747         (_WebKitDOMTestNodePrivate):
2748         (WebKit::core):
2749         (WebKit::wrapTestNode):
2750         (webkit_dom_test_node_dispatch_event):
2751         (webkit_dom_test_node_add_event_listener):
2752         (webkit_dom_test_node_remove_event_listener):
2753         (webkit_dom_test_node_finalize):
2754         (webkit_dom_test_node_constructor):
2755         (webkit_dom_test_node_class_init):
2756         (webkit_dom_test_node_init):
2757         * bindings/scripts/test/GObject/WebKitDOMTestNode.h:
2758         (_WebKitDOMTestNode):
2759         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2760         (_WebKitDOMTestObjPrivate):
2761         (WebKit::core):
2762         (WebKit::wrapTestObj):
2763         (webkit_dom_test_obj_finalize):
2764         (webkit_dom_test_obj_constructor):
2765         (webkit_dom_test_obj_class_init):
2766         (webkit_dom_test_obj_init):
2767         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2768         (_WebKitDOMTestObj):
2769         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
2770         (_WebKitDOMTestSerializedScriptValueInterfacePrivate):
2771         (WebKit::core):
2772         (WebKit::wrapTestSerializedScriptValueInterface):
2773         (webkit_dom_test_serialized_script_value_interface_finalize):
2774         (webkit_dom_test_serialized_script_value_interface_constructor):
2775         (webkit_dom_test_serialized_script_value_interface_class_init):
2776         (webkit_dom_test_serialized_script_value_interface_init):
2777         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
2778         (_WebKitDOMTestSerializedScriptValueInterface):
2779
2780 2012-12-04  David Grogan  <dgrogan@chromium.org>
2781
2782         IndexedDB: Make leveldb histogram entries more fine-grained
2783         https://bugs.webkit.org/show_bug.cgi?id=103688
2784
2785         Reviewed by Tony Chang.
2786
2787         Allow us better insight into which functions the IO errors originate
2788         from.
2789
2790         * Modules/indexeddb/IDBBackingStore.cpp:
2791         (WebCore::setUpMetadata):
2792         (WebCore::IDBBackingStore::getIDBDatabaseMetaData):
2793         (WebCore::IDBBackingStore::getObjectStores):
2794         (WebCore::IDBBackingStore::getRecord):
2795         (WebCore::IDBBackingStore::getKeyGeneratorCurrentNumber):
2796         (WebCore::IDBBackingStore::keyExistsInObjectStore):
2797         (WebCore::IDBBackingStore::getIndexes):
2798         (WebCore::IDBBackingStore::findKeyInIndex):
2799         (WebCore::ObjectStoreKeyCursorImpl::loadCurrentRow):
2800         (WebCore::ObjectStoreCursorImpl::loadCurrentRow):
2801         (WebCore::IndexKeyCursorImpl::loadCurrentRow):
2802         (WebCore::IndexCursorImpl::loadCurrentRow):
2803
2804 2012-12-04  Carlos Garcia Campos  <cgarcia@igalia.com>
2805
2806         [GTK] Avoid unnecessary heap allocations during drag and drop operations
2807         https://bugs.webkit.org/show_bug.cgi?id=87938
2808
2809         Reviewed by Martin Robinson.
2810
2811         * platform/gtk/GtkDragAndDropHelper.cpp:
2812         (WebCore::GtkDragAndDropHelper::handleDragMotion): Return a
2813         pointer to the DataObjectGtk so that the caller can create the
2814         DragData object in the stack.
2815         (WebCore::GtkDragAndDropHelper::handleDragDataReceived): Ditto.
2816         (WebCore::GtkDragAndDropHelper::handleDragDrop): Ditto.
2817         * platform/gtk/GtkDragAndDropHelper.h:
2818
2819 2012-12-04  Alexander Pavlov  <apavlov@chromium.org>
2820
2821         Web Inspector: [Overrides] Add ability to override the page CSS media type
2822         https://bugs.webkit.org/show_bug.cgi?id=103752
2823
2824         Reviewed by Pavel Feldman.
2825
2826         This change emulates the CSS media types through the instrumentation of FrameView::mediaType().
2827         Even though it already checks the associated FrameLoaderClient::overrideMediaType(), instrumenting
2828         every single platform FrameLoaderClient implementation out there seems wrong.
2829
2830         Test: inspector/styles/media-emulation.html
2831
2832         * English.lproj/localizedStrings.js:
2833         * inspector/Inspector.json: Add Page.setEmulatedMedia().
2834         * inspector/InspectorInstrumentation.cpp:
2835         (WebCore::InspectorInstrumentation::applyEmulatedMediaImpl): Added.
2836         * inspector/InspectorInstrumentation.h:
2837         (WebCore::InspectorInstrumentation::applyEmulatedMedia): Added.
2838         * inspector/InspectorPageAgent.cpp:
2839         (WebCore::InspectorPageAgent::restore): Restores the media emulation state.
2840         (WebCore::InspectorPageAgent::disable): Resets the media emulation state.
2841         (WebCore::InspectorPageAgent::setEmulatedMedia): Added.
2842         (WebCore::InspectorPageAgent::applyEmulatedMedia): Applies the emulated CSS media if needed.
2843         * inspector/InspectorPageAgent.h:
2844         * inspector/front-end/CSSStyleModel.js: Add the list of media types.
2845         * inspector/front-end/OverridesView.js: Add the CSS media type override UI.
2846         (WebInspector.OverridesView):
2847         (WebInspector.OverridesView.prototype._createMediaEmulationElement): Builds the UI.
2848         (WebInspector.OverridesView.prototype._emulateMediaChanged): Handles the control value changes.
2849         * inspector/front-end/Settings.js: Add the "emulatedCSSMedia" setting.
2850         * page/FrameView.cpp:
2851         (WebCore::FrameView::mediaType):
2852           Uses InspectorInstrumentation::applyEmulatedMedia() to provide the emulated value.
2853
2854 2012-12-03  Carlos Garcia Campos  <cgarcia@igalia.com>
2855
2856         [GTK] Simplify GObject DOM bindings code for handling properties
2857         https://bugs.webkit.org/show_bug.cgi?id=101072
2858
2859         Reviewed by Xan Lopez.
2860
2861         Do not override GObjectClass::set_property if the wrapped object
2862         doesn't have writable properties, and don't override
2863         GObjectClass::get_property if the wrapped object doesn't have
2864         properties at all. It reduces some GObject boilerplate in
2865         generated code for some objects.
2866
2867         * bindings/scripts/CodeGeneratorGObject.pm:
2868         (GenerateProperties):
2869         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:
2870         (webkit_dom_float64array_class_init):
2871         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
2872         (webkit_dom_test_active_dom_object_class_init):
2873         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
2874         (webkit_dom_test_callback_class_init):
2875         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
2876         (webkit_dom_test_custom_named_getter_class_init):
2877         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
2878         (webkit_dom_test_event_constructor_class_init):
2879         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
2880         (webkit_dom_test_event_target_class_init):
2881         * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
2882         (webkit_dom_test_exception_class_init):
2883         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
2884         (webkit_dom_test_interface_class_init):
2885         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
2886         (webkit_dom_test_media_query_list_listener_class_init):
2887         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
2888         (webkit_dom_test_named_constructor_class_init):
2889         * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
2890         (webkit_dom_test_node_class_init):
2891         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2892         (webkit_dom_test_obj_class_init):
2893         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
2894         (webkit_dom_test_serialized_script_value_interface_class_init):
2895
2896 2012-12-04  Kentaro Hara  <haraken@chromium.org>
2897
2898         Unreviewed. Rebaselined run-bindings-tests.
2899
2900         * bindings/scripts/test/JS/JSTestNode.cpp:
2901         (WebCore::JSTestNode::visitChildren):
2902         (WebCore):
2903
2904 2012-12-03  Alexander Pavlov  <apavlov@chromium.org>
2905
2906         Web Inspector: [REGRESSION] [Styles] Rule disappears if edited selector does not affect selected node
2907         https://bugs.webkit.org/show_bug.cgi?id=103059
2908
2909         Reviewed by Pavel Feldman.
2910
2911         This change effectively turns WebInspector.cssModel.setRuleSelector() into a _userOperation
2912         (in terms of StylesSidebarPane), which finishes upon the _finishOperationAndMoveEditor() invocation.
2913
2914         * inspector/front-end/CSSStyleModel.js:
2915         (WebInspector.CSSRule): Fix selectorText now that r136370 has landed.
2916         * inspector/front-end/StylesSidebarPane.js:
2917         (WebInspector.StylePropertiesSection.prototype.update): Update the selector text from the model.
2918         (WebInspector.StylePropertiesSection.prototype._markSelectorMatches): Set the "selector" className regardless of the matched selectors presence.
2919         (WebInspector.StylePropertiesSection.prototype.successCallback): Make use of the _userOperation flag.
2920         (WebInspector.StylePropertiesSection.prototype.finishOperationAndMoveEditor): Delete the _userOperation flag.
2921         (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted): Make use of the _userOperation flag.
2922         (WebInspector.BlankStylePropertiesSection.prototype.editingSelectorCommitted): Mark selector matches.
2923         (WebInspector.BlankStylePropertiesSection.prototype.editingSelectorCancelled): Delete the _userOperation flag.
2924
2925 2012-12-04  Kondapally Kalyan  <kalyan.kondapally@intel.com>
2926
2927         [EFL][WK2][AC] USE_GRAPHICS_SURFACE should be enabled only if Xcomposite and Xrender extensions are found.
2928         https://bugs.webkit.org/show_bug.cgi?id=103710.
2929
2930         Reviewed by Kenneth Rohde Christiansen.
2931
2932         When using GLX back-end we are dependent on GLX support, Xcomposite and Xrender extensions.
2933         In this case, GraphicsSurface usage depends on Xcomposite and Xrender extensions. 
2934         USE_GRAPHICS_SURFACE should be enabled only if Xcomposite and Xrender extensions are found.
2935
2936         * platform/graphics/opengl/GLPlatformSurface.cpp:
2937         (WebCore::GLPlatformSurface::createTransportSurface):
2938         * platform/graphics/surfaces/glx/GLXSurface.cpp:
2939         (WebCore):
2940         * platform/graphics/surfaces/glx/GLXSurface.h:
2941         (WebCore::SharedX11Resources::createConfig):
2942         (SharedX11Resources):
2943
2944 2012-12-04  Michael Pruett  <michael@68k.org>
2945
2946         [JSC] Generate visitChildren() for uncustomized EventTarget interfaces
2947         https://bugs.webkit.org/show_bug.cgi?id=103908
2948
2949         Reviewed by Geoffrey Garen.
2950
2951         CodeGeneratorJS.pm should automatically generate visitChildren()
2952         for EventTarget interfaces without custom mark functions even if
2953         those interfaces have no functions or cached attributes.
2954
2955         This change is needed for IDBOpenDBRequest and IDBVersionChangeRequest.
2956
2957         No new tests. Covered by existing tests.
2958
2959         * bindings/scripts/CodeGeneratorJS.pm:
2960         (GenerateImplementation):
2961
2962 2012-12-04  Kentaro Hara  <haraken@chromium.org>
2963
2964         Change ChildNodeInsertionNotifier::m_postInsertionsNotificationTargets from a Vector to an OwnPtr
2965         https://bugs.webkit.org/show_bug.cgi?id=103868
2966
2967         Reviewed by Darin Adler.
2968
2969         ChildNodeInsertionNotifier::m_postInsertionsNotificationTargets is
2970         used for HTMLFrameElement and HTMLBodyElement only, which would be
2971         a cold path. We can change it from a Vector to an OwnPtr<Vector>
2972         so that ChildNodeInsertionNotifier can be allocated faster. This patch
2973         optimizes Dromaeo/dom-modify by 1.4%.
2974
2975         [Dromaeo/dom-modify in Chromium/Linux]
2976         Before: 4532 runs/sec, 4545 runs/sec, 4530 runs/sec, 4536 runs/sec
2977         After:  4595 runs/sec, 4606 runs/sec, 4597 runs/sec, 4602 runs/sec
2978
2979         No tests. No change in behavior.
2980
2981         * dom/ContainerNodeAlgorithms.h:
2982         (ChildNodeInsertionNotifier):
2983         (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument):
2984         (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree):
2985         (WebCore::ChildNodeInsertionNotifier::notify):
2986
2987 2012-12-03  Rafael Weinstein  <rafaelw@chromium.org>
2988
2989         Unreviewed build fix after r136467
2990
2991         The template element patch added asserts in parserAppendChild and parserInsertBefore which should be valid, but DOMImplementation::createDocument() calls parserAppendChild with docType without regard to its owner. This patch removes the assert and adds a FIXME.
2992
2993         * dom/ContainerNode.cpp:
2994         (WebCore::ContainerNode::parserInsertBefore):
2995         (WebCore::ContainerNode::parserAppendChild):
2996
2997 2012-12-03  Kentaro Hara  <haraken@chromium.org>
2998
2999         [V8] Enter an Isolate before initializing PerIsolateData
3000         https://bugs.webkit.org/show_bug.cgi?id=103949
3001
3002         Reviewed by Adam Barth.
3003
3004         Currently we initialize PerIsolateData before entering an Isolate,
3005         which prevents us from using an Isolate in the PerIsolateData
3006         constructor. We should enter an Isolate first and then initialize
3007         PerIsolateData.
3008
3009         No tests. No change in behavior.
3010
3011         * bindings/v8/WorkerScriptController.cpp:
3012         (WebCore::WorkerScriptController::WorkerScriptController):
3013
3014 2012-12-03  Sergio Villar Senin  <svillar@igalia.com>
3015
3016         [GTK] Add WebKitDOMShadowRoot.h to the list of public API headers after r135693
3017         https://bugs.webkit.org/show_bug.cgi?id=103909
3018
3019         Reviewed by Martin Robinson.
3020
3021         WebKitDOMShadowRoot was added in r135693. As it is added to
3022         webkitdom.h we have to export the include file, otherwise clients
3023         will fail to build due to the missing file.
3024
3025         * bindings/gobject/GNUmakefile.am:
3026
3027 2012-12-03  Joshua Bell  <jsbell@chromium.org>
3028
3029         IndexedDB: Correct database version after aborted upgrade
3030         https://bugs.webkit.org/show_bug.cgi?id=103763
3031
3032         Reviewed by Tony Chang.
3033
3034         After an aborted "versionchange" transaction, the IDBDatabase would fetch a fresh snapshot
3035         of the metadata from the back end. If the back end had already started a new "versionchange"
3036         transaction the snapshot would be bogus. Instead, save a copy of the IDBDatabase's metadata
3037         and roll back to that, as is done for IDBObjectStore.
3038
3039         Tests: storage/indexeddb/intversion-abort-in-initial-upgradeneeded.html
3040                storage/indexeddb/mozilla/versionchange-abort.html
3041                storage/indexeddb/unblocked-version-changes.html
3042
3043         * Modules/indexeddb/IDBDatabase.cpp:
3044         (WebCore::IDBDatabase::IDBDatabase):
3045         (WebCore::IDBDatabase::transactionCreated):
3046         * Modules/indexeddb/IDBDatabase.h:
3047         (WebCore::IDBDatabase::setMetadata): Let IDBOpenDBRequest and IDBTransaction tinker.
3048         * Modules/indexeddb/IDBOpenDBRequest.cpp:
3049         (WebCore::IDBOpenDBRequest::onUpgradeNeeded): Fetch new and compute old metadata.
3050         (WebCore::IDBOpenDBRequest::onSuccess): Fetch new metadata, in case upgrade changed it.
3051         * Modules/indexeddb/IDBTransaction.cpp:
3052         (WebCore::IDBTransaction::create): Stash the old metadata, in case of rollback.
3053         (WebCore::IDBTransaction::IDBTransaction):
3054         (WebCore::IDBTransaction::onAbort): Revert the database as well as the stores.
3055         * Modules/indexeddb/IDBTransaction.h:
3056         (IDBTransaction):
3057
3058 2012-12-03  Rafael Weinstein  <rafaelw@chromium.org>
3059
3060         Implement HTMLTemplateElement
3061         https://bugs.webkit.org/show_bug.cgi?id=86031
3062
3063         Reviewed by Adam Barth.
3064
3065         Initial implementation. This patch includes the parser changes, new IDL and element implementation for <template>.
3066
3067         Spec: http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html
3068
3069         Tests: fast/dom/HTMLTemplateElement/cloneNode.html
3070                fast/dom/HTMLTemplateElement/inertContents.html
3071                fast/dom/HTMLTemplateElement/innerHTML.html
3072                fast/dom/HTMLTemplateElement/ownerDocument.html
3073                html5lib/run-template.html
3074
3075         * WebCore.gypi:
3076         * css/html.css:
3077         (template):
3078         * dom/Document.cpp:
3079         (WebCore):
3080         (WebCore::Document::templateContentsOwnerDocument):
3081         * dom/Document.h:
3082         (Document):
3083         * editing/MarkupAccumulator.cpp:
3084         (WebCore::MarkupAccumulator::serializeNodesWithNamespaces):
3085         * html/HTMLElement.h:
3086         (HTMLElement):
3087         * html/HTMLElementsAllInOne.cpp:
3088         * html/HTMLTagNames.in:
3089         * html/HTMLTemplateElement.cpp: Added.
3090         (WebCore):
3091         (WebCore::HTMLTemplateElement::HTMLTemplateElement):
3092         (WebCore::HTMLTemplateElement::setInnerHTML):
3093         (WebCore::HTMLTemplateElement::~HTMLTemplateElement):
3094         (WebCore::HTMLTemplateElement::create):
3095         (WebCore::HTMLTemplateElement::content):
3096         (WebCore::HTMLTemplateElement::setContent):
3097         (WebCore::toHTMLTemplateElement):
3098         * html/HTMLTemplateElement.h: Added.
3099         (WebCore):
3100         (HTMLTemplateElement):
3101         (WebCore::toHTMLTemplateElement):
3102         * html/HTMLTemplateElement.idl: Added.
3103         * html/parser/HTMLConstructionSite.cpp:
3104         (WebCore::executeTask):
3105         (WebCore::HTMLConstructionSite::insertComment):
3106         (WebCore::HTMLConstructionSite::insertTextNode):
3107         (WebCore::HTMLConstructionSite::createElement):
3108         (WebCore::HTMLConstructionSite::ownerDocumentForCurrentNode):
3109         (WebCore):
3110         (WebCore::HTMLConstructionSite::createHTMLElement):
3111         (WebCore::HTMLConstructionSite::findFosterSite):
3112         * html/parser/HTMLConstructionSite.h:
3113         (HTMLConstructionSite):
3114         * html/parser/HTMLElementStack.cpp:
3115         (WebCore):
3116         (WebCore::HTMLElementStack::hasTemplateInHTMLScope):
3117         * html/parser/HTMLElementStack.h:
3118         (HTMLElementStack):
3119         * html/parser/HTMLTreeBuilder.cpp:
3120         (WebCore::HTMLTreeBuilder::constructTreeFromToken):
3121         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
3122         (WebCore):
3123         (WebCore::HTMLTreeBuilder::processTemplateEndTag):
3124         (WebCore::HTMLTreeBuilder::processStartTagForInTable):
3125         (WebCore::HTMLTreeBuilder::processStartTag):
3126         (WebCore::HTMLTreeBuilder::processHtmlStartTagForInBody):
3127         (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
3128         (WebCore::HTMLTreeBuilder::processEndTagForInTableBody):
3129         (WebCore::HTMLTreeBuilder::processEndTagForInRow):
3130         (WebCore::HTMLTreeBuilder::processEndTagForInCell):
3131         (WebCore::HTMLTreeBuilder::processEndTagForInBody):
3132         (WebCore::HTMLTreeBuilder::processTrEndTagForInRow):
3133         (WebCore::HTMLTreeBuilder::processTableEndTagForInTable):
3134         (WebCore::HTMLTreeBuilder::processEndTag):
3135         (WebCore::HTMLTreeBuilder::processCharacterBuffer):
3136         (WebCore::HTMLTreeBuilder::processEndOfFile):
3137         (WebCore::HTMLTreeBuilder::processStartTagForInHead):
3138         * html/parser/HTMLTreeBuilder.h:
3139         (HTMLTreeBuilder):
3140         (WebCore::HTMLTreeBuilder::isParsingTemplateContents):
3141         (WebCore::HTMLTreeBuilder::isParsingFragmentOrTemplateContents):
3142         * page/DOMWindow.idl:
3143
3144 2012-12-03  Sheriff Bot  <webkit.review.bot@gmail.com>
3145
3146         Unreviewed, rolling out r136460.
3147         http://trac.webkit.org/changeset/136460
3148         https://bugs.webkit.org/show_bug.cgi?id=103958
3149
3150         This patch caused compile error when building DumpRenderTree
3151         (Requested by tasak on #webkit).
3152
3153         * WebCore.gyp/WebCore.gyp:
3154         * WebCore.gypi:
3155         * platform/chromium/PlatformThemeChromiumLinux.cpp: Added.
3156         (WebCore):
3157         (WebCore::PlatformThemeChromiumLinux::setScrollbarColors):
3158         (WebCore::clamp):
3159         (WebCore::PlatformThemeChromiumLinux::saturateAndBrighten):
3160         (WebCore::PlatformThemeChromiumLinux::outlineColor):
3161         (WebCore::PlatformThemeChromiumLinux::paintArrowButton):
3162         * platform/chromium/PlatformThemeChromiumLinux.h: Added.
3163         (WebCore):
3164         (PlatformThemeChromiumLinux):
3165         (WebCore::PlatformThemeChromiumLinux::thumbInactiveColor):
3166         (WebCore::PlatformThemeChromiumLinux::thumbActiveColor):
3167         (WebCore::PlatformThemeChromiumLinux::trackColor):
3168         (WebCore::PlatformThemeChromiumLinux::PlatformThemeChromiumLinux):
3169         * platform/chromium/ScrollbarThemeChromiumLinux.cpp: Added.
3170         (WebCore):
3171         (WebCore::ScrollbarTheme::nativeTheme):
3172         (WebCore::ScrollbarThemeChromiumLinux::scrollbarThickness):
3173         (WebCore::ScrollbarThemeChromiumLinux::paintTrackPiece):
3174         (WebCore::ScrollbarThemeChromiumLinux::paintButton):
3175         (WebCore::ScrollbarThemeChromiumLinux::paintThumb):
3176         (WebCore::ScrollbarThemeChromiumLinux::shouldCenterOnThumb):
3177         (WebCore::ScrollbarThemeChromiumLinux::buttonSize):
3178         (WebCore::ScrollbarThemeChromiumLinux::minimumThumbLength):
3179         * platform/chromium/ScrollbarThemeChromiumLinux.h: Added.
3180         (ScrollbarThemeChromiumLinux):
3181         * rendering/RenderThemeChromiumAndroid.cpp:
3182         (WebCore::RenderThemeChromiumAndroid::extraDefaultStyleSheet):
3183         * rendering/RenderThemeChromiumAndroid.h:
3184         * rendering/RenderThemeChromiumLinux.cpp: Added.
3185         (WebCore):
3186         (WebCore::getWebThemeState):
3187         (WebCore::RenderThemeChromiumLinux::create):
3188         (WebCore::RenderTheme::themeForPage):
3189         (WebCore::RenderThemeChromiumLinux::RenderThemeChromiumLinux):
3190         (WebCore::RenderThemeChromiumLinux::~RenderThemeChromiumLinux):
3191         (WebCore::RenderThemeChromiumLinux::systemColor):
3192         (WebCore::RenderThemeChromiumLinux::extraDefaultStyleSheet):
3193         (WebCore::RenderThemeChromiumLinux::controlSupportsTints):
3194         (WebCore::RenderThemeChromiumLinux::activeListBoxSelectionBackgroundColor):
3195         (WebCore::RenderThemeChromiumLinux::activeListBoxSelectionForegroundColor):
3196         (WebCore::RenderThemeChromiumLinux::inactiveListBoxSelectionBackgroundColor):
3197         (WebCore::RenderThemeChromiumLinux::inactiveListBoxSelectionForegroundColor):
3198         (WebCore::RenderThemeChromiumLinux::platformActiveSelectionBackgroundColor):
3199         (WebCore::RenderThemeChromiumLinux::platformInactiveSelectionBackgroundColor):
3200         (WebCore::RenderThemeChromiumLinux::platformActiveSelectionForegroundColor):
3201         (WebCore::RenderThemeChromiumLinux::platformInactiveSelectionForegroundColor):
3202         (WebCore::RenderThemeChromiumLinux::sliderTickSize):
3203         (WebCore::RenderThemeChromiumLinux::sliderTickOffsetFromTrackCenter):
3204         (WebCore::RenderThemeChromiumLinux::adjustSliderThumbSize):
3205         (WebCore::RenderThemeChromiumLinux::supportsControlTints):
3206         (WebCore::RenderThemeChromiumLinux::setCaretBlinkInterval):
3207         (WebCore::RenderThemeChromiumLinux::caretBlinkIntervalInternal):
3208         (WebCore::RenderThemeChromiumLinux::setSelectionColors):
3209         (WebCore::RenderThemeChromiumLinux::paintCheckbox):
3210         (WebCore::RenderThemeChromiumLinux::setCheckboxSize):
3211         (WebCore::RenderThemeChromiumLinux::paintRadio):
3212         (WebCore::RenderThemeChromiumLinux::setRadioSize):
3213         (WebCore::RenderThemeChromiumLinux::paintButton):
3214         (WebCore::RenderThemeChromiumLinux::paintTextField):
3215         (WebCore::RenderThemeChromiumLinux::paintMenuList):
3216         (WebCore::RenderThemeChromiumLinux::paintSliderTrack):
3217         (WebCore::RenderThemeChromiumLinux::paintSliderThumb):
3218         (WebCore::RenderThemeChromiumLinux::adjustInnerSpinButtonStyle):
3219         (WebCore::RenderThemeChromiumLinux::paintInnerSpinButton):
3220         (WebCore::RenderThemeChromiumLinux::paintProgressBar):
3221         (WebCore::RenderThemeChromiumLinux::shouldOpenPickerWithF4Key):
3222         * rendering/RenderThemeChromiumLinux.h: Added.
3223         (WebCore):
3224         (RenderThemeChromiumLinux):
3225
3226 2012-12-03  Julien Chaffraix  <jchaffraix@webkit.org>
3227
3228         [CSS Grid Layout] Support paddings and margins on grid items
3229         https://bugs.webkit.org/show_bug.cgi?id=103677
3230
3231         Reviewed by Tony Chang.
3232
3233         After bug 102968, we properly resolve grid items' width and height against the
3234         grid areas' sizes. However we didn't check for paddings and margins, which is
3235         what this change fixes..
3236
3237         Test: fast/css-grid-layout/percent-padding-margin-resolution-grid-item.html
3238
3239         * rendering/RenderBox.cpp:
3240         (WebCore::RenderBox::computeLogicalWidthInRegion):
3241         Don't stretch the end margin to match the containing block's extent.
3242         The fix is similar to what was done for flex-box in bug 65887.
3243
3244         * rendering/RenderBoxModelObject.cpp:
3245         (WebCore::RenderBoxModelObject::computeStickyPositionConstraints):
3246         Added a comment about not using containingBlockLogicalWidthForContent.
3247
3248         (WebCore::RenderBoxModelObject::computedCSSPaddingTop):
3249         (WebCore::RenderBoxModelObject::computedCSSPaddingBottom):
3250         (WebCore::RenderBoxModelObject::computedCSSPaddingLeft):
3251         (WebCore::RenderBoxModelObject::computedCSSPaddingRight):
3252         (WebCore::RenderBoxModelObject::computedCSSPaddingBefore):
3253         (WebCore::RenderBoxModelObject::computedCSSPaddingAfter):
3254         (WebCore::RenderBoxModelObject::computedCSSPaddingStart):
3255         (WebCore::RenderBoxModelObject::computedCSSPaddingEnd):
3256         Updated these functions to use containingBlockLogicalWidthForContent.
3257
3258         * rendering/RenderGrid.h:
3259         * rendering/RenderObject.h:
3260         (WebCore::RenderObject::isRenderGrid):
3261         Added isRenderGrid.
3262
3263 2012-12-03  Scott Violet  <sky@chromium.org>
3264
3265         [chromium] Remove linux theme related files and switch to default
3266         https://bugs.webkit.org/show_bug.cgi?id=103897
3267
3268         Reviewed by Darin Fisher.
3269
3270         linux theme related files are now named default. This removes
3271         linux theme files, updates build files and removes ifdefs.
3272
3273         Code cleanup, no new tests.
3274
3275         * WebCore.gyp/WebCore.gyp: Update build rules
3276         * WebCore.gypi: Update build rules
3277         * platform/chromium/PlatformThemeChromiumLinux.cpp: Removed.
3278         * platform/chromium/PlatformThemeChromiumLinux.h: Removed.
3279         * platform/chromium/ScrollbarThemeChromiumLinux.cpp: Removed.
3280         * platform/chromium/ScrollbarThemeChromiumLinux.h: Removed.
3281         * rendering/RenderThemeChromiumAndroid.h: Change superclass
3282         * rendering/RenderThemeChromiumAndroid.cpp: Change call to superclass
3283         * rendering/RenderThemeChromiumLinux.cpp: Removed.
3284         * rendering/RenderThemeChromiumLinux.h: Removed.
3285
3286 2012-12-03  Pierre Rossi  <pierre.rossi@digia.com>
3287
3288         [Qt] Unreviewed build fix after r136410
3289
3290         When building without libjpeg, take JPEGImageDecoder's header out, since it now includes libjpeg.h.
3291
3292         * Target.pri: conditionally add JPEGImageDecoder.h to HEADERS
3293         * platform/image-decoders/ImageDecoder.cpp: guard JPEGImageDecoder.h's include
3294
3295 2012-12-03  Kenneth Rohde Christiansen  <kenneth@webkit.org>
3296
3297         [EFL][Qt][WK2] Fixed position elements are not always fixed
3298         https://bugs.webkit.org/show_bug.cgi?id=103452
3299
3300         Reviewed by Simon Fraser.
3301
3302         The code figuring out whether fixed position layers are inside
3303         the visible viewport, assumes that the visible viewport is always
3304         the size of the layout viewport. This assumption doesn't hold with
3305         how the Qt and EFL tiled backing store and coordinated graphics
3306         works, so instead using the visibleContentsRect(), which provides
3307         the right values in all cases.
3308
3309         * rendering/RenderLayerCompositor.cpp:
3310         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
3311
3312             Use visibleContentsRect instead of scrollOffsetForFixedPosition().
3313
3314             scrollOffsetForFixedPosition() is needed sometimes in the Mac code
3315             because visibleContentRect() will return negative offsets when you
3316             are in the rubber-band phase of a scroll on the Mac.
3317
3318             However that is not an issue here.
3319
3320 2012-12-03  Sheriff Bot  <webkit.review.bot@gmail.com>
3321
3322         Unreviewed, rolling out r135271.
3323         http://trac.webkit.org/changeset/135271
3324         https://bugs.webkit.org/show_bug.cgi?id=103940
3325
3326         Some user stylesheet API clients broken (Requested by anttik
3327         on #webkit).
3328
3329         * css/StyleResolver.cpp:
3330         (WebCore::StyleResolver::StyleResolver):
3331         (WebCore::StyleResolver::collectRulesFromUserStyleSheets):
3332         (WebCore::collectCSSOMWrappers):
3333         * css/StyleResolver.h:
3334         (StyleResolver):
3335         * dom/Document.cpp:
3336         (WebCore::Document::setCompatibilityMode):
3337         * dom/DocumentStyleSheetCollection.cpp:
3338         (WebCore::DocumentStyleSheetCollection::~DocumentStyleSheetCollection):
3339         (WebCore::DocumentStyleSheetCollection::pageUserSheet):
3340         (WebCore::DocumentStyleSheetCollection::clearPageUserSheet):
3341         (WebCore::DocumentStyleSheetCollection::updatePageUserSheet):
3342         (WebCore::collectActiveCSSStyleSheetsFromSeamlessParents):
3343         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
3344         (WebCore::DocumentStyleSheetCollection::reportMemoryUsage):
3345         * dom/DocumentStyleSheetCollection.h:
3346         (DocumentStyleSheetCollection):
3347         (WebCore::DocumentStyleSheetCollection::documentUserStyleSheets):
3348         * page/Page.cpp:
3349         (WebCore::Page::userStyleSheetLocationChanged):
3350
3351 2012-11-30  Andrey Kosyakov  <caseq@chromium.org>
3352
3353         Web Inspector: make it possible to fliter out messages from console.{time,timeEnd}()
3354         https://bugs.webkit.org/show_bug.cgi?id=103781
3355
3356         Reviewed by Yury Semikhatsky.
3357
3358         - make console messages produced by console.timeEnd() TimingMessageType & DebugMessageLevel;
3359         - add console filter for Debug messages;
3360
3361         * inspector/ConsoleMessage.cpp:
3362         (WebCore::messageTypeValue):
3363         * inspector/Inspector.json:
3364         * inspector/InspectorConsoleAgent.cpp:
3365         (WebCore::InspectorConsoleAgent::stopTiming):
3366         * inspector/front-end/ConsoleMessage.js:
3367         (WebInspector.ConsoleMessageImpl.prototype.toMessageElement):
3368         * inspector/front-end/ConsoleView.js:
3369         (WebInspector.ConsoleView.prototype.):
3370         (WebInspector.ConsoleView.prototype.filter):
3371         * inspector/front-end/inspector.css:
3372         (.console-warning-level, .console-error-level, .console-log-level, .console-debug-level):
3373         (.filter-all .console-debug-level, .filter-debug .console-debug-level):
3374         (.filter-all .console-debug-level.repeated-message, .filter-debug .console-debug-level.repeated-message):
3375         * page/ConsoleTypes.h:
3376
3377 2012-12-03  Sheriff Bot  <webkit.review.bot@gmail.com>
3378
3379         Unreviewed, rolling out r136444.
3380         http://trac.webkit.org/changeset/136444
3381         https://bugs.webkit.org/show_bug.cgi?id=103938
3382
3383         broke chromium build (Requested by zhenyao_wfh on #webkit).
3384
3385         * Target.pri:
3386         * platform/image-decoders/ImageDecoder.cpp:
3387
3388 2012-12-03  Pierre Rossi  <pierre.rossi@digia.com>
3389
3390         [Qt] Unreviewed build fix after r136410
3391
3392         When building without libjpeg, take JPEGImageDecoder's header out, since it now includes libjpeg.h.
3393
3394         * Target.pri: conditionally add JPEGImageDecoder.h to HEADERS
3395         * platform/image-decoders/ImageDecoder.cpp: guard JPEGImageDecoder.h's include
3396
3397 2012-11-30  James Simonsen  <simonjam@chromium.org>
3398
3399         [Resource Timing] Record and report initiator
3400         https://bugs.webkit.org/show_bug.cgi?id=103777
3401
3402         Reviewed by Nate Chapin.
3403
3404         This will start populating the Resource Timing buffer with entries. The initiator will be
3405         recorded for each CachedResourceLoader. This should match the next update of the spec.
3406
3407         Tests: http/tests/w3c/webperf/submission/resource-timing
3408
3409         * css/CSSFontSelector.cpp:
3410         (WebCore::CSSFontSelector::beginLoadTimerFired):
3411         * loader/ResourceLoadNotifier.cpp: Always record timing information if ENABLE(RESOURCE_TIMING).
3412         (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
3413         * loader/SubresourceLoader.cpp:
3414         (WebCore::SubresourceLoader::releaseResources): Report the actual resource that called loadDone().
3415         * loader/cache/CachedResourceLoader.cpp:
3416         (WebCore::CachedResourceLoader::loadResource): Record the initiator.
3417         (WebCore::CachedResourceLoader::loadDone): Record the entry in Resource Timing.
3418         * loader/cache/CachedResourceLoader.h:
3419         (CachedResourceLoader):
3420         (InitiatorInfo):
3421
3422 2012-12-03  Florin Malita  <fmalita@chromium.org>
3423
3424         [Skia] Deferred SkCanvas save()
3425         https://bugs.webkit.org/show_bug.cgi?id=102272
3426
3427         Reviewed by Stephen White.
3428
3429         Implement a lazy save() strategy: instead of delegating to the canvas upfront, defer and
3430         only commit when a clip/matrix mutation is observed.
3431
3432         The patch yields a 1-20% SkCanvas save/restore reduction for heavy pages, with much larger
3433         gains observed for deeply nested SVG content.
3434
3435         No new tests: no behaviour changes, coverage provided by existing tests.
3436
3437         * platform/graphics/skia/GraphicsContextSkia.cpp:
3438         (WebCore::GraphicsContext::canvasClip):
3439         * platform/graphics/skia/PlatformContextSkia.cpp:
3440         (WebCore):
3441         (WebCore::PlatformContextSkia::DeferredSaveState::DeferredSaveState):
3442         (PlatformContextSkia::DeferredSaveState):
3443         (WebCore::PlatformContextSkia::PlatformContextSkia):
3444         (WebCore::PlatformContextSkia::save):
3445         (WebCore::PlatformContextSkia::saveLayer):
3446         (WebCore::PlatformContextSkia::beginLayerClippedToImage):
3447         (WebCore::PlatformContextSkia::restore):
3448         (WebCore::PlatformContextSkia::applyClipFromImage):
3449         * platform/graphics/skia/PlatformContextSkia.h:
3450         (PlatformContextSkia):
3451         (WebCore::PlatformContextSkia::realizeSave):
3452         (WebCore):
3453         (WebCore::PlatformContextSkia::canvas):
3454         (WebCore::PlatformContextSkia::clipPath):
3455         (WebCore::PlatformContextSkia::clipRect):
3456         (WebCore::PlatformContextSkia::setMatrix):
3457         (WebCore::PlatformContextSkia::concat):
3458         (WebCore::PlatformContextSkia::rotate):
3459         (WebCore::PlatformContextSkia::scale):
3460         (WebCore::PlatformContextSkia::translate):
3461
3462 2012-12-03  Simon Fraser  <simon.fraser@apple.com>
3463
3464         When animating mask-postion on a composited layer, element renders incorrectly
3465         https://bugs.webkit.org/show_bug.cgi?id=103700
3466
3467         Reviewed by Tim Horton.
3468
3469         When a composited layer has a mask, we clipped the layer bounds to the
3470         size of the mask. This caused problems when animating the mask origin,
3471         which is considered a 'repaint' style change and so should not require
3472         layout or compositing geometry changes.
3473         
3474         Fix by ignoring the mask when computing the bounds of the compositing
3475         layer.
3476
3477         Test: compositing/masks/mask-layer-size.html
3478
3479         * rendering/RenderLayer.cpp:
3480         (WebCore::RenderLayer::localBoundingBox):
3481         (WebCore::RenderLayer::calculateLayerBounds):
3482         * rendering/RenderLayer.h:
3483         (RenderLayer):
3484         * rendering/RenderLayerCompositor.cpp:
3485         (WebCore::RenderLayerCompositor::calculateCompositedBounds):
3486
3487 2012-12-03  Xan Lopez  <xan@igalia.com>
3488
3489         [CSS Grid Layout] Support <percentage> and viewport-relative breadth sizes
3490         https://bugs.webkit.org/show_bug.cgi?id=103335
3491
3492         Reviewed by Julien Chaffraix.
3493
3494         Test: fast/css-grid-layout/breadth-size-resolution-grid.html
3495
3496         * css/CSSComputedStyleDeclaration.cpp:
3497         (WebCore::valueForGridTrackBreadth): Support the new types.
3498         (WebCore::valueForGridTrackMinMax): Modify the call to previous
3499         method, since the signature has changed.
3500         (WebCore::valueForGridTrackGroup): Ditto.
3501         (WebCore::valueForGridTrackList): Ditto.
3502         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Ditto.
3503         * rendering/RenderGrid.cpp:
3504         (WebCore::RenderGrid::computedUsedBreadthOfGridTracks): Suport
3505         percent and viewport relative types, calc() will be supported in a
3506         follow up (see bug #103761)
3507
3508 2012-12-03  Peter Rybin  <prybin@chromium.org>
3509
3510         Web Inspector: make ASSERTION FAILED: foundPropertiesCount == object->size() more useful
3511         https://bugs.webkit.org/show_bug.cgi?id=103254
3512