AutoTableLayout applies min-width redundantly with RenderTable
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-02-20  Ojan Vafai  <ojan@chromium.org>
2
3         AutoTableLayout applies min-width redundantly with RenderTable
4         https://bugs.webkit.org/show_bug.cgi?id=110426
5
6         Reviewed by Emil A Eklund.
7
8         * rendering/AutoTableLayout.cpp:
9         (WebCore::AutoTableLayout::computePreferredLogicalWidths):
10         This code used to do something, but has since been superceded by
11         code in RenderTable::computePreferredLogicalWidths.
12
13 2013-02-20  Dirk Schulze  <krit@webkit.org>
14
15         Enable CANVAS_PATH flag
16         https://bugs.webkit.org/show_bug.cgi?id=108508
17
18         Uneviewed attempt to fix Qt minimal build.
19
20         * html/canvas/DOMPath.h:
21         (WebCore::DOMPath::DOMPath):
22
23 \2013-02-20  Mark Lam  <mark.lam@apple.com>
24
25         Rename DatabaseBackendAsync to DatabaseBackend.
26         https://bugs.webkit.org/show_bug.cgi?id=110422.
27
28         Reviewed by Geoffrey Garen.
29
30         This is a purely cosmetic change to make the naming consistent with
31         the front-end Database.
32
33         No new tests.
34
35         * CMakeLists.txt:
36         * GNUmakefile.list.am:
37         * Modules/webdatabase/ChangeVersionWrapper.cpp:
38         (WebCore::ChangeVersionWrapper::performPreflight):
39         (WebCore::ChangeVersionWrapper::performPostflight):
40         * Modules/webdatabase/Database.cpp:
41         (WebCore::Database::Database):
42         (WebCore::Database::from):
43         (WebCore::Database::backend):
44         * Modules/webdatabase/Database.h:
45         * Modules/webdatabase/DatabaseBackend.cpp: Copied from Source/WebCore/Modules/webdatabase/DatabaseBackendAsync.cpp.
46         (WebCore::DatabaseBackend::DatabaseBackend):
47         (WebCore::DatabaseBackend::openAndVerifyVersion):
48         (WebCore::DatabaseBackend::performOpenAndVerify):
49         (WebCore::DatabaseBackend::close):
50         (WebCore::DatabaseBackend::runTransaction):
51         (WebCore::DatabaseBackend::inProgressTransactionCompleted):
52         (WebCore::DatabaseBackend::scheduleTransaction):
53         (WebCore::DatabaseBackend::scheduleTransactionStep):
54         (WebCore::DatabaseBackend::transactionClient):
55         (WebCore::DatabaseBackend::transactionCoordinator):
56         * Modules/webdatabase/DatabaseBackend.h: Copied from Source/WebCore/Modules/webdatabase/DatabaseBackendAsync.h.
57         * Modules/webdatabase/DatabaseBackendAsync.cpp: Removed.
58         * Modules/webdatabase/DatabaseBackendAsync.h: Removed.
59         * Modules/webdatabase/DatabaseBackendBase.cpp:
60         (WebCore::DatabaseBackendBase::~DatabaseBackendBase):
61         * Modules/webdatabase/DatabaseManager.cpp:
62         * Modules/webdatabase/DatabaseServer.cpp:
63         * Modules/webdatabase/DatabaseTask.cpp:
64         (WebCore::DatabaseTask::DatabaseTask):
65         (WebCore::DatabaseBackend::DatabaseOpenTask::DatabaseOpenTask):
66         (WebCore::DatabaseBackend::DatabaseOpenTask::doPerformTask):
67         (WebCore::DatabaseBackend::DatabaseOpenTask::debugTaskName):
68         (WebCore::DatabaseBackend::DatabaseCloseTask::DatabaseCloseTask):
69         (WebCore::DatabaseBackend::DatabaseCloseTask::doPerformTask):
70         (WebCore::DatabaseBackend::DatabaseCloseTask::debugTaskName):
71         (WebCore::DatabaseBackend::DatabaseTransactionTask::DatabaseTransactionTask):
72         (WebCore::DatabaseBackend::DatabaseTransactionTask::~DatabaseTransactionTask):
73         (WebCore::DatabaseBackend::DatabaseTransactionTask::doPerformTask):
74         (WebCore::DatabaseBackend::DatabaseTransactionTask::debugTaskName):
75         (WebCore::DatabaseBackend::DatabaseTableNamesTask::DatabaseTableNamesTask):
76         (WebCore::DatabaseBackend::DatabaseTableNamesTask::doPerformTask):
77         (WebCore::DatabaseBackend::DatabaseTableNamesTask::debugTaskName):
78         * Modules/webdatabase/DatabaseTask.h:
79         (WebCore::DatabaseTask::database):
80         (DatabaseTask):
81         (WebCore::DatabaseBackend::DatabaseOpenTask::create):
82         (DatabaseBackend::DatabaseOpenTask):
83         (WebCore::DatabaseBackend::DatabaseCloseTask::create):
84         (DatabaseBackend::DatabaseCloseTask):
85         (WebCore::DatabaseBackend::DatabaseTableNamesTask::create):
86         (DatabaseBackend::DatabaseTableNamesTask):
87         * Modules/webdatabase/DatabaseThread.cpp:
88         (WebCore::DatabaseThread::recordDatabaseOpen):
89         (WebCore::DatabaseThread::recordDatabaseClosed):
90         (WebCore::SameDatabasePredicate::SameDatabasePredicate):
91         (SameDatabasePredicate):
92         (WebCore::DatabaseThread::unscheduleDatabaseTasks):
93         * Modules/webdatabase/DatabaseThread.h:
94         * Modules/webdatabase/SQLStatementBackend.cpp:
95         (WebCore::SQLStatementBackend::execute):
96         (WebCore::SQLStatementBackend::setDatabaseDeletedError):
97         (WebCore::SQLStatementBackend::setVersionMismatchedError):
98         (WebCore::SQLStatementBackend::setFailureDueToQuota):
99         * Modules/webdatabase/SQLStatementBackend.h:
100         * Modules/webdatabase/SQLTransactionBackend.cpp:
101         (WebCore::SQLTransactionBackend::create):
102         (WebCore::SQLTransactionBackend::SQLTransactionBackend):
103         * Modules/webdatabase/SQLTransactionBackend.h:
104         (WebCore::SQLTransactionBackend::database):
105         * Modules/webdatabase/SQLTransactionCoordinator.cpp:
106         (WebCore::getDatabaseIdentifier):
107         * Target.pri:
108         * WebCore.gypi:
109         * WebCore.vcproj/WebCore.vcproj:
110         * WebCore.vcxproj/WebCore.vcxproj:
111         * WebCore.vcxproj/WebCore.vcxproj.filters:
112         * WebCore.xcodeproj/project.pbxproj:
113
114 2013-02-20  David Kilzer  <ddkilzer@apple.com>
115
116         Upstream SharedTimerIOS.mm
117         <http://webkit.org/b/110161>
118
119         Reviewed by Benjamin Poulain.
120
121         * Configurations/WebCore.xcconfig:
122         (EXCLUDED_SOURCE_FILE_NAMES_iphoneos): Add SharedTimerMac.mm.
123         * WebCore.xcodeproj/project.pbxproj: Add SharedTimerIOS.mm.
124         * platform/ios/SharedTimerIOS.mm: Add.
125         (WebCore):
126         (-[WebCoreResumeNotifierIOS init]):
127         (-[WebCoreResumeNotifierIOS dealloc]):
128         (-[WebCoreResumeNotifierIOS didWake]):
129         (WebCore::setSharedTimerFiredFunction):
130         (WebCore::timerFired):
131         (WebCore::setSharedTimerFireInterval):
132         (WebCore::stopSharedTimer):
133
134 2013-02-20  Ojan Vafai  <ojan@chromium.org>
135
136         Speculative fix for EFL and Windows compilers not realizing
137         that all possible cases have a return value from this switch.
138
139         * rendering/RenderBox.cpp:
140         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
141
142 2013-02-20  David Hyatt  <hyatt@apple.com>
143
144         [New Multicolumn] Fix overflow computation for column blocks.
145         https://bugs.webkit.org/show_bug.cgi?id=110392.
146
147         Reviewed by Simon Fraser.
148
149         * rendering/RenderBox.cpp:
150         (WebCore::RenderBox::addOverflowFromChild):
151         Exclude in-flow RenderFlowThreads from overflow propagation.
152
153         * rendering/RenderMultiColumnSet.h:
154         * rendering/RenderRegion.h:
155         (WebCore::RenderRegion::shouldHaveAutoLogicalHeight):
156          * rendering/RenderRegionSet.h:
157         (RenderRegionSet):
158         Override shouldHaveAutoLogicalHeight to always be false
159         for region sets and for columns. Eventually we're going to try
160         to leverage this code to do column balancing, and that's why
161         RenderMultiColumnSet has a unique override.
162
163 2013-02-20  Brandon Jones  <bajones@google.com>
164  
165         Printing WebGL canvases in Chrome uses stale data after first print
166         https://bugs.webkit.org/show_bug.cgi?id=110003
167  
168         Reviewed by Kenneth Russell.
169  
170         Unable to validate printed content automatically. No regression in existing WebGL tests.
171  
172          * html/canvas/WebGLRenderingContext.cpp:
173          (WebCore):
174          (WebCore::WebGLRenderingContext::paintRenderingResultsToCanvas):
175
176 2013-02-20  Christian Biesinger  <cbiesinger@chromium.org>
177
178         Incorrect rendering for flex boxes with percentage height in a table cell
179         https://bugs.webkit.org/show_bug.cgi?id=110389
180
181         Reviewed by Tony Chang.
182
183         Tests: css3/flexbox/flex-percentage-height-in-table-standards-mode.html
184                css3/flexbox/flex-percentage-height-in-table.html
185
186         * rendering/RenderFlexibleBox.cpp:
187         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
188         Always update the logical height of the flex box, not just when it is
189         auto. If necessary, the later updateLogicalHeight() call will adjust
190         it.
191
192 2013-02-20  Philip Rogers  <pdr@google.com>
193
194         Account for transform in SVG background images
195         https://bugs.webkit.org/show_bug.cgi?id=110295
196
197         Reviewed by Dirk Schulze.
198
199         Tiled SVG background images are rendererd by drawing the SVG content into a temporary
200         image buffer, then stamping out a tiled pattern using this buffer. Previously the
201         image buffer did not account for CSS transforms which could result in pixelated backgrounds.
202
203         This patch takes advantage of the context's transform when sizing the temporary tiling
204         image buffer. Because the context's transform also includes scale, this patch simplifies
205         the SVG image code to no longer track scale.
206
207         Test: svg/as-background-image/svg-transformed-background.html
208
209         * loader/cache/CachedImage.cpp:
210         (WebCore):
211         (WebCore::CachedImage::imageForRenderer):
212
213             CachedImage::lookupOrCreateImageForRenderer no longer creates images so it has been
214             refactored into just "imageForRenderer". Previously there were two versions of
215             lookupOrCreateImageForRenderer; these have been folded into imageForRenderer.
216
217         * loader/cache/CachedImage.h:
218         * svg/graphics/SVGImage.cpp:
219         (WebCore::SVGImage::drawPatternForContainer):
220
221             To create the temporary tiling image buffer, the final size in screen coordinates is
222             needed. This is now computed using the current context's CTM. Because the CTM
223             already includes the page scale, all page scale tracking can be removed.
224
225             The adjustments to srcRect and the pattern transform are the same as before, just
226             refactored to use imageBufferScale which has x and y components.
227
228         * svg/graphics/SVGImage.h:
229         * svg/graphics/SVGImageCache.cpp:
230         (WebCore::SVGImageCache::setContainerSizeForRenderer):
231
232             Because the page scale needed to be cached between calls to
233             setContainerSizeForRenderer, this function was written to modify an existing cache
234             entry. Because the page scale no longer needs to be tracked, this code has been
235             simplified to re-write any existing cache entry.
236
237         (WebCore::SVGImageCache::imageSizeForRenderer):
238
239             This function has been simplified by calling SVGImageForContainer::size() instead
240             of computing this value manually. The value returned remains the same, containing
241             the container size multiplied by zoom.
242
243         (WebCore::SVGImageCache::imageForRenderer):
244
245             Previously we set the page scale on every call to imageForRenderer. Because page scale
246             no longer needs to be tracked, this function has been simplified to simply return
247             the cached SVGImageForContainer.
248
249         * svg/graphics/SVGImageForContainer.cpp:
250         (WebCore::SVGImageForContainer::drawPattern):
251         * svg/graphics/SVGImageForContainer.h:
252         (WebCore::SVGImageForContainer::create):
253         (WebCore::SVGImageForContainer::SVGImageForContainer):
254         (SVGImageForContainer):
255
256 2013-02-20  Jer Noble  <jer.noble@apple.com>
257
258         Crash in com.apple.WebKit2.WebProcessService at com.apple.avfoundation: __73-[AVAssetResourceLoader _attemptDelegateHandlingOfRequestWithDictionary:]_block_invoke + 51
259         https://bugs.webkit.org/show_bug.cgi?id=110385
260
261         Reviewed by Eric Carlson.
262
263         Ensure AVFoundation does not attempt to message a dead object by explicitly disassociating
264         the AVAssetResourceLoaderDelegate on MediaPlayerPrivateAVFoundationObjC destruction.
265
266         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
267         (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC):
268
269 2013-02-20  Ojan Vafai  <ojan@chromium.org>
270
271         Positioned, replaced elements with intrinsic width keywords compute the wrong width
272         https://bugs.webkit.org/show_bug.cgi?id=110393
273
274         Reviewed by Emil A Eklund.
275
276         Test: fast/css-intrinsic-dimensions/intrinsic-sized-replaced-absolutes.html
277
278         * rendering/RenderBox.cpp:
279         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
280         Add the intrinsic size keywords to the switch. Confusingly, we have to
281         subtract the border and padding since the callers expect the content width.
282
283         * rendering/RenderReplaced.cpp:
284         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
285         Don't do the intrinsic ratio calculation if the width is an
286         intrinsic width keyword, as per, http://dev.w3.org/csswg/css3-sizing/#replaced-intrinsic.
287
288         (WebCore::RenderReplaced::computeIntrinsicLogicalWidths):
289         (WebCore::RenderReplaced::computePreferredLogicalWidths):
290         The old code was trying to apply the intrinsic ratio calculation to
291         the intrinsic width, which is wrong per spec.
292
293 2013-02-20  Alec Flett  <alecflett@chromium.org>
294
295         LevelDB: Remove excess vector copy
296         https://bugs.webkit.org/show_bug.cgi?id=110399
297
298         Reviewed by Tony Chang.
299
300         Remove an extra copy introduced by the makeVector function.
301
302         No new tests, this is covered by existing tests.
303
304         * platform/leveldb/LevelDBDatabase.cpp:
305         (WebCore::LevelDBDatabase::safeGet):
306
307 2013-02-20  Simon Fraser  <simon.fraser@apple.com>
308
309         Zoomed, slow-scrolling pages keep recreating tiles when scrolled
310         https://bugs.webkit.org/show_bug.cgi?id=110379
311
312         Reviewed by Tim Horton.
313
314         On slow-scrolling pages the TileCache makes the tiles the size of
315         the visible rect to minimize per-tile painting overhead. If the size
316         of that rect changes, the TileCache re-creates all the tiles.
317         
318         This was a problem whem zoomed, because mapping the visible rect
319         through the scale transform and then rounding it would cause the
320         size to keep changing, causing lots of tile re-creation.
321         
322         Fix by carrying the visibleRect around as a FloatRect, and doing
323         the same for the exposedRect. We then only expand to integers
324         when computing the tile size. This also fixes an issue where we could
325         sometimes make extra tiles because of fractional bits of tiles at the edges,
326         as shown by the test result change.
327
328         * platform/graphics/TiledBacking.h:
329         * platform/graphics/ca/GraphicsLayerCA.cpp:
330         (WebCore::GraphicsLayerCA::updateVisibleRect):
331         * platform/graphics/ca/mac/TileCache.h:
332         * platform/graphics/ca/mac/TileCache.mm:
333         (WebCore::TileCache::setVisibleRect):
334         (WebCore::TileCache::setExposedRect):
335         (WebCore::TileCache::prepopulateRect):
336         (WebCore::TileCache::computeTileCoverageRect):
337         (WebCore::TileCache::tileSizeForCoverageRect):
338         (WebCore::TileCache::blankPixelCountForTiles):
339         (WebCore::TileCache::revalidateTiles):
340         (WebCore::TileCache::ensureTilesForRect):
341         * platform/graphics/ca/mac/WebTileLayer.mm:
342         (-[WebTileLayer logFilledFreshTile]):
343
344 2013-02-20  Julien Chaffraix  <jchaffraix@webkit.org>
345
346         [CSS Grid Layout] Implement the auto-placement algorithm without grid growth
347         https://bugs.webkit.org/show_bug.cgi?id=110277
348
349         Reviewed by Tony Chang.
350
351         Tests: fast/css-grid-layout/grid-item-addition-auto-placement-update.html
352                fast/css-grid-layout/grid-item-removal-auto-placement-update.html
353                fast/css-grid-layout/grid-auto-flow-resolution.html (extended to cover more cases)
354
355         This change implements most of the auto-placement algorithm per
356         http://dev.w3.org/csswg/css3-grid-layout/#auto-placement-algo
357
358         To limit the size of the code change, it doesn't implement growing the grid if there
359         are no empty grid areas. If we don't find any empty grid areas, we just insert in the first
360         one, like what grid-auto-flow: none would do (which explains the test failures).
361
362         * rendering/RenderGrid.cpp:
363         (WebCore::RenderGrid::GridIterator::nextEmptyGridArea):
364         Added this function to return the GridCoordinate of the next empty grid area along
365         the iterator's direction.
366
367         (WebCore::RenderGrid::placeItemsOnGrid):
368         Split this function into the different steps below. For efficiency, collect the auto vs specified
369         major axis grid items in different Vectors.
370
371         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
372         Added this function that implements part of step 1 of the algorithm (the grid items without
373         auto row / column are already handled in placeItemsOnGrid).
374
375         (WebCore::RenderGrid::placeAutoMajorAxisItemsOnGrid):
376         Added this function that iterates over the auto grid items and call placeAutoMajorAxisItemOnGrid.
377
378         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
379         Added this method to handle the step 4 of the algorithm. Based on the minor axis's position,
380         it either walks along the major axis once or several times until it finds an empty grid area
381         for the grid item.
382
383         (WebCore::RenderGrid::autoPlacementMajorAxisPositionForChild):
384         (WebCore::RenderGrid::autoPlacementMinorAxisPositionForChild):
385         (WebCore::RenderGrid::autoPlacementMajorAxisDirection):
386         (WebCore::RenderGrid::autoPlacementMinorAxisDirection):
387         Added these helper functions that return minor / major axis positions & direction.
388
389         * rendering/RenderGrid.h:
390         Added the previous new RenderGrid functions.
391
392 2013-02-20  Vincent Scheib  <scheib@chromium.org>
393
394         Accept 'allowfullscreen' in addition to 'webkitallowfullscreen'.
395         https://bugs.webkit.org/show_bug.cgi?id=110374
396
397         Reviewed by Adam Barth.
398
399         The fullscreen API also includes a new HTML attribute for iframes
400         which permits its use. That attribute, 'allowfullcreen' is now
401         included in the HTML specification [1] and is stable enough
402         to remove the webkit prefix.
403
404         [1] http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-allowfullscreen
405
406         Tests: fullscreen/full-screen-enabled-prefixed.html
407                fullscreen/full-screen-iframe-allowed-prefixed.html
408                fullscreen/full-screen-iframe-with-mixed-allow-webkitallow-attribute.html
409
410         * dom/Document.cpp:
411         (WebCore::isAttributeOnAllOwners):
412         (WebCore::Document::fullScreenIsAllowedForElement):
413         (WebCore::Document::webkitFullscreenEnabled):
414         * html/HTMLAttributeNames.in:
415
416 2013-02-20  Roger Fong  <roger_fong@apple.com>
417
418         Unreviewed. Remove references to SAFARI_THEME from Windows Solution.
419         <rdar://problem/13258710>
420
421         * config.h:
422         * page/Settings.cpp:
423         * page/Settings.h:
424         * platform/win/ScrollbarThemeWin.cpp:
425         * rendering/RenderThemeWin.cpp:
426
427 2013-02-20  Roger Fong  <roger_fong@apple.com>
428
429         Get VS2010 Solution B&I ready.
430         <rdar://problem/1322988>
431
432         Rubberstamped by Timothy Horton.
433
434         Add Production configuration. 
435         Add a WebCore submit solution with a DebugSuffix configuration. 
436         Modify WebCore.make as necessary.
437         
438         * DerivedSources.make:
439         * WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj:
440         * WebCore.vcxproj/QTMovieWin/QTMovieWinCommon.props:
441         * WebCore.vcxproj/QTMovieWin/QTMovieWinProduction.props: Added.
442         * WebCore.vcxproj/QTMovieWin/QTMovieWinRelease.props:
443         * WebCore.vcxproj/WebCore.make: Added.
444         * WebCore.vcxproj/WebCore.sln: Removed.
445         * WebCore.vcxproj/WebCore.submit.sln: Copied from Source/WebCore/WebCore.vcxproj/WebCore.sln.
446         * WebCore.vcxproj/WebCore.vcxproj:
447         * WebCore.vcxproj/WebCoreGenerated.vcxproj:
448         * WebCore.vcxproj/WebCoreGeneratedProduction.props: Added.
449         * WebCore.vcxproj/WebCoreGeneratedRelease.props:
450         * WebCore.vcxproj/WebCoreProduction.props: Added.
451         * WebCore.vcxproj/WebCoreRelease.props:
452         * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
453
454 2013-02-20  Adam Klein  <adamk@chromium.org>
455
456         [v8] Fix an erroneous WrapperGrouper call in preparation for refactoring
457         https://bugs.webkit.org/show_bug.cgi?id=110396
458
459         Reviewed by Kentaro Hara.
460
461         This is in preparation for a refactor to expose a simplified
462         WrapperGrouper interface to V8 wrapper classes enabling them to
463         specify multiple roots per wrapper object. 
464
465         * bindings/v8/V8GCController.cpp: Since MutationObservers are not Nodes, the correct call here is addObjectToGroup, as it is for all other non-Node wrappers.
466
467 2013-02-20  Levi Weintraub  <leviw@chromium.org>
468
469         Line layout (but not pref widths) double-counts word spacing when between inlines
470         https://bugs.webkit.org/show_bug.cgi?id=110381
471
472         Reviewed by Emil A Eklund.
473
474         When a word break with a space occurs between inlines and word-spacing is non-zero,
475         line layout incorrectly committed the word-spacing value to the line twice, causing
476         wrapping in inline-blocks. To fix this, clear the word-spacing value when between
477         words and ignoring spaces, as we will already have added the word-spacing to the
478         line.
479
480         Test: fast/text/word-space-between-inlines.html
481
482         * rendering/RenderBlockLineLayout.cpp:
483         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
484
485 2013-02-20  Nate Chapin  <japhet@chromium.org>
486
487         Crash in WebCore::FrameLoader::checkCompleted()
488         https://bugs.webkit.org/show_bug.cgi?id=110237
489
490         Reviewed by Abhishek Arya.
491
492         Test: http/tests/misc/delete-frame-during-readystatechange.html
493
494         * loader/FrameLoader.cpp:
495         (WebCore::FrameLoader::checkCompleted): Protect before setReadyState() is called.
496
497 2013-02-20  David Grogan  <dgrogan@chromium.org>
498
499         IndexedDB: Limit LevelDB's max open files
500         https://bugs.webkit.org/show_bug.cgi?id=109993
501
502         Reviewed by Tony Chang.
503
504         LevelDB keeps up to 1000 (by default) data files open at a time to
505         avoid having to open() them. This has caused chromium to hit the
506         process-wide open file limit. This patch changes max_open_files to 20,
507         as that's the minimum permitted by LevelDB and we have no reason to
508         think that performance will suffer because of the extra open calls.
509
510         No new tests - a chromium browser test that tracks the open LevelDB
511         files is plausible but is blocked on http://crbug.com/177249/.
512
513         * platform/leveldb/LevelDBDatabase.cpp:
514         (WebCore::openDB):
515
516 2013-02-20  David Hyatt  <hyatt@apple.com>
517
518         [New Multicolumn] Resize RenderMultiColumnSets around their columns.
519         https://bugs.webkit.org/show_bug.cgi?id=110378.
520
521         Reviewed by Dirk Schulze.
522
523         Test: fast/multicol/newmulticol/positioned-with-constrained-height.html.
524
525         * rendering/RenderBlock.h:
526         (RenderBlock):
527         Make computeOverflow public so that RenderMultiColumnFlowThread can
528         access it.
529
530         * rendering/RenderMultiColumnFlowThread.cpp:
531         (WebCore::RenderMultiColumnFlowThread::layout):
532         Subclass layout to recompute the overflow for RenderMultiColumnBlock
533         after the flow thread has finished layout. This way it can account
534         for changes in RenderMultiColumnSets without having to do a second
535         layout pass.
536
537         * rendering/RenderMultiColumnFlowThread.h:
538         (RenderMultiColumnFlowThread):
539         Override layout().
540
541         * rendering/RenderMultiColumnSet.cpp:
542         (WebCore::RenderMultiColumnSet::columnCount):
543         Clean up a comment that referred to portions as region rects still.
544
545         (WebCore::RenderMultiColumnSet::setFlowThreadPortionRect):
546         * rendering/RenderMultiColumnSet.h:
547         * rendering/RenderRegion.h:
548         (WebCore::RenderRegion::setFlowThreadPortionRect):
549         Make setFlowThreadPortionRect virtual and actually mutate the size
550         and position of RenderMultiColumnSets so that they enclose their
551         column rects.
552
553 2013-02-20  Dirk Schulze  <krit@webkit.org>
554
555         Enable CANVAS_PATH flag
556         https://bugs.webkit.org/show_bug.cgi?id=108508
557
558         Reviewed by Simon Fraser.
559
560         Enable CANVAS_PATH flag on trunk.
561
562         Existing tests cover the feature.
563
564         * Configurations/FeatureDefines.xcconfig:
565
566 2013-02-20  Sheriff Bot  <webkit.review.bot@gmail.com>
567
568         Unreviewed, rolling out r143441.
569         http://trac.webkit.org/changeset/143441
570         https://bugs.webkit.org/show_bug.cgi?id=110376
571
572         May be causing chromium content_browsertests failures.
573         (Requested by vollick on #webkit).
574
575         * bindings/v8/ScriptValue.cpp:
576         (WebCore::ScriptValue::serialize):
577         (WebCore::ScriptValue::getString):
578         (WebCore::ScriptValue::toString):
579         (WebCore::ScriptValue::toInspectorValue):
580         * bindings/v8/ScriptValue.h:
581         (WebCore::ScriptValue::ScriptValue):
582         (WebCore::ScriptValue::operator=):
583         (WebCore::ScriptValue::operator==):
584         (WebCore::ScriptValue::isEqual):
585         (WebCore::ScriptValue::isFunction):
586         (WebCore::ScriptValue::isNull):
587         (WebCore::ScriptValue::isUndefined):
588         (WebCore::ScriptValue::isObject):
589         (WebCore::ScriptValue::hasNoValue):
590         (WebCore::ScriptValue::clear):
591         (WebCore::ScriptValue::v8Value):
592         (ScriptValue):
593         * bindings/v8/SharedPersistent.h:
594         (WebCore):
595         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
596         (WebCore::InjectedScriptHost::scriptValueAsNode):
597         * bindings/v8/custom/V8MessageEventCustom.cpp:
598         (WebCore::V8MessageEvent::dataAttrGetterCustom):
599
600 2013-02-15  Dirk Schulze  <krit@webkit.org>
601
602         [Chromium] Add runtime flag for CanvasPath
603         https://bugs.webkit.org/show_bug.cgi?id=109997
604
605         Reviewed by Adam Barth.
606
607         Add runtime flag for Chromium.
608
609         * bindings/generic/RuntimeEnabledFeatures.cpp:
610         (WebCore):
611         * bindings/generic/RuntimeEnabledFeatures.h:
612         (RuntimeEnabledFeatures):
613         (WebCore::RuntimeEnabledFeatures::setCanvasPathEnabled):
614         (WebCore::RuntimeEnabledFeatures::canvasPathEnabled):
615         * html/canvas/DOMPath.idl:
616         * page/DOMWindow.idl:
617
618 2013-02-20  Laszlo Gombos  <l.gombos@samsung.com>
619
620         Remove unnecessary includes for Platform.h from headers
621         https://bugs.webkit.org/show_bug.cgi?id=110300
622
623         Reviewed by Alexey Proskuryakov.
624
625         wtf/Platform.h only need to be included in a few places directly
626         as it is included in config.h. Remove the unnecessay duplicate as
627         it can be confusing.
628
629         No new tests, no change in functionality.
630
631         * platform/SecureTextInput.h:
632         * platform/audio/Biquad.h:
633         * platform/audio/FFTFrame.h:
634         * platform/graphics/cpu/arm/filters/FEBlendNEON.h:
635         * platform/graphics/cpu/arm/filters/NEONHelpers.h:
636         * platform/graphics/filters/FELighting.h:
637
638 2013-02-20  Florin Malita  <fmalita@chromium.org>
639
640         [SVG] Update of element referenced by multiple 'use' nodes is absurdly slow
641         https://bugs.webkit.org/show_bug.cgi?id=97905
642
643         Reviewed by Dirk Schulze.
644
645         Rebuilding the shadow and instance trees of dependent use nodes recursively can be
646         extremely inefficient with non-trivial dependency graphs (the trees are not constructed
647         in topological order).
648
649         To avoid redundant buildShadowAndInstanceTree() invokations, separate the invalidation
650         phase from the actual tree (re)building phase, and only descend into the dependency DAG
651         during the invalidation phase (recursion also stops at nodes that have been previously
652         invalidated).
653
654         No new tests: functional coverage provided by existing tests, perfomance tracked by
655         PerformanceTests/SVG/SvgNestedUse.html.
656
657         * svg/SVGUseElement.cpp:
658         (WebCore::SVGUseElement::buildPendingResource):
659         (WebCore::SVGUseElement::buildShadowAndInstanceTree):
660         (WebCore::SVGUseElement::invalidateShadowTree):
661         (WebCore):
662         (WebCore::SVGUseElement::invalidateDependentShadowTrees):
663         * svg/SVGUseElement.h:
664         (SVGUseElement):
665
666 2013-02-20  Tim Horton  <timothy_horton@apple.com>
667
668         RenderLayerBacking should initialize TiledBacking's isInWindow state with Page's isInWindow, not isOnscreen
669         https://bugs.webkit.org/show_bug.cgi?id=110370
670         <rdar://problem/13254006>
671
672         Reviewed by Simon Fraser.
673
674         * rendering/RenderLayerBacking.cpp:
675         (WebCore::RenderLayerBacking::RenderLayerBacking):
676
677 2013-02-20  Mark Lam  <mark.lam@apple.com>
678
679         Cleanup the SQLTransaction and SQLTransactionBackend state dispatch
680         to only honor a state transition request if the associated database
681         hasn't been interrupted.
682         https://bugs.webkit.org/show_bug.cgi?id=110247.
683
684         Reviewed by Antti Koivisto.
685
686         No new tests.
687
688         * Modules/webdatabase/SQLTransaction.cpp:
689         (WebCore::SQLTransaction::performPendingCallback):
690         (WebCore::SQLTransaction::computeNextStateAndCleanupIfNeeded):
691         * Modules/webdatabase/SQLTransaction.h:
692         * Modules/webdatabase/SQLTransactionBackend.cpp:
693         (WebCore::SQLTransactionBackend::computeNextStateAndCleanupIfNeeded):
694         (WebCore::SQLTransactionBackend::performNextStep):
695         * Modules/webdatabase/SQLTransactionBackend.h:
696
697 2013-02-20  Alexey Proskuryakov  <ap@apple.com>
698
699         ResourceHandle::loadResourceSynchronously should have blob support in cross-platform code
700         https://bugs.webkit.org/show_bug.cgi?id=110364
701
702         Reviewed by Anders Carlsson.
703
704         * platform/network/ResourceHandle.h:
705         * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::loadResourceSynchronously):
706         Added a cross-platform version to keep blob-related logic in one place.
707
708         * platform/network/blackberry/ResourceHandleBlackBerry.cpp:
709         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
710         * platform/network/cf/ResourceHandleCFNet.cpp:
711         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
712         * platform/network/curl/ResourceHandleCurl.cpp:
713         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
714         * platform/network/mac/ResourceHandleMac.mm:
715         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
716         * platform/network/qt/ResourceHandleQt.cpp:
717         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
718         * platform/network/soup/ResourceHandleSoup.cpp:
719         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
720         * platform/network/win/ResourceHandleWin.cpp:
721         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
722         Renamed loadResourceSynchronously to platformLoadResourceSynchronously,
723         removed blob handling from platforms that had it.
724
725 2013-02-20  David Hyatt  <hyatt@apple.com>
726
727         [New Multicolumn] RenderMultiColumnFlowThreads should establish a BFC.
728         https://bugs.webkit.org/show_bug.cgi?id=110366.
729
730         Reviewed by Antti Koivisto.
731
732         RenderFlowThreads should establish a block formatting context always.
733         CSS Regions have named flow thread that they absolutely position, and so
734         they got this for free by being absolutely positioned.
735         
736         RenderMultiColumnFlowThreads, however, are relative positioned, so we need
737         to just add an isRenderFlowThread case specifically so we're not dependent
738         on the positioning scheme used for the flow thread to establish the BFC.
739         
740         Test: fast/multicol/newmulticol/float-*.html.
741
742         * rendering/RenderBlock.cpp:
743         (WebCore::RenderBlock::MarginInfo::MarginInfo):
744
745 2013-02-20  David Hyatt  <hyatt@apple.com>
746
747         [New Multicolumn] Column gap is computed incorrectly.
748         https://bugs.webkit.org/show_bug.cgi?id=110360.
749
750         Reviewed by Simon Fraser.
751
752         Test: fast/multicol/newmulticol/layers-split-across-columns.html.
753
754         * rendering/RenderMultiColumnSet.cpp:
755         (WebCore::RenderMultiColumnSet::columnGap):
756         Make sure we ask the RenderMultiColumnBlock for the gap rather than our
757         own style, since we don't actually have the gap value in our style.
758         
759         (WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect):
760         * rendering/RenderMultiColumnSet.h:
761         Fix another spot where the columnGap was an int. It should be a LayoutUnit.
762
763 2013-02-20  Robert Hogan  <robert@webkit.org>
764
765         No caret on empty contenteditable element with negative text-indent
766         https://bugs.webkit.org/show_bug.cgi?id=108633
767
768         Reviewed by Ryosuke Niwa.
769
770         Test: fast/repaint/paint-caret-in-div-with-negative-indent.html
771
772         When an editable element has a negative text indent we won't paint the caret when the
773         element is empty because it falls outside the element's border box. To ensure the caret is painted,
774         account for any negative indent with our overflow.
775
776         * rendering/RenderBlock.cpp:
777         (WebCore::RenderBlock::computeOverflow):
778
779 2013-02-20  Ojan Vafai  <ojan@chromium.org>
780
781         Remove stretchesToMinIntrinsicLogicalWidth
782         https://bugs.webkit.org/show_bug.cgi?id=110266
783
784         Reviewed by Emil Eklund.
785
786         This was only used by fieldsets and now we have a way to express this
787         concept in CSS.
788
789         * WebCore.order:
790         * css/html.css:
791         Make fieldsets min-width: -webkit-min-content.
792
793         * rendering/RenderBox.cpp:
794         (WebCore::RenderBox::computeLogicalWidthInRegion):
795         (WebCore::RenderBox::computePositionedLogicalWidth):
796         * rendering/RenderBox.h:
797         Remove all calls to stretchesToMinIntrinsicLogicalWidth.
798
799 2013-02-20  Ojan Vafai  <ojan@chromium.org>
800
801         Make intrinsic width values work for positioned elements
802         https://bugs.webkit.org/show_bug.cgi?id=110264
803
804         Reviewed by Tony Chang.
805
806         Tests: fast/css-intrinsic-dimensions/intrinsic-sized-absolutes.html
807                fast/css-intrinsic-dimensions/width-shrinks-avoid-floats.html
808
809         * rendering/RenderBox.cpp:
810         (WebCore::RenderBox::computeIntrinsicLogicalWidthUsing):
811         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
812         Move the computation of intrinsic widths out into a helper function so that
813         computePositionedLogicalWidthUsing can use it. As per the current spec,
814         fill-available measures shrink to avoid floats. http://dev.w3.org/csswg/css3-sizing/
815
816         (WebCore::RenderBox::computePositionedLogicalWidth):
817         Compute intrinsic min-widths in addition to non-zero ones. Intrinsic widths
818         return true for isZero. width and max-width don't need modifying since they already
819         call computePositionedLogicalWidthUsing for intrinsic widths.
820
821         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
822         Compute intrinsic widths and use a Fixed length for the rest of the positioned width
823         computation. Doesn't include bordersPlusPadding because the caller, expected the content
824         width and adds in the bordersPlusPadding later.
825
826         * rendering/RenderBox.h:
827
828 2013-02-20  Robert Hogan  <robert@webkit.org>
829
830         input element with placeholder text and width set to 100% on focus causes overflow even after losing focus
831         https://bugs.webkit.org/show_bug.cgi?id=109020
832
833         Reviewed by David Hyatt.
834
835         Tests: fast/forms/input-placeholder-layout-view.html
836                fast/forms/textarea-placeholder-layout-view.html
837
838         Placeholder elements don't affect layout so shouldn't contribute overflow either.
839
840         * rendering/RenderTextControlSingleLine.cpp:
841         (WebCore::RenderTextControlSingleLine::layout):
842
843 2013-02-20  Mark Lam  <mark.lam@apple.com>
844
845         Rename DatabaseBackend to DatabaseBackendBase.
846         https://bugs.webkit.org/show_bug.cgi?id=110303.
847
848         Rubber stamped by Alexey Proskuryakov.
849
850         This is a purely cosmetic change to make the naming consistent with
851         the front-end DatabaseBase.
852
853         No new tests.
854
855         * CMakeLists.txt:
856         * GNUmakefile.list.am:
857         * Modules/webdatabase/AbstractDatabaseServer.h:
858         * Modules/webdatabase/Database.cpp:
859         (WebCore::Database::create):
860         (WebCore::Database::version):
861         * Modules/webdatabase/Database.h:
862         (Database):
863         * Modules/webdatabase/DatabaseBackend.cpp: Removed.
864         * Modules/webdatabase/DatabaseBackend.h: Removed.
865         * Modules/webdatabase/DatabaseBackendAsync.cpp:
866         (WebCore::DatabaseBackendAsync::DatabaseBackendAsync):
867         (WebCore::DatabaseBackendAsync::performOpenAndVerify):
868         * Modules/webdatabase/DatabaseBackendAsync.h:
869         * Modules/webdatabase/DatabaseBackendBase.cpp: Copied from Source/WebCore/Modules/webdatabase/DatabaseBackend.cpp.
870         (WebCore::DatabaseBackendBase::databaseInfoTableName):
871         (WebCore::DatabaseBackendBase::DatabaseBackendBase):
872         (WebCore::DatabaseBackendBase::~DatabaseBackendBase):
873         (WebCore::DatabaseBackendBase::closeDatabase):
874         (WebCore::DatabaseBackendBase::version):
875         (WebCore::DoneCreatingDatabaseOnExitCaller::DoneCreatingDatabaseOnExitCaller):
876         (DoneCreatingDatabaseOnExitCaller):
877         (WebCore::DatabaseBackendBase::performOpenAndVerify):
878         (WebCore::DatabaseBackendBase::securityOrigin):
879         (WebCore::DatabaseBackendBase::stringIdentifier):
880         (WebCore::DatabaseBackendBase::displayName):
881         (WebCore::DatabaseBackendBase::estimatedSize):
882         (WebCore::DatabaseBackendBase::fileName):
883         (WebCore::DatabaseBackendBase::details):
884         (WebCore::DatabaseBackendBase::getVersionFromDatabase):
885         (WebCore::DatabaseBackendBase::setVersionInDatabase):
886         (WebCore::DatabaseBackendBase::setExpectedVersion):
887         (WebCore::DatabaseBackendBase::getCachedVersion):
888         (WebCore::DatabaseBackendBase::setCachedVersion):
889         (WebCore::DatabaseBackendBase::getActualVersionForTransaction):
890         (WebCore::DatabaseBackendBase::disableAuthorizer):
891         (WebCore::DatabaseBackendBase::enableAuthorizer):
892         (WebCore::DatabaseBackendBase::setAuthorizerReadOnly):
893         (WebCore::DatabaseBackendBase::setAuthorizerPermissions):
894         (WebCore::DatabaseBackendBase::lastActionChangedDatabase):
895         (WebCore::DatabaseBackendBase::lastActionWasInsert):
896         (WebCore::DatabaseBackendBase::resetDeletes):
897         (WebCore::DatabaseBackendBase::hadDeletes):
898         (WebCore::DatabaseBackendBase::resetAuthorizer):
899         (WebCore::DatabaseBackendBase::maximumSize):
900         (WebCore::DatabaseBackendBase::incrementalVacuumIfNeeded):
901         (WebCore::DatabaseBackendBase::interrupt):
902         (WebCore::DatabaseBackendBase::isInterrupted):
903         (WebCore::DatabaseBackendBase::reportOpenDatabaseResult):
904         (WebCore::DatabaseBackendBase::reportChangeVersionResult):
905         (WebCore::DatabaseBackendBase::reportStartTransactionResult):
906         (WebCore::DatabaseBackendBase::reportCommitTransactionResult):
907         (WebCore::DatabaseBackendBase::reportExecuteStatementResult):
908         (WebCore::DatabaseBackendBase::reportVacuumDatabaseResult):
909         * Modules/webdatabase/DatabaseBackendBase.h: Copied from Source/WebCore/Modules/webdatabase/DatabaseBackend.h.
910         (DatabaseBackendBase):
911         * Modules/webdatabase/DatabaseBackendSync.cpp:
912         (WebCore::DatabaseBackendSync::DatabaseBackendSync):
913         * Modules/webdatabase/DatabaseBackendSync.h:
914         * Modules/webdatabase/DatabaseBase.h:
915         * Modules/webdatabase/DatabaseManager.cpp:
916         (WebCore::DatabaseManager::openDatabaseBackend):
917         (WebCore::DatabaseManager::openDatabase):
918         (WebCore::DatabaseManager::openDatabaseSync):
919         (WebCore::DatabaseManager::getMaxSizeForDatabase):
920         * Modules/webdatabase/DatabaseManager.h:
921         (DatabaseManager):
922         * Modules/webdatabase/DatabaseServer.cpp:
923         (WebCore::DatabaseServer::openDatabase):
924         (WebCore::DatabaseServer::createDatabase):
925         (WebCore::DatabaseServer::getMaxSizeForDatabase):
926         * Modules/webdatabase/DatabaseServer.h:
927         * Modules/webdatabase/DatabaseSync.cpp:
928         (WebCore::DatabaseSync::create):
929         * Modules/webdatabase/DatabaseSync.h:
930         (DatabaseSync):
931         * Modules/webdatabase/DatabaseTracker.cpp:
932         (WebCore::DatabaseTracker::getMaxSizeForDatabase):
933         (WebCore::DatabaseTracker::databaseChanged):
934         (WebCore::DatabaseTracker::interruptAllDatabasesForContext):
935         (WebCore::DatabaseTracker::doneCreatingDatabase):
936         (WebCore::DatabaseTracker::addOpenDatabase):
937         (WebCore::DatabaseTracker::removeOpenDatabase):
938         (WebCore::DatabaseTracker::getOpenDatabases):
939         (WebCore::DatabaseTracker::deleteDatabaseFile):
940         * Modules/webdatabase/DatabaseTracker.h:
941         (DatabaseTracker):
942         * Modules/webdatabase/OriginQuotaManager.cpp:
943         (WebCore::OriginQuotaManager::markDatabase):
944         * Modules/webdatabase/OriginQuotaManager.h:
945         (OriginQuotaManager):
946         * Modules/webdatabase/SQLTransactionClient.cpp:
947         (WebCore::SQLTransactionClient::didCommitWriteTransaction):
948         (WebCore::SQLTransactionClient::didExecuteStatement):
949         (WebCore::SQLTransactionClient::didExceedQuota):
950         * Modules/webdatabase/SQLTransactionClient.h:
951         (SQLTransactionClient):
952         * Modules/webdatabase/chromium/DatabaseObserver.h:
953         (DatabaseObserver):
954         * Modules/webdatabase/chromium/DatabaseTrackerChromium.cpp:
955         (WebCore::DatabaseTracker::addOpenDatabase):
956         (WebCore::NotifyDatabaseObserverOnCloseTask::create):
957         (WebCore::NotifyDatabaseObserverOnCloseTask::NotifyDatabaseObserverOnCloseTask):
958         (NotifyDatabaseObserverOnCloseTask):
959         (WebCore::DatabaseTracker::removeOpenDatabase):
960         (WebCore::DatabaseTracker::prepareToOpenDatabase):
961         (WebCore::DatabaseTracker::failedToOpenDatabase):
962         (WebCore::DatabaseTracker::getMaxSizeForDatabase):
963         (WebCore::DatabaseTracker::CloseOneDatabaseImmediatelyTask::create):
964         (WebCore::DatabaseTracker::CloseOneDatabaseImmediatelyTask::CloseOneDatabaseImmediatelyTask):
965         (DatabaseTracker::CloseOneDatabaseImmediatelyTask):
966         (WebCore::DatabaseTracker::closeOneDatabaseImmediately):
967         * Modules/webdatabase/chromium/SQLTransactionClientChromium.cpp:
968         (WebCore::NotifyDatabaseChangedTask::create):
969         (WebCore::NotifyDatabaseChangedTask::NotifyDatabaseChangedTask):
970         (NotifyDatabaseChangedTask):
971         (WebCore::SQLTransactionClient::didCommitWriteTransaction):
972         (WebCore::SQLTransactionClient::didExecuteStatement):
973         (WebCore::SQLTransactionClient::didExceedQuota):
974         * Target.pri:
975         * WebCore.gypi:
976         * WebCore.vcproj/WebCore.vcproj:
977         * WebCore.vcxproj/WebCore.vcxproj:
978         * WebCore.vcxproj/WebCore.vcxproj.filters:
979         * WebCore.xcodeproj/project.pbxproj:
980
981 2013-02-20  Eric Carlson  <eric.carlson@apple.com>
982
983         iOS does not use CaptionUserPreferencesMac
984         https://bugs.webkit.org/show_bug.cgi?id=110259
985
986         Reviewed by Dean Jackson.
987
988         * page/CaptionUserPreferencesMac.h: Add PLATFORM(IOS) guard
989         * page/CaptionUserPreferencesMac.mm: Ditto.
990
991         * page/PageGroup.cpp:
992         (WebCore::PageGroup::captionPreferences): Ditto.
993
994 2013-02-19  David Hyatt  <hyatt@apple.com>
995
996         [New Multicolumn] Make layers paint properly in columns.
997         https://bugs.webkit.org/show_bug.cgi?id=110296.
998
999         Reviewed by Sam Weinig.
1000
1001         Construct the style for the RenderMultiColumnFlowThread such that it
1002         establishes a stacking context (by being position:relative
1003         with a z-index of 0). This causes the layer collection code
1004         to correctly ignore the RenderFlowThread layers during normal
1005         painting.
1006         
1007         Fix more clipping bugs to eliminate subpixel layout differences
1008         between old and new multicolumn.
1009
1010         Test: fast/multicol/newmulticol/layers-in-multicol.html
1011
1012         * rendering/RenderMultiColumnBlock.cpp:
1013         (WebCore::createMultiColumnFlowThreadStyle):
1014         (WebCore):
1015         (WebCore::RenderMultiColumnBlock::addChild):
1016         Use a custom style (similar to what normal RenderFlowThreads do)
1017         for the RenderMultiColumnFlowThread that makes it a stacking
1018         context.
1019         
1020         * rendering/RenderMultiColumnSet.cpp:
1021         (WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect):
1022         Fix the overflow calculations out the leftmost and rightmost
1023         columns to actually look at the physical placement of the columns.
1024         The old code was backwards for RTL.
1025         
1026         * rendering/RenderRegion.cpp:
1027         (WebCore::RenderRegion::overflowRectForFlowThreadPortion):
1028         Fix the clipping done by overflowRectForFlowThreadPortion to min
1029         and max with the passed-in portion rect so that subclasses that
1030         inflate the rect prior to passing it into the method don't have that
1031         inflation discarded.
1032
1033 2013-02-20  Alexander Pavlov  <apavlov@chromium.org>
1034
1035         Web Inspector: CSSProperty.status defaults to "style" not "active"
1036         https://bugs.webkit.org/show_bug.cgi?id=110348
1037
1038         Reviewed by Timothy Hatcher.
1039
1040         * inspector/Inspector.json: Fix the default property status to be "style" in the description.
1041
1042 2013-02-20  Dan Carney  <dcarney@google.com>
1043
1044         [v8] potentially disposed handle returned for npapi object
1045         https://bugs.webkit.org/show_bug.cgi?id=110331
1046
1047         Reviewed by Kentaro Hara.
1048
1049         No new tests. No change in functionality.
1050
1051         * bindings/v8/V8NPUtils.cpp:
1052         (WebCore::convertNPVariantToV8Object):
1053
1054 2013-02-20  Xabier Rodriguez Calvar  <calvaris@igalia.com>  and  Martin Robinson  <mrobinson@igalia.com>
1055
1056         [Gtk] HTML5 Media controls require a design refresh
1057         https://bugs.webkit.org/show_bug.cgi?id=83869
1058
1059         Created new controls that depend less on Gtk and more in CSS.
1060
1061         Reviewed by Philippe Normand.
1062
1063         * GNUmakefile.list.am: Added compilation for MediaControlsGtk.cpp
1064         and MediaControlsGtk.h
1065         * css/mediaControlsGtk.css: Taken from Chromium and adapted for
1066         WebKitGtk+.
1067         * html/shadow/MediaControlsGtk.cpp: Added.
1068         (WebCore): Added MediaControlsGtk class.
1069         (WebCore::MediaControlsGtk::MediaControlsGtk): Class constructor
1070         (WebCore::MediaControls::create): Creates the Gtk+ controls
1071         components.
1072         (WebCore::MediaControlsGtk::createControls): Creates the Gtk+
1073         controls components.
1074         (WebCore::MediaControlsGtk::initializeControls): Initializes all
1075         media controls.
1076         (WebCore::MediaControlsGtk::setMediaController): Sets the media
1077         controller.
1078         (WebCore::MediaControlsGtk::reset): Resets the controllers.
1079         (WebCore::MediaControlsGtk::playbackStarted): Invoked when the
1080         playback starts
1081         (WebCore::MediaControlsGtk::updateCurrentTimeDisplay): Updates the
1082         controls when the current time shall be updated.
1083         (WebCore::MediaControlsGtk::changedMute): Updates the controls
1084         then the mute changes.
1085         (WebCore::MediaControlsGtk::showVolumeSlider): Invoked when the
1086         volume slider is meant to be shown.
1087         (WebCore::MediaControlsGtk::createTextTrackDisplay): Creates the
1088         track display. Though it is not used by us, it needs to be created
1089         to prevent immediate crashes when loading a video.
1090         * html/shadow/MediaControlsGtk.h: Added.
1091         (WebCore): Added the MediaControlsGtk class.
1092         (MediaControlsGtk): Added the MediaControlsGtk class.
1093         * platform/gtk/RenderThemeGtk.cpp:
1094         (WebCore): Added getStockSymbolicIconForWidgetType function
1095         signature to load symbolic icons.
1096         (WebCore::supportsFocus): Added media control widgets to support
1097         focus so that the focus ring is not painted by WebCore.
1098         (WebCore::RenderThemeGtk::paintMediaButton): Added the symbolic
1099         icon support. It supports now normal and symbolic icons at the
1100         same time.
1101         (WebCore::RenderThemeGtk::paintMediaFullscreenButton): Added the
1102         symbolic icon support.
1103         (WebCore::RenderThemeGtk::paintMediaMuteButton): Added the
1104         symbolic icon support.
1105         (WebCore::RenderThemeGtk::paintMediaPlayButton): Added the
1106         symbolic icon support.
1107         (WebCore::RenderThemeGtk::paintMediaSeekBackButton): Added the
1108         symbolic icon support.
1109         (WebCore::RenderThemeGtk::paintMediaSeekForwardButton): Added the
1110         symbolic icon support.
1111         (WebCore::borderRadiiFromStyle): Created the radii info from the
1112         style.
1113         (WebCore::RenderThemeGtk::paintMediaSliderTrack): Removed the
1114         background and the Gtk widget support as it is painted with
1115         CSS. Also paint the time ranges with the CSS style.
1116         (WebCore::RenderThemeGtk::paintMediaSliderThumb): Paint slider
1117         thumb according to the CSS parameters.
1118         (WebCore::RenderThemeGtk::paintMediaVolumeSliderContainer):
1119         Delegates in the CSS.
1120         (WebCore::RenderThemeGtk::paintMediaVolumeSliderTrack): Fills the
1121         track up to the volume level and delegates the border in the CSS.
1122         (WebCore::RenderThemeGtk::paintMediaVolumeSliderThumb): Delegates
1123         in the paintMediaSliderThumb method so the thumb is painted the
1124         same with the CSS parameters.
1125         (WebCore::RenderThemeGtk::paintMediaCurrentTime): Removed the Gtk
1126         background to use only CSS.
1127         * platform/gtk/RenderThemeGtk.h:
1128         (RenderThemeGtk): Changed paintMediaButton to support the symbolic
1129         and normal icons at the same time.
1130         * platform/gtk/RenderThemeGtk2.cpp:
1131         (WebCore::RenderThemeGtk::adjustSliderThumbSize): Not adjusting
1132         the thumb size and letting the CSS decide that for media slider.
1133         (WebCore::getStockSymbolicIconForWidgetType): Implemented as a
1134         fallback to the normal stock icons.
1135         * platform/gtk/RenderThemeGtk3.cpp:
1136         (WebCore):
1137         (WebCore::RenderThemeGtk::adjustSliderThumbSize): Not adjusting
1138         the thumb size and letting the CSS decide that for the media
1139         sliders.
1140         (WebCore::getStockSymbolicIconForWidgetType): Added this function
1141         to load symbolic icons. It falls back to normal icons if the
1142         symbolic is not found.
1143
1144 2013-02-20  Andras Becsi  <andras.becsi@digia.com>
1145
1146         [Qt] Rename AncestorChainWalker.h to EventPathWalker.h in the project file.
1147
1148         Unreviewed gardening.
1149
1150         AncestorChainWalker has been renamed to EventPathWalker in r143422.
1151         Rename the header in the project file as well so that it shows up in QtCreator.
1152
1153         No new tests needed.
1154
1155         * Target.pri:
1156
1157 2013-02-20  Ilya Tikhonovsky  <loislo@chromium.org>
1158
1159         Web Inspector: fix for frontend closure compile errors.
1160         https://bugs.webkit.org/show_bug.cgi?id=110329
1161
1162         Reviewed by Vsevolod Vlasov.
1163
1164         It has no tests because it has no code changes.
1165
1166         * inspector/front-end/HeapSnapshot.js:
1167         (HeapSnapshotMetainfo):
1168         * inspector/front-end/NativeMemorySnapshotView.js:
1169         (WebInspector.NativeSnapshotProfileType.prototype.buttonClicked.didReceiveMemorySnapshot):
1170         (WebInspector.NativeSnapshotProfileType.prototype.buttonClicked):
1171
1172 2013-02-20  Florin Malita  <fmalita@chromium.org>
1173
1174         Clear SVGPathSeg role on removal.
1175         https://bugs.webkit.org/show_bug.cgi?id=110058
1176
1177         Reviewed by Dirk Schulze.
1178
1179         SVGPathSegListPropertyTearOff::initialize() and SVGPathSegListPropertyTearOff::replaceItem()
1180         need to clear the context and role for segments being expunged from the list, similarly to
1181         removeItem(). Otherwise, processIncomingListItemValue() can get confused and attempt to
1182         remove stale segments.
1183
1184         Test: svg/dom/SVGPathSegList-crash.html
1185
1186         * svg/properties/SVGPathSegListPropertyTearOff.cpp:
1187         (WebCore::SVGPathSegListPropertyTearOff::clearContextAndRoles):
1188         (WebCore::SVGPathSegListPropertyTearOff::clear):
1189         (WebCore::SVGPathSegListPropertyTearOff::replaceItem):
1190         (WebCore):
1191         * svg/properties/SVGPathSegListPropertyTearOff.h:
1192         (WebCore::SVGPathSegListPropertyTearOff::initialize):
1193         (SVGPathSegListPropertyTearOff):
1194
1195 2013-02-20  Sheriff Bot  <webkit.review.bot@gmail.com>
1196
1197         Unreviewed, rolling out r143434.
1198         http://trac.webkit.org/changeset/143434
1199         https://bugs.webkit.org/show_bug.cgi?id=110326
1200
1201         added reftest fails on chromium mac 10.6 (Requested by
1202         toyoshim on #webkit).
1203
1204         * rendering/RenderFileUploadControl.cpp:
1205         (WebCore::RenderFileUploadControl::paintObject):
1206
1207 2013-02-19  Vsevolod Vlasov  <vsevik@chromium.org>
1208
1209         Web Inspector: Make UISourceCode.path() an array of path segments.
1210         https://bugs.webkit.org/show_bug.cgi?id=110229
1211
1212         Reviewed by Pavel Feldman.
1213
1214         * inspector/front-end/FileSystemProjectDelegate.js:
1215         (WebInspector.FileSystemProjectDelegate.prototype._filePathForPath):
1216         (WebInspector.FileSystemProjectDelegate.prototype.innerCallback):
1217         (WebInspector.FileSystemProjectDelegate.prototype.requestFileContent):
1218         (WebInspector.FileSystemProjectDelegate.prototype._contentTypeForPath):
1219         (WebInspector.FileSystemProjectDelegate.prototype.populate.filesLoaded):
1220         (WebInspector.FileSystemProjectDelegate.prototype.populate):
1221         * inspector/front-end/SimpleWorkspaceProvider.js:
1222         (WebInspector.SimpleProjectDelegate.prototype.requestFileContent):
1223         (WebInspector.SimpleProjectDelegate.prototype.searchInFileContent):
1224         (WebInspector.SimpleProjectDelegate.prototype.addFile):
1225         (WebInspector.SimpleProjectDelegate.prototype._ensureUniquePath):
1226         (WebInspector.SimpleProjectDelegate.prototype.removeFile):
1227         (WebInspector.SimpleWorkspaceProvider.pathForSplittedURL):
1228         (WebInspector.SimpleWorkspaceProvider.prototype.addFileByName):
1229         (WebInspector.SimpleWorkspaceProvider.prototype.removeFileByName):
1230         * inspector/front-end/UISourceCode.js:
1231         (WebInspector.UISourceCode.prototype.uri):
1232         * inspector/front-end/Workspace.js:
1233         (WebInspector.Project.prototype._fileAdded):
1234         (WebInspector.Project.prototype._fileRemoved):
1235         (WebInspector.Project.prototype.uiSourceCode):
1236         (WebInspector.Workspace.prototype.uiSourceCodeForURL):
1237         (WebInspector.Workspace.prototype.urlForPath):
1238
1239 2013-02-20  Yury Semikhatsky  <yurys@chromium.org>
1240
1241         Web Inspector: fix message for non-existent domain warning
1242         https://bugs.webkit.org/show_bug.cgi?id=110315
1243
1244         Reviewed by Alexander Pavlov.
1245
1246         Only send (Heap)Profiler.resetProfiles event if the client has
1247         requested profile headers before.
1248
1249         * inspector/InspectorHeapProfilerAgent.cpp:
1250         (HeapProfilerAgentState):
1251         (WebCore):
1252         (WebCore::InspectorHeapProfilerAgent::InspectorHeapProfilerAgent):
1253         (WebCore::InspectorHeapProfilerAgent::resetFrontendProfiles):
1254         (WebCore::InspectorHeapProfilerAgent::clearFrontend):
1255         (WebCore::InspectorHeapProfilerAgent::restore):
1256         (WebCore::InspectorHeapProfilerAgent::getProfileHeaders):
1257         * inspector/InspectorHeapProfilerAgent.h:
1258         (InspectorHeapProfilerAgent):
1259         * inspector/InspectorProfilerAgent.cpp:
1260         (ProfilerAgentState):
1261         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
1262         (WebCore::InspectorProfilerAgent::addProfile):
1263         (WebCore::InspectorProfilerAgent::disable):
1264         (WebCore::InspectorProfilerAgent::getProfileHeaders):
1265         (WebCore):
1266         (WebCore::InspectorProfilerAgent::resetFrontendProfiles):
1267         (WebCore::InspectorProfilerAgent::restore):
1268         * inspector/InspectorProfilerAgent.h:
1269         (InspectorProfilerAgent):
1270
1271 2013-02-19  Vsevolod Vlasov  <vsevik@chromium.org>
1272
1273         Web Inspector: Move workspace specific code from FileMapping to workspace.
1274         https://bugs.webkit.org/show_bug.cgi?id=110219
1275
1276         Reviewed by Pavel Feldman.
1277
1278         Extracted workspace specific code from FileMapping to Workspace.
1279         This allows to reduce usage of uri and eventually make UISourceCode.path an array of path segments.
1280
1281         Test: inspector/workspace-mapping.html
1282
1283         * inspector/front-end/CSSStyleModel.js:
1284         (WebInspector.CSSStyleModel.prototype.rawLocationToUILocation):
1285         * inspector/front-end/CompilerScriptMapping.js:
1286         (WebInspector.CompilerScriptMapping.prototype.rawLocationToUILocation):
1287         (WebInspector.CompilerScriptMapping.prototype.get addScript.get this):
1288         (WebInspector.CompilerScriptMapping.prototype.get addScript):
1289         * inspector/front-end/FileMapping.js:
1290         (WebInspector.FileMapping):
1291         (WebInspector.FileMapping.prototype.mappingEntryForURL):
1292         (WebInspector.FileMapping.prototype.mappingEntryForPath):
1293         * inspector/front-end/FileSystemMapping.js:
1294         (WebInspector.FileSystemMapping.prototype.fileSystemPathForPrefix):
1295         (WebInspector.FileSystemMappingImpl.prototype.addFileSystemMapping):
1296         (WebInspector.FileSystemMappingImpl.prototype.removeFileSystemMapping):
1297         (WebInspector.FileSystemMappingImpl.prototype.fileSystemPathForPrefix):
1298         * inspector/front-end/FileSystemProjectDelegate.js:
1299         (WebInspector.FileSystemProjectDelegate):
1300         (WebInspector.FileSystemProjectDelegate.prototype.populate.filesLoaded):
1301         (WebInspector.FileSystemProjectDelegate.prototype.populate):
1302         (WebInspector.FileSystemWorkspaceProvider):
1303         (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemAdded):
1304         * inspector/front-end/IsolatedFileSystemManager.js:
1305         (WebInspector.IsolatedFileSystemManager):
1306         * inspector/front-end/NetworkUISourceCodeProvider.js:
1307         (WebInspector.NetworkUISourceCodeProvider):
1308         (WebInspector.NetworkUISourceCodeProvider.prototype._addFile):
1309         * inspector/front-end/ResourceScriptMapping.js:
1310         (WebInspector.ResourceScriptMapping.prototype._workspaceUISourceCodeForScript):
1311         * inspector/front-end/ResourceUtils.js:
1312         (WebInspector.displayNameForURL):
1313         * inspector/front-end/SASSSourceMapping.js:
1314         (WebInspector.SASSSourceMapping.prototype._reloadCSS):
1315         (WebInspector.SASSSourceMapping.prototype._bindUISourceCode):
1316         (WebInspector.SASSSourceMapping.prototype.rawLocationToUILocation):
1317         * inspector/front-end/ScriptsPanel.js:
1318         (WebInspector.ScriptsPanel.prototype.canShowAnchorLocation):
1319         * inspector/front-end/SimpleWorkspaceProvider.js:
1320         (WebInspector.SimpleWorkspaceProvider.pathForSplittedURL):
1321         (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFileForURL):
1322         * inspector/front-end/StylesSourceMapping.js:
1323         (WebInspector.StylesSourceMapping.prototype.rawLocationToUILocation):
1324         (WebInspector.StylesSourceMapping.prototype._resourceAdded):
1325         (WebInspector.StylesSourceMapping.prototype._mainFrameCreatedOrNavigated):
1326         (WebInspector.StyleContentBinding):
1327         (WebInspector.StyleContentBinding.prototype._innerStyleSheetChanged):
1328         * inspector/front-end/Workspace.js:
1329         (WebInspector.Workspace):
1330         (WebInspector.Workspace.prototype.hasMappingForURL):
1331         (WebInspector.Workspace.prototype._fileSystemPathForEntry):
1332         (WebInspector.Workspace.prototype.uiSourceCodeForURL):
1333         (WebInspector.Workspace.prototype.urlForPath):
1334         * inspector/front-end/inspector.js:
1335
1336 2013-02-20  Alexander Pavlov  <apavlov@chromium.org>
1337
1338         Web Inspector: Introduce SecurityOriginAdded and SecurityOriginRemoved events into ResourceTreeModel
1339         https://bugs.webkit.org/show_bug.cgi?id=110232
1340
1341         Reviewed by Vsevolod Vlasov.
1342
1343         * inspector/front-end/ResourceTreeModel.js:
1344         (WebInspector.ResourceTreeModel):
1345         (WebInspector.ResourceTreeModel.prototype._addFrame):
1346         (WebInspector.ResourceTreeModel.prototype._addSecurityOrigin): Added.
1347         (WebInspector.ResourceTreeModel.prototype._removeSecurityOrigin): Added.
1348         (WebInspector.ResourceTreeModel.prototype._handleMainFrameDetached): Added.
1349         (WebInspector.ResourceTreeModel.prototype._frameNavigated):
1350         (WebInspector.ResourceTreeModel.prototype._frameDetached):
1351
1352 2013-02-20  Dan Carney  <dcarney@google.com>
1353
1354         [v8] ScriptValue has dangerous copy semantics
1355         https://bugs.webkit.org/show_bug.cgi?id=110206
1356
1357         Reviewed by Kentaro Hara.
1358
1359         Update ScriptValue to used a SharedPersistent,
1360         making it impossible to return dead references.
1361
1362         No new tests. No change in functionality.
1363
1364         * bindings/v8/ScriptValue.cpp:
1365         (WebCore::ScriptValue::serialize):
1366         (WebCore::ScriptValue::getString):
1367         (WebCore::ScriptValue::toString):
1368         (WebCore::ScriptValue::toInspectorValue):
1369         * bindings/v8/ScriptValue.h:
1370         (WebCore::ScriptValue::ScriptValue):
1371         (WebCore::ScriptValue::operator=):
1372         (WebCore::ScriptValue::operator==):
1373         (WebCore::ScriptValue::isEqual):
1374         (WebCore::ScriptValue::isFunction):
1375         (WebCore::ScriptValue::isNull):
1376         (WebCore::ScriptValue::isUndefined):
1377         (WebCore::ScriptValue::isObject):
1378         (WebCore::ScriptValue::hasNoValue):
1379         (WebCore::ScriptValue::clear):
1380         (ScriptValue):
1381         (WebCore::ScriptValue::v8Value):
1382         (WebCore::ScriptValue::v8ValueRaw):
1383         * bindings/v8/SharedPersistent.h:
1384         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
1385         (WebCore::InjectedScriptHost::scriptValueAsNode):
1386         * bindings/v8/custom/V8MessageEventCustom.cpp:
1387         (WebCore::V8MessageEvent::dataAttrGetterCustom):
1388
1389 2013-02-20  Andrey Lushnikov  <lushnikov@chromium.org>
1390
1391         Web Inspector: highlight undefined word in JavaScript
1392         https://bugs.webkit.org/show_bug.cgi?id=109585
1393
1394         Reviewed by Vsevolod Vlasov.
1395
1396         Test enhancement: inspector/syntax-highlight-javascript.html
1397
1398         Add global object value properties to tokenizer and add a css style
1399         class to highlight "undefined" with gray color.
1400
1401         * inspector/front-end/SourceJavaScriptTokenizer.js:
1402         (WebInspector.SourceJavaScriptTokenizer.prototype.nextToken):
1403         * inspector/front-end/SourceJavaScriptTokenizer.re2js:
1404         * inspector/front-end/inspectorSyntaxHighlight.css:
1405         (.webkit-javascript-undef):
1406
1407 2013-02-20  Mike West  <mkwst@chromium.org>
1408
1409         Use EventPathWalker rather than parentNode() to normalize event targets in EventHandler.
1410         https://bugs.webkit.org/show_bug.cgi?id=110037
1411
1412         Reviewed by Ryosuke Niwa.
1413
1414         We need to teach EventHandler about Shadow DOM in a few places in order
1415         to ensure that we properly target events dispatched upon text nodes.
1416         Rather than naively grabbing the text node's direct parent via
1417         parentNode(), we need to account for the case in which the text node is
1418         distributed[1] to an insertion point inside a shadow host.
1419         EventPathWalker::parent understands these relationships, and should
1420         be used when dealing with mouse, drag, and touch events.
1421
1422         [1]: http://www.w3.org/TR/shadow-dom/#dfn-distribution
1423
1424         * page/EventHandler.cpp:
1425         (WebCore::EventHandler::handleMouseDraggedEvent):
1426         (WebCore::EventHandler::handleTouchEvent):
1427         (WebCore::EventHandler::passGestureEventToWidgetIfPossible):
1428         (WebCore::EventHandler::updateDragAndDrop):
1429             Refactor parentNode callsites to use EventPathWalker::parent().
1430
1431 2013-02-20  Vsevolod Vlasov  <vsevik@chromium.org>
1432
1433         Web Inspector: [Regression] Search in ProfilesPanel is broken
1434         https://bugs.webkit.org/show_bug.cgi?id=110312
1435
1436         Reviewed by Pavel Feldman.
1437
1438         * inspector/front-end/CPUProfileView.js:
1439         (WebInspector.CPUProfileView.prototype.matchesQuery):
1440         (WebInspector.CPUProfileView.prototype.performSearch):
1441
1442 2013-02-20  Eugene Klyuchnikov  <eustas@chromium.org>
1443
1444         Web Inspector: View.markAsRoot should never be invoked on attached view.
1445         https://bugs.webkit.org/show_bug.cgi?id=110224
1446
1447         Reviewed by Pavel Feldman.
1448
1449         This will cause CSS loading problems after "show".
1450
1451         * inspector/front-end/Drawer.js:
1452         Ensure child view is detached before marked as root.
1453         * inspector/front-end/View.js:
1454         (WebInspector.View.prototype.markAsRoot): Added assertion.
1455
1456 2013-02-20  Nils Barth  <nbarth@google.com>
1457
1458         File upload control doesn't apply CSS vertical padding or border to file name
1459         https://bugs.webkit.org/show_bug.cgi?id=109011
1460
1461         Reviewed by Hajime Morrita.
1462
1463         Test: fast/forms/file/file-vertical-padding-border.html
1464
1465         * rendering/RenderFileUploadControl.cpp:
1466             Add borderTop() and paddingTop() when computing position.
1467         (WebCore::RenderFileUploadControl::paintObject):
1468
1469 2013-02-19  Andrey Adaikin  <aandrey@chromium.org>
1470
1471         Few methods in WebGLRenderingContext.idl have incorrect signatures
1472         https://bugs.webkit.org/show_bug.cgi?id=110305
1473
1474         Reviewed by Kentaro Hara.
1475
1476         * html/canvas/WebGLRenderingContext.idl:
1477
1478 2013-02-19  Tim Horton  <timothy_horton@apple.com>
1479
1480         Clarify isInWindow vs. isVisible path through to RenderLayerCompositor
1481         https://bugs.webkit.org/show_bug.cgi?id=110261
1482         <rdar://problem/13196122>
1483
1484         Reviewed by Simon Fraser.
1485
1486         Remove RenderLayerCompositor::willMoveOffscreen/didMoveOnscreen.
1487         Add RenderLayerCompositor::setIsInWindow, and pipe in-window changes through from Page::setIsInWindow.
1488         Adjust a few Document functions that previously called RenderView::didMoveOnscreen/willMoveOffscreen to use setIsInWindow instead, since in-window state changes are occurring when attaching and detaching documents.
1489
1490         * WebCore.exp.in: Export Page::setIsInWindow.
1491         * dom/Document.cpp:
1492         (WebCore::Document::attach): Use setIsInWindow instead of didMoveOnscreen.
1493         (WebCore::Document::documentWillBecomeInactive): Use setIsInWindow instead of willMoveOffscreen.
1494         (WebCore::Document::documentDidResumeFromPageCache): Use setIsInWindow instead of didMoveOnscreen.
1495         * page/FrameView.cpp:
1496         (WebCore::FrameView::didMoveOnscreen):
1497         (WebCore::FrameView::willMoveOffscreen):
1498         RenderView doesn't care about moving on/offscreen, just in-window state.
1499         (WebCore::FrameView::setIsInWindow): Added. Forward isInWindow changes to our RenderView.
1500         * page/FrameView.h:
1501         (FrameView): Add setIsInWindow.
1502         * page/Page.cpp:
1503         (WebCore::Page::setIsInWindow): Added. Forward isInWindow changes to the Page's FrameViews.
1504         * page/Page.h:
1505         (Page): Add setIsInWindow.
1506         (WebCore::Page::isInWindow):
1507         * rendering/RenderLayerCompositor.cpp:
1508         (WebCore::RenderLayerCompositor::setIsInWindow): Added. Replace willMoveOffscreen/didMoveOnscreen with setIsInWindow,
1509         since that's the only change we actually care about.
1510         * rendering/RenderLayerCompositor.h:
1511         (RenderLayerCompositor): Add setIsInWindow.
1512         * rendering/RenderView.cpp:
1513         (WebCore::RenderView::setIsInWindow): Added. Replace willMoveOffscreen/didMoveOnscreen with setIsInWindow,
1514         since that's the only change RenderLayerCompositor actually cares about.
1515         * rendering/RenderView.h:
1516         (RenderView): Add setIsInWindow.
1517
1518 2013-02-19  Eugene Klyuchnikov  <eustas@chromium.org>
1519
1520         Web Inspector: Cleanup and add JSDocs to SuggestBox
1521         https://bugs.webkit.org/show_bug.cgi?id=110202
1522
1523         Reviewed by Pavel Feldman.
1524
1525         SuggestBox contains some obsolete/unused code and not fully
1526         covered with JSDocs.
1527
1528         * inspector/front-end/SuggestBox.js:
1529         (WebInspector.SuggestBox.prototype.visible):
1530         Replaced getter with function.
1531         (WebInspector.SuggestBox.prototype._onScrollOrResize):
1532         Use camel-case for function names.
1533         (WebInspector.SuggestBox.prototype._onBoxMouseDown): Ditto.
1534         (WebInspector.SuggestBox.prototype.updateSuggestions):
1535         Removed unused code.
1536         (WebInspector.SuggestBox.prototype.hide): Adopt changes.
1537         (WebInspector.SuggestBox.prototype._applySuggestion): Ditto.
1538         * inspector/front-end/TextPrompt.js:
1539         (WebInspector.TextPrompt.prototype.isSuggestBoxVisible): Ditto.
1540
1541 2013-02-19  Hayato Ito <hayato@chromium.org>
1542
1543         Calculate EventPath in EventDispatcher's constructor.
1544         https://bugs.webkit.org/show_bug.cgi?id=109905
1545
1546         Reviewed by Dimitri Glazkov.
1547
1548         This patch calculates an EventPath in EventDispatcher's
1549         constructor and removes EventDispatcher::ensureEventPath().
1550         We don't have any reason to initialize an EventPath lazily.
1551
1552         No tests. No change in behavior.
1553
1554         * dom/EventDispatcher.cpp:
1555         (WebCore::EventDispatcher::EventDispatcher):
1556         (WebCore::EventDispatcher::dispatch):
1557         * dom/EventDispatcher.h:
1558         (WebCore::EventDispatcher::eventPath):
1559         (EventDispatcher):
1560         * dom/FocusEvent.cpp:
1561         (WebCore::FocusEventDispatchMediator::dispatchEvent):
1562         (WebCore::BlurEventDispatchMediator::dispatchEvent):
1563         (WebCore::FocusInEventDispatchMediator::dispatchEvent):
1564         (WebCore::FocusOutEventDispatchMediator::dispatchEvent):
1565         * dom/MouseEvent.cpp:
1566         (WebCore::MouseEventDispatchMediator::dispatchEvent):
1567
1568 2013-02-19  Simon Fraser  <simon.fraser@apple.com>
1569
1570         Fix TileCache tile size when zoomed on slow-scrolling site
1571         https://bugs.webkit.org/show_bug.cgi?id=110289
1572
1573         Reviewed by Tim Horton.
1574         
1575         In slow scrolling mode, we use the tile coverage rect as the tile size
1576         (so a single tile covers the viewport). When zoomed, the tile coverage rect
1577         shrinks relative to the TileCache, so scale the tile size back up.
1578
1579         Test: platform/mac-wk2/tiled-drawing/tile-size-slow-zoomed.html
1580
1581         * platform/graphics/ca/mac/TileCache.mm:
1582         (WebCore::TileCache::tileSizeForCoverageRect):
1583
1584 2013-02-19  Hayato Ito  <hayato@chromium.org>
1585
1586         Rename AncestorChainWalker.
1587         https://bugs.webkit.org/show_bug.cgi?id=110146
1588
1589         Reviewed by Dimitri Glazkov.
1590
1591         Rename AncestorChainWalker to EventPathWalker.
1592         The term of EventPath is used in DOM Core spec.  EventPath was
1593         already introduced into a EventContext.h in r112055. We should
1594         spread this term into the Walker class since they share the same
1595         purpose.
1596
1597         No new tests, no behavior change.
1598
1599         * CMakeLists.txt:
1600         * GNUmakefile.list.am:
1601         * Target.pri:
1602         * WebCore.gypi:
1603         * WebCore.xcodeproj/project.pbxproj:
1604         * dom/DOMAllInOne.cpp:
1605         * dom/EventDispatcher.cpp:
1606         * dom/EventPathWalker.cpp: Renamed from Source/WebCore/dom/AncestorChainWalker.cpp.
1607         (WebCore):
1608         (WebCore::EventPathWalker::EventPathWalker):
1609         (WebCore::EventPathWalker::parent): parent() is now a static function to cover simple use cases.
1610         (WebCore::EventPathWalker::moveToParent): Renamed from parent().
1611         * dom/EventPathWalker.h: Renamed from Source/WebCore/dom/AncestorChainWalker.h.
1612         (WebCore):
1613         (EventPathWalker):
1614         (WebCore::EventPathWalker::node):
1615         (WebCore::EventPathWalker::isVisitingInsertionPointInReprojection): Renamed from isCrossingInsertionPoint().
1616         * dom/EventRetargeter.cpp:
1617         (WebCore::EventRetargeter::calculateEventPath):
1618         (WebCore::EventRetargeter::buildRelatedNodeMap):
1619         * dom/TreeScope.cpp:
1620         (WebCore::TreeScope::focusedNode):
1621         * html/HTMLLIElement.cpp:
1622         (WebCore::HTMLLIElement::attach):
1623         * page/EventHandler.cpp:
1624         (WebCore::EventHandler::updateMouseEventTargetNode):
1625         (WebCore::EventHandler::handleWheelEvent):
1626
1627 2013-02-19  Dean Jackson  <dino@apple.com>
1628
1629         Snapshotted plugin label should not be selectable
1630         https://bugs.webkit.org/show_bug.cgi?id=110286
1631
1632         Reviewed by Simon Fraser.
1633
1634         Update the CSS to make it clear that you should click
1635         on a snapshot (use the finger pointer) and disable
1636         text selection.
1637
1638         * css/plugIns.css:
1639         (embed::-webkit-snapshotted-plugin-content .snapshot-container .snapshot-label):
1640
1641 2013-02-19  Hans Muller  <hmuller@adobe.com>
1642
1643         [CSS Exclusions] Enable shape-inside support for ellipses
1644         https://bugs.webkit.org/show_bug.cgi?id=109868
1645
1646         Reviewed by Dirk Schulze.
1647
1648         This change is very similar to the one recently made for circles:
1649         removed the test that disabled ellipse values for shape-inside.
1650         The remaining support for ellipses, which is based on rounded rectangles
1651         whose width/height is equal to their radiusX/radiusY, has not changed.
1652
1653         Test: fast/exclusions/shape-inside/shape-inside-ellipse.html
1654
1655         * rendering/ExclusionShapeInsideInfo.h:
1656         (WebCore::ExclusionShapeInsideInfo::isEnabledFor): No longer disallows any BasicShape type.
1657
1658 2013-02-19  Uday Kiran  <udaykiran@motorola.com>
1659
1660         'round' not implemented in border-image
1661         https://bugs.webkit.org/show_bug.cgi?id=14185
1662
1663         Reviewed by David Hyatt.
1664
1665         Add rendering support for 'round' keyword of border-image-repeat CSS property
1666         http://dev.w3.org/csswg/css3-background/#border-image-repeat
1667         Rebased original patch by Benjamin Otte <otte@gnome.org> and made few fixes.
1668
1669         Test: fast/borders/border-image-02.html
1670
1671         * platform/graphics/GraphicsContext.cpp:
1672         (WebCore::GraphicsContext::drawTiledImage):
1673         * platform/graphics/GraphicsContext.h:
1674         (GraphicsContext):
1675         * platform/graphics/Image.cpp:
1676         (WebCore::Image::drawTiled):
1677         * platform/graphics/Image.h:
1678         (Image):
1679         * rendering/RenderBoxModelObject.cpp:
1680         (WebCore::RenderBoxModelObject::paintNinePieceImage): For 'round' keyword,
1681         the image is tiled (repeated) to fill the area. If it does not fill the area
1682         with a whole number of tiles, the image is rescaled so that it does.
1683
1684 2013-02-19  Conrad Shultz  <conrad_shultz@apple.com>
1685
1686         Allow UI clients to handle vertical wheel events.
1687         https://bugs.webkit.org/show_bug.cgi?id=110006
1688
1689         Reviewed by Tim Horton.
1690
1691         Add API to allow matching changes in WebKit2 to control rubber-banding behavior at vertical page extrema.
1692         If rubber-banding is disabled during a scroll event that would otherwise trigger rubber-banding, dispatch
1693         didNotHandleWheelEvent() to the page UI client.
1694
1695         * WebCore.exp.in:
1696         Export new rubber-banding API.
1697
1698         * page/Page.cpp:
1699         (WebCore):
1700         (WebCore::Page::rubberBandsAtBottom):
1701         Proxy for the corresponding function in ScrollingCoordinator.
1702         (WebCore::Page::setRubberBandsAtBottom):
1703         Ditto.
1704         (WebCore::Page::rubberBandsAtTop):
1705         Ditto.
1706         (WebCore::Page::setRubberBandsAtTop):
1707         Ditto.
1708
1709         * page/Page.h:
1710         (Page):
1711         Declare new rubber-banding API (above).
1712
1713         * page/scrolling/ScrollingCoordinator.h:
1714         (WebCore::ScrollingCoordinator::rubberBandsAtBottom):
1715         Stub API implementation.
1716         (WebCore::ScrollingCoordinator::setRubberBandsAtBottom):
1717         Ditto.
1718         (WebCore::ScrollingCoordinator::rubberBandsAtTop):
1719         Ditto.
1720         (WebCore::ScrollingCoordinator::setRubberBandsAtTop):
1721         Ditto.
1722
1723         * page/scrolling/ScrollingTree.cpp:
1724         (WebCore::ScrollingTree::ScrollingTree):
1725         Initialize new member variables.
1726         (WebCore::ScrollingTree::setMainFramePinState):
1727         Set top/bottom pinned states.
1728         (WebCore::ScrollingTree::rubberBandsAtBottom):
1729         New accessor function.
1730         (WebCore::ScrollingTree::setRubberBandsAtBottom):
1731         New mutator function.
1732         (WebCore::ScrollingTree::rubberBandsAtTop):
1733         New accessor function.
1734         (WebCore::ScrollingTree::setRubberBandsAtTop):
1735         New mutator function.
1736         (WebCore::ScrollingTree::willWheelEventStartSwipeGesture):
1737         Start a vertical swipe event if the frame is pinned at the top or bottom and associated rubber-banding is disabled.
1738
1739         * page/scrolling/ScrollingTree.h:
1740         (ScrollingTree):
1741         Declare new rubber-banding API and associated member variables.
1742
1743         * page/scrolling/mac/ScrollingCoordinatorMac.h:
1744         (ScrollingCoordinatorMac):
1745         Declare API overrides.
1746
1747         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1748         (WebCore::ScrollingCoordinatorMac::rubberBandsAtBottom):
1749         Method override; proxy to corresponding function in ScrollingTree.
1750         (WebCore::ScrollingCoordinatorMac::setRubberBandsAtBottom):
1751         Ditto.
1752         (WebCore::ScrollingCoordinatorMac::rubberBandsAtTop):
1753         Ditto.
1754         (WebCore::ScrollingCoordinatorMac::setRubberBandsAtTop):
1755         Ditto.
1756
1757         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
1758         (WebCore::ScrollingTreeScrollingNodeMac::pinnedInDirection):
1759         Remove trailing whitespace.
1760         (WebCore::ScrollingTreeScrollingNodeMac::updateMainFramePinState):
1761         Calculate and pass vertical pinning state to ScrollingTree::setMainFramePinState().
1762
1763 2013-02-19  Simon Fraser  <simon.fraser@apple.com>
1764
1765         Rubber-banding should not affect the visibleRect of the TileCache
1766         https://bugs.webkit.org/show_bug.cgi?id=110278
1767
1768         Reviewed by Beth Dakin.
1769         
1770         When rubber-banding a slow-scrolling page, or image document, we would constantly re-create
1771         the bottom tile because of the logic that adapts the tile size to the visible rect when slow
1772         scrolling.
1773         
1774         Avoid that by ensuring that the visibleRect is not affected by rubber-banding. This is done
1775         via a GraphicsLayerClient function that allows RenderLayerCompositor to provide a custom
1776         position for the scroll layer. We constrain that scroll position to remove the overhang that
1777         results from rubber-banding.
1778
1779         I wasn't able to make a test for this, even with internals.setScrollViewPosition().
1780
1781         * platform/graphics/GraphicsLayerClient.h:
1782         (GraphicsLayerClient):
1783         (WebCore::GraphicsLayerClient::customPositionForVisibleRectComputation):
1784         * platform/graphics/ca/GraphicsLayerCA.cpp:
1785         (WebCore::GraphicsLayerCA::computeVisibleRect):
1786         * rendering/RenderLayerCompositor.cpp:
1787         (WebCore::RenderLayerCompositor::customPositionForVisibleRectComputation):
1788         * rendering/RenderLayerCompositor.h:
1789
1790 2013-02-19  Tony Gentilcore  <tonyg@chromium.org>
1791
1792         Fix crash in preloading scanning base tags with no href attribute for background parser
1793         https://bugs.webkit.org/show_bug.cgi?id=110276
1794
1795         Reviewed by Eric Seidel.
1796
1797         Previously a <base> tag without an href attribute (like the one in fast/dom/HTMLAnchorElement/set-href-attribute-rebase.html)
1798         would crash the background parser's preload scanner.
1799
1800         To fix that, we only call stripLeadingAndTrailingHTMLSpaces() if the href attribute is non-null. This matches the main thread parser.
1801
1802         Along with this, I decided to templatize updatePredictedBaseURL() so that the main and background parser can share the same impl.
1803
1804         This required making CompactHTMLToken and HTMLToken a little more similar:
1805         1. Give HTMLToken a getAttributeItem() method.
1806         2. Move CompactAttribute to CompactHTMLToken::Attribute and make it a struct.
1807
1808         No new tests because covered by existing tests.
1809
1810         * html/parser/AtomicHTMLToken.h:
1811         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
1812         * html/parser/CompactHTMLToken.cpp:
1813         (SameSizeAsCompactHTMLToken):
1814         (WebCore::CompactHTMLToken::CompactHTMLToken):
1815         (WebCore::CompactHTMLToken::getAttributeItem):
1816         (WebCore::CompactHTMLToken::isSafeToSendToAnotherThread):
1817         * html/parser/CompactHTMLToken.h:
1818         (WebCore::CompactHTMLToken::Attribute::Attribute):
1819         (Attribute):
1820         (WebCore::CompactHTMLToken::attributes):
1821         (CompactHTMLToken):
1822         (WebCore::CompactHTMLToken::publicIdentifier):
1823         (WebCore::CompactHTMLToken::systemIdentifier):
1824         * html/parser/HTMLParserIdioms.h:
1825         (WebCore):
1826         (WebCore::stripLeadingAndTrailingHTMLSpaces):
1827         * html/parser/HTMLPreloadScanner.cpp:
1828         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
1829         (WebCore):
1830         (WebCore::TokenPreloadScanner::updatePredictedBaseURL):
1831         * html/parser/HTMLPreloadScanner.h:
1832         * html/parser/HTMLToken.h:
1833         (WebCore::HTMLToken::getAttributeItem):
1834         (HTMLToken):
1835
1836 2013-02-19  Mark Lam  <mark.lam@apple.com>
1837
1838         Introducing AbstractSQLTransaction and AbstractSQLTransactionBackend.
1839         https://bugs.webkit.org/show_bug.cgi?id=110273.
1840
1841         Reviewed by Anders Carlsson.
1842
1843         This is part of the webdatabase refactoring for webkit2.
1844         - Also changed the frontend and backend to only refer to the
1845           abstract interface of each other.
1846
1847         No new tests.
1848
1849         * Modules/webdatabase/AbstractSQLTransaction.h: Added.
1850         (AbstractSQLTransaction):
1851         (WebCore::AbstractSQLTransaction::~AbstractSQLTransaction):
1852         * Modules/webdatabase/AbstractSQLTransactionBackend.h: Added.
1853         (AbstractSQLTransactionBackend):
1854         (WebCore::AbstractSQLTransactionBackend::~AbstractSQLTransactionBackend):
1855         * Modules/webdatabase/SQLTransaction.cpp:
1856         (WebCore::SQLTransaction::hasCallback):
1857         (WebCore::SQLTransaction::hasSuccessCallback):
1858         (WebCore::SQLTransaction::hasErrorCallback):
1859         (WebCore::SQLTransaction::setBackend):
1860         * Modules/webdatabase/SQLTransaction.h:
1861         (SQLTransaction):
1862         * Modules/webdatabase/SQLTransactionBackend.cpp:
1863         (WebCore::SQLTransactionBackend::create):
1864         (WebCore::SQLTransactionBackend::SQLTransactionBackend):
1865         * Modules/webdatabase/SQLTransactionBackend.h:
1866         (SQLTransactionBackend):
1867         * Modules/webdatabase/SQLTransactionStateMachine.h:
1868
1869 2013-02-19  Emil A Eklund  <eae@chromium.org>
1870
1871         Change computeStickyPositionConstraints to use LayoutBoxExtent for margins
1872         https://bugs.webkit.org/show_bug.cgi?id=108872
1873
1874         Reviewed by Levi Weintraub.
1875         
1876         Change RenderBoxModelObject::computeStickyPositionConstraints to
1877         use a LayoutBoxExtent to represent margins.
1878
1879         No new tests, no change in functionality.
1880
1881         * platform/graphics/LayoutRect.h:
1882         (WebCore::LayoutRect::contract):
1883         Add version contract methods that takes a LayoutBoxExtent object.
1884         
1885         * platform/graphics/LayoutSize.h:
1886         (WebCore::LayoutSize::shrink):
1887         Add shrink method.
1888         
1889         * rendering/RenderBoxModelObject.cpp:
1890         (WebCore::RenderBoxModelObject::computeStickyPositionConstraints):
1891         Change to use a LayoutBoxExtent object to represent margins.
1892
1893 2013-02-19  Tony Gentilcore  <tonyg@chromium.org>
1894
1895         Disable ASSERT(!hasInsertionPoint()) for background parser
1896         https://bugs.webkit.org/show_bug.cgi?id=110251
1897
1898         Reviewed by Adam Barth.
1899
1900         The background parser crashes about 10 layout tests by hitting ASSERT(!hasInsertionPoint()).
1901         Now, finish() is the thing that closes the HTMLInputStream which removes the insertion point.
1902         In these tests, a document.open() calls insert() which clears the HTMLInputStream which causes
1903         there to be an insertion point again.
1904
1905         With the main thread parser, insert() is called before finish() so the ASSERT passes.
1906         However, with the threaded parser, finish() is called before insert(), so we fail the ASSERT.
1907
1908         This patch disables the ASSERT for the background parser because m_input isn't really relevant.
1909         This causes us to pass the tests. However, there is a risk that now hasInsertionPoint() may be incorrect
1910         and Document has a non-debug branch that tests hasInsertionPoint().
1911
1912         No new tests because covered by existing tests.
1913
1914         * html/parser/HTMLDocumentParser.cpp:
1915         (WebCore::HTMLDocumentParser::prepareToStopParsing):
1916         (WebCore::HTMLDocumentParser::attemptToRunDeferredScriptsAndEnd):
1917
1918 2013-02-19  Hans Muller  <hmuller@adobe.com>
1919
1920         [CSS Exclusions] Enable shape-inside support for ellipses
1921         https://bugs.webkit.org/show_bug.cgi?id=109868
1922
1923         Reviewed by Dirk Schulze.
1924
1925         This change is very similar to the one recently made for circles:
1926         removed the test that disabled ellipse values for shape-inside.
1927         The remaining support for ellipses, which is based on rounded rectangles
1928         whose width/height is equal to their radiusX/radiusY, has not changed.
1929
1930         Test: fast/exclusions/shape-inside/shape-inside-ellipse.html
1931
1932         * rendering/ExclusionShapeInsideInfo.h:
1933         (WebCore::ExclusionShapeInsideInfo::isEnabledFor): No longer disallows any BasicShape type.
1934
1935 2013-02-19  Simon Fraser  <simon.fraser@apple.com>
1936
1937         Separate constraining for overhang from fixed-position zooming behavior in scrollOffsetForFixedPosition()
1938         https://bugs.webkit.org/show_bug.cgi?id=110267
1939
1940         Reviewed by Beth Dakin.
1941
1942         The static scrollOffsetForFixedPosition() function in ScrollingCoordinator did two things;
1943         it constrained the scroll position when rubber-banding, and applied the special scaling for
1944         fixed position when zoomed.
1945         
1946         Separate these out so that we can use the rubber-banding constrained elsewhere.
1947
1948         * page/FrameView.cpp:
1949         (WebCore::FrameView::scrollOffsetForFixedPosition): The static function is here now.
1950         * page/FrameView.h:
1951         * page/scrolling/ScrollingCoordinator.cpp: Code moved to FrameView.
1952         * page/scrolling/ScrollingCoordinator.h:
1953         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
1954         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition): scrollOffsetForFixedPosition()
1955         is now on FrameView.
1956         * platform/ScrollableArea.cpp:
1957         (WebCore::constrainedScrollPosition): Helper to constrain one axis for overhang.
1958         (WebCore::ScrollableArea::constrainScrollPositionForOverhang): Static function that
1959         can be called by FrameView::scrollOffsetForFixedPosition().
1960         * platform/ScrollableArea.h: Static function constrainScrollPositionForOverhang()
1961         so we can call it from another thread. Also a member fuction of the same name, which takes
1962         the scrollPosition as input (so we can feed it a layer position in a later patch).
1963
1964 2013-02-19  Tony Gentilcore  <tonyg@chromium.org>
1965
1966         Fix checkThatTokensAreSafeToSendToAnotherThread() now that the preload scanner is enabled
1967         https://bugs.webkit.org/show_bug.cgi?id=110258
1968
1969         Reviewed by Adam Barth.
1970
1971         We were hitting this ASSERT on numerous tests with the background parser enabled. This copy fixes the assertion.
1972
1973         No new tests becuase covered by existing tests.
1974
1975         * html/parser/HTMLResourcePreloader.h:
1976         (WebCore::PreloadRequest::setCharset):
1977
1978 2013-02-19  Tony Gentilcore  <tonyg@chromium.org>
1979
1980         Fix typo: inititatorFor->initiatorFor
1981         https://bugs.webkit.org/show_bug.cgi?id=110260
1982
1983         Reviewed by Adam Barth.
1984
1985         No new tests because no changed functionality.
1986
1987         * html/parser/HTMLPreloadScanner.cpp:
1988         (WebCore::TokenPreloadScanner::initiatorFor):
1989         (WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest):
1990         * html/parser/HTMLPreloadScanner.h:
1991
1992 2013-02-19  Tony Chang  <tony@chromium.org>
1993
1994         Convert 3 settings to use Settings.in
1995         https://bugs.webkit.org/show_bug.cgi?id=109875
1996
1997         Reviewed by Ryosuke Niwa.
1998
1999         Convert mediaEnabled, applicationChromeMode and DOMPasteAllowed to
2000         use Settings.in. They previously had inconsistently named setters.
2001
2002         No new tests, this is a refactoring.
2003
2004         * Source/WebCore/WebCore.exp.in: Remove symbols that are now inlined from exports.
2005         * Source/WebCore/WebCore.order: Remove symbols that no longer exist.
2006         * dom/make_names.pl:
2007         (printConstructorInterior): Rename isMediaEnabled to mediaEnabled.
2008         (printWrapperFunctions): Rename isMediaEnabled to mediaEnabled.
2009         * editing/EditorCommand.cpp:
2010         (WebCore::supportedPaste): Rename isDOMPasteAllowed to DOMPasteAllowed.
2011         * page/Settings.cpp:
2012         (WebCore::Settings::Settings): Remove custom code.
2013         * page/Settings.h:
2014         (Settings): Remove custom code.
2015         * page/Settings.in: Add entries for mediaEnabled, applicationChromeMode and DOMPasteAllowed.
2016         * page/make_settings.pl:
2017         (setterFunctionName): Expand uppercase rules to include DOM.
2018         * rendering/RenderTheme.cpp:
2019         (WebCore::RenderTheme::isDefault): Rename inApplicationChromeMode to applicationChromeMode.
2020         * rendering/RenderThemeWin.cpp:
2021         (WebCore::documentIsInApplicationChromeMode): Rename inApplicationChromeMode to applicationChromeMode.
2022
2023 2013-02-19  Julien Chaffraix  <jchaffraix@webkit.org>
2024
2025         [CSS Grid Layout] Refactor the code in preparation of auto placement support
2026         https://bugs.webkit.org/show_bug.cgi?id=110244
2027
2028         Reviewed by Ojan Vafai.
2029
2030         Test: fast/css-grid-layout/grid-auto-flow-resolution.html
2031
2032         In order to support auto placement, we need to iterate over the grid items with
2033         auto row / column several times. This changes makes us do that in a very simple,
2034         not-yet-conformant way. While touching this code, the distinction between grid-auto-flow
2035         none and row / column was better drawn (and enforced).
2036
2037         * rendering/RenderGrid.cpp:
2038         (WebCore::RenderGrid::resolveGridPositionFromStyle):
2039         Made it illegal to call resolveGridPositionFromStyle if the grid track is auto and
2040         grid-auto-flow is not none. This would catch bad use of the function.
2041
2042         (WebCore::RenderGrid::maximumIndexInDirection):
2043         Updated to bail out if the grid track is auto. Also improved the comment.
2044
2045         (WebCore::RenderGrid::placeItemsOnGrid):
2046         Updated the function to do several iterations. Also handled the grid-auto-flow: none
2047         case differently as it shouldn't need the extra iteration(s).
2048
2049 2013-02-19  David Hyatt  <hyatt@apple.com>
2050
2051         [New Multicolumn] REGRESSION: RenderMultiColumnSets broken by the RenderRegion -> RenderBlock subclassing.
2052         https://bugs.webkit.org/show_bug.cgi?id=110239.
2053
2054         Reviewed by Simon Fraser.
2055
2056         Test: fast/multicol/newmulticol/column-rules-fixed-height.html
2057
2058         * rendering/RenderBlock.cpp:
2059         (WebCore::RenderBlock::columnRectAt):
2060         Make sure the columnGap() in the old multicolumn code is always expressed as a LayoutUnit. This was the
2061         one place where it was still an int.
2062
2063         * rendering/RenderFlowThread.cpp:
2064         (WebCore::RenderFlowThread::paintFlowThreadPortionInRegion):
2065         Rework the painting of flow thread portions to account for the fact that regions paint at an integral
2066         translation. This means you have to construct clipping around that integral destination. Subpixel layout
2067         regions did not clip correctly as a result of this issue.
2068
2069         * rendering/RenderMultiColumnSet.cpp:
2070         (WebCore::RenderMultiColumnSet::columnRectAt):
2071         Fix the same bug with columnGap() that the old column code has, i.e., one spot where it was an int.
2072
2073         (WebCore::RenderMultiColumnSet::paintObject):
2074         RenderMultiColumnSet should be using paintObject and not paint and it needs to check for visibility
2075         and phases now that it is a RenderBlock subclass.
2076
2077         (WebCore::RenderMultiColumnSet::paintColumnRules):
2078         Fix the bug that Opera guys fixed in the old multi-column code. They didn't patch the new code, so this
2079         takes care of that.
2080
2081         * rendering/RenderMultiColumnSet.h:
2082         (RenderMultiColumnSet):
2083         Change to use paintObject instead of paint.
2084
2085 2013-02-19  Branimir Lambov  <blambov@google.com>
2086
2087         Fix 'slice' aspect ratio calculation
2088         https://bugs.webkit.org/show_bug.cgi?id=99984
2089
2090         Reviewed by Dirk Schulze.
2091
2092         Previously the calculation for the 'slice' aspect ratio would incorrectly calculate the
2093         source rect location based on the destination rect offset. This caused our source rect to be
2094         incorrect, and sometimes render outside the visible area completely. After this patch
2095         our implementation matches the implementation of both Gecko and Presto.
2096
2097         The relevant spec section:
2098         http://www.w3.org/TR/SVG/single-page.html#coords-PreserveAspectRatioAttribute
2099
2100         Tests: svg/as-image/image-preserveAspectRatio-all.svg
2101                svg/filters/feImage-preserveAspectRatio-all.svg
2102
2103         * svg/SVGPreserveAspectRatio.cpp:
2104         (WebCore::SVGPreserveAspectRatio::transformRect):
2105
2106 2013-02-19  Kentaro Hara  <haraken@google.com>
2107
2108         [V8] ScriptRunner::runCompiledScript() should return Handle<Value>() when OOM occurs
2109         https://bugs.webkit.org/show_bug.cgi?id=110254
2110
2111         Reviewed by Adam Barth.
2112
2113         Chromium bug: https://code.google.com/p/chromium/issues/detail?id=176951
2114
2115         Currently ScriptRunner::runCompiledScript() calls
2116         ASSERT(script.IsEmpty()) when OOM occurs. The Chromium bug is
2117         hitting the ASSERT(). The ASSERT() does not make sense at all.
2118         Instead, we should return an empty handle when OOM occurs.
2119
2120         No tests. The bug happens only when OOM occurs.
2121
2122         * bindings/v8/ScriptRunner.cpp:
2123         (WebCore::ScriptRunner::runCompiledScript):
2124
2125 2013-02-19  Elliott Sprehn  <esprehn@chromium.org>
2126
2127         Support both MutationObserver and WebKitMutationObserver
2128         https://bugs.webkit.org/show_bug.cgi?id=109776
2129
2130         Reviewed by Ojan Vafai.
2131
2132         We should allow new MutationObserver now that we support parser generated
2133         mutations. This leaves the old prefixed constructor in until we decide
2134         people don't depend on it.
2135
2136         Test: fast/dom/MutationObserver/mutation-observer-prefix.html
2137
2138         * page/DOMWindow.idl:
2139
2140 2013-02-19  Elliott Sprehn  <esprehn@chromium.org>
2141
2142         Remove RenderText::updateText
2143         https://bugs.webkit.org/show_bug.cgi?id=109991
2144
2145         Reviewed by Eric Seidel.
2146
2147         There's no reason for the generic RenderText::updateText virtual hook
2148         anymore now that r143060 made RenderQuote stop setting dirty bits during
2149         layout since the hook is only used by RenderCounter.
2150
2151         Instead add updateCounterIfNeeded and make it clear this is a hack for
2152         counters.
2153
2154         * rendering/RenderBlockLineLayout.cpp:
2155         (WebCore::updateCounterIfNeeded): Added, not handles the counter specific hack.
2156         (WebCore::dirtyLineBoxesForRenderer):
2157         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
2158         * rendering/RenderCounter.cpp:
2159         (WebCore::RenderCounter::updateCounter):
2160         * rendering/RenderCounter.h:
2161         (RenderCounter):
2162         * rendering/RenderQuote.cpp:
2163         (WebCore::RenderQuote::styleDidChange):
2164         (WebCore::RenderQuote::updateDepth):
2165         * rendering/RenderQuote.h:
2166         (RenderQuote):
2167         * rendering/RenderText.h:
2168         (RenderText):
2169
2170 2013-02-19  Tony Chang  <tony@chromium.org>
2171
2172         Border changes on tables with collapsed borders doesn't relayout table cells
2173         https://bugs.webkit.org/show_bug.cgi?id=109774
2174
2175         Reviewed by David Hyatt.
2176
2177         Test: fast/table/border-collapsing/dynamic-border-width-change.html
2178
2179         Changes to border top and border bottom on table rows also changes the size
2180         of the table cell causing a relayout to be needed.
2181
2182         * rendering/RenderTableRow.cpp:
2183         (WebCore::borderWidthChanged): Also include border top and bottom.
2184         (WebCore::RenderTableRow::styleDidChange): Remove logical from the helper function name.
2185
2186 2013-02-19  Kentaro Hara  <haraken@chromium.org>
2187
2188         Unreviewed. Rebaselined run-bindings-tests.
2189
2190         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2191         (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
2192         * bindings/scripts/test/JS/JSTestObj.cpp:
2193         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString):
2194
2195 2013-02-19  ChangSeok Oh  <changseok.oh@collabora.com>
2196
2197         [GTK][AC] Implement matrix transform animation with clutter ac backend
2198         https://bugs.webkit.org/show_bug.cgi?id=109848
2199
2200         Reviewed by Gustavo Noronha Silva.
2201
2202         Clutter 1.12 doesn't support additive transform animations yet, so the combination
2203         of two or more transformations(such as rotation after translation) runs unexpectedly.
2204         So we use a matrix transformation instead for the case.
2205
2206         Covered by existing animation tests.
2207
2208         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
2209         (WebCore::getValueFunctionNameForTransformOperation):
2210         (WebCore::GraphicsLayerClutter::createTransformAnimationsFromKeyframes):
2211         * platform/graphics/clutter/PlatformClutterAnimation.cpp:
2212         (WebCore::toClutterActorPropertyString): Add actor property "transform"
2213         (WebCore::clutterMatrixProgress): Handle interpolation between two matrices instead of default clutter_matrix_progress.
2214         (WebCore):
2215         (WebCore::PlatformClutterAnimation::supportsAdditiveValueFunction):
2216         (WebCore::PlatformClutterAnimation::setFromValue): for TransformationMatrix.
2217         (WebCore::PlatformClutterAnimation::setToValue): ditto.
2218         (WebCore::PlatformClutterAnimation::addClutterTransitionForProperty):
2219         (WebCore::PlatformClutterAnimation::addTransformTransition):
2220         * platform/graphics/clutter/PlatformClutterAnimation.h:
2221         (PlatformClutterAnimation):
2222         * platform/graphics/clutter/TransformationMatrixClutter.cpp: Add copy constructor for CoglMatrix.
2223         (WebCore::TransformationMatrix::TransformationMatrix):
2224         (WebCore):
2225         * platform/graphics/transforms/TransformationMatrix.h:
2226         (TransformationMatrix):
2227
2228 2013-02-19  Kassy Coan  <kassycoan@chromium.org>
2229
2230         Update FeatureObserver on top level navigation in addition to page destruction.
2231         https://bugs.webkit.org/show_bug.cgi?id=109874
2232
2233         Reviewed by Adam Barth.
2234
2235         No new tests. Only effect is to histogram more frequently.
2236
2237         * loader/FrameLoader.cpp:
2238         (WebCore::FrameLoader::dispatchDidCommitLoad):
2239         * page/FeatureObserver.cpp:
2240         (WebCore::FeatureObserver::~FeatureObserver):
2241         (WebCore):
2242         (WebCore::FeatureObserver::updateMeasurements):
2243         (WebCore::FeatureObserver::didCommitLoad):
2244         * page/FeatureObserver.h:
2245         (FeatureObserver):
2246
2247 2013-02-19  Morten Stenshorne  <mstensho@opera.com>
2248
2249         Remove unnecessary (and problematic) copy-constructor from LayoutUnit
2250         https://bugs.webkit.org/show_bug.cgi?id=110121
2251
2252         This copy constructor does what a default copy constructor would do, so
2253         it's not necessary. Furthermore, this copy constructor is the only
2254         reason why LayoutUnit becomes non-POD, and that triggers a gdb bug,
2255         making it impossible to do things like "print location()" when inside
2256         some RenderBlock, for instance.
2257
2258         Gdb bug http://sourceware.org/bugzilla/show_bug.cgi?id=15154 reported.
2259
2260         Reviewed by Benjamin Poulain.
2261
2262         No tests. Apart from dealing with buggy debuggers, this is just code cleanup.
2263
2264         * platform/LayoutUnit.h:
2265
2266 2013-02-19  Emil A Eklund  <eae@chromium.org>
2267
2268         LayoutUnit::epsilon shouldn't be necessary to place floats
2269         https://bugs.webkit.org/show_bug.cgi?id=94000
2270
2271         Reviewed by Levi Weintraub.
2272         
2273         Currently, to get float placement correct, we need to have an
2274         epsilon tolerance in RenderBlock::computeLogicalLocationForFloat
2275         for the width of the line to fit them on. This really shouldn't
2276         be necessary, and probably indicates we're losing precision
2277         elsewhere.
2278         
2279         Remove epsilon as it no longer appears to be needed. All layout
2280         tests pass without it.
2281
2282         No new tests, covered by existing tests.
2283
2284         * rendering/RenderBlock.cpp:
2285         (WebCore::RenderBlock::computeLogicalLocationForFloat):
2286
2287 2013-02-19  Tim Volodine  <timvolodine@chromium.org>
2288
2289         Text Autosizing: prevent oscillation of font sizes during autosizing
2290         https://bugs.webkit.org/show_bug.cgi?id=108205
2291
2292         Reviewed by Kenneth Rohde Christiansen.
2293
2294         On some websites autosized font-sizes oscillate due to layouts caused by
2295         hovering or incremental page loading (and on other sites font sizes do
2296         eventually stabilize, but it takes many layouts before they reach a steady
2297         size). To prevent all these cases, we no longer allow the autosizing
2298         multiplier to change after it has been set (to a value other than 1).
2299
2300         This won't always give exactly the same results, but testing on 2000 top
2301         sites shows that this makes little difference in practice, and it prevents
2302         these very jarring cases. As a happy side-effect, this speeds up layouts
2303         as font sizes change less.
2304
2305         Test: fast/text-autosizing/oscillation-javascript-fontsize-change.html
2306
2307         * page/FrameView.cpp:
2308         (WebCore::FrameView::setFrameRect):
2309         * page/Settings.cpp:
2310         (WebCore::Settings::setTextAutosizingFontScaleFactor):
2311         * rendering/TextAutosizer.cpp:
2312         (WebCore::TextAutosizer::recalculateMultipliers):
2313         (WebCore):
2314         (WebCore::TextAutosizer::processContainer):
2315         * rendering/TextAutosizer.h:
2316         (TextAutosizer):
2317
2318 2013-02-19  Youenn Fablet  <youennf@gmail.com>
2319
2320         [EFL][DRT] http/tests/loading/307-after-303-after-post.html times out
2321         https://bugs.webkit.org/show_bug.cgi?id=93214
2322
2323         Ensured that GET verb is consistently used for any request
2324         coming after a redirection that triggers switching to GET.
2325
2326         Reviewed by Martin Robinson.
2327
2328         * platform/network/soup/ResourceHandleSoup.cpp:
2329         (WebCore::doRedirect):
2330
2331 2013-02-19  Andras Becsi  <andras.becsi@digia.com>
2332
2333         [Qt] Fix compilation if Qt was configured with -no-rtti
2334         https://bugs.webkit.org/show_bug.cgi?id=110234
2335
2336         Reviewed by Noam Rosenthal.
2337
2338         Availability of dynamic_cast should be checked.
2339
2340         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2341         (WebCore::GraphicsLayerTextureMapper::updateBackingStoreIfNeeded):
2342
2343 2013-02-18  Alexey Proskuryakov  <ap@apple.com>
2344
2345         Unregistered blob URLs have incorrect MIME type
2346         https://bugs.webkit.org/show_bug.cgi?id=110166
2347
2348         Reviewed by Sam Weinig.
2349
2350         * page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::shouldUseInnerURL): Added a FIXME.
2351
2352         * platform/network/BlobResourceHandle.cpp: (WebCore::BlobResourceHandle::notifyResponseOnError):
2353         Pass an accurate MIME type (for a delegate to see).
2354
2355 2013-02-19  Joshua Bell  <jsbell@chromium.org>
2356
2357         IndexedDB: additional checks on LevelDB decoding
2358         https://bugs.webkit.org/show_bug.cgi?id=109711
2359
2360         Reviewed by Tony Chang.
2361
2362         Watch out for decoding errors caused by corrupted data, and exit various
2363         decode/compare operations earlier.
2364
2365         Covered by existing LayoutTests and Chromium's webkit_unit_tests
2366
2367         * Modules/indexeddb/IDBLevelDBCoding.cpp:
2368         (WebCore::IDBLevelDBCoding::decodeStringWithLength): Bail if length is negative.
2369         (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): Distinguish error case.
2370         (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): Bail if length is negative.
2371         (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): Distinguish error case.
2372         (WebCore::IDBLevelDBCoding::compare): Plumb through "ok".
2373         (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::compare): Ditto.
2374         (WebCore::IDBLevelDBCoding::ExistsEntryKey::compare): Ditto.
2375         (WebCore::IDBLevelDBCoding::IndexDataKey::compare): Ditto.
2376         * Modules/indexeddb/IDBLevelDBCoding.h: Updated method signatures.
2377
2378 2013-02-19  ChangSeok Oh  <changseok.oh@collabora.com>
2379
2380         [GTK][AC] Implement keyframe animations with clutter ac backend
2381         https://bugs.webkit.org/show_bug.cgi?id=110057
2382
2383         Reviewed by Gustavo Noronha Silva.
2384
2385         This patch brings accelerated keyframe animation with clutter to WebKitGtk+.
2386         Changes of GraphicsLayerClutter are based on GraphicsLayerCA. But major changes
2387         of PlatformClutterAnimation are implemented with clutter keyframe transition apis.
2388         See http://developer.gnome.org/clutter/stable/ClutterKeyframeTransition.html
2389
2390         Covered by existing animation tests.
2391
2392         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
2393         (WebCore::GraphicsLayerClutter::createKeyframeAnimation):
2394         (WebCore::GraphicsLayerClutter::setTransformAnimationKeyframes):
2395         (WebCore::GraphicsLayerClutter::setAnimationKeyframes):
2396         * platform/graphics/clutter/PlatformClutterAnimation.cpp:
2397         (WebCore::toClutterActorPropertyString):
2398         (WebCore::PlatformClutterAnimation::PlatformClutterAnimation):
2399         (WebCore::PlatformClutterAnimation::setTimingFunction):
2400         (WebCore::PlatformClutterAnimation::setValues):
2401         (WebCore::PlatformClutterAnimation::setKeyTimes):
2402         (WebCore::PlatformClutterAnimation::setTimingFunctions):
2403         (WebCore::PlatformClutterAnimation::addClutterTransitionForProperty):
2404         (WebCore):
2405         (WebCore::PlatformClutterAnimation::addClutterKeyframeTransitionForProperty):
2406         (WebCore::PlatformClutterAnimation::addOpacityTransition):
2407         (WebCore::PlatformClutterAnimation::addTransformTransition):
2408         (WebCore::PlatformClutterAnimation::addAnimationForKey):
2409         (WebCore::PlatformClutterAnimation::removeAnimationForKey):
2410         * platform/graphics/clutter/PlatformClutterAnimation.h:
2411         (PlatformClutterAnimation):
2412
2413 2013-02-19  Claudio Saavedra  <csaavedra@igalia.com>
2414
2415         [harfbuzz] Crash in harfbuzz related code
2416         https://bugs.webkit.org/show_bug.cgi?id=110145
2417
2418         Reviewed by Martin Robinson.
2419
2420         Patch by Behdad Esfahbod <behdad@google.com>
2421
2422         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
2423         (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Ask harfbuzz
2424         to guess the segment properties.
2425
2426 2013-02-19  Pavel Podivilov  <podivilov@chromium.org>
2427
2428         Web Inspector: release backtrace object group on each step.
2429         https://bugs.webkit.org/show_bug.cgi?id=110223
2430
2431         Reviewed by Pavel Feldman.
2432
2433         * inspector/InspectorDebuggerAgent.cpp:
2434         (WebCore):
2435         (WebCore::InspectorDebuggerAgent::stepOver):
2436         (WebCore::InspectorDebuggerAgent::stepInto):
2437         (WebCore::InspectorDebuggerAgent::stepOut):
2438
2439 2013-02-19  Sheriff Bot  <webkit.review.bot@gmail.com>
2440
2441         Unreviewed, rolling out r142975.
2442         http://trac.webkit.org/changeset/142975
2443         https://bugs.webkit.org/show_bug.cgi?id=110225
2444
2445         Introduces hard-to-reproduce crashes upon inspected page
2446         navigation on Mac (Requested by apavlov on #webkit).
2447
2448         * dom/DocumentStyleSheetCollection.cpp:
2449         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
2450         * inspector/Inspector.json:
2451         * inspector/InspectorCSSAgent.cpp:
2452         (WebCore::InspectorCSSAgent::InspectorCSSAgent):
2453         (WebCore::InspectorCSSAgent::clearFrontend):
2454         (WebCore::InspectorCSSAgent::enable):
2455         (WebCore::InspectorCSSAgent::getAllStyleSheets):
2456         (WebCore::InspectorCSSAgent::collectStyleSheets):
2457         (WebCore::InspectorCSSAgent::bindStyleSheet):
2458         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
2459         (WebCore::InspectorCSSAgent::detectOrigin):
2460         (WebCore::InspectorCSSAgent::buildObjectForRule):
2461         * inspector/InspectorCSSAgent.h:
2462         (InspectorCSSAgent):
2463         * inspector/InspectorInstrumentation.cpp:
2464         (WebCore):
2465         * inspector/InspectorInstrumentation.h:
2466         (WebCore):
2467         (InspectorInstrumentation):
2468         * inspector/front-end/CSSStyleModel.js:
2469         (WebInspector.CSSStyleModel.prototype.getViaInspectorResourceForRule):
2470         (WebInspector.CSSStyleModelResourceBinding.prototype.):
2471         (WebInspector.CSSStyleModelResourceBinding.prototype.requestStyleSheetIdForResource):
2472         (WebInspector.CSSStyleModelResourceBinding.prototype.requestResourceURLForStyleSheetId):
2473         (WebInspector.CSSStyleModelResourceBinding.prototype._styleSheetIdForResource):
2474         (WebInspector.CSSStyleModelResourceBinding.prototype._loadStyleSheetHeaders):
2475         (WebInspector.CSSStyleModelResourceBinding.prototype.headersLoaded):
2476         (WebInspector.CSSStyleModelResourceBinding.prototype._requestViaInspectorResource):
2477         (WebInspector.CSSStyleModelResourceBinding.prototype._getOrCreateInspectorResource):
2478         (WebInspector.CSSStyleModelResourceBinding.prototype._reset):
2479         * inspector/front-end/SASSSourceMapping.js:
2480         (WebInspector.SASSSourceMapping.prototype._styleSheetChanged.callback):
2481         (WebInspector.SASSSourceMapping.prototype._styleSheetChanged):
2482         * inspector/front-end/StylesSidebarPane.js:
2483         (WebInspector.StylePropertiesSection.prototype._createRuleOriginNode.callback):
2484         (WebInspector.StylePropertiesSection.prototype._createRuleOriginNode):
2485         * inspector/front-end/StylesSourceMapping.js:
2486         (WebInspector.StyleContentBinding.prototype.callback):
2487         (WebInspector.StyleContentBinding.prototype.setStyleContent):
2488         (WebInspector.StyleContentBinding.prototype.):
2489         (WebInspector.StyleContentBinding.prototype._innerStyleSheetChanged):
2490
2491 2013-02-19  Julien Chaffraix  <jchaffraix@webkit.org>
2492
2493         RenderGrid::computedUsedBreadthOfGridTracks can read past m_grid's size
2494         https://bugs.webkit.org/show_bug.cgi?id=110126
2495
2496         Reviewed by Ojan Vafai.
2497
2498         The issue comes from how we store the column information inside m_grid.
2499         Because m_grid is a Vector of rows, we could lose the column information
2500         if we had no row, no grid item but some columns defined in CSS. As the
2501         logic would assume that our row / column size would be greater than what
2502         the style defines explicitely, we would access past our Vector's boundary.
2503
2504         The fix is to ensure that we have at least a row so that we can store the
2505         column information in every case. This fix is overly broad as it also forces
2506         the grid to have one column, which shouldn't be an issue.
2507
2508         Test: fast/css-grid-layout/grid-element-empty-row-column.html
2509
2510         * rendering/RenderGrid.cpp:
2511         (WebCore::RenderGrid::maximumIndexInDirection):
2512         Forced this function to return at least one as the maximum index so that
2513         m_grid has at least one row / column.
2514
2515         (WebCore::RenderGrid::placeItemsOnGrid):
2516         Added a ASSERT that m_grid is bigger than the explicit grid-rows / grid-columns.
2517         Also changed an existing ASSERT to use gridWasPopulated for consistency and changed
2518         the code not to call gridRowCount as it would ASSERT (we are in the middle of populating
2519         the grid).
2520
2521         * rendering/RenderGrid.h:
2522         (WebCore::RenderGrid::gridWasPopulated):
2523         Added this helper function.
2524
2525         (WebCore::RenderGrid::gridColumnCount):
2526         Replaced a now unneeded branch with an ASSERT. As placeItemsOnGrid should be called
2527         prior to read m_grid, this change should be fine.
2528
2529         (WebCore::RenderGrid::gridRowCount):
2530         Added an ASSERT.
2531
2532 2013-02-19  Sergio Villar Senin  <svillar@igalia.com>
2533
2534         [Soup] Use synchronous calls to close completely processed streams
2535         https://bugs.webkit.org/show_bug.cgi?id=107432
2536
2537         Reviewed by Martin Robinson.
2538
2539         There is no need to close already processed streams in asynchronous
2540         calls since they won't block. Using the synchronous call will save
2541         us some code and unnecessary asynchronous burden. This is kind of
2542         a code refactor so no new tests needed.
2543
2544         * platform/network/soup/ResourceHandleSoup.cpp:
2545         (WebCore):
2546         (WebCore::redirectSkipCallback):
2547         (WebCore::readCallback):
2548
2549 2013-02-19  Andrey Adaikin  <aandrey@chromium.org>
2550
2551         Web Inspector: [Canvas] use timeline's didBeginFrame for marking frame end calls
2552         https://bugs.webkit.org/show_bug.cgi?id=110130
2553
2554         Reviewed by Pavel Feldman.
2555
2556         In Web Inspector canvas profiler use timeline's didBeginFrame for marking frame end calls instead of an ad-hoc timeout-based solution.
2557
2558         * inspector/InjectedScriptCanvasModule.cpp:
2559         (WebCore::InjectedScriptCanvasModule::markFrameEnd):
2560         (WebCore):
2561         * inspector/InjectedScriptCanvasModule.h:
2562         (InjectedScriptCanvasModule):
2563         * inspector/InjectedScriptCanvasModuleSource.js:
2564         (.):
2565         * inspector/InspectorCanvasAgent.cpp:
2566         (WebCore::InspectorCanvasAgent::hasUninstrumentedCanvases):
2567         (WebCore::InspectorCanvasAgent::notifyRenderingContextWasWrapped):
2568         (WebCore::InspectorCanvasAgent::findFramesWithUninstrumentedCanvases):
2569         (WebCore::InspectorCanvasAgent::frameNavigated):
2570         (WebCore::InspectorCanvasAgent::didBeginFrame):
2571         (WebCore):
2572         * inspector/InspectorCanvasAgent.h:
2573         (InspectorCanvasAgent):
2574         * inspector/InspectorController.cpp:
2575         (WebCore::InspectorController::didBeginFrame):
2576
2577 2013-02-19  Vsevolod Vlasov  <vsevik@chromium.org>
2578
2579         Web Inspector: Decouple various file system project implementation parts for better testability and cover with tests.
2580         https://bugs.webkit.org/show_bug.cgi?id=110204
2581
2582         Reviewed by Pavel Feldman.
2583
2584         Extracted FileSystemWorkspaceProvider from IsolatedFileSystemManager to take care of managing workspace projects and projectDelegates.
2585         Replaced FileMapping.urlForURI with urlForPath method that does not need any information about workspace structure anymore.
2586
2587         Test: inspector/file-system-project.html
2588
2589         * inspector/front-end/FileMapping.js:
2590         (WebInspector.FileMapping.prototype.urlForPath):
2591         * inspector/front-end/FileSystemProjectDelegate.js:
2592         (WebInspector.FileSystemProjectDelegate):
2593         (WebInspector.FileSystemProjectDelegate.prototype.populate.filesLoaded):
2594         (WebInspector.FileSystemProjectDelegate.prototype.populate):
2595         (WebInspector.FileSystemWorkspaceProvider):
2596         (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemAdded):
2597         (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemRemoved):
2598         * inspector/front-end/IsolatedFileSystem.js:
2599         (WebInspector.IsolatedFileSystem):
2600         (WebInspector.IsolatedFileSystem.prototype.name):
2601         (WebInspector.IsolatedFileSystem.prototype.rootURL):
2602         * inspector/front-end/IsolatedFileSystemManager.js:
2603         (WebInspector.IsolatedFileSystemManager):
2604         (WebInspector.IsolatedFileSystemManager.prototype._innerAddFileSystem):
2605         (WebInspector.IsolatedFileSystemManager.prototype._fileSystemRemoved):
2606         (WebInspector.IsolatedFileSystemManager.prototype._isolatedFileSystem):
2607         (WebInspector.IsolatedFileSystemManager.prototype.requestDOMFileSystem):
2608         * inspector/front-end/inspector.js:
2609
2610 2013-02-19  Andrey Adaikin  <aandrey@chromium.org>
2611
2612         Web Inspector: [Canvas] do not replace replay image with spinner icon
2613         https://bugs.webkit.org/show_bug.cgi?id=110213
2614
2615         Reviewed by Pavel Feldman.
2616
2617         Otherwise it's visually hard to see changes in the replay image. Instead show a small spinner icon in the bottom right corner.
2618
2619         * inspector/front-end/CanvasProfileView.js:
2620         (WebInspector.CanvasProfileView):
2621         (WebInspector.CanvasProfileView.prototype._enableWaitIcon):
2622         * inspector/front-end/canvasProfiler.css:
2623         (#canvas-replay-image-container):
2624         (.canvas-debug-info):
2625         (.canvas-spinner-icon):
2626
2627 2013-02-19  Andrey Adaikin  <aandrey@chromium.org>
2628
2629         Web Inspector: [Canvas] UI: tweak replay control buttons behavior
2630         https://bugs.webkit.org/show_bug.cgi?id=110207
2631
2632         Reviewed by Pavel Feldman.
2633
2634         New behavior for control buttons in the Canvas profiler.
2635         - The NextCall button (~StepInto) on a node group should expand it and move into its first child (instead of expanding and moving into the next node group)
2636         - The NextDrawCall button (~StepOver) should move to a next node that has children (instead of just iterating call group nodes, ignoring frame nodes).
2637         - The ReplayLast button should select the last expanded node (instead of always selecting last frame group node).
2638
2639         * inspector/front-end/CanvasProfileView.js:
2640         (WebInspector.CanvasProfileView.prototype._onReplayStepClick):
2641         (WebInspector.CanvasProfileView.prototype._onReplayDrawingCallClick):
2642         (WebInspector.CanvasProfileView.prototype._onReplayLastStepClick):
2643
2644 2013-02-19  Andrei Bucur  <abucur@adobe.com>
2645
2646         [CSS Regions] Assertion in RenderFlowThread::removeRenderBoxRegionInfo
2647         https://bugs.webkit.org/show_bug.cgi?id=109914
2648
2649         Reviewed by David Hyatt.
2650
2651         This patch moves a part of the invalidation operations inside the RenderFlowThread::invalidateRegions call. The maps
2652         are cleared anyway at layout time but doing this earlier makes sure the flow thread is in a more consistent state
2653         (the RenderFlowThread object has both the region chain invalidated and the regions information cleared).
2654
2655         RenderFlowThread::removeRenderBoxRegionInfo will check if the region chain is invalidated. If true, it means the
2656         flow thread has a layout scheduled and the regions information is not yet reliable. In this case we just return from the
2657         function and wait for the layout to cleanup the box information.
2658
2659         Test: fast/regions/remove-box-info-assert.html
2660
2661         * rendering/RenderFlowThread.cpp:
2662         (WebCore::RenderFlowThread::removeRegionFromThread):
2663         (WebCore::RenderFlowThread::invalidateRegions):
2664         (WebCore):
2665         (WebCore::RenderFlowThread::layout):
2666         (WebCore::RenderFlowThread::removeRenderBoxRegionInfo):
2667         * rendering/RenderFlowThread.h:
2668         * rendering/RenderNamedFlowThread.cpp:
2669         (WebCore::RenderNamedFlowThread::removeRegionFromThread):
2670
2671 2013-02-19  Alberto Garcia  <agarcia@igalia.com>
2672
2673         Fix build broekn by r142988.
2674         https://bugs.webkit.org/show_bug.cgi?id=109530
2675
2676         Unreviewed. Build fix.
2677
2678         Properly add shortMonthFormat() to the LocaleNone class.
2679
2680         * platform/text/LocaleNone.cpp:
2681         (LocaleNone):
2682         (WebCore::LocaleNone::shortMonthFormat):
2683
2684 2013-02-19  Anton Vayvod  <avayvod@chromium.org>
2685
2686         [Text Autosizing] Combine narrow descendants of a cluster into groups that should be autosized with the same multiplier.
2687         https://bugs.webkit.org/show_bug.cgi?id=109825
2688
2689         Enhancement of the approach introduced in https://bugs.webkit.org/show_bug.cgi?id=109573.
2690         Instead of using the same text size multiplier for all narrow descendants of any autosizing
2691         cluster, group the descendants by how much narrower they are than the cluster's
2692         |blockContainingAllText| and process each group separately with a different multiplier for
2693         each one.
2694         For example, we want nested comments on the page to be autosized as a group but separately
2695         from a sidebar on the same page.
2696
2697         Reviewed by Kenneth Rohde Christiansen.
2698
2699         Updated the existing test to verify the patch.
2700
2701         * rendering/TextAutosizer.cpp:
2702         (WebCore::TextAutosizer::processClusterInternal):
2703
2704             Splits the narrow descendants of the autosizing cluster into groups before processing
2705             each group individually.
2706
2707         (WebCore::TextAutosizer::getNarrowDescendantsGroupedByWidth):
2708
2709             Sorts the narrow descendants of the given cluster into groups, combining them by the
2710             difference between their content widths. If sorted by width, two consecutive nodes
2711             belong to the same group if their width difference is no greater than 100 CSS units.
2712
2713         * rendering/TextAutosizer.h:
2714
2715             New method definitions.
2716
2717 2013-02-18  Ilya Tikhonovsky  <loislo@chromium.org>
2718
2719         Web Inspector: Native Memory Instrumentation: show user provided name property of the heap snapshot node.
2720         https://bugs.webkit.org/show_bug.cgi?id=110124
2721
2722         Reviewed by Yury Semikhatsky.
2723
2724         Publish userProvidedName into grid node.
2725
2726         * inspector/front-end/HeapSnapshotGridNodes.js:
2727         (WebInspector.HeapSnapshotGenericObjectNode):
2728         (WebInspector.HeapSnapshotGenericObjectNode.prototype._createObjectCell):
2729         (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
2730         * inspector/front-end/HeapSnapshotProxy.js:
2731         (WebInspector.HeapSnapshotWorker):
2732         * inspector/front-end/NativeHeapSnapshot.js:
2733         (WebInspector.NativeHeapSnapshotNode.prototype.serialize):
2734
2735 2013-02-19  Arpita Bahuguna  <a.bah@samsung.com>
2736
2737         Caret is not displayed when trying to focus inside a contenteditable element containing an empty block.
2738         https://bugs.webkit.org/show_bug.cgi?id=108053
2739
2740         Reviewed by Ryosuke Niwa.
2741
2742         Test: editing/selection/caret-in-div-containing-empty-block.html
2743
2744         * rendering/RenderBox.cpp:
2745         (WebCore::RenderBox::localCaretRect):
2746         When trying to compute the caret rect for the contenteditable div, the
2747         border and the padding were not considered. Because of this, for the
2748         given test case, which had a border defined on the containing div, the
2749         caret was being painted just atop the border, thereby masking it.
2750
2751         Have modified the code to ensure that the computed caret rect takes
2752         into account the border and padding (if any) specified on the box, but only
2753         if the node doesn't have content that shall be skipped for editing.
2754
2755         We do not add border and padding while computing the caret rect for any
2756         element that either has no content or has content that shall be skipped
2757         for editing purposes. This holds true for table elements as well.
2758
2759         This helps avoid the caret displacement previsouly observed before/after
2760         any controls placed within the contenteditable box, when considering
2761         border and padding in computation of the caret rect.
2762
2763 2013-02-19  Mihnea Ovidenie  <mihnea@adobe.com>
2764
2765         CSSRegions: crash positioned object with inline containing block in flow thread
2766         https://bugs.webkit.org/show_bug.cgi?id=108307
2767
2768         Reviewed by David Hyatt.
2769
2770         The fix for https://bugs.webkit.org/show_bug.cgi?id=69896 allowed positioned blocks work
2771         with variable width regions. However, the information needed for that is available only
2772         when the container used for positioning is a block.
2773
2774         This patch ensures we are using this solution only when the container used for positioning
2775         is a block. This needs to be revisited when we will extend support for other types of boxes
2776         as mentioned in RenderBox::renderBoxRegionInfo.
2777
2778         Test: fast/regions/positioned-object-inline-cb-crash.html
2779
2780         * rendering/RenderBox.cpp:
2781         (WebCore::RenderBox::renderBoxRegionInfo):
2782         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
2783         (WebCore::RenderBox::computePositionedLogicalWidth): Make sure we are using containerBlocks
2784         that are blocks. Add an assert that the type of containerBlock we are using can have
2785         computed RenderBoxRegionInfo.
2786         (WebCore::RenderBox::computePositionedLogicalHeight):
2787         * rendering/RenderBoxModelObject.h:
2788         (WebCore::RenderBoxModelObject::canHaveBoxInfoInRegion): This helper method
2789         will return the boxes that may have computed RenderBoxRegionInfo. Currently,
2790         returns true for blocks only.
2791
2792 2013-02-19  Ryosuke Niwa  <rniwa@webkit.org>
2793
2794         Yet anther JSC build fix after r143304.
2795
2796         * bindings/js/JSDOMBinding.h:
2797         (WebCore::argumentOrNull):
2798
2799 2013-02-19  Kentaro Hara  <haraken@chromium.org>
2800
2801         Unreviewed build fix. Fixed warning caused by r143305.
2802
2803         * bindings/scripts/CodeGeneratorJS.pm:
2804         (GenerateParametersCheck):
2805         * bindings/scripts/CodeGeneratorV8.pm:
2806         (GenerateParametersCheck):
2807
2808 2013-02-19  Kentaro Hara  <haraken@chromium.org>
2809
2810         Unreviewed build fix after r143304.
2811
2812         * bindings/js/JSDOMBinding.h:
2813         (WebCore::argumentOrNull):
2814
2815 2013-02-19  Kentaro Hara  <haraken@chromium.org>
2816
2817         [V8] Remove redundant usage of MAYBE_MISSING_PARAMETER() macro
2818         https://bugs.webkit.org/show_bug.cgi?id=109899
2819
2820         Reviewed by Adam Barth.
2821
2822         Currently:
2823
2824         - MAYBE_MISSING_PARAMETER(args, index, DefaultIsUndefined) returns args[index].
2825         - MAYBE_MISSING_PARAMETER(args, index, DefaultIsNullString) returns Local<Value>()
2826         if args[index] is missing (i.e. the length of |args| is less than |index|).
2827         It returns args[index] otherwise.
2828
2829         No one other than CodeGeneratorV8.pm uses
2830         MAYBE_MISSING_PARAMETER(args, index, DefaultIsUndefined). Instead, we simply use
2831         args[index]. We should remove the redundant usage from CodeGeneratorV8.pm too.
2832         The long-name macro has been making generated code less readable.
2833
2834         In addition, we can rename MAYBE_MISSING_PARAMETER() to argumentOrNull().
2835
2836         No tests. No change in behavior.
2837
2838         * bindings/scripts/CodeGeneratorV8.pm:
2839         (GenerateParametersCheck):
2840         * bindings/scripts/test/V8/V8Float64Array.cpp:
2841         (WebCore::Float64ArrayV8Internal::fooCallback):
2842         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
2843         (WebCore::TestActiveDOMObjectV8Internal::excitingFunctionCallback):
2844         (WebCore::TestActiveDOMObjectV8Internal::postMessageCallback):
2845         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
2846         (WebCore::TestCustomNamedGetterV8Internal::anotherFunctionCallback):
2847         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
2848         (WebCore::TestEventTargetV8Internal::itemCallback):
2849         (WebCore::TestEventTargetV8Internal::dispatchEventCallback):
2850         * bindings/scripts/test/V8/V8TestInterface.cpp:
2851         (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):
2852         (WebCore::V8TestInterface::constructorCallback):
2853         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
2854         (WebCore::TestMediaQueryListListenerV8Internal::methodCallback):
2855         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
2856         (WebCore::V8TestNamedConstructorConstructorCallback):
2857         * bindings/scripts/test/V8/V8TestObj.cpp:
2858         (WebCore::TestObjV8Internal::voidMethodWithArgsCallback):
2859         (WebCore::TestObjV8Internal::longMethodWithArgsCallback):
2860         (WebCore::TestObjV8Internal::objMethodWithArgsCallback):
2861         (WebCore::TestObjV8Internal::methodWithSequenceArgCallback):
2862         (WebCore::TestObjV8Internal::methodReturningSequenceCallback):
2863         (WebCore::TestObjV8Internal::methodThatRequiresAllArgsAndThrowsCallback):
2864         (WebCore::TestObjV8Internal::optionsObjectCallback):
2865         (WebCore::TestObjV8Internal::methodWithOptionalArgCallback):
2866         (WebCore::TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgCallback):
2867         (WebCore::TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsCallback):
2868         (WebCore::TestObjV8Internal::methodWithOptionalStringCallback):
2869         (WebCore::TestObjV8Internal::methodWithOptionalStringIsUndefinedCallback):
2870         (WebCore::TestObjV8Internal::methodWithOptionalStringIsNullStringCallback):
2871         (WebCore::TestObjV8Internal::methodWithNonCallbackArgAndCallbackArgCallback):
2872         (WebCore::TestObjV8Internal::overloadedMethod1Callback):
2873         (WebCore::TestObjV8Internal::overloadedMethod2Callback):
2874         (WebCore::TestObjV8Internal::overloadedMethod3Callback):
2875         (WebCore::TestObjV8Internal::overloadedMethod4Callback):
2876         (WebCore::TestObjV8Internal::overloadedMethod6Callback):
2877         (WebCore::TestObjV8Internal::overloadedMethod7Callback):
2878         (WebCore::TestObjV8Internal::overloadedMethod8Callback):
2879         (WebCore::TestObjV8Internal::overloadedMethod9Callback):
2880         (WebCore::TestObjV8Internal::overloadedMethod10Callback):
2881         (WebCore::TestObjV8Internal::overloadedMethod11Callback):
2882         (WebCore::TestObjV8Internal::classMethodWithOptionalCallback):
2883         (WebCore::TestObjV8Internal::overloadedMethod12Callback):
2884         (WebCore::TestObjV8Internal::enabledAtRuntimeMethod1Callback):
2885         (WebCore::TestObjV8Internal::enabledAtRuntimeMethod2Callback):
2886         (WebCore::TestObjV8Internal::enabledPerContextMethod1Callback):
2887         (WebCore::TestObjV8Internal::enabledPerContextMethod2Callback):
2888         (WebCore::TestObjV8Internal::stringArrayFunctionCallback):
2889         (WebCore::TestObjV8Internal::domStringListFunctionCallback):
2890         (WebCore::TestObjV8Internal::convert1Callback):
2891         (WebCore::TestObjV8Internal::convert2Callback):
2892         (WebCore::TestObjV8Internal::convert4Callback):
2893         (WebCore::TestObjV8Internal::convert5Callback):
2894         (WebCore::TestObjV8Internal::strictFunctionCallback):
2895         (WebCore::TestObjV8Internal::variadicStringMethodCallback):
2896         (WebCore::TestObjV8Internal::variadicDoubleMethodCallback):
2897         (WebCore::TestObjV8Internal::variadicNodeMethodCallback):
2898         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
2899         (WebCore::V8TestOverloadedConstructors::constructor1Callback):
2900         (WebCore::V8TestOverloadedConstructors::constructor2Callback):
2901         (WebCore::V8TestOverloadedConstructors::constructor3Callback):
2902         (WebCore::V8TestOverloadedConstructors::constructor4Callback):
2903         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2904         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
2905         * bindings/scripts/test/V8/V8TestTypedefs.cpp:
2906         (WebCore::TestTypedefsV8Internal::funcCallback):
2907         (WebCore::TestTypedefsV8Internal::setShadowCallback):
2908         (WebCore::TestTypedefsV8Internal::methodWithSequenceArgCallback):
2909         (WebCore::TestTypedefsV8Internal::nullableArrayArgCallback):
2910         (WebCore::TestTypedefsV8Internal::stringArrayFunctionCallback):
2911         (WebCore::TestTypedefsV8Internal::stringArrayFunction2Callback):
2912         (WebCore::V8TestTypedefs::constructorCallback):
2913         * bindings/v8/V8BindingMacros.h:
2914         (WebCore):
2915         * bindings/v8/custom/V8HistoryCustom.cpp:
2916         (WebCore::V8History::pushStateCallbackCustom):
2917         (WebCore::V8History::replaceStateCallbackCustom):
2918
2919 2013-02-19  Kentaro Hara  <haraken@chromium.org>
2920
2921         [JSC] MAYBE_MISSING_PARAMETER(..., DefaultIsNullString) macro is redundant
2922         https://bugs.webkit.org/show_bug.cgi?id=109902
2923
2924         Reviewed by Adam Barth.
2925
2926         Currently:
2927
2928         - MAYBE_MISSING_PARAMETER(exec, index, DefaultIsUndefined)
2929           returns exec->argument(index).
2930         - MAYBE_MISSING_PARAMETER(exec, index, DefaultIsNullString)
2931           returns JSValue() if exec->argument(index) is missing
2932           (i.e. the length of the argument is less than index).
2933           It returns exec->argument(index) otherwise.
2934
2935         No one other than CodeGeneratorJS.pm uses
2936         MAYBE_MISSING_PARAMETER(exec, index, DefaultIsUndefined).
2937         Instead, we simply use exec->argument(index). We should remove
2938         the redundant usage in CodeGeneratorJS.pm too. The long-name macro
2939         has been making generated code less readable.
2940
2941         In addition, we can rename MAYBE_MISSING_PARAMETER() to argumentOrNull().
2942
2943         c.f. corresponding V8 bug: https://bugs.webkit.org/show_bug.cgi?id=109899
2944
2945         No tests. No change in behavior.
2946
2947         * bindings/js/JSDOMBinding.h:
2948         (WebCore):
2949         * bindings/scripts/CodeGeneratorJS.pm:
2950         (GenerateParametersCheck):
2951         * bindings/scripts/test/JS/JSFloat64Array.cpp:
2952         (WebCore::jsFloat64ArrayPrototypeFunctionFoo):
2953         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2954         (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
2955         (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
2956         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2957         (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
2958         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2959         (WebCore::jsTestEventTargetPrototypeFunctionItem):
2960         (WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
2961         * bindings/scripts/test/JS/JSTestInterface.cpp:
2962         (WebCore::JSTestInterfaceConstructor::constructJSTestInterface):
2963         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
2964         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2965         (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
2966         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2967         (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
2968         * bindings/scripts/test/JS/JSTestObj.cpp:
2969         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
2970         (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
2971         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
2972         (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
2973         (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
2974         (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
2975         (WebCore::jsTestObjPrototypeFunctionSerializedValue):
2976         (WebCore::jsTestObjPrototypeFunctionOptionsObject):
2977         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
2978         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
2979         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
2980         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString):
2981         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined):
2982         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString):
2983         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
2984         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
2985         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
2986         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
2987         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
2988         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
2989         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
2990         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
2991         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9):
2992         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
2993         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11):
2994         (WebCore::jsTestObjConstructorFunctionClassMethodWithOptional):
2995         (WebCore::jsTestObjConstructorFunctionOverloadedMethod11):
2996         (WebCore::jsTestObjConstructorFunctionOverloadedMethod12):
2997         (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
2998         (WebCore::jsTestObjPrototypeFunctionStringArrayFunction):
2999         (WebCore::jsTestObjPrototypeFunctionDomStringListFunction):
3000         (WebCore::jsTestObjPrototypeFunctionConvert1):
3001         (WebCore::jsTestObjPrototypeFunctionConvert2):
3002         (WebCore::jsTestObjPrototypeFunctionConvert4):
3003         (WebCore::jsTestObjPrototypeFunctionConvert5):
3004         (WebCore::jsTestObjPrototypeFunctionStrictFunction):
3005         (WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
3006         (WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod):
3007         (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
3008         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3009         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors1):
3010         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors2):
3011         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors3):
3012         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors4):
3013         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3014         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface):
3015         (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionAcceptTransferList):
3016         (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionMultiTransferList):
3017         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3018         (WebCore::JSTestTypedefsConstructor::constructJSTestTypedefs):
3019         (WebCore::jsTestTypedefsPrototypeFunctionFunc):
3020         (WebCore::jsTestTypedefsPrototypeFunctionMultiTransferList):
3021         (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
3022         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
3023         (WebCore::jsTestTypedefsPrototypeFunctionNullableArrayArg):
3024         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction):
3025         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction2):
3026
3027 2013-02-18  Hayato Ito  <hayato@chromium.org>
3028
3029         Make EventDispatcher take an Event object in its constructor.
3030         https://bugs.webkit.org/show_bug.cgi?id=109898
3031
3032         Reviewed by Dimitri Glazkov.
3033
3034         Re-landing r143145, which caused a crash when deltaX and deltaY of a PlatformWheelEvent are both zero.
3035
3036         Fixed a crash by early exiting in EventDispatcher::dispatchEvent(Node*, PassRefPtr<EventDispatcher*>)
3037         if mediator's event() returns null.
3038
3039         Also Added a layout test to catch this kind of crash in the future.
3040
3041         Test: fast/events/platform-wheelevent-with-delta-zero-crash.html
3042
3043         * dom/EventDispatchMediator.cpp:
3044         (WebCore::EventDispatchMediator::dispatchEvent):
3045         * dom/EventDispatcher.cpp:
3046         (WebCore::EventDispatcher::dispatchEvent):
3047         (WebCore::EventDispatcher::EventDispatcher):
3048         (WebCore::EventDispatcher::ensureEventPath):
3049         (WebCore::EventDispatcher::dispatchSimulatedClick):
3050         (WebCore::EventDispatcher::dispatch):
3051         (WebCore::EventDispatcher::dispatchEventPreProcess):
3052         (WebCore::EventDispatcher::dispatchEventAtCapturing):
3053         (WebCore::EventDispatcher::dispatchEventAtTarget):
3054         (WebCore::EventDispatcher::dispatchEventAtBubbling):
3055         (WebCore::EventDispatcher::dispatchEventPostProcess):
3056         * dom/EventDispatcher.h:
3057         (EventDispatcher):
3058         (WebCore::EventDispatcher::node):
3059         (WebCore::EventDispatcher::event):
3060         * dom/FocusEvent.cpp:
3061         (WebCore::FocusEventDispatchMediator::dispatchEvent):
3062         (WebCore::BlurEventDispatchMediator::dispatchEvent):
3063         (WebCore::FocusInEventDispatchMediator::dispatchEvent):
3064         (WebCore::FocusOutEventDispatchMediator::dispatchEvent):
3065         * dom/GestureEvent.cpp:
3066         (WebCore::GestureEventDispatchMediator::dispatchEvent):
3067         * dom/MouseEvent.cpp:
3068         (WebCore::MouseEventDispatchMediator::dispatchEvent):
3069         * dom/WheelEvent.cpp:
3070         (WebCore::WheelEventDispatchMediator::dispatchEvent):
3071         Assert event() rather than an early exit since this code path should be hit only when event() is non-null.
3072
3073 2013-02-18  Takashi Sakamoto  <tasak@google.com>
3074
3075         :before/:after pseudo elements do not always apply to the proper element
3076         https://bugs.webkit.org/show_bug.cgi?id=93925
3077
3078         Reviewed by Dimitri Glazkov.
3079
3080         Disable sharing a style with siblings if :after or :before pseudo style
3081         is unique.
3082
3083         Test: fast/css/before-after-pseudo-class.html
3084
3085         * css/StyleResolver.cpp:
3086         (WebCore::StyleResolver::canShareStyleWithElement):
3087         Added a new condition, hasUniquePseudoStyle.
3088         * rendering/style/RenderStyle.cpp:
3089         (WebCore::RenderStyle::hasUniquePseudoStyle):
3090         Added to check whether any pseudo style has unique bit or not.
3091         (WebCore):
3092         * rendering/style/RenderStyle.h:
3093
3094 2013-02-18  Andy Estes  <aestes@apple.com>
3095
3096         Focusing a new frame (via window.focus()) should blur the active element in the current frame
3097         https://bugs.webkit.org/show_bug.cgi?id=110172
3098
3099         Reviewed by Ryosuke Niwa.
3100
3101         When a change in the focused node crosses a frame boundary, WebKit
3102         doesn't always succeed in blurring the old focused node before focusing
3103         the new one.
3104
3105         Each document remembers its focused node, and a Page-scoped
3106         FocusController remembers the focused frame. If a new focused node is
3107         in a different frame than the focused frame, FocusController tells the
3108         old frame's document to clear its focused node before focusing the new
3109         one (and remembering the new frame).
3110
3111         Unfortunately, web content can confuse FocusController by calling
3112         window.focus() at the wrong time. Since window.focus() changes
3113         FocusController's focused frame without focusing a new node,
3114         FocusController won't think that a frame boundary is being crossed if a
3115         node in this frame is later focused. Therefore it won't clear the old
3116         frame's focused node (it won't even know which frame contained the old
3117         focused node), causing at least two bugs:
3118
3119         1) The node in the old frame will not receive a blur event.
3120         2) Calling document.activeElement on the main frame will return the
3121            previously focused node, but the HTML5 spec says it should return
3122            the frame owner element if a subframe has focus.
3123
3124         Fix both of these bugs by explicitly clearing the current frame's
3125         focused node if window.focus() changes the focused frame. This fix
3126         carries some compatibility risk by changing a long-standing behavior
3127         of the engine (we've had this bug since the beginning of the project,
3128         AFAICT). On the upside, it matches the behavior of both Firefox and IE,
3129         matches what HTML5 says about subframe focus, and fixes at least one
3130         well-known enterprise web app.
3131
3132         Tests: fast/dom/HTMLDocument/active-element-frames.html
3133                fast/frames/frame-focus-blurs-active-element.html
3134
3135         * page/DOMWindow.cpp:
3136         (WebCore::DOMWindow::focus): If the frame being focused is not the same
3137         as the currently focused frame, clear the currently focused frame's
3138         focused node.
3139
3140 2013-02-18  Simon Fraser  <simon.fraser@apple.com>
3141
3142         Clean up the boolean argument to visibleContentRect
3143         https://bugs.webkit.org/show_bug.cgi?id=110167
3144
3145         Reviewed by Simon Fraser.
3146
3147         Replace the boolean argument to visibleContentRect() with
3148         an enum.
3149
3150         No behavior change.
3151
3152         * WebCore.exp.in:
3153         * dom/Document.cpp:
3154         (WebCore::Document::viewportSize):
3155         * inspector/InspectorOverlay.cpp:
3156         (WebCore::InspectorOverlay::update):
3157         * page/DOMWindow.cpp:
3158         (WebCore::DOMWindow::innerHeight):
3159         (WebCore::DOMWindow::innerWidth):
3160         * page/FrameView.cpp:
3161         (WebCore::FrameView::calculateScrollbarModesForLayout):
3162         (WebCore::FrameView::layout):
3163         (WebCore::FrameView::performPostLayoutTasks):
3164         (WebCore::FrameView::windowClipRect):
3165         * page/SpatialNavigation.cpp:
3166         (WebCore::canScrollInDirection):
3167         * platform/ScrollView.cpp:
3168         (WebCore::ScrollView::unscaledVisibleContentSize):
3169         (WebCore::ScrollView::visibleContentRect):
3170         (WebCore::ScrollView::layoutSize):
3171         (WebCore::ScrollView::updateScrollbars):
3172         (WebCore::ScrollView::paint):
3173         * platform/ScrollView.h:
3174         * platform/ScrollableArea.cpp:
3175         (WebCore::ScrollableArea::visibleContentRect):
3176         * platform/ScrollableArea.h:
3177         * rendering/RenderDialog.cpp:
3178         (WebCore::RenderDialog::layout):
3179         * rendering/RenderLayer.cpp:
3180         (WebCore::RenderLayer::maximumScrollPosition):
3181         (WebCore::RenderLayer::visibleContentRect):
3182         * rendering/RenderLayer.h:
3183         * rendering/RenderLayerCompositor.cpp:
3184         (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
3185         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
3186
3187 2013-02-18  Ryosuke Niwa  <rniwa@webkit.org>
3188
3189         That didn't work either. Just make it public. This is why I hate nested classes. They just don't work.
3190
3191         * rendering/RenderBlock.h:
3192         (RenderBlock):
3193
3194 2013-02-18  Ryosuke Niwa  <rniwa@webkit.org>
3195
3196         Windows build fix. Apparently Visual Studio still has a lot of bugs with respect to nested classes.
3197         Work around it by directly instantiating the class inside createFloatingObjects.
3198
3199         * rendering/RenderBlock.cpp:
3200         (WebCore::RenderBlock::createFloatingObjects): Directly instantiate FloatingObjects.
3201         * rendering/RenderBlock.h:
3202         (RenderBlock): Moved the declaration of createFloatingObjects up.
3203         (FloatingObjects::FloatingObjects):
3204
3205 2013-02-18  Ryosuke Niwa  <rniwa@webkit.org>
3206
3207         Merge handleSpecialChild into layoutBlockChildren
3208         https://bugs.webkit.org/show_bug.cgi?id=110165
3209
3210         Reviewed by Darin Adler.
3211
3212         Merge handleSpecialChild, handlePositionedChild, and handleFloatingChild into layoutBlockChildren
3213         to make the semantics of the code clear and to get rid of the outdated comment about how there are
3214         four types of four types of special children.
3215
3216         * rendering/RenderBlock.cpp:
3217         (WebCore::RenderBlock::layoutBlockChildren):
3218         * rendering/RenderBlock.h:
3219         (RenderBlock):
3220
3221 2013-02-18  Ryosuke Niwa  <rniwa@webkit.org>
3222
3223         Encapsulate FloatingObject's constructor inside create
3224         https://bugs.webkit.org/show_bug.cgi?id=110169
3225
3226         Reviewed by Darin Adler.
3227
3228         Added FloatingObject::create and made FloatingObject's constructor private.
3229         Also added RenderBlock::ensureFloatingObjects to help lazily creating FloatingObjects.
3230
3231         * rendering/RenderBlock.cpp:
3232         (WebCore::RenderBlock::insertFloatingObject):
3233         (WebCore::RenderBlock::addOverhangingFloats):
3234         (WebCore::RenderBlock::addIntrudingFloats):
3235         (WebCore::RenderBlock::ensureFloatingObjects):
3236         (WebCore::RenderBlock::FloatingObjects::create):
3237         (WebCore::RenderBlock::FloatingObjects::FloatingObjects):
3238         * rendering/RenderBlock.h:
3239         (FloatingObjects):
3240         (RenderBlock):
3241
3242 2013-02-18  Anders Carlsson  <andersca@apple.com>
3243
3244         Add a DefaultHash for RefPtr<SecurityOrigin>
3245         https://bugs.webkit.org/show_bug.cgi?id=110170
3246
3247         Reviewed by Andreas Kling.
3248
3249         Remove all explicit uses of SecurityOriginHash.
3250
3251         * Modules/webdatabase/DatabaseTracker.h:
3252         * Modules/webdatabase/OriginQuotaManager.h:
3253         * loader/appcache/ApplicationCacheStorage.cpp:
3254         (WebCore::ApplicationCacheStorage::getOriginsWithCache):
3255         * loader/cache/MemoryCache.h:
3256         * page/SecurityOriginHash.h:
3257         * storage/StorageNamespaceImpl.h:
3258         (StorageNamespaceImpl):
3259
3260 2013-02-18  David Hyatt  <hyatt@apple.com>
3261
3262         Padding and border changes don't trigger the relayout of children in some cases.
3263         https://bugs.webkit.org/show_bug.cgi?id=109639.
3264
3265         Reviewed by Ryosuke Niwa.
3266
3267         The fix for this bug was way too general and involved putting code into RenderBox. Since
3268         RenderBox makes no assumptions about what kind of layout system might derive from it, it
3269         was incorrect to just mark all children as needing layout whenever borders and padding
3270         changed widths.
3271         
3272         This patch takes the two cases handled by the original code and makes them more
3273         specialized down in subclasses, i.e., RenderBlock and RenderTableRow. RenderBlock has
3274         been refined to only check if children aren't inline and to also not invalidate
3275         floats or irrelevant positioned objects that might not even have this block as their
3276         containing block.
3277         
3278         The RenderTableRow code is specialized to only care about collapsing borders and
3279         to only check borders rather than padding. It also requires that a child be a cell
3280         in order to do the invalidation.
3281
3282         Covered by existing tests, since this is just specializing the code to more precisely
3283         cover the test cases that have already been written.
3284
3285         Longer term, it should be layout code that figures this stuff out rather than style
3286         change code, but that involves more dramatic changes that can wait.
3287
3288         Test: fast/block/positioning/border-change-relayout-test.html
3289
3290         * rendering/RenderBlock.cpp:
3291         (WebCore::borderOrPaddingLogicalWidthChanged):
3292         (WebCore):
3293         (WebCore::RenderBlock::styleDidChange):
3294         * rendering/RenderBox.cpp:
3295         (WebCore):
3296         (WebCore::RenderBox::styleDidChange):
3297         * rendering/RenderTableRow.cpp:
3298         (WebCore::borderLogicalWidthChanged):
3299         (WebCore):
3300         (WebCore::RenderTableRow::styleDidChange):
3301
3302 2013-02-18  Mark Lam  <mark.lam@apple.com>
3303
3304         Small follow up to r143271: Fix SQLTransaction leak.
3305         https://bugs.webkit.org/show_bug.cgi?id=110052.
3306
3307         Reviewed by Geoffrey Garen.
3308
3309         Applied Geoff's suggestion nullify m_frontend sooner for greater
3310         code clarity. Also added some comments about m_frontend.
3311
3312         No new tests.
3313
3314         * Modules/webdatabase/SQLTransactionBackend.cpp:
3315         (WebCore::SQLTransactionBackend::doCleanup):
3316         * Modules/webdatabase/SQLTransactionBackend.h:
3317         (SQLTransactionBackend):
3318
3319 2013-02-18  Geoffrey Garen  <ggaren@apple.com>
3320
3321         Shrank the SourceProvider cache
3322         https://bugs.webkit.org/show_bug.cgi?id=110158
3323
3324         Reviewed by Oliver Hunt.
3325
3326         Test: fast/js/regress/nested-function-parsing.html
3327
3328         No need to keep statistics on cache size, since we're going to throw it
3329         away no matter what.
3330
3331         * WebCore.order:
3332         * bindings/js/CachedScriptSourceProvider.h:
3333         (CachedScriptSourceProvider):
3334         (WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider):
3335         * loader/cache/CachedScript.cpp:
3336         (WebCore::CachedScript::destroyDecodedData):
3337         (WebCore):
3338         (WebCore::CachedScript::reportMemoryUsage):
3339         * loader/cache/CachedScript.h:
3340         (CachedScript):
3341
3342 2013-02-18  peavo@outlook.com  <peavo@outlook.com>
3343
3344         [Curl] The function cookiesForDOM() does not behave correctly.
3345         https://bugs.webkit.org/show_bug.cgi?id=109923
3346
3347         Reviewed by Brent Fulgham.
3348
3349         The cookiesForDOM() function should return a list of matching cookies, both persistent and session cookies.
3350
3351         * platform/network/curl/CookieJarCurl.cpp:
3352         (WebCore::readCurlCookieToken): Added function to read next token from Curl cookie string.
3353         (WebCore::addMatchingCurlCookie): Added function to add matching cookies to cookie list.
3354         (WebCore::setCookiesFromDOM): Add domain and path from url to cookie if not already set.
3355         (WebCore::cookiesForDOM): Return a list of matching cookies, both session and persistent cookies.
3356
3357 2013-02-17  Mark Lam  <mark.lam@apple.com>
3358
3359         Fix SQLTransaction leak.
3360         https://bugs.webkit.org/show_bug.cgi?id=110052.
3361
3362         Reviewed by Geoffrey Garen.
3363
3364         With https://bugs.webkit.org/show_bug.cgi?id=104750, there is now a circular
3365         reference between SQLTransaction and its backend. The clean up process needs
3366         to be fixed to explicitly break this reference cycle.
3367
3368         The 5 phases of the SQLTransaction (and backend) phases and their clean up
3369         actions are:
3370
3371         Phase 1. After Birth, before scheduling
3372         - During shutdown, DatabaseThread::databaseThread() calls
3373           DatabaseBackendAsync::close(). DatabaseBackendAsync::close() iterates
3374           DatabaseBackendAsync::m_transactionQueue and calls
3375           SQLtransactionBackend::notifyDatabaseThreadIsShuttingDown() on each
3376           transaction there.
3377
3378         Phase 2. After scheduling, before state AcquireLock
3379         - ~DatabaseTask() calls SQLtransactionBackend's
3380           notifyDatabaseThreadIsShuttingDown().
3381
3382         Phase 3. After state AcquireLock, before "lockAcquired"
3383         - During shutdown, DatabaseThread::databaseThread() calls
3384           SQLTransactionCoordinator::shutdown(), which calls
3385           SQLTransactionBackend::notifyDatabaseThreadIsShuttingDown().
3386
3387         Phase 4: After "lockAcquired", before state CleanupAndTerminate
3388         - Same as Phase 3.
3389
3390         Phase 5: After state CleanupAndTerminate
3391         - state CleanupAndTerminate calls SQLTransactionBackend::doCleanup().
3392
3393         See comment at the top of SQLTransactionBackend.cpp for more details.
3394
3395         Other supporting changes:
3396         - Moved Database::close() to the DatabaseBackendAsync.
3397         - Moved the "if already cleaned up" check from SQLTransactionBackend's
3398           notifyDatabaseThreadIsShuttingDown() to doCleanup().
3399         - Added a check to prevent SQLTransactionCoordinator's releaseLock()
3400           from running when it's shutting down.
3401
3402         No new tests.
3403
3404         * Modules/webdatabase/Database.cpp:
3405         * Modules/webdatabase/Database.h:
3406         * Modules/webdatabase/DatabaseBackendAsync.cpp:
3407         (WebCore::DatabaseBackendAsync::close): Move from Database.cpp.
3408         * Modules/webdatabase/DatabaseBackendAsync.h:
3409         * Modules/webdatabase/DatabaseTask.cpp:
3410         (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::DatabaseTransactionTask):
3411         (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::~DatabaseTransactionTask):
3412         (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::doPerformTask):
3413         * Modules/webdatabase/DatabaseTask.h:
3414         (DatabaseBackendAsync::DatabaseTransactionTask):
3415         * Modules/webdatabase/DatabaseThread.cpp:
3416         (WebCore::DatabaseThread::databaseThread):
3417         * Modules/webdatabase/SQLTransactionBackend.cpp:
3418         (WebCore::SQLTransactionBackend::doCleanup):
3419         (WebCore::SQLTransactionBackend::notifyDatabaseThreadIsShuttingDown):
3420         (WebCore::SQLTransactionBackend::cleanupAndTerminate):
3421         * Modules/webdatabase/SQLTransactionCoordinator.cpp:
3422         (WebCore::SQLTransactionCoordinator::SQLTransactionCoordinator):
3423         (WebCore::SQLTransactionCoordinator::acquireLock):
3424         (WebCore::SQLTransactionCoordinator::releaseLock):
3425         (WebCore::SQLTransactionCoordinator::shutdown):
3426         * Modules/webdatabase/SQLTransactionCoordinator.h:
3427         (SQLTransactionCoordinator):
3428
3429 2013-02-18  David Kilzer  <ddkilzer@apple.com>
3430
3431         Fix WebCore Xcode project
3432
3433         * WebCore.xcodeproj/project.pbxproj: Fix path for CDMPrivate.h.
3434
3435 2013-02-18  Julien Chaffraix  <jchaffraix@webkit.org>
3436
3437         [CSS Grid Layout] Refactor grid position resolution code to support an internal grid representation
3438         https://bugs.webkit.org/show_bug.cgi?id=109718
3439
3440         Reviewed by Ojan Vafai.
3441
3442         In order to support auto placement (where we can't infer a grid item's position from its style),
3443         we need to have 2 code paths:
3444         - One that places the elements on the grid representation.
3445         - One that reuse the grid representation to return the position.
3446