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