[Chromium] Decrease the number of conditional blocks in features.gypi
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-06-26  Ryosuke Niwa  <rniwa@webkit.org>
2
3         Stop calling node() and deprecatedEditingOffset() in comparePositions
4         https://bugs.webkit.org/show_bug.cgi?id=54535
5
6         Reviewed by Enrica Casucci.
7
8         Replaced deprecatedNode() and deprecatedEditingOffset() by containerNode() and computeOffsetInContainerNode()
9         in comparePositions().
10         
11         In addition, fixed a bunch of bugs in DeleteSelectionCommand::handleSpecialCaseBRDelete revealed by this change:
12         - Use node after position instead of deprecated node in determinig whether start and end positions at a br.
13         - Don't set m_startsAtEmptyLine true when BR is wrapped in a block element. The only reason this code had worked
14         was positions like (div, offset, 0) and (br, before) in <div><br> were treated differently, which we no longer do.
15
16         * editing/DeleteSelectionCommand.cpp:
17         (WebCore::DeleteSelectionCommand::handleSpecialCaseBRDelete):
18         * editing/htmlediting.cpp:
19         (WebCore::comparePositions):
20
21 2012-06-26  Christophe Dumez  <christophe.dumez@intel.com>
22
23         [EFL] Use eina_file_ls() in EFL implementation of FileSystem listDirectory()
24         https://bugs.webkit.org/show_bug.cgi?id=89976
25
26         Reviewed by Antonio Gomes.
27
28         Rewrite EFL implementation of Filesystem listDirectory() in order to
29         use eina_file_ls() instead of POSIX C functions. This results in
30         shorter code.
31
32         No new tests, behavior has not changed.
33
34         * platform/efl/FileSystemEfl.cpp:
35         (WebCore::listDirectory):
36
37 2012-06-26  Alice Cheng  <alice_cheng@apple.com>
38
39         Crash at WebCore::TextIterator::handleTextBox
40         https://bugs.webkit.org/show_bug.cgi?id=89526
41         <rdar://problem/10305315>
42
43         Reviewed by Darin Adler.
44
45         The range used for marking becomes invalid after SpellingCorrectionCommand, due to changes in the DOM made by ReplaceSelectionCommand. 
46         This invalid range caused marking to be incorrect, and Mail.app to crash when iterating through the invalid range.  To fix this,
47         recalculate the range for marking after SpellingCorrectionCommand.
48
49         Test: platform/mac/editing/spelling/autocorrection-blockquote-crash.html
50
51         * editing/AlternativeTextController.cpp:
52         (WebCore::AlternativeTextController::applyAlternativeTextToRange):
53         * editing/Editor.cpp:  (WebCore::Editor::markAndReplaceFor):
54         * testing/Internals.cpp:
55         (WebCore):
56         (WebCore::Internals::hasAutocorrectedMarker):
57         * testing/Internals.h: (Internals):
58         * testing/Internals.idl:
59
60 2012-06-26  Tom Sepez  <tsepez@chromium.org>
61
62         [chromium] HTML5 audio/video tags - loading http content from https page doesn't trigger warning.
63         https://bugs.webkit.org/show_bug.cgi?id=89906
64
65         Reviewed by Nate Chapin.
66
67         This patch treats mixed CachedRawResources as affecting the display of insecure content.
68
69         Tests: http/tests/security/mixedContent/insecure-audio-video-in-main-frame.html
70                http/tests/security/mixedContent/insecure-xhr-in-main-frame.html
71
72         * loader/cache/CachedResourceLoader.cpp:
73         (WebCore::CachedResourceLoader::checkInsecureContent):
74
75 2012-06-26  Joe Thomas  <joethomas@motorola.com>
76
77         background-size:0 shows as 1px instead of invisible
78         https://bugs.webkit.org/show_bug.cgi?id=86942
79
80         Reviewed by Eric Seidel.
81
82         As per the specification http://www.w3.org/TR/css3-background/#background-size, if the background image's width or height resolves to zero,
83         this causes the image not to be displayed. The effect should be the same as if it had been a transparent image.
84         This is also mentioned in http://www.w3.org/TR/2002/WD-css3-background-20020802/#background-size.
85
86         Test: fast/backgrounds/zero-background-size.html
87
88         * rendering/RenderBoxModelObject.cpp:
89         (WebCore::RenderBoxModelObject::calculateFillTileSize):
90
91 2012-06-26  Adam Klein  <adamk@chromium.org>
92
93         [v8] Clean up generated Dictionary-handling code
94         https://bugs.webkit.org/show_bug.cgi?id=89994
95
96         Reviewed by Adam Barth.
97
98         No change in behavior, so no new tests.
99
100         * bindings/scripts/CodeGeneratorV8.pm:
101         (GenerateParametersCheck):
102         * bindings/scripts/test/V8/V8TestObj.cpp:
103         (WebCore::TestObjV8Internal::optionsObjectCallback):
104
105 2012-06-26  Raymond Toy  <rtoy@google.com>
106
107         Include stdio.h when DEBUG_AUDIONODE_REFERENCES is set
108         https://bugs.webkit.org/show_bug.cgi?id=89997
109
110         Reviewed by Eric Seidel.
111
112         No new tests needed for a compile issue
113
114         * Modules/webaudio/AudioNode.cpp:  Include stdio.h
115
116 2012-06-26  No'am Rosenthal  <noam.rosenthal@nokia.com>
117
118         [Qt] Use premultiplied alpha when extracting image data in WebGL
119         https://bugs.webkit.org/show_bug.cgi?id=89937
120
121         Reviewed by Jocelyn Turcotte.
122
123         Perform conversion in QImage only if the image format is not ARGB32 or
124         ARGB32_Premultiplied. Otherwise, allow packPixels to perform the conversion if the formats
125         don't match, as packPixels already performs pixel-specific operations.
126
127         Covered by tests in LayoutTests/fast/canvas/webgl, e.g. webgl-composite-modes.html.
128
129         * platform/graphics/qt/GraphicsContext3DQt.cpp:
130         (WebCore::GraphicsContext3D::getImageData):
131
132 2012-06-26  Joshua Bell  <jsbell@chromium.org>
133
134         IndexedDB: Move method precondition checks to front end objects
135         https://bugs.webkit.org/show_bug.cgi?id=89377
136
137         Reviewed by Tony Chang.
138
139         Now that metadata exists on the front end, most of the pre-condition validation checks
140         done on IDB method calls from script can be moved to the front end which simplifies the
141         code significantly in the case of complex methods like IDBObjectStore::put().
142
143         Adds an internal "active" flag for transactions, although the behavior is not accurate
144         to the spec (it should only be true during event callbacks - http://webkit.org/b/89379).
145         The back-end methods can then be simplifed to just adding async tasks to the transaction,
146         and the front end methods can take care of all exception cases except for asynchronous
147         transaction abort which still requires plumbing back to the front end.
148
149         No functional changes - no new tests.
150
151         * Modules/indexeddb/IDBCursor.cpp:
152         (WebCore::IDBCursor::update): Migrate from IDBObjectStoreBackendImpl::put.
153         (WebCore::IDBCursor::advance): Add more explicit transaction-is-active check.
154         (WebCore::IDBCursor::continueFunction): Ditto.
155         (WebCore::IDBCursor::deleteFunction): Ditto.
156         (WebCore::IDBCursor::effectiveObjectStore): Convenience function (source may be store or index).
157         (WebCore):
158         * Modules/indexeddb/IDBCursor.h:
159         (WebCore::IDBCursor::isKeyCursor): Distinguish from IDBCursorWithValue.
160         (IDBCursor):
161         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
162         (WebCore::IDBCursorBackendImpl::update): Remove migrated check.
163         * Modules/indexeddb/IDBCursorWithValue.h:
164         (IDBCursorWithValue):
165         * Modules/indexeddb/IDBDatabase.cpp: Migrate checks.
166         (WebCore::IDBDatabase::createObjectStore):
167         (WebCore::IDBDatabase::deleteObjectStore):
168         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Replace checks with assertions.
169         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
170         (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
171         * Modules/indexeddb/IDBIndex.cpp: Add transaction-is-active checks.
172         (WebCore::IDBIndex::openCursor):
173         (WebCore::IDBIndex::count):
174         (WebCore::IDBIndex::openKeyCursor):
175         (WebCore::IDBIndex::get):
176         (WebCore::IDBIndex::getKey):
177         * Modules/indexeddb/IDBObjectStore.cpp: Migrate cehcks.
178         (WebCore::IDBObjectStore::get):
179         (WebCore::IDBObjectStore::add): Delegates to put(PutMode)
180         (WebCore::IDBObjectStore::put): Delegates to put(PutMode)
181         (WebCore): Adds put(PutMode) which has the unified checks migrated from
182         IDBObjectStoreBackendImpl::put.
183         (WebCore::IDBObjectStore::deleteFunction):
184         (WebCore::IDBObjectStore::clear):
185         (WebCore::IDBObjectStore::createIndex):
186         (WebCore::IDBObjectStore::deleteIndex):
187         (WebCore::IDBObjectStore::openCursor):
188         (WebCore::IDBObjectStore::count):
189         * Modules/indexeddb/IDBObjectStore.h: Adds put(PutMode).
190         (IDBObjectStore):
191         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
192         (WebCore::IDBObjectStoreBackendImpl::getInternal): Fix trace symbol.
193         (WebCore::IDBObjectStoreBackendImpl::put): Remove migrated checks.
194         (WebCore::IDBObjectStoreBackendImpl::createIndex): Remove migrated checks.
195         (WebCore::IDBObjectStoreBackendImpl::deleteIndex): Remove migrated checks.
196         * Modules/indexeddb/IDBTransaction.cpp: Add active flag tracking.
197         (WebCore::IDBTransaction::IDBTransaction):
198         (WebCore::IDBTransaction::abort):
199         (WebCore::IDBTransaction::onAbort):
200         (WebCore::IDBTransaction::onComplete):
201         * Modules/indexeddb/IDBTransaction.h:
202         (WebCore::IDBTransaction::isActive):
203         (WebCore::IDBTransaction::isReadOnly): Group IDL/non-IDL methods.
204         (IDBTransaction):
205
206 2012-06-26  Sheriff Bot  <webkit.review.bot@gmail.com>
207
208         Unreviewed, rolling out r121285.
209         http://trac.webkit.org/changeset/121285
210         https://bugs.webkit.org/show_bug.cgi?id=90014
211
212         "We misinterpreted 'size of the initial containing block'"
213         (Requested by tomz on #webkit).
214
215         * css/CSSCalculationValue.cpp:
216         (WebCore::CSSCalcValue::computeLengthPx):
217         (WebCore::CSSCalcPrimitiveValue::toCalcValue):
218         (WebCore::CSSCalcPrimitiveValue::computeLengthPx):
219         (WebCore::CSSCalcBinaryOperation::toCalcValue):
220         (WebCore::CSSCalcBinaryOperation::computeLengthPx):
221         * css/CSSCalculationValue.h:
222         (CSSCalcExpressionNode):
223         (WebCore::CSSCalcValue::toCalcValue):
224         (CSSCalcValue):
225         * css/CSSGradientValue.cpp:
226         (WebCore::CSSGradientValue::addStops):
227         (WebCore::positionFromValue):
228         (WebCore::CSSGradientValue::computeEndPoint):
229         (WebCore::CSSLinearGradientValue::createGradient):
230         (WebCore::CSSRadialGradientValue::resolveRadius):
231         (WebCore::CSSRadialGradientValue::createGradient):
232         * css/CSSGradientValue.h:
233         (CSSGradientValue):
234         (CSSRadialGradientValue):
235         * css/CSSPrimitiveValue.cpp:
236         (WebCore::CSSPrimitiveValue::computeLength):
237         (WebCore::CSSPrimitiveValue::computeLengthDouble):
238         * css/CSSPrimitiveValue.h:
239         (CSSPrimitiveValue):
240         * css/CSSPrimitiveValueMappings.h:
241         (WebCore::CSSPrimitiveValue::convertToLength):
242         * css/CSSToStyleMap.cpp:
243         (WebCore::CSSToStyleMap::mapFillSize):
244         (WebCore::CSSToStyleMap::mapFillXPosition):
245         (WebCore::CSSToStyleMap::mapFillYPosition):
246         (WebCore::CSSToStyleMap::mapNinePieceImageQuad):
247         * css/CSSToStyleMap.h:
248         (CSSToStyleMap):
249         * css/MediaQueryEvaluator.cpp:
250         (WebCore::computeLength):
251         (WebCore::device_heightMediaFeatureEval):
252         (WebCore::device_widthMediaFeatureEval):
253         (WebCore::heightMediaFeatureEval):
254         (WebCore::widthMediaFeatureEval):
255         * css/SVGCSSStyleSelector.cpp:
256         (WebCore::StyleResolver::applySVGProperty):
257         * css/StyleBuilder.cpp:
258         (WebCore::ApplyPropertyAuto::applyValue):
259         (WebCore::ApplyPropertyClip::convertToLength):
260         (WebCore::ApplyPropertyLength::applyValue):
261         (WebCore::ApplyPropertyBorderRadius::applyValue):
262         (WebCore::ApplyPropertyComputeLength::applyValue):
263         (WebCore::ApplyPropertyFontSize::applyValue):
264         (WebCore::ApplyPropertyLineHeight::applyValue):
265         (WebCore::ApplyPropertyPageSize::mmLength):
266         (WebCore::ApplyPropertyPageSize::inchLength):
267         (WebCore::ApplyPropertyPageSize::applyValue):
268         (WebCore::ApplyPropertyVerticalAlign::applyValue):
269         * css/StyleResolver.cpp:
270         (WebCore::StyleResolver::collectMatchingRulesForList):
271         * css/StyleResolver.h:
272         (StyleResolver):
273         * css/WebKitCSSMatrix.cpp:
274         (WebCore::WebKitCSSMatrix::setMatrixValue):
275
276 2012-06-26  Dave Tu  <dtu@chromium.org>
277
278         [chromium] Expose rendering statistics to WebWidget.
279         https://bugs.webkit.org/show_bug.cgi?id=88268
280
281         Reviewed by James Robinson.
282
283         The WebKit side of a basic framework for exposing rendering statistics
284         to Chromium's --enable-benchmarking extension.
285
286         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
287         (WebCore::CCLayerTreeHost::implFrameNumber):
288         * platform/graphics/chromium/cc/CCProxy.h:
289         (CCProxy):
290         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
291         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
292         (WebCore::CCThreadProxy::implFrameNumber):
293         (WebCore):
294         (WebCore::CCThreadProxy::implFrameNumberOnImplThread):
295         * platform/graphics/chromium/cc/CCThreadProxy.h:
296         (CCThreadProxy):
297
298 2012-06-26  Dave Tharp  <dtharp@codeaurora.org>
299
300         ietestcenter/css3/valuesandunits/units-000.htm asserts
301         https://bugs.webkit.org/show_bug.cgi?id=86176
302
303         Reviewed by Beth Dakin.
304
305         Modified computeLengthDouble() to handle vh, vw, and vmin units. Per the spec
306         (http://dev.w3.org/csswg/css3-values/#viewport-relative-lengths) viewport -percentage
307         lengths are "relative to the size of the initial containing block", which I read to be
308         the size of the parent element. Since parentStyle was not available in computeLengthDouble,
309         most of the changes for this patch involved "pushing down" the parentStyle pointer through
310         the network of computeLength methods and dependencies.
311
312         Tests: css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vh-border.html
313                css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vmin-border.html
314                css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vw-border.html
315
316         * css/CSSCalculationValue.cpp:
317         (WebCore::CSSCalcValue::computeLengthPx):
318         (WebCore::CSSCalcPrimitiveValue::toCalcValue):
319         (WebCore::CSSCalcPrimitiveValue::computeLengthPx):
320         (WebCore::CSSCalcBinaryOperation::toCalcValue):
321         (WebCore::CSSCalcBinaryOperation::computeLengthPx):
322         * css/CSSCalculationValue.h:
323         (CSSCalcExpressionNode):
324         (WebCore::CSSCalcValue::toCalcValue):
325         (CSSCalcValue):
326         * css/CSSGradientValue.cpp:
327         (WebCore::CSSGradientValue::addStops):
328         (WebCore::positionFromValue):
329         (WebCore::CSSGradientValue::computeEndPoint):
330         (WebCore::CSSLinearGradientValue::createGradient):
331         (WebCore::CSSRadialGradientValue::resolveRadius):
332         (WebCore::CSSRadialGradientValue::createGradient):
333         * css/CSSGradientValue.h:
334         (CSSGradientValue):
335         (CSSRadialGradientValue):
336         * css/CSSPrimitiveValue.cpp:
337         (WebCore::CSSPrimitiveValue::computeLength):
338         (WebCore::CSSPrimitiveValue::computeLengthDouble):
339         * css/CSSPrimitiveValue.h:
340         (CSSPrimitiveValue):
341         * css/CSSPrimitiveValueMappings.h:
342         (WebCore::CSSPrimitiveValue::convertToLength):
343         * css/CSSToStyleMap.cpp:
344         (WebCore::CSSToStyleMap::parentStyle):
345         (WebCore):
346         (WebCore::CSSToStyleMap::mapFillSize):
347         (WebCore::CSSToStyleMap::mapFillXPosition):
348         (WebCore::CSSToStyleMap::mapFillYPosition):
349         (WebCore::CSSToStyleMap::mapNinePieceImageQuad):
350         * css/CSSToStyleMap.h:
351         (CSSToStyleMap):
352         * css/MediaQueryEvaluator.cpp:
353         (WebCore::computeLength):
354         (WebCore::device_heightMediaFeatureEval):
355         (WebCore::device_widthMediaFeatureEval):
356         (WebCore::heightMediaFeatureEval):
357         (WebCore::widthMediaFeatureEval):
358         * css/SVGCSSStyleSelector.cpp:
359         (WebCore::StyleResolver::applySVGProperty):
360         * css/StyleBuilder.cpp:
361         (WebCore::ApplyPropertyAuto::applyValue):
362         (WebCore::ApplyPropertyClip::convertToLength):
363         (WebCore::ApplyPropertyLength::applyValue):
364         (WebCore::ApplyPropertyBorderRadius::applyValue):
365         (WebCore::ApplyPropertyComputeLength::applyValue):
366         (WebCore::ApplyPropertyFontSize::applyValue):
367         (WebCore::ApplyPropertyLineHeight::applyValue):
368         (WebCore::ApplyPropertyPageSize::mmLength):
369         (WebCore::ApplyPropertyPageSize::inchLength):
370         (WebCore::ApplyPropertyPageSize::applyValue):
371         (WebCore::ApplyPropertyVerticalAlign::applyValue):
372         * css/StyleResolver.cpp:
373         (WebCore::StyleResolver::collectMatchingRulesForList):
374         * css/StyleResolver.h:
375         (WebCore::StyleResolver::parentNode):
376         (StyleResolver):
377         * css/WebKitCSSMatrix.cpp:
378         (WebCore::WebKitCSSMatrix::setMatrixValue):
379
380 2012-06-25  James Robinson  <jamesr@chromium.org>
381
382         [chromium] Add WebLayer API for scrolling
383         https://bugs.webkit.org/show_bug.cgi?id=89913
384
385         Reviewed by Adrienne Walker.
386
387         Use new WebScrollableLayer type in ScrollingCoordinatorChromium. This file peeks "under the hood" a fair amount
388         since we don't have WebLayer API for scrollbar layers yet.
389
390         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
391         (WebCore::ScrollingCoordinatorPrivate::setScrollLayer):
392         (WebCore::ScrollingCoordinatorPrivate::setHorizontalScrollbarLayer):
393         (WebCore::ScrollingCoordinatorPrivate::setVerticalScrollbarLayer):
394         (WebCore::ScrollingCoordinatorPrivate::hasScrollLayer):
395         (WebCore::ScrollingCoordinatorPrivate::scrollLayer):
396         (ScrollingCoordinatorPrivate):
397         (WebCore::createScrollbarLayer):
398         (WebCore::ScrollingCoordinator::setScrollLayer):
399         (WebCore::ScrollingCoordinator::setNonFastScrollableRegion):
400         (WebCore::ScrollingCoordinator::setWheelEventHandlerCount):
401         (WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):
402
403 2012-06-26  James Robinson  <jamesr@chromium.org>
404
405         Unreviewed, rolling out r120501.
406         http://trac.webkit.org/changeset/120501
407         https://bugs.webkit.org/show_bug.cgi?id=89126
408
409         [skia] Fix is too heavy-handed
410
411         * platform/graphics/skia/ImageBufferSkia.cpp:
412         (WebCore::drawNeedsCopy):
413         * platform/graphics/skia/PlatformContextSkia.cpp:
414         (WebCore::PlatformContextSkia::PlatformContextSkia):
415         * platform/graphics/skia/PlatformContextSkia.h:
416         (PlatformContextSkia):
417         (WebCore::PlatformContextSkia::isDeferred):
418         (WebCore::PlatformContextSkia::setDeferred):
419
420 2012-06-26  Julien Chaffraix  <jchaffraix@webkit.org>
421
422         Crash in FixedTableLayout::layout
423         https://bugs.webkit.org/show_bug.cgi?id=88676
424
425         Unreviewed typo fix, pointed out by Darin Adler.
426
427         * rendering/AutoTableLayout.cpp:
428         (WebCore::AutoTableLayout::layout):
429         * rendering/FixedTableLayout.cpp:
430         (WebCore::FixedTableLayout::layout):
431
432 2012-06-26  Adam Klein  <adamk@chromium.org>
433
434         MutationObserver.observe should treat a null or undefined options argument as empty
435         https://bugs.webkit.org/show_bug.cgi?id=89992
436
437         Reviewed by Ojan Vafai.
438
439         The WebIDL spec was recently updated to treat null or undefined
440         Dictionary arguments the same as the empty dictionary. This patch
441         updates MutationObserver.observe to follow that spec.
442
443         Note that we still throw a SYNTAX_ERR in this case, since it's an
444         error not to pass one of "attributes", "childList", or "characterData"
445         as a key in the dictionary.
446
447         * dom/WebKitMutationObserver.cpp:
448         (WebCore::WebKitMutationObserver::observe):
449
450 2012-06-26  Ian Vollick  <vollick@chromium.org>
451
452         [chromium] The single thread proxy should not automatically tick new animations.
453         https://bugs.webkit.org/show_bug.cgi?id=89996
454
455         Reviewed by James Robinson.
456
457         No new tests. No change to existing functionality.
458
459         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
460         (WebCore::CCSingleThreadProxy::CCSingleThreadProxy):
461         (WebCore::CCSingleThreadProxy::initializeLayerRenderer):
462         (WebCore::CCSingleThreadProxy::didAddAnimation):
463         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
464         (WebCore):
465
466 2012-06-26  Julien Chaffraix  <jchaffraix@webkit.org>
467
468         Crash in FixedTableLayout::layout
469         https://bugs.webkit.org/show_bug.cgi?id=88676
470
471         Reviewed by Abhishek Arya.
472
473         Tests: fast/table/auto-table-layout-colgroup-removal-crash.html
474                fast/table/fixed-table-layout/colgroup-removal-crash.html
475                fast/table/fixed-table-layout/prepend-in-fixed-table.html
476
477         The issue comes from RenderTable not properly dirtying its preferred logical
478         widths. As the table layout codes (both fixed and auto), recomputes their internal
479         structures at computePreferredLogicalWidth, the internal structure doesn't match
480         the table sizing and we crash.
481
482         This fix adds a work-around in FixedTableLayout::layout (which matches AutoTableLayout).
483         The long-term fix would be to properly fix the logic but this is a lot safer, especially
484         since our logic is really not bullet-proof at the moment.
485
486         * rendering/FixedTableLayout.cpp:
487         (WebCore::FixedTableLayout::layout):
488         Added an internal structure recomputation, if we have drifted from our table's structure.
489         Also we need to update nEffCols if we call calcWidthArray.
490
491         * rendering/AutoTableLayout.cpp:
492         (WebCore::AutoTableLayout::layout):
493         Added a comment matching FixedTableLayout. The nEffCols is unneeded but kept for consistency
494         with FixedTableLayout.
495
496 2012-06-26  Ian Vollick  <vollick@chromium.org>
497
498         [chromium] Layer chromium should need a redraw after getting its first non-empty bounds.
499         https://bugs.webkit.org/show_bug.cgi?id=89784
500
501         Reviewed by James Robinson.
502
503         Previously, we'd only set needs redraw if the old bounds were zero,
504         and the new bounds were non-zero, but we should actually have 
505         checked that the old bounds were non-empty.
506
507         Unit test: LayerChromiumTestWithoutFixture.setBoundsTriggersSetNeedsRedrawAfterGettingNonEmptyBounds
508
509         * platform/graphics/chromium/LayerChromium.cpp:
510         (WebCore::LayerChromium::setBounds):
511
512 2012-06-26  Jia Pu  <jpu@apple.com>
513
514         On Mac, autocorrection sometimes fails to take place in Safari.
515         https://bugs.webkit.org/show_bug.cgi?id=89982
516
517         Reviewed by Darin Adler.
518
519         Existing test was turned off due to intermittent failure, which is caused by autocorrection result depending on user data
520         that may be altered by previous test runs. Hopefully we can turn the test back on once we have a way to make autocorrection
521         behave consistently.
522
523         Basically we should check the value of shouldCheckForCorrection, not shouldShowCorrectionPanel, to determine if we should
524         early return in markAndReplaceFor(). 
525
526         * editing/Editor.cpp:
527         (WebCore::Editor::markAndReplaceFor):
528
529 2012-06-26  Joe Thomas  <joethomas@motorola.com>
530
531         Do early-return when author and user styles are disabled.
532         https://bugs.webkit.org/show_bug.cgi?id=89947
533
534         Reviewed by Andreas Kling.
535
536         * dom/Document.cpp:
537         (WebCore::Document::collectActiveStylesheets):
538
539 2012-06-26  James Robinson  <jamesr@chromium.org>
540
541         [chromium] Remove dead compositor-related API from GraphicsContext3DPrivate / Extensions3DChromium
542         https://bugs.webkit.org/show_bug.cgi?id=89933
543
544         Reviewed by Kenneth Russell.
545
546         GraphicsContext3DPrivate and Extensions3DChromium had a fair amount of plumbing and boilerplate to support the
547         compositor's use of GraphicsContext3D. A number of extensions, etc, only make sense for a compositor context.
548         Since the compositor doesn't use GC3D any more, these are no longer needed.
549
550         * platform/chromium/support/Extensions3DChromium.cpp:
551         * platform/chromium/support/GraphicsContext3DChromium.cpp:
552         (WebCore::GraphicsContext3D::~GraphicsContext3D):
553         (WebCore::GraphicsContext3D::create):
554         * platform/chromium/support/GraphicsContext3DPrivate.cpp:
555         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
556         (WebCore::GraphicsContext3DPrivate::createGraphicsContextFromWebContext):
557         (WebCore::GrMemoryAllocationChangedCallbackAdapter::GrMemoryAllocationChangedCallbackAdapter):
558         (WebCore::GraphicsContext3DPrivate::grContext):
559         * platform/chromium/support/GraphicsContext3DPrivate.h:
560         (WebCore):
561         (GraphicsContext3DPrivate):
562         * platform/graphics/chromium/Extensions3DChromium.h:
563
564 2012-06-26  Yasuhiro Matsuda  <mazda@chromium.org>
565
566         [chromium] Add the workaround of IOSurface-related corruption during readback on Mac OS X.
567         https://bugs.webkit.org/show_bug.cgi?id=89797
568
569         Reviewed by James Robinson.
570
571         No new tests. This patch doesn't change behavior.
572
573         * platform/graphics/chromium/LayerRendererChromium.cpp:
574         (WebCore::LayerRendererChromium::getFramebufferPixels):
575
576 2012-06-26  Alexei Filippov  <alexeif@chromium.org>
577
578         Web Inspector: Native memory snapshots crash in debug mode.
579         https://bugs.webkit.org/show_bug.cgi?id=89977
580
581         Reviewed by Yury Semikhatsky.
582
583         * bindings/v8/V8DOMWrapper.cpp:
584         (WebCore::V8DOMWrapper::maybeDOMWrapper):
585
586 2012-06-26  Huang Dongsung  <luxtella@company100.net>
587
588         [Texmap] Bug fix typo about computing bytesPerLine in BitmapTextureGL.
589         https://bugs.webkit.org/show_bug.cgi?id=89924
590
591         "bytesPerLine == targetRect.width() / 4" is invalid.
592         This patch amended it into "bytesPerLine == targetRect.width() * 4".
593         Moreover, changed magic number 4 to bytesPerPixel.
594
595         Reviewed by Noam Rosenthal.
596
597         No new tests. Covered by existing tests.
598
599         * platform/graphics/texmap/TextureMapperGL.cpp:
600         (WebCore::BitmapTextureGL::updateContents):
601
602 2012-06-26  Roland Takacs  <takacs.roland@stud.u-szeged.hu>
603
604         Shader compiler unprepared to make ESSL output when GLES is used
605         https://bugs.webkit.org/show_bug.cgi?id=87718
606
607         Reviewed by Noam Rosenthal.
608
609         Defined a new member that says what type of output code must be generated
610         (SH_GLSL_OUTPUT, SH_ESSL_OUTPUT). It is set within the constructor.
611
612         * platform/graphics/ANGLEWebKitBridge.cpp:
613         (WebCore::ANGLEWebKitBridge::ANGLEWebKitBridge):
614         (WebCore::ANGLEWebKitBridge::validateShaderSource):
615         * platform/graphics/ANGLEWebKitBridge.h:
616         (ANGLEWebKitBridge):
617         * platform/graphics/qt/GraphicsContext3DQt.cpp:
618         (WebCore::GraphicsContext3D::GraphicsContext3D):
619
620 2012-06-26  Philip Rogers  <pdr@google.com>
621
622         Fix bug where animations failed to start
623         https://bugs.webkit.org/show_bug.cgi?id=89943
624
625         Reviewed by Nikolas Zimmermann.
626
627         The unpause code previously checked that the animations had not started
628         before un-setting the pause state. This meant that if an animation was
629         paused and unpaused before the animations started, it would remain in the
630         paused state. This patch simply reorders the unpause logic to fix this bug.
631
632         Test: svg/custom/animate-initial-pause-unpause.html
633
634         * svg/animation/SMILTimeContainer.cpp:
635         (WebCore::SMILTimeContainer::resume):
636
637 2012-06-26  Yury Semikhatsky  <yurys@chromium.org>
638
639         Web Inspector: popover is not shown for detached DOM nodes, not referenced directly from JS
640         https://bugs.webkit.org/show_bug.cgi?id=89955
641
642         Reviewed by Vsevolod Vlasov.
643
644         Show object popover for all heap snapshot nodes event for those whose
645         canBeQueried flag is false. We didn't show popover for such objects before
646         as it could lead to the backend crash. In the meantime the backend shouldn't
647         fail on such DOM wrappers and report an error if it cannot resolve
648         inspected object.
649
650         * inspector/front-end/HeapSnapshotGridNodes.js:
651         (WebInspector.HeapSnapshotGenericObjectNode):
652         (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
653         * inspector/front-end/HeapSnapshotView.js:
654         (WebInspector.HeapSnapshotView.prototype._getHoverAnchor):
655
656 2012-06-26  Christophe Dumez  <christophe.dumez@intel.com>
657
658         [EFL] Simplify SharedBuffer::createWithContentsOfFile() implementation
659         https://bugs.webkit.org/show_bug.cgi?id=89655
660
661         Reviewed by Csaba Osztrogonác.
662
663         Simplify the implementation of SharedBuffer::createWithContentsOfFile()
664         in EFL port.
665
666         No new test, no behavior change.
667
668         * platform/efl/SharedBufferEfl.cpp:
669         (WebCore::SharedBuffer::createWithContentsOfFile):
670
671 2012-06-26  Thiago Marcos P. Santos  <thiago.santos@intel.com>
672
673         [EFL] REGRESSION (r121163): fast/frames/iframe-access-screen-of-deleted.html crashes
674         https://bugs.webkit.org/show_bug.cgi?id=89964
675
676         Reviewed by Andreas Kling.
677
678         Added missing null pointer check.
679
680         * platform/efl/PlatformScreenEfl.cpp:
681         (WebCore::screenDepth):
682         (WebCore::screenDepthPerComponent):
683
684 2012-06-26  Taiju Tsuiki  <tzik@chromium.org>
685
686         Web Inspector: Add requestMetadata command and metadataReceived event to FileSystem
687         https://bugs.webkit.org/show_bug.cgi?id=87856
688
689         Reviewed by Yury Semikhatsky.
690
691         Test: http/tests/inspector/filesystem/get-metadata.html
692
693         * inspector/Inspector.json:
694         * inspector/InspectorFileSystemAgent.cpp:
695         (WebCore):
696         (WebCore::InspectorFileSystemAgent::requestFileSystemRoot):
697         (WebCore::InspectorFileSystemAgent::requestDirectoryContent):
698         (WebCore::InspectorFileSystemAgent::requestMetadata):
699         * inspector/InspectorFileSystemAgent.h:
700         (InspectorFileSystemAgent):
701         * inspector/front-end/FileSystemModel.js:
702         (WebInspector.FileSystemModel.prototype._directoryContentReceived):
703         (WebInspector.FileSystemModel.prototype.requestMetadata):
704         (WebInspector.FileSystemModel.Entry.prototype.get isDirectory):
705         (WebInspector.FileSystemModel.Entry.prototype.requestMetadata):
706         (WebInspector.FileSystemRequestManager):
707         (WebInspector.FileSystemRequestManager.prototype._directoryContentReceived):
708         (WebInspector.FileSystemRequestManager.prototype.requestMetadata.requestAccepted):
709         (WebInspector.FileSystemRequestManager.prototype.requestMetadata):
710         (WebInspector.FileSystemRequestManager.prototype._metadataReceived):
711         (WebInspector.FileSystemDispatcher.prototype.directoryContentReceived):
712         (WebInspector.FileSystemDispatcher.prototype.metadataReceived):
713
714 2012-06-25  Jocelyn Turcotte  <turcotte.j@gmail.com>
715
716         [Qt] GraphicsSurface: Fix tile update artifacts on Mac
717         https://bugs.webkit.org/show_bug.cgi?id=89887
718
719         Reviewed by Noam Rosenthal.
720
721         * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
722         (WebCore::GraphicsSurface::platformCopyToGLTexture):
723
724 2012-06-25  Jocelyn Turcotte  <turcotte.j@gmail.com>
725
726         GraphicsSurface: Fix IOSurfaceLock failures on Intel video cards.
727         https://bugs.webkit.org/show_bug.cgi?id=89883
728
729         Reviewed by Noam Rosenthal.
730
731         Follow the documentation which says: "If locking the buffer requires a readback,
732         the lock will fail with an error return of kIOReturnCannotLock."
733         Also make sure that we use the same set of flags when locking and unlocking
734         for simplicity and to follow this requirement on the kIOSurfaceLockReadOnly flag.
735
736         * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
737         (WebCore::GraphicsSurface::platformLock):
738         (WebCore::GraphicsSurface::platformUnlock):
739
740 2012-06-26  Philip Rogers  <pdr@google.com>
741
742         Fix setCurrentTime for paused animations
743         https://bugs.webkit.org/show_bug.cgi?id=81350
744
745         Reviewed by Nikolas Zimmermann.
746
747         SMILTimeContainer::setElapsed was not resetting the pause time, breaking
748         setCurrentTime if the animation was paused.
749
750         Test: svg/custom/animate-pause-resume.html
751
752         * svg/animation/SMILTimeContainer.cpp:
753         (WebCore::SMILTimeContainer::setElapsed):
754
755 2012-06-26  Csaba Osztrogonác  <ossy@webkit.org>
756
757         [Qt] Unreviewed typo fix after r121144.
758
759         * Target.pri:
760
761 2012-06-26  Yury Semikhatsky  <yurys@chromium.org>
762
763         Web Inspector: columns in heap snapshot summary view are not resizable
764         https://bugs.webkit.org/show_bug.cgi?id=89952
765
766         Reviewed by Vsevolod Vlasov.
767
768         * inspector/front-end/HeapSnapshotDataGrids.js:
769         (WebInspector.HeapSnapshotViewportDataGrid.prototype.onResize): overriden method
770         should call overriden one to make sure column resizers are added to the DataGrid.
771
772 2012-06-26  Kent Tamura  <tkent@chromium.org>
773
774         Refactoring: Simplify FormController interface
775         https://bugs.webkit.org/show_bug.cgi?id=89951
776
777         Reviewed by Kentaro Hara.
778
779         - Remove FormController::hasStateForNewFormElements()
780           takeStateForFormElement() can check the emptiness, and return an empty
781           FormControlState.
782
783         - Change the argument of takeStateForFormElement()
784           Passing just one HTMLFormControlElementWithState object instead of two
785           AtomicStringImpl. This is a preparation to use
786           HTMLFormControlElementWithState::form() in FormController.
787
788         No new tests. Just a refactoring.
789
790         * html/FormController.cpp:
791         (WebCore::FormController::takeStateForFormElement):
792         * html/FormController.h:
793         (FormController):
794         * html/HTMLFormControlElementWithState.cpp:
795         (WebCore::HTMLFormControlElementWithState::finishParsingChildren):
796
797 2012-06-26  Dominic Cooney  <dominicc@chromium.org>
798
799         WheelEvent should inherit from MouseEvent
800         https://bugs.webkit.org/show_bug.cgi?id=76104
801
802         Reviewed by Kentaro Hara.
803
804         The spec for WheelEvent is
805         <http://www.w3.org/TR/DOM-Level-3-Events/#webidl-events-WheelEvent>
806
807         Tests: fast/events/event-creation.html
808                http://samples.msdn.microsoft.com/ietestcenter/dominheritance/showdominheritancetest.htm?Prototype_WheelEvent
809
810         * bindings/objc/PublicDOMInterfaces.h: Remove redundant MouseEvent API from WheelEvent
811         * bindings/scripts/CodeGeneratorObjC.pm: MouseEvents are Events
812         * dom/MouseEvent.h: Expose no-arg constructor to WheelEvent
813         * dom/WheelEvent.cpp:
814         (WebCore::WheelEvent::WheelEvent): Call MouseEvent superconstructor
815         (WebCore::WheelEvent::isMouseEvent): Existing callers use this just for
816         moves and clicks, ie the type is exactly MouseEvent.
817         * dom/WheelEvent.h: Extend MouseEvent
818         * dom/WheelEvent.idl: "
819
820 2012-06-25  Ryosuke Niwa  <rniwa@webkit.org>
821
822         Get rid of firstItem and nextItem from HTMLCollection
823         https://bugs.webkit.org/show_bug.cgi?id=89923
824
825         Reviewed by Andreas Kling.
826
827         Removed HTMLCollection::firstItem and HTMLCollection::nextItem.
828         Also added hasAnyItem() and hasExactlyOneItem() to HTMLCollection so that named getter on Document
829         doesn't need to compute the full length before returning a HTMLCollection.
830
831         * accessibility/AccessibilityRenderObject.cpp:
832         (WebCore::AccessibilityRenderObject::getDocumentLinks):
833         * bindings/js/JSDOMWindowCustom.cpp:
834         (WebCore::namedItemGetter):
835         * bindings/js/JSHTMLDocumentCustom.cpp:
836         (WebCore::JSHTMLDocument::nameGetter):
837         * bindings/v8/custom/V8DOMWindowCustom.cpp:
838         (WebCore::V8DOMWindow::namedPropertyGetter):
839         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
840         (WebCore::V8HTMLDocument::GetNamedProperty):
841         * dom/Document.cpp:
842         (WebCore::Document::openSearchDescriptionURL):
843         * html/HTMLCollection.cpp:
844         (WebCore::shouldIncludeChildren):
845         (WebCore::HTMLCollection::HTMLCollection):
846         (WebCore):
847         (WebCore::HTMLCollection::item):
848         * html/HTMLCollection.h:
849         (HTMLCollection):
850         (WebCore::HTMLCollection::hasAnyItem):
851         (WebCore::HTMLCollection::hasExactlyOneItem):
852         * html/HTMLMapElement.cpp:
853         (WebCore::HTMLMapElement::imageElement):
854
855 2012-06-25  Pratik Solanki  <psolanki@apple.com>
856
857         JavaScript resources have low priority when SVG is enabled
858         https://bugs.webkit.org/show_bug.cgi?id=89932
859         <rdar://problem/11741325>
860
861         Reviewed by Adele Peterson.
862
863         r108785 inadvertently lowered the priority of JavaScript resources. Fix the code so we set
864         the correct priority for scripts. Also, move the code so that all ifdefs are together at the
865         bottom to make it a bit easier to read..
866
867         * loader/cache/CachedResource.cpp:
868         (WebCore::defaultPriorityForResourceType):
869
870 2012-06-25  Luke Macpherson  <macpherson@chromium.org>
871
872         Add runtime flag to enable/disable CSS variables (in addition to existing compile-time flag).
873         https://bugs.webkit.org/show_bug.cgi?id=89542
874
875         Reviewed by Dimitri Glazkov.
876
877         Added fast/css/variables/build-supports-variables.html to test runtime flag in test environment.
878         Updated all other css variables tests to enable the runtime flag from JS.
879
880         * css/CSSParser.cpp:
881         (WebCore::CSSParserContext::CSSParserContext):
882         (WebCore::operator==):
883         (WebCore::CSSParser::cssVariablesEnabled):
884         (WebCore):
885         (WebCore::CSSParser::detectDashToken):
886         (WebCore::CSSParser::lex):
887         * css/CSSParser.h:
888         (CSSParser):
889         * css/CSSParserMode.h:
890         (CSSParserContext):
891         * page/Settings.h:
892         (Settings):
893         (WebCore::Settings::setCSSVariablesEnabled):
894         (WebCore::Settings::cssVariablesEnabled):
895
896 2012-06-25  Simon Hausmann  <simon.hausmann@nokia.com>
897
898         Unreviewed build fix after r121223.
899
900         Fix the --minimal Qt build, TextureMapperGL now requires WebGL to be enabled.
901
902         * Target.pri:
903         * WebCore.pri:
904
905 2012-06-25  Dana Jansens  <danakj@chromium.org>
906
907         [chromium] CCOverdrawMetrics should use the deviceViewportSize to count actual pixels
908         https://bugs.webkit.org/show_bug.cgi?id=89922
909
910         Reviewed by Adrienne Walker.
911
912         * platform/graphics/chromium/cc/CCOverdrawMetrics.cpp:
913         (WebCore::CCOverdrawMetrics::recordMetricsInternal):
914
915 2012-06-25  Huang Dongsung  <luxtella@company100.net>
916
917         [Texmap] Remove platform specific code in BitmapImageGL::updateContents by using
918         GraphicsContext3D::extractImageData.
919         https://bugs.webkit.org/show_bug.cgi?id=89867
920
921         Reviewed by Noam Rosenthal.
922
923         No new tests. Covered by existing tests.
924
925         * platform/graphics/texmap/TextureMapperGL.cpp:
926         (WebCore):
927         (WebCore::BitmapTextureGL::didReset):
928         (WebCore::BitmapTextureGL::updateContents):
929
930 2012-06-25  James Robinson  <jamesr@chromium.org>
931
932         [chromium] Remove uncalled ManagedTexture::framebufferTexture2D
933         https://bugs.webkit.org/show_bug.cgi?id=89930
934
935         Reviewed by Adrienne Walker.
936
937         Removing dead code.
938
939         * platform/graphics/chromium/ManagedTexture.cpp:
940         * platform/graphics/chromium/ManagedTexture.h:
941         (ManagedTexture):
942
943 2012-06-25  Sheriff Bot  <webkit.review.bot@gmail.com>
944
945         Unreviewed, rolling out r121206.
946         http://trac.webkit.org/changeset/121206
947         https://bugs.webkit.org/show_bug.cgi?id=89935
948
949         [chromium] webkit_unit_tests
950         WebViewTest.MHTMLWithMissingResourceFinishesLoading crash
951         (Requested by ukai on #webkit).
952
953         * loader/DocumentLoader.cpp:
954         (WebCore::DocumentLoader::scheduleArchiveLoad):
955
956 2012-06-25  Anantanarayanan G Iyengar  <ananta@chromium.org>
957
958         [chromium] Ensure that the compositor code which is aware of flipped status of video-textures
959         per platform executes on Windows.
960         https://bugs.webkit.org/show_bug.cgi?id=89914
961         
962         Reviewed by James Robinson.
963
964         No new tests. (HW video decode is still only being tested manually for orientation)
965
966         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
967         (WebCore::CCVideoLayerImpl::appendQuads):
968
969 2012-06-25  Sheriff Bot  <webkit.review.bot@gmail.com>
970
971         Unreviewed, rolling out r121176.
972         http://trac.webkit.org/changeset/121176
973         https://bugs.webkit.org/show_bug.cgi?id=89934
974
975         [chromium] browser_tests assert failed:
976         FATAL:native_theme_win.cc(1541)] Check failed: false. Invalid
977         part: 16 (Requested by ukai on #webkit).
978
979         * platform/chromium/PlatformSupport.h:
980         (PlatformSupport):
981         * platform/chromium/ScrollbarThemeChromiumWin.cpp:
982         (WebCore::ScrollbarThemeChromiumWin::buttonSize):
983
984 2012-06-25  Shinya Kawanaka  <shinyak@chromium.org>
985
986         [Shadow] Deleting list distributed to Shadow DOM does not work correctly.
987         https://bugs.webkit.org/show_bug.cgi?id=89170
988
989         Reviewed by Ryosuke Niwa.
990
991         When deleting several elements distributed to Shadow DOM, some renderers might be gone in
992         processing deletion. To fix them, we should call isContentEditable() instead of rendererIsEditable().
993
994         Test: editing/shadow/delete-list-in-shadow.html
995
996         * editing/DeleteFromTextNodeCommand.cpp:
997         (WebCore::DeleteFromTextNodeCommand::doApply):
998
999 2012-06-25  Min Qin  <qinmin@chromium.org>
1000
1001         [Chromium] Fix the css stylesheet for android media controls after recent changes
1002         https://bugs.webkit.org/show_bug.cgi?id=89910
1003
1004         Reviewed by Adam Barth.
1005
1006         After the recent changes on upstream chrome video controls, we need to change the css style sheet for chrome on android.
1007         No tests needed, just css changes.
1008
1009         * css/mediaControlsChromiumAndroid.css:
1010         (audio):
1011         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
1012         (::-webkit-media-controls):
1013         (audio::-webkit-media-controls-enclosure, video::-webkit-media-controls-enclosure):
1014         (video::-webkit-media-controls-enclosure):
1015         (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
1016         (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
1017         (audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display):
1018         (audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline):
1019         (video::-webkit-media-controls-fullscreen-button):
1020         (input[type="range"]::-webkit-media-slider-container):
1021         (input[type="range"]::-webkit-media-slider-thumb):
1022         (audio::-webkit-media-controls-fullscreen-button):
1023
1024 2012-06-25  Huang Dongsung  <luxtella@company100.net>
1025
1026         [Qt] Avoid a deep copy of QImage in GraphicsContext3D::getImageData.
1027         https://bugs.webkit.org/show_bug.cgi?id=89865
1028
1029         Reviewed by Noam Rosenthal.
1030
1031         No new tests. Covered by existing tests.
1032
1033         * platform/graphics/qt/GraphicsContext3DQt.cpp:
1034         (WebCore::GraphicsContext3D::getImageData):
1035
1036 2012-06-25  Nick Carter  <nick@chromium.org>
1037
1038         Reduce memory footprint of BitmapImage Vectors.
1039         https://bugs.webkit.org/show_bug.cgi?id=86563
1040
1041         Reviewed by Simon Fraser.
1042
1043         No new tests, affects template params only.
1044
1045         * platform/graphics/BitmapImage.h:
1046         (BitmapImage): use an inline capacity of 1 for the image frame Vector 
1047         * platform/image-decoders/ImageDecoder.h:
1048         (ImageDecoder): use an inline capacity of 1 for the image frame Vector
1049
1050 2012-06-25  Kent Tamura  <tkent@chromium.org>
1051
1052         Unreviewed, rolling out r121145.
1053         http://trac.webkit.org/changeset/121145
1054         https://bugs.webkit.org/show_bug.cgi?id=89847
1055
1056         Had an objection for the change.
1057
1058         * html/FormController.cpp:
1059         (WebCore):
1060         (WebCore::FormControlState::serializeTo):
1061         (WebCore::FormControlState::deserialize):
1062         (WebCore::formStateSignature):
1063         (WebCore::FormController::formElementsState):
1064         (WebCore::FormController::setStateForNewFormElements):
1065         * html/FormController.h:
1066         (FormControlState):
1067         * html/shadow/CalendarPickerElement.cpp:
1068         (WebCore::addJavaScriptString):
1069
1070 2012-06-25  Jay Civelli  <jcivelli@chromium.org>
1071
1072         Fix progress load reporting for MHTML documents.
1073
1074         MHTML documents containing references to resources they don't include
1075         never finish loading.
1076         https://bugs.webkit.org/show_bug.cgi?id=71859
1077
1078         Reviewed by Nate Chapin.
1079
1080         * loader/DocumentLoader.cpp:
1081         (WebCore::DocumentLoader::scheduleArchiveLoad):
1082
1083 2012-06-25  James Robinson  <jamesr@chromium.org>
1084
1085         [chromium] Use WebGraphicsContext3D in compositor implementation
1086         https://bugs.webkit.org/show_bug.cgi?id=89700
1087
1088         Reviewed by Adrienne Walker.
1089
1090         This converts the compositor implementation from using WebCore::GraphicsContext3D to using the Platform-provided
1091         WebGraphicsContext3D. This removes several unnecessary layers of indirection/wrapping and cuts down the
1092         compositor's implementation dependencies. GraphicsContext3D.h is still widely used to provide GL enum values.
1093         Most of the changes are purely mechanical - changing type names and the like.
1094
1095         Ownership is changed a bit. Instead of multiple components holding references to the compositor's context, the
1096         context is now owned by the CCGraphicsContext, which is now owned directly by CCLayerTreeHostImpl.
1097         CCLayerTreeHostImpl also has ownership of its CCRenderer (LayerRendererChromium in 3D mode) and passes a
1098         non-owning pointer down to the CCRenderer.
1099
1100         Extension checking is a bit different. The compositor does not (and never has) used extensions provided by
1101         WebGL's request/ensure mechanism. It simply checks for the existence of extensions it needs in the GL_EXTENSIONS
1102         string.
1103
1104         FrameBufferSkPictureCanvasLayerTextureUpdater had to be patched as well, since it was grabbing a GrContext off
1105         of the compositor's GraphicsContext3D. This caused many problems. It was inefficient, since it required a full
1106         state flush when switching between ganesh and compositor calls. The gpu memory management was completely broken
1107         since the compositor clobbered ganesh's onMemoryAllocationChanged callback. This moves FBSkPCLTU over to using
1108         the appropriate SharedGraphicsContext3D, like filters.
1109
1110         * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp:
1111         (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::Texture::updateRect):
1112         (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::updateTextureRect):
1113         * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.h:
1114         (FrameBufferSkPictureCanvasLayerTextureUpdater):
1115         * platform/graphics/chromium/GeometryBinding.cpp:
1116         (WebCore::GeometryBinding::GeometryBinding):
1117         * platform/graphics/chromium/GeometryBinding.h:
1118         (WebKit):
1119         (GeometryBinding):
1120         (WebCore::GeometryBinding::context):
1121         * platform/graphics/chromium/LayerRendererChromium.cpp:
1122         (WebCore::LayerRendererChromium::create):
1123         (WebCore::LayerRendererChromium::LayerRendererChromium):
1124         (WebCore::LayerRendererChromium::initialize):
1125         (WebCore::LayerRendererChromium::~LayerRendererChromium):
1126         (WebCore::LayerRendererChromium::context):
1127         (WebCore::LayerRendererChromium::debugGLCall):
1128         (WebCore::LayerRendererChromium::setVisible):
1129         (WebCore::LayerRendererChromium::drawStreamVideoQuad):
1130         (WebCore::LayerRendererChromium::drawHeadsUpDisplay):
1131         (WebCore::LayerRendererChromium::swapBuffers):
1132         (WebCore::LayerRendererChromium::onMemoryAllocationChanged):
1133         (WebCore):
1134         (WebCore::LayerRendererChromium::onMemoryAllocationChangedOnImplThread):
1135         (WebCore::LayerRendererChromium::discardFramebuffer):
1136         (WebCore::LayerRendererChromium::ensureFramebuffer):
1137         (WebCore::LayerRendererChromium::onContextLost):
1138         (WebCore::LayerRendererChromium::getFramebufferPixels):
1139         (WebCore::LayerRendererChromium::getFramebufferTexture):
1140         (WebCore::LayerRendererChromium::bindFramebufferToTexture):
1141         (WebCore::LayerRendererChromium::initializeSharedObjects):
1142         (WebCore::LayerRendererChromium::tileCheckerboardProgram):
1143         (WebCore::LayerRendererChromium::solidColorProgram):
1144         (WebCore::LayerRendererChromium::headsUpDisplayProgram):
1145         (WebCore::LayerRendererChromium::renderPassProgram):
1146         (WebCore::LayerRendererChromium::renderPassProgramAA):
1147         (WebCore::LayerRendererChromium::renderPassMaskProgram):
1148         (WebCore::LayerRendererChromium::renderPassMaskProgramAA):
1149         (WebCore::LayerRendererChromium::tileProgram):
1150         (WebCore::LayerRendererChromium::tileProgramOpaque):
1151         (WebCore::LayerRendererChromium::tileProgramAA):
1152         (WebCore::LayerRendererChromium::tileProgramSwizzle):
1153         (WebCore::LayerRendererChromium::tileProgramSwizzleOpaque):
1154         (WebCore::LayerRendererChromium::tileProgramSwizzleAA):
1155         (WebCore::LayerRendererChromium::textureProgram):
1156         (WebCore::LayerRendererChromium::textureProgramFlip):
1157         (WebCore::LayerRendererChromium::textureIOSurfaceProgram):
1158         (WebCore::LayerRendererChromium::videoYUVProgram):
1159         (WebCore::LayerRendererChromium::videoStreamTextureProgram):
1160         (WebCore::LayerRendererChromium::cleanupSharedObjects):
1161         (WebCore::LayerRendererChromium::isContextLost):
1162         * platform/graphics/chromium/LayerRendererChromium.h:
1163         (WebKit):
1164         (WebCore):
1165         (LayerRendererChromium):
1166         (WebCore::LayerRendererChromium::isFramebufferDiscarded):
1167         * platform/graphics/chromium/LayerTextureSubImage.cpp:
1168         (WebCore::LayerTextureSubImage::uploadWithTexSubImage):
1169         (WebCore::LayerTextureSubImage::uploadWithMapTexSubImage):
1170         * platform/graphics/chromium/ManagedTexture.cpp:
1171         (WebCore::ManagedTexture::bindTexture):
1172         (WebCore::ManagedTexture::framebufferTexture2D):
1173         * platform/graphics/chromium/PlatformColor.h:
1174         (WebCore::PlatformColor::bestTextureFormat):
1175         * platform/graphics/chromium/ProgramBinding.cpp:
1176         (WebCore::contextLost):
1177         (WebCore::ProgramBindingBase::init):
1178         (WebCore::ProgramBindingBase::cleanup):
1179         (WebCore::ProgramBindingBase::loadShader):
1180         (WebCore::ProgramBindingBase::createShaderProgram):
1181         * platform/graphics/chromium/ProgramBinding.h:
1182         (WebKit):
1183         (ProgramBindingBase):
1184         (WebCore::ProgramBinding::ProgramBinding):
1185         (WebCore::ProgramBinding::initialize):
1186         * platform/graphics/chromium/ShaderChromium.cpp:
1187         (WebCore::VertexShaderPosTex::init):
1188         (WebCore::VertexShaderPosTexYUVStretch::init):
1189         (WebCore::VertexShaderPos::init):
1190         (WebCore::VertexShaderPosTexTransform::init):
1191         (WebCore::VertexShaderQuad::init):
1192         (WebCore::VertexShaderTile::init):
1193         (WebCore::VertexShaderVideoTransform::init):
1194         (WebCore::FragmentTexAlphaBinding::init):
1195         (WebCore::FragmentTexOpaqueBinding::init):
1196         (WebCore::FragmentShaderOESImageExternal::init):
1197         (WebCore::FragmentShaderRGBATexAlphaAA::init):
1198         (WebCore::FragmentTexClampAlphaAABinding::init):
1199         (WebCore::FragmentShaderRGBATexAlphaMask::init):
1200         (WebCore::FragmentShaderRGBATexAlphaMaskAA::init):
1201         (WebCore::FragmentShaderYUVVideo::init):
1202         (WebCore::FragmentShaderColor::init):
1203         (WebCore::FragmentShaderCheckerboard::init):
1204         * platform/graphics/chromium/ShaderChromium.h:
1205         (WebKit):
1206         (VertexShaderPosTex):
1207         (VertexShaderPosTexYUVStretch):
1208         (VertexShaderPos):
1209         (WebCore::VertexShaderPosTexIdentity::init):
1210         (VertexShaderPosTexTransform):
1211         (VertexShaderQuad):
1212         (VertexShaderTile):
1213         (VertexShaderVideoTransform):
1214         (FragmentTexAlphaBinding):
1215         (FragmentTexOpaqueBinding):
1216         (FragmentShaderOESImageExternal):
1217         (FragmentShaderRGBATexAlphaAA):
1218         (FragmentTexClampAlphaAABinding):
1219         (FragmentShaderRGBATexAlphaMask):
1220         (FragmentShaderRGBATexAlphaMaskAA):
1221         (FragmentShaderYUVVideo):
1222         (FragmentShaderColor):
1223         (FragmentShaderCheckerboard):
1224         * platform/graphics/chromium/TextureCopier.cpp:
1225         (WebCore::AcceleratedTextureCopier::AcceleratedTextureCopier):
1226         (WebCore::AcceleratedTextureCopier::~AcceleratedTextureCopier):
1227         (WebCore::AcceleratedTextureCopier::copyTexture):
1228         * platform/graphics/chromium/TextureCopier.h:
1229         (WebKit):
1230         (WebCore):
1231         (WebCore::AcceleratedTextureCopier::create):
1232         (AcceleratedTextureCopier):
1233         * platform/graphics/chromium/TextureManager.h:
1234         * platform/graphics/chromium/ThrottledTextureUploader.cpp:
1235         (WebCore::ThrottledTextureUploader::Query::Query):
1236         (WebCore::ThrottledTextureUploader::Query::~Query):
1237         (WebCore::ThrottledTextureUploader::Query::begin):
1238         (WebCore::ThrottledTextureUploader::Query::end):
1239         (WebCore::ThrottledTextureUploader::Query::isPending):
1240         (WebCore::ThrottledTextureUploader::Query::wait):
1241         (WebCore::ThrottledTextureUploader::ThrottledTextureUploader):
1242         * platform/graphics/chromium/ThrottledTextureUploader.h:
1243         (WebKit):
1244         (WebCore::ThrottledTextureUploader::create):
1245         (WebCore::ThrottledTextureUploader::Query::create):
1246         (Query):
1247         (ThrottledTextureUploader):
1248         * platform/graphics/chromium/TrackingTextureAllocator.cpp:
1249         (WebCore::TrackingTextureAllocator::TrackingTextureAllocator):
1250         (WebCore::TrackingTextureAllocator::createTexture):
1251         (WebCore::TrackingTextureAllocator::deleteTexture):
1252         (WebCore::TrackingTextureAllocator::deleteAllTextures):
1253         * platform/graphics/chromium/TrackingTextureAllocator.h:
1254         (WebKit):
1255         (WebCore::TrackingTextureAllocator::create):
1256         (TrackingTextureAllocator):
1257         * platform/graphics/chromium/cc/CCGraphicsContext.h:
1258         (CCGraphicsContext):
1259         (WebCore::CCGraphicsContext::create2D):
1260         (WebCore::CCGraphicsContext::create3D):
1261         (WebCore::CCGraphicsContext::context3D):
1262         (WebCore::CCGraphicsContext::CCGraphicsContext):
1263         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
1264         (WebCore::CCHeadsUpDisplay::draw):
1265         * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp:
1266         (WebCore::CCIOSurfaceLayerImpl::~CCIOSurfaceLayerImpl):
1267         (WebCore::CCIOSurfaceLayerImpl::willDraw):
1268         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1269         (WebCore::CCLayerTreeHost::createContext):
1270         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1271         (CCLayerTreeHostClient):
1272         (WebCore::LayerRendererCapabilities::LayerRendererCapabilities):
1273         (LayerRendererCapabilities):
1274         (WebCore::CCLayerTreeHost::needsSharedContext):
1275         (CCLayerTreeHost):
1276         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1277         (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer):
1278         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1279         (CCLayerTreeHostImpl):
1280         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
1281         (WebCore::CCSingleThreadProxy::initializeContext):
1282         (WebCore::CCSingleThreadProxy::recreateContext):
1283         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
1284         * platform/graphics/chromium/cc/CCTextureUpdater.cpp:
1285         (WebCore::CCTextureUpdater::update):
1286         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1287         (WebCore::CCThreadProxy::initializeContext):
1288         (WebCore::CCThreadProxy::recreateContext):
1289         (WebCore::CCThreadProxy::beginFrame):
1290         (WebCore::CCThreadProxy::initializeContextOnImplThread):
1291         (WebCore::CCThreadProxy::recreateContextOnImplThread):
1292         * platform/graphics/chromium/cc/CCThreadProxy.h:
1293         (CCThreadProxy):
1294         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
1295         (WebCore::CCVideoLayerImpl::FramePlane::allocateData):
1296         (WebCore::CCVideoLayerImpl::FramePlane::freeData):
1297         (WebCore::CCVideoLayerImpl::copyPlaneData):
1298
1299 2012-06-25  Adrienne Walker  <enne@google.com>
1300
1301         [chromium] Make CCThreadProxy not draw a frame mid-commit
1302         https://bugs.webkit.org/show_bug.cgi?id=89905
1303
1304         Reviewed by James Robinson.
1305
1306         If commitComplete is not called before the next frame goes up, then
1307         then the max scroll position on the root scroll layer is not updated.
1308         This causes the compositor-side scrollbar to have an incorrect
1309         visibleSize, causing the thumbRect to become stretched, relative to
1310         when it was originally painted.
1311
1312         CCScheduler::setVisible has the side effect of kicking off a frame, so
1313         move it last.
1314
1315         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1316         (WebCore::CCThreadProxy::scheduledActionCommit):
1317
1318 2012-06-25  Pablo Flouret  <pablof@motorola.com>
1319
1320         EventSource: Events should not be dispatched after close()
1321         https://bugs.webkit.org/show_bug.cgi?id=85346
1322
1323         Reviewed by Adam Barth.
1324
1325         Spec changed to make sure that no events are dispatched after close() is
1326         called, even if more data was received before the call to close().
1327
1328         See,
1329         https://www.w3.org/Bugs/Public/show_bug.cgi?id=14331#c5
1330         http://html5.org/tools/web-apps-tracker?from=6771&to=6772
1331
1332         Firefox behaves like this already.
1333
1334         Test: http/tests/eventsource/eventsource-events-after-close.html
1335
1336         * page/EventSource.cpp:
1337         (WebCore::EventSource::parseEventStream):
1338
1339 2012-06-25  Mike West  <mkwst@chromium.com>
1340
1341         Fixing compilation failure in StyleResolver.cpp/CSSParser.cpp
1342         https://bugs.webkit.org/show_bug.cgi?id=89892
1343
1344         Reviewed by Alexis Menard.
1345
1346         Adding CSSPropertyVariable to switch statements in CSSParser and
1347         StyleResolver to fix compilation errors under ninja/clang. I've
1348         added both as new cases to the switches, with FIXME comments for
1349         implementation.
1350
1351         * css/CSSParser.cpp:
1352         (WebCore::CSSParser::parseValue):
1353         * css/StyleResolver.cpp:
1354         (WebCore::StyleResolver::collectMatchingRulesForList):
1355
1356 2012-06-25  Jay Civelli  <jcivelli@chromium.org>
1357
1358         Fix for a memory leak with MHTMLArchives.
1359
1360         MHTML files present a flat list of frames and resources but the WebKit Archive
1361         has a tree strcture. So the MHTMLArchive class make sures that every frame
1362         knows about any other frames and resources.
1363         Because these objects are ref counted, that would introduce circular references
1364         preventing the entire Archive from being deleted.
1365         This fixes this by:
1366         - making sure the top-frame (which appears as the first entry in the MHTML) is
1367           not referenced by the other frames.
1368         - when the main frame is deleted it traverse the entire subarchive (sub-frames)
1369           graph and makes sure they clear all their references to other subarchives.
1370
1371         https://bugs.webkit.org/show_bug.cgi?id=88470
1372
1373         Reviewed by Adam Barth.
1374
1375         * loader/archive/Archive.cpp:
1376         (WebCore::Archive::clearAllSubframeArchives):
1377         (WebCore):
1378         (WebCore::Archive::clearAllSubframeArchivesImpl):
1379         * loader/archive/Archive.h:
1380         (Archive):
1381         * loader/archive/mhtml/MHTMLArchive.cpp:
1382         (WebCore::MHTMLArchive::~MHTMLArchive):
1383         (WebCore):
1384         (WebCore::MHTMLArchive::create):
1385         * loader/archive/mhtml/MHTMLArchive.h:
1386         (MHTMLArchive):
1387
1388 2012-06-25  Alpha Lam  <hclam@chromium.org>
1389
1390         Unreviewed, rolling out r121178.
1391         http://trac.webkit.org/changeset/121178
1392         https://bugs.webkit.org/show_bug.cgi?id=89784
1393
1394         New unit test added is failing on WebKit Linux (dbg)
1395
1396         * platform/graphics/chromium/LayerChromium.cpp:
1397         (WebCore::LayerChromium::setBounds):
1398
1399 2012-06-25  Alpha Lam  <hclam@chromium.org>
1400
1401         Unreviewed, rolling out r121137.
1402         http://trac.webkit.org/changeset/121137
1403
1404         Chromium build fix, (un)touch files to build on Chromium Win
1405         Release
1406
1407         * css/CSSParserMode.h:
1408         * css/CSSValue.h:
1409         (WebCore):
1410         * css/CSSVariableValue.h:
1411         * page/Settings.h:
1412         * rendering/style/RenderStyle.h:
1413         * rendering/style/StyleRareInheritedData.h:
1414         * rendering/style/StyleVariableData.h:
1415
1416 2012-06-25  Alpha Lam  <hclam@chromium.org>
1417
1418         Unreviewed, rolling out r121129.
1419         http://trac.webkit.org/changeset/121129
1420         https://bugs.webkit.org/show_bug.cgi?id=89542
1421
1422         Chromium ASan failure: crbug.com/134402
1423
1424         * css/CSSParser.cpp:
1425         (WebCore::CSSParserContext::CSSParserContext):
1426         (WebCore::operator==):
1427         (WebCore):
1428         (WebCore::CSSParser::detectDashToken):
1429         (WebCore::CSSParser::lex):
1430         * css/CSSParser.h:
1431         (CSSParser):
1432         * css/CSSParserMode.h:
1433         (CSSParserContext):
1434         * css/StyleResolver.cpp:
1435         (WebCore::StyleResolver::collectMatchingRulesForList):
1436         * page/Settings.h:
1437         (Settings):
1438         * testing/InternalSettings.cpp:
1439         * testing/InternalSettings.h:
1440         (InternalSettings):
1441         * testing/InternalSettings.idl:
1442
1443 2012-06-25  Adam Barth  <abarth@webkit.org>
1444
1445         Use InterpolationLow on chromium-android
1446         https://bugs.webkit.org/show_bug.cgi?id=89849
1447
1448         Reviewed by Daniel Bates.
1449
1450         Min Qin writes:
1451
1452           Using InterpolationHigh is very very expensive when resampling
1453           images.  For example, it took 1400ms to decode an image on
1454           http://www.crossfitsunnyvale.com/blog/, but it took 2800 ms to do the
1455           resampling Switch to InterpolationLow will result in linear
1456           resampling. It is much faster as the time it tooks is almost
1457           non-noticable [sic] on the trace.
1458
1459         * platform/graphics/skia/PlatformContextSkia.cpp:
1460         (WebCore::PlatformContextSkia::State::State):
1461
1462 2012-06-25  Joshua Bell  <jsbell@chromium.org>
1463
1464         IndexedDB: Remove unused backend property accessors
1465         https://bugs.webkit.org/show_bug.cgi?id=89893
1466
1467         Reviewed by Darin Fisher.
1468
1469         Following the "metadata" API addition in trac.webkit.org/changeset/121059
1470         the IDBXXXBackendInterface types no longer need per-property accessors.
1471
1472         No new tests - no functional changes.
1473
1474         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Remove method implementation.
1475         * Modules/indexeddb/IDBDatabaseBackendImpl.h: Remove methods.
1476         (IDBDatabaseBackendImpl):
1477         * Modules/indexeddb/IDBDatabaseBackendInterface.h: Remove methods.
1478         (IDBDatabaseBackendInterface):
1479         * Modules/indexeddb/IDBIndexBackendImpl.h: Make methods simple accessors.
1480         (IDBIndexBackendImpl):
1481         (WebCore::IDBIndexBackendImpl::name):
1482         (WebCore::IDBIndexBackendImpl::keyPath):
1483         (WebCore::IDBIndexBackendImpl::unique):
1484         (WebCore::IDBIndexBackendImpl::multiEntry):
1485         * Modules/indexeddb/IDBIndexBackendInterface.h: Remove methods.
1486         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: Remove method implementation.
1487         * Modules/indexeddb/IDBObjectStoreBackendImpl.h: Make methods simple accessors.
1488         (IDBObjectStoreBackendImpl):
1489         (WebCore::IDBObjectStoreBackendImpl::name):
1490         (WebCore::IDBObjectStoreBackendImpl::keyPath):
1491         (WebCore::IDBObjectStoreBackendImpl::autoIncrement):
1492         * Modules/indexeddb/IDBObjectStoreBackendInterface.h: Remove methods.
1493
1494 2012-06-25  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
1495
1496         [EFL] Add support for building with ENABLE_MEDIA_STREAM
1497         https://bugs.webkit.org/show_bug.cgi?id=88413
1498
1499         Reviewed by Dirk Pranke.
1500
1501         Add files which are needed for supporting the Media Stream
1502         feature.
1503
1504         No change in functionality so no new tests.
1505
1506         * PlatformEfl.cmake:
1507
1508 2012-06-25  Huang Dongsung  <luxtella@company100.net>
1509
1510         [Texmap] TextureMapperPaintOptions should keep current surface.
1511         https://bugs.webkit.org/show_bug.cgi?id=89266
1512
1513         Before this patch, if a replica layer has a descendant replica child, the child
1514         layer does not render the result in the parent layer's surface because
1515         TextureMapperPaintOptions does not keep current surface.
1516         This patch amends that TextureMapperPaintOptions keeps current surface before
1517         calling paintSelfAndChildrenWithReplica recursively, so previous surface could be
1518         restored after paintSelfAndChildrenWithReplica.
1519
1520         Reviewed by Noam Rosenthal.
1521
1522         Test: compositing/reflections/animation-inside-reflection.html
1523
1524         * platform/graphics/texmap/TextureMapperLayer.cpp:
1525         (WebCore::TextureMapperLayer::paintRecursive):
1526
1527 2012-06-25  Ian Vollick  <vollick@chromium.org>
1528
1529         [chromium] Layer chromium should need a redraw after getting its first non-empty bounds.
1530         https://bugs.webkit.org/show_bug.cgi?id=89784
1531
1532         Reviewed by James Robinson.
1533
1534         Previously, we'd only set needs redraw if the old bounds were zero,
1535         and the new bounds were non-zero, but we should actually have 
1536         checked that the old bounds were non-empty.
1537
1538         Unit test: LayerChromiumTestWithoutFixture.setBoundsTriggersSetNeedsRedrawAfterGettingNonEmptyBounds
1539
1540         * platform/graphics/chromium/LayerChromium.cpp:
1541         (WebCore::LayerChromium::setBounds):
1542
1543 2012-06-25  Scott Graham  <scottmg@chromium.org>
1544
1545         Plumb Scrollbar button dimensions down to WebThemeEngine
1546         https://bugs.webkit.org/show_bug.cgi?id=89264
1547
1548         Reviewed by James Robinson.
1549
1550         Rather than making the height of the scrollbar buttons the same as the
1551         width of the scrollbar, delegate to the WebThemeEngine. This allows
1552         matching the Aura theme rather than the standard Windows theme.
1553
1554         No new tests, as bounds are overridden for DRT.
1555
1556         * platform/chromium/PlatformSupport.h:
1557         (PlatformSupport):
1558         * platform/chromium/ScrollbarThemeChromiumWin.cpp:
1559         (WebCore::ScrollbarThemeChromiumWin::buttonSize):
1560
1561 2012-06-25  Antti Koivisto  <antti@apple.com>
1562
1563         Fast path for simple transform parsing
1564         https://bugs.webkit.org/show_bug.cgi?id=89898
1565
1566         Reviewed by Anders Carlsson.
1567
1568         When manipulating transforms using script, the transform value parsing can show up in profiles pretty heavily 
1569         (up 4% in some cases). We can optimize it easily by implementing a fast path that does not spin up the full CSS
1570         parser, like we already do for several other common value types.
1571         
1572         The patch implements a fast path for transform(), transformX/Y/Z() and transform3D(). It speeds up parsing by >5x.
1573
1574         * css/CSSParser.cpp:
1575         (WebCore):
1576         (WebCore::parseTransformArguments):
1577         (WebCore::parseTransformValue):
1578         (WebCore::CSSParser::parseValue):
1579
1580 2012-06-25  Kwang Yul Seo  <skyul@company100.net>
1581
1582         Remove unused static function shadowFor
1583         https://bugs.webkit.org/show_bug.cgi?id=89824
1584
1585         Reviewed by Daniel Bates.
1586
1587         shadowFor is not used anymore after r117796. No behaviour changes.
1588
1589         * dom/TreeScopeAdopter.cpp:
1590
1591 2012-06-25  Kwang Yul Seo  <skyul@company100.net>
1592
1593         Remove unused constant timeWithoutMouseMovementBeforeHidingControls
1594         https://bugs.webkit.org/show_bug.cgi?id=89823
1595
1596         Reviewed by Daniel Bates.
1597
1598         After r87692, timeWithoutMouseMovementBeforeHidingControls is not used anymore.
1599
1600         * html/HTMLMediaElement.cpp:
1601         (WebCore):
1602
1603 2012-06-25  Zeev Lieber  <zlieber@chromium.org>
1604
1605         [Chromium] RenderPass textures are evicted at the end of every frame
1606         https://bugs.webkit.org/show_bug.cgi?id=89786
1607
1608         Reviewed by Adrienne Walker.
1609
1610         Removed calls to TextureManager::reduceMemoryToLimit inside
1611         finishDrawingFrame() method.
1612
1613         Added unit tests to verify new behavior.
1614
1615         * platform/graphics/chromium/LayerRendererChromium.cpp:
1616         (WebCore::LayerRendererChromium::finishDrawingFrame):
1617
1618 2012-06-25  Allan Xavier  <allan.xavier@undefinedltd.co.uk>
1619
1620         [GTK] Add graphviz debug output for the gstreamer video pipeline.
1621         https://bugs.webkit.org/show_bug.cgi?id=89660
1622
1623         Reviewed by Martin Robinson.
1624
1625         Dump the current video pipeline as a graphviz DOT file when the
1626         pipeline state changes or when an error occours.
1627
1628         No new tests as the change is only useful for debugging.
1629
1630         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1631         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
1632
1633 2012-06-25  Adam Barth  <abarth@webkit.org>
1634
1635         ASSERT(m_wheelEventHandlerCount > 0) can fire
1636         https://bugs.webkit.org/show_bug.cgi?id=89856
1637
1638         Reviewed by Eric Seidel.
1639
1640         When a node with a wheel or a touch event is moved from one document to
1641         another, the didAddMumble/didRemoveMumble calls do not balance because
1642         they're called on different documents. This patch twiddles the counts
1643         appropriately in that case.
1644
1645         Test: fast/events/move-element-with-wheel-and-touch-event-listeners.html
1646
1647         * dom/EventNames.h:
1648         (WebCore::EventNames::isTouchEventType):
1649         (EventNames):
1650         (WebCore::EventNames::touchEventNames):
1651         * dom/Node.cpp:
1652         (WebCore::Node::didMoveToNewDocument):
1653
1654 2012-06-25  Eric Seidel  <eric@webkit.org>
1655
1656         Split map* functions out of StyleResolver into a helper object
1657         https://bugs.webkit.org/show_bug.cgi?id=89881
1658
1659         Reviewed by Daniel Bates.
1660
1661         These map* functions are completely independent of the rest of StyleResolver
1662         and only exist to serve StyleBuilder.
1663         CSSToStyleMap doesn't even want to have a StyleResolver pointer, but
1664         currently needs one to access the resolve-lifetime caches for the
1665         current resolve.  Once we split out that per-resolve state into
1666         some sort of ResolveState/ResolveInfo object (akin to PaintInfo/LayoutState)
1667         then this object will be even simpler.
1668
1669         No behavioral change, thus no tests.
1670
1671         * CMakeLists.txt:
1672         * GNUmakefile.list.am:
1673         * WebCore.gypi:
1674         * WebCore.vcproj/WebCore.vcproj:
1675         * WebCore.xcodeproj/project.pbxproj:
1676         * css/CSSToStyleMap.cpp: Added.
1677         (WebCore):
1678         (WebCore::CSSToStyleMap::style):
1679         (WebCore::CSSToStyleMap::rootElementStyle):
1680         (WebCore::CSSToStyleMap::useSVGZoomRules):
1681         (WebCore::CSSToStyleMap::styleImage):
1682         (WebCore::CSSToStyleMap::mapFillAttachment):
1683         (WebCore::CSSToStyleMap::mapFillClip):
1684         (WebCore::CSSToStyleMap::mapFillComposite):
1685         (WebCore::CSSToStyleMap::mapFillOrigin):
1686         (WebCore::CSSToStyleMap::mapFillImage):
1687         (WebCore::CSSToStyleMap::mapFillRepeatX):
1688         (WebCore::CSSToStyleMap::mapFillRepeatY):
1689         (WebCore::CSSToStyleMap::mapFillSize):
1690         (WebCore::CSSToStyleMap::mapFillXPosition):
1691         (WebCore::CSSToStyleMap::mapFillYPosition):
1692         (WebCore::CSSToStyleMap::mapAnimationDelay):
1693         (WebCore::CSSToStyleMap::mapAnimationDirection):
1694         (WebCore::CSSToStyleMap::mapAnimationDuration):
1695         (WebCore::CSSToStyleMap::mapAnimationFillMode):
1696         (WebCore::CSSToStyleMap::mapAnimationIterationCount):
1697         (WebCore::CSSToStyleMap::mapAnimationName):
1698         (WebCore::CSSToStyleMap::mapAnimationPlayState):
1699         (WebCore::CSSToStyleMap::mapAnimationProperty):
1700         (WebCore::CSSToStyleMap::mapAnimationTimingFunction):
1701         (WebCore::CSSToStyleMap::mapNinePieceImage):
1702         (WebCore::CSSToStyleMap::mapNinePieceImageSlice):
1703         (WebCore::CSSToStyleMap::mapNinePieceImageQuad):
1704         (WebCore::CSSToStyleMap::mapNinePieceImageRepeat):
1705         * css/CSSToStyleMap.h: Added.
1706         (WebCore):
1707         (CSSToStyleMap):
1708         (WebCore::CSSToStyleMap::CSSToStyleMap):
1709         * css/StyleBuilder.cpp:
1710         (WebCore::ApplyPropertyFillLayer::applyValue):
1711         (WebCore::ApplyPropertyBorderImage::applyValue):
1712         (WebCore::ApplyPropertyBorderImageModifier::applyValue):
1713         (WebCore):
1714         (WebCore::ApplyPropertyAnimation::map):
1715         (WebCore::StyleBuilder::StyleBuilder):
1716         * css/StyleResolver.cpp:
1717         (WebCore::StyleResolver::StyleResolver):
1718         (WebCore::StyleResolver::collectMatchingRulesForList):
1719         * css/StyleResolver.h:
1720         (WebCore::StyleResolver::styleMap):
1721         (StyleResolver):
1722
1723 2012-06-25  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1724
1725         [EFL] Support screenDepth() functionality.
1726         https://bugs.webkit.org/show_bug.cgi?id=89423
1727
1728         Reviewed by Kenneth Rohde Christiansen.
1729
1730         Support screenDepth() based on ecore_x_window_depth_get(). This functionality may be used by
1731         both WebKit1 and WebKit2. So, concrete function is placed into EflScreenUtilities.cpp.
1732
1733         This patch can't support existing test cases. Because, EFL DumpRenderTree works without X11 window
1734         by default.
1735
1736         * platform/efl/EflScreenUtilities.cpp:
1737         (WebCore::getPixelDepth):
1738         (WebCore):
1739         * platform/efl/EflScreenUtilities.h:
1740         (WebCore):
1741         * platform/efl/PlatformScreenEfl.cpp:
1742         (WebCore::screenDepth):
1743         (WebCore::screenDepthPerComponent):
1744
1745 2012-06-25  Shinya Kawanaka  <shinyak@chromium.org>
1746
1747         [Shadow] Executing Italic and InsertUnorderedList in Shadow DOM causes a crash
1748         https://bugs.webkit.org/show_bug.cgi?id=88495
1749
1750         Reviewed by Ryosuke Niwa.
1751
1752         InsertionPoint::removedFrom(insertionPoint) tries to find its owner ElementShadow from
1753         parentNode or insertionPoint. If the parent node exsits but we cannot reach ElementShadow from
1754         the parent node, InsertionPoint::removedFrom does not try to find ElementShadow anymore.
1755
1756         It's OK if the ElementShadow is being destructed, but there is a case ElementShadow is not being
1757         destructed in editing. In this case, we should try to find ElementShadow from insertionPoint.
1758         Otherwise it will bring inconsistency to Shadow DOM, and causes a crash.
1759
1760         Actually checking the existence of parentNode() does not make any sense. We should get
1761         shadowRoot() directly.
1762
1763         Test: editing/shadow/insertorderedlist-crash.html
1764
1765         * html/shadow/InsertionPoint.cpp:
1766         (WebCore::InsertionPoint::removedFrom):
1767
1768 2012-06-25  Kinuko Yasuda  <kinuko@chromium.org>
1769
1770         Remove responseBlob field from XMLHttpResponse.idl
1771         https://bugs.webkit.org/show_bug.cgi?id=89859
1772
1773         Reviewed by Eric Seidel.
1774
1775         Remove XMLHttpResponse.responseBlob from XMLHttpResponse.idl, which
1776         has only been exposed for a very limited time (since r120574) but
1777         probably should not have been done so since XHR2 spec no longer has
1778         the field.  A quick search also showed that no one seems to be using the field.
1779
1780         (More context: the field was added long time ago with a runtime guard
1781         which had never been enabled until the guard was removed in r120574
1782         to remove XHR_RESPONSE_BLOB on all platforms.)
1783
1784         No new tests as no tests use this field.
1785
1786         * xml/XMLHttpRequest.idl: Removed responseBlob field.
1787
1788 2012-06-25  Huang Dongsung  <luxtella@company100.net>
1789
1790         Add static qualifier to GraphicsContext3D::extractImageData.
1791         https://bugs.webkit.org/show_bug.cgi?id=89866
1792
1793         GraphicsContext3D::extractImageData does not use member variables.
1794         Each platform Accelerated-compositing implementation can use this method in
1795         order to get pixel data of an Image or ImageBuffer object.
1796
1797         Reviewed by Noam Rosenthal.
1798
1799         No new tests since there's no change on code behavior.
1800
1801         * platform/graphics/GraphicsContext3D.h:
1802         (GraphicsContext3D):
1803
1804 2012-06-25  Pavel Feldman  <pfeldman@chromium.org>
1805
1806         Web Inspector: toggling style should not start property edit first.
1807         https://bugs.webkit.org/show_bug.cgi?id=89834
1808
1809         Reviewed by Yury Semikhatsky.
1810
1811         Otherwise property flickers upon toggling.
1812
1813         * inspector/front-end/StylesSidebarPane.js:
1814         (WebInspector.StylePropertyTreeElement.prototype):
1815
1816 2012-06-25  Alexander Pavlov  <apavlov@chromium.org>
1817
1818         Web Inspector: "Emulate Touch Events" breaks selecting elements with "touchstart" event listeners for inspection.
1819         https://bugs.webkit.org/show_bug.cgi?id=89861
1820
1821         Reviewed by Vsevolod Vlasov.
1822
1823         Upon a mousepress, Inspector should be queried for the "Inspect element" mode up-front,
1824         before dispatching a synthetic "touchstart" event.
1825
1826         * page/EventHandler.cpp:
1827         (WebCore::EventHandler::handleMousePressEvent):
1828
1829 2012-06-25  Alexander Pavlov  <apavlov@chromium.org>
1830
1831         Web Inspector: [Styles] Cannot visually set caret before the first CSS property name character
1832         https://bugs.webkit.org/show_bug.cgi?id=89869
1833
1834         Reviewed by Vsevolod Vlasov.
1835
1836         The issue was due to the "editbox" SPAN having a negative margin, thus the leftmost caret position was getting clipped
1837         by a synthetic SPAN container added by the TextPrompt.
1838
1839         * inspector/front-end/elementsPanel.css:
1840         (.styles-section .properties > li.child-editing .webkit-css-property):
1841         (.styles-section .properties li.child-editing):
1842
1843 2012-06-25  Arko Saha  <arko@motorola.com>
1844
1845         Microdata: document.getItems(typeNames) is not returning Microdata items when typeNames argument is not specified.
1846         https://bugs.webkit.org/show_bug.cgi?id=89757
1847
1848         Reviewed by Ryosuke Niwa.
1849
1850         With r120979 change, it creates MicroDataItemList with m_typeNames = "http://webkit.org/microdata/undefinedItemType",
1851         when typeNames argument is not specified. Modified the check in nodeMatches() accordingly.
1852
1853         This fixes the following failing tests :
1854             fast/dom/MicroData/002.html
1855             fast/dom/MicroData/003.html
1856             fast/dom/MicroData/007.html
1857             fast/dom/MicroData/009.html
1858             fast/dom/MicroData/properties-collection-must-see-the-properties-added-in-itemref.html
1859
1860         * dom/Document.cpp:
1861         (WebCore::Document::getItems): Use undefinedItemType to avoid String conversion.
1862         * dom/MicroDataItemList.cpp:
1863         (WebCore::MicroDataItemList::undefinedItemType): It defines "http://webkit.org/microdata/undefinedItemType"
1864         string using DEFINE_STATIC_LOCAL to avoid String conversion.
1865         (WebCore::MicroDataItemList::MicroDataItemList): Use document() method of DynamicNodeList to obtain
1866         document of owner element.
1867         (WebCore::MicroDataItemList::~MicroDataItemList): Removed originalTypeNames null check.
1868         (WebCore::MicroDataItemList::nodeMatches): Return true if originalTypeNames is equal to undefinedItemType.
1869         * dom/MicroDataItemList.h:
1870
1871 2012-06-25  Carlos Garcia Campos  <cgarcia@igalia.com>
1872
1873         Unreviewed. Fix make distcheck.
1874
1875         * GNUmakefile.list.am: Add missing header file.
1876
1877 2012-06-25  Simon Hausmann  <simon.hausmann@nokia.com>
1878
1879         [Qt] Fix Win32 debug build
1880
1881         Reviewed by Tor Arne Vestbø.
1882
1883         Consistently use use_all_in_one_files when requested in the configuration. The previous
1884         Linux condition has been moved to Tools/qmake/mkspecs/features/unix/default_pre.prf
1885
1886         * Target.pri:
1887
1888 2012-06-25  Philip Rogers  <pdr@google.com>
1889
1890         Fix rewinding of SVG animations
1891         https://bugs.webkit.org/show_bug.cgi?id=89846
1892
1893         Reviewed by Nikolas Zimmermann.
1894
1895         r116451 introduced an optimization to only clear non-freeze animations when
1896         calling setCurrentTime (via reset()). This causes fill=freeze animations to
1897         not clear which breaks rewinding of an animation.
1898
1899         In the presence of multiple animations, we reset the first animation to the
1900         base value and accumulate all results into that; this masked the problem because
1901         2 animations were required to hit the bug (our tests primarily cover just 1).
1902
1903         Test: svg/animations/animate-reset-freeze.html
1904
1905         * svg/animation/SVGSMILElement.cpp:
1906         (WebCore::SVGSMILElement::reset):
1907
1908 2012-06-25  Kent Tamura  <tkent@chromium.org>
1909
1910         Change the serialization format of form control state to make the code simple
1911         https://bugs.webkit.org/show_bug.cgi?id=89847
1912
1913         Reviewed by Hajime Morita.
1914
1915         We used multiple strings to represent state of single form control. It
1916         made the code complex. We change the serialization format so that one
1917         CSV string represents state.
1918
1919         Examples in the old format:
1920             "0"
1921             "1", "value"
1922             "3", "value1", "value2,value2", "value3"
1923
1924         Examples in the new format:
1925             ""
1926             ",value"
1927             ",value1,value2\,value2,value3"
1928
1929         Test: fast/forms/state-restore-various-values.html
1930
1931         * html/FormController.cpp:
1932         (WebCore::FormControlState::serialize):
1933         Generate comma-separated string.
1934         ',' in a value is serialized as "\,".
1935         We changed the signature because we don't need the out-argument.
1936         (WebCore::FormControlState::deserialize):
1937         Parses the input comma-separated string.
1938         We changed the signature because we don't need multiple input strings.
1939         (formStateSignature):
1940         Bump up the version because of the representation change.
1941         (WebCore::FormController::formElementsState):
1942         The new serialized format occupies just one string for one control.
1943         - Expected size is now 3n+1.
1944         - Use FormControlState::serialize().
1945         (WebCore::FormController::setStateForNewFormElements):
1946         The new serialized format occupies just one string for one control.
1947         So we can check the vector size before the iteration.
1948         * html/FormController.h:
1949         (FormControlState): Change the function signatures.
1950
1951         * html/shadow/CalendarPickerElement.cpp:
1952         (WebCore::addJavaScriptString): Use StringBuilder::appendEscaped().
1953
1954 2012-06-22  Yury Semikhatsky  <yurys@chromium.org>
1955
1956         Web Inspector: add external resources size to the native memory diagram
1957         https://bugs.webkit.org/show_bug.cgi?id=89754
1958
1959         Reviewed by Vsevolod Vlasov.
1960
1961         Size of external strings and arrays is now reported through the inspector
1962         protocol and displayed on the native memory chart.
1963
1964         * GNUmakefile.list.am:
1965         * Target.pri:
1966         * WebCore.gypi:
1967         * WebCore.vcproj/WebCore.vcproj:
1968         * WebCore.xcodeproj/project.pbxproj:
1969         * bindings/js/ScriptProfiler.h:
1970         (WebCore):
1971         (WebCore::ScriptProfiler::visitJSDOMWrappers):
1972         (WebCore::ScriptProfiler::visitExternalJSStrings):
1973         (WebCore::ScriptProfiler::visitExternalJSArrays):
1974         * bindings/v8/ScriptProfiler.cpp:
1975         (WebCore::ScriptProfiler::visitJSDOMWrappers):
1976         (WebCore::ScriptProfiler::visitExternalJSStrings):
1977         (WebCore::ScriptProfiler::visitExternalJSArrays):
1978         (WebCore):
1979         * bindings/v8/ScriptProfiler.h:
1980         (WebCore):
1981         (ScriptProfiler):
1982         * bindings/v8/V8Binding.cpp:
1983         (WebCore::WebCoreStringResource::visitStrings):
1984         (WebCore::V8BindingPerIsolateData::visitJSExternalStrings):
1985         * bindings/v8/V8Binding.h:
1986         (WebCore):
1987         (V8BindingPerIsolateData):
1988         * inspector/BindingVisitors.h: Renamed from Source/WebCore/inspector/DOMWrapperVisitor.h.
1989         (WTF):
1990         (WebCore):
1991         (NodeWrapperVisitor):
1992         (WebCore::NodeWrapperVisitor::~NodeWrapperVisitor):
1993         (ExternalStringVisitor):
1994         (WebCore::ExternalStringVisitor::~ExternalStringVisitor):
1995         (ExternalArrayVisitor):
1996         (WebCore::ExternalArrayVisitor::~ExternalArrayVisitor):
1997         * inspector/InspectorMemoryAgent.cpp:
1998         (MemoryBlockName):
1999         (WebCore):
2000         (WebCore::jsExternalResourcesInfo):
2001         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
2002         * inspector/front-end/NativeMemorySnapshotView.js:
2003         (WebInspector.MemoryBlockViewProperties._initialize):
2004
2005 2012-06-24  Fumitoshi Ukai  <ukai@chromium.org>
2006
2007         Unreviewed compile error fix of Chromium Win Release.
2008         Touch header files for ENABLE(CSS_VARIABLES) so that
2009         it forces to rebuild files by changing ENABLE(CSS_VARIABLES)
2010         in Sources/WebKit/chromium/features.gypi at r121129
2011
2012         * css/CSSParserMode.h:
2013         * css/CSSValue.h:
2014         (WebCore):
2015         * css/CSSVariableValue.h:
2016         * page/Settings.h:
2017         * rendering/style/RenderStyle.h:
2018         * rendering/style/StyleRareInheritedData.h:
2019         * rendering/style/StyleVariableData.h:
2020
2021 2012-06-24  Simon Hausmann  <simon.hausmann@nokia.com>
2022
2023         [Texmap] Minor cleanup for TextureMapper::accelerationMode()
2024         https://bugs.webkit.org/show_bug.cgi?id=89825
2025
2026         Reviewed by Kenneth Rohde Christiansen.
2027
2028         Replace the virtual method with a simple member variable.
2029
2030         * platform/graphics/texmap/TextureMapper.h:
2031         (WebCore::TextureMapper::accelerationMode):
2032         (WebCore::TextureMapper::TextureMapper):
2033         (TextureMapper):
2034         * platform/graphics/texmap/TextureMapperGL.cpp:
2035         (WebCore::TextureMapperGL::TextureMapperGL):
2036         * platform/graphics/texmap/TextureMapperGL.h:
2037         * platform/graphics/texmap/TextureMapperImageBuffer.h:
2038         (WebCore::TextureMapperImageBuffer::TextureMapperImageBuffer):
2039
2040 2012-06-24  Mike Lawther  <mikelawther@chromium.org>
2041
2042         CSS3 calc: transitions starting and ending with a calc expression move to end state
2043         https://bugs.webkit.org/show_bug.cgi?id=89738
2044
2045         Reviewed by Tony Chang.
2046
2047         The equality operator for CalculationValue was not working as expected. The 
2048         equality operator for OwnPtr is private, as OwnPtrs should always be different.
2049         The OwnPtrs ended up getting cast to bool before being compared, and the 
2050         comparison was always returning true.
2051
2052         The comparison between OwnPtrs has been removed. It doesn't add value to compare
2053         the raw pointers either, since OwnPtrs should always be unique. We cannot
2054         ASSERT the uniqueness though, as it is legitimate to compare a CalculationValue
2055         to itself.
2056
2057         Test: css3/calc/transition-start-end-with-calc.html
2058
2059         * platform/CalculationValue.h:
2060         (WebCore::CalculationValue::operator==):
2061
2062 2012-06-24  MORITA Hajime  <morrita@google.com>
2063
2064         NodeRenderingContext::AttachingPhase is redundant.
2065         https://bugs.webkit.org/show_bug.cgi?id=79220
2066
2067         Reviewed by Dimitri Glazkov.
2068
2069         This change removes NodeRenderingContext::AttachingPhase and
2070         NodeRenderingContext::m_phase respectively. The state originally
2071         represented as m_phase is naturally encoded into other member variables.
2072
2073         NodeRenderingContext::m_visualParentShadow is also replaced, with
2074         a local variable parentScope.
2075
2076         Basically, what NodeRenderingContext wants to know is the parent of
2077         the composed shadow tree and an optional insertion point where the
2078         node is distributed. Once these becomes clear, m_phase is no longer required.
2079         It was rather a historical artifact.
2080
2081         No new tests. No behavioral change.
2082
2083         * dom/NodeRenderingContext.cpp: Replaced m_phase with implicit states.
2084         (WebCore::NodeRenderingContext::NodeRenderingContext):
2085         (WebCore::NodeRenderingContext::nextRenderer):
2086         (WebCore::NodeRenderingContext::previousRenderer):
2087         (WebCore::NodeRenderingContext::parentRenderer):
2088         (WebCore::NodeRenderingContext::shouldCreateRenderer):
2089         (WebCore::NodeRenderingContext::isOnEncapsulationBoundary):
2090         (WebCore::NodeRenderingContext::isOnUpperEncapsulationBoundary):
2091         * dom/NodeRenderingContext.h:
2092         (NodeRenderingContext):
2093         (WebCore::NodeRenderingContext::parentNodeForRenderingAndStyle): Removed an assert which checks m_phase.
2094         (WebCore::NodeRenderingContext::resetStyleInheritance): Removed an assert which checks m_phase.
2095         * html/shadow/InsertionPoint.h:
2096         (WebCore::isInsertionPoint): Fix null case check.
2097         (WebCore::isLowerEncapsulationBoundary): Renamed from isShadowBoundary()
2098
2099 2012-06-24  Antti Koivisto  <antti@apple.com>
2100
2101         REGRESSION(r121124): LayoutTests/fast/block/inline-children-root-linebox-crash.html asserts
2102         https://bugs.webkit.org/show_bug.cgi?id=89844
2103         
2104         Reviewed by Dan Bernstein.
2105
2106         We need to check for the flipped writing mode and take the slow path if it is used.
2107
2108         * rendering/RenderGeometryMap.cpp:
2109         (WebCore::RenderGeometryMap::pushMappingsToAncestor):
2110
2111 2012-06-24  Luke Macpherson  <macpherson@chromium.org>
2112
2113         Add runtime flag to enable/disable CSS variables (in addition to existing compile-time flag).
2114         https://bugs.webkit.org/show_bug.cgi?id=89542
2115
2116         Reviewed by Dimitri Glazkov.
2117
2118         Added fast/css/variables/build-supports-variables.html to test runtime flag in test environment.
2119         Updated all other css variables tests to enable the runtime flag from JS.
2120
2121         * css/CSSParser.cpp:
2122         (WebCore::CSSParserContext::CSSParserContext):
2123         (WebCore::operator==):
2124         (WebCore::CSSParser::cssVariablesEnabled):
2125         (WebCore):
2126         (WebCore::CSSParser::detectDashToken):
2127         (WebCore::CSSParser::lex):
2128         * css/CSSParser.h:
2129         (CSSParser):
2130         * css/CSSParserMode.h:
2131         (CSSParserContext):
2132         * page/Settings.h:
2133         (Settings):
2134         (WebCore::Settings::setCSSVariablesEnabled):
2135         (WebCore::Settings::cssVariablesEnabled):
2136
2137 2012-06-22  Kent Tamura  <tkent@chromium.org>
2138
2139         Selected option is not restored correctly
2140         https://bugs.webkit.org/show_bug.cgi?id=89623
2141
2142         Reviewed by Hajime Morita.
2143
2144         Details of the bug:
2145         We saved a state of a <select> element as a string of which length was
2146         the size of <select>'s children. e.g. If a <select> had five children
2147         and the second and the fifth items were selected, the state string was:
2148                 ".X..X"
2149
2150         This didn't work well if the structure of the children was updated after
2151         parsing. For example,
2152         1. A page has the following <select> initially:
2153           <select multiple>
2154             <option>Banana
2155             <option>Lemon
2156             <option>Orange
2157             <option>Strawberry
2158           <select>
2159
2160         2. For some reasons, <option>Apple</option> is prepended to the children.
2161         3. Some items are selected.
2162         4. The page is unloaded. Selection state is saved.
2163         5. A user go back to the page again. A browser parses the page again.
2164         6. Try to restore the <select> state with the saved data at 4.
2165           But "Apple" is missing. The <select> has wrong selections.
2166
2167         Solution:
2168         We save the state as a set of selected values. If "Banana" and
2169         "Strawberry" are selected in the above <select>, we save two strings;
2170         "Banana" and "Strawberry", not ".X..X".
2171
2172         Test: fast/forms/select/select-state-restore.html
2173
2174         * html/HTMLSelectElement.cpp:
2175         (WebCore::HTMLSelectElement::saveFormControlState):
2176         Store selected value strings to a FormControlState object.
2177         (WebCore::HTMLSelectElement::searchOptionsForValue):
2178         A helper function to find an <option> with the specified value.
2179         (WebCore::HTMLSelectElement::restoreFormControlState):
2180         Clear all of selections, then select options with saved values.
2181         In order to avoid O(M x N) loop, we start searching at position we found
2182         the previous value.
2183         * html/HTMLSelectElement.h: Declare searchOptionsForValue.
2184         * html/FormController.cpp:
2185         (formStateSignature): Bump up the version because this is a incompatible
2186         change.
2187
2188 2012-06-24  David Barr  <davidbarr@chromium.org>
2189
2190         Add snap to css3-images image-resolution
2191         https://bugs.webkit.org/show_bug.cgi?id=89745
2192
2193         Reviewed by Tony Chang.
2194
2195         Due to floating point imprecision, it is difficult to be precise in dpcm.
2196         So use PrimitiveValue::roundForImpreciseConversion rather than just floor.
2197
2198         No new tests; extended fast/css/image-resolution/image-resolution.html
2199
2200         * css/CSSParser.cpp: Accept snap identifier in image-resolution property.
2201         (WebCore::CSSParser::parseImageResolution): Map CSSValueSnap to identifier value from cssValuePool.
2202         * css/CSSValueKeywords.in: Add snap.
2203         * css/StyleBuilder.cpp: Extend ApplyPropertyImageResolution to apply RenderStyle::imageResolutionSnap.
2204         (WebCore::ApplyPropertyImageResolution::applyInheritValue): Apply RenderStyle::imageResolutionSnap.
2205         (WebCore::ApplyPropertyImageResolution::applyInitialValue): Apply RenderStyle::imageResolutionSnap.
2206         (WebCore::ApplyPropertyImageResolution::applyValue): Map CSSValueSnap to ImageResolutionSnapPixels.
2207         * rendering/RenderImage.cpp: Extend conditions for recalculation of intrinsic size.
2208         (WebCore::RenderImage::styleDidChange): Update intrinsic size if RenderStyle::imageResolutionSnap() has changed.
2209         (WebCore::RenderImage::imageDimensionsChanged): Floor scale factor to int, round up if less than 0.01 away from ceiling.
2210         * rendering/style/RenderStyle.cpp: Include StyleRareInheritedData::m_imageResolutionSnap in style diff.
2211         (WebCore::RenderStyle::diff): Map change in StyleRareInheritedData::m_imageResolutionSnap to StyleDifferenceLayout.
2212         * rendering/style/RenderStyle.h: Add RenderStyle::imageResolutionSnap, RenderStyle::setImageResolutionSnap, RenderStyle::initialImageResolutionSnap.
2213         * rendering/style/RenderStyleConstants.h: Add enum ImageResolutionSnap.
2214         * rendering/style/StyleRareInheritedData.cpp: Add StyleRareInheritedData::m_imageResolutionSnap.
2215         (WebCore::StyleRareInheritedData::StyleRareInheritedData): Add m_imageResolutionSnap to default and copy constructor.
2216         (WebCore::StyleRareInheritedData::operator==): Include m_imageResolutionSnap in comparison.
2217         * rendering/style/StyleRareInheritedData.h: Add StyleRareInheritedData::m_imageResolutionSnap.
2218         (StyleRareInheritedData): Add 1-bit field StyleRareInheritedData::m_imageResolutionSnap.
2219
2220 2012-06-24  Sheriff Bot  <webkit.review.bot@gmail.com>
2221
2222         Unreviewed, rolling out r121106.
2223         http://trac.webkit.org/changeset/121106
2224         https://bugs.webkit.org/show_bug.cgi?id=89841
2225
2226         Caused 85% performance regressions on Dromaeo/jslib-modify-
2227         jquery.html (Requested by rniwa on #webkit).
2228
2229         * dom/Document.cpp:
2230         (WebCore::Document::clearNodeListCaches):
2231         * dom/Document.h:
2232         (Document):
2233         * dom/DynamicNodeList.cpp:
2234         (WebCore::DynamicSubtreeNodeList::~DynamicSubtreeNodeList):
2235         * dom/DynamicNodeList.h:
2236         (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList):
2237         * dom/Node.cpp:
2238         (WebCore::Node::clearRareData):
2239         (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged):
2240         (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged):
2241         (WebCore::Node::getElementsByTagName):
2242         (WebCore::Node::getElementsByTagNameNS):
2243         (WebCore::Node::getElementsByName):
2244         (WebCore::Node::getElementsByClassName):
2245         (WebCore::Node::radioNodeList):
2246         (WebCore::NodeListsNodeData::invalidateCaches):
2247         (WebCore):
2248         (WebCore::NodeRareData::createNodeLists):
2249         * dom/NodeRareData.h:
2250         (NodeListsNodeData):
2251         (WebCore::NodeListsNodeData::adoptTreeScope):
2252         (WebCore::NodeRareData::ensureNodeLists):
2253         (NodeRareData):
2254         * dom/TreeScope.cpp:
2255         (WebCore::TreeScope::TreeScope):
2256         * dom/TreeScope.h:
2257         (WebCore::TreeScope::addNodeListCache):
2258         (WebCore::TreeScope::removeNodeListCache):
2259         (WebCore::TreeScope::hasNodeListCaches):
2260         (TreeScope):
2261         * dom/TreeScopeAdopter.cpp:
2262         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
2263         * html/LabelableElement.cpp:
2264         (WebCore::LabelableElement::labels):
2265         * html/LabelsNodeList.cpp:
2266         (WebCore::LabelsNodeList::LabelsNodeList):
2267         (WebCore::LabelsNodeList::~LabelsNodeList):
2268         * html/RadioNodeList.cpp:
2269         (WebCore::RadioNodeList::RadioNodeList):
2270         (WebCore::RadioNodeList::~RadioNodeList):
2271
2272 2012-06-24  Adam Barth  <abarth@webkit.org>
2273
2274         Change the type of the second argument of FrameSelection::revealSelection to use RevealExtentOption
2275         https://bugs.webkit.org/show_bug.cgi?id=89833
2276
2277         Reviewed by Ryosuke Niwa.
2278
2279         As requested by Ryosuke Niwa.  Rare boolean parameters are hard to read.
2280
2281         * WebCore.exp.in:
2282         * editing/Editor.cpp:
2283         (WebCore::Editor::revealSelectionAfterEditingOperation):
2284         * editing/Editor.h:
2285         (Editor):
2286         * editing/FrameSelection.cpp:
2287         (WebCore::FrameSelection::setSelection):
2288         (WebCore::FrameSelection::revealSelection):
2289         * editing/FrameSelection.h:
2290
2291 2012-06-24  Antti Koivisto  <antti@apple.com>
2292
2293         Optimize RenderGeometryMap mappings gathering
2294         https://bugs.webkit.org/show_bug.cgi?id=89828
2295
2296         Reviewed by Simon Fraser.
2297
2298         RenderGeometryMap currently gathers mappings by climbing the rendering tree. This is slow and can produce 
2299         large number of mapping steps. In the common case we already have the child layer coordinates available in
2300         the layer tree and we can just use that.
2301         
2302         The combination of faster mappings gathering and fewer number of applying steps reduces time spent under 
2303         RenderLayerCompositor::computeCompositingRequirements to less than half when scrolling the mobile version
2304         of twitter.com.
2305         
2306         * rendering/RenderGeometryMap.cpp:
2307         (WebCore):
2308         (WebCore::RenderGeometryMap::pushMappingsToAncestor):
2309         
2310             Use pre-computed mapping from the layer tree when possible.
2311
2312         (WebCore::RenderGeometryMap::popMappingsToAncestor):
2313         * rendering/RenderGeometryMap.h:
2314         
2315             Add some inline capacity.
2316
2317         (WebCore):
2318         (RenderGeometryMap):
2319         * rendering/RenderLayer.h:
2320         (WebCore::RenderLayer::canUseConvertToLayerCoords):
2321         (RenderLayer):
2322         * rendering/RenderLayerCompositor.cpp:
2323         (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
2324         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2325
2326 2012-06-24  Simon Fraser  <simon.fraser@apple.com>
2327
2328         Rename isPositioned to isOutOfFlowPositioned for clarity
2329         https://bugs.webkit.org/show_bug.cgi?id=89836
2330
2331         Reviewed by Antti Koivisto.
2332         
2333         RenderObject and RenderStyle had an isPositioned() method that was
2334         confusing, because it excluded relative positioning. Rename to 
2335         isOutOfFlowPositioned(), which makes it clearer that it only applies
2336         to absolute and fixed positioning.
2337
2338         Simple rename; no behavior change.
2339
2340         * css/CSSComputedStyleDeclaration.cpp:
2341         (WebCore::getPositionOffsetValue):
2342         * css/StyleResolver.cpp:
2343         (WebCore::StyleResolver::collectMatchingRulesForList):
2344         * dom/Text.cpp:
2345         (WebCore::Text::rendererIsNeeded):
2346         * editing/DeleteButtonController.cpp:
2347         (WebCore::isDeletableElement):
2348         * editing/TextIterator.cpp:
2349         (WebCore::shouldEmitNewlinesBeforeAndAfterNode):
2350         * rendering/AutoTableLayout.cpp:
2351         (WebCore::shouldScaleColumns):
2352         * rendering/InlineFlowBox.cpp:
2353         (WebCore::InlineFlowBox::addToLine):
2354         (WebCore::InlineFlowBox::placeBoxesInInlineDirection):
2355         (WebCore::InlineFlowBox::requiresIdeographicBaseline):
2356         (WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
2357         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
2358         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
2359         (WebCore::InlineFlowBox::flipLinesInBlockDirection):
2360         (WebCore::InlineFlowBox::computeOverflow):
2361         (WebCore::InlineFlowBox::computeOverAnnotationAdjustment):
2362         (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment):
2363         * rendering/InlineIterator.h:
2364         (WebCore::isIteratorTarget):
2365         * rendering/LayoutState.cpp:
2366         (WebCore::LayoutState::LayoutState):
2367         * rendering/RenderBlock.cpp:
2368         (WebCore::RenderBlock::MarginInfo::MarginInfo):
2369         (WebCore::RenderBlock::styleWillChange):
2370         (WebCore::RenderBlock::styleDidChange):
2371         (WebCore::RenderBlock::addChildToContinuation):
2372         (WebCore::RenderBlock::addChildToAnonymousColumnBlocks):
2373         (WebCore::RenderBlock::containingColumnsBlock):
2374         (WebCore::RenderBlock::columnsBlockForSpanningElement):
2375         (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
2376         (WebCore::getInlineRun):
2377         (WebCore::RenderBlock::isSelfCollapsingBlock):
2378         (WebCore::RenderBlock::layoutBlock):
2379         (WebCore::RenderBlock::addOverflowFromBlockChildren):
2380         (WebCore::RenderBlock::expandsToEncloseOverhangingFloats):
2381         (WebCore::RenderBlock::handlePositionedChild):
2382         (WebCore::RenderBlock::moveRunInUnderSiblingBlockIfNeeded):
2383         (WebCore::RenderBlock::collapseMargins):
2384         (WebCore::RenderBlock::clearFloatsIfNeeded):
2385         (WebCore::RenderBlock::simplifiedNormalFlowLayout):
2386         (WebCore::RenderBlock::isSelectionRoot):
2387         (WebCore::RenderBlock::blockSelectionGaps):
2388         (WebCore::RenderBlock::clearFloats):
2389         (WebCore::RenderBlock::markAllDescendantsWithFloatsForLayout):
2390         (WebCore::RenderBlock::markSiblingsWithFloatsForLayout):
2391         (WebCore::isChildHitTestCandidate):
2392         (WebCore::InlineMinMaxIterator::next):
2393         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
2394         (WebCore::RenderBlock::firstLineBoxBaseline):
2395         (WebCore::RenderBlock::lastLineBoxBaseline):
2396         (WebCore::RenderBlock::updateFirstLetter):
2397         (WebCore::shouldCheckLines):
2398         (WebCore::getHeightForLineCount):
2399         (WebCore::RenderBlock::adjustForBorderFit):
2400         (WebCore::inNormalFlow):
2401         (WebCore::RenderBlock::adjustLinePositionForPagination):
2402         (WebCore::RenderBlock::adjustBlockChildForPagination):
2403         (WebCore::RenderBlock::renderName):
2404         * rendering/RenderBlock.h:
2405         (WebCore::RenderBlock::shouldSkipCreatingRunsForObject):
2406         * rendering/RenderBlockLineLayout.cpp:
2407         (WebCore::RenderBlock::setMarginsForRubyRun):
2408         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
2409         (WebCore::RenderBlock::computeBlockDirectionPositionsForLine):
2410         (WebCore::RenderBlock::layoutInlineChildren):
2411         (WebCore::requiresLineBox):
2412         (WebCore::RenderBlock::LineBreaker::skipTrailingWhitespace):
2413         (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
2414         (WebCore::RenderBlock::LineBreaker::nextLineBreak):
2415         * rendering/RenderBox.cpp:
2416         (WebCore::RenderBox::removeFloatingOrPositionedChildFromBlockLists):
2417         (WebCore::RenderBox::styleWillChange):
2418         (WebCore::RenderBox::styleDidChange):
2419         (WebCore::RenderBox::updateBoxModelInfoFromStyle):
2420         (WebCore::RenderBox::offsetFromContainer):
2421         (WebCore::RenderBox::positionLineBox):
2422         (WebCore::RenderBox::computeRectForRepaint):
2423         (WebCore::RenderBox::computeLogicalWidthInRegion):
2424         (WebCore::RenderBox::renderBoxRegionInfo):
2425         (WebCore::RenderBox::computeLogicalHeight):
2426         (WebCore::RenderBox::computePercentageLogicalHeight):
2427         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
2428         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
2429         (WebCore::RenderBox::availableLogicalHeightUsing):
2430         (WebCore::percentageLogicalHeightIsResolvable):
2431         * rendering/RenderBox.h:
2432         (WebCore::RenderBox::stretchesToViewport):
2433         (WebCore::RenderBox::isDeprecatedFlexItem):
2434         * rendering/RenderBoxModelObject.cpp:
2435         (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
2436         (WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
2437         * rendering/RenderBoxModelObject.h:
2438         (WebCore::RenderBoxModelObject::requiresLayer):
2439         * rendering/RenderDeprecatedFlexibleBox.cpp:
2440         (WebCore::childDoesNotAffectWidthOrFlexing):
2441         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
2442         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
2443         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
2444         (WebCore::RenderDeprecatedFlexibleBox::renderName):
2445         * rendering/RenderFieldset.cpp:
2446         (WebCore::RenderFieldset::findLegend):
2447         * rendering/RenderFlexibleBox.cpp:
2448         (WebCore::RenderFlexibleBox::computePreferredLogicalWidths):
2449         (WebCore::RenderFlexibleBox::autoMarginOffsetInMainAxis):
2450         (WebCore::RenderFlexibleBox::availableAlignmentSpaceForChild):
2451         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
2452         (WebCore::RenderFlexibleBox::computeNextFlexLine):
2453         (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
2454         (WebCore::RenderFlexibleBox::prepareChildForPositionedLayout):
2455         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
2456         (WebCore::RenderFlexibleBox::layoutColumnReverse):
2457         (WebCore::RenderFlexibleBox::adjustAlignmentForChild):
2458         (WebCore::RenderFlexibleBox::flipForRightToLeftColumn):
2459         * rendering/RenderGrid.cpp:
2460         (WebCore::RenderGrid::renderName):
2461         * rendering/RenderImage.cpp:
2462         (WebCore::RenderImage::computeIntrinsicRatioInformation):
2463         * rendering/RenderInline.cpp:
2464         (WebCore::RenderInline::addChildIgnoringContinuation):
2465         (WebCore::RenderInline::addChildToContinuation):
2466         (WebCore::RenderInline::generateCulledLineBoxRects):
2467         (WebCore):
2468         (WebCore::RenderInline::culledInlineFirstLineBox):
2469         (WebCore::RenderInline::culledInlineLastLineBox):
2470         (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox):
2471         (WebCore::RenderInline::computeRectForRepaint):
2472         (WebCore::RenderInline::dirtyLineBoxes):
2473         * rendering/RenderLayer.cpp:
2474         (WebCore::checkContainingBlockChainForPagination):
2475         (WebCore::RenderLayer::updateLayerPosition):
2476         (WebCore::isPositionedContainer):
2477         (WebCore::RenderLayer::calculateClipRects):
2478         (WebCore::RenderLayer::shouldBeNormalFlowOnly):
2479         * rendering/RenderLayerCompositor.cpp:
2480         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
2481         * rendering/RenderLineBoxList.cpp:
2482         (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
2483         * rendering/RenderListItem.cpp:
2484         (WebCore::getParentOfFirstLineBox):
2485         * rendering/RenderMultiColumnBlock.cpp:
2486         (WebCore::RenderMultiColumnBlock::renderName):
2487         * rendering/RenderObject.cpp:
2488         (WebCore::RenderObject::markContainingBlocksForLayout):
2489         (WebCore::RenderObject::setPreferredLogicalWidthsDirty):
2490         (WebCore::RenderObject::invalidateContainerPreferredLogicalWidths):
2491         (WebCore::RenderObject::styleWillChange):
2492         (WebCore::RenderObject::offsetParent):
2493         * rendering/RenderObject.h:
2494         (WebCore::RenderObject::isOutOfFlowPositioned):
2495         (WebCore::RenderObject::isInFlowPositioned):
2496         (WebCore::RenderObject::hasClip):
2497         (WebCore::RenderObject::isFloatingOrOutOfFlowPositioned):
2498         * rendering/RenderObjectChildList.cpp:
2499         (WebCore::RenderObjectChildList::removeChildNode):
2500         * rendering/RenderReplaced.cpp:
2501         (WebCore::hasAutoHeightOrContainingBlockWithAutoHeight):
2502         * rendering/RenderRubyRun.cpp:
2503         (WebCore::RenderRubyRun::rubyText):
2504         * rendering/RenderTable.cpp:
2505         (WebCore::RenderTable::addChild):
2506         (WebCore::RenderTable::computeLogicalWidth):
2507         (WebCore::RenderTable::layout):
2508         * rendering/style/RenderStyle.h:
2509
2510 2012-06-24  Oli Lan  <olilan@chromium.org>
2511
2512         After Editor::setComposition is called, input should scroll to the end of the composition.
2513         https://bugs.webkit.org/show_bug.cgi?id=88999
2514
2515         Reviewed by Ryosuke Niwa.
2516
2517         This fixes an issue where after a call to setComposition, the start of the composition is revealed
2518         (scrolled to) instead of the end (where the caret/editing point should be).
2519
2520         The change is to allow revealSelectionAfterEditingOperation to take a revealExtent parameter,
2521         and to pass that parameter as true when calling from setIgnoreCompositionSelectionChange, which is
2522         called at the end of setComposition.
2523
2524         Test: fast/forms/input-set-composition-scroll.html
2525
2526         * editing/Editor.cpp:
2527         (WebCore::Editor::revealSelectionAfterEditingOperation):
2528         (WebCore::Editor::setIgnoreCompositionSelectionChange):
2529         * editing/Editor.h:
2530         (Editor):
2531
2532 2012-06-24  Joshua Bell  <jsbell@chromium.org>
2533
2534         Web Inspector: Simplify InspectorIndexedDBAgent to use IDB metadata API
2535         https://bugs.webkit.org/show_bug.cgi?id=89495
2536
2537         Reviewed by Vsevolod Vlasov.
2538
2539         No new tests - no functional changes.
2540
2541         * inspector/InspectorIndexedDBAgent.cpp:
2542         (WebCore):
2543
2544 2012-06-24  Pavel Feldman  <pfeldman@chromium.org>
2545
2546         Web Inspector: speed up Timeline and Elements panel rendering
2547         https://bugs.webkit.org/show_bug.cgi?id=89771
2548
2549         Reviewed by Yury Semikhatsky.
2550
2551         I used timeline panel to find unnecessary style operations.
2552
2553         * inspector/front-end/ElementsTreeOutline.js:
2554         (WebInspector.ElementsTreeElement.prototype.updateTitle):
2555         * inspector/front-end/TimelinePanel.js:
2556         (WebInspector.TimelinePanel.prototype._updateEventDividers):
2557         (WebInspector.TimelinePanel.prototype._updateFrames):
2558         (WebInspector.TimelinePanel.prototype.sidebarResized):
2559         (WebInspector.TimelinePanel.prototype.onResize):
2560         (WebInspector.TimelinePanel.prototype._onScroll):
2561         (WebInspector.TimelinePanel.prototype._refresh):
2562         (WebInspector.TimelinePanel.prototype._refreshRecords):
2563         (WebInspector.TimelinePanel.prototype._adjustScrollPosition):
2564
2565 2012-06-23  Ryosuke Niwa  <rniwa@webkit.org>
2566
2567         Inserting nodes is slow due to Node::notifyNodeListsAttributeChanged (20%+)
2568         https://bugs.webkit.org/show_bug.cgi?id=73853
2569
2570         Reviewed by Anders Carlsson and Ojan Vafai.
2571
2572         Invalidate all node lists at document level to avoid having to walk up the DOM tree in the invalidation.
2573         In particular, this makes appending node O(1) with respect to the depth of the tree in common cases when
2574         we have node lists somewhere in the tree scope.
2575
2576         We now invalidate more node lists than we used to but it shouldn't matter much in practice because
2577         most websites don't add or remove nodes or modify relevant attributes while iterating through node lists.
2578         The change would also register each node list to document thereby consuming one extra pointer, however,
2579         this should not have a significant memory impact given we used to do it unintentionally until I fixed it in
2580         r110797 three months ago.
2581
2582         Also, RadioNodeList and LabelsNodeList had always been invalidated at document level so this refactoring
2583         also allows us to move calls to registerDynamicSubtreeNodeList and unregisterDynamicSubtreeNodeList in
2584         those node lists to DynamicSubtreeNodeList, and even delete NodeListsNodeData::invalidateCaches().
2585
2586         In addition, removed m_numNodeListCaches from TreeScope since it was only used to avoid walking up
2587         the ancestors in invalidateNodeListsCacheAfterAttributeChanged and invalidateNodeListsCacheAfterChildrenChanged
2588         but we don't walk up the ancestors any more. Also note that m_listsInvalidatedAtDocument tells us exactly
2589         how many node lists are present for each document.
2590
2591         * dom/Document.cpp:
2592         (WebCore::Document::clearNodeListCaches): Optionally takes a qualified attribute name so that we don't
2593         have to invalidate tag node lists when only attributes are modified.
2594         * dom/Document.h:
2595         (Document):
2596         * dom/DynamicNodeList.cpp:
2597         (WebCore::DynamicSubtreeNodeList::~DynamicSubtreeNodeList): Calls unregisterDynamicSubtreeNodeList.
2598         * dom/DynamicNodeList.h:
2599         (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList): Calls registerDynamicSubtreeNodeList.
2600         * dom/Node.cpp:
2601         (WebCore::Node::clearRareData):
2602         (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged): No longer walks up the tree to invalidate
2603         node list caches. All invalidations are done in Document::clearNodeListCaches.
2604         (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged): Ditto.
2605         (WebCore::Node::getElementsByTagName):
2606         (WebCore::Node::getElementsByTagNameNS):
2607         (WebCore::Node::getElementsByName):
2608         (WebCore::Node::getElementsByClassName):
2609         (WebCore::Node::radioNodeList):
2610         (WebCore):
2611         (WebCore::NodeRareData::createNodeLists):
2612         * dom/NodeRareData.h:
2613         (NodeListsNodeData):
2614         (WebCore::NodeListsNodeData::adoptTreeScope): Invalidate node list caches while registering and
2615         unregistering node lists from old and new documents respectively now that invalidateCaches() has been
2616         (WebCore::NodeRareData::ensureNodeLists):
2617         (NodeRareData):
2618         * dom/TreeScope.cpp:
2619         (WebCore::TreeScope::TreeScope):
2620         * dom/TreeScope.h:
2621         (TreeScope):
2622         * dom/TreeScopeAdopter.cpp:
2623         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
2624         * html/LabelableElement.cpp:
2625         (WebCore::LabelableElement::labels):
2626         * html/LabelsNodeList.cpp:
2627         (WebCore::LabelsNodeList::LabelsNodeList):
2628         (WebCore::LabelsNodeList::~LabelsNodeList):
2629         * html/RadioNodeList.cpp:
2630         (WebCore::RadioNodeList::RadioNodeList):
2631         (WebCore::RadioNodeList::~RadioNodeList):
2632
2633 2012-06-23  Ryosuke Niwa  <rniwa@webkit.org>
2634
2635         Clang and cl.exe build fix after r121103. Don't inherit from WTF::PairHash<unsigned char, StringType>.
2636
2637         * dom/NodeRareData.h:
2638
2639 2012-06-23  Ryosuke Niwa  <rniwa@webkit.org>
2640
2641         REGRESSION(r120979): getElementsByTagName is 12% slower
2642         https://bugs.webkit.org/show_bug.cgi?id=89783
2643
2644         Reviewed by Darin Adler.
2645
2646         The problem is that hashing std::pair<unsigned short, AtomicString> is very slow compared to just hashing AtomicString,
2647         which internally holds a hash already. Fixed the regression by replacing the default hash function by the one that
2648         computes AtomicString's hash + list type. This is okay because we only have 7 node list types at the moment.
2649
2650         * dom/NodeRareData.h:
2651         (NodeListsNodeData):
2652         (WebCore::NodeListsNodeData::NodeListCacheMapEntryHash::hash):
2653         (NodeListCacheMapEntryHash):
2654         (WebCore::NodeListsNodeData::NodeListCacheMapEntryHash::equal):
2655         (WebCore::NodeListsNodeData::namedNodeListKey):
2656
2657 2012-06-23  Dan Bernstein  <mitz@apple.com>
2658
2659         RenderText’s minimum preferred width is incorrect automatic hyphenation is used
2660         https://bugs.webkit.org/show_bug.cgi?id=89814
2661
2662         Reviewed by Sam Weinig.
2663
2664         Test: fast/text/hyphen-min-preferred-width.html
2665
2666         * rendering/RenderText.cpp:
2667         (WebCore::maxWordFragmentWidth): Added this helper function. It returns the width of the
2668         widest hyphenated fragment of the word (except for the suffix after the last hyphen) and
2669         the offset of the last hyphenation opportunity.
2670         (WebCore::RenderText::computePreferredLogicalWidths): Changed this function to consider the
2671         widths of hyphenated word fragments rather than entire words when computing the minimum
2672         width. Because hyphenating and measuring all fragments is expensive, hyphenation is only
2673         attempted if the unhyphenated word is wider than the current minimum width.
2674
2675 2012-06-23  Sheriff Bot  <webkit.review.bot@gmail.com>
2676
2677         Unreviewed, rolling out r121058.
2678         http://trac.webkit.org/changeset/121058
2679         https://bugs.webkit.org/show_bug.cgi?id=89809
2680
2681         Patch causes plugins tests to crash in GTK debug builds
2682         (Requested by zdobersek on #webkit).
2683
2684         * bindings/js/GCController.cpp:
2685         (WebCore::collect):
2686         (WebCore::GCController::garbageCollectSoon):
2687         (WebCore::GCController::garbageCollectNow):
2688         (WebCore::GCController::discardAllCompiledCode):
2689         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
2690         (WebCore::JSSQLStatementErrorCallback::handleEvent):
2691         * bindings/js/JSCustomVoidCallback.cpp:
2692         (WebCore::JSCustomVoidCallback::handleEvent):
2693         * bindings/js/JSCustomXPathNSResolver.cpp:
2694         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
2695         * bindings/js/JSErrorHandler.cpp:
2696         (WebCore::JSErrorHandler::handleEvent):
2697         * bindings/js/JSEventCustom.cpp:
2698         (WebCore::toJS):
2699         * bindings/js/JSEventListener.cpp:
2700         (WebCore::JSEventListener::handleEvent):
2701         * bindings/js/JSInjectedScriptHostCustom.cpp:
2702         (WebCore::InjectedScriptHost::nodeAsScriptValue):
2703         (WebCore::JSInjectedScriptHost::inspectedObject):
2704         * bindings/js/JSInjectedScriptManager.cpp:
2705         (WebCore::InjectedScriptManager::createInjectedScript):
2706         (WebCore::InjectedScriptManager::canAccessInspectedWindow):
2707         * bindings/js/JSLazyEventListener.cpp:
2708         (WebCore::JSLazyEventListener::initializeJSFunction):
2709         * bindings/js/JSMainThreadExecState.h:
2710         (WebCore::JSMainThreadExecState::evaluate):
2711         * bindings/js/JSMutationCallbackCustom.cpp:
2712         (WebCore::JSMutationCallback::handleEvent):
2713         * bindings/js/JSNodeFilterCondition.cpp:
2714         (WebCore::JSNodeFilterCondition::acceptNode):
2715         * bindings/js/JSRequestAnimationFrameCallbackCustom.cpp:
2716         (WebCore::JSRequestAnimationFrameCallback::handleEvent):
2717         * bindings/js/JavaScriptCallFrame.cpp:
2718         (WebCore::JavaScriptCallFrame::evaluate):
2719         * bindings/js/PageScriptDebugServer.cpp:
2720         (WebCore::PageScriptDebugServer::recompileAllJSFunctions):
2721         * bindings/js/ScheduledAction.cpp:
2722         (WebCore::ScheduledAction::executeFunctionInContext):
2723         * bindings/js/ScriptCachedFrameData.cpp:
2724         (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
2725         (WebCore::ScriptCachedFrameData::restore):
2726         (WebCore::ScriptCachedFrameData::clear):
2727         * bindings/js/ScriptController.cpp:
2728         (WebCore::ScriptController::evaluateInWorld):
2729         (WebCore::ScriptController::clearWindowShell):
2730         (WebCore::ScriptController::initScript):
2731         (WebCore::ScriptController::updateDocument):
2732         (WebCore::ScriptController::cacheableBindingRootObject):
2733         (WebCore::ScriptController::bindingRootObject):
2734         (WebCore::ScriptController::windowScriptNPObject):
2735         (WebCore::ScriptController::jsObjectForPluginElement):
2736         (WebCore::ScriptController::clearScriptObjects):
2737         * bindings/js/ScriptControllerMac.mm:
2738         (WebCore::ScriptController::windowScriptObject):
2739         * bindings/js/ScriptDebugServer.cpp:
2740         (WebCore::ScriptDebugServer::dispatchDidPause):
2741         * bindings/js/ScriptEventListener.cpp:
2742         (WebCore::eventListenerHandlerBody):
2743         (WebCore::eventListenerHandlerLocation):
2744         * bindings/js/ScriptFunctionCall.cpp:
2745         (WebCore::ScriptCallArgumentHandler::appendArgument):
2746         (WebCore::ScriptFunctionCall::call):
2747         (WebCore::ScriptFunctionCall::construct):
2748         (WebCore::ScriptCallback::call):
2749         * bindings/js/ScriptObject.cpp:
2750         (WebCore::ScriptGlobalObject::set):
2751         (WebCore::ScriptGlobalObject::get):
2752         (WebCore::ScriptGlobalObject::remove):
2753         * bindings/js/ScriptValue.cpp:
2754         (WebCore::ScriptValue::getString):
2755         (WebCore::ScriptValue::toInspectorValue):
2756         * bindings/js/WorkerScriptController.cpp:
2757         (WebCore::WorkerScriptController::~WorkerScriptController):
2758         (WebCore::WorkerScriptController::initScript):
2759         (WebCore::WorkerScriptController::evaluate):
2760         (WebCore::WorkerScriptController::disableEval):
2761         * bindings/objc/WebScriptObject.mm:
2762         (_didExecute):
2763         (-[WebScriptObject _setImp:originRootObject:rootObject:]):
2764         (-[WebScriptObject _setOriginRootObject:andRootObject:]):
2765         (-[WebScriptObject dealloc]):
2766         (-[WebScriptObject finalize]):
2767         (-[WebScriptObject callWebScriptMethod:withArguments:]):
2768         (-[WebScriptObject evaluateWebScript:]):
2769         (-[WebScriptObject setValue:forKey:]):
2770         (-[WebScriptObject valueForKey:]):
2771         (-[WebScriptObject removeWebScriptKey:]):
2772         (-[WebScriptObject hasWebScriptKey:]):
2773         (-[WebScriptObject stringRepresentation]):
2774         (-[WebScriptObject webScriptValueAtIndex:]):
2775         (-[WebScriptObject setWebScriptValueAtIndex:value:]):
2776         (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
2777         * bindings/scripts/CodeGeneratorJS.pm:
2778         (GenerateCallbackImplementation):
2779         * bindings/scripts/test/JS/JSTestCallback.cpp:
2780         (WebCore::JSTestCallback::callbackWithNoParam):
2781         (WebCore::JSTestCallback::callbackWithClass1Param):
2782         (WebCore::JSTestCallback::callbackWithClass2Param):
2783         (WebCore::JSTestCallback::callbackWithStringList):
2784         (WebCore::JSTestCallback::callbackWithBoolean):
2785         (WebCore::JSTestCallback::callbackRequiresThisToPass):
2786         * bridge/NP_jsobject.cpp:
2787         (_NPN_InvokeDefault):
2788         (_NPN_Invoke):
2789         (_NPN_Evaluate):
2790         (_NPN_GetProperty):
2791         (_NPN_SetProperty):
2792         (_NPN_RemoveProperty):
2793         (_NPN_HasProperty):
2794         (_NPN_HasMethod):
2795         (_NPN_Enumerate):
2796         (_NPN_Construct):
2797         * bridge/c/c_class.cpp:
2798         (JSC::Bindings::CClass::~CClass):
2799         (JSC::Bindings::CClass::methodsNamed):
2800         (JSC::Bindings::CClass::fieldNamed):
2801         * bridge/c/c_instance.cpp:
2802         (JSC::Bindings::CInstance::moveGlobalExceptionToExecState):
2803         (JSC::Bindings::CInstance::invokeMethod):
2804         (JSC::Bindings::CInstance::invokeDefaultMethod):
2805         (JSC::Bindings::CInstance::invokeConstruct):
2806         (JSC::Bindings::CInstance::getPropertyNames):
2807         * bridge/c/c_runtime.cpp:
2808         (JSC::Bindings::CField::valueFromInstance):
2809         (JSC::Bindings::CField::setValueToInstance):
2810         * bridge/c/c_utility.cpp:
2811         (JSC::Bindings::convertValueToNPVariant):
2812         (JSC::Bindings::convertNPVariantToValue):
2813         * bridge/jni/jni_jsobject.mm:
2814         (JavaJSObject::call):
2815         (JavaJSObject::eval):
2816         (JavaJSObject::getMember):
2817         (JavaJSObject::setMember):
2818         (JavaJSObject::removeMember):
2819         (JavaJSObject::getSlot):
2820         (JavaJSObject::setSlot):
2821         (JavaJSObject::toString):
2822         (JavaJSObject::convertValueToJObject):
2823         (JavaJSObject::convertJObjectToValue):
2824         * bridge/jni/jni_objc.mm:
2825         (JSC::Bindings::dispatchJNICall):
2826         * bridge/jni/jsc/JNIUtilityPrivate.cpp:
2827         (JSC::Bindings::convertValueToJValue):
2828         * bridge/jni/jsc/JavaClassJSC.cpp:
2829         (JavaClass::JavaClass):
2830         (JavaClass::~JavaClass):
2831         * bridge/jni/jsc/JavaInstanceJSC.cpp:
2832         (JavaInstance::stringValue):
2833         * bridge/jni/jsc/JavaMethodJSC.cpp:
2834         (appendClassName):
2835         (JavaMethod::signature):
2836         * bridge/jni/jsc/JavaStringJSC.h:
2837         (JSC::Bindings::JavaString::JavaString):
2838         (JSC::Bindings::JavaString::~JavaString):
2839         (JSC::Bindings::JavaString::utf8):
2840         (JSC::Bindings::JavaString::init):
2841         * bridge/jsc/BridgeJSC.cpp:
2842         (JSC::Bindings::Instance::createRuntimeObject):
2843         (JSC::Bindings::Instance::newRuntimeObject):
2844         * bridge/objc/objc_instance.mm:
2845         (ObjcInstance::moveGlobalExceptionToExecState):
2846         (ObjcInstance::invokeObjcMethod):
2847         (ObjcInstance::invokeDefaultMethod):
2848         (ObjcInstance::setValueOfUndefinedField):
2849         (ObjcInstance::getValueOfUndefinedField):
2850         * bridge/objc/objc_runtime.mm:
2851         (JSC::Bindings::ObjcField::valueFromInstance):
2852         (JSC::Bindings::ObjcField::setValueToInstance):
2853         * bridge/objc/objc_utility.mm:
2854         (JSC::Bindings::convertValueToObjcValue):
2855         (JSC::Bindings::convertNSStringToString):
2856         (JSC::Bindings::convertObjcValueToValue):
2857         * bridge/qt/qt_instance.cpp:
2858         (JSC::Bindings::QtInstance::~QtInstance):
2859         (JSC::Bindings::QtInstance::getQtInstance):
2860         (JSC::Bindings::QtInstance::newRuntimeObject):
2861         * bridge/qt/qt_pixmapruntime.cpp:
2862         (JSC::Bindings::QtPixmapInstance::createPixmapRuntimeObject):
2863         * bridge/qt/qt_runtime.cpp:
2864         (JSC::Bindings::convertValueToQVariant):
2865         (JSC::Bindings::convertQVariantToValue):
2866         (JSC::Bindings::QtRuntimeMetaMethod::call):
2867         (JSC::Bindings::QtRuntimeConnectionMethod::call):
2868         * bridge/qt/qt_runtime_qt4.cpp:
2869         (JSC::Bindings::convertValueToQVariant):
2870         (JSC::Bindings::convertQVariantToValue):
2871         (JSC::Bindings::QtRuntimeMetaMethod::call):
2872         (JSC::Bindings::QtRuntimeConnectionMethod::call):
2873         * html/HTMLCanvasElement.cpp:
2874         (WebCore::HTMLCanvasElement::createImageBuffer):
2875         * html/HTMLImageLoader.cpp:
2876         (WebCore::HTMLImageLoader::notifyFinished):
2877         * plugins/PluginView.cpp:
2878         (WebCore::PluginView::start):
2879         (WebCore::PluginView::stop):
2880         (WebCore::PluginView::performRequest):
2881         (WebCore::PluginView::npObject):
2882         (WebCore::PluginView::privateBrowsingStateChanged):
2883         * plugins/blackberry/PluginViewBlackBerry.cpp:
2884         (WebCore::PluginView::dispatchNPEvent):
2885         (WebCore::PluginView::setNPWindowIfNeeded):
2886         (WebCore::PluginView::platformStart):
2887         (WebCore::PluginView::getWindowInfo):
2888         * plugins/efl/PluginViewEfl.cpp:
2889         (WebCore::PluginView::dispatchNPEvent):
2890         * plugins/gtk/PluginViewGtk.cpp:
2891         (WebCore::PluginView::dispatchNPEvent):
2892         (WebCore::PluginView::handleKeyboardEvent):
2893         (WebCore::PluginView::handleMouseEvent):
2894         (WebCore::PluginView::setNPWindowIfNeeded):
2895         (WebCore::PluginView::platformStart):
2896         * plugins/mac/PluginViewMac.mm:
2897         (WebCore::PluginView::setNPWindowIfNeeded):
2898         (WebCore::PluginView::dispatchNPEvent):
2899         * plugins/qt/PluginViewQt.cpp:
2900         (WebCore::PluginView::dispatchNPEvent):
2901         (WebCore::PluginView::setNPWindowIfNeeded):
2902         (WebCore::PluginView::platformStart):
2903         * plugins/win/PluginViewWin.cpp:
2904         (WebCore::PluginView::dispatchNPEvent):
2905         (WebCore::PluginView::handleKeyboardEvent):
2906         (WebCore::PluginView::handleMouseEvent):
2907         (WebCore::PluginView::setNPWindowRect):
2908         * testing/js/WebCoreTestSupport.cpp:
2909         (WebCoreTestSupport::injectInternalsObject):
2910         (WebCoreTestSupport::resetInternalsObject):
2911         * xml/XMLHttpRequest.cpp:
2912         (WebCore::XMLHttpRequest::dropProtection):
2913
2914 2012-06-23  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2915
2916         Store hit-test rect in HitTestPoint as Rect.
2917         https://bugs.webkit.org/show_bug.cgi?id=89454
2918
2919         Reviewed by Darin Adler.
2920
2921         Calculate the rectangle early and store that instead of padding
2922         to avoid recalculating the rectangle for every single element
2923         hit tested.
2924
2925         No change in functionality. No new tests.
2926
2927         * page/EventHandler.cpp:
2928         (WebCore::EventHandler::bestClickableNodeForTouchPoint):
2929         (WebCore::EventHandler::bestZoomableAreaForTouchPoint):
2930         * rendering/HitTestResult.cpp:
2931         (WebCore::HitTestPoint::HitTestPoint):
2932         (WebCore::HitTestPoint::operator=):
2933         (WebCore::HitTestPoint::setPoint):
2934         (WebCore::hitTestPointIntersects):
2935         (WebCore::HitTestPoint::intersects):
2936         (WebCore::HitTestResult::addNodeToRectBasedTestResult):
2937         * rendering/HitTestResult.h:
2938         (HitTestPoint):
2939         (WebCore::HitTestPoint::boundingBox):
2940         (WebCore::HitTestPoint::topPadding):
2941         (WebCore::HitTestPoint::rightPadding):
2942         (WebCore::HitTestPoint::bottomPadding):
2943         (WebCore::HitTestPoint::leftPadding):
2944         (HitTestResult):
2945         * rendering/RenderBlock.cpp:
2946         (WebCore::RenderBlock::hitTestColumns):
2947         * rendering/RenderTableSection.cpp:
2948         (WebCore::RenderTableSection::nodeAtPoint):
2949
2950 2012-06-22  Benjamin Poulain  <bpoulain@apple.com>
2951
2952         Text with text-overflow:ellipsis and text-align:right is left aligned
2953         https://bugs.webkit.org/show_bug.cgi?id=88705
2954
2955         Reviewed by Dan Bernstein.
2956
2957         When building the line of a text with overflow, we do not know if we can place
2958         an ellipsis and where it should be. Because of that, text is laid out as if it does
2959         not have text-overflow: ellipsis.
2960
2961         This causes problems with text-alignement right in LTR and left in RTL. The shortened text
2962         did not follow the allignment.
2963
2964         This patch changes the position of lines with ellipsis after layout to follow the allignment.
2965         In RenderBlock::checkLinesForTextOverflow(), the call to RootInlineBox::placeEllipsis() now
2966         also gives the width of the truncated text. We use this width to re-compute the alignement and
2967         shift the box if necessary.
2968
2969         In RenderBlock::deleteEllipsisLineBoxes() we revert the text to the position computed with the
2970         total width. This way all layout computation is done as usual.
2971
2972         Tests: fast/css/text-overflow-ellipsis-text-align-left.html
2973                fast/css/text-overflow-ellipsis-text-align-right.html
2974
2975         * rendering/InlineBox.cpp:
2976         (WebCore::InlineBox::canAccommodateEllipsis): Make the method const for readability, truncating is
2977         done later in placeEllipsisBox().
2978         (WebCore::InlineBox::placeEllipsisBox): Add an output argument, truncatedWidth, giving the width
2979         of the text + ellipsis after truncation (if any truncation can be done).
2980         * rendering/InlineBox.h:
2981         (InlineBox):
2982         * rendering/InlineFlowBox.cpp:
2983         (WebCore::InlineBox::adjustLogicalPosition): adjustPosition() logical coordinates.
2984         (WebCore::InlineFlowBox::canAccommodateEllipsis):
2985         (WebCore::InlineFlowBox::placeEllipsisBox):
2986         * rendering/InlineFlowBox.h:
2987         (InlineFlowBox):
2988         * rendering/InlineTextBox.cpp:
2989         (WebCore::InlineTextBox::placeEllipsisBox):
2990         * rendering/InlineTextBox.h:
2991         (InlineTextBox):
2992         * rendering/RenderBlockLineLayout.cpp:
2993         (WebCore::RenderBlock::deleteEllipsisLineBoxes): In addition to removing the truncation, we
2994         need to revert the shift introduced by checkLinesForTextOverflow(). This restore the lines
2995         to its original, untruncated position in order to layout the block correctly in RenderBlock::layoutInlineChildren().
2996         (WebCore::RenderBlock::checkLinesForTextOverflow): After we truncate the text, we now recompute the shift we need
2997         for alignment, and move the line accordingly.
2998         * rendering/RenderDeprecatedFlexibleBox.cpp:
2999         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
3000         * rendering/RootInlineBox.cpp:
3001         (WebCore::RootInlineBox::placeEllipsis): Return the width of the truncated text + the width of the ellipsis.
3002         (WebCore::RootInlineBox::placeEllipsisBox):
3003         (WebCore::RootInlineBox::adjustPosition):
3004         * rendering/RootInlineBox.h:
3005         (RootInlineBox):
3006
3007 2012-06-22  Eugene Klyuchnikov  <eustas.big@gmail.com>
3008
3009         Web Inspector: Fix negative time interval on zoom-in
3010         https://bugs.webkit.org/show_bug.cgi?id=89798
3011
3012         Reviewed by Pavel Feldman.
3013
3014         Steps to reproduce:
3015         1) Record timeline
3016         2) Select small range with left tick close to zero
3017         3) Move pointer to the right end of the ruler
3018         4) Zoom-in with mouse-wheel
3019
3020         Result: right tick goes below the zero.
3021
3022         * inspector/front-end/TimelineOverviewPane.js:
3023         (WebInspector.TimelineOverviewWindow.prototype._zoom):
3024
3025 2012-06-22  Alexandru Chiculita  <achicu@adobe.com>
3026
3027         [CSS Shaders] Re-enable the CSS Shaders compile time flag on Safari Mac
3028         https://bugs.webkit.org/show_bug.cgi?id=89781
3029
3030         Reviewed by Dean Jackson.
3031
3032         Added ENABLE_CSS_SHADERS flag as enabled by default on Safari for Mac.
3033
3034         No new tests, just re-enabled existing tests.
3035
3036         * css/CSSValueKeywords.in: Added empty line to force a rebuild of the file on the EWS.
3037         * Configurations/FeatureDefines.xcconfig:
3038
3039 2012-06-22  David Grogan  <dgrogan@chromium.org>
3040
3041         IndexedDB: Avoid infinite loop if we try to encode -1 for leveldb
3042         https://bugs.webkit.org/show_bug.cgi?id=89625
3043
3044         It gets worse, memory is allocated inside the loop so the process is
3045         eventually killed by the OS.
3046
3047         Reviewed by Tony Chang.
3048
3049         Added tests to Source/WebKit/chromium/tests/IDBLevelDBCodingTest.cpp
3050
3051         * Modules/indexeddb/IDBLevelDBCoding.cpp:
3052         (WebCore::IDBLevelDBCoding::encodeInt):
3053         (WebCore::IDBLevelDBCoding::encodeVarInt):
3054
3055 2012-06-22  Hayato Ito  <hayato@chromium.org>
3056
3057         [Shadow] ShadowRoot.activeElement should use the result of re-targeting algorithm.
3058         https://bugs.webkit.org/show_bug.cgi?id=89763
3059
3060         Reviewed by Dimitri Glazkov.
3061
3062         Use the result of the re-targeting algorithm in calculating
3063         shadow root's activeElement so that ShadowRoot.activeElement returns
3064         a focused distributed node correctly as the algorithm says.
3065
3066         The spec is:
3067         https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#active-element
3068
3069         Tests: fast/dom/shadow/shadow-root-activeElement.html
3070
3071         * dom/EventDispatcher.cpp:
3072         (WebCore):
3073         (WebCore::EventRelatedTargetAdjuster::adjust):
3074         (WebCore::EventDispatcher::ensureEventAncestors):
3075         * dom/TreeScope.cpp:
3076         (WebCore::TreeScope::focusedNode):
3077         * html/shadow/InsertionPoint.h:
3078         (WebCore::InsertionPoint::contains):
3079
3080 2012-06-22  James Robinson  <jamesr@chromium.org>
3081
3082         [chromium] LayerRendererChromium is not getting visibility messages in single threaded compositing mode.
3083         https://bugs.webkit.org/show_bug.cgi?id=89045
3084
3085         Reviewed by Adrienne Walker.
3086
3087         Based on patch by Michal Mocny <mmocny@google.com>.
3088
3089         Invariants:
3090
3091         1.) We never commit (paint, animate, any of it) when not visible on the main thread -except- for
3092         compositeAndReadback, regardless of threaded vs non-threaded mode
3093         2.) CCLayerTreeHost::m_contentsTextureManager's memory budget is only set by updateLayers() when we are going to
3094         make a frame and is always set to a non-zero value
3095         3.) Zero-sized allocations from the GPU process are always serviced immediately on the impl thread.  Non-zero
3096         allocations are met in the next frame, whenever we would produce that frame according to our usual frame
3097         scheduling logic.
3098         4.) The impl thread always knows the set of currently-allocated managed texture IDs and can delete them all
3099         whenever it likes without needing the main thread to be responsive.
3100
3101         Details:
3102
3103         There are two main changes - tweaking how the contents texture manager's budget is handled and tweaking frame
3104         scheduling for the !visible case.
3105
3106         The scheduling change is a bit more subtle but it unifies the single and multi threaded paths and is really
3107         important.  Except for compositeAndReadback (which I'll talk about below), we simply won't produce frames when
3108         not visible.  This already happens in the single threaded path thanks to render_widget so the only change is to
3109         the threaded path.  The difficulty here is we might post a beginFrame task from the impl thread and then get a
3110         setVisible(false) call on the main thread before the beginFrame task runs.  Since I'm making the setVisible()
3111         call a blocking call from main thread -> impl thread, when the beginFrame task eventually does run on the main
3112         thread we can know that the impl thread's notion of visibility is in sync with the main threads.  Thus I'm
3113         planning to simply abort the frame before doing any processing on the main thread.  The scheduler will know if
3114         it gets a beginFrameAborted and COMMIT_STATE_IDLE.
3115
3116         compositeAndReadback is special - this call currently does come in when we aren't visible (in single and
3117         threaded mode) and we need to service it.  In particular, we need to send a beginFrame over and have it
3118         not be ignored on the main thread.  For this I'm thinking of having the proxy keep track of whether it's
3119         servicing a compositeAndReadback() and use that bit on the main thread to know to process the beginFrame
3120         normally.  On the impl side, we need a few changes.  First, we have to allocate a default framebuffer
3121         (ensureFramebufferCHROMIUM) even if we've dropped it previously and remember to discard it after the
3122         readPixels().  Second, we have to provide a non-zero contents texture allocation on the beginFrame message, and
3123         again remember to delete the textures after the readPixels().  Third, we have to know that the beginFrame is a
3124         forced frame so when we get the beginFrameComplete we go ahead with the rest of the frame.  For this, I think
3125         I'll have to add ACTION_BEGIN_FORCED_FRAME and a corresponding COMMIT_STATE_FORCED_FRAME_IN_PROGRESS so the
3126         scheduler can keep track of the magicness of this frame, and then add some logic after the readpixels call to
3127         drop resources after the readback.  It's probably a good time to stop swapping on readbacks too....
3128
3129         The contents texture manager's budget is only relevant when we want to make a frame, so it's now passed in on
3130         the updateLayers().  Since we only make frames when we are visible and we never have a zero allocation when
3131         visible (thanks to the frame scheduling changes above), this value is always non-zero.  The other thing the
3132         texture manager needs to know about is if we've killed all of the underlying textures from the impl thread -
3133         this bit is passed in by the proxy before the updateLayers() call.  This means if we're running while visible
3134         and the manager wants to decrease our budget to something other than zero, we'll get a new (non-zero) allocation
3135         on the impl thread, schedule a frame, then when it's time to make the frame pass the new lower limit in to
3136         updateLayers(), then have the contents texture manager evict down to our new limit and make a frame with the new
3137         budget.  When the commit completes we'll get notified on the impl thread of which textures the contents texture
3138         manager decided to evict and issue the deleteTexture() calls on them.
3139
3140         The texture budget we pass in will be based on the most recent non-zero memory allocation we received from the
3141         GPU memory manager, or some default value I'll pull out my ass if we haven't heard anything yet.  On compositor
3142         initialization, we can't afford to wait for a round-trip through the GPU process to get a budget for the first
3143         frame.  I don't think handling a decrease to a non-zero budget on a visible tab needs to be terribly urgent - we
3144         can get to it when we get to making the next frame.  If we wanted to satisfy reduced texture budgets directly
3145         from the impl thread, we could keep a priority-list ordered set of textures once we have priorities and delete
3146         based on that.  Let's worry about that later.
3147
3148         * platform/graphics/chromium/LayerRendererChromium.cpp:
3149         (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::onGpuMemoryAllocationChangedOnImpl):
3150         (WebCore::LayerRendererChromium::LayerRendererChromium):
3151         (WebCore::LayerRendererChromium::initialize):
3152         (WebCore::LayerRendererChromium::setVisible):
3153         (WebCore::LayerRendererChromium::setGpuMemoryAllocation):
3154         (WebCore):
3155         (WebCore::LayerRendererChromium::swapBuffers):
3156         (WebCore::LayerRendererChromium::getFramebufferPixels):
3157         * platform/graphics/chromium/LayerRendererChromium.h:
3158         (WebCore):
3159         (LayerRendererChromium):
3160         * platform/graphics/chromium/TextureManager.cpp:
3161         (WebCore::TextureManager::evictAndRemoveAllDeletedTextures):
3162         (WebCore):
3163         * platform/graphics/chromium/TextureManager.h:
3164         (TextureAllocator):
3165         (TextureManager):
3166         * platform/graphics/chromium/TrackingTextureAllocator.cpp:
3167         (WebCore::TrackingTextureAllocator::createTexture):
3168         (WebCore::TrackingTextureAllocator::deleteTexture):
3169         (WebCore):
3170         (WebCore::TrackingTextureAllocator::deleteAllTextures):
3171         * platform/graphics/chromium/TrackingTextureAllocator.h:
3172         (TrackingTextureAllocator):
3173         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3174         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
3175         (WebCore::CCLayerTreeHost::initializeLayerRenderer):
3176         (WebCore::CCLayerTreeHost::finishCommitOnImplThread):
3177         (WebCore::CCLayerTreeHost::setVisible):
3178         (WebCore::CCLayerTreeHost::evictAllContentTextures):
3179         (WebCore::CCLayerTreeHost::updateLayers):
3180         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
3181         (CCLayerTreeHost):
3182         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3183         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
3184         (WebCore::CCLayerTreeHostImpl::commitComplete):
3185         (WebCore::CCLayerTreeHostImpl::canDraw):
3186         (WebCore::CCLayerTreeHostImpl::context):
3187         (WebCore::CCLayerTreeHostImpl::releaseContentsTextures):
3188         (WebCore):
3189         (WebCore::CCLayerTreeHostImpl::setMemoryAllocationLimitBytes):
3190         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
3191         (CCLayerTreeHostImplClient):
3192         (WebCore::CCLayerTreeHostImpl::contentsTexturesWerePurgedSinceLastCommit):
3193         (WebCore::CCLayerTreeHostImpl::memoryAllocationLimitBytes):
3194         (CCLayerTreeHostImpl):
3195         * platform/graphics/chromium/cc/CCProxy.h:
3196         (CCProxy):
3197         * platform/graphics/chromium/cc/CCRenderer.h:
3198         (CCRendererClient):
3199         * platform/graphics/chromium/cc/CCScheduler.cpp:
3200         (WebCore::CCScheduler::beginFrameComplete):
3201         (WebCore::CCScheduler::beginFrameAborted):
3202         (WebCore):
3203         (WebCore::CCScheduler::didSwapBuffersComplete):
3204         (WebCore::CCScheduler::didLoseContext):
3205         (WebCore::CCScheduler::didRecreateContext):
3206         (WebCore::CCScheduler::vsyncTick):
3207         * platform/graphics/chromium/cc/CCScheduler.h:
3208         (CCScheduler):
3209         * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp:
3210         (WebCore::CCSchedulerStateMachine::beginFrameAborted):
3211         (WebCore):
3212         * platform/graphics/chromium/cc/CCSchedulerStateMachine.h:
3213         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
3214         (WebCore::CCSingleThreadProxy::setVisible):
3215         (WebCore):
3216         (WebCore::CCSingleThreadProxy::stop):
3217         (WebCore::CCSingleThreadProxy::commitAndComposite):
3218         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
3219         (CCSingleThreadProxy):
3220         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
3221         (WebCore::CCThreadProxy::CCThreadProxy):
3222         (WebCore::CCThreadProxy::compositeAndReadback):
3223         (WebCore::CCThreadProxy::setVisible):
3224         (WebCore):
3225         (WebCore::CCThreadProxy::setVisibleOnImplThread):
3226         (WebCore::CCThreadProxy::scheduledActionBeginFrame):
3227         (WebCore::CCThreadProxy::beginFrame):
3228         (WebCore::CCThreadProxy::beginFrameAbortedOnImplThread):
3229         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal):
3230         (WebCore::CCThreadProxy::layerTreeHostClosedOnImplThread):
3231         * platform/graphics/chromium/cc/CCThreadProxy.h:
3232         (CCThreadProxy):
3233         (BeginFrameAndCommitState):
3234         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
3235         (WebCore::CCVideoLayerImpl::~CCVideoLayerImpl):
3236         (WebCore::CCVideoLayerImpl::willDraw):
3237         (WebCore::CCVideoLayerImpl::willDrawInternal):
3238         (WebCore::CCVideoLayerImpl::FramePlane::allocateData):
3239         (WebCore::CCVideoLayerImpl::FramePlane::freeData):
3240         (WebCore::CCVideoLayerImpl::allocatePlaneData):
3241         (WebCore::CCVideoLayerImpl::freePlaneData):
3242         (WebCore::CCVideoLayerImpl::freeUnusedPlaneData):
3243         (WebCore::CCVideoLayerImpl::didLoseContext):
3244         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
3245         (FramePlane):
3246
3247 2012-06-22  Julien Chaffraix  <jchaffraix@webkit.org>
3248
3249         REGRESSION(r116446): Crash in RenderBoxModelObject::adjustedPositionRelativeToOffsetParent
3250         https://bugs.webkit.org/show_bug.cgi?id=89785
3251
3252         Reviewed by Abhishek Arya.
3253
3254         Test: fullscreen/full-screen-crash-offsetLeft.html
3255
3256         * rendering/RenderBoxModelObject.cpp:
3257         (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
3258         Added a NULL-check for parent() as it can be NULL in fullscreen mode. Also updated a stale
3259         comment while touching the code.
3260
3261 2012-06-22  Kenneth Russell  <kbr@google.com>
3262
3263         Unreviewed, rolling out r121064.
3264         http://trac.webkit.org/changeset/121064
3265         https://bugs.webkit.org/show_bug.cgi?id=88268
3266
3267         Broke Chromium Mac build.
3268
3269         * WebCore.gypi:
3270         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3271         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
3272         (WebCore::CCLayerTreeHost::updateAnimations):
3273         (WebCore::CCLayerTreeHost::finishCommitOnImplThread):
3274         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
3275         (WebCore):
3276         (WebCore::CCLayerTreeHost::frameNumber):
3277         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3278         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
3279         (WebCore::CCLayerTreeHostImpl::drawLayers):
3280         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
3281         (WebCore::CCLayerTreeHostImpl::frameNumber):
3282         (CCLayerTreeHostImpl):
3283         * platform/graphics/chromium/cc/CCProxy.h:
3284         (WebCore):
3285         (CCProxy):
3286         * platform/graphics/chromium/cc/CCRenderingStats.h: Removed.
3287         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
3288         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
3289         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
3290         * platform/graphics/chromium/cc/CCThreadProxy.h:
3291         (CCThreadProxy):
3292
3293 2012-06-22  Ryuan Choi  <ryuan.choi@samsung.com>
3294
3295         [EFL][WK2] Support keyboard event
3296         https://bugs.webkit.org/show_bug.cgi?id=89268
3297
3298         Reviewed by Chang Shu.
3299
3300         Extract keyDownCommandsMap and keyPressCommandsMap to share WebKit1/Efl and WebKit2/Efl.
3301
3302         * platform/efl/EflKeyboardUtilities.cpp:
3303         (WebCore):
3304         (WebCore::keyDownCommandsMap):
3305         (WebCore::keyPressCommandsMap):
3306         (KeyDownEntry):
3307         (KeyPressEntry):
3308         (WebCore::createKeyDownCommandMap):
3309         (WebCore::createKeyPressCommandMap):
3310         (WebCore::getKeyDownCommandName):
3311         (WebCore::getKeyPressCommandName):
3312         * platform/efl/EflKeyboardUtilities.h:
3313         (WebCore):
3314
3315 2012-06-22  Alec Flett  <alecflett@chromium.org>
3316
3317         IndexedDB: refactor index-writing to be more self-contained
3318         https://bugs.webkit.org/show_bug.cgi?id=89607
3319
3320         Reviewed by Tony Chang.
3321
3322         Refactor index-writing into the IndexWriter class. Does not change
3323         existing behavior but begins migrating index-writing logic into a
3324         self-contained class that can eventually be used in the
3325         frontend (renderer) side of IndexedDB.
3326
3327         No new tests, behavior is unchanged.
3328
3329         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
3330         (WebCore):
3331         (WebCore::IDBObjectStoreBackendImpl::putInternal):
3332         (WebCore::IDBObjectStoreBackendImpl::populateIndex):
3333
3334 2012-06-22  Dave Tu  <dtu@chromium.org>
3335
3336         [chromium] Expose rendering statistics to WebWidget.
3337         https://bugs.webkit.org/show_bug.cgi?id=88268
3338
3339         Reviewed by James Robinson.
3340
3341         The WebKit side of a basic framework for exposing rendering statistics
3342         to Chromium's --enable-benchmarking extension.
3343
3344         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
3345         (WebCore::CCLayerTreeHost::implFrameNumber):
3346         * platform/graphics/chromium/cc/CCProxy.h:
3347         (CCProxy):
3348         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
3349         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
3350         (WebCore::CCThreadProxy::implFrameNumber):
3351         (WebCore):
3352         (WebCore::CCThreadProxy::implFrameNumberOnImplThread):
3353         * platform/graphics/chromium/cc/CCThreadProxy.h:
3354         (CCThreadProxy):
3355
3356 2012-06-22  Shawn Singh  <shawnsingh@chromium.org>
3357
3358         [chromium] Do not accumulate occlusion from 3d layers on the main thread
3359         https://bugs.webkit.org/show_bug.cgi?id=89704
3360
3361         Reviewed by James Robinson.
3362
3363         Layer iterators on the main thread may not iterate over 3d layers
3364         in correct front-to-back or back-to-front order, because layer
3365         sorting is not performed on the main thread. As a result,
3366         occlusion tracking can accidentally think something is occluded if
3367         a 3d layer is processed out of order. This patch choses to solve
3368         this by avoiding accumulating occlusion for 3d layers. It may be
3369         appropriate later to consider adding layer sorting on the main
3370         thread, but for now that seemed like an unnecessary heavy-handed
3371         approach.
3372
3373         In addition to a new unit test that covers this, other unit tests
3374         were changed to work on the impl thread, so that the 3d layers
3375         still accumulate occlusion as required.
3376
3377         Unit test added to CCOcclusionTrackerTest:
3378           CCOcclusionTrackerTestUnsorted3dLayers
3379
3380         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
3381         (WebCore::layerIsInUnsorted3dRenderingContext):
3382         (WebCore):
3383         (WebCore::::markOccludedBehindLayer):
3384
3385 2012-06-22  Joshua Bell  <jsbell@chromium.org>
3386
3387         IndexedDB: Snapshot metadata in front end to avoid IPC round-trips
3388         https://bugs.webkit.org/show_bug.cgi?id=88467
3389
3390         Reviewed by Tony Chang.
3391
3392         Define a new type (IDBDatabaseMetadata) that captures the "schema" of an
3393         IDB database (name, version, properties of stores, properties of indexes).
3394         Add a method for the front end to request this from the back end once up
3395         front to avoid later calls (which may be slow IPC calls in ports). Implement
3396         IDB spec logic that the metadata should be frozen for a particular IDBDatabase
3397         connection, and only change within a version change transaction, and the spec's
3398         funky requirement for aborted version change transactions.
3399
3400         Test: storage/indexeddb/metadata.html
3401
3402         * Modules/indexeddb/IDBDatabase.cpp:
3403         (WebCore::IDBDatabase::IDBDatabase): Fetch metadata from back end when connection is created.
3404         (WebCore::IDBDatabase::transactionCreated):
3405         (WebCore::IDBDatabase::transactionFinished): Update metadata at the end of a transaction in 
3406         case it was rolled back.
3407         (WebCore::IDBDatabase::objectStoreNames): Move implementation to front-end.
3408         (WebCore):
3409         (WebCore::IDBDatabase::createObjectStore): Update local copy of metadata.
3410         (WebCore::IDBDatabase::deleteObjectStore): Update local copy of metadata.
3411         * Modules/indexeddb/IDBDatabase.h:
3412         (WebCore::IDBDatabase::name): Move implementation to front-end.
3413         (WebCore::IDBDatabase::version): Move implementation to front-end.
3414         (IDBDatabase):
3415         (WebCore::IDBDatabase::metadata):
3416         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
3417         (WebCore::IDBDatabaseBackendImpl::metadata): Construct a metadata snapshot.
3418         (WebCore):
3419         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
3420         (IDBDatabaseBackendImpl):
3421         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
3422         (WebCore):
3423         (IDBDatabaseBackendInterface):
3424         * Modules/indexeddb/IDBIndex.cpp: Store a copy of the metadata, which will never
3425         change during the lifetime of the index.
3426         (WebCore::IDBIndex::IDBIndex):
3427         * Modules/indexeddb/IDBIndex.h:
3428         (WebCore::IDBIndex::create):
3429         (WebCore::IDBIndex::name): Move implementation to front-end.
3430         (WebCore::IDBIndex::objectStore): Return RefPtr (unrelated tidying).
3431         (WebCore::IDBIndex::keyPath): Move implementation to front-end.
3432         (WebCore::IDBIndex::unique): Move implementation to front-end.
3433         (WebCore::IDBIndex::multiEntry): Move implementation to front-end.
3434         (IDBIndex):
3435         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
3436         (WebCore::IDBIndexBackendImpl::metadata): Construct a metadata snapshot.
3437         (WebCore):
3438         * Modules/indexeddb/IDBIndexBackendImpl.h:
3439         (IDBIndexBackendImpl):
3440         * Modules/indexeddb/IDBMetadata.h: Added new structs.
3441         (WebCore):
3442         (WebCore::IDBDatabaseMetadata::IDBDatabaseMetadata):
3443         (IDBDatabaseMetadata):
3444         (WebCore::IDBObjectStoreMetadata::IDBObjectStoreMetadata):
3445         (IDBObjectStoreMetadata):
3446         (WebCore::IDBIndexMetadata::IDBIndexMetadata):
3447         (IDBIndexMetadata):
3448         * Modules/inde