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