e57c5362914b6be619a9758d2f5460c78bfab386
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-02-04  Kentaro Hara  <haraken@chromium.org>
2
3         [V8] Reduce usage of deprecatedString() and deprecatedInteger()
4         https://bugs.webkit.org/show_bug.cgi?id=108909
5
6         Reviewed by Adam Barth.
7
8         By passing an Isolate parameter around, we can reduce usage of
9         deprecated methods.
10
11         No tests. No change in behavior.
12
13         * bindings/scripts/CodeGeneratorV8.pm:
14         (GenerateNormalAttrSetter):
15         (GenerateEventListenerCallback):
16         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
17         (WebCore::TestEventTargetV8Internal::addEventListenerCallback):
18         (WebCore::TestEventTargetV8Internal::removeEventListenerCallback):
19         * bindings/scripts/test/V8/V8TestObj.cpp:
20         (WebCore::TestObjV8Internal::addEventListenerCallback):
21         (WebCore::TestObjV8Internal::removeEventListenerCallback):
22         * bindings/v8/IDBBindingUtilities.cpp:
23         (WebCore::get):
24         (WebCore::set):
25         (WebCore::getNthValueOnKeyPath):
26         (WebCore::canInjectNthValueOnKeyPath):
27         (WebCore::ensureNthValueOnKeyPath):
28         (WebCore::createIDBKeyFromScriptValueAndKeyPath):
29         (WebCore::injectIDBKeyIntoScriptValue):
30         (WebCore::canInjectIDBKeyIntoScriptValue):
31         * bindings/v8/NPV8Object.cpp:
32         (WebCore::createValueListFromVariantArgs):
33         (_NPN_Invoke):
34         (_NPN_InvokeDefault):
35         (_NPN_SetProperty):
36         (_NPN_Construct):
37         * bindings/v8/ScriptController.cpp:
38         (WebCore::ScriptController::compileAndRunScript):
39         * bindings/v8/ScriptProfiler.cpp:
40         (WebCore):
41         (WebCore::ScriptProfiler::takeHeapSnapshot):
42         * bindings/v8/ScriptSourceCode.cpp:
43         (WebCore::ScriptSourceCode::compileScript):
44         * bindings/v8/ScriptSourceCode.h:
45         (ScriptSourceCode):
46         * bindings/v8/V8LazyEventListener.cpp:
47         (WebCore::V8LazyEventListener::prepareListenerObject):
48         * bindings/v8/V8NPObject.cpp:
49         (WebCore::npObjectInvokeImpl):
50         (WebCore::npObjectGetProperty):
51         * bindings/v8/V8NPUtils.cpp:
52         (WebCore::convertNPVariantToV8Object):
53         * bindings/v8/V8NPUtils.h:
54         (WebCore):
55         * bindings/v8/V8Utilities.cpp:
56         (WebCore::createHiddenDependency):
57         (WebCore::removeHiddenDependency):
58         (WebCore::transferHiddenDependency):
59         * bindings/v8/V8Utilities.h:
60         (WebCore):
61         * bindings/v8/WorkerScriptController.cpp:
62         (WebCore::WorkerScriptController::evaluate):
63         * bindings/v8/custom/V8DOMWindowCustom.cpp:
64         (WebCore::V8DOMWindow::addEventListenerCallback):
65         (WebCore::V8DOMWindow::removeEventListenerCallback):
66
67 2013-02-05  Kentaro Hara  <haraken@chromium.org>
68
69         [V8] Make an Isolate parameter mandatory in HasInstance()
70         https://bugs.webkit.org/show_bug.cgi?id=108917
71
72         Reviewed by Adam Barth.
73
74         No tests. No change in behavior.
75
76         * bindings/scripts/CodeGeneratorV8.pm:
77         (GenerateHeader):
78         (GenerateImplementation):
79         * bindings/scripts/test/V8/V8Float64Array.cpp:
80         (WebCore::V8Float64Array::HasInstance):
81         * bindings/scripts/test/V8/V8Float64Array.h:
82         (V8Float64Array):
83         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
84         (WebCore::V8TestActiveDOMObject::HasInstance):
85         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
86         (V8TestActiveDOMObject):
87         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
88         (WebCore::V8TestCustomNamedGetter::HasInstance):
89         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
90         (V8TestCustomNamedGetter):
91         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
92         (WebCore::V8TestEventConstructor::HasInstance):
93         * bindings/scripts/test/V8/V8TestEventConstructor.h:
94         (V8TestEventConstructor):
95         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
96         (WebCore::V8TestEventTarget::HasInstance):
97         * bindings/scripts/test/V8/V8TestEventTarget.h:
98         (V8TestEventTarget):
99         * bindings/scripts/test/V8/V8TestException.cpp:
100         (WebCore::V8TestException::HasInstance):
101         * bindings/scripts/test/V8/V8TestException.h:
102         (V8TestException):
103         * bindings/scripts/test/V8/V8TestInterface.cpp:
104         (WebCore::V8TestInterface::HasInstance):
105         * bindings/scripts/test/V8/V8TestInterface.h:
106         (V8TestInterface):
107         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
108         (WebCore::V8TestMediaQueryListListener::HasInstance):
109         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
110         (V8TestMediaQueryListListener):
111         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
112         (WebCore::V8TestNamedConstructor::HasInstance):
113         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
114         (V8TestNamedConstructor):
115         * bindings/scripts/test/V8/V8TestNode.cpp:
116         (WebCore::V8TestNode::HasInstance):
117         * bindings/scripts/test/V8/V8TestNode.h:
118         (V8TestNode):
119         * bindings/scripts/test/V8/V8TestObj.cpp:
120         (WebCore::V8TestObj::HasInstance):
121         * bindings/scripts/test/V8/V8TestObj.h:
122         (V8TestObj):
123         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
124         (WebCore::V8TestOverloadedConstructors::HasInstance):
125         * bindings/scripts/test/V8/V8TestOverloadedConstructors.h:
126         (V8TestOverloadedConstructors):
127         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
128         (WebCore::V8TestSerializedScriptValueInterface::HasInstance):
129         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
130         (V8TestSerializedScriptValueInterface):
131         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
132         (WebCore::toWebGLUniformLocation):
133
134 2013-02-05  Kentaro Hara  <haraken@chromium.org>
135
136         [JSC] Clean up CodeGeneratorJS.pm by introducing HasCustom{Getter,Setter,Method}
137         https://bugs.webkit.org/show_bug.cgi?id=108898
138
139         Reviewed by Sam Weinig.
140
141         No tests. No change in behavior.
142
143         * bindings/scripts/CodeGeneratorJS.pm:
144         (GenerateHeader):
145         (GenerateImplementation):
146         (HasCustomGetter):
147         (HasCustomSetter):
148         (HasCustomMethod):
149
150 2013-02-05  Dana Jansens  <danakj@chromium.org>
151
152         [chromium] Provide compositor offscreen context through the WebLayerTreeViewClient interface
153         https://bugs.webkit.org/show_bug.cgi?id=107776
154
155         Reviewed by James Robinson.
156
157         Allow the compositor thread's context to be retrieved on either thread,
158         so the main thread can create and pass the context to the impl thread
159         via its own mechanisms.
160
161         Move the code to bind the GrGLInterface to a WebGraphicsContext3D into
162         chromium's GraphicsContext3DPrivate. The chromium-side code will need
163         to implement this code itself.
164
165         * platform/chromium/support/GraphicsContext3DPrivate.cpp:
166         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
167         (WebCore):
168         (WebCore::GraphicsContext3DPrivate::grContext):
169         * platform/chromium/support/GraphicsContext3DPrivate.h:
170         * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
171         (WebCore::SharedGraphicsContext3D::getForImplThread):
172
173 2013-02-05  Tony Gentilcore  <tonyg@chromium.org>
174
175         Continue making XSSAuditor thread safe: Remove dependency on the parser's tokenizer
176         https://bugs.webkit.org/show_bug.cgi?id=108666
177
178         Reviewed by Adam Barth.
179
180         This is the final dependency on the parser, so we remove that as well. Yay!
181
182         No new tests because no new functionality.
183
184         * html/parser/HTMLDocumentParser.cpp:
185         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
186         (WebCore::HTMLDocumentParser::pumpTokenizer): Pass m_tokenizer->shouldAllowCDATA()
187         * html/parser/XSSAuditor.cpp:
188         (WebCore::XSSAuditor::XSSAuditor): Remove isMainThread() check because we have one in init() anyway.
189         Move m_isEnabled and m_documentURL initialization to init() because we have a Document* there.
190         (WebCore::XSSAuditor::init):
191         (WebCore::XSSAuditor::filterToken):
192         (WebCore::XSSAuditor::filterStartToken):
193         (WebCore::XSSAuditor::filterEndToken):
194         (WebCore::XSSAuditor::filterScriptToken):
195         (WebCore::XSSAuditor::decodedSnippetForJavaScript):
196         * html/parser/XSSAuditor.h:
197         (WebCore::FilterTokenRequest::FilterTokenRequest):
198         (FilterTokenRequest):
199         (XSSAuditor):
200
201 2013-02-05  Enrica Casucci  <enrica@apple.com>
202
203         Make baseWritingDirectionForSelectionStart available to all platforms in the Editor class.
204         https://bugs.webkit.org/show_bug.cgi?id=108977.
205
206         Reviewed by Ryosuke Niwa.
207         
208         Now that baseWritingDirectionForSelectionStart doesn't use
209         platform specific type anymore, we can make it available for
210         all platforms. This way it can be used for iOS as well.
211
212         No new tests, no functionality change.
213
214         * editing/Editor.cpp:
215         (WebCore::Editor::baseWritingDirectionForSelectionStart): Added.
216         * editing/Editor.h: Moved from PLATFORM(MAC).
217         * editing/mac/EditorMac.mm: baseWritingDirectionForSelectionStart removed.
218
219 2013-02-05  Benjamin Poulain  <bpoulain@apple.com>
220
221         Avoid String->AtomicString conversion in Attr::childrenChanged()
222         https://bugs.webkit.org/show_bug.cgi?id=108742
223
224         Reviewed by Andreas Kling.
225
226         * dom/Attr.cpp:
227         (WebCore::Attr::childrenChanged): StringBuilder can output AtomicString directly.
228
229 2013-02-05  Yusuf Ozuysal  <yusufo@google.com>
230
231         [chromium] Enable shouldGesturesTriggerActive for Android
232         https://bugs.webkit.org/show_bug.cgi?id=96948
233
234         Reviewed by James Robinson.
235
236         We need this to fix performance issues we are getting because of touchstart 
237         triggering hover/active states.
238
239         No new tests. The tests introduced in https://bugs.webkit.org/show_bug.cgi?id=96060
240         should run with the corrected behavior and would cover this change as well.
241
242         * page/EventHandler.cpp:
243         (WebCore::shouldGesturesTriggerActive):
244
245 2013-02-05  Mark Lam  <mark.lam@apple.com>
246
247         Introduced back-end database classes + a few small fixes.
248         https://bugs.webkit.org/show_bug.cgi?id=108759.
249
250         Reviewed by Brady Eidson.
251
252         1. Added DatabaseBackendContext, DatabaseBackendAsync, and DatabaseBackendSync.
253            These are backends for DatabaseContext, Database, and DatabaseSync
254            respectively.
255         2. Added DatabaseBase to hold common code between Database and DatabaseSync.
256         3. Renamed a few functions.
257         4. Cleaned up unneeded code in ~DatabaseSync().
258         5. Added some FIXMEs as reminders or places to clean up when we're done
259            refactoring.
260         6. Moved the calling of ScriptController::initializeThreading() from the Database
261            constructor to DatabaseManager::openDatabase(). This just moves the call
262            earlier in the same code path. System initialization work (i.e. initializing
263            script threading in this case) should be done by the manager instead of by
264            each Database instance.
265
266         No new tests.
267
268         * CMakeLists.txt:
269         * GNUmakefile.list.am:
270         * Modules/webdatabase/AbstractDatabaseServer.h:
271         (AbstractDatabaseServer):
272         * Modules/webdatabase/Database.cpp:
273         (WebCore::Database::Database):
274         (WebCore::Database::backend):
275         * Modules/webdatabase/Database.h:
276         (Database):
277         * Modules/webdatabase/DatabaseBackend.cpp:
278         (WebCore::DatabaseBackend::DatabaseBackend):
279         (WebCore::DatabaseBackend::~DatabaseBackend):
280         (WebCore::DatabaseBackend::incrementalVacuumIfNeeded):
281         * Modules/webdatabase/DatabaseBackend.h:
282         (DatabaseBackend):
283         (WebCore::DatabaseBackend::databaseContext):
284         (WebCore::DatabaseBackend::setFrontend):
285         * Modules/webdatabase/DatabaseBackendAsync.cpp: Added.
286         (WebCore::DatabaseBackendAsync::DatabaseBackendAsync):
287         * Modules/webdatabase/DatabaseBackendAsync.h: Added.
288         (DatabaseBackendAsync):
289         * Modules/webdatabase/DatabaseBackendContext.cpp: Added.
290         (WebCore::DatabaseBackendContext::securityOrigin):
291         (WebCore::DatabaseBackendContext::isContextThread):
292         * Modules/webdatabase/DatabaseBackendContext.h: Added.
293         (DatabaseBackendContext):
294         (WebCore::DatabaseBackendContext::scriptExecutionContext):
295         * Modules/webdatabase/DatabaseBackendSync.cpp: Added.
296         (WebCore::DatabaseBackendSync::DatabaseBackendSync):
297         (WebCore::DatabaseBackendSync::~DatabaseBackendSync):
298         * Modules/webdatabase/DatabaseBackendSync.h: Added.
299         (DatabaseBackendSync):
300         * Modules/webdatabase/DatabaseBase.cpp: Added.
301         (WebCore::DatabaseBase::DatabaseBase):
302         (WebCore::DatabaseBase::scriptExecutionContext):
303         (WebCore::DatabaseBase::logErrorMessage):
304         * Modules/webdatabase/DatabaseBase.h: Added.
305         (DatabaseBase):
306         * Modules/webdatabase/DatabaseContext.cpp:
307         (WebCore::DatabaseContext::DatabaseContext):
308         (WebCore::DatabaseContext::backend):
309         * Modules/webdatabase/DatabaseContext.h:
310         (DatabaseContext):
311         * Modules/webdatabase/DatabaseManager.cpp:
312         (WebCore::DatabaseManager::openDatabase):
313         (WebCore::DatabaseManager::openDatabaseSync):
314         (WebCore::DatabaseManager::hasOpenDatabases):
315         (WebCore::DatabaseManager::interruptAllDatabasesForContext):
316         (WebCore::DatabaseManager::getMaxSizeForDatabase):
317         (WebCore::DatabaseManager::logErrorMessage):
318         * Modules/webdatabase/DatabaseManager.h:
319         (DatabaseManager):
320         * Modules/webdatabase/DatabaseServer.cpp:
321         (WebCore::DatabaseServer::interruptAllDatabasesForContext):
322         (WebCore::DatabaseServer::canEstablishDatabase):
323         * Modules/webdatabase/DatabaseServer.h:
324         * Modules/webdatabase/DatabaseSync.cpp:
325         (WebCore::DatabaseSync::DatabaseSync):
326         (WebCore::DatabaseSync::~DatabaseSync):
327         (WebCore::DatabaseSync::backend):
328         * Modules/webdatabase/DatabaseSync.h:
329         (DatabaseSync):
330         * Modules/webdatabase/DatabaseTracker.cpp:
331         (WebCore::DatabaseTracker::openTrackerDatabase):
332         (WebCore::DatabaseTracker::canEstablishDatabase):
333         (WebCore::DatabaseTracker::hasEntryForDatabase):
334         (WebCore::DatabaseTracker::interruptAllDatabasesForContext):
335         (WebCore::DatabaseTracker::populateOriginsIfNeeded):
336         (WebCore::DatabaseTracker::databaseNamesForOriginNoLock):
337         (WebCore::DatabaseTracker::detailsForNameAndOrigin):
338         (WebCore::DatabaseTracker::setDatabaseDetails):
339         (WebCore::DatabaseTracker::usageForOriginNoLock):
340         (WebCore::DatabaseTracker::setQuota):
341         (WebCore::DatabaseTracker::addDatabase):
342         (WebCore::DatabaseTracker::deleteOrigin):
343         (WebCore::DatabaseTracker::isDeletingDatabaseOrOriginFor):
344         (WebCore::DatabaseTracker::canDeleteDatabase):
345         (WebCore::DatabaseTracker::isDeletingDatabase):
346         (WebCore::DatabaseTracker::canDeleteOrigin):
347         (WebCore::DatabaseTracker::isDeletingOrigin):
348         (WebCore::DatabaseTracker::recordDeletingOrigin):
349         (WebCore::DatabaseTracker::doneDeletingOrigin):
350         (WebCore::DatabaseTracker::deleteDatabase):
351         (WebCore::DatabaseTracker::deleteDatabaseFile):
352         * Modules/webdatabase/DatabaseTracker.h:
353         (DatabaseTracker):
354         * Modules/webdatabase/SQLTransaction.cpp:
355         * Modules/webdatabase/SQLTransactionClient.cpp:
356         (WebCore::SQLTransactionClient::didExceedQuota):
357         * Modules/webdatabase/SQLTransactionSync.cpp:
358         * Modules/webdatabase/chromium/DatabaseTrackerChromium.cpp:
359         (WebCore::DatabaseTracker::canEstablishDatabase):
360         (WebCore::DatabaseTracker::removeOpenDatabase):
361         (WebCore::DatabaseTracker::prepareToOpenDatabase):
362         (WebCore::DatabaseTracker::failedToOpenDatabase):
363         (WebCore::DatabaseTracker::interruptAllDatabasesForContext):
364         (WebCore::DatabaseTracker::closeDatabasesImmediately):
365         * Modules/webdatabase/chromium/SQLTransactionClientChromium.cpp:
366         (WebCore::SQLTransactionClient::didCommitWriteTransaction):
367         (WebCore::SQLTransactionClient::didExceedQuota):
368         * Target.pri:
369         * WebCore.gypi:
370         * WebCore.vcproj/WebCore.vcproj:
371         * WebCore.vcxproj/WebCore.vcxproj:
372         * WebCore.vcxproj/WebCore.vcxproj.filters:
373         * WebCore.xcodeproj/project.pbxproj:
374
375 2013-02-05  Nayan Kumar K  <nayankk@motorola.com>
376
377         [WEBGL] Rename WEBKIT_WEBGL_depth_texture to WEBGL_depth_texture.
378         https://bugs.webkit.org/show_bug.cgi?id=108959
379
380         Reviewed by Kenneth Russell.
381
382         WEBGL_depth_texture is official now. Hence remove the vendor prefix from
383         WEBKIT_WEBGL_depth_texture and rename this extension string to WEBGL_depth_texture.
384         Specification: http://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/.
385
386         Tests already exists, modified them to test querying of unprefixed extension string.
387
388         * bindings/js/JSWebGLRenderingContextCustom.cpp:
389         (WebCore::toJS):
390         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
391         (WebCore::toV8Object):
392         * html/canvas/WebGLDepthTexture.cpp:
393         (WebCore::WebGLDepthTexture::getName):
394         * html/canvas/WebGLExtension.h:
395         * html/canvas/WebGLRenderingContext.cpp:
396         (WebCore):
397         (WebCore::WebGLRenderingContext::getExtension):
398
399 2013-02-05  Sheriff Bot  <webkit.review.bot@gmail.com>
400
401         Unreviewed, rolling out r141905.
402         http://trac.webkit.org/changeset/141905
403         https://bugs.webkit.org/show_bug.cgi?id=108963
404
405         "Broke mac build" (Requested by tonyg-cr on #webkit).
406
407         * html/parser/BackgroundHTMLParser.cpp:
408         (WebCore::BackgroundHTMLParser::pumpTokenizer):
409         * html/parser/CompactHTMLToken.cpp:
410         (SameSizeAsCompactHTMLToken):
411         (WebCore::isStringSafeToSendToAnotherThread):
412         (WebCore::CompactHTMLToken::isSafeToSendToAnotherThread):
413         * html/parser/CompactHTMLToken.h:
414         (WebCore):
415         (CompactHTMLToken):
416         * html/parser/HTMLDocumentParser.cpp:
417         (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
418         (WebCore::HTMLDocumentParser::pumpTokenizer):
419         * html/parser/XSSAuditor.cpp:
420         (WebCore::XSSAuditor::filterToken):
421         * html/parser/XSSAuditor.h:
422         (WebCore):
423         (XSSAuditor):
424         * html/parser/XSSAuditorDelegate.cpp:
425         (WebCore::XSSAuditorDelegate::didBlockScript):
426         * html/parser/XSSAuditorDelegate.h:
427         (WebCore::DidBlockScriptRequest::create):
428         (WebCore::DidBlockScriptRequest::DidBlockScriptRequest):
429         (XSSAuditorDelegate):
430         * platform/KURL.cpp:
431         * platform/KURL.h:
432         (KURL):
433         * platform/KURLGoogle.cpp:
434         (WebCore::KURLGooglePrivate::reportMemoryUsage):
435         * platform/KURLGooglePrivate.h:
436         (KURLGooglePrivate):
437         * platform/KURLWTFURLImpl.h:
438         (WebCore::KURLWTFURLImpl::reportMemoryUsage):
439
440 2013-02-05  Dominik Röttsches  <dominik.rottsches@intel.com>
441
442         [HarfBuzz][Cairo] harfBuzzGetGlyph is slow and hot
443         https://bugs.webkit.org/show_bug.cgi?id=108941
444
445         Reviewed by Kenneth Rohde Christiansen.
446
447         The text to glyph conversion using Cairo is slow
448         due to expensive text codec conversion to UTF-8.
449         Additionally, the glyph lookup itself is expensive.
450
451         Inspired by the approach taken in HarfBuzzFaceSkia.cpp
452         I suggest to implement a similar caching mechanism to
453         accelerate this conversion.
454
455         Arabic line breaking test, under review in
456         bug 108948 shows about 58% improvement on my system
457         with this patch.
458
459         * platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp:
460         (WebCore::HarfBuzzFontData::HarfBuzzFontData):
461             New container structure that keeps pointers
462             to the cairo scaled font as well as the glyph cache.
463         (HarfBuzzFontData):
464         (WebCore):
465         (WebCore::harfBuzzGetGlyph): Using the new container structure for accessing the cache.
466         (WebCore::harfBuzzGetGlyphHorizontalAdvance): Using the new container structure for accessing the scaled font.
467         (WebCore::harfBuzzGetGlyphExtents): Ditto.
468         (WebCore::destroyHarfBuzzFontData): Destroying the container that held the pointers.
469         (WebCore::HarfBuzzFace::createFont):
470             Initializing the container structure with the pointers
471             to the cache that is held in HarfBuzzFace and the cairo scaled font.
472
473 2013-02-05  Tony Gentilcore  <tonyg@chromium.org>
474
475         Call XSSAuditor's didBlockScript() for the threaded HTML parser
476         https://bugs.webkit.org/show_bug.cgi?id=108726
477
478         Reviewed by Adam Barth.
479
480         This patch causes us to call didBlockScript() on the main thread if the CompactHTML token has XSSInfo.
481         To do so, we:
482         1. Rename DidBlockScriptRequest to XSSInfo.
483         2. Add an OwnPtr<XSSInfo> field to CompactHTMLToken.
484         3. Add an isSafeToSendToAnotherThread() method to String and KURL.
485
486         We don't yet populate didBlockScriptRequest on the background thread, but this should just work once we do.
487
488         No new tests because no new functionality.
489
490         * html/parser/BackgroundHTMLParser.cpp:
491         (WebCore::BackgroundHTMLParser::pumpTokenizer): Update comment for rename.
492         * html/parser/CompactHTMLToken.cpp:
493         (SameSizeAsCompactHTMLToken):
494         (WebCore::CompactHTMLToken::CompactHTMLToken): Add a copy constructor used by Vector.
495         (WebCore::CompactHTMLToken::isSafeToSendToAnotherThread): Include new m_xssInfo field in safety check.
496         (WebCore):
497         (WebCore::CompactHTMLToken::xssInfo): Added.
498         (WebCore::CompactHTMLToken::setXSSInfo): Added.
499         * html/parser/CompactHTMLToken.h: Add an OwnPtr<XSSInfo> field to CompactHTMLToken.
500         (WebCore):
501         (CompactHTMLToken):
502         (WTF): Add VectorTraits necessary for copying Vector fields objects that contain an OwnPtr.
503         * html/parser/HTMLDocumentParser.cpp:
504         (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser): Add new didBlockScript() call.
505         (WebCore::HTMLDocumentParser::pumpTokenizer):
506         * html/parser/XSSAuditor.cpp: Renaming.
507         (WebCore::XSSAuditor::filterToken):
508         * html/parser/XSSAuditor.h: Renaming.
509         (WebCore):
510         (XSSAuditor):
511         * html/parser/XSSAuditorDelegate.cpp:
512         (WebCore::XSSInfo::isSafeToSendToAnotherThread):
513         (WebCore):
514         (WebCore::XSSAuditorDelegate::didBlockScript):
515         * html/parser/XSSAuditorDelegate.h:
516         (WebCore::XSSInfo::create):
517         (XSSInfo):
518         (WebCore::XSSInfo::XSSInfo):
519         (XSSAuditorDelegate):
520         * platform/KURL.cpp:
521         (WebCore::KURL::isSafeToSendToAnotherThread): Added.
522         (WebCore):
523         * platform/KURL.h:
524         (KURL):
525         * platform/KURLGoogle.cpp:
526         (WebCore):
527         (WebCore::KURLGooglePrivate::isSafeToSendToAnotherThread): Added.
528         * platform/KURLGooglePrivate.h:
529         (KURLGooglePrivate):
530         * platform/KURLWTFURLImpl.h:
531         (WebCore::KURLWTFURLImpl::isSafeToSendToAnotherThread): Added.
532
533 2013-02-05  Anton Vayvod  <avayvod@chromium.org>
534
535         TextAutosizing: adjust the maximum difference between cluster text width and its descendant
536         width.
537         https://bugs.webkit.org/show_bug.cgi?id=108411
538
539         Currently, if a render object is more than 200 CSS units shorter than its parent cluster, it
540         becomes a separate autosizing cluster (see https://bugs.webkit.org/show_bug.cgi?id=105188).
541         This doesn't work well for layouts when narrow nodes are related, like nested comments:
542         deeper comments are all shorter than the parent cluster and become autosized differently. To
543         avoid that the difference that makes a shorter descendant a new autosizing cluster is
544         adjusted each time the width difference is not greater than 50 CSS units from the previous
545         one. This allows nested comments, for example, to remain a part of the parent cluster and be
546         autosized with the same multiplier.
547         
548         Reviewed by Kenneth Rohde Christiansen.
549
550         Tests:
551                 fast/text-autosizing/nested-child.html
552
553         * rendering/TextAutosizer.cpp:
554         (WebCore::TextAutosizingClusterInfo::TextAutosizingClusterInfo):
555
556             Added a new field to store the current maximum width difference for the cluster.
557
558         (WebCore::TextAutosizer::isAutosizingCluster):
559
560             Uses the new field to determine if the current node is a separate cluster,
561             updates the maximum allowed width difference between the cluster and its descendant.
562
563         (WebCore::TextAutosizer::processContainer):
564         (WebCore::TextAutosizer::clusterShouldBeAutosized):
565         (WebCore::TextAutosizer::measureDescendantTextWidth):
566
567             Non-const reference passed to the methods above.
568
569         * rendering/TextAutosizer.h: updated method parameters.
570
571 2013-02-05  Tony Gentilcore  <tonyg@chromium.org>
572
573         Continue making XSSAuditor thread safe: Remove dependency on parser's sourceForToken and TextResourceDecoder
574         https://bugs.webkit.org/show_bug.cgi?id=108698
575
576         Reviewed by Adam Barth.
577
578         We'd like to be able to call filterToken() from the BackgroundHTMLParser where there is no HTMLDocumentParser. So we are removing the dependencies of
579         filterToken() on the HTMLDocumentParser. This patch brings us one step closer to removing the m_parser member from XSSAuditor by passing in the
580         TextResourceDecoder and HTMLSourceTracker to filterToken. To keep the number of parameters from blowing up, this introduces a FilterTokenRequest struct
581         to hold its arguments. We expect to add one more member to this struct.
582
583
584         No new tests because no new functionality.
585
586         * html/parser/HTMLDocumentParser.cpp:
587         (WebCore::HTMLDocumentParser::pumpTokenizer):
588         * html/parser/HTMLDocumentParser.h:
589         * html/parser/XSSAuditor.cpp:
590         (WebCore::XSSAuditor::filterToken):
591         (WebCore::XSSAuditor::filterStartToken):
592         (WebCore::XSSAuditor::filterCharacterToken):
593         (WebCore::XSSAuditor::filterScriptToken):
594         (WebCore::XSSAuditor::filterObjectToken):
595         (WebCore::XSSAuditor::filterParamToken):
596         (WebCore::XSSAuditor::filterEmbedToken):
597         (WebCore::XSSAuditor::filterAppletToken):
598         (WebCore::XSSAuditor::filterIframeToken):
599         (WebCore::XSSAuditor::filterMetaToken):
600         (WebCore::XSSAuditor::filterBaseToken):
601         (WebCore::XSSAuditor::filterFormToken):
602         (WebCore::XSSAuditor::eraseDangerousAttributesIfInjected):
603         (WebCore::XSSAuditor::eraseAttributeIfInjected):
604         (WebCore::XSSAuditor::decodedSnippetForName):
605         (WebCore::XSSAuditor::decodedSnippetForAttribute):
606         (WebCore::XSSAuditor::decodedSnippetForJavaScript):
607         * html/parser/XSSAuditor.h:
608         (WebCore):
609         (WebCore::FilterTokenRequest::FilterTokenRequest):
610         (FilterTokenRequest):
611         (XSSAuditor):
612
613 2013-02-05  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
614
615         [Qt] REGRESSION(r137436): It made all inspector tests timeout on developer builds
616         https://bugs.webkit.org/show_bug.cgi?id=106554
617
618         Reviewed by Simon Hausmann.
619
620         * Target.pri:
621
622 2013-02-05  Peter Rybin  <prybin@chromium.org>
623
624         Web Inspector: prevent crash, add required error string value
625         https://bugs.webkit.org/show_bug.cgi?id=108776
626
627         Reviewed by Pavel Feldman.
628
629         Error string is assigned where missing, assert is added where empty string is
630         possible.
631
632         * inspector/InjectedScriptBase.cpp:
633         (WebCore::InjectedScriptBase::makeEvalCall):
634         * inspector/PageRuntimeAgent.cpp:
635         (WebCore::PageRuntimeAgent::injectedScriptForEval):
636
637 2013-02-05  Eugene Klyuchnikov  <eustas@chromium.org>
638
639         Web Inspector: Clicking a profile's title in the console loads about:blank.
640         https://bugs.webkit.org/show_bug.cgi?id=107949
641
642         Reviewed by Vsevolod Vlasov.
643
644         Quick fix for regression.
645
646         * inspector/front-end/inspector.js:
647         Avoid "exit route" when URL is a profile URL.
648
649 2013-02-05  Kent Tamura  <tkent@chromium.org>
650
651         INPUT_MULTIPLE_FIELDS_UI: element.focus() should not focus on disabled sub-fields.
652         https://bugs.webkit.org/show_bug.cgi?id=108924
653
654         Reviewed by Kentaro Hara.
655
656         The first field may be non-focusable. We should search sub-fields for
657         focusable one.
658
659         Test: fast/forms/date-multiple-fields/date-multiple-fields-focus.html
660
661         * html/shadow/DateTimeEditElement.cpp:
662         (WebCore::DateTimeEditElement::focusOnNextFocusableField):
663         Added. A private helper function.
664         (WebCore::DateTimeEditElement::focusIfNoFocus): Use focusOnNextFocusableField.
665         (WebCore::DateTimeEditElement::focusByOwner): Ditto.
666         (WebCore::DateTimeEditElement::focusOnNextField): Ditto.
667         * html/shadow/DateTimeEditElement.h:
668         (DateTimeEditElement): Declare focusOnNextFocusableField.
669
670 2013-02-04  Vsevolod Vlasov  <vsevik@chromium.org>
671
672         Web Inspector: Create separate project for each file system added to inspector.
673         https://bugs.webkit.org/show_bug.cgi?id=108652
674
675         Reviewed by Pavel Feldman.
676
677         Every file system added to web inspector is now represented by its own project in workspace.
678         FileSystemMapping changed accrodingly.
679
680         Test: inspector/file-system-mapping.html
681
682         * inspector/front-end/FileMapping.js:
683         (WebInspector.FileMapping.prototype._entryURIPrefix):
684         * inspector/front-end/FileSystemMapping.js:
685         (WebInspector.FileSystemMapping.prototype.fileForURI):
686         (WebInspector.FileSystemMapping.prototype.uriForFile):
687         (WebInspector.FileSystemMapping.prototype.uriPrefixForPathPrefix):
688         (WebInspector.FileSystemMappingImpl):
689         (WebInspector.FileSystemMappingImpl.prototype._loadFromSettings.get this):
690         (WebInspector.FileSystemMappingImpl.prototype._loadFromSettings):
691         (WebInspector.FileSystemMappingImpl.prototype._saveToSettings):
692         (WebInspector.FileSystemMappingImpl.prototype.set _fileSystemName):
693         (WebInspector.FileSystemMappingImpl.prototype.fileSystemId):
694         (WebInspector.FileSystemMappingImpl.prototype.addFileSystemMapping):
695         (WebInspector.FileSystemMappingImpl.prototype.removeFileSystemMapping):
696         (WebInspector.FileSystemMappingImpl.prototype.fileSystemPaths):
697         (WebInspector.FileSystemMappingImpl.prototype.fileForURI):
698         (WebInspector.FileSystemMappingImpl.prototype.uriForFile):
699         (WebInspector.FileSystemMappingImpl.prototype.uriPrefixForPathPrefix):
700         * inspector/front-end/FileSystemWorkspaceProvider.js:
701         (WebInspector.FileSystemWorkspaceProvider):
702         (WebInspector.FileSystemWorkspaceProvider.prototype.innerCallback):
703         (WebInspector.FileSystemWorkspaceProvider.prototype.requestFileContent):
704         (WebInspector.FileSystemWorkspaceProvider.prototype.setFileContent):
705         (WebInspector.FileSystemWorkspaceProvider.prototype._populate.filesLoaded):
706         (WebInspector.FileSystemWorkspaceProvider.prototype._populate):
707         (WebInspector.FileSystemWorkspaceProvider.prototype._addFile):
708         (WebInspector.FileSystemWorkspaceProvider.prototype._removeFile):
709         (WebInspector.FileSystemWorkspaceProvider.prototype.reset):
710         * inspector/front-end/IsolatedFileSystemModel.js:
711         (WebInspector.IsolatedFileSystemModel):
712         (WebInspector.IsolatedFileSystemModel.prototype._innerAddFileSystem):
713         (WebInspector.IsolatedFileSystemModel.prototype._fileSystemRemoved):
714         * inspector/front-end/Workspace.js:
715         (WebInspector.Project.prototype.searchInFileContent):
716         (WebInspector.Project.prototype.dispose):
717         (WebInspector.Workspace.prototype.removeProject):
718
719 2013-02-05  Kent Tamura  <tkent@chromium.org>
720
721         INPUT_MULTIPLE_FIELDS_UI: Should not move focus if the element already has focus
722         https://bugs.webkit.org/show_bug.cgi?id=108914
723
724         Reviewed by Kentaro Hara.
725
726         If timeInput.focus() is called when a sub-field of the time input
727         already has focus, we should not focus on the first sub-field of the
728         time input.
729
730         Test: fast/forms/time-multiple-fields/time-multiple-fields-focus.html
731
732         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
733         (WebCore::BaseMultipleFieldsDateAndTimeInputType::willCancelFocus): If
734         the input elment already has focused sub-field, we don't need to proceed
735         focus handling. FocusDirection check is required because we don't need
736         to do this in cases of sequential focus navigation.
737         * html/BaseMultipleFieldsDateAndTimeInputType.h:
738         (BaseMultipleFieldsDateAndTimeInputType): Override InputType::willCancelFocus.
739
740         * html/HTMLInputElement.cpp:
741         (WebCore::HTMLInputElement::focus):
742         Cancel focus if InputType::willCancelFocus returns true.
743         * html/HTMLInputElement.h:
744         (HTMLInputElement): Override focus.
745         * html/InputType.cpp:
746         (WebCore::InputType::willCancelFocus):
747         Add a default implementation. It returns false.
748         * html/InputType.h:
749         (InputType): Declare willCancelFocus.
750
751 2013-02-05  Allan Sandfeld Jensen  <allan.jensen@digia.com>
752
753         [Qt] RGB -> BGR is wrong on big endian
754         https://bugs.webkit.org/show_bug.cgi?id=107560
755
756         Reviewed by Jocelyn Turcotte.
757
758         Replace the conversion to methods that make it clearer what is going on.
759         The routines are also optimized compared to the existing by avoiding going
760         over slow Color constructor.
761
762         Tested by existing tests in canvas and fast/canvas.
763
764         * platform/graphics/Color.cpp:
765         (WebCore::colorFromPremultipliedARGB):
766             Cleanup.
767         (WebCore::premultipliedARGBFromColor):
768             Cleanup and correct for alpha = 0.
769         * platform/graphics/Color.h:
770         (WebCore):
771         * platform/graphics/qt/ImageBufferQt.cpp:
772         (WebCore::copyColorToRGBA):
773         (WebCore::copyRGBAToColor):
774         (WebCore::getImageData):
775         (WebCore::ImageBuffer::putByteArray):
776
777 2013-02-05  JungJik Lee  <jungjik.lee@samsung.com>
778
779         [TexMap] Use visible as initial value of backface-visibility-property.
780         https://bugs.webkit.org/show_bug.cgi?id=108875
781
782         Reviewed by Noam Rosenthal.
783
784         According to W3C spec, the initial value of backface-visibility-visibility is visible.
785         However TextureMapperLayer's initial value is false which means hidden.
786         So this patch is for changing the value to visible(true).
787
788         Covered by existing tests.
789
790         * platform/graphics/texmap/TextureMapperLayer.h:
791         (WebCore::TextureMapperLayer::State::State): Change the initial value false to true
792         to use backface-visibility.
793
794 2013-02-05  Andrey Adaikin  <aandrey@chromium.org>
795
796         Web Inspector: [Canvas] do not store a dropped trace log in backend
797         https://bugs.webkit.org/show_bug.cgi?id=108600
798
799         Reviewed by Pavel Feldman.
800
801         Clear memory immediately on dropping current trace log instead of waiting for the next capture command.
802
803         * inspector/InjectedScriptCanvasModuleSource.js:
804         (.):
805
806 2013-02-05  Andrey Adaikin  <aandrey@chromium.org>
807
808         Web Inspector: [Canvas] UI is not restored properly when deleting a live recording profile
809         https://bugs.webkit.org/show_bug.cgi?id=108602
810
811         Reviewed by Pavel Feldman.
812
813         Cancel recording profile of canvas-type when deleting an alive trace log.
814         Drive-by: rename ProfileHeader.reset to ProfileHeader.dispose since it's called on header's destruction.
815
816         * inspector/front-end/CanvasProfileView.js:
817         (WebInspector.CanvasProfileHeader.prototype.dispose):
818         * inspector/front-end/ProfilesPanel.js:
819         (WebInspector.ProfileHeader.prototype.dispose):
820         (WebInspector.ProfilesPanel.prototype._reset):
821         (WebInspector.ProfilesPanel.prototype._removeProfileHeader):
822         (WebInspector.ProfilesPanel.prototype.setRecordingProfile):
823
824 2013-02-05  Julien Brianceau  <jbrianceau@nds.com>
825
826         Build is broken since r141543 for platforms without OpenGL
827         https://bugs.webkit.org/show_bug.cgi?id=108862
828
829         Reviewed by Simon Hausmann.
830
831         * Target.pri:
832
833 2013-02-05  Kentaro Hara  <haraken@chromium.org>
834
835         Unreviewed, rolling out r141865.
836         http://trac.webkit.org/changeset/141865
837         https://bugs.webkit.org/show_bug.cgi?id=108909
838
839         webkit unit tests are broken
840
841         * bindings/scripts/CodeGeneratorV8.pm:
842         (GenerateNormalAttrSetter):
843         (GenerateEventListenerCallback):
844         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
845         (WebCore::TestEventTargetV8Internal::addEventListenerCallback):
846         (WebCore::TestEventTargetV8Internal::removeEventListenerCallback):
847         * bindings/scripts/test/V8/V8TestObj.cpp:
848         (WebCore::TestObjV8Internal::addEventListenerCallback):
849         (WebCore::TestObjV8Internal::removeEventListenerCallback):
850         * bindings/v8/IDBBindingUtilities.cpp:
851         (WebCore::get):
852         (WebCore::set):
853         (WebCore::getNthValueOnKeyPath):
854         (WebCore::canInjectNthValueOnKeyPath):
855         (WebCore::ensureNthValueOnKeyPath):
856         (WebCore::createIDBKeyFromScriptValueAndKeyPath):
857         (WebCore::injectIDBKeyIntoScriptValue):
858         (WebCore::canInjectIDBKeyIntoScriptValue):
859         * bindings/v8/NPV8Object.cpp:
860         (WebCore::createValueListFromVariantArgs):
861         (_NPN_Invoke):
862         (_NPN_InvokeDefault):
863         (_NPN_SetProperty):
864         (_NPN_Construct):
865         * bindings/v8/ScriptController.cpp:
866         (WebCore::ScriptController::compileAndRunScript):
867         * bindings/v8/ScriptProfiler.cpp:
868         (WebCore::ScriptProfiler::takeHeapSnapshot):
869         * bindings/v8/ScriptSourceCode.cpp:
870         (WebCore::ScriptSourceCode::compileScript):
871         * bindings/v8/ScriptSourceCode.h:
872         (ScriptSourceCode):
873         * bindings/v8/V8LazyEventListener.cpp:
874         (WebCore::V8LazyEventListener::prepareListenerObject):
875         * bindings/v8/V8NPObject.cpp:
876         (WebCore::npObjectInvokeImpl):
877         (WebCore::npObjectGetProperty):
878         * bindings/v8/V8NPUtils.cpp:
879         (WebCore::convertNPVariantToV8Object):
880         * bindings/v8/V8NPUtils.h:
881         (WebCore):
882         * bindings/v8/V8Utilities.cpp:
883         (WebCore::createHiddenDependency):
884         (WebCore::removeHiddenDependency):
885         (WebCore::transferHiddenDependency):
886         * bindings/v8/V8Utilities.h:
887         (WebCore):
888         * bindings/v8/WorkerScriptController.cpp:
889         (WebCore::WorkerScriptController::evaluate):
890         * bindings/v8/custom/V8DOMWindowCustom.cpp:
891         (WebCore::V8DOMWindow::addEventListenerCallback):
892         (WebCore::V8DOMWindow::removeEventListenerCallback):
893
894 2013-02-05  Mike West  <mkwst@chromium.org>
895
896         Cleanup: Use exceptionless Range::* methods rather than ignoring exceptions.
897         https://bugs.webkit.org/show_bug.cgi?id=108773
898
899         Reviewed by Darin Adler.
900
901         We often call Range::{start,end}{Container,Offset} with an ExceptionCode
902         that's completely ignored. In these cases, we should simply use the
903         exceptionless version of the method instead.
904
905         * dom/DocumentMarkerController.cpp:
906         (WebCore::DocumentMarkerController::addMarker):
907             Here, I also moved parameters onto one line to make the
908             stylebot happy.
909         (WebCore::DocumentMarkerController::addTextMatchMarker):
910         (WebCore::DocumentMarkerController::setMarkersActive):
911             Dropped ignored ExceptionCode variable entirely.
912         * accessibility/AccessibilityRenderObject.cpp:
913         (WebCore::AccessibilityRenderObject::visiblePositionForIndex):
914             Can't drop the variable because of the selectNodeContents call.
915         * editing/Editor.cpp:
916         (WebCore::Editor::canDeleteRange):
917             Dropped ignored ExceptionCode variable entirely.
918         (WebCore::Editor::advanceToNextMisspelling):
919             Can't drop the variable because of setStart/setEnd.
920         * editing/EditorCommand.cpp:
921         (WebCore::unionDOMRanges):
922             Can't drop the variable because of compareBoundaryPoints.
923         * editing/MarkupAccumulator.cpp:
924         (WebCore::MarkupAccumulator::appendNodeValue):
925             Dropped ignored ExceptionCode variable entirely.
926         * editing/TextCheckingHelper.cpp:
927         (WebCore::TextCheckingParagraph::offsetAsRange):
928         (WebCore::TextCheckingHelper::findFirstMisspelling):
929         (WebCore::TextCheckingHelper::findFirstGrammarDetail):
930         (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar):
931         * editing/markup.cpp:
932         (WebCore::StyledMarkupAccumulator::renderedText):
933         (WebCore::StyledMarkupAccumulator::stringValueForRange):
934             Dropped ignored ExceptionCode variable entirely.
935         * editing/visible_units.cpp:
936         (WebCore::previousBoundary):
937             Can't drop the variable due to many other calls.
938         * page/DOMSelection.cpp:
939         (WebCore::DOMSelection::deleteFromDocument):
940         (WebCore::DOMSelection::containsNode):
941             For both these cases, the 'ASSERT(!ec)' after the statement I've
942             edited only checked the last occurance of the exception: that is,
943             if 'startXxx(ec)' threw an exception, it would be overwritten by
944             the 'setBaseAndExtend()' or 'compareBoundaryPoints()' exception.
945             Removing the exception parameters from the parameters' calls
946             shouldn't effect behavior.
947         * platform/chromium/PasteboardChromium.cpp:
948         (WebCore::Pasteboard::writeSelection):
949         * platform/mac/HTMLConverter.mm:
950         (+[WebHTMLConverter editingAttributedStringFromRange:]):
951         * platform/win/ClipboardWin.cpp:
952         (WebCore::ClipboardWin::writeRange):
953         * platform/win/PasteboardWin.cpp:
954         (WebCore::Pasteboard::writeSelection):
955         * platform/wince/PasteboardWinCE.cpp:
956         (WebCore::Pasteboard::writeSelection):
957             Dropped ignored ExceptionCode variable entirely.
958
959 2013-02-05  Yury Semikhatsky  <yurys@chromium.org>
960
961         Web Inspector:  introduce Memory.getDOMCounters
962         https://bugs.webkit.org/show_bug.cgi?id=108822
963
964         Reviewed by Pavel Feldman.
965
966         Introduced Memory.getDOMCounters command that returns number of Documents, Nodes
967         and JS event listeners in the inspected process.
968
969         * inspector/Inspector.json:
970         * inspector/InspectorMemoryAgent.cpp:
971         (WebCore::InspectorMemoryAgent::getDOMCounters):
972         (WebCore):
973         * inspector/InspectorMemoryAgent.h:
974         (InspectorMemoryAgent):
975
976 2013-02-04  Ilya Tikhonovsky  <loislo@chromium.org>
977
978         Web Inspector: Native Memory Instrumentation: rename Image m_data member to m_encodedImageData for the consistency
979         https://bugs.webkit.org/show_bug.cgi?id=108913
980
981         Reviewed by Yury Semikhatsky.
982
983         No new tests because no API changes.
984
985         * platform/graphics/Image.cpp:
986         (WebCore::Image::setData):
987         (WebCore::Image::reportMemoryUsage):
988         * platform/graphics/Image.h:
989         (WebCore::Image::data):
990         (Image):
991
992 2013-02-05  Hajime Morrita  <morrita@google.com>
993
994         Unreviewed Linux ASAN build fix for r141783.
995
996         * platform/RefCountedSupplement.h:
997         (Wrapper):
998         * platform/Supplementable.h:
999         (Supplement):
1000
1001 2013-02-05  Mike West  <mkwst@chromium.org>
1002
1003         [chromium] Unreviewed: Fix broken SVG-disabled build.
1004         https://bugs.webkit.org/show_bug.cgi?id=108916
1005
1006         The new enum value CSSPropertyWebkitGridAutoFlow was introduced in
1007         r141787, and accidentally left out of CSSParser::parseValue's big
1008         switch. This causes problems in non-SVG builds.
1009
1010         * css/CSSParser.cpp:
1011         (WebCore::CSSParser::parseValue):
1012
1013 2013-02-05  Tommy Widenflycht  <tommyw@google.com>
1014
1015         MediaStream API: Update RTCPeerConnections stream accessors to match the latest specification
1016         https://bugs.webkit.org/show_bug.cgi?id=108179
1017
1018         Reviewed by Adam Barth.
1019
1020         http://dev.w3.org/2011/webrtc/editor/webrtc.html#interface-definition
1021         The attributes localStreams and remoteStreams have been changes to the methods
1022         getLocalStreams() and getRemoteStreams() which return a native array instead.
1023
1024         Existing tests updated to cover patch.
1025
1026         * CMakeLists.txt:
1027         * GNUmakefile.list.am:
1028         * Modules/mediastream/MediaStream.h:
1029         (WebCore):
1030         * Modules/mediastream/MediaStreamList.cpp: Removed.
1031         * Modules/mediastream/MediaStreamList.h: Removed.
1032         * Modules/mediastream/MediaStreamList.idl: Removed.
1033         * Modules/mediastream/RTCPeerConnection.cpp:
1034         (WebCore::RTCPeerConnection::RTCPeerConnection):
1035         (WebCore::RTCPeerConnection::addStream):
1036         (WebCore::RTCPeerConnection::removeStream):
1037         (WebCore::RTCPeerConnection::getLocalStreams):
1038         (WebCore::RTCPeerConnection::getRemoteStreams):
1039         (WebCore::RTCPeerConnection::didAddRemoteStream):
1040         (WebCore::RTCPeerConnection::didRemoveRemoteStream):
1041         * Modules/mediastream/RTCPeerConnection.h:
1042         (RTCPeerConnection):
1043         * Modules/mediastream/RTCPeerConnection.idl:
1044         * WebCore.gypi:
1045
1046 2013-02-05  Viatcheslav Ostapenko  <sl.ostapenko@samsung.com>
1047
1048         [Qt][EFL][WebGL] Webgl doesn't work on nvidia cards
1049         https://bugs.webkit.org/show_bug.cgi?id=108059
1050
1051         Reviewed by Kenneth Rohde Christiansen.
1052
1053         Commit r138327 fixed repainting issues on mesa3d GL library by re-binding
1054         texture to the window after every glXSwapBuffer. Unfortunatelly re-bind
1055         breaks rendering on NVidia cards with NVidia propiertary drivers.
1056         This change limits texture re-binding only for mesa3d GL library.
1057
1058         No new tests. HW specific fix.
1059
1060         * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
1061         (WebCore::OffScreenRootWindow::isMesaGLX):
1062         (OffScreenRootWindow):
1063         (WebCore::GraphicsSurface::platformSwapBuffers):
1064
1065 2013-02-05  Praveen Jadhav  <praveen.j@samsung.com>
1066
1067         Floating point precision error in AudioPannerNode.
1068         https://bugs.webkit.org/show_bug.cgi?id=106001
1069
1070         Reviewed by Kentaro Hara.
1071
1072         Specifications Update: 
1073         https://dvcs.w3.org/hg/audio/rev/69a39a516e45
1074
1075         Conversion from double to float and back to double
1076         results in precision error. Avoiding these conversions
1077         will make sure that proper values are retained in the
1078         parameters.
1079
1080         * Modules/webaudio/PannerNode.h:
1081         (WebCore::PannerNode::refDistance):
1082         (WebCore::PannerNode::setRefDistance):
1083         (WebCore::PannerNode::maxDistance):
1084         (WebCore::PannerNode::setMaxDistance):
1085         (WebCore::PannerNode::rolloffFactor):
1086         (WebCore::PannerNode::setRolloffFactor):
1087         (WebCore::PannerNode::coneInnerAngle):
1088         (WebCore::PannerNode::setConeInnerAngle):
1089         (WebCore::PannerNode::coneOuterAngle):
1090         (WebCore::PannerNode::setConeOuterAngle):
1091         (WebCore::PannerNode::coneOuterGain):
1092         (WebCore::PannerNode::setConeOuterGain):
1093         * Modules/webaudio/PannerNode.idl:
1094
1095 2013-02-05  Kent Tamura  <tkent@chromium.org>
1096
1097         INPUT_MULTIPLE_FIELDS_UI: Use disabled attribute internally instead of readonly attribute
1098         https://bugs.webkit.org/show_bug.cgi?id=108911
1099
1100         Reviewed by Kentaro Hara.
1101
1102         Use 'disabled' attribute for shadow elements for <input> with
1103         multiple-fields UI instead of 'readonly' attribute because 'readonly'
1104         attribute represents focusable-but-non-editable state in HTML though
1105         we'd like to represent non-focusable-and-non-editable state.
1106
1107         The summary of changes:
1108         - Use 'disabled' attribute instead of 'readonly' attribute for DateTimeFieldElement,
1109         - Rename C++ functions for it,
1110         - Call isFocusable instead of isReadOnly to check focusable state.
1111
1112         No new tests. This doesn't make user-visible behavior changes.
1113
1114         * css/html.css:
1115         Replace [readonly] with [disabled] for sub-fields.
1116         * html/shadow/DateTimeEditElement.cpp:
1117         (DateTimeEditBuilder):
1118         (WebCore::DateTimeEditBuilder::visitField):
1119         (WebCore::DateTimeEditBuilder::shouldDayOfMonthFieldDisabled):
1120         (WebCore::DateTimeEditBuilder::shouldHourFieldDisabled):
1121         (WebCore::DateTimeEditBuilder::shouldMillisecondFieldDisabled):
1122         (WebCore::DateTimeEditBuilder::shouldMinuteFieldDisabled):
1123         (WebCore::DateTimeEditBuilder::shouldSecondFieldDisabled):
1124         (WebCore::DateTimeEditBuilder::shouldYearFieldDisabled):
1125         (WebCore::DateTimeEditElement::anyEditableFieldsHaveValues):
1126         (WebCore::DateTimeEditElement::focusOnNextField): Use isFocusable.
1127         (WebCore::DateTimeEditElement::focusOnPreviousField): Use isFocusable.
1128         * html/shadow/DateTimeFieldElement.cpp:
1129         (WebCore::DateTimeFieldElement::isFocusable):
1130         (WebCore::DateTimeFieldElement::isDisabled):
1131         (WebCore::DateTimeFieldElement::setDisabled):
1132         * html/shadow/DateTimeFieldElement.h:
1133         (DateTimeFieldElement): Make isFocusable public in order that
1134         DateTimeEditElement can call it.
1135         * html/shadow/DateTimeNumericFieldElement.cpp:
1136         (WebCore::DateTimeNumericFieldElement::handleKeyboardEvent):
1137         (WebCore::DateTimeNumericFieldElement::setEmptyValue):
1138         * html/shadow/DateTimeSymbolicFieldElement.cpp:
1139         (WebCore::DateTimeSymbolicFieldElement::setEmptyValue):
1140
1141 2013-02-05  Kentaro Hara  <haraken@chromium.org>
1142
1143         [V8] Reduce usage of deprecatedString() and deprecatedInteger()
1144         https://bugs.webkit.org/show_bug.cgi?id=108909
1145
1146         Reviewed by Adam Barth.
1147
1148         By passing an Isolate parameter around, we can reduce usage of
1149         deprecated methods.
1150
1151         No tests. No change in behavior.
1152
1153         * bindings/scripts/CodeGeneratorV8.pm:
1154         (GenerateNormalAttrSetter):
1155         (GenerateEventListenerCallback):
1156         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
1157         (WebCore::TestEventTargetV8Internal::addEventListenerCallback):
1158         (WebCore::TestEventTargetV8Internal::removeEventListenerCallback):
1159         * bindings/scripts/test/V8/V8TestObj.cpp:
1160         (WebCore::TestObjV8Internal::addEventListenerCallback):
1161         (WebCore::TestObjV8Internal::removeEventListenerCallback):
1162         * bindings/v8/IDBBindingUtilities.cpp:
1163         (WebCore::get):
1164         (WebCore::set):
1165         (WebCore::getNthValueOnKeyPath):
1166         (WebCore::canInjectNthValueOnKeyPath):
1167         (WebCore::ensureNthValueOnKeyPath):
1168         (WebCore::createIDBKeyFromScriptValueAndKeyPath):
1169         (WebCore::injectIDBKeyIntoScriptValue):
1170         (WebCore::canInjectIDBKeyIntoScriptValue):
1171         * bindings/v8/NPV8Object.cpp:
1172         (WebCore::createValueListFromVariantArgs):
1173         (_NPN_Invoke):
1174         (_NPN_InvokeDefault):
1175         (_NPN_SetProperty):
1176         (_NPN_Construct):
1177         * bindings/v8/ScriptController.cpp:
1178         (WebCore::ScriptController::compileAndRunScript):
1179         * bindings/v8/ScriptProfiler.cpp:
1180         (WebCore):
1181         (WebCore::ScriptProfiler::takeHeapSnapshot):
1182         * bindings/v8/ScriptSourceCode.cpp:
1183         (WebCore::ScriptSourceCode::compileScript):
1184         * bindings/v8/ScriptSourceCode.h:
1185         (ScriptSourceCode):
1186         * bindings/v8/V8LazyEventListener.cpp:
1187         (WebCore::V8LazyEventListener::prepareListenerObject):
1188         * bindings/v8/V8NPObject.cpp:
1189         (WebCore::npObjectInvokeImpl):
1190         (WebCore::npObjectGetProperty):
1191         * bindings/v8/V8NPUtils.cpp:
1192         (WebCore::convertNPVariantToV8Object):
1193         * bindings/v8/V8NPUtils.h:
1194         (WebCore):
1195         * bindings/v8/V8Utilities.cpp:
1196         (WebCore::createHiddenDependency):
1197         (WebCore::removeHiddenDependency):
1198         (WebCore::transferHiddenDependency):
1199         * bindings/v8/V8Utilities.h:
1200         (WebCore):
1201         * bindings/v8/WorkerScriptController.cpp:
1202         (WebCore::WorkerScriptController::evaluate):
1203         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1204         (WebCore::V8DOMWindow::addEventListenerCallback):
1205         (WebCore::V8DOMWindow::removeEventListenerCallback):
1206
1207 2013-02-04  Dean Jackson  <dino@apple.com>
1208
1209         [Mac] Captions menu should indicate language and type of track
1210         https://bugs.webkit.org/show_bug.cgi?id=108882
1211
1212         Reviewed by Eric Carlson.
1213
1214         On Mac, we want a specific format for menu items in a caption list. Since
1215         other ports might want different formats, move the generation of the label
1216         into CaptionsUserPreferences where it can be overridden.
1217
1218         This required CaptionsUserPreferences to become public on the PageGroup, so
1219         it could be used when creating the menu. Also, since CaptionsUserPreferences
1220         was hidden on Mountain Lion and below, be a little more specific about
1221         which pieces can be seen on which builds.
1222
1223         Covered by exisiting media/video-controls-captions-trackmenu tests.
1224
1225         * English.lproj/Localizable.strings: Remove textTrackClosedCaptionsText.
1226         * html/shadow/MediaControlElements.cpp:
1227         (WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu): Build only
1228             one section and get the track's display name from the user preferences.
1229         * page/CaptionUserPreferences.h:
1230         (WebCore::CaptionUserPreferences::displayNameForTrack): Default implementation of
1231             virtual function that provides a label for a captions menu item.
1232         * page/CaptionUserPreferencesMac.h: Add the new virtual function, and expose just
1233             a bit of this class outside 10.9 builds.
1234         * page/CaptionUserPreferencesMac.mm:
1235         (WebCore::CaptionUserPreferencesMac::CaptionUserPreferencesMac): Guard features for system version.
1236         (WebCore::CaptionUserPreferencesMac::~CaptionUserPreferencesMac): Ditto.
1237         (WebCore::CaptionUserPreferencesMac::displayNameForTrack): New OS X-specific method that
1238             returns a string for the menu label.
1239         * page/PageGroup.cpp:
1240         (WebCore::PageGroup::captionPreferences): Unguard for system version.
1241         * page/PageGroup.h: Make captionPreferences public.
1242         * platform/LocalizedStrings.cpp: Remove textTrackClosedCaptionsText - not needed any more.
1243         * platform/LocalizedStrings.h: Remove textTrackClosedCaptionsText.
1244
1245 2013-02-04  Kentaro Hara  <haraken@chromium.org>
1246
1247         [V8] Pass an Isolate to V8DOMConfiguration
1248         https://bugs.webkit.org/show_bug.cgi?id=108900
1249
1250         Reviewed by Adam Barth.
1251
1252         No tests. No change in behavior.
1253
1254         * bindings/scripts/CodeGeneratorV8.pm:
1255         (GenerateHeader):
1256         (GenerateImplementation):
1257         (GenerateToV8Converters):
1258         * bindings/scripts/test/V8/V8Float64Array.cpp:
1259         (WebCore::ConfigureV8Float64ArrayTemplate):
1260         (WebCore::V8Float64Array::createWrapper):
1261         * bindings/scripts/test/V8/V8Float64Array.h:
1262         (WebCore::V8Float64Array::installPerContextProperties):
1263         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
1264         (WebCore::ConfigureV8TestActiveDOMObjectTemplate):
1265         (WebCore::V8TestActiveDOMObject::createWrapper):
1266         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
1267         (WebCore::V8TestActiveDOMObject::installPerContextProperties):
1268         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
1269         (WebCore::ConfigureV8TestCustomNamedGetterTemplate):
1270         (WebCore::V8TestCustomNamedGetter::createWrapper):
1271         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
1272         (WebCore::V8TestCustomNamedGetter::installPerContextProperties):
1273         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
1274         (WebCore::ConfigureV8TestEventConstructorTemplate):
1275         (WebCore::V8TestEventConstructor::createWrapper):
1276         * bindings/scripts/test/V8/V8TestEventConstructor.h:
1277         (WebCore::V8TestEventConstructor::installPerContextProperties):
1278         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
1279         (WebCore::ConfigureV8TestEventTargetTemplate):
1280         (WebCore::V8TestEventTarget::createWrapper):
1281         * bindings/scripts/test/V8/V8TestEventTarget.h:
1282         (WebCore::V8TestEventTarget::installPerContextProperties):
1283         * bindings/scripts/test/V8/V8TestException.cpp:
1284         (WebCore::ConfigureV8TestExceptionTemplate):
1285         (WebCore::V8TestException::createWrapper):
1286         * bindings/scripts/test/V8/V8TestException.h:
1287         (WebCore::V8TestException::installPerContextProperties):
1288         * bindings/scripts/test/V8/V8TestInterface.cpp:
1289         (WebCore::ConfigureV8TestInterfaceTemplate):
1290         (WebCore::V8TestInterface::createWrapper):
1291         * bindings/scripts/test/V8/V8TestInterface.h:
1292         (WebCore::V8TestInterface::installPerContextProperties):
1293         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
1294         (WebCore::ConfigureV8TestMediaQueryListListenerTemplate):
1295         (WebCore::V8TestMediaQueryListListener::createWrapper):
1296         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
1297         (WebCore::V8TestMediaQueryListListener::installPerContextProperties):
1298         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
1299         (WebCore::ConfigureV8TestNamedConstructorTemplate):
1300         (WebCore::V8TestNamedConstructor::createWrapper):
1301         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
1302         (WebCore::V8TestNamedConstructor::installPerContextProperties):
1303         * bindings/scripts/test/V8/V8TestNode.cpp:
1304         (WebCore::ConfigureV8TestNodeTemplate):
1305         (WebCore::V8TestNode::createWrapper):
1306         * bindings/scripts/test/V8/V8TestNode.h:
1307         (WebCore::V8TestNode::installPerContextProperties):
1308         * bindings/scripts/test/V8/V8TestObj.cpp:
1309         (WebCore::ConfigureV8TestObjTemplate):
1310         (WebCore::V8TestObj::installPerContextProperties):
1311         (WebCore::V8TestObj::createWrapper):
1312         * bindings/scripts/test/V8/V8TestObj.h:
1313         (V8TestObj):
1314         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
1315         (WebCore::ConfigureV8TestOverloadedConstructorsTemplate):
1316         (WebCore::V8TestOverloadedConstructors::createWrapper):
1317         * bindings/scripts/test/V8/V8TestOverloadedConstructors.h:
1318         (WebCore::V8TestOverloadedConstructors::installPerContextProperties):
1319         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1320         (WebCore::ConfigureV8TestSerializedScriptValueInterfaceTemplate):
1321         (WebCore::V8TestSerializedScriptValueInterface::createWrapper):
1322         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
1323         (WebCore::V8TestSerializedScriptValueInterface::installPerContextProperties):
1324         * bindings/v8/V8DOMConfiguration.cpp:
1325         (WebCore::V8DOMConfiguration::batchConfigureAttributes):
1326         (WebCore::V8DOMConfiguration::batchConfigureConstants):
1327         (WebCore::V8DOMConfiguration::batchConfigureCallbacks):
1328         (WebCore::V8DOMConfiguration::configureTemplate):
1329         * bindings/v8/V8DOMConfiguration.h:
1330         (V8DOMConfiguration):
1331         (WebCore::V8DOMConfiguration::configureAttribute):
1332         * bindings/v8/V8DOMWindowShell.cpp:
1333         (WebCore::V8DOMWindowShell::installDOMWindow):
1334
1335 2013-02-04  Kentaro Hara  <haraken@chromium.org>
1336
1337         [V8] Clean up CodeGeneratorV8.pm by introducing HasCustom{Getter,Setter,Method}
1338         https://bugs.webkit.org/show_bug.cgi?id=108896
1339
1340         Reviewed by Adam Barth.
1341
1342         No tests. No change in generated code.
1343
1344         * bindings/scripts/CodeGeneratorV8.pm:
1345         (GenerateHeader):
1346         (HasCustomGetter):
1347         (HasCustomSetter):
1348         (HasCustomMethod):
1349         (GetFunctionTemplateCallbackName):
1350         (GenerateSingleBatchedAttribute):
1351         (GenerateImplementation):
1352         (RequiresCustomSignature):
1353
1354 2013-02-04  Kent Tamura  <tkent@chromium.org>
1355
1356         Fix crash by <select> type change on focus
1357         https://bugs.webkit.org/show_bug.cgi?id=108830
1358
1359         Reviewed by Abhishek Arya.
1360
1361         Test: fast/forms/select/select-change-type-on-focus.html
1362
1363         * html/HTMLSelectElement.cpp:
1364         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
1365         focus() calls may change the renderer type.
1366
1367 2013-02-04  Kentaro Hara  <haraken@chromium.org>
1368
1369         [V8] Pass an Isolate to opaqueRootForGC()
1370         https://bugs.webkit.org/show_bug.cgi?id=108886
1371
1372         Reviewed by Adam Barth.
1373
1374         No tests. No change in behavior.
1375
1376         * bindings/scripts/CodeGeneratorV8.pm:
1377         (GenerateOpaqueRootForGC):
1378         (GenerateHeader):
1379         * bindings/v8/V8GCController.cpp:
1380         (WebCore::V8GCController::opaqueRootForGC):
1381         * bindings/v8/WrapperTypeInfo.h:
1382         (WebCore):
1383         (WebCore::WrapperTypeInfo::opaqueRootForGC):
1384         * bindings/v8/custom/V8NodeListCustom.cpp:
1385         (WebCore::V8NodeList::opaqueRootForGC):
1386
1387 2013-02-04  Wei James  <james.wei@intel.com>
1388
1389         Heap-buffer-overflow in WebCore::AudioBufferSourceNode::process
1390         https://bugs.webkit.org/show_bug.cgi?id=108515
1391
1392         After calling setBuffer() with a buffer having a different number of
1393         channels, there can in rare cases be a slight delay before the output
1394         bus is updated to the new number of channels because of use of
1395         tryLocks() in the context's updating system.
1396         In this case, if the the buffer has just been changed and we're
1397         not quite ready yet then just output silence.
1398
1399         Reviewed by Chris Rogers.
1400
1401         * Modules/webaudio/AudioBufferSourceNode.cpp:
1402         (WebCore::AudioBufferSourceNode::process):
1403         (WebCore::AudioBufferSourceNode::renderFromBuffer):
1404
1405 2013-02-04  James Simonsen  <simonjam@chromium.org>
1406
1407         [Chromium] Add a signal for when the body is inserted in the document
1408         https://bugs.webkit.org/show_bug.cgi?id=108725
1409
1410         Reviewed by Adam Barth.
1411
1412         This is an important signal for resource scheduling. We know we have enough to paint something,
1413         so we can start kicking off image preloads.
1414
1415         Test: Chromium webkit_unit_tests
1416
1417         * html/parser/HTMLConstructionSite.cpp:
1418         (WebCore::HTMLConstructionSite::insertHTMLBodyElement):
1419         * loader/FrameLoaderClient.h:
1420         (FrameLoaderClient):
1421         (WebCore::FrameLoaderClient::dispatchWillInsertBody):
1422
1423 2013-02-04  Benjamin Poulain  <bpoulain@apple.com>
1424
1425         Kill suspendAnimation(), resumeAnimation() and numberOfActiveAnimations() from DRT/WTR; use Internals
1426         https://bugs.webkit.org/show_bug.cgi?id=108741
1427
1428         Reviewed by Tony Chang.
1429
1430         Move suspendAnimations and resumeAnimations to group all the animation related
1431         code together.
1432
1433         Add support for numberOfActiveAnimations, similarily to the feature previously defined
1434         in TestRunner.
1435
1436         * testing/Internals.cpp:
1437         (WebCore::Internals::numberOfActiveAnimations):
1438         (WebCore):
1439         (WebCore::Internals::suspendAnimations):
1440         (WebCore::Internals::resumeAnimations):
1441         * testing/Internals.h:
1442         (Internals):
1443         * testing/Internals.idl:
1444
1445 2013-02-04  Nayan Kumar K  <nayankk@motorola.com>
1446
1447         [WEBGL] Rename WEBKIT_WEBGL_compressed_texture_s3tc to WEBGL_compressed_texture_s3tc
1448         https://bugs.webkit.org/show_bug.cgi?id=108866
1449
1450         Reviewed by Kenneth Russell.
1451
1452         WEBGL_compressed_texture_s3tc is one of the community approved WebGL extension.
1453         Hence remove the vendor prefix from WEBKIT_WEBGL_compressed_texture_s3tc.
1454         Specification: http://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_s3tc/
1455
1456         No tests currently present to test WEBKIT_WEBGL_compressed_texture_s3tc.
1457
1458         * bindings/js/JSWebGLRenderingContextCustom.cpp:
1459         (WebCore::toJS):
1460         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
1461         (WebCore::toV8Object):
1462         * html/canvas/WebGLCompressedTextureS3TC.cpp:
1463         (WebCore::WebGLCompressedTextureS3TC::getName):
1464         * html/canvas/WebGLExtension.h:
1465         * html/canvas/WebGLRenderingContext.cpp:
1466         (WebCore):
1467         (WebCore::WebGLRenderingContext::getExtension):
1468
1469 2013-02-04  Nayan Kumar K  <nayankk@motorola.com>
1470
1471         [WEBGL] Rename WEBKIT_WEBGL_lose_context to WEBGL_lose_context.
1472         https://bugs.webkit.org/show_bug.cgi?id=108694
1473
1474         Reviewed by Kenneth Russell.
1475
1476         WEBGL_lose_context is one of the community approved WebGL extension.
1477         Hence remove the vendor prefix from WEBKIT_WEBGL_lose_context extension.
1478         Spefication: http://www.khronos.org/registry/webgl/extensions/WEBGL_lose_context/
1479
1480         Tests already exists, modified them to verify the change in extension name.
1481
1482         * bindings/js/JSWebGLRenderingContextCustom.cpp:
1483         (WebCore::toJS):
1484         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
1485         (WebCore::toV8Object):
1486         * html/canvas/WebGLExtension.h:
1487         * html/canvas/WebGLLoseContext.cpp:
1488         (WebCore::WebGLLoseContext::getName):
1489         * html/canvas/WebGLRenderingContext.cpp:
1490         (WebCore):
1491         (WebCore::WebGLRenderingContext::getExtension):
1492         (WebCore::WebGLRenderingContext::getSupportedExtensions):
1493
1494 2013-02-04  Dean Jackson  <dino@apple.com>
1495
1496         Default element styles are not always collected for sharing detection
1497         https://bugs.webkit.org/show_bug.cgi?id=108404
1498
1499         Reviewed by Antti Koivisto.
1500
1501         The method ensureDefaultStyleSheetsForElement is run as we add elements
1502         to the document. This may update the defaultStyle of the document, but
1503         does not recollect any changes into the StyleResolver. This means that
1504         style sharing might be overly ambitious, thinking it can share a style
1505         for an element which was matched in the new rules. This showed up most
1506         often in the Shadow Root for media elements, which would add a set of
1507         style rules, but the shadow children would sometimes share styles even
1508         when they shouldn't.
1509
1510         The fix is to detect if we need to collect after adding a
1511         style for an element. This might cause a little more work, but
1512         in my testing it doesn't happen very often.
1513
1514         Unfortunately it is hard to get a reproducible test for this.
1515
1516         * css/CSSDefaultStyleSheets.cpp:
1517         (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement): As we load in
1518             styles, keep track of whether or not we change the default style.
1519         * css/CSSDefaultStyleSheets.h:
1520         (CSSDefaultStyleSheets): New boolean parameter indicating if the style has changed.
1521         * css/StyleResolver.cpp:
1522         (WebCore::StyleResolver::styleForElement): Collect features if the element
1523             caused the default style to update.
1524         (WebCore::StyleResolver::collectFeatures): Protect for null in updates.
1525
1526 2013-02-04  Jun Jiang  <jun.a.jiang@intel.com>
1527
1528         Fix the issue that some possible source formats are ignored for float textures in texture packing for CG port
1529         https://bugs.webkit.org/show_bug.cgi?id=108812
1530
1531         Reviewed by Kenneth Russell.
1532
1533         Already covered by latest WebGL conformance test.
1534
1535         * platform/graphics/GraphicsContext3D.cpp:
1536         (WebCore):
1537
1538 2013-02-04  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1539
1540         [EFL] Remove needless local variables in LocalizedStringsEfl.cpp
1541         https://bugs.webkit.org/show_bug.cgi?id=108869
1542
1543         Reviewed by Kentaro Hara.
1544
1545         fromUTF8() returns static String. So, we don't need to use needless local variables.
1546
1547         * platform/efl/LocalizedStringsEfl.cpp:
1548         (WebCore::contextMenuItemTagCopy):
1549         (WebCore::contextMenuItemTagDelete):
1550         (WebCore::contextMenuItemTagSelectAll):
1551         (WebCore::contextMenuItemTagGoBack):
1552         (WebCore::contextMenuItemTagGoForward):
1553         (WebCore::contextMenuItemTagStop):
1554         (WebCore::contextMenuItemTagCut):
1555         (WebCore::contextMenuItemTagPaste):
1556         (WebCore::contextMenuItemTagBold):
1557         (WebCore::contextMenuItemTagItalic):
1558         (WebCore::contextMenuItemTagUnderline):
1559
1560 2013-02-04  Jun Jiang  <jun.a.jiang@intel.com>
1561
1562         WebGL: Move the format conversion for 16-bit per channel formats into Core Graphics port only
1563         https://bugs.webkit.org/show_bug.cgi?id=108304
1564
1565         Reviewed by Kenneth Russell.
1566
1567         Since the 16-bit per channel formats are only used for Core Graphics port in WebGL and not a standard to represent any file format that is widely used 
1568         for each platform, it is better to limit and hide this kinds of information and processing in CG specific code only. 
1569         It can make the code more clear and reduce the binary size for both CG port and non-CG port.
1570
1571         Already covered by current tests.
1572
1573         * platform/graphics/GraphicsContext3D.cpp:
1574         (WebCore):
1575         * platform/graphics/GraphicsContext3D.h:
1576         (GraphicsContext3D):
1577         (WebCore::GraphicsContext3D::srcFormatComeFromDOMElementOrImageData):
1578         (ImageExtractor):
1579         * platform/graphics/cg/GraphicsContext3DCG.cpp:
1580         (WebCore):
1581         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
1582
1583 2013-02-04  Dean Jackson  <dino@apple.com>
1584
1585         Allow TextTracks to be marked as closed captions
1586         https://bugs.webkit.org/show_bug.cgi?id=108856
1587
1588         Reviewed by Darin Adler.
1589
1590         While this isn't exposed directly in markup, some platform media frameworks can
1591         provide indication that a caption track is a closed caption. Expose such a flag
1592         on TextTrack and platforms can show a different UI if they want to.
1593
1594         No tests - this isn't used elsewhere yet, nor exposed to the DOM.
1595
1596         * html/track/TextTrack.cpp:
1597         (WebCore::TextTrack::TextTrack): Initialise new member.
1598         * html/track/TextTrack.h:
1599         (WebCore::TextTrack::isClosedCaptions): New member variable.
1600         (WebCore::TextTrack::setIsClosedCaptions):
1601
1602 2013-02-04  Chris Hopman  <cjhopman@chromium.org>
1603
1604         Make moveCaretTowardsWindowPoint not snap to the beginning/end when moved above/below editable
1605         https://bugs.webkit.org/show_bug.cgi?id=107850
1606
1607         Reviewed by Ojan Vafai.
1608
1609         On Android, EditingBehavior::shouldMoveCaret[...] controls the
1610         behavior of insertion handles. This change adds a new Android specific
1611         editing behavior type.
1612
1613         The new EditingBehavior is the same as EditingUnixBehavior except for
1614         EditingBehavior::shouldMoveCaret[...]. This new behavior fixes
1615         WebFrame::moveCaretTowardsWindowPoint to not span to the
1616         beginning/end.
1617
1618         * editing/EditingBehavior.h:
1619         (WebCore::EditingBehavior::shouldMoveCaretToHorizontalBoundaryWhenPastTopOrBottom):
1620         (WebCore::EditingBehavior::shouldAllowSpellingSuggestionsWithoutSelection):
1621         (WebCore::EditingBehavior::shouldNavigateBackOnBackspace):
1622         * editing/EditingBehaviorTypes.h:
1623         * page/Settings.cpp:
1624         (WebCore):
1625         (WebCore::editingBehaviorTypeForPlatform):
1626         * testing/InternalSettings.cpp:
1627         (WebCore::InternalSettings::setEditingBehavior):
1628
1629 2013-02-04  Kent Tamura  <tkent@chromium.org>
1630
1631         INPUT_MULTIPLE_FIELDS_UI: Focus order is not controllable by tabIndex attribute on <input>
1632         https://bugs.webkit.org/show_bug.cgi?id=108447
1633
1634         Reviewed by Hajime Morita.
1635
1636         We make <input> elements with the multiple-fields UI focusable.
1637          - However, we don't want to change the existing focus behavior for
1638            multiple-fields <input>. We'd like to focus on the last sub-field of
1639            an<input> with Shift + TAB focus navigation, and focus on the first
1640            sub-field of the <input> otherwise. So, we move focus immediately
1641            after the <input> gets focus.
1642          - We don't need the isFocusableByClickOnLabel hack any more. <input>
1643            elements with the multiple-fields UI are mouse-focusable.
1644
1645         Test: fast/forms/time-multiple-fields/time-multiple-fields-tabindex.html
1646
1647         * html/InputType.h:
1648         (InputType): Add FocusDirection argument to handleFocusEvent, and remove
1649         unnecessary isFocusableByClickOnLabel and focus.
1650         * html/InputType.cpp:
1651         (WebCore::InputType::handleFocusEvent): Ditto.
1652         * html/PasswordInputType.cpp:
1653         (WebCore::PasswordInputType::handleFocusEvent): Follow the argument change.
1654         * html/PasswordInputType.h:
1655         (PasswordInputType): Ditto.
1656
1657         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
1658         (WebCore::BaseMultipleFieldsDateAndTimeInputType::handleFocusEvent):
1659         If this element gets focus by FocusDirectionBackward (it means the focus
1660         is moved from the first sub-field of the element,) move the focus
1661         backward once more. Otherwise, we focus on the first sub-filed of the
1662         element.
1663         (WebCore::BaseMultipleFieldsDateAndTimeInputType::isKeyboardFocusable):
1664         Make this keyboard-focusable. We have a wrong test to ensure read-only
1665         input does NOT get focus. We'll address it later.
1666         (WebCore::BaseMultipleFieldsDateAndTimeInputType::isMouseFocusable):
1667         Make this mouse-focusable.
1668         * html/BaseMultipleFieldsDateAndTimeInputType.h:
1669         (BaseMultipleFieldsDateAndTimeInputType):
1670
1671         * html/HTMLInputElement.h:
1672         (HTMLInputElement): Remove defaultFocus, focus, and isFocusableByClickOnLabel.
1673         Add missing OVERRIDE to handleFocusEvent.
1674         * html/HTMLInputElement.cpp: Remove unnecessary functions.
1675         (WebCore::HTMLInputElement::handleFocusEvent):
1676         Pass FocusDirection value to InputTYpe::handleFocusEvent.
1677
1678         * html/HTMLLabelElement.cpp:
1679         (WebCore::HTMLLabelElement::defaultEventHandler):
1680         Use isMouseFocusable().
1681         * html/HTMLElement.cpp: Remove unnecessary isFocusableByClickOnLabel.
1682         * html/HTMLElement.h: Ditto.
1683
1684 2013-02-04  Seulgi Kim  <seulgikim@company100.net>
1685
1686         Coordinated Graphics: crash in TiledBackingStore::adjustForContentsRect
1687         https://bugs.webkit.org/show_bug.cgi?id=107639
1688
1689         Reviewed by Kenneth Rohde Christiansen.
1690
1691         In TiledBackingStore::adjustForContentsRect method, inflating is not
1692         needed when there is no intersections between the cover/keep rect and
1693         the content rect.
1694
1695         No new tests, no change in functionality.
1696
1697         * platform/graphics/TiledBackingStore.cpp:
1698         (WebCore::TiledBackingStore::adjustForContentsRect):
1699
1700 2013-02-04  Stephen White  <senorblanco@chromium.org>
1701
1702         [skia] Remove use of SkSingleInputImageFilter.
1703         https://bugs.webkit.org/show_bug.cgi?id=108867
1704
1705         Reviewed by James Robinson.
1706
1707         This class is but a hollow shell of its former self, and has
1708         been removed in Skia.
1709
1710         Covered by existing tests in css3/filters.
1711
1712         * platform/graphics/filters/skia/DropShadowImageFilter.cpp:
1713         (WebCore::DropShadowImageFilter::DropShadowImageFilter):
1714         (WebCore::DropShadowImageFilter::onFilterImage):
1715         * platform/graphics/filters/skia/DropShadowImageFilter.h:
1716
1717 2013-01-31  Kentaro Hara  <haraken@chromium.org>
1718
1719         Implement WheelEvent::deltaMode
1720         https://bugs.webkit.org/show_bug.cgi?id=108455
1721
1722         Reviewed by Adam Barth.
1723
1724         Per the spec, WheelEvent::deltaMode should return
1725         DOM_DELTA_PIXEL or DOM_DELTA_LINE or DOM_DELTA_PAGE.
1726
1727         Spec: http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents
1728         https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm#constructor-wheelevent
1729
1730         Test: fast/event/wheel-event-constructor.html
1731
1732         * dom/WheelEvent.cpp:
1733         (WebCore::WheelEventInit::WheelEventInit):
1734         (WebCore::WheelEvent::WheelEvent):
1735         (WebCore::WheelEvent::initWheelEvent):
1736         (WebCore::deltaMode):
1737         * dom/WheelEvent.h:
1738         (WheelEventInit):
1739         (WebCore::WheelEvent::create):
1740         (WebCore::WheelEvent::deltaMode):
1741         (WheelEvent):
1742         * dom/WheelEvent.idl:
1743         * page/EventHandler.cpp:
1744         (WebCore::wheelGranularityToScrollGranularity):
1745
1746 2013-02-04  Gustavo Noronha Silva  <gns@gnome.org>
1747
1748         [Soup] Remove duplicate setting of first party for cookies
1749         https://bugs.webkit.org/show_bug.cgi?id=108814
1750
1751         Reviewed by Martin Robinson.
1752
1753         Covered by existing tests.
1754
1755         * platform/network/soup/ResourceHandleSoup.cpp:
1756         (WebCore::createSoupMessageForHandleAndRequest): there is no need to set
1757         the first party for cookies here, since that is already done in
1758         ResourceRequest::updateSoupMessage, which is called a few lines before.
1759
1760 2013-02-04  Gustavo Noronha Silva  <gustavo.noronha@collabora.com>
1761
1762         [GStreamer][Soup] Let GStreamer provide the buffer data is downloaded to, to avoid copying
1763         https://bugs.webkit.org/show_bug.cgi?id=105552
1764
1765         Reviewed by Philippe Normand.
1766
1767         Makes it possible for the GStreamer media backend to provide the buffer to which
1768         the Soup networking backend will use to download data to. This makes copying
1769         memory unnecessary when ResourceHandle hands data over to the media player's
1770         StreamingClient. Thanks to Dan Winship for help designing the interface.
1771
1772         No behaviour change, covered by existing tests.
1773
1774         * platform/graphics/gstreamer/GStreamerVersioning.cpp:
1775         (createGstBufferForData): New helper to create a GstBuffer when
1776         we have a data pointer and a length.
1777         (getGstBufferSize): Abstract obtaining the size of the buffer, so the code
1778         is cleaner while still working for both GST 0.10 and 1.0.
1779         (setGstBufferSize): Ditto, but for setting the size.
1780         (getGstBufferDataPointer): Ditto, but for grabbing the data pointer.
1781         (mapGstBuffer): Convenience method to take care of mapping the buffer so that
1782         we can provide the data pointer to ResourceHandle.
1783         (unmapGstBuffer): Convenience method which takes care of unmapping the buffer
1784         and properly freeing the GstMapInfo.
1785         * platform/graphics/gstreamer/GStreamerVersioning.h:
1786         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1787         (StreamingClient): New methods.
1788         (_WebKitWebSrcPrivate): We now store the GstBuffer we provided the data pointer from
1789         so we can later unmap it and push it to the pipeline.
1790         (webKitWebSrcDispose): Deal with the GstBuffer in case it exists when the source is
1791         destroyed.
1792         (webKitWebSrcStop): Also clear the GstBuffer in this case.
1793         (StreamingClient::didReceiveData): Handle the hand-over of the buffer.
1794         (StreamingClient::getBuffer): Provide ResourceHandle with a new GstBuffer's data pointer.
1795         * platform/network/ResourceHandleClient.h:
1796         (ResourceHandleClient):
1797         (WebCore::ResourceHandleClient::ResourceHandleClient): Constructor to initialize the buffer
1798         member variable to 0.
1799         (WebCore::ResourceHandleClient::~ResourceHandleClient): Destructor to free the buffer if it
1800         has been allocated.
1801         (WebCore::ResourceHandleClient::getBuffer): Default implementation which returns a
1802         newly allocated char pointer.
1803         * platform/network/ResourceHandleInternal.h:
1804         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
1805         (ResourceHandleInternal): Store actual buffer size, which is no longer a constant.
1806         * platform/network/soup/ResourceHandleSoup.cpp:
1807         (WebCore::cleanupSoupRequestOperation): Clear the buffer pointer, the life-cycle of the
1808         buffer is handled by the ResourceHandleClient.
1809         (WebCore::nextMultipartResponsePartCallback): Get a new buffer from the client before reading.
1810         (WebCore::sendRequestCallback): Ditto.
1811         (WebCore::readCallback): Ditto.
1812
1813 2013-02-04  Mark Pilgrim  <pilgrim@chromium.org>
1814
1815         [Chromium] Move WorkerContextProxy to WebCore
1816         https://bugs.webkit.org/show_bug.cgi?id=108847
1817
1818         Reviewed by Adam Barth.
1819
1820         Part of a larger refactoring series; see tracking bug 106829.
1821
1822         * WebCore.gyp/WebCore.gyp:
1823         * WebCore.gypi:
1824         * workers/chromium: Added.
1825         * workers/chromium/WorkerContextProxyChromium.cpp: Added.
1826         (WebCore):
1827         (WebCore::setWorkerContextProxyCreateFunction):
1828         (WebCore::WorkerContextProxy::create):
1829         * workers/chromium/WorkerContextProxyChromium.h: Added.
1830         (WebCore):
1831
1832 2013-02-04  Dima Gorbik  <dgorbik@apple.com>
1833
1834         WebVTT <i>, <b> and <u> elements should have default styles
1835         https://bugs.webkit.org/show_bug.cgi?id=107214
1836
1837         Reviewed by Darin Adler.
1838
1839         Added default styles for basic webvtt object types.
1840
1841         Test: media/track/track-css-matching-default.html
1842
1843         * css/mediaControls.css:
1844         (video::-webkit-media-text-track-container b):
1845         (video::-webkit-media-text-track-container u):
1846         (video::-webkit-media-text-track-container i):
1847
1848 2013-02-04  Abhishek Arya  <inferno@chromium.org>
1849
1850         Add ASSERT_WITH_SECURITY_IMPLICATION to detect out of bounds access
1851         https://bugs.webkit.org/show_bug.cgi?id=108668
1852
1853         Reviewed by Eric Seidel.
1854
1855         * bindings/v8/SerializedScriptValue.cpp:
1856         * css/CSSCalculationValue.cpp:
1857         (WebCore::CSSCalcExpressionNodeParser::parseCalc):
1858         * css/CSSImageSetValue.cpp:
1859         (WebCore::CSSImageSetValue::fillImageSet):
1860         (WebCore::CSSImageSetValue::customCssText):
1861         * css/CSSParserValues.h:
1862         (WebCore::CSSParserString::operator[]):
1863         * css/CSSValueList.h:
1864         (WebCore::CSSValueListInspector::item):
1865         * css/StyleSheetContents.cpp:
1866         (WebCore::StyleSheetContents::ruleAt):
1867         (WebCore::StyleSheetContents::wrapperInsertRule):
1868         (WebCore::StyleSheetContents::wrapperDeleteRule):
1869         * dom/Document.cpp:
1870         (WebCore::Document::processArguments):
1871         * dom/Element.cpp:
1872         (WebCore::Element::removeAttributeInternal):
1873         * dom/ElementAttributeData.cpp:
1874         (WebCore::ElementAttributeData::removeAttribute):
1875         * dom/ElementAttributeData.h:
1876         (WebCore::ElementAttributeData::attributeItem):
1877         * dom/SpaceSplitString.h:
1878         (WebCore::SpaceSplitStringData::operator[]):
1879         (WebCore::SpaceSplitString::operator[]):
1880         * editing/TextIterator.cpp:
1881         (WebCore::TextIterator::characterAt):
1882         * html/HTMLFormElement.cpp:
1883         (WebCore::HTMLFormElement::removeFormElement):
1884         * html/HTMLSelectElementWin.cpp:
1885         (WebCore::HTMLSelectElement::platformHandleKeydownEvent):
1886         * html/canvas/WebGLRenderingContext.cpp:
1887         (WebCore):
1888         * html/parser/HTMLFormattingElementList.cpp:
1889         (WebCore::HTMLFormattingElementList::swapTo):
1890         * inspector/InspectorStyleSheet.cpp:
1891         (WebCore::InspectorStyleSheet::styleSheetTextWithChangedStyle):
1892         * inspector/InspectorStyleTextEditor.cpp:
1893         (WebCore::InspectorStyleTextEditor::replaceProperty):
1894         * inspector/InspectorValues.cpp:
1895         (WebCore::InspectorArrayBase::get):
1896         * page/WindowFeatures.cpp:
1897         (WebCore::WindowFeatures::WindowFeatures):
1898         * platform/audio/AudioArray.h:
1899         (WebCore::AudioArray::at):
1900         * platform/audio/AudioFIFO.cpp:
1901         (WebCore::AudioFIFO::findWrapLengths):
1902         * platform/graphics/GlyphPage.h:
1903         (WebCore::GlyphPage::glyphDataForIndex):
1904         (WebCore::GlyphPage::glyphAt):
1905         (WebCore::GlyphPage::setGlyphDataForIndex):
1906         * platform/graphics/TextRun.h:
1907         (WebCore::TextRun::operator[]):
1908         (WebCore::TextRun::data8):
1909         (WebCore::TextRun::data16):
1910         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
1911         (WebCore::HarfBuzzShaper::setDrawRange):
1912         * platform/graphics/openvg/TiledImageOpenVG.cpp:
1913         (WebCore::TiledImageOpenVG::setTile):
1914         (WebCore::TiledImageOpenVG::tile):
1915         * platform/image-decoders/ico/ICOImageDecoder.cpp:
1916         (WebCore::ICOImageDecoder::decodeAtIndex):
1917         (WebCore::ICOImageDecoder::imageTypeAtIndex):
1918         * platform/text/QuotedPrintable.cpp:
1919         (WebCore::lengthOfLineEndingAtIndex):
1920         * platform/text/SegmentedString.cpp:
1921         (WebCore::SegmentedString::advance):
1922         * platform/win/WebCoreTextRenderer.cpp:
1923         (WebCore::doDrawTextAtPoint):
1924         * rendering/InlineTextBox.cpp:
1925         (WebCore::InlineTextBox::paint):
1926         (WebCore::InlineTextBox::paintSelection):
1927
1928 2013-02-04  Nate Chapin  <japhet@chromium.org>
1929
1930         REGRESSION (r137607): Loading of archives as substitute data is broken
1931         https://bugs.webkit.org/show_bug.cgi?id=108589
1932
1933         Reviewed by Alexey Proskuryakov.
1934
1935         * loader/MainResourceLoader.cpp:
1936         (WebCore::MainResourceLoader::resourceData): Return the content from
1937             SubstituteData as mainResourceData if present.
1938
1939 2013-02-04  Julien Chaffraix  <jchaffraix@webkit.org>
1940
1941         [CSS Grid Layout] Heap-buffer-overflow in std::sort
1942         https://bugs.webkit.org/show_bug.cgi?id=108834
1943
1944         Reviewed by Abhishek Arya.
1945
1946         Test: fast/css-grid-layout/grid-strict-ordering-crash.html
1947
1948         * rendering/RenderGrid.cpp:
1949         (WebCore::sortByGridTrackGrowthPotential):
1950         The std::sort documentation says that this function should define a *strict* weak ordering. Fixed the strict
1951         part of the ordering. Also moved the function definition next to where it is needed and made the GridTrack
1952         argument const (as it shouldn't modify them or std::sort will misbehave).
1953
1954         * rendering/RenderGrid.cpp:
1955         (WebCore::sortByGridTrackGrowthPotential):
1956         (WebCore):
1957
1958 2013-02-04  Igor Oliveira  <igor.o@sisa.samsung.com>
1959
1960         [Texmap] Implement BGRA swizzling detection
1961         https://bugs.webkit.org/show_bug.cgi?id=81103
1962
1963         For OpenGLES if the extension EXT_texture_format_BGRA8888 is supported
1964         the internal and external formats need to be BGRA.
1965
1966         Reviewed by Noam Rosenthal.
1967
1968         * platform/graphics/texmap/TextureMapperGL.cpp:
1969         (WebCore):
1970         (WebCore::driverSupportsExternalTextureBGRA):
1971         (WebCore::driverSupportsSubImage):
1972         (WebCore::BitmapTextureGL::didReset):
1973
1974 2013-02-04  Dima Gorbik  <dgorbik@apple.com>
1975
1976         class="cue" is getting some default style
1977         https://bugs.webkit.org/show_bug.cgi?id=108752
1978
1979         Reviewed by Dean Jackson.
1980         
1981         The value variable inside the selector is used to store different information depending on the 
1982         type of the selector so we have to check explicitly that the selector we apply filtering to 
1983         matches a pseudo element.
1984         
1985         Existing tests modified to cover this case.
1986
1987         * css/RuleSet.cpp:
1988         (WebCore::determinePropertyWhitelistType):
1989
1990 2013-02-04  Tom Sepez  <tsepez@chromium.org>
1991
1992         [V8] Binding Integrity crash in V8HTMLEmbedElement::createWrapper
1993         https://bugs.webkit.org/show_bug.cgi?id=108841
1994
1995         Reviewed by Adam Barth.
1996
1997         * html/HTMLEmbedElement.idl:
1998         Quick change to IDL to disable binding check for now.
1999         
2000 2013-02-04  Martin Robinson  <mrobinson@igalia.com>
2001
2002         Fix GTK+ 'make dist' in preparation for the 1.11.5 release.
2003
2004         * GNUmakefile.list.am:
2005
2006 2013-02-04  Enrica Casucci  <enrica@apple.com>
2007
2008         Add specific EditActions for Bold and Italic commands.
2009         https://bugs.webkit.org/show_bug.cgi?id=108842.
2010         <rdar://problem/13098252>
2011
2012         This change is required on iOS where we need to
2013         identify the command in order to display the correct
2014         message in the undo popup. It is also in line with
2015         what we do for underline, which already has its own
2016         separate EditAction.
2017         
2018         Reviewed by Ryosuke Niwa.
2019
2020         No new tests. No behavior change.
2021
2022         * editing/EditAction.h:
2023         * editing/EditorCommand.cpp:
2024         (WebCore::executeToggleBold):
2025         (WebCore::executeToggleItalic):
2026
2027 2013-02-04  Dima Gorbik  <dgorbik@apple.com>
2028
2029         Implemet :lang() pseudo class support for the WebVTT ::cue pseudo element
2030         https://bugs.webkit.org/show_bug.cgi?id=105478
2031
2032         Reviewed by Antti Koivisto.
2033
2034         In WebVTT lang is preprocessed and stored in the lang attribute of the element, 
2035         so we access it instead of walking up the tree the way it is done in HTML.
2036
2037         Existing tests were modified to cover this case.
2038
2039         * css/SelectorChecker.cpp:
2040         (WebCore::SelectorChecker::checkOne):
2041
2042 2013-02-04  Tim Horton  <timothy_horton@apple.com>
2043
2044         Disable autoscrolling the main frame if main frame scrolling is disabled
2045         https://bugs.webkit.org/show_bug.cgi?id=108848
2046         <rdar://problem/13004059>
2047
2048         Reviewed by Simon Fraser.
2049
2050         Ensure that the main frame can scroll at all before allowing an autoscroll.
2051
2052         * rendering/RenderBox.cpp:
2053         (WebCore::RenderBox::canAutoscroll):
2054
2055 2013-02-04  Tom Sepez  <tsepez@chromiium.org>
2056
2057         XSS Auditor bypass via svg tags and xlink:href
2058         https://bugs.webkit.org/show_bug.cgi?id=84158
2059
2060         This patch adds a test for the xlink:href attribute inside of
2061         script tokens. The test is complicated by the namespacing; the
2062         xlink hrefAttr qualified name does not contain a literal "xlink"
2063         prefix but only the URI of the namespace.
2064         
2065         Reviewed by Adam Barth.
2066
2067         Test: http/tests/security/xssAuditor/svg-script-tag.html
2068
2069         * html/parser/XSSAuditor.cpp:
2070         (WebCore::findAttributeWithName):
2071         (WebCore::XSSAuditor::filterScriptToken):
2072
2073 2013-02-04  Eric Carlson  <eric.carlson@apple.com>
2074
2075         Update CaptionUserPreferences
2076         https://bugs.webkit.org/show_bug.cgi?id=108783
2077
2078         Reviewed by Dean Jackson.
2079
2080         * html/shadow/MediaControlElements.cpp:
2081         (WebCore::MediaControlTextTrackContainerElement::updateSizes): Mark font size as important
2082             when necessary.
2083         * page/CaptionUserPreferences.h:
2084         (WebCore::CaptionUserPreferences::setUserPrefersCaptions): New, allow a port to remember that
2085             the user has chosen to see captions.
2086         (WebCore::CaptionUserPreferences::setPreferredLanguage): New, allow a port to remember the
2087             user's preferred caption language.
2088         (WebCore::CaptionUserPreferences::preferredLanguages): New, return a Vector of the user's 
2089             preferred caption languages.
2090         * page/CaptionUserPreferencesMac.h:
2091         * page/CaptionUserPreferencesMac.mm:
2092         * page/PageGroup.cpp:
2093         (WebCore::PageGroup::captionPreferences):
2094         (WebCore::PageGroup::captionFontSizeScale):
2095         * page/PageGroup.h:
2096         * platform/Language.cpp:
2097         (WebCore::userPreferredLanguagesOverride): New, return the user preferred languages override
2098             used during testing.
2099         * platform/Language.h:
2100         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
2101         (WebCore::InbandTextTrackPrivateAVFObjC::kind):
2102
2103 2013-02-04  Tim Horton  <timothy_horton@apple.com>
2104
2105         Allow TiledCoreAnimationDrawingArea overlay layers to become tiled
2106         https://bugs.webkit.org/show_bug.cgi?id=108729
2107         <rdar://problem/13047546>
2108
2109         Reviewed by Anders Carlsson.
2110
2111         * WebCore.exp.in:
2112         * platform/graphics/ca/GraphicsLayerCA.cpp:
2113         (WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly): The "for this layer only" variant
2114         of flushCompositingState wasn't informing its client that it committed changes for the layer.
2115         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): We now explicitly want to be able to have a
2116         GraphicsLayerCA switch into or out of tiling while being unparented (we'll get a client callback and
2117         swap out its parent ourselves).
2118
2119 2013-02-04  Julien Chaffraix  <jchaffraix@webkit.org>
2120
2121         [CSS Grid Layout] Add parsing for grid-auto-flow
2122         https://bugs.webkit.org/show_bug.cgi?id=108397
2123
2124         Reviewed by Ojan Vafai.
2125
2126         Test: fast/css-grid-layout/grid-auto-flow-get-set.html
2127
2128         This change adds the parsing, application and conversion back through getComputedStyle
2129         for the new property -webkit-grid-auto-flow, which accpets the following:
2130
2131         -webkit-grid-auto-flow: none | rows | columns
2132
2133         * css/CSSComputedStyleDeclaration.cpp:
2134         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2135         Added code to convert the RenderStyle information back into a CSS value.
2136
2137         * css/CSSParser.cpp:
2138         (WebCore::isValidKeywordPropertyAndValue):
2139         (WebCore::isKeywordPropertyID):
2140         Implemented parsing for -webkit-grid-auto-flow.
2141
2142         * css/CSSPrimitiveValueMappings.h:
2143         (WebCore::CSSPrimitiveValue::operator GridAutoFlow):
2144         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2145         Added the conversion operators, used for parsing and getComputedStyle.
2146
2147         * css/CSSProperty.cpp:
2148         (WebCore::CSSProperty::isInheritedProperty):
2149         Added -webkit-grid-auto-flow to the list of the not inherited properties.
2150
2151         * css/CSSPropertyNames.in:
2152         Added the new value and keywords.
2153
2154         * css/StyleBuilder.cpp:
2155         (WebCore::StyleBuilder::StyleBuilder):
2156         Added a handler for the new CSS property.
2157
2158         * rendering/style/RenderStyle.h:
2159         Added the usual getter / setter / initial function.
2160
2161         * rendering/style/RenderStyleConstants.h:
2162         Added a new enum GridAutoFlow to hold the parsed value.
2163
2164         * rendering/style/StyleGridData.cpp:
2165         (WebCore::StyleGridData::StyleGridData):
2166         * rendering/style/StyleGridData.h:
2167         (WebCore::StyleGridData::operator==):
2168         Updated after adding a new field for the GridAutoFlow value.
2169
2170 2013-02-04  Mark Pilgrim  <pilgrim@chromium.org>
2171
2172         [Chromium] Move IDBFactoryBackendInterface to WebCore
2173         https://bugs.webkit.org/show_bug.cgi?id=108638
2174
2175         Reviewed by Adam Barth.
2176
2177         Part of a larger refactoring series; see tracking bug 106829.
2178
2179         * Modules/indexeddb/chromium: Added.
2180         * Modules/indexeddb/chromium/IDBFactoryBackendInterfaceChromium.cpp: Added.
2181         (WebCore):
2182         (WebCore::setIDBFactoryBackendInterfaceCreateFunction):
2183         (WebCore::IDBFactoryBackendInterface::create):
2184         * Modules/indexeddb/chromium/IDBFactoryBackendInterfaceChromium.h: Added.
2185         (WebCore):
2186         * WebCore.gyp/WebCore.gyp:
2187         * WebCore.gypi:
2188
2189 2013-02-04  Abhishek Arya  <inferno@chromium.org>
2190
2191         Add ASSERT_WITH_SECURITY_IMPLICATION to detect bad cast in DOM, CSS, etc.
2192         https://bugs.webkit.org/show_bug.cgi?id=108688
2193
2194         Reviewed by Eric Seidel.
2195
2196         * Modules/notifications/Notification.cpp:
2197         (WebCore::Notification::Notification):
2198         (WebCore::Notification::permission):
2199         (WebCore::Notification::requestPermission):
2200         * Modules/speech/SpeechGrammar.cpp:
2201         (WebCore::SpeechGrammar::setSrc):
2202         * Modules/speech/SpeechGrammarList.cpp:
2203         (WebCore::SpeechGrammarList::addFromUri):
2204         * Modules/websockets/ThreadableWebSocketChannel.cpp:
2205         (WebCore::ThreadableWebSocketChannel::create):
2206         * accessibility/AccessibilityMenuListPopup.cpp:
2207         (WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
2208         * accessibility/AccessibilityTable.cpp:
2209         (WebCore::AccessibilityTable::cellForColumnAndRow):
2210         * css/CSSFontFaceRule.cpp:
2211         (WebCore::CSSFontFaceRule::reattach):
2212         * css/CSSImageSetValue.cpp:
2213         (WebCore::CSSImageSetValue::fillImageSet):
2214         * css/CSSPageRule.cpp:
2215         (WebCore::CSSPageRule::reattach):
2216         * css/CSSStyleRule.cpp:
2217         (WebCore::CSSStyleRule::reattach):
2218         * css/StyleBuilder.cpp:
2219         (WebCore::ApplyPropertyFontVariantLigatures::applyValue):
2220         (WebCore::ApplyPropertyTextDecoration::applyValue):
2221         (WebCore::ApplyPropertyZoom::applyValue):
2222         * css/StyleResolver.cpp:
2223         (WebCore::createGridPosition):
2224         (WebCore::StyleResolver::applyProperty):
2225         (WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
2226         * css/WebKitCSSFilterRule.cpp:
2227         (WebCore::WebKitCSSFilterRule::reattach):
2228         * css/WebKitCSSKeyframesRule.cpp:
2229         (WebCore::WebKitCSSKeyframesRule::reattach):
2230         * css/WebKitCSSViewportRule.cpp:
2231         (WebCore::WebKitCSSViewportRule::reattach):
2232         * editing/EditCommand.h:
2233         (WebCore::toSimpleEditCommand):
2234         * editing/visible_units.cpp:
2235         (WebCore::startOfParagraph):
2236         (WebCore::endOfParagraph):
2237         * html/HTMLCollection.cpp:
2238         (WebCore::LiveNodeListBase::setItemCache):
2239         * loader/ThreadableLoader.cpp:
2240         (WebCore::ThreadableLoader::create):
2241         (WebCore::ThreadableLoader::loadResourceSynchronously):
2242         * loader/WorkerThreadableLoader.cpp:
2243         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader):
2244         * page/Frame.cpp:
2245         (WebCore::Frame::frameForWidget):
2246         * platform/RefCountedSupplement.h:
2247         (WebCore::RefCountedSupplement::from):
2248         * rendering/RenderBlock.cpp:
2249         (WebCore::RenderBlock::splitBlocks):
2250         (WebCore::RenderBlock::firstLineBlock):
2251         * rendering/RenderBlockLineLayout.cpp:
2252         (WebCore::RenderBlock::createLineBoxes):
2253         * rendering/RenderBox.cpp:
2254         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
2255         * rendering/svg/RenderSVGText.cpp:
2256         (WebCore::RenderSVGText::positionForPoint):
2257         * rendering/svg/SVGRootInlineBox.cpp:
2258         (WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes):
2259         (WebCore::SVGRootInlineBox::layoutChildBoxes):
2260         * testing/js/WebCoreTestSupport.cpp:
2261         (WebCoreTestSupport::resetInternalsObject):
2262         * testing/v8/WebCoreTestSupport.cpp:
2263         (WebCoreTestSupport::resetInternalsObject):
2264         * workers/DefaultSharedWorkerRepository.cpp:
2265         (WebCore::SharedWorkerProxy::addToWorkerDocuments):
2266         (WebCore::SharedWorkerConnectTask::performTask):
2267         * workers/SharedWorker.cpp:
2268         (WebCore::SharedWorker::create):
2269         * workers/WorkerContext.cpp:
2270         (WebCore::CloseWorkerContextTask::performTask):
2271         * workers/WorkerMessagingProxy.cpp:
2272         (WebCore::MessageWorkerContextTask::performTask):
2273         (WebCore::connectToWorkerContextInspectorTask):
2274         (WebCore::disconnectFromWorkerContextInspectorTask):
2275         (WebCore::dispatchOnInspectorBackendTask):
2276         * workers/WorkerScriptLoader.cpp:
2277         (WebCore::WorkerScriptLoader::loadSynchronously):
2278         * workers/WorkerThread.cpp:
2279         (WebCore::WorkerThreadShutdownFinishTask::performTask):
2280         (WebCore::WorkerThreadShutdownStartTask::performTask):
2281
2282 2013-02-04  Dominik Röttsches  <dominik.rottsches@intel.com>
2283
2284         [Skia] Argument to HarfBuzzShaper::offsetForPosition unnecessarily truncated
2285         https://bugs.webkit.org/show_bug.cgi?id=108479
2286
2287         Reviewed by Emil A Eklund.
2288
2289         Remove a FIXME that intended to solve the value truncation.
2290         Should positively affect SVG text positioning.
2291
2292         No new tests, partially covered by manual test
2293         ManualTests/harfbuzz-mouse-selection-crash.html.
2294
2295         * platform/graphics/harfbuzz/FontHarfBuzz.cpp:
2296         (WebCore::Font::offsetForPositionForComplexText):
2297
2298 2013-02-04  Vladislav Kaznacheev  <kaznacheev@chromium.org>
2299
2300         Web Inspector: Create a container class for SidebarPane instances
2301         https://bugs.webkit.org/show_bug.cgi?id=108183
2302
2303         Reviewed by Pavel Feldman.
2304
2305         SidebarPaneStack is responsible for pane title bar and expand/collapse behavior (previously handled by SidebarPane).
2306         SidebarPanes are inserted into DOM lazily and can belong to more than one container.
2307         SidebarPane is ready to be displayed in other types of containers (such as tabbed pane as requested in https://bugs.webkit.org/show_bug.cgi?id=107552).
2308         There should be no visible changes except for one: DOM breakpoint pane expand/collapse state is no longer
2309         shared between Elements and Sources sidebars.
2310
2311         * inspector/front-end/AuditResultView.js:
2312         (WebInspector.AuditResultView):
2313         * inspector/front-end/BreakpointsSidebarPane.js:
2314         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._addBreakpoint):
2315         (WebInspector.XHRBreakpointsSidebarPane.prototype.highlightBreakpoint):
2316         (WebInspector.EventListenerBreakpointsSidebarPane.prototype.highlightBreakpoint):
2317         * inspector/front-end/DOMBreakpointsSidebarPane.js:
2318         (WebInspector.DOMBreakpointsSidebarPane.prototype.highlightBreakpoint):
2319         * inspector/front-end/ElementsPanel.js:
2320         (WebInspector.ElementsPanel):
2321         (WebInspector.ElementsPanel.prototype.wasShown):
2322         (WebInspector.ElementsPanel.prototype.updateStyles):
2323         (WebInspector.ElementsPanel.prototype.updateMetrics):
2324         (WebInspector.ElementsPanel.prototype.updateProperties):
2325         (WebInspector.ElementsPanel.prototype.updateEventListeners):
2326         * inspector/front-end/ExtensionPanel.js:
2327         (WebInspector.ExtensionSidebarPane):
2328         * inspector/front-end/ExtensionServer.js:
2329         (WebInspector.ExtensionServer.prototype._onCreateSidebarPane):
2330         * inspector/front-end/ScriptsPanel.js:
2331         (WebInspector.ScriptsPanel.prototype.wasShown):
2332         * inspector/front-end/SidebarPane.js:
2333         (WebInspector.SidebarPane):
2334         (WebInspector.SidebarPane.prototype.title):
2335         (WebInspector.SidebarPane.prototype.prepareContent):
2336         (WebInspector.SidebarPane.prototype.expand):
2337         (WebInspector.SidebarPane.prototype.onContentReady):
2338         (WebInspector.SidebarPane.prototype.setExpandCallback):
2339         (WebInspector.SidebarPane.prototype.setShowCallback):
2340         (WebInspector.SidebarPane.prototype.wasShown):
2341         (WebInspector.SidebarPaneStack):
2342         (WebInspector.SidebarPaneStack.prototype.wasShown):
2343         (WebInspector.SidebarPaneStack.prototype.addPane):
2344         (WebInspector.SidebarPaneStack.prototype._addTitle):
2345         (WebInspector.SidebarPaneStack.prototype._attachToPane):
2346         (WebInspector.SidebarPaneStack.prototype._isExpanded):
2347         (WebInspector.SidebarPaneStack.prototype._setExpanded):
2348         (WebInspector.SidebarPaneStack.prototype._onPaneExpanded):
2349         (WebInspector.SidebarPaneStack.prototype._collapsePane):
2350         (WebInspector.SidebarPaneStack.prototype._togglePane):
2351         (WebInspector.SidebarPaneStack.prototype._onTitleKeyDown):
2352         * inspector/front-end/StylesSidebarPane.js:
2353         (WebInspector.StylesSidebarPane.prototype._refreshUpdate):
2354         (WebInspector.StylesSidebarPane.prototype._rebuildUpdate):
2355         (WebInspector.StylesSidebarPane.prototype.set _createNewRule):
2356         (WebInspector.ComputedStyleSidebarPane.prototype.prepareContent):
2357         * inspector/front-end/WatchExpressionsSidebarPane.js:
2358         (WebInspector.WatchExpressionsSidebarPane):
2359         (WebInspector.WatchExpressionsSidebarPane.prototype.wasShown):
2360         (WebInspector.WatchExpressionsSidebarPane.prototype.addExpression):
2361         (WebInspector.WatchExpressionsSidebarPane.prototype._addButtonClicked):
2362         * inspector/front-end/inspector.css:
2363         (.pane-title + .pane-title, .pane:not(.visible) + .pane-title, .pane-title:first-of-type):
2364         (.pane-title):
2365         (.pane-title:active):
2366         (.pane-title::before):
2367         (.pane-title.expanded::before):
2368         (.pane-title > select):
2369         (.pane-title > select:hover):
2370         (.pane-title > select:active):
2371         (.pane-title > select.select-settings):
2372         (.pane-title > select.select-filter):
2373         (.pane-title > select > option, .pane-title > select > hr):
2374         (.pane-title > .pane-title-button):
2375         (.pane-title > .pane-title-button:hover):
2376         (.pane-title > .pane-title-button:active, .pane-title > .pane-title-button.toggled):
2377         (.pane-title > .pane-title-button.add):
2378         (.pane-title > .pane-title-button.element-state):
2379         (.pane-title > .pane-title-button.refresh):
2380         (.pane.visible > .body):
2381         (.pane.visible:nth-last-of-type(1)):
2382         (.panel-enabler-view button:not(.status-bar-item), .pane-title-button, button.show-all-nodes):
2383         (.panel-enabler-view button:active:not(.status-bar-item), .pane-title-button:active, button.show-all-nodes:active):
2384         (body.inactive .panel-enabler-view button:not(.status-bar-item), .panel-enabler-view button:disabled:not(.status-bar-item), body.inactive .pane-title-button, .pane-title-button:disabled, body.inactive button.show-all-nodes):
2385
2386 2013-02-01  Emil A Eklund  <eae@chromium.org>
2387
2388         Remove duplicate code in RenderBoxModelObject::computedCSSPadding*
2389         https://bugs.webkit.org/show_bug.cgi?id=108707
2390
2391         Reviewed by Eric Seidel.
2392         
2393         The computedCSSPaddingTop/Bottom/... methods in
2394         RenderBoxModelObject all do pretty much exactly the same thing
2395         yet share no code.
2396         
2397         Break out shared code into computedCSSPadding method and have
2398         the top/bottom/left/right/... ones call it with the appropriate
2399         length value.
2400
2401         No new tests, no change in functionality.
2402
2403         * rendering/RenderBoxModelObject.cpp:
2404         (WebCore::RenderBoxModelObject::computedCSSPadding):
2405         * rendering/RenderBoxModelObject.h:
2406         (WebCore::RenderBoxModelObject::computedCSSPaddingTop):
2407         (WebCore::RenderBoxModelObject::computedCSSPaddingBottom):
2408         (WebCore::RenderBoxModelObject::computedCSSPaddingLeft):
2409         (WebCore::RenderBoxModelObject::computedCSSPaddingRight):
2410         (WebCore::RenderBoxModelObject::computedCSSPaddingBefore):
2411         (WebCore::RenderBoxModelObject::computedCSSPaddingAfter):
2412         (WebCore::RenderBoxModelObject::computedCSSPaddingStart):
2413         (WebCore::RenderBoxModelObject::computedCSSPaddingEnd):
2414         (RenderBoxModelObject):
2415
2416 2013-02-04  Andrey Lushnikov  <lushnikov@chromium.org>
2417
2418         Web Inspector: add round braces to javascript tokenizer
2419         https://bugs.webkit.org/show_bug.cgi?id=108692
2420
2421         Reviewed by Pavel Feldman.
2422
2423         Change SourceJavascriptTokenizer.re2js file to produce "brace-start"
2424         and "brace-end" tokens for round braces.
2425         Regenerate SourceJavascriptTokenizer.js according to new re2js file.
2426
2427         No new tests: no change in behaviour.
2428
2429         * inspector/front-end/SourceJavaScriptTokenizer.js:
2430         (WebInspector.SourceJavaScriptTokenizer.prototype.nextToken):
2431         * inspector/front-end/SourceJavaScriptTokenizer.re2js:
2432
2433 2013-02-04  Pavel Feldman  <pfeldman@chromium.org>
2434
2435         Web Inspector: take page scale factor into account when updating overlay.
2436         https://bugs.webkit.org/show_bug.cgi?id=108831
2437
2438         Reviewed by Vsevolod Vlasov.
2439
2440         Otherwise, the ports that use page scale factor have broken overlay.
2441
2442         * inspector/InspectorOverlay.cpp:
2443         (WebCore::InspectorOverlay::update):
2444
2445 2013-02-04  Dan Carney  <dcarney@google.com>
2446
2447         [v8] explicit isolate parameter for MakeWeak calls
2448         https://bugs.webkit.org/show_bug.cgi?id=108818
2449
2450         Reviewed by Kentaro Hara.
2451
2452         No new tests. No change in functionality.
2453
2454         * bindings/v8/DOMDataStore.cpp:
2455         (WebCore::DOMDataStore::DOMDataStore):
2456         (WebCore::DOMDataStore::weakCallback):
2457         * bindings/v8/DOMDataStore.h:
2458         (WebCore::DOMDataStore::setWrapper):
2459         (WebCore::DOMDataStore::set):
2460         (WebCore::DOMDataStore::setWrapperInObject):
2461         (DOMDataStore):
2462         * bindings/v8/DOMWrapperMap.h:
2463         (WebCore::DOMWrapperMap::DOMWrapperMap):
2464         (WebCore::DOMWrapperMap::set):
2465         (WebCore::DOMWrapperMap::defaultWeakCallback):
2466         (DOMWrapperMap):
2467         * bindings/v8/DOMWrapperWorld.cpp:
2468         (WebCore::isolatedWorldWeakCallback):
2469         (WebCore::DOMWrapperWorld::makeContextWeak):
2470         * bindings/v8/ScriptState.cpp:
2471         (WebCore::ScriptState::ScriptState):
2472         (WebCore::ScriptState::weakReferenceCallback):
2473         * bindings/v8/ScriptState.h:
2474         (ScriptState):
2475         * bindings/v8/V8AbstractEventListener.cpp:
2476         (WebCore::V8AbstractEventListener::weakEventListenerCallback):
2477         (WebCore::V8AbstractEventListener::V8AbstractEventListener):
2478         (WebCore::V8AbstractEventListener::setListenerObject):
2479         * bindings/v8/V8AbstractEventListener.h:
2480         (V8AbstractEventListener):
2481         * bindings/v8/V8EventListener.cpp:
2482         (WebCore::V8EventListener::V8EventListener):
2483         * bindings/v8/V8LazyEventListener.cpp:
2484         (WebCore::V8LazyEventListener::V8LazyEventListener):
2485         * bindings/v8/V8MutationCallback.cpp:
2486         (WebCore::V8MutationCallback::V8MutationCallback):
2487         * bindings/v8/V8MutationCallback.h:
2488         (WebCore::V8MutationCallback::create):
2489         (WebCore::V8MutationCallback::weakCallback):
2490         * bindings/v8/V8NPObject.cpp:
2491         (WebCore::V8NPTemplateMap::set):
2492         (WebCore::V8NPTemplateMap::sharedInstance):
2493         (WebCore::V8NPTemplateMap::V8NPTemplateMap):
2494         (V8NPTemplateMap):
2495         (WebCore::V8NPTemplateMap::weakCallback):
2496         (WebCore::npObjectGetProperty):
2497         (WebCore):
2498         (WebCore::staticNPObjectMap):
2499         (WebCore::weakNPObjectCallback):
2500         * bindings/v8/V8ValueCache.cpp:
2501         (WebCore::cachedStringCallback):
2502         (WebCore::StringCache::v8ExternalStringSlow):
2503         * bindings/v8/custom/V8InjectedScriptManager.cpp:
2504         (WebCore::WeakReferenceCallback):
2505         (WebCore::createInjectedScriptHostV8Wrapper):
2506         * bindings/v8/custom/V8MutationObserverCustom.cpp:
2507         (WebCore::V8MutationObserver::constructorCallbackCustom):
2508
2509 2013-02-04  Dmitry Gozman  <dgozman@chromium.org>
2510
2511         Web Inspector: Allow user to change dock side by dragging toolbar
2512         https://bugs.webkit.org/show_bug.cgi?id=108073
2513
2514         Dragging toolbar to the right/bottom will change the dock side accordingly
2515         instead of changing the inspector window height (if dock to right is available).
2516
2517         Reviewed by Pavel Feldman.
2518
2519         No new tests, because of pure inspector UI change.
2520
2521         * inspector/front-end/DockController.js:
2522         (WebInspector.DockController.prototype.dockSide):
2523         * inspector/front-end/Toolbar.js:
2524         (WebInspector.Toolbar):
2525         (WebInspector.Toolbar.prototype._isDockedToBottom):
2526         (WebInspector.Toolbar.prototype._isUndocked):
2527         (WebInspector.Toolbar.prototype._toolbarDragStart):
2528         (WebInspector.Toolbar.prototype._toolbarDragEnd):
2529         (WebInspector.Toolbar.prototype._toolbarDrag):
2530         (WebInspector.Toolbar.prototype._toolbarDragMoveWindow):
2531         (WebInspector.Toolbar.prototype._toolbarDragChangeDocking):
2532         (WebInspector.Toolbar.prototype._toolbarDragChangeHeight):
2533         * inspector/front-end/UIUtils.js:
2534         (WebInspector._elementDragStart):
2535         (WebInspector._elementDragMove):
2536         (WebInspector._cancelDragEvents):
2537         (WebInspector._elementDragEnd):
2538
2539 2013-02-04  Andrey Kosyakov  <caseq@chromium.org>
2540
2541         Web Inspector: sync list of console API methods to that used by auto-complete
2542         https://bugs.webkit.org/show_bug.cgi?id=108804
2543
2544         Reviewed by Pavel Feldman.
2545
2546         - push new method names from InjectedScriptSource to RuntimeModel;
2547         - add a comment to InjectedScriptSource noting the necessity of keeping lists in sync.
2548
2549         * inspector/InjectedScriptSource.js:
2550         * inspector/front-end/RuntimeModel.js:
2551         (WebInspector.RuntimeModel.prototype.receivedPropertyNames):
2552         (WebInspector.RuntimeModel.prototype._completionsForExpression):
2553
2554 2013-02-04  Eugene Klyuchnikov  <eustas@chromium.org>
2555
2556         Web Inspector: [Network] Minor refactorings.
2557         https://bugs.webkit.org/show_bug.cgi?id=108162
2558
2559         Reviewed by Vsevolod Vlasov.
2560
2561         Apply minor refactorings to NetworkPanel.js
2562         Add hint to statusbar selector buttons.
2563
2564         * English.lproj/localizedStrings.js: Added hint string.
2565         * inspector/front-end/NetworkPanel.js:
2566         (WebInspector.NetworkLogView.prototype._createStatusBarItems): Ditto.
2567         (WebInspector.NetworkLogView.prototype._makeHeaderFragment):
2568         Applied minor refactoring.
2569         (WebInspector.NetworkLogView.prototype._createStatusBarItems.createFilterElement):
2570         Ditto.
2571         (WebInspector.NetworkLogView.prototype._updateOffscreenRows): Ditto.
2572         (WebInspector.NetworkPanel.prototype._onRowSizeChanged): Ditto.
2573
2574 2013-02-04  Eugene Klyuchnikov  <eustas@chromium.org>
2575
2576         Web Inspector: [CPU Profile] Apply minor refactorings and add JSDocs.
2577         https://bugs.webkit.org/show_bug.cgi?id=108437
2578
2579         Reviewed by Pavel Feldman.
2580
2581         CPU Profile code has obsolete inline-comments to clarify types.
2582         Currently we use JSDocs to specify types.
2583
2584         Also applied some minor refactorings.
2585
2586         * inspector/front-end/BottomUpProfileDataGridTree.js:
2587         (WebInspector.BottomUpProfileDataGridNode):
2588         Added JSDocs. Removed profileView parameter.
2589         (WebInspector.BottomUpProfileDataGridNode.prototype._takePropertiesFromProfileDataGridNode):
2590         Added JSDocs.
2591         (WebInspector.BottomUpProfileDataGridNode.prototype._keepOnlyChild):
2592         Ditto.
2593         (WebInspector.BottomUpProfileDataGridNode.prototype._merge):
2594         Ditto.
2595         (WebInspector.BottomUpProfileDataGridNode.prototype._sharedPopulate):
2596         Do not pass profileView to constructor.
2597         (WebInspector.BottomUpProfileDataGridTree):
2598         Added JSDocs. Renamed parameters.
2599         (WebInspector.BottomUpProfileDataGridTree.prototype.focus):
2600         Added JSDocs.
2601         (WebInspector.BottomUpProfileDataGridTree.prototype.exclude):
2602         Ditto.
2603         * inspector/front-end/CPUProfileView.js: Removed unused getter/setter.
2604         (WebInspector.CPUProfileView.prototype._getCPUProfileCallback):
2605         Un-nested. Added JSDocs.
2606         (WebInspector.CPUProfileView.prototype._getBottomUpProfileDataGridTree):
2607         Added JSDocs. Turned to method from getter. Simplified.
2608         (WebInspector.CPUProfileView.prototype._getTopDownProfileDataGridTree):
2609         Added JSDocs. Turned to method from getter.
2610         (WebInspector.CPUProfileView.prototype._assignParentsInProfile):
2611         Optimized.
2612         * inspector/front-end/DataGrid.js: Added JSDocs.
2613         * inspector/front-end/ProfileDataGridTree.js:
2614         (WebInspector.ProfileDataGridNode):
2615         Added JSDocs. Removed profileView parameter.
2616         (WebInspector.ProfileDataGridNode.prototype.createCell): Added JSDocs.
2617         (WebInspector.ProfileDataGridNode.prototype.sort): Ditto.
2618         (WebInspector.ProfileDataGridNode.prototype.insertChild): Ditto.
2619         (WebInspector.ProfileDataGridNode.prototype.removeChild): Ditto.
2620         (WebInspector.ProfileDataGridNode.prototype.removeChildren):
2621         Added JSDocs. Removed parameter.
2622         (WebInspector.ProfileDataGridNode.prototype.findChild): Added JSDocs.
2623         (WebInspector.ProfileDataGridTree): Added JSDocs. Renamed parameter.
2624         * inspector/front-end/TopDownProfileDataGridTree.js:
2625         (WebInspector.TopDownProfileDataGridNode):
2626         Added JSDocs. Removed profileView parameter.
2627         (WebInspector.TopDownProfileDataGridNode.prototype._sharedPopulate):
2628         Do not pass profileView to constructor.
2629         (WebInspector.TopDownProfileDataGridTree):
2630         Added JSDocs. Renamed parameter.
2631         (WebInspector.TopDownProfileDataGridTree.prototype.focus):
2632         Added JSDocs.
2633         (WebInspector.TopDownProfileDataGridTree.prototype.exclude):
2634         Ditto.
2635
2636 2013-02-04  Dan Carney  <dcarney@google.com>
2637
2638         [v8] use toV8Fast in hand coded callbacks
2639         https://bugs.webkit.org/show_bug.cgi?id=108817
2640
2641         Reviewed by Kentaro Hara.
2642
2643         No new tests. No change in functionality.
2644
2645         * bindings/v8/custom/V8DOMWindowCustom.cpp:
2646         (WebCore::V8DOMWindow::openCallback):
2647         (WebCore::V8DOMWindow::indexedPropertyGetter):
2648         (WebCore::V8DOMWindow::namedPropertyGetter):
2649         * bindings/v8/custom/V8DocumentCustom.cpp:
2650         (WebCore::V8Document::evaluateCallback):
2651         * bindings/v8/custom/V8DocumentLocationCustom.cpp:
2652         (WebCore::V8Document::locationAccessorGetter):
2653         * bindings/v8/custom/V8EventCustom.cpp:
2654         (WebCore::V8Event::dataTransferAccessorGetter):
2655         (WebCore::V8Event::clipboardDataAccessorGetter):
2656         * bindings/v8/custom/V8FileReaderCustom.cpp:
2657         (WebCore::V8FileReader::resultAccessorGetter):
2658         * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp:
2659         (WebCore):
2660         (WebCore::getNamedItems):
2661         (WebCore::getItem):
2662         (WebCore::V8HTMLAllCollection::namedPropertyGetter):
2663         (WebCore::V8HTMLAllCollection::itemCallback):
2664         (WebCore::V8HTMLAllCollection::namedItemCallback):
2665         (WebCore::V8HTMLAllCollection::callAsFunctionCallback):
2666         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
2667         (WebCore::V8HTMLCanvasElement::getContextCallback):
2668         * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
2669         (WebCore::V8HTMLCollection::namedPropertyGetter):
2670         * bindings/v8/custom/V8HTMLElementCustom.cpp:
2671         (WebCore::V8HTMLElement::itemValueAccessorGetter):
2672         * bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp:
2673         (WebCore):
2674         (WebCore::getNamedItems):
2675         (WebCore::V8HTMLFormControlsCollection::namedPropertyGetter):
2676         (WebCore::V8HTMLFormControlsCollection::namedItemCallback):
2677         * bindings/v8/custom/V8HTMLFormElementCustom.cpp:
2678         (WebCore::V8HTMLFormElement::indexedPropertyGetter):
2679         (WebCore::V8HTMLFormElement::namedPropertyGetter):
2680         * bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp:
2681         (WebCore::V8HTMLFrameSetElement::namedPropertyGetter):
2682         * bindings/v8/custom/V8HTMLLinkElementCustom.cpp:
2683         (WebCore::V8HTMLLinkElement::sizesAccessorGetter):
2684         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
2685         (WebCore):
2686         (WebCore::getNamedItems):
2687         (WebCore::V8HTMLOptionsCollection::namedPropertyGetter):
2688         (WebCore::V8HTMLOptionsCollection::namedItemCallback):
2689         (WebCore::V8HTMLOptionsCollection::indexedPropertyGetter):
2690         * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
2691         (WebCore::V8HTMLSelectElement::indexedPropertyGetter):
2692         * bindings/v8/custom/V8MessageEventCustom.cpp:
2693         (WebCore::V8MessageEvent::dataAccessorGetter):
2694         (WebCore::V8MessageEvent::portsAccessorGetter):
2695         * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
2696         (WebCore::V8NamedNodeMap::indexedPropertyGetter):
2697         (WebCore::V8NamedNodeMap::namedPropertyGetter):
2698         * bindings/v8/custom/V8NodeListCustom.cpp:
2699         (WebCore::V8NodeList::namedPropertyGetter):
2700         * bindings/v8/custom/V8PopStateEventCustom.cpp:
2701         (WebCore::V8PopStateEvent::stateAccessorGetter):
2702         * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
2703         (WebCore::V8SQLTransactionSync::executeSqlCallback):
2704         * bindings/v8/custom/V8StyleSheetListCustom.cpp:
2705         (WebCore::V8StyleSheetList::namedPropertyGetter):
2706         * bindings/v8/custom/V8TrackEventCustom.cpp:
2707         (WebCore::V8TrackEvent::trackAccessorGetter):
2708         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
2709         (WebCore::V8XMLHttpRequest::responseAccessorGetter):
2710
2711 2013-02-04  David Kilzer  <ddkilzer@apple.com>
2712
2713         Remove duplicate entry from WebCore Xcode project
2714
2715             $ uniq Source/WebCore/WebCore.xcodeproj/project.pbxproj | diff -u - Source/WebCore/WebCore.xcodeproj/project.pbxproj | patch -p0 -R
2716             patching file Source/WebCore/WebCore.xcodeproj/project.pbxproj
2717
2718         * WebCore.xcodeproj/project.pbxproj: Remove duplicate.
2719
2720 2013-02-04  David Kilzer  <ddkilzer@apple.com>
2721
2722         Sort WebCore Xcode project file
2723
2724         * WebCore.xcodeproj/project.pbxproj:
2725
2726 2013-02-04  Dan Carney  <dcarney@google.com>
2727
2728         [v8] disable ascii check once latin-1 is enabled in v8
2729         https://bugs.webkit.org/show_bug.cgi?id=108805
2730
2731         Reviewed by Kentaro Hara.
2732
2733         No new tests. No change in functionality.
2734
2735         * bindings/v8/V8ValueCache.cpp:
2736         (WebCore::makeExternalString):
2737
2738 2013-02-04  Pavel Feldman  <pfeldman@chromium.org>
2739
2740         Web Inspector: make tabbed pane header a relayout boundary.
2741         https://bugs.webkit.org/show_bug.cgi?id=108650
2742
2743         Reviewed by Alexander Pavlov.
2744
2745         Otherwise, its measure width routine causes total reflow.
2746
2747         * inspector/front-end/tabbedPane.css:
2748         (.tabbed-pane-header):
2749
2750 2013-02-04  Hayato Ito  <hayato@chromium.org>
2751
2752         Split InspectorCSSOMWrappers out from StyleResolver.h into its own file.
2753         https://bugs.webkit.org/show_bug.cgi?id=108797
2754
2755         Reviewed by Hajime Morita.
2756
2757         This is a following patch after r141373. Now we can have
2758         InspectorCSSOMWrappers in its own file since CSSDefaultStyleSheets
2759         was factored out from StyleResolver.cpp in r141733.
2760
2761         WebCore/inspector/ directory is used for basic inspector
2762         functionalities. Therefore, I've put
2763         InspectorCSSOMWrappers.{h,cpp} in WebCore/css/ rather than
2764         WebCore/inspector/.
2765
2766         No new tests, refactoring only.
2767
2768         * CMakeLists.txt:
2769         * GNUmakefile.list.am:
2770         * Target.pri:
2771         * WebCore.gypi:
2772         * WebCore.xcodeproj/project.pbxproj:
2773         * css/CSSAllInOne.cpp:
2774         * css/InspectorCSSOMWrappers.cpp: Added.
2775         (WebCore):
2776         (WebCore::InspectorCSSOMWrappers::collectFromStyleSheetIfNeeded):
2777         (WebCore::InspectorCSSOMWrappers::collect):
2778         (WebCore::InspectorCSSOMWrappers::collectFromStyleSheetContents):
2779         (WebCore::InspectorCSSOMWrappers::collectFromStyleSheets):
2780         (WebCore::InspectorCSSOMWrappers::collectFromDocumentStyleSheetCollection):
2781         (WebCore::InspectorCSSOMWrappers::getWrapperForRuleInSheets):
2782         (WebCore::InspectorCSSOMWrappers::reportMemoryUsage):
2783         * css/InspectorCSSOMWrappers.h: Added.
2784         (WebCore):
2785         (InspectorCSSOMWrappers):
2786         * css/StyleResolver.cpp:
2787         * css/StyleResolver.h:
2788
2789 2013-02-04  Balazs Kelemen  <kbalazs@webkit.org>
2790
2791         [Soup] Wrap SoupSession by NetworkStorageSession
2792         https://bugs.webkit.org/show_bug.cgi?id=108615
2793
2794         Reviewed by Alexey Proskuryakov.
2795
2796         Implement NetworkStorageSession for ports using soup. It has been
2797         separated from NetworkingContext, so now we have a default storage
2798         session, which is the same as before but now wrapped with NetworkStorageSession,
2799         and it can be overridden by the networking context.
2800
2801         No change in behavior so no new tests.
2802
2803         * CMakeLists.txt:
2804         * GNUmakefile.list.am:
2805         * PlatformBlackBerry.cmake:
2806         * PlatformEfl.cmake:
2807         * loader/CookieJar.cpp:
2808         (WebCore):
2809         Now we also get the storage session from the networking context
2810         and not the other way.
2811
2812         * platform/network/NetworkStorageSession.h:
2813         (NetworkStorageSession):
2814         (WebCore::NetworkStorageSession::setSoupSession):
2815         (WebCore::NetworkStorageSession::soupSession):
2816         Hold a SoupSession pointer for ports using soup. Added a setter because it is
2817         necessary for API's that allow it to be specified per page, like EFL WK1.
2818
2819         * platform/network/NetworkingContext.h:
2820         (NetworkingContext):
2821         * platform/network/soup/CookieJarSoup.cpp:
2822         (WebCore::cookieJarForSession):
2823         * platform/network/soup/NetworkStorageSessionSoup.cpp: Copied from Source/WebKit2/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp.
2824         (WebCore::NetworkStorageSession::NetworkStorageSession):
2825         (WebCore::NetworkStorageSession::defaultStorageSession):
2826         (WebCore::NetworkStorageSession::createDefaultSession):
2827         (WebCore::NetworkStorageSession::createPrivateBrowsingSession):
2828         (WebCore::NetworkStorageSession::switchToNewTestingSession):
2829         * platform/network/soup/ResourceHandleSoup.cpp:
2830         (WebCore::sessionFromContext):
2831
2832         * CMakeLists.txt:
2833         * GNUmakefile.list.am:
2834         * PlatformBlackBerry.cmake:
2835         * PlatformEfl.cmake:
2836         * loader/CookieJar.cpp:
2837         (WebCore):
2838         * platform/network/NetworkStorageSession.h:
2839         (NetworkStorageSession):
2840         (WebCore::NetworkStorageSession::setSoupSession):
2841         (WebCore::NetworkStorageSession::soupSession):
2842         * platform/network/NetworkingContext.h:
2843         (NetworkingContext):
2844         * platform/network/soup/CookieJarSoup.cpp:
2845         (WebCore::cookieJarForSession):
2846         * platform/network/soup/ResourceHandleSoup.cpp:
2847         (WebCore::sessionFromContext):
2848
2849 2013-02-04  Andrey Lushnikov  <lushnikov@chromium.org>
2850
2851         Web Inspector: source location in statusbar has few bugs in it
2852         https://bugs.webkit.org/show_bug.cgi?id=108748
2853
2854         Reviewed by Vsevolod Vlasov.
2855
2856         Call super method statusBarItems in SnippetJavaScriptSourceFrame class
2857         and merge its results. Fix css styles for source location in statusbar
2858         and rename its css class into a less confusing name.
2859
2860         No new test: no change in behaviour.
2861
2862         * inspector/front-end/SnippetJavaScriptSourceFrame.js:
2863         (WebInspector.SnippetJavaScriptSourceFrame.prototype.statusBarItems):
2864         * inspector/front-end/SourceFrame.js:
2865         (WebInspector.SourceFrame):
2866         * inspector/front-end/inspector.css:
2867         (.source-frame-cursor-position):
2868
2869 2013-02-04  Mike West  <mkwst@chromium.org>
2870
2871         Cleanup: Normalize usage of ExceptionCode in ContainerNode::checkXxxChild()
2872         https://bugs.webkit.org/show_bug.cgi?id=108766
2873
2874         Reviewed by Kentaro Hara.
2875
2876         This patch refactors checkAddChild and checkReplaceChild to remove the
2877         creation of an extra ExceptionCode that's not necessary for the
2878         desired behavior, and to bring the ExceptionCode usage into line with
2879         the rest of WebKit (this was the only case where ExceptionCode was
2880         assigned inside an 'if' statement's condition).
2881
2882         After this patch, 'ec' will always be assigned a value, even if the
2883         result of 'checkAcceptChild' is 0. This would only change behavior if
2884         'ec' was non-zero coming into the function, and 'checkAcceptChild'
2885         returned 0. Since every callsite is either directly after an explicit
2886         zeroing of 'ec', or after an 'if (ec)' clause, that case should never
2887         appear. This patch, therefore, shouldn't visibly change WebKit's
2888         behavior.
2889
2890         * dom/ContainerNode.cpp:
2891         (WebCore::checkAddChild):
2892         (WebCore::checkReplaceChild):
2893
2894 2013-02-03  David Kilzer  <ddkilzer@apple.com>
2895
2896         Upstream ENABLE_PDFKIT_PLUGIN settting
2897         <http://webkit.org/b/108792>
2898
2899         Reviewed by Tim Horton.
2900
2901         * Configurations/FeatureDefines.xcconfig: Disable PDFKIT_PLUGIN
2902         on iOS since PDFKit is a Mac-only framework.
2903
2904 2013-02-03  Takashi Sakamoto  <tasak@google.com>
2905
2906         Split per-resolve logic out from StyleResolver.
2907         https://bugs.webkit.org/show_bug.cgi?id=96421
2908
2909         Reviewed by Eric Seidel.
2910
2911         Implemented class StyleResolver::State and added m_state to
2912         StyleResolver. All member variables used for per-resolve logic are
2913         moved into the state class.
2914
2915         No new tests, because just refactoring.
2916
2917         * css/SVGCSSStyleSelector.cpp:
2918         (WebCore::StyleResolver::applySVGProperty):
2919         * css/StyleResolver.cpp:
2920         (WebCore):
2921         (WebCore::StyleResolver::StyleResolver):
2922         (WebCore::StyleResolver::collectMatchingRules):
2923         (WebCore::StyleResolver::collectMatchingRulesForRegion):
2924         (WebCore::StyleResolver::sortAndTransferMatchedRules):
2925         (WebCore::StyleResolver::matchScopedAuthorRules):
2926         (WebCore::StyleResolver::styleSharingCandidateMatchesHostRules):
2927         (WebCore::StyleResolver::matchHostRules):
2928         (WebCore::StyleResolver::matchAuthorRules):
2929         (WebCore::StyleResolver::matchUserRules):
2930         (WebCore::StyleResolver::matchUARules):
2931         (WebCore::StyleResolver::collectMatchingRulesForList):
2932         (WebCore::StyleResolver::sortMatchedRules):
2933         (WebCore::StyleResolver::matchAllRules):
2934         (WebCore::StyleResolver::initElement):
2935         (WebCore::StyleResolver::initForStyleResolve):
2936         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
2937         (WebCore::StyleResolver::canShareStyleWithControl):
2938         (WebCore::StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes):
2939         (WebCore::StyleResolver::canShareStyleWithElement):
2940         (WebCore::StyleResolver::locateSharedStyle):
2941         (WebCore::StyleResolver::styleForElement):
2942         (WebCore::StyleResolver::styleForKeyframe):
2943         (WebCore::StyleResolver::pseudoStyleForElement):
2944         (WebCore::StyleResolver::styleForPage):
2945         (WebCore::StyleResolver::defaultStyleForElement):
2946         (WebCore::StyleResolver::adjustRenderStyle):
2947         (WebCore::StyleResolver::updateFont):
2948         (WebCore::StyleResolver::cacheBorderAndBackground):
2949         (WebCore::StyleResolver::pseudoStyleRulesForElement):
2950         (WebCore::StyleResolver::ruleMatches):
2951         (WebCore::StyleResolver::checkRegionSelector):
2952         (WebCore::StyleResolver::applyProperties):
2953         (WebCore::StyleResolver::applyMatchedProperties):
2954         (WebCore::StyleResolver::isLeftPage):
2955         (WebCore::StyleResolver::applyPropertyToStyle):
2956         (WebCore::StyleResolver::useSVGZoomRules):
2957         (WebCore::createGridTrackBreadth):
2958         (WebCore::createGridTrackMinMax):
2959         (WebCore::createGridTrackGroup):
2960         (WebCore::createGridTrackList):
2961         (WebCore::StyleResolver::resolveVariables):
2962         (WebCore::StyleResolver::applyProperty):
2963         (WebCore::StyleResolver::cachedOrPendingFromValue):
2964         (WebCore::StyleResolver::generatedOrPendingFromValue):
2965         (WebCore::StyleResolver::setOrPendingFromValue):
2966         (WebCore::StyleResolver::cursorOrPendingFromValue):
2967         (WebCore::StyleResolver::checkForTextSizeAdjust):
2968         (WebCore::StyleResolver::initializeFontStyle):
2969         (WebCore::StyleResolver::setFontSize):
2970         (WebCore::StyleResolver::colorFromPrimitiveValue):
2971         (WebCore::StyleResolver::loadPendingSVGDocuments):
2972         (WebCore::StyleResolver::cachedOrPendingStyleShaderFromValue):
2973         (WebCore::StyleResolver::loadPendingShaders):
2974         (WebCore::StyleResolver::parseCustomFilterTransformParameter):
2975         (WebCore::StyleResolver::createFilterOperations):
2976         (WebCore::StyleResolver::loadPendingImage):
2977         (WebCore::StyleResolver::loadPendingImages):
2978         (WebCore::StyleResolver::reportMemoryUsage):
2979         * css/StyleResolver.h:
2980         (WebCore::StyleResolver::style):
2981         (WebCore::StyleResolver::parentStyle):
2982         (WebCore::StyleResolver::rootElementStyle):
2983         (WebCore::StyleResolver::element):
2984         (WebCore::StyleResolver::setFontDescription):
2985         (WebCore::StyleResolver::setZoom):
2986         (WebCore::StyleResolver::setEffectiveZoom):
2987         (WebCore::StyleResolver::setTextSizeAdjust):
2988         (WebCore::StyleResolver::setWritingMode):
2989         (WebCore::StyleResolver::setTextOrientation):
2990         (WebCore::StyleResolver::hasParentNode):
2991         (WebCore::StyleResolver::addMatchedRule):
2992         (StyleResolver):
2993         (State):
2994         (WebCore::StyleResolver::State::State):
2995         (WebCore::StyleResolver::applyPropertyToRegularStyle):
2996         (WebCore::StyleResolver::applyPropertyToVisitedLinkStyle):
2997         Added "m_state." to access member variables used for per-resolve logic.
2998
2999 2013-02-03  Kent Tamura  <tkent@chromium.org>
3000
3001         Support setLangAttributeAwareFormControlUIEnabled on Chromium Windows XP
3002         https://bugs.webkit.org/show_bug.cgi?id=108791
3003
3004         Reviewed by Kentaro Hara.
3005
3006         We didn't support setLangAttributeAwareFormControlUIEnabled(true) on
3007         Chromium Windows XP because of lack of LocaleNameToLCID API. This change
3008         add manual mapping from locale names to LCIDs for Windows XP.
3009
3010         No new tests. This doesn't make any behavior changes in products, and
3011         this improves some test results.
3012
3013         * platform/text/win/LocaleWin.cpp:
3014         (WebCore): Define NameToLCIDMap.
3015         (WebCore::removeLastComponent):
3016         Remove the last component separated with '-'.
3017         (WebCore::ensureNameToLCIDMap):
3018         Add locale names used in layout tests.
3019         (WebCore::convertLocaleNameToLCID):
3020         Find an appropriate LCID longest matching with the specified locale name.
3021         (WebCore::LCIDFromLocale):
3022         Use convertLocaleNameToLCID if LocaleNameToLCID is not available.
3023
3024 2013-02-03  Kent Tamura  <tkent@chromium.org>
3025
3026         Add FocusDirection argument to HTMLTextFormControlElement::handleFocusEvent
3027         https://bugs.webkit.org/show_bug.cgi?id=108775
3028
3029         Reviewed by Hajime Morita.
3030
3031         We'd like to add a FocusDirection argument to
3032         HTMLTextFormControlElement::handleFocusEvent in order to fix Bug
3033         108447. This is a preparation for it.
3034
3035         We need to add FocusDirection arguments to some focus-related functions
3036         to pass it correctly when TAB or Shift+TAB is pressed.
3037
3038         No new tests. This doesn't make any behavior changes.
3039
3040         * html/HTMLTextFormControlElement.cpp:
3041         (WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
3042         To pass the FocusDirection argument to handleFocusEvent, we need to add
3043         it to dispatchFocusEvent too.
3044         * html/HTMLTextFormControlElement.h:
3045         (HTMLTextFormControlElement):
3046         Add FocusDirection arugment to dispatchFocusEvent.
3047         (WebCore::HTMLTextFormControlElement::handleFocusEvent):
3048         Add FocusDirection argument.
3049
3050         * dom/Node.cpp:
3051         (WebCore::Node::dispatchFocusEvent): Add FocusDirection argument.
3052         * dom/Node.h:
3053         (Node): Ditto.
3054
3055         * dom/Document.cpp:
3056         (WebCore::Document::setFocusedNode): Add FocusDirection argument in
3057         order to pass it to Node::dispatchFocusEvent.
3058         * dom/Document.h:
3059         (Document): Ditto.
3060
3061         * page/FocusController.cpp:
3062         (WebCore::dispatchEventsOnWindowAndFocusedNode):
3063         Adjust Node::dispatchFocusEvent argument.
3064         (WebCore::FocusController::advanceFocusInDocumentOrder):
3065         Pass FocusDirectio to Element::focus.
3066         (WebCore::FocusController::setFocusedNode):
3067         Add FocusDirection argument in order to pass it to Document::setFocusedNode.
3068         (WebCore::FocusController::advanceFocusDirectionallyInContainer):
3069         Pass FocusDirectio to Element::focus.
3070         * page/FocusController.h:
3071         (FocusController): Add FocusDirection argument to setFocusedNode.
3072
3073         * dom/Element.cpp:
3074         (WebCore::Element::focus):
3075         Add FocusDirection argument to pass it to FocusController::setFocusedNode.
3076         * dom/Element.h:
3077         (Element): Ditto.
3078
3079         * WebCore.exp.in:
3080         Update FocusController::setFocusedNode and Document::setFocusedNode.
3081
3082         * html/HTMLLabelElement.cpp:
3083         (WebCore::HTMLLabelElement::focus): Adjust FocusDirection argument.
3084         * html/HTMLLabelElement.h:
3085         (HTMLLabelElement): Ditto.
3086         * html/HTMLLegendElement.cpp:
3087         (WebCore::HTMLLegendElement::focus): Ditto.
3088         * html/HTMLLegendElement.h:
3089         (HTMLLegendElement): Ditto.
3090         * html/HTMLSelectElement.cpp:
3091         (WebCore::HTMLSelectElement::dispatchFocusEvent): Ditto.
3092         * html/HTMLSelectElement.h:
3093         (HTMLSelectElement): Ditto.
3094
3095         * html/HTMLInputElement.cpp:
3096         (WebCore::HTMLInputElement::defaultFocus):
3097         Add FocusDirection argument in order to pass it from
3098         HTMLInputElement::focus() to HTMLTextFormControlElement::focus().
3099         (WebCore::HTMLInputElement::focus):
3100         Pass the FocusDirection argument to InputType::focus. See above.
3101         (WebCore::HTMLInputElement::handleFocusEvent):
3102         Adjust FocusDirection argument.
3103         * html/HTMLInputElement.h:
3104         (HTMLInputElement):
3105         * html/InputType.cpp:
3106         (WebCore::InputType::focus): Add FocusDirection argument.
3107         * html/InputType.h:
3108         (InputType): Ditto.
3109
3110         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
3111         (WebCore::BaseMultipleFieldsDateAndTimeInputType::focus):
3112         Add FocusDirection argument to follow InputType.
3113         * html/BaseMultipleFieldsDateAndTimeInputType.h:
3114         (BaseMultipleFieldsDateAndTimeInputType): Ditto.
3115
3116 2013-02-03  Kassy Coan  <kassycoan@chromium.org>
3117
3118         Adds usage instrumentation for indexedDB
3119         Includes new header file in project files
3120
3121         https://bugs.webkit.org/show_bug.cgi?id=107772
3122
3123         Reviewed by Tony Chang.
3124
3125         Currently untestable. Has zero effect apart from histogramming.
3126
3127         * GNUmakefile.list.am:
3128         * Modules/indexeddb/IDBDatabase.cpp:
3129         (WebCore::IDBDatabase::createObjectStore):
3130         (WebCore::IDBDatabase::deleteObjectStore):
3131         (WebCore::IDBDatabase::transaction):
3132         * Modules/indexeddb/IDBFactory.cpp:
3133         (WebCore::IDBFactory::openInternal):
3134         (WebCore::IDBFactory::deleteDatabase):
3135         * Modules/indexeddb/IDBHistograms.h: Added.
3136         (WebCore):
3137         * Target.pri:
3138         * WebCore.gypi:
3139         * WebCore.vcproj/WebCore.vcproj:
3140         * WebCore.xcodeproj/project.pbxproj:
3141
3142 2013-02-03  Hayato Ito  <hayato@chromium.org>
3143
3144         Split default style-sheet statics out from StyleResolver into its own class
3145         https://bugs.webkit.org/show_bug.cgi?id=107780
3146
3147         Reviewed by Dimitri Glazkov.
3148
3149         Factored static variables and logic about default style sheets out from StyleResolver into its own class
3150         CSSDefaultStyleSheets. This is a following patch after r141373.
3151
3152         No new tests, refactoring only.
3153
3154         * CMakeLists.txt:
3155         * GNUmakefile.list.am:
3156         * Target.pri:
3157         * WebCore.gypi:
3158         * WebCore.xcodeproj/project.pbxproj:
3159         * css/CSSAllInOne.cpp:
3160         * css/CSSDefaultStyleSheets.cpp: Added.
3161         (WebCore):
3162         (WebCore::elementCanUseSimpleDefaultStyle):
3163         (WebCore::screenEval):
3164         (WebCore::printEval):
3165         (WebCore::parseUASheet):
3166         (WebCore::CSSDefaultStyleSheets::initDefaultStyle):
3167         (WebCore::CSSDefaultStyleSheets::loadFullDefaultStyle):
3168         (WebCore::CSSDefaultStyleSheets::loadSimpleDefaultStyle):
3169         (WebCore::CSSDefaultStyleSheets::viewSourceStyle):
3170         (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
3171         * css/CSSDefaultStyleSheets.h: Added.
3172         (WebCore):
3173         (CSSDefaultStyleSheets):
3174         * css/StyleResolver.cpp:
3175         (WebCore):
3176         (WebCore::StyleResolver::StyleResolver):
3177         (WebCore::StyleResolver::matchUARules):
3178         (WebCore::StyleResolver::styleForElement):
3179         (WebCore::StyleResolver::styleForPage):
3180         (WebCore::InspectorCSSOMWrappers::getWrapperForRuleInSheets):
3181         (WebCore::StyleResolver::collectFeatures):
3182         (WebCore::StyleResolver::reportMemoryUsage):
3183
3184 2013-02-03  Kentaro Hara  <haraken@chromium.org>
3185
3186         [V8] Simplify CodeGeneratorV8.pm by using InheritsExtendedAttribute("EventTarget")
3187         https://bugs.webkit.org/show_bug.cgi?id=108441
3188
3189         Reviewed by Adam Barth.
3190
3191         A complicated condition in GetInternalFields() can be simplified
3192         by using InheritsExtendedAttribute("EventTarget").
3193
3194         No tests. No change in behavior.
3195
3196         * bindings/scripts/CodeGeneratorV8.pm:
3197         (GetInternalFields):
3198         * dom/EventTarget.idl: Added [EventTarget] which should have been added.
3199         * svg/SVGElementInstance.idl: Ditto.
3200
3201 2013-02-03  Gustavo Noronha Silva  <gns@gnome.org>
3202
3203         [Soup] Do not use local variables for the client
3204         https://bugs.webkit.org/show_bug.cgi?id=108714
3205
3206         Reviewed by Martin Robinson.
3207
3208         Covered by existing tests, refactoring code only.
3209
3210         We have had problems in the past with the client being destroyed or
3211         changed inside a method or function, and we ended up with a stale
3212         pointer, leading to crashes. This refactoring is an effort to minimize
3213         the possibility of hitting that same issue in the future.
3214
3215         * platform/network/soup/ResourceHandleSoup.cpp:
3216         (WebCore::redirectSkipCallback): no longer use a local variable to hold
3217         the client.
3218         (WebCore::wroteBodyDataCallback): ditto.
3219         (WebCore::nextMultipartResponsePartCallback): ditto.
3220         (WebCore::sendRequestCallback): ditto.
3221         (WebCore::closeCallback): ditto.
3222         (WebCore::readCallback): ditto.
3223
3224 2013-02-03  Kentaro Hara  <haraken@chromium.org>
3225
3226         [V8] Pass an Isolate to HasInstance() (part 1)
3227         https://bugs.webkit.org/show_bug.cgi?id=108617
3228
3229         Reviewed by Adam Barth.
3230
3231         This is one of efforts to pass an Isolate to GetTemplate().
3232
3233         No tests. No change in behavior.
3234
3235         * bindings/scripts/CodeGeneratorV8.pm:
3236         (JSValueToNative):
3237         * bindings/scripts/test/V8/V8Float64Array.cpp:
3238         (WebCore::Float64ArrayV8Internal::fooCallback):
3239         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
3240         (WebCore::TestActiveDOMObjectV8Internal::excitingFunctionCallback):
3241         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
3242         (WebCore::TestEventTargetV8Internal::dispatchEventCallback):
3243         * bindings/scripts/test/V8/V8TestInterface.cpp:
3244         (WebCore::TestInterfaceV8Internal::supplementalNodeAttrSetter):
3245         (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):
3246         * bindings/scripts/test/V8/V8TestObj.cpp:
3247         (WebCore::TestObjV8Internal::testObjAttrAttrSetter):
3248         (WebCore::TestObjV8Internal::XMLObjAttrAttrSetter):
3249         (WebCore::TestObjV8Internal::typedArrayAttrAttrSetter):
3250         (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeAttrSetter):
3251         (WebCore::TestObjV8Internal::withScriptStateAttributeRaisesAttrSetter):
3252         (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrSetter):
3253         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrSetter):
3254         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrSetter):
3255         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrSetter):
3256         (WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrSetter):
3257         (WebCore::TestObjV8Internal::mutablePointAttrSetter):
3258         (WebCore::TestObjV8Internal::immutablePointAttrSetter):
3259         (WebCore::TestObjV8Internal::voidMethodWithArgsCallback):
3260         (WebCore::TestObjV8Internal::longMethodWithArgsCallback):
3261         (WebCore::TestObjV8Internal::objMethodWithArgsCallback):
3262         (WebCore::TestObjV8Internal::methodThatRequiresAllArgsAndThrowsCallback):
3263         (WebCore::TestObjV8Internal::overloadedMethod1Callback):
3264         (WebCore::TestObjV8Internal::overloadedMethod2Callback):
3265         (WebCore::TestObjV8Internal::overloadedMethod8Callback):
3266         (WebCore::TestObjV8Internal::convert1Callback):
3267         (WebCore::TestObjV8Internal::convert2Callback):
3268         (WebCore::TestObjV8Internal::convert4Callback):
3269         (WebCore::TestObjV8Internal::convert5Callback):
3270         (WebCore::TestObjV8Internal::variadicNodeMethodCallback):
3271         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
3272         (WebCore::V8TestOverloadedConstructors::constructor1Callback):
3273         (WebCore::V8TestOverloadedConstructors::constructor2Callback):
3274         (WebCore::V8TestOverloadedConstructors::constructor3Callback):
3275         * bindings/v8/Dictionary.cpp:
3276         (WebCore::Dictionary::get):
3277         * bindings/v8/ScriptProfiler.cpp:
3278         (WebCore::ScriptProfiler::visitNodeWrappers):
3279         * bindings/v8/SerializedScriptValue.cpp:
3280         (WebCore::SerializedScriptValue::SerializedScriptValue):
3281         (WebCore::SerializedScriptValue::deserialize):
3282         * bindings/v8/V8Binding.cpp:
3283         (WebCore::toDOMStringList):
3284         (WebCore::toXPathNSResolver):
3285         * bindings/v8/V8Binding.h:
3286         (WebCore):
3287         * bindings/v8/V8Collection.cpp:
3288         (WebCore::toOptionsCollectionSetter):
3289         * bindings/v8/V8GCController.cpp:
3290         (WebCore::WrapperVisitor::WrapperVisitor):
3291         (WrapperVisitor):
3292         (WebCore::V8GCController::majorGCPrologue):
3293         * bindings/v8/V8NPObject.cpp:
3294         (WebCore::npObjectInvokeImpl):
3295         * bindings/v8/V8Utilities.cpp:
3296         (WebCore::extractTransferables):
3297         * bindings/v8/custom/V8DocumentCustom.cpp:
3298         (WebCore::V8Document::evaluateCallback):
3299
3300 2013-02-03  Joanmarie Diggs  <jdiggs@igalia.com>
3301
3302         [GTK] Make distcheck fails
3303         https://bugs.webkit.org/show_bug.cgi?id=108756
3304
3305         Reviewed by Kentaro Hara.
3306
3307         * GNUmakefile.list.am: Remove header files which no longer exist;
3308         correct one which got added incorrectly.
3309
3310 2013-02-03  Kentaro Hara  <haraken@chromium.org>
3311
3312         [V8] Pass an Isolate to HasInstance() (part 3)
3313         https://bugs.webkit.org/show_bug.cgi?id=108622
3314
3315         Reviewed by Adam Barth.
3316
3317         This is one of efforts to pass an Isolate to GetTemplate().
3318
3319         No tests. No change in behavior.
3320
3321         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
3322         (WebCore::V8InjectedScriptHost::isHTMLAllCollectionCallback):
3323         (WebCore::V8InjectedScriptHost::typeCallback):
3324         (WebCore::V8InjectedScriptHost::getEventListenersCallback):
3325         * bindings/v8/custom/V8NodeCustom.cpp:
3326         (WebCore::V8Node::insertBeforeCallback):
3327         (WebCore::V8Node::replaceChildCallback):
3328         (WebCore::V8Node::removeChildCallback):
3329         (WebCore::V8Node::appendChildCallback):
3330         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
3331         (WebCore::toWebGLUniformLocation):
3332         (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback):
3333         (WebCore::V8WebGLRenderingContext::getProgramParameterCallback):
3334         (WebCore::V8WebGLRenderingContext::getShaderParameterCallback):
3335         (WebCore::V8WebGLRenderingContext::getUniformCallback):
3336         (WebCore::vertexAttribAndUniformHelperf):
3337         (WebCore::uniformHelperi):
3338         (WebCore::uniformMatrixHelper):
3339         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
3340         (WebCore::isDocumentType):
3341         (WebCore::V8XMLHttpRequest::sendCallback):
3342
3343 2013-02-03  Kentaro Hara  <haraken@chromium.org>
3344
3345         [V8] Pass an Isolate to HasInstance() (part 2)
3346         https://bugs.webkit.org/show_bug.cgi?id=108620
3347
3348         Reviewed by Adam Barth.
3349
3350         This is one of efforts to pass an Isolate to GetTemplate().
3351
3352         No tests. No change in behavior.
3353
3354         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
3355         (WebCore::constructWebGLArray):
3356         (WebCore::setWebGLArrayHelper):
3357         * bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp:
3358         (WebCore::V8AudioBufferSourceNode::bufferAccessorSetter):
3359         * bindings/v8/custom/V8BlobCustom.cpp:
3360         (WebCore::V8Blob::constructorCallbackCustom):
3361         * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
3362         (WebCore::toCanvasStyle):
3363         (WebCore::V8CanvasRenderingContext2D::strokeStyleAccessorSetter):
3364         * bindings/v8/custom/V8ClipboardCustom.cpp:
3365         (WebCore::V8Clipboard::setDragImageCallback):
3366         * bindings/v8/custom/V8CryptoCustom.cpp:
3367         (WebCore::V8Crypto::getRandomValuesCallback):
3368         * bindings/v8/custom/V8DOMFormDataCustom.cpp:
3369         (WebCore::V8DOMFormData::constructorCallbackCustom):
3370         (WebCore::V8DOMFormData::appendCallback):
3371         * bindings/v8/custom/V8DataViewCustom.cpp:
3372         (WebCore::V8DataView::constructorCallbackCustom):
3373         * bindings/v8/custom/V8DocumentCustom.cpp:
3374         (WebCore::V8Document::evaluateCallback):
3375         * bindings/v8/custom/V8HTMLMediaElementCustom.cpp:
3376         (WebCore::V8HTMLMediaElement::controllerAccessorSetter):
3377         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
3378         (WebCore::V8HTMLOptionsCollection::addCallback):
3379         * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
3380         (WebCore::removeElement):
3381
3382 2013-02-03  Mike West  <mkwst@chromium.org>
3383
3384         Cleanup: 'ExceptionCode& ec', not 'ExceptionCode &ec'.
3385         https://bugs.webkit.org/show_bug.cgi?id=108769
3386
3387         Reviewed by Eric Seidel.
3388
3389         Does what it says on the tin: reference parameters should read
3390         'type& name', and this patch fixes the two occurances of 'type &name'
3391         that cropped up for ExceptionCode.
3392
3393         Pure style change; no effect on behavior.
3394
3395         * html/HTMLOptionsCollection.cpp:
3396         (WebCore::HTMLOptionsCollection::add):
3397
3398 2013-02-02  Jun Jiang  <jun.a.jiang@intel.com>
3399
3400         Optimize some operations for float type in texture format conversions of WebGL
3401         https://bugs.webkit.org/show_bug.cgi?id=107526
3402
3403         Reviewed by Darin Adler.
3404
3405         Some small changes are made to optimize the operations for float type in the texture format conversion of WebGL to improve performance.
3406
3407         Already covered by current tests.
3408
3409         * platform/graphics/GraphicsContext3D.cpp:
3410         (WebCore):
3411
3412 2013-02-02  Simon Fraser  <simon.fraser@apple.com>
3413
3414         Clean up the storage of dirty bits on nodes in the scrolling state tree
3415         https://bugs.webkit.org/show_bug.cgi?id=108744
3416
3417         Reviewed by Sam Weinig.
3418
3419         ScrollingStateNode and its subclasses used different techniques for
3420         tracking which properties changed. ScrollingStateNode tracked its layers
3421         via a bool member and some layer-specific methods, but also had virtual
3422         methods to allow subclasses to track properties via a bit mask.
3423         
3424         Clean this up by having the base class store the bit mask, and use
3425         enums to specify bits for the various properties. All properties are thus
3426         tracked in the same way. Bits are read and written through non-virtual member
3427         functions on ScrollingStateNode. All bit checking is done via hasChangedProperty().
3428
3429         * page/scrolling/ScrollingStateFixedNode.cpp:
3430         (WebCore::ScrollingStateFixedNode::ScrollingStateFixedNode): m_changedProperties is now on the base class.
3431         (WebCore::ScrollingStateFixedNode::updateConstraints): Use setPropertyChanged()
3432         * page/scrolling/ScrollingStateFixedNode.h: Remove overrides that are no longer needed.
3433         * page/scrolling/ScrollingStateNode.cpp:
3434         (WebCore::ScrollingStateNode::ScrollingStateNode): Initialize m_changedProperties,
3435         m_scrollLayerDidChange no longer tracked separately.
3436         (WebCore::ScrollingStateNode::cloneAndReset):
3437         * page/scrolling/ScrollingStateNode.h:
3438         (WebCore::ScrollingStateNode::hasChangedProperties):
3439         (WebCore::ScrollingStateNode::hasChangedProperty): Tests the bit.
3440         (WebCore::ScrollingStateNode::resetChangedProperties): Set all bits to 0.
3441         (WebCore::ScrollingStateNode::setPropertyChanged): Set the bit.
3442         (WebCore::ScrollingStateNode::changedProperties): Private to discourage incorrect usage
3443         (changeProperties() & foo).
3444         * page/scrolling/ScrollingStateScrollingNode.cpp:
3445         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode): Base class does the copying now.
3446         (WebCore::ScrollingStateScrollingNode::setViewportRect): Use setPropertyChanged().
3447         (WebCore::ScrollingStateScrollingNode::setContentsSize): Ditto.
3448         (WebCore::ScrollingStateScrollingNode::setFrameScaleFactor): Etc.
3449         (WebCore::ScrollingStateScrollingNode::setNonFastScrollableRegion):
3450         (WebCore::ScrollingStateScrollingNode::setWheelEventHandlerCount):
3451         (WebCore::ScrollingStateScrollingNode::setShouldUpdateScrollLayerPositionOnMainThread):
3452         (WebCore::ScrollingStateScrollingNode::setHorizontalScrollElasticity):
3453         (WebCore::ScrollingStateScrollingNode::setVerticalScrollElasticity):
3454         (WebCore::ScrollingStateScrollingNode::setHasEnabledHorizontalScrollbar):
3455         (WebCore::ScrollingStateScrollingNode::setHasEnabledVerticalScrollbar):
3456         (WebCore::ScrollingStateScrollingNode::setHorizontalScrollbarMode):
3457         (WebCore::ScrollingStateScrollingNode::setVerticalScrollbarMode):
3458         (WebCore::ScrollingStateScrollingNode::setRequestedScrollPosition):
3459         (WebCore::ScrollingStateScrollingNode::setScrollOrigin):
3460         * page/scrolling/ScrollingStateScrollingNode.h:
3461         (ScrollingStateScrollingNode):
3462         * page/scrolling/ScrollingStateStickyNode.cpp:
3463         (WebCore::ScrollingStateStickyNode::ScrollingStateStickyNode):
3464         (WebCore::ScrollingStateStickyNode::updateConstraints):
3465         * page/scrolling/ScrollingStateStickyNode.h:
3466         * page/scrolling/ScrollingTree.cpp:
3467         (WebCore::ScrollingTree::commitNewTreeState):
3468         * page/scrolling/ScrollingTreeScrollingNode.cpp:
3469         (WebCore::ScrollingTreeScrollingNode::update):
3470         * page/scrolling/mac/ScrollingStateNodeMac.mm:
3471         (WebCore::ScrollingStateNode::setScrollLayer):
3472         * page/scrolling/mac/ScrollingStateScrollingNodeMac.mm:
3473         (WebCore::ScrollingStateScrollingNode::setCounterScrollingLayer):
3474         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
3475         (WebCore::ScrollingTreeFixedNode::update):
3476         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
3477         (WebCore::ScrollingTreeScrollingNodeMac::update):
3478         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
3479         (WebCore::ScrollingTreeStickyNode::update):
3480
3481 2013-02-02  Simon Fraser  <simon.fraser@apple.com>
3482
3483         Fixed and sticky nodes have no nodeID set
3484         https://bugs.webkit.org/show_bug.cgi?id=108734
3485
3486         Reviewed by Sam Weinig.
3487         
3488         Push ScrollingNodeIDs onto scrolling nodes at construction time, and thereafter
3489         treat them as readonly. Previously, only the root scrolling node would have a node ID.
3490         
3491         Node IDs aren't actually used by the scrolling tree yet, but are useful for debugging.
3492
3493         Not testable since we only dump the scrolling state tree, not the scrolling
3494         node tree in tests.
3495
3496         * page/scrolling/ScrollingTree.cpp:
3497         (WebCore::ScrollingTree::ScrollingTree): No longer create the root node here;
3498         we can only create it when we know what its ID will be.
3499         (WebCore::ScrollingTree::updateTreeFromStateNode): Create the root node if
3500         necessary. Pass node IDs into create methods.
3501         * page/scrolling/ScrollingTreeNode.cpp:
3502         (WebCore::ScrollingTreeNode::ScrollingTreeNode):
3503         * page/scrolling/ScrollingTreeNode.h:
3504         * page/scrolling/ScrollingTreeScrollingNode.cpp:
3505         (WebCore::ScrollingTreeScrollingNode::ScrollingTreeScrollingNode):
3506         * page/scrolling/ScrollingTreeScrollingNode.h:
3507         * page/scrolling/mac/ScrollingTreeFixedNode.h:
3508         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
3509         (WebCore::ScrollingTreeFixedNode::create):
3510         (WebCore::ScrollingTreeFixedNode::ScrollingTreeFixedNode):
3511         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
3512         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
3513         (WebCore::ScrollingTreeScrollingNode::create):
3514         (WebCore::ScrollingTreeScrollingNodeMac::ScrollingTreeScrollingNodeMac):
3515         * page/scrolling/mac/ScrollingTreeStickyNode.h:
3516         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
3517         (WebCore::ScrollingTreeStickyNode::create):
3518         (WebCore::ScrollingTreeStickyNode::ScrollingTreeStickyNode):
3519
3520 2013-02-02  Takashi Sakamoto  <tasak@google.com>
3521
3522         Making -webkit-image-set() the first value of background property causes crash.
3523         https://bugs.webkit.org/show_bug.cgi?id=108409
3524
3525         Reviewed by Beth Dakin.
3526
3527         CSSParser::addFillValue should use lval->isBaseValueList() instead
3528         of lval->isValueList(). If lval is -webkit-image-set, rval is appended
3529         to -webkit-image-set.
3530
3531         Test: fast/css/image-set-value-crash-in-fillImageSet.html
3532
3533         * css/CSSParser.cpp:
3534         (WebCore::CSSParser::addFillValue):
3535         If lval is not a value list, lval is initialized by using
3536         CSSValueList::createCommaSeparated(). So we have to check whether
3537         lval is created by CSSValueList::createCommaSeparated() or not.
3538
3539 2013-02-02  David Kilzer  <ddkilzer@apple.com>
3540
3541         Upstream iOS FeatureDefines
3542         <http://webkit.org/b/108753>
3543
3544         Reviewed by Anders Carlsson.
3545
3546         * Configurations/FeatureDefines.xcconfig:
3547         - ENABLE_DEVICE_ORIENTATION: Add iOS configurations.
3548         - ENABLE_PLUGIN_PROXY_FOR_VIDEO: Ditto.
3549         - FEATURE_DEFINES: Add ENABLE_PLUGIN_PROXY_FOR_VIDEO.  Add
3550           PLATFORM_NAME variant to reduce future merge conflicts. 
3551
3552 2013-02-02  Philippe Normand  <pnormand@igalia.com>
3553
3554         [GStreamer] Media tests fix after r141695.
3555
3556         Rubber-stamped by Martin Robinson.
3557
3558         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3559         (WebCore::MediaPlayerPrivateGStreamer::setPlaybinURL): Remove
3560         both fragment and query string for file:// uris before loading.
3561
3562 2013-02-02  Patrick Gansterer  <paroga@webkit.org>
3563
3564         Build fix for WinCE after r141637.
3565
3566         * platform/graphics/wince/ImageBufferWinCE.cpp:
3567
3568 2013-02-01  Philippe Normand  <pnormand@igalia.com>
3569
3570         [GStreamer] webkitwebsrc is exposed to application-side
3571         https://bugs.webkit.org/show_bug.cgi?id=108088
3572
3573         Reviewed by Martin Robinson.
3574
3575         Switch the webkitwebsrc to handle webkit+http(s) uris so it is now
3576         explicit that this element is meant to be used preferrably inside
3577         WebKit. This change is internal to the player.
3578
3579         No new tests, covered by existing http/tests/media tests.
3580
3581         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3582         (WebCore::MediaPlayerPrivateGStreamer::setPlaybinURL):
3583         (WebCore):
3584         (WebCore::MediaPlayerPrivateGStreamer::load):
3585         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3586         (MediaPlayerPrivateGStreamer):
3587         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
3588         (webKitWebSrcGetProtocols):
3589         (webKitWebSrcSetUri):
3590
3591 2013-02-02  Simon Hausmann  <simon.hausmann@digia.com>
3592
3593         Unreviewed trivial prospective build fix for A17n disabled
3594         configurations.
3595
3596         The dummy computed object attriute cache control functions need to be defined
3597         as being member functions of AXObjectCache, because that's where they are
3598         declared.
3599
3600         * accessibility/AXObjectCache.h:
3601         (WebCore::AXObjectCache::startCachingComputedObjectAttributesUntilTreeMutates):
3602         (WebCore::AXObjectCache::stopCachingComputedObjectAttributes):
3603
3604 2013-02-02  Antoine Quint  <graouts@apple.com>
3605
3606         Creating a WebInspector.ContextMenu without an event crashes WebCore when calling .show()
3607         https://bugs.webkit.org/show_bug.cgi?id=108636
3608
3609         Reviewed by Pavel Feldman.
3610
3611         Return early if InspectorFrontendHost::showContextMenu() is called without an event and
3612         assert in ContextMenuController::createContextMenu() in case no event was provided.
3613
3614         * inspector/InspectorFrontendHost.cpp:
3615         (WebCore::InspectorFrontendHost::showContextMenu):
3616         * page/ContextMenuController.cpp:
3617         (WebCore::ContextMenuController::createContextMenu):
3618
3619 2013-02-02  Jonathan Feldstein  <jfeldstein@rim.com>
3620
3621         [BlackBerry] Improper initialization of ANGLEResources
3622         https://bugs.webkit.org/show_bug.cgi?id=101489
3623
3624         Reviewed by Antonio Gomes.
3625
3626         MaxDrawBuffers, OES_standard_derivatives, OES_EGL_image_external and ARB_texture_rectangle have already been initialized through ShBuiltInResources function and these fields do not need to be set again in GraphicsContext3dBlackBerry.cpp. In addition, the extension flags cannot be set to true without getExtension having been called (Khronos WebGL specs, section 5.14.14.). Thus these lines need to be removed.
3627
3628         * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
3629         (WebCore::GraphicsContext3D::GraphicsContext3D):
3630
3631 2013-02-02  Vivek Galatage  <vivek.vg@samsung.com>
3632
3633         Web Inspector: Refactor InspectorDOMStorageAgent::getDOMStorageEntries to report the error messages
3634         https://bugs.webkit.org/show_bug.cgi?id=108611
3635
3636         Reviewed by Pavel Feldman.
3637
3638         Added reporting of various error messages. Moved the modification of output
3639         parameter at a later stage when there are no errors reported.
3640
3641         No new tests as code refactoring.
3642
3643         * inspector/InspectorDOMStorageAgent.cpp:
3644         (WebCore::hadException):
3645         (WebCore):
3646         (WebCore::InspectorDOMStorageAgent::getDOMStorageEntries):
3647
3648 2013-02-02  Andrey Lushnikov  <lushnikov@chromium.org>
3649
3650         Web Inspector: fix bug in highlighting single chars via highlightRange API of DTE
3651         https://bugs.webkit.org/show_bug.cgi?id=108685
3652
3653         Reviewed by Pavel Feldman.
3654
3655         Use Math.min instead of Math.max in rangesForLine method.
3656
3657         Updated test: text-editor-highlight-api.html
3658
3659         * inspector/front-end/DefaultTextEditor.js:
3660         (WebInspector.TextEditorMainPanel.RangeHighlightDescriptor.prototype.rangesForLine):
3661
3662 2013-02-02  Tony Gentilcore  <tonyg@chromium.org>
3663
3664         Continue making XSSAuditor thread safe: Remove unsafe AtomicString compares
3665         https://bugs.webkit.org/show_bug.cgi?id=108557
3666
3667         Reviewed by Adam Barth.
3668
3669         Unfortunately HTMLNames comparisons will always be false on a non-main thread
3670         with our current design, so we have to use some "threadSafeMatch" helpers written
3671         for the HTMLBackgroundParser.
3672
3673         Also factor out threadSafeMatch() methods to HTMLParserIdioms.
3674
3675         No new tests because no new functionality.
3676
3677         * html/parser/BackgroundHTMLParser.cpp:
3678         (WebCore):
3679         * html/parser/HTMLParserIdioms.cpp:
3680         (WebCore::threadSafeEqual):
3681         (WebCore):
3682         (WebCore::threadSafeMatch):
3683         * html/parser/HTMLParserIdioms.h:
3684         (WebCore):
3685         * html/parser/XSSAuditor.cpp:
3686         (WebCore::XSSAuditor::eraseAttributeIfInjected):
3687
3688 2013-02-01  James Simonsen  <simonjam@chromium.org>
3689
3690         Add didChangePriority() to ResourceHandle
3691         https://bugs.webkit.org/show_bug.cgi?id=107995
3692
3693         Reviewed by Darin Fisher.
3694
3695         For PLT, it's important that preloads remain a lower priority than parser requested resources.
3696         This can lead to a 5% improvement.
3697
3698         The plan is to use this plumbing to expose the desired behavior. This patch simply allows a
3699         resource's priority to change and have it propagate to the network layer. An upcoming patch will
3700         lower the priority of preloads and then increase the priority when the parser officially requests
3701         it.
3702
3703         No new tests. No visible change, because priority doesn't change yet.
3704
3705         * loader/cache/CachedResource.cpp:
3706         (WebCore):
3707         (WebCore::CachedResource::setLoadPriority):
3708         * loader/cache/CachedResourceLoader.cpp:
3709         (WebCore::CachedResourceLoader::requestResource): Allow loads to modify priority.
3710         * loader/cache/CachedResourceRequest.h:
3711         (WebCore::CachedResourceRequest::setPriority): Notify when priority changes.
3712         * platform/network/ResourceHandle.cpp:
3713         (WebCore::ResourceHandle::didChangePriority): Added.
3714         (WebCore):
3715         * platform/network/ResourceHandle.h:
3716         (ResourceHandle):
3717         * platform/network/chromium/ResourceHandle.cpp:
3718         (WebCore::ResourceHandleInternal::didChangePriority):
3719         (WebCore):
3720         (WebCore::ResourceHandle::didChangePriority):
3721         * platform/network/chromium/ResourceHandleInternal.h:
3722         (ResourceHandleInternal):
3723
3724 2013-02-01  Roger Fong  <roger_fong@apple.com>
3725
3726         Unreviewed. Clean up WebCore VS2010 project.
3727
3728         * WebCore.vcxproj/WebCore.vcxproj:
3729         * WebCore.vcxproj/WebCore.vcxproj.filters:
3730         * WebCore.vcxproj/WebCoreCommon.props:
3731         * WebCore.vcxproj/WebCoreGenerated.make:
3732         * WebCore.vcxproj/WebCorePreLink.cmd: Removed.
3733         * WebCore.vcxproj/build-generated-files.sh:
3734
3735 2013-02-01  Sam Weinig  <sam@webkit.org>
3736
3737         Don't use deprecated method -[NSImage dissolveToPoint:fraction:]
3738         <rdar://problem/11723792>
3739         https://bugs.webkit.org/show_bug.cgi?id=108739
3740
3741         Reviewed by Anders Carlsson.
3742
3743         * platform/mac/DragImageMac.mm:
3744         (WebCore::dissolveDragImageToFraction):
3745         Remove use of deprecated NSImage methods and simplify a bit.
3746
3747 2013-02-01  Andrey Lushnikov  <lushnikov@chromium.org>
3748
3749         Web Inspector: fix "DOM Exception 8" when deleting lines containing decoration in DTE.
3750         https://bugs.webkit.org/show_bug.cgi?id=108689
3751
3752         Reviewed by Alexander Pavlov.
3753
3754         Add a check that decoration element is still added to the line before trying to delete it. This
3755         won't be true if the whole line is deleted in contentEditable,
3756         and this is the reason for the exception to be thrown.
3757
3758         No new tests.
3759
3760         * inspector/front-end/DefaultTextEditor.js:
3761         (WebInspector.TextEditorMainChunk.prototype.removeAllDecorations):
3762
3763 2013-02-01  Sheriff Bot  <webkit.review.bot@gmail.com>
3764
3765         Unreviewed, rolling out r141669.
3766         http://trac.webkit.org/changeset/141669
3767         https://bugs.webkit.org/show_bug.cgi?id=108728
3768
3769         Broke the windows build. (Requested by leviw on #webkit).
3770
3771         * rendering/RenderBoxModelObject.cpp:
3772         (WebCore::RenderBoxModelObject::computedCSSPaddingTop):
3773         (WebCore):
3774         (WebCore::RenderBoxModelObject::computedCSSPaddingBottom):
3775         (WebCore::RenderBoxModelObject::computedCSSPaddingLeft):
3776         (WebCore::RenderBoxModelObject::computedCSSPaddingRight):
3777         (WebCore::RenderBoxModelObject::computedCSSPaddingBefore):
3778         (WebCore::RenderBoxModelObject::computedCSSPaddingAfter):
3779         (WebCore::RenderBoxModelObject::computedCSSPaddingStart):
3780         (WebCore::RenderBoxModelObject::computedCSSPaddingEnd):
3781         * rendering/RenderBoxModelObject.h:
3782         (RenderBoxModelObject):
3783
3784 2013-02-01  Emil A Eklund  <eae@chromium.org>
3785
3786         Remove duplicate code in RenderBoxModelObject::computedCSSPadding*
3787         https://bugs.webkit.org/show_bug.cgi?id=108707
3788
3789         Reviewed by Levi Weintraub.
3790         
3791         The computedCSSPaddingTop/Bottom/... methods in
3792         RenderBoxModelObject all do pretty much exactly the same thing
3793         yet share no code.
3794         
3795         Break out shared code into computedCSSPadding method and have
3796         the top/bottom/left/right/... ones call it with the appropriate
3797         length value.
3798
3799         No new tests, no change in functionality.
3800
3801         * rendering/RenderBoxModelObject.cpp:
3802         (WebCore::RenderBoxModelObject::computedCSSPadding):
3803         * rendering/RenderBoxModelObject.h:
3804         (WebCore::RenderBoxModelObject::computedCSSPaddingTop):
3805         (WebCore::RenderBoxModelObject::computedCSSPaddingBottom):
3806         (WebCore::RenderBoxModelObject::computedCSSPaddingLeft):
3807         (WebCore::RenderBoxModelObject::computedCSSPaddingRight):
3808         (WebCore::RenderBoxModelObject::computedCSSPaddingBefore):
3809         (WebCore::RenderBoxModelObject::computedCSSPaddingAfter):
3810         (WebCore::RenderBoxModelObject::computedCSSPaddingStart):
3811         (WebCore::RenderBoxModelObject::computedCSSPaddingEnd):
3812         (RenderBoxModelObject):
3813
3814 2013-02-01  Mark Lam  <mark.lam@apple.com>
3815
3816         Replace ExceptionCode with DatabaseError in the openDatabase() code path.
3817         https://bugs.webkit.org/show_bug.cgi?id=108724.
3818
3819         Reviewed by Alexey Proskuryakov.
3820
3821         Also made DatabaseBackend::performOpenAndVerify() a little more
3822         straightforward and less repetitive.
3823
3824         No new tests.
3825
3826         * Modules/webdatabase/DOMWindowWebDatabase.cpp:
3827         (WebCore::DOMWindowWebDatabase::openDatabase):
3828         * Modules/webdatabase/Database.cpp:
3829         (WebCore::Database::openAndVerifyVersion):
3830         (WebCore::Database::performOpenAndVerify):
3831         * Modules/webdatabase/Database.h:
3832         (Database):
3833         * Modules/webdatabase/DatabaseBackend.cpp:
3834         (WebCore::DoneCreatingDatabaseOnExitCaller::DoneCreatingDatabaseOnExitCaller):
3835         (WebCore::DoneCreatingDatabaseOnExitCaller::~DoneCreatingDatabaseOnExitCaller):
3836         (DoneCreatingDatabaseOnExitCaller):
3837         (WebCore::DoneCreatingDatabaseOnExitCaller::openSucceeded):
3838         (WebCore::DatabaseBackend::performOpenAndVerify):
3839         * Modules/webdatabase/DatabaseBackend.h:
3840         * Modules/webdatabase/DatabaseManager.cpp:
3841         (WebCore::DatabaseManager::openDatabase):
3842         (WebCore::DatabaseManager::openDatabaseSync):
3843         * Modules/webdatabase/DatabaseManager.h:
3844         (DatabaseManager):
3845         * Modules/webdatabase/DatabaseSync.cpp:
3846         (WebCore::DatabaseSync::openAndVerifyVersion):
3847         * Modules/webdatabase/DatabaseSync.h:
3848         (DatabaseSync):
3849         * Modules/webdatabase/DatabaseTask.cpp:
3850         (WebCore::Database::DatabaseOpenTask::DatabaseOpenTask):
3851         (WebCore::Database::DatabaseOpenTask::doPerformTask):
3852         * Modules/webdatabase/DatabaseTask.h:
3853         (WebCore::Database::DatabaseOpenTask::create):
3854         (Database::DatabaseOpenTask):
3855         * Modules/webdatabase/WorkerContextWebDatabase.cpp:
3856         (WebCore::WorkerContextWebDatabase::openDatabase):
3857         (WebCore::WorkerContextWebDatabase::openDatabaseSync):
3858         * WebCore.gypi:
3859
3860 2013-02-01  Yongjun Zhang  <yongjun_zhang@apple.com>
3861
3862         Document is never released if an image's src attribute is changed to a url blocked by content-security-policy.
3863         https://bugs.webkit.org/show_bug.cgi?id=108545
3864
3865         If we just scheduled an error event due to an null newImage, we should not cancel it when newImage and oldImage
3866         is not the same.  Otherwise we will ref the sourceElement in updateHasPendingEvent (m_hasPendingErrorEvent is true)
3867         but never deref it since we already cancelled the error event.
3868
3869         Reviewed by Alexey Proskuryakov.
3870
3871         Test: fast/images/image-error-event-not-firing.html
3872
3873         * loader/ImageLoader.cpp:
3874         (WebCore::ImageLoader::updateFromElement): don't cancel error event if newImage is null, we want the
3875             error event to fire.
3876
3877 2013-02-01  Benjamin Poulain  <bpoulain@apple.com>
3878
3879         Clean the String->AtomicString conversion for AnimationController::pauseAnimationAtTime
3880         https://bugs.webkit.org/show_bug.cgi?id=108558
3881
3882         Reviewed by Dean Jackson.
3883
3884         This is a step torward killing the implicit conversion from String to AtomicString.
3885
3886         The animation name are AtomicString. The API is changed all the way to the callers
3887         to take an AtomicString. When needed, we use explicit conversion.
3888
3889         * WebCore.exp.in:
3890         * page/animation/AnimationController.cpp:
3891         (WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
3892         (WebCore::AnimationController::pauseAnimationAtTime):
3893         * page/animation/AnimationController.h:
3894         (AnimationController):
3895         * page/animation/AnimationControllerPrivate.h:
3896         (AnimationControllerPrivate):
3897         * page/animation/CompositeAnimation.cpp:
3898         (WebCore::CompositeAnimation::pauseAnimationAtTime):
3899         We should not null check the name. Getting a null name from the HashMap would be
3900         an error from the tests, and the HashMap would never return a value anyway.
3901         * testing/Internals.cpp:
3902         (WebCore::Internals::pauseAnimationAtTimeOnPseudoElement):
3903
3904 2013-02-01  Dominic Mazzoni  <dmazzoni@google.com>
3905
3906         AX: memoize expensive computation during blocks where tree doesn't change
3907         https://bugs.webkit.org/show_bug.cgi?id=106497
3908
3909         Reviewed by Ryosuke Niwa.
3910
3911         Add a cache for computed attributes of AXObjects.
3912         The cache can be enabled at the start of a batch of
3913         read-only operations on the accessibility tree, and
3914         it's cleared automatically when the tree mutates.
3915         Currently accessibilityIsIgnored is cached, since it's
3916         frequently called and relatively expensive to compute.
3917
3918         No new tests.
3919
3920         * accessibility/AXObjectCache.cpp:
3921         (WebCore):
3922         (WebCore::AXComputedObjectAttributeCache::getIgnored):
3923         (WebCore::AXComputedObjectAttributeCache::setIgnored):
3924         (WebCore::AXObjectCache::postNotification):
3925         (WebCore::AXObjectCache::nodeTextChangeNotification):
3926         (WebCore::AXObjectCache::handleScrollbarUpdate):
3927         (WebCore::AXObjectCache::startCachingComputedObjectAttributesUntilTreeMutates):
3928         (WebCore::AXObjectCache::stopCachingComputedObjectAttributes):
3929         * accessibility/AXObjectCache.h:
3930         (AXComputedObjectAttributeCache):
3931         (WebCore::AXComputedObjectAttributeCache::create):
3932         (WebCore::AXComputedObjectAttributeCache::AXComputedObjectAttributeCache):
3933         (WebCore::AXComputedObjectAttributeCache::CachedAXObjectAttributes::CachedAXObjectAttributes):
3934         (CachedAXObjectAttributes):
3935         (WebCore):
3936         (WebCore::AXObjectCache::computedObjectAttributeCache):
3937         (AXObjectCache):
3938         (WebCore::AXComputedObjectAttributeCache::getIgnored):
3939         (WebCore::AXComputedObjectAttributeCache::setIgnored):
3940         (WebCore::startCachingComputedObjectAttributesUntilTreeMutates):
3941         (WebCore::stopCachingComputedObjectAttributes):
3942         * accessibility/AccessibilityObject.cpp:
3943         (WebCore::AccessibilityObject::findMatchingObjects):
3944         * accessibility/AccessibilityRenderObject.cpp:
3945         (WebCore):
3946         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
3947         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
3948         * accessibility/AccessibilityRenderObject.h:
3949         (AccessibilityRenderObject):
3950
3951 2013-02-01  Alexey Proskuryakov  <ap@apple.com>
3952
3953         Build fix.
3954
3955         * Modules/webdatabase/DatabaseBackend.cpp: (DoneCreatingDatabaseOnExitCaller):
3956         Don't fail because of an unused member variable in cross-plaform code path.
3957
3958 2013-02-01  Kevin Ellis  <kevers@chromium.org>
3959
3960         [chromium] Fat scrollbars on Windows in high-DPI mode.
3961         https://bugs.webkit.org/show_bug.cgi?id=108637
3962
3963         Updates mechanism for retrieving scrollbar metrics on the
3964         Windows port of Chromium.  Previously, GetSystemMetrics calls
3965         were used, which fetches prescaled sizes in pixel rather than
3966         logical units, resulting in a double scaling when a device
3967         scale factor is set.  With the patch, the size is retrieved
3968         from the theme engine in DIP.
3969
3970         Reviewed by Adam Barth.
3971
3972         No new tests.
3973
3974         * platform/chromium/ScrollbarThemeChromiumWin.cpp:
3975         (WebCore::ScrollbarThemeChromiumWin::scrollbarThickness):
3976         (WebCore::ScrollbarThemeChromiumWin::paintTrackPiece):
3977         * rendering/RenderThemeChromiumWin.cpp:
3978         (WebCore):
3979         (WebCore::menuListButtonWidth):
3980
3981 2013-02-01  Mark Lam  <mark.lam@apple.com>
3982
3983         Clean up calls to DatabaseTracker::add/removeOpenDatabase().
3984         https://bugs.webkit.org/show_bug.cgi?id=108431
3985
3986         Reviewed by Geoffrey Garen.
3987
3988         Also adapted the chromium port to work with this new code.
3989         Chromium parts reviewed by Michael Nordman and David Levin.
3990
3991         This is part of the webdatabase refactoring effort.
3992
3993         No new tests.
3994
3995         * Modules/webdatabase/AbstractDatabaseServer.h:
3996         (AbstractDatabaseServer):
3997         * Modules/webdatabase/Database.cpp:
3998         (WebCore::Database::openAndVerifyVersion):
3999         (WebCore::Database::close):
4000         * Modules/webdatabase/DatabaseBackend.cpp:
4001         (WebCore::DatabaseBackend::DatabaseBackend):
4002         (WebCore::DatabaseBackend::closeDatabase):
4003         (DoneCreatingDatabaseOnExitCaller):
4004         (WebCore::DoneCreatingDatabaseOnExitCaller::DoneCreatingDatabaseOnExitCaller):
4005         (WebCore::DoneCreatingDatabaseOnExitCaller::~DoneCreatingDatabaseOnExitCaller):
4006         (WebCore::DatabaseBackend::performOpenAndVerify):
4007         * Modules/webdatabase/DatabaseManager.cpp:
4008         (WebCore::DatabaseManager::openDatabase):
4009         (WebCore::DatabaseManager::openDatabaseSync):
4010         * Modules/webdatabase/DatabaseManager.h:
4011         (DatabaseManager):
4012         * Modules/webdatabase/DatabaseServer.cpp:
4013         * Modules/webdatabase/DatabaseServer.h:
4014         * Modules/webdatabase/DatabaseSync.cpp:
4015         (WebCore::DatabaseSync::~DatabaseSync):
4016         (WebCore::DatabaseSync::openAndVerifyVersion):
4017         (WebCore::DatabaseSync::closeImmediately):
4018         * Modules/webdatabase/DatabaseSync.h:
4019         (DatabaseSync):
4020         * Modules/webdatabase/DatabaseTracker.cpp:
4021         (WebCore::DatabaseTracker::doneCreatingDatabase):
4022         (WebCore::DatabaseTracker::addOpenDatabase):
4023         * Modules/webdatabase/DatabaseTracker.h:
4024         (DatabaseTracker):
4025         * Modules/webdatabase/chromium/DatabaseTrackerChromium.cpp:
4026         (WebCore::DatabaseTracker::addOpenDatabase):
4027         (WebCore::DatabaseTracker::prepareToOpenDatabase):
4028         (WebCore::DatabaseTracker::failedToOpenDatabase):
4029
4030 2013-02-01  Andrey Lushnikov  <lushnikov@chromium.org>
4031
4032         Web Inspector: remove extra padding around overlay highlight.
4033         https://bugs.webkit.org/show_bug.cgi?id=108679
4034
4035         Reviewed by Alexander Pavlov.
4036
4037         No new tests: no change in behaviour.
4038
4039         Remove extraWidth from overlay highlight spans.
4040
4041         * inspector/front-end/DefaultTextEditor.js:
4042         (WebInspector.TextEditorMainPanel.prototype._appendOverlayHighlight):
4043
4044 2013-02-01  Philip Rogers  <pdr@google.com>
4045
4046         Prevent skipped repaints for children of inner SVG elements
4047         https://bugs.webkit.org/show_bug.cgi?id=108429
4048
4049         Reviewed by Eric Seidel.
4050
4051         This patch fixes a bug caused by r108699 and r133786 where we would not repaint children
4052         of inner SVG elements because "m_didTransformToRootUpdate" was never reset on viewport
4053         containers. The stale m_didTransformToRootUpdate variable caused us to skip child repaints.
4054
4055         I verified that the Robohornet SVG benchmark performance gains in r133786 are not regressed
4056         with this patch.
4057
4058         Test: svg/repaint/svgsvgelement-repaint-children.html
4059
4060         * rendering/svg/RenderSVGViewportContainer.cpp:
4061         (WebCore::RenderSVGViewportContainer::calcViewport):
4062
4063             This can be removed because setNeedsTransformUpdate() will set m_needsTransformUpdate.
4064
4065         (WebCore::RenderSVGViewportContainer::calculateLocalTransform):
4066
4067             This change is straightforward and is similar to the equivalent assignment in
4068             RenderSVGTransformableContainer::calculateLocalTransform().