Retry snapshots if they are too empty
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-12-06  Jon Lee  <jonlee@apple.com>
2
3         Retry snapshots if they are too empty
4         https://bugs.webkit.org/show_bug.cgi?id=104174
5         <rdar://problem/12820146>
6
7         Reviewed by Simon Fraser.
8
9         * html/HTMLPlugInImageElement.cpp:
10         (WebCore::HTMLPlugInImageElement::updateSnapshot): Change the state machine check so that even
11         when the plug-in is displaying a snapshot, the snapshot can still be updated. This allows for the
12         retries to be drawn.
13
14 2012-12-06  Adam Klein  <adamk@chromium.org>
15
16         [HTMLTemplateElement] make content readonly and cloneNode(deep) clone content
17         https://bugs.webkit.org/show_bug.cgi?id=104181
18
19         Reviewed by Adam Barth.
20
21         Note that this patch also adds IDL attributes/custom code to tie the lifetime
22         of the content DocumentFragment wrapper to the lifetime of the template element wrapper
23         via a hidden JS property.
24
25         Based on a patch by Rafael Weinstein.
26
27         Test: fast/dom/HTMLTemplateElement/contentWrappers.html
28
29         * DerivedSources.cpp:
30         * Target.pri:
31         * UseJSC.cmake:
32         * WebCore.gypi:
33         * WebCore.xcodeproj/project.pbxproj:
34         * bindings/js/JSBindingsAllInOne.cpp:
35         * bindings/js/JSHTMLTemplateElementCustom.cpp: Copied from Source/WebCore/html/HTMLTemplateElement.idl.
36         (WebCore):
37         (WebCore::JSHTMLTemplateElement::content):
38         * bindings/scripts/CodeGeneratorV8.pm: Add support for new V8CacheAttributeForGC attribute.
39         * dom/Element.h:
40         (Element): Annotate cloneNode() with OVERRIDE
41         * html/HTMLTemplateElement.cpp:
42         (WebCore::HTMLTemplateElement::cloneNode):
43         * html/HTMLTemplateElement.h:
44         (HTMLTemplateElement): override cloneNode
45         * html/HTMLTemplateElement.idl: Make content readonly and add custom attributes.
46
47 2012-12-06  Brent Fulgham  <bfulgham@webkit.org>
48
49         [Windows, WinCairo] Unreviewed build correction.
50
51         Exclude 'DocumentSharedObjectPool.cpp' from build, since it is
52         built as part of DOMAllInOne.cpp.  The build (besides wasting
53         time) generates a bunch of build warnings for duplicate symbols.
54
55         * WebCore.vcproj/WebCore.vcproj: Mark DocumentSharedObjectPool.cpp
56         to not build independently of DOMAllInOne.cpp.
57
58 2012-12-06  David Grogan  <dgrogan@chromium.org>
59
60         IndexedDB: Abort transactions because of leveldb errors part 4
61         https://bugs.webkit.org/show_bug.cgi?id=103964
62
63         Reviewed by Tony Chang.
64
65         deleteDatabase, open, and deleteObjectStore will now fire more aborts
66         and errors in case of leveldb problems
67
68         * Modules/indexeddb/IDBBackingStore.cpp:
69         (WebCore::getVarInt): Make return value indicate leveldb error.
70         (WebCore::getString): ditto.
71         (WebCore::IDBBackingStore::getIDBDatabaseMetaData):
72         Change return value to indicate leveldb error.
73
74         (WebCore::IDBBackingStore::deleteDatabase):
75         Already had the desired return value semantics. As a consumer of
76         getIDBDatabaseMetadata, will return an error (causing an abort) more
77         often.
78
79         (WebCore::IDBBackingStore::deleteObjectStore):
80         Needed return value change. Will return error to DatabaseBackend to
81         indicate leveldb problems.
82
83         * Modules/indexeddb/IDBBackingStore.h:
84         (IDBBackingStore):
85         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
86         (WebCore::IDBDatabaseBackendImpl::openInternal):
87         Pass leveldb errors up to callers, who already handle internal errors.
88
89         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::perform):
90         Abort transaction if there were leveldb problems deleting an object
91         store.
92
93 2012-12-06  David Grogan  <dgrogan@chromium.org>
94
95         IndexedDB: Add webkitErrorMessage to IDBTransaction
96         https://bugs.webkit.org/show_bug.cgi?id=104199
97
98         Reviewed by Tony Chang.
99
100         Don't drop error messages on the floor.
101
102         Expose an error message on IDBTransaction to give developers more
103         information than the opaque error code currently available. This is
104         exactly what is done in IDBRequest. 
105
106         Tests - transaction-error.html
107
108         * Modules/indexeddb/IDBDatabaseError.h:
109         (WebCore::IDBDatabaseError::create):
110         * Modules/indexeddb/IDBRequest.cpp:
111         (WebCore::IDBRequest::dispatchEvent):
112         (WebCore::IDBRequest::uncaughtExceptionInEventHandler):
113         * Modules/indexeddb/IDBTransaction.cpp:
114         (WebCore::IDBTransaction::setError):
115         (WebCore):
116         (WebCore::IDBTransaction::webkitErrorMessage):
117         (WebCore::IDBTransaction::onAbort):
118         * Modules/indexeddb/IDBTransaction.h:
119         (IDBTransaction):
120         * Modules/indexeddb/IDBTransaction.idl:
121
122 2012-12-06  Alexander Shalamov  <alexander.shalamov@intel.com>
123
124         XMLHttpRequest Content-Type should be taken from Blob type
125         https://bugs.webkit.org/show_bug.cgi?id=99983
126
127         Reviewed by Alexey Proskuryakov.
128
129         Fix XMLHttpRequest::send(Blob*) method, so that the Content-Type is set according to W3C specification.
130         http://www.w3.org/TR/XMLHttpRequest/#the-send-method
131
132         Added test that check if content type is set correctly when blob object is sent.
133
134         Test: http/tests/xmlhttprequest/post-blob-content-type.html
135
136         * xml/XMLHttpRequest.cpp:
137         (WebCore::XMLHttpRequest::send):
138             Set correct MIME type for Blob objects.
139         * WebCore.vcproj/WebCore.vcproj:
140             Added ParsedContentType to project file.
141
142 2012-12-06  Min Qin  <qinmin@chromium.org>
143
144         Make LazyDecodingPixelRef inherit from skia::LazyPixelRef so that cc thread can access it
145         https://bugs.webkit.org/show_bug.cgi?id=103555
146
147         Reviewed by Stephen White.
148
149         Expose LazyDecodingPixelRef to the cc thread by inheriting from skia::LazyPixelRef.
150         No test added for now as impl side paiting is still WIP.
151
152         * platform/graphics/chromium/LazyDecodingPixelRef.cpp:
153         (WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef):
154         (WebCore::LazyDecodingPixelRef::PrepareToDecode):
155         (WebCore):
156         (WebCore::LazyDecodingPixelRef::Decode):
157         * platform/graphics/chromium/LazyDecodingPixelRef.h:
158         (LazyDecodingPixelRef):
159
160 2012-12-06  Kentaro Hara  <haraken@chromium.org>
161
162         [V8] Make an Isolate mandatory in v8UnsignedInteger()
163         https://bugs.webkit.org/show_bug.cgi?id=104235
164
165         Reviewed by Adam Barth.
166
167         No tests. No change in behavior.
168
169         * bindings/v8/ArrayValue.cpp:
170         (WebCore::ArrayValue::get):
171         * bindings/v8/V8Binding.h:
172         (WebCore::v8UnsignedInteger):
173         * bindings/v8/V8LazyEventListener.cpp:
174         (WebCore::V8LazyEventListener::prepareListenerObject):
175
176 2012-12-06  David Hyatt  <hyatt@apple.com>
177
178         [New Multicolumn] Add requiresBalancing booleans to track which column sets need to rebalance.
179         https://bugs.webkit.org/show_bug.cgi?id=104297
180
181         Reviewed by Simon Fraser.
182
183         Add requiresBalancing booleans to RenderMultiColumnBlock and RenderMultiColumnSet. For now the former is just propagated
184         to the latter, but eventually RenderMultiColumnSets will have a notion of balancing that has to be independent of the
185         owning block (e.g., maybe only the last set rebalances, or maybe only a set that contains the content between two forced
186         breaks wants to rebalance, etc.).
187
188         * rendering/RenderMultiColumnBlock.cpp:
189         (WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
190         (WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange):
191         (WebCore::RenderMultiColumnBlock::ensureColumnSets):
192         * rendering/RenderMultiColumnBlock.h:
193         (WebCore::RenderMultiColumnBlock::requiresBalancing):
194         (RenderMultiColumnBlock):
195         * rendering/RenderMultiColumnSet.cpp:
196         (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
197         * rendering/RenderMultiColumnSet.h:
198         (WebCore::RenderMultiColumnSet::requiresBalancing):
199         (WebCore::RenderMultiColumnSet::setRequiresBalancing):
200         (RenderMultiColumnSet):
201         (WebCore::toRenderMultiColumnSet):
202         (WebCore):
203
204 2012-12-06  Sheriff Bot  <webkit.review.bot@gmail.com>
205
206         Unreviewed, rolling out r136871.
207         http://trac.webkit.org/changeset/136871
208         https://bugs.webkit.org/show_bug.cgi?id=104293
209
210         crashes on bots and memory leaks (Requested by esprehn on
211         #webkit).
212
213         * dom/Document.h:
214         (WebCore::Node::treeScope):
215         * dom/Element.cpp:
216         (WebCore::Element::createRareData):
217         * dom/ElementRareData.h:
218         (ElementRareData):
219         (WebCore::ElementRareData::ElementRareData):
220         * dom/Node.cpp:
221         (WebCore::Node::setTreeScope):
222         (WebCore::Node::ensureRareData):
223         (WebCore::Node::createRareData):
224         (WebCore::Node::clearRareData):
225         * dom/Node.h:
226         (WebCore::NodeRareDataBase::~NodeRareDataBase):
227         (WebCore::NodeRareDataBase::NodeRareDataBase):
228         (NodeRareDataBase):
229         (WebCore::Node::renderer):
230         (WebCore::Node::setRenderer):
231         (Node):
232         (WebCore::Node::hasRareData):
233         * dom/NodeRareData.h:
234         (WebCore::NodeRareData::NodeRareData):
235         (NodeRareData):
236
237 2012-12-06  Adam Klein  <adamk@chromium.org>
238
239         Remove non-v8 binding files from WebCore.gypi
240         https://bugs.webkit.org/show_bug.cgi?id=104288
241
242         Reviewed by Adam Barth.
243
244         Since the gyp build is only used by the Chromium project,
245         there's no need for cpp, gobject, objc, or jsc bindings
246         in these build files.
247
248         * WebCore.gypi:
249
250 2012-12-06  Tony Chang  <tony@chromium.org>
251
252         REGRESSION(r135082): Restore the ability to insert author level style sheets from script
253         https://bugs.webkit.org/show_bug.cgi?id=104042
254
255         Reviewed by Antti Koivisto.
256
257         Add DocumentStyleSheetCollection::addAuthorSheet so embedders can allow scripts
258         to insert author level styles. Expose the method to window.interals for testing.
259
260         Test: userscripts/insert-stylesheets.html
261
262         * WebCore.exp.in: Update exports for Internals.cpp.
263         * WebCore.order: Update exports for Internals.cpp.
264         * dom/DocumentStyleSheetCollection.cpp:
265         (WebCore::DocumentStyleSheetCollection::~DocumentStyleSheetCollection):
266         (WebCore::DocumentStyleSheetCollection::addAuthorSheet): Add the stylesheet and force a style recalc.
267         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets): Include author level styles.
268         (WebCore::DocumentStyleSheetCollection::reportMemoryUsage): Include author styles.
269         * dom/DocumentStyleSheetCollection.h:
270         (WebCore::DocumentStyleSheetCollection::documentAuthorStyleSheets): Accessor.
271         (DocumentStyleSheetCollection): Keep track of author styles added by script.
272         * testing/Internals.cpp:
273         (WebCore::Internals::insertAuthorCSS): Testing addAuthorSheet.
274         (WebCore::Internals::insertUserCSS): Testing addUserSheet.
275         * testing/Internals.h:
276         * testing/Internals.idl: Add addAuthorSheet and addUserSheet.
277
278 2012-12-06  Elliott Sprehn  <esprehn@gmail.com>
279
280         Create only NodeRareDataBase when setting TreeScope
281         https://bugs.webkit.org/show_bug.cgi?id=104202
282
283         Reviewed by Dimitri Glazkov.
284
285         Move many fields from NodeRareData into NodeRareDataBase and rename it
286         UncommonNodeData and add a flag to determine if a UncommonNodeData is
287         actually a full NodeRareData instance. By moving fields up from NodeRareData
288         we ensure that this new flag in the base class doesn't make NodeRareData
289         grow in size.
290
291         We then make setting the tree scope only allocate the UncommonNodeData
292         instead of creating the full NodeRareData or ElementRareData. This is
293         important because when putting nodes into ShadowRoot or any descendant
294         we must associate the node with a tree scope which adds rare data to the
295         node making NodeRareData and ElementRareData not very rare.
296
297         On 64bit, this reduces the overhead per element from 136 bytes to
298         32 bytes for a 76% savings, and on other nodes from 64 bytes to 32 bytes
299         for a 50% savings.
300
301         No new tests, no change in behavior.
302
303         * dom/Document.h:
304         (WebCore::Node::treeScope):
305         * dom/Element.cpp:
306         (WebCore::Element::createRareData):
307         * dom/ElementRareData.h:
308         (ElementRareData):
309         (WebCore::ElementRareData::ElementRareData):
310         * dom/Node.cpp:
311         (WebCore::Node::setTreeScope):
312         (WebCore::Node::ensureRareData):
313         (WebCore::Node::createRareData):
314         (WebCore::Node::clearRareData):
315         * dom/Node.h:
316         (WebCore::UncommonNodeData::create):
317         (UncommonNodeData):
318         (WebCore::UncommonNodeData::~UncommonNodeData):
319         (WebCore::UncommonNodeData::isNodeRareData):
320         (WebCore::UncommonNodeData::UncommonNodeData):
321         (WebCore::Node::renderer):
322         (WebCore::Node::setRenderer):
323         (Node):
324         (WebCore::Node::hasRareData):
325         (WebCore::Node::hasUncommonNodeData):
326         * dom/NodeRareData.h:
327         (WebCore::NodeRareData::NodeRareData):
328         (NodeRareData):
329
330 2012-12-06  Joshua Bell  <jsbell@chromium.org>
331
332         IndexedDB: Remove IDBDatabaseException.idl
333         https://bugs.webkit.org/show_bug.cgi?id=102961
334
335         Reviewed by Adam Barth.
336
337         Delete the IDL and references to it. No longer needed as a enum member
338         in the autogenerated ExceptionCodeDescription.h so removed from the ".in"
339         file; only direct references are retained in the autogenerated cpp file.
340
341         Ideally the code generator would handle these new-style DOMExceptions,
342         but we don't have any other examples yet to know what pattern to follow.
343
344         No new tests - just removing dead code.
345
346         * CMakeLists.txt:
347         * DerivedSources.cpp:
348         * DerivedSources.make:
349         * DerivedSources.pri:
350         * GNUmakefile.list.am:
351         * Modules/indexeddb/IDBDatabaseException.idl: Removed.
352         * WebCore.gypi:
353         * WebCore.vcproj/WebCore.vcproj:
354         * WebCore.xcodeproj/project.pbxproj:
355         * dom/DOMExceptions.in:
356         * dom/make_dom_exceptions.pl:
357         (generateImplementation):
358
359 2012-12-06  Andreas Kling  <akling@apple.com>
360
361         [Mac] Drain the CSSValuePool on memory pressure.
362         <http://webkit.org/b/104274>
363
364         Reviewed by Antti Koivisto.
365
366         Add a drain() mechanism to CSSValuePool and call it when we're under memory pressure.
367
368         * WebCore.xcodeproj/project.pbxproj:
369         * css/CSSValuePool.cpp:
370         (WebCore::CSSValuePool::drain):
371         * css/CSSValuePool.h:
372         * platform/mac/MemoryPressureHandlerMac.mm:
373         (WebCore::MemoryPressureHandler::releaseMemory):
374
375 2012-12-05  Adam Klein  <adamk@chromium.org>
376
377         Remove gyp config for incomplete and unused Apple Mac gyp build
378         https://bugs.webkit.org/show_bug.cgi?id=104068
379
380         Reviewed by Adam Barth.
381
382         As part of the removal, move some files to the proper sections
383         of the gypi file.
384
385         * WebCore.gyp/WebCore.gyp:
386         * WebCore.gypi:
387
388 2012-12-06  Hans Muller  <hmuller@adobe.com>
389
390         [CSS Exclusions] Add support for computing the first included interval position.
391         https://bugs.webkit.org/show_bug.cgi?id=103327
392
393         Reviewed by Levi Weintraub.
394
395         If the first "word" in a line doesn't fit within the shape-inside when lineTop
396         is the top of the shape's logical bounding box, adjust lineTop downwards to where
397         the word fits.  Currently only rounded rectangle shapes are supported.
398
399         Added ExclusionShape::firstIncludedIntervalLogicalTop(). The new virtual method
400         computes the topmost/leftmost location where a line segment with the specified
401         minLogicalIntervalSize will fit within the exclusion shape and returns the
402         corresponding logical Y coordinate.  The result is additionally constrained to
403         be at or below minLogicalIntervalTop. If the segment will not fit anywhere within
404         the shape, then false is returned.
405
406         During layout, minLogicalIntervalTop is the nominal top of the line being laid
407         out within the exclusion shape.
408
409         RenderBlock::layoutRunsAndFloatsInRange() now calls a new ExclusionShapeInsideInfo
410         method, adjustLogicalLineTop(), which uses firstIncludedIntervalLogicalTop() to
411         decide if the logical top of the line has to be moved downwards, for the first
412         word to fit within the exclusion shape.
413
414         Tests: fast/exclusions/shape-inside/shape-inside-rounded-rectangle-fit-001.html
415                fast/exclusions/shape-inside/shape-inside-rounded-rectangle-fit-002.html
416
417         * rendering/ExclusionPolygon.cpp:
418         (WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop): This is a stub implementation.
419         * rendering/ExclusionPolygon.h:
420         * rendering/ExclusionRectangle.cpp:
421         (WebCore::ellipseXIntercept): Added spaces to conform to webkit style and to be consistent with ellipseYIntercept()
422         (WebCore::ellipseYIntercept): Compute an ellipse's Y intercept for an X coordinate.
423         (WebCore::ExclusionRectangle::firstIncludedIntervalLogicalTop): See the description above.
424         * rendering/ExclusionRectangle.h:
425         * rendering/ExclusionShape.h:
426         (ExclusionShape):
427         (WebCore::ExclusionShape::logicalTopForMinY): Internal to logical coordinate conversion.
428         * rendering/ExclusionShapeInsideInfo.cpp:
429         (WebCore::ExclusionShapeInsideInfo::adjustLogicalLineTop): A new method that updates m_lineTop with firstIncludedIntervalPosition().
430         * rendering/ExclusionShapeInsideInfo.h:
431         (ExclusionShapeInsideInfo):
432         (WebCore::ExclusionShapeInsideInfo::logicalLineTop): This is just a cover for the private m_lineTop field.
433         * rendering/RenderBlockLineLayout.cpp:
434         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Added code that restarts the layout loop if it's necessary to adjust the line's logicalTop.
435         (WebCore::RenderBlock::restartLayoutRunsAndFloatsInRange): Factored newly common code into this helper function.
436
437 2012-12-06  Ryosuke Niwa  <rniwa@webkit.org>
438
439         Use ownerNode() instead of base() in HTMLCollection
440         https://bugs.webkit.org/show_bug.cgi?id=104244
441
442         Reviewed by Adam Barth.
443
444         Use ownerNode() instead of base() in HTMLCollection to match LiveNodeList.
445         Notice that the definition of base(), which this patch removes, is "return ownerNode()".
446
447         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
448         (WebCore::getNamedItems):
449         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
450         (WebCore::JSHTMLOptionsCollection::indexSetter):
451         (WebCore::JSHTMLOptionsCollection::remove):
452         * bindings/scripts/CodeGeneratorJS.pm:
453         (GenerateImplementation):
454         * bindings/scripts/CodeGeneratorV8.pm:
455         (GenerateOpaqueRootForGC):
456         * bindings/scripts/IDLAttributes.txt:
457         * bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp:
458         (WebCore::getNamedItems):
459         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
460         (WebCore::V8HTMLOptionsCollection::removeCallback):
461         (WebCore::V8HTMLOptionsCollection::indexedPropertySetter):
462         * dom/WebKitNamedFlow.cpp:
463         (WebCore::WebKitNamedFlow::ownerNode):
464         * dom/WebKitNamedFlow.h:
465         (WebKitNamedFlow):
466         * dom/WebKitNamedFlow.idl:
467         * html/HTMLAllCollection.idl:
468         * html/HTMLCollection.h:
469         (HTMLCollection):
470         * html/HTMLCollection.idl:
471         * html/HTMLFormControlsCollection.cpp:
472         (WebCore::HTMLFormControlsCollection::HTMLFormControlsCollection):
473         (WebCore::HTMLFormControlsCollection::create):
474         (WebCore::HTMLFormControlsCollection::formControlElements):
475         (WebCore::HTMLFormControlsCollection::formImageElements):
476         (WebCore::HTMLFormControlsCollection::namedItem):
477         (WebCore::HTMLFormControlsCollection::updateNameCache):
478         * html/HTMLFormControlsCollection.idl:
479         * html/HTMLNameCollection.cpp:
480         (WebCore::HTMLNameCollection::~HTMLNameCollection):
481         (WebCore::HTMLNameCollection::virtualItemAfter):
482         * html/HTMLOptionsCollection.cpp:
483         (WebCore::HTMLOptionsCollection::add):
484         (WebCore::HTMLOptionsCollection::remove):
485         (WebCore::HTMLOptionsCollection::selectedIndex):
486         (WebCore::HTMLOptionsCollection::setSelectedIndex):
487         (WebCore::HTMLOptionsCollection::setLength):
488         * html/HTMLOptionsCollection.idl:
489         * html/HTMLPropertiesCollection.cpp:
490         (WebCore::HTMLPropertiesCollection::updateRefElements):
491         (WebCore::HTMLPropertiesCollection::namedItem):
492         * html/HTMLTableRowsCollection.cpp:
493         (WebCore::HTMLTableRowsCollection::virtualItemAfter):
494
495 2012-12-06  Tommy Widenflycht  <tommyw@google.com>
496
497         Speech Recognition API: Change the error code to a string on SpeechRecognitionError
498         https://bugs.webkit.org/show_bug.cgi?id=104254
499
500         Reviewed by Adam Barth.
501
502         SpeechRecognitionError::code (numeric value) has been changed to SpeechRecognitionError::error (string)
503         in the latest specification.
504
505         http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#speechreco-error
506
507         Existing tests modified to cover this patch.
508
509         * Modules/speech/SpeechRecognitionError.cpp:
510         (WebCore::ErrorCodeToString):
511         (WebCore):
512         (WebCore::SpeechRecognitionError::create):
513         (WebCore::SpeechRecognitionError::SpeechRecognitionError):
514         * Modules/speech/SpeechRecognitionError.h:
515         (SpeechRecognitionErrorInit):
516         (WebCore::SpeechRecognitionError::error):
517         (SpeechRecognitionError):
518         * Modules/speech/SpeechRecognitionError.idl:
519
520 2012-12-06  Stephen Chenney  <schenney@chromium.org>
521
522         SVG <use> element inside an svg-as-image fails
523         https://bugs.webkit.org/show_bug.cgi?id=104007
524
525         Reviewed by Eric Seidel.
526
527         Upon redraw, SVGImage calls layout on the document it is drawing into
528         the image if the image, provided it believes the redraw does not need
529         to be delayed. Unfortunately, when an SVG <use> element is modified
530         (by animation, say) and regenerates its shadow tree, the destructors
531         invoke redraw, causing the SVGImage to call layout on something that
532         is in the process of being deleted. That's bad.
533
534         This change causes SVGImage to always delay the redraw. It is the most robust
535         way to protect against this problem, as there may be any number of
536         ways to cause this issue (a node being deleted in an svg-as-image
537         target) and this protects against them all.
538
539         The test case crashes in Asan Chromium.
540
541         Test: svg/as-image/animated-use-as-image-crash.html
542
543         * svg/graphics/SVGImageCache.cpp:
544         (WebCore::SVGImageCache::imageContentChanged): Always redraw on the timer.
545
546 2012-12-06  Antoine Quint  <graouts@apple.com>
547
548         TextTrack's .cues not ordered correctly when two cues have the same .startTime
549         https://bugs.webkit.org/show_bug.cgi?id=103266
550
551         Reviewed by Eric Carlson.
552
553         Adding a new method TextTrackCueList::updateCueIndex() to update the list of
554         cues after changing the .startTime or .endTime of a TextTrackCue. I elected to
555         add a new method to TextTrackCueList rather than calling remove() and then add()
556         on the list from TextTrack::cueDidChange() so that the nature of the operation
557         is abstracted and we can easily change the way we keep the cue list sorted at
558         a later time should we choose to.
559
560         * html/track/TextTrack.cpp:
561         (WebCore::TextTrack::cueDidChange):
562         * html/track/TextTrackCueList.cpp:
563         (WebCore::TextTrackCueList::updateCueIndex):
564         (WebCore):
565         * html/track/TextTrackCueList.h:
566         (TextTrackCueList):
567
568 2012-12-06  Andras Becsi  <andras.becsi@digia.com>
569
570         [Qt][Mac] Fix libxslt and libxml2 config tests
571         https://bugs.webkit.org/show_bug.cgi?id=104164
572
573         Reviewed by Simon Hausmann.
574
575         Since libxml2 is a dependency for libxslt and is not used
576         standalone the configurations for it should also depend on
577         whether XSLT is enabled.
578         Also avoid using pkg-config on Mac, instead use direct
579         include paths and add needed libraries to the linker.
580
581         No new tests needed.
582
583         * WebCore.pri:
584
585 2012-12-06  Shinya Kawanaka  <shinyak@chromium.org>
586
587         Internals.getElementByIdInShadowRoot is nonsense now.
588         https://bugs.webkit.org/show_bug.cgi?id=104241
589
590         Reviewed by Kent Tamura.
591
592         Since we have ShadowRoot.getElementById() now, we don't need Internals.getElementByIdInShadowRoot, which is
593         the same functionality of ShadowRoot.getElementById().
594
595         Test: fast/dom/shadow/get-element-by-id-in-shadow-root.html
596
597         * WebCore.exp.in:
598         * testing/Internals.cpp:
599         * testing/Internals.h:
600         (Internals):
601         * testing/Internals.idl:
602
603 2012-12-06  Kondapally Kalyan  <kalyan.kondapally@intel.com>
604
605         [EFL] Active texture state gets corrupted after updating graphics surface contents.
606         https://bugs.webkit.org/show_bug.cgi?id=104248.
607
608         Reviewed by Kenneth Rohde Christiansen.
609
610         GraphicsContext3DPrivate::copyToGraphicsSurface() doesn't restore the previously bound texture
611         after copying texture contents. This corrupts the texture state.
612
613         Existing Tests should cover this.
614
615         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
616         (GraphicsContext3DPrivate::copyToGraphicsSurface):
617         * platform/graphics/opengl/GLPlatformSurface.cpp:
618         (WebCore::GLPlatformSurface::updateContents):
619         * platform/graphics/opengl/GLPlatformSurface.h:
620         (GLPlatformSurface):
621
622 2012-12-06  Alexander Pavlov  <apavlov@chromium.org>
623
624         Web Inspector: Goto panel shortcuts and description are reversed
625         https://bugs.webkit.org/show_bug.cgi?id=103988
626
627         Reviewed by Pavel Feldman.
628
629         Swap the square brackets in the shortcuts.
630
631         * inspector/front-end/inspector.js:
632         (WebInspector._registerShortcuts):
633
634 2012-12-06  Sheriff Bot  <webkit.review.bot@gmail.com>
635
636         Unreviewed, rolling out r136818.
637         http://trac.webkit.org/changeset/136818
638         https://bugs.webkit.org/show_bug.cgi?id=104249
639
640         simulatedClick does not work as per #chrmium irc. (Requested
641         by hayato on #webkit).
642
643         * dom/EventDispatcher.cpp:
644         (WebCore::EventRelatedTargetAdjuster::adjust):
645         * dom/MouseEvent.cpp:
646         (WebCore::MouseEventDispatchMediator::create):
647         (WebCore::MouseEventDispatchMediator::MouseEventDispatchMediator):
648         (WebCore::MouseEventDispatchMediator::dispatchEvent):
649         * dom/MouseEvent.h:
650         (MouseEventDispatchMediator):
651         * dom/Node.cpp:
652         (WebCore::Node::dispatchEvent):
653
654 2012-12-06  Ulan Degenbaev  <ulan@chromium.org>
655
656         [v8] Fix hidden property name of V8ArrayBufferView flag.
657         https://bugs.webkit.org/show_bug.cgi?id=104099
658
659         Reviewed by Kentaro Hara.
660
661         Fix hidden property name of V8ArrayBufferView hidden copy method.
662
663         * bindings/v8/V8HiddenPropertyName.h:
664         (WebCore):
665         * bindings/v8/custom/V8ArrayBufferViewCustom.cpp:
666         (WebCore::getHiddenCopyMethod):
667         (WebCore::installHiddenCopyMethod):
668
669 2012-12-06  Kentaro Hara  <haraken@chromium.org>
670
671         Unreviewed. Fixed a wrong comment landed in r136822.
672
673         * bindings/v8/V8Binding.h:
674         (WebCore):
675
676 2012-12-05  Kentaro Hara  <haraken@chromium.org>
677
678         [V8] Implement deprecatedV8String()
679         https://bugs.webkit.org/show_bug.cgi?id=104230
680
681         Reviewed by Adam Barth.
682
683         To make an Isolate mandatory in v8String(), we implement
684         deprecatedV8String() for call sites that don't have
685         an Isolate. Eventually we want to kill the method though.
686
687         No tests. No change in behavior.
688
689         * bindings/scripts/test/V8/V8TestCallback.cpp:
690         (WebCore::V8TestCallback::callbackWithClass2Param):
691         * bindings/v8/Dictionary.cpp:
692         (WebCore::Dictionary::getKey):
693         * bindings/v8/IDBBindingUtilities.cpp:
694         (WebCore::get):
695         (WebCore::set):
696         * bindings/v8/JavaScriptCallFrame.cpp:
697         (WebCore::JavaScriptCallFrame::evaluate):
698         * bindings/v8/ScriptController.cpp:
699         (WebCore::ScriptController::compileAndRunScript):
700         (WebCore::ScriptController::bindToWindowObject):
701         (WebCore::ScriptController::disableEval):
702         * bindings/v8/ScriptDebugServer.cpp:
703         (WebCore::ScriptDebugServer::setBreakpoint):
704         (WebCore::ScriptDebugServer::removeBreakpoint):
705         (WebCore::ScriptDebugServer::setScriptSource):
706         (WebCore::ScriptDebugServer::ensureDebuggerScriptCompiled):
707         (WebCore::ScriptDebugServer::compileScript):
708         * bindings/v8/ScriptFunctionCall.cpp:
709         (WebCore::ScriptCallArgumentHandler::appendArgument):
710         (WebCore::ScriptFunctionCall::call):
711         (WebCore::ScriptFunctionCall::construct):
712         * bindings/v8/ScriptProfiler.cpp:
713         (WebCore::ScriptProfiler::start):
714         (WebCore::ScriptProfiler::stop):
715         (WebCore::ScriptProfiler::takeHeapSnapshot):
716         * bindings/v8/ScriptSourceCode.cpp:
717         (WebCore::ScriptSourceCode::compileScript):
718         * bindings/v8/V8Binding.h:
719         (WebCore):
720         (WebCore::deprecatedV8String):
721         * bindings/v8/V8DOMWindowShell.cpp:
722         (WebCore::V8DOMWindowShell::initializeIfNeeded):
723         (WebCore::V8DOMWindowShell::namedItemAdded):
724         (WebCore::V8DOMWindowShell::namedItemRemoved):
725         * bindings/v8/V8LazyEventListener.cpp:
726         (WebCore::V8LazyEventListener::prepareListenerObject):
727         * bindings/v8/V8WindowErrorHandler.cpp:
728         (WebCore::V8WindowErrorHandler::callListenerFunction):
729         * bindings/v8/V8WorkerContextErrorHandler.cpp:
730         (WebCore::V8WorkerContextErrorHandler::callListenerFunction):
731         * bindings/v8/WorkerScriptController.cpp:
732         (WebCore::WorkerScriptController::evaluate):
733         * bindings/v8/custom/V8ArrayBufferViewCustom.cpp:
734         (WebCore::installHiddenCopyMethod):
735         (WebCore::copyElements):
736         * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
737         (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
738         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
739         (WebCore::V8InjectedScriptHost::getEventListenersCallback):
740         * bindings/v8/custom/V8InjectedScriptManager.cpp:
741         (WebCore::InjectedScriptManager::createInjectedScript):
742         * bindings/v8/custom/V8MessageEventCustom.cpp:
743         (WebCore::V8MessageEvent::dataAccessorGetter):
744         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
745         (WebCore::toV8Object):
746         (WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallback):
747
748 2012-12-06  Keishi Hattori  <keishi@webkit.org>
749
750         Page popup should align to the right when the anchor element is rtl
751         https://bugs.webkit.org/show_bug.cgi?id=104219
752
753         Reviewed by Kent Tamura.
754
755         Page popup should align to the right edge of the anchor element when the anchor element is rtl.
756
757         No new tests. Mock page popup can't test popup window position.
758
759         * Resources/pagepopups/pickerCommon.js:
760         (_adjustWindowRectHorizontally): Align to the right edge when anchor element is rtl. Removed some redundant lines.
761         (setWindowRect): If the window is hidden we want to move first then resize so the popup doesn't flicker.
762         (isWindowHidden): Returns true if the window is hidden using hideWindow().
763
764 2012-12-06  Kentaro Hara  <haraken@chromium.org>
765
766         [V8] Make an Isolate mandatory for v8StringOrNull() and v8StringOrUndefined()
767         https://bugs.webkit.org/show_bug.cgi?id=104213
768
769         Reviewed by Adam Barth.
770
771         All call sites of v8StringOrNull() and v8StringOrUndefined() have an Isolate.
772
773         No tests. No change in behavior.
774
775         * bindings/v8/V8Binding.h:
776         (WebCore::v8StringOrNull):
777         (WebCore::v8StringOrUndefined):
778
779 2012-12-05  Kentaro Hara  <haraken@chromium.org>
780
781         [V8] Implement deprecatedV8Integer(int i)
782         https://bugs.webkit.org/show_bug.cgi?id=104220
783
784         Reviewed by Adam Barth.
785
786         To make an Isolate mandatory in v8Integer(), we implement
787         deprecatedV8Integer(int i) for call sites that don't have
788         an Isolate. Eventually we want to kill deprecatedV8Integer(int i).
789
790         No new tests. No change in behavior.
791
792         * bindings/v8/Dictionary.cpp:
793         (WebCore::Dictionary::get):
794         * bindings/v8/NPV8Object.cpp:
795         (_NPN_Enumerate):
796         * bindings/v8/PageScriptDebugServer.cpp:
797         (WebCore::PageScriptDebugServer::addListener):
798         * bindings/v8/ScriptDebugServer.cpp:
799         (WebCore::ScriptDebugServer::setBreakpoint):
800         (WebCore::ScriptDebugServer::compileScript):
801         * bindings/v8/ScriptSourceCode.cpp:
802         (WebCore::ScriptSourceCode::compileScript):
803         * bindings/v8/V8Binding.h:
804         (WebCore):
805         (WebCore::deprecatedV8Integer):
806         * bindings/v8/V8DOMConfiguration.cpp:
807         (WebCore::V8DOMConfiguration::batchConfigureConstants):
808         * bindings/v8/V8NPUtils.cpp:
809         (WebCore::convertNPVariantToV8Object):
810         * bindings/v8/V8Utilities.cpp:
811         (WebCore::createHiddenDependency):
812         (WebCore::removeHiddenDependency):
813         * bindings/v8/V8WindowErrorHandler.cpp:
814         (WebCore::V8WindowErrorHandler::callListenerFunction):
815         * bindings/v8/V8WorkerContextErrorHandler.cpp:
816         (WebCore::V8WorkerContextErrorHandler::callListenerFunction):
817         * bindings/v8/WorkerScriptDebugServer.cpp:
818         (WebCore::WorkerScriptDebugServer::addListener):
819         * bindings/v8/custom/V8MutationCallbackCustom.cpp:
820         (WebCore::V8MutationCallback::handleEvent):
821
822 2012-12-06  Hayato Ito  <hayato@chromium.org>
823
824         Event's relatedTarget re-targeting does not occur for manually fired mouse events created by event.initMouseEvent().
825         https://bugs.webkit.org/show_bug.cgi?id=102681
826
827         Reviewed by Dimitri Glazkov.
828
829         Make sure that event's relatedTarget re-targeting occurs for mouse
830         events created by event.initMouseEvent().  Since user-generated
831         mouse events can have a relatedTarget which is same to the target
832         node, the algorithm which calculates event's ancestors is also
833         updated so that ancestors are not shrunk wrongly.
834
835         Test: fast/events/dispatch-synthetic-mouseevent.html
836               fast/dom/shadow/shadow-dom-event-dispatching.html
837
838         * dom/EventDispatcher.cpp:
839         (WebCore::EventRelatedTargetAdjuster::adjust):
840         * dom/MouseEvent.cpp:
841         (WebCore::MouseEventDispatchMediator::create):
842         (WebCore::MouseEventDispatchMediator::MouseEventDispatchMediator):
843         (WebCore::MouseEventDispatchMediator::dispatchEvent):
844         * dom/MouseEvent.h:
845         (WebCore::MouseEventDispatchMediator::isSyntheticMouseEvent):
846         (MouseEventDispatchMediator):
847         * dom/Node.cpp:
848         (WebCore::Node::dispatchEvent):
849
850 2012-12-06  Michael Pruett  <michael@68k.org>
851
852         [JSC] Check whether property is an array before attempting conversion to array in JSDictionary
853         https://bugs.webkit.org/show_bug.cgi?id=96614
854
855         Reviewed by Kentaro Hara.
856
857         JSDictionary should check whether the property being accessed in get()
858         is an array before attempting to convert the value to an array.
859
860         Previously calling get() with a result type of Vector<String> when
861         the named property could not be converted to an array would generate
862         an exception.
863
864         Tests: storage/indexeddb/*
865
866         * bindings/js/JSDictionary.cpp:
867         (WebCore::JSDictionary::convertValue):
868         * bindings/js/JSDictionary.h:
869         (WebCore::JSDictionary::tryGetPropertyAndResult):
870
871 2012-12-05  Kentaro Hara  <haraken@chromium.org>
872
873         [V8] Pass Isolate to toDOMStringList()
874         https://bugs.webkit.org/show_bug.cgi?id=104224
875
876         Reviewed by Adam Barth.
877
878         No tests. No change in behavior.
879
880         * bindings/scripts/CodeGeneratorV8.pm:
881         (JSValueToNative):
882         * bindings/scripts/test/V8/V8TestObj.cpp:
883         (WebCore::TestObjV8Internal::overloadedMethod6Callback):
884         (WebCore::TestObjV8Internal::overloadedMethod7Callback):
885         (WebCore::TestObjV8Internal::overloadedMethod9Callback):
886         (WebCore::TestObjV8Internal::stringArrayFunctionCallback):
887         * bindings/v8/V8Binding.cpp:
888         (WebCore::toDOMStringList):
889         * bindings/v8/V8Binding.h:
890         (WebCore):
891
892 2012-12-06  Kentaro Hara  <haraken@chromium.org>
893
894         Remove JSDependentRetained.h and V8DependentRetained.h
895         https://bugs.webkit.org/show_bug.cgi?id=104232
896
897         Reviewed by Adam Barth.
898
899         Although (JS|V8)DependentRetained.h were introduced for MutationObservers,
900         they are not going to be used (See the discussion in bug 95519).
901         We can remove them.
902
903         No tests. No change in behavior.
904
905         * GNUmakefile.list.am:
906         * WebCore.gypi:
907         * WebCore.vcproj/WebCore.vcproj:
908         * WebCore.xcodeproj/project.pbxproj:
909         * bindings/js/JSDependentRetained.h: Removed.
910         * bindings/v8/V8DependentRetained.h: Removed.
911         * bindings/v8/V8PerIsolateData.cpp:
912         (WebCore::V8PerIsolateData::V8PerIsolateData):
913         * bindings/v8/V8PerIsolateData.h:
914         (V8PerIsolateData):
915
916 2012-12-06  Kentaro Hara  <haraken@chromium.org>
917
918         [V8] Replace v8String("symbol") with v8::String::NewSymbol("symbol")
919         https://bugs.webkit.org/show_bug.cgi?id=104209
920
921         Reviewed by Adam Barth.
922
923         V8 can look up symbols faster than strings.
924
925         No tests. No change in behavior.
926
927         * bindings/v8/JavaScriptCallFrame.cpp:
928         (WebCore::JavaScriptCallFrame::caller):
929         (WebCore::JavaScriptCallFrame::sourceID):
930         (WebCore::JavaScriptCallFrame::line):
931         (WebCore::JavaScriptCallFrame::column):
932         (WebCore::JavaScriptCallFrame::functionName):
933         (WebCore::JavaScriptCallFrame::scopeChain):
934         (WebCore::JavaScriptCallFrame::scopeType):
935         (WebCore::JavaScriptCallFrame::thisObject):
936         (WebCore::JavaScriptCallFrame::evaluate):
937         (WebCore::JavaScriptCallFrame::restart):
938         * bindings/v8/V8ThrowException.cpp:
939         (WebCore::domExceptionStackGetter):
940         (WebCore::domExceptionStackSetter):
941         (WebCore::V8ThrowException::setDOMException):
942         * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
943         (WebCore::V8InspectorFrontendHost::platformCallback):
944         * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp:
945         (WebCore::V8JavaScriptCallFrame::typeAccessorGetter):
946
947 2012-12-06  Sheriff Bot  <webkit.review.bot@gmail.com>
948
949         Unreviewed, rolling out r136784 and r136802.
950         http://trac.webkit.org/changeset/136784
951         http://trac.webkit.org/changeset/136802
952         https://bugs.webkit.org/show_bug.cgi?id=104231
953
954         breaks chromium canary (Requested by morrita on #webkit).
955
956         * WebCore.gyp/WebCore.gyp:
957         * WebCore.gypi:
958         * platform/chromium/PlatformThemeChromiumLinux.cpp: Added.
959         (WebCore):
960         (WebCore::PlatformThemeChromiumLinux::setScrollbarColors):
961         (WebCore::clamp):
962         (WebCore::PlatformThemeChromiumLinux::saturateAndBrighten):
963         (WebCore::PlatformThemeChromiumLinux::outlineColor):
964         (WebCore::PlatformThemeChromiumLinux::paintArrowButton):
965         * platform/chromium/PlatformThemeChromiumLinux.h: Added.
966         (WebCore):
967         (PlatformThemeChromiumLinux):
968         (WebCore::PlatformThemeChromiumLinux::thumbInactiveColor):
969         (WebCore::PlatformThemeChromiumLinux::thumbActiveColor):
970         (WebCore::PlatformThemeChromiumLinux::trackColor):
971         (WebCore::PlatformThemeChromiumLinux::PlatformThemeChromiumLinux):
972         * platform/chromium/ScrollbarThemeChromiumLinux.cpp: Added.
973         (WebCore):
974         (WebCore::ScrollbarTheme::nativeTheme):
975         (WebCore::ScrollbarThemeChromiumLinux::scrollbarThickness):
976         (WebCore::ScrollbarThemeChromiumLinux::paintTrackPiece):
977         (WebCore::ScrollbarThemeChromiumLinux::paintButton):
978         (WebCore::ScrollbarThemeChromiumLinux::paintThumb):
979         (WebCore::ScrollbarThemeChromiumLinux::shouldCenterOnThumb):
980         (WebCore::ScrollbarThemeChromiumLinux::buttonSize):
981         (WebCore::ScrollbarThemeChromiumLinux::minimumThumbLength):
982         * platform/chromium/ScrollbarThemeChromiumLinux.h: Added.
983         (ScrollbarThemeChromiumLinux):
984         * rendering/RenderThemeChromiumAndroid.cpp:
985         (WebCore::RenderThemeChromiumAndroid::extraDefaultStyleSheet):
986         * rendering/RenderThemeChromiumAndroid.h:
987         * rendering/RenderThemeChromiumLinux.cpp: Added.
988         (WebCore):
989         (WebCore::getWebThemeState):
990         (WebCore::RenderThemeChromiumLinux::create):
991         (WebCore::RenderTheme::themeForPage):
992         (WebCore::RenderThemeChromiumLinux::RenderThemeChromiumLinux):
993         (WebCore::RenderThemeChromiumLinux::~RenderThemeChromiumLinux):
994         (WebCore::RenderThemeChromiumLinux::systemColor):
995         (WebCore::RenderThemeChromiumLinux::extraDefaultStyleSheet):
996         (WebCore::RenderThemeChromiumLinux::controlSupportsTints):
997         (WebCore::RenderThemeChromiumLinux::activeListBoxSelectionBackgroundColor):
998         (WebCore::RenderThemeChromiumLinux::activeListBoxSelectionForegroundColor):
999         (WebCore::RenderThemeChromiumLinux::inactiveListBoxSelectionBackgroundColor):
1000         (WebCore::RenderThemeChromiumLinux::inactiveListBoxSelectionForegroundColor):
1001         (WebCore::RenderThemeChromiumLinux::platformActiveSelectionBackgroundColor):
1002         (WebCore::RenderThemeChromiumLinux::platformInactiveSelectionBackgroundColor):
1003         (WebCore::RenderThemeChromiumLinux::platformActiveSelectionForegroundColor):
1004         (WebCore::RenderThemeChromiumLinux::platformInactiveSelectionForegroundColor):
1005         (WebCore::RenderThemeChromiumLinux::sliderTickSize):
1006         (WebCore::RenderThemeChromiumLinux::sliderTickOffsetFromTrackCenter):
1007         (WebCore::RenderThemeChromiumLinux::adjustSliderThumbSize):
1008         (WebCore::RenderThemeChromiumLinux::supportsControlTints):
1009         (WebCore::RenderThemeChromiumLinux::setCaretBlinkInterval):
1010         (WebCore::RenderThemeChromiumLinux::caretBlinkIntervalInternal):
1011         (WebCore::RenderThemeChromiumLinux::setSelectionColors):
1012         (WebCore::RenderThemeChromiumLinux::paintCheckbox):
1013         (WebCore::RenderThemeChromiumLinux::setCheckboxSize):
1014         (WebCore::RenderThemeChromiumLinux::paintRadio):
1015         (WebCore::RenderThemeChromiumLinux::setRadioSize):
1016         (WebCore::RenderThemeChromiumLinux::paintButton):
1017         (WebCore::RenderThemeChromiumLinux::paintTextField):
1018         (WebCore::RenderThemeChromiumLinux::paintMenuList):
1019         (WebCore::RenderThemeChromiumLinux::paintSliderTrack):
1020         (WebCore::RenderThemeChromiumLinux::paintSliderThumb):
1021         (WebCore::RenderThemeChromiumLinux::adjustInnerSpinButtonStyle):
1022         (WebCore::RenderThemeChromiumLinux::paintInnerSpinButton):
1023         (WebCore::RenderThemeChromiumLinux::paintProgressBar):
1024         (WebCore::RenderThemeChromiumLinux::shouldOpenPickerWithF4Key):
1025         * rendering/RenderThemeChromiumLinux.h: Added.
1026         (WebCore):
1027         (RenderThemeChromiumLinux):
1028
1029 2012-12-05  Sankeerth V S  <sankeerth.vs@samsung.com>
1030
1031         Web Inspector: Title of "Record Timeline" status button on "Timeline
1032         Panel" should reflect the recording state.
1033         https://bugs.webkit.org/show_bug.cgi?id=104108
1034
1035         Reviewed by Alexander Pavlov.
1036
1037         Title should be toggled between "Record"/"Stop" to reflect current
1038         state of the Status bar button.
1039
1040         No new tests as UI related change.
1041
1042         * inspector/front-end/TimelinePanel.js:
1043         (WebInspector.TimelinePanel.prototype.get _toggleTimelineButtonClicked):
1044
1045 2012-12-03  Kent Tamura  <tkent@chromium.org>
1046
1047         INPUT_MULTIPLE_FIELDS_UI doesn't show digits well in RTL locales
1048         https://bugs.webkit.org/show_bug.cgi?id=103869
1049
1050         Reviewed by Hajime Morita.
1051
1052         We need to use display:inline elements to wrap sub-fields and static
1053         text in DateTimeEditElement children to apply the Unicode Bidi
1054         Algorithm.
1055
1056         Because we can't use display:inline-block for them, we can't specify
1057         min-width CSS property for them. We stop using customStyleForRenderer of
1058         sub-fields to specify each of their widths, and use
1059         customStyleForRenderer of DateTimeEditElement to specify the total
1060         required width. A sub-field width shrink and grow so that the width fits
1061         to the field value, and a DateTimeEditElement doesn't.
1062
1063         No new tests. Coverred by existing tests, especially
1064         fast/forms/datetime/datetime-appearance-l10n.html shows "23:59"
1065         correctly.
1066
1067         * css/html.css:
1068         (input::-webkit-datetime-edit-year-field):
1069         - Make this display:inline to apply the Unicode Bidi Algorithm.
1070         - Use padding instead of margin because of ease of width computation.
1071           Also, the focus apparance gets better by padding.
1072         - Don't allow to specify font property here because of ease of width
1073           computation.
1074         - Remove text-align:center. It doesn't work for display:inline.
1075         (input::-webkit-datetime-edit-text):
1076         - Make this display:inline to apply the Unicode Bidi Algorithm.
1077         - Don't allow to specify font property here because of ease of width
1078           computation.
1079
1080         * html/shadow/DateTimeEditElement.h:
1081         (DateTimeEditElement): Declare customStyleForRenderer.
1082         * html/shadow/DateTimeEditElement.cpp:
1083         (WebCore::DateTimeEditElement::DateTimeEditElement):
1084         Enable customStyleForRenderer.
1085         (WebCore::DateTimeEditElement::customStyleForRenderer):
1086         Compute required width with a font for this element and child maximum
1087         widths, and set it to min-width style.
1088         The resultant width value can be inaccurate if a page author specifies
1089         padding, border, margin, etc. to ::-webkit-datetime-edit-*-field or
1090         ::-webkit-datetime-edit-text. In such case, the page author should specify
1091         wider width to <input>.
1092
1093         * dom/Element.h:
1094         (Element): Add isDateTimeFieldElement to do static_cast<DateTimeFieldElement> safely.
1095         * dom/Element.cpp:
1096         (WebCore::Element::isDateTimeFieldElement): Added.
1097
1098         * html/shadow/DateTimeFieldElement.h:
1099         (DateTimeFieldElement): Declare isDateTimeFieldElement and maximumWidth.
1100         * html/shadow/DateTimeFieldElement.cpp:
1101         (WebCore::DateTimeFieldElement::isDateTimeFieldElement):
1102         Added. Returns true.
1103         (WebCore::DateTimeFieldElement::maximumWidth):
1104         Added. Returns padding width.
1105
1106         * html/shadow/DateTimeSymbolicFieldElement.h:
1107         (DateTimeSymbolicFieldElement):
1108         Remove customStyleForRenderer, and declare maximumWidth.
1109         * html/shadow/DateTimeSymbolicFieldElement.cpp:
1110         (WebCore::DateTimeSymbolicFieldElement::DateTimeSymbolicFieldElement):
1111         Disable customStyleForRenderer.
1112         (WebCore::DateTimeSymbolicFieldElement::maximumWidth):
1113         Added. Returns the expected maximum width with the specified font.
1114
1115         * html/shadow/DateTimeNumericFieldElement.h:
1116         (DateTimeNumericFieldElement):
1117         Remove customStyleForRenderer, declare maximumWidth, and make m_placeholder
1118         non-const because it is updated in the constructor.
1119         * html/shadow/DateTimeNumericFieldElement.cpp:
1120         (WebCore::DateTimeNumericFieldElement::DateTimeNumericFieldElement):
1121         Disable customStyleForRenderer.
1122         If a numeric value for this field is LTR and the whole direction is RTL,
1123         wrap the placeholder string with left-to-right-mark and
1124         right-to-left-mark so that it is handled as LTR. Without this,
1125         sub-fields order would be changed when the content of a field is changed
1126         from a placeholder to a numeric value.
1127         (WebCore::DateTimeNumericFieldElement::maximumWidth):
1128         Added. Returns the expected maximum width with the specified font.
1129
1130 2012-12-05  Kent Tamura  <tkent@chromium.org>
1131
1132         INPUT_MULTIPLE_FIELDS_UI: The hour, am/pm, millisecond fields should support read-only state correctly
1133         https://bugs.webkit.org/show_bug.cgi?id=104210
1134
1135         Reviewed by Kentaro Hara.
1136
1137         1. The hour, am/pm, and millisecond fields should have CSS rules for
1138            [readonly]. They should be gray when they are read-only.
1139         2. The am/pm field should reject to set an empty value like other
1140            numeric fields do.
1141
1142         Tests: Add test cases to fast/forms/time/time-appearance-basic.html.
1143
1144         * css/html.css: merge existing readonly rules, and add ampm, hour, and
1145         millisecond pseudo classes.
1146         * html/shadow/DateTimeSymbolicFieldElement.cpp:
1147         (WebCore::DateTimeSymbolicFieldElement::setEmptyValue):
1148         Reject to set empty value if it is read-only.
1149
1150 2012-12-05  Dan Beam  <dbeam@chromium.org>
1151
1152         HTMLFormElement#requestAutocomplete() should require a user action
1153         https://bugs.webkit.org/show_bug.cgi?id=102320
1154
1155         Reviewed by Kent Tamura.
1156
1157         This patch dispatches an autocompleteerror when HTMLFormElement::requestAutocomplete() is called while not processing
1158         a user gesture.
1159
1160         * fast/forms/form-request-autocomplete.html is updated.
1161
1162         * html/HTMLFormElement.cpp:
1163         (WebCore::HTMLFormElement::requestAutocomplete):
1164
1165         Asynchronously dispatch an autocomplete error when not processing a user action when
1166         HTMLFormElement#requestAutocomplete() is invoked.
1167
1168 2012-12-05  Kentaro Hara  <haraken@chromium.org>
1169
1170         [V8] Optimize v8StringOrNull() and v8StringOrUndefined()
1171         https://bugs.webkit.org/show_bug.cgi?id=104206
1172
1173         Reviewed by Adam Barth.
1174
1175         Currently v8StringOrNull() and v8StringOrUndefined() are checking
1176         a null string twice. It is redundant.
1177
1178         [div.localName]
1179         Before this patch: 20.03 ns
1180         After this patch:  19.34 ns
1181
1182         * bindings/v8/V8Binding.h:
1183         (WebCore::v8StringOrNull):
1184         (WebCore::v8StringOrUndefined):
1185
1186 2012-12-05  Kentaro Hara  <haraken@chromium.org>
1187
1188         [V8] Optimize v8String() for uninitialized DOM attributes
1189         https://bugs.webkit.org/show_bug.cgi?id=104205
1190
1191         Reviewed by Adam Barth.
1192
1193         This patch makes uninitialized div.lang, div.title etc 6.3% faster.
1194
1195         [div.lang]
1196         Before this patch: 12.6 ns
1197         After this patch:  11.8 ns
1198
1199         * bindings/v8/V8Binding.h:
1200         (WebCore::v8String):
1201
1202 2012-12-05  Kentaro Hara  <haraken@chromium.org>
1203
1204         [V8] Remove addImplicitReferencesForNodeWithEventListeners()
1205         https://bugs.webkit.org/show_bug.cgi?id=104203
1206
1207         Reviewed by Adam Barth.
1208
1209         We can use opaqueRootForGC() instead. By this change, we can remove
1210         all AddImplicitReferences() from V8 bindings.
1211
1212         Tests: fast/dom/gc-image-element.html
1213                fast/dom/gc-image-element-2.html
1214                fast/dom/inline-event-attributes-lookup-removed.html
1215
1216         * bindings/v8/V8GCController.cpp:
1217
1218 2012-12-05  Andrei Bucur  <abucur@adobe.com>
1219
1220         [CSS Regions] Blocks don't relayout children if the width of a region changes
1221         https://bugs.webkit.org/show_bug.cgi?id=103993
1222
1223         Reviewed by David Hyatt.
1224
1225         After r135750 lines are no longer invalidating when regions change width. This is happening because the detection for the width change was being done
1226         only at line layout time. This patch moves the line relayout decision to the containing block by setting the relayoutChildren flag if the block
1227         has no region chain attached.
1228
1229         Tests: fast/regions/region-width-change-relayout-1.html
1230                fast/regions/region-width-change-relayout-2.html
1231                fast/regions/region-width-change-relayout-3.html
1232
1233         * rendering/RenderFlowThread.cpp:
1234         (WebCore::RenderFlowThread::logicalWidthChangedInRegions):
1235
1236 2012-12-05  Kihong Kwon  <kihong.kwon@samsung.com>
1237
1238         Parameter event need to covert to RefPtr in the DeviceController::dispatchDeviceEvent
1239         https://bugs.webkit.org/show_bug.cgi?id=104201
1240
1241         Reviewed by Laszlo Gombos.
1242
1243         Parameter 'event' need to covert to RefPtr in the DeviceController::dispatchDeviceEvent.
1244         This can make crash sometimes.
1245
1246         No new tests. Covered by existing layout tests.
1247
1248         * page/DeviceController.cpp:
1249         (WebCore::DeviceController::dispatchDeviceEvent):
1250
1251 2012-12-05  Halton Huo  <halton.huo@intel.com>
1252
1253         [CMake] Unify coding style for CMake files
1254         https://bugs.webkit.org/show_bug.cgi?id=103605
1255
1256         Reviewed by Laszlo Gombos.
1257
1258         Update cmake files(.cmake, CMakeLists.txt) with following style rules:
1259         1. Indentation
1260         1.1 Use spaces, not tabs.
1261         1.2 Four spaces as indent.
1262         2. Spacing
1263         2.1 Place one space between control statements and their parentheses.
1264             For eg, if (), else (), elseif (), endif (), foreach (),
1265             endforeach (), while (), endwhile (), break ().
1266         2.2 Do not place spaces between function and macro statements and
1267             their parentheses. For eg, macro(), endmacro(), function(),
1268             endfunction().
1269         2.3 Do not place spaces between a command or function or macro and its
1270             parentheses, or between a parenthesis and its content. For eg,
1271             message("testing") not message( "testing") or message ("testing" )
1272         2.4 No space at line ending.
1273         3. Lowercase when call commands macros and functions. For eg,
1274            add_executable() not ADD_EXECUTABLE(), set() not SET().
1275
1276         * CMakeLists.txt:
1277         * PlatformBlackBerry.cmake:
1278         * PlatformEfl.cmake:
1279         * PlatformWinCE.cmake:
1280         * UseJSC.cmake:
1281         * UseV8.cmake:
1282
1283 2012-12-05  Kentaro Hara  <haraken@chromium.org>
1284
1285         [V8] Remove unused property names from V8HiddenPropertyName
1286         https://bugs.webkit.org/show_bug.cgi?id=104194
1287
1288         Reviewed by Adam Barth.
1289
1290         We can remove unused property names from V8HiddenPropertyName.
1291
1292         No tests. No change in behavior.
1293
1294         * bindings/v8/V8HiddenPropertyName.h:
1295         (WebCore):
1296
1297 2012-12-05  Greg Billock  <gbillock@google.com>
1298
1299         Add runtime enable for web intents.
1300         https://bugs.webkit.org/show_bug.cgi?id=103669
1301
1302         Reviewed by Adam Barth.
1303
1304         Make web intents Javascript API enabled by a runtime setting.
1305
1306         * Modules/intents/DOMWindowIntents.idl:
1307         * Modules/intents/NavigatorIntents.idl:
1308         * bindings/generic/RuntimeEnabledFeatures.cpp:
1309         (WebCore):
1310         * bindings/generic/RuntimeEnabledFeatures.h:
1311         (RuntimeEnabledFeatures):
1312         (WebCore::RuntimeEnabledFeatures::webkitStartActivityEnabled):
1313         (WebCore::RuntimeEnabledFeatures::webkitIntentEnabled):
1314         (WebCore::RuntimeEnabledFeatures::webKitIntentEnabled):
1315         (WebCore::RuntimeEnabledFeatures::setWebIntentsEnabled):
1316
1317 2012-12-05  Scott Violet  <sky@chromium.org>
1318
1319         [chromium] Remove linux theme related files and switch to default
1320         https://bugs.webkit.org/show_bug.cgi?id=103897
1321
1322         Reviewed by Tony Chang.
1323
1324         Linux related theme files are now named Default.
1325
1326         No new tests, code cleanup.
1327
1328         * WebCore.gyp/WebCore.gyp: Update files
1329         * WebCore.gypi: Update files
1330         * platform/chromium/PlatformThemeChromiumLinux.cpp: Removed.
1331         * platform/chromium/PlatformThemeChromiumLinux.h: Removed.
1332         * platform/chromium/ScrollbarThemeChromiumLinux.cpp: Removed.
1333         * platform/chromium/ScrollbarThemeChromiumLinux.h: Removed.
1334         * rendering/RenderThemeChromiumAndroid.cpp:
1335         (WebCore::RenderThemeChromiumAndroid::extraDefaultStyleSheet): Linux->Default
1336         * rendering/RenderThemeChromiumAndroid.h: Change superclass
1337         * rendering/RenderThemeChromiumLinux.cpp: Removed.
1338         * rendering/RenderThemeChromiumLinux.h: Removed.
1339
1340 2012-12-05  Joshua Bell  <jsbell@chromium.org>
1341
1342         IndexedDB: Allow multiple transactions to interleave request execution
1343         https://bugs.webkit.org/show_bug.cgi?id=97570
1344
1345         Reviewed by Tony Chang.
1346
1347         Implement spec logic for allowing read-only transactions, and read-write transactions
1348         with non-overlapping scopes, to run concurrently. Transactions all still run in the
1349         same thread with tasks triggered via timers, so tasks and the underlying database
1350         operations are interleaved rather than truly parallelized.
1351
1352         Within IDBTransactionCoordinator, rename started->queued, running->started to match
1353         spec terminology and clear up confusion.
1354
1355         Test: storage/indexeddb/transaction-coordination-across-databases.html
1356               storage/indexeddb/transaction-coordination-within-database.html
1357               storage/indexeddb/transaction-readwrite-exclusive.html
1358               storage/indexeddb/transaction-scope-sequencing.html
1359               storage/indexeddb/transaction-starvation.html
1360
1361         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Use IDBTransaction::Mode enum
1362         (WebCore::IDBDatabaseBackendImpl::createTransaction):
1363         * Modules/indexeddb/IDBDatabaseBackendImpl.h: Ditto.
1364         (IDBDatabaseBackendImpl):
1365         * Modules/indexeddb/IDBDatabaseBackendInterface.h: Ditto.
1366         (IDBDatabaseBackendInterface):
1367         * Modules/indexeddb/IDBTransactionBackendImpl.cpp: Convert scope as a HashSet for
1368         fast intersecting.
1369         (WebCore::IDBTransactionBackendImpl::create):
1370         (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl):
1371         * Modules/indexeddb/IDBTransactionBackendImpl.h:
1372         (IDBTransactionBackendImpl):
1373         (WebCore::IDBTransactionBackendImpl::mode):
1374         (WebCore::IDBTransactionBackendImpl::scope):
1375         * Modules/indexeddb/IDBTransactionCoordinator.cpp: Spec logic goes here.
1376         (WebCore::IDBTransactionCoordinator::processStartedTransactions): Extend this
1377         method to test all plausibly runnable transactions.
1378         (WebCore):
1379         (WebCore::IDBTransactionCoordinator::canRunTransaction): Test to see if one
1380         particular transaction can be run.
1381         (WebCore::IDBTransactionCoordinator::doScopesOverlap): Do a quick intersection
1382         test between transaction scopes.
1383         * Modules/indexeddb/IDBTransactionCoordinator.h:
1384         (IDBTransactionCoordinator):
1385
1386 2012-12-05  No'am Rosenthal  <noam@webkit.org>
1387
1388         Coordinated Graphics: Enable support for setContentsToBackgroundColor
1389         https://bugs.webkit.org/show_bug.cgi?id=104128
1390
1391         Reviewed by Kenneth Rohde Christiansen.
1392
1393         Enable background color in GraphicsLayerTextureMapper, and paint it using TextureMapper::drawSolidColor.
1394         Once https://bugs.webkit.org/show_bug.cgi?id=103786 is enabled, this would enable Qt/GTK/EFL to directly
1395         composite colors that only have a background color, without having to create a backing store for them.
1396         This would eliminate the memory usage for those layers, reduce the time needed for them to draw into the
1397         backing store and upload the texture, and in the future allow direct compositing of things other than
1398         background colors.
1399
1400         Compositing tests cover this, but are still skipped for ports using coordinated graphics. 
1401         See https://bugs.webkit.org/show_bug.cgi?id=104129.
1402
1403         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1404         (WebCore::GraphicsLayerTextureMapper::setContentsToBackgroundColor):
1405         (WebCore::GraphicsLayerTextureMapper::backgroundColor):
1406             Maintain a backgroundColor member variable in GraphicsLayerTextureMapper
1407
1408         * platform/graphics/texmap/TextureMapperGL.cpp:
1409         (WebCore::TextureMapperGL::drawSolidColor):
1410             TextureMapperGL::drawSolidColor should allow blending when the solid color has alpha.
1411
1412         * platform/graphics/texmap/TextureMapperLayer.cpp:
1413         (WebCore::TextureMapperLayer::paintSelf):
1414         (WebCore::TextureMapperLayer::flushCompositingStateSelf):
1415         * platform/graphics/texmap/TextureMapperLayer.h:
1416         (State):
1417
1418 2012-12-05  Kentaro Hara  <haraken@chromium.org>
1419
1420         Unreviewed, rolling out r136481.
1421         http://trac.webkit.org/changeset/136481
1422         https://bugs.webkit.org/show_bug.cgi?id=103868
1423
1424         it might have regressed dom_perf/CloneNodes (See bug 104177)
1425
1426         * dom/ContainerNodeAlgorithms.h:
1427         (ChildNodeInsertionNotifier):
1428         (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument):
1429         (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree):
1430         (WebCore::ChildNodeInsertionNotifier::notify):
1431
1432 2012-12-05  David Grogan  <dgrogan@chromium.org>
1433
1434         IndexedDB: Abort transactions because of leveldb errors part 3
1435         https://bugs.webkit.org/show_bug.cgi?id=103960
1436
1437         Reviewed by Tony Chang.
1438
1439         Transactions are aborted when there are leveldb problems creating
1440         indexes on an object store with existing data or when adding data to an
1441         objectstore that has indexes.
1442
1443         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
1444         (WebCore):
1445         (WebCore::makeIndexWriters):
1446         (WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
1447         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::perform):
1448
1449 2012-12-05  Simon Fraser  <simon.fraser@apple.com>
1450
1451         Fix some repaint/paintCounter confusion, and reset it when getting layers out of the layer pool
1452         https://bugs.webkit.org/show_bug.cgi?id=104180
1453
1454         Reviewed by Tim Horton.
1455
1456         Layers retrieved from the LayerPool by TileCache need to have their
1457         repaint counters reset, otherwise the scroll performance logging gets
1458         confused.
1459         
1460         Also, the counter counts paints, not repaints (invalidations), so
1461         rename it accordingly.
1462
1463         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
1464         (WebCore::ScrollingTreeScrollingNodeMac::logExposedUnfilledArea): Whitespace fix.
1465         * platform/graphics/GraphicsLayer.h:
1466         * platform/graphics/ca/mac/TileCache.mm:
1467         (WebCore::TileCache::blankPixelCountForTiles):
1468         (WebCore::TileCache::createTileLayer):
1469         (WebCore::TileCache::drawRepaintCounter):
1470         * platform/graphics/ca/mac/WebTileLayer.h:
1471         * platform/graphics/ca/mac/WebTileLayer.mm:
1472         (-[WebTileLayer resetPaintCount]):
1473         (-[WebTileLayer incrementPaintCount]):
1474         (-[WebTileLayer paintCount]):
1475         (-[WebTileLayer logFilledFreshTile]):
1476
1477 2012-12-05  Oliver Hunt  <oliver@apple.com>
1478
1479         Empty parse cache when receiving a low memory warning
1480         https://bugs.webkit.org/show_bug.cgi?id=104161
1481
1482         Reviewed by Filip Pizlo.
1483
1484         Use new discardAllCode() function on the global data, rather than
1485         directly interacting with the heap.
1486
1487         * bindings/js/GCController.cpp:
1488         (WebCore::GCController::discardAllCompiledCode):
1489
1490 2012-12-05  Dan Bernstein  <mitz@apple.com>
1491
1492         Text decorations are rotated when text-combine takes effect
1493         https://bugs.webkit.org/show_bug.cgi?id=104172
1494
1495         Reviewed by Dave Hyatt.
1496
1497         Test: fast/text/decorations-with-text-combine.html
1498
1499         * rendering/InlineTextBox.cpp:
1500         (WebCore::InlineTextBox::paint): Applied a rotation to the graphics context when painting
1501         the text decorations for combined text.
1502
1503 2012-12-05  Justin Novosad  <junov@google.com>
1504
1505         [skia] Improve performance of GraphicsContext::createCompatibleBuffer by using SkDevice:createCompatibleDevice
1506         https://bugs.webkit.org/show_bug.cgi?id=103896
1507
1508         Reviewed by Stephen White.
1509
1510         Refactored GraphicsContext::createCompatibleBuffer (platform common
1511         code) to use platform-specific implementations provided by ImageBuffer.
1512         There is no change in behavior for non-skia ports. The skia
1513         implementation uses skia'a own createCompatibleDevice implementation,
1514         which offers several performance benefits:
1515         1. For accelerated contexts, the backing store may be allocated from
1516         the scratch texture pool, which minimizes texture allocation and
1517         deallocation overhead.
1518         2. The backing store will not be initially cleared if it is known
1519         in advance that fully opaque contents will be drawn into the buffer.
1520         3. For non-accelerated contexts, if the backing store is flagged as
1521         opaque, faster blitter loop implementations will be used for drawing
1522         the buffer contents into other buffers. (e.g. generated opaque gradient
1523         fills)
1524
1525         No new tests: covered by existing layout tests 
1526
1527         * platform/graphics/Generator.h:
1528         (Generator):
1529         Added hasAlpha method so that it can be used by GeneratorGeneratedImage
1530         * platform/graphics/GeneratorGeneratedImage.cpp:
1531         (WebCore::GeneratorGeneratedImage::drawPattern):
1532         Passing m_generator->hasAlpha() to createCompatibleBuffer in order to
1533         take advantage of optimizations that apply to opaque buffers.
1534         * platform/graphics/Gradient.h:
1535         (Gradient):
1536         Made hasAlpha virtual so that it now overrides Generator::hasAlpha
1537         * platform/graphics/GraphicsContext.cpp:
1538         (WebCore::GraphicsContext::createCompatibleBuffer):
1539         Refactored to use platform-specific implementation
1540         * platform/graphics/GraphicsContext.h:
1541         * platform/graphics/ImageBuffer.cpp:
1542         (WebCore::createCompatibleBuffer):
1543         Non-skia implementation. Mimics old
1544         GraphicsContext::createCompatibleBuffer
1545         * platform/graphics/ImageBuffer.h:
1546         (ImageBuffer):
1547         New skia-specific constructor
1548         * platform/graphics/skia/ImageBufferSkia.cpp:
1549         (WebCore::ImageBuffer::createCompatibleBuffer):
1550         (WebCore::ImageBuffer::ImageBuffer):
1551         * platform/graphics/skia/PlatformContextSkia.cpp:
1552         (WebCore::PlatformContextSkia::createCompatibleDevice):
1553         (WebCore):
1554         * platform/graphics/skia/PlatformContextSkia.h:
1555         (PlatformContextSkia):
1556
1557 2012-12-05  Alexis Menard  <alexis@webkit.org>
1558
1559         REGRESSION (r136683): css3/calc/background-position-parsing.html failing on EFL Linux 64-bit Debug WK2
1560         https://bugs.webkit.org/show_bug.cgi?id=104131
1561
1562         Reviewed by Antti Koivisto.
1563
1564         css3/calc/background-position-parsing.html assert in debug because we
1565         call CSSParser::validUnit multiple times in a row. The problem was with
1566         validUnit which check calc() values and save the result inside
1567         m_parsedCalculation for later usage. validUnit expects you to
1568         use m_parsedCalculation therefore calling validUnit again with
1569         m_parsedCalculation being set asserts. As parseFillBackgroundPosition
1570         just want to check wether the current value is maybe valid for
1571         background-position we can just relax the check to allow either the
1572         valid keywords or any other units (we will anyway filter the incorrect
1573         values later in the parsing). The most important check at this point
1574         for the shorthand is the validity of the keyword.
1575
1576         No new tests : the assert was covered by css3/calc/background-position-parsing.html.
1577
1578         * css/CSSParser.cpp:
1579         (WebCore::CSSParser::isPotentialPositionValue):
1580         (WebCore::CSSParser::parseFillBackgroundPosition):
1581         * css/CSSParser.h:
1582
1583 2012-12-05  Stephen White  <senorblanco@chromium.org>
1584
1585         Unreviewed, rolling out r136735.
1586         http://trac.webkit.org/changeset/136735
1587         https://bugs.webkit.org/show_bug.cgi?id=102699
1588
1589         Broke Chrome/Win build.
1590
1591         * platform/chromium/PlatformSupport.h:
1592         (PlatformSupport):
1593         * platform/chromium/ScrollbarThemeChromiumWin.cpp:
1594         (WebCore::ScrollbarThemeChromiumWin::paintTrackPiece):
1595         (WebCore::ScrollbarThemeChromiumWin::paintButton):
1596         (WebCore::ScrollbarThemeChromiumWin::paintThumb):
1597         * rendering/RenderThemeChromiumWin.cpp:
1598         (WebCore):
1599         (WebCore::RenderThemeChromiumWin::paintButton):
1600         (WebCore::RenderThemeChromiumWin::paintSliderTrack):
1601         (WebCore::RenderThemeChromiumWin::paintSliderThumb):
1602         (WebCore::RenderThemeChromiumWin::paintMenuList):
1603         (WebCore::RenderThemeChromiumWin::paintTextFieldInternal):
1604         (WebCore::RenderThemeChromiumWin::paintInnerSpinButton):
1605         (WebCore::RenderThemeChromiumWin::paintProgressBar):
1606
1607 2012-12-05  Jun Jiang  <jun.a.jiang@intel.com>
1608
1609         WebGL: use pointer to the source data for Image directly in texImage2D and texSubImage2D to avoid memory copy if no conversion is needed
1610         https://bugs.webkit.org/show_bug.cgi?id=103885
1611
1612         Reviewed by Kenneth Russell.
1613
1614         In texImage2D() and texSubImage2D(), there is a redundant memory copy from Image data to the intermediate vector when no conversion is needed. If the Image resource can be locked properly, it is better to use the pointer to the image source directly and hence avoid the memory copy and improve the performance. 
1615
1616         Already covered by current tests.
1617
1618         * html/canvas/WebGLRenderingContext.cpp:
1619         (WebCore):
1620         (WebCore::WebGLRenderingContext::texImage2DBase):
1621         (WebCore::WebGLRenderingContext::texImage2DImpl):
1622         (WebCore::WebGLRenderingContext::texSubImage2DBase):
1623         (WebCore::WebGLRenderingContext::texSubImage2DImpl):
1624         * html/canvas/WebGLRenderingContext.h:
1625         (WebGLRenderingContext):
1626         * platform/graphics/GraphicsContext3D.h:
1627         (ImageExtractor):
1628
1629 2012-12-05  Elliott Sprehn  <esprehn@chromium.org>
1630
1631         Add infrastructure for :before and :after in DOM
1632         https://bugs.webkit.org/show_bug.cgi?id=103705
1633
1634         Reviewed by Eric Seidel.
1635
1636         Add all infrastructure for reimplementing generated content :before and
1637         :after as DOM Elements. Now ElementRareData has two pointers to PseudoElements
1638         for the generated content and Node has methods for traversing the tree
1639         including generated content.
1640
1641         This will allow the generated content to be treated as real nodes instead
1642         of anonymous and take part in the usual recalcStyle and attach flow which
1643         fixes many bugs and vastly simplifies the ifecycle of generated content.
1644
1645         Instead of attempting to land both the infrastructure and enable it at
1646         the same time which has proven problematic due to how drastic this change
1647         is, this patch contains only the support code so a much smaller future
1648         patch can be used to switch it on.
1649
1650         No new behavior, this is just the infrastructure.
1651
1652         * CMakeLists.txt:
1653         * GNUmakefile.list.am:
1654         * Target.pri:
1655         * WebCore.gypi:
1656         * WebCore.vcproj/WebCore.vcproj:
1657         * WebCore.xcodeproj/project.pbxproj:
1658         * dom/DOMAllInOne.cpp:
1659         * dom/Element.cpp:
1660         (WebCore::Element::~Element):
1661         (WebCore::Element::detach):
1662         (WebCore::Element::updatePseudoElement):
1663         (WebCore::Element::createPseudoElementIfNeeded):
1664         (WebCore::Element::beforePseudoElement):
1665         (WebCore::Element::afterPseudoElement):
1666         * dom/Element.h:
1667         (Element):
1668         * dom/ElementRareData.h:
1669         (ElementRareData):
1670         (WebCore::ElementRareData::ElementRareData):
1671         (WebCore::ElementRareData::~ElementRareData):
1672         (WebCore::ElementRareData::setPseudoElement):
1673         (WebCore::ElementRareData::pseudoElement):
1674         (WebCore::ElementRareData::releasePseudoElement):
1675         * dom/Node.cpp:
1676         (WebCore::Node::pseudoAwarePreviousSibling):
1677         (WebCore::Node::pseudoAwareNextSibling):
1678         (WebCore::Node::rendererIsEditable):
1679         (WebCore::checkAcceptChild):
1680         * dom/Node.h:
1681         (Node):
1682         (WebCore::Node::isPseudoElement):
1683         (WebCore::Node::isBeforePseudoElement):
1684         (WebCore::Node::isAfterPseudoElement):
1685         (WebCore::Node::pseudoId):
1686         (WebCore::Node::customPseudoId):
1687         * dom/NodeRenderingContext.cpp:
1688         (WebCore::NodeRenderingContext::nextRenderer):
1689         (WebCore::NodeRenderingContext::previousRenderer):
1690         * dom/Position.cpp:
1691         (WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight):
1692         * dom/PseudoElement.cpp: Added.
1693         (WebCore::pseudoElementTagName):
1694         (WebCore::PseudoElement::PseudoElement):
1695         (WebCore::PseudoElement::customStyleForRenderer):
1696         (WebCore::PseudoElement::attach):
1697         (WebCore::PseudoElement::rendererIsNeeded):
1698         (WebCore::PseudoElement::updateChildStyle):
1699         (WebCore::PseudoElement::didRecalcStyle):
1700         * dom/PseudoElement.h: Added.
1701         (PseudoElement):
1702         (WebCore::PseudoElement::create):
1703         (WebCore::pseudoElementIsNeeded):
1704         * editing/visible_units.cpp:
1705         (WebCore::logicallyPreviousBox):
1706         (WebCore::logicallyNextBox):
1707         (WebCore::startPositionForLine):
1708         (WebCore::endPositionForLine):
1709         * page/animation/AnimationController.cpp:
1710         (WebCore::AnimationController::updateAnimations):
1711         * rendering/HitTestResult.cpp:
1712         (WebCore::HitTestResult::setInnerNode):
1713         (WebCore::HitTestResult::setInnerNonSharedNode):
1714         * rendering/RenderBlock.cpp:
1715         (WebCore::RenderBlock::isSelectionRoot):
1716         (WebCore::RenderBlock::renderName):
1717         * rendering/RenderCounter.cpp:
1718         (WebCore::RenderCounter::originalText):
1719         * rendering/RenderDeprecatedFlexibleBox.cpp:
1720         (WebCore::RenderDeprecatedFlexibleBox::renderName):
1721         * rendering/RenderInline.cpp:
1722         (WebCore::RenderInline::renderName):
1723         * rendering/RenderMultiColumnBlock.cpp:
1724         (WebCore::RenderMultiColumnBlock::renderName):
1725         * rendering/RenderObject.cpp:
1726         (WebCore::RenderObject::createObject):
1727         (WebCore::RenderObject::setPseudoStyle):
1728         (WebCore::RenderObject::createVisiblePosition):
1729         * rendering/RenderObject.h:
1730         (WebCore::RenderObject::isPseudoElement):
1731         (RenderObject):
1732         (WebCore::RenderObject::generatingNode):
1733         * rendering/RenderTableCell.h:
1734         (WebCore::RenderTableCell::renderName):
1735         * rendering/RenderTableRow.h:
1736         (WebCore::RenderTableRow::renderName):
1737         * rendering/RenderTableSection.h:
1738         (WebCore::RenderTableSection::renderName):
1739         * rendering/RenderTreeAsText.cpp:
1740         (WebCore::RenderTreeAsText::writeRenderObject):
1741         * rendering/style/ContentData.cpp:
1742         (WebCore::ImageContentData::createRenderer):
1743         (WebCore::TextContentData::createRenderer):
1744         (WebCore::CounterContentData::createRenderer):
1745         (WebCore::QuoteContentData::createRenderer):
1746
1747 2012-12-05  Justin Novosad  <junov@google.com>
1748
1749         Use of uninitialized variable in WebCore::RenderBox::paintFillLayers
1750         https://bugs.webkit.org/show_bug.cgi?id=104154
1751
1752         Reviewed by Stephen White.
1753
1754         Method FillLayer::clipOccludesNextLayers performs an internal
1755         initialization when called on the first layer of a list of layers.
1756         Without this initialization, calls to clipOccludesNextLayers on
1757         subsequent layers will use uninitialized data.  In some cases, the
1758         call to clipOccludesNextLayers was being short-circuited in
1759         RenderBox::paintFillLayers. 
1760         Fix: Predicate was permuted to ensure that clipOccludesNextLayers
1761         is never short-circuited.
1762         
1763         Test: fast/backgrounds/size/contain-and-cover-zoomed.html
1764         Running with valgrind reveals the error.
1765
1766         * rendering/RenderBox.cpp:
1767         (WebCore::RenderBox::paintFillLayers):
1768
1769 2012-12-05  Elliott Sprehn  <esprehn@gmail.com>
1770
1771         Encapsulate ElementRareData for possible future sharing
1772         https://bugs.webkit.org/show_bug.cgi?id=103948
1773
1774         Reviewed by Eric Seidel.
1775
1776         Encapsulate ElementRareData and make all access go through getters and
1777         setters. This is already true for NodeRareData, but ElementRareData
1778         had many places where people directly access it.
1779
1780         This the first step in possible future sharing of ElementRareData
1781         instances across nodes. All nodes in a shadow tree have rare data to
1782         store the TreeScope, but in most cases all they have is the TreeScope!
1783         Instead of making every node in a shadow subtree have rare data
1784         and use lots of memory we could just share a single instance of rare data
1785         and only allocate a unique one on modification. Encapsulation lets us
1786         assert about mutations on shared instances.
1787
1788         * dom/Element.cpp:
1789         (WebCore::Element::~Element):
1790         (WebCore::Element::attributes):
1791         (WebCore::Element::shadow):
1792         (WebCore::Element::ensureShadow):
1793         (WebCore::Element::minimumSizeForResizing):
1794         (WebCore::Element::setMinimumSizeForResizing):
1795         (WebCore::Element::computedStyle):
1796         (WebCore::Element::classList):
1797         (WebCore::Element::optionalClassList):
1798         (WebCore::Element::dataset):
1799         (WebCore::Element::hasNamedNodeMap):
1800         (WebCore::Element::savedLayerScrollOffset):
1801         (WebCore::Element::setSavedLayerScrollOffset):
1802         * dom/ElementRareData.cpp:
1803         (WebCore::ElementRareData::reportMemoryUsage):
1804         * dom/ElementRareData.h:
1805         (WebCore::ElementRareData::needsFocusAppearanceUpdateSoonAfterAttach):
1806         (WebCore::ElementRareData::setNeedsFocusAppearanceUpdateSoonAfterAttach):
1807         (ElementRareData):
1808         (WebCore::ElementRareData::styleAffectedByEmpty):
1809         (WebCore::ElementRareData::setStyleAffectedByEmpty):
1810         (WebCore::ElementRareData::isInCanvasSubtree):
1811         (WebCore::ElementRareData::setIsInCanvasSubtree):
1812         (WebCore::ElementRareData::containsFullScreenElement):
1813         (WebCore::ElementRareData::setContainsFullScreenElement):
1814         (WebCore::ElementRareData::isInTopLayer):
1815         (WebCore::ElementRareData::setIsInTopLayer):
1816         (WebCore::ElementRareData::childrenAffectedByHover):
1817         (WebCore::ElementRareData::setChildrenAffectedByHover):
1818         (WebCore::ElementRareData::childrenAffectedByActive):
1819         (WebCore::ElementRareData::setChildrenAffectedByActive):
1820         (WebCore::ElementRareData::childrenAffectedByDrag):
1821         (WebCore::ElementRareData::setChildrenAffectedByDrag):
1822         (WebCore::ElementRareData::childrenAffectedByFirstChildRules):
1823         (WebCore::ElementRareData::setChildrenAffectedByFirstChildRules):
1824         (WebCore::ElementRareData::childrenAffectedByLastChildRules):
1825         (WebCore::ElementRareData::setChildrenAffectedByLastChildRules):
1826         (WebCore::ElementRareData::childrenAffectedByDirectAdjacentRules):
1827         (WebCore::ElementRareData::setChildrenAffectedByDirectAdjacentRules):
1828         (WebCore::ElementRareData::childrenAffectedByForwardPositionalRules):
1829         (WebCore::ElementRareData::setChildrenAffectedByForwardPositionalRules):
1830         (WebCore::ElementRareData::childrenAffectedByBackwardPositionalRules):
1831         (WebCore::ElementRareData::setChildrenAffectedByBackwardPositionalRules):
1832         (WebCore::ElementRareData::childIndex):
1833         (WebCore::ElementRareData::setChildIndex):
1834         (WebCore::ElementRareData::shadow):
1835         (WebCore::ElementRareData::setShadow):
1836         (WebCore::ElementRareData::attributeMap):
1837         (WebCore::ElementRareData::setAttributeMap):
1838         (WebCore::ElementRareData::computedStyle):
1839         (WebCore::ElementRareData::setComputedStyle):
1840         (WebCore::ElementRareData::classList):
1841         (WebCore::ElementRareData::setClassList):
1842         (WebCore::ElementRareData::dataset):
1843         (WebCore::ElementRareData::setDataset):
1844         (WebCore::ElementRareData::minimumSizeForResizing):
1845         (WebCore::ElementRareData::setMinimumSizeForResizing):
1846         (WebCore::ElementRareData::savedLayerScrollOffset):
1847         (WebCore::ElementRareData::setSavedLayerScrollOffset):
1848         (WebCore::ElementRareData::resetComputedStyle):
1849         * dom/NodeRareData.h:
1850         (NodeRareData):
1851
1852 2012-12-05  Mark Pilgrim  <pilgrim@chromium.org>
1853
1854         [Chromium][Win] Remove theme-related functions from PlatformSupport
1855         https://bugs.webkit.org/show_bug.cgi?id=102699
1856
1857         Reviewed by Adam Barth.
1858
1859         Call theme engine directly instead of going through
1860         PlatformSupport. Part of a refactoring series. See tracking bug 82948.
1861
1862         * platform/chromium/PlatformSupport.h:
1863         (PlatformSupport):
1864         * platform/chromium/ScrollbarThemeChromiumWin.cpp:
1865         (WebCore::ScrollbarThemeChromiumWin::paintTrackPiece):
1866         (WebCore::ScrollbarThemeChromiumWin::paintButton):
1867         * rendering/RenderThemeChromiumWin.cpp:
1868         (WebCore):
1869         (WebCore::RenderThemeChromiumWin::paintButton):
1870         (WebCore::RenderThemeChromiumWin::paintSliderTrack):
1871         (WebCore::RenderThemeChromiumWin::paintSliderThumb):
1872         (WebCore::RenderThemeChromiumWin::paintMenuList):
1873         (WebCore::RenderThemeChromiumWin::paintTextFieldInternal):
1874         (WebCore::RenderThemeChromiumWin::paintInnerSpinButton):
1875         (WebCore::RenderThemeChromiumWin::paintProgressBar):
1876
1877 2012-12-05  Stephen White  <senorblanco@chromium.org>
1878
1879         Unreviewed, rolling out r136609.
1880         http://trac.webkit.org/changeset/136609
1881         https://bugs.webkit.org/show_bug.cgi?id=103793
1882
1883         Breaking Chrome/Mac Debug builds.
1884
1885         * html/canvas/WebGLRenderingContext.cpp:
1886         (WebCore):
1887         (WebCore::WebGLRenderingContext::create):
1888         * platform/chromium/support/GraphicsContext3DChromium.cpp:
1889         (WebCore::GraphicsContext3D::create):
1890         * platform/graphics/GraphicsContext3D.h:
1891         (Attributes):
1892
1893 2012-12-05  Bear Travis  <betravis@adobe.com>
1894
1895         [CSS Exclusions] Enable shape-inside for multiple-segment polygons
1896         https://bugs.webkit.org/show_bug.cgi?id=91878
1897
1898         Reviewed by David Hyatt.
1899
1900         Patch adding support for multiple-segment polygons for shape-insides from
1901         the CSS Exclusions specification. The layout code has been modified to first
1902         support dividing text into multiple segments per line, and then to lay out
1903         multiple segments per line box.
1904
1905         Tests:  fast/exclusions/shape-inside/shape-inside-multiple-segments-001.html
1906                 fast/exclusions/shape-inside/shape-inside-multiple-segments-002.html
1907                 fast/exclusions/shape-inside/shape-inside-multiple-segments-003.html
1908                 fast/exclusions/shape-inside/shape-inside-multiple-segments-004.html
1909
1910         * platform/text/BidiResolver.h:
1911         (WebCore::BidiCharacterRun::BidiCharacterRun):
1912         (BidiCharacterRun): Added a 'startsSegment' bitfield to track whether a
1913         run begins a new segment. The field is here, rather than in BidiRun, in
1914         order to save space. See Bug 100173.
1915         * rendering/BidiRun.h:
1916         (WebCore::BidiRun::BidiRun):
1917         (BidiRun): Set the initial value for 'startsSegment'.
1918         * rendering/ExclusionShapeInsideInfo.cpp:
1919         (WebCore::ExclusionShapeInsideInfo::computeSegmentsForLine): Clear the
1920         segment ranges when computing segments for a new line.
1921         * rendering/ExclusionShapeInsideInfo.h:
1922         (LineSegmentRange): Added a new type to track segment offsets.
1923         (WebCore::ExclusionShapeInsideInfo::segmentRanges): Added a getter for
1924         the line segment ranges vector.
1925         * rendering/InlineFlowBox.cpp:
1926         (WebCore::InlineFlowBox::placeBoxesInInlineDirection): Modified to call
1927         a refactored box placement algorithm that takes a beginning and end position.
1928         (WebCore::InlineFlowBox::placeBoxRangeInInlineDirection): Similar to the
1929         placeBoxes method, but takes an end position that may occur before the end
1930         of the line.
1931         * rendering/RenderBlock.cpp:
1932         (WebCore::RenderBlock::exclusionShapeInsideInfo): Factored out calls
1933         to ExclusionShapeInsideInfo to the .cpp file, as ExclusionShapeInsideInfo
1934         requires InlineIterator.h, which would create a circular dependency in
1935         ExclusionShapeInsideInfo.h.
1936         * rendering/RenderBlock.h:
1937         (WebCore::RenderBlock::exclusionShapeInsideInfo): Modified to call
1938         exclusionShapeInsideInfo to be non-inline.
1939         * rendering/RenderBlockLineLayout.cpp:
1940         (WebCore::LineWidth::LineWidth): LineWidth now uses the number of computed
1941         segmentRanges to determine which LineSegment to use when calculating width.
1942         (WebCore::RenderBlock::createLineBoxes): Now takes a boolean to determine
1943         whether or not it can share the same parentBox as its siblings (segments
1944         must be able to position themselves separately in the RootInlineBox).
1945         (WebCore::RenderBlock::constructLine):
1946         (WebCore::computeExpansionForJustifiedText): Do include runs that start new
1947         segments when calculating justification for the current segment.
1948         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Modified to
1949         use the computeInlineDirectionPositionsForSegment, which can position
1950         multiple segments of text per line.
1951         (WebCore::RenderBlock::computeInlineDirectionPositionsForSegment): Positions
1952         the given segment of text and calculates its layout offsets.
1953         (WebCore::constructBidiRuns): Modified some variables from 'endOfLine' to 'endOfSegment'.
1954         (WebCore::constructBidiRunsForLine): Construct the bidi runs for each segment in
1955         the given line.
1956         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Call constructBidiRunsForLine.
1957         (WebCore::RenderBlock::LineBreaker::nextLineBreak): Moved the line breaking code
1958         to break segments, with nextLineBreak iterating over segment breaks for the entire line.
1959         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak): Calculates how much text a
1960         segment can hold. This code was originally in nextLineBreak.
1961
1962 2012-12-05  Stephen White  <senorblanco@chromium.org>
1963
1964         Unreviewed, rolling out r136630.
1965         http://trac.webkit.org/changeset/136630
1966         https://bugs.webkit.org/show_bug.cgi?id=103555
1967
1968         It's breaking Chrome/Win Debug builds.
1969
1970         * platform/graphics/chromium/LazyDecodingPixelRef.cpp:
1971         (WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef):
1972         * platform/graphics/chromium/LazyDecodingPixelRef.h:
1973         (LazyDecodingPixelRef):
1974
1975 2012-12-05  Andreas Kling  <akling@apple.com>
1976
1977         REGRESSION(r136615): Incorrect style sharing in view-source documents.
1978         <http://webkit.org/b/104089>
1979
1980         Reviewed by Antti Koivisto.
1981
1982         Make sure we collect feature data about the default view-source style sheet before evaluating
1983         style sharing candidates, otherwise it won't know which class selectors to care about.
1984
1985         * css/StyleResolver.cpp:
1986         (WebCore::StyleResolver::collectFeatures):
1987
1988 2012-12-05  Mike West  <mkwst@chromium.org>
1989
1990         Stop generating call stacks inside ContentSecurityPolicy
1991         https://bugs.webkit.org/show_bug.cgi?id=104126
1992
1993         Reviewed by Yury Semikhatsky.
1994
1995         Now that bug 100650 has made it possible for ConsoleMessage to generate
1996         call stacks, we can remove the stack being generated in
1997         ContentSecurityPolicy::logToConsole. We need the ScriptState*, however,
1998         so this patch makes it possible to pipe it through addConsoleMessage
1999         down into the guts of the inspector.
2000
2001         This patch also removes an unused addConsoleMessage variant from
2002         ScriptExecutionContext, which should have been removed from the patch to
2003         100650 before landing it. My bad.
2004
2005         * dom/Document.cpp:
2006         (WebCore::Document::addMessage):
2007         * dom/Document.h:
2008         (Document):
2009             Accept a ScriptState* parameter in Document::addMessage, and pass it
2010             through to Console::addMessage.
2011         * dom/ScriptExecutionContext.cpp:
2012         (WebCore::ScriptExecutionContext::addConsoleMessage):
2013         * dom/ScriptExecutionContext.h:
2014         (ScriptExecutionContext):
2015             Accept a ScriptState* parameter in Document::addMessage, and pass it
2016             through to ScriptExecutionContext::addMessage. Also, remove an unused
2017             variant of ScriptExecutionContext::addConsoleMessage that accepted
2018             only a call stack in addition to the basics.
2019         * inspector/ConsoleMessage.cpp:
2020         (WebCore::ConsoleMessage::ConsoleMessage):
2021         * inspector/ConsoleMessage.h:
2022         (ConsoleMessage):
2023             Accept a ScriptState* and pass it into autogenerateMetadata for
2024             call stack generational goodness.
2025         * inspector/InspectorConsoleAgent.cpp:
2026         (WebCore::InspectorConsoleAgent::addMessageToConsole):
2027             Accept a ScriptState* and pass it into addConsoleMessage.
2028         (WebCore::InspectorConsoleAgent::didFinishXHRLoading):
2029         (WebCore::InspectorConsoleAgent::didReceiveResponse):
2030         (WebCore::InspectorConsoleAgent::didFailLoading):
2031             Add an empty ScriptState parameter to the addConsoleMessage call.
2032         * inspector/InspectorConsoleAgent.h:
2033         (InspectorConsoleAgent):
2034         * inspector/InspectorConsoleInstrumentation.h:
2035         (WebCore::InspectorInstrumentation::addMessageToConsole):
2036         * inspector/InspectorInstrumentation.cpp:
2037         (WebCore):
2038         (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
2039         * inspector/InspectorInstrumentation.h:
2040         (InspectorInstrumentation):
2041         * page/Console.cpp:
2042         (WebCore::Console::addMessage):
2043         * page/Console.h:
2044         (Console):
2045             Pipe ScriptState through the intermediate classes.
2046         * page/ContentSecurityPolicy.cpp:
2047         (WebCore::ContentSecurityPolicy::logToConsole):
2048             Drop call stack generation, and pass ScriptState* into addConsoleMessage.
2049         * workers/WorkerContext.cpp:
2050         (WebCore::WorkerContext::addConsoleMessage):
2051         (WebCore::WorkerContext::addMessage):
2052         (WebCore::WorkerContext::addMessageToWorkerConsole):
2053         * workers/WorkerContext.h:
2054         (WorkerContext):
2055             Accept ScriptState* and pass it into addMessageToConsole.
2056
2057 2012-12-05  Rafael Weinstein  <rafaelw@chromium.org>
2058
2059         DOMImplementation.createDocument should call appendChild rather than parserAppendChild to add docType and documentElement
2060         https://bugs.webkit.org/show_bug.cgi?id=104040
2061
2062         Reviewed by Ojan Vafai.
2063
2064         createDocument now calls appendChild.
2065
2066         No new tests (no observable changes).
2067
2068         * dom/ContainerNode.cpp:
2069         (WebCore::ContainerNode::parserAppendChild):
2070         * dom/DOMImplementation.cpp:
2071         (WebCore::DOMImplementation::createDocument):
2072
2073 2012-12-05  Alec Flett  <alecflett@chromium.org>
2074
2075         IndexedDB: Stub out transaction-backend methods
2076         https://bugs.webkit.org/show_bug.cgi?id=103921
2077
2078         Reviewed by Dimitri Glazkov.
2079
2080         In preparation for a refactoring. Legacy methods 
2081         will be removed in https://bugs.webkit.org/show_bug.cgi?id=103923.
2082
2083         No new tests, just adding unused methods for refactoring.
2084
2085         * Modules/indexeddb/IDBCallbacks.h:
2086         (WebCore::IDBCallbacks::onUpgradeNeeded):
2087         * Modules/indexeddb/IDBDatabase.cpp:
2088         (WebCore::IDBDatabase::onAbort):
2089         (WebCore):
2090         (WebCore::IDBDatabase::onComplete):
2091         * Modules/indexeddb/IDBDatabase.h:
2092         (IDBDatabase):
2093         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
2094         (WebCore::IDBDatabaseBackendImpl::createTransaction):
2095         (WebCore):
2096         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
2097         (IDBDatabaseBackendImpl):
2098         (WebCore::IDBDatabaseBackendImpl::commit):
2099         (WebCore::IDBDatabaseBackendImpl::abort):
2100         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
2101         (IDBDatabaseBackendInterface):
2102         * Modules/indexeddb/IDBDatabaseCallbacks.h:
2103         (IDBDatabaseCallbacks):
2104         * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp:
2105         (WebCore::IDBDatabaseCallbacksImpl::onAbort):
2106         (WebCore):
2107         (WebCore::IDBDatabaseCallbacksImpl::onComplete):
2108         * Modules/indexeddb/IDBDatabaseCallbacksImpl.h:
2109         (IDBDatabaseCallbacksImpl):
2110         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
2111         (WebCore::IDBFactoryBackendImpl::open):
2112         * Modules/indexeddb/IDBFactoryBackendImpl.h:
2113         (WebCore::IDBFactoryBackendImpl::open):
2114         (IDBFactoryBackendImpl):
2115         * Modules/indexeddb/IDBFactoryBackendInterface.h:
2116         (IDBFactoryBackendInterface):
2117         * Modules/indexeddb/IDBOpenDBRequest.cpp:
2118         (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
2119         (WebCore):
2120         * Modules/indexeddb/IDBOpenDBRequest.h:
2121         (IDBOpenDBRequest):
2122         * Modules/indexeddb/IDBTransactionBackendInterface.h:
2123         (WebCore):
2124         * Modules/indexeddb/IDBTransactionCoordinator.h:
2125
2126 2012-11-27  Alec Flett  <alecflett@chromium.org>
2127
2128         IndexedDB: remove IDBDatabaseBackendInterface::transaction()
2129         https://bugs.webkit.org/show_bug.cgi?id=102733
2130
2131         Reviewed by Darin Fisher.
2132
2133         Part 3 of a refactor, remove the old transaction() method.
2134
2135         No new tests as this is just post-refactor cleanup.
2136
2137         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
2138         (IDBDatabaseBackendInterface):
2139
2140 2012-12-05  Robert Hogan  <robert@webkit.org>
2141
2142         REGRESSION(r126683): Table cell are getting borders when the style doesn't mention any
2143         https://bugs.webkit.org/show_bug.cgi?id=101677
2144
2145         Reviewed by Julien Chaffraix.
2146
2147         The bordercolor attribute on a cell or row has no effect on FF and Opera, even when the parent
2148         table has a border attribute. IE displays the bordercolor of the cell and row in all cases except when
2149         the parent has no border attribute. WebKit's old behaviour (before r126683) was to display the
2150         bordercolor of the row but not the cells (I don't think this behaviour was particularly deliberate). No
2151         browser displays the bordercolor for a col or tbody element.
2152
2153         Bring WebKit into line with Opera and FF by ignoring the bordercolor attribute on cells, rows, cols, rowgroups, and
2154         colgroups in all cases, regardless of whether the table has a border or not.
2155
2156         Test: fast/table/td-bordercolor-attribute.html
2157
2158         * html/HTMLTablePartElement.cpp:
2159         (WebCore::HTMLTablePartElement::isPresentationAttribute):
2160         (WebCore::HTMLTablePartElement::collectStyleForPresentationAttribute):
2161
2162 2012-12-05  Krzysztof Czech  <k.czech@samsung.com>
2163
2164         [EFL][WK2] Introduce WebKit-EFL to Assistive Technologies
2165         https://bugs.webkit.org/show_bug.cgi?id=104000
2166
2167         Reviewed by Chris Fleizach.
2168
2169         Introduce Webkit-EFL so that Assistive Technologies can distinguish it.
2170
2171         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2172         (webkitAccessibleGetAttributes):
2173
2174 2012-12-05  Carlos Garcia Campos  <cgarcia@igalia.com>
2175
2176         Remove unneeded WTF prefix from WTF types in RenderFlexibleBox
2177         https://bugs.webkit.org/show_bug.cgi?id=104109
2178
2179         Reviewed by Eric Seidel.
2180
2181         WTF prefix is not needed because WTF headers have a using
2182         statement at the end of the file.
2183
2184         * rendering/RenderFlexibleBox.cpp:
2185         (WebCore::RenderFlexibleBox::layoutBlock):
2186         (WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems):
2187         (WebCore::RenderFlexibleBox::layoutFlexItems):
2188         (WebCore::RenderFlexibleBox::freezeViolations):
2189         (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
2190         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
2191         (WebCore::RenderFlexibleBox::alignFlexLines):
2192         (WebCore::RenderFlexibleBox::alignChildren):
2193         (WebCore::RenderFlexibleBox::flipForWrapReverse):
2194         * rendering/RenderFlexibleBox.h:
2195
2196 2012-12-05  Andras Becsi  <andras.becsi@digia.com>
2197
2198         Fix compilation for Qt5.0.0 stable branch.
2199         https://bugs.webkit.org/show_bug.cgi?id=103870
2200
2201         Reviewed by Simon Hausmann.
2202
2203         This is a squashed patch consisting of patches by multiple authors.
2204
2205         Fixed use of to-be-removed compatibility functions in QWindow
2206         Patch by Samuel Rødal <samuel.rodal@digia.com>
2207
2208         Build fix. No new tests needed.
2209
2210         * platform/graphics/gstreamer/PlatformVideoWindowQt.cpp:
2211         (FullScreenVideoWindow::FullScreenVideoWindow):
2212         (PlatformVideoWindow::PlatformVideoWindow):
2213
2214 2012-12-05  John J. Barton  <johnjbarton@chromium.org>
2215
2216         Web Inspector: more robust treeoutline.findTreeElement
2217         https://bugs.webkit.org/show_bug.cgi?id=103911
2218
2219         Reviewed by Vsevolod Vlasov.
2220
2221         Non-recursive algorithm to populate the treeoutline given an DOMNode
2222         as representedObject. Walk up the parents from the desired object
2223         until we find one that is currently represented in the treeoutline 
2224         cache. Then walk down, putting children in the cache until we get 
2225         to the desired object again. 
2226         With Pavel Feldeman <pfeldman@chromium.org>
2227
2228         No new tests, refactoring, no new function
2229
2230        * inspector/front-end/treeoutline.js:
2231         (TreeOutline.prototype.findTreeElement):
2232
2233 2012-12-05  Alexander Shalamov  <alexander.shalamov@intel.com>
2234
2235         [EFL][GTK] List value response headers are not handled in RespourceResponse (libsoup specific)
2236         https://bugs.webkit.org/show_bug.cgi?id=95181
2237
2238         Reviewed by Martin Robinson.
2239
2240         When list-value response headers are received, they are handled as single
2241         value headers. This patch fixes incorrect behavior. New test was added to
2242         verify list-value header handling.
2243
2244         Test: http/tests/xmlhttprequest/xmlhttprequest-test-custom-headers.html
2245
2246         * platform/network/soup/ResourceResponseSoup.cpp:
2247         (WebCore::ResourceResponse::updateFromSoupMessage):
2248
2249 2012-12-05  Pavel Feldman  <pfeldman@chromium.org>
2250
2251         Web Inspector: Don't include error message text in the editor buffer.
2252         https://bugs.webkit.org/show_bug.cgi?id=103932
2253
2254         Reviewed by Alexander Pavlov.
2255
2256         Skip entire decoration content when collecting dirty regions.
2257         
2258         * inspector/front-end/DefaultTextEditor.js:
2259         (WebInspector.TextEditorMainPanel.prototype._collectLinesFromDOM):
2260
2261 2012-12-05  Joshua Bell  <jsbell@chromium.org>
2262
2263         IndexedDB: Replace use of ScriptExecutionContext::Task (Part 2)
2264         https://bugs.webkit.org/show_bug.cgi?id=103931
2265
2266         Reviewed by Tony Chang.
2267
2268         Actually drop use of ScriptExecutionContext::Task and remove incorrect usage of
2269         ThreadSafeRefCounted<>. Define a new IDBTransactionBackendImpl::Operation base class
2270         for operations; storage of per-operation data becomes explicit.
2271
2272         No new tests - just a refactor.
2273
2274         * Modules/indexeddb/IDBCallbacks.h: Remove bogus "ThreadSafe"
2275         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
2276         (WebCore::IDBCursorBackendImpl::CursorIterationOperation::create):
2277         (IDBCursorBackendImpl::CursorIterationOperation):
2278         (WebCore::IDBCursorBackendImpl::CursorIterationOperation::CursorIterationOperation):
2279         (WebCore::IDBCursorBackendImpl::CursorAdvanceOperation::create):
2280         (IDBCursorBackendImpl::CursorAdvanceOperation):
2281         (WebCore::IDBCursorBackendImpl::CursorAdvanceOperation::CursorAdvanceOperation):
2282         (WebCore::IDBCursorBackendImpl::CursorPrefetchIterationOperation::create):
2283         (IDBCursorBackendImpl::CursorPrefetchIterationOperation):
2284         (WebCore::IDBCursorBackendImpl::CursorPrefetchIterationOperation::CursorPrefetchIterationOperation):
2285         (WebCore::IDBCursorBackendImpl::CursorAdvanceOperation::perform):
2286         (WebCore::IDBCursorBackendImpl::CursorIterationOperation::perform):
2287         (WebCore::IDBCursorBackendImpl::CursorPrefetchIterationOperation::perform):
2288         * Modules/indexeddb/IDBCursorBackendInterface.h: Remove bogus "ThreadSafe"
2289         * Modules/indexeddb/IDBDatabase.cpp:
2290         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
2291         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreOperation::create):
2292         (IDBDatabaseBackendImpl::CreateObjectStoreOperation):
2293         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreOperation::CreateObjectStoreOperation):
2294         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::create):
2295         (IDBDatabaseBackendImpl::DeleteObjectStoreOperation):
2296         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::DeleteObjectStoreOperation):
2297         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::create):
2298         (IDBDatabaseBackendImpl::VersionChangeOperation):
2299         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::VersionChangeOperation):
2300         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreAbortOperation::create):
2301         (IDBDatabaseBackendImpl::CreateObjectStoreAbortOperation):
2302         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreAbortOperation::CreateObjectStoreAbortOperation):
2303         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreAbortOperation::create):
2304         (IDBDatabaseBackendImpl::DeleteObjectStoreAbortOperation):
2305         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreAbortOperation::DeleteObjectStoreAbortOperation):
2306         (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::create):
2307         (IDBDatabaseBackendImpl::VersionChangeAbortOperation):
2308         (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::VersionChangeAbortOperation):
2309         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
2310         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreOperation::perform):
2311         (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
2312         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::perform):
2313         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
2314         (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
2315         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreAbortOperation::perform):
2316         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreAbortOperation::perform):
2317         (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::perform):
2318         * Modules/indexeddb/IDBDatabaseBackendInterface.h: Remove bogus "ThreadSafe"
2319         * Modules/indexeddb/IDBDatabaseCallbacks.h: Remove bogus "ThreadSafe"
2320         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
2321         * Modules/indexeddb/IDBFactoryBackendInterface.h: Remove bogus "ThreadSafe"
2322         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
2323         (WebCore::IDBIndexBackendImpl::OpenIndexCursorOperation::create):
2324         (IDBIndexBackendImpl::OpenIndexCursorOperation):
2325         (WebCore::IDBIndexBackendImpl::OpenIndexCursorOperation::OpenIndexCursorOperation):
2326         (WebCore::IDBIndexBackendImpl::IndexCountOperation::create):
2327         (IDBIndexBackendImpl::IndexCountOperation):
2328         (WebCore::IDBIndexBackendImpl::IndexCountOperation::IndexCountOperation):
2329         (WebCore::IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation::create):
2330         (IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation):
2331         (WebCore::IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation::IndexReferencedValueRetrievalOperation):
2332         (WebCore::IDBIndexBackendImpl::IndexValueRetrievalOperation::create):
2333         (IDBIndexBackendImpl::IndexValueRetrievalOperation):
2334         (WebCore::IDBIndexBackendImpl::IndexValueRetrievalOperation::IndexValueRetrievalOperation):
2335         (WebCore::IDBIndexBackendImpl::OpenIndexCursorOperation::perform):
2336         (WebCore::IDBIndexBackendImpl::openCursor):
2337         (WebCore::IDBIndexBackendImpl::openKeyCursor):
2338         (WebCore::IDBIndexBackendImpl::IndexCountOperation::perform):
2339         (WebCore::IDBIndexBackendImpl::count):
2340         (WebCore::IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation::perform):
2341         (WebCore::IDBIndexBackendImpl::IndexValueRetrievalOperation::perform):
2342         (WebCore::IDBIndexBackendImpl::get):
2343         (WebCore::IDBIndexBackendImpl::getKey):
2344         * Modules/indexeddb/IDBIndexBackendInterface.h: Remove bogus "ThreadSafe"
2345         * Modules/indexeddb/IDBKey.h: Remove bogus "ThreadSafe"
2346         (IDBKey):
2347         * Modules/indexeddb/IDBKeyRange.h: Remove bogus "ThreadSafe"
2348         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
2349         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation::create):
2350         (IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation):
2351         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation::ObjectStoreRetrievalOperation):
2352         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::create):
2353         (IDBObjectStoreBackendImpl::ObjectStoreStorageOperation):
2354         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::ObjectStoreStorageOperation):
2355         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreIndexesReadyOperation::create):
2356         (IDBObjectStoreBackendImpl::ObjectStoreIndexesReadyOperation):
2357         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreIndexesReadyOperation::ObjectStoreIndexesReadyOperation):
2358         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreDeletionOperation::create):
2359         (IDBObjectStoreBackendImpl::ObjectStoreDeletionOperation):
2360         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreDeletionOperation::ObjectStoreDeletionOperation):
2361         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreClearOperation::create):
2362         (IDBObjectStoreBackendImpl::ObjectStoreClearOperation):
2363         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreClearOperation::ObjectStoreClearOperation):
2364         (WebCore::IDBObjectStoreBackendImpl::CreateIndexOperation::create):
2365         (IDBObjectStoreBackendImpl::CreateIndexOperation):
2366         (WebCore::IDBObjectStoreBackendImpl::CreateIndexOperation::CreateIndexOperation):
2367         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexOperation::create):
2368         (IDBObjectStoreBackendImpl::DeleteIndexOperation):
2369         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexOperation::DeleteIndexOperation):
2370         (WebCore::IDBObjectStoreBackendImpl::OpenObjectStoreCursorOperation::create):
2371         (IDBObjectStoreBackendImpl::OpenObjectStoreCursorOperation):
2372         (WebCore::IDBObjectStoreBackendImpl::OpenObjectStoreCursorOperation::OpenObjectStoreCursorOperation):
2373         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreCountOperation::create):
2374         (IDBObjectStoreBackendImpl::ObjectStoreCountOperation):
2375         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreCountOperation::ObjectStoreCountOperation):
2376         (WebCore::IDBObjectStoreBackendImpl::CreateIndexAbortOperation::create):
2377         (IDBObjectStoreBackendImpl::CreateIndexAbortOperation):
2378         (WebCore::IDBObjectStoreBackendImpl::CreateIndexAbortOperation::CreateIndexAbortOperation):
2379         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexAbortOperation::create):
2380         (IDBObjectStoreBackendImpl::DeleteIndexAbortOperation):
2381         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexAbortOperation::DeleteIndexAbortOperation):
2382         (WebCore::IDBObjectStoreBackendImpl::get):
2383         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation::perform):
2384         (WebCore::IDBObjectStoreBackendImpl::put):
2385         (WebCore):
2386         (WebCore::IDBObjectStoreBackendImpl::setIndexesReady):
2387         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreIndexesReadyOperation::perform):
2388         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::perform):
2389         (WebCore::IDBObjectStoreBackendImpl::deleteFunction):
2390         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreDeletionOperation::perform):
2391         (WebCore::IDBObjectStoreBackendImpl::clear):
2392         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreClearOperation::perform):
2393         (WebCore::IDBObjectStoreBackendImpl::createIndex):
2394         (WebCore::IDBObjectStoreBackendImpl::CreateIndexOperation::perform):
2395         (WebCore::IDBObjectStoreBackendImpl::deleteIndex):
2396         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexOperation::perform):
2397         (WebCore::IDBObjectStoreBackendImpl::openCursor):
2398         (WebCore::IDBObjectStoreBackendImpl::OpenObjectStoreCursorOperation::perform):
2399         (WebCore::IDBObjectStoreBackendImpl::count):
2400         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreCountOperation::perform):
2401         (WebCore::IDBObjectStoreBackendImpl::CreateIndexAbortOperation::perform):
2402         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexAbortOperation::perform):
2403         * Modules/indexeddb/IDBObjectStoreBackendInterface.h: Remove bogus "ThreadSafe"
2404         * Modules/indexeddb/IDBRequest.h: Remove bogus "ThreadSafe"
2405         (IDBRequest):
2406         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
2407         (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl): Appease RefPtr<> adoption strictness.
2408         (WebCore::IDBTransactionBackendImpl::scheduleTask):
2409         (WebCore::IDBTransactionBackendImpl::abort):
2410         (WebCore::IDBTransactionBackendImpl::taskTimerFired):
2411         * Modules/indexeddb/IDBTransactionBackendImpl.h:
2412         (Operation):
2413         (WebCore::IDBTransactionBackendImpl::Operation::~Operation):
2414         (IDBTransactionBackendImpl):
2415         (WebCore::IDBTransactionBackendImpl::scheduleTask):
2416         * Modules/indexeddb/IDBTransactionBackendInterface.h: Remove bogus "ThreadSafe"
2417
2418 2012-12-05  Noel Gordon  <noel.gordon@gmail.com>
2419
2420         ENABLE(IMAGE_DECODER_DOWN_SAMPLING): Don't swizzle decode down sampled images
2421         https://bugs.webkit.org/show_bug.cgi?id=103856
2422
2423         Reviewed by Yong Li.
2424
2425         For ports using ENABLE(IMAGE_DECODER_DOWN_SAMPLING), turbo swizzle decodes provide
2426         no speed-up when the decoded image will be down sampled because the data must pass
2427         through the buffer.setRGBA() slow path. That is not the swizzled path. Instead use
2428         JCS_RGB decodes to clarify the output color space handling in outputScanlines().
2429
2430         No new tests. Covered by existing JPEG decoding tests.
2431
2432         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
2433         (WebCore::JPEGImageReader::decode): libjpeg-turbo swizzle decodes provides no real
2434         speed-up if the image will be down sampled. Revert to using JCS_RGA in this case.
2435         (WebCore::setPixel): Remove the libjpeg-turbo JCS_EXT_BGRA and JCS_EXT_RGBA cases.
2436         (WebCore::JPEGImageDecoder::outputScanlines): ditto.
2437         * platform/image-decoders/jpeg/JPEGImageDecoder.h:
2438         (WebCore::JPEGImageDecoder::willDownSample): Return true if image down sampling 
2439         will be applied to the decoded image (m_scaled). Note: the willDownSample() return
2440         value is valid only after setSize() has been called: add an ASSERT for that.
2441
2442 2012-12-05  Michael Pruett  <michael@68k.org>
2443
2444         IndexedDB: Implement IndexedDB bindings for JSC
2445         https://bugs.webkit.org/show_bug.cgi?id=103484
2446
2447         Reviewed by Kentaro Hara.
2448
2449         IndexedDB is currently implemented only for V8. This change adds
2450         the bindings necessary for IndexedDB to work with JSC. With this
2451         patch, IndexedDB for JSC passes 112 out of the 196 layout tests in
2452         storage/indexeddb. IndexedDB is still not enabled for any JSC port.
2453
2454         Tests: storage/indexeddb/*
2455
2456         * CMakeLists.txt:
2457         * GNUmakefile.list.am:
2458         * Modules/indexeddb/IDBOpenDBRequest.idl:
2459         * Modules/indexeddb/IDBVersionChangeRequest.idl:
2460         * UseJSC.cmake:
2461         * WebCore.xcodeproj/project.pbxproj:
2462         * bindings/js/DOMRequestState.h: Added to match bindings/v8/DOMRequestState.h.
2463         (WebCore):
2464         (DOMRequestState):
2465         (WebCore::DOMRequestState::DOMRequestState):
2466         (WebCore::DOMRequestState::clear):
2467         (Scope):
2468         (WebCore::DOMRequestState::Scope::Scope):
2469         (WebCore::DOMRequestState::exec):
2470         * bindings/js/IDBBindingUtilities.cpp: Add utility functions matching those in bindings/v8/IDBBindingUtilities.cpp.
2471         (WebCore::get):
2472         (WebCore):
2473         (WebCore::canSet):
2474         (WebCore::set):
2475         (WebCore::createIDBKeyFromValue):
2476         (WebCore::getNthValueOnKeyPath):
2477         (WebCore::createIDBKeyFromScriptValueAndKeyPath):
2478         (WebCore::ensureNthValueOnKeyPath):
2479         (WebCore::canInjectNthValueOnKeyPath):
2480         (WebCore::injectIDBKeyIntoScriptValue):
2481         (WebCore::canInjectIDBKeyIntoScriptValue):
2482         (WebCore::deserializeIDBValue):
2483         (WebCore::idbKeyToScriptValue):
2484         * bindings/js/IDBBindingUtilities.h: Add utility functions matching those in bindings/v8/IDBBindingUtilities.h.
2485         (WebCore):
2486         * bindings/js/JSIDBAnyCustom.cpp:
2487         (WebCore::toJS):
2488         * bindings/js/JSIDBKeyCustom.cpp:
2489         (WebCore::toJS):
2490         * bindings/js/JSIDBVersionChangeRequestCustom.cpp: Removed.
2491
2492 2012-12-05  Antoine Quint  <graouts@apple.com>
2493
2494         TextTrackCue's .endTime property should fire a TypeError when NaN is assigned
2495         https://bugs.webkit.org/show_bug.cgi?id=103413
2496
2497         Reviewed by Eric Carlson.
2498
2499         Check whether the new time passed to setStartTime() and setEndTime() is none of NaN or Infinity,
2500         otherwise throwing a TypeError.
2501         
2502         Thanks to this fix, we're no longer skipping media/track/opera/interfaces/TextTrackCue/endTime.html and
2503         media/track/opera/interfaces/TextTrackCue/startTime.html.
2504
2505         * html/track/TextTrackCue.cpp:
2506         (WebCore::TextTrackCue::setStartTime):
2507         (WebCore::TextTrackCue::setEndTime):
2508         * html/track/TextTrackCue.h:
2509         (TextTrackCue):
2510         * html/track/TextTrackCue.idl:
2511
2512 2012-12-05  Alexis Menard  <alexis@webkit.org>
2513
2514         [CSS3 Backgrounds and Borders] Allow the CSS3 background position offset for background shorthand.
2515         https://bugs.webkit.org/show_bug.cgi?id=104014
2516
2517         Reviewed by Dirk Schulze.
2518
2519         Add the support of the new <position> type if set from within the
2520         background shorthand. The patch just modify the way we count the values
2521         of the current context by checking wether we encounter a comma (it is
2522         then the next background layer), or if we encounter a '/' (which is in the
2523         background shorthand context the background-size) or any value that is
2524         not a valid background-position keyword or length (which means we are
2525         already parsing the next property of the background shorthand).
2526
2527         Tests: LayoutTests/fast/backgrounds/background-position-parsing-2.html
2528         has been modified to cover this use case.
2529
2530         * css/CSSParser.cpp:
2531         (WebCore::CSSParser::isPositionValue):
2532         (WebCore):
2533         (WebCore::CSSParser::parseFillBackgroundPosition):
2534         (WebCore::CSSParser::parseFillProperty):
2535         * css/CSSParser.h:
2536
2537 2012-12-05  Elliott Sprehn  <esprehn@gmail.com>
2538
2539         ShadowRoot should recalcStyle for itself
2540         https://bugs.webkit.org/show_bug.cgi?id=103933
2541
2542         Reviewed by Hajime Morita.
2543
2544         ShadowRoot should support recalcStyle just like Element instead of
2545         having the code inside ElementShadow. This was once the case and
2546         the dead method prototype for recalcShadowTreeStyle is still in
2547         ShadowRoot.h.
2548
2549         No new tests, just refactoring.
2550
2551         * dom/ElementShadow.cpp:
2552         (WebCore::ElementShadow::recalcStyle):
2553         * dom/ShadowRoot.cpp:
2554         (WebCore::ShadowRoot::recalcStyle):
2555         * dom/ShadowRoot.h:
2556
2557 2012-12-05  Keishi Hattori  <keishi@webkit.org>
2558
2559         Fix text direction in datalist popup for time controls
2560         https://bugs.webkit.org/show_bug.cgi?id=103853
2561
2562         Reviewed by Kent Tamura.
2563
2564         The datalist entry value should be displayed with the same text direction as the date/time format.
2565
2566         Tests: platform/chromium/fast/forms/suggestion-picker/datetime-suggestion-picker-appearance-locale-hebrew.html
2567                platform/chromium/fast/forms/suggestion-picker/datetimelocal-suggestion-picker-appearance-locale-hebrew.html
2568                platform/chromium/fast/forms/suggestion-picker/time-suggestion-picker-appearance-locale-hebrew.html
2569
2570         * Resources/pagepopups/calendarPicker.js: Renamed isCalendarRTL to isLocaleRTL.
2571         (CalendarPicker.prototype._layout):
2572         (CalendarPicker.prototype.fixWindowSize):
2573         (DaysTable.prototype._handleKey):
2574         (MonthPickerDaysTable.prototype._handleKey):
2575         (WeekPickerDaysTable.prototype._handleKey):
2576         * Resources/pagepopups/suggestionPicker.css:
2577         (.suggestion-list-entry .title): Title should have the same text direction as the locale.
2578         (.locale-rtl .suggestion-list-entry .title):
2579         * Resources/pagepopups/suggestionPicker.js:
2580         (SuggestionPicker.prototype._layout): Add locale-rtl class if the isLocaleRTL is true.
2581
2582 2012-12-05  Keishi Hattori  <keishi@webkit.org>
2583
2584         Fix flickering when hiding page popup
2585         https://bugs.webkit.org/show_bug.cgi?id=104100
2586
2587         Reviewed by Kent Tamura.
2588
2589         Moving the page popup while hiding was causing flickering in some environments.
2590
2591         No new tests. Can't reproduce in layout test.
2592
2593         * Resources/pagepopups/pickerCommon.js:
2594         (hideWindow): Don't move and just resize.
2595
2596 2012-12-05  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2597
2598         [Qt] Don't rely on QMimeDatabase for essential MIME types
2599         https://bugs.webkit.org/show_bug.cgi?id=103865
2600
2601         Based on patch by Pierre Rossi.
2602         Reviewed by Jocelyn Turcotte.
2603
2604         Extend the short static list to also include MIME types essential to WebKit,
2605         and detect these first before checking the system mimedatabase.
2606
2607         * platform/qt/MIMETypeRegistryQt.cpp:
2608         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
2609         (WebCore::MIMETypeRegistry::getMIMETypeForPath):
2610
2611 2012-12-05  Zoltan Herczeg  <zherczeg@webkit.org>
2612
2613         Optimize ColorMatrix filter
2614         https://bugs.webkit.org/show_bug.cgi?id=103728
2615
2616         Reviewed by Dirk Schulze.
2617
2618         ColorMatrix filter recalculates several constants for
2619         every pixel. It is enough to do these calculations only
2620         once during the initialization. Style issues also fixed.
2621
2622         Existing tests cover this feature.
2623
2624         * platform/graphics/filters/FEColorMatrix.cpp:
2625         (WebCore::matrix):
2626         (WebCore::saturateAndHueRotate):
2627         (WebCore::effectType):
2628
2629 2012-12-05  Carlos Garcia Campos  <cgarcia@igalia.com>
2630
2631         Flex item auto margins in the cross direction should safe center
2632         https://bugs.webkit.org/show_bug.cgi?id=103919
2633
2634         Reviewed by Ojan Vafai.
2635
2636         Do not apply auto margins for cross axis if there's no alignment
2637         space available.
2638
2639         Test: css3/flexbox/flex-flow-auto-margins-no-available-space.html
2640
2641         * rendering/RenderFlexibleBox.cpp:
2642         (WebCore::RenderFlexibleBox::alignChildren): Make sure we pass a
2643         positive value for availableAlignmentSpace to
2644         updateAutoMarginsInCrossAxis().
2645
2646 2012-12-05  Mike West  <mkwst@chromium.org>
2647
2648         Web Inspector: Autogenerate stack traces and line numbers when possible.
2649         https://bugs.webkit.org/show_bug.cgi?id=100650
2650
2651         Reviewed by Yury Semikhatsky.
2652
2653         Console messages generated in WebCore generally are asked to do a bit of
2654         work in order to provide a developer with a detailed report. We ask the
2655         caller to either generate stack traces, or pass in a url/line number
2656         pair, which can be a bit of work. Predictably, most callers don't pass
2657         in what we'd like to see.
2658
2659         This patch creates a new, simpler console message generation API that we
2660         expect most call sites to use. Source, type, level, and message are
2661         required, and an optional request ID can be passed in. Everything else
2662         will be autogenerated inside ConsoleMessage when appropriate.
2663
2664         In a subsequent patch, we expect to be able to trim down more of the
2665         external call sites (ContentSecurityPolicy springs to mind) in order to
2666         further consolidate the external interface. Simple is good.
2667
2668         * Modules/websockets/WebSocket.cpp:
2669         (WebCore::WebSocket::connect):
2670         * Modules/websockets/WebSocketChannel.cpp:
2671         (WebCore::WebSocketChannel::didFailSocketStream):
2672             Drop the now-redundant URL parameter from various WebSocket errors.
2673         * css/MediaList.cpp:
2674         (WebCore::addResolutionWarningMessageToConsole):
2675             Switch to Document::addConsoleMessage, which means that we can move
2676             line-number generation out of MediaList.
2677         * dom/Document.cpp:
2678         (WebCore::Document::logExceptionToConsole):
2679             Use the long-form 'addMessage()' rather than the public interface.
2680         (WebCore::Document::processHttpEquiv):
2681             Drop the URL parameter, as it's now autogenerated.
2682         (WebCore::Document::addConsoleMessage):
2683         (WebCore):
2684         * dom/Document.h:
2685         (Document):
2686             Override the pure virtual method on ScriptExecutionContext, and pass
2687             the call through to the new Console::addMessage, which accepts a
2688             pointer to the Document in order to do line-number generation.
2689         * dom/ScriptExecutionContext.h:
2690         (ScriptExecutionContext):
2691             Add a pure virtual variant of addConsoleMessage which accepts only
2692             bare minimum data, and expects autogeneration of the rest.
2693             Additionally, ensure that the other variants always have either a
2694             URL/line number, or a stack trace.
2695         * dom/ViewportArguments.cpp:
2696         (WebCore::reportViewportWarning):
2697             Drop line numbers and URLs from Viewport warnings. We can generate
2698             these now.
2699         * html/HTMLFormElement.cpp:
2700         (WebCore::HTMLFormElement::validateInteractively):
2701             Drop the URL from form autofocus warnings
2702         * html/HTMLIFrameElement.cpp:
2703         (WebCore::HTMLIFrameElement::parseAttribute):
2704             Drop the URL and line from sandbox attribute warnings.
2705         * html/canvas/WebGLRenderingContext.cpp:
2706         (WebCore):
2707         (WebCore::WebGLRenderingContext::printWarningToConsole):
2708             Drop the URL from WebGL warnings.
2709         * inspector/ConsoleMessage.cpp:
2710         (WebCore::ConsoleMessage::ConsoleMessage):
2711             Call 'autogenerateMetadata' to ensure that a stack trace is
2712             generated if one isn't provided. Create a new constructor that
2713             accepts a ScriptState/ScriptArguments pair, and use it for console
2714             API calls.
2715         (WebCore):
2716         (WebCore::ConsoleMessage::autogenerateMetadata):
2717             Generate a stack trace given whatever information we've got.
2718         * inspector/ConsoleMessage.h:
2719         (ConsoleMessage):
2720             Create a new constructor that accepts a ScriptState/ScriptArguments
2721             pair, and use it for console API calls.
2722         * inspector/InspectorConsoleAgent.cpp:
2723         (WebCore::InspectorConsoleAgent::enable):
2724             Use the short-form ConsoleMessage constructor.
2725         (WebCore::InspectorConsoleAgent::addMessageToConsole):
2726             Use the stack-only constructor, or the ScriptState
2727             constructor, as appropriate.
2728         (WebCore::InspectorConsoleAgent::count):
2729             We generated a stack, pass it in.
2730         * inspector/InspectorConsoleAgent.cpp:
2731         (WebCore::InspectorConsoleAgent::isWorkerAgent):
2732         * inspector/PageConsoleAgent.h:
2733         (WebCore::PageConsoleAgent::isWorkerAgent):
2734         * inspector/PageConsoleAgent.h:
2735         (WebCore::PageConsoleAgent::isWorkerAgent):
2736             We only want to generate call stacks for non-Workers (because
2737             createScriptCallStack explodes in JSC if we're not on the main
2738             thread). This method will allow us to distinguish between those
2739             messages generated from Workers, and those from Pages.
2740         * loader/FrameLoader.cpp:
2741         (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
2742         * loader/MainResourceLoader.cpp:
2743         (WebCore::MainResourceLoader::didReceiveResponse):
2744             Drop the URL parameter from the console message for X-Frame-Options
2745             parsing errors.
2746         * page/Console.cpp:
2747         (WebCore::Console::addMessage):
2748             When given a Document*, generate a line number if: 1) the document
2749             is still being parsed, 2) the document is not in document.write(),
2750             3) the parser isn't waiting for script, and 4) the parser isn't
2751             executing script. Many callsites didn't check all of these, which
2752             is why the SVG rebaseline (for example) drops lots and lots of line
2753             numbers which point at a closing '</script>' tag.
2754         (WebCore):
2755         * page/Console.h:
2756         (WebCore):
2757         (Console):
2758             Update the public API to accept a Document* and little else.
2759         * page/DOMWindow.cpp:
2760         (WebCore::DOMWindow::printErrorMessage):
2761             Don't generate a stack here. We can do it later.
2762         * svg/SVGDocumentExtensions.cpp:
2763         (WebCore::reportMessage):
2764             Drop the URL and line number. We'll generate them. It'll be sweet.
2765         * workers/WorkerContext.cpp:
2766         (WebCore::WorkerContext::addConsoleMessage):
2767         (WebCore):
2768         * workers/WorkerContext.h:
2769         (WorkerContext):
2770             Implement the new addConsoleMessage variant.
2771
2772 2012-12-04  Carlos Garcia Campos  <cgarcia@igalia.com>
2773
2774         Reduce the children repaints when moved multiple times during the layout
2775         https://bugs.webkit.org/show_bug.cgi?id=103510
2776
2777         Reviewed by Darin Adler.
2778
2779         Cache the children positions before the layout and move to the
2780         final position after the layout.
2781
2782         Test: css3/flexbox/repaint-column-reverse.html
2783
2784         * rendering/RenderFlexibleBox.cpp:
2785         (WebCore::RenderFlexibleBox::OrderIterator::OrderIterator): Do not
2786         call first() on the consructor.
2787         (WebCore::RenderFlexibleBox::layoutBlock): Use a Vector with the
2788         children frame rects before the layout and call
2789         repaintChildrenDuringLayoutIfMoved() to repaint the children that
2790         have been moved.
2791         (WebCore::RenderFlexibleBox::appendChildrenFrameRects): Return a
2792         Vector with children frame rects.
2793         (WebCore::RenderFlexibleBox::repaintChildrenDuringLayoutIfMoved):
2794         Call repaintDuringLayoutIfMoved() for every children using the old
2795         frame rects.
2796         (WebCore::RenderFlexibleBox::setFlowAwareLocationForChild): Do not
2797         call repaintDuringLayoutIfMoved().
2798         (WebCore::RenderFlexibleBox::layoutFlexItems): Make sure the
2799         passed iterator points to the first child.
2800         * rendering/RenderFlexibleBox.h:
2801
2802 2012-12-05  Dan Carney  <dcarney@google.com>
2803
2804         [V8] toV8Fast for all classes with ScriptWrapper Holder objects
2805         https://bugs.webkit.org/show_bug.cgi?id=102686
2806
2807         Reviewed by Adam Barth.
2808
2809         This patch makes most generated bindings use toV8Fast
2810         by adding a fast path to the main world DOMDataStore.
2811         Additionally, toV8Fast is now being called on callbacks
2812         which use v8::Arguments.
2813
2814         No new tests. No change in functionality.
2815
2816         * bindings/scripts/CodeGeneratorV8.pm:
2817         (GenerateHeader):
2818         (GenerateNormalAttrGetter):
2819         (GenerateFunctionCallString):
2820         (NativeToJSValue):
2821         * bindings/v8/DOMDataStore.cpp:
2822         (WebCore::DOMDataStore::mainWorldStore):
2823         (WebCore::DOMDataStore::current):
2824         * bindings/v8/DOMDataStore.h:
2825
2826 2012-12-05  Andrey Adaikin  <aandrey@chromium.org>
2827
2828         Web Inspector: [Canvas] nit: add more typization for js compiler
2829         https://bugs.webkit.org/show_bug.cgi?id=103994
2830
2831         Reviewed by Pavel Feldman.
2832
2833         * inspector/InjectedScriptCanvasModuleSource.js:
2834         (.):
2835
2836 2012-12-05  Hans Muller  <hmuller@adobe.com>
2837
2838         [CSS Exclusions] ExclusionShape inlines should use isFlippedBlocksWritingMode()
2839         https://bugs.webkit.org/show_bug.cgi?id=103939
2840
2841         Reviewed by Dirk Schulze.
2842
2843         Just a minor cleanup: the protected ExclusionShape inlines, like minYForLogicalLine(),
2844         now use isFlippedBlocksWritingMode() instead of testing for RightToLeftWritingMode directly.
2845         This changeimproves consistency with the rest of WebKit and will work correctly
2846         if "horizontal-bt" writing-mode support is ever added.
2847
2848         No new tests were added since the existing tests cover these methods.
2849
2850         * rendering/ExclusionShape.h:
2851         (WebCore::ExclusionShape::minYForLogicalLine):
2852         (WebCore::ExclusionShape::maxYForLogicalLine):
2853         (WebCore::ExclusionShape::internalToLogicalBoundingBox):
2854
2855 2012-12-05  Bear Travis  <betravis@adobe.com>
2856
2857         Absolutely positioned non-replaced elements should resolve vertical margins against
2858         their containing block's logical width
2859         https://bugs.webkit.org/show_bug.cgi?id=103576
2860
2861         Reviewed by Emil A Eklund.
2862
2863         According to the CSS box model specification, all percentage margin & padding values,
2864         including top & bottom, should be resolved based on the containing block's width.
2865         http://www.w3.org/TR/CSS2/box.html#margin-properties
2866         The writing modes specification has refined this definition to use the containing
2867         block's logical width to resolve percentage margin & padding values.
2868         http://dev.w3.org/csswg/css3-writing-modes/#dimension-mapping
2869
2870         Previously, positioned elements measured their container in the element's block
2871         direction (containerLogicalHeight) to resolve margin-before/after, and in the inline
2872         direction (containerLogicalWidth) to resolve margin-start/end. This patch measures the
2873         container's logical width in its own inline direction (containerRelativeLogicalWidth)
2874         to resolve all margin percentage values.
2875
2876         Test: fast/writing-mode/percentage-margins-absolute.html
2877
2878         * rendering/RenderBox.cpp:
2879         (WebCore::RenderBox::computePositionedLogicalWidthUsing): Calculate the logical width
2880         of the container, and use it to calculate margins.
2881         (WebCore::RenderBox::computePositionedLogicalHeightUsing): Ditto.
2882
2883 2012-12-04  Kentaro Hara  <haraken@chromium.org>
2884
2885         [V8] Replace String::New("symbol") with String::NewSymbol("symbol") (part 2)
2886         https://bugs.webkit.org/show_bug.cgi?id=104082
2887
2888         Reviewed by Adam Barth.
2889
2890         V8 can look up symbols faster than strings.
2891
2892         No tests. No change in behavior.
2893
2894         * bindings/v8/custom/V8ArrayBufferViewCustom.cpp:
2895         (WebCore::getHiddenCopyMethod):
2896         (WebCore::installHiddenCopyMethod):
2897         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
2898         (WebCore::constructWebGLArray):
2899         (WebCore::setWebGLArrayHelper):
2900         * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
2901         (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
2902         * bindings/v8/custom/V8DOMWindowCustom.cpp:
2903         (WebCore::DialogHandler::dialogCreated):
2904         (WebCore::DialogHandler::returnValue):
2905         * bindings/v8/custom/V8GeolocationCustom.cpp:
2906         (WebCore::createPositionOptions):
2907         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
2908         (WebCore::V8HTMLDocument::wrapInShadowObject):
2909         (WebCore::V8HTMLDocument::openCallback):
2910         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
2911         (WebCore::V8HTMLImageElementConstructor::GetTemplate):
2912         * bindings/v8/custom/V8SQLTransactionCustom.cpp:
2913         (WebCore::V8SQLTransaction::executeSqlCallback):
2914
2915 2012-12-04  Elliott Sprehn  <esprehn@chromium.org>
2916
2917         Clicking a scrollbar unfocuses the current activeElement
2918         https://bugs.webkit.org/show_bug.cgi?id=96335
2919
2920         Reviewed by Ojan Vafai.
2921
2922         Previously we only tested for clicks inside frame scrollbars before
2923         moving the focus, this patch expands the check to overflow scrollbars.
2924         Now clicking inside a scrollbar only moves the focus when the scrollbar
2925         has an ancestor that is mouse focusable.
2926
2927         This matches Gecko behavior, and was agreed to be the most sensible for now:
2928         http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-October/037759.html
2929
2930         Test: fast/overflow/scrollbar-click-retains-focus.html
2931
2932         * page/EventHandler.cpp:
2933         (WebCore::EventHandler::handleMousePressEvent):
2934           Never start selections inside scrollbars because it would cause asserts. 
2935           This wasn't a problem before because we always moved the focus when clicking a scrollbar.        
2936         (WebCore::EventHandler::dispatchMouseEvent): 
2937           Check that the click is not inside a scrollbar before moving the focus.
2938         (WebCore::EventHandler::isInsideScrollbar): Tests if a point is in a scrollbar.
2939         (WebCore):
2940         (WebCore::EventHandler::sendContextMenuEvent):
2941           Never start selections inside scrollbars because it would cause asserts.
2942         * page/EventHandler.h:
2943         (EventHandler):
2944         * rendering/RenderLayer.cpp:
2945         (WebCore::RenderLayer::hitTestOverflowControls):
2946
2947 2012-12-04  Kentaro Hara  <haraken@chromium.org>
2948
2949         [V8] Replace String::New("symbol") with String::NewSymbol("symbol")
2950         https://bugs.webkit.org/show_bug.cgi?id=104084
2951
2952         Reviewed by Adam Barth.
2953
2954         V8 can look up symbols faster than strings. This is a final patch for the replacement.
2955
2956         No tests. No change in behavior.
2957
2958         * bindings/v8/DateExtension.cpp:
2959         (WebCore::DateExtension::setAllowSleep):
2960         (WebCore::DateExtension::GetNativeFunction):
2961         * bindings/v8/NPV8Object.cpp:
2962         (WebCore::npIdentifierToV8Identifier):
2963         (_NPN_Invoke):
2964         * bindings/v8/PageScriptDebugServer.cpp:
2965         (WebCore::PageScriptDebugServer::addListener):
2966         * bindings/v8/ScriptController.cpp:
2967         (WebCore::ScriptController::setContextDebugId):
2968         * bindings/v8/ScriptDebugServer.cpp:
2969         (WebCore::ScriptDebugServer::callDebuggerMethod):
2970         (WebCore::ScriptDebugServer::setBreakpoint):
2971         (WebCore::ScriptDebugServer::removeBreakpoint):
2972         (WebCore::ScriptDebugServer::clearBreakpoints):
2973         (WebCore::ScriptDebugServer::setBreakpointsActivated):
2974         (WebCore::ScriptDebugServer::handleV8DebugEvent):
2975         (WebCore::ScriptDebugServer::dispatchDidParseSource):
2976         * bindings/v8/ScriptObject.cpp:
2977         (WebCore::ScriptGlobalObject::set):
2978         (WebCore::ScriptGlobalObject::get):
2979         (WebCore::ScriptGlobalObject::remove):
2980         * bindings/v8/V8Binding.h:
2981         (WebCore::toV8Sequence):
2982         * bindings/v8/V8DOMWindowShell.cpp:
2983         (WebCore::setInjectedScriptContextDebugId):
2984         (WebCore::V8DOMWindowShell::updateDocumentProperty):
2985         (WebCore::V8DOMWindowShell::clearDocumentProperty):
2986         * bindings/v8/V8NPObject.cpp:
2987         (WebCore::npObjectPropertyEnumerator):
2988         * bindings/v8/V8NodeFilterCondition.cpp:
2989         (WebCore::V8NodeFilterCondition::acceptNode):
2990         * bindings/v8/V8PerIsolateData.cpp:
2991         (WebCore::V8PerIsolateData::constructorOfToString):
2992         * bindings/v8/WorkerScriptController.cpp:
2993         (WebCore::WorkerScriptController::initializeContextIfNeeded):
2994         * bindings/v8/WorkerScriptDebugServer.cpp:
2995         (WebCore::WorkerScriptDebugServer::addListener):
2996
2997 2012-12-04  Dan Bernstein  <mitz@apple.com>
2998
2999         Support text-orientation: sideways-right (and sideways when it maps to sideways-right)
3000         https://bugs.webkit.org/show_bug.cgi?id=104035
3001
3002         Reviewed by Anders Carlsson.
3003
3004         Test: fast/text/orientation-sideways.html
3005
3006         * GNUmakefile.list.am: Updated for rename of TextOrientation.h.
3007
3008         * WebCore.gypi: Ditto.
3009
3010         * WebCore.xcodeproj/project.pbxproj: Ditto.
3011
3012         * css/CSSComputedStyleDeclaration.cpp:
3013         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Changed to retrieve
3014         text-orientation from RenderStyle rather than from the font description.
3015
3016         * css/CSSParser.cpp:
3017         (WebCore::CSSParser::parseValue): Added sideways and sideways-right as acceptable
3018         text-orientation values.
3019
3020         * css/CSSPrimitiveValueMappings.h:
3021         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added mappings for sideways and
3022         sideways-right.
3023         (WebCore::CSSPrimitiveValue::operator TextOrientation): Ditto.
3024
3025         * css/CSSValueKeywords.in: Added sideways and sideways-right.
3026
3027         * css/StyleBuilder.cpp:
3028         (WebCore::StyleBuilder::StyleBuilder): Removed text-orientation property handler, as it is
3029         now handled in CSSStyleResolver.
3030
3031         * css/StyleResolver.cpp:
3032         (WebCore::getFontAndGlyphOrientation): Added this helper function that determines the font
3033         orientation and non-CJK glyph orientation based on writing-mode and text-orientation.
3034         (WebCore::StyleResolver::styleForDocument): Added code to set the font orientation and
3035         non-CJK glyph orientation in the document style.
3036         (WebCore::checkForOrientationChange): Added. Sets the font orientation and non-CJK glyph
3037         orientation in the child style if the difference between the parent and child styles requires
3038         doing so.
3039         (WebCore::StyleResolver::updateFont): Added call to checkForOrientationChange().
3040         (WebCore::StyleResolver::applyProperty): Changed the writing-mode case to call the new
3041         setWritingMode helper, which dirties the font as needed, rather than changing the font
3042         here. Moved handling of text-orientation here, by calling setTextOrientation, which also
3043         dirties the font as needed.
3044
3045         * css/StyleResolver.h:
3046         (WebCore::StyleResolver::setWritingMode): Added. Dirties the font if the writing mode changes.
3047         (WebCore::StyleResolver::setTextOrientation): Ditto for text orientation.
3048
3049         * platform/graphics/FontDescription.h:
3050         (WebCore::FontDescription::FontDescription): Updated initializer for rename.
3051         (WebCore::FontDescription::nonCJKGlyphOrientation): Renamed textOrientation to this.
3052         (WebCore::FontDescription::setNonCJKGlyphOrientation): Renamed setTextOrientation to this.
3053         (FontDescription): Renamed member variable m_textOrientation to m_nonCJKGlyphOrientation.
3054         (WebCore::FontDescription::operator==): Updated for rename.
3055
3056         * platform/graphics/FontFastPath.cpp:
3057         (WebCore::glyphDataAndPageForNonCJKCharacterWithGlyphOrientation): Renamed
3058         glyphDataAndPageForCharacterWithTextOrientation to this and changed the parameter type from
3059         TextOrientation to NonCJKGlyphOrientation.
3060         (WebCore::Font::glyphDataAndPageForCharacter): Updated for above rename.
3061
3062         * platform/graphics/mac/FontComplexTextMac.cpp:
3063         (WebCore::Font::fontDataForCombiningCharacterSequence): Updated for rename of
3064         FontDescription::textOrientation().
3065
3066         * platform/text/NonCJKGlyphOrientation.h: Renamed TextOrientation.h to this, and renamed
3067         the enum and its values to better reflect that they describe how glyphs for non-CJK
3068         characters are to be rendered in vertical text.
3069
3070         * rendering/InlineFlowBox.cpp:
3071         (WebCore::InlineFlowBox::requiresIdeographicBaseline): Updated for rename of
3072         FontDescription::textOrientation().
3073
3074         * rendering/style/RenderStyle.cpp:
3075         (WebCore::RenderStyle::diff): Made text-orientation change a layout change.
3076
3077         * rendering/style/RenderStyle.h:
3078         (WebCore::RenderStyle::setTextOrientation): Added.
3079
3080         * rendering/style/RenderStyleConstants.h: Added a new TextOrientation enum here.
3081
3082         * rendering/style/StyleRareInheritedData.cpp:
3083         (WebCore::StyleRareInheritedData::StyleRareInheritedData): Added initialization and copying
3084         of m_textOrientation member variable.
3085         (WebCore::StyleRareInheritedData::operator==): Added comparing of m_textOrientation.
3086
3087         * rendering/style/StyleRareInheritedData.h:
3088         (StyleRareInheritedData): Added m_textOrientation member variable.
3089
3090 2012-12-04  Kentaro Hara  <haraken@chromium.org>
3091
3092         [V8] Use ScopedPersistent for IntegerCache::smallIntegers
3093         https://bugs.webkit.org/show_bug.cgi?id=104066
3094
3095         Reviewed by Adam Barth.
3096
3097         We can use ScopedPersistent for IntegerCache::smallIntegers
3098         instead of manual Persistent::New().
3099
3100         I confirmed no performance regression in Bindings/scroll-top.html
3101
3102         No tests. No change in behavior.
3103
3104         * bindings/v8/V8PerIsolateData.cpp:
3105         (WebCore::V8PerIsolateData::V8PerIsolateData):
3106         * bindings/v8/V8ValueCache.cpp:
3107         (WebCore::IntegerCache::IntegerCache):
3108         * bindings/v8/V8ValueCache.h:
3109         (IntegerCache):
3110         (WebCore::IntegerCache::v8Integer):
3111         (WebCore::IntegerCache::v8UnsignedInteger):
3112
3113 2012-12-04  Eugene Klyuchnikov  <eustas@chromium.org>
3114
3115         Web Inspector: Resources: domain cookies are not shown for sub-sub domain pages.
3116         https://bugs.webkit.org/show_bug.cgi?id=104016
3117
3118         Reviewed by Pavel Feldman.
3119
3120         Fixed regexp to allow zero or more subdomain prefix (was zero or one).
3121
3122         * inspector/front-end/CookieParser.js:
3123         (WebInspector.Cookies.cookieDomainMatchesResourceDomain): Fixed regexp.
3124
3125 2012-12-04  Alpha Lam  <hclam@chromium.org>
3126
3127         Not reviewed. Build fix.
3128
3129         Fix Chromium Windows build.
3130
3131         * platform/graphics/chromium/ImageDecodingStore.h:
3132         (CacheEntry):
3133
3134 2012-12-04  Kentaro Hara  <haraken@chromium.org>
3135
3136         [V8] Remove toV8Object()
3137         https://bugs.webkit.org/show_bug.cgi?id=103987
3138
3139         Reviewed by Adam Barth.
3140
3141         toV8Object() is used only for MessagePort and ArrayBuffer
3142         only by SerializedScriptValue. It is wasteful to generate
3143         toV8Object() for all interfaces.
3144
3145         No tests. No change in behavior.
3146
3147         * bindings/scripts/CodeGeneratorV8.pm:
3148         (GenerateHeader):
3149         * bindings/scripts/test/V8/V8Float64Array.h:
3150         (WebCore):
3151         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
3152         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
3153         * bindings/scripts/test/V8/V8TestEventConstructor.h:
3154         * bindings/scripts/test/V8/V8TestEventTarget.h:
3155         * bindings/scripts/test/V8/V8TestException.h:
3156         * bindings/scripts/test/V8/V8TestInterface.h:
3157         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
3158         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
3159         * bindings/scripts/test/V8/V8TestNode.h:
3160         * bindings/scripts/test/V8/V8TestObj.h:
3161         * bindings/scripts/test/V8/V8TestOverloadedConstructors.h:
3162         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
3163         * bindings/v8/SerializedScriptValue.cpp:
3164
3165 2012-12-04  Kentaro Hara  <haraken@chromium.org>
3166
3167         [V8] Replace v8::Null(isolate) with v8Null(isolate)
3168         https://bugs.webkit.org/show_bug.cgi?id=104070
3169
3170         Reviewed by Adam Barth.
3171
3172         v8Null(isolate) is a faster version of v8::Null(isolate).
3173
3174         No tests. No change in behavior.
3175
3176         * bindings/v8/V8Binding.h:
3177         (WebCore::v8StringOrNull):
3178         * bindings/v8/custom/V8ClipboardCustom.cpp:
3179         (WebCore::V8Clipboard::typesAccessorGetter):
3180         * bindings/v8/custom/V8CoordinatesCustom.cpp:
3181         (WebCore::V8Coordinates::altitudeAccessorGetter):
3182         (WebCore::V8Coordinates::altitudeAccuracyAccessorGetter):
3183         (WebCore::V8Coordinates::headingAccessorGetter):
3184         (WebCore::V8Coordinates::speedAccessorGetter):
3185         * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
3186         (WebCore::V8DeviceMotionEvent::accelerationAccessorGetter):
3187         (WebCore::V8DeviceMotionEvent::accelerationIncludingGravityAccessorGetter):
3188         (WebCore::V8DeviceMotionEvent::rotationRateAccessorGetter):
3189         (WebCore::V8DeviceMotionEvent::intervalAccessorGetter):
3190         * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
3191         (WebCore::V8DeviceOrientationEvent::alphaAccessorGetter):
3192         (WebCore::V8DeviceOrientationEvent::betaAccessorGetter):
3193         (WebCore::V8DeviceOrientationEvent::gammaAccessorGetter):
3194         (WebCore::V8DeviceOrientationEvent::absoluteAccessorGetter):
3195         * bindings/v8/custom/V8DocumentLocationCustom.cpp:
3196         (WebCore::V8Document::locationAccessorGetter):
3197         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
3198         (WebCore::V8HTMLCanvasElement::getContextCallback):
3199         * bindings/v8/custom/V8HistoryCustom.cpp:
3200         (WebCore::V8History::stateAccessorGetter):
3201         * bindings/v8/custom/V8MessageEventCustom.cpp:
3202         (WebCore::V8MessageEvent::dataAccessorGetter):
3203         * bindings/v8/custom/V8MicroDataItemValueCustom.cpp:
3204         (WebCore::toV8):
3205         * bindings/v8/custom/V8NodeCustom.cpp:
3206         (WebCore::V8Node::insertBeforeCallback):
3207         (WebCore::V8Node::replaceChildCallback):
3208         (WebCore::V8Node::removeChildCallback):
3209         (WebCore::V8Node::appendChildCallback):
3210         * bindings/v8/custom/V8PopStateEventCustom.cpp:
3211         (WebCore::V8PopStateEvent::stateAccessorGetter):
3212         * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp:
3213         (WebCore::V8SQLResultSetRowList::itemCallback):
3214         * bindings/v8/custom/V8TrackEventCustom.cpp:
3215         (WebCore::V8TrackEvent::trackAccessorGetter):
3216         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
3217         (WebCore::toV8Object):
3218         (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback):
3219         (WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallback):
3220
3221 2012-12-04  Min Qin  <qinmin@chromium.org>
3222
3223         Make LazyDecodingPixelRef inherit from skia::LazyPixelRef so that cc thread can access it
3224         https://bugs.webkit.org/show_bug.cgi?id=103555
3225
3226         Reviewed by Stephen White.
3227
3228         Expose LazyDecodingPixelRef to the cc thread by inheriting from skia::LazyPixelRef.
3229         No test added for now as impl side paiting is still WIP.
3230
3231         * platform/graphics/chromium/LazyDecodingPixelRef.cpp:
3232         (WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef):
3233         (WebCore::LazyDecodingPixelRef::PrepareToDecode):
3234         (WebCore):
3235         (WebCore::LazyDecodingPixelRef::Decode):
3236         * platform/graphics/chromium/LazyDecodingPixelRef.h:
3237         (LazyDecodingPixelRef):
3238
3239 2012-12-04  Takashi Sakamoto  <tasak@google.com>
3240
3241         Fix compile error when SVG is disabled.
3242
3243         Unreviewed gardening.
3244
3245         * css/StyleResolver.cpp:
3246         (WebCore::StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes):
3247
3248 2012-12-04  Anthony Scian  <ascian@rim.com>
3249
3250         Static code analysis warning fixes
3251         https://bugs.webkit.org/show_bug.cgi?id=103837
3252
3253         Reviewed by Rob Buis.
3254
3255         172,174: disable copy ctor, op= in AutofillBackingStore
3256         504,506: disable copy ctor, op= in CookieManager
3257         1488,1491: disable copy ctor, op= in RSSParserBase
3258         1489,1490: disable copy ctor, op= in RSSItem
3259         514,516: disable copy ctor, op= in CredentialBackingStore
3260         1363: m_state not initialized in ctor
3261
3262         * platform/blackberry/CookieManager.h:
3263         * platform/blackberry/PlatformTouchPointBlackBerry.cpp:
3264         (WebCore::PlatformTouchPoint::PlatformTouchPoint):
3265         * platform/network/blackberry/AutofillBackingStore.h:
3266         (AutofillBackingStore):
3267         * platform/network/blackberry/CredentialBackingStore.h:
3268         (CredentialBackingStore):
3269         * platform/network/blackberry/rss/RSSParserBase.h:
3270         (RSSParserBase):
3271
3272 2012-12-04  Noel Gordon  <noel.gordon@gmail.com>
3273
3274         [v8] Improve worker.postMessage() string performance: avoid utf8 conversion
3275         https://bugs.webkit.org/show_bug.cgi?id=102230
3276
3277         Reviewed by Eric Seidel.
3278
3279         Avoid utf8 conversion when serializing strings with SerializedScriptValue. Provide 
3280         Ascii and UChar writers for v8 string serialization and provide a UChar reader for
3281         deserialization. Define/use serialization StringUCharTag to indicate UChar strings
3282         in the wire format. Increment the SerializedScriptValue wire format version.
3283
3284         In the wire format, StringUCharTag is followed by the string length in bytes, then
3285         the length/2 UChars of the string.
3286
3287         Note the string length is VarInt encoded. During serialization, compute the number
3288         of bytes used to encode the length and prepend a PaddingTag if needed so the UChar
3289         data appears on an even-byte boundary. This prevents unaligned reads of UChar data
3290         during deserialization (the deserialization buffer is even-byte aligned).
3291
3292         Testing transfers of large strings to and from workers indicates a 10X improvement
3293         in transfer rate for strings, and strings within js objects, with this change. For
3294         example, 500 MByte/s on my test machine (50 MByte/s without this change) for flat,
3295         32 MByte string postMessage() transfers.
3296
3297         Covered by platform/chromium/fast/storage/serialized-script-value.html
3298
3299         * bindings/v8/SerializedScriptValue.cpp:
3300
3301 2012-12-04  Kentaro Hara  <haraken@chromium.org>
3302
3303         [V8] V8Binding::v8ExternalString() is redundant
3304         https://bugs.webkit.org/show_bug.cgi?id=103979
3305
3306         Reviewed by Adam Barth.
3307
3308         v8String(), v8StringOrNull() and v8StringOrUndefined() are enough.
3309         We can remove V8Binding::v8ExternalString().
3310
3311         No tests. No change in behavior.
3312
3313         * bindings/scripts/CodeGeneratorV8.pm:
3314         (GenerateNormalAttrGetter):
3315         * bindings/v8/ScriptController.cpp:
3316         (WebCore::ScriptController::compileAndRunScript):
3317         * bindings/v8/ScriptDebugServer.cpp:
3318         (WebCore::ScriptDebugServer::compileScript):
3319         * bindings/v8/V8Binding.h:
3320         (WebCore):
3321         (WebCore::v8String):
3322         (WebCore::v8StringOrNull):
3323         (WebCore::v8StringOrUndefined):
3324         * bindings/v8/V8LazyEventListener.cpp:
3325         (WebCore::V8LazyEventListener::prepareListenerObject):
3326         * bindings/v8/WorkerScriptController.cpp:
3327         (WebCore::WorkerScriptController::evaluate):
3328
3329 2012-12-04  Kentaro Hara  <haraken@chromium.org>
3330
3331         [V8] Remove v8NonStringValueToWebCoreString() and v8NonStringValueToAtomicWebCoreString()
3332         https://bugs.webkit.org/show_bug.cgi?id=103981
3333
3334         Reviewed by Adam Barth.
3335
3336         v8NonStringValueToWebCoreString() and v8NonStringValueToAtomicWebCoreString()
3337         are equivalent to what StringResource does.
3338
3339         No tests. No change in behavior.
3340
3341         * bindings/v8/V8Binding.cpp:
3342         * bindings/v8/V8Binding.h:
3343         (WebCore::toWebCoreString):
3344         (WebCore):
3345         (WebCore::toWebCoreStringWithNullCheck):
3346         (WebCore::toWebCoreStringWithUndefinedOrNullCheck):
3347         (WebCore::toWebCoreAtomicString):
3348         (WebCore::toWebCoreAtomicStringWithNullCheck):
3349         * bindings/v8/V8StringResource.h:
3350         (WebCore::V8StringResource::V8StringResource):
3351         (V8StringResource):
3352
3353 2012-12-04  Abhishek Arya  <inferno@chromium.org>
3354
3355         Crash in WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode
3356         https://bugs.webkit.org/show_bug.cgi?id=103515
3357
3358         Reviewed by Ryosuke Niwa.
3359
3360         |current| is weak node pointer that iterates in the hierarchy chain
3361         between |highestAncestor| and |targetNode|. Script executed as part
3362         of iframe onload event can blow away the nodes and we no longer have
3363         |targetNode| in our descendants chain. So, we RefPtr |current| and bail
3364         out when |targetNode| stops being a part of descendant chain.
3365
3366         Test blocked on https://bugs.webkit.org/show_bug.cgi?id=104044.
3367
3368         * editing/ApplyStyleCommand.cpp:
3369         (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
3370
3371 2012-12-04  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
3372
3373         Avoid repeated calls to decorationColor on RenderObject::getTextDecorationColors
3374         https://bugs.webkit.org/show_bug.cgi?id=94131
3375
3376         Reviewed by Brent Fulgham.
3377
3378         Replaces repeated calls to decorationColor by adding a variable that reads the
3379         return value from that function just once on each loop and gets used upon need.
3380
3381         This change won't affect text decoration behavior, so current tests suffice.
3382
3383         * rendering/RenderObject.cpp:
3384         (WebCore::RenderObject::getTextDecorationColors):
3385
3386 2012-12-04  Alpha Lam  <hclam@chromium.org>
3387
3388         [chromium] Implement cache eviction logic in ImageDecodingStore
3389         https://bugs.webkit.org/show_bug.cgi?id=103480
3390
3391         Reviewed by James Robinson.
3392
3393         This patch implements these features in the new image cache:
3394         - Least-recently-used eviction logic
3395         - Setting cache limit (default is 32MB)
3396         - Remove cache entries when ImageFrameGenerator is removed
3397
3398         New tests in ImageDecodingTestTest. Also covered by platform/chromium/virtual/deferred.
3399
3400         * platform/graphics/chromium/ImageDecodingStore.cpp:
3401         (WebCore::ImageDecodingStore::ImageDecodingStore):
3402         (WebCore::ImageDecodingStore::~ImageDecodingStore):
3403         Code to assert that everything is cleaned up.
3404         (WebCore::ImageDecodingStore::lockCompleteCache):
3405         (WebCore::ImageDecodingStore::unlockCache):
3406         (WebCore::ImageDecodingStore::insertAndLockCache):
3407         (WebCore::ImageDecodingStore::removeCacheIndexedByGenerator):
3408         New method to remove all cache entries index by ImageFrameGenerator.
3409         (WebCore):
3410         (WebCore::ImageDecodingStore::setCacheLimitInBytes):
3411         (WebCore::ImageDecodingStore::memoryUsageInBytes):
3412         (WebCore::ImageDecodingStore::cacheEntries):
3413         (WebCore::ImageDecodingStore::prune):
3414         New code to implement LRU eviction logic.
3415         (WebCore::ImageDecodingStore::insertCacheInternal):
3416         New method to help new cache insertion. This is separately because it touches 3 containers.
3417         (WebCore::ImageDecodingStore::removeFromCacheInternal):
3418         New method to help remove a cache entry from containers.
3419         (WebCore::ImageDecodingStore::removeFromCacheListInternal):
3420         New helper method to help remove cache entry from doubly linked list.
3421         * platform/graphics/chromium/ImageDecodingStore.h:
3422         (ImageDecodingStore):
3423         (CacheEntry):
3424         (WebCore::ImageDecodingStore::CacheEntry::createAndUse):
3425         (WebCore::ImageDecodingStore::CacheEntry::CacheEntry):
3426         (WebCore::ImageDecodingStore::CacheEntry::~CacheEntry):
3427         (WebCore::ImageDecodingStore::CacheEntry::cacheKey):
3428         (WebCore::ImageDecodingStore::CacheEntry::cachedImage):
3429         (WebCore::ImageDecodingStore::CacheEntry::useCount):
3430         (WebCore::ImageDecodingStore::CacheEntry::incrementUseCount):
3431         (WebCore::ImageDecodingStore::CacheEntry::decrementUseCount):
3432         (WebCore::ImageDecodingStore::CacheEntry::memoryUsageInBytes):
3433         (WebCore::ImageDecodingStore::incrementMemoryUsage):
3434         (WebCore::ImageDecodingStore::decrementMemoryUsage):
3435         New helper methods.
3436         * platform/graphics/chromium/ImageFrameGenerator.cpp: