3d6985846205f851c1dc8ec032edbb45afd468d8
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-04-29  Enrica Casucci  <enrica@apple.com>
2
3         iOS build fix after http://trac.webkit.org/changeset/167937.
4         Unreviewed.
5
6         * rendering/RenderThemeIOS.mm:
7         (WebCore::RenderThemeIOS::adjustButtonStyle):
8
9 2014-04-29  Hans Muller  <hmuller@adobe.com>
10
11         [CSS Shapes] off-by-one error in Shape::createRasterShape()
12         https://bugs.webkit.org/show_bug.cgi?id=132154
13
14         Reviewed by Bem Jones-Bey.
15
16         This is a port of a patch for a bug that was reported by and fixed in Blink by
17         David Vest: https://codereview.chromium.org/237123002/.  Shape::createRasterShape()
18         now consistently reports "end-point exclusive" intervals. Before the patch
19         an entire row of pixels was above the shape-image-threshold, the interval's end
20         index was reported as image.width. Now it's image.width + 1, which is consistent
21         with the way the end index is reported if the last above threshold pixel is within
22         an image row.
23
24         Two existing tests were revised to account for this change.
25
26         * rendering/shapes/RasterShape.cpp:
27         (WebCore::RasterShape::getExcludedIntervals):
28         * rendering/shapes/Shape.cpp:
29         (WebCore::Shape::createRasterShape):
30
31 2014-04-29  Bem Jones-Bey  <bjonesbe@adobe.com>
32
33         Wrap CSS length conversion arguments in an object
34         https://bugs.webkit.org/show_bug.cgi?id=131552
35
36         Reviewed by Andreas Kling.
37
38         This patch introduces a class CSSToLengthConversionData to wrap the
39         data required to convert CSS lengths to Lengths. This simplifies the
40         plumbing that goes on whenever we need to resolve CSS lengths and
41         makes it easier to update the arguments needed for resolving these (in
42         particular adding a RenderView for resolving viewport units at style
43         recalc time; removing the computingFontSize bool also appears
44         possible).
45
46         Note that the zoom argument, which was previously a float in some
47         places and a double in others is now a float.
48
49         This is a port of a Blink patch by timloh@chromium.org.
50
51         No new tests, no behavior change.
52
53         * CMakeLists.txt:
54         * WebCore.vcxproj/WebCore.vcxproj:
55         * WebCore.xcodeproj/project.pbxproj:
56         * css/BasicShapeFunctions.cpp:
57         (WebCore::convertToLength):
58         (WebCore::convertToLengthSize):
59         (WebCore::convertToCenterCoordinate):
60         (WebCore::cssValueToBasicShapeRadius):
61         (WebCore::basicShapeForValue):
62         * css/BasicShapeFunctions.h:
63         * css/CSSCalculationValue.cpp:
64         (WebCore::CSSCalcValue::computeLengthPx):
65         (WebCore::determineCategory):
66         * css/CSSCalculationValue.h:
67         (WebCore::CSSCalcValue::createCalculationValue):
68         * css/CSSGradientValue.cpp:
69         (WebCore::CSSGradientValue::addStops):
70         (WebCore::positionFromValue):
71         (WebCore::CSSGradientValue::computeEndPoint):
72         (WebCore::CSSLinearGradientValue::createGradient):
73         (WebCore::CSSRadialGradientValue::resolveRadius):
74         (WebCore::CSSRadialGradientValue::createGradient):
75         * css/CSSGradientValue.h:
76         * css/CSSPrimitiveValue.cpp:
77         (WebCore::CSSPrimitiveValue::computeLength):
78         (WebCore::CSSPrimitiveValue::computeLengthDouble):
79         * css/CSSPrimitiveValue.h:
80         * css/CSSPrimitiveValueMappings.h:
81         (WebCore::CSSPrimitiveValue::convertToLength):
82         * css/CSSToLengthConversionData.cpp: Added.
83         (WebCore::CSSToLengthConversionData::zoom):
84         * css/CSSToLengthConversionData.h: Added.
85         (WebCore::CSSToLengthConversionData::CSSToLengthConversionData):
86         (WebCore::CSSToLengthConversionData::style):
87         (WebCore::CSSToLengthConversionData::rootStyle):
88         (WebCore::CSSToLengthConversionData::computingFontSize):
89         (WebCore::CSSToLengthConversionData::copyWithAdjustedZoom):
90         * css/CSSToStyleMap.cpp:
91         (WebCore::CSSToStyleMap::CSSToStyleMap):
92         (WebCore::CSSToStyleMap::mapFillSize):
93         (WebCore::CSSToStyleMap::mapFillXPosition):
94         (WebCore::CSSToStyleMap::mapFillYPosition):
95         (WebCore::CSSToStyleMap::mapNinePieceImageQuad):
96         * css/CSSToStyleMap.h:
97         (WebCore::CSSToStyleMap::CSSToStyleMap): Deleted.
98         * css/DeprecatedStyleBuilder.cpp:
99         (WebCore::ApplyPropertyAuto::applyValue):
100         (WebCore::ApplyPropertyClip::convertToLength):
101         (WebCore::ApplyPropertyLength::applyValue):
102         (WebCore::ApplyPropertyBorderRadius::applyValue):
103         (WebCore::ApplyPropertyComputeLength::applyValue):
104         (WebCore::ApplyPropertyFontSize::applyValue):
105         (WebCore::csstoLengthConversionDataWithTextZoomFactor):
106         (WebCore::ApplyPropertyMarqueeIncrement::applyValue):
107         (WebCore::ApplyPropertyLineHeight::applyValue):
108         (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue):
109         (WebCore::ApplyPropertyWordSpacing::applyValue):
110         (WebCore::ApplyPropertyPageSize::mmLength):
111         (WebCore::ApplyPropertyPageSize::inchLength):
112         (WebCore::ApplyPropertyPageSize::applyValue):
113         (WebCore::ApplyPropertyVerticalAlign::applyValue):
114         (WebCore::ApplyPropertyClipPath::applyValue):
115         (WebCore::ApplyPropertyShape::applyValue):
116         (WebCore::ApplyPropertyTextIndent::applyValue):
117         * css/MediaQueryEvaluator.cpp:
118         (WebCore::colorMediaFeatureEval):
119         (WebCore::color_indexMediaFeatureEval):
120         (WebCore::monochromeMediaFeatureEval):
121         (WebCore::orientationMediaFeatureEval):
122         (WebCore::aspect_ratioMediaFeatureEval):
123         (WebCore::device_aspect_ratioMediaFeatureEval):
124         (WebCore::device_pixel_ratioMediaFeatureEval):
125         (WebCore::resolutionMediaFeatureEval):
126         (WebCore::gridMediaFeatureEval):
127         (WebCore::computeLength):
128         (WebCore::device_heightMediaFeatureEval):
129         (WebCore::device_widthMediaFeatureEval):
130         (WebCore::heightMediaFeatureEval):
131         (WebCore::widthMediaFeatureEval):
132         (WebCore::min_colorMediaFeatureEval):
133         (WebCore::max_colorMediaFeatureEval):
134         (WebCore::min_color_indexMediaFeatureEval):
135         (WebCore::max_color_indexMediaFeatureEval):
136         (WebCore::min_monochromeMediaFeatureEval):
137         (WebCore::max_monochromeMediaFeatureEval):
138         (WebCore::min_aspect_ratioMediaFeatureEval):
139         (WebCore::max_aspect_ratioMediaFeatureEval):
140         (WebCore::min_device_aspect_ratioMediaFeatureEval):
141         (WebCore::max_device_aspect_ratioMediaFeatureEval):
142         (WebCore::min_device_pixel_ratioMediaFeatureEval):
143         (WebCore::max_device_pixel_ratioMediaFeatureEval):
144         (WebCore::min_heightMediaFeatureEval):
145         (WebCore::max_heightMediaFeatureEval):
146         (WebCore::min_widthMediaFeatureEval):
147         (WebCore::max_widthMediaFeatureEval):
148         (WebCore::min_device_heightMediaFeatureEval):
149         (WebCore::max_device_heightMediaFeatureEval):
150         (WebCore::min_device_widthMediaFeatureEval):
151         (WebCore::max_device_widthMediaFeatureEval):
152         (WebCore::min_resolutionMediaFeatureEval):
153         (WebCore::max_resolutionMediaFeatureEval):
154         (WebCore::animationMediaFeatureEval):
155         (WebCore::transitionMediaFeatureEval):
156         (WebCore::transform_2dMediaFeatureEval):
157         (WebCore::transform_3dMediaFeatureEval):
158         (WebCore::view_modeMediaFeatureEval):
159         (WebCore::video_playable_inlineMediaFeatureEval):
160         (WebCore::hoverMediaFeatureEval):
161         (WebCore::pointerMediaFeatureEval):
162         (WebCore::MediaQueryEvaluator::eval):
163         * css/SVGCSSStyleSelector.cpp:
164         (WebCore::StyleResolver::applySVGProperty):
165         * css/StyleResolver.cpp:
166         (WebCore::StyleResolver::State::clear):
167         (WebCore::StyleResolver::State::initForStyleResolve):
168         (WebCore::StyleResolver::convertToIntLength):
169         (WebCore::StyleResolver::convertToFloatLength):
170         (WebCore::createGridTrackBreadth):
171         (WebCore::StyleResolver::applyProperty):
172         (WebCore::StyleResolver::createFilterOperations):
173         * css/StyleResolver.h:
174         (WebCore::StyleResolver::State::setStyle):
175         (WebCore::StyleResolver::State::cssToLengthConversionData):
176         * css/TransformFunctions.cpp:
177         (WebCore::convertToFloatLength):
178         (WebCore::transformsForValue):
179         * css/TransformFunctions.h:
180         * css/WebKitCSSMatrix.cpp:
181         (WebCore::WebKitCSSMatrix::setMatrixValue):
182         * rendering/RenderThemeIOS.mm:
183         (WebCore::applyCommonButtonPaddingToStyle):
184         (WebCore::RenderThemeIOS::adjustButtonStyle):
185
186 2014-04-29  Zoltan Horvath  <zoltan@webkit.org>
187
188         [CSS Shapes] complex calc args for inset round vanish
189         https://bugs.webkit.org/show_bug.cgi?id=132293
190
191         Reviewed by Bem Jones-Bey.
192
193         In order to use calc in the rounded parameters for inset shapes, we need
194         to pass RenderStyle for the value creation as we did for the width arguments.
195         Without taking RenderStyle into account, we hit an assert not reache
196         in CSSPrimitiveValue::init in the debug builds.
197
198         I've added new parsing test.
199
200         * css/BasicShapeFunctions.cpp:
201         (WebCore::valueForBasicShape):
202         * css/CSSPrimitiveValue.cpp:
203         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
204         (WebCore::CSSPrimitiveValue::init):
205         * css/CSSPrimitiveValue.h:
206         (WebCore::CSSPrimitiveValue::create):
207         * css/CSSValuePool.h:
208         (WebCore::CSSValuePool::createValue):
209
210 2014-04-29  Zoltan Horvath  <zoltan@webkit.org>
211
212         [CSS Shapes] complex calc values for shape-margin return null for computed style
213         https://bugs.webkit.org/show_bug.cgi?id=132313
214
215         Reviewed by Bem Jones-Bey.
216
217         We need to pass RenderStyle* to the cssValuePool when parsing
218         shape-margin in order to use calc() as a parameter.
219
220         I've added the new test case to parsing-shape-margin.html
221
222         * css/CSSComputedStyleDeclaration.cpp:
223         (WebCore::ComputedStyleExtractor::propertyValue):
224
225 2014-04-29  Chris Fleizach  <cfleizach@apple.com>
226
227         AX: Row span info is wrong for table cells when a footer section is placed above a body section
228         https://bugs.webkit.org/show_bug.cgi?id=131832
229
230         Reviewed by Mario Sanchez Prada.
231
232         If a <footer> section is placed before the body, it renders AX row information and order incorrectly.
233         This also affects ARIA tables because they add their children by looking at renderer children, instead
234         interrogating the RenderTable directly.
235
236         Test: accessibility/table-with-footer-section-above-body.html
237
238         * accessibility/AccessibilityARIAGrid.cpp:
239         (WebCore::AccessibilityARIAGrid::addTableCellChild):
240         (WebCore::AccessibilityARIAGrid::addChildren):
241         * accessibility/AccessibilityTable.cpp:
242         (WebCore::AccessibilityTable::addChildren):
243         (WebCore::AccessibilityTable::addChildrenFromSection):
244         * accessibility/AccessibilityTable.h:
245         * accessibility/AccessibilityTableCell.cpp:
246         (WebCore::AccessibilityTableCell::rowIndexRange):
247         (WebCore::AccessibilityTableCell::columnIndexRange):
248
249 2014-04-29  Chris Fleizach  <cfleizach@apple.com>
250
251         AX: SpeechSynthesisUtterance cannot addEventListener
252         https://bugs.webkit.org/show_bug.cgi?id=132321
253
254         Reviewed by Mario Sanchez Prada.
255
256         Modified an existing test (speech-synthesis-speak.html) to use addEventTarget.
257
258         * Modules/speech/SpeechSynthesisUtterance.idl:
259
260 2014-04-29  Hans Muller  <hmuller@adobe.com>
261
262         [CSS Shapes] shape-outside polygon fails when first vertex is 0,0
263         https://bugs.webkit.org/show_bug.cgi?id=132132
264
265         Reviewed by Bem Jones-Bey.
266
267         ShapeInterval now distinguishes between x1==x2 - isEmpty() and x1,x2 haven't been
268         set yet - isUndefined(). Removed the ShapeInterval setX1() and setX2() methods, since
269         they're no longer used.
270
271         The polygon algorithm for computing excluded intervals now ignores horizontal
272         edges. It also ignores edges whose lower vertex matches the top of the line, if
273         the edge's Y direction is upwards (away from the top of the line). The rationale
274         for this was explained here:
275         http://hansmuller-webkit.blogspot.com/2012/11/revised-horizontal-box-algorithm.html
276
277         Test: fast/shapes/shape-outside-floats/shape-outside-polygon-zero-vertex.html
278
279         * rendering/shapes/PolygonShape.cpp:
280         (WebCore::OffsetPolygonEdge::clippedEdgeXRange):
281         (WebCore::PolygonShape::getExcludedIntervals):
282         * rendering/shapes/ShapeInterval.h:
283         (WebCore::ShapeInterval::ShapeInterval):
284         (WebCore::ShapeInterval::isUndefined):
285         (WebCore::ShapeInterval::x1):
286         (WebCore::ShapeInterval::x2):
287         (WebCore::ShapeInterval::width):
288         (WebCore::ShapeInterval::isEmpty):
289         (WebCore::ShapeInterval::setX1):
290         (WebCore::ShapeInterval::setX2):
291         (WebCore::ShapeInterval::overlaps):
292         (WebCore::ShapeInterval::contains):
293         (WebCore::ShapeInterval::unite):
294
295 2014-04-29  Andrei Bucur  <abucur@adobe.com>
296
297         [CSS Regions] Fix getClientRects() for content nodes
298         https://bugs.webkit.org/show_bug.cgi?id=117407
299
300         Reviewed by David Hyatt.
301
302         This patch modifies getClientRects() to return a list of fragments
303         for a fragmented box instead of a single rectangle positioned inside
304         the region where the box center would appear.
305
306         The approach is to split the border box of the element in regions using
307         the layout positioning. Then each fragment is mapped to the view coordinates
308         and the result added to the list of rectangles. To preserve the originating
309         region when mapping the fragment through the ancestor tree I've introduced
310         the concept of a current region. The current region is stored inside a
311         CurrentRenderRegionMaintainer object, created whenever an algorithm needing
312         it needs to run. When the maintainer is destroyed, the cleanup is made
313         automatically. The RenderFlowThread holds a pointer to this structure for
314         easy access.
315
316         Tests: fast/regions/cssom/client-rects-fixed-content.html
317                fast/regions/cssom/client-rects-forced-breaks.html
318                fast/regions/cssom/client-rects-inline-complex.html
319                fast/regions/cssom/client-rects-inline.html
320                fast/regions/cssom/client-rects-nested-regions.html
321                fast/regions/cssom/client-rects-positioned.html
322                fast/regions/cssom/client-rects-relative-position.html
323                fast/regions/cssom/client-rects-simple-block.html
324                fast/regions/cssom/client-rects-transforms.html
325                fast/regions/cssom/client-rects-unsplittable-float.html
326
327         * rendering/RenderBlock.cpp:
328         (WebCore::RenderBlock::absoluteQuads): Split the box in fragments.
329         * rendering/RenderBox.cpp:
330         (WebCore::RenderBox::absoluteQuads): Split the box in fragments.
331         * rendering/RenderFlowThread.cpp:
332         (WebCore::RenderFlowThread::RenderFlowThread):
333         (WebCore::RenderFlowThread::mapFromFlowToRegion):
334         (WebCore::RenderFlowThread::mapLocalToContainer):
335         (WebCore::RenderFlowThread::currentRegion):
336         * rendering/RenderFlowThread.h:
337         * rendering/RenderNamedFlowFragment.cpp:
338         (WebCore::RenderNamedFlowFragment::absoluteQuadsForBoxInRegion): Get
339         the fragments for this box in the region.
340         * rendering/RenderNamedFlowFragment.h:
341         * rendering/RenderNamedFlowThread.cpp:
342         (WebCore::RenderNamedFlowThread::absoluteQuadsForBox): Virtual function
343         that can be used to implement fragments to client rects mapping.
344         * rendering/RenderNamedFlowThread.h:
345         * rendering/RenderRegion.cpp:
346         (WebCore::RenderRegion::rectFlowPortionForBox): Small change to correctly
347         map empty rectangles to containers.
348         (WebCore::CurrentRenderRegionMaintainer::CurrentRenderRegionMaintainer):
349         (WebCore::CurrentRenderRegionMaintainer::~CurrentRenderRegionMaintainer):
350         * rendering/RenderRegion.h:
351         (WebCore::RenderRegion::absoluteQuadsForBoxInRegion):
352         (WebCore::CurrentRenderRegionMaintainer::region):
353
354 2014-04-29  Andrei Bucur  <abucur@adobe.com>
355
356         Store the containing region map inside the flow thread
357         https://bugs.webkit.org/show_bug.cgi?id=131647
358
359         Reviewed by Mihnea Ovidenie.
360
361         The patch moves the containing region map inside the flow thread where
362         it can be better handled in case the region chain changes and the map
363         needs to be cleared.
364
365         As a result of this move we are able to also cleanup the lines region
366         information of a block flow when it is removed from the tree.
367
368         Test: fast/regions/inline-strike-through.html
369
370         * rendering/InlineFlowBox.h:
371         (WebCore::InlineFlowBox::InlineFlowBox):
372         * rendering/RenderBlockLineLayout.cpp:
373         (WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
374         * rendering/RenderFlowThread.cpp:
375         (WebCore::RenderFlowThread::removeFlowChildInfo):
376         (WebCore::RenderFlowThread::invalidateRegions):
377         (WebCore::RenderFlowThread::removeLineRegionInfo):
378         (WebCore::RenderFlowThread::checkLinesConsistency):
379         (WebCore::RenderFlowThread::containingRegionMap):
380         * rendering/RenderFlowThread.h:
381         * rendering/RootInlineBox.cpp:
382         (WebCore::containingRegionMap):
383         (WebCore::RootInlineBox::~RootInlineBox):
384         (WebCore::RootInlineBox::paint):
385         (WebCore::RootInlineBox::containingRegion):
386         (WebCore::RootInlineBox::clearContainingRegion):
387         (WebCore::RootInlineBox::setContainingRegion):
388
389 2014-04-28  Benjamin Poulain  <benjamin@webkit.org>
390
391         SelectorCodeGenerator::generateElementIsNthChild() leaks the parent register :nth-child() is non-filtering
392         https://bugs.webkit.org/show_bug.cgi?id=132311
393
394         Reviewed by Andreas Kling.
395
396         In two cases, the parent register was never returned to the register allocator:
397         -Non filtering selectors (the early return).
398         -Non marking selectors (at the moment: only querySelector API).
399
400         Unfortunately, generateElementIsNthChild() makes function call, which forces us to do this manual allocation
401         of the parentElement register. Long term, I want RegisterAllocator and FunctionCall to have a special type for that.
402
403         Test: fast/selectors/several-nth-child.html
404
405         * cssjit/SelectorCompiler.cpp:
406         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
407
408 2014-04-28  Yusuke Suzuki  <utatane.tea@gmail.com>
409
410         CSS JIT: backtracking with current / parent element for child
411         https://bugs.webkit.org/show_bug.cgi?id=132057
412
413         Reviewed by Benjamin Poulain.
414
415         Calculate appropriate backtracking start height from the closest
416         descendant. And at first, we use it for a simple optimization.
417
418         1. When backtracking start height equals to current height, we
419         can simply jump to a descendant element check phase.
420         2. When backtracking start height equals to current height + 1, we
421         can simply jump to a descendant element traversing phase.
422
423         We can apply this optimization to fragments with adjacent combinators.
424         But, in the meantime, we start to implement it for a fragment with
425         child combinator.
426
427         * cssjit/SelectorCompiler.cpp:
428         (WebCore::SelectorCompiler::SelectorFragment::SelectorFragment):
429         (WebCore::SelectorCompiler::TagNamePattern::TagNamePattern):
430         (WebCore::SelectorCompiler::solveDescendantBacktrackingActionForChild):
431         (WebCore::SelectorCompiler::solveBacktrackingAction):
432         (WebCore::SelectorCompiler::equalTagNames):
433         (WebCore::SelectorCompiler::equalTagNamePatterns):
434         (WebCore::SelectorCompiler::computeBacktrackingStartHeightFromDescendant):
435         (WebCore::SelectorCompiler::computeBacktrackingHeightFromDescendant):
436         (WebCore::SelectorCompiler::requiresAdjacentTail):
437         (WebCore::SelectorCompiler::requiresDescendantTail):
438         (WebCore::SelectorCompiler::SelectorCodeGenerator::computeBacktrackingInformation):
439         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
440         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToParentNode):
441         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToParentElement):
442         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateParentElementTreeWalker):
443         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAncestorTreeWalker):
444         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker):
445         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateIndirectAdjacentTreeWalker):
446         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
447
448 2014-04-28  Benjamin Poulain  <bpoulain@apple.com>
449
450         [iOS][WK2] Restore the scroll position and scale from the HistoryItem (mostly)
451         https://bugs.webkit.org/show_bug.cgi?id=132307
452
453         Reviewed by Simon Fraser.
454
455         * WebCore.exp.in:
456
457 2014-04-28  Beth Dakin  <bdakin@apple.com>
458
459         Scrollbars do not update properly when topContentInset changes dynamically
460         https://bugs.webkit.org/show_bug.cgi?id=132309
461         -and corresponding-
462         <rdar://problem/16642232>
463
464         Reviewed by Tim Horton.
465
466         It is not sufficient to do a layout and call updateScrollbars(). We must also call 
467         RenderLayerCompositor::frameViewDidChangeSize() in order to properly adjust the 
468         size and position of all of the scrolling-related layers.
469         * page/FrameView.cpp:
470         (WebCore::FrameView::topContentInsetDidChange):
471
472 2014-04-28  David Hyatt  <hyatt@apple.com>
473
474         [New Multicolumn] event.offsetX/offsetY don't work correctly
475         https://bugs.webkit.org/show_bug.cgi?id=132284
476
477         Reviewed by Simon Fraser.
478
479         * rendering/RenderBoxModelObject.cpp:
480         (WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
481         Change the code here to only trigger for CSS Regions and not for
482         multi-column. Add a FIXME pointing out that the code is broken even for
483         CSS regions.
484
485          * rendering/RenderMultiColumnFlowThread.cpp:
486         (WebCore::RenderMultiColumnFlowThread::mapAbsoluteToLocalPoint):
487         Override mapAbsoluteToLocalPoint in order to guess a region and attempt
488         to translate the point from that region to the flow thread local coordinate
489         space.
490
491         (WebCore::RenderMultiColumnFlowThread::physicalTranslationFromRegionToFlow):
492         * rendering/RenderMultiColumnFlowThread.h:
493         New helper function that just wraps calling the region's logical translation
494         function and converting to/from physical coordinates.
495
496 2014-04-28  Commit Queue  <commit-queue@webkit.org>
497
498         Unreviewed, rolling out r167857.
499         https://bugs.webkit.org/show_bug.cgi?id=132305
500
501         the change was rolled out, roll out the new expectations as
502         well (Requested by thorton on #webkit).
503
504         Reverted changeset:
505
506         "Unreviewed. Updating one bindings test baseline after
507         r167855."
508         http://trac.webkit.org/changeset/167857
509
510 2014-04-28  Dean Jackson  <dino@apple.com>
511
512         [Mac] Use the animated version of setHighlighted on NSButtonCell where available
513         https://bugs.webkit.org/show_bug.cgi?id=132295
514         <rdar://problem/16747240>
515
516         Reviewed by Beth Dakin.
517
518         Like setState, there is an animated version of setHighlighted available.
519
520         * platform/mac/ThemeMac.mm:
521         (WebCore::updateStates): Use private version of _setHighlighted where possible.
522
523 2014-04-28  Commit Queue  <commit-queue@webkit.org>
524
525         Unreviewed, rolling out r167855.
526         https://bugs.webkit.org/show_bug.cgi?id=132301
527
528         Broke the windows build (Requested by bfulgham on #webkit).
529
530         Reverted changeset:
531
532         "ScriptExecutionContext::Task should work well with C++11
533         lambdas"
534         https://bugs.webkit.org/show_bug.cgi?id=129795
535         http://trac.webkit.org/changeset/167855
536
537 2014-04-24  Andy Estes  <aestes@apple.com>
538
539         [iOS] Implement WebQuickLookHandleClient for WebKit2
540         https://bugs.webkit.org/show_bug.cgi?id=132157
541
542         Reviewed by Darin Adler.
543
544         * WebCore.exp.in: Exported QuickLookHandle::previewUTI().
545         * platform/network/ios/QuickLook.h:
546         * platform/network/ios/QuickLook.mm:
547         (WebCore::QuickLookHandle::previewFileName): Changed to return a WTF::String.
548         (WebCore::QuickLookHandle::previewUTI): Added.
549
550 2014-04-28  Chris Fleizach  <cfleizach@apple.com>
551
552         REGRESSION: Intermittent crash in SpeechSynthesis::didFinishSpeaking
553         https://bugs.webkit.org/show_bug.cgi?id=111613
554
555         Reviewed by Mark Lam.
556
557         I think it's possible that didFinishSpeaking ends up calling directly back into start speaking, and the utterance reference
558         we were holding can get cleared, so protecting this should avoid a few asserts.
559
560         * platform/mock/PlatformSpeechSynthesizerMock.cpp:
561         (WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
562
563 2014-04-28  Commit Queue  <commit-queue@webkit.org>
564
565         Unreviewed, rolling out r167871.
566         https://bugs.webkit.org/show_bug.cgi?id=132290
567
568         broke a newmulticol test (spanner-nested-dynamic) (Requested
569         by thorton on #webkit).
570
571         Reverted changeset:
572
573         "Store the containing region map inside the flow thread"
574         https://bugs.webkit.org/show_bug.cgi?id=131647
575         http://trac.webkit.org/changeset/167871
576
577 2014-04-28  Commit Queue  <commit-queue@webkit.org>
578
579         Unreviewed, rolling out r167853.
580         https://bugs.webkit.org/show_bug.cgi?id=132288
581
582         caused crashes+timeouts+layout test failures described in the
583         bug (Requested by thorton on #webkit).
584
585         Reverted changeset:
586
587         "Coalesce responses on network process side"
588         https://bugs.webkit.org/show_bug.cgi?id=132229
589         http://trac.webkit.org/changeset/167853
590
591 2014-04-24  Simon Fraser  <simon.fraser@apple.com>
592
593         [iOS WK2] flickery scrolling with overflow-scrolling:touch
594         https://bugs.webkit.org/show_bug.cgi?id=132150
595
596         Reviewed by Tim Horton.
597
598         Fix typo in a comment.
599
600         * page/scrolling/AsyncScrollingCoordinator.cpp:
601         (WebCore::AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll):
602
603 2014-04-28  Martin Robinson  <mrobinson@igalia.com>
604
605         [GTK] Builtin cursors do not properly handle transparency
606         https://bugs.webkit.org/show_bug.cgi?id=131866
607
608         Reviewed by Gustavo Noronha Silva.
609
610         Tested by ManualTests/cursor.html.
611
612         * platform/gtk/CursorGtk.cpp:
613         (WebCore::createNamedCursor): Instead of interpreting the source bitmap as an A1 image, use
614         it as a 1-bit black and white image. We do this by:
615             1. Painting the result to a full color image with transparency instead of an alpha-only surface.
616             2. Masking a white background using the cursor alpha surface.
617             3. Painting the black parts of the cursor by painting the source surface, where black pixels
618             will be interpreted as full opaque pixels.
619
620 2014-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
621
622         Unreviewed. Update GObject DOM bindings symbols file.
623
624         * bindings/gobject/webkitdom.symbols: Add missing symbols.
625
626 2014-04-28  Manuel Rego Casasnovas  <rego@igalia.com>
627
628         OrderIterator refactoring to avoid extra loops
629         https://bugs.webkit.org/show_bug.cgi?id=119061
630
631         Reviewed by Darin Adler.
632
633         This patch removes order values Vector and use a Vector of pairs instead. The pairs are formed by a child
634         (RenderBox) and the index of this child. In addition, OrderIterator code is simplified.
635
636         It provides a helper class OrderIteratorPopulator, used for manipulating the Vector directly. Which allows to
637         consolidate the code into a single implementation across flexbox and grid. OrderIteratorPopulator part is based
638         on a patch from Blink r153971 by <jchaffraix@chromium.org>.
639
640         Current implementation is O(number of children * number of order values). Now it will just do a sort operation
641         and then a regular loop. So if you have different order values in a flexbox or grid the performance will
642         improve.
643
644         Comparing results of perf-tests:
645         * Layout/auto-grid-lots-of-data: ~0.5% worse.
646         * Layout/fixed-grid-lots-of-data: ~0.5% worse.
647         * Layout/fixed-grid-lots-of-data (setting 100 different order values): ~50% better.
648         * Layout/flexbox-lots-of-data: ~5% better.
649
650         No new tests, already covered by current tests.
651
652         * rendering/OrderIterator.cpp:
653         (WebCore::OrderIterator::currentChild): Return current child according to m_childrenIndex.
654         (WebCore::OrderIterator::first): Initialize m_childrenIndex and return current child.
655         (WebCore::OrderIterator::next): Increase m_childrenIndex and return current child.
656         (WebCore::compareByOrderValueAndIndex): Sorts the Vector by order value and index.
657         (WebCore::OrderIteratorPopulator::~OrderIteratorPopulator): Calls compareByOrderValueAndIndex() if there is any
658         child with non default order value.
659         (WebCore::OrderIteratorPopulator::collectChild): Adds the child and index to the Vector. Update
660         m_allChildrenHaveDefaultOrderValue accordingly.
661         (WebCore::OrderIterator::OrderIterator): Deleted.
662         (WebCore::OrderIterator::setOrderValues): Deleted.
663         (WebCore::OrderIterator::reset): Deleted.
664         * rendering/OrderIterator.h:
665         (WebCore::OrderIteratorPopulator::OrderIteratorPopulator): New helper class to manipulate the Vector.
666         (WebCore::OrderIterator::currentChild): Deleted.
667         * rendering/RenderFlexibleBox.cpp:
668         (WebCore::RenderFlexibleBox::RenderFlexibleBox): Remove OrderIterator intialization.
669         (WebCore::RenderFlexibleBox::layoutBlock): Remove unneeded code related to old OrderValues vector.
670         (WebCore::RenderFlexibleBox::prepareOrderIteratorAndMargins): Populate OrderIterator using collectChild().
671         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): Deleted.
672         * rendering/RenderFlexibleBox.h: Rename computeMainAxisPreferredSizes() to prepareOrderIteratorAndMargins().
673         * rendering/RenderGrid.cpp:
674         (WebCore::RenderGrid::RenderGrid): Remove OrderIterator initialization.
675         (WebCore::RenderGrid::populateExplicitGridAndOrderIterator): Populate OrderIterator using collectChild().
676
677 2014-04-28  Zan Dobersek  <zdobersek@igalia.com>
678
679         std::bitset<>::test() does unnecessary bounds checks on CSSPropertyID bitsets
680         https://bugs.webkit.org/show_bug.cgi?id=131685
681
682         Reviewed by Darin Adler.
683
684         Use std::bitset<>::operator[]() instead of std::bitset<>::test() to avoid
685         bounds checks which are not necessary as long as a CSSPropertyID value is used.
686
687         * css/CSSParser.cpp:
688         (WebCore::filterProperties):
689         * css/StyleProperties.cpp:
690         (WebCore::StyleProperties::asText):
691         * css/StyleResolver.cpp:
692         (WebCore::StyleResolver::CascadedProperties::hasProperty):
693         (WebCore::StyleResolver::CascadedProperties::set):
694
695 2014-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
696
697         [GTK] TextTrack kind and mode attributes are enums since r166180
698         https://bugs.webkit.org/show_bug.cgi?id=132228
699
700         Reviewed by Martin Robinson.
701
702         Improve coding style according to review comments, that I forgot
703         to do before landing previous commit.
704
705         * bindings/gobject/WebKitDOMCustom.cpp:
706         (webkit_dom_text_track_get_kind):
707         (webkit_dom_text_track_get_mode):
708         (webkit_dom_text_track_set_mode):
709
710 2014-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
711
712         [GTK] TextTrack kind and mode attributes are enums since r166180
713         https://bugs.webkit.org/show_bug.cgi?id=132228
714
715         Reviewed by Martin Robinson.
716
717         We don't support enum values yet in GObject DOM bindings, but they
718         are internally strings anyway, so we can keep the old
719         implementations using strings as custom functions until we
720         properly support enums.
721
722         * bindings/gobject/WebKitDOMCustom.cpp:
723         (webkit_dom_text_track_get_kind):
724         (webkit_dom_text_track_get_mode):
725         (webkit_dom_text_track_set_mode):
726         * bindings/gobject/WebKitDOMCustom.h:
727         * bindings/gobject/WebKitDOMCustom.symbols:
728
729 2014-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
730
731         [GTK] TextTrack::addCue can raise an exception since r163974
732         https://bugs.webkit.org/show_bug.cgi?id=132227
733
734         Reviewed by Martin Robinson.
735
736         webkit_dom_text_track_add_cue() now receives a GError paramater
737         which is an API break. Add
738         webkit_dom_text_track_add_cue_with_error and keep
739         webkit_dom_text_track_add_cue as deprecated to keep API
740         compatibility.
741
742         * bindings/gobject/WebKitDOMDeprecated.cpp:
743         (webkit_dom_text_track_add_cue):
744         * bindings/gobject/WebKitDOMDeprecated.h:
745         * bindings/gobject/WebKitDOMDeprecated.symbols:
746         * bindings/gobject/webkitdom.symbols:
747         * bindings/scripts/CodeGeneratorGObject.pm:
748         (GetEffectiveFunctionName):
749
750 2014-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
751
752         [GTK] TextTrackCue API changed in r163649
753         https://bugs.webkit.org/show_bug.cgi?id=132226
754
755         Reviewed by Martin Robinson.
756
757         TextTrackCue is now a base class and part of its API was moved to
758         the derived class VTTCue. Update the GObject DOM bindings to keep
759         backwards compatibility.
760
761         * PlatformGTK.cmake: Generate bindings for DataCue and VTTCue.
762         * bindings/gobject/WebKitDOMDeprecated.cpp:
763         (webkit_dom_text_track_cue_get_cue_as_html): Mark as deprecated in
764         favor of VTTCue API.
765         (webkit_dom_text_track_cue_get_vertical): Ditto.
766         (webkit_dom_text_track_cue_set_vertical): Ditto.
767         (webkit_dom_text_track_cue_get_snap_to_lines): Ditto.
768         (webkit_dom_text_track_cue_set_snap_to_lines): Ditto.
769         (webkit_dom_text_track_cue_get_line): Ditto.
770         (webkit_dom_text_track_cue_set_line): Ditto.
771         (webkit_dom_text_track_cue_get_position): Ditto.
772         (webkit_dom_text_track_cue_set_position): Ditto.
773         (webkit_dom_text_track_cue_get_size): Ditto.
774         (webkit_dom_text_track_cue_set_size): Ditto.
775         (webkit_dom_text_track_cue_get_align): Ditto.
776         (webkit_dom_text_track_cue_set_align): Ditto.
777         (webkit_dom_text_track_cue_get_text): Ditto.
778         (webkit_dom_text_track_cue_set_text): Ditto.
779         * bindings/gobject/WebKitDOMDeprecated.h:
780         * bindings/gobject/WebKitDOMDeprecated.symbols: Add new deprecated symbols.
781         * bindings/gobject/WebKitDOMPrivate.cpp:
782         (WebKit::wrap): Add generic wrap for TextTrackCue now that it's a
783         base class to generate DataCue or VTTCue objects.
784         * bindings/gobject/WebKitDOMPrivate.h:
785         * bindings/gobject/webkitdom.symbols: Add DataCue symbols.
786         * bindings/scripts/CodeGeneratorGObject.pm:
787         (IsPolymorphic): Add TextTrackCue to the list of polymorphic classes.
788
789 2014-04-27  Andrei Bucur  <abucur@adobe.com>
790
791         Store the containing region map inside the flow thread
792         https://bugs.webkit.org/show_bug.cgi?id=131647
793
794         Reviewed by Mihnea Ovidenie.
795
796         The patch moves the containing region map inside the flow thread where
797         it can be better handled in case the region chain changes and the map
798         needs to be cleared.
799
800         As a result of this move we are able to also cleanup the lines region
801         information of a block flow when it is removed from the tree.
802
803         Test: fast/regions/inline-strike-through.html
804
805         * rendering/InlineFlowBox.h:
806         (WebCore::InlineFlowBox::InlineFlowBox):
807         * rendering/RenderBlockLineLayout.cpp:
808         (WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
809         * rendering/RenderFlowThread.cpp:
810         (WebCore::RenderFlowThread::removeFlowChildInfo):
811         (WebCore::RenderFlowThread::invalidateRegions):
812         (WebCore::RenderFlowThread::removeLineRegionInfo):
813         (WebCore::RenderFlowThread::checkLinesConsistency):
814         (WebCore::RenderFlowThread::containingRegionMap):
815         * rendering/RenderFlowThread.h:
816         * rendering/RootInlineBox.cpp:
817         (WebCore::containingRegionMap):
818         (WebCore::RootInlineBox::~RootInlineBox):
819         (WebCore::RootInlineBox::paint):
820         (WebCore::RootInlineBox::containingRegion):
821         (WebCore::RootInlineBox::clearContainingRegion):
822         (WebCore::RootInlineBox::setContainingRegion):
823
824 2014-04-27  Darin Adler  <darin@apple.com>
825
826         REGRESSION (r159345): The hover state for links in the top navigation of Yahoo.com doesn't work
827         https://bugs.webkit.org/show_bug.cgi?id=132241
828         rdar://problem/16501924
829
830         Reviewed by Andreas Kling.
831
832         Test: fast/text/simple-lines-hover-underline.html
833
834         Checked that this does not hurt performance by running the
835         run-perf-tests PerformanceTests/Layout/line-layout.html command before and after.
836
837         * rendering/RenderBlockFlow.cpp:
838         (WebCore::RenderBlockFlow::hitTestInlineChildren): Use simpleLineLayout function rather than
839         getting at the data member directly.
840         (WebCore::RenderBlockFlow::firstLineBaseline): Ditto.
841         (WebCore::RenderBlockFlow::inlineBlockBaseline): Ditto.
842         (WebCore::RenderBlockFlow::lineCount): Ditto.
843         (WebCore::RenderBlockFlow::paintInlineChildren): Ditto.
844         (WebCore::RenderBlockFlow::hasLines): Ditto.
845         (WebCore::RenderBlockFlow::simpleLineLayout): Added logic to determine which path to use if
846         m_lineLayoutPath is undetermined, and call createLineBoxes if it's not simple.
847         (WebCore::RenderBlockFlow::ensureLineBoxes): Factored out most of the code into a new
848         createLineBoxes function.
849         (WebCore::RenderBlockFlow::createLineBoxes): Ditto.
850
851         * rendering/RenderBlockFlow.h: Made simpleLineLayout function no longer an inline.
852         Added a private createLineBoxes function.
853
854 2014-04-27  Praveen R Jadhav  <praveen.j@samsung.com>
855
856         [MediaStream] .ended shouldn't be part of MediaStream IDL
857         https://bugs.webkit.org/show_bug.cgi?id=132104
858
859         Reviewed by Eric Carlson.
860
861         .ended attribute is spec'ed out of MediaStream IDL. Instead, .active
862         is introduced to handle more scenarios. This patch replaces all 'ended'
863         attribute calls with corresponding 'active' attributes. 
864
865         MediaStream-add-remove-tracks.html is updated.
866
867         * Modules/mediastream/MediaStream.cpp:
868         (WebCore::MediaStream::addTrack): Replaced ended() with active().
869         (WebCore::MediaStream::removeTrack): setEnded() isn't called. setActive()
870         is retained which propagates oninactive event.
871         (WebCore::MediaStream::trackDidEnd): setEnded() isn't called.
872         (WebCore::MediaStream::removeRemoteSource): Replaced ended() with active().
873         (WebCore::MediaStream::addRemoteTrack): Replaced ended() with active().
874         (WebCore::MediaStream::removeRemoteTrack): Replaced ended() with active().
875         (WebCore::MediaStream::ended): Deleted.
876         (WebCore::MediaStream::setEnded): Deleted.
877         (WebCore::MediaStream::streamDidEnd): Deleted.
878         * Modules/mediastream/MediaStream.h:
879         * Modules/mediastream/MediaStream.idl:
880         * Modules/mediastream/RTCPeerConnection.cpp:
881         (WebCore::RTCPeerConnection::didRemoveRemoteStream): Replaced setEnded()
882         with setActive().
883         * platform/mediastream/MediaStreamPrivate.cpp:
884         (WebCore::MediaStreamPrivate::MediaStreamPrivate):
885         (WebCore::MediaStreamPrivate::setActive): Updated comment from bug 
886         https://bugs.webkit.org/show_bug.cgi?id=131973
887         (WebCore::MediaStreamPrivate::setEnded): Deleted.
888         * platform/mediastream/MediaStreamPrivate.h:
889         (WebCore::MediaStreamPrivate::ended): Deleted.
890
891 2014-04-25  Andy Estes  <aestes@apple.com>
892
893         [iOS] Stop creating a WKWebResourceQuickLookDelegate for every WebResourceLoader
894         https://bugs.webkit.org/show_bug.cgi?id=132215
895
896         Reviewed by Dan Bernstein.
897
898         * WebCore.exp.in: Moved QuickLook symbols to the USE(QUICK_LOOK) stanza.
899         * platform/network/ios/QuickLook.h: Changed one of the create() overloads to no longer take a delegate argument.
900         * platform/network/ios/QuickLook.mm: Moved WKWebResourceQuickLookDelegate to here and renamed to WebResourceLoaderQuickLookDelegate.
901         (WebCore::QuickLookHandle::create): Created a WebResourceLoaderQuickLookDelegate only if QuickLook can handle the response.
902
903 2014-04-27  Sam Weinig  <sam@webkit.org>
904
905         [iOS WebKit2] Add support for text autosizing
906         <rdar://problem/16545245>
907         https://bugs.webkit.org/show_bug.cgi?id=132237
908
909         Reviewed by Tim Horton.
910
911         Move text autosizing width from Frame to Page, as it is a Page level concept.
912
913         * WebCore.exp.in:
914         * page/Frame.cpp:
915         (WebCore::Frame::textAutosizingWidth): Deleted.
916         (WebCore::Frame::setTextAutosizingWidth): Deleted.
917         * page/Frame.h:
918         * page/FrameView.cpp:
919         (WebCore::FrameView::layout):
920         * page/Page.cpp:
921         (WebCore::Page::Page):
922         * page/Page.h:
923         (WebCore::Page::textAutosizingWidth):
924         (WebCore::Page::setTextAutosizingWidth):
925
926 2014-04-27  Zan Dobersek  <zdobersek@igalia.com>
927
928         Unreviewed. Updating one bindings test baseline after r167855.
929
930         * bindings/scripts/test/JS/JSTestCallback.cpp:
931         (WebCore::JSTestCallback::~JSTestCallback):
932
933 2014-04-27  Darin Adler  <darin@apple.com>
934
935         Webpages can trigger loads with invalid URLs
936         https://bugs.webkit.org/show_bug.cgi?id=132224
937         rdar://problem/16697142
938
939         Reviewed by Alexey Proskuryakov.
940
941         Invalid URLs can be a way to trick the user about what website they
942         are looking at.  Still trying to figure out a good way to regression-test this.
943
944         * dom/Document.cpp:
945         (WebCore::Document::processHttpEquiv): Pass a URL rather than a String to
946         the navigation scheduler.
947         * loader/FrameLoader.cpp:
948         (WebCore::FrameLoader::receivedFirstData): Ditto.
949
950         * loader/NavigationScheduler.cpp:
951         (WebCore::ScheduledURLNavigation::ScheduledURLNavigation): Take a URL rather
952         than a string.
953         (WebCore::ScheduledURLNavigation::url): Ditto.
954         (WebCore::ScheduledRedirect::ScheduledRedirect): Ditto.
955         (WebCore::ScheduledLocationChange::ScheduledLocationChange): Ditto.
956         (WebCore::ScheduledRefresh::ScheduledRefresh): Ditto.
957         (WebCore::NavigationScheduler::shouldScheduleNavigation): Added a check that
958         prevents navigation to any URL that is invalid, except for JavaScript URLs,
959         which need not be valid.
960         (WebCore::NavigationScheduler::scheduleRedirect): Use URL instead of String.
961         (WebCore::NavigationScheduler::scheduleLocationChange): Use URL instead of
962         String. Also got rid of empty string check since empty URLs are also invalid,
963         and so shouldScheduleNavigation will take care of it.
964         (WebCore::NavigationScheduler::scheduleRefresh): Use URL instead of String.
965
966         * loader/NavigationScheduler.h: Take URL instead of String. Also removed some
967         unneeded incldues and uses of WTF_MAKE_NONCOPYABLE. NavigationScheduler is
968         already noncopyable because it has a reference for a data member, and the
969         disabler doesn't have any real reason to be noncopyable.
970
971         * loader/SubframeLoader.cpp:
972         (WebCore::SubframeLoader::loadOrRedirectSubframe): Pass a URL rather than a
973         String to the NavigationScheduler.
974         * page/DOMWindow.cpp:
975         (WebCore::DOMWindow::createWindow): Ditto.
976
977         * page/SecurityOrigin.cpp:
978         (WebCore::SecurityOrigin::urlWithUniqueSecurityOrigin): Return a URL instead
979         of a String.
980         * page/SecurityOrigin.h: Updated for above change.
981
982 2014-04-27  Zan Dobersek  <zdobersek@igalia.com>
983
984         ScriptExecutionContext::Task should work well with C++11 lambdas
985         https://bugs.webkit.org/show_bug.cgi?id=129795
986
987         Reviewed by Darin Adler.
988
989         Instead of having classes that subclass ScriptExecutionContext::Task and override
990         the performTask(ScriptExecutionContext*) method, have the ScriptExecutionContext::Task
991         take in a std::function<void (ScriptExecutionContext*)>-like object trough the constructor
992         which would contain the code currently kept in the performTask() methods.
993
994         This enables inlining C++11 lambdas into ScriptExecutionContext::postTask() calls. For
995         cleanup tasks, the Task object can be implicitly constructed by using the initializer list
996         constructor with the first argument being the ScriptExecutionContext::Task::CleanupTask tag.
997         The ScriptExecutionContext class remains non-copyable and now stores the passed-in invokable
998         object in the std::function wrapper, along with a boolean member that indicates whether the
999         task is of cleanup nature.
1000
1001         * Modules/quota/StorageErrorCallback.cpp:
1002         (WebCore::StorageErrorCallback::CallbackTask::CallbackTask):
1003         (WebCore::StorageErrorCallback::CallbackTask::performTask): Deleted.
1004         * Modules/quota/StorageErrorCallback.h:
1005         (WebCore::StorageErrorCallback::CallbackTask::create): Deleted.
1006         * Modules/webdatabase/Database.cpp:
1007         (WebCore::Database::~Database):
1008         (WebCore::Database::runTransaction):
1009         (WebCore::Database::scheduleTransactionCallback):
1010         (WebCore::DerefContextTask::create): Deleted.
1011         (WebCore::DerefContextTask::performTask): Deleted.
1012         (WebCore::DerefContextTask::isCleanupTask): Deleted.
1013         (WebCore::DerefContextTask::DerefContextTask): Deleted.
1014         (WebCore::callTransactionErrorCallback): Deleted.
1015         (WebCore::DeliverPendingCallbackTask::create): Deleted.
1016         (WebCore::DeliverPendingCallbackTask::performTask): Deleted.
1017         (WebCore::DeliverPendingCallbackTask::DeliverPendingCallbackTask): Deleted.
1018         * Modules/webdatabase/DatabaseManager.cpp:
1019         (WebCore::DatabaseManager::openDatabase):
1020         (WebCore::DatabaseCreationCallbackTask::create): Deleted.
1021         (WebCore::DatabaseCreationCallbackTask::performTask): Deleted.
1022         (WebCore::DatabaseCreationCallbackTask::DatabaseCreationCallbackTask): Deleted.
1023         * Modules/webdatabase/DatabaseSync.cpp:
1024         (WebCore::CloseSyncDatabaseOnContextThreadTask::create): Deleted.
1025         (WebCore::CloseSyncDatabaseOnContextThreadTask::performTask): Deleted.
1026         (WebCore::CloseSyncDatabaseOnContextThreadTask::CloseSyncDatabaseOnContextThreadTask): Deleted.
1027         * Modules/webdatabase/SQLCallbackWrapper.h:
1028         (WebCore::SQLCallbackWrapper::clear):
1029         (WebCore::SQLCallbackWrapper::SafeReleaseTask::create): Deleted.
1030         (WebCore::SQLCallbackWrapper::SafeReleaseTask::performTask): Deleted.
1031         (WebCore::SQLCallbackWrapper::SafeReleaseTask::isCleanupTask): Deleted.
1032         (WebCore::SQLCallbackWrapper::SafeReleaseTask::SafeReleaseTask): Deleted.
1033         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
1034         (WebCore::ThreadableWebSocketChannelClientWrapper::didConnect):
1035         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage):
1036         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
1037         (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount):
1038         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
1039         (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
1040         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError):
1041         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
1042         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
1043         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
1044         (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
1045         (WebCore::WorkerThreadableWebSocketChannel::mainThreadDestroy):
1046         (WebCore::WorkerThreadableWebSocketChannel::Bridge::disconnect):
1047         (WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::create): Deleted.
1048         (WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::~WorkerGlobalScopeDidInitializeTask): Deleted.
1049         (WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::WorkerGlobalScopeDidInitializeTask): Deleted.
1050         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
1051         * bindings/js/JSCallbackData.h:
1052         (WebCore::DeleteCallbackDataTask::DeleteCallbackDataTask):
1053         (WebCore::DeleteCallbackDataTask::create): Deleted.
1054         (WebCore::DeleteCallbackDataTask::performTask): Deleted.
1055         (WebCore::DeleteCallbackDataTask::isCleanupTask): Deleted.
1056         * bindings/js/JSDOMGlobalObjectTask.cpp:
1057         (WebCore::JSGlobalObjectTask::JSGlobalObjectTask):
1058         (WebCore::JSGlobalObjectTask::~JSGlobalObjectTask): Deleted.
1059         (WebCore::JSGlobalObjectTask::performTask): Deleted.
1060         * bindings/js/JSDOMGlobalObjectTask.h:
1061         * bindings/js/JSDOMWindowBase.cpp:
1062         (WebCore::JSDOMWindowBase::queueTaskToEventLoop):
1063         * bindings/js/JSWorkerGlobalScopeBase.cpp:
1064         (WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
1065         * bindings/scripts/CodeGeneratorJS.pm:
1066         (GenerateCallbackImplementation):
1067         * dom/CrossThreadTask.h:
1068         (WebCore::CrossThreadTask1::performTask):
1069         (WebCore::CrossThreadTask2::performTask):
1070         (WebCore::CrossThreadTask3::performTask):
1071         (WebCore::CrossThreadTask4::performTask):
1072         (WebCore::CrossThreadTask5::performTask):
1073         (WebCore::CrossThreadTask6::performTask):
1074         (WebCore::CrossThreadTask7::performTask):
1075         (WebCore::CrossThreadTask8::performTask):
1076         (WebCore::createCallbackTask):
1077         (WebCore::CrossThreadTask1::create): Deleted.
1078         (WebCore::CrossThreadTask2::create): Deleted.
1079         (WebCore::CrossThreadTask3::create): Deleted.
1080         (WebCore::CrossThreadTask4::create): Deleted.
1081         (WebCore::CrossThreadTask5::create): Deleted.
1082         (WebCore::CrossThreadTask6::create): Deleted.
1083         (WebCore::CrossThreadTask7::create): Deleted.
1084         (WebCore::CrossThreadTask8::create): Deleted.
1085         * dom/Document.cpp:
1086         (WebCore::Document::addConsoleMessage):
1087         (WebCore::Document::addMessage):
1088         (WebCore::Document::postTask):
1089         (WebCore::Document::pendingTasksTimerFired):
1090         (WebCore::PerformTaskContext::PerformTaskContext): Deleted.
1091         (WebCore::Document::didReceiveTask): Deleted.
1092         * dom/Document.h:
1093         * dom/ScriptExecutionContext.cpp:
1094         (WebCore::ScriptExecutionContext::processMessagePortMessagesSoon):
1095         (WebCore::ScriptExecutionContext::timerAlignmentInterval):
1096         (WebCore::ProcessMessagesSoonTask::create): Deleted.
1097         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::performTask): Deleted.
1098         (WebCore::ScriptExecutionContext::Task::~Task): Deleted.
1099         * dom/ScriptExecutionContext.h:
1100         (WebCore::ScriptExecutionContext::Task::Task):
1101         (WebCore::ScriptExecutionContext::Task::performTask):
1102         (WebCore::ScriptExecutionContext::Task::isCleanupTask):
1103         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::AddConsoleMessageTask):
1104         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::create): Deleted.
1105         * dom/StringCallback.cpp:
1106         (WebCore::StringCallback::scheduleCallback):
1107         * loader/appcache/ApplicationCacheGroup.cpp:
1108         (WebCore::ApplicationCacheGroup::postListenerTask):
1109         (WebCore::CallCacheListenerTask::create): Deleted.
1110         (WebCore::CallCacheListenerTask::CallCacheListenerTask): Deleted.
1111         * workers/DefaultSharedWorkerRepository.cpp:
1112         (WebCore::SharedWorkerProxy::postTaskToLoader):
1113         (WebCore::SharedWorkerProxy::postTaskForModeToWorkerGlobalScope):
1114         (WebCore::SharedWorkerConnectTask::SharedWorkerConnectTask):
1115         (WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
1116         (WebCore::DefaultSharedWorkerRepository::connectToWorker):
1117         (WebCore::SharedWorkerConnectTask::create): Deleted.
1118         (WebCore::SharedWorkerConnectTask::performTask): Deleted.
1119         * workers/WorkerEventQueue.cpp:
1120         (WebCore::WorkerEventQueue::EventDispatcher::EventDispatcher):
1121         (WebCore::WorkerEventQueue::EventDispatcher::~EventDispatcher):
1122         (WebCore::WorkerEventQueue::EventDispatcher::dispatch):
1123         (WebCore::WorkerEventQueue::enqueueEvent):
1124         (WebCore::WorkerEventQueue::cancelEvent):
1125         (WebCore::WorkerEventQueue::close):
1126         * workers/WorkerEventQueue.h:
1127         * workers/WorkerGlobalScope.cpp:
1128         (WebCore::WorkerGlobalScope::close):
1129         (WebCore::WorkerGlobalScope::postTask):
1130         (WebCore::WorkerGlobalScope::addConsoleMessage):
1131         (WebCore::WorkerGlobalScope::addMessage):
1132         (WebCore::CloseWorkerGlobalScopeTask::create): Deleted.
1133         (WebCore::CloseWorkerGlobalScopeTask::performTask): Deleted.
1134         (WebCore::CloseWorkerGlobalScopeTask::isCleanupTask): Deleted.
1135         * workers/WorkerGlobalScope.h:
1136         * workers/WorkerLoaderProxy.h:
1137         * workers/WorkerMessagingProxy.cpp:
1138         (WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
1139         (WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):
1140         (WebCore::WorkerMessagingProxy::postTaskForModeToWorkerGlobalScope):
1141         (WebCore::WorkerMessagingProxy::postTaskToLoader):
1142         (WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
1143         (WebCore::WorkerMessagingProxy::workerThreadCreated):
1144         (WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
1145         (WebCore::WorkerMessagingProxy::workerGlobalScopeDestroyed):
1146         (WebCore::WorkerMessagingProxy::workerGlobalScopeClosed):
1147         (WebCore::WorkerMessagingProxy::postMessageToPageInspector):
1148         (WebCore::WorkerMessagingProxy::confirmMessageFromWorkerObject):
1149         (WebCore::WorkerMessagingProxy::reportPendingActivity):
1150         (WebCore::MessageWorkerGlobalScopeTask::create): Deleted.
1151         (WebCore::MessageWorkerGlobalScopeTask::MessageWorkerGlobalScopeTask): Deleted.
1152         (WebCore::MessageWorkerGlobalScopeTask::performTask): Deleted.
1153         (WebCore::MessageWorkerTask::create): Deleted.
1154         (WebCore::MessageWorkerTask::MessageWorkerTask): Deleted.
1155         (WebCore::MessageWorkerTask::performTask): Deleted.
1156         (WebCore::WorkerExceptionTask::create): Deleted.
1157         (WebCore::WorkerExceptionTask::WorkerExceptionTask): Deleted.
1158         (WebCore::WorkerExceptionTask::performTask): Deleted.
1159         (WebCore::WorkerGlobalScopeDestroyedTask::create): Deleted.
1160         (WebCore::WorkerGlobalScopeDestroyedTask::WorkerGlobalScopeDestroyedTask): Deleted.
1161         (WebCore::WorkerGlobalScopeDestroyedTask::performTask): Deleted.
1162         (WebCore::WorkerTerminateTask::create): Deleted.
1163         (WebCore::WorkerTerminateTask::WorkerTerminateTask): Deleted.
1164         (WebCore::WorkerTerminateTask::performTask): Deleted.
1165         (WebCore::WorkerThreadActivityReportTask::create): Deleted.
1166         (WebCore::WorkerThreadActivityReportTask::WorkerThreadActivityReportTask): Deleted.
1167         (WebCore::WorkerThreadActivityReportTask::performTask): Deleted.
1168         (WebCore::PostMessageToPageInspectorTask::create): Deleted.
1169         (WebCore::PostMessageToPageInspectorTask::PostMessageToPageInspectorTask): Deleted.
1170         (WebCore::PostMessageToPageInspectorTask::performTask): Deleted.
1171         (WebCore::NotifyNetworkStateChangeTask::create): Deleted.
1172         (WebCore::NotifyNetworkStateChangeTask::NotifyNetworkStateChangeTask): Deleted.
1173         (WebCore::NotifyNetworkStateChangeTask::performTask): Deleted.
1174         * workers/WorkerMessagingProxy.h:
1175         * workers/WorkerRunLoop.cpp:
1176         (WebCore::WorkerRunLoop::postTask):
1177         (WebCore::WorkerRunLoop::postTaskAndTerminate):
1178         (WebCore::WorkerRunLoop::postTaskForMode):
1179         (WebCore::WorkerRunLoop::Task::create):
1180         (WebCore::WorkerRunLoop::Task::performTask):
1181         (WebCore::WorkerRunLoop::Task::Task):
1182         * workers/WorkerRunLoop.h:
1183         * workers/WorkerThread.cpp:
1184         (WebCore::WorkerThread::stop):
1185         (WebCore::WorkerThread::releaseFastMallocFreeMemoryInAllThreads):
1186         (WebCore::WorkerThreadShutdownFinishTask::create): Deleted.
1187         (WebCore::WorkerThreadShutdownFinishTask::performTask): Deleted.
1188         (WebCore::WorkerThreadShutdownFinishTask::isCleanupTask): Deleted.
1189         (WebCore::WorkerThreadShutdownStartTask::create): Deleted.
1190         (WebCore::WorkerThreadShutdownStartTask::performTask): Deleted.
1191         (WebCore::WorkerThreadShutdownStartTask::isCleanupTask): Deleted.
1192
1193 2014-04-27  Antti Koivisto  <antti@apple.com>
1194
1195         Coalesce responses on network process side
1196         https://bugs.webkit.org/show_bug.cgi?id=132229
1197
1198         Reviewed by Andreas Kling.
1199
1200         * WebCore.exp.in:
1201
1202 2014-04-27  David Kilzer  <ddkilzer@apple.com>
1203
1204         Roll out changes not part of the patch reviewed for Bug 132089
1205         <http://webkit.org/b/132089>
1206
1207         * loader/SubframeLoader.cpp:
1208         (WebCore::SubframeLoader::loadOrRedirectSubframe):
1209         * page/DOMWindow.cpp:
1210         (WebCore::DOMWindow::setLocation):
1211         (WebCore::DOMWindow::createWindow):
1212         (WebCore::DOMWindow::open):
1213
1214 2014-04-26  Darin Adler  <darin@apple.com>
1215
1216         Frame and page lifetime fixes in WebCore::createWindow
1217         https://bugs.webkit.org/show_bug.cgi?id=132089
1218
1219         Reviewed by Sam Weinig.
1220
1221         Speculative fix because I was unable to reproduce the crash that was
1222         reported with the test case attached to this bug.
1223
1224         * loader/FrameLoader.cpp:
1225         (WebCore::createWindow): Changed code to remove the assumption that calls
1226         out will not destroy the page or frame. Use RefPtr for the frame, and
1227         added early exits if frame->page() becomes null at any point before we
1228         use a page pointer.
1229
1230 2014-04-26  Alexey Proskuryakov  <ap@apple.com>
1231
1232         Local files should not be allowed to read pasteboard data during drag
1233         https://bugs.webkit.org/show_bug.cgi?id=131767
1234
1235         Reviewed by Sam Weinig.
1236
1237         Test: fast/files/local-file-drag-security.html
1238
1239         * page/DragController.cpp:
1240         (WebCore::DragController::dragExited):
1241         (WebCore::DragController::tryDHTMLDrag):
1242         Make an old Dashboard quirk really Dashboard only.
1243
1244 2014-04-24  Darin Adler  <darin@apple.com>
1245
1246         REGRESSION (r164133): Selection doesn't paint when scrolling some pages
1247         https://bugs.webkit.org/show_bug.cgi?id=132172
1248         rdar://problem/16719473
1249
1250         Reviewed by Brent Fulgham.
1251
1252         Tests: fast/dynamic/remove-invisible-node-inside-selection.html
1253                fast/dynamic/remove-node-inside-selection.html
1254
1255         * editing/FrameSelection.cpp:
1256         (WebCore::clearRenderViewSelection): Changed to take a Node& because having
1257         this take a Position& was unnecessary and strange, when really it just needs
1258         to take a document as an argument.
1259         (WebCore::DragCaretController::nodeWillBeRemoved): Updated for the above.
1260         (WebCore::FrameSelection::respondToNodeModification): Added code to set the
1261         m_pendingSelectionUpdate flag and call RenderView::setNeedsLayout so the
1262         selection will be recomputed after it's temporarily cleared when one of
1263         the selected nodes is removed.
1264
1265 2014-04-25  Ryosuke Niwa  <rniwa@webkit.org>
1266
1267         REGRESSION (r167689): Hovering file name in a file input causes a crash
1268         https://bugs.webkit.org/show_bug.cgi?id=132214
1269
1270         Reviewed by Andreas Kling.
1271
1272         The bug was caused by callDefaultEventHandlersInTheBubblingOrder unconditionally
1273         accessing path.contextAt(0) even if the event path was empty.
1274
1275         Fixed the bug by exiting early when the event path is empty.
1276
1277         Test: fast/events/shadow-event-path-2.html
1278
1279         * dom/EventDispatcher.cpp:
1280         (WebCore::callDefaultEventHandlersInTheBubblingOrder):
1281
1282 2014-04-25  Tim Horton  <timothy_horton@apple.com>
1283
1284         REGRESSION (r167828): http/tests/media/hls/video-controls-live-stream.html fails
1285
1286         * English.lproj/mediaControlsLocalizedStrings.js:
1287         Add 'Live Broadcast' to the localized strings list.
1288
1289 2014-04-25  Brady Eidson  <beidson@apple.com>
1290
1291         Add a selection overlay.
1292         <rdar://problem/16727797> and https://bugs.webkit.org/show_bug.cgi?id=132200
1293
1294         Reviewed by David Hyatt.
1295
1296         No new tests (WK2 feature in development).
1297
1298         * WebCore.xcodeproj/project.pbxproj:
1299
1300         Add a SelectionRectGathterer class.
1301         It creates a Notifier (given a RenderView) then accepts Rects from the RenderView.
1302         When the Notifier is destroyed, the appropriate EditorClient is notified of the gathered rects.
1303         * editing/SelectionRectGatherer.cpp: Added.
1304         (WebCore::SelectionRectGatherer::SelectionRectGatherer):
1305         (WebCore::SelectionRectGatherer::addRect):
1306         (WebCore::SelectionRectGatherer::addRects):
1307         (WebCore::SelectionRectGatherer::Notifier::Notifier):
1308         (WebCore::SelectionRectGatherer::Notifier::~Notifier):
1309         (WebCore::SelectionRectGatherer::clearAndCreateNotifier):
1310         * editing/SelectionRectGatherer.h: Added.
1311
1312         * page/EditorClient.h:
1313         (WebCore::EditorClient::selectionRectsDidChange):
1314
1315         * rendering/RenderView.cpp:
1316         (WebCore::RenderView::RenderView):
1317         (WebCore::RenderView::setSelection): Clear the gatherer’s rects then create a Notifier.
1318         (WebCore::RenderView::setSubtreeSelection): Give all the selection rects to be painted to
1319           the SelectionRectGatherer.
1320         * rendering/RenderView.h:
1321
1322 2014-04-08  Jer Noble  <jer.noble@apple.com>
1323
1324         Support "Live" streams in media controls.
1325         https://bugs.webkit.org/show_bug.cgi?id=131390
1326
1327         Reviewed by Brent Fulgham.
1328
1329         Test: http/tests/media/hls/video-controls-live-stream.html
1330
1331         Support "Live" streams by adding an isLive property to our media controls.
1332
1333         * Modules/mediacontrols/mediaControlsApple.css:
1334         (audio::-webkit-media-controls-status-display):
1335         (video:-webkit-full-screen::-webkit-media-controls-status-display):
1336         * Modules/mediacontrols/mediaControlsApple.js:
1337         (Controller): isLive defaults to false.
1338         (Controller.prototype.setIsLive): Set the isLive property and conditionally reconfigure the controls.
1339         (Controller.prototype.configureInlineControls): Don't add the timeline if we are live.
1340         (Controller.prototype.configureFullScreenControls): Ditto.
1341         (Controller.prototype.updateStatusDisplay): Added.
1342         (Controller.prototype.handleLoadStart): Call updateStatusDisplay().
1343         (Controller.prototype.handleError): Ditto.
1344         (Controller.prototype.handleAbort): Ditto.
1345         (Controller.prototype.handleSuspend): Ditto.
1346         (Controller.prototype.handleStalled): Ditto.
1347         (Controller.prototype.handleWaiting): Ditto.
1348         (Controller.prototype.updateDuration): Ditto.
1349         (Controller.prototype.updateReadyState): Ditto.
1350
1351 2014-04-25  Dean Jackson  <dino@apple.com>
1352
1353         Allow a platform-specific size enumeration to be passed into popup-menu display
1354         https://bugs.webkit.org/show_bug.cgi?id=132195
1355
1356         Reviewed by Brent Fulgham. With some in-person review comments from Sam Weinig.
1357
1358         Platforms like OS X use a set of predefined sizes for built-in controls
1359         used for <select>: normal, small and mini. Expose that information to
1360         the PopupMenuClient via the PopupMenuStyle, allowing it to be passed
1361         into the platform code in WebKitSystemInterface.
1362
1363         * platform/PopupMenuStyle.h: Add a menu size enum.
1364         (WebCore::PopupMenuStyle::PopupMenuStyle):
1365         (WebCore::PopupMenuStyle::menuSize):
1366         * platform/mac/WebCoreSystemInterface.h: Pass in NSControlSize as a parameter
1367         to WKPopupMenu.
1368         * platform/mac/WebCoreSystemInterface.mm: Ditto.
1369         * rendering/RenderMenuList.cpp:
1370         (RenderMenuList::menuStyle): Ask the RenderTheme to calculate the size
1371         of the menu button, so that it can be added to the PopupMenuStyle.
1372         * rendering/RenderTheme.h: New method to retrieve the menu size.
1373         (WebCore::RenderTheme::popupMenuSize): Convert an NSControlSize into a PopupMenuSize.
1374         * rendering/RenderThemeMac.h: Override the base function, and add a
1375         controlSizeForCell helper.
1376         * rendering/RenderThemeMac.mm:
1377         (WebCore::RenderThemeMac::controlSizeForCell): Used by this new
1378         code and the old setControlSizeForCell to calculate the NSControlSize
1379         that would be used for the button.
1380         (WebCore::RenderThemeMac::setControlSize): Call the new helper.
1381         (WebCore::RenderThemeMac::popupMenuSize): Return the value from the helper.
1382
1383 2014-04-25  Javier Fernandez  <jfernandez@igalia.com>
1384
1385         REGRESSION(r167799): ASSERTION in parseGridTemplateShorthand in fast/css-grid-layout/grid-template-shorthand-get-set.html
1386         https://bugs.webkit.org/show_bug.cgi?id=132194
1387
1388         Reviewed by Martin Robinson.
1389
1390         Properly resolving the grid-template shorthand for the corresponding longhand
1391         properties.
1392
1393         No new tests, grid-template-shorthand-get-set.html already covers this case.
1394
1395         * css/StyleProperties.cpp:
1396         (WebCore::StyleProperties::getPropertyValue):
1397         * css/StylePropertyShorthand.cpp:
1398         (WebCore::shorthandForProperty):
1399         (WebCore::matchingShorthandsForLonghand):
1400         * css/StyleResolver.cpp:
1401         (WebCore::StyleResolver::applyProperty):
1402
1403 2014-04-25  David Hyatt  <hyatt@apple.com>
1404
1405         Column rules not respecting scroll offsets.
1406         https://bugs.webkit.org/show_bug.cgi?id=109683
1407
1408         Reviewed by Dean Jackson.
1409
1410         Added fast/multicol/scrolling-column-rules.html
1411
1412         * rendering/RenderBlock.cpp:
1413         (WebCore::RenderBlock::paintColumnRules):
1414         Make paintColumnRules virtual so that it works with both column implementations.
1415
1416         (WebCore::RenderBlock::paintObject):
1417         Changed to call paintColumnRules with the adjusted scroll offset and to do it after
1418         bailing on the root background only check.
1419
1420         * rendering/RenderBlock.h:
1421         paintColumnRules is now virtual.
1422
1423         * rendering/RenderBlockFlow.cpp:
1424         (WebCore::RenderBlockFlow::paintColumnRules):
1425         (WebCore::RenderBlockFlow::paintBoxDecorations): Deleted.
1426         * rendering/RenderBlockFlow.h:
1427         Got rid of paintBoxDecorations override since it failed when hasBoxDecorations was false
1428         anyway. Override paintColumnRules instead to paint at the right time.
1429
1430 2014-04-23  Jon Honeycutt  <jhoneycutt@apple.com>
1431
1432         Crash applying editing commands from iframe onload event
1433
1434         <https://bugs.webkit.org/show_bug.cgi?id=132103>
1435         <rdar://problem/15696351>
1436
1437         This patch merges the Chromium bug workaround from
1438         <http://src.chromium.org/viewvc/blink?revision=162080&view=revision>,
1439         which prevents reentrancy in CompositeEditCommand::apply().
1440
1441         Reviewed by Darin Adler.
1442
1443         Test: editing/apply-style-iframe-crash.html
1444
1445         * editing/CompositeEditCommand.cpp:
1446         (WebCore::HTMLNames::ReentrancyGuard::isRecursiveCall):
1447         (WebCore::HTMLNames::ReentrancyGuard::Scope::Scope):
1448         (WebCore::HTMLNames::ReentrancyGuard::Scope::~Scope):
1449         (WebCore::CompositeEditCommand::apply):
1450         If this is a recursive call, return early.
1451
1452 2014-04-25  David Hyatt  <hyatt@apple.com>
1453
1454         [New Multicolumn] fast/multicol/hit-test-* layout tests all fail
1455         https://bugs.webkit.org/show_bug.cgi?id=132081
1456
1457         Reviewed by Dean Jackson.
1458
1459         Added a bunch of tests in fast/multicol/newmulticol/compare-with-old-impl/hit-test-*.html
1460
1461         * rendering/RenderBlock.h:
1462         Make offsetForContents public, since I need to call it from RenderMultiColumnSet.
1463
1464         * rendering/RenderMultiColumnFlowThread.cpp:
1465         (WebCore::RenderMultiColumnFlowThread::populate):
1466         Stop an ASSERT in the new columns code on the hit tests by making sure layout state is
1467         disabled when moving children around.
1468
1469         * rendering/RenderMultiColumnSet.cpp:
1470         (WebCore::RenderMultiColumnSet::positionForPoint):
1471         Refactor this function to call a helper function instead, translateRegionPointToFlowThread.
1472
1473         (WebCore::RenderMultiColumnSet::translateRegionPointToFlowThread):
1474         This function is logical (unlike the mistaken physical function I first implemented in
1475         positionForPoint).
1476
1477         (WebCore::RenderMultiColumnSet::updateHitTestResult):
1478         * rendering/RenderMultiColumnSet.h:
1479         Overridden to fill in the correct local coordinate when the HTML document is inside a paginated
1480         RenderView. Note that column spans don't actually work, but once we move over to a 
1481         non-column based pagination API, that will become irrelevant.
1482
1483 2014-04-25  Andreas Kling  <akling@apple.com>
1484
1485         Mark some things with WTF_MAKE_FAST_ALLOCATED.
1486         <https://webkit.org/b/132198>
1487
1488         Use FastMalloc for more things.
1489
1490         Reviewed by Anders Carlsson.
1491
1492         * bindings/js/ScriptController.h:
1493         * dom/DocumentOrderedMap.h:
1494         * inspector/InspectorCSSAgent.h:
1495         * inspector/InspectorDOMAgent.h:
1496         * inspector/InspectorDOMDebuggerAgent.h:
1497         * inspector/InspectorDOMStorageAgent.h:
1498         * inspector/InspectorDatabaseAgent.h:
1499         * inspector/InspectorLayerTreeAgent.h:
1500         * inspector/InspectorPageAgent.h:
1501         * inspector/InspectorResourceAgent.h:
1502         * inspector/InspectorTimelineAgent.h:
1503         * inspector/InspectorWorkerAgent.h:
1504         * inspector/PageRuntimeAgent.h:
1505         * loader/HistoryController.h:
1506         * page/DeviceClient.h:
1507         * page/DeviceController.h:
1508         * page/EventHandler.h:
1509         * page/Page.h:
1510         * page/scrolling/ScrollingStateNode.h:
1511         * platform/graphics/FontGenericFamilies.h:
1512         * platform/graphics/FontPlatformData.h:
1513
1514 2014-04-25  Radu Stavila  <stavila@adobe.com>
1515
1516         [CSS Regions] Rename objectShouldPaintInFlowRegion to something more clear
1517         https://bugs.webkit.org/show_bug.cgi?id=132050
1518
1519         Reviewed by Andreas Kling.
1520
1521         The objectShouldPaintInFlowRegion is no longer used only by the painting process
1522         but also for hit-testing, so it was renamed to something more generic (objectShouldFragmentInFlowRegion).
1523
1524         No new tests required, it's just a method rename.
1525
1526         * rendering/RenderBlock.cpp:
1527         (WebCore::RenderBlock::paint):
1528         (WebCore::RenderBlock::selectionGaps):
1529         (WebCore::RenderBlock::nodeAtPoint):
1530         * rendering/RenderBox.cpp:
1531         (WebCore::RenderBox::positionForPoint):
1532         * rendering/RenderFlowThread.cpp:
1533         (WebCore::RenderFlowThread::objectShouldFragmentInFlowRegion):
1534         (WebCore::RenderFlowThread::objectShouldPaintInFlowRegion): Deleted.
1535         * rendering/RenderFlowThread.h:
1536         * rendering/RenderLayer.cpp:
1537         (WebCore::RenderLayer::paintLayer):
1538         (WebCore::RenderLayer::hitTestLayer):
1539         * rendering/RenderRegion.cpp:
1540         (WebCore::RenderRegion::ensureOverflowForBox):
1541         * rendering/RenderReplaced.cpp:
1542         (WebCore::RenderReplaced::shouldPaint):
1543
1544 2014-04-25  Enrica Casucci  <enrica@apple.com>
1545
1546         iOS build fix after http://trac.webkit.org/changeset/167803
1547         Unreviewed.
1548
1549         * page/Frame.cpp:
1550         (WebCore::Frame::checkOverflowScroll):
1551         * rendering/RenderBlock.cpp:
1552         (WebCore::positionForPointRespectingEditingBoundaries):
1553
1554 2014-04-24  David Hyatt  <hyatt@apple.com>
1555
1556         [New Multicolumn] Add support for offsetLeft and offsetTop.
1557         https://bugs.webkit.org/show_bug.cgi?id=132080
1558
1559         Reviewed by Andrei Bucur.
1560
1561         Added fast/multicol/client-spanners-complex.html and offset-top-left.html
1562
1563         * rendering/RenderBoxModelObject.cpp:
1564         (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
1565         Patch the offsetLeft/Top loop to handle calling into RenderMultiColumnFlowThread
1566         in order to adjust the coordinates for the new multicolumn layout.
1567
1568         * rendering/RenderMultiColumnFlowThread.cpp:
1569         (WebCore::RenderMultiColumnFlowThread::mapFromFlowToRegion):
1570         Modified to use a helper that can be shared by offsetLeft/Top code. This code
1571         ran for client rects, and I'm moving/refactoring it for more sharing.
1572
1573         (WebCore::RenderMultiColumnFlowThread::physicalTranslationOffsetFromFlowToRegion):
1574         (WebCore::RenderMultiColumnFlowThread::physicalTranslationFromFlowToRegion):
1575         * rendering/RenderMultiColumnFlowThread.h:
1576         New functions that beef up what was in mapFromFlowToRegion and fix some bugs
1577         with the translation code.
1578
1579         * rendering/RenderMultiColumnSet.cpp:
1580         (WebCore::RenderMultiColumnSet::columnTranslationForOffset):
1581         Patched to factor in the flow thread portion rect of the specific multicolumn set.
1582
1583         * rendering/RenderObject.h:
1584         (WebCore::RenderObject::isRenderMultiColumnFlowThread):
1585         Added for toRenderMultiColumnFlowThread capability.
1586
1587 2014-04-25  Brent Fulgham  <bfulgham@apple.com>
1588
1589         ScrollingCoordinator is unaware of topContentInset
1590         https://bugs.webkit.org/show_bug.cgi?id=132158
1591         <rdar://problem/16706152>
1592
1593         Reviewed by Darin Adler.
1594
1595         Test: platform/mac/fast/scrolling/scroll-select-bottom-test.html
1596
1597         The calculation of non-fast-scrollable regions does not currently take
1598         the topContentOffset into account. Consequently, the logic that decides
1599         whether to stay on the scrolling thread, or drop down to an individual
1600         page element, can make the wrong choice. This is especially true for
1601         small scrollable regions (such as <select> elements), where the
1602         topContentInset may be quite close to the size of the scrollable
1603          element itself.
1604
1605         * page/scrolling/ScrollingCoordinator.cpp:
1606         (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion): Also
1607         include the topContentInset value in our calculation.
1608
1609 2014-04-25  Javier Fernandez  <jfernandez@igalia.com>
1610
1611         REGRESSION(r167799): Breaks debug build
1612         https://bugs.webkit.org/show_bug.cgi?id=132194
1613
1614         Reviewed by Andrei Bucur.
1615
1616         Fix the debug bots after r167799
1617
1618         No new tests, no new functionality.
1619
1620         * css/CSSParser.cpp:
1621         (WebCore::CSSParser::parseGridTemplateShorthand):
1622
1623 2014-04-25  Miyoung Shin  <myid.shin@samsung.com>
1624
1625         Web process is crashed during dispatching touchEvent created by JS.
1626         https://bugs.webkit.org/show_bug.cgi?id=113225
1627
1628         Reviewed by Benjamin Poulain.
1629
1630         TouchEvent created by JS should have the necessary attributes
1631         of touches, targetTouches and changedTouches.
1632         It should be verified weather there are touchLists before dispatching touch event.
1633
1634         Test: fast/events/touch/create-touch-event-without-touchList.html
1635
1636         * dom/EventDispatcher.cpp:
1637         (WebCore::EventDispatcher::dispatchEvent):
1638         (WebCore::EventPath::updateTouchLists):
1639         (WebCore::addRelatedNodeResolversForTouchList): Deleted.
1640
1641 2014-04-25  Philippe Normand  <pnormand@igalia.com>
1642
1643         [GTK] File webkitRelativePath attribute was removed in r163483
1644         https://bugs.webkit.org/show_bug.cgi?id=132193
1645
1646         Reviewed by Carlos Garcia Campos.
1647
1648         Add the removed getter as deprecated API to keep backwards compatibility.
1649
1650         * bindings/gobject/WebKitDOMDeprecated.cpp:
1651         (webkit_dom_file_get_webkit_relative_path):
1652         * bindings/gobject/WebKitDOMDeprecated.h:
1653         * bindings/gobject/WebKitDOMDeprecated.symbols:
1654
1655 2014-04-25  Radu Stavila  <stavila@adobe.com>
1656
1657         [CSS Regions] Overflow selection doesn't work properly
1658         https://bugs.webkit.org/show_bug.cgi?id=130715
1659
1660         Reviewed by David Hyatt.
1661
1662         When hit-testing, painting block selection gaps and searching for the node at a specific point inside a flow thread,
1663         the region range of the box being checked must be validated in order to not return false positives. Otherwise, hit-testing
1664         at the top of region B could hit elements that overflow the bottom of region A.
1665
1666         Tests: fast/regions/selection-in-overflow-hit-testing.html
1667                fast/regions/selection-in-overflow.html
1668                fast/regions/selection-in-text-after-overflow-hit-testing.html
1669
1670         * accessibility/AccessibilityRenderObject.cpp:
1671         (WebCore::AccessibilityRenderObject::visiblePositionRangeForLine):
1672         (WebCore::AccessibilityRenderObject::visiblePositionForPoint):
1673         * dom/Document.cpp:
1674         (WebCore::Document::caretRangeFromPoint):
1675         * editing/FrameSelection.cpp:
1676         (WebCore::FrameSelection::contains):
1677         * editing/VisibleUnits.cpp:
1678         (WebCore::previousLinePosition):
1679         (WebCore::nextLinePosition):
1680         * page/EventHandler.cpp:
1681         (WebCore::EventHandler::selectClosestWordFromHitTestResult):
1682         (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent):
1683         (WebCore::EventHandler::handleMousePressEventTripleClick):
1684         (WebCore::EventHandler::handleMousePressEventSingleClick):
1685         (WebCore::selectionExtentRespectingEditingBoundary):
1686         (WebCore::EventHandler::updateSelectionForMouseDrag):
1687         (WebCore::EventHandler::handleMouseReleaseEvent):
1688         * page/Frame.cpp:
1689         (WebCore::Frame::visiblePositionForPoint):
1690         * rendering/RenderBlock.cpp:
1691         (WebCore::RenderBlock::selectionGaps):
1692         (WebCore::RenderBlock::nodeAtPoint):
1693         (WebCore::positionForPointRespectingEditingBoundaries):
1694         (WebCore::RenderBlock::positionForPointWithInlineChildren):
1695         (WebCore::isChildHitTestCandidate):
1696         (WebCore::RenderBlock::positionForPoint):
1697         * rendering/RenderBlock.h:
1698         * rendering/RenderBlockFlow.cpp:
1699         (WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
1700         (WebCore::RenderBlockFlow::positionForPoint):
1701         * rendering/RenderBlockFlow.h:
1702         * rendering/RenderBox.cpp:
1703         (WebCore::RenderBox::positionForPoint):
1704         * rendering/RenderBox.h:
1705         * rendering/RenderFileUploadControl.cpp:
1706         (WebCore::RenderFileUploadControl::positionForPoint):
1707         * rendering/RenderFileUploadControl.h:
1708         * rendering/RenderInline.cpp:
1709         (WebCore::RenderInline::positionForPoint):
1710         * rendering/RenderInline.h:
1711         * rendering/RenderLineBreak.cpp:
1712         (WebCore::RenderLineBreak::positionForPoint):
1713         * rendering/RenderLineBreak.h:
1714         * rendering/RenderMultiColumnSet.cpp:
1715         (WebCore::RenderMultiColumnSet::positionForPoint):
1716         * rendering/RenderMultiColumnSet.h:
1717         * rendering/RenderObject.cpp:
1718         (WebCore::RenderObject::positionForPoint):
1719         * rendering/RenderObject.h:
1720         * rendering/RenderRegion.cpp:
1721         (WebCore::RenderRegion::positionForPoint):
1722         * rendering/RenderRegion.h:
1723         * rendering/RenderReplaced.cpp:
1724         (WebCore::RenderReplaced::positionForPoint):
1725         * rendering/RenderReplaced.h:
1726         * rendering/RenderText.cpp:
1727         (WebCore::RenderText::positionForPoint):
1728         * rendering/RenderText.h:
1729         * rendering/svg/RenderSVGInlineText.cpp:
1730         (WebCore::RenderSVGInlineText::positionForPoint):
1731         * rendering/svg/RenderSVGInlineText.h:
1732         * rendering/svg/RenderSVGText.cpp:
1733         (WebCore::RenderSVGText::positionForPoint):
1734         * rendering/svg/RenderSVGText.h:
1735
1736 2014-04-25  Philippe Normand  <pnormand@igalia.com>
1737
1738         [GTK] Iframe seamless support was removed in r163427
1739         https://bugs.webkit.org/show_bug.cgi?id=132192
1740
1741         Reviewed by Carlos Garcia Campos.
1742
1743         Add the removed get and set methods as deprecated API to keep
1744         backwards compatibility.
1745
1746         * bindings/gobject/WebKitDOMDeprecated.cpp:
1747         (webkit_dom_processing_instruction_set_data):
1748         (webkit_dom_html_iframe_element_get_seamless):
1749         (webkit_dom_html_iframe_element_set_seamless):
1750         * bindings/gobject/WebKitDOMDeprecated.h:
1751         * bindings/gobject/WebKitDOMDeprecated.symbols:
1752
1753 2014-04-25  Philippe Normand  <pnormand@igalia.com>
1754
1755         [GTK] HTMLInputElement webkitdirectory property was removed in r163483
1756         https://bugs.webkit.org/show_bug.cgi?id=132191
1757
1758         Reviewed by Carlos Garcia Campos.
1759
1760         Add the removed get and set methods as deprecated API to keep
1761         backwards compatibility.
1762
1763         * bindings/gobject/WebKitDOMDeprecated.cpp:
1764         (webkit_dom_html_input_element_get_webkitdirectory):
1765         (webkit_dom_html_input_element_set_webkitdirectory):
1766         * bindings/gobject/WebKitDOMDeprecated.h:
1767         * bindings/gobject/WebKitDOMDeprecated.symbols:
1768
1769 2014-04-25  Javier Fernandez  <jfernandez@igalia.com>
1770
1771         [CSS Grid Layout] Implementation of the grid-template shorthand.
1772         https://bugs.webkit.org/show_bug.cgi?id=128980
1773
1774         Reviewed by Darin Adler.
1775
1776         This shorthand sets the values for the grid-template-columns,
1777         grid-template-rows and grid-template-areas, so the implementation
1778         tries to reuse as much available parsing functions as possible.
1779
1780         The "parsingGridTrackList" was refactored to return a CSSValue and
1781         let the "parseValue" function to assign the property value. The
1782         "forwardSlash" operator is now valid when the track-list clause is
1783         part of a shorthand. The "parseValue" function checkouts that only
1784         additional clauses are allowed when processing shorthands; the
1785         grid-columns-rows-get-set.html tests was modified to verify this.
1786
1787         The "parseGridTemplateAreas" was refactored too, in order to
1788         process single areas's rows. This is very useful for the
1789         gris-template secondary syntax, which mixes areas and rows values.
1790
1791         Finally, the "parseGirdLineNames" function was modified as well by
1792         defining an new argument to concatenate head/tail custom-ident
1793         elements and ensure the identList is at the heading index, since
1794         it's now possible the parseList was rewound.
1795
1796         The implementation of the grid-template shorthand tries first to
1797         match the <grid-template-columns> / <grid-template-rows> syntax,
1798         failing back to the secondary syntax if needed.  This approach
1799         requires to rewind the parseList but it produces a clearer code.
1800
1801         Test: fast/css-grid-layout/grid-template-shorthand-get-set.html
1802
1803         * css/CSSComputedStyleDeclaration.cpp:
1804         (WebCore::ComputedStyleExtractor::propertyValue):
1805         * css/CSSParser.cpp:
1806         (WebCore::CSSParser::parseValue):
1807         (WebCore::CSSParser::parseGridTemplateRowsAndAreas):
1808         (WebCore::CSSParser::parseGridTemplateShorthand):
1809         (WebCore::CSSParser::parseGridLineNames):
1810         (WebCore::CSSParser::parseGridTrackList):
1811         (WebCore::CSSParser::parseGridTemplateAreasRow):
1812         (WebCore::CSSParser::parseGridTemplateAreas):
1813         * css/CSSParser.h:
1814         * css/CSSParserValues.h:
1815         (WebCore::CSSParserValueList::setCurrentIndex):
1816         * css/CSSPropertyNames.in:
1817         * css/StylePropertyShorthand.cpp:
1818         (WebCore::webkitGridTemplateShorthand):
1819         * css/StylePropertyShorthand.h:
1820
1821 2014-04-25  Andreas Kling  <akling@apple.com>
1822
1823         Remove two unused SVGDocument functions.
1824         <https://webkit.org/b/132178>
1825
1826         Reviewed by Antti Koivisto.
1827
1828         * svg/SVGDocument.cpp:
1829         (WebCore::SVGDocument::dispatchZoomEvent): Deleted.
1830         (WebCore::SVGDocument::dispatchScrollEvent): Deleted.
1831         * svg/SVGDocument.h:
1832
1833 2014-04-25  Ion Rosca  <rosca@adobe.com>
1834
1835         Incomplete body painting when using blend modes
1836         https://bugs.webkit.org/show_bug.cgi?id=131889
1837
1838         The incomplete painting was caused by the transparency layer created for
1839         the root renderer. We can safely skip creating this transparency layer at
1840         the root level, as there is nothing else being painted behind this layer that
1841         could be used erroneously as a backdrop.
1842
1843         Reviewed by Simon Fraser.
1844
1845         Test: css3/compositing/blend-mode-with-body.html
1846
1847         * rendering/RenderLayer.h:
1848         Changing RenderLayer::paintsWithTransparency so that it will not
1849         return true when the root renderer needs to isolate blending.
1850
1851 2014-04-25  Darin Adler  <darin@apple.com>
1852
1853         ASSERTION FAILED: "!m_isolatedWorld->isNormal() || m_wrapper || !m_jsFunction" in svg/custom/use-instanceRoot-event-listeners.xhtml
1854         https://bugs.webkit.org/show_bug.cgi?id=132148
1855
1856         Reviewed by Andreas Kling.
1857
1858         Changed how JSCustomMarkFunction generation works. Instead of leaving out
1859         the generated visitChildren function, just generate a call to visitAdditionalChildren.
1860         This eliminates the need to repeat boilerplate.
1861
1862         The fix for the above bug was to correct mistaken logic where JSSVGElementInstance
1863         had a visitChildren that did not properly mark event listeners because it explicitly
1864         did not call through to the base class visitChildren. The new arrangement makes that
1865         mistake impossible.
1866
1867         * bindings/js/JSAttrCustom.cpp:
1868         (WebCore::JSAttr::visitAdditionalChildren): Use this instead of visitChildren.
1869         * bindings/js/JSAudioTrackCustom.cpp:
1870         (WebCore::JSAudioTrack::visitAdditionalChildren): Ditto.
1871         * bindings/js/JSAudioTrackListCustom.cpp:
1872         (WebCore::JSAudioTrackList::visitAdditionalChildren): Ditto.
1873         * bindings/js/JSCSSRuleCustom.cpp:
1874         (WebCore::JSCSSRule::visitAdditionalChildren): Ditto.
1875         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1876         (WebCore::JSCSSStyleDeclaration::visitAdditionalChildren): Ditto.
1877         * bindings/js/JSCanvasRenderingContextCustom.cpp:
1878         (WebCore::JSCanvasRenderingContext::visitAdditionalChildren): Ditto.
1879         * bindings/js/JSCryptoKeyPairCustom.cpp:
1880         (WebCore::JSCryptoKeyPair::visitAdditionalChildren): Ditto.
1881         * bindings/js/JSDOMWindowCustom.cpp:
1882         (WebCore::JSDOMWindow::visitAdditionalChildren): Ditto.
1883         * bindings/js/JSMessageChannelCustom.cpp:
1884         (WebCore::JSMessageChannel::visitAdditionalChildren): Ditto.
1885         * bindings/js/JSMessagePortCustom.cpp:
1886         (WebCore::JSMessagePort::visitAdditionalChildren): Ditto.
1887         * bindings/js/JSNodeCustom.cpp:
1888         (WebCore::JSNode::visitAdditionalChildren): Ditto.
1889         * bindings/js/JSNodeFilterCustom.cpp:
1890         (WebCore::JSNodeFilter::visitAdditionalChildren): Ditto.
1891         * bindings/js/JSNodeIteratorCustom.cpp:
1892         (WebCore::JSNodeIterator::visitAdditionalChildren): Ditto.
1893         * bindings/js/JSSVGElementInstanceCustom.cpp:
1894         (WebCore::JSSVGElementInstance::visitAdditionalChildren): Ditto.
1895         * bindings/js/JSSharedWorkerCustom.cpp:
1896         (WebCore::JSSharedWorker::visitAdditionalChildren): Ditto.
1897         * bindings/js/JSStyleSheetCustom.cpp:
1898         (WebCore::JSStyleSheet::visitAdditionalChildren): Ditto.
1899         * bindings/js/JSTextTrackCueCustom.cpp:
1900         (WebCore::JSTextTrackCue::visitAdditionalChildren): Ditto.
1901         * bindings/js/JSTextTrackCustom.cpp:
1902         (WebCore::JSTextTrack::visitAdditionalChildren): Ditto.
1903         * bindings/js/JSTextTrackListCustom.cpp:
1904         (WebCore::JSTextTrackList::visitAdditionalChildren): Ditto.
1905         * bindings/js/JSTreeWalkerCustom.cpp:
1906         (WebCore::JSTreeWalker::visitAdditionalChildren): Ditto.
1907         * bindings/js/JSVideoTrackCustom.cpp:
1908         (WebCore::JSVideoTrack::visitAdditionalChildren): Ditto.
1909         * bindings/js/JSVideoTrackListCustom.cpp:
1910         (WebCore::JSVideoTrackList::visitAdditionalChildren): Ditto.
1911         * bindings/js/JSWebGLRenderingContextCustom.cpp:
1912         (WebCore::JSWebGLRenderingContext::visitAdditionalChildren): Ditto.
1913         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
1914         (WebCore::JSWorkerGlobalScope::visitAdditionalChildren): Ditto.
1915         * bindings/js/JSXMLHttpRequestCustom.cpp:
1916         (WebCore::JSXMLHttpRequest::visitAdditionalChildren): Ditto.
1917         * bindings/js/JSXPathResultCustom.cpp:
1918         (WebCore::JSXPathResult::visitAdditionalChildren): Ditto.
1919
1920         * bindings/js/JSDOMGlobalObject.cpp:
1921         (WebCore::JSDOMGlobalObject::visitChildren): Rewrote to use modern for loops.
1922
1923         * bindings/scripts/CodeGeneratorJS.pm:
1924         (GenerateHeader): Generate declaration of visitAdditionalChildren.
1925         (GenerateImplementation): Generate call to visitAdditionalChildren.
1926
1927 2014-04-24  Andreas Kling  <akling@apple.com>
1928
1929         [iOS WebKit2] Enable optimization to mmap downloaded resources once they become file-backed.
1930         <https://webkit.org/b/132171>
1931         <rdar://problem/16720733>
1932
1933         Add a missing export for the USE(CFNETWORK) + WebKit2 combo.
1934
1935         Reviewed by Antti Koivisto.
1936
1937         * WebCore.exp.in:
1938
1939 2014-04-24  Darin Adler  <darin@apple.com>
1940
1941         FrameLoader::checkCompleted can hit the "ref'ing while destroyed" assertion
1942         https://bugs.webkit.org/show_bug.cgi?id=132163
1943         rdar://problem/16720640
1944
1945         Reviewed by Brady Eidson.
1946
1947         Couldn't find a way to test this yet. Would be nice to have a test.
1948
1949         * loader/FrameLoader.cpp:
1950         (WebCore::FrameLoader::checkCompleted): Move protector until after we check
1951         if the frame is already complete. That can happen in practice when this is
1952         called from within the frame's destructor. All the code that runs before the
1953         protector simply checks state and does not require protection.
1954
1955 2014-04-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1956
1957         Mark Supplement instead of RefCountedSupplement in NavigatorContentUtils 
1958         https://bugs.webkit.org/show_bug.cgi?id=132151
1959
1960         Reviewed by Darin Adler.
1961
1962         Though Original goal was to make it sharable across navigator instances, the NavigatorContentUtils
1963         has used RefCountedSupplement<Page> instead of RefCountedSupplement<Navigator>. This patch makes it
1964         use Supplement<Page> because there is no scenario which needs to be shared across navigator instances.
1965
1966         Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=171403.
1967
1968         No new tests, no behavior changes.
1969
1970         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
1971         (WebCore::NavigatorContentUtils::from):
1972         (WebCore::NavigatorContentUtils::create):
1973         (WebCore::provideNavigatorContentUtilsTo):
1974         * Modules/navigatorcontentutils/NavigatorContentUtils.h:
1975
1976 2014-04-24  Commit Queue  <commit-queue@webkit.org>
1977
1978         Unreviewed, rolling out r167700.
1979         https://bugs.webkit.org/show_bug.cgi?id=132142
1980
1981         Incorrectly reverted the change in r167547 for
1982         webkit.org/b/131898 (Requested by rniwa on #webkit).
1983
1984         Reverted changeset:
1985
1986         "Cursor doesn't change back to pointer when leaving the Safari
1987         window"
1988         https://bugs.webkit.org/show_bug.cgi?id=132038
1989         http://trac.webkit.org/changeset/167700
1990
1991 2014-04-24  Brady Eidson  <beidson@apple.com>
1992
1993         Rename "IMAGE_CONTROLS" feature to "SERVICE_CONTROLS"
1994         https://bugs.webkit.org/show_bug.cgi?id=132155
1995
1996         Reviewed by Tim Horton.
1997
1998         No new tests (No change in behavior).
1999
2000         * Configurations/FeatureDefines.xcconfig:
2001         * DerivedSources.make:
2002         * WebCore.exp.in:
2003         * css/CSSDefaultStyleSheets.cpp:
2004         (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
2005         * css/CSSPrimitiveValueMappings.h:
2006         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2007         * css/CSSValueKeywords.in:
2008         * dom/Node.h:
2009         * html/HTMLImageElement.cpp:
2010         (WebCore::HTMLImageElement::HTMLImageElement):
2011         (WebCore::HTMLImageElement::parseAttribute):
2012         (WebCore::HTMLImageElement::didAttachRenderers):
2013         * html/HTMLImageElement.h:
2014         * html/shadow/ImageControlsRootElement.cpp:
2015         * html/shadow/ImageControlsRootElement.h:
2016         * html/shadow/mac/ImageControlsButtonElementMac.cpp:
2017         * html/shadow/mac/ImageControlsButtonElementMac.h:
2018         * html/shadow/mac/ImageControlsRootElementMac.cpp:
2019         * html/shadow/mac/ImageControlsRootElementMac.h:
2020         * page/ContextMenuContext.cpp:
2021         (WebCore::ContextMenuContext::ContextMenuContext):
2022         * page/ContextMenuContext.h:
2023         * page/ContextMenuController.cpp:
2024         (WebCore::ContextMenuController::maybeCreateContextMenu):
2025         (WebCore::ContextMenuController::populate):
2026         * page/ContextMenuController.h:
2027         * page/Settings.in:
2028         * platform/ThemeTypes.h:
2029         * rendering/RenderImage.cpp:
2030         (WebCore::RenderImage::canHaveChildren):
2031         * rendering/RenderTheme.cpp:
2032         (WebCore::RenderTheme::adjustStyle):
2033         (WebCore::RenderTheme::paint):
2034         (WebCore::RenderTheme::paintBorderOnly):
2035         (WebCore::RenderTheme::paintDecorations):
2036         * rendering/RenderTheme.h:
2037         * rendering/RenderThemeMac.h:
2038         * rendering/RenderThemeMac.mm:
2039         (WebCore::RenderThemeMac::servicesRolloverButtonCell):
2040         (WebCore::RenderThemeMac::paintImageControlsButton):
2041         (WebCore::RenderThemeMac::imageControlsButtonSize):
2042
2043 2014-04-24  Timothy Hatcher  <timothy@apple.com>
2044
2045         Web Inspector: Restore PageDebuggerAgent::enable / disable
2046         https://bugs.webkit.org/show_bug.cgi?id=132156
2047
2048         Restore functions that were eroniously removed in r167530.
2049
2050         Reviewed by Joseph Pecoraro.
2051
2052         * inspector/PageDebuggerAgent.cpp:
2053         (WebCore::PageDebuggerAgent::enable): Added.
2054         (WebCore::PageDebuggerAgent::disable): Added.
2055         * inspector/PageDebuggerAgent.h:
2056
2057 2014-04-24  Alexey Proskuryakov  <ap@apple.com>
2058
2059         Dropzone effects don't work in non-file documents
2060         https://bugs.webkit.org/show_bug.cgi?id=131770
2061
2062         Reviewed by Darin Adler.
2063
2064         File documents have two quirks that were making dropzone work in these before:
2065         1. An ancient hack for Dashboard allows pasteboard access from JS.
2066         2. On Mac, sandbox doesn't prevent File object creation, as we already have the access.
2067
2068         * dom/DataTransfer.cpp:
2069         (WebCore::DataTransfer::hasFileOfType):
2070         (WebCore::DataTransfer::hasStringOfType):
2071         * dom/DataTransfer.h:
2072         Moved these functions from EventHandler to DataTransfer. We can't create a DataTransfer
2073         with Files while dragging, security doesn't permit us to. But we can get the file name.
2074
2075         * fileapi/File.cpp:
2076         (WebCore::createBlobDataForFile):
2077         (WebCore::createBlobDataForFileWithName):
2078         (WebCore::File::contentTypeFromFilePath):
2079         (WebCore::getContentTypeFromFileName): Deleted.
2080         * fileapi/File.h:
2081         Exposed a function to get file type from path without creating a File first.
2082         This is much cheaper than creating a File, and works even when sandbox disallows
2083         read access to content, such as when dragging over a target.
2084
2085         * page/EventHandler.cpp:
2086         (WebCore::hasDropZoneType):
2087         (WebCore::hasFileOfType): Deleted.
2088         (WebCore::hasStringOfType): Deleted.
2089
2090 2014-04-24  Commit Queue  <commit-queue@webkit.org>
2091
2092         Unreviewed, rolling out r167441.
2093         https://bugs.webkit.org/show_bug.cgi?id=132152
2094
2095         Caused full screen regressions on vimeo, youtube, and others.
2096         (Requested by jernoble on #webkit).
2097
2098         Reverted changeset:
2099
2100         "Fullscreen media controls are unusable in pagination mode"
2101         https://bugs.webkit.org/show_bug.cgi?id=131705
2102         http://trac.webkit.org/changeset/167441
2103
2104 2014-04-24  Adenilson Cavalcanti  <cavalcantii@gmail.com>
2105
2106         Unused class forward declarations in Page
2107         https://bugs.webkit.org/show_bug.cgi?id=132141
2108
2109         Reviewed by Benjamin Poulain.
2110
2111         No new tests, no change on behavior.
2112
2113         * page/Page.h:
2114
2115 2014-04-24  Eric Carlson  <eric.carlson@apple.com>
2116
2117         [Mac] don't ask for AVAssetTrack properties before they are available
2118         https://bugs.webkit.org/show_bug.cgi?id=131902
2119         <rdar://problem/16505076>
2120
2121         Reviewed by Brent Fulgham.
2122
2123         No new tests, the behavior this changes can not be tested with a layout test.
2124
2125         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2126         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2127         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Initialize
2128             m_cachedTotalBytes.
2129         (WebCore::MediaPlayerPrivateAVFoundationObjC::beginLoadingMetadata): Don't report that
2130             metadata has been loaded until the track properties we need have been loaded too.
2131         (WebCore::MediaPlayerPrivateAVFoundationObjC::totalBytes): Cache totalBytes instead
2132             of recalculating it every time.
2133         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange): Invalidate cached
2134             total bytes.
2135         (WebCore::assetTrackMetadataKeyNames): Array of AVAssetTrack properties we use.
2136
2137 2014-04-24  Myles C. Maxfield  <mmaxfield@apple.com>
2138
2139         Unify platformWidthForGlyph across OS X and iOS
2140         https://bugs.webkit.org/show_bug.cgi?id=132036
2141
2142         Reviewed by Darin Adler.
2143
2144         This patch creates on shared SimpleFontData::platformWidthForGlyph() function for both OS X and iOS.
2145
2146         No new tests are necessary because there should be no behavior changes.
2147
2148         * platform/graphics/SimpleFontData.h: Signatures for two helper functions
2149         * platform/graphics/ios/SimpleFontDataIOS.mm: Replace iOS implementation of platformWidthForGlyph() with
2150         implementations of only the two helper functions
2151         (WebCore::SimpleFontData::getRenderingStyle): Compute style argument to CGFontGetGlyphAdvancesForStyle()
2152         (WebCore::SimpleFontData::advanceForColorBitmapFont): iOS doesn't have color bitmap fonts
2153         (WebCore::SimpleFontData::platformWidthForGlyph): Deleted.
2154         * platform/graphics/mac/SimpleFontDataMac.mm:
2155         (WebCore::SimpleFontData::getRenderingStyle): Compute style argument to CGFontGetGlyphAdvancesForStyle()
2156         (WebCore::SimpleFontData::advanceForColorBitmapFont): Use [NSFont advancementForGlyph] to compute the advance
2157         (WebCore::hasCustomTracking): Removed #if
2158         (WebCore::isEmoji): Only relevant on iOS
2159         (WebCore::SimpleFontData::platformWidthForGlyph): Shared implementation. Calls helper functions.
2160
2161 2014-04-24  Zalan Bujtas  <zalan@apple.com>
2162
2163         Subpixel rendering: Clipping on text areas when shifted by one device pixel.
2164         https://bugs.webkit.org/show_bug.cgi?id=132008
2165
2166         Reviewed by Darin Adler.
2167
2168         Make RenderTheme paint* functions LayoutRect aware. Textarea is device pixel snapped, while
2169         other theme controls are still on integral size/positions.
2170
2171         Test: fast/forms/hidpi-textarea-on-subpixel-position.html
2172
2173         * rendering/RenderBox.cpp:
2174         (WebCore::RenderBox::paintBoxDecorations):
2175         * rendering/RenderTheme.cpp:
2176         (WebCore::RenderTheme::paint):
2177         (WebCore::RenderTheme::paintBorderOnly):
2178         (WebCore::RenderTheme::paintDecorations):
2179         * rendering/RenderTheme.h:
2180         (WebCore::RenderTheme::paintTextField):
2181         (WebCore::RenderTheme::paintTextFieldDecorations):
2182         (WebCore::RenderTheme::paintTextArea):
2183         (WebCore::RenderTheme::paintTextAreaDecorations):
2184         * rendering/RenderThemeIOS.h:
2185         * rendering/RenderThemeIOS.mm:
2186         (WebCore::RenderThemeIOS::paintTextFieldDecorations):
2187         (WebCore::RenderThemeIOS::paintTextAreaDecorations):
2188         * rendering/RenderThemeMac.h:
2189         * rendering/RenderThemeMac.mm:
2190         (WebCore::RenderThemeMac::paintTextField):
2191         (WebCore::RenderThemeMac::paintTextArea):
2192
2193 2014-04-24  Myles C. Maxfield  <mmaxfield@apple.com>
2194
2195         FontCache::fontCache() never returns nullptr so it can be made to return a reference instead
2196         https://bugs.webkit.org/show_bug.cgi?id=132110
2197
2198         Reviewed by Tim Horton.
2199
2200         Updates callers to use '.' instead of '->'.
2201
2202         No new tests are necessary because there should be no behavior change.
2203
2204         * css/CSSFontFaceSource.cpp:
2205         (WebCore::CSSFontFaceSource::getFontData):
2206         * css/CSSFontSelector.cpp:
2207         (WebCore::CSSFontSelector::CSSFontSelector):
2208         (WebCore::CSSFontSelector::~CSSFontSelector):
2209         (WebCore::CSSFontSelector::addFontFaceRule):
2210         (WebCore::fontDataForGenericFamily):
2211         (WebCore::CSSFontSelector::getFallbackFontData):
2212         * platform/MemoryPressureHandler.cpp:
2213         (WebCore::MemoryPressureHandler::releaseMemory):
2214         * platform/graphics/FontCache.cpp:
2215         (WebCore::fontCache): Return a reference
2216         * platform/graphics/FontCache.h:
2217         (WebCore::FontCachePurgePreventer::FontCachePurgePreventer):
2218         (WebCore::FontCachePurgePreventer::~FontCachePurgePreventer):
2219         * platform/graphics/FontGlyphs.cpp:
2220         (WebCore::FontGlyphs::FontGlyphs):
2221         (WebCore::FontGlyphs::releaseFontData):
2222         (WebCore::FontGlyphs::realizeFontDataAt):
2223         (WebCore::FontGlyphs::glyphDataAndPageForCharacter):
2224         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
2225         (WebCore::FontPlatformData::verticalData):
2226         * platform/graphics/ios/SimpleFontDataIOS.mm:
2227         (WebCore::SimpleFontData::platformCreateScaledFontData):
2228         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
2229         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
2230         * platform/graphics/mac/FontCacheMac.mm:
2231         (WebCore::invalidateFontCache):
2232         (WebCore::fontCacheRegisteredFontsChangedNotificationCallback):
2233         * platform/graphics/mac/SimpleFontDataMac.mm:
2234         (WebCore::SimpleFontData::platformDestroy):
2235         (WebCore::SimpleFontData::platformCreateScaledFontData):
2236         * platform/graphics/win/FontCacheWin.cpp:
2237         (WebCore::getCJKCodePageMasks):
2238         * platform/graphics/win/SimpleFontDataWin.cpp:
2239         (WebCore::SimpleFontData::containsCharacters):
2240         * platform/graphics/wince/FontCacheWinCE.cpp:
2241         (WebCore::getCJKCodePageMasks):
2242         * platform/graphics/wince/FontPlatformData.cpp:
2243         (WebCore::FontFamilyCodePageInfo::codePages):
2244         (WebCore::FixedSizeFontData::create):
2245         * platform/graphics/wince/GlyphPageTreeNodeWinCE.cpp:
2246         (WebCore::GlyphPage::fill):
2247         * platform/graphics/wince/SimpleFontDataWinCE.cpp:
2248         (WebCore::SimpleFontData::platformCreateScaledFontData):
2249         (WebCore::SimpleFontData::containsCharacters):
2250
2251 2014-04-24  Eric Carlson  <eric.carlson@apple.com>
2252
2253         [iOS] Manage AudioSession category according to media type
2254         https://bugs.webkit.org/show_bug.cgi?id=132096
2255
2256         Reviewed by Jer Noble.
2257
2258         * WebCore.exp.in: Export setting.
2259
2260         * html/HTMLMediaSession.cpp:
2261         (WebCore::HTMLMediaSession::HTMLMediaSession):
2262         (WebCore::initializeAudioSession): Deleted.
2263
2264         * page/Settings.cpp:
2265         * page/Settings.h:
2266         (WebCore::Settings::setShouldManageAudioSession): New.
2267         (WebCore::Settings::shouldManageAudioSession): Ditto.
2268
2269         * platform/audio/ios/AudioDestinationIOS.cpp:
2270         (WebCore::AudioDestinationIOS::AudioDestinationIOS): Use a MediaSession instead of inheriting
2271             from AudioListener and calling the AudioSession directly.
2272         (WebCore::AudioDestinationIOS::~AudioDestinationIOS): Ditto.
2273         (WebCore::AudioDestinationIOS::start): Notify session.
2274         (WebCore::AudioDestinationIOS::stop): Ditto.
2275         (WebCore::AudioDestinationIOS::beganAudioInterruption): Deleted.
2276         (WebCore::AudioDestinationIOS::endedAudioInterruption): Deleted.
2277         * platform/audio/ios/AudioDestinationIOS.h:
2278         (WebCore::AudioDestinationIOS::mediaType):
2279         (WebCore::AudioDestinationIOS::canReceiveRemoteControlCommands):
2280         (WebCore::AudioDestinationIOS::didReceiveRemoteControlCommand):
2281         (WebCore::AudioDestinationIOS::isPlaying): Deleted.
2282
2283         * platform/audio/ios/AudioSessionIOS.mm:
2284         (WebCore::categoryName): Debug-only logging function.
2285         (WebCore::AudioSession::setCategory): Don't stick with "media" once it is set.
2286
2287         * platform/audio/ios/MediaSessionManagerIOS.mm:
2288         (WebCore::MediaSessionManageriOS::resetRestrictions): Set up restrictions for WebAudio.
2289         (WebCore::MediaSessionManageriOS::updateNowPlayingInfo): Don't set invalid start time.
2290
2291         * platform/audio/mac/MediaSessionManagerMac.cpp:
2292         (MediaSessionManager::updateSessionState): Manage AudioSession.active when WebAudio clients
2293             come and go. Manage AudioSession.category according to the number of WebAudio and
2294             HTMLMediaElement clients.
2295
2296 2014-04-24  David Hyatt  <hyatt@apple.com>
2297
2298         [New Multicolumn] Client rects don't work with column spans.
2299         https://bugs.webkit.org/show_bug.cgi?id=132131
2300
2301         Reviewed by Dean Jackson.
2302         
2303         Don't factor in the offset of the multicolumn set from the top
2304         of the multicolumn block. This was added already, and it doesn't
2305         need to be a part of columnTranslationForOffset.
2306
2307         Added fast/multicol/client-rects-spanners.html
2308
2309         * rendering/RenderMultiColumnSet.cpp:
2310         (WebCore::RenderMultiColumnSet::columnTranslationForOffset):
2311
2312 2014-04-24  Praveen R Jadhav  <praveen.j@samsung.com>
2313
2314         [EFL] WebKit build fails when MEDIA_SOURCE is enabled
2315         https://bugs.webkit.org/show_bug.cgi?id=132118
2316
2317         Reviewed by Brent Fulgham.
2318
2319         Files MediaSourceGStreamer.cpp, SourceBufferPrivateGStreamer.cpp and
2320         WebKitMediaSourceGStreamer.cpp are included for EFL port build.
2321
2322         No new tests. No change in behaviour.
2323
2324         * PlatformEfl.cmake: MediaSourceGStreamer.cpp, SourceBufferPrivateGStreamer.cpp
2325         and WebKitMediaSourceGStreamer.cpp are included for compilation.
2326
2327 2014-04-24  Tamas Gergely  <tgergely.u-szeged@partner.samsung.com>
2328
2329         ASSERTION FAILED: !begin.isIndefinite() in WebCore::SVGSMILElement::resolveFirstInterval.
2330         https://bugs.webkit.org/show_bug.cgi?id=131097
2331
2332         Reviewed by Darin Adler.
2333
2334         According to smil animation reference, max attribute cannot be 0.
2335
2336         Test: svg/animations/smil-animation-max-attribute-zero-crash.svg
2337
2338         * svg/animation/SVGSMILElement.cpp:
2339         (WebCore::SVGSMILElement::maxValue):
2340           changed (result < 0) to (result <= 0)
2341
2342 2014-04-24  Ryuan Choi  <ryuan.choi@samsung.com>
2343
2344         Remove screenColorProfile()
2345         https://bugs.webkit.org/show_bug.cgi?id=132035
2346
2347         Reviewed by Darin Adler.
2348
2349         Only chromium used screenColorProfile() since r120789.
2350
2351         * platform/PlatformScreen.h:
2352         * platform/efl/PlatformScreenEfl.cpp:
2353         (WebCore::screenColorProfile): Deleted.
2354         * platform/gtk/PlatformScreenGtk.cpp:
2355         (WebCore::screenColorProfile): Deleted.
2356         * platform/image-decoders/ImageDecoder.h:
2357         (WebCore::ImageDecoder::qcmsOutputDeviceProfile):
2358         * platform/ios/PlatformScreenIOS.mm:
2359         (WebCore::screenColorProfile): Deleted.
2360         * platform/mac/PlatformScreenMac.mm:
2361         (WebCore::screenColorProfile): Deleted.
2362         * platform/win/PlatformScreenWin.cpp:
2363         (WebCore::screenColorProfile): Deleted.
2364
2365 2014-04-24  Zalan Bujtas  <zalan@apple.com>
2366
2367         One more unreviewed build fix after r167755.
2368
2369         * html/shadow/mac/ImageControlsButtonElementMac.cpp:
2370         (WebCore::RenderImageControlsButton::updateLogicalWidth):
2371         (WebCore::RenderImageControlsButton::computeLogicalHeight):
2372
2373 2014-04-24  Zalan Bujtas  <zalan@apple.com>
2374
2375         Unreviewed build fix after r167755.
2376
2377         * rendering/RenderThemeMac.h:
2378
2379 2014-04-24  Zalan Bujtas  <zalan@apple.com>
2380
2381         Transition RenderTheme API from RenderObject* to const RenderObject&
2382         https://bugs.webkit.org/show_bug.cgi?id=132037
2383
2384         Reviewed by Andreas Kling.
2385
2386         Using const references provides better encapsulation and improve security.
2387
2388         No change in behavior.
2389
2390         * accessibility/AccessibilityObject.cpp:
2391         (WebCore::AccessibilityObject::boundingBoxForQuads):
2392         * dom/Element.cpp:
2393         (WebCore::Element::setActive):
2394         (WebCore::Element::setHovered):
2395         * editing/FrameSelection.cpp:
2396         (WebCore::FrameSelection::focusedOrActiveStateChanged):
2397         * html/HTMLFormControlElement.cpp:
2398         (WebCore::HTMLFormControlElement::disabledStateChanged):
2399         (WebCore::HTMLFormControlElement::readOnlyAttributeChanged):
2400         * html/HTMLInputElement.cpp:
2401         (WebCore::HTMLInputElement::setChecked):
2402         (WebCore::HTMLInputElement::setIndeterminate):
2403         * html/HTMLOptionElement.cpp:
2404         (WebCore::HTMLOptionElement::parseAttribute):
2405         * rendering/RenderBlock.cpp:
2406         (WebCore::RenderBlock::addVisualOverflowFromTheme):
2407         (WebCore::RenderBlock::baselinePosition):
2408         * rendering/RenderBox.cpp:
2409         (WebCore::RenderBox::paintBoxDecorations):
2410         * rendering/RenderButton.cpp:
2411         (WebCore::RenderButton::styleDidChange):
2412         * rendering/RenderFileUploadControl.cpp:
2413         (WebCore::RenderFileUploadControl::paintObject):
2414         * rendering/RenderFlowThread.cpp:
2415         (WebCore::RenderFlowThread::addRegionsVisualOverflowFromTheme):
2416         * rendering/RenderObject.cpp:
2417         (WebCore::RenderObject::drawLineForBoxSide):
2418         * rendering/RenderObject.h:
2419         * rendering/RenderProgress.cpp:
2420         (WebCore::RenderProgress::computeLogicalHeight):
2421         * rendering/RenderTextControlSingleLine.cpp:
2422         (WebCore::RenderTextControlSingleLine::paint):
2423         * rendering/RenderTheme.cpp:
2424         (WebCore::RenderTheme::paint):
2425         (WebCore::RenderTheme::paintBorderOnly):
2426         (WebCore::RenderTheme::paintDecorations):
2427         (WebCore::RenderTheme::baselinePosition):
2428         (WebCore::RenderTheme::adjustRepaintRect):
2429         (WebCore::RenderTheme::stateChanged):
2430         (WebCore::RenderTheme::updateControlStatesForRenderer):
2431         (WebCore::RenderTheme::extractControlStatesForRenderer):
2432         (WebCore::RenderTheme::isActive):
2433         (WebCore::RenderTheme::isChecked):
2434         (WebCore::RenderTheme::isIndeterminate):
2435         (WebCore::RenderTheme::isEnabled):
2436         (WebCore::RenderTheme::isFocused):
2437         (WebCore::RenderTheme::isPressed):
2438         (WebCore::RenderTheme::isSpinUpButtonPartPressed):
2439         (WebCore::RenderTheme::isReadOnlyControl):
2440         (WebCore::RenderTheme::isHovered):
2441         (WebCore::RenderTheme::isSpinUpButtonPartHovered):
2442         (WebCore::RenderTheme::isDefault):
2443         (WebCore::RenderTheme::paintInputFieldSpeechButton):
2444         (WebCore::RenderTheme::paintMeter):
2445         (WebCore::RenderTheme::paintSliderTicks):
2446         (WebCore::RenderTheme::progressBarRectForBounds):
2447         * rendering/RenderTheme.h:
2448         (WebCore::RenderTheme::controlSupportsTints):
2449         (WebCore::RenderTheme::paintCapsLockIndicator):
2450         (WebCore::RenderTheme::paintFileUploadIconDecorations):
2451         (WebCore::RenderTheme::imageControlsButtonSize):
2452         (WebCore::RenderTheme::paintCheckbox):
2453         (WebCore::RenderTheme::paintRadio):
2454         (WebCore::RenderTheme::paintButton):
2455         (WebCore::RenderTheme::paintInnerSpinButton):
2456         (WebCore::RenderTheme::paintCheckboxDecorations):
2457         (WebCore::RenderTheme::paintRadioDecorations):
2458         (WebCore::RenderTheme::paintButtonDecorations):
2459         (WebCore::RenderTheme::paintTextField):
2460         (WebCore::RenderTheme::paintTextFieldDecorations):
2461         (WebCore::RenderTheme::paintTextArea):
2462         (WebCore::RenderTheme::paintTextAreaDecorations):
2463         (WebCore::RenderTheme::paintMenuList):
2464         (WebCore::RenderTheme::paintMenuListDecorations):
2465         (WebCore::RenderTheme::paintMenuListButtonDecorations):
2466         (WebCore::RenderTheme::paintPushButtonDecorations):
2467         (WebCore::RenderTheme::paintSquareButtonDecorations):
2468         (WebCore::RenderTheme::paintProgressBar):
2469         (WebCore::RenderTheme::paintSliderTrack):
2470         (WebCore::RenderTheme::paintSliderThumb):
2471         (WebCore::RenderTheme::paintSliderThumbDecorations):
2472         (WebCore::RenderTheme::paintSearchField):
2473         (WebCore::RenderTheme::paintSearchFieldDecorations):
2474         (WebCore::RenderTheme::paintSearchFieldCancelButton):
2475         (WebCore::RenderTheme::paintSearchFieldDecorationPart):
2476         (WebCore::RenderTheme::paintSearchFieldResultsDecorationPart):
2477         (WebCore::RenderTheme::paintSearchFieldResultsButton):
2478         (WebCore::RenderTheme::paintMediaFullscreenButton):
2479         (WebCore::RenderTheme::paintMediaPlayButton):
2480         (WebCore::RenderTheme::paintMediaOverlayPlayButton):
2481         (WebCore::RenderTheme::paintMediaMuteButton):
2482         (WebCore::RenderTheme::paintMediaSeekBackButton):
2483         (WebCore::RenderTheme::paintMediaSeekForwardButton):
2484         (WebCore::RenderTheme::paintMediaSliderTrack):
2485         (WebCore::RenderTheme::paintMediaSliderThumb):
2486         (WebCore::RenderTheme::paintMediaVolumeSliderContainer):
2487         (WebCore::RenderTheme::paintMediaVolumeSliderTrack):
2488         (WebCore::RenderTheme::paintMediaVolumeSliderThumb):
2489         (WebCore::RenderTheme::paintMediaRewindButton):
2490         (WebCore::RenderTheme::paintMediaReturnToRealtimeButton):
2491         (WebCore::RenderTheme::paintMediaToggleClosedCaptionsButton):
2492         (WebCore::RenderTheme::paintMediaControlsBackground):
2493         (WebCore::RenderTheme::paintMediaCurrentTime):
2494         (WebCore::RenderTheme::paintMediaTimeRemaining):
2495         (WebCore::RenderTheme::paintMediaFullScreenVolumeSliderTrack):
2496         (WebCore::RenderTheme::paintMediaFullScreenVolumeSliderThumb):
2497         (WebCore::RenderTheme::paintSnapshottedPluginOverlay):
2498         (WebCore::RenderTheme::paintImageControlsButton):
2499         * rendering/RenderThemeIOS.h:
2500         * rendering/RenderThemeIOS.mm:
2501         (WebCore::RenderThemeIOS::addRoundedBorderClip):
2502         (WebCore::RenderThemeIOS::paintCheckboxDecorations):
2503         (WebCore::RenderThemeIOS::baselinePosition):
2504         (WebCore::RenderThemeIOS::paintRadioDecorations):
2505         (WebCore::RenderThemeIOS::paintTextFieldDecorations):
2506         (WebCore::RenderThemeIOS::paintTextAreaDecorations):
2507         (WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
2508         (WebCore::RenderThemeIOS::paintSliderTrack):
2509         (WebCore::RenderThemeIOS::paintSliderThumbDecorations):
2510         (WebCore::RenderThemeIOS::paintProgressBar):
2511         (WebCore::RenderThemeIOS::paintSearchFieldDecorations):
2512         (WebCore::RenderThemeIOS::paintButtonDecorations):
2513         (WebCore::RenderThemeIOS::paintPushButtonDecorations):
2514         (WebCore::RenderThemeIOS::paintFileUploadIconDecorations):
2515         * rendering/RenderThemeMac.h:
2516         (WebCore::RenderThemeMac::updateActiveState):
2517         * rendering/RenderThemeMac.mm:
2518         (WebCore::RenderThemeMac::documentViewFor):
2519         (WebCore::RenderThemeMac::adjustRepaintRect):
2520         (WebCore::RenderThemeMac::convertToPaintingRect):
2521         (WebCore::RenderThemeMac::updateCheckedState):
2522         (WebCore::RenderThemeMac::updateEnabledState):
2523         (WebCore::RenderThemeMac::updateFocusedState):
2524         (WebCore::RenderThemeMac::updatePressedState):
2525         (WebCore::RenderThemeMac::controlSupportsTints):
2526         (WebCore::RenderThemeMac::paintTextField):
2527         (WebCore::RenderThemeMac::paintCapsLockIndicator):
2528         (WebCore::RenderThemeMac::paintTextArea):
2529         (WebCore::RenderThemeMac::paintMenuList):
2530         (WebCore::RenderThemeMac::paintMeter):
2531         (WebCore::RenderThemeMac::progressBarRectForBounds):
2532         (WebCore::RenderThemeMac::paintProgressBar):
2533         (WebCore::RenderThemeMac::paintMenuListButtonGradients):
2534         (WebCore::RenderThemeMac::paintMenuListButtonDecorations):
2535         (WebCore::RenderThemeMac::setPopupButtonCellState):
2536         (WebCore::RenderThemeMac::paintSliderTrack):
2537         (WebCore::RenderThemeMac::paintSliderThumb):
2538         (WebCore::RenderThemeMac::paintSearchField):
2539         (WebCore::RenderThemeMac::setSearchCellState):
2540         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
2541         (WebCore::RenderThemeMac::paintSearchFieldDecorationPart):
2542         (WebCore::RenderThemeMac::paintSearchFieldResultsDecorationPart):
2543         (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
2544         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
2545         (WebCore::RenderThemeMac::paintImageControlsButton):
2546         (WebCore::RenderThemeMac::imageControlsButtonSize):
2547
2548 2014-04-23  Carlos Garcia Campos  <cgarcia@igalia.com>
2549
2550         [GTK] HTML Media capture attribute is a boolean since r163958
2551         https://bugs.webkit.org/show_bug.cgi?id=132061
2552
2553         Reviewed by Gustavo Noronha Silva.
2554
2555         Add new methods webkit_dom_html_input_element_get_capture_enabled
2556         and webkit_dom_html_input_element_set_capture_enabled using a
2557         boolean and deprecate the old methods.
2558
2559         * bindings/gobject/WebKitDOMDeprecated.cpp:
2560         (webkit_dom_html_input_element_get_capture):
2561         (webkit_dom_html_input_element_set_capture):
2562         * bindings/gobject/WebKitDOMDeprecated.h:
2563         * bindings/gobject/WebKitDOMDeprecated.symbols:
2564         * bindings/gobject/webkitdom.symbols:
2565         * bindings/scripts/CodeGeneratorGObject.pm:
2566         (GetEffectiveFunctionName): Helper function to rename API methods
2567         for special cases.
2568         (GenerateFunction): Use GetEffectiveFunctionName().
2569
2570 2014-04-23  Praveen R Jadhav  <praveen.j@samsung.com>
2571
2572         [MediaStream] Implement MediaStream active attribute
2573         https://bugs.webkit.org/show_bug.cgi?id=131973
2574
2575         Reviewed by Eric Carlson.
2576
2577         MediaStream .active attribute are introduced which will replace
2578         .ended attribute. This patch implements the newly introduced attributes.
2579
2580         MediaStream-add-remove-tracks.html is updated to handle this scenario.
2581
2582         * Modules/mediastream/MediaStream.cpp:
2583         (WebCore::MediaStream::active): Added.
2584         (WebCore::MediaStream::setActive): Added.
2585         (WebCore::MediaStream::addTrack): Propagates 'onactive' event when required.
2586         (WebCore::MediaStream::removeTrack): Propagates 'oninactive' event when required.
2587         (WebCore::MediaStream::trackDidEnd): Propagates 'oninactive' event when required.
2588         (WebCore::MediaStream::streamDidEnd):
2589         (WebCore::MediaStream::setStreamIsActive): Added.
2590         * Modules/mediastream/MediaStream.h:
2591         * Modules/mediastream/MediaStream.idl:
2592         * dom/EventNames.h:
2593         * platform/mediastream/MediaStreamPrivate.cpp:
2594         (WebCore::MediaStreamPrivate::MediaStreamPrivate): Initialize .active attribute
2595         (WebCore::MediaStreamPrivate::setEnded):
2596         (WebCore::MediaStreamPrivate::setActive): Added.
2597         * platform/mediastream/MediaStreamPrivate.h:
2598         (WebCore::MediaStreamPrivate::active): Added.
2599
2600 2014-04-23  Darin Adler  <darin@apple.com>
2601
2602         [Cocoa] fix CF leaks found by code inspection
2603         https://bugs.webkit.org/show_bug.cgi?id=132106
2604
2605         Reviewed by Andreas Kling.
2606
2607         * page/CaptionUserPreferencesMediaAF.cpp:
2608         (WebCore::trackDisplayName): Added a missing adoptCF.
2609
2610         * platform/Language.cpp:
2611         (WebCore::displayNameForLanguageLocale): Added a missing adoptCF.
2612
2613         * platform/graphics/FontPlatformData.cpp:
2614         (WebCore::FontPlatformData::openTypeTable): Added a missing adoptCF.
2615
2616         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
2617         (WebCore::InbandTextTrackPrivateAVCF::label): Added two missing adoptCF.
2618
2619         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2620         (WebCore::AVFWrapper::createImageForTimeInRect): Added two missing adoptCF.
2621
2622         * platform/graphics/cg/PDFDocumentImage.cpp:
2623         (WebCore::PDFDocumentImage::createPDFDocument): Added missing adoptCF.
2624
2625         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2626         (WebCore::cascadeToLastResortFontDescriptor): Added two missing adoptCF.
2627
2628         * platform/graphics/mac/FontMac.mm:
2629         (WebCore::Font::primaryFontDataIsSystemFont): Added missing adoptCF.
2630
2631         * platform/graphics/mac/SimpleFontDataMac.mm:
2632         (WebCore::hasCustomTracking): Added missing adoptCF.
2633
2634         * platform/image-decoders/ImageDecoder.h:
2635         (WebCore::ImageDecoder::qcmsOutputDeviceProfile): Added CFRelease.
2636
2637         * plugins/mac/PluginPackageMac.cpp:
2638         (WebCore::readPListFile): Added two missing adoptCF.
2639
2640 2014-04-23  Ryosuke Niwa  <rniwa@webkit.org>
2641
2642         REGRESSION (r157328): popover to check into flight ba.com dismisses instantly when focusing form
2643         https://bugs.webkit.org/show_bug.cgi?id=131949
2644
2645         Address the review comment.
2646
2647         * dom/EventDispatcher.cpp:
2648         (WebCore::EventRelatedNodeResolver::findHostOfTreeScopeInTargetTreeScope):
2649
2650 2014-04-23  Andreas Kling  <akling@apple.com>
2651
2652         CachedResourceLoader hoards URLs indefinitely for no good reason.
2653         <https://webkit.org/b/132102>
2654         <rdar://problem/16708265>
2655
2656         Since we don't care about CachedResourceLoader::m_validatedURL's after
2657         the Document has finished dispatching its initial load event, clear the
2658         set at that point, and don't add any new URLs to it.
2659
2660         Reviewed by Anders Carlsson.
2661
2662         * dom/Document.cpp:
2663         (WebCore::Document::dispatchWindowLoadEvent):
2664         * loader/cache/CachedResourceLoader.cpp:
2665         (WebCore::CachedResourceLoader::requestResource):
2666         (WebCore::CachedResourceLoader::documentDidFinishLoadEvent):
2667         * loader/cache/CachedResourceLoader.h:
2668
2669 2014-04-23  Andreas Kling  <akling@apple.com>
2670
2671         Canvas cache of clean URLs can grow without bounds.
2672         <https://webkit.org/b/132091>
2673         <rdar://problem/16695665>
2674
2675         Remove a silly "optimization" that kept a cache of clean URLs
2676         that can be drawn into a canvas without tainting it, all to avoid
2677         the "expensive" checks to determine whether it would taint.
2678
2679         Reviewed by Benjamin Poulain.
2680
2681         * html/canvas/CanvasRenderingContext.cpp:
2682         (WebCore::CanvasRenderingContext::wouldTaintOrigin):
2683         * html/canvas/CanvasRenderingContext.h:
2684
2685 2014-04-23  Benjamin Poulain  <bpoulain@apple.com>
2686
2687         [iOS][WK2] Fix a few mistakes affecting the initial layout and the initial unobscured rect
2688         https://bugs.webkit.org/show_bug.cgi?id=132093
2689
2690         Reviewed by Tim Horton.
2691
2692         Change the minimum layout size to float point values to account for size defined on retina displays.
2693         The minimum layout size supports half-pixels, the value is rounded later when computing the layout size
2694         in document coordinates.
2695
2696         * WebCore.exp.in:
2697         * page/ViewportConfiguration.cpp:
2698         (WebCore::ViewportConfiguration::ViewportConfiguration):
2699         Setting the initial content size is incorrect. The layout size computation already take into account
2700         empty size for the first layout.
2701
2702         Setting the content size upfront make the first computation incorrect when the viewport arguments specify
2703         the initial scale.
2704
2705         (WebCore::ViewportConfiguration::setMinimumLayoutSize):
2706         * page/ViewportConfiguration.h:
2707         (WebCore::ViewportConfiguration::minimumLayoutSize):
2708
2709 2014-04-23  Brent Fulgham  <bfulgham@apple.com>
2710
2711         [Mac, iOS] Stop buffering media when on an inactive tab. 
2712         https://bugs.webkit.org/show_bug.cgi?id=132077
2713
2714         Reviewed by Eric Carlson.
2715
2716         * html/HTMLMediaElement.cpp: Rename 'm_isDisplaySleepDisablingSuspended'
2717         to 'm_elementIsHidden'.
2718         (WebCore::HTMLMediaElement::HTMLMediaElement):
2719         (WebCore::HTMLMediaElement::visibilityStatusChanged): Notify the
2720         media session that the element is (or is not) hidden.
2721         (WebCore::HTMLMediaElement::setShouldBufferData): Added.
2722         * html/HTMLMediaElement.h:
2723         * platform/audio/MediaSession.cpp:
2724         (WebCore::MediaSession::clientWillBeginPlayback): Tell media to
2725         buffer if not hidden or playing.
2726         (WebCore::MediaSession::clientWillPausePlayback): Ditto.
2727         (WebCore::MediaSession::visibilityChanged): Added. Client API, just relays call
2728         to updateClientDataBuffering.
2729         (WebCore::MediaSession::updateClientDataBuffering): Tell client it should only
2730         buffer data if it's currently playing, or not hidden.
2731         * platform/audio/MediaSession.h:
2732         * platform/graphics/MediaPlayer.cpp:
2733         (WebCore::MediaPlayer::setShouldBufferData): Added: Just relays to
2734         MediaPlayerPrivate object.
2735         * platform/graphics/MediaPlayer.h:
2736         * platform/graphics/MediaPlayerPrivate.h:
2737         (WebCore::MediaPlayerPrivateInterface::setShouldBufferData):
2738         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2739         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2740         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
2741         (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldBufferData): Added.
2742         Detach the player item from the player if we don't want to continue
2743         buffering or other background tasks.
2744
2745 2014-04-23  Alexey Proskuryakov  <ap@apple.com>
2746
2747         Eliminate internals.setMockScrollbarsEnabled()
2748         https://bugs.webkit.org/show_bug.cgi?id=132085
2749
2750         Reviewed by Tim Horton.
2751
2752         This was essentially unused, and also didnt work.
2753
2754         * testing/InternalSettings.cpp:
2755         (WebCore::InternalSettings::Backup::restoreTo):
2756         (WebCore::InternalSettings::setMockScrollbarsEnabled): Deleted.
2757         * testing/InternalSettings.h:
2758         * testing/InternalSettings.idl:
2759
2760 2014-04-23  Anders Carlsson  <andersca@apple.com>
2761
2762         Don't migrate the WKView.h header from WebCore to WebKit
2763         https://bugs.webkit.org/show_bug.cgi?id=132086
2764
2765         Reviewed by Dan Bernstein.
2766
2767         * WebCore.xcodeproj/project.pbxproj:
2768         Add WAKViewInternal.h.
2769
2770         * platform/WAKViewInternal.h: Added.
2771
2772         * platform/ios/wak/WAKClipView.m:
2773         Import WAKViewInternal.h instead of WAKViewPrivate.h.
2774
2775         * platform/ios/wak/WAKScrollView.mm:
2776         Import WAKViewInternal.h instead of WAKViewPrivate.h.
2777
2778         * platform/ios/wak/WAKView.h:
2779         Move ivars to a class extension in WAKViewInternal.h and remove WKView.h import.
2780
2781         * platform/ios/wak/WAKView.mm:
2782         Import WAKViewInternal.h instead of WAKViewPrivate.h.
2783
2784         * platform/ios/wak/WAKViewPrivate.h:
2785         Import WKViewPrivate.h.
2786
2787 2014-04-23  David Hyatt  <hyatt@apple.com>
2788
2789         [New Multicolumn] fast/multicol/fixed-column-percent-logical-height-orthogonal-writing-mode.html fails
2790         https://bugs.webkit.org/show_bug.cgi?id=132078
2791
2792         Reviewed by Anders Carlsson.
2793
2794         * rendering/RenderBox.cpp:
2795         (WebCore::RenderBox::skipContainingBlockForPercentHeightCalculation):
2796         Add a parameter to test for orthogonal writing modes. If we're perpendicular,
2797         then we should not skip the flow thread, since we resolve relative to the column width,
2798         and that is always set.
2799
2800         (WebCore::RenderBox::computePercentageLogicalHeight):
2801         Patched to pass in whether or not the box and the ancestor block are perpendicular.
2802
2803         * rendering/RenderBox.h:
2804         Patched the signature of skipContainingBlockForPercentHeightCalculation
2805
2806 2014-04-23  Myles C. Maxfield  <mmaxfield@apple.com>
2807
2808         [OS X] Make checking if a font is the system font more robust
2809         https://bugs.webkit.org/show_bug.cgi?id=132030
2810
2811         Reviewed by Dean Jackson.
2812
2813         Instead of inspecting a font's name to determine if it is a system font,
2814         on OS X we can ask the system directly.
2815
2816         This patch also moves a platform-specific check into platform-specific
2817         code, so that other platforms don't check for OS X-specific behavior.
2818
2819         Covered by existing tests.
2820
2821         * platform/graphics/Font.cpp:
2822         (WebCore::Font::hasValidAverageCharWidth):
2823         * platform/graphics/Font.h:
2824         * platform/graphics/mac/FontMac.mm:
2825         (WebCore::Font::primaryFontDataIsSystemFont):
2826
2827 2014-04-23  David Hyatt  <hyatt@apple.com>
2828
2829         [New Multicolumn] Assertion failure in huge-column-count.html
2830         https://bugs.webkit.org/show_bug.cgi?id=132071
2831
2832         Reviewed by Dean Jackson.
2833
2834         * rendering/RenderBlock.cpp:
2835         (WebCore::RenderBlock::regionAtBlockOffset):
2836         Back out this change, since it wasn't general enough.
2837
2838         * rendering/RenderFlowThread.cpp:
2839         (WebCore::RenderFlowThread::getRegionRangeForBox):
2840         The real issue was that this loop needed to consider the actual box
2841         rather than starting from the parent. This was a non-issue for normal
2842         regions (which cannot have nested flow threads), but for columns, you 
2843         have to consider the fact that the box could itself be a flow thread.
2844
2845 2014-04-23  Andreas Kling  <akling@apple.com>
2846
2847         [iOS] Memory pressure notification should fire on main thread.
2848         <https://webkit.org/b/132074>
2849
2850         Rejig the memory pressure notification to fire on the main queue
2851         directly instead of rerouting it manually.
2852
2853         Reviewed by Mark Rowe.
2854
2855         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
2856         (WebCore::MemoryPressureHandler::install):
2857
2858 2014-04-23  Commit Queue  <commit-queue@webkit.org>
2859
2860         Unreviewed, rolling out r167720.
2861         https://bugs.webkit.org/show_bug.cgi?id=132075
2862
2863         broke eight newmulticol tests (Requested by thorton on
2864         #webkit).
2865
2866         Reverted changeset:
2867
2868         "[New Multicolumn] Assertion failure in huge-column-
2869         count.html"
2870         https://bugs.webkit.org/show_bug.cgi?id=132071
2871         http://trac.webkit.org/changeset/167720
2872
2873 2014-04-23  David Hyatt  <hyatt@apple.com>
2874
2875         [New Multicolumn] Assertion failure in huge-column-count.html
2876         https://bugs.webkit.org/show_bug.cgi?id=132071
2877
2878         Reviewed by Dean Jackson.
2879
2880         * rendering/RenderBlock.cpp:
2881         (WebCore::RenderBlock::regionAtBlockOffset):
2882         Remove the code that returned 0 here, since we're going to patch a lower-level
2883         function to catch all cases.
2884
2885         * rendering/RenderFlowThread.cpp:
2886         (WebCore::RenderFlowThread::getRegionRangeForBox):
2887         Don't allow in-flow RenderFlowThreads to ever have a region range. The sets
2888         are what should have ranges... the flow thread needs to just be ignored.
2889
2890 2014-04-23  David Hyatt  <hyatt@apple.com>
2891
2892         [New Multicolumn] Crasher when clearing out a flow thread in multicolumn layout.
2893         https://bugs.webkit.org/show_bug.cgi?id=132069
2894
2895         Reviewed by Dean Jackson.
2896
2897         This is imported from a patch Morten did for Blink, but I had to change it a fair
2898         bit. deleteLines() is used to handle simple line box layout instead of just calling
2899         deleteLineBoxTree.
2900         
2901         I also had to disable the layout state to stop asserts on repaint when the children
2902         get moved. Not sure why Blink didn't hit this, but it's simple enough to add a
2903         LayoutStateDisabler to stop the assert.
2904
2905         Added fast/multicol/inline-children-crash.html
2906
2907         * rendering/RenderMultiColumnFlowThread.cpp:
2908         (WebCore::RenderMultiColumnFlowThread::evacuateAndDestroy):
2909
2910 2014-04-23  Andreas Kling  <akling@apple.com>
2911
2912         [iOS WebKit2] IOSurfacePool should force CA to actually garbage collect surfaces.
2913         <https://webkit.org/b/132065>
2914         <rdar://problem/16110687>
2915
2916         Add a platformGarbageCollectNow() helper function to IOSurfacePool that
2917         triggers a sweep of the IOSurfaces. Call this from collectionTimerFired()
2918         and discardAllSurfaces().
2919
2920         This lets us drop all otherwise-unused 420f surfaces on memory pressure.
2921
2922         Reviewed by Tim Horton.
2923
2924         * WebCore.xcodeproj/project.pbxproj:
2925         * platform/graphics/cg/IOSurfacePool.cpp:
2926         (WebCore::IOSurfacePool::collectionTimerFired):
2927         (WebCore::IOSurfacePool::discardAllSurfaces):
2928         * platform/graphics/cg/IOSurfacePool.h:
2929         * platform/graphics/cocoa/IOSurfacePoolCocoa.mm: Added.
2930         (WebCore::IOSurfacePool::platformGarbageCollectNow):
2931
2932 2014-04-23  Morten Stenshorne  <mstensho@opera.com>
2933
2934         REGRESSION (Safari 6 - ToT): Incorrectly assumes that RenderStyle data can be shared
2935         https://bugs.webkit.org/show_bug.cgi?id=113058
2936
2937         Reviewed by David Hyatt.
2938
2939         Before sharing CSS properties with an element in the cache, we need to
2940         check that the new element is suitable for this, just like we check
2941         elements before inserting them into the cache.
2942
2943         Test: fast/css/identical-logical-height-decl.html
2944
2945         * css/StyleResolver.cpp:
2946         (WebCore::StyleResolver::applyMatchedProperties):
2947
2948 2014-04-23  Commit Queue  <commit-queue@webkit.org>
2949
2950         Unreviewed, rolling out r167713.
2951         https://bugs.webkit.org/show_bug.cgi?id=132070
2952
2953         broke hundreds of tests (Requested by thorton on #webkit).
2954
2955         Reverted changeset:
2956
2957         "[OS X] Make checking if a font is the system font more
2958         robust"
2959         https://bugs.webkit.org/show_bug.cgi?id=132030
2960         http://trac.webkit.org/changeset/167713
2961
2962 2014-04-22  David Hyatt  <hyatt@apple.com>
2963
2964         [New Multicolumn] Nested columns not working at all.
2965         https://bugs.webkit.org/show_bug.cgi?id=131805
2966
2967         Reviewed by Dean Jackson.
2968
2969         Add support for nested pagination contexts, allowing for an arbitrary level
2970         of nesting of multicolumn layouts. There were a number of things that had to
2971         be patched in order for this to work.
2972
2973         * rendering/RenderBlock.cpp:
2974         (WebCore::RenderBlock::regionAtBlockOffset):
2975         Make sure RenderMultiColumnFlowThreads just return null for regions at any
2976         block offset. Individual region sets will be created as you cross ancestor
2977         regions eventually, so this is just getting in the way.
2978
2979         * rendering/RenderLayer.cpp:
2980         (WebCore::RenderLayer::enclosingPaginationLayerInSubtree):
2981         Add a new helper method for obtaining an enclosingPaginationLayer when
2982         constrained by some root. This function ensures you don't accidentally
2983         cross your subtree root when looking for enclosing pagination layers.
2984
2985         (WebCore::RenderLayer::collectFragments):
2986         Patch collectFragments to know how to recur to collect ancestor fragments
2987         in order to apply nested splitting as you cross pagination boundaries.
2988
2989         (WebCore::RenderLayer::updatePaintingInfoForFragments):
2990         (WebCore::RenderLayer::calculateClipRects):
2991         * rendering/RenderLayer.h:
2992         (WebCore::LayerFragment::LayerFragment):
2993         (WebCore::LayerFragment::setRects):
2994         (WebCore::LayerFragment::moveBy):
2995         (WebCore::LayerFragment::intersect):
2996         Improve the LayerFragment so that it caches transformed bounding boxes as
2997         well. This is needed to fix intersectsDamageRect so that it doesn't grab
2998         the wrong bounding box when checking inline layers that are paginated.
2999
3000         * rendering/RenderMultiColumnFlowThread.cpp:
3001         (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
3002         Ignore inserted flow threads inside an ancestor flow thread, since we only
3003         care about what the sets do.
3004         
3005         * rendering/RenderObject.cpp:
3006         (WebCore::RenderObject::insertedIntoTree):
3007         Make sure that nested flow thread layers return themselves when a child
3008         is inserted directly under them.
3009
3010 2014-04-22  Myles C. Maxfield  <mmaxfield@apple.com>
3011
3012         [OS X] Make checking if a font is the system font more robust
3013         https://bugs.webkit.org/show_bug.cgi?id=132030
3014
3015         Reviewed by Dean Jackson.
3016
3017         Instead of inspecting a font's name to determine if it is a system font,
3018         on OS X we can ask the system directly.
3019
3020         This patch also moves a platform-specific check into platform-specific
3021         code, so that other platforms don't check for OS X-specific behavior.
3022
3023         Covered by existing tests.
3024
3025         * platform/graphics/Font.cpp:
3026         (WebCore::Font::hasValidAverageCharWidth):
3027         * platform/graphics/Font.h:
3028         * platform/graphics/mac/FontMac.mm:
3029         (WebCore::Font::primaryFontDataIsSystemFont):
3030
3031 2014-04-23  Philippe Normand  <pnormand@igalia.com>
3032
3033         [GTK] Focus management API was moved from HTMLDocument to Document in r166668
3034         https://bugs.webkit.org/show_bug.cgi?id=132060
3035
3036         Reviewed by Carlos Garcia Campos.
3037
3038         Deprecate the removed methods in WebKitDOMHTMLDocument to keep API compatibility.
3039
3040         * bindings/gobject/WebKitDOMDeprecated.cpp:
3041         (webkit_dom_html_document_get_active_element):
3042         (webkit_dom_html_document_has_focus):
3043         * bindings/gobject/WebKitDOMDeprecated.h:
3044         * bindings/gobject/WebKitDOMDeprecated.symbols:
3045         * bindings/gobject/webkitdom.symbols:
3046
3047 2014-04-22  Andreas Kling  <akling@apple.com>
3048
3049         [iOS WebKit1] MemoryPressureHandler::respondToMemoryPressure called on wrong thread.
3050         <https://webkit.org/b/132041>
3051         <rdar://problem/16687238>
3052
3053         Always dispatch the memory pressure relief code on the main queue.
3054         This is really only needed for iOS/WK1, but we might as well share the code.
3055
3056         Reviewed by Michael Saboff.
3057
3058         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
3059         (WebCore::MemoryPressureHandler::install):
3060
3061 2014-04-23  Philippe Normand  <pnormand@igalia.com>
3062
3063         [GTK] ShadowRoot API was removed in r164131
3064         https://bugs.webkit.org/show_bug.cgi?id=132059
3065
3066         Reviewed by Gustavo Noronha Silva.
3067
3068         Add ShadowRoot removed API to WebKitDOMDeprecated to keep API/ABI compatibility.
3069
3070         * bindings/gobject/WebKitDOMDeprecated.cpp:
3071         (webkit_dom_shadow_root_class_init):
3072         (webkit_dom_shadow_root_init):
3073         (webkit_dom_shadow_root_element_from_point):
3074         (webkit_dom_shadow_root_get_active_element):
3075         (webkit_dom_shadow_root_get_apply_author_styles):
3076         (webkit_dom_shadow_root_get_element_by_id):
3077         (webkit_dom_shadow_root_get_elements_by_class_name):
3078         (webkit_dom_shadow_root_get_elements_by_tag_name):
3079         (webkit_dom_shadow_root_get_elements_by_tag_name_ns):
3080         (webkit_dom_shadow_root_get_inner_html):
3081         (webkit_dom_shadow_root_get_reset_style_inheritance):
3082         (webkit_dom_shadow_root_get_selection):
3083         (webkit_dom_shadow_root_set_apply_author_styles):
3084         (webkit_dom_shadow_root_set_inner_html):
3085         (webkit_dom_shadow_root_set_reset_style_inheritance):
3086         * bindings/gobject/WebKitDOMDeprecated.h:
3087         * bindings/gobject/WebKitDOMDeprecated.symbols:
3088
3089 2014-04-23  Morten Stenshorne  <mstensho@opera.com>
3090
3091         [New Multicolumn] fast/multicol/overflow-content.html displays red
3092         https://bugs.webkit.org/show_bug.cgi?id=131809
3093
3094         Reviewed by David Hyatt.
3095
3096         Insert a break at end of content on our own in the multicol code, to make sure
3097         that overflow is accounted for, and also to make sure that we account for all
3098         content in non-final sets (i.e. those preceding spanners).
3099
3100         In other words, this will additionally fix balancing issues in sets preceding
3101         a spanner. Added a test for that.
3102
3103         Tests: fast/multicol/break-in-columns-before-spanner.html
3104                fast/multicol/newmulticol/compare-with-old-impl/overflow-content.html
3105
3106         * rendering/RenderFlowThread.cpp:
3107         (WebCore::RenderFlowThread::regionInRange): Deleted.
3108         * rendering/RenderFlowThread.h:
3109         * rendering/RenderMultiColumnSet.cpp:
3110         (WebCore::RenderMultiColumnSet::distributeImplicitBreaks):
3111         * rendering/RenderNamedFlowThread.cpp:
3112         (WebCore::RenderNamedFlowThread::applyBreakAfterContent):
3113         * rendering/RenderNamedFlowThread.h:
3114
3115 2014-04-23  Morten Stenshorne  <mstensho@opera.com>
3116
3117         Overflow propagation broken in BTT and RTL writing-modes
3118         https://bugs.webkit.org/show_bug.cgi?id=113781
3119
3120         Reviewed by David Hyatt.
3121
3122         Overflow rectangles are not quite physical, not quite logical. This
3123         means that we cannot use clientBoxRect() directly to represent a
3124         rectangle that expresses exactly no overflow. This rectangle is the
3125         padding box (relative to the border box) in vertical-lr and
3126         horizontal-tb, but the block-direction borders need to be flipped in
3127         vertical-rl and horizontal-bt.
3128
3129         Tests: fast/css/overflow-btt-border-after.html
3130                fast/css/overflow-rtl-border-after.html
3131
3132         * WebCore.exp.in:
3133         * rendering/RenderBlock.cpp:
3134         (WebCore::RenderBlock::computeOverflow):
3135         * rendering/RenderBox.cpp:
3136         (WebCore::RenderBox::addLayoutOverflow):
3137         (WebCore::RenderBox::addVisualOverflow):
3138         (WebCore::RenderBox::layoutOverflowRectForPropagation):
3139         * rendering/RenderBox.h:
3140         (WebCore::RenderBox::layoutOverflowRect):
3141
3142 2014-04-23  Andrei Bucur  <abucur@adobe.com>
3143
3144         [CSS Regions] Improve the debugging infrastructure
3145         https://bugs.webkit.org/show_bug.cgi?id=132042
3146
3147         Reviewed by Mihnea Ovidenie.
3148
3149         This patch improves the debugging code for CSS Regions.
3150
3151         Tests: No function change. No new tests.
3152
3153         * rendering/RenderObject.cpp:
3154         (WebCore::RenderObject::showRegionsInformation): Print brackets around the region range when dumping
3155         the render tree to the console.
3156         * rendering/RootInlineBox.cpp:
3157         (WebCore::RootInlineBox::containingRegion): Convert the ASSERT to an ASSERT_WITH_SECURITY_IMPLICATION.
3158
3159 2014-04-22  Ryosuke Niwa  <rniwa@webkit.org>
3160
3161         Cursor doesn't change back to pointer when leaving the Safari window
3162         https://bugs.webkit.org/show_bug.cgi?id=132038
3163
3164         Reviewed by Alexey Proskuryakov.
3165
3166         r147739 incorrectly added an early exit in EventHandler::selectCursor when hit test result didn't have
3167         any node associated with it. Since we will hit this code when the cursor is outside of the WebView,
3168         we still need to take the CURSOR_AUTO path as did the code before r147739.
3169
3170         No new test is added since this behavior can't be tested in DRT or WTR.
3171
3172         * page/EventHandler.cpp:
3173         (WebCore::EventHandler::selectCursor):
3174
3175 2014-04-22  Zalan Bujtas  <zalan@apple.com>
3176
3177         Do not paint border image when the border rect is empty.
3178         https://bugs.webkit.org/show_bug.cgi?id=131988
3179
3180         Reviewed by Darin Adler.
3181
3182         http://trac.webkit.org/changeset/167351 introduced an early return when border
3183         rect is empty. This patch ensures that border image is not painted either in that case.
3184
3185         Modified padding-margin-negative-border.html to cover border-image case.
3186
3187         * rendering/RenderBoxModelObject.cpp:
3188         (WebCore::RenderBoxModelObject::paintBorder):
3189
3190 2014-04-22  Tim Horton  <timothy_horton@apple.com>
3191
3192         ASSERTION FAILED: scrollerImp == scrollbarPainterForScrollbar(_scrollbar) on two API tests
3193         https://bugs.webkit.org/show_bug.cgi?id=132034
3194         <rdar://problem/16624332>
3195
3196         Reviewed by Simon Fraser.
3197
3198         * platform/mac/ScrollAnimatorMac.mm:
3199         (-[WebScrollbarPainterDelegate shouldUseLayerPerPartForScrollerImp:]):
3200         scrollerImpWithStyle:controlSize:horizontal:replacingScrollerImp: moves the delegate
3201         from the old scrollerImp to the new one, and also happens to call shouldUseLayerPerPartForScrollerImp.
3202         Since scrollerImpWithStyle: has not returned yet, the scrollbarPainterForScrollbar still returns the old scrollerImp,
3203         so this assertion fires. It's safe to remove this because supportsUpdateOnSecondaryThread doesn't make use of the imp.
3204
3205 2014-04-22  Ryosuke Niwa  <rniwa@webkit.org>
3206
3207         REGRESSION (r157328): popover to check into flight ba.com dismisses instantly when focusing form
3208         https://bugs.webkit.org/show_bug.cgi?id=131949
3209
3210         Reviewed by Darin Adler.
3211
3212         The regression was caused by two bugs:
3213         1. The event didn't stop propagating itself even when it should.
3214            If the related target is same as the event origin, the event propagation should stop when the event reaches
3215            the root of the related target's tree scope. Otherwise, it should stop when it reaches the related target.
3216
3217         2. Mouse event's related target exposed nodes inside a user-agent shadow DOM when the related target appeared
3218            inside the origin.
3219
3220         Fixed the bugs by re-introducing path shrinkage algorithm removed in r157328 into EventPath::setRelatedTarget
3221         and adding an algorithm to determine the least common ancestor of the related target and the current target
3222         in moveToParentOrShadowHost. The latter algorithm doesn't match the shadow DOM specification:
3223         http://www.w3.org/TR/2013/WD-shadow-dom-20130514/
3224         but it's good enough in terms of the Web exposed behavior as we don't support author defined insertion points.
3225
3226         Test: fast/events/shadow-event-path.html
3227
3228         * dom/EventDispatcher.cpp:
3229         (WebCore::EventRelatedNodeResolver::moveToParentOrShadowHost):
3230         (WebCore::EventRelatedNodeResolver::findHostOfTreeScopeInTargetTreeScope): Added.
3231         (WebCore::EventDispatcher::dispatchEvent):
3232         (WebCore::EventPath::setRelatedTarget):
3233
3234 2014-04-22  Ryosuke Niwa  <rniwa@webkit.org>
3235
3236         Rollout r156635 since the old behavior was intentional.
3237
3238         * page/EventHandler.cpp:
3239         (WebCore::EventHandler::selectCursor):
3240
3241 2014-04-22  Commit Queue  <commit-queue@webkit.org>
3242
3243         Unreviewed, rolling out r167674.
3244         https://bugs.webkit.org/show_bug.cgi?id=132025
3245
3246         Going a different way with this (Requested by bradee-oh on
3247         #webkit).
3248
3249         Reverted changeset:
3250
3251         "Change Image Controls replacement to use selection and paste"
3252         https://bugs.webkit.org/show_bug.cgi?id=131992
3253         http://trac.webkit.org/changeset/167674
3254
3255 2014-04-22  Brent Fulgham  <bfulgham@apple.com>
3256
3257         [Win] Support Python 2.7 in Cygwin
3258         https://bugs.webkit.org/show_bug.cgi?id=132023
3259
3260         Reviewed by Michael Saboff.
3261
3262         * DerivedSources.make: Use proper path to Cygwin on
3263         all platforms.
3264
3265 2014-04-22  Andreas Kling  <akling@apple.com>
3266
3267         REGRESSION (r151839): Subframe keeps getting mousemove events with the same coordinates after hiding a hovered element.
3268         <https://webkit.org/b/131974>
3269         <rdar://problem/15907469>
3270
3271         When the currently hovered element disappears as a result of style recalc,
3272         we send a fake mousemove event to the page, to see if anything newly added
3273         should become hovered.
3274
3275         The faking mechanism lives in EventHandler and simply synthesizes a new
3276         mousemove event using the last seen mouse location.
3277
3278         The problem here is that we were sending this fake mousemove event to the
3279         subframe where the hovered element lived. Since subframes aren't kept up
3280         to date on recent mouse locations, this could cause some strange behavior
3281         where a subframe would dispatch mousemove events with stale coordinates.
3282
3283         The solution is to always dispatch fake mousemove events from the main
3284         frame's event handler. This is how real event delivery happens, and hit
3285         testing will then find the appropriate subframe, if any.
3286
3287         Reviewed by Benjamin Poulain.
3288
3289         Test: fast/events/ghostly-mousemoves-in-subframe.html
3290
3291         * dom/Document.cpp:
3292         (WebCore::Document::recalcStyle):
3293
3294 2014-04-22  Myles C. Maxfield  <mmaxfield@apple.com>
3295
3296         [OS X] Glyph spacing for system fonts may be incorrect
3297         https://bugs.webkit.org/show_bug.cgi?id=131967
3298
3299         Unreviewed iOS build fix after r167679.
3300
3301         * platform/graphics/mac/SimpleFontDataMac.mm:
3302
3303 2014-04-22  Myles C. Maxfield  <mmaxfield@apple.com>
3304
3305         [OS X] Glyph spacing for system fonts may be incorrect
3306         https://bugs.webkit.org/show_bug.cgi?id=131967
3307
3308         Unreviewed build fix after r167679.
3309
3310         * platform/graphics/mac/SimpleFontDataMac.mm:
3311         (WebCore::hasCustomTracking):
3312
3313 2014-04-21  Myles C. Maxfield  <mmaxfield@apple.com>
3314
3315         [OS X] Glyph spacing for system fonts may be incorrect
3316         https://bugs.webkit.org/show_bug.cgi?id=131967
3317
3318         Reviewed by Simon Fraser.
3319
3320         Covered by existing tests.
3321
3322         * platform/graphics/mac/SimpleFontDataMac.mm:
3323         (WebCore::SimpleFontData::platformWidthForGlyph): Update to use CTFontGetAdvancesForGlyphs() for system fonts
3324         (WebCore::hasCustomTracking):
3325
3326 2014-04-22  David Hyatt  <hyatt@apple.com>
3327
3328         [New Multicolumn] widows/orphans cause assertion failures.
3329         https://bugs.webkit.org/show_bug.cgi?id=131233
3330
3331         Reviewed by Dean Jackson.
3332
3333         * rendering/RenderMultiColumnSet.cpp:
3334         (WebCore::RenderMultiColumnSet::recordSpaceShortage):
3335         Fix an obvious bug where the space shortage is recorded twice (and the
3336         if statement that kept it from being negative is accidentally ignored).
3337
3338 2014-04-22  David Hyatt  <hyatt@apple.com>
3339
3340         [New Multicolumn] Make sure columnTranslationForOffset has the same column-span-aware
3341         translation that fragment collection does.
3342         https://bugs.webkit.org/show_bug.cgi?id=131738
3343
3344         Reviewed by Anders Carlsson.
3345
3346         * rendering/RenderMultiColumnSet.cpp:
3347         (WebCore::RenderMultiColumnSet::collectLayerFragments):
3348         Remove a FIXME that is no longer needed, since the translation offset of the 
3349         column set did get patched.
3350
3351         (WebCore::RenderMultiColumnSet::columnTranslationForOffset):
3352         Add the exact same fix to columnTranslationForOffset that was applied to collectLayerFragments.
3353
3354 2014-04-22  Mark Lam  <mark.lam@apple.com>
3355
3356         WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript() needs to acquire the JSLock before calling into JS.
3357         <https://webkit.org/b/132021>
3358
3359         Reviewed by Mark Hahnenberg.
3360
3361         Covered by existing layout test.
3362
3363         * html/HTMLMediaElement.cpp:
3364         (WebCore::HTMLMediaElement::parseAttribute):
3365
3366 2014-04-22  Manuel Rego Casasnovas  <rego@igalia.com>
3367
3368         REGRESSION (r167652): Broke fast/regions/cssom/region-range-for-box-crash.html in debug mode
3369         https://bugs.webkit.org/show_bug.cgi?id=131982
3370
3371         Reviewed by David Hyatt.
3372
3373         The problem was creating the Range from the arguments received at RenderView::setSelection(). Specifically
3374         in this test endPos is 1 when the element has not children which creates an invalid Range.
3375
3376         * rendering/RenderView.cpp:
3377         (WebCore::RenderView::splitSelectionBetweenSubtrees): Pass 0 as startPos and endPos to Range::create() as we are
3378         not interested in the positions at this point.
3379
3380 2014-04-22  Brady Eidson  <beidson@apple.com>
3381
3382         Change Image Controls replacement to use selection and paste
3383         <rdar://problem/16302722> and https://bugs.webkit.org/show_bug.cgi?id=131992
3384
3385         Reviewed by Tim Horton.
3386
3387         * WebCore.exp.in: Remove deleted symbol.
3388
3389         * html/shadow/mac/ImageControlsButtonElementMac.cpp:
3390         (WebCore::ImageControlsButtonElementMac::defaultEventHandler):
3391
3392         * page/ContextMenuController.cpp:
3393         (WebCore::ContextMenuController::showImageControlsMenu): Select the image element
3394           before showing the menu.
3395         (WebCore::ContextMenuController::replaceControlledImage): Deleted.
3396         * page/ContextMenuController.h:
3397
3398 2014-04-22  David Hyatt  <hyatt@apple.com>
3399
3400         REGRESSION: Hitting asserts in new flow thread selection code.
3401         https://bugs.webkit.org/show_bug.cgi?id=132019
3402
3403         Reviewed by Anders Carlsson.
3404
3405         Null checking flowThreadController is not enough. The list of threads
3406         can be null even when the flowThreadController is not. That's why you
3407         use hasRenderNamedFlowThreads. I patched the two bad places in the code
3408         to use hasRenderNamedFlowThreads to stop the crashes.
3409         
3410         * rendering/RenderView.cpp:
3411         (WebCore::RenderView::selectionBounds):
3412         (WebCore::RenderView::repaintSelection):
3413
3414 2014-04-22  Brent Fulgham  <bfulgham@apple.com>
3415
3416         Check (rather than assume) element is a RenderTableSection before using it
3417         https://bugs.webkit.org/show_bug.cgi?id=121858
3418
3419         Reviewed by David Kilzer.
3420
3421         Test: fast/table/table-insert-object-before-td-crash.html
3422
3423         * rendering/RenderTable.cpp:
3424         (WebCore::RenderTable::addChild): Check that lastBox is a table section before
3425         using the node as if it was one.
3426
3427 2014-04-22  Alex Christensen  <achristensen@webkit.org>
3428
3429         Begin implementation of video using Media Foundation.
3430         https://bugs.webkit.org/show_bug.cgi?id=131830
3431
3432         Reviewed by Brent Fulgham.
3433
3434         * WebCore.vcxproj/WebCore.vcxproj:
3435         * WebCore.vcxproj/WebCore.vcxproj.filters:
3436         Added MediaPlayerPrivateMediaFoundation files.
3437         * platform/graphics/MediaPlayer.cpp:
3438         Include MediaPlayerPrivateMediaFoundation inside new USE(MEDIA_FOUNDATION) flag.
3439         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp: Added.
3440         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h: Added.
3441
3442 2014-04-22  Commit Queue  <commit-queue@webkit.org>
3443
3444         Unreviewed, rolling out r167658.
3445         https://bugs.webkit.org/show_bug.cgi?id=131993
3446
3447         Caused many crashes on media tests (Requested by ap on
3448         #webkit).
3449
3450         Reverted changeset:
3451
3452         "[Mac] don't ask for AVAssetTrack properties before they are
3453         available"
3454         https://bugs.webkit.org/show_bug.cgi?id=131902
3455         http://trac.webkit.org/changeset/167658
3456
3457 2014-04-22  David Hyatt  <hyatt@apple.com>
3458
3459         [New Multicolumn] fast/multicol/multicol-with-child-renderLayer-for-input.html puts the textfield in the wrong place
3460         https://bugs.webkit.org/show_bug.cgi?id=131808
3461
3462         Reviewed by Brady Eidson.
3463     
3464         Make sure FrameView is patched to pass in the update pagination flag when subtree layout
3465         is done on textfields. It had code for the old multicolumn system but did not have a check
3466         for the new multicolumn system.
3467
3468         Added fast/multicol/newmulticol/compare-with-old-impl/multicol-with-child-renderLayer-for-input.html
3469
3470         * page/FrameView.cpp:
3471         (WebCore::updateLayerPositionFlags):
3472
3473 2014-04-22  Zalan Bujtas  <zalan@apple.com>
3474
3475         border-style: double rendered as solid when combined with border-radius
3476         https://bugs.webkit.org/show_bug.cgi?id=131927
3477
3478         Reviewed by Simon Fraser.
3479
3480         BorderEdge::getDoubleBorderStripeWidths() should return the calculated inner, outer border widths. 
3481
3482         Test: fast/borders/hidpi-double-border-with-border-radius-always-produce-solid-line.html
3483
3484         * rendering/BorderEdge.cpp:
3485         (WebCore::BorderEdge::getDoubleBorderStripeWidths):
3486         * rendering/BorderEdge.h:
3487
3488 2014-04-22  Eric Carlson  <eric.carlson@apple.com>
3489
3490         [Mac] don't ask for AVAssetTrack properties before they are available
3491         https://bugs.webkit.org/show_bug.cgi?id=131902
3492         <rdar://problem/16505076>
3493
3494         Reviewed by Jer Noble.
3495
3496         No new tests, the behavior this changes can not be tested with a layout test.
3497
3498         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3499         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3500         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Initialize
3501             m_cachedTotalBytes.
3502         (WebCore::MediaPlayerPrivateAVFoundationObjC::beginLoadingMetadata): Don't report that
3503             metadata has been loaded until the track properties we need have been loaded too.
3504         (WebCore::MediaPlayerPrivateAVFoundationObjC::totalBytes): Cache totalBytes instead
3505             of recalculating it every time.
3506         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange): Invalidate cached
3507             total bytes.
3508         (WebCore::assetTrackMetadataKeyNames): Array of AVAssetTrack properties we use.
3509
3510 2014-04-22  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
3511
3512         Buildfix after r167650 broke non-Cocoa builds
3513         https://bugs.webkit.org/show_bug.cgi?id=131980
3514
3515         Reviewed by Mario Sanchez Prada.
3516
3517         * page/EventHandler.cpp:
3518         (WebCore::EventHandler::handleWheelEvent):
3519
3520 2014-04-22  Manuel Rego Casasnovas  <rego@igalia.com>
3521
3522         [CSS Regions] Selection highlight doesn't match DOM selection
3523         https://bugs.webkit.org/show_bug.cgi?id=131511
3524
3525         Reviewed by David Hyatt.
3526
3527         This patch implements a subtrees approach to fix selection interaction in CSS Regions.
3528
3529         The idea is to divide the Render tree in subtrees. One subtree will be the RenderView (which is always present),
3530         then for each RenderNamedFlowThread (which are children of RenderView) we will have an extra subtree.
3531
3532         For each subtree it determines the start and end positions according to the DOM tree. So, every subtree will
3533         always have a start and end position, and the selection algorithm will be able to reach the end from the start
3534         without problems (this allows us to remove the changes introduced in r155058).
3535
3536         Then selection related methods in RenderView are adapted to ensure that they are called for each subtree. Making
3537         the selection highlight to match DOM selection as expected.
3538
3539         Test: fast/regions/selection/selecting-text-including-region.html
3540
3541         * CMakeLists.txt: Add new class SelectionSubtreeRoot to build file.
3542         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
3543         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
3544         * WebCore.xcodeproj/project.pbxproj: Ditto.
3545         * rendering/RenderNamedFlowThread.h: Inherit from SelectionSubtreeRoot.
3546         * rendering/RenderObject.cpp:
3547         (WebCore::RenderObject::selectionRoot): New method to return the RenderNamedFlowThread if any or the RenderView
3548         otherwise.
3549         (WebCore::RenderObject::selectionStartEnd): If it's inside a RenderNamedFlowThread use specific method instead
3550         of the RenderView's one.
3551         * rendering/RenderObject.h: Add new method signature.
3552         * rendering/RenderView.cpp:
3553         (WebCore::RenderView::selectionBounds): Adapt method to subtrees approach.
3554         (WebCore::RenderView::subtreeSelectionBounds): Modify previous method in order to use SelectionSubtreeRoot
3555         objects.
3556         (WebCore::RenderView::repaintSelection): Adapt method to subtrees approach.
3557         (WebCore::RenderView::repaintSubtreeSelection): Modify previous method in order to use SelectionSubtreeRoot
3558         objects.
3559         (getNextOrPrevRenderObjectBasedOnDirection): Deleted method from r155058 as it is not needed anymore. Each
3560         subtree will have start and end positions, so the selection algorithm will always find the end.
3561         (WebCore::RenderView::setSelection): Adapt method to subtrees approach.
3562         (WebCore::RenderView::splitSelectionBetweenSubtrees): Determine start and end positions for each subtree and
3563         call setSubtreeSelection().
3564         (WebCore::RenderView::setSubtreeSelection): Modify previous method in order to use SelectionSubtreeRoot objects.
3565         * rendering/RenderView.h: Inherit from SelectionSubtreeRoot. Add signature for new helper methods receiving
3566         SelectionSubtreeRoot objects.
3567         * rendering/SelectionSubtreeRoot.cpp: Added.
3568         (WebCore::SelectionSubtreeRoot::SelectionSubtreeRoot):
3569         (WebCore::SelectionSubtreeRoot::selectionStartEndPositions):
3570         * rendering/SelectionSubtreeRoot.h: Added. New class to identify root elements for the subtrees. With some basic
3571         attributes and methods to store the start and end positions and offsets.
3572         (WebCore::SelectionSubtreeRoot::selectionStart):
3573         (WebCore::SelectionSubtreeRoot::selectionStartPos):
3574         (WebCore::SelectionSubtreeRoot::selectionEnd):
3575         (WebCore::SelectionSubtreeRoot::selectionEndPos):
3576         (WebCore::SelectionSubtreeRoot::setSelectionStart):
3577         (WebCore::SelectionSubtreeRoot::setSelectionStartPos):
3578         (WebCore::SelectionSubtreeRoot::setSelectionEnd):
3579         (WebCore::SelectionSubtreeRoot::setSelectionEndPos):
3580
3581 2014-04-21  Brent Fulgham  <bfulgham@apple.com>
3582
3583         [Mac] Follow-up: After a horizontal overflow scroll with a mechanical wheel mouse, vertical scrolling no longer works
3584         https://bugs.webkit.org/show_bug.cgi?id=131960
3585         <rdar://problem/16142100>
3586
3587         Unreviewed build fix.
3588
3589         * page/EventHandler.cpp:
3590         (WebCore::EventHandler::handleWheelEvent): The test to clear the
3591         last scrolled node was too broad. It should only follow this path
3592         if both the phase and momentum phase are 'None'.
3593
3594 2014-04-21  Brent Fulgham  <bfulgham@apple.com>
3595
3596         [Mac] After a horizontal overflow scroll with a mechanical wheel mouse, vertical scrolling no longer works
3597         https://bugs.webkit.org/show_bug.cgi?id=131960
3598         <rdar://problem/16142100>
3599
3600         Reviewed by Darin Adler.
3601
3602         Test: platform/mac/fast/scrolling/scroll-div-no-latching.html
3603
3604         * page/EventHandler.cpp:
3605         (WebCore::EventHandler::handleWheelEvent): When not latching, always clear m_latchedWheelEventElement and m_previousWheelScrolledElement.
3606
3607 2014-04-21  Joseph Pecoraro  <pecoraro@apple.com>
3608
3609         WebProfilerAgent::disable is calling the wrong superclass method
3610         https://bugs.webkit.org/show_bug.cgi?id=131968
3611
3612         Reviewed by Simon Fraser.
3613
3614         * inspector/WebProfilerAgent.cpp:
3615         (WebCore::WebProfilerAgent::disable):
3616
3617 2014-04-21  Enrica Casucci  <enrica@apple.com>
3618
3619         Followup from http://trac.webkit.org/changeset/167624
3620
3621         Reviewed by Darin Adler.
3622
3623         Fixing incorrect use of ? : syntax.
3624
3625         * editing/VisibleUnits.cpp:
3626         (WebCore::characterBeforePosition):
3627
3628 2014-04-21  Ryuan Choi  <ryuan.choi@samsung.com>
3629
3630         Move CoordinatedGraphics related codes out of CMakeLists.txt
3631         https://bugs.webkit.org/show_bug.cgi?id=131931
3632
3633         Reviewed by Gyuyoung Kim.
3634
3635         Move CoordinatedGraphics related files to PlatformEfl.cmake because they are not common files.
3636
3637         * CMakeLists.txt: 
3638         * PlatformEfl.cmake:
3639
3640 2014-04-21  Jer Noble  <jer.noble@apple.com>
3641
3642         [MSE][Mac] AVSampleBufferDisplayLayer and AudioRenderer is overretained.
3643         https://bugs.webkit.org/show_bug.cgi?id=131963
3644
3645         Reviewed by Jon Honeycutt.
3646
3647         Adopt the results of -[[class alloc] init] rather than retaining them.
3648
3649         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3650         (WebCore::SourceBufferPrivateAVFObjC::hasVideo):
3651         (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
3652
3653 2014-04-21  Zalan Bujtas  <zalan@apple.com>
3654
3655         REGRESSION (r166784): Gradient at background of iCloud login page doesn’t go all the way to the bottom
3656         https://bugs.webkit.org/show_bug.cgi?id=131924
3657
3658         Computing tile dimension for contain/cover requires higher precision than what LayoutUnit has. Switching to floats.
3659
3660         Reviewed by Simon Fraser.
3661
3662         Test: fast/backgrounds/hidpi-background-image-contain-cover-scale-needs-more-precision.html
3663
3664         * rendering/RenderBoxModelObject.cpp:
3665         (WebCore::RenderBoxModelObject::calculateFillTileSize):
3666
3667 2014-04-21  Dean Jackson  <dino@apple.com>
3668
3669         Build fix for Mountain Lion.
3670
3671         * platform/mac/SerializedPlatformRepresentationMac.mm:
3672         (WebCore::SerializedPlatformRepresentationMac::deserialize):
3673
3674 2014-04-21  Dan Bernstein  <mitz@apple.com>
3675
3676         WebCore part of <rdar://problem/16631323> Page::setDefersLoading doesn’t do anything when using the Network process
3677         https://bugs.webkit.org/show_bug.cgi?id=131939
3678
3679         Reviewed by David Kilzer.
3680
3681         * WebCore.exp.in: Exported WebCore::ResourceHandle::setDefersLoading.
3682
3683         * loader/ResourceLoadScheduler.cpp:
3684         (WebCore::ResourceLoadScheduler::setDefersLoading): Added a no-op implementation.
3685         * loader/ResourceLoadScheduler.h: Declared new virtual member function setDefersLoading.
3686
3687         * loader/ResourceLoader.cpp:
3688         (WebCore::ResourceLoader::setDefersLoading): Added a call to the above function.
3689
3690 2014-04-21  Brent Fulgham  <bfulgham@apple.com>
3691
3692         [Mac] Difficulty gesture scrolling vertically with trackpad after scrolling horizontally 
3693         https://bugs.webkit.org/show_bug.cgi?id=131959
3694         <rdar://problem/16654523>
3695
3696         Reviewed by Simon Fraser.
3697
3698         * page/mac/EventHandlerMac.mm:
3699         (WebCore::deltaIsPredominantlyVertical): Added.
3700         (WebCore::scrolledToEdgeInDominantDirection): Only consider current mouse wheel event. We don't care about
3701         overall history when deciding if we are bumping against the edge of a scrollable region. Short-circuit if
3702         the element style indicates that overflow is hidden, since this means there is no scroll possible in that
3703         direction.
3704         (WebCore::EventHandler::platformPrepareForWheelEvents): Update for new signature.
3705
3706 2014-04-21  Eric Carlson  <eric.carlson@apple.com>
3707
3708         [Mac] implement WebKitDataCue
3709         https://bugs.webkit.org/show_bug.cgi?id=131799
3710
3711         Reviewed by Dean Jackson.
3712
3713         Tests: http/tests/media/track-in-band-hls-metadata.html
3714                media/track/track-datacue-value.html
3715
3716         * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE.
3717         * DerivedSources.make: Add ENABLE_DATACUE_VALUE to HTML_FLAGS when appropriate.
3718
3719         * CMakeLists.txt: Add JSDataCueCustom.cpp.
3720         * bindings/js/JSBindingsAllInOne.cpp:
3721         * WebCore.xcodeproj/project.pbxproj: Add new files.
3722
3723         * bindings/js/JSDataCueCustom.cpp: Added.
3724         (WebCore::JSDataCue::value): 
3725         (WebCore::JSDataCue::setValue):
3726         (WebCore::JSDataCueConstructor::constructJSDataCue): Custom constructor.
3727
3728         * html/HTMLMediaElement.cpp:
3729         (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Drive-by fixes: don't schedule timeupdate
3730             events when paused, don't call sort on an Vector that can't be sorted.
3731
3732         * html/track/DataCue.cpp:
3733         (WebCore::DataCue::DataCue): Initialize m_type.
3734         (WebCore::DataCue::~DataCue): Unprotect the JSValue if necessary.
3735         (WebCore::DataCue::data): Ask the platform value for data if non-null.
3736         (WebCore::DataCue::setData): Clear m_platformValue and m_value.
3737         (WebCore::DataCue::isEqual): New.
3738         (WebCore::DataCue::value): Return a JSValue from the platform value, or the value passed
3739             to the constructor/set by script.
3740         (WebCore::DataCue::setValue): Set m_value.
3741         * html/track/DataCue.h:
3742         * html/track/DataCue.idl:
3743
3744         * html/track/InbandDataTextTrack.cpp:
3745         (WebCore::InbandDataTextTrack::addDataCue): Don't add the same cue more than once.
3746         (WebCore::InbandDataTextTrack::updateDataCue): Update a cue's duration.
3747         (WebCore::InbandDataTextTrack::removeDataCue): Remove an incomplete cue.
3748         (WebCore::InbandDataTextTrack::removeCue): Remove a cue from the incomplete cue map if necessary.
3749         * html/track/InbandDataTextTrack.h:
3750
3751         * html/track/InbandGenericTextTrack.cpp:
3752         (WebCore::InbandGenericTextTrack::addGenericCue): CueMatchRules is now in TextTrackCue instead
3753             of VTTCue.
3754         * html/track/InbandTextTrack.h:
3755
3756         * html/track/InbandWebVTTTextTrack.cpp:
3757         (WebCore::InbandWebVTTTextTrack::newCuesParsed): Ditto.
3758
3759         * html/track/TextTrack.cpp:
3760         (WebCore::TextTrack::hasCue): Ditto.
3761         * html/track/TextTrack.h:
3762
3763         * html/track/TextTrackCue.cpp:
3764         (WebCore::TextTrackCue::isEqual): New, test base class equality.
3765         * html/track/TextTrackCue.h:
3766
3767         * html/track/TextTrackCueGeneric.cpp:
3768         (WebCore::TextTrackCueGeneric::isEqual): Call TextTrackCue::isEqual first.
3769         * html/track/TextTrackCueGeneric.h:
3770
3771         * html/track/VTTCue.cpp:
3772         (WebCore::VTTCue::isEqual): Call TextTrackCue::isEqual first.
3773         * html/track/VTTCue.h:
3774
3775         * platform/SerializedPlatformRepresentation.h: Added.
3776         (WebCore::SerializedPlatformRepresentation::~SerializedPlatformRepresentation):
3777         (WebCore::SerializedPlatformRepresentation::SerializedPlatformRepresentation):
3778
3779         * platform/graphics/InbandTextTrackPrivateClient.h: Add methods for DataCue with SerializedPlatformRepresentation.
3780
3781         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp: Added.
3782         (WebCore::InbandMetadataTextTrackPrivateAVF::create):
3783         (WebCore::InbandMetadataTextTrackPrivateAVF::InbandMetadataTextTrackPrivateAVF):
3784         (WebCore::InbandMetadataTextTrackPrivateAVF::~InbandMetadataTextTrackPrivateAVF):
3785         (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue):
3786         (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes):
3787         (WebCore::InbandMetadataTextTrackPrivateAVF::flushPartialCues):
3788         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h: Added.
3789
3790         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3791         (WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance): currentTrack -> currentTextTrack.
3792         (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Ditto.
3793         (WebCore::MediaPlayerPrivateAVFoundation::configureInbandTracks): Ditto.
3794         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
3795         (WebCore::MediaPlayerPrivateAVFoundation::setCurrentTextTrack):
3796         (WebCore::MediaPlayerPrivateAVFoundation::setCurrentTrack): Deleted.
3797
3798         Renamed currentTrack and setCurrentTrack to currentTextTrack and setCurrentTextTrack.
3799         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3800         (WebCore::AVFWrapper::currentTextTrack):
3801         (WebCore::MediaPlayerPrivateAVFoundationCF::setCurrentTextTrack):
3802         (WebCore::MediaPlayerPrivateAVFoundationCF::currentTextTrack):
3803         (WebCore::AVFWrapper::setCurrentTextTrack):
3804         (WebCore::AVFWrapper::AVFWrapper):
3805         (WebCore::AVFWrapper::processCue):
3806         (WebCore::AVFWrapper::currentTrack): Deleted.
3807         (WebCore::MediaPlayerPrivateAVFoundationCF::setCurrentTrack): Deleted.
3808         (WebCore::MediaPlayerPrivateAVFoundationCF::currentTrack): Deleted.
3809         (WebCore::AVFWrapper::setCurrentTrack): Deleted.
3810         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
3811
3812         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3813         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3814         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
3815         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): currentTrack -> currentTextTrack
3816         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): currentTrack -> currentTextTrack.
3817         (WebCore::MediaPlayerPrivateAVFoundationObjC::processMetadataTrack): New.
3818         (WebCore::MediaPlayerPrivateAVFoundationObjC::processCue): m_currentTrack -> m_currentTextTrack.
3819         (WebCore::MediaPlayerPrivateAVFoundationObjC::flushCues): Ditto.
3820         (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTextTrack): Renamed from setCurrentTextTrack.
3821         (WebCore::metadataType): Map an AVFoundation metadata key space to a metadata cue type.
3822         (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive): Process new metadata.
3823         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
3824         (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Deleted.
3825
3826         Create a JSValue representation from an AVMetadataItem.
3827         * platform/mac/SerializedPlatformRepresentationMac.h: Added.
3828         (WebCore::SerializedPlatformRepresentationMac::platformType):
3829         (WebCore::SerializedPlatformRepresentationMac::nativeValue):
3830         * platform/mac/SerializedPlatformRepresentationMac.mm: Added.
3831         (WebCore::SerializedPlatformRepresentationMac::SerializedPlatformRepresentationMac):
3832         (WebCore::SerializedPlatformRepresentationMac::~SerializedPlatformRepresentationMac):
3833         (WebCore::SerializedPlatformRepresentationMac::create):
3834         (WebCore::SerializedPlatformRepresentationMac::data):
3835         (WebCore::SerializedPlatformRepresentationMac::deserialize):
3836         (WebCore::SerializedPlatformRepresentationMac::isEqual):
3837         (WebCore::toSerializedPlatformRepresentationMac):
3838         (WebCore::jsValueWithValueInContext):
3839         (WebCore::jsValueWithDataInContext):
3840         (WebCore::jsValueWithArrayInContext):
3841         (WebCore::jsValueWithDictionaryInContext):
3842         (WebCore::jsValueWithAVMetadataItemInContext):
3843
3844 2014-04-21  Benjamin Poulain  <benjamin@webkit.org>
3845
3846         Add Element.matches, the standard name for webkitMatchesSelector
3847         https://bugs.webkit.org/show_bug.cgi?id=131922
3848
3849         Reviewed by Andreas Kling.
3850
3851         This patch just renames webkitMatchesSelector() to matches().
3852
3853         * bindings/scripts/CodeGeneratorObjC.pm:
3854         (GenerateImplementation):
3855         The Objective-C binding generator only supported ImplementedAs for getters and setters.
3856         This adds support for the option so that Element.matches can be generated for Obj-C.
3857
3858         * dom/Element.cpp:
3859         (WebCore::Element::matches):
3860         (WebCore::Element::webkitMatchesSelector): Deleted.
3861         * dom/Element.h:
3862         * dom/Element.idl:
3863         * inspector/InspectorCSSAgent.cpp:
3864         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
3865
3866 2014-04-21  Beth Dakin  <bdakin@apple.com>
3867
3868         topContentInset does not play well with fullscreen elements
3869         https://bugs.webkit.org/show_bug.cgi?id=131955
3870         -and corresponding-
3871         <rdar://problem/16651925>
3872
3873         Reviewed by Sam Weinig.
3874
3875         Calling setNeedsLayout() is not sufficient when the topContentInset has changed 
3876         dynamically. We need to perform the layout right away and update the scrollbars. 
3877         This works completely when the inset changes due to entering/exiting fullscreen, 
3878         but I left a FIXME behind because it is possible to change the inset dynamically 
3879         just through the WK2 API and end up in a situation where everything looks right 
3880         except for the scrollbars. 
3881         * page/FrameView.cpp:
3882         (WebCore::FrameView::topContentInsetDidChange):
3883         * page/FrameView.h:
3884         * page/Page.cpp:
3885         (WebCore::Page::setTopContentInset):
3886
3887 2014-04-18  Jon Honeycutt  <jhoneycutt@apple.com>
3888
3889         Empty RenderInline objects should not be line break objects.
3890
3891         https://bugs.webkit.org/show_bug.cgi?id=131861
3892         <rdar://problem/15663617>
3893
3894         Reviewed by David Hyatt.
3895
3896         * rendering/line/BreakingContextInlineHeaders.h:
3897         (WebCore::BreakingContext::canBreakAtThisPosition):
3898         Don't break at this position if this is an empty RenderInline.
3899
3900 2014-04-21  Enrica Casucci  <enrica@apple.com>
3901
3902         [iOS WebKit2] support replacements for misspelled words.
3903         https://bugs.webkit.org/show_bug.cgi?id=131827
3904         <rdar://problem/16319657>
3905
3906         Reviewed by Darin Adler.
3907
3908         Adds utility function to return the character before the current selection
3909         and converts the nbsp to the space character.
3910
3911         * WebCore.exp.in:
3912         * editing/VisibleUnits.cpp:
3913         (WebCore::characterBeforePosition):
3914         * editing/VisibleUnits.h:
3915
3916 2014-04-21  Eric Carlson  <eric.carlson@apple.com>
3917
3918         [iOS] enable plug-in replacement
3919         https://bugs.webkit.org/show_bug.cgi?id=131947
3920
3921         Reviewed by Jer Noble.
3922
3923         * bindings/generic/RuntimeEnabledFeatures.cpp:
3924         (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures): initialize m_isPluginReplacementEnabled
3925             to true on iOS.
3926
3927 2014-04-21  Rik Cabanier  <cabanier@adobe.com>
3928
3929         [CSS Blending] Remove support for non-separable blend modes from mix-blend-mode
3930         https://bugs.webkit.org/show_bug.cgi?id=131824
3931
3932         Reviewed by Dean Jackson.
3933
3934         Removed support for non-separable blend modes from the CSS parser.
3935
3936         Covered by existing tests
3937
3938         * css/CSSParser.cpp:
3939         (WebCore::isValidKeywordPropertyAndValue):
3940         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
3941         (PlatformCAFilters::setBlendingFiltersOnLayer):
3942
3943 2014-04-21  David Hyatt  <hyatt@apple.com>
3944
3945         [New Multicolumn] Column set drawing under horizontal scrollbar.
3946         https://bugs.webkit.org/show_bug.cgi?id=131812.
3947
3948         Reviewed by Sam Weinig.
3949
3950         Added fast/multicol/newmulticol/compare-with-old-impl/LeftToRight-tb.html.
3951
3952         * rendering/RenderBlockFlow.cpp:
3953         (WebCore::RenderBlockFlow::layoutBlock):
3954         (WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
3955         * rendering/RenderBlockFlow.h:
3956         Pass in relayoutChildren as a reference boolean to checkForPaginationLogicalHeightChange.
3957         The new columns need to be able to set it to true if the amount of available column
3958         height ever changes, so that the RenderFlowThread and the sets get a layout call.
3959
3960         * rendering/style/RenderStyle.cpp:
3961         (WebCore::RenderStyle::setColumnStylesFromPaginationMode):
3962         Make sure that the pagination mode is set up with an auto column-fill specified. You
3963         don't ever want to balance when you set a pagination mode on the RenderView.
3964
3965 2014-04-21  Tim Horton  <timothy_horton@apple.com>
3966
3967         [iOS WebKit2] Implement CSS viewport units
3968         https://bugs.webkit.org/show_bug.cgi?id=131863
3969         <rdar://problem/16279088>
3970
3971         Reviewed by Darin Adler.
3972
3973         * WebCore.exp.in:
3974         * page/FrameView.cpp:
3975         (WebCore::FrameView::setViewportSize):
3976         * page/FrameView.h:
3977         (WebCore::FrameView::viewportSize):
3978         Add setViewportSize() and viewportSize().
3979         If the viewport size changes, we have to do style recalc.
3980         If we have an overridden viewport size, use it.
3981
3982         * rendering/RenderView.cpp:
3983         (WebCore::RenderView::viewportSize):
3984         * rendering/RenderView.h:
3985         Get the size from FrameView.
3986
3987 2014-04-21  Joseph Pecoraro  <pecoraro@apple.com>
3988
3989         Remove unused WebKitSystemInterface functions
3990         https://bugs.webkit.org/show_bug.cgi?id=131938
3991
3992         Reviewed by Alexey Proskuryakov.
3993
3994         * WebCore.exp.in:
3995         * platform/ios/WebCoreSystemInterfaceIOS.mm:
3996         * platform/mac/WebCoreSystemInterface.h:
3997         * platform/mac/WebCoreSystemInterface.mm:
3998
3999 2014-04-21  Andreas Kling  <akling@apple.com>
4000
4001         Move the JSString cache from DOMWrapperWorld to VM.
4002         <https://webkit.org/b/131940>
4003
4004         Since there's no need for JSStrings to be world-specific, this patch
4005         moves the string cache to JSC::VM. This makes jsStringWithCache()
4006         a lot faster since it no longer has to jump through twenty-eleven
4007         hoops to find the DOMWrapperWorld.
4008
4009         Reviewed by Geoff Garen.
4010
4011         * bindings/js/DOMWrapperWorld.cpp:
4012         (WebCore::DOMWrapperWorld::clearWrappers):
4013         * bindings/js/DOMWrapperWorld.h:
4014         * bindings/js/JSDOMBinding.cpp:
4015         (WebCore::jsStringWithCache):
4016
4017 2014-04-21  David Hyatt  <hyatt@apple.com>
4018
4019         [New Multicolumn] Column balancing is slow on float-multicol.html
4020         https://bugs.webkit.org/show_bug.cgi?id=131801
4021
4022         Reviewed by Enrica Casucci.
4023
4024         Added fast/multicol/tall-float.html
4025
4026         * rendering/RenderBlock.cpp:
4027         (WebCore::RenderBlock::expandsToEncloseOverhangingFloats):
4028         Make RenderFlowThreads expand to encompass floats. Also from Morten's patch for
4029         Blink (#361551).
4030
4031         * rendering/RenderBlockFlow.cpp:
4032         (WebCore::RenderBlockFlow::computeOverflow):
4033         Fix a bug where the new multi-column code was adding in overflow for floats
4034         when it should not. This was resulting in the creation of scrollbars when none
4035         should exist. This is my own addition.
4036
4037         (WebCore::RenderBlockFlow::addOverhangingFloats):
4038         Make RenderFlowThreads and RenderRegions ignore overhanging float additions. This
4039         comes from Morten's patch for Blink (#361551).
4040
4041 2014-04-21  Darin Adler  <darin@apple.com>
4042
4043         REGRESSION (r160908): Safari doesn't draw rotated images properly first time
4044         https://bugs.webkit.org/show_bug.cgi?id=131930
4045
4046         Reviewed by Anders Carlsson.
4047
4048         With render tree creation sufficiently lazy, we had to put some explicit
4049         calls to updateStyleIfNeeded into the ImageDocument class.
4050
4051         * dom/DOMImplementation.cpp:
4052         (WebCore::DOMImplementation::createDocument): Pass a Frame&.
4053
4054         * html/Imag