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