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