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