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